[CAP] Charter Agreement Protocol

Agreements as evidence
including when the parties are agents.

CAP is a portable, non-authorizing format and verification protocol for bilateral commercial agreements: signed, byte-exact artifacts that prove what two parties agreed, which revision governed a given instant, and which agreement state governed a signed action — without a central authority, and without ever making the decision for you. CAP verifies. It never authorizes.

Party Adescriptor + acceptance
charter
Party Bcountersigns
receipt
Anyonere-verifies from bytes

The five artifacts

Each one is bytes you can hand to anyone; each one proves exactly what it says and nothing else.

ArtifactFormProves
Party Descriptorsigned JWS (cap+party)a party’s declared key history — Ed25519, and ML-DSA from revision 3 — with predecessor-bound transitions and fork evidence
Charter Revisioncanonical JSONagreed terms: parties, roles, legal-text digest, precedence, window, termination reasons, exact deployment bindings
Acceptancesigned JWS (cap+acceptance)bilateral signed assent to exact revision bytes
Termination Noticesigned JWS (cap+termination)signed closure of the charter at a pure UTC instant
Receiptsigned JWS (cap+receipt)a signed action bound to exact revision coordinates, deployment digest, and grant evidence

What it proves — and refuses to

The refusal list is the product. A verification tool that quietly makes your business decisions for you is not a verification tool.

Use CAP when

  • two independent parties need portable, re-verifiable agreement evidence exchanged as bytes
  • agent commerce charters — machines forming and acting under bilateral terms
  • bilateral supplier terms with proof of which revision governed an action
  • key-history continuity proofs (including post-quantum rotations)
  • action receipts for audit that anyone can re-verify offline

Do not use CAP for

  • authorization decisions — CAP never authorizes
  • live revocation checks
  • term evaluation — term_satisfaction stays in the omission floor
  • legal adjudication
  • single-party self-attestation

Why the evidence holds

Byte-exact by construction.

Two systems, two “version 2”s — and a dispute nobody can settle from the bytes.

Strict unpadded base64url, deterministic tagged decoding, RFC 8785 canonicalization, domain-separated SHA-256 — acceptances bind exact bytes.

Contested views stay contested.

Most tooling silently tie-breaks an equivocation and calls it a verdict.

Same-signer equivocation is retained as signed evidence with no winner; the only repair is a countersigned supersession revision.

Two implementations, zero shared code.

One implementation verifying itself proves nothing about the spec.

A certified 100-case corpus runs through the pure Elixir verifier and a builtins-only TypeScript one — byte-identical canonical reports or the build fails.

The family lifecycle

Three protocols, one chain of evidence: what the agent is, what was agreed, what this call may do.

The family

One protocol, four repositories, two ecosystems — same bytes everywhere, live demos on the TypeScript sites.

The protocol · this repository

The Elixir reference implementation and verifier, the certified corpus, the spec and guides — including the security model’s full proves/never-proves table.

The signer · TypeScript

The npm companion that produces the signed artifacts through a caller-owned key handle — the private key never enters the library.

The verifier · TypeScript

The npm verify side: byte-exact artifact decode, chain facts, the algorithm registry — zero runtime dependencies, corpus-certified.

The Elixir signer · charter_agreement_signer

The Elixir holder-side companion — the reference this TypeScript signer ports; {module, term()} custody, one dependency: this protocol package.