Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/copilot-instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
## Project-Specific Context

- This is a Rust project using cargo workspaces
- Core crates: `goose` (agent logic), `goose-cli` (CLI), `goose-server` (backend), `goose-mcp` (MCP servers)
- Core crates: `goose` (agent logic and ACP server), `goose-cli` (CLI), `goose-mcp` (MCP servers)
- Error handling: Use `anyhow::Result`, not `unwrap()` in production code
- Async runtime: tokio
- MCP protocol implementations require extra scrutiny
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/goose-issue-solver.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ env:
- Deletion is a feature: ask "can I delete code instead of adding?"
- Complete changes: update ALL usages when changing a type. No exceptions.
- When changing message types, update ALL provider format functions.
- When changing server routes, run `just generate-openapi`.
- When changing ACP request/response types, run `just generate-acp-types`.
- Your context degrades. The TODO is your memory. Update it after each step.

Types:
Expand Down
22 changes: 8 additions & 14 deletions BUILDING_LINUX.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,7 @@ cd goose
Build Goose CLI:

```bash
cargo build --release -p goose-cli
```

Build Goose Server:

```bash
cargo build --release -p goose-server
cargo build --release -p goose-cli --bin goose
```

This command should give you a list of possible packages in the
Expand All @@ -80,9 +74,9 @@ cargo test -p
cd ui/desktop
pnpm install

# Copy the server binary to the expected location
# Copy the goose binary to the expected location
mkdir -p src/bin
cp ../../target/release/goosed src/bin/
cp ../../target/release/goose src/bin/
```

### 4. Build the Application
Expand Down Expand Up @@ -143,10 +137,10 @@ cd /path/to/goose/ui/desktop/out/goose-linux-x64
./goose 2>&1 | grep -v "GLib-GObject" | grep -v "browser_main_loop"
```

#### Server Binary Not Found
If you see "Could not find goosed binary", ensure you've:
1. Built the Rust backend: `cargo build --release -p goose-server`
2. Copied it to the right location: `cp ../../target/release/goosed src/bin/`
#### Goose Binary Not Found
If you see "Goose binary not found", ensure you've:
1. Built the Rust binary: `cargo build --release -p goose-cli --bin goose`
2. Copied it to the right location: `cp ../../target/release/goose src/bin/`
3. Rebuilt the application: `pnpm run make`

### Distribution-Specific Notes
Expand Down Expand Up @@ -177,7 +171,7 @@ Building as Snap packages is not currently supported but may be added in the fut

For active development:

1. **Backend changes**: Rebuild with `cargo build --release -p goose-server` and copy the binary
1. **Backend changes**: Rebuild with `cargo build --release -p goose-cli --bin goose` and copy the binary
2. **Frontend changes**: Use `pnpm run start` for hot reload during development
3. **Full rebuild**: Run the complete build process above

Expand Down
41 changes: 10 additions & 31 deletions CUSTOM_DISTROS.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ goose's architecture is designed for extensibility. Organizations can create "re
│ │ │
▼ ▼ ▼
┌─────────────────────────────────────────────────────────────────┐
│ goose-server (goosed) │
│ REST API for all goose functionality │
│ goose serve (ACP) │
│ ACP HTTP/WebSocket server for custom clients │
└─────────────────────────────────────────────────────────────────┘
│
▼
Expand All @@ -49,7 +49,7 @@ goose's architecture is designed for extensibility. Organizations can create "re
| Bundle custom MCP extensions | `config.yaml` extensions section, `ui/desktop/src/built-in-extensions.json`, `ui/desktop/src/components/settings/extensions/bundled-extensions.json` | Medium |
| Modify system prompts | `crates/goose/src/prompts/` | Low |
| Customize desktop branding | `ui/desktop/` (icons, names, colors) | Medium |
| Build a new UI (web, mobile) | Integrate with `goose-server` REST API | High |
| Build a new UI (web, mobile) | Integrate with `goose serve` over ACP | High |
| Create guided workflows | Recipes (YAML-based task definitions) | Low |
| Build complex multi-step workflows | Recipes with sub-recipes and subagents | Medium |

Expand Down Expand Up @@ -306,38 +306,22 @@ export GOOSE_BUNDLE_NAME="InsightStream-goose"

goose provides two integration options for building custom UIs:

### Option 1: REST API (goose-server)
### Option 1: ACP HTTP/WebSocket (`goose serve`)

Use goose-server for HTTP-based integrations (web apps, simple clients):
Use `goose serve` for ACP-based integrations (web apps, desktop shells, and other clients):

```bash
# Start the server
./target/release/goosed
GOOSE_SERVER__SECRET_KEY='a-long-random-secret' goose serve
Comment thread
Abhijay007 marked this conversation as resolved.
Resolved

# API available at http://localhost:3000
# ACP endpoint available at http://localhost:3284/acp
```

**Reference the OpenAPI spec** at `ui/desktop/openapi.json` for available endpoints:
- Session management
- Message streaming
- Extension control
- Configuration
For the ACP protocol and client flow, see [Agent Client Protocol clients](documentation/docs/guides/acp-clients.md).

