Skip to content

Releases: microsoft/agent-host-protocol

AHP Swift Package v0.5.1

Choose a tag to compare

@github-actions github-actions released this 02 Jul 20:07
1c9acf6

[0.5.1] — 2026-07-02

Implements AHP 0.5.1.

Added

  • Optional nonce field on ContentRef.
  • SubscribeParams.delivery.maxLatencyMs and
    AHPClient.subscribe(_:delivery:) for clients to request a maximum
    subscription delivery latency, including 0 for no intentional coalescing.
  • Optional capabilities field on AgentInfo (AgentCapabilities with a
    nested multipleChats capability carrying fork) so clients gate multi-chat
    and fork via advertised capabilities instead of provider-id switches.
  • Cursor-based pagination for listSessions, via new shared PaginatedParams
    (limit + cursor) and PaginatedResult (nextCursor) types:
    ListSessionsParams and ListSessionsResult now 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/turnsLoaded action 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 (SessionInputRequest enum with
    SessionChatInputRequest, SessionToolConfirmationRequest, and
    SessionToolClientExecutionRequest cases), plus the
    StateAction.sessionInputNeededSet / StateAction.sessionInputNeededRemoved
    actions and the ToolCallConfirmationState union. The session reducer
    maintains the SessionStatus.inputNeeded activity bit from the queue,
    clearing it (falling back to .inProgress) when the last entry is removed.
  • Optional intention field on ChatToolCallStartAction and every tool-call
    lifecycle state.
  • Optional model and tools fields on AgentCustomization for a custom
    agent's pinned model and tool allowlist.

Changed

  • fetchTurns now accepts cursor from ChatState.turnsNextCursor and 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 the fetchTurns
    contract is not wire-compatible with 0.5.0.

Removed

  • filter field from ListSessionsParams. It was an untyped placeholder with
    no defined semantics; it will return with a concrete shape once session
    filtering/sorting is specified.

Fixed

  • SnapshotState now decodes the chat variant. Its decoder previously never
    attempted ChatState, so chat snapshots failed to decode. Variant
    disambiguation also no longer relies on the removed summary field (a leftover
    from before SessionState was flattened).

AHP Spec v0.5.1

Choose a tag to compare

@github-actions github-actions released this 02 Jul 20:05
1c9acf6

[0.5.1] — 2026-07-02

Spec version: 0.5.1

Added

  • SubscribeParams.delivery.maxLatencyMs for clients to request a maximum
    subscription delivery latency, including 0 for 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 as SessionInputRequest) carries
    the owning chat URI plus the identifiers needed to respond.
  • session/inputNeededSet and session/inputNeededRemoved actions for the host
    to upsert and remove SessionState.inputNeeded entries. The session reducer
    sets SessionStatus.InputNeeded while the queue is non-empty and clears it
    (falling back to InProgress) once it empties, preserving orthogonal flags.
  • ToolCallConfirmationState union (ToolCallPendingConfirmationState | ToolCallPendingResultConfirmationState) for the tool call carried by
    SessionToolConfirmationRequest.
  • Optional nonce field on ContentRef.
  • Optional intention field on chat/toolCallStart and every ToolCallState
    variant, providing a human-readable description of what the invocation intends
    to do.
  • Optional model and tools fields on AgentCustomization, giving a custom
    agent's pinned model and tool allowlist a first-class home instead of _meta.
  • Optional capabilities field on AgentInfo (AgentCapabilities with a
    nested multipleChats capability carrying fork) so clients gate multi-chat
    and fork via advertised capabilities instead of provider-id switches.
  • Cursor-based pagination for listSessions, via new shared PaginatedParams
    (limit + cursor) and PaginatedResult (nextCursor) types:
    ListSessionsParams now extends PaginatedParams and ListSessionsResult
    extends PaginatedResult, 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/turnsLoaded action so clients can subscribe to a bounded tail of chat
    history and page older turns into the reduced chat state on demand.

Changed

  • fetchTurns now accepts cursor from ChatState.turnsNextCursor and 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 the fetchTurns
    contract is not wire-compatible with 0.5.0.

Removed

  • filter field from ListSessionsParams. It was an untyped object
    placeholder with no defined semantics; it will be reintroduced with a concrete
    shape once session filtering/sorting is specified.

Go module v0.5.1

Choose a tag to compare

@github-actions github-actions released this 02 Jul 20:07
1c9acf6

[0.5.1] — 2026-07-02

Implements AHP 0.5.1.

