github coder/acp-go-sdk v0.16.0
v0.16.0: Elicitation and terminal auth go stable (ACP schema 1.21.0)

latest release: v0.17.0
one hour ago

This release pins ACP schema 1.21.0 (acp.SchemaVersion = "1.21.0") and promotes elicitation and terminal authentication from unstable to stable. The main user-visible change is that acp.Client now has two new required methods — CreateElicitation and CompleteElicitation — so every client implementation needs a small update to compile.

This is step B3 of the planned walk from schema 0.13.5 to 1.32.0, following v0.15.0 (schema 1.20.0).

Added

  • Target ACP schema 1.21.0 — acp.SchemaVersion = "1.21.0" (#103 by @ThomasK33).

  • Stable elicitation. acp.Client gains two required methods:

    CreateElicitation(ctx context.Context, req CreateElicitationRequest) (CreateElicitationResponse, error)
    CompleteElicitation(ctx context.Context, n CompleteElicitationNotification) error

    Agents call these through (*AgentSideConnection).CreateElicitation / CompleteElicitation. The form schema is now typed: ElicitationPropertySchema (string, number, integer, boolean, array, and an open Other), StringPropertySchema, NumberPropertySchema, IntegerPropertySchema, BooleanPropertySchema, MultiSelectPropertySchema, MultiSelectItems, EnumOption, StringFormat, and ElicitationContentValue. Clients opt in via ClientCapabilities.Elicitation (Form, Url) (#103).

  • Stable terminal authentication. ClientCapabilities.Auth.Terminal, AuthMethodTerminal, and AuthMethod.Terminal are now in the stable surface. The Claude adapter advertises two terminal methods (claude-login, console-login) to a client that sets Auth.Terminal, and none otherwise (#103).

  • Unstable: session compaction. ClientSessionCapabilities.Compaction and the SessionUpdate variants CompactionUpdate and CompactionSummaryChunk. Neither Claude Code nor Codex send these yet (#103).

  • Examples exercise both elicitation modes. example/agent asks a form elicitation for the database host of its edit (tied to call_2), then a url elicitation to review an allowed edit, and sends elicitation/complete. example/client advertises both modes and prompts Database host [new-host]: and Open this URL? [y/N]: on the terminal (#103).

Changed

  • No automatic -32601 for elicitation. The SDK now dispatches to your Client.CreateElicitation, so its return value decides the reply. Clients without elicitation support should return a method-not-found error (see migration below) (#103).
  • A terminal auth method with an empty env: {} is dropped on encode, matching the Rust SDK (#103).
  • Peers still sending the dropped env_var auth method decode as AuthMethod.Agent, because the schema now reads unknown type as agent. The type and vars fields on such a message are not preserved (#103).

Removed

  • Unstable elicitation surface, now stabilized: ClientExperimental.UnstableCreateElicitation / UnstableCompleteElicitation, (*AgentSideConnection).UnstableCreateElicitation / UnstableCompleteElicitation, 18 Unstable*Elicitation* types, and the constant UnstableElicitationSchemaTypeObject (#103).
  • Unstable env_var auth method: AuthMethodEnvVar, AuthMethodEnvVarInline, AuthEnvVar, and AuthMethod.EnvVar. Upstream dropped this method from the schema (#103).

Breaking Changes

apidiff reports 30 incompatible changes against v0.15.0. The ones that need code changes:

Change Migration
acp.Client gains CreateElicitation and CompleteElicitation Clients without elicitation support should return acp.CreateElicitationResponse{}, acp.NewMethodNotFound(acp.ClientMethodElicitationCreate) from CreateElicitation, nil from CompleteElicitation, and leave ClientCapabilities.Elicitation unset.
All Unstable*Elicitation* symbols removed; ClientExperimental.UnstableCreateElicitation / UnstableCompleteElicitation and the matching (*AgentSideConnection) methods removed Drop the Unstable prefix. A quick sweep: perl -pi -e 's/\bUnstable((?:Create|Complete)?Elicitation\w*)\b/$1/g' $(git ls-files '*.go')
AuthMethodEnvVar, AuthMethodEnvVarInline, AuthEnvVar, AuthMethod.EnvVar removed No replacement. Advertise a terminal method to clients that set ClientCapabilities.Auth.Terminal, or use an agent method.

Note on untyped maps

ElicitationSchema.Properties and CreateElicitationAccept.Content are still map[string]any in this release because the generator does not type additionalProperties with a $ref. Decode each entry into acp.ElicitationPropertySchema yourself (see example/client). A later release may type these maps, which would be another breaking change on the now-stable API.

Full Changelog: v0.15.0...v0.16.0

Don't miss a new acp-go-sdk release

NewReleases is sending notifications on new releases.