github coder/acp-go-sdk v0.13.4
v0.13.4: Stable logout, plan updates, session/delete

latest release: v0.13.5
15 days ago

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

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

NewReleases is sending notifications on new releases.