Skip to content

Releases: coder/acp-go-sdk

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

13 May 10:55
192e108

Choose a tag to compare

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

v0.12.2: Stable session/close and session/resume

28 Apr 09:28
6595492

Choose a tag to compare

Tracks ACP schema 0.12.2, which promotes session/close and session/resume from unstable to the stable surface. Agent implementations must now provide CloseSession and ResumeSession, and the corresponding unstable types and AgentExperimental methods have been removed.

Added

  • Agent interface gained two new required methods backed by stable schema entries (#35):
    CloseSession(ctx context.Context, params CloseSessionRequest) (CloseSessionResponse, error)
    ResumeSession(ctx context.Context, params ResumeSessionRequest) (ResumeSessionResponse, error)
  • SessionCapabilities now advertises support via stable Close *SessionCloseCapabilities and Resume *SessionResumeCapabilities fields.
  • ResumeSessionRequest carries AdditionalDirectories and McpServers; ResumeSessionResponse returns ConfigOptions and Modes (with an unstable Models field still gated).

Changed

  • Schema version bumped to 0.12.2; the session/close and session/resume request/response types and capability descriptors no longer carry the UNSTABLE marker in their godoc (#35).
  • ClientSideConnection.UnstableCloseSession / UnstableResumeSession were renamed to CloseSession / ResumeSession. Callers must update method names and parameter/return types.
  • ResumeSessionResponse.ConfigOptions switched element type from UnstableSessionConfigOption to the stable SessionConfigOption.
  • UnstableProviderInfo.Current is now optional (json:"current,omitempty") and removed from the JSON-required field list — both omission and null indicate a disabled provider.

Removed

  • AgentExperimental.UnstableCloseSession and AgentExperimental.UnstableResumeSession, plus the UnstableCloseSessionRequest/Response and UnstableResumeSessionRequest/Response types. Migrate to the stable Agent.CloseSession / Agent.ResumeSession methods and the unprefixed types (#35).

Breaking Changes

All Agent implementors must add CloseSession and ResumeSession methods (returning MethodNotFound is fine if the agent doesn't advertise the capability — see the updated example/agent/main.go). Code referencing the unstable types or ClientSideConnection.Unstable{Close,Resume}Session must be renamed:

Before After
AgentExperimental.UnstableCloseSession Agent.CloseSession
AgentExperimental.UnstableResumeSession Agent.ResumeSession
UnstableCloseSessionRequest / Response CloseSessionRequest / Response
UnstableResumeSessionRequest / Response ResumeSessionRequest / Response
ClientSideConnection.UnstableCloseSession ClientSideConnection.CloseSession
ClientSideConnection.UnstableResumeSession ClientSideConnection.ResumeSession

Consumers of UnstableProviderInfo that relied on current always being present should treat a missing or null value as "provider disabled".

Full Changelog: v0.12.0...v0.12.2

v0.12.0: Response-scoped notification barrier

20 Apr 07:34
72c8f1d

Choose a tag to compare

A focused bug-fix release that hardens Connection's notification synchronization. No schema changes, no generated API changes, no migration required.

Fixed

  • WaitGroup reuse panic under concurrent requests (#30 by @ThomasK33). SendRequest[T] / SendRequestNoResult previously called Wait() on a shared sync.WaitGroup after every response. With overlapping requests — most reproducibly ClientSideConnection.LoadSession replaying session/update notifications on a resumed session — two waiters could race the counter's reuse and trigger sync: WaitGroup is reused before previous Wait has returned.

    The shared barrier has been replaced with a response-scoped, monotonic notification-sequence barrier:

    • Each accepted notification is assigned a sequence number when it is queued.
    • When a response is observed, the receive goroutine snapshots the current notification watermark and attaches it to the response envelope.
    • The waiting request blocks (via sync.Cond) only until completed notifications reach that snapshotted watermark — so it waits for notifications that arrived before the response, but not for any that arrived after.

    Notification ordering is still preserved by the single-consumer processNotifications goroutine, and shutdown still drains through the final queued notification with the existing 5s timeout. The public API is unchanged.

Changed

  • Cancellation while waiting for pre-response notifications no longer deadlocks. If the connection context is canceled while a request is blocked on its notification barrier, the call now returns a connection error promptly. Previously the shared WaitGroup could keep the caller blocked indefinitely in this case.

Full Changelog: v0.11.7...v0.12.0

v0.11.7: Schema 0.11.7 — list_sessions stabilized, AuthMethod union, terminal/kill rename

16 Apr 12:15
c180b9d

Choose a tag to compare

Tracks ACP schema 0.11.7. The big-ticket items are: session/list is promoted from unstable to the stable Agent surface, terminal/kill types are renamed to drop the Command suffix, AuthMethod is now a discriminated union, and a large batch of unstable methods (NES, document events, providers, logout, close-session, elicitation) is now wired through the generated handlers. Implementors of Agent and Client will need source changes — see Breaking Changes for the full list.

Added

  • Agent.ListSessions is now stable (#29 by @ThomasK33). The previously unstable session/list method is now part of the stable Agent interface, with stable ListSessionsRequest / ListSessionsResponse types and a stable ClientSideConnection.ListSessions caller.

    func (a *myAgent) ListSessions(ctx context.Context, params acp.ListSessionsRequest) (acp.ListSessionsResponse, error) {
        return acp.ListSessionsResponse{Sessions: []acp.SessionInfo{...}}, nil
    }
  • New unstable agent methods on AgentExperimental, each with generated request/response types, validators, and routing in AgentSideConnection.handle:

    • Document lifecycle: UnstableDidOpenDocument, UnstableDidChangeDocument, UnstableDidCloseDocument, UnstableDidFocusDocument, UnstableDidSaveDocument.
    • Next Edit Suggestions (NES): UnstableStartNes, UnstableSuggestNes, UnstableAcceptNes, UnstableRejectNes, UnstableCloseNes.
    • Providers: UnstableListProviders, UnstableSetProviders, UnstableDisableProviders.
    • Sessions/auth: UnstableCloseSession, UnstableLogout.
  • New unstable client method for agent-driven UI prompts: Client.UnstableCreateElicitation (request) and Client.UnstableCompleteElicitation (notification). The request is a form/url union; the response is an accept/decline/cancel union with helper constructors (NewUnstableCreateElicitationResponseAccept, etc.).

  • New capability descriptors advertised in InitializeResponse / ClientCapabilities: AgentAuthCapabilities, LogoutCapabilities, ProvidersCapabilities, NesCapabilities and the full Nes*Capabilities family, ClientNesCapabilities, ElicitationCapabilities, plus a client-side AuthCapabilities (with a terminal flag).

  • New method-name constants in constants_gen.go: AgentMethodSessionClose, AgentMethodLogout, AgentMethodNes{Start,Suggest,Accept,Reject,Close}, AgentMethodProviders{List,Set,Disable}, AgentMethodDocumentDid{Open,Change,Close,Focus,Save}, and ClientMethodElicitation{Create,Complete}.

Changed

  • KillTerminalCommandKillTerminal on the Client interface, plus the request/response type renames. The wire method is unchanged (terminal/kill).

    // Before
    func (c *myClient) KillTerminalCommand(ctx context.Context, p acp.KillTerminalCommandRequest) (acp.KillTerminalCommandResponse, error)
    // After
    func (c *myClient) KillTerminal(ctx context.Context, p acp.KillTerminalRequest) (acp.KillTerminalResponse, error)
  • FileSystemCapabilityFileSystemCapabilities to align with the rest of the *Capabilities types. ClientCapabilities.Fs now uses the new type.

  • AuthMethod is now a discriminated union. The previous flat struct is replaced with a wrapper that holds exactly one variant, discriminated by the type field on the wire (defaulting to agent when absent):

    // Before
    AuthMethod{Id: "oauth", Name: "OAuth", Description: acp.Ptr("...")}
    // After
    AuthMethod{Agent: &AuthMethodAgent{Id: "oauth", Name: "OAuth", Description: acp.Ptr("...")}}

    The other variants (EnvVar *AuthMethodEnvVarInline, Terminal *AuthMethodTerminalInline) are unstable and let agents advertise env-var or terminal-based authentication flows.

  • Capability defaults serialize differently. ClientCapabilities and AgentCapabilities now emit and accept their unstable auth field by default — "auth":{"terminal":false} for clients and "auth":{} for agents — and ClientCapabilities.Fs defaults to {"readTextFile":false,"writeTextFile":false}. Older peers ignore unknown fields, but anything that does strict JSON schema validation against the previous shape will need to relax it.

  • Examples updated. example/agent, example/client, example/claude-code, and example/gemini were ported to the new method names, the AuthMethod union, and the renamed FileSystemCapabilities. Use them as a reference when migrating.

Removed

  • UnstableListSessionsRequest, UnstableListSessionsResponse, and AgentExperimental.UnstableListSessions. Migrate to the stable Agent.ListSessions and unprefixed types.

Breaking Changes

All Agent and Client implementors require source updates:

Before After
Client.KillTerminalCommand Client.KillTerminal
KillTerminalCommandRequest / Response KillTerminalRequest / Response
FileSystemCapability FileSystemCapabilities
AuthMethod{Id, Name, Description} AuthMethod{Agent: &AuthMethodAgent{Id, Name, Description}}
AgentExperimental.UnstableListSessions Agent.ListSessions (now required on the stable interface)
UnstableListSessionsRequest / Response ListSessionsRequest / Response

Additional notes:

  • Every Agent implementation must now provide ListSessions. Returning acp.NewMethodNotFound(acp.AgentMethodSessionList) is fine for agents that don't advertise the capability — see example/agent/main.go.
  • The new unstable methods are dispatched via Go interface assertions in AgentSideConnection.handle / ClientSideConnection.handle, so you only need to implement the ones you advertise; unimplemented ones return MethodNotFound automatically.
  • Any code that constructs or pattern-matches AuthMethod directly (including hand-rolled JSON) must move to the union shape. Wire JSON without a type field is interpreted as the agent variant.

Full Changelog: v0.10.8...v0.11.7

v0.10.8: Schema 0.10.8, extension methods, and cancellation

16 Apr 11:42
584abe6

Choose a tag to compare

Catches the SDK up to ACP schema 0.10.8 (from 0.6.3), adds first-class ACP extension methods, full $/cancel_request cancellation, and an opt-in unstable surface for in-development RPCs. A trio of fixes around notification ordering and request/handler synchronization makes streaming sessions behave correctly under load.

Highlights

  • ACP schema 0.10.8 with regenerated types — including typed unstable session selector and capability metadata for clients.
  • New extensibility surface: ExtensionMethodHandler plus CallExtension / NotifyExtension, and Unstable* types for in-development methods.
  • Protocol-level cancellation via $/cancel_request, with per-request contexts and a -32800 error mapping.
  • Notification handling overhauled: in-order delivery, no early returns from Prompt(), and no nested-request deadlocks.

Added

  • Extension methods (#11 by @ThomasK33). Implement the new optional interface to receive any _-prefixed JSON-RPC method, and use the helper methods to send them:

    type ExtensionMethodHandler interface {
        HandleExtensionMethod(ctx context.Context, method string, params json.RawMessage) (any, error)
    }
    
    // Outbound (available on both AgentSideConnection and ClientSideConnection):
    resp, err := acp.CallExtension[MyResp](conn, ctx, "_vendor.example/echo", req)
    err = conn.NotifyExtension(ctx, "_vendor.example/event", payload)

    Unhandled extension requests automatically return MethodNotFound per spec; unhandled extension notifications are silently ignored (no more noisy log line).

  • Unstable schema support (#17 by @ThomasK33). The generator now also consumes schema.unstable.json / meta.unstable.json and emits unstable-only RPCs and types behind an Unstable* prefix, exposed via the existing AgentExperimental / ClientExperimental interfaces. Stable types and method signatures are untouched.

  • $/cancel_request cancellation (#17 by @ThomasK33). Inbound requests now run with a per-request context.Context; receiving $/cancel_request cancels that context. When an outbound caller's ctx is canceled while waiting for a response, the SDK best-effort sends $/cancel_request to the peer. Canceled handlers map to JSON-RPC error -32800.

  • Typed unstable session metadata (#26 by @carsonfarmer). Clients can now distinguish session config selectors by identity instead of treating them as opaque selects:

    • SessionConfigOptionSelect exposes id, name, optional description/category, type, currentValue, and options.
    • SessionCapabilities carries typed unstable markers (fork, list, resume).
    • NewSessionResponse includes optional typed configOptions and models.
    • UnstableResumeSessionResponse includes typed configOptions, models, and modes.

Changed

  • ACP schema bumped 0.6.3 → 0.10.8 (#15, #26 by @ThomasK33, @carsonfarmer). All *_gen.go files are regenerated; expect new methods/types on the stable surface (e.g. SetSessionConfigOption) and updated request/response shapes. The example/ agent and tests have been updated accordingly — see example/agent/main.go for the minimal stub pattern (return ..., acp.NewMethodNotFound(...) for unsupported optional methods).
  • Code generator hardening (#15, #17, #26). Handles JSON Schema allOf wrappers, preserves union variants that wrap $ref in allOf, deterministically avoids nested type-name collisions, fixes union UnmarshalJSON for unions whose variants can be primitives (notably RequestId), and propagates shared parent-object fields onto generated union variant structs.

Fixed

  • Prompt() returning before SessionUpdate handlers complete (#5 by @midsbie). SendRequest / SendRequestNoResult now wait for in-flight notification handlers before returning, so callers consistently observe all session updates that arrived before the response.
  • Out-of-order notifications (#8 by @krulsaidme0w). Notifications are queued and processed by a single goroutine, preserving wire order for streaming session/update traffic. Public API unchanged.
  • Deadlock on nested requests from a handler (#10 by @agentcooper, fixes #9). The notification WaitGroup no longer tracks request messages, so a handler can issue requests back to its peer without blocking forever.

Breaking Changes

The schema jump from 0.6.3 to 0.10.8 changes generated APIs. Most notably, the stable Agent interface gained methods such as SetSessionConfigOption, and a number of request/response struct shapes evolved with the protocol. Implementors of Agent / Client should regenerate against this release and add stubs (returning acp.NewMethodNotFound(...) is fine for optional methods, as shown in example/agent/main.go). Direct field-by-field migration guidance is best derived from the regenerated *_gen.go diffs.

New Contributors

Full Changelog: v0.6.3...v0.10.8

v0.6.3: Schema 0.6.3 alignment and friendlier generated types

03 Nov 16:51
cc23bb6

Choose a tag to compare

Tracks ACP schema 0.6.3 (up from 0.4.9). The code generator gains JSON Schema discriminator support, smarter nested-type naming, and multi-line doc comments — which together rename a handful of generated types and reshape how callers build RequestPermissionRequest and McpServer values.

Added

  • Implementation metadata on initialize. InitializeRequest gained an optional ClientInfo *Implementation and InitializeResponse gained an optional AgentInfo *Implementation, carrying name, optional title, and version. The schema notes these will become required in a future protocol revision, so populating them now is recommended (#3 by @ThomasK33):
    resp, err := conn.Initialize(ctx, acp.InitializeRequest{
        ProtocolVersion: acp.ProtocolVersionNumber,
        ClientInfo: &acp.Implementation{
            Name:    "my-editor",
            Title:   acp.Ptr("My Editor"),
            Version: "1.2.3",
        },
    })
  • JSON-RPC envelope and error types. New generated AgentOutgoingMessage / ClientOutgoingMessage (with Request / Response / Notification variants) and an Error struct mirroring the JSON-RPC 2.0 error object (#3).
  • Discriminator-aware codegen. The generator now honors explicit discriminator: { propertyName: "type" } annotations on schema unions like ContentBlock and McpServer, falling back to the previous const-property scan only when none is declared. Inline variants are also given idiomatic names via word-boundary heuristics — e.g. RequestPermissionRequest + toolCallRequestPermissionToolCall instead of RequestPermissionRequestToolCall (#3).

Changed

  • Schema bumped to 0.6.3. schema/version and the SDK version are now 0.6.3.
  • Doc comments preserve formatting. cmd/generate replaces the old SanitizeComment collapser with FormatDocComment, which keeps newlines and paragraph breaks from JSON Schema descriptions. Generated godoc on types like ContentBlock, Agent, and Client is now multi-line and noticeably easier to read.
  • Generated type renames. A few inline-variant types now have shorter, more idiomatic names (see Breaking Changes below).
  • ResourceBlock helper signature. ResourceBlock(EmbeddedResource)ResourceBlock(EmbeddedResourceResource). Callers no longer need to wrap the resource:
    // Before
    acp.ResourceBlock(acp.EmbeddedResource{Resource: res})
    // After
    acp.ResourceBlock(res)
  • ContentBlockText doc clarifies that text content may be Markdown and clients SHOULD render it as such.

Breaking Changes

Code that referenced the old generated names or constructed RequestPermissionRequest / McpServer literals must be updated:

Before After
RequestPermissionRequest{ ToolCall: ToolCallUpdate{...} } RequestPermissionRequest{ ToolCall: RequestPermissionToolCall{...} }
SessionUpdate{ ToolCallUpdate: &SessionUpdateToolCallUpdate{...} } SessionUpdate{ ToolCallUpdate: &SessionToolCallUpdate{...} }
McpServer{ Stdio: &Stdio{...} } McpServer{ Stdio: &McpServerStdio{...} }
ResourceBlock(EmbeddedResource{Resource: res}) ResourceBlock(res) (where res is EmbeddedResourceResource)

The custom ToolCallUpdateOpt callbacks now receive *SessionToolCallUpdate; recompiling against the new types is sufficient if you used the provided WithUpdate* helpers.

Full Changelog: v0.4.9...v0.6.3

v0.4.9: Schema 0.4.9 with documented generated APIs

13 Oct 10:54
2c1aef2

Choose a tag to compare

Tracks ACP schema 0.4.9. The Go protocol surface is unchanged — this release is a documentation refresh of the generated bindings and a schema-source switch to upstream release artifacts. No code changes are required to upgrade.

Changed

  • Generated APIs are now documented from the schema (#2 by @ThomasK33). The code generator now emits godoc comments derived from schema.json descriptions onto:

    • methods of the Agent, AgentLoader, AgentExperimental, and Client interfaces, and
    • variant fields of union wrappers such as AgentRequest, ClientRequest, AgentNotification, ClientNotification, ContentBlock, McpServer, SessionUpdate, ToolCallContent, RequestPermissionOutcome, and AvailableCommandInput.

    These comments include links to the protocol docs (e.g. Initialization, Prompt Turn, Terminals, Session Modes) and surface capability gating notes (e.g. that terminal/* requires the terminal client capability, that LoadSession requires the loadSession agent capability, or that SetSessionModel is UNSTABLE) directly in IDE hovers and go doc output. Example:

    type Agent interface {
        // Request parameters for the initialize method. Sent by the client to
        // establish connection and negotiate capabilities.
        // See protocol docs: [Initialization](https://agentclientprotocol.com/protocol/initialization)
        Initialize(ctx context.Context, params InitializeRequest) (InitializeResponse, error)
        // ...
    }
  • Schema artifacts fetched from GitHub Releases. The Makefile now downloads schema/meta.json and schema/schema.json from the upstream agent-client-protocol GitHub Releases assets instead of the raw tag URLs. This only affects contributors regenerating bindings locally; SDK consumers are unaffected.

  • Schema and module version bumped from 0.4.5 to 0.4.9. There are no breaking changes — the Agent, AgentLoader, AgentExperimental, and Client interface signatures, and all generated request/response types, are identical to v0.4.5.

Full Changelog: v0.4.5...v0.4.9

v0.4.5: ACP schema 0.4.5 alignment

10 Oct 14:07
da204ff

Choose a tag to compare

Tracks ACP schema 0.4.5. The only Go-visible change is a rename of the session/set_model method constant to align with the schema's naming; the wire protocol is unchanged.

Changed

  • Schema bumped to 0.4.5 with regenerated bindings (#1 by @ThomasK33).
  • The generated agent method constant was renamed from AgentMethodModelSelect to AgentMethodSessionSetModel so its identifier matches the session_set_model schema key. The underlying JSON-RPC method string is still "session/set_model", so peers on the wire are unaffected.
  • Schema source and documentation links now point at the protocol's new home, agentclientprotocol/agent-client-protocol (previously zed-industries/agent-client-protocol). This affects the Makefile fetch URLs and README.md / RELEASING.md references.

AgentExperimental.SetSessionModel and ClientSideConnection.SetSessionModel continue to work as before — only the constant identifier changed.

Breaking Changes

Callers that referenced the constant directly need a one-line rename:

// before
conn.SendRequest(ctx, acp.AgentMethodModelSelect, params)

// after
conn.SendRequest(ctx, acp.AgentMethodSessionSetModel, params)

No changes are required for code that calls SetSessionModel through the typed client/agent interfaces.

New Contributors

Full Changelog: v0.4.4...v0.4.5

v0.4.4: Schema 0.4.4 alignment

01 Oct 15:27
4959964

Choose a tag to compare

A version-only release that aligns the SDK with ACP schema tag 0.4.4. There are no generated API changes, no behavior changes, and no migration steps for SDK users.

Changed

  • Updated schema/version and version to 0.4.4 and refreshed the README install command to go get github.com/coder/acp-go-sdk@v0.4.4 (4959964).

Full Changelog: v0.4.3...v0.4.4

v0.4.3: Initial release

26 Sep 17:58
fe457c7

Choose a tag to compare

First public release of github.com/coder/acp-go-sdk, the Go SDK for the Agent Client Protocol. This release tracks ACP schema v0.4.3 and provides everything needed to build ACP agents and clients in Go over stdio.

go get github.com/coder/acp-go-sdk@v0.4.3

Added

Core API

  • Agent side: implement acp.Agent (and optionally acp.AgentLoader for session/load), then wire it up with acp.NewAgentSideConnection(agent, os.Stdout, os.Stdin).
  • Client side: implement acp.Client (and optionally acp.ClientTerminal for terminal features), then call acp.NewClientSideConnection(client, stdin, stdout) and drive a turn via InitializeNewSessionPrompt.
  • Both connection types expose Done() for peer-disconnect signalling and SetLogger(*slog.Logger) for diagnostics.
  • RequestError and JSON-RPC error helpers in errors.go for returning structured failures from handlers.

Generated protocol bindings

Generated from ACP schema v0.4.3 into agent_gen.go, client_gen.go, types_gen.go, constants_gen.go, and helpers_gen.go. These cover the full request/response/notification surface — Initialize, NewSession, LoadSession, Authenticate, Prompt, Cancel, WriteTextFile, ReadTextFile, RequestPermission, SessionUpdate, and the terminal methods (CreateTerminal, KillTerminalCommand, ReleaseTerminal, TerminalOutput, WaitForTerminalExit).

Helper constructors

Reduce the boilerplate of building ACP union types by hand:

  • Content blocks: TextBlock, ImageBlock, AudioBlock, ResourceLinkBlock, ResourceBlock.
  • Tool-call content: ToolContent, ToolDiffContent, ToolTerminalRef.
  • Session updates: UpdateUserMessageText, UpdateAgentMessageText, UpdateAgentThoughtText, UpdatePlan, StartToolCall / UpdateToolCall (with WithStart* / WithUpdate* option funcs), and the convenience wrappers StartReadToolCall / StartEditToolCall.
  • Generic Ptr[T](v T) *T for optional fields.
update := acp.StartReadToolCall("tool-1", "Read file", "/etc/hosts")
_ = conn.SessionUpdate(ctx, acp.SessionNotification{SessionId: id, Update: update})

Examples

Runnable examples under example/ that double as integration smoke tests:

  • go run ./example/agent — a minimal ACP agent over stdio.
  • go run ./example/client — drives a sample turn against a running agent.
  • go run ./example/claude-code — bridges to Claude Code.
  • go run ./example/gemini — bridges to the Gemini CLI in ACP mode (-model, -sandbox, -debug, -gemini /path/to/gemini).

Tooling

  • cmd/generate regenerates the _gen.go bindings from schema/schema.json and schema/meta.json.
  • JSON golden fixtures in testdata/json_golden/ and a parity test (json_parity_test.go) that locks wire-format compatibility with the reference TypeScript implementation.
  • Nix flake plus make targets for reproducible work: make version (bump and regenerate from schema/version), make test, make fmt, make check, and make release VERSION=X.Y.Z for a guided release flow.

Full Changelog: https://github.com/coder/acp-go-sdk/commits/v0.4.3