@agent-blueprint-protocol/verifier 0.8.3 → 1.0.0-rc.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (123) hide show
  1. package/CHANGELOG.md +137 -0
  2. package/LICENSE +1 -1
  3. package/NOTICE +2 -2
  4. package/README.md +164 -255
  5. package/dist/corpus/cases/blueprint-decode.json +1 -1
  6. package/dist/corpus/cases/bounds-new.json +1 -1
  7. package/dist/corpus/cases/bounds_algebra-intersect.json +1 -1
  8. package/dist/corpus/cases/canonicalization-encode.json +1 -1
  9. package/dist/corpus/cases/deployment-decode.json +1 -1
  10. package/dist/corpus/cases/extension-resolve.json +1 -1
  11. package/dist/corpus/cases/federation-decode.json +1 -1
  12. package/dist/corpus/cases/federation-verify_commitment.json +1 -1
  13. package/dist/corpus/cases/json-decode.json +1 -1
  14. package/dist/corpus/cases/negotiation-negotiate.json +1 -1
  15. package/dist/corpus/cases/predicate.json +1 -0
  16. package/dist/corpus/cases/reconcile.json +1 -0
  17. package/dist/corpus/cases/schema-validate_instance.json +1 -1
  18. package/dist/corpus/cases/signature-verify.json +1 -1
  19. package/dist/corpus/index.json +1 -1
  20. package/dist/kit/cli.mjs +1 -4
  21. package/dist/release-history.json +1 -0
  22. package/dist/release-metadata.json +1 -1
  23. package/dist/spec/FOUNDATION-TRANSITION.md +67 -0
  24. package/dist/spec/IPR.md +27 -0
  25. package/dist/spec/LICENSE +190 -0
  26. package/dist/spec/NOTICE +4 -0
  27. package/dist/spec/README.md +47 -0
  28. package/dist/spec/conformance/base64url-decode.schema.json +176 -0
  29. package/dist/spec/conformance/blueprint-decode.schema.json +280 -0
  30. package/dist/spec/conformance/bounds-new.schema.json +302 -0
  31. package/dist/spec/conformance/bounds_algebra-intersect.schema.json +457 -0
  32. package/dist/spec/conformance/canonicalization-encode.schema.json +280 -0
  33. package/dist/spec/conformance/case-file.schema.json +122 -0
  34. package/dist/spec/conformance/certified-results.json +1 -0
  35. package/dist/spec/conformance/claim.schema.json +52 -0
  36. package/dist/spec/conformance/compatibility-verify.schema.json +262 -0
  37. package/dist/spec/conformance/deployment-decode.schema.json +322 -0
  38. package/dist/spec/conformance/digest-tagged.schema.json +200 -0
  39. package/dist/spec/conformance/evidence.schema.json +249 -0
  40. package/dist/spec/conformance/execution.md +80 -0
  41. package/dist/spec/conformance/extension-resolve.schema.json +264 -0
  42. package/dist/spec/conformance/federation-decode.schema.json +318 -0
  43. package/dist/spec/conformance/federation-verify_commitment.schema.json +342 -0
  44. package/dist/spec/conformance/index.schema.json +102 -0
  45. package/dist/spec/conformance/json-decode.schema.json +287 -0
  46. package/dist/spec/conformance/negotiation-negotiate.schema.json +264 -0
  47. package/dist/spec/conformance/portability-scan.schema.json +188 -0
  48. package/dist/spec/conformance/predicate.schema.json +201 -0
  49. package/dist/spec/conformance/reconcile.schema.json +287 -0
  50. package/dist/spec/conformance/runner.md +182 -0
  51. package/dist/spec/conformance/schema-validate_instance.schema.json +206 -0
  52. package/dist/spec/conformance/signature-verify.schema.json +224 -0
  53. package/dist/spec/conformance/support.schema.json +72 -0
  54. package/dist/spec/errata.md +13 -0
  55. package/dist/spec/grammar/blueprint.cddl +92 -0
  56. package/dist/spec/grammar/deployment.cddl +125 -0
  57. package/dist/spec/grammar/derived/blueprint.schema.json +340 -0
  58. package/dist/spec/grammar/derived/deployment.schema.json +496 -0
  59. package/dist/spec/grammar/derived/taskenvelope.schema.json +244 -0
  60. package/dist/spec/grammar/taskenvelope.cddl +77 -0
  61. package/dist/spec/protocol.md +1238 -0
  62. package/dist/spec/registry/OPERATIONS.md +69 -0
  63. package/dist/spec/registry/registry.json +68 -0
  64. package/dist/verifier/b64url.d.ts +6 -2
  65. package/dist/verifier/b64url.js +7 -1
  66. package/dist/verifier/blueprint.d.ts +12 -16
  67. package/dist/verifier/blueprint.js +40 -112
  68. package/dist/verifier/bounds.d.ts +1 -1
  69. package/dist/verifier/bounds.js +2 -2
  70. package/dist/verifier/bounds_algebra.d.ts +9 -0
  71. package/dist/verifier/bounds_algebra.js +10 -7
  72. package/dist/verifier/canonical.d.ts +1 -1
  73. package/dist/verifier/canonical.js +41 -8
  74. package/dist/verifier/cli.js +97 -45
  75. package/dist/verifier/compatibility.js +5 -7
  76. package/dist/verifier/corpus.d.ts +1 -1
  77. package/dist/verifier/corpus.js +10 -2
  78. package/dist/verifier/decode.js +24 -6
  79. package/dist/verifier/deployment.d.ts +20 -3
  80. package/dist/verifier/deployment.js +48 -10
  81. package/dist/verifier/digest.d.ts +12 -0
  82. package/dist/verifier/digest.js +17 -3
  83. package/dist/verifier/errors.d.ts +2 -0
  84. package/dist/verifier/errors.js +1 -0
  85. package/dist/verifier/execution.d.ts +13 -0
  86. package/dist/verifier/execution.js +82 -0
  87. package/dist/verifier/extension.js +4 -4
  88. package/dist/verifier/facade.d.ts +325 -0
  89. package/dist/verifier/facade.js +78 -0
  90. package/dist/verifier/federation.d.ts +2 -2
  91. package/dist/verifier/federation.js +26 -79
  92. package/dist/verifier/harness.d.ts +16 -0
  93. package/dist/verifier/harness.js +201 -0
  94. package/dist/verifier/index.d.ts +3 -0
  95. package/dist/verifier/index.js +2 -0
  96. package/dist/verifier/mapping.d.ts +139 -0
  97. package/dist/verifier/mapping.js +1 -0
  98. package/dist/verifier/negotiation.d.ts +2 -1
  99. package/dist/verifier/negotiation.js +12 -3
  100. package/dist/verifier/plain.d.ts +4 -0
  101. package/dist/verifier/plain.js +38 -0
  102. package/dist/verifier/portability.d.ts +1 -1
  103. package/dist/verifier/portability.js +19 -6
  104. package/dist/verifier/predicate.d.ts +7 -0
  105. package/dist/verifier/predicate.js +63 -7
  106. package/dist/verifier/reconcile.d.ts +37 -0
  107. package/dist/verifier/reconcile.js +115 -0
  108. package/dist/verifier/registry.js +10 -1
  109. package/dist/verifier/registry_engine.d.ts +3 -0
  110. package/dist/verifier/registry_engine.js +37 -20
  111. package/dist/verifier/report.d.ts +8 -0
  112. package/dist/verifier/report.js +9 -2
  113. package/dist/verifier/results.d.ts +3 -0
  114. package/dist/verifier/results.js +13 -0
  115. package/dist/verifier/run_corpus.js +4 -80
  116. package/dist/verifier/runner.d.ts +6 -0
  117. package/dist/verifier/runner.js +123 -17
  118. package/dist/verifier/schema.js +14 -55
  119. package/dist/verifier/signature.d.ts +19 -8
  120. package/dist/verifier/signature.js +51 -29
  121. package/dist/verifier/value.d.ts +9 -2
  122. package/dist/verifier/value.js +81 -11
  123. package/package.json +17 -12
