@getvda/witness
v0.1.0
Published
Witness sealing substrate for ACP. Real HTTP client (customer-managed custody: prepare→sign→submit) + a no-network fake for tests/demo. Seals hitl_decision / agent_action to witness.getvda.ai.
Readme
@getvda/witness
Status: pre-1.0 (0.x). Public API may change between minor versions — pin an exact version if you need stability. Part of the getvda.ai governance suite. Honesty discipline: nothing documented here is live unless it says so, boundaries (fail-static, condition-assertion) are stated where they apply, and a stub is labelled a stub.
What this carries — and what it does not. This package verifies and enforces governance. The trust anchors are not in it: bundle-signing keys (
#key-3) live only in getvda's Secret Manager, and Witness account credentials are the caller's own (customer-managed custody). It verifies a signature against the public key resolved fromdid:web:acp.getvda.aiand seals to a Witness account you supply — it cannot mint a bundle that verifies, and carries no standing credential. Open code, trust anchors elsewhere.
Witness sealing substrate for ACP — where governance EVENTS become tamper-evident (the document↔event tie: git proves authoring, Witness proves the approval).
Real client + a no-network fake (same pattern as the in-memory git adapter)
WitnessHttpClient— the real client, customer-managed custody:prepare→ signcanonicalByteswith ACP's Ed25519 record key (#key-2) → submit{ record }with aproof. Because ACP signs the record itself, it is provable even against Witness. Verified against the live OpenAPI (2026-07-18). Needs ACP's ANCHORED, controller-bound Witness account — not yet provisioned; the client is written to the real contract so the swap is a constructor change.FakeWitnessClient— no network, deterministic, and faithful: it signs each record with a real Ed25519 key, soverify()genuinely re-checks the signature and the approval gate exercises the real verification path. ReportsANCHOREDby default (mirroring the account ACP will have). Labelledsigner: "fake"; never for production.
What it seals
sealHitlDecision(params) — the hitl_decision shape from the live contract:
actor{id,type:'human'} + decision{statement,disposition} +
governing_clauses[] (≥1) + evidence[] (the git commit rides here:
ref = commit, hash = sha256: of the governance content) + basis_captured_at.
Also whoami() (Contract A) and verify(record) (public signature/chain check).
Keys
Ed25519RecordSigner takes a PEM or JWK private key (Mike holds it; it arrives
from Secret Manager at runtime). Its public half is published in ACP's DID doc —
what Witness issuer_verified resolves against. See the Phase-0 provisioning
brief for the three-key model.
