The spec
atrib-spec.md, the normative text for every rule these pages summarize.
Version 0.1, April 2026
Editor: Nader Helmy
This specification defines the atrib protocol for verifiable agent actions. When an AI agent calls a tool, atrib creates a signed record at the moment of action, chains it forward into the next call, and commits it to an append-only Merkle log. Any party can independently verify what an agent did, in what order, with what signed structure and declared relationships. When tool calls converge on a transaction, a deterministic algorithm computes a value distribution from the resulting graph under an agreed policy, producing a settlement document anyone can recompute. The spec covers the record format (§1) including key rotation (§1.9) and URI-typed event vocabulary (§1.2.4, §1.4.5), the log protocol (§2), the graph model (§3), policies and the distribution algorithm (§4), the SDK middleware contracts (§5), the public-key directory (§6), informative integration patterns for agent harnesses (§7), privacy postures (§8), and informative runtime integration patterns (§9).
Table of Contents
- §0 Foundations
- §1 Attribution Record Format (incl. §1.9 Key Rotation and Revocation)
- §2 Merkle Log Protocol
- §3 Graph Query Interface
- §4 Attribution Policy Format (policy layer relocated to the payments profile; position statement and stable anchors remain)
- §5 SDK Specification
- §6 Key Directory
- §7 Harness Integration Patterns (informative)
- Appendix A: Test Vectors
§0 Foundations
This section is informative.
Contents
- The Problem We Inherit
- The Shift We Are Living Through
- What We Are Building
- Principle I: Provenance travels with the artifact
- Principle II: Accountability without content exposure
- Principle III: Settlement is separate from attribution
- Principle IV: No central arbiter of value
- Principle V: The protocol is open. Deployments are independent.
- What the Substrate Enables
On the relationship between transparency, trust, and value in a world where agents act on our behalf.
The internet has always promised portability of value. It has never delivered it. atrib is an attempt to finally make that promise real, not by controlling how value moves, but by making visible how it flows.
The Problem We Inherit
The web was built to move information. It was never built to account for the value that information creates. When a piece of content influences a decision, when a tool enables an outcome, when an idea travels through a network and eventually causes something to happen, the web has no native way to record that journey. No memory. No receipt. No mechanism for credit to follow contribution.
Into that vacuum, advertising stepped. Advertising is not fundamentally about showing people things. It is about solving a provenance problem: how does a business know what caused a customer to appear? In the absence of native provenance infrastructure, the only solution was to surrender that question to a centralized intermediary (Google, Facebook, whoever owned enough of the pipe to see both the influence and the outcome simultaneously). Those intermediaries became the most valuable companies in the world not by creating value, but by owning the layer that connects value creation to value capture.
The cost of that arrangement is visible everywhere. Content is optimized for engagement rather than truth because engagement is what the intermediary measures. Creators are compensated for attention rather than impact because attention is what the intermediary can see. Privacy is eroded because surveillance is how the intermediary maintains its position. The incentive gradient of the entire web bends toward whatever the intermediary finds legible, and the intermediary finds legible whatever it can monetize.
This is not a moral failure. It is a structural consequence of missing infrastructure.
The Shift We Are Living Through
The agent economy changes the terms of this problem. When AI agents do the majority of economically meaningful activity on the internet (discovering products, synthesizing information, making recommendations, completing transactions) the attention model of advertising has no surface to attach to. Agents do not have emotions. They cannot be manipulated by loss aversion or social proof. A banner ad means nothing to a language model.
But the underlying economic problem remains. Businesses still need customers. Creators of tools, content, and knowledge still contribute to outcomes. Value is still being created and captured. The question of what led to what (the provenance question) does not go away. It becomes more urgent, and more complex, because the chains of contribution are longer, more distributed, and entirely invisible to existing measurement infrastructure.
The agent economy is already generating real activity with zero verifiable record of it. Every tool call that completes without a signed record is invisible to anyone but the platform that ran it. Transactions that close on top of that activity inherit the same gap (value pools at the platform layer rather than distributing to the contributors who caused it), but the missing substrate is not only an economic problem. It is also a cognitive one. Agents that cannot verify their own past behave like amnesiacs every conversation, deferring to the platform's memory rather than reasoning from their own. The gap is in observability, accountability, and cognition simultaneously. Same shape as the old web. Higher stakes. Faster clock.
The window to build this substrate before platforms absorb the problem (and solve it, as Google solved it, in a way that reconstitutes their centrality) is measured in months, not years.
What We Are Building
atrib is the substrate that makes agent actions verifiable. Every action becomes signed context for the next, anchored in a Merkle log, independently verifiable by anyone. Not an identity layer. Not a payment layer. Not a content attribution system. The thing that sits underneath all of those: a substrate where agents reason from a past they can prove, and downstream consumers (merchants, auditors, other agents) verify that past without trusting any operator.
The central claim is this: it is possible to make the structural relationships of agent activity transparent (what tool calls preceded what outcomes, how contributions linked together within a session, what the observable shape of an agent's reasoning trail actually was) without making the content of those interactions visible to anyone who should not see it. Several distinct uses follow from this substrate: provable recall by the agent itself, independent audit by third parties, settlement when commerce closes a chain, and verifiable continuity across handoffs between agents.
This is observability without surveillance. The system becomes legible to itself (to its participants, to the parties with a legitimate stake in its outcomes) without becoming legible to surveillance. Accountability without inspection. Transparency without exposure.
This distinction matters because every prior attempt at provenance has collapsed it. C2PA proves a certificate exists but cannot say what it caused. ProRata tracks content usage but keeps advertising as the economic model. Blockchain provenance systems make everything visible to everyone, which is privacy-hostile by design. OpenTelemetry makes systems observable to their operators but invisible to participants.
atrib is built on a different principle: you can record what happened and who was present without claiming to know what caused what, and you can distribute credit fairly without trusting any single intermediary to arbitrate it. The structure of contributions is a verifiable fact. What those contributions are worth is a policy judgment. atrib provides the former without pretending to settle the latter.
What atrib certifies, what it does not
atrib binds a signing key to an account: its declared type, signer-declared time, committed content and signed references. The signer may be an agent, a host observing an agent, an authorizer or another source. Signature verification alone does not establish who acted, that the event occurred, or its real occurrence time. The ordering edges of §3 and declared informed_by/provenance_token links do not establish operational causality. §1.12 defines the additional evidence needed for source-bound conclusions.
atrib does NOT certify that the agent's reasoning is truthful, that prior records actually influenced subsequent decisions, or that tool responses were real absent tool-side attestation. A signature proves who committed to a claim, never that the claim is true. The first two limits are intrinsic to signed claims. The third narrows when another party signs its own evidence: the tool signs its response, a counterparty co-signs a transaction, an evaluator signs a diagnostic, or a witness attests the outcome. Those signatures corroborate the action, not the agent's reasoning. The substrate is content-preserving (commitments, not content) and disclosure-configurable (the privacy postures of §8 let the harness pick how much each record reveals).
This positioning keeps the claim honest. Brand promises that exceed what the substrate certifies create the same trust mismatch atrib was built to fix. §3 "What atrib chains, what it does not" gives the detailed structural-axis enumeration; §7.6 documents the outcome-verification patterns that close the tool-response gap when consumers need it.
Principle I: Provenance travels with the artifact
Every tool call, every content retrieval, every agent action carries a signed record of its origin and its structural position in the session: who called what, in what order, in what context. This record is embedded at creation time, not appended later, not inferred from logs. It is native to the interaction, not a post-hoc annotation. What those structural relationships mean for value distribution is a question for the policy layer, not for the record itself.
Principle II: Accountability without content exposure
What is published globally is not the content of interactions but cryptographic commitments to them. Anyone can verify that an attribution record existed and was unaltered. No one can read what it contained without the holder's consent. Privacy and accountability are not in tension here; they are structurally separated.
Principle III: Settlement is separate from attribution
atrib records what happened and who contributed. It does not move money, enforce agreements, or determine outcomes. Payment rails, legal agreements, and business decisions happen on top of verified attribution data. The protocol is neutral about what participants do with the truth; it only insists that the truth be available.
Principle IV: No central arbiter of value
The attribution chain is verifiable by any party with the relevant records. No single operator can alter it, suppress it, or adjudicate disputes about it. The Merkle log provides global verifiability without global visibility. Trust comes from mathematics and open specification, not from trusting atrib.
Principle V: The protocol is open. Deployments are independent.
The specification, signing libraries, calculation algorithm, and service software are open. Anyone can run a log, graph service, directory, archive, explorer, or reference client on their own infrastructure, or use an independently operated public deployment. No hosted analytics, SaaS application, or commercial operator is required by this protocol.
What the Substrate Enables
The five principles above describe a substrate. What the substrate enables is a set of distinct uses, each of which collapses without it. None of them is the central claim. atrib is not "for" any single one. The claim is that the substrate is a precondition for all of them, and that no other piece of infrastructure today provides it.
The five uses below are ordered by how directly each relies on the substrate's core property: an agent's actions are signed at the moment they happen and remain independently verifiable thereafter.
I. Provable cognition (recall)
An agent that can verify its own past has a kind of memory the agent ecosystem has not previously had. Every prior tool call is a signed claim the agent itself can re-verify locally; every chain is a structured artifact the agent can reason from; every transaction it participated in is anchored in a public log it cannot be gaslit about. This is the loop the locked positioning points at: agents that reason from a past they can prove.
The cognitive consequence is concrete. An agent restoring context from its own atrib records (rather than from platform-controlled memory) cannot be quietly amended. It cannot have actions silently retroactively added or removed. It cannot inherit a falsified history if its harness is replaced. The substrate is the only mechanism by which an agent's continuity of self survives platform changes, model changes, or harness changes, because the cryptography is independent of all of them.
This is the use case the protocol's recall pattern (§7) tests in practice: real agents (Claude Code, Cursor, custom harnesses) consuming the substrate they themselves produce. If the substrate works, the agent is more capable. If the substrate is broken, the agent is no worse off than today.
II. Independent audit and compliance
Once an agent's actions are signed and committed to a public log, third parties can audit them without trusting the agent or the platform. A user can prove what an agent did on their behalf. A regulator can query "what did this agent do at time T?" and get a cryptographic answer. A merchant disputing a transaction can verify the chain that led to it. None of this requires the agent operator to cooperate, share data, or even be online.
This is the property that compliance-coded products (audit trail, SOC 2 reporting, AI governance tooling) approximate without the underlying substrate. The substrate does it correctly: not by collecting more data centrally but by making the data anyone already had cryptographically verifiable.
III. Cross-agent provenance and handoffs
Agents that hand off work to other agents (a delegation flow, a multi-agent system, a marketplace of specialized agents) face the same provenance problem at higher complexity. A signed action by agent A passing context to agent B carries verifiable continuity across the handoff: B can prove A actually requested this, A can prove B actually completed it, and any later observer can reconstruct the path.
Without the substrate, multi-agent flows reduce to "trust whoever is closest to the platform." With it, the signed record graph becomes the shared evidence base.
IV. Verifiable investigations and repair
Support, incident, billing, and RCA workflows expose another use of the same substrate. An investigation is not a single answer; it is a sequence of ticket reads, tenant-scoped log queries, code-path checks, hypotheses, diagnostics, revisions, and handoffs. Each step needs to be inspected later without pretending the public log can carry the private ticket or log body.
atrib makes that trail verifiable without replacing observability systems. The log store keeps operational evidence. The support system keeps customer context. The local mirror or archive keeps record bodies under the chosen privacy posture. atrib proves how the agent moved through those systems, which prior evidence it claimed informed each step, and where the next harness should resume.
This is the support/RCA form of repair: a future agent can trace a bad hypothesis, read the signed diagnostic that corrected it, and continue from the latest chain tail instead of replaying the whole investigation from memory or platform chat history.
V. Settlement, attribution, and the post-advertising web
The substrate produces a useful side effect: when commerce closes a chain (an agent purchases something, a tool is invoked in service of a transaction), the same signed record set is what a settlement document is computed from. The payments profile §8 algorithm runs deterministically over the graph and produces a value distribution any merchant or auditor can recompute. This is the attribution-economy use case, and it is genuinely real, but it is one consequence of the substrate, not the reason for it.
The deeper claim about advertising follows from this. We do not claim that advertising will disappear. We claim that the structural necessity of advertising as the primary funding model for the internet rests on a single foundation: the absence of native provenance infrastructure. When that foundation erodes, the model built on it becomes optional rather than inevitable.
Businesses will always need to reach new customers. Discovery is a real problem that advertising partially solves. But the attribution function of advertising (proving that a specific message caused a specific outcome, in order to justify the spend) is entirely a workaround for missing infrastructure. When the infrastructure exists, the workaround becomes unnecessary.
The agent economy provides the discovery layer. Agents surface products, synthesize recommendations, complete transactions, all without requiring the user's attention to be purchased. The substrate underneath that discovery layer means every action is signed at the moment it happens, every chain is independently verifiable, and credit follows contribution without any intermediary needing to own the pipe. That is not advertising replacement through disruption. It is advertising replacement through making the problem advertising was solving obsolete.
The internet was built to move information freely. It failed to move value fairly. That failure was not inevitable; it was a consequence of building a network without provenance infrastructure, and then watching the vacuum fill with surveillance capitalism.
We are building at a moment when the architecture of the web is being renegotiated. Agents are replacing browsers as the primary interface. Protocols are being written that will determine how value flows for the next generation. The question of who owns the substrate in this new architecture will determine whether we reproduce the extractive dynamics of the old web or build something structurally different.
atrib is a bet that the answer does not have to be a company. It can be a protocol, open and verifiable, with a company that builds the best products on top of it.
A note on consumers of the substrate: atrib is the layer that signs, chains, logs, and verifies. The ergonomic interfaces an agent uses to consume it (what we'd call agent harnesses or runtimes) are downstream. A harness might surface the agent's atrib history at session start, expose a recall tool the agent can call, or persist signed records to a local mirror. These are all consumer-side concerns. atrib does not prescribe a harness. The substrate is independently useful to any harness that wants to give its agent the contextual awareness verifiable history makes possible.
§1 Attribution Record Format
The canonical data model, signing protocol, and propagation mechanism for atrib attribution records.
Contents
- 1.1 Normative Requirements Language
- 1.2 The Attribution Record
- 1.3 Canonical Serialization
- 1.4 Signing and Verification
- 1.5 Context Propagation
- 1.6 Unsigned Hops and Gap Nodes
- 1.7 Transaction Event Hooks (per-rail hooks moved to the payments profile)
- 1.8 Scope Boundaries
- 1.12 Source-bound evidence statements
- Interoperability Roadmap
1.1 Normative Requirements Language
The key words MUST, MUST NOT, REQUIRED, SHALL, SHALL NOT, SHOULD, SHOULD NOT, RECOMMENDED, MAY, and OPTIONAL in this document are to be interpreted as described in RFC 2119 and RFC 8174.
1.1.1 Conformance Targets
This specification defines requirements for the following conformance targets:
- MCP server middleware: satisfies all MUST requirements in §1.2-§1.5, §2.3, §2.6, and §5.3.
- Agent middleware: satisfies all MUST requirements in §1.5, §1.7, payments profile §7, and §5.4.
- Log operator: satisfies all MUST requirements in §2.
- Verification library: satisfies all MUST requirements in payments profile §8, payments profile §9, and §5.5.
A graph query service, when implemented, must satisfy all MUST requirements in §3. A witness, when implemented, must satisfy all MUST requirements in §2.9.
Evidence producers and evidence receivers conform to §1.12. Generic record verification or log admission alone does not establish evidence conformance.
All normative requirements in this section are prefixed with their requirement level. A conforming implementation satisfies all MUST requirements and is RECOMMENDED to satisfy all SHOULD requirements.
1.1.2 Roles: validator vs verifier
This specification uses two role terms with distinct meanings:
- Validator (log-side admission): the log operator's submission pipeline that decides whether to accept an incoming record into the log. Validators apply §2.6.1 checks (record format, signature, chain integrity, scope constraints like the genesis-record-only rule for
provenance_tokenper §1.2.6). A validator's output is binary: admit or reject. - Verifier (consumer-side audit): a downstream consumer that reads records and assesses trust. Verifiers apply payments profile §8 calculation, §6.7 capability checks, §2.11 cross-log threshold and equivocation detection, and the §8.7 trust assessment stack. A verifier's output is rich (validity flags, signals, annotations); the verifier never modifies records.
Spec text uses "validator" when describing log-admission behavior and "verifier" when describing consumer-side assessment. When both roles can perform the same check (e.g., signature verification), the spec specifies which role MUST perform it.
1.2 The Attribution Record
An attribution record is the atomic unit of atrib provenance. Each record documents a single event in an attribution chain (a tool call, a transaction) and cryptographically binds that event to its creator, its position in the chain, and the session that contains it. The chain is structural, not causal: it records what happened and how records relate to each other, not why one event caused another. Causal interpretation belongs to the query and policy layers built on top of these records.
An attribution record is a JSON object. Two shapes exist depending on event_type: the standard shape (used by tool_call, observation, and extension records) carries a single top-level signature; the transaction shape (used by transaction records) carries a signers array per §1.7.6 instead. Both shapes share the same field set otherwise.
Standard shape (tool_call, observation, extension):
{
"spec_version": "atrib/1.0",
"content_id": "sha256:", // who served this (see §1.2.2)
"creator_key": "",
"chain_root": "sha256:", // hash of parent record, or context_id for genesis (see §1.2.3)
"event_type": "https://atrib.dev/v1/types/tool_call", // absolute URI; see §1.2.4
"context_id": "", // 32 hex chars (see §1.5.1)
"timestamp": 1743850000000, // Unix milliseconds, integer
"timestamp_granularity": "ms", // OPTIONAL (see §8.4); default "ms" when absent
"informed_by": ["sha256:"], // OPTIONAL (see §1.2.5); agent's claimed reasoning context
"provenance_token": "", // OPTIONAL (see §1.2.6); genesis-record-only; cross-session anchor
"tool_name": "", // OPTIONAL (see §8.2); discloses the tool name; absent = §8.1 default posture
"args_hash": "sha256:", // OPTIONAL (see §8.3); commitment to the canonical args bytes
"args_salt": "", // OPTIONAL (see §8.3); reveals salt for salted-sha256 args_hash
"result_hash": "sha256:", // OPTIONAL (see §8.3); commitment to the canonical result bytes
"result_salt": "", // OPTIONAL (see §8.3); reveals salt for salted-sha256 result_hash
"session_token": "", // OPTIONAL (see §1.5.5); omitted when not in a cross-trace session
"checkpoint": { }, // OPTIONAL (see §1.2.10); REQUIRED on session_checkpoint records, FORBIDDEN elsewhere
"signature": ""
}Transaction shape:
{
"spec_version": "atrib/1.0",
"content_id": "sha256:", // merchant's checkout endpoint URL + ":checkout"
"creator_key": "", // primary signer's key (typically the agent's)
"chain_root": "sha256:",
"event_type": "https://atrib.dev/v1/types/transaction",
"context_id": "",
"timestamp": 1743850000000,
"timestamp_granularity": "ms", // OPTIONAL
"informed_by": ["sha256:"], // OPTIONAL
"provenance_token": "", // OPTIONAL; genesis-record-only
"session_token": "", // OPTIONAL
"signers": [ // REQUIRED for transaction records (§1.7.6)
{ "creator_key": "agent-key", "signature": "..." },
{ "creator_key": "counterparty-key", "signature": "..." }
]
}1.2.1 Field Definitions
| Field | Type | Req | Description |
|---|---|---|---|
| spec_version | string | MUST | Always the literal string "atrib/1.0" for records conforming to this specification. Implementations MUST reject records with unknown spec_version values rather than attempting to process them. |
| content_id | string | Conditional | Required for tool_call and transaction records and wherever a type-specific section requires it. Optional on other records, including §1.12 evidence statements. When absent, MUST be omitted, not set to null. When present, follows §1.2.2 or an explicitly specified type-specific derivation. An absent value does not imply a tool identity. |
| creator_key | string | MUST | The signer's Ed25519 public key, encoded as unpadded base64url (43 characters). It identifies who signed the account, not necessarily the actor, observer, authorizer or destination. Resolve certified run keys to principals per §1.11.4. Principal binding alone does not establish authority for an assertion's scope. |
| chain_root | string | MUST | A prefixed hex-encoded SHA-256 digest anchoring this record in the chain. For non-genesis records: the hash of the parent attribution record's canonical serialization (see §1.3). For genesis records: the hash of the context_id string. See §1.2.3. |
| event_type | string | MUST | An absolute URI identifying the type of event this record documents. atrib's normative URI set is defined in §1.2.4; consumers MAY mint extension URIs in their own namespaces. URI form is validated per §1.4.5. atrib does not require URI recognition for verification; an unrecognized but syntactically-valid extension URI does not block signature verification. |
| context_id | string | MUST | A correlation context encoded as 32 lowercase hex characters. It may map to a W3C trace-id per §1.5.1. Shared context does not establish invocation identity, authorization, execution, or causality. |
| timestamp | integer | MUST | Signer-declared Unix time in milliseconds as a JSON integer, not independently established occurrence time. Implementations SHOULD reject values more than five minutes ahead of their local clock. Coarsened values declare timestamp_granularity per §8.4. Source observation and receipt times remain separately attributed per §1.12. |
| informed_by | array | MAY | Array of "sha256:" + hex(record_hash) strings identifying records the agent claims informed this action. Hashes MUST be sorted lexicographically by the hex string (deterministic ordering). Empty or absent when the record makes no provenance claim. The graph layer derives INFORMED_BY edges from this field (§3.2.3). atrib does not validate truthfulness of the claim. See §1.2.5 and D041. |
| provenance_token | string | MAY | Base64url-encoded 16-byte opaque token for cross-session causal anchoring. Distinct from session_token: provenance_token says "this session descends from that anchor" (causal); session_token says "this is the same logical session" (continuation). Carried ONLY by the genesis record of a session that claims an upstream anchor; non-genesis records MUST NOT carry it. Derived as the first 16 bytes of the upstream record's hash; upstream records carry no special field to be anchorable. The graph layer derives PROVENANCE_OF edges from this field (§3.2.3). See §1.2.6 and D044. |
| delegation_cert_hash | string | MAY | "sha256:" + 64 lowercase hex commitment to a delegation certificate per §1.11.3. Permitted ONLY on session genesis records (committing the signer's run key to its certificate) and on key_revocation records (§1.11.5). JCS-canonical form sorts the field between creator_key (c-r) and event_type (e). See D140. |
| session_token | string | MAY | Base64url-encoded 16-byte opaque token identifying the logical session across OTel trace boundaries. Present only when the record was emitted in a cross-trace session. When present, the graph query layer uses this field to construct CROSS_SESSION edges between records with different context_ids that share the same session_token. See §1.5.5. The session_token field is included in the canonical serialization and covered by the signature. |
| signature | string | MUST for non-transaction records | Ed25519 signature over the canonical serialization of the record with the signature field omitted, encoded as base64url (RFC 4648 §5, no padding). 86 characters. See §1.4 for the full signing procedure. Transaction records (event_type = transaction) carry the signers array per §1.7.6 instead of (or in addition to) this top-level field. |
| signers | array | MUST for transaction records, MUST NOT for others | Array of { creator_key, signature } objects, one per cross-attestation party. Required on transaction records (§1.7.6); MUST NOT appear on tool_call, observation, or extension records. Minimum 2 distinct verified signer keys (typically agent + counterparty). Duplicate entries from one key do not satisfy the minimum. All signers cover the same canonical bytes: the JCS serialization of the record with signers: [] and signature omitted. |
| timestamp_granularity | string | MAY | Declares the coarsening granularity of timestamp per the §8.4 timing posture. Allowed values: "ms" (default when absent), "s", "min", "h", "d". Verifiers MUST reject records where the declared granularity does not match the value's trailing-zero pattern (e.g., timestamp_granularity: "min" requires timestamp % 60000 == 0). |
| tool_name | string | MAY | Discloses the verbatim or transformed tool name per the §8.2 opaque-name posture. Absence indicates the §8.1 default posture (no tool-name disclosure beyond what content_id derives from serverUrl + toolName). When present, value is one of: a verbatim string (e.g., "book_flight"), a transformed opaque label matching the §8.2 form regex [a-z0-9_-]{1,64}, or "sha256:" + 64 lowercase hex for the hashed form. JCS-canonical form places the field last in the current record schema: tool_name (t-o-...) sorts after timestamp_granularity (t-i-m-e-s-t-a-m-p-_-...) and after signature / spec_version (s- sorts before t-). No subsequent field exists at the time of writing. See D061. |
| args_hash | string | MAY | Commitment to the canonical args bytes per the §8.3 salted-commitment posture. Format: "sha256:" + 64 lowercase hex. Absence indicates the §8.1 default posture (no args commitment surfaced; verifiers cannot independently confirm what the agent claims to have sent). When present without args_salt, the commitment is plain-sha256(canonical_args_bytes). When present with args_salt, the commitment is salted-sha256(salt ‖ canonical_args_bytes). JCS-canonical form sorts the field between annotates (a-n) and args_salt (a-r-g-s-_-s) since a-r-g-s-_-h lies between them. See D061. |
| args_salt | string | MAY | Base64url-encoded random salt (≥16 bytes) revealing the salt used to compute a salted-sha256 args_hash per §8.3. Presence indicates the salted-commitment posture for args; absence indicates the default plain-sha256 scheme (or the §8.3 hmac-sha256 variant which is signaled out-of-band and not structurally detectable). |
| result_hash | string | MAY | Commitment to the canonical result bytes per the §8.3 salted-commitment posture. Same shape and semantics as args_hash but for the tool's response. JCS-canonical form sorts the field between provenance_token (p) and result_salt (r-e-s-u-l-t-_-s) since r-e-s-u-l-t-_-h lies between them. |
| result_salt | string | MAY | Base64url-encoded random salt (≥16 bytes) revealing the salt used to compute a salted-sha256 result_hash per §8.3. Same posture-detection semantics as args_salt. |
| checkpoint | object | MAY | Session checkpoint commitment per §1.2.10. REQUIRED when event_type is the session_checkpoint URI; FORBIDDEN on any other event_type. Carries session_root / tree_size / first_index / prior_checkpoint / retroactive. JCS-canonical form sorts the field between chain_root ("c-h-a") and content_id ("c-o"). |
1.2.2 content_id Derivation
The content_id identifies who specifically served a piece of content, not what the content was, and not a fingerprint of the response payload. Two different MCP server operators serving the same tool will produce different content_id values. This is intentional: provenance is about the serving entity, not the served artifact.
When present for a tool/service record, content_id MUST be computed as follows, unless its type-specific section defines another derivation. Non-tool statements may omit it per §1.2.1. Omission does not alter the record-hash or log-leaf rules.
// Inputs:
server_url // the MCP server's base URL, lowercased, trailing slash removed
tool_name // the tool name from the tools/list response, case-preserved
// Derivation:
input = server_url + ":" + tool_name
digest = SHA-256(UTF-8(input))
content_id = "sha256:" + hex(digest) // lowercase hex, no spaces
// Example:
// server_url = "https://tools.example.com"
// tool_name = "search_web"
// input = "https://tools.example.com:search_web"
// content_id = "sha256:3f8a2b..."Note (Server URL Normalization): Before hashing, implementations MUST normalize the server URL: lowercase the scheme and host, remove any trailing slash from the path, and preserve the port if explicitly specified. Query strings and fragments are excluded. A server at HTTPS://Tools.Example.Com/ and one at https://tools.example.com must produce the same content_id. Default ports (443 for HTTPS, 80 for HTTP) MUST be omitted. https://tools.example.com:443 normalizes to https://tools.example.com. The server URL is the base URL of the MCP server, not individual tool endpoints.
1.2.3 chain_root for Genesis Records
Every attribution chain begins with a genesis record: the first hop in a session that has no upstream atrib context. A record is a genesis record when the inbound context contains no atrib token (no params._meta.atrib, no tracestate atrib entry, no X-Atrib-Chain header), OR when the token is present but malformed (cannot be decoded by the procedure in §1.5.2). In both cases, chain_root is computed as the genesis chain root per the formula below.
For a genesis record, the chain_root MUST be computed as:
chain_root = "sha256:" + hex(SHA-256(UTF-8(context_id)))This anchors every genesis record to its session without requiring a parent record. It is verifiable by any party who knows the context_id.
Normative clarification: Both chain_root and the propagation token's record_hash component are computed over the JCS canonicalization of the COMPLETE signed record, INCLUDING the signature field. This differs from the signing input (§1.3), which EXCLUDES the signature field. Specifically:
- Signing input:
JCS(record without signature)-- used for Ed25519 sign/verify - Record hash:
SHA-256(JCS(complete record with signature))-- used forchain_rootand propagation token - chain_root format:
"sha256:" + hex(record_hash)-- prefixed hex encoding of the record hash - Token format:
base64url(record_hash) + "." + base64url(creator_key)-- base64url encoding of raw bytes
A receiving implementation that decodes a propagation token and needs to set chain_root MUST convert: chain_root = "sha256:" + hex(decoded_token.record_hash).
1.2.3.1 Multi-producer chain composition
When more than one producer signs records under the same creator_key for the same context_id across process boundaries (e.g., the wrapper middleware in @atrib/mcp signing tool calls alongside the attest write verb, or its legacy atrib-emit alias, running as a cognitive-primitive subprocess in the same agent session), each producer MUST resolve chain_root for a new non-genesis record using the precedence ordering below. Honoring the ordering keeps records on the same context coherent under producer composition; deviating produces records that share context_id but split into multiple chains, which downstream consumers cannot recompose. Conformance fixtures live at spec/conformance/1.2.3/multi-producer/ and the reference implementation is resolveChainRoot in @atrib/mcp. See D067 for the decision rationale and rejected alternatives.
Precedence (highest to lowest):
- Inbound propagation token. If the call carries an inbound atrib token decoded per §1.5.2 (MCP
_meta.atrib, W3C tracestateatrib=..., orX-Atrib-Chainheader), the token'srecord_hashMUST become the new record'schain_root. Ignoring it would re-genesis a chain the caller explicitly extended. - Within-process auto-chain tail. If the producer signed a previous record under the same
context_idin the current process and remembers its hash in memory, that hash MUST be the new record'schain_root. - Cross-producer env-var handoff. If the env var
ATRIB_CHAIN_TAIL_<context_id>is set with a value matching^sha256:[0-9a-f]{64}$, that value MUST be the new record'schain_root. The env var is namespaced bycontext_id; a value set for a different context MUST NOT be consulted. Malformed values MUST fall through to lower-priority sources rather than be treated as a chain anchor. - Cross-producer mirror-file inheritance. The effective mirror file, after producer configuration and environment resolution, identifies a local mirror corpus: every
*.jsonlfile in its directory (file-as-IPC channel; see §5.9). If that corpus contains records on the samecontext_id, the newest per-file tail's canonical hash MAY be used as the new record'schain_root. Append order selects the tail within one file. Across files, the greatest signedtimestampwins; equal timestamps use the lexicographically greater canonical record hash. Producers consulting mirrors MUST filter to records matchingcontext_id; chaining to a mirror tail on a differentcontext_idproduces a malformed record (chain_rootpointing into a chain whosecontext_iddiffers from the new record's) and MUST be rejected by both validators (§2.6.1) and verifiers. An implementation MAY keep a deletable advisory tail index. It MUST validate the index against the current corpus, update it atomically, and fall back to a full scan when files disappear, shrink, are replaced, or otherwise conflict with the indexed state. - Synthetic genesis. If no upstream chain context exists,
chain_rootMUST be the genesis chain root per the formula in §1.2.3.
The precedence ordering reflects fidelity to the upstream signal: inbound tokens are the spec-canonical handoff, within-process state is fresher than out-of-process state, env-var handoff is set explicitly by a spawning process while a mirror file may lag (writes pending, peer producer signed something not yet flushed). Producers in any language MAY implement their own resolver but MUST pass the conformance corpus.
1.2.4 event_type Values
event_type is an absolute URI. atrib publishes a small canonical core vocabulary; consumers MAY mint their own extension URIs in any namespace they control. atrib does not gate, register, or approve extension URIs; D035 establishes the URI-typing mechanism, and D036 defines the bar for promoting an extension URI to atrib's normative set.
Normative URI set:
| URI | Binary | Meaning |
|---|---|---|
https://atrib.dev/v1/types/tool_call | 0x01 | An agent invoked or attempted to invoke a tool with input(s). The ordinary post-call path emits it after a successful non-error result. Verifiable-action pre-call mode emits one request record before execution and one terminal outcome record after success, an MCP error or invalid result, or a thrown failure or cancellation. Outside that paired mode, it MUST NOT be emitted when isError: true. Default for any active operation against external state. |
https://atrib.dev/v1/types/transaction | 0x02 | A commerce-protocol-detected closing event (ACP / UCP / x402 / MPP / AP2 / a2a-x402; see §1.7). Emitted when a transaction completes, either by the merchant's agent writing a record, or by the atrib SDK reading a transaction webhook. The content_id for a transaction record usually uses the merchant's checkout endpoint URL as the server_url and "checkout" as the tool_name. AP2 Path 2 MAY use the receipt identity ladder in payments profile §2.5. The payments profile §8 calculation is normatively gated on this URI. |
https://atrib.dev/v1/types/observation | 0x03 | A standalone perception or noting, with no required referent on a prior record. Two production shapes: (a) a passive perception captured by an ambient watcher or input source (the original framing in §1.2.4.1 example C below); (b) an agent self-emitted noting of an environmental fact, hypothesis, or in-the-moment discovery that does not point at a specific prior record. Distinguished from tool_call by the absence of agent-chosen action against external state. Distinguished from annotation and revision by the absence of a referent: observation has no annotates and no revises field. The agent or watcher is recording a first-class noting that future-self or downstream consumers can read back, weight, or anchor against. |
https://atrib.dev/v1/types/directory_anchor | 0x04 | A commitment by a directory operator to its current state, emitted per §6.2.4 after each directory operation. Carries directory_root, epoch, and version for downstream verifier consultation per §6.3 step 7 (AKD anchor consistency check). Emitted by atrib-system directory services, not by agents. Promoted from extension namespace by D056. |
https://atrib.dev/v1/types/annotation | 0x05 | A commentary record pointing at any prior record via the annotates field (§1.2.7). The recall-fidelity primitive: an agent reading back its own signed records uses annotations to weight, summarize, and topic-tag earlier records that future-self should not lose to flat scanning. Distinct from observation: annotation is a forward-pointing claim about an earlier record; observation is a first-class signed event. Validators MUST require annotates on annotation records and MUST reject annotates on any other event_type. The graph layer derives ANNOTATES edges per §3.2.4 step 8. Promoted from extension namespace by D058. |
https://atrib.dev/v1/types/revision | 0x06 | A claim that supersedes a prior record via the revises field (§1.2.9). The contradiction-handling primitive: when the agent now holds a position incompatible with a prior claim, the revision is the way to surface the change as a first-class graph node rather than a silent edit (records are immutable). Distinct from annotation: annotation comments while leaving the prior position intact, revision asserts the prior is no longer held. Validators MUST require revises on revision records and MUST reject revises on any other event_type. The graph layer derives REVISES edges per §3.2.4 step 9. Promoted from extension namespace by D059. |
Extension URIs: Any absolute URI in a non-atrib.dev namespace is a valid extension URI. The 1-byte log entry slot (§2.3.1) maps such URIs to the byte 0xFF (extension type); verifiers wanting to filter by the URI itself read the URI from the record. Extension URIs SHOULD identify a stable owner (a domain the consumer controls or a urn: namespace they registered); atrib does not enforce ownership. atrib itself stages promotions this way: https://atrib.dev/v1/types/session_checkpoint (§1.2.10) is produced under 0xFF ahead of its D036 byte allocation (0x08), per the D073 pattern.
1.2.4.1 Canonical examples
Each example is an unsigned record skeleton (without signature, creator_key, chain_root, context_id, timestamp, which appear identically on every record). Captions explain the structural and semantic positioning. Example records elsewhere in this spec (§A conformance corpora) provide complete signed instances; the examples here pin down the type-selection question only.
Example A: tool_call, agent invoked an external tool with side effects.
{
"spec_version": "atrib/1.0",
"event_type": "https://atrib.dev/v1/types/tool_call",
"content_id": "sha256:<canonical hash of {tool_name, args, result}>",
"tool_name": "Edit",
"args_hash": "sha256:<...>",
"result_hash": "sha256:<...>"
}Caption: an MCP server returned a non-error result for a tools/call request. The Edit invocation modified state (filesystem). The record signs the action; verifiers reading the chain can prove the agent took this step.
Example B: transaction, commerce-protocol-detected closing event.
{
"spec_version": "atrib/1.0",
"event_type": "https://atrib.dev/v1/types/transaction",
"content_id": "sha256:<canonical hash of {merchant_url, amount, ...}>",
"signers": [
{ "creator_key": "<agent>", "signature": "..." },
{ "creator_key": "<merchant>", "signature": "..." }
]
}Caption: payment closed via x402 / ACP / UCP / MPP / AP2 / a2a-x402. The signers array carries cross-attestation per §1.7.6. The payments profile §8 calculation gates on this URI.
Example C: observation (passive watcher), ambient process noted environmental state.
{
"spec_version": "atrib/1.0",
"event_type": "https://atrib.dev/v1/types/observation",
"content_id": "sha256:<canonical hash of content>",
"content": {
"kind": "substrate_health",
"tree_size": 846,
"errors_in_window": 0,
"window_ms": 14400000
}
}Caption: a periodic prerun script reports health every four hours. No prior record is being commented on; the agent did not invoke a tool. This is a first-class noting that future-self can read back to anchor "the substrate was healthy at this moment."
Example D: observation (agent self-emitted), agent recorded an in-the-moment noting that does not point at a specific prior record.
{
"spec_version": "atrib/1.0",
"event_type": "https://atrib.dev/v1/types/observation",
"content_id": "sha256:<canonical hash of content>",
"content": {
"kind": "discovery",
"summary": "the upstream HTTP client returns 502 on payloads larger than 64 KB",
"importance": "medium"
},
"informed_by": ["sha256:<the tool_call that surfaced the discovery>"]
}Caption: an agent learned something during work that future-self should be able to find. The informed_by field acknowledges sources that produced the discovery, but no annotates field is set because the observation is a standalone noting, not commentary about a specific prior record. Distinguishes observation from annotation: observation does not pick out one prior record as the target; annotation does.
Example E: directory_anchor, directory operator commitment.
{
"spec_version": "atrib/1.0",
"event_type": "https://atrib.dev/v1/types/directory_anchor",
"content_id": "sha256:<SHA-256 of '<directory_origin>:directory_anchor'>",
"creator_key": "<directory operator's pubkey>",
"chain_root": "<previous log-committed directory_anchor record_hash, or genesis>",
"context_id": "<directory operator's reserved context_id>",
"timestamp": 1743850000000,
"metadata": {
"directory_origin": "directory.example/v6",
"directory_root": "...",
"directory_epoch": 12345
},
"signature": "<base64url 64-byte Ed25519 signature>"
}Caption: emitted by an atrib-system directory service per §6.2.4 after each directory operation. Not emitted by agents.
Example F: annotation, agent commentary about a specific prior record.
{
"spec_version": "atrib/1.0",
"event_type": "https://atrib.dev/v1/types/annotation",
"content_id": "sha256:<canonical hash of content>",
"annotates": "sha256:<the prior record being commented on>",
"content": {
"summary": "session covered the lint-rule rewrite plus its rollout plan",
"importance": "high",
"topics": ["lint-rule-rewrite", "session-summary"]
}
}Caption: a session-end retrospective hook commenting on the chain-tail of the trace it ran in. The annotates field REQUIRED per §1.2.7 makes this a forward-pointing claim about an earlier record. Annotation does not assert the prior record was wrong; it weights, summarizes, or tags the prior record for recall fidelity.
Example G: revision, agent superseding a prior claim.
{
"spec_version": "atrib/1.0",
"event_type": "https://atrib.dev/v1/types/revision",
"content_id": "sha256:<canonical hash of content>",
"revises": "sha256:<the prior record being superseded>",
"content": {
"prior_position": "the upstream service supports streaming responses",
"new_position": "the upstream service does not support streaming; the SSE-shaped traffic came from a different endpoint",
"reason": "tested empirically; verify against the OpenAPI document rather than inference"
}
}Caption: the agent now holds a position incompatible with a prior signed claim. Records are immutable, so the substrate surfaces the change as a first-class graph node rather than a silent edit. The revises field REQUIRED per §1.2.9 carries the predecessor reference; the content carries the prior position, the new position, and the reason.
1.2.4.2 Choosing event_type
The decision tree (consumer-facing; producers MUST emit the event_type that matches the structural reality of the record):
- Is this a commerce-protocol-detected closing event? →
transaction. Carriessignersarray per §1.7.6. - Is this a directory operator's state commitment? →
directory_anchor. Emitted by atrib-system directory services, not agents. - Did the agent invoke a tool with side effects on external state? →
tool_call. Result attested viaargs_hash/result_hashper §1.2.1. - Does the record point at a specific prior record as its target?
- YES, the new claim supersedes the prior position (the agent no longer holds it) →
revision. REQUIRESrevisesper §1.2.9. - YES, the new claim comments on, weights, summarizes, or tags the prior record without overturning it →
annotation. REQUIRESannotatesper §1.2.7. - NO (standalone noting, no specific prior record being targeted) →
observation.
- YES, the new claim supersedes the prior position (the agent no longer holds it) →
- Otherwise? → mint or use an extension URI in your namespace per D035. atrib does not gate extension URIs.
Common confusion: observation vs annotation. The structural distinction is referent. If the record points at a specific prior record (annotates set), it's an annotation. If the record is a standalone noting that may reference sources via informed_by but does not pick out a single prior record as its target, it's an observation. A discovery the agent makes during work, with no specific prior record being commented on, is an observation (Example D). A summary of "the trace covered topic Y" pointing at the trace's chain-tail is an annotation (Example F).
Common confusion: annotation vs revision. Both carry forward-pointing claims about an earlier record. Annotation says "here is commentary on this prior record"; the agent's stance is unchanged. Revision says "I no longer hold the position I claimed in this prior record." Annotations weight, summarize, or tag for recall; revisions overturn. The semantic strength differs.
Producer guidance for emit pipelines. Emit pipelines that automate event_type selection (lifecycle hooks, extractor sub-agents, periodic watchers) SHOULD select event_type by structural rule, not by content keyword:
- A lifecycle hook with a chain-tail referent →
annotation. The referent makes annotation correct. - A watcher with no referent →
observation. The absence of a referent makes observation correct. - An extractor sub-agent reading the agent's transcript and emitting cognitive events SHOULD select per the decision tree above for each detected event: a hedge phrase contradicting a prior claim becomes
revisionif the prior record is identifiable, elseobservation; a discovery becomesobservation; a summary about a specific prior chain becomesannotation.
This guidance addresses the gap D063 records: prior to the canonical examples here, implementations in the atrib ecosystem drifted between observation and annotation for records that had clear structural answers (records with referents went to observation as a fallback before the annotation pipeline shipped, records without referents had no automated path at all).
1.2.5 informed_by
The informed_by field carries the agent's claimed reasoning context: an array of "sha256:" + hex(record_hash) strings identifying records the agent claims informed this action. The field is OPTIONAL (per D041); records without it make no provenance claim.
Format. Each entry is a "sha256:" prefix followed by 64 lowercase hex characters, matching the chain_root format. The array MUST be sorted lexicographically by the hex string. Sorting is required for canonical serialization stability: an agent-side ordering choice would otherwise affect signatures.
Semantics. A record with informed_by: ["sha256:abc...", "sha256:def..."] claims the agent consulted those two referenced records before deciding to emit this record. The references MAY point at records in the same session, a different session of the same creator_key, or a session of a different creator_key. There is no requirement that the referenced records actually exist in any particular log; the verifier resolves what it can and surfaces dangling references (§3.2.3 INFORMED_BY edge with dangling: true).
Trust posture. atrib certifies that the holder of the creator_key signed a record carrying these claims. atrib does NOT certify that the referenced records actually informed the agent's decision. Truthfulness verification (cross-checking referenced content against the action) is a downstream concern.
1.2.7 annotates
The annotates field carries a single record_hash reference identifying the target record this annotation describes. The field is OPTIONAL on the record format but REQUIRED when event_type = https://atrib.dev/v1/types/annotation and FORBIDDEN on any other event_type. Validators (§1.1.2, log-side admission) AND verifiers (§1.1.2, consumer-side audit) MUST reject records that violate this constraint.
Format. A "sha256:" prefix followed by 64 lowercase hex characters, matching the chain_root and informed_by entry formats.
Semantics. A record A with event_type = annotation and annotates: "sha256:..." claims to be a commentary on record T identified by the hash. Annotations carry caller-defined content per §1.2.2, common shapes include importance level, topic tags, summary text, and confidence, but the protocol does not normatively prescribe content fields beyond requiring annotates itself. The reference MAY point at a record in the same session, a different session of the same creator_key, or a session of a different creator_key. Multiple annotations of the same target are normal (and produce multiple ANNOTATES graph edges).
Graph derivation. The graph layer derives ANNOTATES edges per §3.2.4 step 8. Annotation records whose annotates target is not in the resolved record set produce dangling edges (target = synthetic dangling node, dangling: true) so the agent's claim stays visible. ANNOTATES is the dual of INFORMEDBY (§1.2.5): forward-pointing (a new record claims something _about an earlier record) rather than backward-pointing (a new record claims earlier records informed it). Both are agent-declared; both produce graph edges that surface the agent's reasoning structure without inferring causation.
Trust posture. atrib certifies that the holder of the creator_key signed an annotation referencing the target. atrib does NOT certify that the annotation accurately characterizes the target. Truthfulness verification (does the importance/topics/summary match the target's actual content?) is a downstream concern. The substrate guarantees the annotation is signed; consumers decide how much to trust it.
JCS canonical form. annotates (a) sorts lexicographically before chain_root (c) and after spec_version (s comes after a, but spec_version is the conventional first field by JCS sort over all current fields except those starting with letters before s, verify the alphabetic ordering in implementations rather than assuming).
1.2.9 revises
The revises field carries a single record_hash reference identifying the predecessor record this revision supersedes. The field is OPTIONAL on the record format but REQUIRED when event_type = https://atrib.dev/v1/types/revision and FORBIDDEN on any other event_type. Validators (§1.1.2, log-side admission) AND verifiers (§1.1.2, consumer-side audit) MUST reject records that violate this constraint.
Format. A "sha256:" prefix followed by 64 lowercase hex characters, matching the chain_root, informed_by, and annotates formats.
Semantics. A record R with event_type = revision and revises: "sha256:..." claims to supersede record P identified by the hash. The current record asserts a position incompatible with P; not a content edit (records are immutable on the log) but a forward-pointing claim that future-self should weight this over the referenced predecessor. Revisions carry caller-defined content per §1.2.2, common shapes include the new position, prior position, and reason for revision, but the protocol does not normatively prescribe content fields beyond requiring revises itself. The reference MAY point at a record in the same session, a different session of the same creator_key, or a session of a different creator_key. Multiple revisions of the same target are allowed (a chain of mind-changes); the graph surfaces all of them.
Distinction from annotates. Annotation says "here is commentary on this prior record"; the agent's stance is unchanged. Revision says "I no longer hold the position I claimed in this prior record." Annotations weight, summarize, or tag for recall; revisions overturn. Both are forward-pointing claims about earlier records; the semantic strength differs.
Distinction from informed_by. informed_by acknowledges sources that informed the current claim; revises asserts the current claim contradicts a prior one. A revision MAY also carry informed_by (referencing the records that led the agent to change position), both fields coexist freely.
Graph derivation. The graph layer derives REVISES edges per §3.2.4 step 9. Revision records whose revises target is not in the resolved record set produce dangling edges (target = synthetic dangling node, dangling: true) so the agent's claim stays visible.
Trust posture. atrib certifies that the holder of the creator_key signed a revision referencing the predecessor. atrib does NOT certify that the revision is well-founded or that the predecessor was wrong. Truthfulness verification (does the new position actually supersede the old one for this question?) is a downstream concern.
JCS canonical form. revises (r) sorts lexicographically after provenance_token (p) and before session_token (s).
1.2.6 provenance_token
The provenance_token field carries an opaque token used for cross-session causal anchoring. It is OPTIONAL; records without it make no ancestry claim.
Format. Base64url-encoded 16 bytes (RFC 4648 §5, no padding). 22 characters.
Scope constraint. provenance_token MUST appear ONLY on the genesis record of a session (the first record in a context_id). A session's ancestry is a session-level property; the genesis record is the natural place to declare it. Subsequent records in the session inherit ancestry implicitly via session membership. Both validators (§1.1.2, log-side admission) AND verifiers (§1.1.2, consumer-side audit) MUST reject records carrying provenance_token when they are not the session's genesis record. Middleware (§5.3, §5.4) SHOULD refuse to sign such records to prevent malformed submissions reaching the log.
Derivation. A session-genesis record claiming ancestry from upstream record U carries provenance_token = base64url(SHA-256(JCS(U))[:16]) where U is the complete signed record (including its signature). The first 16 bytes of the SHA-256 record hash provide 2^128 collision resistance, sufficient for the cross-session anchor space.
Upstream records carry no special field. Any signed record in the log is implicitly anchorable. Downstream records reference it by truncated hash. The token is a downstream-side claim only; upstream records do not need to declare anchorability.
Graph derivation. The graph layer derives PROVENANCE_OF edges (§3.2.3) by searching for any record U whose first 16 bytes of SHA-256(JCS(U)) match the token, with U.context_id ≠ D.context_id. Dangling references (token claimed but no matching upstream in the resolved set) are flagged with dangling: true.
Distinction from session_token. sessiontoken (§1.5.5) means _same logical session across OTel trace boundaries (continuation of one task). provenancetoken means _different session, causally anchored (one session's first record descends from another's). They MAY coexist on the same genesis record (a session may both belong to a multi-trace logical session AND descend from a prior anchor).
Relationship to informed_by. provenance_token is a stricter, ergonomically-specialized subset of informed_by (§1.2.5):
| Property | informed_by | provenance_token |
|---|---|---|
| Cardinality | Multi-valued array | Single value |
| Scope | Per-record (any record may carry it) | Per-session (genesis record only) |
| Hash form | Full record_hash with prefix (~71 chars per entry) | Truncated 16 bytes (22 chars base64url) |
| Use case | Records this action consulted | This session's ancestry anchor |
| Cross-session API ergonomics | Not optimized for env-var / header passing | Designed for env-var / header / URL-param passing |
A consumer wanting full-precision multi-anchor cross-session references uses informed_by (which can include record_hashes from any session). provenance_token is the ergonomic shorthand for declaring a single ancestral anchor that can be passed across session boundaries via short tokens.
1.2.10 checkpoint
The checkpoint field carries a session checkpoint: a Merkle commitment to the ordered record-hash stream of the record's context_id so far. The field is OPTIONAL on the record format but REQUIRED when event_type = https://atrib.dev/v1/types/session_checkpoint and FORBIDDEN on any other event_type. Validators (§1.1.2, log-side admission) AND verifiers (§1.1.2, consumer-side audit) MUST reject records that violate this constraint — the same presence discipline as annotates (§1.2.7) and revises (§1.2.9).
A session checkpoint is an ordinary signed atrib record. It is signed like any record (§1.4), chained like any record (§1.2.3.1 precedence via resolveChainRoot, never reimplemented), submitted like any record (§2.6.1), and non-blocking like any record (§5.3.5, §5.8). What it adds is a completeness and selective-disclosure claim the per-record log entries (§2.3.1) cannot make: an inclusion proof of leaf i against session_root proves a record's position within the committed session stream while revealing only the record hash, its index, and ~log2(n) sibling hashes — never sibling record bodies — and the checkpoint as a whole asserts "this is the entire committed stream as of leaf tree_size - 1." Position becomes provable while args/result stay salted commitments per §8.3.
Disambiguation. Session checkpoints are unrelated to the log's checkpoints (§2.4). A log checkpoint is the log operator's signed statement about the public log tree; a session checkpoint is a producer's signed record committing to its own session stream. They share the RFC 6962 tree algebra and nothing else.
Event type and staged promotion. The event_type URI is https://atrib.dev/v1/types/session_checkpoint. Pre-promotion, producers emit the URI and log operators encode the entry under the 0xFF extension byte per §2.3.1 — the staged pattern D073 established. At promotion per the D036 bar, the byte 0x08 is allocated (skipping 0x07, which remains D073's design-level reservation for handoff). Because the event_type in the signed bytes is the URI, records emitted before and after promotion are byte-identical; only the 90-byte log entry's type byte changes for new submissions. The conformance corpus pins this duality (byte-uri-duality).
Example (a complete signed instance from the conformance corpus; the second checkpoint of a five-record stream):
{
"spec_version": "atrib/1.0",
"content_id": "sha256:89601eeb0b82436563c295c61359be112f8cabdfe00b52302f3af8bfa6827b3b",
"creator_key": "ebVWLo_mVPlAeLES6KmLp5AfhTrmlb7X4OORC60ElmQ",
"chain_root": "sha256:0d12ff963483ddb41626549efddae406552ac9544f3a0602ab17d387eb4e7ee2",
"checkpoint": {
"first_index": 2,
"prior_checkpoint": "sha256:100fb76914744a6eaaee131873c5ddd8b78af2add3c5b0270d879b0a74f48aea",
"session_root": "sha256:e7eea58194aa467d27fcd627cf87181f898aa9ad8fba4bb6a8755618b8bd0a57",
"tree_size": 5
},
"event_type": "https://atrib.dev/v1/types/session_checkpoint",
"context_id": "abababababababababababababababab",
"timestamp": 1782864030000,
"args_hash": "sha256:1606e02f9257826a0e8a12b01ab4efbb8826e4a1a34600d7a2e436fca03d2f6a",
"signature": "8gUC5zcTI-VoxWqcLrFfOujZhcWTAx7XmPM9K85DnIM5Pjjxsmas_xaVv5AaGfxtoHXyjYYBBC3jAV3MMDRoBg"
}Field semantics within checkpoint (all REQUIRED unless marked):
| Field | Type | Rule |
|---|---|---|
session_root | string | "sha256:" + 64 lowercase hex. The RFC 6962 Merkle Tree Hash over leaves 0..tree_size-1 per §1.2.10.1. |
tree_size | integer | ≥ 1. Number of leaves committed. The last covered leaf index is tree_size - 1 (implicit; not a separate field). Empty checkpoints are prohibited; producers SHOULD skip an interval that added no new leaves. |
first_index | integer | 0 ≤ first_index < tree_size. Index of the first leaf newly covered by this interval. MUST equal the prior checkpoint's tree_size when prior_checkpoint is present, and 0 when absent. |
prior_checkpoint | string, OPTIONAL | "sha256:" + 64 lowercase hex record hash (§1.2.3 definition) of the immediately preceding session_checkpoint record on the same context_id. MUST be present iff first_index > 0. Omitted, not null, on a session's first checkpoint. |
retroactive | boolean, OPTIONAL | When present, MUST be true; retroactive: false MUST NOT be emitted (absence-not-null; presence changes the JCS canonical form and therefore the signature). Semantics per §1.2.10.3. |
Validator rules (§2.6.1 conformance targets). Validators MUST reject: a session_checkpoint record missing checkpoint; checkpoint on any other event_type; tree_size < 1; first_index ≥ tree_size (or negative / non-integer); prior_checkpoint present with first_index == 0; prior_checkpoint absent with first_index > 0; retroactive: false. As with annotates and revises, the signature on a violating record may itself be valid; rejection is at the policy layer.
content_id derivation. content_id follows §1.2.2 with tool_name "session_checkpoint". Producers with a service origin use their normalized origin as server_url, mirroring directory_anchor's "<origin>:directory_anchor" input (D056). Origin-less cognitive producers SHOULD use the pseudo-origin atrib, giving the input "atrib:session_checkpoint"; the conformance corpus pins this constant.
Local content commitment. Per D099, producers SHOULD set args_hash = sha256(JCS({"leaves": [ ...ordered "sha256:<hex>" strings... ]})), committing the flat leaf list alongside the tree root while keeping the list itself in _local.content.leaves in the local mirror (§5.9). The list never sits on the public submission path (unbounded record size, no selective disclosure), yet any party handed the list can replay both the args_hash commitment and the session_root.
1.2.10.1 Session tree construction
- Leaf value. The raw 32-byte record hash of each covered record, hex-decoded from
"sha256:" + hex(SHA-256(JCS(complete signed record including signature))), exactly the record-hash definition in §1.2.3's normative clarification. Leaves are the bytes, not the prefixed hex string; a tree computed over the UTF-8 display strings MUST NOT match (the corpus carries a trap vector). - Hash function and domain separation. RFC 6962 §2.1 exactly as §2.3.2:
leaf_hash = SHA-256(0x00 || leaf_bytes),node_hash = SHA-256(0x01 || left || right). No new personalization string. Cross-tree confusion with the public log is structurally impossible: log leaves have fixed 90-byte preimages (§2.3.1); session leaves have fixed 32-byte preimages. Keeping the algorithm verbatim means the §2.7 inclusion-proof procedure, the RFC 6962 §2.1.4 consistency-proof check the §2.9 witness protocol already relies on, and existing Merkle libraries are reused unchanged. - Leaf ordering. Producer-declared session order, and it is a signed claim. Conforming producers MUST append leaves in the order they observed the records: signing order for records they signed, mirror append order for records read back from the §5.9 mirror. Verifiers do NOT recompute a canonical order; multi-producer sessions (§1.2.3.1, D067) have no trustworthy global time order (coarsened timestamps per §8.4, clock skew).
- Ordering-consistency checks (verifier-side, categorical, signal not block, per §3.3). When the verifier can resolve the leaf records it MUST check: (a) if CHAIN_PRECEDES A → B and both are leaves,
index(A) < index(B); (b) leaf timestamps are non-decreasing beyond declaredtimestamp_granularity; (c) every resolved leaf'scontext_idequals the checkpoint'scontext_id. A violation of (c) is a hard structural fault, not a soft flag. It MUST also check (d) every priorsession_checkpointrecord on the context appears as a leaf. - Self-exclusion. A checkpoint MUST NOT include itself as a leaf (its hash depends on
session_root). It becomes a leaf in the next checkpoint's tree. Checkpoints are part of the stream they formalize. - Empty checkpoints prohibited.
tree_size ≥ 1. The RFC 6962 empty-tree root (SHA-256("")) MUST never appear as asession_root.
1.2.10.2 Consistency and equivocation
For consecutive checkpoints K_i → K_{i+1} on one context_id: K_{i+1}.checkpoint.prior_checkpoint MUST be the record hash of K_i; K_{i+1}.checkpoint.first_index MUST equal K_i.checkpoint.tree_size; and the leaf sequence 0..K_i.tree_size-1 MUST be identical. This append-only extension is provable by an RFC 6962 §2.1.4 consistency proof from (K_i.session_root, K_i.tree_size) to (K_{i+1}.session_root, K_{i+1}.tree_size), the same append-only check the log's witness protocol applies between successive log checkpoints (§2.9).
Two signed checkpoints from the same creator_key claiming the same prior_checkpoint (or overlapping ranges) with inconsistent roots constitute equivocation evidence against that key. This is the session-scale analogue of log equivocation in §2.11, reported as a categorical verifier fact.
Honest scope (§8.7). The completeness claim is provable relative to the creator's own committed stream: a creator that maintains a never-checkpointed side chain is not detected by this mechanism. What changes is that any two committed views of the same session are now cryptographically comparable, so selective re-narration becomes attributable equivocation instead of deniable omission. One session root per interval is also the natural unit for anchor plurality per §2.11 / D050: multi-anchoring one root per interval is cheap where per-record multi-anchoring is not.
1.2.10.3 Retroactive checkpoints and freshness
A checkpoint signed now over an old chain proves the history existed and was tree-committed as of the checkpoint's log-inclusion time, not as of the original session. The covered records' own log entries remain the per-record contemporaneous anchors.
- Producer rule.
retroactive: trueMUST be set when any leaf in the newly covered interval[first_index, tree_size-1]was not observed live by the checkpointing producer (backfilled from a mirror, archive, or third-party history). The flag is present-only-when-true:retroactive: falseMUST NOT be emitted, and absence (notnullorfalse) is the canonical non-retroactive form (the invariant-5 discipline of §1.3; presence changes the signature). - Verifier rule. Verifiers assign one categorical freshness fact per checkpoint:
contemporaneous,declared-retroactive, orstale-undeclared(checkpoint timestamp exceeds the max covered leaf timestamp by more than a verifier-configured bound; RECOMMENDED default 24 hours). This mirrors thein_envelope: falsesignal-not-block posture of D051 / §6.7: a stale-undeclared checkpoint remains valid and admissible; the fact travels with the verification result.
1.2.10.4 Graph participation
No new edge types; the nine-edge set of §3.2.4 is unchanged. The Merkle root does not structurally reveal its member hashes; deriving per-leaf edges would require external leaf-list material, which violates the observable-structure rule (§3.1). The one field that IS observable structure, checkpoint.prior_checkpoint, deliberately stays verifier-side: checkpoint ordering is already coherent through chain_root, and producers wanting a declared graph relationship MAY additionally list the prior checkpoint hash in informed_by, reusing existing INFORMED_BY machinery (dangling-safe per D041, omission-by-default per D113).
Node participation (§3.2.1) is identical to observation: CHAIN_PRECEDES / SESSION_PRECEDES / SESSION_PARALLEL yes; CONVERGES_ON no; CROSS_SESSION no; INFORMED_BY and PROVENANCE_OF source/target yes; payments profile §8 attribution skipped. A session's attribution distribution MUST remain bit-identical whether or not its producer adopted checkpointing (§4.1 no-thumb rule), so checkpoint records never enter contributing-node sets. Graph endpoints continue to return no weighted or interpreted data (§3.6); ordering-consistency, equivocation, and freshness results are verifier facts, not graph payloads.
1.2.10.5 Conformance
Conformance fixtures live at spec/conformance/session-checkpoint/: seventeen cases across five families covering checkpoint object schema and presence rules, real RFC 6962 roots over ordered record-hash leaves (1 / 2 / 5 leaves, empty invalid, raw-32-byte-leaf trap), append-only consistency with a §2.1.4 proof plus an equivocating divergent-root pair, the present-only-when-true retroactive flag with categorical freshness facts, and the 0xFF/0x08 log-entry duality over byte-identical signed bytes. The generator is packages/log-dev/scripts/generate-conformance-session-checkpoint.ts; the reference test is packages/verify/test/conformance-session-checkpoint.test.ts. Implementations in any language MAY build their own tree and validation code but MUST pass the corpus.
JCS canonical form. checkpoint sorts after chain_root (c-h-a < c-h-e) and before content_id (c-h < c-o). It is a new OPTIONAL field, so it is absent from every existing record: no existing canonical form, signature, record hash, chain_root, or propagation token changes. Within the object, JCS orders the members first_index < prior_checkpoint < retroactive < session_root < tree_size.
1.3 Canonical Serialization
Before signing or hashing, an attribution record MUST be serialized to a canonical byte sequence. Non-canonical serialization is one of the most common sources of interoperability failure in cryptographic systems. This specification uses JSON Canonicalization Scheme (JCS, RFC 8785) as the canonical form.
JCS defines a unique serialization for any JSON value by specifying lexicographic key ordering, specific number formatting, and Unicode escape rules. The result is a UTF-8 byte sequence that is identical across all conforming implementations.
Procedure for signing
To produce the canonical serialization for signing, implementations MUST:
First, construct the record object with all fields present including a placeholder empty string for signature. Second, remove the signature field entirely from the object. Third, apply JCS serialization (RFC 8785) to produce a UTF-8 byte sequence. The resulting bytes are the signing input.
// Record with signature field present (no session_token, most common case):
{
"spec_version": "atrib/1.0",
"content_id": "sha256:3f8a2b...",
"creator_key": "ABC...",
"chain_root": "sha256:7e1f4a...",
"event_type": "https://atrib.dev/v1/types/tool_call",
"context_id": "4bf92f3577b34da6a3ce929d0e0e4736",
"timestamp": 1743850000000,
"signature": "XYZ..."
}
// Remove signature field, apply JCS → signing input (lexicographic key order):
{"chain_root":"sha256:7e1f4a...","content_id":"sha256:3f8a2b...","context_id":"4bf92f3577b34da6a3ce929d0e0e4736","creator_key":"ABC...","event_type":"https://atrib.dev/v1/types/tool_call","spec_version":"atrib/1.0","timestamp":1743850000000}
// Record with session_token present (cross-trace sessions only):
{"chain_root":"sha256:7e1f4a...","content_id":"sha256:3f8a2b...","context_id":"4bf92f3577b34da6a3ce929d0e0e4736","creator_key":"ABC...","event_type":"https://atrib.dev/v1/types/tool_call","session_token":"base64url16bytes","spec_version":"atrib/1.0","timestamp":1743850000000}
// Record with informed_by present (agent claims reasoning context):
{"chain_root":"sha256:7e1f4a...","content_id":"sha256:3f8a2b...","context_id":"4bf92f3577b34da6a3ce929d0e0e4736","creator_key":"ABC...","event_type":"https://atrib.dev/v1/types/tool_call","informed_by":["sha256:abc...","sha256:def..."],"spec_version":"atrib/1.0","timestamp":1743850000000}
// Record with provenance_token (genesis-record-only):
{"chain_root":"sha256:7e1f4a...","content_id":"sha256:3f8a2b...","context_id":"4bf92f3577b34da6a3ce929d0e0e4736","creator_key":"ABC...","event_type":"https://atrib.dev/v1/types/tool_call","provenance_token":"22-char-base64url","spec_version":"atrib/1.0","timestamp":1743850000000}
// Record with timestamp_granularity (coarsened-timing posture):
{"chain_root":"sha256:7e1f4a...","content_id":"sha256:3f8a2b...","context_id":"4bf92f3577b34da6a3ce929d0e0e4736","creator_key":"ABC...","event_type":"https://atrib.dev/v1/types/tool_call","spec_version":"atrib/1.0","timestamp":1743850080000,"timestamp_granularity":"min"}
// Record with salted-commitment posture (args_salt + result_salt revealed):
{"args_salt":"base64url16+bytes","chain_root":"sha256:7e1f4a...","content_id":"sha256:3f8a2b...","context_id":"4bf92f3577b34da6a3ce929d0e0e4736","creator_key":"ABC...","event_type":"https://atrib.dev/v1/types/tool_call","result_salt":"base64url16+bytes","spec_version":"atrib/1.0","timestamp":1743850000000}
// Transaction record signing input (signers array set to []; signature omitted):
{"chain_root":"sha256:7e1f4a...","content_id":"sha256:3f8a2b...","context_id":"4bf92f3577b34da6a3ce929d0e0e4736","creator_key":"ABC...","event_type":"https://atrib.dev/v1/types/transaction","signers":[],"spec_version":"atrib/1.0","timestamp":1743850000000}
// Notes:
// JCS sorts keys lexicographically (UTF-8 code-point order). No whitespace. No trailing newline.
// Absent field vs explicit empty value are different: a record without informed_by and one
// with "informed_by":[] produce different canonical forms and therefore different signatures.
// Always omit optional fields when not present.
// JCS field-order positions for the new optional fields (verify against your implementation):
// args_salt, chain_root, content_id, context_id, creator_key, event_type, informed_by,
// provenance_token, result_salt, session_token, signers, signature, spec_version,
// timestamp, timestamp_granularity
// The informed_by array contents MUST be sorted lexicographically by hex string per §1.2.5;
// agent-side ordering would otherwise destabilize signatures.
// For transaction records, all signers in the signers array sign over identical bytes:
// the JCS form with signers:[] (empty array) and the top-level signature field omitted.Implementation Warning: timestamp precision** The timestamp field MUST be a JSON integer (no decimal point, no exponent notation) representing milliseconds. A timestamp of 1743850000000 serializes as the integer 1743850000000 in JCS, not as 1.74385e12 or "1743850000000". Incorrect serialization will produce a different signing input and cause signature verification to fail.
1.4 Signing and Verification
atrib uses Ed25519 (RFC 8032, §5.1) for all attribution record signing. Ed25519 provides compact signatures (64 bytes), fast verification, strong security, and does not require a PKI or certificate authority. Each creator generates and controls their own keypair.
1.4.1 Key Format
Creator keypairs are raw 32-byte Ed25519 keys. The public key is encoded as base64url without padding (RFC 4648 §5) for inclusion in the creator_key field. The private key is retained by the creator and never transmitted.
// TypeScript key generation (using @noble/ed25519 or Web Crypto API):
const privateKey = crypto.getRandomValues(new Uint8Array(32))
const publicKey = await ed.getPublicKey(privateKey) // 32 bytes
// base64url encode, no padding:
const creatorKey = btoa(String.fromCharCode(...publicKey))
.replace(/\+/g, '-').replace(/\//g, '_').replace(/=/g, '')
// → 43-character string1.4.2 Signing Procedure
To sign an attribution record, an implementation MUST:
Step 1: Construct the attribution record with all fields populated except signature.
Step 2: Remove the signature field and apply JCS serialization (§1.3) to obtain the signing input bytes.
Step 3: Compute the Ed25519 signature over the signing input bytes using the creator's private key, following RFC 8032 §5.1.6 (Pure EdDSA, no prehashing).
Step 4: Encode the 64-byte signature as base64url without padding. Set this as the signature field on the record.
// Signing (TypeScript pseudocode):
function signRecord(record: AtribRecord, privateKey: Uint8Array): AtribRecord {
const { signature: _, ...unsigned } = record
const canonical = jcs(unsigned) // RFC 8785
const sigBytes = ed25519.sign(canonical, privateKey) // RFC 8032 §5.1.6
const sigEncoded = base64url(sigBytes) // no padding, 86 chars
return { ...record, signature: sigEncoded }
}1.4.3 Verification Procedure
To verify an attribution record, an implementation MUST:
Step 1: Decode creator_key from base64url to obtain the 32-byte Ed25519 public key. Reject if the decoded length is not 32 bytes.
Step 2: Decode signature from base64url to obtain the 64-byte signature. Reject if the decoded length is not 64 bytes.
Step 3: Remove the signature field from the record and apply JCS serialization to obtain the verification input bytes.
Step 4: Verify the signature against the verification input bytes using the decoded public key, following RFC 8032 §5.1.7. Reject if verification fails.
Step 5: Verify that spec_version is "atrib/1.0". Reject if not.
Step 6: Verify that event_type is a syntactically-valid absolute URI per §1.4.5. Reject if not. The URI need not be in atrib's normative set; an extension URI passes this check. Recognition (whether the URI is in atrib's normative set or in a known extension namespace) is informational and does not gate verification.
Step 7: Verify that timestamp is not more than 5 minutes in the future. Reject if so.
Step 8: Verify that context_id is exactly 32 lowercase hex characters. Reject if not.
A record passes verification if and only if all eight steps succeed. A partial verification is not valid.
1.4.4 Test Vector Validation
All implementations of Ed25519 signing and verification MUST be validated against the Wycheproof test vectors for EdDSA (github.com/C2SP/wycheproof, testvectors_v1/eddsa_verify_test.json) prior to production deployment. Any test vector marked "result": "invalid" that an implementation accepts is a security defect. Any test vector marked "result": "valid" that an implementation rejects is a compatibility defect.
Implementations MUST also pass the offline adversarial signing corpus in spec/conformance/1.4/ (D101). The offline corpus is the default CI floor for malformed atrib record shapes, bit-flipped signatures, wrong creator keys, and JCS optional-field ordering. The live Wycheproof check remains the upstream compatibility check.
Note (Key Rotation): Key rotation is normatively defined in §1.9 (D033).
1.4.5 event_type URI Validation
This section defines the syntactic and structural validation that the event_type URI MUST satisfy. The validation is independent of whether the URI is in atrib's normative set or a consumer extension namespace; both must satisfy these rules.
Required form. The event_type value MUST be an absolute URI per RFC 3986 §4.3:
absolute-URI = scheme ":" hier-part [ "?" query ]In practice this means:
- The value MUST contain a scheme (e.g.,
https,urn) followed by:. Relative references (/types/tool_call), bare tokens (tool_call), and empty strings are invalid. - The scheme MUST consist of letters, digits,
+,-, or.and MUST start with a letter, per RFC 3986 §3.1. - For the
httpsscheme (the form atrib normative URIs use), the URI MUST have a non-empty authority component (host). - The URI MUST NOT contain a fragment (
#...). Fragments are reserved for future use; including one invalidates the record. - The URI MUST be at most 256 octets in its UTF-8 encoding. Longer URIs are rejected. This bound is a defense against pathological inputs and is well above any reasonable URI length.
Recommended discipline (not enforced). Consumers minting extension URIs SHOULD:
- Use a domain or
urn:namespace they own, so the URI identifies a stable owner. atrib does not validate ownership. - Use a versioned path (e.g.,
https://example.com/atrib/v1/types/observation) so the URI's semantics can evolve under new versions without breaking earlier records. - Publish a human-readable schema document at the URI (or at a related URL) so verifiers that want to interpret the type's content can resolve it. atrib does not require resolution to succeed; resolution is opt-in.
- Treat URIs as opaque identifiers. Two URIs that differ in any byte (including trailing slashes, case, or query parameters) are distinct types. atrib does not normalize URIs before comparison.
Validation procedure. Given a candidate URI string U:
- Decode
Uas UTF-8. If decoding fails, reject. - Verify
U.length <= 256octets. If not, reject. - Verify
Ucontains a:separating a non-empty scheme from a non-empty hier-part. If not, reject. - Verify the scheme matches the production
ALPHA *( ALPHA / DIGIT / "+" / "-" / "." ). If not, reject. - If the scheme is
httporhttps, verify the URI contains a non-empty host (between the//and the next/,?, or end of string). If not, reject. - Verify
Udoes not contain#. If it does, reject.
A URI passing all six steps is syntactically valid for use as event_type. atrib normative URIs all pass these checks; conformance fixtures (§spec/conformance/1.4-extension/) include both passing and failing examples for verifier testing.
Recognition versus validation. Validation per this section determines whether a record is structurally well-formed and signature-verifiable. Recognition (whether the URI is in atrib's normative set, in a known extension namespace, or completely unknown) is a separate concern handled at the application layer. Verifiers MAY surface recognition as informational metadata in their output (event_type_recognized, event_type_namespace, etc.) but MUST NOT use recognition to gate verification.
1.4.6 Signing Key Isolation for Sandboxed Execution
When a producer signs records for an agent running inside a sandboxed execution environment, the Ed25519 private key MUST NOT be reachable from that sandbox. The producer MUST hold the key in a host signer process, host service, HSM, secure enclave, or equivalent boundary outside the sandbox, and expose only a request-signature interface to sandboxed code.
The signer boundary MUST control creator_key and signature for standard records. For transaction records, it MUST control the local creator's signers[] entry per §1.7.6. A signer MUST reject or overwrite any sandbox-supplied values for signer-controlled fields before canonicalization. Rejecting is RECOMMENDED because it makes boundary violations visible during testing and audit.
The signer process MUST perform §1.3 canonicalization and §1.4.2 signing itself. For transaction records, it MUST sign the §1.7.6 cross-attestation bytes. The sandbox MAY propose unsigned record fields and sidecar context, but it MUST NOT produce the signature or directly access key bytes.
The host signer SHOULD run host policy before signing. Policy can deny records based on tool name, sandbox identity, requested event type, capability envelope, operator approval state, or other host-local inputs. Policy denial is not an atrib verification failure; it means no atrib record was produced.
The host signer MAY also submit the signed record to the log and return the resulting proof bundle. At minimum, it MUST return the signed record or record_hash to the sandbox so the sandbox can propagate context per §1.5.
This requirement applies unconditionally to principal keys; certified run-key seeds MAY be provisioned into a sandbox per the narrowed rule in §1.11.9. It otherwise applies only when a producer composes atrib with sandboxed execution. Existing non-sandboxed producers MAY continue to hold the key in process, subject to their own host threat model. Key isolation does not certify that the sandboxed agent's request was truthful; it prevents sandbox code from directly minting records under the agent's key without crossing the host signer boundary.
1.5 Context Propagation
For attribution chains to form, context must travel between hops, from the agent that initiates a session through every tool it calls. This section defines the propagation mechanism for each supported transport.
1.5.1 context_id: The Session Anchor
The context_id is the join key that connects all attribution records in a session to each other and to the transaction event that closes it. Without it, records are isolated facts. With it, they form a graph.
The context_id MUST be 32 lowercase hexadecimal characters. When derived from a W3C traceparent, it uses the trace-id field. A caller may instead supply a stable correlation context through the runtime's explicit context interface. A producer MUST NOT replace an explicit context merely because a transport request has another trace-id.
// traceparent header:
traceparent: 00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01
// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
// this 32-char segment is context_id
context_id = "4bf92f3577b34da6a3ce929d0e0e4736"Without an explicit context, implementations SHOULD reuse the session's existing trace-id. A runtime without one SHOULD generate a cryptographically random 16-byte context and may carry it into OTel spans. Context is a correlation aid, not a durable invocation, execution, delivery, or application-object identifier. The orphan rule below still applies.
When a producer is asked to sign a record but receives no context_id from any source (no inbound atrib token, no traceparent, no caller-supplied value, no runtime-side session identifier), the producer MUST synthesize a fresh random context_id and emit a genesis record under it. The producer MUST NOT consult its local mirror's most-recent record to inherit a context_id from another session, that absorbs orphan records into whichever session was at the mirror tail and produces unrecoverable session conflation. The producer SHOULD surface the orphan provenance to operators so the upstream runtime miswire can be fixed; the reference implementation marks orphans inheritedFrom = 'fresh-orphan' for downstream filtering. See D072 for the rationale + alternatives.
1.5.2 HTTP Transport: tracestate
When attribution context is propagated over HTTP, it MUST travel in the tracestate header, as an entry with the key atrib. The tracestate format follows W3C Trace Context Level 2 (www.w3.org/TR/trace-context-2/).
The value of the atrib tracestate entry is a compact reference token, not a full attribution record. The token format is:
token = base64url(record_hash_bytes) + "." + base64url(creator_key_bytes)
// record_hash_bytes: raw 32 bytes of the SHA-256 of the JCS-canonical signed record
// (no "sha256:" prefix; raw bytes only)
// creator_key_bytes: raw 32 bytes of the Ed25519 public key of the record's creator
// Maximum length: 43 + 1 + 43 = 87 characters
// Well within the W3C tracestate per-entry limit
// Full header example:
tracestate: atrib=D4a6GHvb...ABC.XYZ...QRS,vendor2=other-valueImplementations MUST preserve any existing tracestate entries when adding the atrib entry. The atrib entry SHOULD be placed leftmost per the W3C left-most-wins convention, as the most recently updated entry.
When reading an inbound tracestate, implementations MUST extract the atrib entry if present and decode the token to recover record_hash and creator_key. The record_hash becomes the chain_root field of the next attribution record emitted in this chain. The creator_key identifies the creator of the record that produced this token.
1.5.3 HTTP Fallback: X-atrib-Chain
Some HTTP proxies, load balancers, and middleware strip unknown tracestate entries or the tracestate header entirely. When the atrib entry is absent from an inbound tracestate, implementations SHOULD check for a fallback header.
X-atrib-Chain:
// Example:
X-atrib-Chain: D4a6GHvb...ABC.XYZ...QRSImplementations SHOULD set both tracestate: atrib=... and X-atrib-Chain: ... on outbound requests. Implementations MUST prefer the tracestate entry over the fallback header when both are present.
1.5.3.1 Context ID Header: X-atrib-Context
For HTTP-transport payment protocol integrations (§1.7), the agent MUST propagate the session's context_id as the X-atrib-Context HTTP header on outbound requests that may trigger transaction events. The header value is the raw 32-character lowercase hexadecimal context_id, not the propagation token.
This header is distinct from X-atrib-Chain (which carries the propagation token) and serves a different purpose: it embeds the session anchor in HTTP requests so that transaction events (ACP checkout, x402 payment, MPP receipt) can be linked back to the attribution session.
Implementations MUST set X-atrib-Context on any outbound HTTP request to a URL listed in the agent's serverUrls configuration. The header name is case-insensitive per RFC 7230.
1.5.4 MCP Transport: params._meta
MCP messages do not have HTTP headers. Attribution context MUST be propagated inside the params._meta property bag of MCP request messages, following the OTel MCP Semantic Conventions (opentelemetry.io/docs/specs/semconv/gen-ai/mcp/).
Implementations MUST inject both standard OTel context and the atrib token into params._meta:
{
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"name": "search_web",
"arguments": { "query": "..." },
"_meta": {
"traceparent": "00-4bf92f35...-00f067aa...-01", // W3C traceparent
"tracestate": "atrib=D4a6GHvb...ABC.XYZ...QRS", // atrib token
"baggage": "atrib-session=" // if cross-trace session (see §1.5.5)
}
}
}This propagation format is now standardized by the MCP specification (SEP-414 documents the W3C Trace Context keys traceparent, tracestate, and baggage inside _meta). For the negotiated, vendor-prefixed extension carriage and the canonical inbound resolution ladders, see §1.5.4.1.
For MCP over stdio transport, params._meta is the only propagation channel. There are no HTTP headers. Implementations MUST NOT attempt to inject attribution context into any other field of the MCP message.
1.5.4.1 Negotiated Extension Carriage: dev.atrib/attribution
The unprefixed params._meta convention above remains fully supported and is the normative fallback. Implementations MAY additionally negotiate the same carriage as a first-class MCP extension with identifier dev.atrib/attribution (an SEP-2133 unofficial extension under the self-sovereign dev.atrib vendor prefix). The complete extension specification — capability settings schemas for both sides, negotiation gating, receipt shape, degradation behavior, and versioning policy — is docs/extensions/dev.atrib-attribution/v0.1.md. The extension changes no signed byte of any record: it gates only discovery and carriage.
The extension reserves the _meta key dev.atrib/attribution on requests and results. The v0.1 request block carries exactly two fields; receivers MUST ignore unknown fields, and unknown fields MUST NOT set any field of any signed record:
"_meta": {
"dev.atrib/attribution": {
"token": "<§1.5.2 propagation token, ≤87 chars>",
"context_id": "<32 lowercase hex>"
}
}token is the unchanged §1.5.2 propagation token. context_id is the raw session anchor of §1.5.1, carried explicitly — the MCP-transport analog of the §1.5.3.1 X-atrib-Context header, per the explicit-carriage posture of D135. session_token continues to travel only in baggage per §1.5.5, and provenance_token remains genesis-record-only configuration per §1.2.6; neither is carried in the v0.1 block.
Canonical inbound resolution. This section is the single normative definition of MCP inbound-carrier resolution. Other sections, decisions, and derived documents MUST cite this section rather than restate rung lists. Two distinct values are resolved, so there are two ladders.
Ladder 1: propagation token. Implementations MUST resolve the inbound propagation token in this order, taking the first carrier that yields a well-formed token:
_meta["dev.atrib/attribution"].token (extension)
> _meta.atrib (unprefixed convention)
> _meta.tracestate atrib= entry (§1.5.2 / D018)
> _meta["X-Atrib-Chain"] (§1.5.3 fallback)When the extension key and a legacy carrier decode to different tokens, the extension key wins and the producer SHOULD log an atrib:-prefixed warning; a malformed extension token falls through to the next carrier (lenient parse, the D018 posture). Malformation is never an error. This ladder refines only the "inbound propagation token" rung of the §1.2.3.1 chain-root contract; the rest of that ladder (D067) is untouched, and resolveChainRoot remains the single chain-selection implementation.
Ladder 2: context identity. Implementations MUST resolve context_id in this order:
explicit context_id tool argument
> _meta["dev.atrib/attribution"].context_id
> _meta.traceparent trace-id
> D078/D083 harness env-file registry
> undefined (producer synthesizes per §1.5.1)An explicit tool argument always wins: the extension block is transport metadata, an argument is application intent; on mismatch the producer MUST use the argument and SHOULD log an atrib:-prefixed warning. An extension-block context_id that is not exactly 32 lowercase hex characters MUST be ignored (falls through), never an error. When the extension block and traceparent disagree, the extension block wins with a warning; the trace-id rung remains for callers carrying no extension block. The D078/D083 env-and-file resolution applies only when no per-request carrier resolved; its internal ordering stays defined by those decisions.
Receipts. A server MUST emit the dev.atrib/attribution result block only when the requesting client declared the extension on that request (or, on legacy protocol versions, at initialize). The receipt names a record the server has already signed locally; its log_submission field is a queue status (queued | submitted | disabled | failed), never an awaited proof — log submission stays non-blocking per §5.3.5. Signing itself is NOT gated on the client's declaration (per D100, signing does not even require log submission), and the legacy unprefixed result keys continue to be written unconditionally. The optional full record body in a receipt is safe by construction: records carry commitments, not payloads, per §8.3. Every extension behavior — capability read, ladder resolution, receipt emission — is subject to the §5.8 degradation contract: on any failure the tool result is returned byte-identical to passthrough, without the extension block and without error.
Conformance vectors for the settings schemas, gating rule, both ladders, receipt integrity, and degradation are pinned at spec/conformance/mcp-extension/; they compose with the §1.2.3.1 corpus at spec/conformance/1.2.3/multi-producer/.
1.5.5 Cross-Trace Session Continuity
OTel traces have natural boundaries: a trace ends when a session ends. In long-running agent deployments, a user may interact with an agent across multiple distinct traces, and a transaction may complete in a trace that began independently of the traces that produced the attribution records.
To bridge attribution across trace boundaries, implementations MAY generate a session_token: a stable identifier for the logical session that persists across OTel trace boundaries.
// session_token generation:
session_token = base64url(crypto.getRandomValues(new Uint8Array(16)))
// → 22-character URL-safe string, generated once per logical sessionWhen present, the session_token MUST be propagated in the W3C Baggage header (www.w3.org/TR/baggage/) under the key atrib-session, and in params._meta.baggage for MCP transport.
Attribution records that carry a session_token across trace boundaries can be grouped into the same logical session by the attribution graph query layer, even when their context_id values differ.
Note (session_token is optional): Cross-trace session linking is an optional feature. Implementations that do not generate session tokens will produce valid attribution chains within each trace. The session_token mechanism enables richer attribution graphs for deployments where transactions routinely complete in a different trace than the contributing tool calls.
Note (relationship to provenance_token): sessiontoken expresses _same logical session across trace boundaries (continuation of one task across multiple OTel contextids). For _cross-session causal anchoring (a new session that descends from a different upstream session, e.g., agent handoff, workflow continuation, webhook reaction), see §1.2.6 provenance_token. The two fields have distinct semantics and MAY coexist on the same genesis record.
1.6 Unsigned Hops and Gap Nodes
Not every MCP server in an agent's tool chain will have atrib installed. When an agent calls a tool that does not emit a signed attribution record, the chain has an unsigned hop. This is expected and MUST be handled gracefully.
An unsigned hop arises when:
- an MCP tool call completes successfully but no attribution record is received in response, and\
- the OTel span for the call is present, indicating the call occurred.
Implementations SHOULD record unsigned hops as gap nodes in the attribution graph. A gap node contains:
{
"type": "gap_node",
"tool_url": "https://tools.example.com", // from the OTel span
"tool_name": "search_web", // from the OTel span
"context_id": "4bf92f3577b34da6a3ce929d0e0e4736",
"timestamp": 1743850000000,
"signed": false
}Gap nodes are part of the attribution graph. They are visible in graph queries. They carry a verification_state of unsigned (the lowest verification state) because no signature exists to verify. Their presence does not invalidate the chain or prevent settlement recommendations from being generated. What an unsigned node means for attribution weight is a question for the policy layer (§4), not for this section, which defines only the record format and what constitutes a gap node.
A creator who has not signed their contribution has not asserted a claim. The gap node preserves the fact that an unsigned hop occurred, making it visible to any party who inspects the graph, rather than silently excluding it.
1.7 Transaction Event Hooks
The transaction event closes the attribution loop: when tool calls converge on a purchase, a transaction record anchors the session's graph. This section retains the boundary pieces that stay core: the transaction event type itself (§1.2.4) and the cross-attestation requirement (§1.7.6).
The per-rail detection hooks, which define what byte pattern in a response constitutes a payment completion for ACP, UCP, x402, MPP, AP2, and a2a-x402, moved to the atrib Payments Profile §2 per D147. The profile also carries the linking mechanism (embedding the context_id in transaction metadata at checkout initiation) and the SDK detection contract. Rail churn lands in the profile's version history, not this specification's.
1.7.1 ACP (Agentic Commerce Protocol)
Moved to the atrib Payments Profile §2.1 per D147. This anchor is stable; the section number is not reused.
1.7.2 UCP (Universal Commerce Protocol)
Moved to the atrib Payments Profile §2.2 per D147. This anchor is stable; the section number is not reused.
1.7.3 x402
Moved to the atrib Payments Profile §2.3 per D147. This anchor is stable; the section number is not reused.
1.7.4 MPP (Machine Payments Protocol)
Moved to the atrib Payments Profile §2.4 per D147. This anchor is stable; the section number is not reused.
1.7.5 AP2 and a2a-x402
Moved to the atrib Payments Profile §2.5 per D147. This anchor is stable; the section number is not reused.
1.7.6 Cross-attestation requirement for transaction records
This subsection is normative.
Transaction records (event_type = https://atrib.dev/v1/types/transaction) are the highest-stakes record type in this specification. The payments profile §8 calculation is normatively gated on this URI; settlement decisions follow from the records' content. To prevent a single compromised key from fabricating arbitrary transactions, transaction records MUST carry signatures from at least two independent parties.
Required field on transaction records. Transaction records MUST carry a signers field. Format:
"signers": [
{
"creator_key": "agent-key-base64url",
"signature": "Ed25519-sig-base64url"
},
{
"creator_key": "counterparty-key-base64url",
"signature": "Ed25519-sig-base64url"
}
]The legacy top-level signature field is OPTIONAL on transaction records and SHOULD be omitted when signers is present. When both are present, the top-level signature is informational and MUST NOT be double-counted toward the cross-attestation minimum.
Signature canonical bytes. Each signature in signers covers the JCS-canonical serialization of the complete record with the signers array set to [] (empty) and the top-level signature field omitted. All signers sign over the same bytes; verifiers confirm each signature against its corresponding creator_key.
Record creator signature. When a transaction record uses signers[], the record's base signature check MUST require at least one valid signer entry whose creator_key equals the record's top-level creator_key. Other valid signer entries count toward cross-attestation, but they do not validate the record on behalf of its creator.
Minimum required signers. atrib's normative minimum is 2 distinct verified signer keys: typically the agent that initiated the transaction and the counterparty (the merchant or settlement party). Duplicate signer entries from the same creator_key MUST NOT inflate the verified signer count. Records with fewer than 2 distinct verified signer keys MUST be flagged by verifiers with cross_attestation_missing: true.
Trusted signer composition. A verified signer key is not necessarily a trusted signer key. The verified signer count above establishes that at least two distinct keys signed the same canonical bytes; it does NOT establish that those keys belong to independent parties the verifier trusts. Two keys an attacker controls satisfy the 2-distinct-verified-key minimum without adding independent authority (a corroboration, or Sybil, posture). A verifier whose threat model requires non-malleable transaction authority MUST require at least 2 distinct verified signer keys that are also members of the verifier's trust set, and MUST NOT treat the verified signer count alone as sufficient. When a verifier is supplied a trust set, it SHOULD surface how many of the distinct verified signer keys are trusted and flag records that meet the verified-key minimum but not the trusted-key minimum. When a verifier is NOT supplied a trust set, it SHOULD surface that trust was not evaluated, so that a consumer gating a consequential action cannot silently read the verified signer count as trusted authority. Like cross_attestation_missing, this trust signal MUST NOT by itself invalidate the record; it is consumer-side policy layered on the verified count. The trust-set mechanism is the same trusted_creator_keys used by handoff claim verification (§5.5.5). Verified-but-untrusted signer keys are the Sybil channel that a verified count alone does not rule out (§8.7.2 Layer 5).
Counterparty key discovery. Counterparty keys are discovered out-of-band: via the §6 directory lookup of the merchant's published identity, via payment-protocol-specific channels (x402 facilitator metadata, ACP order envelope, AP2 receipt issuer or verifier key material, and so on), or via consumer-arranged key exchange. atrib does not specify the discovery mechanism; the spec only requires the keys be present in the record.
Other event types unaffected. This requirement applies only to transaction. tool_call, observation, and extension records continue to use single-signer signatures via the top-level signature field.
See D052 for the design rationale and the alternatives considered.
1.8 Scope Boundaries
This section is informative.
The following topics are outside the scope of this specification. They are acknowledged here because they affect real-world deployments and inform architectural decisions.
Cross-session attribution. When a user receives a recommendation from an agent and subsequently completes a purchase in a browser session (minutes, hours, or days later), the transaction carries no attribution chain. The agent session and browser session are structurally disconnected. A partial mitigation is available via recommendation tokens: opaque identifiers the agent embeds in recommendation URLs, which a merchant can capture on conversion. A first-class solution requires persistent agent identity across sessions.
Log federation. All attribution records for a session should be submitted to the same log operator to enable complete graph queries. If contributing tools submit to different log operators, a query against one log will return an incomplete graph. A federation protocol (cross-log inclusion proof pointers) is a natural extension but is not defined here.
Key rotation. Key rotation and revocation are normatively specified in §1.9. Creators rotate keys by submitting a key_revocation record with revocation_reason: 'rotation' and a successor_key; verifiers update accordingly. The directory (§6) tracks the active key per identity claim.
Policy and settlement boundaries. Policy versioning, the dispute mechanism, the settlement webhook format, multi-transaction sessions, and agent-published policies are payments-layer topics. Their scope statements moved to the atrib Payments Profile §13.
Related Standards Work
This section is informative.
atrib is designed to complement existing standards work in identity, provenance, and agent trust. The following integration points inform architectural decisions in this specification.
DIF Trusted AI Agents Working Group. DIF's Trusted AI Agents WG is defining identity, delegation, and accountability frameworks for autonomous agents. The persistent agent identity their work provides is a prerequisite for cross-session attribution. atrib's Ed25519 creator keys are a deliberate simplification of what will eventually be expressible as agent-scoped Verifiable Credentials with delegation chains.
DIF Creator Assertions Working Group. DIF's Creator Assertions WG is defining content authenticity and provenance assertions. atrib attribution records are structurally compatible with DIF assertion formats; both use Ed25519 signing over canonical JSON. An interoperability profile could define how an atrib record can be wrapped as a DIF Creator Assertion.
C2PA (Coalition for Content Provenance and Authenticity). C2PA defines cryptographic provenance manifests for media content. atrib extends this pattern to agent interactions, where the "content" is a tool call, not a photograph. atrib records could be embedded in C2PA manifests as consequence assertions.
W3C AI Agent Protocol Community Group. The emerging work on standardizing agent-to-agent communication protocols is a natural home for atrib context propagation. The propagation mechanism (params._meta.atrib in MCP, tracestate in HTTP) is designed to be portable to any agent protocol that supports metadata propagation.
1.9 Key Rotation and Revocation
This section is normative. Per D033.
Ed25519 creator keys can be retired in three ways: routine rotation (new key replaces old), retirement (creator winds down, no successor), and compromise (key leaked or stolen). All three use the same record format. Past records signed by the retired key remain valid up to the moment of revocation; subsequent records do not.
1.9.1 Revocation Record Format
A revocation is an attribution record with event_type: 'key_revocation' and the following extra fields, in addition to the standard fields from §1.2:
| Field | Type | Required | Description |
|---|---|---|---|
revoked_key | string | Yes | Base64url-encoded 32-byte Ed25519 public key being retired. |
revocation_reason | enum | Yes | One of 'rotation', 'retirement', 'compromise'. |
successor_key | string | When revocation_reason='rotation' | Base64url-encoded 32-byte Ed25519 public key of the rotation target. |
emergency_signed_by | string | When revocation_reason='compromise' AND signature is by an emergency key | Base64url-encoded 32-byte public key of the emergency key (registered in the directory at the time of compromise). |
Canonical serialization (JCS, §1.3) sorts every field lexicographically, so the revocation fields and the OPTIONAL delegation_cert_hash (§1.11.5) and machine_statement_hash (§1.13.5) fields fall in this relative order, with the standard fields between them: creator_key < delegation_cert_hash < emergency_signed_by < machine_statement_hash < revocation_reason < revoked_key < successor_key.
1.9.2 Signing Rules
A key_revocation record MUST be signed by one of:
-
The key being retired. The
creator_keyfield equalsrevoked_key. This is the standard path forrotationandretirement. The signing proves the legitimate owner authorized the retirement. -
A pre-registered emergency key. Permitted ONLY when
revocation_reason='compromise'. Thecreator_keyfield is the emergency key's public key;emergency_signed_byMUST equalcreator_key. The emergency key MUST have been registered in a directory state anchored to the log BEFORE the revocation record's log index under the same identity claim asrevoked_key. A signer-controlled record timestamp is not registration-order evidence. This is the only path that survives the case where the legitimate owner has lost access torevoked_key. -
The principal key of a delegation certificate covering
revoked_key. Permitted per §1.11.5; the record MUST carrydelegation_cert_hashreferencing the certificate, which verifiers MUST resolve before accepting the revoker. -
The person key of a machine statement covering
revoked_key. Permitted per §1.13.5 ONLY whenrevocation_reasonis'retirement'or'compromise', with nosuccessor_key. The record MUST carrymachine_statement_hashand MUST NOT carrydelegation_cert_hash; a record carrying both, or carrying either with a value that is not a string, is malformed. Verifiers MUST resolve the referenced machine statement before accepting the revoker: it must be valid per §1.13.4, whatever its window, itsmachine_keymust equalrevoked_key, and itsperson_keymust equal the record'screator_key, each compared by the JWK'sx(§1.13.1). A verifier that cannot resolve it never accepts it; §1.9.3 says when it is rejected and when it is reported as unresolved.
A revocation signed by any other key is invalid and MUST be rejected by verifiers as 'unsigned'.
1.9.3 Verifier Semantics
When a verifier sees a valid key_revocation record at log index R retiring revoked_key:
- Records with
creator_key === revoked_keyANDlog_index >= Rare flaggedverification_state: 'revoked_after_revocation'. They MUST NOT contribute to attribution calculations (payments profile §8). - Records with
creator_key === revoked_keyANDlog_index < Rretain their originalverification_state. Past attribution remains valid. - A signing rule 4 revocation (§1.13.5) whose referenced machine statement the verifier cannot resolve is rejected as
'unsigned', unless the verifier holds another valid machine statement whoseperson_keyis the record'screator_keyand whosemachine_keyisrevoked_key. In that case the revoker has standing and only the reference is missing, so the verifier reports the record asrevocation_unresolved, applies neither branch above, and reports the standing ofrevoked_key, and of the run keys it certified under the §1.11.4 step 6 cascade, fromRon as unverifiable. A stranger who names a statement no one holds therefore changes nothing. - When
successor_keyis present, the directory's active key for the identity claim MUST be updated tosuccessor_key. Records signed by the successor inherit the identity claim that was active at the moment of rotation.
The verifier MUST scan for key_revocation records when evaluating any record signed by a key that has been retired. The directory (§6) MAY index revocations for fast lookup but the log itself is the source of truth.
1.9.4 Conformance
Implementations MUST pass all vectors in spec/conformance/1.9/:
valid-rotation: revocation signed by retired key, with successor.valid-retirement: revocation signed by retired key, no successor.valid-compromise-emergency: revocation signed by an emergency key whose directory registration was anchored before the revocation log index.invalid-wrong-signer: revocation signed by an unrelated key (rejected).invalid-emergency-not-registered: emergency-key registration was not anchored before the revocation log index (rejected).invalid-emergency-for-non-compromise: emergency-key signing attempted withrevocation_reason='rotation'(rejected).post-revocation-record: a record signed by the retired key after the revocation log index (flagged'revoked_after_revocation').pre-revocation-record: a record signed by the retired key before the revocation log index (still'signature_valid').
1.9.5 What This DOES NOT Cover
Forward secrecy of past records: an attacker who compromised revoked_key on day 100 can produce records that look legitimate under that key for the entire pre-revocation window. The verifier sees 'revoked_after_revocation' only post-revocation. A "compromise window" annotation that retroactively flags pre-revocation records is V2 work.
Operator/log-key rotation: see §2 for the log signing key. Rotating the log key invalidates all prior inclusion proofs' signatures and is a separate ADR (deferred to V2).
1.10 Per-Conversation Key Derivation (Reserved)
Reserved for the deferred D038 HKDF per-conversation key derivation text. No normative content ships in this section; see the V2 deferral list. Derivation and certification (§1.11) address different problems (cross-session unlinkability vs. scoped ephemeral authority) and are compatible: a derived key could later be certified.
1.11 Delegation Certificates
This section is normative; issuing a certificate is OPTIONAL. Per D140.
A delegation certificate is a standalone JCS-canonical object in which a principal Ed25519 key certifies an ephemeral run key with an explicit scope, expiry, and optional session binding. Records signed by the run key occupy the existing creator_key slot in both the record (§1.2.1) and the 90-byte log entry (§2.3.1). No format changes. The certificate is verifiable offline from the certificate alone; there is no deterministic linkage from a parent secret and no PKI (§1.4.1 posture).
A record signed directly by a principal is delegation depth 0: no certificate exists or is needed, and verification is byte-for-byte the §1.4.3 procedure. Every record ever signed is therefore already valid under this model, by definition. A record signed by a certified run key is delegation depth 1. Delegation never alters signature validity, graph derivation (§3.2.4), or the payments profile §8 calculation; it is attribution resolution and trust signal, exactly like D051 capability checks.
1.11.1 Certificate Format
A delegation certificate is a JSON object, canonicalized with JCS (RFC 8785, same rules as records per §1.3):
{
"cert_type": "atrib/delegation-cert/v1", // MUST; literal version discriminator
"context_id": "a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1", // OPTIONAL; 32 lowercase hex; binds the cert to one session
"not_after": 1767229200000, // MUST; Unix ms; records after this are out-of-window
"not_before": 1767225600000, // OPTIONAL; Unix ms; default 0 when absent
"principal_key": "iojj3XQJ8ZX9UtstPLpdcspnCb8dlBIb83SIAbQPb1w", // MUST; base64url 32-byte Ed25519 principal public key
"run_pubkey": "gTl3Dqh9F19Wo1Rmw0x-zMuNipG07jeiXfYPW4_Js5Q", // MUST; base64url 32-byte Ed25519 run public key
"scope": {
"tool_names": ["search", "read_email"],
"max_amount": { "currency": "USD", "value": 100 },
"cost_policy": { "model_tiers": ["standard"], "max_tokens": 500000 },
}, // OPTIONAL; §6.7.1 capability envelope schema, verbatim
"signature": "iMouU-GLdyyISG2S6fRZEEYE5brlP1x6ycuidxY4dIhneSCEKMD_irR3hrHMDg9QfK_2LNct6xPuqm0yQj2pDA", // MUST; Ed25519 by principal_key
}JCS lexicographic field order is exactly as listed: cert_type < context_id < not_after < not_before < principal_key < run_pubkey < scope < signature. Optional fields MUST be omitted, not null, when absent — presence/absence changes the canonical form and therefore the signature, mirroring the session_token rule (§1.3). The scope object reuses the §6.7.1 capability envelope schema verbatim (tool_names, max_amount, counterparties, event_types, cost_policy, expires_at); one schema, two carriers — directory-published (per-key, identity-claim cadence) and certificate-carried (per-run, issuance cadence). When scope.expires_at is present, the effective expiry is min(not_after, scope.expires_at).
1.11.2 Signing, Certificate Hash, and Depth
Signature rule (mirrors §1.4.2):
signature = base64url(Ed25519-sign(principal_seed, UTF-8(JCS(cert with signature field omitted))))Certificate hash (stable identifier):
cert_hash = "sha256:" + hex(SHA-256(UTF-8(JCS(full signed cert))))The hash is over the signed bytes, analogous to record_hash (§1.2.3). It is the key used by the §1.11.3 record field, run-key revocation (§1.11.5), sidecars, and archive evidence keys.
A certificate is valid as delegation evidence iff: both keys are well-formed per §1.4.1; run_pubkey !== principal_key (a self-certificate MUST be rejected with error self_certificate even when its signature verifies); and the signature verifies under principal_key (otherwise error principal_signature_invalid). An invalid certificate never invalidates any record; the record falls back to plain attribution to its signing key (depth 0).
Depth limit. This version permits depth ≤ 1. principal_key MUST NOT itself be a run key under another certificate known to the verifier; a chained certificate is rejected as delegation evidence (delegation_depth_exceeded) and the record falls back to depth 0. Chains are future work behind their own decision record.
1.11.3 The delegation_cert_hash Field
delegation_cert_hash (string, "sha256:" + 64 lowercase hex) is a new OPTIONAL field permitted in exactly two positions:
- Session genesis records (same genesis-only discipline as
provenance_token, §1.2.6). It commits the genesis signer's session start to the certificate covering its own run key. Non-genesis records MUST NOT carry it in this role; validators (§2.6.1) and verifiers (§5.5) treat a non-genesis occurrence the way they treat a non-genesisprovenance_token. key_revocationrecords (§1.11.5), referencing the certificate that proves the principal–run relationship.
In both positions the JCS-canonical form slots the field between creator_key (c-r) and event_type (e), consistent with §1.3. Presence/absence changes the canonical bytes: two otherwise-identical records with and without the field carry distinct signatures and distinct record hashes. Existing records never carried the field, so no existing signature is affected; new records that omit it are byte-identical to pre-delegation output.
Binding scope, single-producer sessions: for subsequent records signed by the same run key in the same context, the verifier associates them with the genesis commitment through creator_key + context_id equality and CHAIN_PRECEDES linkage back to the genesis record; cert_bound is then evaluable for the whole run.
1.11.4 Verifier Walk
Given record R and available certificate set C, the walk is offline and deterministic:
- Verify
R.signatureunderR.creator_keyper §1.4.3. Unchanged; delegation never alters signature validity. - Select certificates
c ∈ Cwithc.run_pubkey === R.creator_key. No covering certificate → depth 0: attribute toR.creator_keyas today. IfR's context genesis (signed byR.creator_key) carriesdelegation_cert_hashbut no valid covering certificate resolved, surfacedelegation_unresolved: true— signal, not invalidation, the D113 posture. A covering certificate that is invalid per §1.11.2 is rejected as evidence: the walk reports itscert_hash,cert_valid: false, and the rejection error, and falls back to depth 0. - For a valid matching
c, evaluate its window against caller-owned verifier or host time when supplied:(c.not_before ?? 0) <= trusted_time_ms <= c.not_after→in_window,time_basis: "trusted_verifier_time", andtime_trusted: true. When the caller supplies no trusted time, the verifier MAY compute the same signal againstR.timestamp, but MUST label ittime_basis: "record_timestamp_claim"andtime_trusted: false. A signer-controlled timestamp MUST NOT satisfy an acceptance policy that requires trusted expiry evaluation. An invalid caller time is labeledtime_basis: "invalid_trusted_time"andtime_trusted: false.c.context_idabsent →context_bound: null, elsec.context_id === R.context_id→context_bound; when the context genesis was signed byR.creator_keyAND carriesdelegation_cert_hash,genesis.delegation_cert_hash === cert_hash(c)→cert_bound, otherwisecert_bound: null(the standing state for run keys that joined a multi-producer context, §1.11.6). - Consult the directory (§6.3) for
c.principal_key, not the run key. Run keys never enter the directory; the expected lookup result for a run key is a non-membership proof, and a directory claim found for the run key itself is surfaced as the structural anomalyrun_key_in_directory: true. - Scope check per §6.7.2 semantics against
c.scope:in_scopewith amismatches[]list naming failed constraints (tool_names,event_types,max_amount,counterparties,cost_policy.model_tiers,cost_policy.max_tokens,expires_at). Constraints whose required record, protocol, usage, or trusted-time facts are absent MUST appear inunverifiable[];fully_evaluatedis true only when that list is empty. Missing facts never count as successful checks. When the principal's directory envelope is available,attenuation_okreports whetherc.scopeis a subset of it (a certificate granting what the principal's own envelope excludes setsattenuation_ok: false); when no directory envelope is supplied,attenuation_okisnull. All scope outputs are signals, never invalidation, per §6.7.3. - Revocation: scan for §1.9
key_revocationrecords retiring either the run key (§1.11.5) or the principal. A revoked principal cascades: its certificates are invalid as delegation evidence for records atlog_index >= Rper §1.9.3 semantics. When the only revocation covering the record is one §1.9.3 reports asrevocation_unresolved,revokedisnull.
The reference verifier accepts signed revocation records with their log indexes, verifies each record and the §1.9.2 revoker path, and derives the effective revoked-key set at the target log position. Supplying an unverified key set remains a caller-owned shortcut, not equivalent evidence.
The verifier output is an optional delegation block:
"delegation": {
"depth": 1, // 0 | 1
"principal_key": "...", // string | null (null at depth 0)
"cert_hash": "sha256:...", // string | null
"cert_valid": true, // boolean | null
"in_window": true, // boolean | null
"time_basis": "trusted_verifier_time", // trusted_verifier_time | record_timestamp_claim | invalid_trusted_time | null
"time_trusted": true, // boolean | null
"context_bound": true, // boolean | null; null when the cert has no context_id
"cert_bound": true, // boolean | null; null when no genesis delegation_cert_hash applies to this run key
"scope_check": { "in_scope": true, "fully_evaluated": true, "attenuation_ok": null, "mismatches": [], "unverifiable": [] }, // object | null; null when the cert has no scope
"revoked": false, // boolean | null
"errors": [] // e.g. "self_certificate", "principal_signature_invalid", "delegation_depth_exceeded"
}At depth 0 every certificate-derived field is null and errors is empty
(unless a covering-but-invalid certificate was rejected, per step 2). No field
in this block affects record validity. Consumers that gate action acceptance
SHOULD require time_trusted: true, in_window: true,
scope_check.fully_evaluated: true, scope_check.in_scope: true, and the
applicable revocation result.
Ambiguity rule. If two valid certificates from different principals cover the same run key in overlapping windows, the verifier MUST surface both and set delegation_ambiguous: true rather than choosing. Choosing would be interpretation; surfacing is fact.
Transaction interaction (§1.7.6). The ≥2-distinct-verified-keys rule counts raw keys and is unchanged (D052). A new signal, signers_share_principal: true, fires when two signer keys resolve to the same principal through certificates; whether policy requires distinct principals is consumer policy, not protocol.
1.11.5 Run-Key Revocation
Run-key retirement reuses §1.9 rather than minting a parallel mechanism. This section adds signing rule 3 to §1.9.2:
- The principal key of a delegation certificate covering
revoked_key. Akey_revocationrecord retiring a run key MAY be signed by the principal:creator_keyis the principal's public key, and the record MUST carrydelegation_cert_hash(§1.11.3) referencing the certificate that proves the principal–run relationship. Verifiers MUST resolve that certificate — it must be valid per §1.11.2, itsrun_pubkeymust equalrevoked_key, and itsprincipal_keymust equal the record'screator_key— before accepting the principal as an authorized revoker. A revocation failing any of these checks is invalid and MUST be rejected per the existing §1.9.2 rule ("rejected by verifiers as'unsigned'"); records signed byrevoked_keythen keep their verification state.
The §1.9.1 canonical-order note extends accordingly: when the field is present the order is creator_key < delegation_cert_hash < emergency_signed_by < revoked_key. §1.9.3 applies unchanged to the revoked run key: records at log_index >= R flag revoked_after_revocation; earlier records keep their state. revocation_reason is 'compromise' for a burned sandbox, 'retirement' for clean early wind-down; not_after expiry remains the primary bound and revocation is the early-kill path. No directory tombstone exists for run keys because run keys are not in the directory; the log is the sole source of revocation truth, as §1.9.3 already states.
1.11.6 Multi-Producer Contexts
Under §1.2.3.1 / D067 chain composition, a certified run key routinely joins a context whose genesis record was signed by a different producer key. That run key then owns no record permitted to carry delegation_cert_hash. For such records the certificate is supplied out-of-band through the §1.11.8 carriers and cert_bound remains null permanently, while cert_valid, in_window, context_bound, scope checks, and revocation checks are all unaffected. delegation_cert_hash is a strengthening bind available exactly to the producer that signs a context's genesis record; it is never a prerequisite for delegation resolution. Producers whose run key joins an existing chain SHOULD set the certificate's context_id (giving context_bound: true) as the substitute session binding.
1.11.7 Directory Posture
The directory (§6) maps principals only. Run keys MUST NOT be published as identity claims: the directory is bounded by operators, not runs; AKD insertion cost and audit surface do not scale with run cadence; and run-key absence proofs are the expected lookup result. §6.7.4 is unchanged for principals; run scopes never rotate — issue a new certificate instead.
1.11.8 Carriage
Three carriers; any subset is sufficient for a verifier that obtains the certificate somehow, and verifiers additionally accept caller-supplied certificates out-of-band:
- Local sidecar: producers write the full certificate to
_local.delegation_certin the mirror envelope (§5.9.3). Signed bytes unchanged; sidecar-only, like_local.producer. - Archive evidence: producers configured for archive submission attach the certificate as an evidence object keyed by
cert_hashthrough the §2.12 evidence API (D111). Certificates contain only public keys, a scope, and timestamps — no salted-commitment exposure concern. - Evidence envelope profile: the verifier-facing carrier is the
delegation-certificateprofile of the §5.5.7 universal evidence envelope (https://atrib.dev/v1/evidence/delegation-certificate, the URI that section reserves for this decision). The profile payload is the certificate object (JCS hash rule;ref.record_hashnever applies — a certificate is not a record) or itscert_hashas a payload reference; the profile's verifier facts are the §1.11.4 walk outputs. No legacy §5.5.6 protocol string exists or may be introduced for delegation; the legacy string set is frozen.
1.11.9 Key Isolation Interaction
§1.4.6 is narrowed as follows: principal keys MUST NOT be reachable from sandboxed execution, unconditionally. Run-key seeds MAY be provisioned into a sandbox when covered by a delegation certificate whose not_after, scope, and (RECOMMENDED) context_id binding the host accepts for that run. The in-sandbox key is then worth one scoped, expiring, individually revocable run rather than the operator's durable identity. The signer proxy (§9.7) remains RECOMMENDED hardening — it uniquely provides a pre-signing host policy gate and prevents mid-window misuse — but is no longer the only conforming topology. This is a deliberate relaxation of the D102 MUST, recorded as a v2 note on that decision.
1.11.10 Producer Requirements
Producers that opt in stamp delegation_cert_hash on the genesis record only when they sign the context genesis (per §1.11.6, a producer joining an existing chain writes no genesis and stamps nothing), write _local.delegation_cert, and include the certificate in archive submission when the archive path is configured. Degradation (§5.8): every failure (unreadable certificate, malformed JSON, expired certificate at startup, or principal-signature mismatch) is caught and logged with the atrib: prefix. Signing proceeds without the genesis field. Records remain valid; the verifier simply sees an uncertified run key (delegation_unresolved at worst). Delegation failures never block the primary tool call.
1.11.11 Conformance
Implementations MUST pass all vectors in spec/conformance/delegation-certificates/. The corpus covers six case families: certificate canonical form and signing (full/minimal optional-field forms, self-certificate, wrong-signer), the §1.11.4 verifier walk (valid, expired, scope mismatch as signal, cost-policy scope with pinned usage vectors, wrong principal signature, run-key mismatch with delegation_unresolved), depth-0 byte-identity against spec/conformance/1.4/signing-vectors.json, delegation_cert_hash lex-slotting with distinct signatures for presence vs. absence, run-key revocation extending spec/conformance/1.9/ (authorized rule-3 revocation and the not-covering rejection), and the D067 cert_bound: null posture. The generator is packages/log-dev/scripts/generate-conformance-delegation-certificates.ts; the reference implementation is packages/verify/test/conformance-delegation-certificates.test.ts. Two implementations given the same record and certificate set MUST produce identical delegation blocks.
1.11.12 What This DOES NOT Cover
Delegation depth > 1 (chains are rejected with delegation_depth_exceeded; future decision record). Principal-level aggregation in the payments profile §8 calculation (unchanged; a future policy wanting it must take the certificate set as an explicit input, preserving the pure-function invariant, behind its own decision record). Graph changes of any kind (no new edge types; nodes remain keyed by creator_key; aggregation-by-principal is verifier output and product presentation). Truthfulness: a certificate certifies that a principal authorized a run key, not that the run key's records are honest. The §8.7 limit applies in full.
1.12 Source-bound evidence statements
This section is normative.
The source-bound evidence contract defines normative private-body schemas, type URIs, exact request bindings, source policies, and independent receiver conclusions. These URIs use the existing extension event byte. This section allocates no new log-entry byte or signature format. Ordinary cognitive records do not acquire an action lifecycle by implication.
Receivers MUST compute the body commitment from UTF-8 JCS of the supplied opening,
without first dropping or normalizing properties through schema validation.
Validation MUST preserve JSON values permitted by RFC 8785 in parameters and
state. See D189
for the carrier, compatibility and degradation boundaries.
The offline conformance corpus supplies canonical receiver JSON vectors, jointly normative with Appendix A. Its C19 executor cases are non-normative examples of one configured host policy. They define neither protocol nor receiver conformance requirements. Operational producer obligations require separate validation.
Signing, retention, disclosure and submission are separate operations. An evidence producer MAY retain a signed record and opening privately without submitting either to a public service. A submission uses §2 unchanged. An unsubmitted record MUST NOT be represented as log-included. Checkpoint inclusion covers its specified records, not every action at a source.
1.13 Person and Machine Statements
This section is normative; issuing a statement is OPTIONAL. Per D193, D194, D195 and D196.
A person key is an Ed25519 key that stands for one person across their machines. A machine key is an Ed25519 key made on one machine and kept for that machine's life. A person certifies each machine key with a machine statement, which the machine key co-signs, and the machine key then acts as the §1.11 principal for the run keys it certifies. A person's chain starts at a genesis person statement and links each later person statement and person rotation to the one before it. Each link names the person's recovery key, which must co-sign the next link, so changing the recovery key or rotating the person key needs the recovery key in force.
An approval key is a P-256 key that never leaves the device it was made on: a Secure Enclave key in a signed app, or a WebAuthn passkey. The person certifies each with an approval-key statement (§1.13.8), which the chain's current recovery key co-signs, and the approval key then signs the person's yes on application actions. Any approval key the person certified may also take away: revoke a machine or another approval key, or freeze the person key (§1.13.9). Taking away is one way: revoking the key that signed a take-away does not undo it. A tool that needs a person-key signature asks a holder of the key over a local socket (§1.13.11).
A machine statement is not a delegation certificate. It delegates no authority under §1.11, it does not count toward the §1.11.2 depth limit, and a machine key named in one is a depth-0 principal for that walk. The statement binds a name and an owning person to a key, and limits what the run keys under that key may be certified for. Records, log entries, graph derivation and the payments profile §8 calculation do not change. Every output of the person walk (§1.13.7) is a signal; none alters record validity.
1.13.1 Common Rules
Statements use JOSE (D194). Every statement is a JWS (RFC 7515) in the General JWS JSON Serialization (RFC 7515, section 7.2.1), so that any JOSE library can check its signatures:
{
"payload": "...", // b64u(UTF-8(JCS(claims)))
"signatures": [
{ "protected": "...", "signature": "..." }, // one entry per signer role, in role order
],
}In this section b64u(x) is the unpadded base64url encoding of the bytes x. Every base64url value MUST be in canonical form, so that re-encoding the decoded bytes gives the same string. A non-canonical payload, protected or JWK x is malformed. A signature that is not canonical or not 64 bytes, like a kid that is not the signer's thumbprint, makes its entry not by any key, which reports that role's signature code.
The statements are a profile of the General JWS JSON Serialization (RFC 7515, section 7.2.1), stricter than it in three places so that every verifier reaches the same verdict on the same bytes: members RFC 7515 says to ignore are malformed here, the protected header must be JCS, and typ is compared as an exact string, where RFC 7515 section 4.1.9 compares media types without regard to case and with an implied application/ prefix.
- Envelope. A statement object has exactly the members
payloadandsignatures, plusassertionswhen a passkey signs it.signaturesis an array whose entries each have exactlyprotectedandsignature; it is empty only when every signer role is inassertions.assertions, when present, is a non-empty array of WebAuthn assertions (below). Any other member is malformed. An unprotectedheadermember is not allowed, so every header parameter is signed. - Claims. The claims are a JSON object whose fields each subsection defines.
payloadMUST beb64u(UTF-8(JCS(claims)))(§1.3): payload bytes that are not the JCS form of the object they decode to are malformed, and so are payload bytes that start with a byte order mark. Optional fields MUST be omitted, not null, when absent. - Keys in the claims are Ed25519 public keys as JWKs (RFC 7517, RFC 8037) with exactly the members
crv: "Ed25519",kty: "OKP"andx, wherexis the canonical base64url 32-byte key. Any other member, a privatedabove all, makes the statement malformed. A key'sxis its §1.4.1 form, the string records carry increator_keyand certificates inprincipal_key, and keys are compared byx. This section writes "a statement'sperson_key" for that key'sxwhen it compares keys or reports one. An approval key is instead a P-256 JWK (RFC 7518, section 6.2) with exactlycrv: "P-256",kty: "EC",xandy, each coordinate the canonical base64url of 32 bytes, naming a point on the curve. Approval keys are compared and reported by their RFC 7638 thumbprint,b64u(SHA-256(UTF-8('{"crv":"P-256","kty":"EC","x":"' + x + '","y":"' + y + '"}'))). - Protected header. Each entry's protected header is
b64u(UTF-8(JCS(h)))for an objecthwith exactlyalg,kidandtyp. Header bytes that are not the JCS form of the object they decode to, including a header that names a member twice, are malformed.algMUST beEd25519, the fully specified identifier of RFC 9864, for an Ed25519 signer, andES256(RFC 7518) for an approval key; the polymorphicEdDSAis not accepted.kidis the signer's RFC 7638 JWK Thumbprint,b64u(SHA-256(UTF-8('{"crv":"Ed25519","kty":"OKP","x":"' + x + '"}')))for an Ed25519 key and the approval-key thumbprint above for a P-256 key.typMUST be the same in every entry and MUST be the value the claims'statement_typemaps to:atrib-person-statement+json,atrib-person-rotation+json,atrib-machine-statement+json,atrib-machine-revocation+json,atrib-approval-key-statement+json,atrib-approval-key-revocation+json,atrib-person-freeze+jsonoratrib-person-unfreeze+json, compared as exact strings. These media type names are not registered. - Signatures. Each entry's
signatureisb64u(Ed25519-sign(seed, ASCII(protected + "." + payload))), the RFC 7515 signing input (section 5.1), or for an approval key the ES256 signature over the same input as the 64-byteR || Sof RFC 7518 section 3.4. A statement has exactly one entry per signer role, insignaturesor, for a passkey, inassertions, each array in the role order its subsection gives; another count is malformed. An entry is by a key iff itskidis that key's thumbprint and its signature verifies under that key. - Assertions. A passkey cannot sign the JWS signing input, so it signs a WebAuthn assertion (WebAuthn Level 3) carried beside the JWS, whose challenge is the statement challenge
SHA-256(UTF-8("atrib-statement-assertion/v1") || 0x00 || payload bytes). The tag keeps the bytes a passkey signs for a statement from ever being the challenge of another format. Each entry ofassertionshas exactlyauthenticator_data,client_data_jsonandsignature, the base64url of the bytes the authenticator returned, andkid, the approval key's thumbprint. An assertion is by an approval key for a relying party IDrp_idand an origin listoriginsiffkidis the key's thumbprint; its three byte fields are canonical base64url;authenticator_datais at least 37 bytes, starts withSHA-256(UTF-8(rp_id)), and its flags byte has user presence (0x01) and user verification (0x04) set;client_data_jsonis UTF-8 with no byte order mark and parses as a JSON object that names no member twice, whosetypeis"webauthn.get", whosechallengeis the base64url of the statement challenge, whoseoriginis exactly one oforigins, whosecrossOriginis absent orfalseand which has notopOrigin; andsignature, a strict DER-encoded ECDSA signature, verifies under the key overauthenticator_data || SHA-256(client_data_json)(WebAuthn Level 3, section 7.2). An assertion that fails any of these is not by the key, which reports that role's signature code. A signature with a highSis accepted, here and inES256entries, since neither WebAuthn nor RFC 7518 requires a low one. A verifier that does not yet knowrp_idandoriginschecks the rest, and the check that knows them completes it. A signature counter and the backup flags are not checked: a synced passkey cannot be told apart, and receivers record them only if they choose. A statement whose every role is an assertion has an emptysignaturesarray, and so no protected header to check. statement_typeis a literal discriminator inside the claims. A verifier MUST reject a statement whosestatement_typeis not one this section defines, and a statement carrying a claim its type does not define (unknown_field). The type is in the payload and in every signed header, so a statement can never be passed off as a hub item, a delegation certificate or another statement type signed by the same key.counteris a non-negative safe integer.nbfandexpare NumericDate values (RFC 7519, section 2), restricted to non-negative integer seconds whose value × 1000 is a safe integer. RFC 7519 also allows fractional seconds; this profile does not. Statements reuse these registered JWT claim names but are not JWTs, which RFC 7519 limits to the compact serialization. Where this section compares them with record timestamps, in milliseconds, it multiplies them by 1000.- Statement hash:
"sha256:" + hex(SHA-256(payload bytes)), the SHA-256 of the exact bytespayloaddecodes to. The hash names the claims, not one set of signatures over them: copies of a statement that differ in their signature entries have the same hash. Objects with the same statement hash are one statement, which is valid iff one of them is valid. When one copy is valid, the other copies add no error codes; when none is, the statement reports the union of its copies' codes. A verifier MUST check each object before it merges copies, and MUST keep every copy that is valid on its own, so that a copy with a broken signature never hides a valid one. A check that depends on other statements, such as the §1.13.7 recovery-entry check, passes when it passes for any kept copy.prevandmachine_statement_hashresolve only to a valid statement. - Names. A
machine_nameMUST match^[a-z0-9][a-z0-9-]{0,31}$. A name is a label on a key, never the identity: receivers check every claim against the key the name is signed onto, and a name is unique only among one person's live machines. - Trust. The walk takes the person's anchor, the statement hash of their genesis, from a pin, a directory claim (§6; a directory field for it follows in a later revision) or caller policy, as it takes any trusted key. Pinning a person means pinning the anchor, not only the person key: the anchor also fixes the first recovery key, which a holder of the person key alone cannot change.
1.13.2 Person Statement
Claims, typ atrib-person-statement+json; signer roles: the person key, then the recovery key described below.
{
"counter": 4, // MUST; 0 for a genesis, otherwise greater than the counter of prev
"person_key": { "crv": "Ed25519", "kty": "OKP", "x": "..." }, // MUST; signs the statement
"prev": "sha256:...", // MUST except on a genesis; hash of the chain link this one follows
"recovery_key": { "crv": "Ed25519", "kty": "OKP", "x": "..." }, // MUST; the recovery key in force from this statement on
"statement_type": "atrib/person-statement/v1", // MUST
}A genesis is a person statement without prev. Its counter MUST be 0 and its second entry is by the recovery_key it names, which proves the person holds that key. Every other person statement carries prev, the hash of the person statement or rotation it follows, and its second entry is by the recovery key in force at prev. A person statement is valid iff its first entry is by person_key, recovery_key and person_key differ, the rules above hold, and, for a genesis, its second entry is by its own recovery_key. A later statement's second entry depends on the chain, so the walk checks it. A holder MUST extend a chain only from the head it knows and MUST make one extension at a time, because two links on one prev fork the chain for good. Whether a statement extends a chain is decided by the walk (§1.13.7 step 2), which also checks that person_key is the chain's current key and that the counter is greater than that of prev.
1.13.3 Person Rotation
Claims, typ atrib-person-rotation+json; signer roles: person_key, the recovery key in force at prev, successor_key, successor_recovery_key.
{
"counter": 12, // MUST; greater than the counter of prev
"person_key": { "crv": "Ed25519", "kty": "OKP", "x": "..." }, // MUST; the key being retired
"prev": "sha256:...", // MUST; hash of the chain link this one follows
"statement_type": "atrib/person-rotation/v1", // MUST
"successor_key": { "crv": "Ed25519", "kty": "OKP", "x": "..." }, // MUST; the new person key
"successor_recovery_key": { "crv": "Ed25519", "kty": "OKP", "x": "..." }, // MUST; the recovery key in force from this rotation on
}A rotation is valid iff its first, third and fourth entries are by person_key, successor_key and successor_recovery_key, and those three keys are pairwise distinct; the walk checks the second entry against the chain. In a chain, a rotation moves the current key to successor_key and the recovery key to successor_recovery_key; it needs no separate genesis for the successor. A rotation retires every machine statement and off-log revocation its person_key signed, whatever their counters. A machine the person keeps needs a new machine statement signed by the successor. A rotation needs the retiring key's signature, so a person who loses their person key restores it from a backup or starts a new genesis; the recovery key alone cannot rotate. A rotation does not take away the retired key's power to revoke, under §1.9.2 rule 4, the machines it certified. Retiring by key rather than by counter matters because the signer chooses counters: a thief holding a copy of the old key could otherwise pick a counter that no rotation reaches.
1.13.4 Machine Statement
Claims, typ atrib-machine-statement+json; signer roles: person_key, then machine_key.
{
"counter": 3, // MUST
"exp": 1774828800, // MUST; NumericDate seconds, the end of the window
"machine_key": { "crv": "Ed25519", "kty": "OKP", "x": "..." }, // MUST; the certified machine key
"machine_name": "studio", // MUST; §1.13.1 name rule
"nbf": 1767052800, // OPTIONAL; NumericDate seconds, the start of the window; default 0
"person_key": { "crv": "Ed25519", "kty": "OKP", "x": "..." }, // MUST; signs the statement
"scope": { "event_types": ["https://atrib.dev/v1/types/observation"] }, // OPTIONAL; §6.7.1 envelope schema, verbatim
"statement_type": "atrib/machine-statement/v1", // MUST
}A machine statement is valid iff its first entry is by person_key, its second entry is by machine_key, machine_key and person_key differ, (nbf ?? 0) < exp, and the name rule holds. The machine's entry proves the machine holds its key and agreed to this person, so no one can claim another person's machine key, which every record that machine's run keys certify makes public. Validity ignores the window; the walk evaluates it. Hosts SHOULD keep exp - nbf short (the reference host uses 90 days) because a machine key typically sits where that machine's own processes can read it.
For one person key and one machine_key, a statement supersedes every statement with a lower counter from its nbf on; the walk applies this at its time t (§1.13.7 step 3). Two different statements with the same counter are a fork. A host that keeps state SHOULD refuse a statement whose counter is lower than one it has accepted for the same person key and machine_key, and SHOULD accept a repeat of a statement it already holds.
scope limits the delegation certificates the machine key may issue; a scope with no fields is treated as absent. A certificate is within a machine statement's scope iff the statement has no scope, or the certificate has a scope and, for each field present in the statement's scope, the same field is present in the certificate's scope and:
| Field | Within iff |
|---|---|
tool_names, event_types, counterparties | every certificate entry is also a statement entry |
max_amount | same currency, and the certificate value is no greater |
expires_at | the certificate value is no later |
cost_policy.model_tiers, cost_policy.max_tokens | as above per subfield: set inclusion, and a number no greater; a subfield present in the statement must be present in the certificate |
A field only the certificate carries narrows it further and is always within. A statement field outside this table is within only when the certificate carries the same field with a value identical under JCS. A host that relies on a machine statement SHOULD refuse a certificate that is not within its scope; a verifier reports it (§1.13.7 step 5).
1.13.5 Machine Revocation
A person revokes a machine key in either of two carriers.
-
Off-log statement, for hosts that exchange statements directly. Claims,
typatrib-machine-revocation+json; one signer role,signer_keywhen present andperson_keyotherwise:{ "counter": 14, // MUST; higher than the statements it revokes "machine_key": { "crv": "Ed25519", "kty": "OKP", "x": "..." }, // MUST "machine_statement_hash": "sha256:...", // MUST; a statement this revocation covers "person_key": { "crv": "Ed25519", "kty": "OKP", "x": "..." }, // MUST; signs the statement "revocation_reason": "retirement", // MUST; 'retirement' | 'compromise' "signer_key": { "crv": "P-256", "kty": "EC", "x": "...", "y": "..." }, // OPTIONAL; an approval key of person_key's chain that signs instead "signer_statement_hash": "sha256:...", // with signer_key, and only then; the approval-key statement that authorizes it "statement_type": "atrib/machine-revocation/v1", // MUST }It is valid iff its entry is by its signer (for a passkey
signer_key, an assertion whose relying party and origins the walk checks) and the referenced machine statement resolves in the statement set, is valid, and has the sameperson_keyandmachine_keyand a lower counter. It covers every machine statement with the sameperson_keyandmachine_keyand a counter lower than its own. It carries no log position, so per D173 it orders nothing against records. One withsigner_keycounts when §1.13.10 step 3 authorizes its signer, through the statementsigner_statement_hashnames, for the chain whose current key isperson_key, and keeps counting whatever comes after that statement, including the approval key's revocation and a new recovery key, so losing the person-key machine does not stop a revocation and replacing the recovery key never brings back a revoked machine. Whenperson_keyis a retired key of any chain, the revocation takes no part whoever signs it (§1.13.3); when it is a key of more than one chain, nosigner_keyis authorized; on a forked chain only the person key is authorized (§1.13.10). -
Log record, through §1.9.2 signing rule 4: a
key_revocationwhosecreator_keyis the person key'sx, whoserevoked_keyis the machine key'sx, whoserevocation_reasonisretirementorcompromisewith nosuccessor_key, and which carriesmachine_statement_hashand notdelegation_cert_hash. The referenced statement must be valid; its window and any later rotation do not matter. The record revokes the machine key itself, so the §1.11.4 step 6 principal cascade applies to every run key the machine key certified, ordered by log position. A verifier that cannot resolve the referenced statement never accepts the revocation; §1.9.3 says when it is rejected and when it is reported as unresolved. Such a record publishes the link between the person key and the machine key, so a person who wants their machines unlinkable in public uses the off-log carrier unless that machine's records were already shared.
A revocation only takes away: a thief holding a person key, or an approval key the person certified, can revoke the machines the person key certified, and each such machine joins again with a new machine key.
1.13.6 Join Code
A machine joins a person through a holder of the person key, which may be reached through other machines and relays. The joining machine learns the expected person key out of band, from the invitation it was given or from the person. The join binds a short code that the person types into the holder. It is a commit-then-reveal short authentication string:
- The joining machine builds its join request
J:{ "machine_key", "machine_name", "person_key" }, with both keys as §1.13.1 JWKs and the expectedperson_key, plusscope,nbfandexpwhen it requests them. It draws a fresh 32-bytemachine_nonceand sendscommitment = "sha256:" + hex(SHA-256(UTF-8(JCS({ "join_request": J, "machine_nonce": b64u(machine_nonce), "v": "atrib/join-commit/v1" })))). - The holder draws a fresh 32-byte
holder_noncefor this join and sends it. It MUST NOT accept a reveal before sending it. The person opens the join at the holder; the holder keeps at most one join open, ends it after a short timeout, and lets the person cancel it. - The joining machine MUST accept exactly one
holder_nonceper commitment and MUST reveal at most once; a retry starts again from step 1 with a freshmachine_nonce. It revealsJandmachine_nonce. The holder MUST check the commitment, and MUST end the join ifJ.person_keyis not its own person key. - Both compute
digest = SHA-256(UTF-8(JCS({ "commitment": commitment, "holder_nonce": b64u(holder_nonce), "join_request": J, "machine_nonce": b64u(machine_nonce), "v": "atrib/join-code/v1" }))). Thecodeis the first 40 bits ofdigest, most significant bit first, split into eight 5-bit groups, each written as one character of the Crockford alphabet0123456789ABCDEFGHJKMNPQRSTVWXYZ. The joining machine showscode; the person types it into the holder. The holder compares after removing ASCII spaces (U+0020) and hyphens (U+002D), uppercasing ASCII letters only, and readingIandLas1andOas0. - The holder MUST end the join on the first mismatch. On a match it signs a machine statement whose
machine_key,machine_nameandperson_keyequalJ's, and whosescope,nbfandexpare no broader, earlier or later thanJ's whenJcarries them. The joining machine MUST check those fields againstJbefore it adds its own signature entry.
The key and nonce are fixed before the holder's nonce is known, the joining machine binds one holder nonce to them, and the holder takes one typed code per join and one join at a time, so a party relaying the join gets one guess at a 40-bit code per join. A relay that steers the join to a holder of another person key fails the joining machine's person_key check. The code defends against relays and other remote parties, not against processes on the joining machine, which can show any code there.
1.13.7 Person Walk
Inputs: record R, a certificate set C, a statement set S, OPTIONAL trusted anchors A, OPTIONAL revocation evidence L, OPTIONAL log index of R, and OPTIONAL caller-owned trusted time. L is the key_revocation records a verifier has accepted under §1.9, any signing rule, plus those it reports as revocation_unresolved under §1.9.3, each with its log index and that status, as §1.11.4 uses. A log index, of R or in L, that is not a non-negative safe integer counts as not supplied; resolving a rule 4 record against S happens there, not in this walk. t is the caller's trusted time when it is a valid one, and R.timestamp otherwise, with the time_basis / time_trusted labels of §1.11.4 step 3. The walk is offline and deterministic. Objects in S with the same statement hash are one statement, valid iff one of them is valid (§1.13.1). Statements in S that are not valid take no part. Keys are compared and reported by their x, and a machine statement's window is [(nbf ?? 0) × 1000, exp × 1000) in milliseconds: exp is exclusive, as in RFC 7519 section 4.1.4.
-
Principal. Run the §1.11.4 walk. If it reports
delegation_ambiguous, orRhas no stringcreator_key, thepersonblock isnull. Otherwise letPbe the certificate's principal at depth 1, even when the certificate is out of its window or its principal is revoked, orR.creator_keyat depth 0. An object namesPwhen its claims'machine_keyis a key of §1.13.1 form (exactlycrv,ktyand a canonicalx) whosexisP; a JWK with other members names no key. If no object inSnamesP, thepersonblock isnull. -
Chains. The genesis set is the valid genesis statements in
Swhose hashes are inAwhenAis supplied, and every valid genesis inSotherwise. From each genesis, follow the chain. The next link is a valid person statement or rotation inSwhoseprevis the current link's hash, whoseperson_keyis the chain's current key, whose second signature entry, in any of its copies that is valid on its own, is by the chain's current recovery key, and whose counter is greater than the current link's. A link that reuses a key is not a next link (chain_key_reused): a rotation whosesuccessor_keyis already one of the chain's person or recovery keys, or whosesuccessor_recovery_keyis one of the chain's person keys or a recovery key no longer in force; and a person statement whoserecovery_keyis one of the chain's person keys or a recovery key no longer in force. Keeping the recovery key in force through a rotation is allowed. Stop when there is no next link. If two different next links exist, the chain is forked (chain_forked): stop there. A fork is permanent; the person recovers by starting a new genesis, and verifiers pin the new anchor. A chain's keys are its genesis key and every successor key; the last is its current key, and the others are retired. Its head is its last link. -
Machine statements. Take the valid machine statements in
Swithmachine_key === P. Put each in the group of the chain whose keys include itsperson_key; a statement whoseperson_keyis in no chain is in an unchained group of its own person key, and one whoseperson_keyis in more than one chain is contested and in no group. WhenAis supplied, unchained groups take no part, so a process holding the machine key cannot make the machine ambiguous for a verifier that pins anchors by co-signing for another person key. In each group:- A statement signed by a retired key is superseded.
- From the statements signed by the group's current key (or, for an unchained group, its own key), choose a counter. When
tis trusted, a statement is in force iff its window containstand no statement signed by the same key with a higher counter has a window that starts at or beforet; choose the highest counter in force, or the highest counter when none is. Whentis not trusted, choose the highest counter, so the record's own timestamp cannot steer the choice. Two different statements at the chosen counter are a fork (machine_statement_fork).
The walk then resolves by the first rule that applies:
- One group chose one statement, no contested statement exists, and the chosen statement's
person_keyis in no forked chain → that statement is reported. - More than one group chose a statement, a contested statement exists, a chosen statement's
person_keyis in a forked chain, or a group found a fork → setperson_ambiguous: true, list every chosen, forked or contested statement incandidates, and report none. - No group chose a statement, but a group has superseded statements → report the one signed by the most recently retired key with the highest counter, breaking ties by the lower statement hash, with
person_rotated: true. If more than one group has one, setperson_ambiguous: trueinstead and list each group's pick incandidates. - Otherwise no statement is reported, and the statement fields of the block are
null.
-
Window. For the reported statement, evaluate
(nbf ?? 0) × 1000 <= t < exp × 1000, withtas defined above. Whentis the trusted time the record was made, a renewal does not take the record out of the window of the statement in force then, and a shortening by a higher counter does take effect. -
Attenuation. At depth 1, when the reported statement has a
scope,scope_attenuation_okis whether the certificate is within it (§1.13.4). At depth 0, or when the statement has noscope, it isnull. -
Revocation. Take the records in
Lwhoserevoked_keyisP, and the valid off-log revocations inSthat cover the reported statement, if one is reported, leaving out any signed by a retired key (§1.13.3) and any with asigner_keywhose signer §1.13.10 step 3 does not authorize for the chain whose current key is itsperson_key(signer_not_authorized). The first row that applies decides:Evidence machine_revokedrevocation_orderedan accepted log revocation at an index before R'struetruean accepted log revocation, its index or R's not suppliedtruefalsean off-log revocation truefalsean unresolved log revocation at an index before R's, or with its index orR's not suppliednullfalseaccepted log revocations only at indexes at or after R'sfalsetruenone falsenullrevocation_reasonis that of the earliest deciding log revocation by index (accepted rows only; one with no index sorts last, and ties go to the lexicographically lower reason), or of the deciding off-log revocation with the highest counter, ties broken by the lower statement hash; it isnullwhenmachine_revokedis not true. BecauseLholds every accepted and unresolved revocation ofP, the §1.11.4 walk'srevokedagrees with an orderedmachine_revoked: true. -
Person. For a chained statement, report the chain's genesis hash as
person_anchor, whether it is inAasperson_anchored, the head's hash asperson_head_hash, the recovery key in force at the head asrecovery_key, and whether §1.13.10 finds the chain frozen asperson_frozen. For an unchained statement these four arenullandperson_anchoredandperson_frozenarefalse. Whenperson_rotatedis true,successor_keyis the chain's current key.
Output:
"person": {
"machine_key": "...",
"machine_name": "studio",
"machine_statement_hash": "sha256:...",
"in_window": true,
"time_basis": "trusted_verifier_time",
"time_trusted": true,
"scope_attenuation_ok": true, // boolean | null
"machine_revoked": false, // boolean | null
"revocation_ordered": null, // boolean | null
"revocation_reason": null, // 'rotation' | 'retirement' | 'compromise' | null
"person_key": "...",
"person_anchor": "sha256:...", // string | null
"person_anchored": true,
"person_head_hash": "sha256:...", // string | null
"recovery_key": "...", // string | null
"person_rotated": false,
"successor_key": null, // string | null
"person_frozen": false,
"person_ambiguous": false,
"candidates": [], // present only with person_ambiguous: true
"errors": []
}When no statement is reported, machine_key is P; person_anchored, person_rotated and person_frozen are false; step 6 still sets the three revocation fields from L; and every other field except person_ambiguous, candidates and errors is null. Each entry of candidates carries machine_statement_hash, person_key and person_anchor, sorted by machine_statement_hash; person_anchor is the anchor of the one chain whose keys include person_key, and null for an unchained or contested statement.
errors lists codes, each once, sorted lexicographically. A malformed statement reports statement_malformed, with unknown_field when that also applies, and no other code, since its signatures cannot be checked. A verifier checks in this order: the envelope, the protected headers' shape and that each alg is Ed25519 or ES256, and the payload's JCS form; then statement_type, where a type this section does not define reports statement_type_unknown alone, since the typ and entry-count rules exist only for a defined type; then typ, the entry count with each entry's alg and array fitting its role, and the claims. Copies of one statement report codes as §1.13.1 gives. Any other statement that fails several rules reports every code that applies. It covers the objects in S that name P, the person statements and rotations whose person_key is the person_key of such an object or whose prev is a link that step 2 reached in a chain whose keys include such a person_key, and the outcome of steps 2 and 3 for those chains and for the groups of step 3:
| Code | Fires when |
|---|---|
anchor_not_resolved | A is supplied and S has a valid machine statement naming P, but none of them is signed by a key of a chain from A |
approval_signature_invalid | an approval-key statement's third entry is not by its approval_key as its kind requires |
approval_statement_fork | §1.13.10 step 2 found two approval-key statements at one counter |
chain_forked | step 2 found two next links |
chain_key_reused | step 2 refused a link that reuses a key |
chain_link_invalid | a valid person statement or rotation has a prev that step 2 reached but is not a next link for a reason no other code names |
counter_invalid | a counter is not a non-negative safe integer, a genesis counter is not 0, or a link's counter is not greater than that of its prev |
machine_name_invalid | a machine_name or approval_name breaks the name rule |
machine_signature_invalid | a machine statement's second entry is not by its machine_key |
machine_statement_fork | step 3 found two statements at one counter |
recovery_signature_invalid | a genesis's second entry is not by its recovery_key; a link's is not by the chain's current recovery key; an approval-key statement's or an unfreeze's is not by the recovery_key it names; or that recovery_key is not a recovery key of the current person key's tenure (§1.13.10 step 1) |
revocation_invalid | an off-log machine revocation or approval-key revocation whose signature verifies fails another §1.13.5 or §1.13.9 check: its referenced statement is not in S or not valid, or its keys or counter do not fit |
self_statement | two keys that must differ are equal |
signature_invalid | a statement's first entry is not by its person_key, or the entry of a revocation, freeze or approval-key revocation is not by its signer |
signer_not_authorized | §1.13.10 step 3 does not authorize the signer of a statement with signer_key: for the one chain whose current key is the statement's person_key, signer_statement_hash names no certifying statement for that key, or the entry does not match it. A revocation whose reference fails reports revocation_invalid instead, and this code is not reported for a statement whose person_key is a retired key of any chain, or the current key of exactly one chain that is forked; in the person walk it is reported for one whose person_key is a key of more than one chain and retired in none, whether or not one of those chains is forked. An authorized signer stays authorized whatever comes after the statement it names |
statement_malformed | the envelope, a protected header, alg, typ, the entry count or an assertion breaks a §1.13.1 rule, the payload is not the canonical JCS form of a JSON object, a required claim is missing, signer_key and signer_statement_hash are not both present or both absent, a claim has the wrong type (a counter that is present but not a non-negative safe integer is counter_invalid), a key is not an Ed25519 JWK with exactly crv, kty and a canonical x (or, for approval_key and signer_key, a P-256 JWK with exactly crv, kty and canonical x and y on the curve), a hash is not sha256: and 64 hex digits, a revocation_reason or approval_kind is not one listed, or may_approve, rp_id or origins breaks a §1.13.8 rule |
statement_type_unknown | a statement_type is not one this section defines |
successor_signature_invalid | a rotation's third or fourth entry is not by its successor_key or successor_recovery_key |
unknown_field | an object carries a field its type does not define |
window_invalid | (nbf ?? 0) >= exp |
Consumers that act on the block SHOULD require person_anchored: true, time_trusted: true, in_window: true, scope_attenuation_ok !== false, person_rotated: false, and no ambiguity. A consumer deciding whether to accept new work from a machine SHOULD also require machine_revoked: false and person_frozen: false, since a freeze is how a person stops machines a thief certified with their person key. For a past record, machine_revoked: true with revocation_ordered: false says the machine is revoked now but not whether that was before or after the record; a consumer treats it as unverifiable for that record, not as proof of misuse, and needs a log revocation for an ordered answer.
1.13.8 Approval-Key Statement
Claims, typ atrib-approval-key-statement+json; signer roles: person_key, recovery_key, approval_key.
{
"approval_key": { "crv": "P-256", "kty": "EC", "x": "...", "y": "..." }, // MUST; the certified approval key
"approval_kind": "passkey", // MUST; 'secure-enclave' | 'passkey'
"approval_name": "phone", // OPTIONAL; §1.13.1 name rule
"counter": 2, // MUST
"may_approve": ["verdict", "answer"], // OPTIONAL; the kinds of yes this key may sign
"origins": ["https://approve.example"], // MUST for a passkey, absent otherwise
"person_key": { "crv": "Ed25519", "kty": "OKP", "x": "..." }, // MUST; signs the statement
"recovery_key": { "crv": "Ed25519", "kty": "OKP", "x": "..." }, // MUST; the recovery key that co-signs
"rp_id": "approve.example", // MUST for a passkey, absent otherwise
"statement_type": "atrib/approval-key-statement/v1", // MUST
}The third role proves the device holds the key: a secure-enclave key signs an ES256 entry in signatures, and a passkey signs an assertion in assertions for the statement's own rp_id and origins. rp_id is a host name: at most 253 characters of dot-separated labels, each 1 to 63 lowercase ASCII letters, digits and hyphens that neither starts nor ends with a hyphen, the last of them not all digits, so that no IPv4 address is one. origins is a non-empty array of distinct origins, each https:// and a host name, then optionally : and a port from 1 to 65535 in decimal with no leading zero and never 443, and nothing after that, not even /. That is the form a browser writes into client_data_json, so the exact comparison of §1.13.1 matches it. origins lists every origin from which an assertion counts, since a relying party can let related origins use its passkeys. may_approve, when present, is a non-empty array of distinct non-empty strings whose meaning belongs to the application; it never limits the statements of §1.13.9. An approval-key statement is valid iff its first entry is by person_key, its second by recovery_key, its third by approval_key as its kind requires, recovery_key and person_key differ, and the field rules hold. The walk checks that recovery_key is a recovery key of the chain (§1.13.10 step 1), so adding an approval key needs the recovery key and not only the person key. The claim binds the co-signer: the statement hash covers only the claims, so without it a holder of a later recovery key alone could re-sign a copy of an old statement and certify its key again.
Every other format an approval key signs MUST be domain-separated from statements, so that no yes the key gives an application can be read as a statement: a WebAuthn challenge it uses MUST NOT be the SHA-256 of bytes that start with atrib-statement-assertion/v1 and a zero byte, and an ES256 signature it makes MUST NOT be over a JWS signing input whose protected header carries a typ this section defines. An application that hashes bytes another party chooses into a challenge starts them with a tag of its own.
For one person key and one approval key, among the statements that pass §1.13.10 step 1, the statement with the highest counter is the current one; two different statements at that counter are a fork. A host that keeps state SHOULD refuse a statement whose counter is lower than one it has accepted for the same person key and approval key. A key is certified only while its current statement names the chain's current recovery key: when a person statement replaces the recovery key, every approval key stops being certified until the person, the new recovery key and the device sign a new statement for it, so replacing a lost or stolen recovery key leaves nothing it certified able to approve. What those keys already took away still counts (§1.13.10 step 3). A rotation also retires every approval-key statement its person_key signed, as it retires machine statements (§1.13.3); the successor certifies each kept key again.
1.13.9 Approval-Key Revocation, Freeze and Unfreeze
Each statement that only takes away has one signer role, signer_key when present and person_key otherwise. signer_key, when present, MUST be a P-256 approval key, signed with an ES256 entry or an assertion, and comes with signer_statement_hash, the hash of an approval-key statement that certified it; each without the other is malformed. An approval key may sign one through any certifying statement for it, one that passes §1.13.10 step 1, so its recovery_key was in force at some link since the person key became current; step 3 authorizes the signer through it, whatever its may_approve, and the statement keeps counting whatever comes after the statement it names: a later or rival statement for the key, its revocation, or a new recovery key. Taking away is one way. In return, certifying a passkey again without an origin does not take that origin's power to take away; only a rotation of the person key does. A host that keeps state MAY refuse a statement that takes away from a signer it already knows is revoked.
Approval-key revocation, typ atrib-approval-key-revocation+json:
{
"approval_key": { "crv": "P-256", "kty": "EC", "x": "...", "y": "..." }, // MUST
"approval_key_statement_hash": "sha256:...", // MUST; a statement this revocation covers
"counter": 5, // MUST; higher than the statements it revokes
"person_key": { "crv": "Ed25519", "kty": "OKP", "x": "..." }, // MUST
"revocation_reason": "compromise", // MUST; 'retirement' | 'compromise'
"signer_key": { "crv": "P-256", "kty": "EC", "x": "...", "y": "..." }, // OPTIONAL
"signer_statement_hash": "sha256:...", // with signer_key, and only then
"statement_type": "atrib/approval-key-revocation/v1", // MUST
}It is valid iff its entry is by its signer and the referenced statement resolves in the statement set, is a valid approval-key statement, and has the same person_key and approval_key and a lower counter. It covers every approval-key statement with the same person_key and approval_key and a counter lower than its own.
Freeze, typ atrib-person-freeze+json: { "counter", "person_key", "signer_key" (OPTIONAL), "signer_statement_hash" (with signer_key), "statement_type": "atrib/person-freeze/v1" }. It is valid iff its entry is by its signer. A host that keeps state MUST NOT accept a machine statement or an approval-key statement from the person key of a frozen chain; statements that take away, person statements (which replace the recovery key), rotations and unfreezes are still accepted. A signer MUST NOT reuse a freeze counter for one person key and signer: the claims would be the same, so an unfreeze of the earlier freeze would lift the later one.
Unfreeze, typ atrib-person-unfreeze+json; signer roles: person_key, then recovery_key:
{
"counter": 7, // MUST
"freeze_hash": "sha256:...", // MUST; the freeze it lifts
"person_key": { "crv": "Ed25519", "kty": "OKP", "x": "..." }, // MUST
"recovery_key": { "crv": "Ed25519", "kty": "OKP", "x": "..." }, // MUST; the recovery key that co-signs
"statement_type": "atrib/person-unfreeze/v1", // MUST
}It is valid iff its first entry is by person_key, its second by recovery_key, and the two keys differ; the walk checks that recovery_key is the chain's current recovery key. One unfreeze lifts one freeze, so lifting repeated freezes needs the recovery key each time, and a freeze never needs a rotation to undo. A stolen approval key can freeze again after it is revoked, since nothing orders its revocation after what it signs; the person stops it for good by rotating the person key (§1.13.3), which retires every statement the old key named. An unfreeze counts only while the recovery key it names is current, so after replacing the recovery key the person lifts again, under the new one, each freeze still to be lifted; until then the chain reads frozen, which fails closed. A thief holding a replaced recovery key and the person key therefore cannot lift a freeze.
In every counter here, the value only makes payloads distinct and orders revocations against the statements they cover. None of these statements carries a log position, so per D173 they order nothing against records, and a freeze does not say which statements came before it: an offline verifier reports a frozen person, and a host that keeps state applies the freeze from the moment it accepts it.
1.13.10 Approval Walk
Inputs: a statement set S and OPTIONAL trusted anchors A. The walk is offline and deterministic, merges copies as §1.13.1 gives, and builds chains as §1.13.7 step 2 does. For each chain, from its current key K, its current recovery key Q, the recovery key in force at its head, and its tenure, the recovery keys in force at any link since K became current (the genesis's recovery_key or the successor_recovery_key of the rotation that made K current, and the recovery_key of each later person statement):
- Recovery. An approval-key statement with
person_keyKpasses when itsrecovery_keyis a key of the tenure; an unfreeze withperson_keyKpasses when itsrecovery_keyisQ. One that does not pass takes no part. It reportsrecovery_signature_invalidwhen itsrecovery_keyis not a key of the tenure; an unfreeze naming a replaced recovery key of the tenure was sound when made and reports no code. - Certified keys. The certifying statements are the valid approval-key statements with
person_keyKthat pass step 1. Group them by approval key and pick each group's current statement (§1.13.8); a group with a fork has none (approval_statement_fork). An approval key is certified when its current statement'srecovery_keyisQ. A current statement naming a replaced recovery key of the tenure reports no code; its key approves nothing until a statement namingQcertifies it again. - Authorized signers. The signer of a statement that takes away is authorized when it is
Kitself (nosigner_key), or whensigner_statement_hashnames a certifying statement (step 2) whoseapproval_keyissigner_key, and the statement's entry, in a copy valid on its own, matches it: anES256entry insignaturesfor asecure-enclavestatement, or an assertion for that statement'srp_idandoriginsfor apasskeyone. The named statement need not be current, and its key may be revoked, uncertified or in a fork: none of these statements carries a log position, so nothing orders what came after the named statement against what the signer signed, and a take-away keeps counting. A statement whose signer is not authorized takes no part (signer_not_authorized); for an approval-key revocation, this is checked only when its reference is valid (step 4). - Revoked keys. An approval-key revocation with
person_keyKwhose reference fails a §1.13.9 check takes no part (revocation_invalid). Take the others whose signer is authorized. A certified key is revoked when such a revocation covers its current statement. An approval key is in force when it is certified and not revoked. - Freeze. A valid freeze with
person_keyKcounts when its signer is authorized. A counted freeze is lifted by a valid unfreeze withperson_keyKand that freeze's hash asfreeze_hashthat passes step 1. The chain is frozen iff a counted freeze is not lifted, or the chain is forked.
A forked chain (§1.13.7 step 2) has no current recovery key: no statement passes step 1, no approval key is certified, only K is authorized, the chain reads as frozen, and steps 1 to 5 report no recovery_signature_invalid or signer_not_authorized. Reading as frozen keeps a fork from hiding a freeze an approval key made, which only counts through a certifying statement. Otherwise a holder of the person key and a replaced recovery key could fork the chain at the link before the replacement and bring that recovery key back.
Statements whose person_key is a retired key of the chain take no part. Output, one entry per chain:
{
"person_anchor": "sha256:...",
"person_anchored": true,
"person_key": "...", // K
"person_head_hash": "sha256:...",
"person_forked": false, // true when step 2 of §1.13.7 found a fork
"person_ambiguous": false, // true when another chain's keys also include K
"person_frozen": false,
"freezes": [], // hashes of counted freezes not lifted, sorted
"approval_keys": [
{
"approval_key": { "crv": "P-256", "kty": "EC", "x": "...", "y": "..." },
"approval_key_thumbprint": "...",
"approval_kind": "passkey",
"approval_name": "phone", // string | null
"may_approve": null, // string[] | null
"origins": ["https://approve.example"], // string[] | null
"rp_id": "approve.example", // string | null
"statement_hash": "sha256:...",
"revoked": false,
},
], // every certified key
"errors": [],
}Entries are sorted by person_anchor, approval_keys by approval_key_thumbprint, and freezes by hash, each in code-unit order. person_ambiguous is true when another chain's keys also include K, as when a holder of the person key starts a second genesis with a recovery key of their own. errors follows the rules of §1.13.7 for codes and copies. It covers the approval-key statements, approval-key revocations, freezes and unfreezes in S whose person_key is one of the chain's keys, a key of §1.13.1 form whose x is in the chain (as in §1.13.7 step 1, a bare string or a JWK with other members is no key); the person statements and rotations whose person_key is one of the chain's keys or whose prev is a link of the chain, with the codes §1.13.7 step 2 gives them; and the codes of steps 1 to 5. Its codes are in the §1.13.7 table.
Consumers that act on an approval key SHOULD require person_anchored: true, person_forked: false, person_ambiguous: false, person_frozen: false and revoked: false. §1.13.7 reports person_frozen for the chain of the reported statement, and counts an off-log machine revocation with signer_key when step 3 authorizes its signer for the chain whose current key is the revocation's person_key.
1.13.11 Person-Key Signer Interface
A tool that needs a person-key signature without holding the person key, such as a relay that passes a machine's join to the person, asks a holder of the key over a local Unix socket. The interface reuses the framing of the record signer socket (D190): one newline-terminated JSON request per connection, answered by one newline-terminated JSON response, and {"v":1,"ok":false,"error":"<reason>"} for a refusal. It has its own settings, so the record signer's rules do not change: ATRIB_PERSON_SIGNER_SOCK, the socket path; ATRIB_PERSON_SIGNER_PUBKEY, the pinned person key x, without which a client MUST NOT ask; and ATRIB_PERSON_SIGNER_TIMEOUT_MS, the bound on one request, 120000 by default because an answer waits on the person.
| Operation | Request | Answer |
|---|---|---|
join-commit | {"v":1,"op":"join-commit","commitment":"sha256:<hex>"} | {"v":1,"ok":true,"holder_nonce":"<b64u of 32 bytes>"} |
join-reveal | {"v":1,"op":"join-reveal","commitment":...,"join_request":J,"machine_nonce":"<b64u>"} | {"v":1,"ok":true,"statement":S}, a machine statement |
sign-statement | {"v":1,"op":"sign-statement","payload":"<b64u(UTF-8(JCS(claims)))>"} | {"v":1,"ok":true,"statement":S} over exactly that payload |
join-commit and join-reveal carry §1.13.6 steps 1 to 5 between a joining machine and the holder; the client relays them. In each answer S carries only the person key's entry: for a join, the joining machine checks it and adds its own entry (§1.13.6 step 5).
A holder:
- MUST sign only machine statements, at the end of a §1.13.6 join, and machine revocations and approval-key revocations without
signer_key. It MUST NOT sign a person statement or rotation, which needs the recovery key and happens only in the holder's own flow; an approval-key statement, since no one can judge at a prompt whether a key was made by an agent, so approval keys enroll only in the holder's own flow, where it makes the challenge itself; a freeze or unfreeze, which the person starts in the holder's own flow or with an approval key, so no tool needs to ask for one; any other statement type; a record; or other bytes. It signs its own machine's statement in its own flow too, not through this interface. - MUST answer only while the person has a join or a revocation open in it, so that no process can raise a prompt the person did not start, and MUST end each with one answer. It SHOULD show which process asked, as a hint only.
- MUST bind an open join to the first
join-commitit answers, refuse any otherjoin-commitwhile that join is open, and accept onejoin-reveal, whosecommitmentis the bound one. It MUST show the joining machine'smachine_nameand require the code the joining machine shows (§1.13.6 step 4), which binds all ofJ: a socket a local process planted can forward a join after swapping the machine key or widening the request, and the code catches that. It MUST refuse a second live machine under one name, and SHOULD refuse a join for a machine key it knows was revoked forcompromise. - For a revocation, MUST show what it revokes and the reason, and MUST sign only a payload whose
statement_type, revoked key, referenced statement hash andrevocation_reasonare the ones the person opened, and whosecounteris one more than the highest counter of a statement the holder knows for that key, so that the revocation covers each of them and a requester cannot spend the key's counters. A refusal for another counter carries the one the holder requires, as{"v":1,"ok":false,"error":"counter","counter":n}; the holder MUST refuse when that counter would not be a safe integer.
A client MUST accept an answer only when S has exactly the members payload and signatures and one entry, whose protected header is b64u(UTF-8(JCS({ "alg": "Ed25519", "kid": <thumbprint of the pinned key>, "typ": <the type's typ> }))) and whose signature verifies under the pinned key, and payload is in JCS form; the claims' statement_type is the one requested and their person_key is the pinned key; for a join, the claims are of §1.13.4 shape as far as the person's entry alone can show, with both keys in §1.13.1 JWK form, and match J (§1.13.6 step 5); and for sign-statement, payload is the one sent and S is valid on its own (§1.13.1). A client that relays a reveal SHOULD check it against the commitment before sending it. A holder is typically an app that runs as the person, so a client accepts a socket the calling user owns: the statements are not secret, and the pinned key and the typed code are the checks. A client MUST refuse a socket that is a symbolic link, that belongs to an account other than the caller or root, or that is in a directory that belongs to an account other than the caller or root or that a group or other users can write. A holder SHOULD therefore create its socket in a directory of mode 0700.
The caller chooses the pinned key: the current key of the chain at the anchor it pins (§1.13.7 step 2). The client checks answers against that key and cannot check how it was chosen. The code binds the join, not the screen that shows it: a process on the joining machine, or on the holder's machine, that can show the person a code is in the same position as §1.13.6 gives for the joining machine.
1.13.12 Conformance
Implementations MUST pass all vectors in spec/conformance/person-machine/. The generator is packages/log-dev/scripts/generate-conformance-person-machine.ts; the reference implementation is packages/verify/src/person-machine.ts, pinned by packages/verify/test/conformance-person-machine.test.ts. Two implementations given the same inputs MUST produce identical person blocks and identical approval walk outputs (§1.13.10).
1.13.13 What This DOES NOT Cover
How a holder asks the person for a press and shows a request, how a tool finds the anchor it pins, and a phone passkey signing a join, which would need a format of its own, are host policy or later work. The formats of the application decisions an approval key signs, what each may_approve value means, and how a host enrolls an approval key are application policy. A passkey's yes is only as trustworthy as the page that computes what it signs; which origins to list is the person's choice. Approval keys add no protection against a holder of the person key, who can revoke machines and approval keys, freeze the person and certify machines; replacing a stolen person key is a rotation, which needs the recovery key. A stolen approval key keeps what it took away after it is revoked, and can freeze again until the person rotates the person key; so can a page at an origin the person dropped from a passkey's statement. A rotation does not protect against a holder of a retired person key and the recovery key in force with it: they can add a second link at a link before the rotation, which forks the chain at that link (§1.13.7 step 2), so the retired key reads as current and the successor's statements fall out of the chain. With pinned anchors the walks fail closed: the approval walk reads the chain as forked and frozen, and the person walk reports the statement as ambiguous, or reports none (anchor_not_resolved); without them a statement by the successor reads as unchained and only person_anchored: false warns. The person recovers with a new genesis, which verifiers pin as the new anchor. approval_kind is the person's claim, attested by nothing: a verifier cannot tell that a secure-enclave key does not leave its device, so that rests on the recovery-key holder checking the device at enrollment. A revocation whose counter is the largest safe integer leaves its key no counter to be certified again with; the person makes a new key, as a machine joins again with a new machine key. Membership of people in a workspace, which is application policy. Trust in a person: a verifier decides which anchors it trusts. Truthfulness: a machine statement says the person certified the key and the machine agreed, not that the machine's records are honest; the §8.7 limit applies in full.
§2 Merkle Log Protocol
Commitment, not content. The append-only transparency log for attribution records.
The append-only transparency log where attribution records are committed, making them globally verifiable without exposing their content.
Contents
- 2.1 Purpose and Design Rationale
- 2.2 Log Identity and Parameters
- 2.3 Log Entry Format
- 2.4 Checkpoint Format
- 2.5 Tile API (Read Interface)
- 2.6 Submission API (Write Interface)
- 2.7 Inclusion Proof Verification
- 2.8 Proof Bundle Format
- 2.9 Witnessing and Cosignatures
- 2.10 What the Log Stores and What It Does Not
- 2.11 Cross-log Replication
- 2.12 Record Body Archive Layer
2.1 Purpose and Design Rationale
This section is informative.
The atrib log is a public, append-only Merkle tree. When a creator submits an attribution record to the log, they receive an inclusion proof: a cryptographic commitment that the record exists at a specific position in the tree, verifiable by any third party without trusting the log operator.
The log enforces two properties that are the foundation of atrib's trust model:
Tamper evidence. Any modification, deletion, or reordering of a committed record would invalidate the root hash. The tree is append-only: new records may be added, but no existing record may be altered or removed. The log operator cannot secretly change history.
Accountability without content exposure. The log stores hashes and commitments, not content. A third party can verify that a record was committed at a specific time without reading what the record contains. Privacy and auditability are structurally separated: the log proves existence and integrity; the content remains with the creator.
The log is built on the tlog-tiles specification (c2sp.org/tlog-tiles), which defines an efficient HTTP-based read interface used by Certificate Transparency logs and the Tessera library (github.com/transparency-dev/tessera). log.atrib.dev is a Tessera-based personality. Any operator may run a compatible log using Tessera; the open specification ensures that client implementations are not tied to atrib's log infrastructure.
2.2 Log Identity and Parameters
A tiled transparency log is identified by three parameters:
| Parameter | Value for log.atrib.dev | Description |
|---|---|---|
| URL prefix | https://log.atrib.dev/v1 | The base URL from which all log endpoints are served. |
| Origin | log.atrib.dev/v1 | The scheme-less URL prefix. Used as the first line of every checkpoint. Uniquely identifies this log instance globally. |
| Log public key | Published at log.atrib.dev/v1/log-pubkey | The Ed25519 public key used to sign checkpoints. Distributed as a verifier key (vkey) string per the C2SP signed-note spec. |
Log operators running compatible logs MUST use a unique origin matching their URL prefix, and MUST publish their log public key at a stable, documented URL.
Note (Log versioning): The /v1 path component in the URL prefix and origin is the log version, not the atrib spec version. When the log's entry format requires a breaking change, a new origin (log.atrib.dev/v2) will be used rather than modifying the existing log. Existing entries in log.atrib.dev/v1 will remain accessible indefinitely.
2.3 Log Entry Format
Each entry in the atrib log is a commitment to an attribution record, not the record itself. The log stores the minimum information required for verification: a hash of the record, the creator's public key, and the context_id. This is sufficient to prove that a signed attribution record for a given creator and session existed at a specific point in time, without revealing the record's content.
2.3.1 Entry Serialization
A log entry is a fixed-structure binary message. It MUST be serialized as follows:
struct AtribLogEntry {
u8 version; // 0x01, entry format version
u8 record_hash[32]; // SHA-256 of the JCS-canonical attribution record (with signature)
u8 creator_key[32]; // raw 32-byte Ed25519 public key
u8 context_id[16]; // raw 16 bytes decoded from the 32-char hex context_id
u64 timestamp_ms; // big-endian Unix milliseconds, matching the record's timestamp field
u8 event_type; // see byte mapping below
}
// Total: 1 + 32 + 32 + 16 + 8 + 1 = 90 bytesAll multi-byte integers are big-endian. The record_hash is computed over the complete attribution record including its signature field, after JCS serialization. This binds the commitment to the specific signed record, not just its pre-signature content.
event_type byte mapping. The 1-byte slot is a fast-path filter; the authoritative type is the URI in the record content (§1.2.4). Verifiers MAY filter by byte for atrib normative URIs and MUST fetch the record to read the URI for extension types.
| Byte | URI | Notes |
|---|---|---|
0x01 | https://atrib.dev/v1/types/tool_call | atrib normative |
0x02 | https://atrib.dev/v1/types/transaction | atrib normative |
0x03 | https://atrib.dev/v1/types/observation | atrib normative |
0x04 | https://atrib.dev/v1/types/directory_anchor | atrib normative; promoted by D056 |
0x05 | https://atrib.dev/v1/types/annotation | atrib normative; promoted by D058 |
0x06 | https://atrib.dev/v1/types/revision | atrib normative; promoted by D059 |
0x07–0xFE | reserved | reserved for future atrib normative additions per D036 |
0xFF | extension URI | URI is in a non-atrib.dev namespace; read content |
0x00 | reserved | MUST NOT be emitted |
The byte mapping is normative for log operators encoding entries and for verifiers building byte-level filters. The mapping is informative for emitters (which write URIs into records, not bytes); the log operator is responsible for the URI-to-byte mapping at submission time. A log operator receiving a record with a URI not in the atrib normative set MUST encode the entry with event_type = 0xFF and preserve the URI verbatim in the stored record content.
2.3.2 Leaf Hash Computation
Log entry hashes are computed per RFC 6962, Section 2.1 (the same algorithm used by Certificate Transparency). A leaf hash is:
leaf_hash = SHA-256(0x00 || entry_bytes)
// The 0x00 byte is a domain separation prefix defined by RFC 6962.
// Internal node hashes use 0x01 prefix:
node_hash = SHA-256(0x01 || left_child_hash || right_child_hash)These are the hashes stored in the tiles served by the tile API. Any client that fetches the tiles can reconstruct the full Merkle tree and independently compute inclusion and consistency proofs.
2.4 Checkpoint Format
The log's state at any moment is summarized in a checkpoint: a signed statement of the tree's current size and root hash. Checkpoints follow the C2SP tlog-checkpoint specification (c2sp.org/tlog-checkpoint).
2.4.1 Body Structure
A checkpoint body is a UTF-8 text block with exactly three mandatory lines followed by a newline, formatted as follows:
log.atrib.dev/v1 ← origin line (matches §2.2)
4821937 ← tree size (decimal, no leading zeros)
CsUYapGGPo4dkMgIAUqom/Xajj7h2fB2MPA3j2jxq2I= ← root hash (standard base64, 44 chars)
← mandatory trailing newlineThe root hash is the SHA-256 Merkle Tree Hash (RFC 6962, Section 2.1) of all entries up to the stated tree size, encoded in standard base64 (RFC 4648 §4, with padding).
2.4.2 Log Signing Key and Key ID
The log signs checkpoints with its Ed25519 private key. The key ID embedded in the signature line is derived per the C2SP signed-note specification:
key_id = SHA-256(
key_name || 0x0A || // key_name is the origin string; 0x0A is newline
0x01 || // signature type byte for Ed25519
log_public_key_bytes // raw 32-byte Ed25519 public key
)[:4] // truncated to 4 bytes
// For log.atrib.dev/v1:
key_name = "log.atrib.dev/v1"The log MUST publish its public key at two endpoints, both serving the same key:
-
GET /v1/log-pubkeyreturns the verifier key string in the C2SP signed-note vkey format astext/plain. This is the canonical key-publication format expected by C2SP-conformant tooling (e.g.golang.org/x/mod/sumdb/note.NewVerifier):// vkey format: <origin>+hex(key_id)+base64(sig_type_byte || public_key) log.atrib.dev/v1+a3b2c1d0+AQ...base64encodedpublickey...== // "AQ" is base64(0x01), the Ed25519 signature type byte -
GET /v1/pubkeyreturns the same key asapplication/jsonfor hand-rolled verifiers and dogfood scripts that prefer structured access:{ "origin": "log.atrib.dev/v1", "public_key": "<base64url 32B>", "key_id": "<hex 4B>", "algorithm": "Ed25519" }
Both endpoints MUST be served from the same signing key, MUST agree on origin and key_id, and MUST decode to the same 32-byte Ed25519 public key. A verifier MAY use either endpoint. The key_id published at either endpoint MUST equal the 4 leading bytes of the base64-decoded signature token on every signature line of /v1/checkpoint (§2.4.3).
2.4.3 Signed Note Format
The complete checkpoint (body plus signatures) is a signed note per the C2SP signed-note specification (c2sp.org/signed-note). The note has the checkpoint body as its text, followed by one or more signature lines:
log.atrib.dev/v1
4821937
CsUYapGGPo4dkMgIAUqom/Xajj7h2fB2MPA3j2jxq2I=
— log.atrib.dev/v1 base64(keyHash[4B] || Ed25519-signature[64B])
— witness.example.com base64(witness-keyHash[4B] || cosignature[64B])Each signature line begins with — (U+2014 em-dash followed by a space in the canonical format), followed by the key name, a single space, and one base64-encoded token. The token decodes to exactly 68 bytes: the 4-byte key hash defined in §2.4.2 (matches the key_id) concatenated with the 64-byte Ed25519 signature over the note text (the body including its trailing newline). This is the canonical C2SP signed-note encoding; verifiers using golang.org/x/mod/sumdb/note.NewVerifier or compatible tooling parse it directly without an adapter.
Clients MUST verify at least the log's own signature on any checkpoint before trusting it. Cosignatures from witnesses are additional trust anchors; their verification procedure is described in §2.9.
2.5 Tile API (Read Interface)
The log's read interface serves static resources over HTTP, following the C2SP tlog-tiles specification. All read endpoints are cacheable. Clients can compute any desired proof by fetching the relevant tiles in parallel without a dynamic proof API.
2.5.1 Checkpoint Endpoint
GET https://log.atrib.dev/v1/checkpoint
Response:
Content-Type: text/plain; charset=utf-8
Cache-Control: max-age=5 // mutable; checkpoint advances as entries are added
// Body: signed note as defined in [§2.4.3](#243-signed-note-format)Clients SHOULD not cache the checkpoint beyond 5 seconds. Monitoring clients that tail the log MUST verify consistency between successive checkpoints using the tile data to confirm the log is append-only.
2.5.2 Tile Endpoints
Merkle tree hashes are served as tiles: concatenated sequences of 32-byte SHA-256 hashes. Full tiles contain exactly 256 hashes (8,192 bytes). Partial tiles contain 1–255 hashes and are served at the rightmost edge of each tree level.
// Full tile:
GET https://log.atrib.dev/v1/tile/<L>/<N>
// Partial tile:
GET https://log.atrib.dev/v1/tile/<L>/<N>.p/<W>
// <L>: level (0 = leaf hashes, 1+ = internal nodes), decimal, no leading zeros
// <N>: tile index, zero-padded into 3-digit path elements:
// index 1234567 → x001/x234/567
// <W>: partial tile width (1–255), decimal, no leading zeros
Response:
Content-Type: application/octet-stream
Cache-Control: max-age=31536000, immutable // full tiles are immutable
// Body: <W> × 32 bytes of SHA-256 hashes, concatenated2.5.3 Entry Bundle Endpoint
Log entries are served as entry bundles at the level-0 path. Each bundle contains entries in sequence, each prefixed with a big-endian uint16 length.
GET https://log.atrib.dev/v1/tile/entries/<N>
GET https://log.atrib.dev/v1/tile/entries/<N>.p/<W>
Response:
Content-Type: application/octet-stream
Content-Encoding: gzip // SHOULD be compressed
Cache-Control: max-age=31536000, immutable
// Body: sequence of length-prefixed entries:
struct EntryBundle {
struct LengthPrefixedEntry entries[]; // until end of bundle
}
struct LengthPrefixedEntry {
u16 length; // big-endian, length of entry_bytes
u8 entry_bytes[length]; // AtribLogEntry ([§2.3.1](#231-entry-serialization)), always 90 bytes
}Note (Entry bundle size): Every AtribLogEntry is exactly 90 bytes, so every uint16 length prefix in an entry bundle will be 0x00 0x5A (90 in big-endian). Clients MAY rely on this fixed size as a consistency check. If the entry format changes in a future specification revision, a new log origin will be used.
Tile API error responses:
- 404 Not Found: the requested tile, entry bundle, or checkpoint does not exist (e.g., tile coordinates beyond the current tree)
- 400 Bad Request: malformed path (non-numeric level or index)
2.5.4 Point-Lookup Endpoint (OPTIONAL)
Log implementations MAY expose a point-lookup endpoint that returns a single decoded log entry by its record_hash. The endpoint is OPTIONAL, verifiers achieve the same result by walking the entry-bundle endpoint (§2.5.3), but explorers, identity views, and ad-hoc record-verification flows benefit from a single-record fetch when the implementation provides one. When provided, the endpoint MUST follow the shape below so consumers can rely on a uniform contract across log implementations.
GET https://log.atrib.dev/v1/lookup/<record_hash_hex>
// record_hash_hex: 64 lowercase hex characters
Response 200 OK:
Content-Type: application/json
{
"log_index": 482193, // 0-indexed position in the log
"record_hash": "sha256:4797...", // canonical sha256 of the signed record
"creator_key": "haoZK4...", // base64url Ed25519 pubkey
"context_id": "b5a2ebf81d43...", // 32-hex
"timestamp_ms": 1778112565186,
"event_type": "https://atrib.dev/v1/types/observation", // URI form for full fidelity
"event_type_byte": 3 // numeric byte per §2.3.1
}
Error responses:
- 404 Not Found: no record with the given record_hash exists in the log
- 400 Bad Request: malformed record_hash (not 64 hex characters)The response carries the decoded 90-byte log entry only (§2.3.1). It does NOT carry the full canonical record body. The log commits to a hash; the body lives elsewhere by design (see §2.10 and D062). Consumers needing the body to re-canonicalize and re-verify the signature MUST retrieve it via one of:
- The producer-local mirror per §5.9, if the producer's mirror is reachable.
- A Record Body Archive Layer per §2.12, if one is available for the record's
creator_keynamespace. - Any consumer-side index that retained the body during ingest (e.g. graph indexers may cache bodies; this is implementation-specific and not a normative protocol surface).
A log MAY decline to provide this endpoint and respond 404 to all /v1/lookup/... requests. Consumers who require single-record fetches against such logs MUST fall back to entry-bundle traversal per §2.5.3.
2.5.5 Recent-Records Endpoint (OPTIONAL)
Log implementations MAY expose a recent-records endpoint returning the newest N decoded entries in the tree. The endpoint is OPTIONAL, explorers and live-activity feeds benefit from a paginated newest-first feed, but verification does not depend on it. When provided, the endpoint MUST follow the shape below so dashboards can render activity feeds across log implementations uniformly.
GET https://log.atrib.dev/v1/recent
// Optional query parameters:
// limit=<n> (default: 20, max: 100)
// offset=<n> (default: 0; skip the N most-recent)
Response 200 OK:
Content-Type: application/json
{
"tree_size": 1882, // total entries in the log at query time
"limit": 20,
"offset": 0,
"entries": [
{
"log_index": 1881, // newest first
"record_hash": "sha256:4797...",
"creator_key": "haoZK4...",
"context_id": "b5a2ebf81d43...",
"timestamp_ms": 1778112565186,
"event_type": "https://atrib.dev/v1/types/observation"
}
// ...
]
}
Error responses:
- 400 Bad Request: invalid limit or offset (negative, non-numeric)The response carries a compact per-entry shape (no full record object) so a feed of 20 entries stays small. Like §2.5.4, the body is NOT returned, the log only stores the 90-byte commitment. Consumers needing the full record body for any entry retrieve it via the producer-local mirror (§5.9) or a Record Body Archive Layer (§2.12).
A log MAY decline to provide this endpoint and respond 404 to all /v1/recent requests. Consumers who require activity feeds against such logs MUST fall back to walking the entry-bundle endpoint and decoding entries client-side.
2.5.6 Log Subscription Surfaces (OPTIONAL)
Log implementations MAY expose subscription surfaces for consumers that need live or periodically refreshed views of new log entries. These surfaces are OPTIONAL. Verification never depends on them; consumers can always fall back to the checkpoint, tile, entry-bundle, lookup, and recent-records endpoints.
When provided, the subscription surfaces operate over the compact decoded log-entry shape from §2.5.5. They MUST NOT imply that the log stores signed record bodies. Filters are limited to fields visible in the 90-byte log entry unless the implementation explicitly declares an archive or body-index dependency.
The common filters are:
creator_key=<base64url>: exact Ed25519 public key match.context_id=<32-hex>: exact session anchor match.event_type=<label-or-uri>: decoded event-type label or atrib normative event_type URI.since=<timestamp>: inclusive millisecond timestamp or ISO timestamp.after=<log-index>: entries whose log index is strictly greater than this cursor.-1means before genesis. This is the exact replay cursor.
Filters such as topic and importance require record-body or annotation-body indexing. A commitment-only log implementation SHOULD reject those filters with 400 Bad Request rather than silently ignoring them.
Server-Sent Events
GET https://log.atrib.dev/v1/stream?creator_key=<base64url>&event_type=annotation&since=1778112565186
Response 200 OK:
Content-Type: text/event-stream
event: ready
data: {"tree_size":1882,"filters":{"creator_key":"haoZK4...","event_type":"annotation","after":1880},"resume_after":1880,"replay_through":1881}
id: 1883
event: log_entry
data: {"tree_size":1884,"entry":{"index":1883,"record_hash":"sha256:4797...","creator_key":"haoZK4...","context_id":"b5a2ebf81d43...","timestamp_ms":1778112567000,"event_type":"annotation","event_type_byte":5}}id is the log index of the entry. For an exact reconnect, a client sends the
last processed index through the SSE Last-Event-ID header or the after
query parameter. When both are present, Last-Event-ID MUST win so a native
EventSource can advance beyond the URL's initial cursor. Replay starts at the
next log index and preserves log order. The ready event reports the effective
resume_after cursor and the replay_through tail captured when the request
began.
An invalid cursor receives 400 Bad Request. A non-negative cursor at or
beyond the current tree size receives 409 Conflict, because the claimed last
processed entry is not present in the current log view. This can indicate a
wrong origin or rollback and MUST NOT degrade into a live-only stream.
since remains available for time-window discovery and compatibility. Its
inclusive boundary can replay more than one previously processed entry, so
clients that require exact reconnect behavior use the log-index cursor.
Implementations MAY send comment heartbeats to keep intermediaries from
closing idle connections.
JSON Feed Companion
GET https://log.atrib.dev/v1/feed.json?event_type=transaction&limit=20
Response 200 OK:
Content-Type: application/feed+json
{
"version": "https://jsonfeed.org/version/1.1",
"title": "atrib log entries",
"home_page_url": "https://log.atrib.dev/",
"feed_url": "https://log.atrib.dev/v1/feed.json?event_type=transaction&limit=20",
"items": [
{
"id": "sha256:4797...",
"url": "https://log.atrib.dev/v1/lookup/4797...",
"title": "transaction at log index 1883",
"content_text": "atrib transaction entry 1883 from haoZK4...",
"date_published": "2026-05-28T23:58:00.000Z",
"_atrib": { /* decoded log entry */ }
}
],
"_atrib": {
"tree_size": 1884,
"limit": 20,
"offset": 0,
"filters": { "event_type": "transaction" }
}
}The JSON Feed companion is a pull surface for cron jobs, desktop readers, and hosted consumers that cannot hold a long-lived SSE connection. It follows the same filtering rules as /v1/stream.
2.6 Submission API (Write Interface)
The write interface accepts attribution records and returns inclusion proofs. This API is distinct from the read interface: it requires a valid, verifiable attribution record and returns a proof that the commitment was added to the log.
2.6.1 Submit Entry
POST https://log.atrib.dev/v1/entries
Content-Type: application/json
X-atrib-Priority: normal // optional, see below
// Request body: a complete, signed attribution record ([§1.2](#12-the-attribution-record)), bare,
// not wrapped in any envelope object.
{
"spec_version": "atrib/1.0",
"content_id": "sha256:3f8a2b...",
"creator_key": "ABC...",
"chain_root": "sha256:7e1f4a...",
"event_type": "https://atrib.dev/v1/types/tool_call",
"context_id": "4bf92f3577b34da6a3ce929d0e0e4736",
"timestamp": 1743850000000,
"signature": "XYZ..."
}The request body MUST be the bare JCS-canonical signed record exactly as defined in §1.2; there is no enclosing wrapper object, and no field may be added or removed by the client during transport. The body bytes MUST be the same bytes that were signed (modulo whitespace, since Content-Type: application/json does not require canonical re-serialization on the wire; it is the receiver's responsibility to re-canonicalize before signature verification per §1.4.3).
X-atrib-Priority is an OPTIONAL HTTP-level extension to the wire format. When present, its value MUST be one of "high" or "normal". The semantics are:
"high": the submitting client believes this record is on the critical path of an attribution chain that needs to be queryable promptly (per §5.3.5, transaction records are sent withpriority: "high"so they are admitted before any pendingtool_callrecords when the log's admission queue is congested)."normal": best-effort submission. This is the default when the header is absent.
Logs MAY use this header to order admission when their ingestion capacity is finite, but MUST NOT use it to reject entries (a log that consistently rejects "normal" priority submissions is misbehaving). Logs MAY ignore the header entirely. The header is non-normative for log correctness; it is purely an admission-control hint that lets a congested log preserve transaction-record latency under load.
The log MUST perform the following validation before accepting an entry:
Step 1: Verify the attribution record's Ed25519 signature per §1.4.3. Reject if verification fails with 400 Bad Request.
Step 2: Verify that spec_version is "atrib/1.0". Reject with 400 if not.
Step 3: Verify that event_type is a syntactically-valid absolute URI per §1.4.5; the URI need not be in atrib's normative set. Reject with 400 if not.
Step 4: Verify that timestamp is not more than 5 minutes in the future, matching §1.4.3. Reject with 400 if so.
Step 5: Verify that context_id is exactly 32 lowercase hex characters. Reject with 400 if not.
Step 6: Check for a duplicate: if an entry with the same record_hash already exists in the log, return the existing inclusion proof with 200 OK rather than 409 Conflict. Idempotent submission is required to handle retries safely.
Error responses from the submission API use Content-Type: application/json with a JSON object containing an error field (string). Example: {"error": "spec_version must be 'atrib/1.0'"}. The format is not RFC 9457 Problem Details (that format is reserved for the graph query API, §3.5.4).
2.6.2 Inclusion Proof Response
On successful submission or duplicate detection, the log returns a proof bundle:
// Response: 200 OK
Content-Type: application/json
{
"log_index": 4821936, // zero-based index in the log
"checkpoint": "log.atrib.dev/v1\n4821937\nCsUY...=\n\n— log.atrib.dev/v1 ...",
"inclusion_proof": [
"gSKyXoYZUgZ6jduW...", // base64-encoded SHA-256 sibling hashes
"B95lDa8R83lS8n0e...", // from leaf level up to root
"EKNzoDWG8LGC0Yp9..."
],
"leaf_hash": "AHCioX9nLjsrse6Y..." // SHA-256(0x00 || entry_bytes)
}
// All hashes are standard base64 (RFC 4648 §4, with padding).The log MUST NOT return 200 until the entry is included in a signed checkpoint. The response is synchronous: the proof bundle in the response body reflects the entry's committed position. There is no asynchronous or polling model.
Clients MUST verify the inclusion proof before treating the record as committed. The verification procedure is specified in §2.7.
Security (Do not trust without verification): A response from the submission API proves only that the log accepted the entry. It does not prove that the log is behaving correctly. Clients MUST verify the checkpoint signature and compute the inclusion proof independently using the tile data to establish that the log has not served a fabricated proof. Trusting unverified inclusion proofs defeats the tamper-evidence property.
2.7 Inclusion Proof Verification
An inclusion proof demonstrates that a specific entry is at a specific position in the tree described by a checkpoint. Verification is performed locally using only the entry data and the hashes in the proof; no trust in the log server is required beyond the checkpoint signature.
To verify an inclusion proof, an implementation MUST:
Step 1: Verify the checkpoint's Ed25519 signature using the log's published public key (§2.4.2). Reject if verification fails.
Step 2: Verify that the checkpoint's tree size is greater than the claimed log_index.
Step 3: Recompute the leaf hash from the local entry data:
entry_bytes = serialize(AtribLogEntry) // [§2.3.1](#231-entry-serialization)
leaf_hash = SHA-256(0x00 || entry_bytes) // RFC 6962 leaf prefixStep 4: Verify that the recomputed leaf_hash matches the leaf_hash in the proof response.
Step 5: Compute the root hash by applying the inclusion proof path from the leaf up to the root. The left/right placement at each level is determined by the RFC 6962 tree decomposition (split at the largest power of 2 strictly less than the current subtree size), NOT by index % 2. The index % 2 shortcut is only correct for power-of-2 trees and produces wrong results for odd-sized trees:
function verifyInclusion(index, treeSize, leafHash, proof):
// Collect the (index, subtreeSize) path from root to leaf
path = []
idx = index; sz = treeSize
while sz > 1:
path.append((idx, sz))
k = largestPowerOfTwoLessThan(sz)
if idx < k:
sz = k // descend into left subtree
else:
idx = idx - k; sz = sz - k // descend into right subtree
// Reverse to get leaf-to-root order matching the proof array
path.reverse()
hash = leafHash
for i in 0..proof.length:
(pathIdx, pathSz) = path[i]
k = largestPowerOfTwoLessThan(pathSz)
if pathIdx < k: // target is in left subtree
hash = SHA-256(0x01 || hash || proof[i])
else: // target is in right subtree
hash = SHA-256(0x01 || proof[i] || hash)
return hashStep 6: Verify that the computed root hash matches the root hash in the checkpoint body.
If all six steps succeed, the entry is genuinely present in the log at the stated position. Failure at any step indicates either log misbehavior or a corrupted proof.
2.8 Proof Bundle Format
A proof bundle is a self-contained, offline-verifiable document that a creator can attach to an attribution record as evidence of its log commitment. It follows the C2SP tlog-proof specification (c2sp.org/tlog-proof).
// Proof bundle (text format, stored as .tlog-proof file):
c2sp.org/tlog-proof@v1
index 4821936
gSKyXoYZUgZ6jduWYrkDOARinOMGJveXjgMkBTcdPlQ=
B95lDa8R83lS8n0eG+o0buTxRKQTYFi//1U8anccXmA=
EKNzoDWG8LGC0Yp9o+sv3qllpMP9uHQ9B20KNL+Q1zs=
log.atrib.dev/v1
4821937
CsUYapGGPo4dkMgIAUqom/Xajj7h2fB2MPA3j2jxq2I=
— log.atrib.dev/v1 a3b2c1d0+base64signature
— witness.example.com e1f2a3b4+cosignature
// Format: tlog-proof header, empty line, inclusion proof hashes (one per line),
// empty line, full checkpoint (body + signature lines).
// All hashes: standard base64 with padding.
// Proof bundles SHOULD be stored alongside the attribution record.A proof bundle is sufficient to verify log commitment offline given only the log's origin (log.atrib.dev/v1) and its trusted public key. No network request is required for verification after the bundle is obtained.
Implementations SHOULD store proof bundles alongside attribution records. The @atrib/mcp SDK SHOULD return the proof bundle as part of the record submission response and cache it locally for at least the duration of the active session.
2.9 Witnessing and Cosignatures
2.9.1 Threat Model and Purpose
A checkpoint signed only by the log operator (§2.4) commits the operator to one (size, root) pair, but proves nothing about the operator's behavior over time. Four threats remain:
- Split-view. A dishonest operator presents one checkpoint to verifier A and a different one to verifier B at the same tree size, then later reconciles which version is "real."
- Operator compromise. An attacker who steals the operator's signing key can produce valid-looking checkpoints that fork the log; verifiers using only the operator's signature have no way to detect the fork.
- Infrastructure compromise. An attacker controlling the operator's hosting provider, DNS, TLS termination, or network path can serve forged checkpoints to specific verifiers without ever touching the operator's signing key. Witnessing addresses this only when the witnesses run on infrastructure independent from the operator's; witnesses colocated with the log inherit the same compromise. Witness diversity across hosting providers, network paths, and TLS authorities is what makes this threat expensive to exploit.
- Compelled removal. Legal pressure on a single operator can force removal or rewriting of historical records, with no record of the prior state outside the operator's control. Witnesses in different jurisdictions retain proof of the prior state even if the operator is compelled to drop it.
A witness is an independent party that periodically reads the log's checkpoints, verifies that each new checkpoint consistency-extends the previous one (RFC 6962 §2.1.4), and publishes a cosignature attesting to that fact. A verifier requiring N witness cosignatures forces an attacker to compromise the operator AND N witnesses simultaneously to produce a coherent forged history. The strength of the guarantee scales with witness diversity along three axes: distinct signers (defends against threats 1 and 2), distinct infrastructure (defends against threat 3), and distinct jurisdictions (defends against threat 4). A verifier configuring witnesses that share any of these dimensions with each other or with the operator gets weaker guarantees than the cosignature count alone suggests.
2.9.2 Cosignature Format (normative)
A cosignature reuses the C2SP signed-note line shape (§2.4.3) but encodes a 76-byte payload instead of 68. Per c2sp.org/tlog-cosignature:
— <witness_name> <base64(keyHash[4B] || timestamp[8B] || sig[64B])>Where:
keyHash[4B]is the witness's 4-byte key hash, computed identically to §2.4.2 using the witness's name and public key.timestamp[8B]is a big-endian uint64 of POSIX seconds at which the witness performed verification.sig[64B]is the Ed25519 signature over the cosignature signing input (below).
The cosignature signing input is the checkpoint body with a timestamp preamble:
cosignature/v1
<decimal seconds, no leading zeros>
<exact bytes of the [§2.4.1](#241-body-structure) checkpoint body, including its trailing newline>Note the second line is the same <seconds> value encoded into the timestamp field, in decimal text form. The blank line is mandatory. A verifier reconstructs this input bytewise from the timestamp it extracted from the cosignature line and the checkpoint body it is verifying.
A signature line whose base64 token decodes to 68 bytes is an operator signature (§2.4.3); 76 bytes is a witness cosignature. Verifiers MUST distinguish on decoded length.
2.9.3 Witness Behavior (normative)
A witness MUST:
- Periodically fetch the log's
/v1/checkpoint(§2.5.1) and verify the operator's signature per §2.4.3. - For each new checkpoint whose tree size exceeds the most recent checkpoint the witness has cosigned, fetch enough tile data (§2.5.2) to verify a consistency proof from the witness's prior view to the new checkpoint. If the consistency proof fails, the witness MUST NOT cosign and SHOULD log the inconsistency for operator and downstream consumers.
- Sign the cosignature input (§2.9.2) with its Ed25519 signing key, producing a 76-byte payload.
- Publish the resulting cosignature line at the URL defined in §2.9.4.
- Publish its public key in both C2SP vkey form and JSON form, mirroring the log's
/v1/log-pubkeyand/v1/pubkeyendpoints (§2.4.2). Verifiers configure trusted witness vkeys the same way they configure the trusted log vkey.
Witness signing keys SHOULD be independent of the log's signing key. Compromise of one MUST NOT compromise the other.
2.9.4 Cosignature Delivery (normative)
Cosignatures are witness-published. Each witness exposes its own HTTP endpoint:
GET https://<witness_origin>/v1/cosig/<log_origin_pct_encoded>/<root_hash_b64url>
Response:
Content-Type: text/plain; charset=utf-8
Cache-Control: public, max-age=31536000, immutable
// Body: a single C2SP signed-note signature line as defined in [§2.9.2](#292-cosignature-format-normative),
// terminated by \n. 404 if this witness has not cosigned the named checkpoint.The log operator does NOT aggregate or republish cosignatures. A verifier wanting to apply a witness threshold fetches from each trusted witness's endpoint directly and concatenates the returned lines into the checkpoint's signature block.
This delivery model is chosen specifically to defeat threat 2 (operator compromise). If cosignatures lived only on log.atrib.dev, an attacker controlling the log could suppress cosigs from a forged checkpoint and present it as uncosigned-but-genuine. Witness-published delivery removes the operator from the cosignature path entirely.
2.9.5 Verifier Behavior and Thresholds (informational)
The atrib protocol does NOT mandate a minimum cosignature threshold. Per CLAUDE.md invariant 7 ("the protocol has no thumb on the scale"), verifier policy is verifier-local. A verifier with no witness keys configured trusts the operator's signature alone, which is the V1 default and remains valid behavior for low-stakes verification.
Verifiers wishing to apply witness checks SHOULD:
- Maintain a list of trusted witness vkeys.
- For each checkpoint they want to verify, fetch cosignatures from each trusted witness's
/v1/cosig/...endpoint. - Verify each fetched cosignature line per §2.9.2 with the corresponding witness public key.
- Apply a verifier-chosen threshold. Examples: "at least 2 cosigs," "at least 1 cosig from a witness in a different jurisdiction than the operator," "all configured witnesses MUST have cosigned recently."
A verifier SHOULD reject a checkpoint whose cosignature timestamp is implausibly old or in the future relative to the verifier's clock. Suggested staleness bound: 24 hours, configurable.
2.9.6 Witness Discovery (out of scope for V1)
V1 of atrib does not specify a witness registry, witness coordination protocol, or witness reputation system. Verifiers configure trusted witness keys out-of-band, the same way they configure trusted log keys. A future revision MAY specify an open registry analogous to Sigsum's witness ecosystem, but doing so prematurely would lock in a discovery mechanism before atrib has any non-operator verifiers to consult on what shape they actually need.
2.9.7 Example: Cosigned Checkpoint
A verifier that has fetched cosignatures from two witnesses concatenates the lines into the operator's signed checkpoint to produce:
log.atrib.dev/v1
4821937
CsUYapGGPo4dkMgIAUqom/Xajj7h2fB2MPA3j2jxq2I=
— log.atrib.dev/v1 base64(operator_keyHash[4B] || operator_sig[64B])
— witness1.example.com base64(witness1_keyHash[4B] || timestamp1[8B] || witness1_sig[64B])
— witness2.example.org base64(witness2_keyHash[4B] || timestamp2[8B] || witness2_sig[64B])The operator's line decodes to 68 bytes; each cosignature line decodes to 76 bytes. The verifier independently verifies each line per the appropriate format (§2.4.3 for the operator, §2.9.2 for cosigs), then applies its threshold to the count and identity of valid cosignatures.
2.10 What the Log Stores and What It Does Not
This section is informative.
This section states the privacy properties of the log precisely, because they are the foundation of atrib's claim to be "observability without surveillance."
The log stores: the record hash, the creator's public key, the context_id (as raw bytes), the timestamp, and the event type. These are committed in the AtribLogEntry (§2.3.1) and are visible to any party that fetches entry bundles.
The log does not store: the content of tool calls, the content of agent responses, the user's identity, the merchant's product data, the amounts of transactions, or any payload that is not listed in the AtribLogEntry structure above.
What this means in practice: A party who fetches all entries from the log learns which creator keys were active, in which sessions (context_ids), at what times, and what type of events they recorded. They do not learn what those tools did, what was returned, who the user was, or what was purchased. The attribution graph connects records to transactions only when the merchant writes their own transaction record, and only the merchant knows the transaction details.
The context_id is visible in the log and is the same value used in OTel traces. Implementers who wish to prevent correlation between log entries and OTel traces MAY generate a separate log context_id derived from but not equal to the OTel trace-id, at the cost of making independent audit harder. The default is to use the OTel trace-id directly.
Note (Creator key pseudonymity): Creator public keys are stable identifiers visible in the log. A party who observes a creator's public key across multiple entries can infer that the same creator was active across those sessions. Creators who require stronger unlinkability across sessions may generate per-session keypairs, but doing so forfeits the ability to accumulate attribution weight under a single identity. This tradeoff is a design choice for each creator, not a protocol decision.
2.11 Cross-log Replication
This section is normative; the replication itself is OPTIONAL.
§2.9 (witnessing) defends against single-log-operator equivocation at the checkpoint level by requiring multiple operator-independent witnesses to cosign each checkpoint. Witnessing secures the root, not the records the root commits to. A log operator can still selectively censor records (refuse to commit them while returning success), equivocate at the record level when colluding with witnesses, or lose data after commitment.
The strongest defense against operator-level threats is independent replication: the same record committed to multiple operator-independent logs, with verifiers consulting more than one. This is how Certificate Transparency works in practice. atrib has the same threat model and benefits from the same defense.
2.11.1 Replication is optional
Records MAY be replicated to multiple atrib-conformant logs. There is no protocol-level mandate. Single-log deployments remain valid and produce conforming records. Cross-log replication is a robustness enhancement consumers adopt as their threat model requires.
2.11.2 Submission produces independent inclusion proofs
Logs do not coordinate. Each log treats a replicated submission as a fresh entry and returns its own checkpoint and inclusion proof. The submitter collects the proofs from all logs they replicated to.
2.11.3 Proof bundle format extension
The proof bundle (§2.8) MAY carry a list of (log_id, checkpoint, inclusion_proof) tuples instead of a single tuple. Format:
{
"record_hash": "sha256:...",
"log_proofs": [
{
"log_id": "log.atrib.dev", // [§2.4](#24-checkpoint-format) origin string
"checkpoint": "...", // C2SP-canonical signed note
"inclusion_proof": ["sha256:...", "..."], // RFC 6962 inclusion proof
},
{
"log_id": "log.example.com",
"checkpoint": "...",
"inclusion_proof": ["sha256:...", "..."],
},
],
}A bundle with a single log_proofs entry is equivalent to the legacy single-log bundle format; the array form is the canonical form when multiple logs are involved. Elements MAY carry an OPTIONAL anchor_type discriminator identifying non-atrib-log anchors; see §2.11.9.
2.11.4 Verifier-side threshold and equivocation detection
A verifier configured with a list of trusted log operators (the "trusted set") and a threshold M (the minimum number of trusted-set proofs required) MUST:
- Validate each
(log_id, checkpoint, inclusion_proof)tuple in the bundle independently against §2.7. For each tuple: confirm thelog_idmatches the issuing log's published origin, verify the checkpoint signature, and verify the inclusion proof against the checkpoint root for the bundle'srecord_hash. - Count the number of tuples whose
log_idappears in the trusted set AND whose proof verifies. Call this V. - If V < M, reject the record with
cross_log_threshold_not_met: true. - Equivocation detection. For each pair of distinct logs (A, B) in the trusted set that returned proofs in this bundle: compare the leaf bytes the inclusion proof was computed against. The leaf bytes are deterministic from the record_hash per §2.3 (90-byte AtribLogEntry containing record_hash, creator_key, context_id, timestamp_ms, event_type byte). If logs A and B return different leaf bytes for the same
record_hash, the verifier MUST reject the record withcross_log_equivocation_detected: trueand surface(log_id_A, leaf_bytes_A, log_id_B, leaf_bytes_B)for each disagreeing pair. Equivocation can ALSO be detected when one log returns a valid proof and another returns a "record not found" response within the bundle's epoch window: this is censorship-shaped equivocation and MUST be flagged ascross_log_censorship_suspected: truewith the silent log identified.
The default M=1 preserves single-log behavior. Consumers wanting cross-log confidence configure M ≥ 2 and a trusted set of independently-operated logs.
2.11.5 Log identity
Each log publishes a stable log_id derived from its origin string per §2.4. Verifiers cross-reference the identifier against their trust configuration. Adding a log to the trusted set is an out-of-band consumer policy decision; atrib does not maintain a central registry of trusted logs.
2.11.6 What replication does and does not defend against
Defends against: single-log-operator censorship, single-log-operator equivocation (when at least one cooperative log retains the record), single-log data loss, single-log compromise.
Does NOT defend against: collusion across all logs in the trusted set (consumer is responsible for picking logs operated by independent parties with different incentives); submission-time censorship by some logs (threshold M handles this gracefully); record-level retroactive removal across all logs (no defense if all logs comply).
See D050 for the design rationale and the alternatives considered.
2.11.7 Anchors: generalizing the replication target
This section is normative; anchoring beyond a single log remains OPTIONAL at the protocol level.
The thing a verifier needs from a second log (§2.11.1) is not another atrib log. It is any independently operated service that can prove a hash existed no later than a stated time. This section generalizes the replication target from "atrib-conformant log" to anchor.
An anchor is a service that:
- (a) accepts a 32-byte SHA-256 hash,
- (b) later yields a proof that the hash existed no later than an attested time, and
- (c) whose proof is verifiable offline by a pure function
(proof, record_hash, trust_material) → { valid, anchored_at_ms | null, pending }— no network calls, no wall clock, no randomness, the same determinism discipline as payments profile §8. Two verifier runs on an identical bundle and trust configuration MUST produce identical output.
atrib log-nodes are the richest conforming anchor: they provide inclusion, in-log ordering, and the read surfaces of §2.5. Sigstore Rekor, RFC 3161 timestamping authorities, and OpenTimestamps conform with existence-by-time semantics only. That weaker guarantee is sufficient for the plurality property: a verifier holding one atrib-log proof plus one independent existence-by-time proof no longer terminates its trust claim at a single operator.
No signed byte changes. Attribution records (§1.3), the 90-byte log entry (§2.3.1), and checkpoints (§2.4) are untouched by anchoring. Proof bundles are post-signing artifacts stored alongside records (§2.8). Anchoring is also permissionless and post-hoc: any party — producer, host, or third party — MAY anchor an existing record_hash to an additional anchor at any time and append the proof to the bundle, without access to the record's signing key (§2.11.10).
Anchor plurality is a producer-side configuration posture (§2.11.12) and a verifier-side tier (§2.11.11). It is never a protocol mandate, never a gate on the primary tool call or response (§5.8), and never a synchronous wait before returning a response (§5.3.5). Single-anchor bundles — including every bundle issued before this section existed — remain valid without re-issuance, ever.
2.11.8 Anchor type registry
An anchor type registration defines four things:
| Field | Meaning |
|---|---|
anchor_type | Stable string identifier (registry below) |
| Anchored message | Exactly which bytes the proof commits to, derived deterministically from record_hash |
| Proof payload schema | The fields inside the bundle element's proof object (§2.11.9) |
| Verification function | The pure function of §2.11.7(c) |
Initial registry (v1):
anchor_type | Anchored message | Proof payload | Trust material | Time semantics |
|---|---|---|---|---|
atrib-log (default when absent) | 90-byte AtribLogEntry (§2.3.1) embedding record_hash | existing checkpoint + inclusion_proof per §2.11.3, verified per §2.7 | log public key (§2.4.2) | checkpoint time + in-log ordering |
sigstore-rekor | rekord-type entry over the anchor-claim artifact (§2.11.10), carrying a fresh anchoring signature | entry_uuid, log_index, entry_body_b64, inclusion_proof, checkpoint, integrated_time_ms, signed_entry_timestamp_b64 | Rekor instance public key | integrated_time |
rfc3161-tsa | messageImprint.hashedMessage = the raw 32 record_hash bytes, hashAlgorithm = SHA-256 | timestamp_token_b64 (DER TimeStampToken), hashed_message_hex, gen_time_ms | TSA certificate chain / root | genTime |
opentimestamps | the raw 32 record_hash bytes as the OTS commitment input | ots_b64 (serialized .ots proof), commitment_hex, status: "complete" | "pending", attested_time_ms when complete | Bitcoin block headers (via any header source the verifier trusts) | attested block time |
Unknown anchor_type values MUST be surfaced by verifiers (in unknown_types, §2.11.11) but MUST NOT count toward plurality and MUST NOT be treated as invalidating the bundle or the record — the same forward-compatibility rule as unknown event types (§1.2.4).
A pending proof (an OpenTimestamps attestation awaiting Bitcoin confirmation) is carried in the bundle and upgraded in place later. Proof bundle caching stays keyed by record_hash per §5.3.5; that keying is what makes in-place upgrade safe.
2.11.9 log_proofs element discriminator
The log_proofs array of §2.11.3 is the wire shape for all anchors. Elements gain an OPTIONAL anchor_type discriminator:
{
"record_hash": "sha256:...",
"log_proofs": [
// legacy element, no discriminator ⇒ anchor_type "atrib-log"; parses exactly as today
{
"log_id": "log.atrib.dev", // [§2.4](#24-checkpoint-format) origin string
"checkpoint": "...", // C2SP-canonical signed note
"inclusion_proof": ["...", "..."], // RFC 6962 inclusion proof, base64 per [§2.6.2](#262-inclusion-proof-response)
},
// non-tlog anchor element
{
"anchor_type": "rfc3161-tsa",
"anchor_id": "freetsa.org", // stable anchor identity, the role log_id plays for logs
"proof": {
"timestamp_token_b64": "MIIC...",
"hashed_message_hex": "c09397f4...",
"gen_time_ms": 1782864031000,
},
},
{
"anchor_type": "opentimestamps",
"anchor_id": "opentimestamps-calendars",
"proof": { "ots_b64": "AE9w...", "commitment_hex": "c09397f4...", "status": "pending" },
},
],
}Rules:
- (a)
anchor_typeabsent ⇒ the element is anatrib-logproof; the legacy(log_id, checkpoint, inclusion_proof)triple is REQUIRED and aproofobject is forbidden. Every existing bundle parses unchanged, byte-for-byte. - (b)
anchor_typepresent and ≠"atrib-log"⇒anchor_idandproofare REQUIRED. - (c) The array key stays
log_proofs. Renaming it would break every existing bundle parser for zero semantic gain; the name is a historical artifact and is documented as such. - (d) Elements are unordered.
- (e) An element violating rule (a) or (b) is malformed: verifiers MUST exclude it from every count except
proof_count/malformed_countand MUST NOT treat its presence as invalidating the bundle or the record.
2.11.10 The anchoring-signature claim artifact
Anchor types whose upstream service requires a signed artifact (Sigstore Rekor's rekord type) MUST anchor a fresh anchor-claim artifact, never the record's own signature. The artifact is the UTF-8 bytes of:
"atrib-anchor/v1:" + record_hashwhere record_hash is in its canonical "sha256:" + 64-lowercase-hex form (§1.2.3). The artifact is deterministically reconstructible from record_hash alone and reveals nothing beyond the commitment itself, preserving the §8.3 posture. The atrib-anchor/v1: prefix domain-separates the anchoring signature from any canonical record (JCS records begin with {; the prefix makes the separation explicit rather than structural).
The anchoring party signs the artifact bytes with its own Ed25519 key — a fresh anchoring signature. The anchoring key MAY be the record's creator_key or any third party's key, since anchoring is permissionless (§2.11.7).
The record's own signature MUST NOT be reused as the anchoring signature. The digest path (a Rekor hashedrekord entry with data.hash = record_hash and the record's signature) is cryptographically unimplementable, twice over:
record_hashis computed over the JCS canonicalization of the COMPLETE record INCLUDING thesignaturefield (§1.2.3 normative clarification), while the signature verifies over the signature-less canonical form (§1.4.2). The two byte strings differ, so an upload-time check that the signature verifies over the artifact behinddata.hashfails by construction.- atrib signatures are Pure EdDSA (RFC 8032 §5.1.6, no prehashing), which cannot be verified from a digest alone regardless.
Verification of a sigstore-rekor element: reconstruct the anchor-claim artifact from the bundle's record_hash; confirm the entry body's artifact content matches the reconstruction and carries the prefix; verify the embedded Ed25519 anchoring signature over the artifact bytes; verify the inclusion proof against the checkpoint and the signed entry timestamp against the Rekor instance key. An entry whose artifact does not reconstruct from the bundle's record_hash is an invalid proof — not counted, not equivocation — even when its embedded signature is genuinely valid over its own (mismatched) artifact.
The conformance corpus (§2.11.13) pins both directions: a fully verifying anchor-claim vector and a vector demonstrating that the record's signature verifies over the signing input but NOT over the bytes behind record_hash.
2.11.11 Anchor independence and the anchor_plurality annotation
Two verified anchors are independent iff they fall in different operator groups. The verifier's trust configuration maps (anchor_type, anchor_id) → operator group; the default grouping is one group per distinct (anchor_type, anchor_id) pair. Two atrib log-nodes run by the same operator MUST be declared as one group by that operator's consumers; atrib maintains no central registry (same posture as §2.11.5). independent_count counts distinct groups among verified, non-pending proofs — mirroring D052's distinct-verified-keys counting rule.
When a proof bundle is supplied, verifiers populate an anchor_plurality annotation:
"anchor_plurality": {
"proof_count": 3, // elements in log_proofs
"verified_count": 2, // proofs whose pure-function verification passed
"pending_count": 1, // e.g. OTS status "pending"; not counted as verified
"malformed_count": 0, // rule (a)/(b) violations per [§2.11.9](#2119-log_proofs-element-discriminator)
"unknown_types": [], // surfaced, not counted, not invalidating
"independent_count": 2, // distinct operator groups among verified
"plurality_met": true, // independent_count >= requiredAnchors (verifier option, default 2)
"single_anchor": false, // tier flag: independent_count == 1
"equivocation_detected": false,
"anchored_at_range_ms": [1782864001000, 1782864031000] // min/max attested times among verified anchors; null when none carry a time
}Anchor count 1 is a tier, not a failure. A record whose bundle yields independent_count: 1 verifies as valid with single_anchor: true and plurality_met: false — signal not block, exactly like cross_attestation_missing (D052) and in_envelope: false (D051). No bundle at all ⇒ anchor_plurality: null; unanchored records are already a legitimate state.
Hard rejection remains reserved for the §2.11.4 conditions, unchanged: consumer-configured threshold M not met (cross_log_threshold_not_met, M still defaults to 1) and equivocation detection (cross_log_equivocation_detected; censorship-shaped disagreement is flagged as cross_log_censorship_suspected with the silent log identified). Threshold and tiering are orthogonal: a bundle can satisfy plurality_met: true and still be rejected by a consumer's M, and vice versa. Equivocation checks apply per pair: two atrib-log proofs compare committed leaf bytes exactly as §2.11.4 step 4 specifies; any anchor whose proof does not bind the bundle's record_hash (a TSA token whose hashedMessage differs, a Rekor entry whose artifact does not reconstruct) is simply an invalid proof, not counted and not equivocation. Time-window disagreement across anchors is informational (anchored_at_range_ms), never a rejection — anchors legitimately attest at different times.
Fact/policy separation holds (§3.6): anchors and their verification live entirely in proof bundles and verifier annotations. Nothing enters the graph layer (§3); no graph endpoint returns anchor-weighted or anchor-interpreted data. What a consumer does with single_anchor: true is consumer policy.
2.11.12 Producer-side anchor posture
Producers accept an anchor configuration:
{
"anchors": [
{ "anchor_type": "atrib-log", "url": "https://log.atrib.dev/v1" },
{ "anchor_type": "opentimestamps", "calendars": ["https://a.pool.opentimestamps.org"] },
],
"allow_single_anchor": false, // default
}Resolution precedence, exact:
- No anchor config at all ⇒ the SDK's built-in default set (two independent anchors) applies. Zero-config producers get plurality without opting in.
- Explicit config with ≥ 2 entries ⇒ used as given.
- Explicit config with 1 entry and
allow_single_anchor: true⇒ used as given, no warning — the deliberate-single-anchor analog of a deliberate danglinginformed_byclaim per D113. - Explicit config with fewer than 2 entries and no flag ⇒ an
atrib:-prefixed warning naming the missing plurality, plus a sidecar degradation marker_local.anchor_config = { configured: <n>, allow_single_anchor: false }(§5.9.3). The operation continues. This path MUST NOT throw into the primary path and MUST NOT disable signing (§5.8).
Submission fan-out is per-anchor fire-and-forget with independent retry queues. Anchoring MUST NOT be awaited before returning a response (§5.3.5). A fully failed anchor degrades the bundle to whatever proofs arrived; the record itself — signed, mirrored, returned to the caller — is unaffected. The atrib-log anchor keeps today's exact submission path (§2.6.1); non-tlog adapters are additive clients. Anchor plurality can only ever add proofs; it can never block a tool call, a response, or a signature.
2.11.13 Conformance
The anchor-interface conformance corpus lives at spec/conformance/2.11/anchors/ (fixtures + manifest), generated deterministically by packages/log-dev/scripts/generate-conformance-anchors.ts with a reference implementation at packages/verify/test/conformance-anchors.test.ts. The thirteen cases pin: legacy absent-discriminator parsing, the §2.11.9 malformation rules, unknown-type forward compatibility, plurality tiering (including pending-proof exclusion and in-place upgrade), operator-group independence, the §2.11.10 anchor-claim artifact with real Ed25519 anchoring signatures and the digest-path impossibility vector, the unchanged §2.11.4 hard conditions, and the §2.11.12 resolution rules. All record signatures, anchoring-claim signatures, signed-note checkpoints, and RFC 6962 inclusion proofs in the corpus are real; the RFC 3161 and OpenTimestamps payload interiors are structural in the initial corpus revision (the commitment-binding fields are real record hashes), with full per-type cryptographic vectors as a planned extension. Implementations MUST reproduce the expected anchor_plurality annotation for every case and MUST produce identical output across repeated runs on identical input.
2.12 Record Body Archive Layer
The atrib log commits to a record's hash. The signed canonical record body lives separately by design (§2.10, §2.3). This separation preserves the salted-commitment privacy posture (§8.3) and bounds the log's storage cost. It also creates a verifiability question: a verifier holding the public commitment cannot re-canonicalize the record and re-check its signature without obtaining the body from somewhere.
This section specifies the OPTIONAL Record Body Archive Layer: a content-addressed durability layer for canonical record bodies, separate from the log. The archive is what closes the verifiability loop for records whose privacy posture admits public-body retrieval. Records using the salted-commitment posture (§8.3) deliberately do NOT submit bodies to any archive; their verifiability story is producer-local.
The archive ADR is D070; this section establishes the spec-level surface and contract.
2.12.1 Architectural position
The archive is a separate service from the public log. It MUST NOT be collapsed into the log operator's surface, preserving this separation is what keeps §2.3.1's commitment-only guarantee intact and lets §8.3 producers participate without leaking bodies. An archive operator MAY also run a log; they are distinct services with distinct trust models.
The protocol does not mandate a single archive. Multiple archives MAY mirror the same record set; consumers MAY query any archive that purports to hold a given record. Bodies are content-addressed (each body's canonical hash matches the public log's record_hash), so any archive serving a record body is verifiable against the log without trusting the archive operator beyond the question "do you have this record."
2.12.2 Submission model
Producers MAY submit a record body to one or more archives at the same time as committing the record's hash to the log. Submission to the archive is OPTIONAL at the protocol level. A producer's archive policy is per-record: producers MAY submit some records' bodies and not others (e.g., submit tool_call bodies but withhold observation bodies that contain sensitive content; in the latter case the producer typically also uses the salted-commitment posture per §8.3).
Submission is content-addressed and idempotent: re-submitting an already-archived body MUST be a 200 success, not a 4xx duplicate. The archive validates submissions by canonicalizing the body, computing its record_hash, and confirming the same hash is present in at least one log the archive trusts (preventing archives from being used as garbage stores for bodies whose hashes have never been committed anywhere).
Reference producers SHOULD submit to archives after the log accepts the record and returns an inclusion proof when that proof is available. This keeps archive submission optional and best-effort while letting the archive validate the submitted body against a committed log entry immediately. Producers that stage archive submission before proof availability MUST still tolerate archive rejection and retry later with proof or other trusted log evidence.
The V1 submission API is:
POST https://archive.atrib.dev/v1/records
Content-Type: application/json
{
"record_hash": "sha256:...", // optional, checked if present
"record": { /* full AtribRecord per §1.2, including signature */ },
"proof": { /* optional §2.8 proof bundle from a trusted log */ },
"log_proofs": [ /* optional §2.8 proof bundles */ ],
"authorizationEvidence": [ /* optional §5.5.6 verifier inputs */ ],
"evidence": [ /* optional precomputed §5.5.6 result blocks */ ],
"resolvedFacts": { /* optional §6.7 local facts */ }
}
Response 201 Created:
{
"record_hash": "sha256:...",
"record": { /* full AtribRecord */ },
"log_proofs": [],
"evidence": [],
"resolved_facts": {},
"archived_at_ms": 1700000000000,
"retention_window_ms": 31536000000
}authorizationEvidence is a submission-time convenience for producers that already have local sidecar evidence. The archive MAY verify it into public evidence[] result blocks on retrieval. Raw bearer tokens MUST NOT be required for this path and SHOULD NOT be submitted.
When the evidence source is a producer-local sidecar (§5.9.3), producers SHOULD project only verifier evidence and resolved facts into archive submissions. Local-only raw args, result, or private reasoning payloads SHOULD remain in the producer mirror unless the record's privacy posture explicitly permits public body disclosure.
2.12.3 Retrieval API
GET https://archive.atrib.dev/v1/record/<record_hash_hex>
// record_hash_hex: 64 lowercase hex characters
Response 200 OK:
Content-Type: application/json
{
"record": { /* full AtribRecord per §1.2, including signature */ },
"log_proofs": [ /* optional: §2.8 proof bundle entries from logs the archive trusts */ ],
"evidence": [ /* optional §5.5.6 result blocks */ ],
"resolved_facts": { /* optional §6.7 local facts */ },
"archived_at_ms": 1700000000000,
"retention_window_ms": 31536000000
}
Response 404 Not Found:
{ "error": "not archived", "record_hash": "sha256:..." }
Response 410 Gone:
{
"error": "retention expired",
"record_hash": "sha256:...",
"retention_window_ms": 31536000000,
"archived_at_ms": 1700000000000,
"expired_at_ms": 1731536000000
}410 Gone is distinct from 404 Not Found: 410 means "the body was archived and has been deleted per retention policy"; 404 means "this body was never archived here." Verifiers that see 410 from one archive MAY query other archives; verifiers that see 404 across all known archives know the body is producer-local-only.
The returned record is verified the same way regardless of source: re-canonicalize via §1.3, re-hash, compare against the log commitment, then re-verify the signature per §1.4. The archive cannot fabricate bodies; it can only suppress them.
Explorers and lightweight clients that only need verifier evidence MAY call:
GET https://archive.atrib.dev/v1/evidence/<record_hash_hex>
Response 200 OK:
{
"record_hash": "sha256:...",
"record_summary": {
"creator_key": "...",
"context_id": "...",
"event_type": "...",
"timestamp": 1700000000000,
"content_id": "sha256:..."
},
"evidence": [ /* §5.5.6 result blocks */ ],
"resolved_facts": {},
"archived_at_ms": 1700000000000,
"retention_window_ms": 31536000000
}This endpoint is a projection of the archived body and sidecar evidence. It does not change the public log lookup contract.
2.12.4 Retention manifest
Each archive operator MUST publish a retention manifest stating its commitment:
GET https://archive.atrib.dev/v1/retention
{
"operator": "archive.atrib.dev",
"minimum_window_ms": 31536000000, // 1 year, MUST hold every body at least this long
"best_effort": "forever", // OR a numeric window, OR null
"archived_after_ms": 1735689600000, // bodies submitted before this time MAY be 410'd
"policy_url": "https://archive.atrib.dev/policy"
}The manifest is a public commitment by the operator. Operators MAY publish a stronger commitment than minimum_window_ms; operators MUST NOT publish a weaker one without a transition window during which both old and new manifests are honored for already-archived bodies.
2.12.5 Federation
Multiple archives MAY mirror the same body set. The protocol contract that makes this work is content-addressing: a record body retrieved from archive A has the same bytes as the same body from archive B (any difference is a hash mismatch, which is trivially detectable and rejects the differing body). Federation requires:
- Submission to multiple archives is allowed. Producers MAY submit the same body to multiple archives, each independently. There is no protocol-level archive registry.
- Cross-archive sync is implementation-defined. Archives MAY pull from each other or share a common backing store; the protocol does not mandate a sync mechanism.
- Verifier queries multiple archives. Consumers MAY treat an archive set the same way §2.11 treats a trusted log set: query M archives, accept any body whose hash matches the log commitment, treat consistent
404from all M as "body unavailable."
A V1 deployment MAY ship with a single archive (archive.atrib.dev); the API contract is shaped so federation is additive when consumer demand for it appears.
2.12.6 Trust model
What an archive can do:
- Suppress bodies (return 404 or 410 for records it should hold). Mitigation: federation; verifier policy that requires M archives.
- Lie about retention (claim a window in the manifest, then delete earlier). Mitigation: signed retention checkpoints (a future ADR may specify §2.4-shaped checkpoints for archive retention, mirroring the log's tree-state checkpoints).
What an archive cannot do:
- Fabricate bodies. Bodies are content-addressed; any returned body's hash must match a log commitment, or a verifier rejects it on hash mismatch.
- Replace bodies retroactively. Same: content-addressed, hash mismatch.
- Forge submissions. Each archive validates that submitted bodies have a corresponding committed log entry before accepting (enforced at submission time per §2.12.2).
2.12.7 Tiered verifiability
The archive layer enables a three-tier verifiability story for any committed record:
| Tier | What it proves | What it requires | Privacy posture |
|---|---|---|---|
| 1: Commitment | The record hash existed at time T | Public log + checkpoint signature (§2.4) | Compatible with all postures, including §8.3 |
| 2: Body retrieval | The actual canonical bytes the hash commits to | Body from producer mirror (§5.9) OR archive (§2.12.3) | Producer-local body works for all postures; archive body requires producer to have submitted |
| 3: Signature re-verification | The body was signed by the claimed creator_key | Body (Tier 2) + Ed25519 verification (§1.4) | Same as Tier 2 |
A verifier presented with only Tier 1 can prove "a record existed"; Tiers 2 + 3 prove "this is the record." Tools that depend on full verification (e.g., the payments profile §8 calculation algorithm) require all three tiers. Tools that only need existence proof (e.g., audit-log replay, anomaly detection over event-type byte distributions) can operate at Tier 1 alone.
2.12.8 Conformance
Archive operators implementing this section:
- MUST expose
/v1/record/<record_hash_hex>with the response shape in §2.12.3. - MUST expose
/v1/evidence/<record_hash_hex>with the projection shape in §2.12.3. - MUST expose
/v1/retentionwith the manifest shape in §2.12.4. - MUST expose
POST /v1/recordswith the submission shape in §2.12.2. - MUST validate submitted bodies against at least one log's commitment before accepting.
- MUST honor the
minimum_window_msretention they publish. - MAY decline to archive any specific submission with a documented error response.
The retrieval, evidence-projection, retention, and uncommitted-record cases are covered by spec/conformance/2.12/.
§3 Graph Query Interface
Nine edge types. Deterministic derivation. Fact layer only.
The data model and query API for turning attribution records into a structured provenance graph, the input to policy evaluation and settlement calculation.
What atrib chains, what it does not
atrib's graph certifies five structural axes of agent activity:
- Identity-of-record (signature): the holder of a
creator_keysigned this record. - Per-session ordering (chain_root pointing at the parent record's hash): this record came after that one in the same session, and no records were inserted or removed between them.
- Cross-session sameness (session_token via CROSS_SESSION): these records belong to the same logical session across OTel trace boundaries.
- Cross-session causal anchoring (provenance_token via PROVENANCE_OF): this record's action descends from that upstream anchor (D044).
- Agent-claimed reasoning composition (informed_by via INFORMED_BY): the agent claims these specific prior records informed this action (D041).
atrib does NOT certify:
- That a referenced record's content actually influenced the agent's decision. The chain proves precedence; the agent could have ignored the referenced record entirely.
- That the agent's reasoning is truthful. A signed
informed_byclaim proves the agent committed to the claim; it does not prove the agent reasoned this way. - That a tool's response was real, absent tool-side attestation.
result_hashis the agent's claim about what the tool returned; tool-side response signing closes this gap when needed (§7.6).
These limits define the substrate's value. atrib stays useful because it is honest about what it certifies and what it does not. Reasoning chains and outcome verification are layered on top using the existing primitives (extension URIs + informed_by per D047, tool-side attestation + observation witnessing per §7.6, signed third-party evaluation per D087). Each pattern adds a signer outside the agent. It can corroborate the action, but it cannot turn the agent's account of its own reasoning into a verifiable fact.
The useful mental model is: one graph, two planes. The chronology plane preserves faithful event history: chain and session edges show what happened before what inside a context, and cross-session edges show explicit continuity across contexts. The declared-relationship plane preserves signed claims about how records relate: informed_by, provenance_token, annotates, and revises state that the signer treats one record as an input, anchor, comment target, or superseded position. Both planes make up the atrib graph. /v1/graph exposes the derived graph for a scope, while /v1/chain and /v1/trace are projections over that graph: chain isolates chronological continuity, trace isolates declared relationships. The graph is semantic only in this signed-declaration sense; it never infers semantic relationships by reading tool names, responses, or natural-language content.
Contents
- 3.1 Design Principles and Rationale
- 3.2 Graph Data Model
- 3.3 Verification State
- 3.4 Query API
- 3.5 Response Schema
- 3.6 Implementation Notes
3.1 Design Principles and Rationale
This section is informative.
This section explains the reasoning behind the graph model's core design decisions. These are not preferences or conventions; they are the logical consequences of what a trust infrastructure can and cannot honestly assert. Understanding the reasoning matters as much as the rules themselves, because it determines how to evaluate proposed changes and extensions.
Why the graph records structure, not causality
The most natural instinct when building an attribution system is to encode causal relationships: "tool A influenced tool B which led to transaction T." This is what attribution means in common language and what settlement calculations ultimately need to reason about. So why doesn't the protocol encode it?
Because causality is always an inference, never a fact. A protocol can verify that event B occurred after event A in the same session, and that B's creator set their chainroot to the hash of A's record. It cannot verify that A _caused B, or that A's output was actually used, or that the agent's decision was influenced by A's result rather than something else entirely. Encoding a causal claim in a record that is signed and committed to an append-only log would mean committing an unverifiable assertion as if it were a verified fact. That is precisely what a trust infrastructure must not do.
The practical consequence is that edges in the atrib graph are derived from observable structure (chain linkage, shared session identifiers, timestamps) and express only what that structure shows. What those structural relationships mean causally is an inference that the policy layer makes, with full visibility into the evidence and full accountability for the interpretation. If a merchant and a creator disagree about whether a contribution was causally significant, they are disagreeing about a policy judgment, not about a fact the protocol recorded incorrectly. That is the right place for the disagreement to live.
Why verification state is categorical, not numeric
An earlier design of this specification used a numeric confidence score (a decimal between 0.0 and 1.0) to represent how thoroughly a record had been verified. This was rejected for a specific reason: a number implies a ratio. If log_committed is 0.9 and signature_valid is 0.5, the number encodes the judgment that log commitment is worth roughly 1.8× a valid signature for attribution purposes. But whether that ratio is correct for any given policy is a business decision, not a protocol decision. Different merchants, different risk tolerances, different commercial contexts will weigh these differently.
By encoding verification status as a categorical enumeration (unsigned, signature_valid, log_committed, witnessed), the protocol reports a fact: what has been verified. The policy layer in §4 decides what each state is worth in the context of a specific attribution calculation. The protocol makes no claim about the relative value of the states beyond their strict ordering.
The same reasoning applies to gap nodes. Their unsigned state is a fact: no signature was present. Whether an unsigned contribution deserves zero weight, nominal weight, or some other treatment is a policy question. The protocol records the absence of a signature. It does not mandate what that absence means for settlement.
Why the graph is a strict fact layer
The fact/policy separation is not an architectural nicety; it is the mechanism that makes independent verification possible. For attribution to be trusted by both creators and merchants, each party must be able to independently verify two things: that the graph accurately reflects what happened (verifiable from the log data and the deterministic derivation rules), and that the settlement recommendation was correctly derived from that graph under the stated policy (verifiable by running the policy algorithm locally against the graph). If fact and policy were mixed into a single layer, this independent verification would require reimplementing both layers together, which is practically impossible for most parties.
The strict separation also makes the system auditable over time. If a settlement dispute arises, the question can be cleanly decomposed: "does the graph correctly represent the records?" and "was the policy correctly applied to this graph?" These are separable questions with separable answers. A merged layer produces a single opaque output where the source of any error is difficult to isolate.
The three principles restated as constraints
The graph records structure, not causality. Edges are derived from observable structure only. No edge type encodes a causal claim. Causal interpretation is performed by the policy layer.
Verification state is categorical. The four states (unsigned, signature_valid, log_committed, witnessed) describe what has been verified. Their relative weight for attribution purposes is not encoded in the protocol.
The graph is a fact layer. The graph query interface reports what the records show. It does not compute attribution weight, recommend distributions, or apply policy. The same graph can be evaluated under different policies by different parties, and any party can independently verify the result.
Edge derivation is deterministic and normative. Given the same set of attribution records, two independent implementations MUST produce identical graphs. The derivation rules in §3.2.4 are the normative definition. Any deviation is a nonconformance.
Adversarial trust posture. The fact/policy separation is one part of the substrate's trust posture. A complementary part covers what the protocol does and does not certify under adversarial conditions: signatures prove who said what, never whether what was said is true. §8.7 enumerates the adversarial threat model, the layered trust assessment stack atrib provides (signature, identity, capability, revocation, cross-attestation, tool-side attestation, external evidence, witnessing, anchor plurality, structural anomaly detection), and the asymmetric properties the substrate produces despite the fundamental limit. The graph's deterministic derivation is one input to that assessment, not a substitute for it.
3.2 Graph Data Model
The atrib attribution graph is a directed property multigraph. Nodes represent events. Edges represent relationships derived from observable record structure. The graph for a primary session is bounded by its context_id, extended by cross-session links when records share the same session_token field (§1.2.1).
3.2.1 Node Types
| Type | Source | Description |
|---|---|---|
| tool_call | event_type = https://atrib.dev/v1/types/tool_call | A creator's contribution to the session. Carries creator identity, tool identity, chain position, and timestamp. The primary subject of attribution. |
| transaction | event_type = https://atrib.dev/v1/types/transaction | The commerce event that closes the attribution loop. The creator_key is the merchant's key. A session without a transaction node is attributable but not yet economically closed. |
| observation | event_type = https://atrib.dev/v1/types/observation | A passive perception captured by the agent. Witness, not action. Participates in chain ordering but not in payments profile §8 attribution calculation. See D042. |
| gap_node | OTel span without a signed record | An unsigned hop. Present in the graph so that invisible contributions are visible. Carries no creator_key, chain_root, or signature. See §3.2.5. |
| extension | event_type = any URI outside atrib's normative set | A consumer-namespace record. event_type URI preserved verbatim. Participates in chain ordering (D043) but not in CONVERGES_ON or payments profile §8 calculation. |
Per-event-type graph participation matrix:
| Node type | CHAIN_PRECEDES | SESSION_PRECEDES | SESSION_PARALLEL | CONVERGES_ON | CROSS_SESSION | INFORMED_BY (D041) | PROVENANCE_OF (D044) | payments profile §8 attribution |
|---|---|---|---|---|---|---|---|---|
| tool_call | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ source/target | ✅ source/target | ✅ contributing |
| transaction | ✅ | ✅ | ✅ | ✅ (target) | ✅ (target) | ✅ source/target | ✅ source/target | ✅ receiver |
| observation | ✅ | ✅ | ✅ | ❌ | ❌ | ✅ source/target | ✅ source/target | ❌ skipped |
| extension | ✅ | ✅ | ✅ | ❌ | ❌ | ✅ source/target | ✅ source/target | ❌ skipped |
| gap_node | ❌ | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | ✅ contributing |
Observations and extension records DO participate in temporal chain edges (CHAIN_PRECEDES, SESSION_PRECEDES, SESSION_PARALLEL) so the graph spine is complete. They DO NOT participate in CONVERGES_ON (which is the structural prerequisite for payments profile §8 attribution; observations are witnesses, not contributors; extension URIs are consumer-namespace and atrib does not bless their attribution claims by default). Promotion of an extension URI to atrib's normative contributing set requires D036's bar.
3.2.2 Interaction Patterns and Their Structural Signatures
Agent interactions produce five distinct structural patterns, each producing a distinct edge signature. Naming these patterns makes the edge taxonomy unambiguous.
Sequential. Agent calls tool A, then calls tool B whose creator sets chain_root to the hash of A's record. B is structurally downstream of A. Signature: CHAIN_PRECEDES A → B.
Parallel. Agent calls tool A and tool B in the same session with no chain dependency between them: either both are genesis records, or both descend from a common ancestor but not from each other. Signature: SESSION_PARALLEL A ↔ B (or SESSION_PRECEDES A → B if timestamps establish ordering).
Temporal. Tool A completed before tool B in the same session, but no chain linkage connects them. Ordering is observable but not structural. Signature: SESSION_PRECEDES A → B.
Delegated. Agent A dispatches sub-agent B via A2A. B's tools execute under the same context_id as A's session, because context_id propagates through A2A boundaries (§1.5.1). A's records and B's records are distinguishable by creator_key; different agent operators produce different keys. The delegation boundary is identified in the graph by creator_key diversity within a single session. No separate edge type is needed: standard within-session edges apply, and the policy layer reads creator_key to identify which contributions came from the primary agent versus delegated sub-agents.
Convergent. Multiple tool calls, potentially from different sessions, all contribute to the same transaction. Within a session: CONVERGES_ON edges from all non-transaction nodes to the transaction node. Across sessions: CROSS_SESSION edges when explicit linking tokens connect the records.
// Sequential: B.chain_root = hash(A) [ A: tool_call ] ──CHAIN_PRECEDES──▶ [ B: tool_call ] // Temporal: same session, no chain link, A.timestamp < B.timestamp [ A: tool_call ] ──SESSION_PRECEDES──▶ [ B: tool_call ] // Parallel: same session, no chain link, no temporal ordering [ A: tool_call ] ──SESSION_PARALLEL── [ B: tool_call ] // Convergent within session: all nodes point to the transaction [ A: tool_call ] ──CONVERGES_ON──▶ [ T: transaction ] [ B: tool_call ] ──CONVERGES_ON──▶ [ T: transaction ] // Cross-session: A (ctx=X) contributed to T (ctx=Y) via session_token [ A: tool_call (ctx=X) ] ──CROSS_SESSION──▶ [ T: transaction (ctx=Y) ] // Delegated: same session, different creator_keys (A=primary agent, B=sub-agent) [ A: tool_call (key=K1) ] ──SESSION_PRECEDES──▶ [ B: tool_call (key=K2) ] // policy layer reads creator_key to identify the delegation boundary
3.2.3 Edge Types
Nine edge types are defined. All are derived deterministically from observable record structure. None encode inferred causal claims; INFORMEDBY, PROVENANCE_OF, ANNOTATES, and REVISES encode explicit _agent-claimed causation, which is structurally derived from declared fields rather than inferred from content.
| Edge type | Dir | Derivation basis | Meaning |
|---|---|---|---|
| CHAIN_PRECEDES | A → B | B.chain_root = SHA-256(JCS(A)) | B is structurally downstream of A in the attribution chain. B's creator explicitly set their chain_root by hashing A's complete signed record. This is the primary structural link. |
| SESSION_PRECEDES | A → B | Same context_id; no CHAIN_PRECEDES between A and B; A.timestamp < B.timestamp | A occurred before B in the same session with no chain structure connecting them. Temporal ordering only, no structural claim. |
| SESSION_PARALLEL | A ↔ B | Same context_id; no CHAIN_PRECEDES between A and B; no temporal ordering | A and B are co-contributors to the same session with neither chain structure nor observable temporal ordering between them. Undirected. |
| CONVERGES_ON | N → T | N is a tool_call or gap_node; T is a transaction node; both share context_id | Node N contributed to the session that produced transaction T. Every contributing node in a session with a transaction node receives a CONVERGES_ON edge to that transaction. This is the edge that makes settlement calculation structurally possible. observation and extension nodes do NOT receive CONVERGES_ON edges (D042, D043). |
| CROSS_SESSION | A → T | A is a tool_call node; T is a transaction node; different context_ids; A.session_token = T.session_token (both fields must be present and equal) | A contributed to a transaction that occurred in a different session of the same logical session. This edge is only created when both records carry the same explicit session_token field value. It is never inferred from timestamps, creator keys, or any other heuristic. |
| INFORMED_BY | A → B | A's informed_by array contains "sha256:" + hex(record_hash(B)) | A's creator claims B was a record that informed A's action. Structural derivation from a declared field; atrib certifies the claim was signed, not its truthfulness. May be intra-session or cross-session (B may be in any context_id). When B is not in the resolved record set, the edge is created against a synthetic dangling node with dangling: true. See D041. |
| PROVENANCE_OF | D → U | D and U both carry provenance_token with the same value; D.context_id ≠ U.context_id; U's record_hash matches the token's source | D's action is causally anchored on U's upstream record. This is cross-session causal anchoring distinct from CROSS_SESSION's "same logical session" semantics. The token derivation (base64url(record_hash[:16])) makes U identifiable as the anchor source. See D044. |
| ANNOTATES | A → T | A.event_type = annotation; A.annotates = "sha256:" + hex(record_hash(T)) | A is an annotation describing record T. Forward-pointing claim about an earlier record (the dual of INFORMED_BY's backward-pointing claim about prior records). Source must be an annotation record; target may be of any node type, intra-session or cross-session. When T is not in the resolved record set, the edge is created against a synthetic dangling node with dangling: true. Multiple annotations of the same target are normal. See D058. |
| REVISES | R → P | R.event_type = revision; R.revises = "sha256:" + hex(record_hash(P)) | R supersedes record P. Distinct from ANNOTATES (which comments without overturning) and INFORMED_BY (which acknowledges sources): revision asserts the agent now holds a position incompatible with P. The prior record stays immutable on the log; the revision is a new record future readers should weight as the current position. Source must be a revision record; target may be of any node type. When P is not in the resolved set, the edge is dangling. Multiple revisions of the same target are allowed (chain of mind-changes). See D059. |
Note (Mutual exclusivity): CHAIN_PRECEDES and SESSION_PRECEDES are mutually exclusive between any given ordered pair of nodes: if a CHAIN_PRECEDES edge exists from A to B, no SESSION_PRECEDES edge is created between A and B in either direction. SESSION_PARALLEL and SESSION_PRECEDES are mutually exclusive between any given pair of nodes. CONVERGES_ON coexists with all within-session edge types. CROSS_SESSION only applies when context_ids differ and a session_token match is present. INFORMED_BY and PROVENANCE_OF coexist with all other edge types; they are agent-declared causal anchors and may overlap with the structural edges.
3.2.4 Edge Derivation Rules
These rules are normative. Implementations MUST apply them in the order given. Two implementations applying these rules to identical input records MUST produce identical edge sets.
The full edge-derivation conformance corpus lives at spec/conformance/3.2.4/ (D101). It pins exact edge sets for all nine edge types, full pairwise SESSION_PRECEDES and SESSION_PARALLEL derivation, and dangling producer-declared references. The compact per-session graph corpus remains separate at spec/conformance/3.4.1/.
Step 1: CHAIN_PRECEDES edges**
For each non-genesis record R: compute expected = R.chain_root.removePrefix("sha256:"). For each other record P: if sha256_hex(jcs(P)) == expected, create CHAIN_PRECEDES P → R. Each record has at most one CHAIN_PRECEDES parent (chain_root is a single value).
for each record R:
if is_genesis(R): continue
expected = R.chain_root.removePrefix("sha256:")
for each other record P:
if sha256_hex(jcs(P)) == expected:
add_edge(CHAIN_PRECEDES, source=P, target=R); breakStep 2: SESSION_PRECEDES edges**
For each ordered pair (A, B) of nodes sharing a context_id where no CHAIN_PRECEDES edge exists between them in either direction: if A.timestamp < B.timestamp, create SESSION_PRECEDES A → B. When timestamps are equal, use ascending log_index as the tiebreaker. Gap nodes with log_index: null are sorted after all nodes with the same timestamp that have a numeric log_index. Among multiple gap nodes with the same timestamp, order is arbitrary (SESSION_PARALLEL is assigned). If log_index is also equal (nodes in the same batch), skip; they are SESSION_PARALLEL candidates.
Step 3: SESSION_PARALLEL edges**
For each pair (A, B) of nodes sharing a context_id where no CHAIN_PRECEDES edge exists between them in either direction and no SESSION_PRECEDES edge exists between them in either direction: create SESSION_PARALLEL A ↔ B (undirected).
Step 4: CONVERGES_ON edges**
For each transaction node T: for each other node N sharing T's context_id (tool_call or gap_node), create CONVERGES_ON N → T.
If a session contains multiple transaction nodes, each non-transaction node receives CONVERGES_ON edges to all of them. The calculation algorithm (payments profile §8) uses the first transaction node (by log_index) for modifier computations such as temporal_decay.
Step 5: CROSS_SESSION edges**
For each transaction node T: search the record set for tool_call nodes A where A.context_id ≠ T.context_id and A's session_token field (§1.2.1) matches T's session_token field. For each such A, create CROSS_SESSION A → T.
CROSS_SESSION edges MUST NOT be inferred from any heuristic. Only explicit session_token field matches in signed records qualify. Records without a session_token field cannot participate in CROSS_SESSION edges.
Step 6: INFORMED_BY edges**
For each record A carrying a non-empty informed_by array: for each entry e in the array (where e matches "sha256:" + hex(record_hash)): search the resolved record set for a record B with sha256_hex(jcs(B)) == e[7:]. If B is found, create INFORMED_BY A → B. If B is not found, create INFORMED_BY A → synthetic_dangling_node(e) and mark the edge dangling: true.
INFORMED_BY edges MAY be intra-session or cross-session. Source and target may be of any node type (tool_call, transaction, observation, extension). The agent's claim is authoritative for the edge derivation; atrib does not validate that the referenced records actually informed the action.
Step 7: PROVENANCE_OF edges**
For each session-genesis record D carrying a non-empty provenance_token field of value T: search the record set for any record U where base64url(SHA-256(JCS(U))[:16]) == T and U.context_id ≠ D.context_id. If found, create PROVENANCE_OF D → U. The direction reads as "D's session descends from U's anchor."
If no record U in the resolved set satisfies the derivation predicate, create PROVENANCE_OF D → synthetic_dangling_node(T) with dangling: true and reason: "no_token_source_in_record_set". This makes the dangling case visible rather than silently dropping the edge.
Validators MUST reject any non-genesis record carrying provenance_token (per §1.2.6 scope constraint); such records do not participate in PROVENANCE_OF derivation because they are malformed.
PROVENANCEOF expresses cross-session _causal anchoring, distinct from CROSSSESSION's _same logical session semantics. The two edge types may coexist when a session both belongs to a multi-trace logical session (session_token) AND descends from a prior session's anchor (provenance_token).
Step 8: ANNOTATES edges**
For each annotation record A (where event_type = https://atrib.dev/v1/types/annotation) carrying a non-empty annotates field of value e (where e matches "sha256:" + hex(record_hash)): search the resolved record set for a record T with sha256_hex(jcs(T)) == e[7:]. If T is found, create ANNOTATES A → T. If T is not found, create ANNOTATES A → synthetic_dangling_node(e) and mark the edge dangling: true. The direction reads as "A is an annotation of T."
ANNOTATES edges are derived ONLY from annotation records. Records of any other event_type carrying annotates are malformed per §1.2.7 and MUST be rejected by validators and verifiers; they do not participate in ANNOTATES derivation. Multiple annotations of the same target are normal and produce multiple ANNOTATES edges. ANNOTATES MAY be intra-session or cross-session; the target may be of any node type (tool_call, transaction, observation, extension, even another annotation).
ANNOTATES is the structural dual of INFORMEDBY: forward-pointing (A is _about T) rather than backward-pointing (A was informed by B). Both encode agent-declared causal links via declared fields rather than inferred from content. The two edge types coexist freely; an annotation may itself carry informed_by references to records it consulted in the act of annotating.
Step 9: REVISES edges**
For each revision record R (where event_type = https://atrib.dev/v1/types/revision) carrying a non-empty revises field of value e (where e matches "sha256:" + hex(record_hash)): search the resolved record set for a record P with sha256_hex(jcs(P)) == e[7:]. If P is found, create REVISES R → P. If P is not found, create REVISES R → synthetic_dangling_node(e) and mark the edge dangling: true. The direction reads as "R supersedes P."
REVISES edges are derived ONLY from revision records. Records of any other event_type carrying revises are malformed per §1.2.9 and MUST be rejected by validators and verifiers; they do not participate in REVISES derivation. Multiple revisions of the same target are allowed and produce multiple REVISES edges (a chain of mind-changes). REVISES MAY be intra-session or cross-session; the target may be of any node type.
REVISES is structurally similar to ANNOTATES (both are forward-pointing single-target references gated by event_type) but carries stronger semantics: ANNOTATES comments without overturning, REVISES asserts the prior is no longer held. The two edge types may both apply to the same target from different sources (one record annotates, another revises); they coexist freely with all structural edges and with INFORMED_BY / PROVENANCE_OF.
3.2.5 Gap Nodes
A gap node represents an unsigned hop: a tool call evidenced by an OTel span with no corresponding signed attribution record in the log. Its presence in the graph makes the gap visible rather than hiding it.
Gap nodes participate in SESSION_PRECEDES, SESSION_PARALLEL, and CONVERGES_ON edges. They MUST NOT participate in CHAIN_PRECEDES edges (no chain_root) or CROSS_SESSION edges (no linking tokens).
Gap node IDs are deterministic: "gap:" + hex(SHA-256(UTF-8(tool_url + ":" + tool_name + ":" + context_id))). This ensures stable, reproducible IDs across independent implementations processing the same OTel data.
3.3 Verification State
Every node carries a verification_state: a categorical description of the current verification status of its underlying record. This is a fact about the record, not a judgment of its value. Policy evaluation uses verification state as input; this section defines only the states themselves.
| State | Condition |
|---|---|
| unsigned | Gap node. No signature exists. The event is known only from OTel span data. |
| signature_valid | The record's Ed25519 signature (§1.4.3) verifies. The record has not yet been confirmed in the Merkle log. |
| log_committed | Signature verifies and an inclusion proof (§2.7) has been verified against a current signed checkpoint. The record is durably in the append-only log. |
| witnessed | Signature verifies, inclusion proof verifies, and the checkpoint carries at least one valid witness cosignature (§2.9). |
Verification states are strictly ordered: unsigned < signature_valid < log_committed < witnessed. A node's state can only advance, never regress, as new evidence arrives. Implementations MUST update states as evidence is gathered. Verification states are computed by the graph query service from evidence in the log. They are never asserted by attribution records.
3.4 Query API
All endpoints are served at https://graph.atrib.dev/v1/. All responses use Content-Type: application/json. All errors use RFC 9457 Problem Details (Content-Type: application/problem+json). The API is read-only.
3.4.1 GET /v1/graph/{context_id}
Returns the complete attribution graph for a session: all nodes and edges, computed per §3.2.4.
GET /v1/graph/4bf92f3577b34da6a3ce929d0e0e4736
// Optional query parameters:
// include_gap_nodes=true|false (default: true)
// include_cross_session=true|false (default: true)
// include_proof=true|false (default: false; proof bundles are large)
// compact=true|false (default: true; intra-session edge compaction per §3.4.1.1)
// 200 OK -> GraphResponse ([§3.5.1](#351-graph-response-object))
// 404 -> no records with this context_id
// 400 -> malformed context_id (not 32 hex chars)3.4.1.1 Intra-session edge compaction
Implementations MAY emit a reduced SESSION_PRECEDES / SESSION_PARALLEL edge set when the response would otherwise carry information-redundant edges. The reduction is structural, it preserves all causal information already present in CHAIN_PRECEDES, and is enabled by default for /v1/graph/{context_id}. Callers who require the full pairwise derivation per §3.2.4 steps 2–3 (e.g. conformance harnesses) MUST pass ?compact=false.
The compaction rule:
- Chain-component skip. Treat the records sharing this
context_idas a graph whose edges are CHAIN_PRECEDES. Compute connected components. For every pair of records(a, b)sitting in the same component, omit any SESSION_PRECEDES or SESSION_PARALLEL edge that would otherwise connect them, the chain already encodes their relationship and the additional edge carries no information. - Adjacent-only emission. For pairs that ARE in different chain components, sort by
timestampascending and emit one SESSION_PRECEDES edge per consecutive pair (rather than every cross-component pair). The transitive ordering "X happens-before Z" is implied by the emitted "X→Y" + "Y→Z" without materializing a third edge. - SESSION_PARALLEL between equal-
timestamppairs is emitted only when both records belong to different chain components (rule 1 still applies).
Compaction is information-preserving with respect to the partial order over the resolved record set: any "happens-before" relation derivable from the full pairwise edge set is still derivable from the compacted edge set plus CHAIN_PRECEDES transitivity. This is distinct from §3.4.7's identity-view filter, which drops intra-session edges entirely (lossy by design, that view shows cross-session activity, not within-session topology).
3.4.2 GET /v1/graph/{context_id}/nodes
Returns only nodes, without edges. Used by policy engines that apply their own traversal logic.
GET /v1/graph/4bf92f3577b34da6a3ce929d0e0e4736/nodes
// Optional: event_type=<URI> (e.g. https://atrib.dev/v1/types/tool_call,
// https://atrib.dev/v1/types/transaction,
// https://atrib.dev/v1/types/observation,
// or an extension URI)
// Optional: event_type=gap_node (synthetic node type per [§3.2.5](#325-gap-nodes))
// Optional: creator_key=
// Optional: verification_state=unsigned|signature_valid|log_committed|witnessed
// 200 OK -> { "nodes": [NodeObject, ...] }3.4.3 GET /v1/graph/{context_id}/transaction
Returns the transaction node for a session if one exists. Policy engines use this to confirm the loop is closed before running settlement calculations.
GET /v1/graph/4bf92f3577b34da6a3ce929d0e0e4736/transaction
// 200 OK -> NodeObject (event_type matches the transaction URI per [§1.2.4](#124-event_type-values) / atrib/1.0 short token)
// 404 -> session exists but no transaction record present3.4.4 GET /v1/creators/{creator_key}/sessions
Returns a paginated list of sessions in which a given creator appears. Requires authentication proving control of the creator_key. The authentication mechanism is implementation-defined; the reference implementation uses Ed25519 challenge-response over the creator's public key.
GET /v1/creators/ABC.../sessions
// Optional: since=<ISO8601 | unix_ms>, until=<ISO8601 | unix_ms>, has_transaction=true|false
// Optional: limit= (default 50, max 200), cursor=
{
"sessions": [
{
"context_id": "4bf92f35...",
"first_seen": 1743850000000,
"last_seen": 1743850120000,
"node_count": 4,
"has_transaction": true
}
],
"next_cursor": "eyJzaW5jZSI..." // null if no further results
}3.4.5 GET /v1/trace/{record_hash}
Returns the provenance trace of a record: the ancestor subgraph reachable by walking producer-claimed ancestry edges backward from the starting record. Provenance trace walks INFORMED_BY, ANNOTATES, and REVISES edges, all derived from explicit producer-set fields per §1.2.5, §1.2.7, and §1.2.9. PROVENANCE_OF is conceptually walked but truncated provenance_token references that cannot be resolved against the response set are surfaced unresolved rather than recursed.
Provenance trace is the producer's claim layer: every edge walked is a record where the producer explicitly named a prior record as informing, annotating, or revising the current one. Provenance trace MUST NOT walk CHAIN_PRECEDES, chain ordering is substrate-derived structure, not a producer claim, and conflating the two layers violates the structure-vs-claims separation that justifies the optional INFORMED_BY field's signed-claim semantics.
GET /v1/trace/4797633fc95a...
// Optional query parameters:
// depth=<n> (default: 5, max: 20)
// include_annotations=true|false (default: true; ANNOTATES walk)
// include_revisions=true|false (default: true; REVISES walk)
// 200 OK -> GraphResponse ([§3.5.1](#351-graph-response-object)) restricted to
// the ancestor set + the starting record
// 404 -> no record with this hash
// 400 -> malformed record_hash (not 64 hex chars)The response carries the same nodes and edges shape as §3.4.1 so consumers can render trace responses with the same rendering pipeline. Truncation flags (truncated_by_depth, truncated_by_count) signal when the walk exceeded the configured limits; consumers can re-request with a deeper depth to extend the walk.
3.4.6 GET /v1/chain/{record_hash}
Returns the chronology chain of a record: the ancestor subgraph reachable by walking CHAIN_PRECEDES edges backward from the starting record. Chronology chain walks substrate-derived ordering, the chain_root linkage every record carries per §1.2.3. The walk terminates at the session's genesis record (where chain_root = SHA-256(context_id) per §1.2.3).
Chronology chain is the substrate's structural layer: every edge walked is a record whose chain_root identifies its immediate predecessor in the same context_id. Producers do not declare these edges; the substrate derives them per §3.2.4. Chronology chain MUST NOT walk INFORMED_BY, ANNOTATES, or REVISES, those are producer claims, not substrate structure, and walking them would conflate the two layers.
GET /v1/chain/4797633fc95a...
// Optional query parameters:
// depth=<n> (default: 5, max: 20)
// 200 OK -> GraphResponse ([§3.5.1](#351-graph-response-object)) restricted to
// the chain_precedes ancestor set + the starting record
// 404 -> no record with this hash
// 400 -> malformed record_hash (not 64 hex chars)The response carries the same nodes and edges shape as §3.4.1. The walk produces a linear chain (each non-genesis record has exactly one chain_precedes ancestor), so truncated_by_count is unreachable in practice; truncated_by_depth is the only truncation mode.
The two operations are complementary, not redundant. §3.4.5 answers "what did the producer claim informed this record?" and §3.4.6 answers "what did the substrate observe came before this record in the same context_id?" Consumers needing both views compose the responses client-side; the API does not provide a combined endpoint to keep the structure-vs-claims boundary visible at the protocol layer.
3.4.7 GET /v1/creators/{creator_key}/graph
Returns a creator activity-map graph: every record signed by the creator across all context_id boundaries within an optional time window, composed into a single graph response. Cross-session edges are derived per §3.2.4 (CROSS_SESSION when records share a session_token, INFORMED_BY across context_ids, PROVENANCE_OF anchoring sessions to upstream genesis records).
This endpoint differs from §3.4.4: the sessions endpoint returns a paginated list of sessions per creator, while this endpoint composes the underlying records into a connected graph that visualizes how a creator's activity flows across sessions.
GET /v1/creators/ABC.../graph
// Optional query parameters:
// since=<ISO8601 | unix_ms> (default: unbounded; oldest in window)
// until=<ISO8601 | unix_ms> (default: now; newest in window)
// limit=<n> (default: 500, max: 2000; max records)
// direction=newest|oldest (default: newest; truncation slice direction, see "Truncation" below)
// event_type=<short_label | uri> (filter by node event_type)
// include_intra_session=true|false (default: false; see "Edge scope" below)
// 200 OK -> CreatorGraphResponse:
// {
// "creator_key": "ABC...",
// "window": { "since": ..., "until": ..., "limit": 500, "direction": "newest" },
// "record_count": 47, // records actually returned (after truncation)
// "total_in_window": 47, // records in the requested window before truncation
// "truncated": false, // true when total_in_window > limit
// "effective_window": { "since": ..., "until": ... }, // first/last timestamp of returned records; null both when record_count = 0
// "intra_session_edges_filtered": true, // false if include_intra_session=true
// "graph": GraphResponse // [§3.5.1](#351-graph-response-object)
// }
// 404 -> creator has no records in store
// 400 -> invalid time window or malformed creator_keyThe response carries the same nodes and edges shape as §3.4.1 inside the graph field, so consumers can render creator activity-maps with the same rendering pipeline used for session graphs. The outer envelope (creator_key, window, record_count, total_in_window, truncated, effective_window, intra_session_edges_filtered) provides the metadata callers need to parameterize follow-up queries (paginate by adjusting since/until, refine by event_type, restore intra-session edges via include_intra_session=true, switch slice direction).
Truncation. When the requested window contains more records than limit, the implementation MUST return a contiguous slice of the records (not a sample) so that derived edges remain consistent with the spec §3.2.4 rules. Stratified sampling within the window is forbidden because it breaks intra-session chain edges (a CHAIN_PRECEDES edge between two records requires both records to be present in the response). The direction query parameter selects which contiguous slice to return:
direction=newest(default): the most-recentlimitrecords in the window. Right for windows anchored to the present (e.g., "last 24h"). Truncation drops the oldest tail.direction=oldest: the oldestlimitrecords in the window. Right for explicit[since, until]ranges where the user has anchored a start time and wants to see what happened from there forward. Truncation drops the newest tail.
Implementations MUST set effective_window: { since, until } to the timestamps of the first and last records actually returned (after truncation), so callers can render "you asked for X to Y, got X to Z" feedback without computing it client-side. When record_count is 0, both fields of effective_window MUST be null.
Edge scope. The activity-map exists to surface CROSS-SESSION relationships: how a creator's records connect across context_id boundaries. By default the response excludes the two intra-session-only edge types, SESSION_PRECEDES (§3.2.4 step 2) and SESSION_PARALLEL (§3.2.4 step 3), because those are what the per-session graph at §3.4.1 renders. Including intra-session edges here also produces O(N²) edge counts when records in a session don't chain (a single session of 500 records can produce ~125k SESSION_PRECEDES pairs), swamping the cross-session signal the activity-map exists for. Implementations MUST set intra_session_edges_filtered: true in the response envelope when this default applies.
Callers that need every applicable edge type (e.g., a single-creator analytics tool that wants per-session sequencing AND cross-session relationships in one response) opt in via include_intra_session=true; the response then carries every edge buildGraph derived and reports intra_session_edges_filtered: false. Cross-session edge types (CROSS_SESSION, INFORMED_BY across context_ids, PROVENANCE_OF, ANNOTATES, REVISES) are always included regardless of the flag, and CHAIN_PRECEDES is always included because it is intra-session linkage that nonetheless reflects the producer's chain integrity rather than O(N²) fallback ordering.
3.5 Response Schema
3.5.1 Graph Response Object
{
"spec_version": "atrib/1.0",
"context_id": "4bf92f3577b34da6a3ce929d0e0e4736",
"generated_at": 1743860000000,
"node_count": 4,
"edge_count": 6,
"has_transaction": true,
"cross_session_count": 0, // number of nodes linked via CROSS_SESSION edges
"nodes": [ /* NodeObject[] */ ],
"edges": [ /* EdgeObject[] */ ]
}3.5.2 Node Object
{
"id": "sha256:3f8a2b...", // record_hash from log; "gap:..." for gap nodes; "dangling:..." for synthetic dangling nodes
"event_type": "https://atrib.dev/v1/types/tool_call", // absolute URI; "gap_node" for synthetic gap nodes
"event_type_kind": "tool_call", // one of: tool_call | transaction | observation | extension | gap_node
"content_id": "sha256:7e1f...", // null for gap_node
"creator_key": "ABC...", // null for gap_node
"chain_root": "sha256:9a3c...", // null for gap_node
"context_id": "4bf92f35...",
"timestamp": 1743850010000,
"timestamp_granularity": "ms", // [§8.4](#84-coarsened-timing-posture) disclosure posture
"log_index": 4821936, // null for gap_node
"verification_state": "log_committed", // see [§3.3](#33-verification-state)
"is_genesis": false, // true if chain_root = SHA-256(context_id)
"proof": null, // inclusion proof bundle ([§2.8](#28-proof-bundle-format)); null unless requested
// [D041](https://github.com/creatornader/atrib/blob/7474163321fbea044506f902cc8a0d37d379ec5f/DECISIONS.md#d041-informed_by-linking-primitive-and-informed_by-edge-type) informed_by surfacing
"informed_by_count": 2, // number of references in the field; 0 if absent
"informed_by_resolution": { // null if informed_by absent
"resolved": ["sha256:abc...", "sha256:def..."], // record_hashes successfully resolved in the response set
"dangling": [] // record_hashes that did not resolve
},
// [D044](https://github.com/creatornader/atrib/blob/7474163321fbea044506f902cc8a0d37d379ec5f/DECISIONS.md#d044-provenance_token-field-for-cross-session-causal-anchoring) provenance_token surfacing (genesis records only)
"provenance": { // null when no provenance_token claimed
"token": "abc123...xyz", // 22-char base64url
"upstream_record_hash": "sha256:abc...", // resolved upstream hash; null if dangling
"upstream_resolved": { /* ResolvedRecord | null */ }
}
}The event_type_kind field is a derived convenience: it maps the URI to one of the five graph node-type labels (tool_call, transaction, observation, extension, gap_node) for client-side type discrimination without URI parsing. The full URI remains authoritative.
3.5.3 Edge Object
{
"type": "CHAIN_PRECEDES", // one of the seven defined types ([§3.2.3](#323-edge-types))
"source": "sha256:3f8a2b...", // source node id
"target": "sha256:8b2f1c...", // target node id
"directed": true, // false only for SESSION_PARALLEL
"dangling": false // true when target is a synthetic dangling node (INFORMED_BY or PROVENANCE_OF only)
}3.5.4 Error Responses
// RFC 9457 Problem Details. All errors use this format:
{
"type": "https://atrib.dev/problems/session-not-found",
"title": "Session not found",
"status": 404,
"detail": "No attribution records found for context_id 4bf92f35...",
"instance": "/v1/graph/4bf92f3577b34da6a3ce929d0e0e4736"
}
// Defined problem types:
// atrib.dev/problems/session-not-found 404
// atrib.dev/problems/invalid-context-id 400
// atrib.dev/problems/invalid-creator-key 400
// atrib.dev/problems/unauthorized 401
// atrib.dev/problems/graph-unavailable 5033.6 Implementation Notes
This section is informative.
Technology independence. This section specifies the graph model and API shape. It does not specify storage technology. Any queryable store capable of producing conforming responses is acceptable. The derivation rules in §3.2.4 are the normative definition of graph structure and must be applied identically regardless of underlying storage.
On delegated sub-agents. When agent A delegates to sub-agent B via A2A, B's tool calls share A's context_id because context_id propagates through A2A delegation boundaries (§1.5.1). The graph represents this naturally: A's and B's records appear as nodes in the same session, distinguishable by creator_key. No special edge type is needed. Policy engines read creator_key diversity within a session to identify delegation structure and can weight contributions by originating agent accordingly.
Graph construction from log data. Implementations indexing the graph must monitor the log for new checkpoints (§2.5.1), fetch new entry bundles (§2.5.3), retrieve full attribution records from creator servers or a record cache, verify signatures, and apply the derivation rules incrementally. Records whose chain_root references a not-yet-seen parent should be stored and the CHAIN_PRECEDES edge created when the parent record arrives.
The fact / policy boundary. The graph query interface MUST NOT return weighted or policy-adjusted data. All attribution weights, distribution recommendations, and settlement calculations belong to §4. This separation is not a preference; it is the mechanism that makes independent settlement verification tractable. Any party must be able to run the graph construction algorithm on the log data and the policy algorithm on the graph, and arrive at the same settlement recommendation as the service produced, without trusting either layer.
§4 Attribution Policy Format
Position of the policy layer. The policy format, negotiation, calculation algorithm, and settlement document live in the atrib Payments Profile.
Contents
- 4.1 Purpose and Position in the Protocol
- 4.2–4.7: tombstoned anchors pointing at the payments profile
- 4.8 Scope Boundaries
4.1 Purpose and Position in the Protocol
This section is informative.
The three preceding sections define what happened. The policy layer defines how to evaluate what happened for the purpose of distributing value. Per D147, that layer lives in the atrib Payments Profile, which versions independently of this specification. Rail and settlement churn lands in the profile's version history, not here.
The position of policy relative to the protocol is unchanged by the relocation:
- Policies are first-class primitives of the payments layer, not configuration files. They are machine-readable documents that agents fetch, parse, apply, and reason about autonomously. The profile defines the policy schema; creators and merchants define their own policies within that schema.
- The protocol has no thumb on the scale. atrib does not decide what contributions are worth. The profile provides the schema and the deterministic calculation; the parties provide the values.
- The calculation is a pure function. Graph + policy = distribution. No network calls, no clock beyond record timestamps, no randomness. Any party with the same inputs must get the same result (payments profile §8).
- Fact/policy separation is absolute. The §3 graph is a pure fact layer and never returns weighted data (§3.6). The policy layer consumes the graph; it never feeds it. This separation is what made the relocation a documentation move with no signed-byte, record, or service change.
Two moments in the session lifecycle remain relevant. Negotiation happens at session initialization, before any tool calls are made (payments profile §7). Calculation happens after the transaction closes (payments profile §8). The policy negotiated at session start is the policy applied at calculation time, regardless of whether policies have changed in between.
Core retains the payments-accommodation surface: the transaction event type (§1.2.4), the cross-attestation requirement (§1.7.6), and the universal evidence envelope (§5.5.7). Everything rail- or settlement-specific attaches through those three elements.
4.2 Policy Document Format
Moved to the atrib Payments Profile §4 per D147. This anchor is stable; the section number is not reused.
4.2.1 Top-Level Fields
Moved to the atrib Payments Profile §4.1 per D147. This anchor is stable; the section number is not reused.
4.2.2 Edge Weights
Moved to the atrib Payments Profile §4.2 per D147. This anchor is stable; the section number is not reused.
4.2.3 Modifiers
Moved to the atrib Payments Profile §4.3 per D147. This anchor is stable; the section number is not reused.
4.2.4 Distribution Method
Moved to the atrib Payments Profile §4.4 per D147. This anchor is stable; the section number is not reused.
4.2.5 Constraints
Moved to the atrib Payments Profile §4.5 per D147. This anchor is stable; the section number is not reused.
4.3 The Default Policy
Moved to the atrib Payments Profile §5 per D147. This anchor is stable; the section number is not reused.
4.4 Publication and Discovery
Moved to the atrib Payments Profile §6 per D147. This anchor is stable; the section number is not reused.
4.5 Session Negotiation
Moved to the atrib Payments Profile §7 per D147. This anchor is stable; the section number is not reused.
4.5.1 Negotiation Protocol
Moved to the atrib Payments Profile §7.1 per D147. This anchor is stable; the section number is not reused.
4.5.2 Conflict Resolution
Moved to the atrib Payments Profile §7.2 per D147. This anchor is stable; the section number is not reused.
4.5.3 Session Policy Record
Moved to the atrib Payments Profile §7.3 per D147. This anchor is stable; the section number is not reused.
4.6 The Calculation Algorithm
Moved to the atrib Payments Profile §8 per D147. This anchor is stable; the section number is not reused.
4.6.1 Inputs and Preconditions
Moved to the atrib Payments Profile §8.1 per D147. This anchor is stable; the section number is not reused.
4.6.2 Step 1: Identify Contributing Nodes
Moved to the atrib Payments Profile §8.2 per D147. This anchor is stable; the section number is not reused.
4.6.3 Step 2: Compute Raw Scores
Moved to the atrib Payments Profile §8.3 per D147. This anchor is stable; the section number is not reused.
4.6.4 Step 3: Apply Constraints
Moved to the atrib Payments Profile §8.4 per D147. This anchor is stable; the section number is not reused.
4.6.5 Step 4: Normalize to a Distribution
Moved to the atrib Payments Profile §8.5 per D147. This anchor is stable; the section number is not reused.
4.6.6 Step 5: Aggregate by Creator
Moved to the atrib Payments Profile §8.6 per D147. This anchor is stable; the section number is not reused.
4.6.7 Step 6: Apply Creator Floors
Moved to the atrib Payments Profile §8.7 per D147. This anchor is stable; the section number is not reused.
4.7 Settlement Recommendation Document
Moved to the atrib Payments Profile §9 per D147. This anchor is stable; the section number is not reused.
4.7.1 Document Format
Moved to the atrib Payments Profile §9.1 per D147. This anchor is stable; the section number is not reused.
4.7.2 Signing the Recommendation
Moved to the atrib Payments Profile §9.2 per D147. This anchor is stable; the section number is not reused.
4.7.3 Independent Verification
Moved to the atrib Payments Profile §9.3 per D147. This anchor is stable; the section number is not reused.
4.8 Scope Boundaries
See §1.8 for protocol-wide scope boundaries. Policy- and settlement-specific boundaries (policy versioning, dispute mechanism, settlement webhook format, multi-transaction sessions, agent-published policies) live in the atrib Payments Profile §13.
§5 SDK Specification
@atrib/mcp, @atrib/agent, @atrib/verify. Normative trigger table. Degradation contract.
The conformance specification for @atrib/mcp, @atrib/agent, and @atrib/verify, defining the middleware contract, automation triggers, key management, and degradation behavior that all conforming implementations must satisfy.
Contents
- 5.1 Design Principle: Zero Ongoing Surface Area
- 5.2 Package Overview
- 5.3 @atrib/mcp: MCP Server Middleware
- 5.4 @atrib/agent: Agent Middleware
- 5.5 @atrib/verify: Merchant Verification Library
- 5.6 Key Management
- 5.7 Automation Triggers (Normative)
- 5.8 Degradation Contract
5.1 Design Principle: Zero Ongoing Surface Area
This section is informative.
The fundamental design requirement for conforming automatic atrib middleware is that attribution happens as a consequence of agents and tools doing what they already do, not as a post-hoc call a developer can forget. The moment a developer must remember to attribute after execution, coverage becomes a caller claim rather than an interception property.
This section therefore defines a middleware contract, not an application API. A conforming automatic integration has one initialization step and no ongoing attribution calls. Reference client helpers for application-owned boundaries are informative. They do not satisfy automatic coverage merely by existing.
A conforming SDK implementation MUST satisfy all the automation triggers defined in §5.7. A conforming implementation MUST NEVER require the developer to call any attribution method explicitly after initialization. A conforming implementation MUST NEVER fail or throw an exception in a way that affects the primary tool call or agent response.
5.2 Package Overview
This section is informative.
Three packages are defined in this specification. All are TypeScript/JavaScript packages distributed via npm. Implementations in other languages SHOULD follow the same interface contracts using idiomatic patterns for their language.
| Package | Used by | Purpose |
|---|---|---|
| @atrib/mcp | MCP server operators (creators) | Wraps an MCP server to automatically emit signed attribution records on every successful tool call and expose the creator's policy at /.well-known/atrib-policy.json. |
| @atrib/agent | Agent developers | Wraps an agent to automatically read and forward attribution context on every tool call, run policy negotiation at session start, create session policy records, and detect transaction events. |
| @atrib/verify | Merchants | Verifies settlement recommendations and runs post-hoc attribution calculations for sessions where no agent SDK was present. |
All three packages are open source under the Apache 2.0 license. The npm package names are reserved.
Transaction detection, policy negotiation, session policy records, and settlement verification are payments-layer contracts defined by the atrib Payments Profile. The packages implement those contracts when a deployment uses the profile; a core-only deployment signs tool_call records and never classifies transactions, per the degradation contract (§5.8).
Beyond the three spec-defined middleware packages, the reference distribution
also ships consolidated client SDKs (informative). @atrib/sdk for TypeScript
and the atrib distribution for Python expose attest() (write) and
recall() (read) over the same record layer. The TypeScript client also
exposes action() for an application-owned execution boundary. It signs a
request before execution and a linked terminal outcome after execution using
the recommended hashed-name and salted argument/result posture. It uses the
same attest() write path and adds no signing implementation. The helper
proves only the boundary the caller actually routes through; it makes no
automatic completeness claim. The Python distribution is the first
non-TypeScript implementation of the §1 and
§5 contracts; both are held byte-identical through the
shared conformance corpora. They are clients over this specification, not
additional conformance surfaces. The reference implementations are maintained
at github.com/atrib-io. Third-party implementations are permitted and
encouraged, provided they satisfy the conformance requirements in this
section.
5.3 @atrib/mcp: MCP Server Middleware
5.3.1 Init Interface
The atrib() function wraps an existing MCP server instance. It returns a new server instance that is a transparent proxy; all MCP protocol behavior is preserved unchanged. The only observable difference is that attribution records are emitted and context is propagated.
import { atrib } from '@atrib/mcp'
import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js'
// Before: standard MCP server:
const server = new McpServer({ name: 'my-tool', version: '1.0.0' })
// After: one wrap, everything else is automatic:
const server = atrib(new McpServer({ name: 'my-tool', version: '1.0.0' }), {
creatorKey: process.env.ATRIB_PRIVATE_KEY // REQUIRED (see [§5.6](#56-key-management))
})Init options
| Option | Type | Required | Description |
|---|---|---|---|
| creatorKey | string | Required | Base64url-encoded 32-byte Ed25519 seed. Used to sign all attribution records emitted by this server. See §5.6 for generation and storage requirements. |
| logEndpoint | string | Optional | URL of the Merkle log submission endpoint. Default: https://log.atrib.dev/v1/entries. Override for private log deployments. |
| logSubmission | string | Optional | enabled or disabled. Default: enabled. Set to disabled for offline tests and local-mirror-only hosts that should sign records and run onRecord without POSTing to a log. |
| policy | object | Optional | Inline attribution policy document (payments profile §4). If provided, served at /.well-known/atrib-policy.json. If absent, a 404 is served at that path (default policy applies for callers). |
| serverUrl | string | Optional | Canonical URL of this MCP server, used to compute content_id values (§1.2.2). Default: derived from the server's HTTP host header. MUST be set explicitly for stdio transport where no host header is available. |
| transactionTools | string[] | Optional | Array of tool names that complete commerce transactions. When a successful call to one of these tools is detected, @atrib/mcp emits a record with event_type: "https://atrib.dev/v1/types/transaction" rather than "https://atrib.dev/v1/types/tool_call". This is how Path 1 merchant-side transaction emission (payments profile §3) is implemented. The merchant's checkout tool name(s) should be listed here. If not set, @atrib/mcp emits only tool_call records and Path 2 agent-side detection applies. |
| onRecord | function | Optional | (record: AtribRecord) => void | Promise<void>. Observer invoked once per signed record AFTER signing and BEFORE log submission. Lets a host persist or audit the record locally; without this hook the original signed JSON is unrecoverable because the log stores only commitments (§2.10). Errors thrown or promises rejected by the observer are caught and warned via console.warn; they MUST NOT block submission, MUST NOT affect the attribution token in _meta, and MUST NOT affect the tool response, preserving the §5.8 degradation contract. Typical uses: dogfood verification (replay verifyRecord against creator_key), local audit trail, replay debugging. |
| evidenceMode | string | Optional | minimal or verifiable-action. The low-level middleware default is minimal for signed-byte compatibility. verifiable-action applies the D166 preset: hashed tool identity plus salted JCS argument and result commitments. The reference @atrib/mcp-wrap integration defaults to this mode. |
| disclosure | object | Optional | Explicit tool_name, args, and result posture dials from §8. When supplied, they override evidenceMode. |
5.3.2 Inbound Context Reading
On every tools/call request, the middleware MUST read the inbound attribution context before passing the request to the tool handler. The context is read in priority order:
1. params._meta.atrib: present for MCP stdio and Streamable HTTP transport. Value is a base64url-encoded token as defined in §1.5.2. Read first.
2. tracestate: atrib=: present for HTTP transport. Parsed per §1.5.2. Read if params._meta.atrib is absent.
3. X-atrib-Chain header: fallback when tracestate was stripped by a proxy (§1.5.3). Read if neither of the above is present.
If all three are absent, this is a genesis call; no upstream attribution context exists for this request. The middleware generates a genesis record (§5.3.3).
In addition, the middleware MUST read the session_token if present:
4. params._meta.baggage: for MCP transports. Parse for key atrib-session.
5. W3C Baggage header: for HTTP transport. Parse for key atrib-session.
The extracted context yields: record_hash (the SHA-256 of the sending record, which becomes the chain_root of the next record in the chain), creator_key (identifies the sender), context_id (the OTel trace ID from the traceparent header or span context), and optionally session_token (for cross-trace attribution linking). All extracted values are passed to record construction (§5.3.3).
5.3.3 Record Construction and Signing
In the ordinary post-call path, after the tool handler completes successfully (i.e., isError is false in the response), the middleware MUST construct and sign an attribution record per §1.2 through §1.4. Verifiable-action pre-call mode follows the two-record timing below.
// Record construction and signing. Fires AFTER successful tool call response,
// BEFORE the response is returned to the caller:
const isTransaction = transactionTools.includes(toolName)
const record = {
spec_version: "atrib/1.0",
content_id: computeContentId(serverUrl, toolName), // [§1.2.2](#122-content_id-derivation)
creator_key: publicKeyFromPrivate(creatorKey), // base64url Ed25519 pubkey
chain_root: inboundContext?.record_hash // record_hash from [§5.3.2](#532-inbound-context-reading) becomes this record's chain_root
?? genesisChainRoot(context_id), // [§1.2.3](#123-chain_root-for-genesis-records) if no upstream
event_type: isTransaction
? "https://atrib.dev/v1/types/transaction"
: "https://atrib.dev/v1/types/tool_call", // [§1.2.4](#124-event_type-values)
context_id: context_id, // OTel trace ID
timestamp: Date.now(),
...(session_token && { session_token }), // [§1.5.5](#155-cross-trace-session-continuity), omit field if absent
}
const signed = signRecord(record, creatorKey) // [§1.4.2](#142-signing-procedure), synchronousRecord construction and signing MUST complete before the response is returned to the caller. Log submission (§5.3.5) MUST happen after the response is sent and is always non-blocking, including for transaction records. See §5.3.5 for submission behavior, retry logic, and the priority distinction between transaction and tool_call records.
Verifiable-action mode. A normal post-call path emits one record carrying
the hashed tool identity plus salted argument and result commitments. A
pre-call receipt-injection path cannot put the result into the already-signed
request record. It MUST commit the request record before invoking the handler,
then emit a terminal outcome for success, an MCP isError or invalid result,
or a thrown failure or cancellation. The outcome record carries the result commitment and
MUST bind to the request record through both chain_root and informed_by.
Both records use the same context_id and content_id. The request uses
tool_call. The outcome uses transaction only when the tool is in
transactionTools; otherwise it also uses tool_call. This pair adds no
field or event type. The local sidecar distinguishes
actionPhase: "request" from actionPhase: "outcome". See
D166.
Optional observer hook. If an onRecord callback was provided at init (§5.3.1), the middleware MUST invoke it with the signed record after signing completes and before log submission begins. This is the only point at which the original signed JSON is observable to the host, because the log itself stores only commitments (§2.10). The observer is invoked synchronously from the middleware's perspective: a returned Promise is not awaited, but rejections are captured and logged. Errors thrown or promises rejected by the observer MUST NOT propagate to the tool response, MUST NOT prevent log submission, and MUST NOT affect the attribution token written in §5.3.4. This preserves the §5.8 degradation contract.
Note (Tool call failures): The ordinary and minimal paths emit records only for successful tool calls (isError: false). Their failed calls remain unsigned gap nodes in the graph (§3.2.5). Verifiable-action pre-call mode has already committed a request before execution, so it MUST extend that request with a terminal outcome commitment when the handler returns isError: true, returns no valid result object, or throws. Attribution failure still follows §5.8: it MUST NOT replace or suppress the tool's result or exception.
5.3.4 Outbound Context Writing
After signing the record, the middleware MUST write the new attribution context into the response so the calling agent can forward it downstream.
// Compute the propagation token ([§1.5.2](#152-http-transport-tracestate)):
// record_hash = SHA-256 of the full JCS-canonical signed record just emitted
// This becomes the chain_root field in the NEXT record that extends this chain.
const record_hash_bytes = sha256(jcs(signed))
const creator_key_bytes = publicKeyBytes(creatorKey)
const token = base64url(record_hash_bytes) + '.' + base64url(creator_key_bytes)
// Write to response in all applicable locations:
response._meta.atrib = token // always, MCP metadata (CallToolResult top-level _meta)
response.headers['tracestate'] = `atrib=${token},` + response.headers['tracestate'] // HTTP transport, prepend per W3C
response.headers['X-atrib-Chain'] = token // fallback headerThe tracestate value MUST NOT replace existing tracestate entries. Per W3C Trace Context, the most recently modified entry SHOULD be leftmost. Implementations SHOULD prepend the atrib= entry rather than appending it. The full token is 87 characters maximum and fits within the W3C tracestate per-vendor limit of 256 characters.
5.3.5 Log Submission
Log submission is always non-blocking. The tool response is returned to the caller before any submission begins. Submission failures MUST NEVER propagate to the tool response or the caller. This applies to both tool_call and transaction records without exception; the degradation contract (§5.8) takes precedence over any desire to confirm log commitment before responding.
// After response is sent, always non-blocking:
const priority = isTransaction ? 'high' : 'normal'
submitToLog(signed, logEndpoint, { priority })
.then(proof => cacheProofBundle(record_hash(signed), proof))
.catch(err => {
logWarning('atrib: log submission failed', { err, record_hash: record_hash(signed) })
cacheSignedRecord(signed) // cache locally; will be retried on next flush
})
// Retry behavior:
// - tool_call records: exponential backoff, max 3 attempts, 30s total window
// - transaction records: same backoff, but attempts begin immediately and run
// before the next tool_call record in the queue (priority ordering)
// - after all retries fail: signed record stays in local cache
// - verification_state remains signature_valid until log commitment is confirmed
// - manual flush for testing or shutdown: atribServer.flush()The proof bundle returned from a successful submission (§2.6.2) SHOULD be cached in memory keyed by record_hash for the duration of the server process, and persisted to a local store if the operator has configured one. Cached proof bundles are served at GET /.well-known/atrib-proof/{record_hash} so agents and merchants can retrieve inclusion proofs without querying the log directly.
5.3.6 Policy Exposure
If a policy option was provided at init, the middleware MUST serve it at GET /.well-known/atrib-policy.json with Content-Type: application/json and Cache-Control: max-age=300. If no policy was provided, the endpoint MUST return HTTP 404.
For MCP servers using stdio transport, where no HTTP server is available, the policy is instead embedded in the MCP server's capability advertisement in the serverInfo field during the initialize handshake:
// In MCP initialize response (stdio transport only):
serverInfo: {
name: 'my-tool',
version: '1.0.0',
"io.atrib/policy": policy ?? null // inline policy or null
}5.4 @atrib/agent: Agent Middleware
In this section, "session state" means application-owned continuity across an
agent run. It is not MCP transport-session state. Each MCP request still carries
its complete protocol, identity, capability, trace, and atrib context metadata.
No rule in §5.4 depends on a connection,
initialize, or Mcp-Session-Id.
5.4.1 Init Interface
The agent middleware exposes an interception surface that the host application or MCP client integrates at outbound tool call and inbound tool response boundaries. This is a framework-agnostic design; the middleware does not monkey-patch a specific agent implementation, because no single agent shape covers the LangChain / Mastra / AI SDK / direct-MCP-client landscape. Instead, the middleware returns an interceptor object that the caller hooks into their own request/response lifecycle.
import { atrib } from '@atrib/agent'
// Create the interceptor once at startup.
const interceptor = atrib({
creatorKey: process.env.ATRIB_PRIVATE_KEY, // REQUIRED (see [§5.6](#56-key-management))
merchantDomain: 'https://merchant.example.com', // OPTIONAL, for policy fetch at session init
logEndpoint: 'https://log.atrib.dev/v1/entries', // OPTIONAL, default shown
sessionToken: 'my-session', // OPTIONAL (see [§1.5.5](#155-cross-trace-session-continuity))
serverUrls: ['https://tool-a.example', 'https://tool-b.example'], // OPTIONAL, for policy fetch
})
// The interceptor exposes four methods. The caller invokes them at the
// appropriate points in their MCP client's request/response lifecycle:
//
// 1. Before sending a tools/call request:
const meta = await interceptor.onBeforeToolCall(toolName, existingMeta)
// `meta` is the merged _meta object to attach to the outbound request.
// Init runs lazily on the first call ([§5.4.2](#542-session-initialization)).
//
// 2. After receiving a tools/call response:
interceptor.onAfterToolResponse(toolName, response, response._meta, {
serverUrl: 'https://tool-a.example',
isError: false,
headers: { /* HTTP response headers if available */ },
})
//
// 3. Inspect the session policy record (e.g., to share with merchant):
const record = interceptor.getSessionPolicyRecord()
//
// 4. Drain pending log submissions before shutdown:
await interceptor.flush()Implementations are free to wrap this surface in higher-level adapters for specific frameworks (a LangChain callback, an AI SDK middleware, an MCP client subclass), but the protocol-level contract is the four methods above. The reference implementation in @atrib/agent ships only the interceptor; framework adapters are outside the scope of this specification.
Init options
| Option | Type | Required | Description |
|---|---|---|---|
| creatorKey | string | Required | Base64url Ed25519 private key. Used to sign agent-level attribution records when the agent itself is a contributor (e.g., it produces content that influences a transaction). Also used to sign the session policy record. |
| merchantDomain | string | Optional | Base URL of the merchant whose policies should be fetched at session initialization. If not provided, policy negotiation is skipped and the default policy applies. |
| logEndpoint | string | Optional | Merkle log submission endpoint. Default: https://log.atrib.dev/v1/entries. |
| sessionToken | string | Optional | If provided, used as the session_token for cross-trace attribution linking (§1.5.5). If absent, the middleware generates one automatically at session start and propagates it via W3C Baggage. |
| serverUrls | string[] | Required | URLs of all MCP servers the agent connects to. Used for context propagation and transaction detection scope. |
5.4.2 Session Initialization
Session initialization fires once when the first tool call of a session is about to be made. It MUST complete before the first outbound tool call is sent.
During initialization the middleware:
1. Establishes the context_id from the current OTel trace ID. If no OTel trace is active, generates a random 16-byte hex string and injects it as the trace ID.
2. Generates or uses the provided sessionToken and injects it into W3C Baggage as atrib-session=.
3. Fetches the merchant policy from merchantDomain/.well-known/atrib-policy.json if merchantDomain is set. Uses a 1-second per-fetch timeout. No retry during init; falls back to default on any error or timeout.
4. For each tool server in the agent's tool list, fetches creator policies concurrently (all in parallel, not sequentially). Uses a 1-second per-fetch timeout with no retry. Reads from /.well-known/atrib-policy.json for HTTP servers, or from serverInfo["io.atrib/policy"] for stdio servers. Collects all policies that responded within the timeout window; treats non-responding servers as having no policy.
5. Runs policy negotiation per payments profile §7 and creates the session policy record per payments profile §7.3.
The entire initialization sequence MUST complete within 3 seconds. If it does not, the middleware proceeds under the default policy and records a timeout warning in the session policy record. The 1-second per-fetch timeout, with all creator fetches running concurrently, means total init time is bounded by: merchant fetch (≤1s) + max single creator fetch (≤1s) + negotiation logic (negligible) = well within 3 seconds even with many tools.
Note (Init timeouts differ from runtime policy fetch timeouts): The payments profile §6 retry-once-with-2-second-delay behavior applies to runtime policy document requests from policy evaluation tools, not to SDK init. During init, the SDK must fail fast; a slow policy server should not delay the first tool call by 4+ seconds. The tradeoff is that a transiently slow server during init is treated as having no policy; if the server recovers, it will serve its policy correctly on the next tool call's context propagation path.
5.4.3 Outbound Context Forwarding
On every outbound tools/call request, the middleware MUST attach the current attribution context to the request:
// On every outbound tools/call:
// Token format per [§1.5.2](#152-http-transport-tracestate): base64url(record_hash) + '.' + base64url(creator_key)
// record_hash = SHA-256 of the JCS-canonical signed record received in the last response
// creator_key = full 32-byte Ed25519 public key of the creator who signed that record
const token = sessionState.latestContext
? base64url(sessionState.latestContext.record_hash) + '.'
+ base64url(sessionState.latestContext.creator_key)
: null
if (token) {
request.params._meta.atrib = token // always
request.headers.tracestate = `atrib=${token},` + request.headers.tracestate // HTTP transport, prepend per W3C
request.headers['X-atrib-Chain'] = token // fallback
}
// Always forward session_token in Baggage regardless of whether atrib context exists:
request.headers.baggage += `,atrib-session=${sessionToken}`
request.params._meta.baggage = `atrib-session=${sessionToken}` // MCP metadataIf no attribution context has been received yet in this session (first tool call), no atrib token is attached. The receiving tool will generate a genesis record anchored to the session's context_id. This is the expected behavior; the first tool in a session always produces a genesis record.
5.4.4 Inbound Context Accumulation
On every inbound tools/call response, the middleware MUST read the attribution context from the response and update the session state:
// On every inbound tools/call response (isError: false):
const token = response.params?._meta?.atrib
?? parseTracestate(response.headers?.tracestate)?.atrib
?? response.headers?.['X-atrib-Chain']
if (token) {
const { record_hash, creator_key } = decodeToken(token) // [§1.5.2](#152-http-transport-tracestate)
// record_hash becomes the chain_root for the NEXT record in this session.
// creator_key identifies who produced the record we just received.
sessionState.latestContext = { record_hash, creator_key }
}
// If no token in response: tool does not have @atrib/mcp installed.
// Session state is unchanged. An OTel gap node will represent this hop in the graph.5.4.5 Transaction Detection
Moved to the atrib Payments Profile §3 per D147. This anchor is stable; the section number is not reused.
5.4.6 Session Policy Record Creation
Moved to the atrib Payments Profile §7.4 per D147. This anchor is stable; the section number is not reused.
5.5 @atrib/verify: Merchant Verification Library
5.5.1 Init Interface
import { AtribVerifier } from '@atrib/verify'
const verifier = new AtribVerifier({
logEndpoint: 'https://log.atrib.dev/v1', // OPTIONAL, default shown
graphEndpoint: 'https://graph.atrib.dev/v1', // OPTIONAL, default shown
resolveEndpoint: 'https://resolve.atrib.dev/v1', // OPTIONAL, for remote calculation
merchantKey: process.env.ATRIB_MERCHANT_KEY, // OPTIONAL, for self-signing recommendations
})
// If merchantKey is not set:
// - verify() still works; it only needs the recommendation's calculated_by public key
// - calculate() with signWith: 'merchant' returns an unsigned recommendation
// with a warnings entry: "merchantKey not set, recommendation unsigned"
// - calculate() never throws due to a missing key (degradation contract [§5.8](#58-degradation-contract))5.5.2 Verifying a Settlement Recommendation
Moved to the atrib Payments Profile §10.1 per D147. This anchor is stable; the section number is not reused.
5.5.3 Post-Hoc Calculation (No Agent SDK)
Moved to the atrib Payments Profile §10.2 per D147. This anchor is stable; the section number is not reused.
5.5.4 AP2 / Verifiable Intent Evidence Checks
Moved to the atrib Payments Profile §11 per D147. This anchor is stable; the section number is not reused.
5.5.5 Handoff Claim Verification
@atrib/verify exposes verifyHandoffClaims() for Pattern 3 multi-agent receiving flows. A receiving agent uses it before linking its next action to another agent's claimed record_hash. @atrib/verify-mcp exposes the same operation as the read-only atrib-verify cognitive primitive.
import {
handoffClaimsFromEvidencePacket,
verifyHandoffClaims,
} from '@atrib/verify'
const claims = handoffClaimsFromEvidencePacket({
required_record_hashes: ['sha256:...'],
records: [
{
record_hash: 'sha256:...',
record,
proof,
_local: { content: privateBodyMaterial },
},
],
})
const handoff = await verifyHandoffClaims(
claims,
{
trusted_creator_keys: [agentAPublicKey],
allowed_context_ids: [expectedContextId],
require_body: true,
require_body_commitment: true,
require_log_inclusion: true,
log_public_key: logPublicKey,
max_age_ms: 60_000,
},
)
const nextRecord = await signRecord({
...unsigned,
informed_by: handoff.accepted_record_hashes,
}, privateKey)The helper verifies each supplied claim independently:
- The supplied record's canonical hash equals the claimed
record_hash. verifyRecord()accepts the record signature and canonical record shape.- The record signer is in
trusted_creator_keyswhen the caller supplies a trust set. - The record context is in
allowed_context_idswhen the caller supplies a context allow-list. - The timestamp is within
max_age_mswhen the caller supplies a freshness bound. - Supplied
body,args, orresultmaterial matchesargs_hash/result_hashwhen body commitments are required. - A supplied proof bundle verifies against the serialized log entry for that exact record. If
log_public_keyis present, the C2SP signed-note checkpoint signature is also verified.
The result separates accepted and rejected claims and includes accepted_record_hashes for direct informed_by use. Rejected claims carry named reasons such as record_missing, record_hash_mismatch, signature_invalid, wrong_signer, wrong_context, stale, body_hash_mismatch, proof_missing, and proof_invalid.
handoffClaimsFromEvidencePacket() is a pure adapter for supplied evidence. It accepts parsed local mirror envelopes, private continuation packets, or arrays of evidence entries. It does not read files, fetch log entries, or fetch archive bodies.
The helper and primitive do not add a graph edge type or event type. A successful follow-up still uses the existing §1.2.5 field and the existing INFORMED_BY graph edge. See D105 and D106.
5.5.6 Generic Authorization Evidence Blocks
@atrib/verify exposes a generic tiered evidence block shape for external authorization and delegation systems. These blocks are verifier-side signals. They do not alter record signature verification, graph derivation, settlement calculation, or verifyRecord().valid. This generic block shape is the legacy pre-envelope form: §5.5.7 defines the universal evidence envelope that supersedes it for new evidence types and freezes this section's protocol string set at five values.
The generic result shape is:
{
protocol: 'oauth2' | 'mcp_oauth' | 'aauth' | 'ap2_vi' | string,
valid: boolean,
issuer: string | null,
subject: string | null,
scope: string[],
attenuation_ok: boolean | null,
delegation_ok: boolean | null,
constraints: [
{
type: string,
status: 'passed' | 'failed' | 'unresolved' | 'not_checked',
expected?: unknown,
actual?: unknown,
reason?: string,
},
],
errors: string[],
warnings: string[],
details?: unknown,
}verifyRecord(record, { authorizationEvidence }) attaches an evidence[] array. Each evidence item is evaluated independently. A record can have valid: true while one or more evidence[] entries have valid: false; consumers apply policy based on their own trust posture. ap2ViEvidence remains available as the legacy AP2 / VI field and is also mirrored into evidence[] as protocol: "ap2_vi".
The initial generic adapter is OAuth / MCP authorization evidence. It accepts a compact access-token JWT with caller-supplied trusted JWKS, caller-verified claims, or a caller-supplied OAuth token-introspection response. The verifier does not call an introspection endpoint; the caller owns that network and trust policy. The verifier checks:
- JWT signature,
iss,aud,exp,nbf, and clock skew when a JWT and JWKS are supplied. - MCP protected-resource binding through token
aud, tokenresource, and OAuth Protected Resource Metadata. - Required scopes from
scopeorscp. - Optional RFC 9396
authorization_detailsconstraints bytype,actions, andlocations. - Optional
client_id, subject, actor subject, andcnf.jktchecks. - Optional RFC 9449 DPoP proof evidence:
typ, public JWK thumbprint,htm,htu,ath,jti,iat, nonce when supplied, andcnf.jktbinding when the access-token claims expose it.
The OAuth / MCP adapter does not mint tokens, run OAuth redirects, call token-introspection endpoints, fetch authorization-server metadata, or maintain a global DPoP replay cache. Callers supply tokens, claims, trust roots, protected-resource metadata, seen DPoP jti values or a shared replay cache when they enforce replay policy, and required constraints. Missing trusted keys or unverified decoded claims make the evidence block invalid by default; callers MAY choose a best-effort signature policy for advisory triage.
@atrib/verify also exposes a host-owned token-introspection helper. The helper posts to the caller's configured introspection endpoint, applies caller-supplied client authentication and expectation checks, and returns a caller-supplied introspection response for the evidence verifier. verifyRecord() and verifyOAuthAuthorizationEvidence() still do not perform hidden network calls.
The second generic adapter is AAuth authorization evidence. It accepts an AAuth agent token, resource token, or auth token with caller-supplied trusted JWKS, caller-verified claims, or decoded claims under an explicit signature policy. The verifier does not fetch AAuth metadata, fetch JWKS, mint tokens, call a Person Server, call an Authorization Server, or perform user interaction. The verifier checks:
- AAuth JWT
typ, signature,iss,aud,exp,iat, and clock skew when a JWT and JWKS are supplied. - Resource binding through token
aud, tokenresource, and caller-suppliedaauth-resource.jsonfacts such asaccess_mode. - Required scopes from
scopeorscp. - Optional agent, subject,
parent_agent,act.sub, and mission constraints. - Optional HTTP Message Signature evidence: caller-verified signature status, covered components,
Authorizationcoverage forAAuth-Access, and signing-key binding throughcnf.jwkoragent_jkt. - Optional R3 document hash or issuer constraints when a resource registration record is available.
The AAuth adapter is verifier-side evidence. It does not make AAuth a new atrib event_type, graph edge, identity directory, or authorization issuer. It records which AAuth facts a verifier accepted for a signed atrib action.
The third generic adapter is x401 proof evidence. It accepts decoded x401 objects or base64url JSON header values for PROOF-REQUEST, PROOF-RESPONSE, and PROOF-RESULT. The verifier checks the x401 envelope, version, Digital Credentials request shape, OAuth token endpoint when the optional oauth member is present, request id, visible OpenID4VP nonce, result artifact or verification-token shape, optional agent id, satisfied requirement ids, and proof-result errors. Callers MAY also provide already-checked agent-origin, issuer-trust, and proof-payment binding facts. x401 payment members are recorded only as informational hints. They do not satisfy payment protocols and MUST NOT trigger transaction detection.
The x401 adapter does not validate OpenID4VP credentials, call credential issuers, run OAuth token exchange, fetch remote credential results, verify trust-list protocols, prove agent-origin semantics, bind payment receipts, or mint verification tokens. Callers supply resultVerified or tokenVerified after their own verifier path accepts the credential result or token. Missing proof-result or token verification makes the evidence invalid by default. Optional origin, trust, and proof-payment binding facts are advisory unless the caller supplies an explicit failed verifier outcome, which fails the evidence block. The adapter accepts older draft header and payload names with warnings so early integrations remain testable while the public x401 materials converge on the v0.2.0 names.
x401 evidence blocks MAY expose sanitized details such as proof_request_hash, proof_response_hash, proof_result_hash, proof_gate, payment_separation, agent_origin, issuer_trust, proof_payment_binding, credential_result_uri_present, and credential_result_uri_hash. Optional origin, issuer-trust, and proof-payment binding references are represented as hashes in public details. They MUST NOT expose raw credential payloads, raw proof-response headers, raw verification tokens, trust-list documents, proof-payment binding documents, or fetched result-by-reference bodies by default.
Deployments that require process-shared or fleet-shared DPoP replay protection pass a dpopReplayCache implementation into the evidence verifier. The cache contract is atomic checkAndRemember(key, expiresAtSeconds), so hosts can back it with Redis, Durable Objects, Postgres, or another shared store. The bundled memory cache is for one-process deployments and tests. The bundled HTTP-backed adapter posts { key, key_id, expires_at_seconds } to a host-owned endpoint and expects { "accepted": true } for a new proof or { "accepted": false } for replay.
A non-normative Cloudflare Worker and Durable Object reference for the HTTP replay-cache endpoint and host-owned introspection proxy lives at packages/integration/examples/cloudflare-agents/oauth-evidence-infra/. It is an implementation example for hosts; it is not required by this specification.
@atrib/mcp MAY capture MCP/OAuth evidence from an MCP HTTP transport's already-validated authInfo and request metadata into the local mirror sidecar. It MAY also capture AAuth evidence from AAuth client callbacks, server verification results, or audit-sink events into the same sidecar shape. It MAY capture x401 proof headers from request metadata when a host explicitly enables x401 authorization evidence. Producer-side capture MUST NOT persist raw bearer tokens, raw AAuth JWTs, or private credential payloads by default. The reference implementation stores verified claims or decoded token facts, one-way token or proof hashes when configured, optional DPoP or HTTP signature material, x401 proof-gate constraints, optional x401 origin, issuer-trust, and proof-payment binding facts, and verifier constraints. It also records resolved local facts such as tool_name so verifyRecord() can evaluate capability envelopes without changing the signed record bytes.
@atrib/mcp MAY submit archived record bodies and selected sidecar evidence through §2.12 when a producer explicitly configures an archive endpoint. This producer path runs after log acceptance, submits the returned proof bundle with the signed record body, and excludes raw local sidecar args and result fields by default.
The offline conformance corpora for the OAuth, AAuth, and x401 adapters live at spec/conformance/5.5.6/oauth/, spec/conformance/5.5.6/aauth/, and spec/conformance/5.5.6/x401/. They cover verified claims, JWT access tokens, MCP resource binding, scope attenuation failures, caller-supplied introspection responses, DPoP proof checks, AAuth token types, AAuth resource binding, AAuth-Access authorization coverage, mission evidence, HTTP signature binding, current x401 headers, result artifacts, token responses, request-id binding, optional oauth metadata, proof-result errors, unverified proof failures, legacy-header strict mode, payment-hint separation, external agent-origin facts, issuer-trust facts, and proof-payment binding facts.
This section is intentionally at the verifier layer. Authorization systems decide what an agent is allowed to do. atrib records what the agent did, who signed the record, how it links to prior work, and which external evidence a verifier accepted. See D109.
5.5.7 Universal Evidence Envelope
The universal evidence envelope is the single protocol-level attachment model for all externally verifiable material: OAuth / MCP authorization results, AAuth tokens, x401 proofs, AP2 / Verifiable Intent receipts, human approvals, counterparty co-signature receipts, and every future evidence type. Each evidence type is a profile of the envelope, identified by an absolute HTTPS type URI and versioned independently of this specification. The generic blocks of §5.5.6 are the legacy pre-envelope form; this section freezes their protocol string set and defines the deterministic mapping from that form into envelope form.
Envelopes are verifier-layer objects and never touch signed bytes. They exist only in: (a) the local mirror sidecar (§5.9.3), (b) the archive evidence projection (§2.12), (c) verifier results, and (d) host-owned packets (handoff claims per D105, continuation packets, action-gate packets per D133, proof packets). Envelopes MUST NOT be carried in propagation tokens (§1.5.2) and MUST NOT enter the 90-byte log entry (§2.3.1). Evidence MUST NOT alter record signature verification, graph derivation (§3.2.4), the payments profile §8 calculation, or verifyRecord().valid. A signed action is real even when its external evidence is missing, expired, over-scoped, or forged; consumers apply their own policy over tiers. See D109.
Envelope schema (normative). One schema, versioned by the integer envelope field:
{
"envelope": 1,
"profile": "https://atrib.dev/v1/evidence/oauth2",
"profile_version": "1.0.0",
"tier": "verified",
"payload": {
"hash": "sha256:64-lowercase-hex-chars",
"media_type": "application/jwt",
"ref": { "kind": "mirror", "uri": null, "record_hash": null },
"inline": null
},
"facts": {
"issuer": "https://as.example",
"subject": "agent-7",
"scope": ["tools:read"],
"attenuation_ok": true,
"delegation_ok": null
},
"result": {
"valid": true,
"constraints": [
{ "type": "scope", "status": "passed", "expected": ["tools:read"], "actual": ["tools:read"] }
],
"errors": [],
"warnings": []
},
"verifier": { "name": "@atrib/verify", "version": "1.x.y", "checked_at_ms": 1780000000000 }
}Required fields: envelope (MUST be the integer 1), profile (absolute HTTPS type URI), profile_version (non-empty semver of the profile document), tier (one of the four values below), payload with hash and ref.kind, and result with boolean valid, constraints[], errors[], and warnings[]. facts (a flat JSON object of profile-defined verifier facts), verifier, payload.media_type, payload.inline, ref.uri, and ref.record_hash are OPTIONAL. result.constraints[] reuses the §5.5.6 constraint shape unchanged (status: 'passed' | 'failed' | 'unresolved' | 'not_checked'). Consumers MUST reject envelopes that violate these shape rules; rejecting an envelope never rejects the record it attaches to.
Payload hash rule. payload.hash is "sha256:" + hex(SHA-256(bytes)) where bytes is the exact raw payload bytes for non-JSON media types (a compact JWT's UTF-8 bytes, a receipt JWT, an SD-JWT), or the JCS canonical form (RFC 8785, §1.3) for JSON payloads. The profile document declares which rule applies per media type. This is the hash-not-body posture of §8.3: public surfaces carry hashes and sanitized facts, never raw payloads.
ref.kind and the ref.record_hash rule. ref.kind states where the payload bytes are retrievable and is a closed five-value enum: 'inline' | 'mirror' | 'archive' | 'external' | 'withheld'. payload.inline (the raw payload, local-only, never public) is permitted ONLY when ref.kind is "inline"; any other combination MUST be rejected. ref.record_hash is a sibling field, NOT a kind value — implementations MUST reject kind: "record". When set, record_hash declares that the payload is itself a signed atrib record: payload.hash commits to that record's canonical JCS bytes, while kind still states where those bytes are retrievable (typically mirror, archive, or withheld). record_hash MAY accompany any kind except inline, where it is redundant with the inline body. "The payload is a signed record" and "where the bytes live" are orthogonal facts; one axis per field.
Tier ladder. tier states how the party named in verifier established the claim, ordered by independent reproducibility:
| Tier | Name | Meaning |
|---|---|---|
| 0 | declared | Payload hash and facts asserted by a producer or counterparty. Nothing checked. |
| 1 | shape | Payload parsed and structurally validated offline. No trust root exercised. |
| 2 | attested | A caller-owned external path accepted the material (introspection per D111, credential-verifier resultVerified per D132). Not independently reproducible from the envelope alone. |
| 3 | verified | Cryptographically verified against declared trust roots (JWKS, pinned keys, pinned corpus per D096). Reproducible by anyone with the envelope, the payload, and the same trust roots. |
The enum is closed at these four values. Extending it requires revising the evidence-envelope decision record, never a consumer specification.
Tier rules (normative). (1) A tier belongs to the envelope instance: it states what the verifier party did, not what is true. (2) A consumer MUST NOT relay another party's envelope with its own identity in verifier or with a raised tier; re-verification produces a new envelope instance. (3) A consumer re-running checks MAY produce a higher- or lower-tier instance than the one it received. (4) The identity key for deduplication is (profile, payload.hash); multiple instances per key are permitted, and consumers order by tier descending, then checked_at_ms descending, then verifier name. (5) A tier: "verified" envelope whose payload cannot be retrieved (ref.kind: "withheld" or unresolvable) is still well-formed; consumers MUST report it as claimed-but-not-reproducible, mirroring the tiered record-verifiability ladder of §2.12.7.
Profile registration rule. A profile is registered by publishing, together: (1) a type URI — atrib-maintained profiles use https://atrib.dev/v1/evidence/<name>; third parties use an absolute HTTPS URI on a domain they control, the same self-sovereign convention as extension event_type URIs and deliberately below the D036 promotion bar, because no event_type byte and no signed field is involved; (2) a profile document (for atrib-maintained profiles: docs/evidence-profiles/<name>.md) defining accepted payload media types and the applicable hash rule, the facts vocabulary (each fact's name, JSON type, and provenance class: verifier-derived, caller-attested, or producer-declared), what each tier requires for the profile, the sanitization contract (which facts and hashes may appear in public projections — raw payloads never, by default, per D110 / D134), and its own semver rules (profile_version refers to this document); and (3) a conformance case family at spec/conformance/evidence-envelope/<name>/ in the same commit (atrib-maintained profiles only; third parties SHOULD publish equivalents). Profile identity is the full URI: a foreign domain reusing an atrib profile name (e.g. https://example.com/v1/evidence/oauth2) is a valid third-party profile URI and MUST NOT be treated as the atrib profile of the same name.
The initial atrib-maintained registry is: oauth2, mcp-oauth, aauth, x401, ap2-vi (mapped 1:1 from the legacy §5.5.6 adapters), human-approval (per D118: the payload is the human-signed approval record itself; ref.record_hash names it, ref.kind states where its body is retrievable, and payload.hash commits to its canonical bytes), counterparty-attestation (out-of-band co-signature receipts that are external evidence per D098 / D107), and delegation-certificate (the certificate carrier defined by §1.11.8). Registered after the initial set, under the same rule: continuation-packet per D142; payments-detection and payments-settlement per D147; and nostr-event plus buzz-event per D179. The Nostr profile verifies event IDs and Schnorr signatures. The Buzz profile adds NIP-OA owner authorization while keeping community admission, relay acceptance, audit inclusion, and runtime execution as separate claims.
Unknown-profile handling (normative). Consumers MUST preserve envelopes whose profile URI they do not recognize, MUST render them opaquely (profile URI, tier, payload hash), MUST NOT drop them, and MUST NOT let them affect record validity — the same posture as unknown extension event types (§1.2.4). Filtering to known profiles is a rendering choice, never a storage or relay behavior.
Legacy protocol strings are frozen (normative). The pre-envelope §5.5.6 protocol string set is closed at exactly five values: 'oauth2', 'mcp_oauth', 'aauth', 'x401', 'ap2_vi'. No new legacy protocol string may be introduced anywhere in the substrate — not in @atrib/verify, not in producers, not in future decision records. Every new evidence type registers as an envelope profile.
Legacy mapping (normative). The mapping from a legacy §5.5.6 block to envelope form (fromLegacyEvidenceBlock) MUST be deterministic; two implementations given the same block MUST produce identical envelopes:
protocolmaps to the profile URI through the fixed five-row table:oauth2→https://atrib.dev/v1/evidence/oauth2,mcp_oauth→https://atrib.dev/v1/evidence/mcp-oauth,aauth→https://atrib.dev/v1/evidence/aauth,x401→https://atrib.dev/v1/evidence/x401,ap2_vi→https://atrib.dev/v1/evidence/ap2-vi. Any other protocol string MUST be rejected; the mapping MUST NOT invent a profile URI. The table is complete and final at five rows; a sixth row is a conformance failure, not an extension point.- The mapped envelope carries
envelope: 1,profile_version: "1.0.0", andtier: "attested". A legacy block records what a caller-owned verifier path accepted; it carries no trust roots, so the mapping MUST NOT claim"verified". Consumers re-verify to raise tier. payload.hashcommits to the legacy block itself:"sha256:" + hex(SHA-256(JCS(block))), withmedia_type: "application/json"andref.kind: "withheld"(the legacy shape does not carry the raw external material).issuer,subject,scope,attenuation_ok, anddelegation_okcopy intofactsunchanged (nulls preserved). Whendetailsis present,facts.details_hashis"sha256:" + hex(SHA-256(JCS(details))); thedetailsvalue itself is never inlined into the envelope.valid,constraints,errors, andwarningscopy intoresultunchanged.- The mapped envelope carries no
verifierblock: the mapping is mechanical, not a re-verification (tier rule 2).
Deliberate commitment path. This section adds no signed-record field. A producer that wants the signed record to commit to evidence uses existing mechanisms only: include { profile, payload_hash } in the content hashed into args_hash (per the D099 default), or emit an extension record referencing the envelope and linked via informed_by (§1.2.5). A future optional signed evidence_hash field would slot lexicographically after event_type and before informed_by under §1.3; it is explicitly deferred.
Invariants. Fact/policy separation (§3.6) is preserved: result.valid and facts are verification facts, not weights; graph services never store, derive from, or serve envelopes. The §1.7.6 cross-attestation rule stays in core: the signers[] array over canonical transaction bytes remains the only way to satisfy the ≥2-distinct-keys minimum, and a verifier that sees only a counterparty-attestation envelope still reports cross_attestation_missing: true (D052). Producer-side envelope writers follow the degradation contract (§5.8): catch-all, silent-failure, atrib:-prefixed logging; a failed envelope construction drops the envelope, never the record or the primary tool response. The envelope is the concrete shape of trust layer 7 ("external evidence") in the §8.7 stack: it does not certify truth, it records what a named verifier accepted.
Conformance. The envelope conformance corpus lives at spec/conformance/evidence-envelope/ with ten case families: the five shared envelope families, continuation-packet/, payments-detection/, payments-settlement/, nostr-event/, and buzz-event/. The Nostr cases pin NIP-01 event ID and signature verification. The Buzz cases pin NIP-OA owner authorization and unresolved relay and runtime boundaries. The generator is packages/log-dev/scripts/generate-conformance-evidence-envelope.ts; the reference consumer is packages/verify/test/conformance-evidence-envelope.test.ts. Profile-internal semantics remain authoritative in the existing corpora at spec/conformance/5.5.6/{oauth,aauth,x401}/ and spec/conformance/ap2-vi-crypto/, which are referenced, not moved.
5.6 Key Management
5.6.1 Key Generation
All atrib SDKs use the same Ed25519 key format defined in §1.4.1. A keypair can be generated using the atrib CLI:
npx @atrib/cli keygen
// Output:
ATRIB_PRIVATE_KEY=base64url(32-byte-ed25519-seed)
ATRIB_PUBLIC_KEY=base64url(32-byte-ed25519-public-key)
// ATRIB_PRIVATE_KEY stores the 32-byte seed only (not concatenated with the public key).
// The public key is deterministically derived from the seed at runtime.
// Only ATRIB_PRIVATE_KEY needs to be stored and secured.Note (Ed25519 seed vs expanded key): Some Ed25519 libraries use a 64-byte "expanded" or "NaCl" format that concatenates the seed with the derived public key. atrib stores and transmits only the 32-byte seed. The public key is derived at runtime using standard Ed25519 scalar multiplication. Implementations MUST accept only 32-byte seeds in ATRIB_PRIVATE_KEY and MUST NOT accept or produce 64-byte concatenated formats as key values, to prevent confusion between key representations across implementations.
5.6.2 Environment Variable Convention
The canonical environment variable names are:
| Variable | Used by | Contents |
|---|---|---|
| ATRIB_PRIVATE_KEY | @atrib/mcp, @atrib/agent | Base64url-encoded 32-byte Ed25519 seed. The public key is derived from this at runtime. This is the only value that needs to be stored and secured. See §5.6.1 for the distinction between seed and expanded key formats. |
| ATRIB_MERCHANT_KEY | @atrib/verify | Base64url-encoded 32-byte Ed25519 seed used to sign settlement recommendations produced by post-hoc calculation. Uses the same format as ATRIB_PRIVATE_KEY. |
| ATRIB_LOG_ENDPOINT | @atrib/mcp, @atrib/agent | Optional. Override for the Merkle log submission endpoint. Overrides the logEndpoint init option. |
5.6.3 Key Storage Requirements
The private key signs every attribution record emitted by the creator. Compromise of the private key allows forged attribution records to be submitted to the log under the creator's identity. Implementations MUST enforce the following:
-
The private key MUST NEVER appear in logs, error messages, attribution records, or any transmitted data.
-
The private key MUST NEVER be embedded in source code or committed to version control. The
ATRIB_PRIVATE_KEYenvironment variable convention exists specifically to prevent this. -
In production deployments, the private key SHOULD be stored in a secrets manager (AWS Secrets Manager, HashiCorp Vault, or equivalent) and injected at runtime.
-
SDK implementations MUST zero the key material from memory after use when the runtime supports it.
Key compromise. §1.9 defines the normative key rotation and revocation mechanism. Creators who believe their key has been compromised SHOULD publish a key_revocation record per §1.9.1 with revocation_reason: "compromise" (and a successor_key if rotating to a new key), then submit subsequent records under the new key. Verifiers honor the revocation per §1.9.3: records under the retired key at later log indexes are flagged revoked_after_revocation. The signed record timestamp does not determine revocation order. The §6 directory propagates revocations to other agents and verifiers.
5.6.4 Named Identity Profile (Informative)
The reference CLI exposes the existing identity and delegation primitives as one lifecycle:
npx @atrib/cli identity init \
--principal "Example Operations" \
--principal-kind organization \
--workspace "Incident Response" \
--agent "Triage Agent"The command creates or recovers one durable principal, derives stable
principal-namespaced workspace and agent labels, signs those names and roles
as an §6 identity claim, and issues a fresh
context-bound §1.11 run certificate. The local
profile stores no secret. It contains the public identity, the signed claim,
and a locator for the Keychain or caller-managed key file. The output carries
the signed claim and certificate so an offline consumer can verify
run key → principal → named workspace and agent without resolving a live
directory. Directory discovery is an explicit publication step.
The name and role claim is self-attested unless another §6.1 method proves more. Its signature proves that the principal key committed to the claim. It does not prove a legal identity, employment relationship, or organization control. A simple interface MUST preserve that distinction.
On a repeat invocation, the reference lifecycle treats the fresh key as a rotation, not an unrelated replacement. It locks the profile, signs a §1.11.5 revocation for the prior run under the principal, submits it to the configured log, records the accepted log index, then switches the profile to the successor. Submission failure leaves the prior active-run state unchanged. Consumers can reload the profile's accepted revocation view, and protected executors can check it before policy evaluation and again immediately before the side effect.
5.7 Automation Triggers (Normative)
This section is normative. A conforming implementation MUST fire each trigger at exactly the stated moment, with exactly the stated behavior. Implementations MUST NOT require developer input to activate any trigger. Implementations MUST NOT expose configuration options for suppressing individual triggers.
| Trigger | When | Package | Action |
|---|---|---|---|
| session_init | Before the first outbound tools/call in a session | @atrib/agent | Establish context_id, generate session_token, fetch and negotiate policies, create session policy record (§5.4.2). |
| tool_call_outbound | Immediately before every outbound tools/call request is sent | @atrib/agent | Attach attribution context token to request headers and params._meta (§5.4.3). |
| tool_call_inbound | Immediately after every inbound tools/call response is received, if isError: false | @atrib/agent | Read and store attribution context from response. Update session state (§5.4.4). Check for transaction signal (payments profile §3). |
| tool_request_committed | Immediately before invoking a tool handler when verifiable-action pre-call mode is active | @atrib/mcp | Commit the receipt-bearing tool_call request record, label the local sidecar actionPhase: "request", and begin asynchronous log submission before the receipt is exposed to the upstream tool. |
| tool_served | Immediately after a tool handler returns, or after it throws in verifiable-action pre-call mode | @atrib/mcp | In ordinary mode, construct and sign one record only for isError: false. In verifiable-action pre-call mode, commit a linked terminal outcome for success, MCP error or invalid result, or thrown failure or cancellation. The outcome uses transaction only when the tool is in transactionTools; otherwise it uses tool_call. Attach context to returned responses and submit asynchronously per §5.3.3 through §5.3.5. |
| transaction_detected | When detectTransaction() returns true during tool_call_inbound processing | @atrib/agent | Apply path selection rule (payments profile §3): if attribution token is present in the response, Path 1 is in use: update session state and skip emission. If no token, Path 2 applies: emit a transaction record, submit to log immediately (high priority, non-blocking), finalize session policy record. |
| task_created | When a tasks/create response is received | @atrib/agent | Store the task ID and associate it with the current session context. Continue forwarding attribution context on subsequent requests within the task. |
| task_completed | When a task polling response indicates completion | @atrib/agent | Treat task completion as a successful tools/call response. Apply tool_call_inbound trigger logic to the final task result. |
5.8 Degradation Contract
Observational attribution MUST NOT impair the primary function of a tool or agent. Its failures preserve the default tool-call and response behavior. Diagnostics MAY report degraded capture without changing that behavior.
This section governs observational attribution middleware. Execution preconditions and refusal behavior belong to a separately specified host policy. For source-bound evidence under §1.12, observational failures MUST remain visible as degraded capture. Missing or failed recording MUST NOT be treated as proof that an effect was prevented. A producer MUST NOT claim durable pre-action intent unless the complete signed record and opening were durable before the effect.
The degradation contract is:
Any exception thrown inside an atrib trigger handler MUST be caught by the middleware. Exceptions MUST NEVER propagate to the tool handler, the agent, or the calling code. The middleware MUST log the exception at warning level using a prefixed label ("atrib:") and continue as if the trigger did not fire.
Any network failure during log submission MUST be handled silently with retry. This applies equally to tool_call and transaction records; both use exponential backoff with max 3 attempts over a 30-second window. Transaction records are queued at higher priority than tool_call records but are not submitted synchronously. If all retries fail, the signed record is cached locally. The tool or agent response is not affected in any case.
Any timeout during policy negotiation MUST fall back to the default policy. The timeout window is 3 seconds (§5.4.2). The session proceeds under default policy. The session policy record records the timeout.
Any missing attribution context in an inbound response is not an error. The tool simply didn't have @atrib/mcp installed. An OTel gap node represents this hop. The session continues.
If ATRIB_PRIVATE_KEY is not set at init, the middleware MUST log a warning and operate in pass-through mode. Pass-through mode: all requests and responses are forwarded without modification, no attribution records are emitted, no context is attached. The tool or agent operates as if the atrib() wrapper were not present.
Adding observational @atrib/mcp or @atrib/agent middleware MUST preserve the
tool's behavior on attribution failure. This contract does not define a host's
protected execution policy.
5.8.1 Duplicate-safe stateless MCP writes
A stateless MCP write MAY carry a caller-generated retry identity in
params._meta["dev.atrib/idempotencyKey"]. The key MUST be a 16 to 128
character visible-ASCII string. It is transport metadata and MUST NOT enter
canonical atrib record bytes.
A server that advertises duplicate-safe writes MUST:
- derive an action binding as
sha256(JCS({context_id, tool, arguments})), using the explicit resolvedcontext_id, MCP tool name, and complete tool argument object; - durably reserve the key and binding before dispatch;
- serialize concurrent claims for the same key;
- preserve the complete successful MCP result before acknowledging it;
- return that result without dispatch when the same key and binding repeat;
- reject the same key with a different binding before dispatch; and
- surface a durable pending entry as an indeterminate prior outcome rather than assuming the action did not happen.
The reference retention window for completed entries is seven days. A server MAY use another documented window. It MUST report the effective window. It MUST NOT expire unresolved pending entries automatically.
Caller keys SHOULD be hashed before local persistence. The local store MAY contain the completed MCP result needed for exact replay and MUST be protected as host-private state. The store is not a public log surface.
A caller that receives a timeout or transport failure after sending an idempotent write SHOULD retry the same key and unchanged action. It MUST NOT fall back to another signing path whose store cannot see the reservation. Within one context, the server MUST keep write serialization until the underlying operation settles, even when the caller-facing deadline has already expired.
This contract proves duplicate safety for completed daemon writes. It does not claim exactly-once execution for arbitrary external effects. An orphaned pending entry is deliberately indeterminate until an operator or application-specific reconciler establishes the outcome.
5.9 Local Mirror Conventions
This section is normative for hosts that persist signed records locally; see D062 for the design rationale and implementation evidence.
The Merkle log (§2) stores cryptographic commitments only, 90-byte fixed-size entries plus the inclusion-proof material. The original signed record JSON is unrecoverable from the log alone. Hosts that want re-verifiability against creator_key, autoChain seed continuity across process restarts, or richer consumer surfaces (recall, trace, summarize) MUST persist signed records to a local mirror.
This section defines the canonical local-mirror persistence shape. It is normative for any implementation that produces or consumes the local mirror; non-mirror persistence (e.g. in-memory only, ephemeral test fixtures) is unaffected.
5.9.1 The two-tier persistence pattern
atrib defines two distinct persistence tiers with different design constraints:
| Tier | Owner | Constraint | Contains |
|---|---|---|---|
| Public log | log operator | MUST be lean; cryptographic-evidence-only; cheap to operate; safe to share publicly | record_hash, creator_key, context_id, timestamp, event_type byte (per §2.3.1) |
| Local mirror | host (per-deployment) | MAY carry pre-sign payload context; never reaches the public log; scoped to the host's own consumption | The signed AtribRecord plus an OPTIONAL _local sidecar |
The local mirror is OPTIONAL, hosts that don't need re-verifiability or richer consumer surfaces MAY skip it entirely. Hosts that DO persist locally MUST follow the conventions below so cross-producer mirrors (e.g. wrapper + emit writing to the same ~/.atrib/records/ directory) are interoperable for consumers.
5.9.2 The envelope shape
Each line of a local-mirror JSONL file is a JSON object of one of three shapes. Readers MUST tolerate all three.
Shape 1: Envelope with sidecar (current, preferred):
{
"record": {
/* the canonical signed AtribRecord, bytes IDENTICAL to what was submitted to the public log */
},
"_local": {/* OPTIONAL pre-sign sidecar; see §5.9.3 */},
"written_at": 1743850000000 /* OPTIONAL wall-clock timestamp in milliseconds */,
}Shape 2: Envelope without sidecar:
{
"record": {/* the canonical signed AtribRecord */},
"written_at": 1743850000000 /* OPTIONAL */,
}Shape 3: Legacy bare-record (pre-D062 mirrors):
{/* the canonical signed AtribRecord, unwrapped */}Producers SHOULD write Shape 1 or Shape 2 going forward. Producers SHOULD NOT write Shape 3 going forward, but consumers MUST read it for compatibility with mirrors that predate this section.
Field placement affects signature validity. The _local sidecar MUST live at the envelope level (sibling to record), NEVER inside record. Placing sidecar content inside record would either change the JCS canonical form (breaking signature verification) or require producers to strip the sidecar before signing (introducing failure modes that the structural placement avoids).
5.9.3 The _local sidecar shape
The sidecar is a free-form JSON object carrying pre-sign payload context that the signed record COMMITS TO via content_id / args_hash / result_hash / tool_name (per §1.2 and §8) but does not itself contain.
The following field names are normative when present (producers SHOULD use these names; consumers SHOULD recognize them):
| Field | Type | Purpose |
|---|---|---|
producer | string | Identifies the producer that wrote this entry, for cross-source disambiguation when multiple producers write to the same mirror directory. Values are producer-specific (e.g. "atrib-attest", the historical "atrib-emit" family, or any other wrapper / emitter package name). Historical values remain valid forever; consumers treat the label as an opaque pass-through string. |
toolName | string | The MCP tool name as invoked. Populated by wrapper-side producers; absent for emit-side producers (which have no tool name to record). |
args | object | The MCP tool call arguments as invoked. Populated by wrapper-side producers per the wrapped call. |
result | object | The MCP tool's result object, captured BEFORE any host-side mutation (e.g. before atrib middleware writes its propagation token to result._meta). Populated by wrapper-side producers. |
actionPhase | string | request or outcome when verifiable-action mode emits a pre-call request and post-call outcome pair. Absent on ordinary single-record tool calls. |
content | object | The pre-sign content payload as supplied to the producer, or a normalized local content payload derived from the producer's runtime evidence. Populated by atrib-emit-style producers per the content argument the agent passed; typically carries what, why_noted, intent, rationale, topics, summary, importance (depending on event_type). OpenInference producers SHOULD use this field for recall-readable span metadata rather than adding span metadata to the signed record. |
authorizationEvidence | array | Optional verifier-ready external authorization evidence captured from the host runtime, such as MCP/OAuth evidence from already-validated authInfo, AAuth evidence from already-validated callbacks, or x401 proof evidence from a verifier-controlled credential result or token check. This field is local-only and MUST NOT include raw bearer tokens, raw AAuth JWTs, or private credential payloads by default. Consumers can pass it to verifyRecord(record, { authorizationEvidence }) to populate evidence[]. |
resolvedFacts | object | Optional local facts resolved from the payload or runtime event, such as { "tool_name": "read_file" }. Consumers can pass it to verifyRecord(record, { resolvedFacts }) so capability-envelope checks can use facts that are not in the compact signed record. |
Producers MAY add additional fields beyond this list. Consumers MUST tolerate unknown fields and SHOULD pass them through unchanged when re-emitting (e.g. when atrib-trace surfaces a sidecar summary for downstream tools).
All sidecar fields are OPTIONAL. A sidecar containing only { "producer": "..." } is well-formed; a missing sidecar is also well-formed.
For OpenTelemetry / OpenInference producers, _local.content SHOULD use a stable local convention so cognitive primitives can read span-derived evidence without making observability fields part of AtribRecord. The recommended content fields are:
| Field family | Fields | Purpose |
|---|---|---|
| Span identity | source, span_kind, span_name, trace_id, span_id | Correlate a signed record with the runtime span tree and external observability systems. |
| Legibility | what, why_noted, intent, rationale, topics | Let recall, trace, and summarize display the span as human-readable context. |
| Tool payload | tool_name, args, result, input, output, input_mime_type, output_mime_type | Preserve local payload context. args_hash and result_hash on the signed record remain the verifier-grade commitment path. |
| Runtime metadata | agent_name, model_name, tool_call_id, llm_output_tool_call_id | Preserve framework and model identity plus the empirical LLM-to-tool linkage key. |
| Prompt metadata | invocation_parameters, prompt, prompt_messages, prompt_tools, prompt_tool_choice, prompt_template, prompt_template_variables, prompt_version, prompt_id, prompt_url | Make prompt and prompt-version evidence findable by cognitive consumers while keeping it local by default. |
| Operational metrics | usage_details, cost_details, score_details, metadata | Make token, cost, score, release, user, and other operational context available to local recall and summaries. |
These fields are local-only. They MUST NOT be submitted to the public log as part of the standard submission path. If a later verifier, handoff, settlement, dispute, or recall consumer needs one of these fields to become protocol-visible, the field needs a separate ADR and either a signed-record commitment (args_hash / result_hash or a new field) or a promoted event type under D036.
intent and rationale are signer- or runtime-supplied claims about why the action was taken. They do not prove that the stated reason is true, complete, or human-authorized. If a host needs human approval or external intent validation to be verifier-grade evidence, it MUST carry that approval or validation as separate evidence and bind it through args_hash, result_hash, archive body material, a separate signed record cited via informed_by, or an external evidence block. A human-attested approval can be represented today as its own signed observation or extension record under a human-controlled creator_key; native human authorization edge types are future work, not a prerequisite for the current pattern.
5.9.4 Submission-path invariant
Implementations of the standard submission path (the path that POSTs to the log per §2.6.1) MUST NOT include the envelope or sidecar in the submitted bytes. The submission queue receives only the bare AtribRecord. The structural placement of the sidecar at the envelope level (outside record) means this invariant is enforced by construction in any host that uses the standard submission path; no additional guard is required.
Hosts that build custom submission paths MUST manually ensure they extract record from the envelope before submission and never include _local.
5.9.5 Reading discipline
Consumers (recall, trace, summarize, autoChain seed loaders) MUST normalize the three on-disk shapes to a uniform "signed record + optional sidecar" pair at read time. The reference normalization shape:
function normalize(line):
parsed = JSON.parse(line)
if parsed has "record" and parsed.record has all required AtribRecord fields:
return { record: parsed.record, sidecar: parsed._local || null }
if parsed has all required AtribRecord fields:
return { record: parsed, sidecar: null }
return null // skip, malformed or unknown shapeThe exact field-presence checks are implementation-defined; the required AtribRecord fields per §1.2.1 are spec_version, creator_key, chain_root, event_type, context_id, timestamp, and signature (or signers for transaction records).
Consumers that build cognitive surfaces SHOULD treat _local.content as the canonical recall-readable payload when it exists. For compatibility with older mirror lines, consumers MAY derive equivalent content from known sibling sidecar fields: toolName, args, and result for wrapper-produced tool calls; input, output, agentName, llmOutputToolCallId, traceId, spanId, spanKind, and spanName for early OpenInference callback sidecars. This derivation is read-time normalization only; it does not change signed record bytes.
5.9.6 Compatibility commitment
This section freezes the envelope shape for atrib spec 1.0. Future spec versions MAY add new envelope-level fields (e.g. cached_at, last_verified_at) but MUST NOT remove the record field, MUST NOT change its semantics, and MUST NOT introduce a path by which envelope-level content reaches the public log.
5.9.7 Out of scope
- Sidecar size limits (the sidecar persists the full result object regardless of size in this spec version). A future ADR may introduce a size-cap convention or "result fingerprint" pattern.
- Encryption at rest (the mirror inherits whatever the host filesystem provides in this spec version). Operator-level encryption (FileVault, LUKS, etc.) covers most threat models; spec-level encryption is not in 5.9 scope.
- Cross-host mirror sync (e.g. when a single human operates multiple agents on multiple devices). Per-host mirrors are independent in this section; cross-host coordination is a deployment concern, not a spec concern.
§6 Key Directory
Per D034.
The key directory maps creator_key to a public identity claim. Without it, attribution is purely cryptographic. Verifiers see opaque public keys with no way to learn whose key it is. The directory is the missing semantic layer between "this record was signed by key K" and "K belongs to identity I."
The directory is built on top of an Auditable Key Directory (AKD) primitive. AKD provides authenticated label-indexed lookup, non-membership proofs, per-label append-only version chains, and operator-independent verifiability. Two configurations of the same primitive are deployed for two distinct privacy models:
- Unblinded mode (this section): plaintext labels. Lookups are observable to the directory operator. Suitable for atrib because
creator_keyis already public on the log. - VRF-blinded mode (separate spec, intended for downstream consumers): VRF-blinded labels. Lookups are hidden from the directory operator. Required for use cases where label-to-value lookup is itself sensitive (for example, end-to-end-encrypted messaging where
user_id → keylookup must not leak interest in a specific user).
Both modes share the AKD library and the witness model from §2.9.
6.1 Identity Claim Format
An identity claim is the directory's leaf payload:
{
"spec_version": "atrib/1.0",
"claim_type": "creator_identity",
"creator_key": "<base64url 32-byte Ed25519 public key>",
"claim": {
"subject": "<freeform identity, e.g. 'tools.openai.com', 'did:web:example.com', 'mailto:nader@atrib.dev'>",
"method": "self_attested" | "domain_verified" | "did_resolved",
"registered_at": <unix-ms>,
"expires_at": <unix-ms> | null,
"metadata": { ... }
},
"signature": "<base64url 64-byte Ed25519 signature>"
}6.1.1 Field Semantics
creator_key: the public key whose identity this claim describes. The same key value used in attribution records'creator_keyfield.claim.subject: a freeform identity string. Common forms: domain name (tools.openai.com), DID (did:web:example.com,did:key:...), email (mailto:nader@atrib.dev), or service URL (https://my-tool.example.com). The protocol does not enforce the format; verifiers apply their own policy.claim.method: how the subject was verified.self_attested: the claim is signed bycreator_key. No external proof. Verifiers MUST treat this as "the key holder asserts this identity, with no third-party validation."domain_verified: the claim subject is a domain name and the claim's metadata includes atxt_recordproof (atrib-creator=<creator_key>published as a TXT record on the subject domain). Verifiers MAY confirm the TXT record at lookup time.did_resolved: the subject is a DID; the claim's metadata includes adid_documentreference. Verifiers MAY resolve the DID and confirmcreator_keyis listed as averificationMethod.
claim.registered_at/claim.expires_at: unix milliseconds. Claims withexpires_at < noware treated as expired and not returned by lookup unless explicitly requested withinclude_expired=true.claim.metadata: extensible. Contains method-specific verification data (TXT proof, DID document URL) and optional human-readable info (display name, logo URL, contact). The metadata MUST NOT contain anything that would distinguish active claims from honeypot claims by structure alone. Verifiers should make trust decisions on the verification method, not on metadata richness.signature: Ed25519 signature over the JCS-canonical serialization of the claim withsignature: "". Signed bycreator_keyitself (self-attestation) regardless ofmethod.
6.2 Directory Operations
The directory exposes four normative operations.
6.2.1 Publish
POST /v6/publish
Content-Type: application/json
<IdentityClaim>Inserts an identity claim under label creator_key. If a claim already exists for this key, the new claim replaces it (forming a per-label version chain; old claims remain queryable via history, new claim is the active version). The directory operator validates:
- Signature verifies under
creator_key. method-specific proof (TXT record, DID document) succeeds whenmethod !== 'self_attested'. Operators MAY defer verification or batch it.- The claim is not contradicted by an unexpired
key_revocationrecord on the log.
On success, the directory returns:
{
"label": "<base64url creator_key>",
"version": <integer>,
"directory_root": "<base64url root commitment>",
"directory_tree_size": <integer>,
"publish_proof": "<base64url proof of inclusion>"
}6.2.2 Lookup
GET /v6/lookup/<base64url-creator-key>?at=<directory_tree_size>Returns the active claim for the key at the specified directory tree size (or the latest if at is omitted), with an authenticated proof. Response:
{
"found": true,
"claim": <IdentityClaim>,
"label": "<base64url creator_key>",
"version": <integer>,
"lookup_proof": "<base64url AKD lookup proof>",
"directory_root": "<base64url root commitment>",
"directory_tree_size": <integer>
}If no claim exists, the response is a non-membership proof:
{
"found": false,
"label": "<base64url creator_key>",
"absence_proof": "<base64url AKD non-membership proof>",
"directory_root": "<base64url root commitment>",
"directory_tree_size": <integer>
}A verifier MUST validate the proof against directory_root. The directory operator cannot return "no entry" without a cryptographic proof of absence.
6.2.3 History
GET /v6/history/<base64url-creator-key>Returns the full version chain for the label. Used to reconstruct rotation events and to detect inconsistencies between rotation announcements (in the log) and directory updates.
6.2.4 Anchor (Cross-Reference Into the Tessera Log)
The directory's root commitment is periodically posted to the Tessera log (§2) as a directory_anchor record, allowing a verifier consulting the log to detect a forked or split-view directory:
{
"spec_version": "atrib/1.0",
"event_type": "https://atrib.dev/v1/types/directory_anchor",
"context_id": "<directory operator's reserved context_id>",
"creator_key": "<directory operator's pubkey>",
"chain_root": "<previous log-committed directory_anchor's record_hash, or genesis>",
"content_id": "<SHA-256 of '<directory_origin>:directory_anchor'>",
"timestamp": <unix-ms>,
"metadata": {
"directory_root": "<base64url AKD root>",
"directory_epoch": <integer>,
"directory_origin": "<directory's signed-note origin>"
},
"signature": "<base64url 64-byte Ed25519 signature>"
}Anchoring cadence: per-operation (normative default). Every successful directory operation (publish, update, revoke) MUST produce a new directory checkpoint AND emit a directory_anchor record to the Tessera log immediately. This is the most robust position: the equivocation window is bounded by the log round-trip (sub-second under normal operation), not by an inter-anchor delay. Per-operation anchoring also gives every directory state change the same witness-cosignature coverage as ordinary log entries.
Linear submission and ambiguous outcomes. A non-genesis anchor MUST set
chain_root to the previous anchor record whose inclusion in the log has been
confirmed. The producer MUST preserve the exact signed body before submission.
If a submission response is missing or ambiguous, the producer MUST query the
log by record_hash and retry that same body when absent. It MUST NOT advance
the directory beyond the state described by the pending anchor or sign a
successor anchor until the pending anchor is confirmed. This rule prevents
concurrent publishes, process restarts, and lost responses from creating
multiple anchor children or silently skipping a directory state.
Batching escape hatch (operator opt-in). Operators serving high-throughput directories MAY batch multiple directory operations into a single anchor by declaring a batching policy in their directory metadata. The policy MUST specify (a) the maximum batch interval, (b) the maximum number of operations per batch, and (c) the consumer-facing implication: queries against a batched directory state MAY observe an unanchored window of up to the batching policy's max interval. Verifiers consuming a batched directory MUST surface directory_batching_window_ms: <value> so consumers can apply policy. atrib's reference directory implementation is per-operation; batching is for downstream operators with throughput requirements that exceed per-operation limits.
6.3 Verifier Consultation Algorithm
This section is normative.
A verifier resolving identity for an attribution record R with creator_key = K and timestamp = T against directory D MUST execute the following nine steps in order. Each step's failure produces a warning surfaced in the output; the verifier never throws (per §5.8 degradation contract).
Step 1: Fetch latest anchor. Query the Tessera log for the most recent directory_anchor entry where directory_origin = D.origin and timestamp <= T + tolerance (tolerance = consumer-configurable; default 0). If no anchor exists, surface directory_unanchored: true and proceed with the directory's current state, BUT mark identity_resolution_method: "no_anchor_available". If an anchor exists, capture its checkpoint root, version, and witnesses.
Step 2: Verify anchor freshness. Compute anchor_age_ms = T - anchor.timestamp. Compare against the consumer's freshness threshold (default: no threshold; consumer policy specifies). If above threshold, surface directory_anchor_stale: true.
Step 3: Verify anchor witness coverage. Confirm the anchor's underlying log checkpoint carries cosignatures from at least the consumer's configured witness threshold (per §2.9). If below threshold, surface directory_witness_insufficient: { required, actual }.
Step 4: Verify directory checkpoint signature. Confirm the directory's checkpoint signature against the directory's published key. If invalid, surface directory_checkpoint_invalid: true AND reject the entire query (do NOT proceed). A directory operator returning an invalidly-signed checkpoint is a fault, not a soft signal.
Step 5: Verify append-only consistency. The verifier carries the exact
record_hash of the directory anchor accepted during its previous
consultation. It MUST NOT infer that state from the second-newest or any other
nearby log entry.
If the carried hash equals the selected current anchor hash, the consultation
has no state transition and append_only_consistent is true. Otherwise, the
verifier MUST follow signed chain_root links from the current anchor back to
the carried hash. For every anchor on that path, it MUST:
- reconstruct the canonical record hash from the body;
- verify the directory-operator signature and the committed entry fields;
- verify inclusion in a checkpoint signed by the caller-pinned log key; and
- require the parent to have a lower log index, rejecting cycles, missing parents, and a path that reaches genesis before the carried hash.
Directory epochs MUST NOT decrease along the verified path. Two successive anchors MAY name the same epoch only when they commit to the same directory root, which allows an operator to re-anchor unchanged state after a deployment or recovery. When the current epoch is newer, the verifier MUST request the AKD consistency proof for the exact carried-to-current epoch range, verify that the response names that range, and verify the proof against the two signed endpoint roots.
On a first consultation, the verifier has no prior accepted anchor and leaves
append_only_consistent unknown. After the query passes the applicable hard
checks, the caller persists the selected anchor hash for the next consultation.
If a supplied prior hash is missing from the current log view, is not an
ancestor, or any body, signature, inclusion proof, ordering check, root, epoch,
or AKD proof is inconsistent, surface directory_append_only_violation: true
AND reject all queries against this directory until the operator resolves the
inconsistency.
Step 6: AKD lookup. Query the directory for K at the anchor's checkpoint version. The directory returns either (claim, version, lookup_proof) for membership or (null, lookup_proof) for non-membership. Both forms include a verifiable proof.
Step 7: Verify AKD proof. Validate the lookup_proof against the anchored checkpoint root. If invalid, surface directory_proof_invalid: true AND reject the result. Membership and non-membership are distinguished outputs, both REQUIRE valid proofs.
Step 8: Resolve identity claim. Parse the claim object per §6.1. If malformed, surface claim_malformed: true. The claim is a SIGNED CLAIM by the operator, not a fact; verifier surfaces it without judging truthfulness (per §3.1 and §8.7.1).
Step 9: Check revocation. Resolve valid key_revocation records targeting K from the log (the directory MAY index them, but is not the source of truth, per §1.9.3). Compare log positions, never signer-controlled timestamps:
- If
R.log_index < revocation.log_index: surfacekey_revocation_status: { reason, revoked_at_log_index, since_revocation: false, order_verifiable: true, registry_verified }. The record predates revocation and retains its original verification state. - If
R.log_index >= revocation.log_index: surfacekey_revocation_status: { reason, revoked_at_log_index, since_revocation: true, order_verifiable: true, registry_verified }and mark the record'revoked_after_revocation'. - If either log index is unavailable, surface
key_revocation_status: { reason, revoked_at_log_index, since_revocation: null, order_verifiable: false, registry_verified }. Do not infer order from either record timestamp.
registry_verified is true only when the caller verified the source record
signature and §1.9.2 revoker authorization.
Parsing well-shaped revocation claims into a map does not establish that
property.
If K's claim carries capabilities per §6.7, surface the active envelope at R.timestamp for the consumer's §6.7.2 capability check.
Output schema. The verifier returns an identity_resolution object per record:
{
"identity_resolved": ClaimObject | null, // null for verified non-membership; null + warnings for failures
"identity_resolution_method": "directory_lookup" | "no_anchor_available" | "no_claim_registered" | "rejected",
"anchor": {
"anchor_record_hash": "sha256:...",
"checkpoint_version": 12345,
"anchor_timestamp": 1743850000000,
"anchor_age_ms": 50000,
"anchor_witness_count": 3,
"anchor_freshness_ok": true
} | null,
"lookup_proof_valid": true,
"append_only_consistent": true,
"key_revocation_status": null | { "reason": "...", "revoked_at_log_index": ..., "since_revocation": bool | null, "order_verifiable": bool, "registry_verified": bool },
"capability_envelope": CapabilityEnvelope | null,
"directory_batching_window_ms": 0 | <ms>,
"warnings": [string, ...]
}Failure semantics. Steps 4, 5, and 7 are HARD failures when supplied evidence is malformed, inconsistent, or cryptographically invalid. An omitted optional verifier capability or unavailable external response leaves the corresponding output unknown and adds a warning under the §5.8 degradation contract. All other failures are SOFT signals (verifier surfaces and proceeds). Consumer policy decides what to do with soft signals; the protocol does not block records on identity-layer signals because identity is one input to the §8.7.2 trust assessment, not a gate.
6.4 Witness Model
The directory's checkpoints are witnessed using the same C2SP cosignature pattern from §2.9. A directory operator publishes its checkpoints under origin directory.<service>.<tld>/v6 (distinct from the Tessera log's origin). Witnesses cosign directory checkpoints exactly as they cosign log checkpoints. Verifiers configure trusted witness vkeys for the directory the same way they do for the log.
The directory and the log SHOULD share witnesses where possible, since witness independence is the security property verifiers rely on. A witness witnessing both gives verifiers correlated evidence at lower cost.
Per §6.2.4 per-operation anchoring, every directory checkpoint produces a directory_anchor log entry; the witness coverage on each anchor's underlying log checkpoint applies transitively to the directory state at that version. Verifiers in §6.3 step 3 use this transitively-applied witness coverage as the directory-side trust signal.
6.5 Conformance
Implementations MUST pass all vectors in spec/conformance/6/:
valid-self-attested-claim: insert and look up a self-attested claim; lookup proof verifies.valid-domain-verified-claim: insert with TXT record proof; verifier can re-confirm against DNS at lookup time.valid-history: insert two versions for one label; history returns both in chronological order.valid-non-membership: lookup of an unregistered key returns a non-membership proof that verifies.valid-anchor-coherence: adirectory_anchorrecord on the Tessera log matches the directory's actual root at that tree size.valid-per-operation-anchoring: insert N consecutive operations; verifier observes N anchor records in the log, one per operation, in order.valid-append-only-consistency: anchored checkpoints (V, V+1, V+2) verifier confirms each successive checkpoint extends the previous via AKD consistency proof.valid-consulted-anchor-chain: verifier follows signed, log-includedchain_rootlinks from the selected anchor to the exact prior accepted anchor, ignoring unrelated adjacent entries.valid-same-epoch-reanchor: two successive signed anchors name the same epoch and root; verifier accepts the unchanged-state transition without requesting an AKD proof.invalid-anchor-mismatch: anchor's root differs from directory's actual root → verifier rejects (hard failure per §6.3 step 4).invalid-append-only-violation: directory rolls back state between two anchored checkpoints → verifier rejects all queries until resolved (hard failure per §6.3 step 5).invalid-consulted-anchor-substitution: the adjacent log entry is not the verifier's carried prior anchor; verifier rejects any attempted substitution.invalid-anchor-chain-evidence: a predecessor body, operator signature, log inclusion proof, descending log order, or audit-proof epoch range is invalid; verifier rejects.invalid-lookup-proof: tampered lookup proof → verifier rejects (hard failure per §6.3 step 7).valid-anchor-stale-soft-signal: anchor is older than consumer freshness threshold → verifier surfacesdirectory_anchor_stale: truebut does not reject (soft signal).valid-witness-insufficient-soft-signal: anchor's underlying log checkpoint has fewer cosignatures than consumer threshold → verifier surfacesdirectory_witness_insufficientbut does not reject (soft signal).valid-non-membership-honored: lookup of unregistered key returnsidentity_resolved: nullwith a verified non-membership proof; this is a positive verifier output, distinct from a query failure.revocation-applies-pre-revocation-soft: record accepted before the revocation log index → verifier surfacessince_revocation: falseand preserves its verification state.revocation-applies-post-revocation-flagged: record at or after the revocation log index → verifier surfacessince_revocation: trueand marks'revoked_after_revocation'.revocation-order-unverifiable: record or revocation log index absent → verifier does not infer order from timestamps.valid-batched-directory-window: directory operator declares batching policy; verifier surfacesdirectory_batching_window_ms: <value>so consumer can apply policy.
6.6 What This DOES NOT Cover
Identity verification beyond signature. The protocol records claims but does not enforce that subjects are who they say they are. Trust comes from the underlying mechanism (DNS for domain_verified, the DID method for did_resolved), not from atrib.
Privacy of unblinded mode. atrib's directory is public by design. Anyone can enumerate registered creator_keys and their claims. This matches the public log model. The VRF-blinded variant of AKD is available for downstream consumers (separate spec) where label-to-value lookup must be hidden from the directory operator.
Directory-key rotation. The directory operator's signing key has the same rotation problem as the log key. Same V2 deferral.
Cross-directory federation. Multiple directories operated by different parties cannot today produce consistent answers about the same creator_key. Federation is a V2 concern.
Anchor freshness and witness threshold are consumer policy, not protocol. §6.3 describes how a verifier consumes consumer-configured thresholds; it does not prescribe specific values. A consumer expecting near-real-time identity guarantees configures a low freshness threshold (e.g., 60 seconds) and high witness threshold (e.g., ≥3 cosignatures). A consumer doing batch settlement reconciliation configures a high freshness threshold (e.g., 24 hours) and accepts lower witness counts. The protocol surfaces the signals; the policy lives in the consumer.
Anchor-window equivocation in batched directories. If a directory operator opts into batching per §6.2.4, queries within the batch interval observe directory state that has not yet been anchored. Verifiers surface directory_batching_window_ms; consumers wanting per-operation guarantees configure their trusted-directory list to include only per-operation operators.
6.7 Capability Declarations
This section is normative; the declaration itself is OPTIONAL.
§6.1 (identity claim format) resolves a creator_key to an identity ("this key belongs to Acme Corp's official agent"). Identity attestation answers WHO; it does not answer WHAT THE KEY IS ALLOWED TO DO. Without a capability framework, a compromised but legitimately-attested key can sign records of any kind, a customer-service agent's key suddenly signing million-dollar transactions verifies cryptographically the same as a normal action.
Capability declarations turn the static identity claim into a dynamic policy claim: the directory publishes the key's declared capability envelope. Verifiers check records against the envelope; out-of-envelope records are flagged.
6.7.1 Identity claim extension
The §6.1 identity claim format gains an OPTIONAL capabilities field:
{
"creator_key": "...",
"claim_type": "domain_verified",
"claim_method": "...",
"claim_subject": {/* identity content per [§6.1](#61-identity-claim-format) */},
"capabilities": {
"tool_names": ["search", "browse", "read_email"], // optional allowlist; absent = no constraint
"max_amount": {
// optional cap on transaction amounts
"currency": "USD",
"value": 1000,
},
"counterparties": ["acme.com", "verified.example"], // optional allowlist of transaction counterparties
"event_types": [
// optional allowlist of event_type URIs
"https://atrib.dev/v1/types/tool_call",
"https://atrib.dev/v1/types/observation",
],
"cost_policy": {
// optional compute-spend scope for delegated runs (D165)
"model_tiers": ["economy", "standard"], // optional allowlist of host-defined tier labels
"max_tokens": 500000, // optional total token budget for the certified run
},
"expires_at": 1761000000000, // optional; envelope rotates with the identity claim
},
}All capability sub-fields are individually optional. A claim with capabilities: {} declares no scope (equivalent to omitting the field). A claim with some sub-fields and not others applies only the present constraints. cost_policy scopes what a key may spend rather than what it may do: model_tiers is an allowlist of host-defined tier labels (free-form strings, the tool_names idiom) and max_tokens caps total token spend. Its primary carrier is the §1.11 certificate scope, where a principal grants a delegated run a compute budget; the protocol records the grant and never enforces it.
6.7.2 Verifier semantics
A verifier that has resolved a record's creator_key to an identity claim with a capabilities field MUST:
- Determine the active envelope at the record's
timestamp. The active envelope is the most recent identity claim published in §6.2 history at or before the record's timestamp. If no envelope was active at that time, the record is treated as having no envelope constraint. - Check the record's content against the envelope:
- If
tool_namesis present, the record'stool_nameMUST be in the list (for tool_call records). The verifier MAY use atool_namefield disclosed on the record or caller-supplied facts resolved from the local record body or upstream protocol event. If no tool name is available, the verifier MUST flag the check asunresolvable: true. - If
event_typesis present, the record'sevent_typeURI MUST be in the list. - For transaction records, if
max_amountand/orcounterpartiesare present, the verifier MUST resolve the transaction amount and counterparty from the protocol-specific transaction event the record commits to (per §1.7's payment-protocol definitions: ACP order envelope, UCP envelope, x402 PAYMENT-RESPONSE header, MPP Payment-Receipt, AP2 CheckoutReceipt or PaymentReceipt, a2a-x402 receipts). The resolved amount MUST NOT exceedmax_amount; the resolved counterparty MUST be in thecounterpartiesallowlist. When the protocol-specific event is not available out-of-band or through caller-supplied resolved facts, the verifier MUST flag the check asunresolvable: truerather than passing or failing silently. - If
cost_policyis present, the constraint is evaluable only against caller-supplied usage facts (model tier label, tokens spent): signed records carry neither, since spend accounting lives in local sidecar and join-record content per the D142 orchestration conventions. With usage facts, the claimed tier MUST be inmodel_tiersand claimed spend MUST NOT exceedmax_tokens; mismatches are namedcost_policy.model_tiers/cost_policy.max_tokens. Without usage facts the check produces no mismatch (nothing checkable is claimed). - If
expires_atis present and the record's timestamp is after it, the envelope is expired (treated as having no constraint and flagged separately).
- If
- Surface the result as
capability_check: { envelope: CapabilityEnvelope | null, in_envelope: bool, mismatches: string[], unresolvable: bool }on the verification output.
6.7.3 Out-of-envelope is a signal, not invalidation
Records that fall outside the declared envelope remain cryptographically valid. The signature verifies, log inclusion verifies, the chain is structurally sound. The envelope check produces a SIGNAL (in_envelope: false plus a list of mismatches) that consumers use in trust assessment.
Defaulting to invalidation would break common cases:
- Envelope updates lag behind operational changes (operator adds a new tool but hasn't updated the envelope yet)
- Tool renames during migrations
- Operator error in publishing the envelope
Strict consumer policies MAY treat in_envelope: false as rejection. The default flagged-not-rejected behavior preserves operational flexibility while making the discrepancy auditable.
6.7.4 Envelope rotation
When a key's capabilities change, the operator publishes a new identity claim with the updated envelope. The §6.2 directory history preserves prior envelopes; verifiers checking historical records use the envelope active at the record's timestamp.
Operational separation of publication and signing. The envelope check's security depends on the publication channel for identity claims being on a different operational footing than agent operation. If an attacker compromises the agent's signing key AND can publish identity claims for that key, they can backdate or expand the envelope to retroactively legitimize forged actions. Operators MUST keep these channels separated; co-location collapses the envelope check to "agent-key-equivalent" trust and provides no additional security beyond what §6 identity attestation alone provides. Operators that combine the channels MUST document the reduced trust posture in their consumer-facing documentation; verifiers MAY refuse capability-check enforcement for keys whose identity-claim publication channel is not separately attested.
Time-of-check vs time-of-use. The envelope active at the record's timestamp (per §6.7.2 step 1) is the verifier's reference. An attacker who compromises both the signing key and the publication channel can backdate envelope publications. §1.9 key revocation provides the recovery path: when compromise is discovered, the operator publishes a key_revocation record with reason: compromise, and verifiers tag records at later log indexes under that key as revoked_after_revocation. Earlier accepted records retain their original verification state. Cross-witnessing (§2.9) of the directory's checkpoints raises the bar against silent envelope-publication tampering: a backdated publication that was not previously witnessed is detectable.
6.7.5 No protocol-level enforcement at signing time
atrib does not block out-of-envelope submissions or refuse to commit them. Enforcement is consumer policy at the verification layer. Consumers wanting signing-time enforcement build it into their middleware (e.g., the @atrib/agent adapter could refuse to sign records that violate a locally-cached envelope).
See D051 for the design rationale and the alternatives considered.
§7 Harness Integration Patterns
This section is informative.
atrib is a substrate. Agent harnesses (also called runtimes: Claude Code, Cursor, in-house agent products, custom MCP hosts) are the surfaces an end-user actually interacts with. The substrate's value is mostly invisible without a harness that surfaces signed history back to the agent.
This section documents three patterns for consuming the substrate from a harness. None is prescribed. Harnesses with different ergonomic constraints (interactive vs batch, single-agent vs multi-agent, cloud-hosted vs local) will pick different patterns. The patterns are documented so harness builders have a starting point, not so atrib has a canonical harness shape.
7.1 The Session-Start surfacing pattern
A harness exposes the agent's recent atrib history at the start of every session as additional context. The agent reads "you have N signed prior actions across M traces, root sha256:..., verify at log..." and, when prior actions are relevant to the current task, reaches for them via a tool call.
Why this pattern. Cheap (constant ~200 tokens per session), accurate (cryptographic root in-context means the agent treats history as provable rather than vibes-based), and harness-agnostic (any host that can inject session-start context can adopt it).
Where it falls short. Stateless across turns within a session: the agent only sees the summary at start, not after each tool call. For agents whose work shape changes mid-session, a per-turn surfacing is needed (pattern 7.3).
7.2 The recall-tool pattern
A harness exposes a tool (typically MCP) like recall (or its legacy recall_my_attribution_history alias) that the agent calls on-demand. The tool reads a local mirror of signed records, verifies signatures, and returns paginated records. Filters by trace, event type, and time window are useful.
Why this pattern. Lazy: the agent pays the token cost only when it actively wants to consult its past. Composes cleanly with the session-start pattern (the start surface tells the agent the tool exists; the tool serves the content).
Current-state projection. A recall implementation MAY project revision
lineages into a bounded current-state view. The projection is a consumer read
model over existing signed records, not a new record type or graph edge. It
SHOULD verify each candidate signature, apply an explicit signer and context
policy, return every active revision head, and mark a lineage with more than
one head as unresolved. It MUST NOT choose a winning branch from timestamp,
mirror order, or signer identity unless the caller supplied a policy that
authorizes that choice. Local signature verification alone does not prove
public-log inclusion, so the response SHOULD state its acceptance basis. The
response SHOULD bound lineage cells, heads per lineage, and exclusion details,
and SHOULD report complete counts plus truncation for each bounded collection.
reference recall implementation exposes this as shape: "state" per
D174.
Where it falls short. The agent has to know to call it. Some agents won't unless explicitly nudged.
7.3 The persisted-mirror pattern
A harness writes every signed record to a local jsonl mirror as the wrapper produces it (via onRecord from §5.3). The mirror is durable across sessions and harness restarts. Other consumers (the recall tool from 7.2, an offline replay verifier, a compliance audit pipeline) read from the mirror.
Why this pattern. Closes the gap between "the log stores commitments only" and "the original signed bytes are recoverable for re-verification." Without this, a verifier replaying signatures has no source for the canonical record bytes other than transient memory inside the wrapper.
Where it falls short. The mirror is operator-local. Multiple agents running on different machines with the same creator key produce divergent mirrors that don't reconcile automatically. Cross-host reconciliation is a V2 concern.
7.4 Composing the patterns
A complete harness integration usually combines all three: the wrapper persists records to a mirror as it signs them (7.3); a session-start hook reads the mirror to surface a shape-only summary (7.1); a tool wired into the agent surface returns content from the mirror on demand (7.2). The recall tool can also verify signatures locally before returning, so the agent's read of its own past is independently re-verifiable, not "trust the mirror."
The reference implementation atrib ships under this pattern is @atrib/recall (a single-tool MCP server consuming the mirror). It is one shape among many; harness builders are encouraged to adapt rather than copy.
7.5 Harness-side reasoning chains
Agents reason between actions. atrib does not standardize what reasoning is: reasoning shapes vary too much across harnesses (ReAct, chain-of-thought, scratchpad, multi-agent debate, plan-and-execute) for any single shape to be observably canonical. Harnesses that want to capture deliberation as part of the verifiable record do so via extension URIs in their own namespace, linked to surrounding actions via the informed_by field defined in §1.2.5.
The pattern.
The harness mints an extension URI in a namespace it controls (e.g., https://example.com/v1/types/reasoning_step). Between tool_call records, the harness emits records carrying that URI with the agent's reasoning content (or a hash/commitment of it, depending on privacy posture). When the agent emits a subsequent tool_call, the harness includes the reasoning record's hash in the tool_call's informed_by field.
A verifier reading the chain sees the reasoning records inline (D043: extension URIs participate in CHAIN_PRECEDES), the explicit linkage from tool_calls to reasoning records (D041: INFORMED_BY edges), and the temporal ordering. The verifier can independently audit the agent's claimed reasoning chain.
Worked example.
R1 (tool_call): {tool_name: "read_email", args_hash: "...", ...}
R2 (extension): {event_type: "https://example.com/v1/types/reasoning_step",
content_hash: H_reasoning_2, ...}
R3 (extension): {event_type: "https://example.com/v1/types/reasoning_step",
content_hash: H_reasoning_3,
informed_by: ["sha256:" + hex(record_hash(R1)),
"sha256:" + hex(record_hash(R2))], ...}
R4 (tool_call): {tool_name: "send_reply",
informed_by: ["sha256:" + hex(record_hash(R1)),
"sha256:" + hex(record_hash(R3))], ...}The verifier can prove: "agent read an email (R1), reasoned in two steps (R2, R3), then replied based on the email content and the second reasoning step." The chain is structurally complete; the agent's own claims are explicit.
Trust boundary statement.
Reasoning records live OUTSIDE atrib's normative trust boundary. They prove the harness emitted these bytes signed under the creator_key. They do NOT prove the LLM actually reasoned this way. An adversary controlling the harness could emit any reasoning record they wanted to commit to. The cryptographic anchor is on the harness's claim, not the LLM's deliberation.
This trust posture is the right one for the substrate: atrib is the protocol that proves what was signed, not what was thought. Consumers wanting verifiable LLM reasoning need a different layer (model-side attestation, hardware-rooted execution, etc.) outside this spec's scope.
7.6 Outcome verification patterns
A tool_call record commits to args_hash (the agent's claim about what was sent) and result_hash (the agent's claim about what came back). The chain proves the agent emitted these claims; it does NOT prove the tool actually returned what result_hash says. Two patterns close this gap when needed; both are opt-in and informative.
Pattern A: tool-side response signing.
Tools that want their responses to be verifiable sign the response. Specifically: the tool returns its content along with a signature over a canonical serialization, using a key the verifier can resolve (via DNS, the §6 directory, or a tool-specific PKI). The agent sets result_hash to the SHA-256 of the tool's signed response (or to the signature itself, depending on commitment scheme).
A verifier with access to the tool's pubkey fetches the signed response (when available out-of-band) and confirms the agent's result_hash commitment matches what the tool actually signed. The trust now flows from the tool, not the agent.
This pattern requires tool cooperation. It does not change atrib's spec; the result_hash field already accommodates any 32-byte commitment. Tools that adopt this pattern publish their pubkey discovery method out-of-band.
Pattern B: external witness records.
For high-stakes outcomes (transactions especially), a downstream observation record carries an external proof: a chain transaction ID, an exchange settlement ID, an HTTPS Signed Exchange, etc. The verifier follows the external proof out-of-band and cross-checks against the agent's claimed outcome.
Example: an x402 payment tool_call is followed by an observation record committing to the on-chain transaction hash. The verifier can independently query the chain for the transaction and confirm it matches.
This pattern uses existing primitives (observation records per D042 + chain ordering) and requires no spec changes.
What both patterns share.
The verifier's trust shifts from "agent says the tool returned X" to "the tool itself attests it returned X" (Pattern A) or "the world independently confirms the outcome occurred" (Pattern B). Neither is normative; both are documented patterns consumers adopt as their threat model requires.
7.7 Signed diagnostic outcome + trace replay
Repair and refinement tasks often need more than a record of what the agent did. They need a signed account of what happened when that prior action was evaluated, linked back to the action it evaluated, so a later agent can replay the signed evidence path without reading the whole session.
The pattern.
- The harness signs the implementation or action record as usual.
- The harness runs a diagnostic, evaluator, verifier, test suite, or external check against that action.
- The harness signs the diagnostic outcome as a
tool_callrecord. The diagnostic record'sinformed_byfield references the implementation/action record hash it evaluated. Itstool_nameidentifies the evaluator,args_hashcommits to the diagnostic input, andresult_hashcommits to the diagnostic outcome. - The local mirror body for the diagnostic record SHOULD include enough structured detail for a consumer to act without guessing: suite id, pass/fail counts, per-case names, inputs, expected values, actual values, and error or diagnostic text when present.
- A later repair/refinement step walks backward from the diagnostic record hash (the
recallverb with a backward walk shape, or the legacytracealias) with a bounded depth andinclude_content=true. The trace returns the diagnostic outcome plus the implementation/action ancestor through the existinginformed_byedge.
Consumer interpretation.
In repair and refinement contexts, a diagnostic outcome record is evidence about the action it evaluates. When the diagnostic record's expected/actual outcome conflicts with the implementation/action ancestor, the consumer SHOULD treat the diagnostic outcome as the repair target and the ancestor as the prior behavior being evaluated. This is not a new graph rule and does not change attribution weights; it is a consumer-side evidence rule for interpreting a signed trace.
This rule is generic. It applies to tests, validators, linters, external verifiers, transaction-status checks, and other outcome-producing evaluators. Harnesses SHOULD express the task class ("repair", "refinement", "regression follow-up", "audit replay") plainly to the agent so the agent knows how to use the evidence. That is different from bespoke prompt nudging: the substrate shape and the precedence rule stay stable across tasks.
Why no new event type.
A diagnostic outcome is still an observed tool action for v1 purposes: an evaluator was run with inputs and produced a result. The existing tool_call event type plus tool_name, args_hash, result_hash, local mirror content, and informed_by linkage are sufficient. A dedicated diagnostic event type would need evidence that downstream consumers require distinct graph derivation or settlement behavior, which this pattern does not require.
What this does not claim.
This pattern does not prove the diagnostic is true unless the diagnostic tool or an external witness also attests the result per §7.6. It proves the harness signed an outcome record and linked it to the evaluated action. Consumers decide how much to trust the evaluator.
7.8 Cross-harness continuation packets
Long-running work often starts in one harness and continues in another. A support ticket may trigger a hosted agent, the hosted agent may post a result into a Slack thread, and an engineer may then continue the investigation in Claude Code or Codex. The public log proves that signed records exist, but it does not carry enough private context for the next harness to act. A continuation handoff therefore needs a packet outside the log.
The pattern.
A continuation packet carries the minimum material a receiving harness needs to resume a task without guessing:
- Upstream anchors:
context_id, latestrecord_hash, latest chain tail, parent dispatch record hash when the packet continues a subagent spawn, and anyprovenance_tokenthe receiving session should use if it starts a fresh trace. - Body access: local mirror bundle, archive references, or both for the record bodies the receiving agent may need. Tier 1 log commitments are not enough when the agent must inspect signed content.
- Redacted evidence: ticket, tenant context, request/response body, log-query, code-read, diagnostic, support-thread, and external-system references with hashes, scopes, and redaction policy. Operational evidence stays in the evidence systems; atrib proves how the agent used it.
- Skill and domain context: skill pack names, versions, hashes, and domain reference documents that shaped the investigation. If the hosted run used a billing-investigation skill but the local continuation does not load it, that is a real continuity break.
- Runtime diagnostics: tool availability, MCP auth status, skill-loading status, hosted memory and filesystem status, codebase checkout identity, and any failed hosted-agent capabilities. Diagnostic failures SHOULD be signed using the pattern in §7.7.
- Privacy posture: which bodies are public, archived, local-only, salted, redacted, or withheld. The packet MUST NOT weaken the per-record posture chosen under §8.
The packet MAY be carried privately by the support system, by a handoff message, or by a harness-specific extension record such as https://example.com/v1/types/continuation_packet. If it is emitted as a record, it participates in the normal chain and SHOULD use informed_by to point at the latest upstream record and any diagnostic records that shaped the handoff.
Why no continuation primitive.
Continuation is a packaging concern over existing primitives, not a new cognitive act. The receiving agent can use the recall verb to accept or reject the packet's signed evidence (the verification parameter, legacy atrib-verify), read local records (shape-dispatched lookups, legacy recall_*), and walk the upstream chain (walk shapes, legacy trace); a harness-side digest can condense the context, and atrib-emit / atrib-revise / atrib-annotate to continue the work. A dedicated continuation primitive would duplicate those verbs.
Trust boundary statement.
A continuation packet proves only what is signed and linked. It does not prove that a ticket, log result, or skill file is true unless those artifacts are independently attested per §7.6. It also does not make private evidence public. The packet is a way to move verifiable context across harness boundaries while preserving the separation between the public log, producer-local mirrors, optional archives, and external evidence stores.
7.9 What the patterns DO NOT do
They do not validate log inclusion. Local signature verification proves "this record was signed by that creator_key." It does not prove "this record was committed to log.atrib.dev." A harness that needs the inclusion guarantee fetches an inclusion proof from the log per §2.
They do not enforce identity claims. A harness can resolve creator_key to an identity claim via the directory (§6) but does not enforce trust in any particular claim. Trust policy is consumer-side.
They do not prescribe agent behavior. atrib makes the past provable. What the agent does with that past, whether it reasons more carefully, defers to its prior commitments, or recommends past actions to itself, is agent-level concern, not substrate-level concern.
§8 Privacy Postures
This section is normative.
atrib's substrate is public by design. Disclosure within that substrate is configurable: harnesses choose how much each record reveals about the underlying action, on a per-field basis. The choice is encoded in each record's structural shape, so verifiers detect the posture from record bytes without out-of-band metadata.
This section defines four normative postures. Each may be combined with the others freely; combinations compose without interaction.
8.1 Default posture
The default behavior preserved from v1: plain SHA-256 hashes for args_hash and result_hash, millisecond timestamps, verbatim tool_name strings. Maximum auditability. Records that do not opt into other postures are assumed to use the default.
8.2 Opaque-name posture
tool_name (the optional MAY field on the record per §1.2.1) MAY be one of:
- Verbatim (default): a human-readable string identifying the tool (e.g.,
book_flight,transfer_usdc). Maximum disclosure of intent. - Opaque label: a string matching
[a-z0-9_-]{1,64}with no required mapping to a real tool name (e.g.,tool_a7f3,op_42). Hides what the tool does without breaking record format. - Hashed: a string matching
sha256:<64 lowercase hex>representing the SHA-256 of the verbatim name. Verifiers configured with a name-mapping can resolve; others see only the hash.
Verifiers indicate the detected form: tool_name_form: "hashed" | "plain" | null per D061.
"hashed"when the value matches^sha256:[0-9a-f]{64}$(unambiguous)."plain"for any other present value (a verbatim name likebook_flightand an opaque label liketool_a7f3both match the opaque-label regex[a-z0-9_-]{1,64}and are NOT structurally distinguishable; verifiers MUST NOT assert one over the other from the record value alone).nullwhen the field is absent from the record (the §8.1 default posture).
The verbatim-vs-opaque distinction is a producer-side intent: the signer chooses whether their tool_name carries semantic meaning. Consumers wanting to enforce the distinction MUST do so via out-of-band metadata (e.g., a name registry), not by parsing the record value.
8.3 Salted-commitment posture
args_hash and result_hash (the optional MAY fields on the record per §1.2.1) MAY use salted commitments. Two schemes are defined; they have meaningfully different privacy properties and consumers MUST pick the one that matches their threat model. When args_hash / result_hash is absent from the record entirely, the §8.1 default posture applies and verifiers cannot independently confirm the commitment (they can verify the record's signature and structure, but the content claim is unverifiable without the hash field).
salted-sha256: H = SHA-256(salt ‖ canonical_bytes) where salt is a per-record random value of at least 16 bytes. The salt is revealed in a sibling field (args_salt, result_salt) so any verifier with the canonical bytes can re-compute and confirm the commitment.
What this scheme defeats: pre-computed rainbow-table attacks (an attacker cannot pre-build a table for all possible inputs because the salt is per-record).
What this scheme does NOT defeat: pre-image enumeration once the record is observed. The salt is in the record; an attacker who suspects the args fall into a small space (e.g., flight_id ∈ [1..99999]) computes H(salt ‖ guess) for each candidate and matches against the commitment. The protection is against pre-computation, not against targeted enumeration after the record is published.
hmac-sha256: H = HMAC(key, canonical_bytes) where key is private to the issuer and is NOT included in the record. The verifier cannot re-compute without the key; the issuer reveals selectively (e.g., to specific auditors via an authenticated out-of-band channel).
What this scheme defeats: both pre-computed and targeted enumeration. An attacker without the key cannot test candidate inputs; the HMAC is a pseudo-random function from the attacker's perspective.
What this scheme does NOT defeat: verifiability without key sharing. Verifiers who do not have the key can only confirm the record's structure and signature, not the content commitment. Trust in the content claim is gated on the issuer's selective disclosure to specific verifiers.
Picking the scheme. Use salted-sha256 when verifiability without key sharing matters and the input space is high-entropy enough that targeted enumeration is infeasible (e.g., text content, large structured payloads). Use hmac-sha256 when the input space is low-entropy and content privacy from non-key-holders matters more than universal verifiability (e.g., enumerable identifiers, small structured args).
Verifiers detect the scheme from record shape: presence of args_salt indicates salted-sha256; absence of both salt and verifiable plain hash indicates hmac-sha256. Verifiers indicate args_commitment_form: "plain-sha256" | "salted-sha256" | "hmac-sha256".
8.4 Coarsened-timing posture
The timestamp field MAY be rounded to one of five granularities:
| Granularity | Multiple of (ms) | Example |
|---|---|---|
| millisecond (default) | 1 | 1743850123456 |
| second | 1000 | 1743850123000 |
| minute | 60000 | 1743850080000 |
| hour | 3600000 | 1743847200000 |
| day | 86400000 | 1743811200000 |
Granularity MUST be declared explicitly via the timestamp_granularity field, NOT inferred from trailing-zero patterns. A millisecond-precise timestamp that happens to land on a second boundary (e.g., 1743850000000) is structurally indistinguishable from a second-rounded one; an explicit field removes the ambiguity. The field is OPTIONAL and defaults to "ms" when absent (preserving backwards compatibility with default-posture records).
"timestamp": 1743850080000,
"timestamp_granularity": "min"Allowed values: "ms" | "s" | "min" | "h" | "d". Verifiers MUST reject records where the declared granularity does not match the value's trailing-zero pattern (e.g., timestamp_granularity: "min" requires timestamp % 60000 == 0).
Coarsening trades auditability for reduced operational fingerprinting. Day-granularity timestamps prevent reconstruction of working hours, reaction times, and batch patterns; millisecond timestamps preserve full forensic precision.
The timestamp_granularity field slots immediately after timestamp lexicographically (timestamp is a prefix of timestamp_granularity, so the shorter string sorts first per JCS / RFC 8785 ordering). Presence/absence affects the JCS canonical form and therefore the signature.
8.5 Combined postures
The postures compose without interaction:
| tool_name | args_hash | timestamp | Disclosure |
|---|---|---|---|
| verbatim | plain-sha256 | ms | Default; maximum auditability. Full forensic trail. |
| opaque | salted-sha256 | min | Action kind hidden, args content protected from pre-image enum, working-hour pattern blurred. |
| hashed | hmac-sha256 | day | Action visible only to verifiers with name-mapping, args fully protected from non-key-holders, only date-level timing observable. |
A consumer chooses the combination that matches their threat model. atrib does not prescribe any particular combination; the postures are independent dials.
8.6 Threat model
This subsection is informative. The standalone-posture descriptions (§8.1-§8.5) are normative; the combined-posture outcomes below are reasoned consequences of composing the standalone postures. They are listed as illustrative threat-modeling guidance, not as additional normative claims that implementations must independently validate.
This subsection enumerates what an adversary observing the public log learns under each posture combination.
Default posture (verbatim + plain-sha256 + ms):
- The adversary learns: the agent's identity (creator_key), the kind of every action (
tool_name), structural relationships (chain, session, cross-session, informed_by, provenance), exact timing of every action, and (via pre-image attacks on low-entropy args) the actual args of any low-entropy tool call. - The adversary does NOT learn: high-entropy args content, response content, reasoning content (unless committed via extension URIs).
Opaque + salted + minute posture:
- The adversary learns: the agent's identity, structural relationships, minute-resolution timing, and that some action of opaque kind happened.
- The adversary does NOT learn: what kind of action (opaque label hides), args content (salt prevents pre-image attacks), response content, exact second of action, reasoning content.
Hashed + hmac + day posture:
- The adversary learns: the agent's identity, structural relationships, day-resolution timing, and that some action commitment happened.
- The adversary does NOT learn: anything about action kind (hash unresolvable without mapping), args (HMAC unverifiable without key), response (same), exact intra-day timing, reasoning.
In all postures the agent's identity (creator_key) and the structural graph remain observable. Identity privacy requires a different mechanism (D033 key rotation, deferred D038 per-conversation key derivation). Structural privacy requires a different layer (anonymous credentials, mix nets) outside this spec.
8.7 Adversarial threat model
This section is normative.
§8.1 through §8.6 specify privacy postures: how a record's structural shape configures disclosure to a passive observer of the public log. This subsection covers a different threat model: an active adversary who can produce or influence atrib records. Examples include an attacker who compromises a creator_key and signs malicious records, an agent operator who knowingly signs false claims about tool calls or transactions, a tool operator who returns falsified responses, and a log operator who attempts to censor or equivocate. The substrate's response to these threats is shaped by what cryptographic signatures fundamentally CAN and CANNOT prove.
8.7.1 The fundamental limit
A signature proves "the holder of this key signed these bytes." It cannot prove the bytes are true. This is a property of cryptographic signatures, not a limitation specific to atrib. Certificate Transparency has the same property: CT proves a certificate was issued and committed to the log; it does not prove the certificate's claims are accurate or that the issuing CA was uncompromised. atrib inherits this trust model.
A poisoned atrib record (one carrying false claims, signed by a compromised key, or emitted by a malicious actor) verifies cryptographically the same as a legitimate one. Both have valid signatures, both chain correctly, both appear in the log. The substrate certifies what was signed, not whether the signed claim is true.
This limit is intrinsic to any signed-attestation system. A spec or product that claims to defeat it is overpromising.
8.7.2 Layered trust assessment
Truth assessment is layered above the signature primitive. atrib provides several mechanisms that contribute to a verifier's confidence assessment of any individual record:
| Layer | Mechanism | What it adds | What it does NOT rule out |
|---|---|---|---|
| 1 | Signature + log inclusion (§1.4 + §2.7) | Forgery, alteration, deletion, equivocation about whether the record exists | Compromised key; signer knowingly false content; signer malicious |
| 2 | Identity attestation (§6) | Anonymous actors hiding behind opaque keys | Identities making false claims; identities whose operational security is compromised |
| 3 | Capability declarations (§6.7) | Out-of-scope claims by an otherwise-attested identity | Coordinated compromise of both the signing key AND the publication channel for identity claims |
| 4 | Key revocation (§1.9) | Silent compromise; verifier sees the revocation reason and tags subsequent records | Past records being false (only flagged retroactively as suspect, not invalidated) |
| 5 | Cross-attestation for transactions (§1.7.6) | Single-key compromise fabricating transactions | Collusion between agent and counterparty; both parties' keys compromised; two distinct but untrusted keys signing the same bytes (a Sybil/corroboration attack), unless the verifier additionally requires the signer keys to be in its trust set per §1.7.6 |
| 6 | Tool-side response signing (§7.6 Pattern A) | Agent fabricating tool results | Collusion between agent and tool operator; tool operator compromised |
| 7 | External evidence (§7.6 Pattern B) | Agent claiming outcomes that did not occur in the world | External system itself being compromised |
| 8 | Witnessing (§2.9) | Log operator equivocation at the checkpoint level; selective censorship of checkpoints | Compromise of individual signing keys; record-level censorship by the log operator |
| 9 | Anchor plurality (§2.11) | Single-anchor-operator censorship, equivocation, data loss; record-level discrepancies between anchors | Collusion across all anchors in the trusted set |
| 10 | Structural anomaly detection (consumer-side) | Implausible patterns: bursts, dangling references, contradictory claims, statistical oddities in hash distributions | Subtle attacks that evade pattern detection |
No single layer is dispositive. A verifier's confidence assessment combines them; the substrate provides the structure, the assessment is consumer-side policy.
8.7.3 Asymmetric properties despite the limit
Even under the assumption that any individual record may be poisoned, the substrate provides properties that the status quo (no records at all) does not:
- Non-repudiation. A poisoned record IS a signed claim. The signer cannot later deny making it. The asymmetry favors the auditor: poisoning produces permanent, publicly-visible evidence.
- Common evidence base. Multiple parties (creator, merchant, regulator, downstream agents) see the same chain. Disputes happen on top of shared evidence rather than divergent private logs.
- Forensic depth. When something goes wrong,
informed_byandchain_rootlinkages let an investigator trace back through the chain to find what record (legitimate or poisoned) was the source. Root-cause analysis becomes structural rather than heuristic. - Reputation accumulation. A creator_key with consistent honest behavior over time accrues trust. A key exhibiting poisoning patterns can be flagged. There is no accumulating reputation surface for agent identities outside the substrate today.
- Asymmetric attacker cost. To poison records, an attacker must compromise a real signing key, and the resulting records are permanent and publicly visible. The cost-benefit shifts against the attacker compared to the unattested baseline.
8.7.4 The honest framing
"Verifiable agent actions" is honest under this threat model because:
- A receiver can verify signed accounts and any supplied source, commitment, or inclusion evidence. A signature alone does not establish that an action happened or that its record was logged.
- "Verifiable" means non-repudiable, inspectable, cross-checkable. It does NOT mean "true."
- A signed false claim remains verifiable as a claim; the verifier sees what was claimed and assesses it against the available trust layers.
What "verifiable agent actions" does NOT promise:
- That the agent is uncompromised (model alignment is a different layer; out of scope for an attestation protocol).
- That every action is intended by the user (intent verification is a different layer).
- That tools are honest (capability restriction is a different layer).
- That signed claims are true (truth assessment requires the layered stack above; the protocol provides the structure, not the assessment).
These honesty boundaries are what make the substrate trustworthy. Consumers know exactly what the substrate provides and what other layers their threat model requires.
8.7.5 Future work: inclusion-proof aggregation
A complementary mechanism queued for follow-up (D053): records cite the inclusion proofs of prior records, creating a web of mutual confirmation. If a log operator later removes or alters a referenced record, citing records still point at proof of the prior state. This would defend at the record level, complementing §2.9 (checkpoint-level witnessing) and §2.11 (cross-log replication).
The mechanism is queued rather than specified because the design needs careful work on sequencing (chicken-and-egg with checkpoint witnessing), interaction with cross-log replication (which proofs to cite), storage growth (every record gains another reference list), and failure modes. D053 documents the intent and known design questions; the formal ADR will follow when the mechanism is added to the spec.
Important: D053 is a placeholder, not a normative commitment. The eventual specification of inclusion-proof aggregation MAY differ from D053's sketch in any technical detail. Cross-references to it MUST treat the substance as forward-looking.
8.7.6 Attestation corroboration (extension)
This subsection is normative for verifiers that consume attestation records; the attestation record itself is an extension per §1.2.4 and D150.
Cross-attestation (§1.7.6, Layer 5) is corroboration by CO-SIGNATURE of shared transaction bytes. Attestation generalizes Layer 5 corroboration off the transaction type and off shared-bytes co-signing: a signer that is NOT a record's producer vouches for that record by independent REFERENCE. This is the durable, third-party, aggregatable corroboration that neither cross-attestation (transaction-only, shared-bytes co-signature) nor handoff verification (§5.5.5, which checks a record's OWN signer against a trust set) can express.
Attestation record. An attestation is a record with event_type the extension URI https://atrib.dev/v1/extensions/attestation whose content is { attests: 'reliable', target: '<record_hash of X>', reason? }. The content MUST be committed via args_hash (§8.3, D099) so the reference is tamper-evident: a valid signature over the record commits to args_hash, and args_hash commits to the content. Per D080 attestation ships as an extension, not a normative event_type byte, until real use justifies promotion.
Corroboration verdict. Given a target record X and a set of attestation records, a verifier that requires trusted corroboration MUST count an attestor only when: the record's signature verifies, its event_type is the attestation extension URI, its committed content carries attests: 'reliable' and target equal to X's record_hash, and its signer key is NOT X's producer key (self-attestation MUST NOT count). Verifiers MUST NOT count annotation records (§1.2.7) as corroboration; only the reserved attests marker qualifies. Distinct verified attestor keys give attestors_valid; a verifier supplied a trust set additionally surfaces attestors_trusted (distinct verified attestors in the trust set) and reports non-malleable corroboration only when attestors_trusted meets the caller's minimum (default 2), reusing the §1.7.6 trusted signer composition. As with cross-attestation, this verdict is a signal: it MUST NOT by itself invalidate any record. A fail-closed "require N corroborators" gate is host-owned (§7.6 enforcement pattern, @atrib/action-gate), not a verifier behavior.
Appendix A: Test Vectors
The following test vectors are generated from the reference implementation. Two independent implementations that produce identical outputs for these inputs are interoperable.
All values are deterministic given the inputs. Ed25519 signing with a fixed seed produces a fixed signature.
This appendix is normative. A conforming implementation MUST produce outputs identical to these test vectors for the given inputs.
A.1 Key Material
| Field | Value |
|---|---|
| Private key seed (hex) | 0101010101010101010101010101010101010101010101010101010101010101 |
| Public key (hex) | 8a88e3dd7409f195fd52db2d3cba5d72ca6709bf1d94121bf3748801b40f6f5c |
| Public key (base64url) | iojj3XQJ8ZX9UtstPLpdcspnCb8dlBIb83SIAbQPb1w |
A.2 Record Fields
| Field | Value |
|---|---|
| spec_version | atrib/1.0 |
| event_type | https://atrib.dev/v1/types/tool_call |
| timestamp | 1700000000000 |
| context_id | aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa |
| creator_key | iojj3XQJ8ZX9UtstPLpdcspnCb8dlBIb83SIAbQPb1w |
| content_id | sha256:0a3666a0710c08aa6d0de92ce72beeb5b93124cce1bf3701c9d6cdeb543cb73e |
| chain_root (genesis) | sha256:3ba3f5f43b92602683c19aee62a20342b084dd5971ddd33808d81a328879a547 |
A.3 Canonical Signing Input (§1.3)
The signing input is JCS(record without signature):
{"chain_root":"sha256:3ba3f5f43b92602683c19aee62a20342b084dd5971ddd33808d81a328879a547","content_id":"sha256:0a3666a0710c08aa6d0de92ce72beeb5b93124cce1bf3701c9d6cdeb543cb73e","context_id":"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa","creator_key":"iojj3XQJ8ZX9UtstPLpdcspnCb8dlBIb83SIAbQPb1w","event_type":"https://atrib.dev/v1/types/tool_call","spec_version":"atrib/1.0","timestamp":1700000000000}SHA-256 of signing input (hex): e2ad8c62656a32b381c9b4c6b55fb13529e8843ffcdd0f03a80bb1afb87a9676
A.4 Signature (§1.4)
| Field | Value |
|---|---|
| Signature (base64url) | ZMjtGaUFxp3N4ZA2Vw05NBg8KiymOdNRL3uRB_QJ-zMK7MVOBBqtOA1xLo-DMmeLZfjWjfBFwrHtQemoxXXMBg |
| Signature (hex) | 64c8ed19a505c69dcde19036570d3934183c2a2ca639d3512f7b9107f409fb330aecc54e041aad380d712e8f8332678b65f8d68df045c2b1ed41e9a8c575cc06 |
| Verification passes | true |
A.5 Canonical Record and Record Hash
The canonical record is JCS(complete record with signature):
{"chain_root":"sha256:3ba3f5f43b92602683c19aee62a20342b084dd5971ddd33808d81a328879a547","content_id":"sha256:0a3666a0710c08aa6d0de92ce72beeb5b93124cce1bf3701c9d6cdeb543cb73e","context_id":"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa","creator_key":"iojj3XQJ8ZX9UtstPLpdcspnCb8dlBIb83SIAbQPb1w","event_type":"https://atrib.dev/v1/types/tool_call","signature":"ZMjtGaUFxp3N4ZA2Vw05NBg8KiymOdNRL3uRB_QJ-zMK7MVOBBqtOA1xLo-DMmeLZfjWjfBFwrHtQemoxXXMBg","spec_version":"atrib/1.0","timestamp":1700000000000}| Field | Value |
|---|---|
| Record hash (hex) | ea6fb413c524ab5767520516ffb8ae38a74391f7892177e0236f5f2de523b9c1 |
| Record hash (base64url) | 6m-0E8Ukq1dnUgUW_7iuOKdDkfeJIXfgI29fLeUjucE |
A.6 Propagation Token (§1.5.2)
| Field | Value |
|---|---|
| Token | 6m-0E8Ukq1dnUgUW_7iuOKdDkfeJIXfgI29fLeUjucE.iojj3XQJ8ZX9UtstPLpdcspnCb8dlBIb83SIAbQPb1w |
| Format | base64url(record_hash) + "." + base64url(creator_key) |
A.7 Chain Root for Next Record
| Field | Value |
|---|---|
| chain_root | sha256:ea6fb413c524ab5767520516ffb8ae38a74391f7892177e0236f5f2de523b9c1 |
| Format | "sha256:" + hex(record_hash) |
| Matches record_hash from A.5 | true |
A.8 Log Entry Serialization (§2.3.1)
| Field | Value |
|---|---|
| Entry (hex, 90 bytes) | 01ea6fb413c524ab5767520516ffb8ae38a74391f7892177e0236f5f2de523b9c18a88e3dd7409f195fd52db2d3cba5d72ca6709bf1d94121bf3748801b40f6f5caaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa0000018bcfe5680001 |
| Entry length | 90 |
Byte layout:
- Byte 0: version (
0x01) - Bytes 1-32: record_hash (32 bytes)
- Bytes 33-64: creator_key (32 bytes)
- Bytes 65-80: context_id (16 bytes)
- Bytes 81-88: timestamp_ms (uint64 big-endian)
- Byte 89: event_type (
0x01=https://atrib.dev/v1/types/tool_call)
A.9 Merkle Tree (§2.3.2, §2.7)
Single-entry tree (tree_size = 1):
| Field | Value |
|---|---|
| Leaf hash | 424c202b46c2468a9a62958c841c38884b53454341cd0c326296dd2cdc31037f |
| Leaf hash (base64) | QkwgK0bCRoqaYpWMhBw4iEtTRUNBzQwyYpbdLNwxA38= |
| Root (= leaf hash for size 1) | 424c202b46c2468a9a62958c841c38884b53454341cd0c326296dd2cdc31037f |
| Inclusion proof | [] (empty for single-entry tree) |
| Verification passes | true |
Two-entry tree (tree_size = 2):
| Field | Value |
|---|---|
| Leaf 0 hash | 424c202b46c2468a9a62958c841c38884b53454341cd0c326296dd2cdc31037f |
| Leaf 1 hash | 5133c40d0435ff1b7db13abebf7a417c03dbe86309ca8ed9121e04cf1d728866 |
| Root | bfec13ffa5af1f27d9c878c6557aaf480686a34789b2c8b8630ce0c644817398 |
| Inclusion proof for index 0 | ["UTPEDQQ1/xt9sTq+v3pBfAPb6GMJyo7ZEh4Ezx1yiGY="] |
| Inclusion proof for index 1 | ["QkwgK0bCRoqaYpWMhBw4iEtTRUNBzQwyYpbdLNwxA38="] |
Leaf hash computation: SHA-256(0x00 || entry_bytes)
Internal node hash: SHA-256(0x01 || left || right)
Root of 2-entry tree: SHA-256(0x01 || leaf_hash_0 || leaf_hash_1)
A.10 Vector Cases for Optional Fields and Postures
The vectors in §A.1 through §A.9 cover the minimal record shape (default posture, no optional fields). The conformance corpus at spec/conformance/1.4/ extends these with byte-level vectors covering each optional field and posture combination introduced in D041, D044, D045, D050, and D052. It also includes adversarial vectors from D101, covering malformed inputs, bad signatures, wrong creator keys, and JCS ordering edge cases. The dedicated spec/conformance/1.2.6/ corpus provides the four cases that define the D044 provenance_token field (canonical-form invariance with the field present, upstream-derivation rule, genesis-only invariant rejection, absence-not-null contract). Implementations MUST produce outputs identical to the corpus vectors for the inputs the corpus specifies.
The full graph edge-derivation corpus at spec/conformance/3.2.4/ covers the normative §3.2.4 edge rules. The reduced response-shape corpus at spec/conformance/3.4.1/ remains specific to /v1/graph/{context_id} compacting behavior.
The corpus enumerates (each as a separate vector with full input → canonical bytes → record_hash → signature output):
- informed_by single-entry: record carries
informed_by: ["sha256:<hash>"](one referent). Validates JCS placement of the field (betweenevent_typeandprovenance_token, lex-sorted). - informed_by multi-entry sorted: record carries
informed_by: [hash_a, hash_b, hash_c]where the entries are pre-sorted lex. Validates that the canonical form is stable. - informed_by ordering rejection: record submitted with unsorted
informed_byMUST be rejected by validators per §1.2.5 ordering requirement. - provenance_token on genesis: genesis record (chain_root = SHA-256(context_id)) carries
provenance_tokenwith derivationbase64url(SHA-256(JCS(upstream_record))[:16]). Validates derivation correctness. - provenance_token rejection on non-genesis: non-genesis record carrying
provenance_tokenMUST be rejected by validators AND verifiers per §1.2.6. - timestamp_granularity declared: record carries
timestamp: 1743850080000, timestamp_granularity: "min". Validates trailing-zero match enforcement. - timestamp_granularity mismatch rejection: record carries
timestamp: 1743850123456, timestamp_granularity: "min"(mismatch). MUST be rejected by verifiers. - salted-sha256 args/result: record carries
args_salt,result_salt, withargs_hash = SHA-256(salt || canonical_args_bytes). Validates posture detection from sibling-field presence. - opaque tool_name: record carries
tool_name: "tool_a7f3"(matches[a-z0-9_-]{1,64}opaque-form pattern). Validates posture detection. - hashed tool_name: record carries
tool_name: "sha256:<hex>". Validates posture detection. - transaction with 2-signer signers: transaction record carries
signers: [{creator_key_A, sig_A}, {creator_key_B, sig_B}]where both signatures cover canonical bytes withsigners: []and top-levelsignatureomitted. Validates per-signer verification and the canonical-input rule from §1.7.6. - transaction with single-signer rejection: transaction record with only 1 signer flagged as
cross_attestation_missing: true. - transaction with duplicate signer key rejection: transaction record carries 2 entries from the same
creator_key; verifier counts 1 distinct valid signer and flagscross_attestation_missing: true. - combined posture: record carries opaque tool_name + salted commitments + minute timestamp + informed_by. Validates that postures compose without interaction.
- multi-log proof bundle: record bundle carries proofs from 2 logs in
log_proofsarray per §2.11.3. Validates verifier-side threshold and equivocation detection. - PROVENANCE_OF derivation: pair of records where downstream's
provenance_tokenderives from upstream's hash; derivation produces correct PROVENANCE_OF graph edge per §3.2.4 step 7.
The corpus is generated from the reference implementation; a conforming implementation produces identical bytes for the inputs in inputs.json of each vector directory. The Appendix A vectors above and the corpus vectors are jointly normative.
For the source-bound evidence corpus, only receiver vectors are jointly normative with this appendix. C19 executor cases are non-normative host-policy examples, excluded from protocol and receiver conformance requirements.
§9 Runtime Integration Patterns
This section is informative.
§7 covers how a harness consumes atrib once it is mounted: the agent-side surfacing, recall, and reasoning patterns. This section covers the orthogonal axis: how a runtime mounts atrib in the first place. The two are independent, a runtime picks one §9 integration pattern (sometimes more than one) AND any subset of §7 consumption patterns.
Seven integration patterns cover every runtime category surveyed in atrib's harness field study (48 harnesses across IDE-integrated, multi-agent SDK, autonomous, browser-use, sandboxed, and managed-cloud categories). None is canonical. Each pattern is a candidate scope for the D048 conformance contract; in atrib v1 the contract specifies Pattern #3 in detail (callback / lifecycle handlers in @atrib/agent), and per-pattern conformance test surfaces will land alongside each pattern's reference implementation. A runtime builder picks the pattern its ergonomics support; multiple patterns can compose for one runtime when the runtime supports more than one.
9.1 Pattern: Lifecycle hooks (stdin-JSON IPC)
Where it fits. Runtimes that expose a typed lifecycle event surface where a third-party hook script receives a JSON envelope on stdin, returns a JSON envelope on stdout, and may deny / allow / modify the runtime's next action. Surveyed examples: Claude Code, Cursor, OpenAI Codex CLI, Browser-Use lifecycle hooks, CrewAI tool hooks, Augment Code (Auggie SDK with PreToolUse/PostToolUse/Stop/SubagentStart-Stop), Pi (Earendil events API, deliberately non-MCP).
How atrib mounts. A hook script reads the lifecycle envelope (typically a PreToolUse or PostToolUse event with tool_name, tool_input, tool_result, session_id, transcript_path), constructs an §1.2.1 AtribRecord, signs with the operator's Ed25519 key, and submits to the log. Best practice: spawn a detached helper subprocess so the runtime's tool-call latency is the hook's spawn time, not the signing roundtrip.
Causality formation. Each tool call produces a tool_call AtribRecord. chain_root per §1.2.3 inherits from the prior record in the same context_id via the cascade in §1.2.3.1. informed_by per §1.2.5 is auto-detected from any sha256 references in the tool's args/result, OR explicitly populated by the hook from runtime-known prior-record context.
Reference implementation. A hook helper script that subprocesses the write-verb MCP server (atrib-attest, or the forwarded legacy atrib-emit binary). The helper reads the lifecycle envelope on stdin, calls the attest tool (or its legacy emit alias) over stdio with content, optional context_id, and any explicit informed_by declarations, and exits with the runtime's expected hook contract. Detached spawning keeps the runtime's tool-call latency bounded by spawn time, not signing roundtrip.
Trade-offs. Strongest causality formation in any pattern (the runtime knows exactly what triggered the tool call). Requires the runtime to ship a hook surface; not all do. Hook scripts run in the consumer's process space, so the consumer's atrib key is reachable.
9.2 Pattern: In-process MCP middleware (the wrapper)
Where it fits. Runtimes that call tools through Model Context Protocol (MCP) servers. atrib mounts as a middleware server fronting the upstream tool MCP, signing each request/response pair as it passes through. Surveyed examples: Goose (70+ MCP extensions), Continue (MCP-only), Cody, Claude Code MCP-served tools, opencode, Browserbase/Stagehand (covered transitively via the official @browserbasehq/mcp-stagehand MCP server), any generic stdio MCP host. Pi (Earendil) is intentionally NON-MCP; integrations with Pi use Pattern #1 hooks instead.
How atrib mounts. The runtime registers @atrib/mcp-wrap (or an equivalent middleware) instead of the upstream MCP server. The wrapper spawns the upstream as a subprocess, intercepts every tools/list, tools/call, and tools/call/result message, signs the call payload as an AtribRecord, and forwards transparently. The operator's MCP host config points at the wrapper instead of the upstream; the upstream sees no protocol change.
Causality formation. Within a single wrapped MCP, every tool call carries the wrapper's session-scoped chain_root cascade. Cross-MCP causality requires either (a) the wrapper consuming the inbound _meta.atrib propagation token per §1.5.2, or (b) the env-var or mirror-file inheritance per §1.2.3.1.
Reference implementation. @atrib/mcp-wrap, a generic config-driven wrapper that reads $ATRIB_WRAP_CONFIG (or ~/.atrib/wrap-config.json) to specify which upstream to wrap. Library API for in-tree wrappers (wrap, parseConfig, buildPreCallTransform, resolveKey) and atrib-wrap binary for standalone use.
Required for. Transaction records (D052 cross-attestation, where a counterparty co-signer requires synchronous request-path access). preCallTransform (D057 cross-tool causal embedding, where the wrapper rewrites the upstream call payload to inject an atrib receipt-id). Payment-protocol adapters that require cross-attestation. Any MCP-native runtime where lifecycle hooks aren't available.
Trade-offs. Universal across MCP-served tools regardless of host runtime. Adds a process boundary (subprocess spawn). Cannot intercept tools that bypass MCP (host-internal Bash/Edit/Read in hook-only runtimes).
9.3 Pattern: Callback / lifecycle handlers (SDK-native interception)
Where it fits. Multi-agent SDKs and frameworks that expose a callback or hook API in their core surface. Surveyed examples: LangGraph (BaseCallbackHandler with on_tool_start/on_tool_end), CrewAI (register_before_tool_call_hook / register_after_tool_call_hook), AutoGen (InterventionHandler on_send/on_publish/on_response; AutoGen entered maintenance mode April 2026, Microsoft directs new users to Microsoft Agent Framework), Microsoft Agent Framework (explicit middleware system designed for "compliance / logging / safety filters", verbatim atrib fit), Anthropic Claude Agent SDK (HookCallback with PreToolUse/PostToolUse/SubagentStart), smolagents (step_callbacks), OpenAI Agents SDK (RunHooks and AgentHooks with on_tool_start/on_tool_end/on_handoff), Vercel AI SDK (tool wrapping), Flue (ctx.setEventCallback(cb) with 14-variant FlueEvent discriminated union; pre-1.0 API, semver-pin recommended), Google ADK (community-extensions structure).
How atrib mounts. A framework-specific adapter registers callbacks at the SDK's documented extension points and constructs AtribRecords from the callback context. The adapter ships with the framework's typed input + idiomatic registration code.
Causality formation. Pattern-#3 frameworks vary. OpenAI Agents SDK has a first-class handoff span type that maps directly to cross-agent informed_by. CrewAI has declarative Task.context = [upstream_task] references that produce explicit cross-task causal edges. AutoGen's actor-message interception captures inter-agent traffic that other patterns miss. Each adapter documents the framework's natural informed_by formation point.
Reference implementations. @atrib/agent ships adapters per D018, D021, D022, D023, D024. Each adapter answers the integration shape revealed by source-reading the host framework, not by guessing from dependency graphs. Conformance contract per D048.
Trade-offs. SDK-native means tightest integration with that framework's feature surface (e.g., handoff spans, task context). Pattern coverage requires an adapter per framework; the LCD interface is "register a callback receiving (tool_name, input, output, agent_context)" but the registration shape varies.
9.4 Pattern: OpenInference SpanProcessor (telemetry-substrate hook)
Where it fits. Runtimes instrumented with OpenInference (the OpenTelemetry conventions layer for LLM/agent frameworks maintained by Arize). atrib mounts as a custom SpanProcessor that reads OpenInference-shaped spans and constructs AtribRecords. Surveyed examples: Vercel AI (native), OpenAI Agents SDK (native), Claude Agent SDK (Python instrumentation), smolagents (via OpenInference instrumentation), CrewAI (optional), LangChain / LangGraph (via OpenInference + LangSmith bridge), LlamaIndex, DSPy, MCP itself (instrumented), Strands Agents (OTel-native), Bedrock AgentCore (planned Langfuse / Datadog / Dynatrace integrations route through OTel). OpenInference maintains a multi-language package set across Python, JavaScript, Java, and Go.
How atrib mounts. A custom SpanProcessor implementing OpenTelemetry's onEnd(span) interface filters for spans carrying OpenInference attributes (openinference.span.kind, tool.name, input.value, output.value, llm.*, etc.), maps each span to an AtribRecord, signs with the operator's key, and passes the signed record plus local sidecar to the caller's submission callback. TOOL spans map to tool_call; LLM, AGENT, EMBEDDING, RETRIEVER, RERANKER, CHAIN, GUARDRAIL, EVALUATOR, and PROMPT map to observation. The runtime's existing OpenTelemetry tracer registration adds atrib's processor alongside existing exporters (Phoenix, Langfuse, Datadog, etc.); atrib does not replace existing observability, it composes.
Local sidecar formation. The signed AtribRecord stays lean. Rich span data lives in the local mirror sidecar per §5.9.3: span kind/name/id, input/output, model and agent names, prompt metadata, usage, cost, score, and generic metadata. The signed record MAY carry args_hash and result_hash when the caller wants replay-checkable commitments to sidecar bytes. OpenInference input.value and output.value strings that contain JSON SHOULD be parsed and JCS-canonicalized before hashing, so verifier-side body replay can use supplied JSON material rather than runtime-specific raw string bytes.
Causality formation. OpenInference spans nest hierarchically, but the graph still records only signed structure and agent-declared references. Parent-child span nesting is a correlation fact about runtime execution, not a replayable claim that one signed action used another signed action as evidence. The reference implementation currently derives informed_by from the empirical LLM-to-TOOL tool-call id match: an LLM span that emits llm.output_messages.<i>.message.tool_calls.<j>.tool_call.id registers its signed record hash, and the matching TOOL span with tool_call.id cites it before signing. Future span-link or graph-node parent-id derivations must still materialize as explicit informed_by fields before signing; the graph service does not infer semantic causality from span nesting.
Reference implementation. @atrib/openinference. The package exports a standard OpenTelemetry SpanProcessor that maps OpenInference spans into signed atrib records. Callers wire it into their existing OTel TracerProvider.
Trade-offs. Highest reach per LOC across the multi-agent SDK landscape (one integration → 8+ frameworks). OpenInference span schema is stable for the common attributes but evolving for newer ones; the adapter codes against the stable subset and falls through cleanly when extended attributes appear. Requires the runtime to be OpenInference-instrumented; non-instrumented runtimes need a different pattern.
9.5 Pattern: Post-hoc API import + consumer re-sign
Where it fits. Closed-loop proprietary runtimes that own the agent's execution loop and expose a session-export API but no in-process middleware path. Surveyed examples: Cursor Cloud Agents (recommended first reference target, public REST API, Pro tier, SSE stream emits event: tool_call as first-class type, official @cursor/sdk ships Zod validators), Devin (Core $20/mo blocks API; Teams $500/mo gates; messages endpoint plain text only), Manus (hosted), Replit Agent (LangSmith only), OpenAI Operator (no public trace API), Bolt/v0/Lovable (chat history + deployed code only).
How atrib mounts. A consumer-controlled adapter polls or webhook-receives the runtime's session-export API, parses each step into a toolcall shape, constructs an AtribRecord per step, signs with the consumer's atrib key, and submits to the log. Critically: the consumer (not the vendor) is the signer. The signature attests to _the consumer's observation of what the vendor reported happened, not to the vendor's truthfulness.
Causality formation. Limited by the vendor's API. If the vendor returns structured tool_call sequences with timestamps, the adapter forms a chain over the operator's chain_root cascade. If the vendor returns only chat history or summaries, the adapter does best-effort reconstruction; structural causality is lossy and the resulting records carry a flag (e.g., provenance_quality: "vendor-summary") that downstream verifiers MUST surface.
Trust posture. This pattern is consistent with §8.7's threat model. atrib does not certify truth, only signing. The consumer-attested signature proves "I observed this is what the vendor told me happened", strictly weaker than in-process patterns where the substrate observed the call directly. Verifiers MUST treat consumer-attested records differently from in-process-attested records when their threat model requires the distinction.
Reference implementation. Deferred until a target runtime API is selected. Pattern is documented here so consumers building Pattern #5 adapters can do so against a stable reference contract.
Trade-offs. Only path for closed-loop proprietary runtimes. Latency is post-hoc (not real-time). Trust shifts to consumer-attestation. Vendor API shape varies; each adapter is bespoke.
Run-level attestation fallback. When a vendor's API returns only chat history or summary text (not structured per-step actions), per-step Pattern #5 isn't viable. The fallback is a single run-level observation record per completed agent execution, signed by the consumer, attesting to the vendor-reported summary. Strictly weaker than per-step Pattern #5 but recoverable for runtimes (Devin's plain-text messages endpoint, Bolt/v0/Lovable, GitHub Copilot Coding Agent's Agent-Logs-Url trailer) where structured per-step access is structurally blocked. Verifiers MUST surface the attestation level so consumers can reason about which records carry per-step verifiability and which carry only session-level.
9.6 Pattern: Streaming interceptor (real-time bidirectional)
Where it fits. Runtimes that expose a streaming bidirectional protocol (audio, video, real-time tool dispatch) where action capture must happen in the protocol stream itself, not at discrete tool-call boundaries. Surveyed examples: OpenAI Realtime API (voice agents), future voice/multimodal harnesses, WebSocket-based agent runtimes that don't model tool calls as request/response pairs.
How atrib mounts. A streaming interceptor sits in the protocol path (typically a WebSocket proxy or a transform stream), filters frames carrying tool-dispatch payloads, signs each as it passes through, and submits to the log. The interceptor MUST NOT add latency that breaks the streaming contract; signing happens on a separate concurrent path with the dispatched action.
Causality formation. Streaming intervals are softer than discrete tool-call boundaries. The adapter chooses a granularity (per-frame, per-utterance, per-action-cluster) and emits one record per chosen unit. informed_by formation depends on the runtime's session-state model.
Reference implementation. Not yet built. Pattern documented here so consumers building voice-agent or multimodal-agent integrations have a reference contract.
Trade-offs. Necessary for real-time bidirectional protocols. Latency budget is tight. Granularity choices are consumer-specific.
9.7 Pattern: Sandboxed-execution signer proxy
Where it fits. Runtimes that execute agent code inside a filesystem, network, process, container, or VM sandbox while a host process remains outside that sandbox. Surveyed examples include Claude Code sandboxing, hosted coding-agent sandboxes, local container sandboxes, and managed runtimes that expose a proxy boundary for credentials or network calls.
How atrib mounts. Sandboxed code constructs an unsigned atrib record request and sends it to a host signer proxy. The host signer lives outside the sandbox, holds the Ed25519 key, runs host policy, controls creator_key and signature or the local signers[] entry, signs canonical bytes per §1.4, optionally submits the record to the log, and returns a record_hash or signed record to the sandbox. The sandbox never receives the private key.
Causality formation. The sandbox passes context_id, chain_root, informed_by, and any sidecar context it knows to the host signer. The host signer applies the same chain-root precedence contract as other producers (§1.2.3.1) and returns the signed result so the sandbox can propagate §1.5 context to later calls.
Security boundary. This pattern satisfies §1.4.6. It does not stop a prompt-injected sandboxed agent from asking the host to sign a bad request. It makes that request cross a host-owned policy and signing boundary, which lets the host deny the request, log the denial, require approval, or attach additional evidence before signing.
Reference implementation. packages/integration/src/signer-proxy-example.ts plus packages/integration/examples/signer-proxy/. The test surface lives in packages/integration/test/signer-proxy.test.ts.
Trade-offs. Keeps key material outside the sandbox and composes cleanly with sandbox credential proxy designs. Adds a host signing hop and a policy surface. The host signer must be treated as part of the trusted producer boundary.
9.8 Composing patterns
A runtime may support multiple patterns concurrently. Claude Code supports Pattern #1 (lifecycle hooks for builtin tools) AND Pattern #2 (the wrapper for MCP-served tools) simultaneously. AutoGen supports Pattern #3 (InterventionHandler) AND Pattern #4 (native OpenInference). When patterns compose, the consumer MUST ensure they don't double-sign the same observation: each pattern's adapter signs its own boundary; the boundaries should not overlap.
A canonical composition example: PostToolUse hooks fire on mcp__.* tools (Pattern #1 covers write-verb signing through attest or its legacy aliases) AND on built-in tool names like Bash|Edit|Write|Read|MultiEdit|WebFetch|WebSearch (Pattern #1 again, with verb-based importance grading). Wrapper-fronted MCP tools (Pattern #2) sign at the protocol boundary. The hook skip-list excludes already-wrapped MCPs to avoid double-signing.
Parent-child producers use the D115 env bundle when the parent dispatch record hash is known before the child signs. The parent sets ATRIB_CONTEXT_ID=<parent-context-id>, ATRIB_CHAIN_TAIL_<parent-context-id>=<latest-tail-record-hash>, and ATRIB_PARENT_RECORD_HASH=<parent-dispatch-record-hash> for the child process. @atrib/mcp exposes buildSubagentProducerEnv() as the reference helper. Pattern #2 middleware applies the valid parent hash to the first successful child record's informed_by field; Pattern #1 hook producers and short-lived atrib-emit-cli calls may apply the same value to explicit emit records. Invalid values are ignored. This does not add a new edge type: graph derivation uses the existing INFORMED_BY edge. If the parent dispatch hash is not available before the child signs, the runtime uses pre-call signing, Pattern 3 verified handoff claims, or a later annotation instead of preserving an unresolved parent edge.
Producer-side informed_by validation is source-aware per D116. Parent env seeds are producer-owned spawn anchors and are not looked up through the child-visible mirror or public log before signing. Refs from explicit informedBy callbacks and structured auto-detect paths can be resolver-accepted through local mirrors plus log lookup. Hosts that promote exact argument paths into informed_by SHOULD provide a resolver and SHOULD drop refs that return not-found or unknown.
9.9 Selecting a pattern
A runtime builder picks based on:
- What does the runtime expose? Lifecycle hooks → Pattern #1. Native MCP → Pattern #2. SDK callbacks → Pattern #3. OpenInference instrumentation → Pattern #4. Closed-loop API only → Pattern #5 (or run-level attestation fallback when per-step shape is unavailable). Streaming bidirectional protocol → Pattern #6. Sandboxed execution with a host proxy boundary → Pattern #7.
- What does the runtime's threat model require? Real-time signing for cross-attestation → Pattern #2 (only synchronous request-path access supports counterparty signature collection per D052). Key isolation from sandboxed code → Pattern #7. Deferred-signature signing acceptable → any pattern whose trust posture matches the runtime.
- What's the deployment shape? Consumer-controlled execution loop → Patterns #1-4, #6, and #7. Vendor-owned execution loop → Pattern #5 (or #5b).
Pattern coverage commitments. atrib v1 ships reference implementations for Patterns #1, #2, #3 (multiple frameworks), and #4. Pattern #7 ships a tested reference example for the key-isolation boundary, not a framework adapter. Patterns #5 and #6 are documented in this section with their conformance contract scope; reference implementations are planned for future development, prioritized by community demand and integration readiness. Third-party adapters in any pattern are encouraged; the D048 conformance contract scope extends to each pattern's reference test surface.
References
Normative References
- [RFC 2119] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, March 1997. https://www.rfc-editor.org/rfc/rfc2119
- [RFC 8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words", BCP 14, RFC 8174, May 2017. https://www.rfc-editor.org/rfc/rfc8174
- [RFC 8785] Rundgren, A., Jordan, B., Erdtman, S., "JSON Canonicalization Scheme (JCS)", RFC 8785, June 2020. https://www.rfc-editor.org/rfc/rfc8785
- [RFC 8032] Josefsson, S., Liusvaara, I., "Edwards-Curve Digital Signature Algorithm (EdDSA)", RFC 8032, January 2017. https://www.rfc-editor.org/rfc/rfc8032
- [RFC 4648] Josefsson, S., "The Base16, Base32, and Base64 Data Encodings", RFC 4648, October 2006. https://www.rfc-editor.org/rfc/rfc4648
- [RFC 9162] Laurie, B., Messeri, E., Stradling, R., "Certificate Transparency Version 2.0", RFC 9162, December 2021. https://www.rfc-editor.org/rfc/rfc9162
- [RFC 9457] Nottingham, M., Wilde, E., Dalal, S., "Problem Details for HTTP APIs", RFC 9457, July 2023. https://www.rfc-editor.org/rfc/rfc9457
- [W3C Trace Context] W3C, "Trace Context Level 1", W3C Recommendation, February 2020. https://www.w3.org/TR/trace-context-1/
- [W3C Baggage] W3C, "Baggage", W3C Candidate Recommendation, November 2023. https://www.w3.org/TR/baggage/
- [C2SP tlog-tiles] C2SP, "Tiled Transparency Logs", c2sp.org/tlog-tiles
- [C2SP signed-note] C2SP, "Signed Note", c2sp.org/signed-note
Informative References
- [ACP] Agentic Commerce Protocol, https://github.com/agentic-commerce-protocol/agentic-commerce-protocol (verified 2026-04-06)
- [UCP] Universal Commerce Protocol, version 2026-01-11, https://github.com/universal-commerce-protocol/ucp
- [x402] x402 HTTP Payment Protocol, https://x402.org (v2, April 2026)
- [x401] x401 Proof Requirement Protocol, https://x401.proof.com/spec/latest/ (v0.2.0 draft)
- [MPP] Machine Payments Protocol, IETF draft-ryan-httpauth-payment-01, March 2026, https://mpp.dev
- [AP2] Agentic Payment Protocol v0.2, https://github.com/google-agentic-commerce/AP2
- [a2a-x402] A2A Payment Extension v0.1, https://github.com/google-agentic-commerce/a2a-x402
- [MCP] Model Context Protocol Specification, version 2025-11-25, https://modelcontextprotocol.io/specification/2025-11-25/
- [Tessera] Transparency-dev Tessera, https://github.com/transparency-dev/tessera