Releases: microsoft/agent-host-protocol
Release list
AHP Swift Package v0.5.1
[0.5.1] — 2026-07-02
Implements AHP 0.5.1.
Added
- Optional
noncefield onContentRef. SubscribeParams.delivery.maxLatencyMsand
AHPClient.subscribe(_:delivery:)for clients to request a maximum
subscription delivery latency, including0for no intentional coalescing.- Optional
capabilitiesfield onAgentInfo(AgentCapabilitieswith a
nestedmultipleChatscapability carryingfork) so clients gate multi-chat
and fork via advertised capabilities instead of provider-id switches. - Cursor-based pagination for
listSessions, via new sharedPaginatedParams
(limit+cursor) andPaginatedResult(nextCursor) types:
ListSessionsParamsandListSessionsResultnow carry these fields, letting
clients page through a large session catalogue. Fully additive — omitting the
fields preserves prior behaviour. SubscribeParams.view.turns,ChatState.turnsNextCursor, and the
chat/turnsLoadedaction so clients can subscribe to a bounded tail of chat
history and page older turns into the reduced chat state on demand.SessionState.inputNeeded— a session-level aggregate of outstanding input
requests across all chats (SessionInputRequestenum with
SessionChatInputRequest,SessionToolConfirmationRequest, and
SessionToolClientExecutionRequestcases), plus the
StateAction.sessionInputNeededSet/StateAction.sessionInputNeededRemoved
actions and theToolCallConfirmationStateunion. The session reducer
maintains theSessionStatus.inputNeededactivity bit from the queue,
clearing it (falling back to.inProgress) when the last entry is removed.- Optional
intentionfield onChatToolCallStartActionand every tool-call
lifecycle state. - Optional
modelandtoolsfields onAgentCustomizationfor a custom
agent's pinned model and tool allowlist.
Changed
fetchTurnsnow acceptscursorfromChatState.turnsNextCursorand returns
an empty result after the host has loaded older turns into chat state, instead
of returning a detached{ turns, hasMore }page.- Generated clients now advertise only protocol
0.5.1, since thefetchTurns
contract is not wire-compatible with0.5.0.
Removed
filterfield fromListSessionsParams. It was an untyped placeholder with
no defined semantics; it will return with a concrete shape once session
filtering/sorting is specified.
Fixed
SnapshotStatenow decodes thechatvariant. Its decoder previously never
attemptedChatState, so chat snapshots failed to decode. Variant
disambiguation also no longer relies on the removedsummaryfield (a leftover
from beforeSessionStatewas flattened).
AHP Spec v0.5.1
[0.5.1] — 2026-07-02
Spec version: 0.5.1
Added
SubscribeParams.delivery.maxLatencyMsfor clients to request a maximum
subscription delivery latency, including0for no intentional coalescing.SessionState.inputNeeded— a session-level aggregate of outstanding input
requests across all chats, so a client can discover and answer elicitations,
tool confirmations, and client-tool execution requests from the session
channel without subscribing to individual chats. Each entry
(SessionChatInputRequest,SessionToolConfirmationRequest,
SessionToolClientExecutionRequest, unioned asSessionInputRequest) carries
the owning chat URI plus the identifiers needed to respond.session/inputNeededSetandsession/inputNeededRemovedactions for the host
to upsert and removeSessionState.inputNeededentries. The session reducer
setsSessionStatus.InputNeededwhile the queue is non-empty and clears it
(falling back toInProgress) once it empties, preserving orthogonal flags.ToolCallConfirmationStateunion (ToolCallPendingConfirmationState | ToolCallPendingResultConfirmationState) for the tool call carried by
SessionToolConfirmationRequest.- Optional
noncefield onContentRef. - Optional
intentionfield onchat/toolCallStartand everyToolCallState
variant, providing a human-readable description of what the invocation intends
to do. - Optional
modelandtoolsfields onAgentCustomization, giving a custom
agent's pinned model and tool allowlist a first-class home instead of_meta. - Optional
capabilitiesfield onAgentInfo(AgentCapabilitieswith a
nestedmultipleChatscapability carryingfork) so clients gate multi-chat
and fork via advertised capabilities instead of provider-id switches. - Cursor-based pagination for
listSessions, via new sharedPaginatedParams
(limit+cursor) andPaginatedResult(nextCursor) types:
ListSessionsParamsnow extendsPaginatedParamsandListSessionsResult
extendsPaginatedResult, letting clients fetch a large session catalogue
incrementally. Fully additive — omitting the fields preserves today's
behaviour. SubscribeParams.view.turns,ChatState.turnsNextCursor, and the
chat/turnsLoadedaction so clients can subscribe to a bounded tail of chat
history and page older turns into the reduced chat state on demand.
Changed
fetchTurnsnow acceptscursorfromChatState.turnsNextCursorand returns
an empty result after the host has loaded older turns into chat state, instead
of returning a detached{ turns, hasMore }page.- Generated clients now advertise only protocol
0.5.1, since thefetchTurns
contract is not wire-compatible with0.5.0.
Removed
filterfield fromListSessionsParams. It was an untypedobject
placeholder with no defined semantics; it will be reintroduced with a concrete
shape once session filtering/sorting is specified.
Go module v0.5.1
[0.5.1] — 2026-07-02
Implements AHP 0.5.1.
Added
- Optional
Noncefield onContentRef. SubscribeParams.Delivery.MaxLatencyMsandClient.SubscribeWithDelivery
for clients to request a maximum subscription delivery latency, including
0for no intentional coalescing.- Optional
capabilitiesfield onAgentInfo(AgentCapabilitieswith a
nestedmultipleChatscapability carryingfork) so clients gate multi-chat
and fork via advertised capabilities instead of provider-id switches. - Cursor-based pagination for
listSessions, via new sharedPaginatedParams
(Limit+Cursor) andPaginatedResult(NextCursor) types:
ListSessionsParamsandListSessionsResultnow carry these fields, letting
clients page through a large session catalogue. Fully additive — omitting the
fields preserves prior behaviour. SubscribeParams.View.Turns,ChatState.TurnsNextCursor, and the
chat/turnsLoadedaction so clients can subscribe to a bounded tail of chat
history and page older turns into the reduced chat state on demand.SessionState.InputNeeded— a session-level aggregate of outstanding input
requests across all chats (SessionInputRequestunion with
SessionChatInputRequest,SessionToolConfirmationRequest, and
SessionToolClientExecutionRequest), plus theSessionInputNeededSetAction
(wiresession/inputNeededSet) andSessionInputNeededRemovedAction(wire
session/inputNeededRemoved) actions and theToolCallConfirmationState
union. The session reducer maintains theSessionStatusInputNeededactivity
bit from the queue, clearing it (falling back toSessionStatusInProgress)
when the last entry is removed.- Optional
Intentionfield onChatToolCallStartActionand every tool-call
lifecycle state. - Optional
ModelandToolsfields onAgentCustomizationfor a custom
agent's pinned model and tool allowlist.
Changed
fetchTurnsnow acceptsCursorfromChatState.TurnsNextCursorand returns
an empty result after the host has loaded older turns into chat state, instead
of returning a detached{ turns, hasMore }page.- Generated clients now advertise only protocol
0.5.1, since thefetchTurns
contract is not wire-compatible with0.5.0.
Removed
Filterfield fromListSessionsParams. It was an untyped placeholder with
no defined semantics; it will return with a concrete shape once session
filtering/sorting is specified.
Fixed
SnapshotState.UnmarshalJSONnow decodes theChatvariant. Variant
disambiguation previously probed for the removedsummaryfield (a leftover
from beforeSessionStatewas flattened), so chat and session snapshots both
fell through to theRootcatch-all. Sessions are now matched onlifecycle
and chats onturns.
AHP Swift Package v0.5.0
[0.5.0] — 2026-06-26
Implements AHP 0.5.0.
Added
ChatActivityChangedAction(StateAction.chatActivityChanged, wire
chat/activityChanged) for updating a chat's current activity description
independently of the session summary.ProgressParamsstruct (wireroot/progress) — a generic progress notification
correlated by aprogressToken(added onCreateSessionParams).
Used today for the lazy first-use download of an agent's native SDK.SessionModelInfo.maxOutputTokensandSessionModelInfo.maxPromptTokens
optional fields for communicating model token limits.SessionSummary.meta(_metaon the wire) optional provider metadata field
for lightweight session-list presentation hints.SessionActiveClientRemovedAction(StateAction.sessionActiveClientRemoved,
wiresession/activeClientRemoved) to release a single active client by
clientId.ChatDraftChangedAction(StateAction.chatDraftChanged, wire
chat/draftChanged) andChatState.draft(Message?) to set or clear the
user's in-progress draft input for a chat. The chat reducer applies it
without stampingmodifiedAt.Message.modelandMessage.agentoptional fields carrying the selection a
message was composed with.
Changed
SessionState.activeClients([SessionActiveClient], required) replaces the
single optionalSessionState.activeClient; the session reducer upserts and
removes entries keyed byclientId.StateAction.sessionActiveClientChangedis renamed to
StateAction.sessionActiveClientSet(wiresession/activeClientSet) with
upsert-by-clientIdsemantics; it no longer unsets the active client
(dispatchsession/activeClientRemovedinstead).ConfigPropertySchema.enumfield is now[AnyCodable]?instead of
[String]?, allowing numeric, boolean, and null enum values.ModelSelection.configvalues are nowAnyCodableinstead ofString,
allowing numeric, boolean, and null configuration values.SessionStatenow inlines the session metadata fields (provider,title,
status,activity,project,workingDirectory,annotations) directly
instead of embedding asummary: SessionSummary. The session reducer mutates
these fields directly and no longer stamps amodifiedAt.SessionSummary
remains a root-only catalog struct whosecreatedAt/modifiedAtare now
ISO-8601Strings and which no longer carriesmodel/agent.ChatStateandChatSummaryno longer carrymodel/agent.
Removed
SessionActiveClientToolsChangedAction. An active client now updates its
published tools by re-dispatchingStateAction.sessionActiveClientSetwith its
full, updated entry.SessionModelChangedAction(StateAction.sessionModelChanged,
session/modelChanged) andSessionAgentChangedAction
(StateAction.sessionAgentChanged,session/agentChanged), along with their
session-reducer handling.
AHP Spec v0.5.0
[0.5.0] — 2026-06-26
Spec version: 0.5.0
Added
chat/activityChangedaction for updating a chat's current activity
description independently of the session summary.root/progress(ProgressParams) generic host→client progress notification,
correlated by aprogressTokenthe client supplies on the originating
request (todaycreateSession.progressToken) rather than a domain object. Lets
the host report long-running work — e.g. the lazy first-use download of an
agent's native SDK — so clients can show an indicator instead of a silent
multi-second hang. Carries monotonicprogressand optionaltotal; complete
whenprogress === total.createSession.progressTokenoptional opt-in token for receivingroot/progress
notifications about a session's bring-up.SessionModelInfo.maxOutputTokensandSessionModelInfo.maxPromptTokens
optional fields for communicating model token limits.SessionSummary._metaoptional provider metadata field for lightweight
session-list presentation hints.JsonPrimitivetype alias (string | number | boolean | null) intypes/common/state.ts.session/activeClientRemovedaction to release a single active client from a
session byclientId.
Changed
ConfigPropertySchema.enumnow acceptsJsonPrimitive[]instead ofstring[], allowing numeric, boolean, and null enum values.ModelSelection.configvalues are nowJsonPrimitive(string | number | boolean | null) instead ofstring, allowing numeric, boolean, and null configuration values.SessionState.activeClients(a required array, keyed byclientId) replaces
the single optionalSessionState.activeClient. A session may now have
multiple concurrent active clients.session/activeClientChangedis renamed tosession/activeClientSetwith
upsert-by-clientIdsemantics. It no longer acceptsnullto unset the
active client — dispatchsession/activeClientRemovedinstead.
Removed
session/activeClientToolsChanged. An active client now updates its published
tools by re-dispatchingsession/activeClientSetwith its full, updated entry.
Fixed
- Corrected the
ACTION_INTRODUCED_INentries forannotations/set,
annotations/removed,annotations/entrySet, andannotations/entryRemoved
from0.3.0to0.4.0. The annotations channel first shipped in the
0.4.0spec release (it is absent fromspec/v0.3.0), so version
negotiation must not advertise it to peers speaking0.3.0.
Go module v0.5.0
[0.5.0] — 2026-06-26
Implements AHP 0.5.0.
Added
ChatDraftChangedAction(wirechat/draftChanged) andChatState.Draft
(*Message) for syncing a chat's in-progress input draft;ApplyActionToChat
sets or clearsstate.Draftwithout stampingModifiedAt.Message.ModelandMessage.Agentoptional fields recording the model /
agent selection a message was composed with.ChatActivityChangedAction(wirechat/activityChanged) for updating a chat's
current activity description independently of the session summary.ProgressParamsstruct (wireroot/progress) — a generic progress notification
correlated by aProgressToken(added onCreateSessionParams).
Used today for the lazy first-use download of an agent's native SDK.SessionModelInfo.MaxOutputTokensandSessionModelInfo.MaxPromptTokens
optional fields for communicating model token limits.SessionSummary.Meta(wire_meta) optional provider metadata field for
lightweight session-list presentation hints.SessionActiveClientRemovedAction(wiresession/activeClientRemoved) to
release a single active client byClientId.
Changed
SessionStateno longer embeds aSummarysub-struct; its metadata fields
(Provider,Title,Status,Activity,Project,WorkingDirectory,
Annotations) are now inlined directly onSessionState, which no longer
carriesModel,Agent,CreatedAt, orModifiedAt.ApplyActionToSession
reads and writes these flat fields and no longer stamps a session
ModifiedAt.SessionSummaryis now a root-only catalog struct; itsCreatedAt/
ModifiedAtare ISO-8601 strings (previously numeric) and it no longer
carriesModel/Agent.ChatStateandChatSummaryno longer carryModel/Agent.SessionState.ActiveClients([]SessionActiveClient, required) replaces the
single pointerSessionState.ActiveClient;ApplyActionToSessionupserts and
removes entries keyed byClientId.SessionActiveClientChangedActionis renamed toSessionActiveClientSetAction
(wiresession/activeClientSet) with upsert-by-ClientIdsemantics; it no
longer unsets the active client (dispatchsession/activeClientRemoved
instead).ConfigPropertySchema.Enumfield is now[]json.RawMessageinstead of[]string,
allowing numeric, boolean, and null enum values.ModelSelection.Configvalues are nowjson.RawMessageinstead ofstring,
allowing numeric, boolean, and null configuration values.
Removed
SessionModelChangedAction(wiresession/modelChanged) and
SessionAgentChangedAction(wiresession/agentChanged); session model /
agent are no longer part of the protocol surface.SessionActiveClientToolsChangedAction. An active client now updates its
published tools by re-dispatchingSessionActiveClientSetActionwith its
full, updated entry.
AHP Swift Package v0.4.0
[0.4.0] — 2026-06-19
Implements AHP 0.4.0.
Added
MessageOriginstruct andMessageKindenum now typeMessage.origin
(previously an untypedAnyCodable);MessageKindcoversuser,agent,
tool, andsystemNotification, adding faithful agent- and tool-initiated
origins.ConfigPropertySchema.additionalProperties— optional field describing the
schema for object-typed config properties beyond those inproperties.ChangesetContentChangedActionfor full-replacement changeset file
snapshots with optional operations and error details.ChangesetOperationStatus.disabled— new case for changeset operations
that are currently unavailable and cannot be invoked.ChangesetOperation.group— optional identifier for grouping related
changeset operations together in the UI._meta(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:/<cid>), not a session URI — a tool-spawned
sub-agent is a chat. Its doc now describes the correspondence with the worker
chat'sChatOrigin.toolrecord (matchingtoolCallId), which remains the
canonical representation of the spawn relationship.- BREAKING:
SessionStatusis now anOptionSetwith aUInt32rawValue
(wasInt), an unsigned 32-bit bitset that preserves combined and unknown
forward-compat bits. Combine flags with set-union (∪/union) and test
membership withcontains(_:). - BREAKING:
ChangesetOperationTarget's range target now carries a nested
TextRange({start: {line, character}, end: {line, character}}) instead of
a flat{start, end}integer pair.
Added
SnapshotState.resourceWatchcase and matching
MultiHostStateMirror.resourceWatchesslot, soapplySnapshot(host:snapshot:)
can seed anahp-resource-watch:channel's descriptor (root URI, recursive
flag, optional includes/excludes) alongside the existing root / session /
terminal / changeset / annotations slots.reset(host:)/reset()clear
the new slot.
Fixed
AnyCodable.encodeno longer corruptsNSNumber-backedInt/Doublevalues toBool/Int.NSNumberis now special-cased before the generic Swift type arms, usingCFBooleanGetTypeID()to distinguish boolean from numericNSNumberinstances.AnyCodable.encode(to:)now preserves unsigned integers aboveInt64.max(encodingNSNumbervalues whoseobjCTypeis unsigned viauint64Valueinstead of the signedint64Valuefallback), and theAnyCodable.swifttemplate inscripts/generate-swift.tsreproduces the full encode/equality logic so regenerating the scaffold no longer reintroduces the bug.MultiHostClient/host runtime now advertises the generatedSUPPORTED_PROTOCOL_VERSIONSoninitializeinstead of a stale hard-coded"0.2.0".- Session reducers now apply
_meta(meta) updates from every
tool-call-scoped action, not onlysession/toolCallStart.
Added
-
annotationsReducerimplemented; annotations conformance fixtures (210–219) now pass. -
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. -
SessionChatAddedAction,SessionChatRemovedAction, andSessionChatUpdatedActionhandling for incremental chat catalog updates. -
ChatSummary.workingDirectory— optional per-chat working directory. Falls back to the session'sworkingDirectorywhen absent. -
SessionDefaultChatChangedAction(session/defaultChatChanged) — updatesSessionState.defaultChatto steer new input to the designated chat; absent value clears the hint. -
ErrorInfo.meta: [String: AnyCodable]?— optional provider-specific metadata bag on error payloads (serialized as_meta), mirroring the existingmetafield onUsageInfoand other protocol types. Clients MAY inspect well-known keys here for richer, localised error UI. -
RootStatenow exposes an optional_metaproperty bag (meta: [String: AnyCodable]?) for implementation-defined agent-host metadata, such as a
well-knownhostBuildkey carrying the host's build version/commit/date. -
changesetReducerandresourceWatchReducer— the two state reducers
that were missing from the Swift client are now implemented, mirroring the
canonical TypeScript reducers (and the Kotlin/.NET clients).changesetReducer
foldschangeset/*actions intoChangesetState;resourceWatchReducer
treatsresourceWatch/changedas a documented event pass-through. The
fixture-driven reducer test no longer silently skips the terminal, changeset,
and resourceWatch fixture families — they now decode and assert, with the
remaining gaps (unknown-discriminant response part; the not-yet-implemented
annotations channel) pinned by an explicit drift tripwire.
Changed
ChatStateis now flat — the previous embeddedsummaryhas been replaced with inlinedresource/title/status/activity/modifiedAt/model/agent/origin/workingDirectoryproperties.ChatSummaryremains as the standalone catalog entry onSessionState.chats.ChatSummary.modifiedAtandChatState.modifiedAtare now ISO 8601Stringvalues instead ofInt64/UInt64milliseconds.
Added
ChatSummary.interactivity/ChatState.interactivity("full" | "read-only" | "hidden") indicating how the user can interact with a chat. Absent defaults to"full".
Removed
SessionChatsChangedAction(replaced by the three discrete chat-catalog actions above).
Fixed
- Encode-fidelity: an unknown
StateActionvariant no longer re-encodes to
{}(dropping itstypediscriminant and extra fields); the raw payload is
preserved on decode and re-emitted verbatim. - Forward-compatibility: unknown discriminants on wire-decoded discriminated
unions (ResponsePart,ToolCallState,TerminalClaim,
TerminalContentPart,Customization, and other evolvable unions) now decode
to a raw passthrough and re-encode verbatim instead of throwing
DecodingError, so a snapshot carrying an unknown variant still decodes and
subsequent actions fold correctly. ChangesetOperationResourceTarget/…RangeTargetnow encode theirkind
discriminant (previously a computed property excluded fromCodingKeys, so it
was dropped on encode).
AHP Spec v0.4.0
[0.4.0] — 2026-06-19
Spec version: 0.4.0
Added
MessageOrigin—Message.originis now a named type (was an inline
{ kind }object), and itsMessageKindgainsAgentandToolkinds for
turns initiated by the agent or a tool rather than the user (e.g. a tool
seeding the first message of a worker chat it spawned), so a host no longer
has to misrepresent such a message asUserorSystemNotification.ConfigPropertySchema.additionalProperties— optional JSON Schema field
(ConfigPropertySchema) describing the schema for object-typed config
properties beyond those listed inproperties.changeset/contentChanged— full-replacement changeset action for sending
batched files, optional operations, and error details on initial snapshots or
bulk refreshes.ChangesetOperationStatus.Disabled— signals that a changeset operation is
currently unavailable and cannot be invoked, so clients can render the
control as disabled rather than hiding it.ChangesetOperation.group— optional identifier for grouping related
changeset operations together in the UI._metaslot 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
agent 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). The
tool-call actions already exposed_meta; this extends the same convention
to the remaining turn-scoped actions.annotations/updated(AnnotationsUpdatedAction) — a client-dispatchable
action that partially updates an existing annotation's own properties
(turnId,resource,range,resolved) without resending its entries.
Resolving or re-anchoring an annotation no longer requires replacing the
whole annotation viaannotations/set. Omitted fields are left unchanged;
the annotation'sentries,id, and_metaare never touched.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. When absent, chats inherit the session'sworkingDirectory. Enables agent-swarm patterns where multiple chats in one session operate on independent worktrees.ChatInteractivityenum ("full"/"read-only"/"hidden") plus the optionalChatSummary.interactivity/ChatState.interactivityfield describing how the user can interact with a chat, supporting agent-team patterns where worker chats are read-only or hidden. Absent defaults to"full".- Three discrete chat-catalog actions on the session channel —
session/chatAdded(upsert bysummary.resource),session/chatRemoved, andsession/chatUpdated(partial-update withPartial<ChatSummary>) — mirroring the root-channelroot/sessionAdded/root/sessionRemoved/root/sessionSummaryChangedpattern. session/defaultChatChangedaction — updatesSessionState.defaultChatto steer new input to the designated chat; absent value clears the hint.ErrorInfo._meta?: Record<string, unknown>— optional provider-specific metadata bag on error payloads, mirroring the existing_metaconvention onUsageInfoand other protocol types. Clients MAY inspect well-known keys here for richer, localised error UI.RootStatenow carries an optional_metaproperty bag for
implementation-defined metadata about the agent host itself, mirroring the
MCP_metaconvention. A well-knownhostBuildkey may carry build
information (version, commit, date) about the program hosting the agent host.
Changed
ToolResultSubagentContent.resourceis 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'sChatOriginrecord (kind: 'tool', matchingtoolCallId), which
remains the canonical representation of the spawn relationship.Snapshot.statenow acceptsResourceWatchState, soinitialize/
reconnect/subscribecan seed anahp-resource-watch:channel from a
point-in-time snapshot. Existing variants (root, session, terminal,
changeset, annotations) are unchanged.fetchTurnsandcompletionsnow target anahp-chat:channel;PROTOCOL_VERSIONbumped to0.4.0.ChatStateis now flat — the previoussummary: ChatSummarysub-object has been replaced by inlinedresource/title/status/activity/modifiedAt/model/agent/origin/workingDirectoryfields.ChatSummaryremains as the standalone catalog entry onSessionState.chats.ChatSummary.modifiedAtandChatState.modifiedAtare now ISO 8601 strings instead of numeric milliseconds.SessionSummarynow documents how its aggregate fields (status,activity,modifiedAt) are derived from the session's chats, includingInputNeeded/Errorpromotion when any chat raises the flag.
Fixed
- Session reducers now apply
_metaupdates from every tool-call-scoped
action, not onlysession/toolCallStart.
Removed
SessionState.turns,SessionState.activeTurn,SessionState.steeringMessage,SessionState.queuedMessages,SessionState.inputRequests(moved toChatState).session/chatsChangedfull-replacement action (replaced bysession/chatAdded/session/chatRemoved/session/chatUpdated).
Go module v0.4.0
[0.4.0] — 2026-06-19
Implements AHP 0.4.0.
Added
MessageOriginstruct andMessageKindtype now modelMessage.Origin
(previously an untypedjson.RawMessage);MessageKindcoversuser,
agent,tool, andsystemNotification, adding faithful agent- and
tool-initiated origins.ConfigPropertySchema.AdditionalProperties— optional field describing the
schema for object-typed config properties beyond those inProperties.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:/<cid>), not a session URI — a tool-spawned
sub-agent is a chat. Its doc now describes the correspondence with the worker
chat'sChatToolOriginrecord (matchingToolCallId), 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}int64fields.
Fixed
ActionEnvelope.Originis now omitted from JSON output when absent
(json:"origin,omitempty") instead of serializing asnull.
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 acceptsResourceWatchState, decoded by probing for the required
root+recursivekeys (ordered between the existing changeset and
annotations probes).
Fixed
- Reducer parity fixtures now require
_metaupdates from every
tool-call-scoped action, not onlysession/toolCallStart.
Added
-
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. -
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-knownhostBuildkey 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).
AHP Swift Package v0.3.0
[0.3.0] — 2026-06-05
Implements AHP 0.3.0.
Added
McpServerCustomizationnow exposes the full MCP lifecycle:enabled,
the discriminatedMcpServerStateenum
(.starting/.ready/.authRequired/.error/.stopped), optional
channelURI for themcp://side-channel, and optionalmcpApp
block carryingAhpMcpUiHostCapabilitiesfor MCP Apps.McpServerAuthRequiredStatecarriesProtectedResourceMetadata
plusreason/requiredScopes/descriptionso the existing
authenticatecommand can drive per-server auth.Customization.mcpServertop-level case — hosts MAY surface bare
MCP servers directly rather than only inside a plugin or directory.SessionMcpServerStateChangedActionand matching reducer arm —
narrow upsert ofstate+channelon an existing MCP
server customization by id. Wired through bothReducers.swiftand
the protocol-basedNativeReducer.swift.ClientCapabilitiesstruct onInitializeParams.capabilitieswith
first entrymcpApps.changeKindfield onChangeset(well-known values:'session',
'branch','uncommitted','turn','compare-turns').statusanderrorfields onChangesetOperationand the
changeset/operationStatusChangedaction, tracking the
idle → running → errorlifecycle of a changeset operation.AgentCustomization._metaprovider metadata field.- Optional
changesfield onSessionSummary(ChangesSummarywith optionaladditions,deletions, andfilescounts) summarising a session's file-change footprint.
Changed
- Renamed the
ChangesetSummarytype toChangeset. The on-the-wire shape is unchanged. - Moved the
changesetscatalogue fromSessionSummarytoSessionState. Thesession/changesetsChangedaction now updatesstate.changesetsdirectly instead ofstate.summary.changesets.
Removed
- Removed the
additions,deletions, andfilesfields fromChangesetSummary. Aggregate counts now live onSessionSummary.changes; per-changeset views derive their own totals fromChangesetState.files.
Changed
ToolCallBase.toolClientId: String?replaced by
ToolCallBase.contributor: ToolCallContributor?(enum with
.client(ToolCallClientContributor)and.mcp(ToolCallMcpContributor)
cases).SessionToolCallStartActioncarries the newcontributor
field as well.Reducers.swift,NativeReducer.swift, and
ToolCallStateExtensions.swiftfollow the rename.