Added

  • Optional Nonce field on ContentRef.
  • SubscribeParams.Delivery.MaxLatencyMs and Client.SubscribeWithDelivery
    for clients to request a maximum subscription delivery latency, including
    0 for no intentional coalescing.
  • Optional capabilities field on AgentInfo (AgentCapabilities with a
    nested multipleChats capability carrying fork) so clients gate multi-chat
    and fork via advertised capabilities instead of provider-id switches.
  • Cursor-based pagination for listSessions, via new shared PaginatedParams
    (Limit + Cursor) and PaginatedResult (NextCursor) types:
    ListSessionsParams and ListSessionsResult now 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/turnsLoaded action 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 (SessionInputRequest union with
    SessionChatInputRequest, SessionToolConfirmationRequest, and
    SessionToolClientExecutionRequest), plus the SessionInputNeededSetAction
    (wire session/inputNeededSet) and SessionInputNeededRemovedAction (wire
    session/inputNeededRemoved) actions and the ToolCallConfirmationState
    union. The session reducer maintains the SessionStatusInputNeeded activity
    bit from the queue, clearing it (falling back to SessionStatusInProgress)
    when the last entry is removed.
  • Optional Intention field on ChatToolCallStartAction and every tool-call
    lifecycle state.
  • Optional Model and Tools fields on AgentCustomization for a custom
    agent's pinned model and tool allowlist.

Changed

  • fetchTurns now accepts Cursor from ChatState.TurnsNextCursor and 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 the fetchTurns
    contract is not wire-compatible with 0.5.0.

Removed

  • Filter field from ListSessionsParams. It was an untyped placeholder with
    no defined semantics; it will return with a concrete shape once session
    filtering/sorting is specified.

Fixed

  • SnapshotState.UnmarshalJSON now decodes the Chat variant. Variant
    disambiguation previously probed for the removed summary field (a leftover
    from before SessionState was flattened), so chat and session snapshots both
    fell through to the Root catch-all. Sessions are now matched on lifecycle
    and chats on turns.

AHP Swift Package v0.5.0

Choose a tag to compare

@github-actions github-actions released this 26 Jun 23:23
e793e92

