Releases: microsoft/agent-host-protocol
Release list
AHP Swift Package v0.5.2
[0.5.2] — 2026-07-09
Implements AHP 0.5.2.
Added
- Typed
resource*convenience methods onAHPClient: send wrappers (resourceRead,resourceWrite,resourceList,resourceCopy,resourceDelete,resourceMove,resourceResolve,resourceMkdir,resourceRequest,createResourceWatch) and inbound server-request handling viasetServerRequestHandler(_:)/setResourceRequestHandlers(_:)(newServerRequestHandlertypealias andResourceRequestHandlerstype). Inbound server-initiated requests are answered by the installed handler (stillMethodNotFoundwhen none is set). ToolResultTerminalCompleteContentfor terminal-style completion metadata in tool
results.- Optional
enabledfield on the child customization types
(AgentCustomization,SkillCustomization,PromptCustomization,
RuleCustomization,HookCustomization). disableUserInvocationonSkillCustomization, plusdisableModelInvocation
anddisableUserInvocationonAgentCustomization.- Optional
reviewedfield onChangesetFile. Omitting it (or setting it to
nil) signals that the server does not support the file "review"
functionality. changeset/filesReviewedChangedaction for servers to update thereviewed
flag of one or more changeset files.- Optional
meta(wire_meta) provider-metadata field on every customization
type, moved fromAgentCustomizationup to the shared customization base so
PluginCustomization,ClientPluginCustomization,DirectoryCustomization,
SkillCustomization,PromptCustomization,RuleCustomization,
HookCustomization, andMcpServerCustomizationall carry it. - Optional
serverInfoonInitializeResultandclientInfoon
InitializeParams, each anImplementation(name, optionalversion,
optionaltitle), identifying the implementation and build behind either side
of the handshake. Informational only — MUST NOT be used for feature detection. - Optional
terminalCommandPrefixonInitializeResultfor hosts that support
interpreting!-prefixed user messages as terminal commands. - Optional
versionfield onPluginCustomization(inherited by
ClientPluginCustomization), carrying the plugin's semver sourced from the
Open Plugins manifest. Provenance / display only. session/mcpServerStartRequestedandsession/mcpServerStopRequested
actions for clients to ask the host to start or stop MCP servers; stopping
moves anauthRequiredserver tostoppedso it no longer waits on
authentication.InputRequestResponsePartand theResponsePart.inputRequestcase. The
reducer now records a resolved input request in the active turn's
responsePartsonchatInputCompleted— embedding the resolved
ChatInputRequest(finalanswers) and theresponse(accept,decline,
orcancel) — so the outcome persists after the live request is removed.
Abandoned requests still record nothing (#324).
Changed
- The
session/customizationToggledreducer now toggles any top-level
customization (plugin,directory, or top-levelmcpServer) or an
individual child byid, setting that entry'senabled.
AHP Spec v0.5.2
[0.5.2] — 2026-07-09
Spec version: 0.5.2
Added
ToolResultTerminalCompleteContentfor terminal-style completion metadata in tool
results.- Optional
enabledflag on the child customizations (AgentCustomization,
SkillCustomization,PromptCustomization,RuleCustomization,
HookCustomization) so an individual child can be turned off independently of
its container; absent means enabled. disableUserInvocationonSkillCustomization, plusdisableModelInvocation
anddisableUserInvocationonAgentCustomization, giving custom agents and
skills a symmetric user/model invocation matrix.- Optional
reviewedfield onChangesetFile. Omitting it (or setting it to
undefined) signals that the server does not support the file "review"
functionality. changeset/filesReviewedChangedaction for servers to update thereviewed
flag of one or more changeset files.- Hoisted the optional
_metaprovider-metadata slot fromAgentCustomization
up to the sharedCustomizationBase, so every customization type
(PluginCustomization,ClientPluginCustomization,DirectoryCustomization,
SkillCustomization,PromptCustomization,RuleCustomization,
HookCustomization, andMcpServerCustomization) now carries the same
provider-specific escape hatch. Wire-compatible:AgentCustomizationstill
exposes_meta, now by inheritance. - Optional
serverInfoonInitializeResultandclientInfoon
InitializeParams, each anImplementation(name, optionalversion,
optionaltitle), so either side of the handshake can identify its
implementation and build. Informational only — mirrors LSP/MCP and MUST NOT
be used for feature detection. InputRequestResponsePart(kind: 'inputRequest') — a newResponsePart
variant that records a resolved input request in a turn's transcript. On
chat/inputCompleted, the reducer now appends this part (embedding the
resolvedChatInputRequestwith its finalanswersand theresponse:
accept,decline, orcancel) to the active turn'sresponseParts, so an
elicitation's outcome persists durably, mirroring how a resolved tool-call
confirmation is retained. Requests abandoned by turn end, cancel, error, or
truncation still record nothing (#324).- Optional
terminalCommandPrefixmarker onInitializeResultfor hosts that
support interpreting!-prefixed user messages as terminal commands. - Optional
versionfield onPluginCustomization(inherited by
ClientPluginCustomization), carrying the plugin's semver sourced from the
Open Plugins manifest's optionalversion. Provenance / display only; absent
when the manifest declares no version or the source has no version concept. session/mcpServerStartRequestedandsession/mcpServerStopRequested
actions for clients to ask the host to start or stop MCP servers; stopping
moves anauthRequiredserver tostoppedso it no longer waits on
authentication.
Changed
session/customizationTogglednow targets any top-level customization
(plugin,directory, or top-levelmcpServer) or an individual child by
idand sets that entry'senabled; the effective state of a child is
container.enabled && (child.enabled ?? true).
Fixed
- The generated JSON Schema artifacts (
schema/*.json) are now self-contained
and strict-oneOf-safe. The generator no longer emits an empty{}branch in
a union type alias'soneOf(which matched any value and defeated strict
oneOfvalidation), backfills theenum, enum-member, and type-alias$refs
that were previously dangling across all five schema files, and rendersnull
members as{ "type": "null" }(#302).
Go module v0.5.2
[0.5.2] — 2026-07-09
Implements AHP 0.5.2.
Added
- Typed
resource*convenience methods onahp.Client: send wrappers (ResourceRead,ResourceWrite,ResourceList,ResourceCopy,ResourceDelete,ResourceMove,ResourceResolve,ResourceMkdir,ResourceRequest,CreateResourceWatch) and inbound server-request handling viaSetServerRequestHandler/SetResourceRequestHandlers(newServerRequestHandlerandResourceRequestHandlerstypes). Inbound server-initiated requests are now answered (previously dropped) — via the installed handler, orMethodNotFoundwhen none is set. ToolResultTerminalCompleteContentfor terminal-style completion metadata in tool
results.- Optional
Enabledfield on the child customization types
(AgentCustomization,SkillCustomization,PromptCustomization,
RuleCustomization,HookCustomization). DisableUserInvocationonSkillCustomization, plusDisableModelInvocation
andDisableUserInvocationonAgentCustomization.- Optional
Reviewedfield onChangesetFile. Omitting it (or setting it to
nil) signals that the server does not support the file "review"
functionality. changeset/filesReviewedChangedaction for servers to update theReviewed
flag of one or more changeset files.- Optional
Meta(wire_meta) provider-metadata field on every customization
type, moved fromAgentCustomizationup to the shared customization base so
PluginCustomization,ClientPluginCustomization,DirectoryCustomization,
SkillCustomization,PromptCustomization,RuleCustomization,
HookCustomization, andMcpServerCustomizationall carry it. - Optional
ServerInfoonInitializeResultandClientInfoon
InitializeParams, each anImplementationstruct (Name, optional
Version, optionalTitle), identifying the implementation and build behind
either side of the handshake. Informational only — MUST NOT be used for
feature detection. - Optional
TerminalCommandPrefixonInitializeResultfor hosts that support
interpreting!-prefixed user messages as terminal commands. - Optional
Versionfield onPluginCustomization(inherited by
ClientPluginCustomization), carrying the plugin's semver sourced from the
Open Plugins manifest. Provenance / display only. session/mcpServerStartRequestedandsession/mcpServerStopRequested
actions for clients to ask the host to start or stop MCP servers; stopping
moves anauthRequiredserver tostoppedso it no longer waits on
authentication.InputRequestResponsePartand theResponsePartKindInputRequestdiscriminant.
The reducer now records a resolved input request in the active turn's
ResponsePartsonChatInputCompletedAction— embedding the resolved
ChatInputRequest(finalAnswers) and theResponse(accept,decline,
orcancel) — so the outcome persists after the live request is removed.
Abandoned requests still record nothing (#324).
Changed
- The
session/customizationToggledreducer now toggles any top-level
customization (plugin,directory, or top-levelmcpServer) or an
individual child byid, setting that entry'sEnabled.
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).