feat(agent-acp): support remote HTTP and SSE MCP servers - #19
Merged
Conversation
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.
Summary
I made
@pwrdrvr/agent-acpauthoritative for ACP v1 MCP server configurationacross stdio, streamable HTTP, and HTTP+SSE transports.
I added:
{ name, value }[]collectionssession/new,session/load, and the existingreopenThreadpathThe pinned
@zed-industries/agent-client-protocol@0.4.5exposessession/newand
session/load, but no separatesession/resume, so I did not invent ahot-reconfiguration or resume method outside the ACP spec.
Why
PwrAgent currently carries its own ACP stdio/HTTP/SSE union and capability gate,
while PwrSnap is constrained by the stdio-only public type in
@pwrdrvr/agent-acp@0.12.2. This change lets both hosts use the shared packagefor per-thread remote HTTP MCP injection without another custom ACP client or an
HTTP-to-stdio shim.
Migration notes
PwrAgent
I expect PwrAgent to replace its local MCP config union with
AcpMcpServerConfig. Existing HTTP/SSEheaders: Array<{ name, value }>values are accepted unchanged. It can keepgating through the normalized
agentCapabilities.mcp.http/.ssedata or useacpRuntimeSupportsHttpMcp,acpRuntimeSupportsSseMcp,client.supportsHttpMcp(), andclient.supportsSseMcp().PwrSnap
I expect PwrSnap to pass its selected MCP list per thread through
startThreadNative,reopenThread, orloadThreadNative. A sharedAcpAgentClientPoolremains safe: session payloads and approval context containonly that thread's configured servers.
Stdio callers need no migration. Their existing
{ name, command, args?, env?: Record<string, string> }inputs remain valid.Verification
I verified the complete repository CI sequence locally:
pnpm lint:licensespnpm lint:depspnpm lint:boundariespnpm buildpnpm typecheckpnpm test— 296 passing, 1 pre-existing skipThe focused agent-acp suite has 146 passing tests, including exact validation
against the pinned ACP
mcpServerSchema, HTTP/SSE lifecycle payloads,capability gating, pooled two-thread isolation, in-flight session/load history
replay and rollback, and credential redaction/non-logging.