82 commits of main, plus the goose pin moved from bf332b9 to 7c4ba22
(60 commits) because main's changes and goose's API changes overlap.
Conflict resolutions worth knowing about:
* `llm.rs`, `handoff.rs`, `tests/regressions.rs` — main changed files this
branch deletes. Reviewed each change rather than dropping it silently:
#5475 raised `BUZZ_AGENT_MAX_OUTPUT_TOKENS` and the truncation-recovery
allowance in buzz's own request loop, which no longer exists; goose owns
retries and output limits now, so there is nothing to port.
* `model_capabilities.rs` (#5597) moved to `buzz-model-catalog`, not kept in
`buzz-agent`. The manifest is read by the desktop model picker, which
cannot link goose (`libsqlite3-sys` collision), so it has to live in the
crate the desktop already depends on. `ThinkingEffort` moved with it,
reduced to the vocabulary the manifest is typed in — the request-path
mapping went with buzz's HTTP transport. The 103-vector corpus guard
passes in its new home; `just ci` and `regen-model-corpus` now point at
it, and `run-tests.sh` runs the new crate's lib tests.
* Curated model labels reach the picker. main added them to the Databricks
discovery path; on this branch `session/new` enumerates through goose's
provider API instead, so the label lookup had to be applied there or
#5597 would have been silently reverted for every provider.
goose API changes this bump required:
* `StateMachine`/`Step`/`Operation` are generic over session and effect
type, and the loop moved into a new `goose-agent` crate.
* `StateEffect` split: buzz now names `ConversationEffect`, the narrow set,
rather than goose's `GooseEffect`. `ReplaceConversation` lost its `usage`
field — buzz always passed `None`, and the driving loop already resets
the running total, so this is a rename not a behaviour change.
78 unit + 22 integration tests pass, clippy `-D warnings` and fmt clean on
the pinned 1.95.0 toolchain.
Co-authored-by: Michael Neale <michael.neale@gmail.com>
Signed-off-by: Michael Neale <michael.neale@gmail.com>
Conflicts, and how each was resolved:
* crates/buzz-agent/src/mesh.rs + tests/mesh_auto.rs — DELETED. main's
#5289 removed buzz-agent's client-side mesh catalog probe on purpose:
MeshLLM v0.75 decides per request, the desktop resolves the wire model
before spawn (relay_mesh_wire_model), and BUZZ_AGENT_PREFER_MESH_FOR_AUTO
is no longer set by anything. Keeping my MeshAutoProvider would have
resurrected policy main deliberately retired.
* crates/buzz-agent/src/llm.rs — stays deleted; goose owns the transport.
main's changes to it were the Databricks OAuth hardening (#5534), which
applies to auth.rs, now living in buzz-model-catalog.
* crates/buzz-agent/src/config.rs — ours; main's only change was dropping
prefer_mesh_for_auto, which this branch had already dropped.
* buzz-model-catalog: picked up #5534's O_NOFOLLOW/0600 token-cache
hardening, which needs the nix dep the extraction had left behind.
Co-authored-by: Michael Neale <michael.neale@gmail.com>
Signed-off-by: Michael Neale <michael.neale@gmail.com>
buzz-acp inherits its stderr to the agent subprocess (acp.rs:463), so the
desktop's RUST_LOG filter for the harness also decides what the agent can
write to disk. It named only buzz_acp, so every buzz-agent diagnostic was
filtered out before reaching the per-agent log.
That is invisible until something goes wrong: an agent misbehaving in the
desktop left no trace of compaction, the _Stop veto, max-rounds, or
provider errors -- exactly the lines you need to tell whether a turn did
what it should. Found while trying to confirm from the logs alone that a
desktop agent was running the new loop; the logs could not answer it.
Adds buzz_agent=info to the default, appends only the missing directive
when an operator filter is present (so RUST_LOG=buzz_agent=debug is not
downgraded to info), and takes a fully-specified filter verbatim.
Co-authored-by: Michael Neale <michael.neale@gmail.com>
Signed-off-by: Michael Neale <michael.neale@gmail.com>
buzz-agent keeps its name, its binary, its ACP contract and its place in the
workspace. Only the guts change: ~11k lines of hand-written agent loop are
replaced by the goose crate used as a Rust library.
Deleted, now goose's: llm.rs 3846 (providers), mcp.rs 1139 (extension manager),
hints.rs 726, builtin.rs 575 (skills), handoff.rs 430 (context_mgmt), plus most
of config.rs 2709. Kept: wire.rs verbatim, and the parts goose does not know
about -- the exact session/update shapes buzz-acp parses, the keepalive ticker,
usage_update ordering, activeRunId, and the error taxonomy.
Behaviour preserved, each with an end-to-end stdio test: the Fizz persona (the
reason for embedding -- goose's own ACP server never reads systemPrompt, so
this only works via the library API), the _Stop end-turn veto, _PostCompact
re-injection, [Reflect] on failed tool calls, the model catalog, set_model,
cancel and steer. Validated against the real buzz-dev-mcp, not just a fake.
Two dependency conflicts had to be solved to get goose into the workspace:
1. goose pins icu_locale "=2.1.1" (needs icu_collections ~2.1.1) while
url 2.5.x -> idna -> idna_adapter 1.2.2 pulls icu_normalizer 2.2.0 (needs
icu_collections ~2.2.0). Only one 2.x icu_collections can be selected.
Fixed by pinning idna_adapter "=1.2.0", the last release on ICU4X 1.x,
which keeps IDNA off that line entirely.
2. The desktop could no longer link buzz-agent at all: goose pulls
sqlx-sqlite -> libsqlite3-sys 0.30, desktop has rusqlite 0.37 ->
libsqlite3-sys 0.35, and both declare links = "sqlite3". Cargo forbids
that and no pin resolves it. But the desktop only ever used Databricks
model discovery and WINDOWS_SHELL_RESOLUTION_ENV, so those moved to a new
buzz-model-catalog crate (no goose, no sqlite, same API). The desktop
dependency is renamed in place, so no desktop source changes.
Also fixes a test that had been silently skipping: real_dev_mcp.rs located
buzz-dev-mcp by a hardcoded parent depth, so after the move it returned early
and reported 0.00s. It now searches upward and panics on a miss.
Workspace, sprig, and desktop all build. 41 tests green, fmt + clippy clean.
Signed-off-by: Michael Neale <michael.neale@gmail.com>