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.ListSessionsis now stable (#29 by @ThomasK33). The previously unstablesession/listmethod is now part of the stableAgentinterface, with stableListSessionsRequest/ListSessionsResponsetypes and a stableClientSideConnection.ListSessionscaller.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 inAgentSideConnection.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.
- Document lifecycle:
-
New unstable client method for agent-driven UI prompts:
Client.UnstableCreateElicitation(request) andClient.UnstableCompleteElicitation(notification). The request is aform/urlunion; the response is anaccept/decline/cancelunion with helper constructors (NewUnstableCreateElicitationResponseAccept, etc.). -
New capability descriptors advertised in
InitializeResponse/ClientCapabilities:AgentAuthCapabilities,LogoutCapabilities,ProvidersCapabilities,NesCapabilitiesand the fullNes*Capabilitiesfamily,ClientNesCapabilities,ElicitationCapabilities, plus a client-sideAuthCapabilities(with aterminalflag). -
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}, andClientMethodElicitation{Create,Complete}.
Changed
-
KillTerminalCommand→KillTerminalon theClientinterface, 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)
-
FileSystemCapability→FileSystemCapabilitiesto align with the rest of the*Capabilitiestypes.ClientCapabilities.Fsnow uses the new type. -
AuthMethodis now a discriminated union. The previous flat struct is replaced with a wrapper that holds exactly one variant, discriminated by thetypefield on the wire (defaulting toagentwhen 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.
ClientCapabilitiesandAgentCapabilitiesnow emit and accept their unstableauthfield by default —"auth":{"terminal":false}for clients and"auth":{}for agents — andClientCapabilities.Fsdefaults 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, andexample/geminiwere ported to the new method names, theAuthMethodunion, and the renamedFileSystemCapabilities. Use them as a reference when migrating.
Removed
UnstableListSessionsRequest,UnstableListSessionsResponse, andAgentExperimental.UnstableListSessions. Migrate to the stableAgent.ListSessionsand 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
Agentimplementation must now provideListSessions. Returningacp.NewMethodNotFound(acp.AgentMethodSessionList)is fine for agents that don't advertise the capability — seeexample/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 returnMethodNotFoundautomatically. - Any code that constructs or pattern-matches
AuthMethoddirectly (including hand-rolled JSON) must move to the union shape. Wire JSON without atypefield is interpreted as theagentvariant.
Full Changelog: v0.10.8...v0.11.7