ReleaseMicrosoftMicrosoftpublished Jun 19, 2026seen 2d

microsoft/agent-host-protocol clients/go/v0.4.0

microsoft/agent-host-protocol

Open original ↗

Captured source

source ↗
published Jun 19, 2026seen 2dcaptured 2dhttp 200method plain

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

  • 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:/), 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).

Notability

notability 3.0/10

Routine version bump of Go client library.