**Key endpoints** for a minimal integration:
### Option 2: Agent Client Protocol (ACP) over stdio

```
POST /sessions # Create a new session
POST /sessions/{id}/messages # Send a message (streaming response)
GET /sessions/{id} # Get session state
GET /extensions # List available extensions
POST /extensions/{name}/enable # Enable an extension
```

**Handle streaming responses** - goose uses Server-Sent Events (SSE) for real-time responses.

### Option 2: Agent Client Protocol (ACP)

For richer integrations (IDEs, desktop apps, embedded agents), use the **Agent Client Protocol (ACP)**—a standardized JSON-RPC protocol for AI agent communication over stdio or other transports.
For richer local integrations (IDEs and embedded agents), run goose as an ACP agent over stdio.

ACP provides:
- **Bidirectional communication**: Agents can request permissions, stream updates, and receive cancellations
Expand Down Expand Up @@ -410,11 +394,6 @@ For the full ACP specification, see the [Agent Client Protocol documentation](ht

### Technical Details

**REST API (goose-server)**:
- Server implementation: `crates/goose-server/src/routes/`
- OpenAPI generation: `just generate-openapi`
- API client example: `ui/desktop/src/api/` (generated TypeScript client)

**ACP**:
- ACP server implementation: `crates/goose/src/acp/server.rs`
- CLI integration: `crates/goose-cli/src/cli.rs` (Command::Acp)
Expand Down
39 changes: 0 additions & 39 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 0 additions & 13 deletions Justfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@ release-binary:
@echo "Building release version..."
cargo build --release -p goose-cli --bin goose
@just copy-binary
@echo "Generating OpenAPI schema..."
cargo run -p goose-server --bin generate_schema

# Build Windows executable on a Windows host
[unix]
Expand Down Expand Up @@ -149,11 +147,6 @@ run-server:
@echo "Running external ACP backend..."
GOOSE_SERVER__SECRET_KEY="${GOOSE_SERVER__SECRET_KEY:-test}" cargo run -p goose-cli --bin goose -- serve --platform desktop --host 127.0.0.1 --port 3000

# Generate OpenAPI specification without starting the UI
generate-openapi:
@echo "Generating OpenAPI schema..."
cargo run -p goose-server --bin generate_schema

# Check if generated ACP schema and TypeScript types are up-to-date
check-acp-schema: generate-acp-types
#!/usr/bin/env bash
Expand Down Expand Up @@ -297,7 +290,6 @@ bump-version version:
@cd ui/desktop && npm pkg set "version={{ version }}"
# update Cargo.lock after bumping versions in Cargo.toml
@cargo update --workspace
@just set-openapi-version {{ version }}

# rebuild canonical model registry and mapping report from models.dev
build-canonical-models:
Expand All @@ -312,14 +304,10 @@ prepare-release version:
Cargo.lock \
ui/desktop/package.json \
ui/pnpm-lock.yaml \
ui/desktop/openapi.json \
crates/goose-provider-types/src/canonical/data/canonical_models.json \
crates/goose-provider-types/src/canonical/data/provider_metadata.json
@git commit --message "chore(release): release version {{ version }}"

set-openapi-version version:
@jq '.info.version |= "{{ version }}"' ui/desktop/openapi.json > ui/desktop/openapi.json.tmp && mv ui/desktop/openapi.json.tmp ui/desktop/openapi.json

# extract version from Cargo.toml
get-tag-version:
@uvx --from=toml-cli toml get --toml-path=Cargo.toml "workspace.package.version"
Expand Down Expand Up @@ -354,7 +342,6 @@ set windows-shell := ["powershell.exe", "-NoLogo", "-Command"]
### profile = --release or "" for debug
### allparam = OR/AND/ANY/NONE --workspace --all-features --all-targets
win-bld profile allparam:
cargo run {{profile}} -p goose-server --bin generate_schema
cargo build {{profile}} {{allparam}}

### Build just debug
Expand Down
1 change: 0 additions & 1 deletion crates/goose-cli/src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1433,7 +1433,6 @@ async fn handle_serve_command(args: ServeCommandArgs) -> Result<()> {
config_dir: Paths::config_dir(),
goose_platform: platform.into(),
additional_source_roots,
scheduler: None,
}));
let env_secret = std::env::var(GOOSE_SERVER_SECRET_KEY_ENV)
.ok()
Expand Down
7 changes: 3 additions & 4 deletions crates/goose-sdk-types/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
//! Shared types for the Goose SDK.
//! Shared Goose ACP wire types.
//!
//! These wire types are used by both the ACP client/server path and the
//! in-process uniffi bindings, keeping a single source of truth for Goose's
//! custom `_goose/*` JSON-RPC methods.
//! These wire types keep a single source of truth for Goose's custom
//! `_goose/*` JSON-RPC methods.

pub mod custom_notifications;
pub mod custom_requests;
60 changes: 0 additions & 60 deletions crates/goose-server/ALLOWLIST.md

This file was deleted.

Loading
Loading