Skip to content

Releases: coder/acp-go-sdk

v0.13.5: Session config options take over model selection

02 Jun 14:24
0845a3b

Choose a tag to compare

Tracks ACP schema 0.13.5. The never-stabilized session/set_model API is gone — model selection now flows through the existing stable session/set_config_option framework — and additionalDirectories graduates to the stable surface across the session lifecycle.

Added

Stable additionalDirectories on session requests (#47 by @ThomasK33)

Sessions can now declare extra workspace roots alongside cwd. The field is present (and stable) on NewSessionRequest, LoadSessionRequest, ResumeSessionRequest, UnstableForkSessionRequest, and is reported back on SessionInfo from session/list:

req := acp.NewSessionRequest{
    Cwd:                   "/home/me/project",
    AdditionalDirectories: []string{"/home/me/shared-libs"},
    McpServers:            []acp.McpServer{ /* ... */ },
}

Agents advertise support via a new capability — supplying {} is enough:

caps := acp.SessionCapabilities{
    AdditionalDirectories: &acp.SessionAdditionalDirectoriesCapabilities{},
}

Previously this field existed only on the unstable fork-session path; it is now on the stable surface and reported on listed sessions.

Removed

Unstable session/set_model API (#47 by @ThomasK33)

The experimental model-selection API has been removed from the schema and the SDK. Gone:

  • UnstableSetSessionModelRequest / UnstableSetSessionModelResponse
  • ClientSideConnection.UnstableSetSessionModel
  • AgentExperimental.UnstableSetSessionModel
  • AgentMethodSessionSetModel ("session/set_model")
  • ModelId, ModelInfo, SessionModelState, and the models field on NewSessionResponse / LoadSessionResponse / UnstableForkSessionResponse

Because this surface was only ever in schema.unstable.json, no stable types break. Anything implementing or calling UnstableSetSessionModel* will need to migrate.

Migration: use session config options. Model selection is now expressed as a SessionConfigOption with category == SessionConfigOptionCategoryModel (introduced in 0.13.4 and unchanged here):

  1. Read agent-advertised configOptions from the session response and pick the one whose category is "model".
  2. Switch models by calling the stable session/set_config_option:
    _, err := client.SetSessionConfigOption(ctx, acp.SetSessionConfigOptionRequest{
        SessionId: sid,
        ConfigId:  modelOption.Id,
        Value:     acp.NewSessionConfigOptionValueSelect("gpt-5"),
    })
  3. Updated options arrive back in the response and through session/update config_option_update notifications.

The same uniform API now covers model, mode, and thought_level selection. Calls to session/set_model on the wire return -32601 Method not found.

Changed

More tolerant deserialization in generated types (#47 by @ThomasK33)

Regenerated bindings pick up the schema's new x-deserialize-default-on-error and x-deserialize-skip-invalid-items hints across many optional fields and arrays (auth methods, available commands, session lists, plan entries, tool-call content/locations, NES context, and more). In practice, unrecognized enum values or malformed individual items in these spots fall back to defaults / get skipped instead of failing the entire UnmarshalJSON, making peers more forgiving across protocol drift.

Example and test fixtures updated

example/agent/main.go and acp_test.go had their UnstableSetSessionModel implementations removed to match the regenerated AgentExperimental surface.

Breaking Changes

  • The unstable UnstableSetSessionModel* symbols and AgentMethodSessionSetModel have been removed. Implementations of AgentExperimental that defined UnstableSetSessionModel should delete that method; callers of ClientSideConnection.UnstableSetSessionModel should migrate to SetSessionConfigOption with SessionConfigOptionCategoryModel. No stable APIs are affected.

Full Changelog: v0.13.4...v0.13.5

v0.13.4: Stable logout, plan updates, session/delete

01 Jun 14:21
d03a894

Choose a tag to compare

Tracks ACP schema 0.13.4. logout graduates to the stable surface (and becomes a required Agent method), unstable provider types are renamed from plural to singular, and the schema picks up unstable session/delete and a new plan-update family. The wire ProtocolVersionNumber stays 1.

Added

Stable logout (#46 by @ThomasK33)

logout graduated from unstable to stable. The Agent interface now requires a Logout method, and ClientSideConnection exposes a stable Logout call:

func (a *myAgent) Logout(ctx context.Context, params acp.LogoutRequest) (acp.LogoutResponse, error) {
    // ...
    return acp.LogoutResponse{}, nil
}

Capability advertisement moved to the stable surface as well: AgentCapabilities.Auth (*AgentAuthCapabilities) and AgentAuthCapabilities.Logout (*LogoutCapabilities). Supplying {} for Logout signals that the agent supports the method.

Unstable session/delete (#46 by @ThomasK33)

New unstable method for removing a previously-listed session:

  • UnstableDeleteSessionRequest / UnstableDeleteSessionResponse
  • ClientSideConnection.UnstableDeleteSession(ctx, params) for clients
  • Optional AgentExperimental.UnstableDeleteSession — agents that don't implement it return MethodNotFound
  • SessionCapabilities.Delete (*SessionDeleteCapabilities) for capability advertisement
  • AgentMethodSessionDelete = "session/delete"

Unstable plan updates (#46 by @ThomasK33)

A new plan-update family lets agents push structured, file-based, or markdown plan content to clients:

  • ClientCapabilities.PlanCapabilities (*PlanCapabilities) — clients that supply {} accept plan updates.
  • PlanId, PlanUpdate, PlanRemoved, and the discriminated PlanUpdateContent union with Items / File / Markdown variants (PlanItems, PlanFile, PlanMarkdown).
  • Constructor helpers in helpers_gen.go:
    acp.NewPlanUpdateContentItems(id, entries)
    acp.NewPlanUpdateContentFile(id, uri)
    acp.NewPlanUpdateContentMarkdown(id, content)

Changed

Unstable provider types: plural → singular (#46 by @ThomasK33)

The unstable provider request/response types and their methods were renamed:

Before After
UnstableSetProvidersRequest / Response UnstableSetProviderRequest / Response
UnstableDisableProvidersRequest / Response UnstableDisableProviderRequest / Response
ClientSideConnection.UnstableSetProviders ClientSideConnection.UnstableSetProvider
ClientSideConnection.UnstableDisableProviders ClientSideConnection.UnstableDisableProvider
AgentExperimental.UnstableSetProviders AgentExperimental.UnstableSetProvider
AgentExperimental.UnstableDisableProviders AgentExperimental.UnstableDisableProvider

The JSON-RPC method strings (providers/set, providers/disable) and UnstableListProviders are unchanged.

ListSessionsRequest.AdditionalDirectories removed

The unstable additionalDirectories filter on ListSessionsRequest was dropped from the schema and the generated Go type.

Toolchain (#45 by @ThomasK33)

The Nix flake/devshell was replaced with mise. Contributors run mise install to provision Go, gopls, golangci-lint, gofumpt, treefmt, etc., then use the existing make fmt, make check, and make test targets. Only affects contributors building from source — SDK consumers are unaffected.

Removed

  • UnstableLogoutRequest, UnstableLogoutResponse, AgentExperimental.UnstableLogout, and ClientSideConnection.UnstableLogout. Use the stable LogoutRequest/LogoutResponse and Agent.Logout / ClientSideConnection.Logout.
  • ListSessionsRequest.AdditionalDirectories.

Breaking Changes

  • All Agent implementations must add Logout. A minimal implementation that doesn't support logout can return MethodNotFound:
    func (a *myAgent) Logout(ctx context.Context, _ acp.LogoutRequest) (acp.LogoutResponse, error) {
        return acp.LogoutResponse{}, acp.NewMethodNotFound(acp.AgentMethodLogout)
    }
    Advertise support by setting AgentCapabilities.Auth.Logout = &acp.LogoutCapabilities{} during Initialize.
  • Code referencing UnstableLogout* types or ClientSideConnection.UnstableLogout must rename to the unprefixed stable equivalents.
  • Code using the unstable provider plural types/methods must rename to the singular spellings (see the table above).
  • Callers reading ListSessionsRequest.AdditionalDirectories must drop the field.

Full Changelog: v0.13.0...v0.13.4

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