Skip to content

v0.13.0: MCP-over-ACP and named string-enum constants

Choose a tag to compare

@ThomasK33 ThomasK33 released this 13 May 10:55
· 4 commits to main since this release
192e108

Tracks ACP schema 0.13.0. The headline additions are the unstable MCP-over-ACP transport (mcp/connect, mcp/message, mcp/disconnect) and a code-generation improvement that turns "open" string enums into named Go constants — which means two existing types change shape.

Added

Unstable MCP-over-ACP surface (#39 by @ThomasK33)

Agents can now host MCP servers over the ACP channel itself instead of (or alongside) stdio/http/sse. The regenerated bindings expose:

  • A new McpServer variant Acp *McpServerAcpInline plus McpServerAcp / McpServerAcpId, gated by a new McpCapabilities.Acp boolean.

  • Request/response/notification types UnstableConnectMcp{Request,Response}, UnstableDisconnectMcp{Request,Response}, UnstableMessageMcp{Request,Notification,Response}, and a new UnstableMcpConnectionId opaque identifier.

  • AgentSideConnection.UnstableConnectMcp(ctx, params) and AgentSideConnection.UnstableDisconnectMcp(ctx, params) for the agent to open and close MCP-over-ACP connections against the client.

  • Client-side dispatch for mcp/connect and mcp/disconnect. Implement these on your Client to handle them — they are detected via optional interfaces, so existing clients continue to compile and simply return MethodNotFound:

    type Client interface {
        // ... existing methods ...
    
        // Optional, both sides:
        UnstableConnectMcp(ctx context.Context, p acp.UnstableConnectMcpRequest) (acp.UnstableConnectMcpResponse, error)
        UnstableDisconnectMcp(ctx context.Context, p acp.UnstableDisconnectMcpRequest) (acp.UnstableDisconnectMcpResponse, error)
    }
  • New method-name constants: ClientMethodMcpConnect, ClientMethodMcpDisconnect, ClientMethodMcpMessage, and AgentMethodMcpMessage.

Everything above is marked UNSTABLE in the schema and may change in future releases.

Named constants for open string enums (#37 by @agentcooper)

The code generator now recognizes schemas that describe a string with a recommended set of values plus a free-form fallback, and emits them as a named string type with const declarations. Two existing types switch to this form:

type SessionConfigOptionCategory string

const (
    SessionConfigOptionCategoryMode         SessionConfigOptionCategory = "mode"
    SessionConfigOptionCategoryModel        SessionConfigOptionCategory = "model"
    SessionConfigOptionCategoryThoughtLevel SessionConfigOptionCategory = "thought_level"
)

type UnstableLlmProtocol string

const (
    UnstableLlmProtocolAnthropic UnstableLlmProtocol = "anthropic"
    UnstableLlmProtocolOpenai    UnstableLlmProtocol = "openai"
    UnstableLlmProtocolAzure     UnstableLlmProtocol = "azure"
    UnstableLlmProtocolVertex    UnstableLlmProtocol = "vertex"
    UnstableLlmProtocolBedrock   UnstableLlmProtocol = "bedrock"
)

Unknown values remain representable — just assign a string literal — so the schema's extensibility is preserved.

Changed

  • McpCapabilities and the InitializeResponse.AgentCapabilities default now include "acp": false. Existing initialization payloads round-trip unchanged.
  • schema/version is now 0.13.0; install with go get github.com/coder/acp-go-sdk@v0.13.0.

Breaking Changes

SessionConfigOptionCategory and UnstableLlmProtocol are no longer wrapper structs with an Other field. Migrate as follows:

Before After
SessionConfigOptionCategoryOther("model") wrapped in SessionConfigOptionCategory{Other: &v} SessionConfigOptionCategoryModel (or SessionConfigOptionCategory("model"))
cat.Other != nil && *cat.Other == "mode" cat == SessionConfigOptionCategoryMode
UnstableLlmProtocol{Other: &v} UnstableLlmProtocolAnthropic, etc., or a plain UnstableLlmProtocol("custom") for unknown values

Fields holding these types remain *SessionConfigOptionCategory / *UnstableLlmProtocol, so you generally take the address of a constant when populating optional fields — see the updated unstable_types_test.go for an example.

Full Changelog: v0.12.2...v0.13.0