clients/go/v0.5.1

microsoft/agent-host-protocolclients/go/v0.5.1Jul 2, 2026by github-actions[bot]

Upgrading?

Release notes summary

Go client implementation of AHP 0.5.1, adding session-level input tracking and pagination support to the client library.

Key Highlights

  • Session-level `InputNeeded` tracking and `SessionInputNeededSetAction`.
  • Cursor-based pagination for session listing.
  • Subscription latency control via `SubscribeParams.Delivery.MaxLatencyMs`.

Breaking Changes

  • `Filter` field removed from `ListSessionsParams`.
  • `fetchTurns` contract incompatible with 0.5.0.

New Features

  • Optional `Nonce` field on `ContentRef`.
  • Optional `Intention` field on tool calls.
  • Optional `Model` and `Tools` on `AgentCustomization`.

Full Release Notes

## [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`.

Related Repositories