clients/go/v0.4.0
microsoft/agent-host-protocolclients/go/v0.4.0Jun 19, 2026by github-actions[bot]
Upgrading?
Release notes summary
Go module implementation of AHP 0.4.0, matching Swift and Spec changes with typed origins and reducer parity.
Key Highlights
- `MessageOrigin` struct and `MessageKind` type for message attribution.
- Full reducer implementations for `ApplyActionToChangeset`, `Annotations`, and `ResourceWatch`.
- Flat `ChatState` structure matching the spec and Swift implementation.
- Fixed encoding for `ActionEnvelope.Origin` to omit when absent.
Breaking Changes
- `ChangesetOperationTargetRange` range structure changed to nested `TextRange`.
New Features
- `SessionDefaultChatChangedAction` for steering input.
- `ErrorInfo.Meta` map for provider-specific error metadata.
- Optional `RootState._meta` property bag.
- Support for `ChatInteractivity` enum values.
Full Release Notes
## [0.4.0] — 2026-06-19
Implements AHP 0.4.0.
### Added
- `MessageOrigin` struct and `MessageKind` type now model `Message.Origin`
(previously an untyped `json.RawMessage`); `MessageKind` covers `user`,
`agent`, `tool`, and `systemNotification`, adding faithful agent- and
tool-initiated origins.
- `ConfigPropertySchema.AdditionalProperties` — optional field describing the
schema for object-typed config properties beyond those in `Properties`.
- `ChangesetContentChangedAction` for full-replacement changeset file
snapshots with optional operations and error details.
- `ChangesetOperationStatusDisabled` — new `ChangesetOperationStatus` value 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).
### Changed
- `ToolResultSubagentContent.Resource` is now specified as the spawned worker
**chat** URI (`ahp-chat:/<cid>`), not a session URI — a tool-spawned
sub-agent is a chat. Its doc now describes the correspondence with the worker
chat's `ChatToolOrigin` record (matching `ToolCallId`), which remains the
canonical representation of the spawn relationship.
- **BREAKING:** `ChangesetOperationTargetRange` is now a nested `TextRange`
(`{start: {line, character}, end: {line, character}}`) instead of flat
`{start, end}` `int64` fields.
### Fixed
- `ActionEnvelope.Origin` is now omitted from JSON output when absent
(`json:"origin,omitempty"`) instead of serializing as `null`.
### Added
- `ApplyActionToChangeset`, `ApplyActionToAnnotations`, and `ApplyActionToResourceWatch` — full reducer implementations replacing the previous stubs; all shared conformance fixtures in `types/test-cases/reducers/` for these three families now pass.
- `SnapshotState.ResourceWatch` pointer field — the `Snapshot.state` union
now accepts `ResourceWatchState`, decoded by probing for the required
`root` + `recursive` keys (ordered between the existing changeset and
annotations probes).
### Fixed
- Reducer parity fixtures now require `_meta` updates from every
tool-call-scoped action, not only `session/toolCallStart`.
### Added
- `AnnotationsUpdatedAction` (`annotations/updated`) — partially updates an
existing annotation's `TurnID` / `Resource` / `Range` / `Resolved` without
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; `ChatOrigin` provenance union; `createChat` / `disposeChat` commands.
- `ChatSummary.WorkingDirectory` — optional per-chat working directory. Falls back to the session's `WorkingDirectory` when absent.
- `ChatInteractivity` string enum (`ChatInteractivityFull` / `ChatInteractivityReadOnly` / `ChatInteractivityHidden`) and the optional `ChatSummary.Interactivity` / `ChatState.Interactivity` field describing how the user can interact with a chat. Absent defaults to `"full"`.
- Three discrete chat-catalog actions on the session channel — `SessionChatAddedAction` (upsert by `Summary.Resource`), `SessionChatRemovedAction`, and `SessionChatUpdatedAction` (partial-update payload).
- `SessionDefaultChatChangedAction` (`session/defaultChatChanged`) — updates `SessionState.DefaultChat` to 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 (`_meta` on the wire), mirroring the existing `Meta` field on `UsageInfo` and other protocol types.
- `RootState` now exposes an optional `_meta` property bag (`Meta
map[string]json.RawMessage`) for implementation-defined agent-host metadata,
such as a well-known `hostBuild` key carrying the host's build
version/commit/date.
### Changed
- `ChatState` is now flat — the previous embedded `Summary` has been replaced with inlined `Resource` / `Title` / `Status` / `Activity` / `ModifiedAt` / `Model` / `Agent` / `Origin` / `WorkingDirectory` fields. `ChatSummary` remains as the standalone catalog entry on `SessionState.Chats`.
- `ChatSummary.ModifiedAt` and `ChatState.ModifiedAt` are now ISO 8601 `string` values instead of integer milliseconds.
### Removed
- `SessionChatsChangedAction` (replaced by the three discrete chat-catalog actions above).Related Repositories
openclaw/openclaw★ 392,878
The AI that really does things. Any OS. Any Platform. The lobster way. 🦞
morluto/rea★ 372,734
Reverse engineer anything with agents, from app behavior down to native binaries.
nilbuild/developer-roadmap★ 370,231
Interactive roadmaps, guides and other educational content to help developers grow in their careers.
anomalyco/opencode★ 220,584
The open source coding agent.
n8n-io/n8n★ 208,403
Fair-code workflow automation platform with native AI capabilities. Combine visual building with custom code, self-host or cloud, 400+ integrations.