@@ -0,0 +1,1238 @@
1
+ # Agent Blueprint Protocol — specification
2
+
3
+ Status: normative protocol 1.0. This document is
4
+ the normative specification of the Agent Blueprint Protocol. The
5
+ reference implementation and its conformance corpus (digest
6
+ `sha-256:oYnkSmTkHGk4AmZ8Sul99_6KYJUIuj2SN2GZAiT1glw`, 604 cases) are
7
+ certified against this document at every release through the release
8
+ identity chain — the specification digest, the package version, and the
9
+ corpus and registry digests are pinned together per release, and the
10
+ release-candidate check asserts the chain from live state. Where this
11
+ document and the implementation disagree, one of them is defective and
12
+ the release does not ship until the chain is reconciled.
13
+
14
+ The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
15
+ "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and
16
+ "OPTIONAL" in this document are to be interpreted as described in
17
+ BCP 14 [RFC2119] [RFC8174] when, and only when, they appear in all
18
+ capitals, as shown here. Keywords apply to what a conforming
19
+ implementation (the Conformance clause) is required to do; prose that
20
+ describes the reference implementation without stating a requirement is
21
+ informative.
22
+
23
+ **The protocol is non-authorizing.** It validates structure, canonical
24
+ bytes, bounds, compatibility, and evidence. Protocol validity never
25
+ grants authority: a consuming host remains responsible for identity,
26
+ tenancy, live policy, effect ownership, execution, and evidence
27
+ retention. Every verification result — including a fully green one — is
28
+ evidence, never a decision.
29
+
30
+ ## 1. Scope, non-goals, and terminology
31
+
32
+ Two language-neutral artifacts:
33
+
34
+ - **Blueprint Core** — stable identity, typed ports, logical capability
35
+ requirements, bounds, evidence commitments, registered extensions.
36
+ - **Deployment Manifest** — environment-local tool, principal, data,
37
+ authority, effect, evaluation, and exact-build bindings for one
38
+ Blueprint release digest.
39
+
40
+ Deliberately out of scope (host-owned): runtime kernel, live authority
41
+ and grants, effect admission/replay/recovery, product schemas, transport
42
+ clients, billing, evaluation truth. The reference implementation is an inert library (§16).
43
+
44
+ ### Terminology
45
+
46
+ - **Artifact** — a Blueprint or Deployment Manifest value together with
47
+ its exact canonical bytes; the artifact's identity is its content
48
+ digest — the digest of the artifact's digest-covered members over
49
+ those canonical bytes (the digest section defines the exact input;
50
+ the digest member itself, signatures, and attestations are
51
+ excluded).
52
+ - **Host** — the consuming runtime. Every non-establishment obligation
53
+ in this protocol belongs to a host, and a green result never
54
+ transfers one to the package.
55
+ - **Deny** — the fail-closed outcome: a typed error code with subject
56
+ and optional detail. A deny is never a repair and never a silent
57
+ skip; where this document states a requirement as a deny, the
58
+ requirement is absolute (MUST-level) and the error code named is the
59
+ code that enforces it.
60
+ - **Quarantine** — retain byte-exactly without validating or executing:
61
+ an unknown optional extension's payload round-trips, is typed as
62
+ unscanned, and confers no portability claim.
63
+ - **Clamp** — the effective narrowing of an operational bound, emitted
64
+ with evidence whenever effective differs from requested; protected
65
+ bounds deny instead of clamping.
66
+ - **Ceiling vs bound** — operational bounds are magnitude limits that
67
+ narrow pointwise; protected ceilings are ordinal-lattice positions
68
+ (classification, disclosure, effect impact, authority, approval) that
69
+ never widen and deny narrowing by default (both in the evolution
70
+ laws). A parse ceiling is neither: it is a tighten-only decoder
71
+ limit, never an intersection input.
72
+ - **Evidence** — a structured observation about bytes or structure:
73
+ per-surface check results, clamp records, and the non-empty
74
+ `not_verified` set naming what was NOT established. Evidence is
75
+ input to a host decision; it is never a decision.
76
+ - **Portability** — the property that an artifact carries no
77
+ environment-bound values (secrets, keys, grants, tenant ids,
78
+ endpoints, engine ids); enforced structurally and honestly limited
79
+ (the portability section).
80
+ - **Posture** — the declared stance of a surface: fail-closed (deny),
81
+ acknowledge-and-record (clamp with evidence, or a typed notice), or
82
+ opt-in (a host-supplied policy).
83
+ - **Authored channel** — the validated critical-extension path by which a
84
+ producer-declared critical extension body, validated against a
85
+ digest-pinned host schema, is treated as authored content and spared
86
+ the generic value-shape heuristics (still covered by the artifact's
87
+ digest).
88
+
89
+ ## 2. Artifacts and the closed world
90
+
91
+ Both artifacts MUST decode as JSON objects under the bounded ceilings
92
+ (depth, members, items, nodes, string bytes, key bytes, number lexemes
93
+ — the ceiling family). Decoding MUST be fail-closed under the pinned
94
+ failure precedence: unknown member → missing required → type →
95
+ constraint → cardinality → nested → cross-field hooks.
96
+
97
+ The registries are closed worlds — the exact member sets the shipped
98
+ tables define:
99
+
100
+ - **Blueprint Core (18 members).** Required: `blueprint_id`,
101
+ `protocol_revision`, `producer`, `release_number`,
102
+ `capability_requirements`, `input_ports`, `output_ports`,
103
+ `output_contract`, `triggers`, `ceilings`, `classification_ceiling`,
104
+ `effect_intents`, `evaluation_assertions`, `extensions`,
105
+ `required_core_fields`, `content_digest`. Optional: `signatures`,
106
+ `attestations`.
107
+ - **Deployment Manifest (19 members).** Required: `protocol_revision`,
108
+ `blueprint_release`, `scope_projection`, `tool_bindings`,
109
+ `data_bindings`, `authority_requirement`, `effect_owner`,
110
+ `signer_custody`, `eligibility`, `model_policy`, `host_bounds`,
111
+ `lifecycle`, `build_identities`, `evaluation_binding`, `extensions`,
112
+ `required_core_fields`, `deployment_digest`. Optional: `signatures`,
113
+ `attestations`.
114
+
115
+ Every core member addition MUST be accompanied by a protocol revision
116
+ increment: an older consumer rejects an unknown member, so the
117
+ vocabulary can only evolve at a revision boundary. Protocol revisions and verification semantics are separate axes (§7).
118
+ Release package versions do not appear in the artifact grammar.
119
+
120
+ A complete, valid Blueprint as it travels on the wire (the conformance
121
+ corpus's `blueprint-decode-valid` case, byte-exact — every fenced
122
+ JSON example in this specification is a corpus case):
123
+
124
+ ```json-corpus:blueprint-decode-valid
125
+ {"blueprint_id":"example.demo/echo","capability_requirements":[{"approval_trait":"none","argument_schema":{"type":"object"},"authority_trait":"none","classification_ceiling":"internal","impact_class":"ordinary","operation_family":"example.demo.read_shape","operation_kind":"read","result_schema":{"type":"object"}}],"ceilings":{"max_attempts":3,"max_concurrency":2,"max_cost":{"amount":1000,"currency":"USD"},"max_depth":8,"max_descendants":64,"max_elapsed_ms":60000,"max_fan_out":4,"max_tokens":100000},"classification_ceiling":"internal","content_digest":"sha-256:b1Aw4cU5AbV9k8bdbZkRCsySDHGpTAwB-aQm57Wh7B8","effect_intents":[{"impact_class":"ordinary","logical_operation":"record_summary","operation_kind":"mutation"}],"evaluation_assertions":[{"kind":"output_schema","port":"result","schema":{"type":"object"}}],"extensions":{"critical":{},"optional":{}},"input_ports":[{"classification_ceiling":"internal","name":"request","required":true,"schema":{"type":"object"}}],"output_contract":{"classification_ceiling":"internal","port":"result"},"output_ports":[{"classification_ceiling":"internal","name":"result","required":true,"schema":{"type":"object"}}],"producer":{"created_at":"2026-08-20T00:00:00Z","identity":"example.demo","toolchain":"example.demo.toolchain"},"protocol_revision":1,"release_number":1,"required_core_fields":[],"triggers":["manual"]}
126
+ ```
127
+
128
+ ### Member grammar — Blueprint Core (18 members)
129
+
130
+ Cardinality `1` members are required; `0..1` members are optional.
131
+ The failure precedence is the pinned closed-world order: unknown
132
+ member → missing required → type → constraint → cardinality →
133
+ nested → cross-field hooks. Every sub-member listed inside an
134
+ object/array type is required unless marked `(opt)`. The machine-
135
+ readable grammar artifacts (CDDL under `spec/grammar/`, with the
136
+ derived JSON Schema beside them) are bound to these tables by the
137
+ grammar-derivation gate: root member sets and required flags are
138
+ cross-read against the compiled registries, and the corpus goldens
139
+ validate under the derived schemas. The derived schemas close the
140
+ artifact root; sub-object closure and cross-member hooks remain the
141
+ reference implementation's to enforce.
142
+
143
+ | Member | Card. | Type | Constraints |
144
+ |---|---|---|---|
145
+ | `blueprint_id` | 1 | string | value: producer-qualified name |
146
+ | `capability_requirements` | 1 | array<object{ operation_family:string; argument_schema:custom; result_schema:custom; operation_kind:enum(computation\|mutation\|read); impact_class:enum(authority\|money\|ordinary\|secret); classification_ceiling:enum(confidential\|internal\|public\|restricted); approval_trait:enum(human_required\|none\|separated_human_required); authority_trait:enum(external_authority_required\|local_policy\|none) }> | max 64, unique by operation_family |
147
+ | `ceilings` | 1 | object{ max_attempts:integer; max_concurrency:integer; max_depth:integer; max_descendants:integer; max_elapsed_ms:integer; max_fan_out:integer; max_tokens:integer; max_cost:object{ amount:integer; currency:string } } | — |
148
+ | `classification_ceiling` | 1 | enum(confidential\|internal\|public\|restricted) | — |
149
+ | `effect_intents` | 1 | array<object{ logical_operation:string; operation_kind:enum(computation\|mutation\|read); impact_class:enum(authority\|money\|ordinary\|secret) }> | max 64, unique by logical_operation |
150
+ | `evaluation_assertions` | 1 | array<custom> | max 128 |
151
+ | `extensions` | 1 | custom | — |
152
+ | `input_ports` | 1 | array<object{ name:string; schema:custom; classification_ceiling:enum(confidential\|internal\|public\|restricted); required:boolean }> | max 64, unique by name |
153
+ | `output_contract` | 1 | object{ port:string; classification_ceiling:enum(confidential\|internal\|public\|restricted) } | — |
154
+ | `output_ports` | 1 | array<object{ name:string; schema:custom; classification_ceiling:enum(confidential\|internal\|public\|restricted); required:boolean }> | max 64, unique by name |
155
+ | `producer` | 1 | object{ identity:string; created_at:string; toolchain:string } | — |
156
+ | `protocol_revision` | 1 | integer | value: positive integer |
157
+ | `release_number` | 1 | integer | value: positive integer |
158
+ | `required_core_fields` | 1 | array<string> | unique by value |
159
+ | `triggers` | 1 | array<enum(condition\|delegated\|evaluation\|manual\|schedule)> | min 1, unique by value |
160
+ | `signatures` | 0..1 | array<custom> | max 16 |
161
+ | `attestations` | 0..1 | array<any> | max 16 |
162
+ | `content_digest` | 1 | string | value: tagged digest |
163
+
164
+ ### Member grammar — Deployment Manifest (19 members)
165
+
166
+ Cardinality `1` members are required; `0..1` members are optional.
167
+ The failure precedence is the pinned closed-world order: unknown
168
+ member → missing required → type → constraint → cardinality →
169
+ nested → cross-field hooks. Every sub-member listed inside an
170
+ object/array type is required unless marked `(opt)`. The machine-
171
+ readable grammar artifacts (CDDL under `spec/grammar/`, with the
172
+ derived JSON Schema beside them) are bound to these tables by the
173
+ grammar-derivation gate: root member sets and required flags are
174
+ cross-read against the compiled registries, and the corpus goldens
175
+ validate under the derived schemas. The derived schemas close the
176
+ artifact root; sub-object closure and cross-member hooks remain the
177
+ reference implementation's to enforce.
178
+
179
+ | Member | Card. | Type | Constraints |
180
+ |---|---|---|---|
181
+ | `authority_requirement` | 1 | object{ adapter_identity:string; profile_identity:string } | — |
182
+ | `blueprint_release` | 1 | object{ blueprint_id:string; release_number:integer; content_digest:string } | — |
183
+ | `build_identities` | 1 | array<object{ kind:enum(adapter\|build\|extension\|package); name:string; version:string; digest:string }> | max 128, min 1, unique by name |
184
+ | `data_bindings` | 1 | array<object{ logical_dataset:string; classification_ceiling:enum(confidential\|internal\|public\|restricted); as_of:object{ mode:enum(none\|required); max_age_ms:custom } }> | max 64, unique by logical_dataset |
185
+ | `effect_owner` | 1 | object{ adapter_identity:string; idempotency:object{ key_derivation:enum(host); recovery:enum(authoritative\|none) } } | — |
186
+ | `eligibility` | 1 | object{ owner:custom; beneficiary:custom; runtime_principal:custom } | — |
187
+ | `evaluation_binding` | 1 | object{ adapter_identity:string; corpus:object{ name:string; digest:string } } | — |
188
+ | `extensions` | 1 | custom | — |
189
+ | `host_bounds` | 1 | object{ approval_trait:enum(human_required\|none\|separated_human_required); authority_trait:enum(external_authority_required\|local_policy\|none); classification_ceiling:enum(confidential\|internal\|public\|restricted); disclosure_ceiling:enum(detail\|full\|none\|summary); effect_impact_ceiling:enum(authority\|money\|ordinary\|secret); max_attempts:integer; max_concurrency:integer; max_cost:object{ amount:integer; currency:string }; max_depth:integer; max_descendants:integer; max_elapsed_ms:integer; max_fan_out:integer; max_tokens:integer } | — |
190
+ | `lifecycle` | 1 | object{ state:enum(active\|draft\|retired); activated_at (opt):string; retired_at (opt):string } | — |
191
+ | `model_policy` | 1 | object{ allowed_model_roles:array<string>; max_tokens:integer; max_cost:object{ amount:integer; currency:string } } | — |
192
+ | `protocol_revision` | 1 | integer | value: positive integer |
193
+ | `required_core_fields` | 1 | array<string> | unique by value |
194
+ | `scope_projection` | 1 | object{ adapter_identity:string } | — |
195
+ | `signer_custody` | 1 | enum(external_kms\|holder_edge\|host_managed) | — |
196
+ | `tool_bindings` | 1 | array<object{ logical_operation:string; adapter_identity:string; descriptor_digest:string; schema_digest:string; attested_at:string }> | max 128, unique by logical_operation |
197
+ | `signatures` | 0..1 | array<custom> | max 16 |
198
+ | `attestations` | 0..1 | array<any> | max 16 |
199
+ | `deployment_digest` | 1 | string | value: tagged digest |
200
+
201
+ Every `max_cost.amount`, including Blueprint `ceilings`, Deployment
202
+ `host_bounds`, and `model_policy`, is an integer count of millionths
203
+ (10^-6) of one unit of the currency named by `currency`. The currency is an
204
+ three-uppercase-letter string matching `[A-Z]{3}`; verifiers check that
205
+ pattern, and the currency's meaning is ISO 4217. The scale never depends on the
206
+ currency's minor-unit exponent. Thus `amount: 1000, currency: "USD"` means
207
+ 0.001 USD, with no floating-point amount.
208
+
209
+ ### Identifier and timestamp profiles
210
+
211
+ The following ABNF uses ASCII code points. Each identifier or qualified
212
+ name is at most 512 UTF-8 bytes. These productions apply only to members
213
+ whose grammar names that profile; arbitrary port names and nonempty build
214
+ identity strings are not silently restricted to it.
215
+
216
+ ```abnf
217
+ lower = %x61-7A
218
+ digit = %x30-39
219
+ identifier = (lower / digit) *(lower / digit / "." / "_" / "-")
220
+ producer-qualified-name = identifier "/" identifier
221
+ namespace-part = (lower / digit) *(lower / digit / "." / "-")
222
+ namespace = namespace-part "/" namespace-part
223
+ ```
224
+
225
+ `producer.identity` uses `identifier`; `blueprint_id` uses the qualified
226
+ name. Federation identifier fields use `identifier`. Namespace decoding
227
+ uses the last production, at most 512 bytes; registration additionally
228
+ applies the stricter MCP-compatible label rules in protocol §8. Corpus references:
229
+ `blueprint-decode-valid`, `federation-decode-valid`, and the namespace
230
+ cases on `extension.resolve`.
231
+
232
+ `created_at`, binding `attested_at`, and lifecycle timestamp members use a
233
+ calendar-valid RFC 3339 profile: exactly `YYYY-MM-DDTHH:MM:SSZ`, four-digit
234
+ year, uppercase `T` and `Z`, whole seconds, no offset, fraction, leap second,
235
+ or zone annotation. Verifiers check the timestamp format and never judge
236
+ its time.
237
+ Signature `created_at` is authenticated and never compared to a clock by
238
+ signature verification or reconcile. The signature algorithm cases and
239
+ `reconcile-partial-observations` exercise these distinctions.
240
+
241
+ ### Decoder limits
242
+
243
+ | Name | Maximum |
244
+ |---|---|
245
+ | `bytes` | 5,000,000 |
246
+ | `depth` | 64 |
247
+ | `members` | 1,000 |
248
+ | `items` | 10,000 |
249
+ | `nodes` | 200,000 |
250
+ | `string` | 100,000 UTF-8 bytes |
251
+ | `key` | 1,000 UTF-8 bytes |
252
+ | `number_lexeme` | 64 bytes |
253
+
254
+ `members` and `items` apply per container; `nodes` applies to the entire
255
+ value. An override MUST be a positive integer no larger than the maximum.
256
+ A ceiling failure is `ceiling:<name>`. The `bounds.new`, `json.decode`, and
257
+ `canonicalization.encode` exact-bound and maximum-plus-one cases certify
258
+ these rules. Every string is valid Unicode; no normalization is performed.
259
+ Equality compares code points exactly. String ordering uses code-point
260
+ order (equivalently UTF-8 byte order for valid scalar values), while JCS
261
+ object-key sorting uses UTF-16 code units as required by RFC 8785.
262
+ The grammar-defined identifiers above are ASCII. Arbitrary JSON strings
263
+ and free string members can contain other Unicode scalar values.
264
+
265
+ ## 3. Bytes
266
+
267
+ - **Encoding:** interchange bytes MUST be UTF-8 JSON within the decoder
268
+ ceilings. Duplicate members MUST deny `duplicate_member` (I-JSON);
269
+ trailing bytes MUST deny `trailing_bytes`.
270
+ - **Integer window:** a pure-digit lexeme above ±(2^53−1) decodes as a
271
+ float iff that double's canonical ECMAScript serialization reproduces
272
+ the lexeme byte-exactly; every other above-bound lexeme MUST deny
273
+ `number_not_double_expressible`. Core fields are integer-typed by
274
+ schema: a float-tagged window value in a core field MUST deny
275
+ `invalid_type`.
276
+ - **base64url:** unpadded, exact alphabet; padded input MUST deny
277
+ `base64url_padded`, non-alphabet input MUST deny `base64url_invalid`.
278
+ - **Canonicality:** interchange bytes MUST already be canonical —
279
+ decode → re-encode → byte-compare; non-canonical bytes MUST deny
280
+ `non_canonical_bytes` before any semantic read, and digests MUST be
281
+ computed only over the exact received bytes.
282
+
283
+ The byte ceiling is checked first; containers check depth after an opening
284
+ delimiter has a following token, then check completed members or elements
285
+ in order (cardinality, key size, nodes, number or string size), reject
286
+ duplicates at object close, and reject trailing bytes before root node or
287
+ scalar checks; a missing or invalid value delimiter is a syntax error
288
+ before that value's sink checks.
289
+
290
+ ## 4. Canonicalization
291
+
292
+ The canonical form MUST be RFC 8785 JSON Canonicalization Scheme:
293
+
294
+ - No whitespace between tokens (§3.2.1).
295
+ - Control characters U+0000–U+001F escaped as lowercase `\uXXXX` except
296
+ the five short escapes; `"` and `\` escaped; a lone surrogate denies
297
+ (§3.2.2.2).
298
+ - Numbers per ECMA-262 7.1.12.1 including the Note 2 enhancement:
299
+ `1.0 → "1"`, `1.0e22 → "1e+22"`, `-0.0 → "0"`, `5.0e-324 → "5e-324"`,
300
+ `1.7976931348623157e308 → "1.7976931348623157e+308"`; NaN and Infinity
301
+ deny (§3.2.2.3).
302
+ - Object members sorted as UTF-16 code units compared as unsigned
303
+ integers (§3.2.3) — NOT by UTF-8 byte order: for `U+FF3A` vs
304
+ `U+10000`, UTF-16 order puts `U+10000` first.
305
+
306
+ On the conformance `canonicalization.encode` surface, input JSON is decoded
307
+ under the profile maxima before encoder bounds are applied.
308
+
309
+ ## 5. Digest
310
+
311
+ ```
312
+ digest_bytes = SHA-256( UTF8(domain_separator) || zero_octet || UTF8(JCS(digest_input)) )
313
+ ```
314
+
315
+ `digest_input` is the artifact object minus `content_digest` (or
316
+ `deployment_digest`), `signatures`, and `attestations` — everything
317
+ else is covered, including extensions and unknown-but-optional
318
+ extension payloads retained verbatim.
319
+
320
+ | Purpose | Separator |
321
+ |---|---|
322
+ | Blueprint content | `agent-blueprint-protocol/blueprint-content` |
323
+ | Deployment content | `agent-blueprint-protocol/deployment-content` |
324
+ | Federation envelope | `agent-blueprint-protocol/federation-envelope` |
325
+ | Signature (reserved; not part of the signing input, §6) | `agent-blueprint-protocol/signature` |
326
+ | Extension schema | `agent-blueprint-protocol/extension-schema` |
327
+ | Extension registry | `agent-blueprint-protocol/extension-registry` |
328
+ | Conformance report | `agent-blueprint-protocol/conformance-report` |
329
+ | Corpus index | `agent-blueprint-protocol/corpus-index` |
330
+
331
+ Separators carry no version token: `protocol_revision` is itself a
332
+ covered member. The wire form MUST be the self-identifying tagged string
333
+ `sha-256:<43-char unpadded base64url>`, never a bare hex blob; an
334
+ unknown algorithm tag MUST deny `digest_algorithm_unsupported`, a
335
+ malformed body MUST deny `digest_encoding_invalid`. The algorithm succession
336
+ rule is defined below (protocol §6).
337
+
338
+ ## 6. Signature envelope
339
+
340
+ Signatures are detached and evidence-only. Artifact signature entries
341
+ MUST NOT embed keys; verification uses caller-supplied public keys.
342
+ An entry has exactly `protected` (the header object), `signed_attributes`
343
+ (the attributes object), and `signature` (unpadded base64url of 64 bytes).
344
+ The protected member is an object on this wire, not a compact-JWS string;
345
+ the compact form derives its protected segment from that object’s JCS bytes.
346
+ The `signature.verify` algorithm cases pin this shape.
347
+
348
+ - Format: RFC 7515 compact + RFC 7797 `b64=false` unencoded detached
349
+ payload. The protected header has exactly `alg`, `kid`, `crit: ["b64"]`,
350
+ and `b64: false`. Revision 1 verifiers MUST accept exactly `EdDSA` and
351
+ `Ed25519` as `alg` values; producers SHOULD emit `Ed25519`, the fully
352
+ specified identifier registered by [RFC 9864](https://www.rfc-editor.org/rfc/rfc9864.html).
353
+ `EdDSA` remains valid throughout revision 1. Other strings, including
354
+ case variants and `Ed448`, deny `signature_algorithm_unsupported`.
355
+ The header as presented participates in the signing input: changing
356
+ only its algorithm spelling invalidates the signature.
357
+ An identifier alias for the same algorithm is not algorithm succession.
358
+ A new signature or digest algorithm requires a new protocol revision
359
+ and a verification-semantics increment.
360
+ - `signed_attributes = {algorithm, content_digest, created_at, key_id,
361
+ purpose}` with `purpose` one of `blueprint` | `deployment` |
362
+ `federation-envelope`. The signing input is the RFC 7797 §3 input
363
+ `ASCII(BASE64URL(JCS(protected))) || "." || JCS(signed_attributes)`,
364
+ where `protected` is the exact four-member header; no digest domain
365
+ separator is part of it. A producer whose protected-header segment is
366
+ not the JCS serialization of that header produces a signature that
367
+ MUST deny `signature_not_verified`.
368
+ - `key_id` MUST be a nonempty string and `kid` MUST equal it. Periods are
369
+ permitted: RFC 7797 §5.1 governs this detached payload; §5.2's period
370
+ restriction applies to unencoded non-detached compact payloads. Other
371
+ signature shape, canonicality, and artifact portability checks still apply.
372
+ - Because the digest covers `protocol_revision`, identity members,
373
+ extensions, and `required_core_fields`, a signature cannot be lifted
374
+ onto a different artifact, revision, or purpose; `key_id` prevents key
375
+ substitution. A `key_id` matching no supplied key MUST halt verification
376
+ with `signature_key_unsupported`, including during reconcile — the
377
+ package performs no key discovery, fetch, or trust selection.
378
+ - The attestation kind registry is empty; a nonempty attestation array
379
+ denies `attestation_malformed`.
380
+ - A supplied key whose `key_id` matches but which is not a usable
381
+ Ed25519 public key — not exactly 32 bytes, a non-canonical encoding
382
+ (y ≥ p, or x = 0 with the sign bit set), an encoding that decodes to
383
+ no curve point, or a small-order point (any of the eight 8-torsion
384
+ points, the identity and the order-2 point included) — MUST deny
385
+ `signature_algorithm_unsupported` when no matched key is usable.
386
+ `signature_key_unsupported` is reserved for a `key_id` that matches
387
+ no supplied key.
388
+ - This protocol's strict verification profile: before any curve
389
+ arithmetic, the signature's first half R MUST satisfy the same point
390
+ rule as the public key (canonical encoding, decodes to a curve point,
391
+ not small-order), and its second half S, read as a little-endian
392
+ integer, MUST be less than the group order L = 2^252 +
393
+ 27742317777372353535851937790883648493. A signature failing either
394
+ rule MUST deny `signature_not_verified`, whatever the cryptographic
395
+ backend would conclude. RFC 8032 §5.1.7 specifies the S < L range
396
+ check; canonical encoding and small-order rejection above are this
397
+ protocol's profile. Verification MUST use the cofactorless equation
398
+ [S]B = R + [k]A. Mixed-order points with nonzero prime-order components
399
+ satisfy the point rule; the cofactored equation is insufficient. Under an honest key, R = the identity with
400
+ S = k·a mod L satisfies that equation; only the key holder can build
401
+ it, and this rule denies it.
402
+ - Order of the checks. (1) The envelope parses: exactly the three
403
+ entry members; the exact four-member protected header, where an `alg`
404
+ string other than `EdDSA` or `Ed25519` denies `signature_algorithm_unsupported`
405
+ and any other header violation `signature_malformed`; the exact
406
+ five signed attributes, where an `algorithm` string other than
407
+ `Ed25519` denies `signature_algorithm_unsupported` and any other
408
+ attribute violation `signature_malformed`; `kid` equal to `key_id`;
409
+ and a signature body that decodes (unpadded base64url) to exactly
410
+ 64 bytes — all else `signature_malformed`. (2) The key facts: with no
411
+ supplied key for the `key_id`, `signature_key_unsupported`; with
412
+ matched keys none of which is usable, `signature_algorithm_unsupported`,
413
+ whatever the well-formed 64-byte signature (an all-zero signature
414
+ under a small-order key included). (3) The strict signature rule on R
415
+ and S. (4) The equation. When several keys share the `key_id`, the
416
+ unusable ones are set aside and the signature verifies if any usable
417
+ one verifies it.
418
+
419
+ A second `signatures` entry naming the same `key_id` as an earlier entry
420
+ in the same Blueprint or Deployment denies `invalid_constraint` during
421
+ structure validation. A successful standalone signature verification
422
+ returns its verified signed attributes, including purpose and content digest.
423
+ `created_at` is signed and format-checked as a valid RFC 3339 Z-form
424
+ whole-second timestamp; standalone signature verification and reconcile
425
+ never judge its time.
426
+
427
+ ## 7. Evolution and negotiation
428
+
429
+ `protocol_revision` is a digest-covered body member. This release is
430
+ revision 1. A consumer's support MUST declare an explicit revision SET
431
+ (never a range); a revision outside the set MUST deny
432
+ `protocol_revision_unsupported` — above-max and below-min alike, both
433
+ fail-closed.
434
+
435
+ `required_core_fields` is the producer's declaration of which covered
436
+ core members a consumer must honor. Three checks, all fail-closed:
437
+ every entry names a known core member (`required_core_field_unsupported`),
438
+ is digest-covered (`required_core_field_not_digest_covered` — an
439
+ evidence-only member laundered into a requirement is a tamper blind
440
+ spot), and is in the consumer's supported set.
441
+
442
+ ### Extension criticality
443
+
444
+ For each `namespace → {criticality, payload}` in `extensions`, the
445
+ outcomes in this table are absolute requirements (MCP metadata registrations
446
+ also satisfy the lowercase, at-least-two-prefix-label rules (protocol §8)):
447
+
448
+ | Registry state | Declared critical | Declared optional |
449
+ |---|---|---|
450
+ | unregistered | deny `extension_unknown_critical` | retained verbatim, quarantined, never executed |
451
+ | reserved | deny `extension_unknown_critical` | retained verbatim; typed notice |
452
+ | active, criticality matches | supported | retained and executable |
453
+ | active, criticality mismatch | deny `extension_criticality_conflict` | deny `extension_criticality_conflict` |
454
+ | deprecated | supported + typed notice | supported + typed notice |
455
+ | retired | deny `extension_retired` | retained verbatim; typed notice |
456
+
457
+ An unknown optional extension MUST round-trip byte-exactly (`decode →
458
+ to_value → encode` is a fixed point, property-tested). Lifecycle
459
+ asymmetry: optional→critical promotion requires a revision increment;
460
+ demotion does not. A retired namespace MUST never be reused.
461
+
462
+ ### Verification semantics and census (normative)
463
+
464
+ Two independent identities govern a verifier release. **Census** is the
465
+ record of what the release certifies: the conformance corpus digest and
466
+ the extension-registry digest. Census growth, meaning added corpus cases and
467
+ added or widened registry entries, MUST NOT alter verdicts for inputs
468
+ certified under a released census at the same verification-semantics version. **Verification semantics** is the
469
+ release's computational meaning for previously-certified inputs:
470
+ canonicalization, digest computation, decode verdicts, bounds
471
+ computation, negotiation outcomes, and signature verification behavior.
472
+ A security correction or registry addition that moves a verdict is a
473
+ verification-semantics change. A release that changes verification
474
+ semantics MUST name it by incrementing the release's semantics version (the reference
475
+ implementation carries it in its release manifest), and its release
476
+ history MUST record the increment and prior-census equivalence or
477
+ divergence; a release whose semantics version is
478
+ unchanged MUST produce, for every input certified under a prior census
479
+ of the same semantics version, the same verdict that prior release
480
+ produced. A registry change that alters negotiation outcomes for
481
+ previously-certified artifacts — for example a newly registered
482
+ critical namespace flipping `extension_unknown_critical` denials to
483
+ supported — is a verification-semantics change; registry census growth
484
+ that moves no previously-certified artifact's verdict is not. The two
485
+ axes are independent of `protocol_revision`, which governs what
486
+ artifacts may say; one event may move more than one axis.
487
+
488
+ Verification-semantics version 2 replaces version 1 for structured failures, non-vacuous evidence, verified signed
489
+ attributes, duplicate-signer rejection, the accepted algorithm alias,
490
+ federation namespace deprecation, and periods in detached signature key
491
+ identifiers. Protocol revision remains 1. The release
492
+ history records the increment; prior-census equivalence remains a per-case
493
+ projection claim, not a claim that the public APIs are unchanged.
494
+ The legacy federation namespace adds an `extension_deprecated` notice to
495
+ `negotiation-estate-contract-valid`; its valid verdict and previously
496
+ declared projection fields are unchanged.
497
+
498
+ Released identities are immutable: a published digest, corpus, registry,
499
+ manifest, or release-history row is never mutated in place; a correction
500
+ is a new release. The evidence boundary: semantics equivalence between
501
+ two releases is certified over the released censuses (per-case verdict
502
+ replay), never over the input space at large.
503
+
504
+ ## 8. Extension registry
505
+
506
+ Namespace form: reverse-DNS-plus-path (`com.example.commerce/graph`),
507
+ lowercase, one `/`, length-ceilinged, and not parseable as an absolute
508
+ URI with a network authority (a namespace can never double as an
509
+ endpoint). Registry content is release-governed data. The reference implementation
510
+ compiles it into both libraries; that packaging choice is informative. The governance-canonical SOURCE is the specification
511
+ tree's registry document (`spec/registry/registry.json`), bound to both
512
+ compiled twins and the corpus index by the registry equality gate. Registered at this release:
513
+
514
+ | Namespace | Owner | Criticality | State |
515
+ |---|---|---|---|
516
+ | `com.example.commerce/graph` | ExampleCommerce | critical | active |
517
+ | `com.example.commerce/classification-labels` | ExampleCommerce | optional | active |
518
+ | `com.example.commerce/rubric-assertion` | ExampleCommerce | optional | active |
519
+ | `com.example.platform/estate` | ExamplePlatform | optional | deprecated |
520
+ | `com.example.platform/estate-contract` | ExamplePlatform | critical | active |
521
+ | `com.example/federation` | Agent Blueprint Protocol | critical | deprecated |
522
+ | `io.github.baselabs/federation` | Agent Blueprint Protocol | critical | active |
523
+
524
+ The active federation namespace is `io.github.baselabs/federation`, with
525
+ A2A declaration URI
526
+ `https://baselabs.github.io/agent_blueprint_protocol/extensions/federation`.
527
+ It pins the same schema as `com.example/federation`. Verifiers accept both
528
+ namespaces and both carriage keys; producers SHOULD use the active one.
529
+ The deprecated namespace remains supported with `extension_deprecated`
530
+ and is never retired in the 1.x line. A carrier containing both supported
531
+ keys denies `federation_mapping_conflict`.
532
+
533
+ Registration of a namespace carried as an MCP `_meta` key MUST satisfy
534
+ [MCP revision 2026-07-28's key grammar](https://modelcontextprotocol.io/specification/2026-07-28/basic#_meta):
535
+ this registry requires at least two prefix labels, each starting with a
536
+ lowercase letter, ending with a lowercase letter or digit, and containing
537
+ only lowercase letters, digits, or hyphens; the nonempty name starts and
538
+ ends with a lowercase letter or digit and permits lowercase letters,
539
+ digits, hyphens, underscores, and dots inside. These lowercase and
540
+ two-label restrictions are stricter than the MCP grammar. Prefixes whose second label is `mcp` or `modelcontextprotocol`
541
+ are reserved. The registry applies these rules at registration, without
542
+ narrowing revision 1 artifact decoding.
543
+
544
+ `com.example.platform/estate-contract` is the product-extension registration:
545
+ the first product-owned critical namespace with an authored schema pin. The
546
+ document ships as corpus data
547
+ (`priv/conformance/schemas/estate-contract.schema.json`); `lib/` carries only
548
+ the digest pin, test-bound to the shipped file. The deprecated
549
+ `com.example.platform/estate` placeholder retains its optional bodies with a
550
+ typed notice — existing artifacts stay verifiable.
551
+
552
+ Critical-extension bodies validate only against a host-supplied schema
553
+ whose digest matches the registry's `schema_digest`; a missing schema
554
+ denies `extension_schema_unavailable`, a mismatched digest denies
555
+ `extension_schema_digest_mismatch`. Entry changes are owner-made,
556
+ changelog-recorded, and ADR-recorded. The registry's own digest is
557
+ bound into the corpus index but not into artifact digests: an artifact
558
+ must remain verifiable against a registry that legitimately gained
559
+ entries after it was produced; hosts wanting pinning SHOULD use
560
+ `build_identities`.
561
+
562
+ ## 9. Bounds algebra
563
+
564
+ Two bound families, never conflated with parse ceilings (those are
565
+ tighten-only decoder limits):
566
+
567
+ - **Operational** (8 members, all REQUIRED — absent is
568
+ `missing_ceiling`, never infinity): `max_attempts`,
569
+ `max_concurrency`, `max_cost`, `max_depth`, `max_descendants`,
570
+ `max_elapsed_ms`, `max_fan_out`, `max_tokens`. Pointwise narrowest
571
+ meet; every narrowing MUST emit clamp evidence.
572
+ - **Protected** (5 members: `classification_ceiling`,
573
+ `disclosure_ceiling`, `effect_impact_ceiling`, `authority_trait`,
574
+ `approval_trait`): ordinal lattices (plus set-monotone markers
575
+ `{pci, phi}` on classification). Narrowing a protected bound MUST
576
+ deny `protected_bound_clamp_denied` by default; a host MAY opt into
577
+ an acknowledge posture, which MUST always record evidence.
578
+ Obligation families (authority, approval, effect impact) meet at the
579
+ STRICTEST value; markers are retained regulatory obligations whose
580
+ effective set is the UNION of sources — dropping one is a widening.
581
+ Despite its name, `effect_impact_ceiling` is an obligation: the strictest
582
+ value wins. It does not cap what a Blueprint declares. A Blueprint
583
+ declaring `secret` with deployment and host values `ordinary` produces
584
+ effective `secret`, no clamp, even under the deny posture.
585
+
586
+ Laws (property-tested): meet is idempotent, commutative, associative;
587
+ effective bounds MUST NOT widen host policy (the effective value does not widen the host value universally); a clamp is emitted iff effective ≠ requested on an
588
+ operational field. `model_policy` and `data_bindings` are not
589
+ intersection inputs.
590
+
591
+ ### Monetary units
592
+
593
+ Every `max_cost.amount` uses the millionths scale defined in protocol §2.
594
+ Verifiers compare amounts as integers and MUST deny mixed currencies with
595
+ `bound_unit_mismatch`; they perform no currency conversion.
596
+ Federation `resource_policy.cost` uses the same millionths scale in the
597
+ currency of the bound Deployment Manifest's `host_bounds.max_cost`.
598
+ This unit definition adds no new federation comparison or host operation.
599
+
600
+ ### Lattice ordering and marker placement
601
+
602
+ The orders below run from first to last. Classification and disclosure
603
+ meet at the minimum; authority, approval, and impact obligations meet at
604
+ the maximum:
605
+
606
+ | Family | Order |
607
+ |---|---|
608
+ | classification | public, internal, confidential, restricted |
609
+ | disclosure | none, summary, detail, full |
610
+ | authority | none, local_policy, external_authority_required |
611
+ | approval | none, human_required, separated_human_required |
612
+ | impact | ordinary, money, authority, secret |
613
+
614
+ Only classification carries `pci` and `phi` markers in the algebra input
615
+ `{ordinal,markers}`; their effective set is the union, sorted in projections.
616
+ Artifact Blueprint and Deployment classification members remain strings.
617
+ Federation result classification is a closed object with `level` (one
618
+ classification ordinal) and `markers` (an array of distinct `pci` / `phi`
619
+ strings, possibly empty). Markers do not form new
620
+ ordinal levels. Corpus references: `bounds_algebra.intersect` widening and
621
+ marker cases, and `reconcile-protected-deny` / `reconcile-protected-acknowledge`.
622
+
623
+ ### Predicates and bounded schemas
624
+
625
+ A predicate is a closed object with `op` and exactly its operands:
626
+
627
+ | Operators | Operands |
628
+ |---|---|
629
+ | `and`, `or` | `args`: nonempty predicate array |
630
+ | `not` | `args`: exactly one predicate |
631
+ | `eq`, `ne`, `lt`, `lte`, `gt`, `gte` | nonempty string-array `path`, JSON `value` |
632
+ | `in` | `path`, JSON-array `values` (may be empty) |
633
+ | `present`, `absent` | `path` |
634
+
635
+ The ceiling is 256 nodes, counted depth first on entry, including the root.
636
+ At entry the node-ceiling and object/duplicate checks precede operator
637
+ presence and type, known operator, unknown member, missing operand, operand
638
+ shape/cardinality, then path root. Unknown strings, including JavaScript
639
+ prototype-property names, deny `predicate_op_unknown`. Validation requires
640
+ the first path segment to name a declared port. Evaluation resolves later
641
+ segments as object members or canonical nonnegative decimal array indices
642
+ (`0` or a nonzero digit followed by digits). Missing paths make presence
643
+ false and absence true; value operators deny `predicate_path_unresolved`.
644
+ Equality and membership compare numbers mathematically and objects without
645
+ regard to member order. Ordering requires two numbers or two strings;
646
+ other pairs deny unresolved. `and` and `or` evaluate operands in order and
647
+ return the first error even if another operand fixes the boolean result.
648
+ Corpus references: every operator on `predicate`, `predicate-exact`,
649
+ `predicate-overflow`, and `predicate-constructor`.
650
+
651
+ The bounded JSON Schema 2020-12 dialect permits exactly `$ref`, `$defs`,
652
+ `type`, `enum`, `const`, `minimum`, `maximum`, `minLength`, `maxLength`,
653
+ `minItems`, `maxItems`, `required`, `properties`, `items`,
654
+ `additionalProperties`, and `oneOf`. Boolean schemas are permitted.
655
+ References are document-local JSON Pointers; unresolved references and
656
+ cycles deny. The complexity meter is bounded at 512 and counts visited
657
+ nodes, keywords, branches, and four times maximum path depth. String lengths
658
+ count code points. Keyword evaluation order is the order above with `$defs`
659
+ excluded from evaluation. Corpus references: the valid, unknown-keyword,
660
+ complexity, reference, type and cardinality cases on `schema.validate_instance`.
661
+
662
+ ## 10. Compatibility and binding
663
+
664
+ A manifest's `blueprint_release` MUST bind to exactly one Blueprint
665
+ content digest (digest equality only — no fuzzy match).
666
+ `build_identities` carry exact identities; compatibility verification
667
+ MUST be identity-exact or deny: a range expression, missing entry, or
668
+ duplicate denies (`compatibility_identity_inexact`,
669
+ `compatibility_entry_missing`, `compatibility_duplicate_entry`).
670
+ Binding verification is a pinned deny-ordered check including
671
+ attestation freshness (`binding_attestation_stale`) and
672
+ descriptor-digest equality (`binding_descriptor_mismatch` — the tool
673
+ rug-pull case).
674
+
675
+ ## 11. Federation profile
676
+
677
+ The logical TaskEnvelope has 23 possible members. Its transport carriers
678
+ combine native fields with an extension body under the registered
679
+ `io.github.baselabs/federation` profile or its deprecated
680
+ `com.example/federation` spelling. No new transport-native field is defined.
681
+ The mapping's 3 native, 5 partial, and 15 extension classifications describe
682
+ semantic correspondence; the following placement rules define carriage.
683
+
684
+ | Logical members | A2A Task carrier | MCP Task carrier |
685
+ |---|---|---|
686
+ | `task_identity`, `recovery_handle` | both reconstructed from `id` | both reconstructed from `taskId` |
687
+ | `checkpoint_status` or `terminal_state` | reconstructed from `status.state` through the A2A state codec | reconstructed from `status` through the MCP state codec |
688
+ | Every other present envelope member | `metadata["https://baselabs.github.io/agent_blueprint_protocol/extensions/federation"]` body | `_meta["io.github.baselabs/federation"]` body |
689
+
690
+ The deprecated A2A key is `https://example.com/extensions/federation`;
691
+ the deprecated MCP key is `com.example/federation`. A carrier MUST contain
692
+ exactly one supported federation key. Both supported keys together, or any
693
+ of the four native logical member names inside its extension body, MUST
694
+ deny `federation_mapping_conflict`. To encode a carrier, `recovery_handle`
695
+ MUST equal `task_identity`, and an observed checkpoint or terminal state
696
+ MUST be present. A missing observed state denies `invalid_constraint`;
697
+ a different recovery handle denies `federation_mapping_conflict`.
698
+
699
+ Before envelope verification, the decoder combines the body with the
700
+ native identifier twice (as `task_identity` and `recovery_handle`) and the
701
+ mapped state. Terminal states populate `terminal_state`; all other mapped
702
+ states populate `checkpoint_status`. It then validates the reconstructed
703
+ closed envelope, including bounds, portability, and cross-member hooks.
704
+ `parent_execution_reference`, `input_commitment`, `time_policy`, and
705
+ `checkpoint_request` remain in the body despite their partial native
706
+ correspondences. MCP `ttlMs` never supplies `time_policy`. Carrier cases on
707
+ `federation.decode` certify carriage-key selection and rejection of native
708
+ members in the extension body in both implementations.
709
+
710
+ State codecs MUST be
711
+ lossy-aware: A2A `SUBMITTED`/`REJECTED`/`AUTH_REQUIRED` deny crossing into MCP,
712
+ `UNSPECIFIED` is unmapped (`federation_state_unmappable`);
713
+ cancellation MUST remain a request, never a terminal receipt. A
714
+ Terminal Commitment digests task identity, terminal state, result
715
+ digest, result classification, compatibility ref, authority-proof
716
+ refs, and checkpoint-history commitment; ANY divergence between
717
+ receipts for one task identity MUST deny
718
+ `federation_terminal_conflict` — not just state divergence.
719
+ `Federation.verify_commitment` compares issuer/subject/audience
720
+ against the receiving context (`audience_mismatch`). AgentCard
721
+ signing carries a protobuf field-presence pre-normalization on top of
722
+ JCS (documented in the mapping so adapters do not inherit silent
723
+ verification failure). Correlation grants nothing.
724
+
725
+ ### Terminal Commitment bytes
726
+
727
+ The commitment input is a JSON object with exactly `task_identity`,
728
+ `terminal_state`, `result_digest`, `result_classification_ceiling`,
729
+ `compatibility_reference`, `authority_proof_references`, and
730
+ `checkpoint_history_commitment`. The result and history digests come from
731
+ `evidence_receipt`; the other values come from the envelope. JCS orders the
732
+ object keys as `authority_proof_references`, `checkpoint_history_commitment`,
733
+ `compatibility_reference`, `result_classification_ceiling`, `result_digest`,
734
+ `task_identity`, `terminal_state`. Array-valued components retain their wire
735
+ order and are encoded as JSON arrays, never joined strings or sorted sets.
736
+ The hash preimage is UTF-8 `agent-blueprint-protocol/federation-envelope`,
737
+ one zero octet, then UTF-8 JCS of that object. Corpus reference:
738
+ the terminal-equivocation cases on `federation.verify_commitment`.
739
+
740
+ ### Member grammar — Federation TaskEnvelope (23 members)
741
+
742
+ The reconstructed envelope is a closed world: one member per logical
743
+ field. The carrier placement above supplies its native members and
744
+ extension body before this grammar is applied. Cardinality `1` members are required;
745
+ `0..1` members are optional (absent — there is no null form). The
746
+ machine-readable grammar ships as the CDDL artifact under
747
+ `spec/grammar/` with the derived JSON Schema beside it. Cross-
748
+ member hooks: `checkpoint_status` MUST NOT coexist with `terminal_state`
749
+ (`invalid_constraint`), and the terminal hooks bind
750
+ `terminal_state`/`evidence_receipt` presence together. The receipt's
751
+ `terminal_commitment` is the domain-separated digest of the seven
752
+ Terminal-Commitment components.
753
+
754
+ | Member | Card. | Wire form |
755
+ |---|---|---|
756
+ | `task_identity` | 1 | identifier string |
757
+ | `idempotency_identity` | 1 | identifier string |
758
+ | `parent_execution_reference` | 0..1 | identifier string |
759
+ | `initiating_subject` | 0..1 | identifier string |
760
+ | `blueprint_digest` | 1 | tagged digest |
761
+ | `deployment_digest` | 1 | tagged digest |
762
+ | `input_commitment` | 1 | tagged digest |
763
+ | `result_schema` | 1 | tagged digest (result schema identity) |
764
+ | `result_classification_ceiling` | 1 | object{ level:classification enum; markers:array of distinct pci/phi strings } |
765
+ | `time_policy` | 1 | object{ elapsed_ms: positive integer } |
766
+ | `resource_policy` | 1 | object{ attempts, concurrency, tokens, cost: positive integers } |
767
+ | `recovery_handle` | 1 | identifier string |
768
+ | `issuer` | 1 | identifier string |
769
+ | `subject` | 1 | identifier string |
770
+ | `audience` | 1 | identifier string |
771
+ | `identity_mapping_evidence` | 1 | identity-evidence object (correlation only) |
772
+ | `checkpoint_request` | 0..1 | object{ kind: checkpoint enum; request_digest: tagged digest } |
773
+ | `checkpoint_status` | 0..1 | checkpoint-status enum |
774
+ | `checkpoint_commitment` | 0..1 | tagged digest |
775
+ | `terminal_state` | 0..1 | terminal-state enum |
776
+ | `evidence_receipt` | 0..1 | object{ result_digest: tagged; checkpoint_history_commitment: tagged; terminal_commitment: tagged; signature: detached JWS envelope } |
777
+ | `compatibility_reference` | 1 | array (min 1, unique by name) of object{ name: identifier; identity: nonempty string } |
778
+ | `authority_proof_references` | 1 | array of tagged digests |
779
+
780
+ ## 12. Error vocabulary
781
+
782
+ A denial has a closed `code` and a `subject` member path. The ceiling
783
+ family names one of the eight decoder limits as `ceiling:<key>`. Subjects
784
+ contain schema-defined member names and array indices where known, never
785
+ unknown names or input values; an unavailable path is an empty array.
786
+ Denials carry no input values or free-text detail. The reference API
787
+ represents this record as described in protocol §16. An
788
+ implementation MUST NOT emit an undeclared code, and every code it
789
+ declares MUST be reachable (enforced two-directionally by a build
790
+ gate).
791
+ The 74 codes of this release, with semantics (when the code is
792
+ raised, the subject it names, and the host action it demands):
793
+
794
+ | Code | Raised when | Subject | Host action |
795
+ |---|---|---|---|
796
+ | `attestation_malformed` | an attestation envelope fails its structural parse | attestations | reject the artifact |
797
+ | `audience_mismatch` | a federation receipt's issuer/subject/audience does not match the receiving context | federation envelope | reject the receipt |
798
+ | `base64url_invalid` | a base64url lexeme carries a non-alphabet character | offending member | reject the artifact |
799
+ | `base64url_padded` | a base64url value arrives padded | offending member | reject the artifact |
800
+ | `binding_attestation_stale` | a tool-binding attestation is older than the pinned freshness window | tool_bindings | reject the import as stale |
801
+ | `binding_descriptor_mismatch` | a bound tool's descriptor digest differs from the observed descriptor | tool_bindings | halt the binding (rug-pull guard) |
802
+ | `binding_incomplete` | the binding check set is incomplete where completeness is required | bind surface | halt the import (reconcile denies) |
803
+ | `bound_source_missing` | an intersection input names a bound source that is absent | bounds sources | reject the intersection call |
804
+ | `bound_unit_mismatch` | two bounds meet with incompatible units | bounds | reject the intersection call |
805
+ | `bound_unknown` | a bounds-algebra BoundSet names a member outside its closed 13-name vocabulary | bounds set | reject the artifact |
806
+ | `bound_value_invalid` | a bound value fails its shape or range check | bounds | reject the artifact |
807
+ | `compatibility_duplicate_entry` | build_identities carries a duplicate identity | build_identities | reject the manifest |
808
+ | `compatibility_entry_missing` | verification names an identity with no manifest entry | build_identities | deny compatibility |
809
+ | `compatibility_identity_inexact` | a build identity is a range or fuzzy form | build_identities | reject the manifest |
810
+ | `corpus_applicability_incomplete` | the corpus applicability floor has uncovered cells | corpus index | operator: fix the corpus; never a wire condition |
811
+ | `corpus_case_id_duplicate` | two corpus cases share an id | corpus | operator: fix the corpus |
812
+ | `corpus_case_invalid` | a corpus case fails its own schema | corpus | operator: fix the corpus |
813
+ | `corpus_count_mismatch` | the index case total disagrees with the case set | corpus index | operator: regenerate the index |
814
+ | `corpus_empty` | the corpus carries no cases | corpus | operator: fix the corpus |
815
+ | `corpus_file_set_mismatch` | the corpus file set differs from the index (both directions) | corpus | operator: fix the corpus |
816
+ | `corpus_hash_mismatch` | a corpus file's hash differs from the index entry | corpus | operator: fix the corpus |
817
+ | `corpus_index_invalid` | the corpus index fails its structural parse | corpus index | operator: regenerate the index |
818
+ | `deployment_digest_mismatch` | binding compares deployment.blueprint_release.content_digest to the supplied Blueprint and they differ; it does not name the Deployment's own content-digest check | blueprint_release.content_digest | reject the manifest (tamper) |
819
+ | `digest_algorithm_unsupported` | an unknown digest algorithm tag | digest member | reject the artifact |
820
+ | `digest_encoding_invalid` | a malformed digest body | digest member | reject the artifact |
821
+ | `digest_mismatch` | a declared Blueprint or Deployment content digest differs from its covered bytes, signed attributes name a different artifact digest, or a federation receipt digest/commitment differs from its recomputation | known digest member | reject the artifact (tamper) |
822
+ | `duplicate_member` | a duplicate JSON member name (I-JSON) | bytes | reject the artifact |
823
+ | `extension_criticality_conflict` | declared criticality conflicts with the registry | extensions | reject the artifact |
824
+ | `extension_duplicate` | one namespace appears twice in extensions | extensions | reject the artifact |
825
+ | `extension_namespace_invalid` | a namespace fails the reverse-DNS-plus-path form | extensions | reject the artifact |
826
+ | `extension_payload_forbidden` | a payload appears where the registry forbids one | extensions | reject the artifact |
827
+ | `extension_retired` | a retired namespace is declared | extensions | reject the artifact |
828
+ | `extension_schema_digest_mismatch` | the digest of a host-supplied critical-extension schema differs from the registered schema pin; this is not an artifact-body digest comparison | extensions | reject the artifact |
829
+ | `extension_schema_unavailable` | no host schema is supplied for a digest-pinned critical body | extensions | reject the artifact |
830
+ | `extension_unknown_critical` | an unregistered or reserved namespace is declared critical | extensions | reject the artifact |
831
+ | `federation_mapping_conflict` | a state has no consistent mapping on the target transport | federation codec | reject the crossing |
832
+ | `federation_state_unmappable` | a state is unmappable (e.g. A2A UNSPECIFIED) | federation codec | reject the crossing |
833
+ | `federation_terminal_conflict` | two receipts for one task identity diverge in any commitment component | federation envelope | reject the later receipt |
834
+ | `forbidden_portable_value` | a value shape trips the portability denylist | offending member | reject the artifact |
835
+ | `integer_magnitude` | canonical encoding receives a tagged integer outside ±(2^53−1), including a hand-built value; this is not the JSON lexeme rule | integer value | reject the artifact |
836
+ | `invalid_cardinality` | an array violates min/max items | offending member | reject the artifact |
837
+ | `invalid_constraint` | a member fails a value constraint, signer key_ids repeat, or a federation receipt's signed created_at falls outside its explicit inclusive receiving-context pins | offending member | reject the artifact |
838
+ | `invalid_encoding` | a member fails its encoding form | offending member | reject the artifact |
839
+ | `invalid_number` | a number lexeme is malformed | bytes | reject the artifact |
840
+ | `invalid_syntax` | the JSON text is syntactically invalid | bytes | reject the artifact |
841
+ | `invalid_type` | a JSON tag disagrees with a field or instance schema (a float-tagged integral value still fails an integer field), a hand-built tagged value is malformed, or a host API argument has the wrong shape | known member or API argument | reject the artifact |
842
+ | `lifecycle_state_invalid` | a deployment lifecycle state is unknown | lifecycle | reject the manifest |
843
+ | `missing_ceiling` | an operational bound is absent (never infinity) | ceilings | reject the artifact |
844
+ | `missing_required_field` | a required member is absent | the member | reject the artifact |
845
+ | `no_authoritative_recovery` | a mutation-kind operation is bound while the effect owner's recovery is none | effect_owner | reject the import |
846
+ | `non_canonical_bytes` | interchange bytes are not already canonical | bytes | reject before any semantic read |
847
+ | `nonportable_content` | an authority-shaped claim rides portable content | offending member | reject the artifact |
848
+ | `number_not_double_expressible` | JSON decoding receives a pure-digit integer lexeme outside ±(2^53−1) whose conversion to a double and canonical serialization does not reproduce that lexeme exactly | number input | reject the artifact |
849
+ | `predicate_nodes_exceeded` | a predicate AST exceeds the node ceiling | predicate | reject the artifact |
850
+ | `predicate_op_unknown` | a predicate names an unknown operator | predicate | reject the artifact |
851
+ | `predicate_path_unresolved` | a predicate path resolves against no declared port | predicate | reject the artifact |
852
+ | `protected_bound_clamp_denied` | a protected bound narrows without the acknowledge opt-in | bounds | reject, or opt in and record evidence |
853
+ | `protocol_revision_unsupported` | the revision is outside the declared set (both directions) | protocol_revision | reject the artifact |
854
+ | `required_core_field_not_digest_covered` | a required core field names an evidence-only member | required_core_fields | reject the artifact |
855
+ | `required_core_field_unsupported` | a required core field is unknown or absent from the consumer's supported field set | required_core_fields | reject the artifact |
856
+ | `schema_complexity_exceeded` | a schema exceeds the complexity meter | schema document | reject the artifact |
857
+ | `schema_dialect_unknown` | a schema names an unknown dialect | schema document | reject the artifact |
858
+ | `schema_invalid_shape` | a schema is structurally malformed | schema document | reject the artifact |
859
+ | `schema_keyword_not_allowed` | a schema uses a keyword outside the bounded dialect | schema document | reject the artifact |
860
+ | `schema_keyword_value_invalid` | a schema keyword carries an invalid value | schema document | reject the artifact |
861
+ | `schema_ref_cycle` | a schema $ref cycle | schema document | reject the artifact |
862
+ | `schema_ref_unresolvable` | a schema $ref resolves nowhere | schema document | reject the artifact |
863
+ | `signature_algorithm_unsupported` | header alg is neither EdDSA nor Ed25519, signed_attributes.algorithm is not Ed25519, or no matching key is usable Ed25519 (wrong algorithm/length, non-canonical, off-curve, or small-order) | signatures | halt the import (reconcile denies) |
864
+ | `signature_key_unsupported` | no supplied key matches the `key_id` | signatures | halt the import (reconcile denies) |
865
+ | `signature_malformed` | a signature envelope fails its parse | signatures | halt the import (reconcile denies) |
866
+ | `signature_not_verified` | the cryptographic verification fails, or R or S breaks the strict encoding rule (§6) | signatures | halt the import (reconcile denies) |
867
+ | `trailing_bytes` | bytes follow the JSON value | bytes | reject the artifact |
868
+ | `unknown_bound` | a decoder-limit override names no field of Bounds (distinct from the algebra bound set) | decoder limits | reject the artifact |
869
+ | `unknown_member` | a member is outside the closed world | the member | reject the artifact |
870
+ Plus the parameterized ceiling family `ceiling:<key>` over the eight
871
+ decoder limit names. No authorization vocabulary exists in any
872
+ identifier — no `unauthorized` in either polarity (source-scanned
873
+ gate).
874
+
875
+ Non-error notices (not members of the error-code union):
876
+
877
+ | Notice | Meaning |
878
+ |---|---|
879
+ | `extension_deprecated` | a supported namespace is deprecated |
880
+ | `extension_retired` | an optional namespace is retired and its content is retained |
881
+ | `extension_unknown_optional_retained` | optional content is retained without interpreting it |
882
+ | `clamp_applied` | bounds narrowed with structured clamp evidence |
883
+
884
+ Conformance runners preserve present input types rather than coercing wrong
885
+ types to defaults: malformed binding objects and malformed nested support
886
+ collections deny `invalid_type` before the operation, JSON null remains a
887
+ schema instance, bound sources are constructed in blueprint/deployment/host
888
+ order before totality is checked, and omitted or null bounds, support, receiving context,
889
+ or receiving identity pins retain their existing absent-input meaning.
890
+
891
+ ## 13. Evidence and reconcile
892
+
893
+ `reconcile(blueprint, deployment, inputs)` is the one call per import:
894
+ canonical → digest → negotiation → structure → portability →
895
+ signatures → bind → bounds, in that pinned order. Its result is an
896
+ evidence record of per-surface checks, effective bounds, clamp evidence,
897
+ and `not_verified` — which MUST be non-empty BY CONSTRUCTION, always
898
+ naming at least the seven host-owned surfaces this protocol structurally
899
+ cannot establish: `tenancy`, `live_policy`, `authority`,
900
+ `effect_ownership`, `execution`, `billing`, `evaluation_truth`. A
901
+ caller SHOULD NOT read an Evidence record and conclude "everything is
902
+ fine": the record itself names what it did not check.
903
+
904
+ A check MAY state `verified: true` only after at least one verification
905
+ ran and passed. Zero signatures yields `verified: false` with typed detail
906
+ `no_signatures_present`; reconcile still succeeds. A signature check that
907
+ passes carries a typed signatures detail naming distinct verifying key_ids.
908
+ No free-text detail strings are emitted. Retained or quarantined optional
909
+ extension payloads are not reported as verified payloads.
910
+
911
+ The binding detail lists checks performed and observations skipped. A bind
912
+ check is false unless every binding has a matching descriptor observation
913
+ and both `now` and a maximum attestation age are supplied; a future-date
914
+ check alone does not establish staleness verification. Those skipped surfaces and every false
915
+ check surface join `not_verified`. Canonical checks on structs establish
916
+ encodability; they do not establish equality to unavailable received bytes.
917
+ `signature_created_at` and `lifecycle_state` are always unverified by
918
+ reconcile. The timestamp is signed and format-checked but never judged;
919
+ lifecycle state is shape-checked and never judged.
920
+
921
+ Federation receipt verification separately supports the existing explicit
922
+ `created_after` and `created_before` receiving-context pins. Both are
923
+ optional, valid RFC 3339 Z-form whole seconds, inclusive, and compare the
924
+ signed `created_at`. The check runs after receipt-conflict detection;
925
+ malformed pins deny `invalid_type`, and a receipt outside a supplied pin
926
+ denies `invalid_constraint`.
927
+
928
+ ## 14. Portability
929
+
930
+ Portable artifacts MUST NOT contain secrets, private keys, live grants,
931
+ tenant identifiers, raw endpoints, database primary keys, or backend
932
+ engine identifiers — enforced structurally (member-name and value-shape
933
+ denylists over the open regions, at any depth, name-spelling-normalized)
934
+ and red-cased per class in the corpus. A portability pass is not
935
+ sufficiency — the guard is necessary, not sufficient: opaque
936
+ quarantined extension bodies are typed as unscanned, and portability
937
+ claims attach only to schema-validated content. Concrete provider/model
938
+ names, credentials, engine ids, and endpoints resolve host-side and are
939
+ unrepresentable in self-fulfilling artifacts.
940
+
941
+ ## 15. Conformance
942
+
943
+ The package ships a portable conformance corpus (`priv/conformance/`):
944
+ 604 cases covering every required cell of the 18-surface × 31-class
945
+ applicability floor, full-registry golden artifacts, RFC 8785 number
946
+ vectors, and deterministic Ed25519 fixtures, at corpus digest
947
+ `sha-256:oYnkSmTkHGk4AmZ8Sul99_6KYJUIuj2SN2GZAiT1glw`. Corpus identity
948
+ is the digest of the domain-separated index — versioned by digest, not
949
+ by name. The loader is pure over an in-memory path-to-bytes map and verifies
950
+ per-file hashes, exact file set (both directions), counts, id-uniqueness,
951
+ and applicability totality; the report refuses a vacuous green. Each shipped
952
+ CLI states on stderr whether the loaded corpus digest equals the
953
+ release-certified corpus digest in the release metadata. Other corpora,
954
+ including prior-release corpora, may run; their agreement does not establish
955
+ a pass on the release-certified corpus. This label is separate from the
956
+ canonical stdout report.
957
+
958
+ A repo-side second-language verifier (`verifier/`,
959
+ TypeScript on Node ≥ 24, `node:` builtins only, never in the Hex
960
+ archive) independently recomputes every corpus verdict and integrity
961
+ check with its own scanner, canonicalizer, and `node:crypto` Ed25519
962
+ path; the release gate requires its report to be byte-identical to the
963
+ Elixir escript's over both the repo corpus and the built archive's
964
+ corpus. Mutation gates break the implementation at pinned
965
+ points, including each reconcile stage and its order, and require the corpus to go red on each — a vacuous case set
966
+ is a build failure. A `signature.verify` case whose signature decodes
967
+ to 64 bytes also pins `expected.strict_signature`, the strict
968
+ signature rule's verdict on those bytes (§6), and an implementation
969
+ agrees with the case only when its own rule gives the same verdict, so
970
+ the corpus sees each clause of the rule even where a cryptographic
971
+ backend already rejects the same bytes.
972
+
973
+ ### Conforming implementations (normative)
974
+
975
+ The verifier class covers every applicable cell of the corpus. An
976
+ implementation conforms at a release only when its complete results
977
+ document for the release-certified corpus is byte-identical to the
978
+ [certified results document](conformance/certified-results.json) shipped
979
+ with that release. The [runner contract](conformance/runner.md) specifies
980
+ the case format, dispatch, projections, integrity checks, and summary.
981
+ The [execution protocol](conformance/execution.md) lets an external harness
982
+ drive and judge an implementation without supplying expected answers.
983
+ Skipping cases or applicable surfaces is not conformance. The aggregate
984
+ report is a summary and is insufficient to establish per-case agreement.
985
+
986
+ An unsigned claim separately identifies implementation, source, platform,
987
+ and the exact corpus, registry, and results-document digests. A corpus
988
+ pass does not prove honest computation, anything outside that census,
989
+ or any host behavior. No producer conformance class is defined: producer
990
+ round trips and wire validity are covered by verifier cases, not a
991
+ separate claim of producer behavior.
992
+
993
+ ## 16. The shipped surface (informative — the reference implementation)
994
+
995
+ The facade (`AgentBlueprintProtocol`) delegates and never implements;
996
+ every public function carries a `@spec` (build-gated), every public module a
997
+ boundary-stating moduledoc; implementation modules and helpers are hidden:
998
+
999
+ | Function | Contract |
1000
+ |---|---|
1001
+ | `decode_blueprint/1,2` | bounded, canonical-first Blueprint decode |
1002
+ | `decode_deployment/1,2` | bounded, canonical-first Deployment decode |
1003
+ | `decode_federation_envelope/1,2` | bounded TaskEnvelope decode |
1004
+ | `canonical_bytes/1` | the artifact's canonical JCS bytes |
1005
+ | `negotiate/2` | revision/required-field/extension evolution gate |
1006
+ | `intersect/1` | bounds meet over blueprint/deployment/host sources |
1007
+ | `verify_compatibility/2` | identity-exact build compatibility |
1008
+ | `reconcile/3` | the one composed non-authorizing pass per import |
1009
+ | `federation_mapping/0` | the 23-row A2A/MCP mapping as data |
1010
+
1011
+ Layered under it: the bytes layer (`Json`, `Canonicalization`,
1012
+ `Base64Url`, `Digest`, `Bounds`), the artifacts (`Blueprint`,
1013
+ `Deployment`, `Schema` as the bounded 2020-12 dialect + instance validator,
1014
+ `Predicate`, `Portability`), the algebra (`BoundsAlgebra`,
1015
+ `Negotiation`, `Compatibility`, `Signature`, `Federation`, `Error`,
1016
+ `Evidence`, `Reconcile`, `ExtensionRegistry`), and the conformance
1017
+ tooling (`Conformance.Corpus/Runner/Report`; CLI implementation modules are internal).
1018
+ The module tree is strictly downward (bytes → algebra → artifacts →
1019
+ conformance); the engine knows tables, never domains.
1020
+
1021
+ ### Producer surface
1022
+
1023
+ Hosts that render artifacts produce them through the per-artifact
1024
+ constructors, never through facade-level minting: compose the member
1025
+ value, construct it with `Blueprint.from_value/2` or
1026
+ `Deployment.from_value/2` (threading `:authored_extensions` for
1027
+ critical namespaces whose bodies negotiation validated against a
1028
+ digest-pinned schema; the caller supplies that provenance, and the constructor
1029
+ checks membership in this artifact's critical region), compute the release identity with the
1030
+ artifact's `content_digest/1`, and serialize with its
1031
+ `canonical_bytes/1`. The round-trip property (decode → `to_value/1` →
1032
+ encode is a fixed point) is the byte-exactness guarantee a producer
1033
+ relies on. The conformance CLI emits a separate corpus-certification label on stderr
1034
+ without changing the canonical stdout report (§15). The facade stays a verification facade: it delegates and
1035
+ never implements, and no facade-level producer functions grow (the
1036
+ accepted producer-surface decision record).
1037
+
1038
+ ### The blueprint card (informative — a derived projection)
1039
+
1040
+ A "blueprint card" is a DERIVED, non-normative projection of a
1041
+ Blueprint for discovery and display contexts: a small member set
1042
+ (typically the identity, producer, classification ceiling, a capability
1043
+ summary, and the content digest) extracted from VERIFIED artifact
1044
+ bytes. Three rules govern it. The full artifact remains the only
1045
+ source of truth — a card asserts nothing the artifact does not, and
1046
+ carries the content digest precisely so any reader can bind the
1047
+ summary back to the exact verified bytes. A card is never a conforming
1048
+ implementation surface: partial conformance is not conformance (the
1049
+ conformance clause), and nothing in this protocol verifies a card as a
1050
+ standalone artifact. Consumers either re-derive a card from bytes they
1051
+ verified themselves or treat one they received as unverified display
1052
+ data — the same posture as any other pre-verification summary.
1053
+
1054
+ ### The release-identity manifest (informative — the reference implementation)
1055
+
1056
+ The reference implementation ships
1057
+ `priv/release-metadata.json` (mirrored byte-identically inside its npm
1058
+ kit) as the machine-readable release identity. It is a versioned public
1059
+ contract of the REFERENCE IMPLEMENTATION — not a conformance
1060
+ requirement: a third-party conformer publishes its own identity
1061
+ statement satisfying the conformance clause (§15). Within a
1062
+ `manifest_version`, evolution is additive-only — fields are added,
1063
+ never removed, retyped, or resemanticized; a breaking shape change bumps
1064
+ `manifest_version` and is itself a release. The fields at manifest
1065
+ version 2: the format tag, the manifest version, the package name and
1066
+ version, the `verification_semantics_version` (§7's axis), the
1067
+ `digest_identity` label naming the closed digest scheme (RFC 8785 JCS
1068
+ canonical bytes; SHA-256; domain-separated preimages; tagged unpadded
1069
+ base64url — unchanged across every release to date), the wire
1070
+ `protocol_revisions_supported`, `prior_census_verdicts` (the certified
1071
+ compatibility matrix: per prior census digest,
1072
+ `equivalent` — per-case verdict agreement, certified by replay; or
1073
+ `diverged_by_registry_census` — divergences explained by registry
1074
+ growth; or `not_equivalent` — an authored semantics-break claim), the
1075
+ specification, corpus, and registry digests, the corpus index hash, the
1076
+ verifier runtime floor, the verifier-kit identity (name, registry,
1077
+ version), and the archive-authorization stance. The companion
1078
+ `priv/release-history.json` carries one append-only row per manifest-era
1079
+ release — the retroactive mapping a consumer binds when upgrading
1080
+ between pins.
1081
+
1082
+ ## 17. Security considerations (normative)
1083
+
1084
+ The threat model is not invented for this section: every threat below is
1085
+ exercised by the conformance corpus as a named red class, and the gate
1086
+ in the reference implementation reds a threat row that cites a class the
1087
+ corpus does not carry.
1088
+
1089
+ | Threat | Vector | Corpus class | Mitigation |
1090
+ |---|---|---|---|
1091
+ | Artifact tamper | bytes edited after signing | `tamper_meaningful_byte` `digest_mismatch` | content digests over exact received bytes; `digest_mismatch` denies (checked after structure and portability in standalone decode; checked before negotiation and structure in reconcile, always before signatures and binding) |
1092
+ | Canonicality laundering | non-canonical spellings of the same value | `invalid_duplicate` | MUST-already-be-canonical interchange bytes; `non_canonical_bytes` |
1093
+ | Signature substitution | a signature lifted onto another artifact/purpose | `signature_invalid` | purpose-pinned signed attributes; digest covers revision + identity members |
1094
+ | Protocol downgrade | an older/newer revision forced on a consumer | `revision_above_max` `revision_below_min` | explicit revision SETs, both directions deny `protocol_revision_unsupported` |
1095
+ | Extension rug-pull via registry | unknown/retired namespace forced critical | `extension_unknown_critical` | registry-state table; deny with typed codes |
1096
+ | Schema-pin evasion | critical body validated against a different schema | `extension_schema_unavailable` | digest-pinned schemas; `extension_schema_digest_mismatch` |
1097
+ | Tool rug-pull | a bound tool's descriptor replaced out-of-band | `binding_stale` `compatibility_range_rejected` | binding verification: descriptor-digest equality + attestation freshness + identity-exact entries |
1098
+ | Ceiling widening | a bound or ceiling raised after the fact | `bound_widening_operational` `bound_widening_protected` | bounds may narrow only; protected narrowing denies by default; effective bounds never widen host policy |
1099
+ | Quarantined-content laundering | unscanned payload smuggled into a claim | `extension_unknown_optional_roundtrip` `forbidden_portable_value` | quarantine is typed unscanned; portability claims attach only to schema-validated content |
1100
+ | Receipt equivocation | two diverging terminal receipts for one task | `terminal_equivocation` `federation_terminal_conflict` | Terminal Commitment over seven components; ANY divergence denies |
1101
+ | Misaddressed execution | a receipt verified by the wrong receiver | `audience_mismatch` | issuer/subject/audience checked against the receiving context |
1102
+ | Required-field laundering | an evidence-only member promoted to a requirement | `required_field_not_covered` | required core fields MUST be digest-covered |
1103
+
1104
+ The non-authorizing boundary is itself a security property: every
1105
+ verification result is evidence, the `not_verified` set is non-empty by
1106
+ construction naming the host-owned surfaces, and no code path grants
1107
+ authority. Small-order Ed25519 keys reject; the package performs no key
1108
+ discovery or trust selection — a wrong key is a typed denial, never a
1109
+ silent pass.
1110
+
1111
+ ## 18. Privacy considerations (normative)
1112
+
1113
+ The portability guard is the protocol's data-minimization profile,
1114
+ stated as a normative constraint set: portable artifacts MUST NOT carry
1115
+ secrets, private keys, live grants, tenant identifiers, raw endpoints,
1116
+ database primary keys, or backend engine identifiers — enforced
1117
+ structurally at any depth (member-name and value-shape denylists,
1118
+ name-spelling-normalized) and exercised per class by the corpus
1119
+ (`forbidden_portable_value`). The honest limits are part of the
1120
+ contract: identifier-shaped values with the UUID grammar are exempt
1121
+ by shape, so the guard is structural, not semantic — a tenant
1122
+ identifier encoded as a UUID is not caught by the value-shape arm; quarantined extension bodies are typed as unscanned
1123
+ (`extension_unknown_optional_roundtrip` carries the round-trip
1124
+ obligation), and portability claims attach only to schema-validated
1125
+ content — a producer MUST NOT present a portability pass as a privacy
1126
+ guarantee. Federation identity members (`issuer`, `subject`,
1127
+ `audience`, `identity_mapping_evidence`) are correlation material only:
1128
+ an authority-shaped claim in the evidence block denies
1129
+ `nonportable_content`, and possession of a key is never an identity
1130
+ claim.
1131
+
1132
+ ## 19. Positioning — protocol neighbors (informative)
1133
+
1134
+ The Agent Blueprint Protocol does not compete with the transport and
1135
+ discovery protocols; it completes them. AI Catalog owns discovery,
1136
+ verifiable identity, and attestation; A2A owns agent-to-agent tasks;
1137
+ MCP owns tools and data. ABP owns the portable CONTRACT layer — the
1138
+ artifact that says what an agent is, what it may do (bounds, ceilings),
1139
+ what it must prove (evidence), and how a host verifies all of it
1140
+ fail-closed without granting authority. A blueprint rides IN A2A task
1141
+ metadata and MCP `_meta` (the federation profile proves the carriage);
1142
+ a Trust-Manifest-style discovery record can reference a blueprint by
1143
+ digest without either protocol subsuming the other. AI Catalog and ABP both
1144
+ use detached JWS over JCS. Catalog requires the protected `typ` marker and
1145
+ forbids the protected `b64` header, so their signatures are not interchangeable.
1146
+
1147
+ SCITT is IETF work on transparent supply-chain statements; ABP detects
1148
+ receipt divergence only against locally held prior receipts and is not a
1149
+ transparency service. OASF is an open schema framework for
1150
+ agent metadata; ABP's artifact and evidence contracts have a different scope.
1151
+ WIMSE is IETF work on workload identity across systems; ABP accepts supplied
1152
+ keys and never establishes a workload identity. AuthZEN is OpenID Foundation
1153
+ work on authorization interoperability; ABP produces non-authorizing evidence.
1154
+ AP2 is an open agent payments protocol; ABP's money bound is a magnitude
1155
+ constraint and carries no payment authority. These are positioning statements,
1156
+ not mappings or conformance claims about those projects.
1157
+
1158
+ ## 20. Registry considerations
1159
+
1160
+ Revision 1 fixes the `sha-256` digest tag, `EdDSA` and `Ed25519`
1161
+ identifiers for one signature algorithm, the three signed purposes, digest
1162
+ domains, and artifact member sets. Registry operations follow
1163
+ [the operations process](registry/OPERATIONS.md).
1164
+
1165
+ ### Evolution within a major version
1166
+
1167
+ A minor release MAY add the following opt-in capabilities. It MUST NOT
1168
+ change existing bytes, defaults, required inputs, or documented return
1169
+ contracts of existing calls:
1170
+
1171
+ - Protocol revisions, each with its own member and algorithm sets. A verifier
1172
+ MUST keep accepting every earlier supported revision throughout the major.
1173
+ A new signature algorithm MUST enter through a new protocol revision.
1174
+ - Registered namespaces and federation profiles. An incompatible federation
1175
+ envelope MUST use a new registered critical namespace beside the existing
1176
+ profiles; existing profiles MUST NOT retire during the major. The current
1177
+ envelope and commitment preimage remain unchanged.
1178
+ - Conformance surfaces and corpus cases. Each new corpus is a new census;
1179
+ claims against an earlier corpus digest remain valid for that digest.
1180
+ - CLI modes and flags, explicitly selected execution-protocol versions, notices,
1181
+ evidence check kinds and detail variants, and additional runtime support.
1182
+ Harnesses and adapters MUST continue to support execution version 1 for
1183
+ the whole major; a successor MUST be selected explicitly.
1184
+
1185
+ Within the major, the error-code set and each code's meaning MUST remain
1186
+ unchanged. `ErrorCode` is closed for all of 1.x. A new mechanism MUST reuse
1187
+ an existing code whose meaning fits; otherwise it waits for the next major.
1188
+ Inputs certified under a released census MUST keep their verdicts at the
1189
+ same verification-semantics version. A security correction or registry
1190
+ addition that moves a verdict MUST increment that version and declare it
1191
+ in the release history, recording prior-census equivalence or divergence
1192
+ as specified in section 7. Artifact member sets and signed-byte formats
1193
+ for existing revisions, and the format of every released results document,
1194
+ claim, and corpus, MUST remain unchanged. New inputs under a new revision
1195
+ do not reinterpret earlier revisions.
1196
+
1197
+ The reference distributions retain Node 24, Elixir 1.19, OTP majors 27,
1198
+ 28, and 29, and TypeScript 5.0.2 as their runtime and compiler floors
1199
+ throughout 1.x. Added Node, OTP, and Elixir versions expand support; they
1200
+ never raise those floors. The contributor OTP gate is separate from the
1201
+ shipped library requirements.
1202
+
1203
+ Consumer compatibility follows the declared open and closed surfaces:
1204
+ error codes support exhaustive handling; notices, evidence surfaces, check
1205
+ kinds, detail variants, and returned signature algorithm and purpose names
1206
+ are open. Consumers look up known names and retain a default branch; an
1207
+ unknown entry establishes no familiar fact. Elixir struct matches select
1208
+ only fields used. Release-manifest readers ignore unknown additive members
1209
+ but never an unknown equivalence claim. Any unknown nonzero harness exit
1210
+ is failure. These rules add no host authorization or execution requirement.
1211
+
1212
+ ## 21. References
1213
+
1214
+ ### Normative references
1215
+
1216
+ - [RFC 2119](https://www.rfc-editor.org/rfc/rfc2119.html), Key words for use in RFCs to Indicate Requirement Levels (March 1997).
1217
+ - [RFC 8174](https://www.rfc-editor.org/rfc/rfc8174.html), Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words (May 2017).
1218
+ - [RFC 8259](https://www.rfc-editor.org/rfc/rfc8259.html), The JavaScript Object Notation Data Interchange Format (December 2017).
1219
+ - [RFC 7493](https://www.rfc-editor.org/rfc/rfc7493.html), The I-JSON Message Format (March 2015).
1220
+ - [RFC 8785](https://www.rfc-editor.org/rfc/rfc8785.html), JSON Canonicalization Scheme (June 2020).
1221
+ - [RFC 7515](https://www.rfc-editor.org/rfc/rfc7515.html), JSON Web Signature (May 2015).
1222
+ - [RFC 7797](https://www.rfc-editor.org/rfc/rfc7797.html), JSON Web Signature Unencoded Payload Option (February 2016).
1223
+ - [RFC 8032](https://www.rfc-editor.org/rfc/rfc8032.html), Edwards-Curve Digital Signature Algorithm (January 2017).
1224
+ - [RFC 8037](https://www.rfc-editor.org/rfc/rfc8037.html), CFRG Elliptic Curve Diffie-Hellman and Signatures in JOSE (January 2017).
1225
+ - [RFC 9864](https://www.rfc-editor.org/rfc/rfc9864.html), Fully-Specified Algorithms for JOSE and COSE (October 2025).
1226
+ - [RFC 3339](https://www.rfc-editor.org/rfc/rfc3339.html), Date and Time on the Internet: Timestamps (July 2002).
1227
+ - [RFC 8610](https://www.rfc-editor.org/rfc/rfc8610.html), Concise Data Definition Language (June 2019).
1228
+ - [RFC 9682](https://www.rfc-editor.org/rfc/rfc9682.html), Updates to the Concise Data Definition Language (November 2024).
1229
+ - [JSON Schema Core, draft 2020-12](https://json-schema.org/draft/2020-12/json-schema-core) and [Validation, draft 2020-12](https://json-schema.org/draft/2020-12/json-schema-validation); only the subset (protocol §9) applies.
1230
+ - [ECMA-262, sixth edition, June 2015](https://262.ecma-international.org/6.0/#sec-tostring-applied-to-the-number-type), number serialization (ECMA-262 §7.1.12.1) and its Note 2.
1231
+ - [A2A v1.0.1](https://github.com/a2aproject/A2A/releases/tag/v1.0.1), released May 2026, the federation mapping's released transport baseline.
1232
+ - [MCP revision 2026-07-28](https://modelcontextprotocol.io/specification/2026-07-28) and [Tasks extension v0.2.3, dated specification](https://github.com/modelcontextprotocol/ext-tasks/blob/v0.2.3/specification/2026-07-28/tasks.md). The Tasks lane remains draft-tracking while the extension is Beta.
1233
+
1234
+ ### Informative references
1235
+
1236
+ - [A2A v1.1.0-rc](https://github.com/a2aproject/A2A/tree/v1.1.0-rc), an informative candidate reference; candidates are not the released baseline.
1237
+ - [SCITT](https://datatracker.ietf.org/wg/scitt/about/), [in-toto](https://in-toto.io/), and [SLSA v1.2](https://slsa.dev/spec/v1.2/).
1238
+ - [OASF](https://github.com/agntcy/oasf), [WIMSE](https://datatracker.ietf.org/wg/wimse/about/), [AuthZEN](https://openid.net/wg/authzen/), and [AP2](https://ap2-protocol.org/).