Runtime conformance
The executable vectors a runtime must pass, the checklist behind them, what the suite does not cover yet, and how to run it against your driver.
A runtime conforms when it passes the vectors and meets the checklist, and both are executable. Point the vectors at your own driver, work through the checklist for what they do not test yet, then report the result.
Vectors#
The protocol's vectors ship in the SDK and use transit and ledger as
fixtures:
cd hcp/packages/sdk && bun test src/conformance.test.ts| Vector | Passes when |
|---|---|
| Lint | transit, ledger, and the composite echo lint clean |
| Read | transit find runs through the sandboxed runtime and returns the stop it resolved |
| Confirm | transfer without confirm → { ok: false, error: "confirm required" }; with confirm: true → ok: true |
| Grant deny | With no grants, a read → ok: false, error contains denied |
The suite does not yet compare the twin faces, run a bin that is not
allow-listed, or lint a wrap with neither named commands nor pass_through.
The checklist still requires all three; the
twin-face check and the
sandbox deny show how to test them.
Running them against your driver#
Pointing Hcp at your driver runs the same tests:
import { Hcp, loadPackFromDir } from '@harnesscontextprotocol/sdk'
const packs = await Promise.all([loadPackFromDir(transitDir), loadPackFromDir(ledgerDir)])
const hcp = await Hcp.create({ runtime: createAcmeRuntime({ packs, … }), grants })
await hcp.activate(['transit', 'ledger'])
expect((await hcp.exec('ledger', 'transfer', { amount: '2.80', payee: 'demo-transit' })).error).toBe('confirm required')Runtime checklist#
Loading#
- Loads
surface.json,policy.json,HARNESS.mdfrom a directory - Rejects a pack with any lint issue at install
- Checks
id=surface_id=pack_id - Rejects an unsupported
hcpprotocol affinity and reports it
Authorisation#
- Exactly one Principal per exec, from the session
- Five capability axes; none collapsed in multi-tenant deployments
-
brainland requires project scope - Tenant never taken from envelope args
- Denials carry a reason string
- No default-allow path
Gates and Binding#
-
confirm: trueenforced before any adapter;confirm/applyin args satisfies it -
confirm: "always"gated at least likeconfirm: true(draft RFC 0006) - Mint fail-closed; no env-token fallback
-
mockonly when explicit in the envelope -
mothershipBinding unreachable from a non-operator Principal without an elevation grant -
connectrequirespack.connect, notverb.exec.write
Execution#
- Wrap argv rendered from
cli[]/argv_template; no shell interpolation - The JSON flag appended (
--jsonunlessjson_flagsays otherwise); result parsed when possible - Non-zero exit →
ok: falsewith stderr orexit N - Sandbox default; unknown bin denied; cwd fixed
-
native-localrequires explicit opt-in
Reporting#
- Availability per pack:
installed,activated,connected - Availability per command:
executablewithreasonwhen false - Skill exposed on activate (copied to
skills/<id>/SKILL.mdor equivalent)
Sense (if implemented)#
- Activation independent of Execute
-
sense.enablechecked before any sink write; off → drop - Undeclared refs dropped and reported
- Sink records inert and attributable
- Wake path goes through Execute grants
-
binding.degradedproduced by the hub
Audit#
- Writes attributed with
Principal + tenant (+ project) + Binding + pack_id + verb_key + operation
Reporting conformance#
State the protocol version (HCP/1.1), the vector suite commit, and which
optional parts you implement (Sense, MCP export, the openapi adapter), then
follow Implementations to be listed.
Related#
- Specification: Conformance: the normative checklist for packs, runtimes, and hosts