feat(acp): add ACP methods to support programmatic goose clients#7764
Draft
wpfleger96 wants to merge 1 commit intomainfrom
Draft
feat(acp): add ACP methods to support programmatic goose clients#7764wpfleger96 wants to merge 1 commit intomainfrom
wpfleger96 wants to merge 1 commit intomainfrom
Conversation
The ACP protocol was missing several capabilities needed by external clients that talk to goosed over the network. Adds: - `_goose/health` — startup health check for clients that poll before accepting traffic - `_goose/session/set_instructions` — injects a system prompt into an active session under the "recipe" key, replacing the two-call HTTP pattern of start_agent + update_from_session - `session/set_model` now accepts an optional `provider` field for full provider+model switching; empty string is filtered out to avoid opaque registry lookup errors - `_goose/session/get` verified to already return token metrics (input_tokens, output_tokens, accumulated_*, model_config) via the Session struct serialization — confirmed with a new test
c74de4a to
b1fd5f5
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The ACP protocol was missing several capabilities needed by external clients that talk to a running
goose-acp-serverover the network.Previously, clients like the goosed-slackbot had to use the HTTP API (
goose-server) because ACP lacked a health check, a way to inject session instructions, and the ability to switch LLM providers at runtime. This closes those gaps._goose/healthreturning{"status": "ok"}— for clients that poll at startup before accepting traffic_goose/session/set_instructions— injects a string into the agent's system prompt under the"recipe"key, equivalent to thePOST /agent/update_from_sessionHTTP pattern but taking the final instructions string directlysession/set_modelwith an optionalproviderfield — when present, switches the full provider+model via the global registry (same pathOST /agent/update_provider`); empty string is treated as absent to avoid confusing registry errors_goose/session/getalready returns token metrics (input_tokens,output_tokens,accumulated_*,model_config) viaSessionstruct serialization; adds a test asserting their presence