All notable changes to the Go client module are documented here. See
../../CHANGELOG.md for the protocol spec
changelog and release-metadata.json for the
machine-readable mapping between the current source tree and protocol
versions.
The format is based on Keep a Changelog and the module follows SemVer.
The publish-go.yml workflow refuses to publish a clients/go/vX.Y.Z
tag whose matching ## [X.Y.Z] heading is missing from this file.
ChangesetOperationStatusDisabled— newChangesetOperationStatusvalue for operations that are currently unavailable and cannot be invoked.ChangesetOperation.Group— optional identifier for grouping related changeset operations together in the UI.Meta(wire_meta) field on the per-turn chat actions (chat/turnStarted,chat/delta,chat/responsePart,chat/reasoning,chat/usage,chat/turnComplete,chat/turnCancelled,chat/error) — optional provider-specific metadata so hosts can carry portable per-event context, such as attributing an event to a specific agent (e.g. a sub-agent acting within the turn).
- BREAKING:
ChangesetOperationTargetRangeis now a nestedTextRange({start: {line, character}, end: {line, character}}) instead of flat{start, end}int64fields.
ActionEnvelope.Originis now omitted from JSON output when absent (json:"origin,omitempty") instead of serializing asnull.
ApplyActionToChangeset,ApplyActionToAnnotations, andApplyActionToResourceWatch— full reducer implementations replacing the previous stubs; all shared conformance fixtures intypes/test-cases/reducers/for these three families now pass.SnapshotState.ResourceWatchpointer field — theSnapshot.stateunion now acceptsResourceWatchState, decoded by probing for the requiredroot+recursivekeys (ordered between the existing changeset and annotations probes).
- Reducer parity fixtures now require
_metaupdates from every tool-call-scoped action, not onlysession/toolCallStart.
-
AnnotationsUpdatedAction(annotations/updated) — partially updates an existing annotation'sTurnID/Resource/Range/Resolvedwithout resending its entries. Handled by the annotations reducer (no-op on unknown id). -
ahp-chat:channel for per-chat conversation state;SessionState.chats[]catalog;SessionState.defaultChat?input-routing hint;ChatOriginprovenance union;createChat/disposeChatcommands. -
ChatSummary.WorkingDirectory— optional per-chat working directory. Falls back to the session'sWorkingDirectorywhen absent. -
Three discrete chat-catalog actions on the session channel —
SessionChatAddedAction(upsert bySummary.Resource),SessionChatRemovedAction, andSessionChatUpdatedAction(partial-update payload). -
SessionDefaultChatChangedAction(session/defaultChatChanged) — updatesSessionState.DefaultChatto steer new input to the designated chat; absent value clears the hint. -
ErrorInfo.Meta map[string]json.RawMessage— optional provider-specific metadata bag on error payloads (_metaon the wire), mirroring the existingMetafield onUsageInfoand other protocol types. -
RootStatenow exposes an optional_metaproperty bag (Meta map[string]json.RawMessage) for implementation-defined agent-host metadata, such as a well-knownhostBuildkey carrying the host's build version/commit/date.
ChatStateis now flat — the previous embeddedSummaryhas been replaced with inlinedResource/Title/Status/Activity/ModifiedAt/Model/Agent/Origin/WorkingDirectoryfields.ChatSummaryremains as the standalone catalog entry onSessionState.Chats.ChatSummary.ModifiedAtandChatState.ModifiedAtare now ISO 8601stringvalues instead of integer milliseconds.
SessionChatsChangedAction(replaced by the three discrete chat-catalog actions above).
Implements AHP 0.3.0.
McpServerCustomizationnow exposes the full MCP lifecycle:Enabled, the discriminatedMcpServerStateunion (Starting/Ready/AuthRequired/Error/Stopped), optionalChannelURI for themcp://side-channel, and optionalMcpAppblock carryingAhpMcpUiHostCapabilitiesfor MCP Apps.McpServerAuthRequiredStatevariant carriesProtectedResourceMetadataplusReason/RequiredScopes/Descriptionso the existingauthenticatecommand can drive per-server auth.Customizationtop-level union now includesMcpServer— hosts MAY surface bare MCP servers directly rather than only inside a plugin or directory.SessionMcpServerStateChangedActionand matching reducer case — narrow upsert ofState+Channelon an existing MCP server customization by id.ClientCapabilitiesstruct onInitializeParams.Capabilitieswith first entryMcpApps.changeKindfield onChangeset(well-known values:'session','branch','uncommitted','turn','compare-turns').statusanderrorfields onChangesetOperationand thechangeset/operationStatusChangedaction, tracking theidle → running → errorlifecycle of a changeset operation.AgentCustomization._metaprovider metadata field.- Optional
changesfield onSessionSummary(ChangesSummarywith optionaladditions,deletions, andfilescounts) summarising a session's file-change footprint. - New annotations channel wire types (
ahp-session:/<uuid>/annotations):AnnotationsState,Annotation,AnnotationEntry,AnnotationsSummary; the client-dispatchableAnnotationsSetAction,AnnotationsRemovedAction,AnnotationsEntrySetAction,AnnotationsEntryRemovedActionvariants — clients drive every annotation mutation by dispatching these directly, assigning theAnnotation.Id/AnnotationEntry.Idthemselves;ApplyActionToAnnotations(stub mirroringApplyActionToChangeset); andSnapshotState.Annotations. MessageAnnotationsAttachment(annotationsMessageAttachmentvariant) referencing annotations on a session's annotations channel byResourceURI, optionally narrowed to anAnnotationIdsarray.
- Reducers split into per-chat and session-aggregate handlers to match the multi-chat protocol shape.
fetchTurnsandcompletionsnow target anahp-chat:channel;PROTOCOL_VERSIONbumped to0.4.0.- Renamed the
ChangesetSummarytype toChangeset. The on-the-wire shape is unchanged. - Moved the
changesetscatalogue fromSessionSummarytoSessionState. Thesession/changesetsChangedaction now updatesstate.changesetsdirectly instead ofstate.summary.changesets.
SessionState.turns,SessionState.activeTurn,SessionState.steeringMessage,SessionState.queuedMessages,SessionState.inputRequests(moved toChatState).- Removed the
additions,deletions, andfilesfields fromChangesetSummary. Aggregate counts now live onSessionSummary.changes; per-changeset views derive their own totals fromChangesetState.files.
ToolCallBase.ToolClientId *stringreplaced byToolCallBase.Contributor *ToolCallContributor(union withClient { ClientId }andMcp { CustomizationId }variants).SessionToolCallStartActioncarries the newContributorfield as well. The reducer follows the rename.
Implements AHP 0.2.0.
First published version of the Go module. Includes:
ahptypes— generated wire types fromtypes/*.ts, including the extendedresource*family (resourceResolve,resourceMkdir,createResourceWatch, the newahp-resource-watch:/channel with theresourceWatch/changedaction),ResourceWriteParams'smode/position/ifMatchfields, the newConflict(-32011) error code, and the bidirectional content-bearingresource*surface exposed on bothCommandMapandServerCommandMap. Structs use Go JSON struct tags that preserve the canonical camelCase wire names; discriminated unions are concrete wrapper structs that round-trip via customMarshalJSON/UnmarshalJSON; bitset enums are typeduint32with named flag constants and helpers.UserMessage._metaoptional map field, generated asMap[string]json.RawMessage, exposing the new spec-level provider metadata channel on user messages.ahp— asyncClientdriven by a pluggableTransport, pureApplyActionToRoot/ApplyActionToSession/ApplyActionToTerminal/ApplyActionToChangesetreducers,MultiHostClientruntime underahp/hosts,MultiHostStateMirrorhelper.ahpws— WebSocket transport built ongithub.com/coder/websocket, matching the Rustahp-wscrate's API shape.