镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

feat(acp): run harnesses without hooks and share one server pool - #1228

Merged
wpfleger96 merged 1 commit into
duncan/acp-shared-clientfrom
duncan/acp-client-step2
Oct 15, 2026
Merged

wpfleger96 merged 1 commit into
duncan/acp-shared-clientfrom
duncan/acp-client-step2

Conversation

@wpfleger96

Copy link
Copy Markdown
Member

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 AcpHooks hook is now optional)

  • System prompt: a systemPrompt hook wins; otherwise ACP's systemPrompt (mode: "append") goes on session/new when sessionCapabilities.systemPrompt is advertised; otherwise the instructions lead the session's first prompt, once.
  • Steering: without a steering hook, a message sent mid-turn runs as the next turn.
  • Model: without a select hook, the harness's own pick stands. Without newSessionMeta, no _meta is sent.
  • session/close is sent only when sessionCapabilities.close is advertised, or when hooks set closeSession: "always" (Goose does, keeping its behavior).
  • mcpCapabilities.http must be exactly true, else the harness is refused.

Startup and shutdown

  • AcpProcess.start takes args (passed to spawn unchanged) and a signal; aborting kills the process and rejects with the signal's reason.
  • BUZZ_PRIVATE_KEY, BUZZ_AUTH_TAG and BUZZ_RELAY_URL are removed after the hooks' and launch's env (PROTECTED_ENV).
  • Exit 126/127 before initialize answers maps to hooks.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 in agent-sessions.ts; AgentSessions uses 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.ts are unchanged.

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>
@wpfleger96
wpfleger96 merged commit db915a8 into duncan/acp-shared-client Oct 15, 2026
31 checks passed
@wpfleger96
wpfleger96 deleted the duncan/acp-client-step2 branch October 15, 2026 21:25
@wpfleger96

Copy link
Copy Markdown
Member Author

🤖 Folded into #1227.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant