@airprompter/protocol-conformance
v0.1.0
Published
The AirPrompter agent protocol's conformance harness: every vector in protocol/vectors, run against any SDK through a JSON adapter (an ES module, or any process speaking JSON lines). The reference implementations and the schema/example runner ride along.
Readme
Conformance
Two runners. run.mjs is the protocol's own gate (below). harness.mjs
(S14) is the gate an SDK ships: every vector, run against any SDK
through a JSON adapter — an ES module or a process speaking JSON lines —
published as @airprompter/protocol-conformance with the vectors bundled:
npx airprompter-conformance --adapter ./adapter.mjs
npx airprompter-conformance --adapter-command "python3 adapter.py"The adapter contract is ADAPTER.md; adapters/reference.mjs
is the yardstick, adapters/agent-sdk.mjs the TypeScript packages,
../examples/conformance-adapter/python/adapter.py the Python SDK. A section
the adapter cannot answer is skipped and reported, never passed.
node --test test/harness.test.mjs is the harness's own suite (wrong answers fail by name,
the pipe transport, npm pack self-containment).
npm ci && npm test here runs, against ../protocol:
- every
schemas/*.schema.jsoncompiles as JSON Schema 2020-12 (strict); - every
examples/*.jsonvalidates against its schema and everyexamples/refused/*.jsonis refused; - the rules a schema cannot express hold on every example manifest and
bundle — the release digest reproduces from the slots, each arm's digest
reproduces from slots + overrides, countersignatures cover every arm on
a countersign target, a bundle carries every referenced payload and the
bytes hash to their
contentHash; - the reference implementations in
reference.mjspass every vector invectors/.
npm run lint:openapi lints openapi.yaml.
node live.mjs --base-url <url> --root <root.pub.json> --api-key <key>
(S12) exercises a running registry over HTTP with the same schemas and
the same trust chain: the root, the edge pointer, the manifest (401 without
a key, 403/404 for another agent, 304 on its ETag, verified against the
root the caller pins), every referenced payload fetched and hashed, the
catalogue, the heartbeat (a schema-valid answer, a lease in the future, a
400 for a field the schema does not name). airprompter dev is the target
CI runs it against; Hangar and the hosted service are the same target with
their own URL, root and key.
The reference implementations are the smallest correct versions of the protocol's pure functions (canonical JSON, sticky assignment, step ordering). SDKs may copy them; they must pass the same vectors either way. Manifest signature verification with real keys joins this runner with the trust-chain ticket, and each SDK's spool writer and feedback validator are exercised here once they exist. The compatibility table in the root README is generated from this run.
