mirror of
https://github.com/block/buzz.git
synced 2026-11-02 15:31:27 +00:00
Feasibility spike: keep buzz-agent's ACP wire contract exactly as-is, but replace the hand-written agent loop with goose used as a Rust library. 13,259 -> 1,562 src LOC (88% cut), plus ~5,800 test LOC that covered the deleted loop. Deleted, now goose's: llm.rs 3846 -> goose::providers (superset of the 4 providers) mcp.rs 1139 -> goose::agents::extension_manager auth.rs 845 -> goose::providers (incl. Databricks OAuth) hints.rs 726 -> prompt_manager::with_hints catalog.rs 631 -> goose::providers::init builtin.rs 575 -> goose skills platform extension handoff.rs 430 -> goose::context_mgmt (auto-compaction) Kept deliberately (the contract buzz-acp depends on): wire.rs 293 verbatim; agentInfo.name = "buzz-agent" (kind-44200 harness attribution); 6-method surface; activeRunId with _meta nested inside update; usage_update before the session/prompt response; keepalive ticker; error -> JSON-RPC code mapping; single-flight; size caps. This is NOT "goose as the harness". Picking Goose from the harness gallery still shells out to a user-installed goose CLI. This is buzz-agent's own identity with a goose-powered loop. Why a separate crate excluded from the workspace: crates/buzz-agent is a library linked into sprig AND desktop/src-tauri, so goose's ~700-crate graph would land in the Tauri build and the workspace lockfile. Own Cargo.lock, same isolation trick as PR #1526. Notable: driving the library is what makes the persona work at all. Goose's own ACP server never reads systemPrompt (zero hits in goose/crates/goose/src) and both PRs that would have wired it -- buzz#1290, goose#9971 -- are closed unmerged. tests/stdio_turn.rs asserts Fizz's prompt reaches the provider. Also: GOOSE_MODE is left at goose's default rather than forced to "auto" (auto-approve every tool call), which is what the desktop catalog ships for the external goose runtime. Signed-off-by: Michael Neale <michael.neale@gmail.com>
72 lines
2.7 KiB
TOML
72 lines
2.7 KiB
TOML
# buzz-agent-core — buzz-agent's ACP wire layer on top of the Goose Rust
|
|
# library (used as an SDK, not as a subprocess).
|
|
#
|
|
# WHY A SEPARATE CRATE, EXCLUDED FROM THE WORKSPACE
|
|
#
|
|
# `crates/buzz-agent` is a *library* linked into both `crates/sprig` and
|
|
# `desktop/src-tauri` (which uses only `catalog`/`config` for the Databricks
|
|
# model picker). Adding goose to that crate would pull goose's ~700-crate
|
|
# dependency graph into the Tauri app and into the workspace lockfile.
|
|
#
|
|
# So this crate is excluded from the workspace (see the root Cargo.toml
|
|
# `exclude` list) and carries its own Cargo.lock, exactly as PR #1526 did for
|
|
# `goose-acp`. Goose's ACP/MCP dependency versions move independently.
|
|
#
|
|
# Build: cargo build --release --manifest-path buzz-agent-core/Cargo.toml
|
|
#
|
|
# THIS IS NOT "GOOSE AS THE HARNESS". The binary keeps buzz-agent's identity
|
|
# (`agentInfo.name = "buzz-agent"`), its 6-method ACP surface, its
|
|
# `activeRunId` steering contract and its `usage_update` ordering. Only the
|
|
# agent loop underneath is Goose's instead of hand-written. Picking "Goose"
|
|
# from the harness gallery remains a separate thing: that shells out to a
|
|
# user-installed `goose` CLI.
|
|
|
|
[package]
|
|
name = "buzz-agent-core"
|
|
version = "0.1.0"
|
|
edition = "2021"
|
|
publish = false
|
|
|
|
[lib]
|
|
name = "buzz_agent_core"
|
|
path = "src/lib.rs"
|
|
|
|
[[bin]]
|
|
name = "buzz-agent-core"
|
|
path = "src/main.rs"
|
|
|
|
[dependencies]
|
|
# Pinned to a release commit deliberately: goose's public `Agent` surface is
|
|
# not semver-stable (many fields are `pub(super)`) and its MSRV moves quickly.
|
|
# 305849b71 == goose 1.44.0.
|
|
#
|
|
# default-features = false drops: telemetry, otel, aws-providers,
|
|
# local-inference (candle/whisper), code-mode (pctx/V8), system-keyring, nostr.
|
|
# We name only rustls-tls, which is mandatory — `goose` pulls reqwest/sqlx/rmcp
|
|
# with default-features = false, so a TLS backend only arrives via this feature
|
|
# (and `rustls-tls` + `native-tls` are mutually exclusive: see the
|
|
# compile_error! at goose/src/lib.rs:3-4).
|
|
goose = { path = "../../goose/crates/goose", default-features = false, features = ["rustls-tls"] }
|
|
goose-provider-types = { path = "../../goose/crates/goose-provider-types" }
|
|
|
|
tokio = { version = "1", features = ["rt-multi-thread", "macros", "io-std", "io-util", "sync", "time"] }
|
|
tokio-util = { version = "0.7", features = ["rt"] }
|
|
futures = "0.3"
|
|
serde = { version = "1", features = ["derive"] }
|
|
serde_json = "1"
|
|
anyhow = "1"
|
|
tracing = "0.1"
|
|
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
|
|
|
|
[dev-dependencies]
|
|
tempfile = "3"
|
|
|
|
# Size-optimized. PR #1526 measured 32.5 MiB (macOS arm64) for a comparable
|
|
# goose-linked binary; re-measure rather than trusting that number.
|
|
[profile.release]
|
|
opt-level = "z"
|
|
lto = "fat"
|
|
codegen-units = 1
|
|
panic = "abort"
|
|
strip = true
|