Repository navigation
feat(acp): run harnesses without hooks and share one server pool - #1228
Merged
Merged
Conversation
The generic ACP plugin needs the shared client to drive plain ACP: ACP's systemPrompt when advertised, else the instructions lead the first prompt; mid-turn messages queue without a steering hook; session/close only when advertised. Startup takes argv and an abort signal, maps env's 126/127 to the install hint, keeps early stderr, and always strips the Buzz identity last. One 48-server pool now lives in the shared client so Goose and generic sessions evict each other's idle sessions instead of together exhausting the host's 64. Signed-off-by: Duncan <dcfd242e557282d7a1e2cf2e6877522682f1e5c6156dc92ca7d90eaedd3b0f95@buzz.block.builderlab.xyz>
Member
Author
|
🤖 Folded into #1227. |
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.
Stacked on #1227 (shared ACP client extraction). Stack: #1227 → this PR → generic ACP plugin runtime (Hayt).
Lets the shared ACP client drive a harness that has none of Goose's extensions, which the generic ACP plugin needs, and moves the Buzz-tool server pool into the shared client so every ACP plugin shares one.
Harnesses without hooks (every
AcpHookshook is now optional)systemPrompthook wins; otherwise ACP'ssystemPrompt(mode: "append") goes onsession/newwhensessionCapabilities.systemPromptis advertised; otherwise the instructions lead the session's first prompt, once.steeringhook, a message sent mid-turn runs as the next turn.selecthook, the harness's own pick stands. WithoutnewSessionMeta, no_metais sent.session/closeis sent only whensessionCapabilities.closeis advertised, or when hooks setcloseSession: "always"(Goose does, keeping its behavior).mcpCapabilities.httpmust be exactlytrue, else the harness is refused.Startup and shutdown
AcpProcess.starttakesargs(passed tospawnunchanged) and asignal; aborting kills the process and rejects with the signal's reason.BUZZ_PRIVATE_KEY,BUZZ_AUTH_TAGandBUZZ_RELAY_URLare removed after the hooks' and launch's env (PROTECTED_ENV).initializeanswers maps tohooks.missing; stderr written before startup finishes is kept for the error.AcpProcess.stop(timeout)stops the harness and resolves once it exits or the time limit passes.Shared server pool
SHARED_POOL(48 servers) lives inagent-sessions.ts;AgentSessionsuses it unless given a pool. Goose's runtime no longer makes its own, so Goose and generic sessions evict each other's least recently used idle session.Goose's test files and
goose-testing.tsare unchanged.