Skip to content

Commit a994097

Browse files
authored
merge goose-acp crate into goose (#8726)
1 parent 8f73ef9 commit a994097

48 files changed

Lines changed: 196 additions & 286 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

AGENTS.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@ git commit -s # required for DCO sign-off
4747
```
4848
crates/
4949
├── goose # core logic
50-
├── goose-acp # Agent Client Protocol
5150
├── goose-acp-macros # ACP proc macros
5251
├── goose-cli # CLI entry
5352
├── goose-server # backend (binary: goosed)

CUSTOM_DISTROS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -416,7 +416,7 @@ For the full ACP specification, see the [Agent Client Protocol documentation](ht
416416
- API client example: `ui/desktop/src/api/` (generated TypeScript client)
417417

418418
**ACP**:
419-
- ACP server implementation: `crates/goose-acp/src/server.rs`
419+
- ACP server implementation: `crates/goose/src/acp/server.rs`
420420
- CLI integration: `crates/goose-cli/src/cli.rs` (Command::Acp)
421421
- Protocol library: `sacp` crate (Rust implementation of ACP)
422422
- Test client example: `test_acp_client.py`

Cargo.lock

Lines changed: 4 additions & 38 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Justfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ check-acp-schema: generate-acp-types
205205
#!/usr/bin/env bash
206206
set -e
207207
echo "🔍 Checking ACP schema and generated types are up-to-date..."
208-
if ! git diff --exit-code crates/goose-acp/acp-schema.json crates/goose-acp/acp-meta.json ui/sdk/src/generated/; then
208+
if ! git diff --exit-code crates/goose/acp-schema.json crates/goose/acp-meta.json ui/sdk/src/generated/; then
209209
echo ""
210210
echo "❌ ACP generated files are out of date!"
211211
echo ""
@@ -217,8 +217,8 @@ check-acp-schema: generate-acp-types
217217
# Generate ACP JSON schema from Rust types
218218
generate-acp-schema:
219219
@echo "Generating ACP schema..."
220-
cd crates/goose-acp && cargo run --bin generate-acp-schema
221-
@echo "ACP schema generated: crates/goose-acp/acp-schema.json, crates/goose-acp/acp-meta.json"
220+
cd crates/goose && cargo run --bin generate-acp-schema
221+
@echo "ACP schema generated: crates/goose/acp-schema.json, crates/goose/acp-meta.json"
222222

223223
# Generate ACP TypeScript types from JSON schema (requires generate-acp-schema first)
224224
generate-acp-types: generate-acp-schema

crates/goose-acp/Cargo.toml

Lines changed: 0 additions & 67 deletions
This file was deleted.

crates/goose-acp/src/lib.rs

Lines changed: 0 additions & 9 deletions
This file was deleted.

crates/goose-cli/Cargo.toml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ path = "src/bin/generate_manpages.rs"
2222
[dependencies]
2323
clap_mangen = "0.2.31"
2424
goose = { path = "../goose", default-features = false }
25-
goose-acp = { path = "../goose-acp", default-features = false }
2625
goose-mcp = { path = "../goose-mcp" }
2726
rmcp = { workspace = true }
2827
clap = { workspace = true }
@@ -71,8 +70,8 @@ winapi = { workspace = true }
7170

7271
[features]
7372
default = ["code-mode", "local-inference", "aws-providers", "telemetry", "otel", "rustls-tls"]
74-
code-mode = ["goose/code-mode", "goose-acp/code-mode"]
75-
local-inference = ["goose/local-inference", "goose-acp/local-inference"]
73+
code-mode = ["goose/code-mode"]
74+
local-inference = ["goose/local-inference"]
7675
aws-providers = ["goose/aws-providers"]
7776
cuda = ["goose/cuda", "local-inference"]
7877
telemetry = ["goose/telemetry"]

crates/goose-cli/src/cli.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1064,8 +1064,9 @@ async fn handle_mcp_command(server: McpCommand) -> Result<()> {
10641064
}
10651065

10661066
async fn handle_serve_command(host: String, port: u16, builtins: Vec<String>) -> Result<()> {
1067+
use goose::acp::server_factory::{AcpServer, AcpServerFactoryConfig};
1068+
use goose::acp::transport::create_router;
10671069
use goose::config::paths::Paths;
1068-
use goose_acp::server_factory::{AcpServer, AcpServerFactoryConfig};
10691070
use std::net::SocketAddr;
10701071
use std::sync::Arc;
10711072
use tracing::info;
@@ -1081,7 +1082,7 @@ async fn handle_serve_command(host: String, port: u16, builtins: Vec<String>) ->
10811082
data_dir: Paths::data_dir(),
10821083
config_dir: Paths::config_dir(),
10831084
}));
1084-
let router = goose_acp::transport::create_router(server);
1085+
let router = create_router(server);
10851086

10861087
let addr: SocketAddr = format!("{}:{}", host, port).parse()?;
10871088
info!("Starting ACP server on {}", addr);
@@ -1766,7 +1767,7 @@ pub async fn cli() -> anyhow::Result<()> {
17661767
Some(Command::Doctor {}) => crate::commands::doctor::handle_doctor().await,
17671768
Some(Command::Info { verbose }) => handle_info(verbose),
17681769
Some(Command::Mcp { server }) => handle_mcp_command(server).await,
1769-
Some(Command::Acp { builtins }) => goose_acp::server::run(builtins).await,
1770+
Some(Command::Acp { builtins }) => goose::acp::server::run(builtins).await,
17701771
Some(Command::Serve {
17711772
host,
17721773
port,

crates/goose/Cargo.toml

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ serde = { workspace = true }
8282
serde_json = { workspace = true }
8383
serde_urlencoded = "0.7"
8484
jsonschema = "0.30.0"
85-
uuid = { workspace = true }
85+
uuid = { workspace = true, features = ["v7"] }
8686
regex = { workspace = true }
8787
async-trait = { workspace = true }
8888
async-stream = { workspace = true }
@@ -96,7 +96,7 @@ nanoid = "0.4"
9696
sha2 = { workspace = true }
9797
base64 = { workspace = true }
9898
url = { workspace = true }
99-
axum = { workspace = true }
99+
axum = { workspace = true, features = ["ws"] }
100100
webbrowser = { workspace = true }
101101
lazy_static = "1.5.0"
102102
tracing = { workspace = true }
@@ -190,6 +190,9 @@ pem = { version = "3", optional = true }
190190
pkcs1 = { version = "0.7", default-features = false, features = ["pkcs8"], optional = true }
191191
pkcs8 = { version = "0.10", default-features = false, features = ["alloc"], optional = true }
192192
sec1 = { version = "0.7", default-features = false, features = ["der", "pkcs8"], optional = true }
193+
goose-acp-macros = { version = "1.31.0", path = "../goose-acp-macros" }
194+
tower-http = { workspace = true, features = ["cors"] }
195+
http-body-util = "0.1.3"
193196

194197

195198
[target.'cfg(target_os = "windows")'.dependencies]
@@ -222,6 +225,7 @@ opentelemetry_sdk = { workspace = true, features = ["testing"] }
222225
goose-test-support = { path = "../goose-test-support" }
223226
bytes.workspace = true
224227
http.workspace = true
228+
goose-mcp = { path = "../goose-mcp" }
225229

226230
[[example]]
227231
name = "agent"
@@ -244,11 +248,17 @@ path = "src/bin/analyze_cli.rs"
244248
name = "build_canonical_models"
245249
path = "src/providers/canonical/build_canonical_models.rs"
246250

251+
[[bin]]
252+
name = "generate-acp-schema"
253+
path = "src/bin/generate_acp_schema.rs"
254+
247255
[package.metadata.cargo-machete]
248256

249257
ignored = [
250258
# Used only on windows
251259
"winapi",
252260
# Used to provide extras imports for sacp
253261
"agent-client-protocol-schema",
262+
# Used via http transport
263+
"http-body-util",
254264
]

0 commit comments

Comments
 (0)