microsoft/agent-host-protocol clients/go/v0.4.0
microsoft/agent-host-protocol
Captured source
source ↗Go module v0.4.0
Repository: microsoft/agent-host-protocol
Tag: clients/go/v0.4.0
Published: 2026-06-19T18:27:14Z
Prerelease: no
Release notes:
[0.4.0] — 2026-06-19
Implements AHP 0.4.0.
Added
MessageOriginstruct andMessageKindtype now modelMessage.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.
ChangesetContentChangedActionfor full-replacement changeset file
snapshots with optional operations and error details.
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).
Changed
ToolResultSubagentContent.Resourceis now specified as the spawned worker
chat URI (ahp-chat:/), 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:
ChangesetOperationTargetRangeis now a nestedTextRange
({start: {line, character}, end: {line, character}}) instead of flat {start, end} int64 fields.
Fixed
ActionEnvelope.Originis now omitted from JSON output when absent
(json:"origin,omitempty") instead of serializing as null.
Added
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 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
_metaupdates 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;ChatOriginprovenance union;createChat/disposeChatcommands.ChatSummary.WorkingDirectory— optional per-chat working directory. Falls back to the session'sWorkingDirectorywhen absent.ChatInteractivitystring enum (ChatInteractivityFull/ChatInteractivityReadOnly/ChatInteractivityHidden) and the optionalChatSummary.Interactivity/ChatState.Interactivityfield describing how the user can interact with a chat. Absent defaults to"full".- 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-known hostBuild` key carrying the host's build version/commit/date.
Changed
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.
Removed
SessionChatsChangedAction(replaced by the three discrete chat-catalog actions above).
Notability
notability 3.0/10Routine version bump of Go client library.