[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.
  • ProgressParams struct (wire root/progress) — a generic progress notification
    correlated by a progressToken (added on CreateSessionParams).
    Used today for the lazy first-use download of an agent's native SDK.
  • SessionModelInfo.maxOutputTokens and SessionModelInfo.maxPromptTokens
    optional fields for communicating model token limits.
  • SessionSummary.meta (_meta on the wire) optional provider metadata field
    for lightweight session-list presentation hints.
  • SessionActiveClientRemovedAction (StateAction.sessionActiveClientRemoved,
    wire session/activeClientRemoved) to release a single active client by
    clientId.
  • ChatDraftChangedAction (StateAction.chatDraftChanged, wire
    chat/draftChanged) and ChatState.draft (Message?) to set or clear the
    user's in-progress draft input for a chat. The chat reducer applies it
    without stamping modifiedAt.
  • Message.model and Message.agent optional fields carrying the selection a
    message was composed with.

Changed

  • SessionState.activeClients ([SessionActiveClient], required) replaces the
    single optional SessionState.activeClient; the session reducer upserts and
    removes entries keyed by clientId.
  • StateAction.sessionActiveClientChanged is renamed to
    StateAction.sessionActiveClientSet (wire session/activeClientSet) with
    upsert-by-clientId semantics; it no longer unsets the active client
    (dispatch session/activeClientRemoved instead).
  • ConfigPropertySchema.enum field is now [AnyCodable]? instead of
    [String]?, allowing numeric, boolean, and null enum values.
  • ModelSelection.config values are now AnyCodable instead of String,
    allowing numeric, boolean, and null configuration values.
  • SessionState now inlines the session metadata fields (provider, title,
    status, activity, project, workingDirectory, annotations) directly
    instead of embedding a summary: SessionSummary. The session reducer mutates
    these fields directly and no longer stamps a modifiedAt. SessionSummary
    remains a root-only catalog struct whose createdAt/modifiedAt are now
    ISO-8601 Strings and which no longer carries model/agent.
  • ChatState and ChatSummary no longer carry model/agent.

Removed

  • SessionActiveClientToolsChangedAction. An active client now updates its
    published tools by re-dispatching StateAction.sessionActiveClientSet with its
    full, updated entry.
  • SessionModelChangedAction (StateAction.sessionModelChanged,
    session/modelChanged) and SessionAgentChangedAction
    (StateAction.sessionAgentChanged, session/agentChanged), along with their
    session-reducer handling.

AHP Spec v0.5.0

Choose a tag to compare

@github-actions github-actions released this 26 Jun 23:22
e793e92

[0.5.0] — 2026-06-26

Spec version: 0.5.0

Added

  • chat/activityChanged action for updating a chat's current activity
    description independently of the session summary.
  • root/progress (ProgressParams) generic host→client progress notification,
    correlated by a progressToken the client supplies on the originating
    request (today createSession.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 monotonic progress and optional total; complete
    when progress === total.
  • createSession.progressToken optional opt-in token for receiving root/progress
    notifications about a session's bring-up.
  • SessionModelInfo.maxOutputTokens and SessionModelInfo.maxPromptTokens
    optional fields for communicating model token limits.
  • SessionSummary._meta optional provider metadata field for lightweight
    session-list presentation hints.
  • JsonPrimitive type alias (string | number | boolean | null) in types/common/state.ts.
  • session/activeClientRemoved action to release a single active client from a
    session by clientId.

Changed

  • ConfigPropertySchema.enum now accepts JsonPrimitive[] instead of string[], allowing numeric, boolean, and null enum values.
  • ModelSelection.config values are now JsonPrimitive (string | number | boolean | null) instead of string, allowing numeric, boolean, and null configuration values.
  • SessionState.activeClients (a required array, keyed by clientId) replaces
    the single optional SessionState.activeClient. A session may now have
    multiple concurrent active clients.
  • session/activeClientChanged is renamed to session/activeClientSet with
    upsert-by-clientId semantics. It no longer accepts null to unset the
    active client — dispatch session/activeClientRemoved instead.

Removed

  • session/activeClientToolsChanged. An active client now updates its published
    tools by re-dispatching session/activeClientSet with its full, updated entry.

Fixed

  • Corrected the ACTION_INTRODUCED_IN entries for annotations/set,
    annotations/removed, annotations/entrySet, and annotations/entryRemoved
    from 0.3.0 to 0.4.0. The annotations channel first shipped in the
    0.4.0 spec release (it is absent from spec/v0.3.0), so version
    negotiation must not advertise it to peers speaking 0.3.0.

Go module v0.5.0

Choose a tag to compare

@github-actions github-actions released this 26 Jun 23:23
e793e92

[0.5.0] — 2026-06-26

Implements AHP 0.5.0.

Added

  • ChatDraftChangedAction (wire chat/draftChanged) and ChatState.Draft
    (*Message) for syncing a chat's in-progress input draft; ApplyActionToChat
    sets or clears state.Draft without stamping ModifiedAt.
  • Message.Model and Message.Agent optional fields recording the model /
    agent selection a message was composed with.
  • ChatActivityChangedAction (wire chat/activityChanged) for updating a chat's
    current activity description independently of the session summary.
  • ProgressParams struct (wire root/progress) — a generic progress notification
    correlated by a ProgressToken (added on CreateSessionParams).
    Used today for the lazy first-use download of an agent's native SDK.
  • SessionModelInfo.MaxOutputTokens and SessionModelInfo.MaxPromptTokens
    optional fields for communicating model token limits.
  • SessionSummary.Meta (wire _meta) optional provider metadata field for
    lightweight session-list presentation hints.
  • SessionActiveClientRemovedAction (wire session/activeClientRemoved) to
    release a single active client by ClientId.

Changed

  • SessionState no longer embeds a Summary sub-struct; its metadata fields
    (Provider, Title, Status, Activity, Project, WorkingDirectory,
    Annotations) are now inlined directly on SessionState, which no longer
    carries Model, Agent, CreatedAt, or ModifiedAt. ApplyActionToSession
    reads and writes these flat fields and no longer stamps a session
    ModifiedAt.
  • SessionSummary is now a root-only catalog struct; its CreatedAt /
    ModifiedAt are ISO-8601 strings (previously numeric) and it no longer
    carries Model / Agent.
  • ChatState and ChatSummary no longer carry Model / Agent.
  • SessionState.ActiveClients ([]SessionActiveClient, required) replaces the
    single pointer SessionState.ActiveClient; ApplyActionToSession upserts and
    removes entries keyed by ClientId.
  • SessionActiveClientChangedAction is renamed to SessionActiveClientSetAction
    (wire session/activeClientSet) with upsert-by-ClientId semantics; it no
    longer unsets the active client (dispatch session/activeClientRemoved
    instead).
  • ConfigPropertySchema.Enum field is now []json.RawMessage instead of []string,
    allowing numeric, boolean, and null enum values.
  • ModelSelection.Config values are now json.RawMessage instead of string,
    allowing numeric, boolean, and null configuration values.

Removed

  • SessionModelChangedAction (wire session/modelChanged) and
    SessionAgentChangedAction (wire session/agentChanged); session model /
    agent are no longer part of the protocol surface.
  • SessionActiveClientToolsChangedAction. An active client now updates its
    published tools by re-dispatching SessionActiveClientSetAction with its
    full, updated entry.

AHP Swift Package v0.4.0

Choose a tag to compare

@github-actions github-actions released this 19 Jun 18:27
89037b2

[0.4.0] — 2026-06-19

Implements AHP 0.4.0.

Added

  • MessageOrigin struct and MessageKind enum now type Message.origin
    (previously an untyped AnyCodable); 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.
  • 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.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 ChatOrigin.tool record (matching toolCallId), which remains the
    canonical representation of the spawn relationship.
  • BREAKING: SessionStatus is now an OptionSet with a UInt32 rawValue
    (was Int), an unsigned 32-bit bitset that preserves combined and unknown
    forward-compat bits. Combine flags with set-union ( / union) and test
    membership with contains(_:).
  • 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.resourceWatch case and matching
    MultiHostStateMirror.resourceWatches slot, so applySnapshot(host:snapshot:)
    can seed an ahp-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.encode no longer corrupts NSNumber-backed Int/Double values to Bool/Int. NSNumber is now special-cased before the generic Swift type arms, using CFBooleanGetTypeID() to distinguish boolean from numeric NSNumber instances.
  • AnyCodable.encode(to:) now preserves unsigned integers above Int64.max (encoding NSNumber values whose objCType is unsigned via uint64Value instead of the signed int64Value fallback), and the AnyCodable.swift template in scripts/generate-swift.ts reproduces the full encode/equality logic so regenerating the scaffold no longer reintroduces the bug.
  • MultiHostClient/host runtime now advertises the generated SUPPORTED_PROTOCOL_VERSIONS on initialize instead of a stale hard-coded "0.2.0".
  • Session reducers now apply _meta (meta) updates from every
    tool-call-scoped action, not only session/toolCallStart.

Added

  • annotationsReducer implemented; annotations conformance fixtures (210–219) now pass.

  • 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.

  • SessionChatAddedAction, SessionChatRemovedAction, and SessionChatUpdatedAction handling for incremental chat catalog updates.

  • ChatSummary.workingDirectory — optional per-chat working directory. Falls back to the session's workingDirectory when absent.

  • SessionDefaultChatChangedAction (session/defaultChatChanged) — updates SessionState.defaultChat to 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 existing meta field on UsageInfo and other protocol types. Clients MAY inspect well-known keys here for richer, localised error UI.

  • RootState now exposes an optional _meta property bag (meta: [String: AnyCodable]?) for implementation-defined agent-host metadata, such as a
    well-known hostBuild key carrying the host's build version/commit/date.

  • changesetReducer and resourceWatchReducer — 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
    folds changeset/* actions into ChangesetState; resourceWatchReducer
    treats resourceWatch/changed as 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

  • ChatState is now flat — the previous embedded summary has been replaced with inlined resource / title / status / activity / modifiedAt / model / agent / origin / workingDirectory properties. ChatSummary remains as the standalone catalog entry on SessionState.chats.
  • ChatSummary.modifiedAt and ChatState.modifiedAt are now ISO 8601 String values instead of Int64/UInt64 milliseconds.

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 StateAction variant no longer re-encodes to
    {} (dropping its type discriminant 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 / …RangeTarget now encode their kind
    discriminant (previously a computed property excluded from CodingKeys, so it
    was dropped on encode).

AHP Spec v0.4.0

Choose a tag to compare

@github-actions github-actions released this 19 Jun 18:25
89037b2

[0.4.0] — 2026-06-19

Spec version: 0.4.0

Added

  • MessageOriginMessage.origin is now a named type (was an inline
    { kind } object), and its MessageKind gains Agent and Tool kinds 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 as User or SystemNotification.
  • ConfigPropertySchema.additionalProperties — optional JSON Schema field
    (ConfigPropertySchema) describing the schema for object-typed config
    properties beyond those listed in properties.
  • 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.
  • _meta slot 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 via annotations/set. Omitted fields are left unchanged;
    the annotation's entries, id, and _meta are never touched.
  • 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. When absent, chats inherit the session's workingDirectory. Enables agent-swarm patterns where multiple chats in one session operate on independent worktrees.
  • ChatInteractivity enum ("full" / "read-only" / "hidden") plus the optional ChatSummary.interactivity / ChatState.interactivity field 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 by summary.resource), session/chatRemoved, and session/chatUpdated (partial-update with Partial<ChatSummary>) — mirroring the root-channel root/sessionAdded / root/sessionRemoved / root/sessionSummaryChanged pattern.
  • session/defaultChatChanged action — updates SessionState.defaultChat to 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 _meta convention on UsageInfo and other protocol types. Clients MAY inspect well-known keys here for richer, localised error UI.
  • RootState now carries an optional _meta property bag for
    implementation-defined metadata about the agent host itself, mirroring the
    MCP _meta convention. A well-known hostBuild key may carry build
    information (version, commit, date) about the program hosting the agent host.

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 ChatOrigin record (kind: 'tool', matching toolCallId), which
    remains the canonical representation of the spawn relationship.
  • Snapshot.state now accepts ResourceWatchState, so initialize /
    reconnect / subscribe can seed an ahp-resource-watch: channel from a
    point-in-time snapshot. Existing variants (root, session, terminal,
    changeset, annotations) are unchanged.
  • fetchTurns and completions now target an ahp-chat: channel; PROTOCOL_VERSION bumped to 0.4.0.
  • ChatState is now flat — the previous summary: ChatSummary sub-object has been replaced by 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 strings instead of numeric milliseconds.
  • SessionSummary now documents how its aggregate fields (status, activity, modifiedAt) are derived from the session's chats, including InputNeeded / Error promotion when any chat raises the flag.

Fixed

  • Session reducers now apply _meta updates from every tool-call-scoped
    action, not only session/toolCallStart.

Removed

  • SessionState.turns, SessionState.activeTurn, SessionState.steeringMessage, SessionState.queuedMessages, SessionState.inputRequests (moved to ChatState).
  • session/chatsChanged full-replacement action (replaced by session/chatAdded / session/chatRemoved / session/chatUpdated).

Go module v0.4.0

Choose a tag to compare

@github-actions github-actions released this 19 Jun 18:27
89037b2

[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).

AHP Swift Package v0.3.0

Choose a tag to compare

@github-actions github-actions released this 06 Jun 14:59
b639a27

[0.3.0] — 2026-06-05

Implements AHP 0.3.0.

Added

  • McpServerCustomization now exposes the full MCP lifecycle: enabled,
    the discriminated McpServerState enum
    (.starting/.ready/.authRequired/.error/.stopped), optional
    channel URI for the mcp:// side-channel, and optional mcpApp
    block carrying AhpMcpUiHostCapabilities for MCP Apps.
  • McpServerAuthRequiredState carries ProtectedResourceMetadata
    plus reason / requiredScopes / description so the existing
    authenticate command can drive per-server auth.
  • Customization.mcpServer top-level case — hosts MAY surface bare
    MCP servers directly rather than only inside a plugin or directory.
  • SessionMcpServerStateChangedAction and matching reducer arm —
    narrow upsert of state + channel on an existing MCP
    server customization by id. Wired through both Reducers.swift and
    the protocol-based NativeReducer.swift.
  • ClientCapabilities struct on InitializeParams.capabilities with
    first entry mcpApps.
  • changeKind field on Changeset (well-known values: 'session',
    'branch', 'uncommitted', 'turn', 'compare-turns').
  • status and error fields on ChangesetOperation and the
    changeset/operationStatusChanged action, tracking the
    idle → running → error lifecycle of a changeset operation.
  • AgentCustomization._meta provider metadata field.
  • Optional changes field on SessionSummary (ChangesSummary with optional additions, deletions, and files counts) summarising a session's file-change footprint.

Changed

  • Renamed the ChangesetSummary type to Changeset. The on-the-wire shape is unchanged.
  • Moved the changesets catalogue from SessionSummary to SessionState. The session/changesetsChanged action now updates state.changesets directly instead of state.summary.changesets.

Removed

  • Removed the additions, deletions, and files fields from ChangesetSummary. Aggregate counts now live on SessionSummary.changes; per-changeset views derive their own totals from ChangesetState.files.

Changed

  • ToolCallBase.toolClientId: String? replaced by
    ToolCallBase.contributor: ToolCallContributor? (enum with
    .client(ToolCallClientContributor) and .mcp(ToolCallMcpContributor)
    cases). SessionToolCallStartAction carries the new contributor
    field as well. Reducers.swift, NativeReducer.swift, and
    ToolCallStateExtensions.swift follow the rename.