Skip to content

Protocol coverage

This content is for the 0.1 version. Switch to the latest version for up-to-date documentation.

Protocol 0.7.0, with 0.6.0, 0.5.2, and 0.5.1 offered during negotiation so an older host can still find something it understands.

print(protocolVersion); // 0.7.0
print(supportedProtocolVersions); // [0.7.0, 0.6.0, 0.5.2, 0.5.1]

All seven, each with its reducer:

Channel State Reducer
ahp-root:// RootState rootReducer
ahp-session:/<uuid> SessionState sessionReducer
ahp-chat:/<cid> ChatState chatReducer
ahp-terminal:/<id> TerminalState terminalReducer
ahp-changeset:/<id> ChangesetState changesetReducer
ahp-session:/<uuid>/annotations AnnotationsState annotationsReducer
ahp-resource-watch:/<id> ResourceWatchState resourceWatchReducer

Annotations are a path suffix on the session scheme, not a scheme of their own. Routing on scheme alone sends annotation envelopes to sessionReducer, which is a bug this client had and fixed — dispatch has to consider scheme and path.

All 38 the protocol declares, as constants:

AhpMethods.initialize; // 'initialize'
AhpMethods.subscribe; // 'subscribe'
AhpMethods.all; // every name, for routing tables

All 85 StateAction variants, each a sealed subclass with its payload. An unrecognized type decodes to StateActionUnknown and round-trips unchanged.

Gate What it proves
246 reducer fixtures State transitions match every other client’s
39 round-trip fixtures Wire encoding matches byte-for-byte
Generate-and-diff in CI Committed types match the schema exactly
checkExhaustiveness No schema type silently reaches no output
The CLI, against a live host The stack agrees with a real implementation

The fixture corpora are upstream’s own — the same files the Rust, Go, Swift, and Kotlin clients assert against. Passing them is a claim about cross-language agreement, not about self-consistency.

The last row is the one a fixture corpus cannot give you. Fixtures cannot catch a field the schema describes differently from what hosts actually send; a live host can. See The CLI.

Hosting. This is a client. It does not implement the host side of the protocol, and there is no plan for it to.

ahp-otlp:. The telemetry channel is stateless — no reducer, no store — so there is nothing for a state mirror to do with it.

Direct publishing of protocol-version negotiation overrides. The version list is generated from protocol.json; you offer what the package supports.

The protocol is a draft, and upstream expects breaking changes to wire types, actions, and state shapes. Parity is not established once.

The package moves on its own SemVer track, independent of the protocol version it implements — the same rule every other AHP client follows. A 0.1.0 against protocol 0.7.0 is not a package targeting something old.

A sync that changes a public type name or a reducer’s behaviour is a minor bump, not a patch.