Receipt schema reference
scopebond:receipt evidence contract v1 — A countersigned receipt whose signature covers the complete canonical payload. It attests the gateway's recorded decision and adapter assertion; it does not independently prove an external effect or compliance.
Schema id: https://scopebond.com/schema/receipt-v1.json. Package: @scopebond/policy-schema 0.11.4 (newer published versions may add fields). A receipt has two top-level members, payload (everything that is signed, canonicalized with RFC 8785) and signature. What a receipt proves, and does not, is explained in Receipts and verification.
receipt
A countersigned receipt whose signature covers the complete canonical payload. It attests the gateway's recorded decision and adapter assertion; it does not independently prove an external effect or compliance.
| Field | Required | Shape | Description |
|---|
payload | yes | object | |
signature | yes | object | |
receipt.payload
| Field | Required | Shape | Description |
|---|
type | yes | const "scopebond:receipt" | |
evidence_version | yes | const "1.0" | |
canonicalization | yes | const "RFC8785" | |
intent | yes | object | The action the agent signed (the ACTA payload_digest source). |
intent_hash | yes | string, pattern ^[0-9a-f]{64}$ | Compatibility alias of action_ref.authorized_intent_hash. |
action_ref | yes | object | |
policy_hash | yes | string | ACTA policy_digest = the registered policy hash. |
policy_version | yes | integer, min 1 | |
policy_ref | yes | object | |
verifier_version | yes | string | |
realtime_result | yes | "allow" · "deny" · "approved" · "timeout" · "not_evaluated" | |
executed | yes | boolean | |
execution_ref | yes | string \| null | Compatibility alias of execution.reference. |
execution | yes | object | |
redaction | yes | object | |
authorization | yes | object or object or object or object | |
attester | yes | object | |
timestamp | yes | string, format date-time | |
evidence_class | no | "signed_intent" · "pep_authorized" · "boundary" | Evidence class (§15). Absent = legacy, inferred at read time. Never upgraded. |
principal | no | object | Required for pep_authorized: the validated identity subject and issuer. |
boundary | no | object | Required for boundary: the gate that decided a consequence and the attributed actor. |
context | no | object | Optional. Where the receipt was produced, so records can be grouped by session and filtered by tool, model and repository. Carries no local paths, no credentials and no prompts. Covered by the signature like every other payload field. A receipt check that predates this member reports a receipt carrying it as invalid (the payload is closed); verify with a release that knows context. |
budget | no | object | Optional. A session budget counted or refused this action (session-budgets.schema.json): which budget, the action type counted, the count with this action and the limit, and the state. within / at_limit: counted and allowed. over: beyond the limit (denied under enforce, recorded under monitor). unavailable: the hook could not read or write its count, so it denied. A receipt check that predates this member reports a receipt carrying it as invalid (the payload is closed). |
clause_id | no | string, length 1–200 | Optional. The id of the policy clause that matched (a starter rule such as safe-shell or protect-read, or a pack rule's clause id), on a receipt whose action a clause denied, recorded under monitor (realtime_result deny with the action allowed), held for approval or a person overrode. An allowed action carries none. When several clauses matched, it names an enforced clause first, then one that needs approval, then a monitored one, and among clauses of one mode the first by policy order. Covered by the signature. A receipt check that predates this member reports a receipt carrying it as invalid (the payload is closed). |
failed_bound | no | string, pattern ^[A-Za-z0-9_.-]{1,64}:[a-z_]{1,32}$ | Optional, only with clause_id. The bound of that clause that failed, as <param>:<bound>: the param the clause checked and the clause field it failed (program:pattern, path:pattern, ref:pattern, amount:max_per_action, host:hosts, action_type:action_types, timestamp:hours). It names the param, never the param's value, file contents or secrets. |
pattern_id | no | string, pattern ^[0-9a-f]{64}$ | Optional. A pattern id (64 lowercase hex) that a signed plugin loaded by the hook gave this action. Opaque to the open code: stored and covered by the signature like every other member, never interpreted. Absent from every receipt made without a plugin. A receipt check that predates this member reports a receipt carrying it as invalid (the payload is closed). |
intel | no | string, pattern ^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$, length 4–5464 | Optional. An opaque slot a signed plugin loaded by the hook filled for this action: standard base64 (with padding) of 1 to 4096 bytes. Its contents are not described here; the open code stores and verifies it as bytes and never reads it. Absent from every receipt made without a plugin. A receipt check that predates this member reports a receipt carrying it as invalid (the payload is closed). |
override | no | object or object or object or object or object | A person at the computer allowed an action a rule blocked (agent_dialog, with a reason whose SHA-256 is reason_digest, or with none where the workspace asks for none: reason_digest null and reason_length 0), the coding agent's own permission prompt was offered for it (harness_prompt), or it matched a standing allowance (allowance: repeat_of names the allowance and reason_digest is the SHA-256 of the reason it was made with). Present only with realtime_result "approved". |
receipt.payload.intent
The action the agent signed (the ACTA payload_digest source).
| Field | Required | Shape | Description |
|---|
action_type | yes | string | |
asset | no | string | |
amount | no | integer, min 0 | |
params | no | object | |
receipt.payload.action_ref
| Field | Required | Shape | Description |
|---|
action_id | no | string, length 16–200 | |
authorized_intent_hash | yes | string, pattern ^[0-9a-f]{64}$ | |
evidence_intent_hash | yes | string, pattern ^[0-9a-f]{64}$ | |
receipt.payload.policy_ref
| Field | Required | Shape | Description |
|---|
id | yes | string \| null | |
version | yes | integer, min 1 | |
digest | yes | string, pattern ^[0-9a-f]{64}$ | |
receipt.payload.execution
| Field | Required | Shape | Description |
|---|
state | yes | "simulated" · "observed_not_evaluated" · "denied" · "allowed_pending" · "cooperative_allow" · "executed" · "failed" · "outcome_unknown" · "observed_after" | |
assertion | yes | "none" · "gateway_simulation" · "adapter_reported_success" · "adapter_reported_failure" · "adapter_outcome_unknown" | |
reference | yes | string \| null | |
external_effect | yes | const "not_independently_verified" | |
receipt.payload.redaction
| Field | Required | Shape | Description |
|---|
profile | yes | const "scopebond:minimized-intent/v1" | |
paths | yes | array, items: string | |
| Field | Required | Shape | Description |
|---|
mode | yes | const "authenticated" | |
agent | yes | see intentAuthorization | |
approval | yes | see approval or null | |
| Field | Required | Shape | Description |
|---|
mode | yes | const "insecure_development" | |
agent | yes | null | |
approval | yes | null | |
No agent authorization — a gate attested a consequence (boundary-class receipts). Identity is the receipt's boundary attribution.
| Field | Required | Shape | Description |
|---|
mode | yes | const "boundary" | |
agent | yes | null | |
approval | yes | null | |
No agent signature — a proxy/PEP decided a request carrying the caller's own identity (pep_authorized receipts). Identity is the receipt's principal.
| Field | Required | Shape | Description |
|---|
mode | yes | const "pep" | |
agent | yes | null | |
approval | yes | null | |
receipt.payload.attester
| Field | Required | Shape | Description |
|---|
kind | yes | "gateway" · "module" · "resource" | |
kid | yes | string | |
receipt.payload.principal
Required for pep_authorized: the validated identity subject and issuer.
| Field | Required | Shape | Description |
|---|
subject | yes | string, length 1+ | |
issuer | yes | string, length 1+ | |
receipt.payload.boundary
Required for boundary: the gate that decided a consequence and the attributed actor.
| Field | Required | Shape | Description |
|---|
gate | yes | "merge" · "deploy" · "egress" · "platform_event" | |
outcome_ref | yes | string, length 1+ | |
attribution | yes | object | |
receipt.payload.boundary.attribution
| Field | Required | Shape | Description |
|---|
kind | yes | "asserted" · "inferred" | |
actor | yes | string, length 1+ | |
receipt.payload.context
Optional. Where the receipt was produced, so records can be grouped by session and filtered by tool, model and repository. Carries no local paths, no credentials and no prompts. Covered by the signature like every other payload field. A receipt check that predates this member reports a receipt carrying it as invalid (the payload is closed); verify with a release that knows context.
| Field | Required | Shape | Description |
|---|
harness | no | string \| null, pattern ^[a-z][a-z0-9-]{0,39}$ | The connector or coding tool that produced the receipt: claude, cursor, codex, copilot, gateway, ... |
harness_version | no | string \| null, length 1–64 | The version that tool reports, when it reports one. |
model | no | string \| null, length 1–128 | The model id the tool reports, when it reports one. |
session_id | no | string \| null, length 1–200 | An opaque session id the connector assigns (never the tool's raw session id). |
repository | no | string \| null, pattern ^[a-z0-9][a-z0-9.-]*(/(?![.]{1,2}(/|$))(?!%2[eE])[A-Za-z0-9._~%+-]+){2,}$, length 1–200 | The git remote origin as host/owner/name: lowercase host, no scheme, credentials, query, .git suffix or dot segments (., .., %2e...). Null when unknown; never a local path. |
branch | no | string \| null, length 1–200 | The current branch, when known. |
receipt.payload.budget
Optional. A session budget counted or refused this action (session-budgets.schema.json): which budget, the action type counted, the count with this action and the limit, and the state. within / at_limit: counted and allowed. over: beyond the limit (denied under enforce, recorded under monitor). unavailable: the hook could not read or write its count, so it denied. A receipt check that predates this member reports a receipt carrying it as invalid (the payload is closed).
| Field | Required | Shape | Description |
|---|
version | yes | const 1 | |
scope | yes | const "session" | |
budget_id | yes | string, pattern ^[A-Za-z0-9._:-]{8,128}$ | |
budget_version | yes | integer, min 1 | |
mode | yes | "enforce" · "monitor" | |
operation | yes | string, pattern ^[a-z][a-z0-9_]*(\.[a-z0-9_]+)+$ | |
count | yes | integer, min 0 | |
max | yes | integer, min 0 | |
state | yes | "within" · "at_limit" · "over" · "unavailable" | |
receipt.payload.override
A person at the computer allowed an action a rule blocked (agent_dialog, with a reason whose SHA-256 is reason_digest, or with none where the workspace asks for none: reason_digest null and reason_length 0), the coding agent's own permission prompt was offered for it (harness_prompt), or it matched a standing allowance (allowance: repeat_of names the allowance and reason_digest is the SHA-256 of the reason it was made with). Present only with realtime_result "approved".
| Field | Required | Shape | Description |
|---|
version | yes | const 1 | |
rule | yes | string, pattern ^[a-z0-9-]{1,64}$ | |
method | yes | "agent_dialog" · "harness_prompt" · "allowance" | |
state | yes | "allowed" · "offered" | |
repeat_of | yes | null or string, length 16–200 | |
reason_digest | yes | null or string, pattern ^[0-9a-f]{64}$ | |
reason_length | yes | null or integer, min 0 | |
os_user_digest | yes | null or string, pattern ^[0-9a-f]{64}$ | |
decided_at | yes | string, format date-time | |
receipt.signature
| Field | Required | Shape | Description |
|---|
alg | yes | "Ed25519" · "ES256" · "secp256k1" · "EIP-712" | |
sig | yes | string | |
Consistency rules
The schema enforces these if/then relations inside payload:
- if `
= ? then realtime_result = "approved"` - if `
= ? then = ?` - if `
= ? then realtime_result = ?` - if
evidence_class = "boundary" then ` = ?, otherwise = ?` - if
evidence_class = "pep_authorized" then ` = ?, otherwise = ?` - if
execution.state = ? then executed = true, otherwise executed = false - if
execution.state = "observed_after" then realtime_result = "deny" - if
execution.state = "simulated" then execution.assertion = "gateway_simulation" - if
execution.state = "observed_not_evaluated" then realtime_result = "not_evaluated", otherwise realtime_result ≠ "not_evaluated"
Definitions ($defs)
identity
| Field | Required | Shape | Description |
|---|
kid | yes | string, pattern ^key:[0-9a-f]{16}$ | |
alg | yes | const "Ed25519" | |
intentAuthorization
| Field | Required | Shape | Description |
|---|
version | yes | const "1.0" | |
request_id | yes | string, pattern ^[A-Za-z0-9._:-]+$, length 16–200 | |
issued_at | yes | string, format date-time | |
expires_at | yes | string, format date-time | |
signer | yes | see identity | |
intent_hash | yes | string, pattern ^[0-9a-f]{64}$ | |
signature | yes | string, length 40+ | |
approval
| Field | Required | Shape | Description |
|---|
version | yes | const "1.0" | |
approval_id | yes | string, pattern ^[A-Za-z0-9._:-]+$, length 16–200 | |
issued_at | yes | string, format date-time | |
expires_at | yes | string, format date-time | |
approver | yes | see identity | |
intent_hash | yes | string, pattern ^[0-9a-f]{64}$ | |
policy_ref | yes | object | |
decision | yes | const "approve" | |
signature | yes | string, length 40+ | |