@agent-blueprint-protocol/verifier 0.8.4 → 1.0.0-rc.2

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 (107) hide show
  1. package/CHANGELOG.md +139 -0
  2. package/LICENSE +1 -1
  3. package/NOTICE +2 -2
  4. package/README.md +143 -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/release-history.json +1 -0
  21. package/dist/release-metadata.json +1 -1
  22. package/dist/spec/FOUNDATION-TRANSITION.md +67 -0
  23. package/dist/spec/IPR.md +27 -0
  24. package/dist/spec/LICENSE +190 -0
  25. package/dist/spec/NOTICE +4 -0
  26. package/dist/spec/README.md +47 -0
  27. package/dist/spec/conformance/base64url-decode.schema.json +176 -0
  28. package/dist/spec/conformance/blueprint-decode.schema.json +280 -0
  29. package/dist/spec/conformance/bounds-new.schema.json +302 -0
  30. package/dist/spec/conformance/bounds_algebra-intersect.schema.json +457 -0
  31. package/dist/spec/conformance/canonicalization-encode.schema.json +280 -0
  32. package/dist/spec/conformance/case-file.schema.json +122 -0
  33. package/dist/spec/conformance/certified-results.json +1 -0
  34. package/dist/spec/conformance/claim.schema.json +52 -0
  35. package/dist/spec/conformance/compatibility-verify.schema.json +262 -0
  36. package/dist/spec/conformance/deployment-decode.schema.json +322 -0
  37. package/dist/spec/conformance/digest-tagged.schema.json +200 -0
  38. package/dist/spec/conformance/evidence.schema.json +249 -0
  39. package/dist/spec/conformance/execution.md +80 -0
  40. package/dist/spec/conformance/extension-resolve.schema.json +264 -0
  41. package/dist/spec/conformance/federation-decode.schema.json +318 -0
  42. package/dist/spec/conformance/federation-verify_commitment.schema.json +342 -0
  43. package/dist/spec/conformance/index.schema.json +102 -0
  44. package/dist/spec/conformance/json-decode.schema.json +287 -0
  45. package/dist/spec/conformance/negotiation-negotiate.schema.json +264 -0
  46. package/dist/spec/conformance/portability-scan.schema.json +188 -0
  47. package/dist/spec/conformance/predicate.schema.json +201 -0
  48. package/dist/spec/conformance/reconcile.schema.json +287 -0
  49. package/dist/spec/conformance/runner.md +185 -0
  50. package/dist/spec/conformance/schema-validate_instance.schema.json +206 -0
  51. package/dist/spec/conformance/signature-verify.schema.json +224 -0
  52. package/dist/spec/conformance/support.schema.json +72 -0
  53. package/dist/spec/errata.md +13 -0
  54. package/dist/spec/grammar/blueprint.cddl +92 -0
  55. package/dist/spec/grammar/deployment.cddl +125 -0
  56. package/dist/spec/grammar/derived/blueprint.schema.json +340 -0
  57. package/dist/spec/grammar/derived/deployment.schema.json +496 -0
  58. package/dist/spec/grammar/derived/taskenvelope.schema.json +244 -0
  59. package/dist/spec/grammar/taskenvelope.cddl +77 -0
  60. package/dist/spec/protocol.md +1237 -0
  61. package/dist/spec/registry/OPERATIONS.md +78 -0
  62. package/dist/spec/registry/registry.json +23 -0
  63. package/dist/verifier/b64url.js +1 -1
  64. package/dist/verifier/blueprint.d.ts +2 -15
  65. package/dist/verifier/blueprint.js +21 -107
  66. package/dist/verifier/bounds_algebra.d.ts +9 -0
  67. package/dist/verifier/bounds_algebra.js +6 -6
  68. package/dist/verifier/cli.js +14 -31
  69. package/dist/verifier/corpus.d.ts +1 -1
  70. package/dist/verifier/corpus.js +5 -1
  71. package/dist/verifier/decode.js +15 -3
  72. package/dist/verifier/deployment.d.ts +8 -0
  73. package/dist/verifier/deployment.js +17 -2
  74. package/dist/verifier/digest.js +1 -1
  75. package/dist/verifier/errors.d.ts +2 -0
  76. package/dist/verifier/errors.js +1 -0
  77. package/dist/verifier/execution.d.ts +13 -0
  78. package/dist/verifier/execution.js +82 -0
  79. package/dist/verifier/facade.d.ts +311 -0
  80. package/dist/verifier/facade.js +78 -0
  81. package/dist/verifier/federation.d.ts +2 -2
  82. package/dist/verifier/federation.js +10 -7
  83. package/dist/verifier/harness.d.ts +16 -0
  84. package/dist/verifier/harness.js +201 -0
  85. package/dist/verifier/index.d.ts +3 -0
  86. package/dist/verifier/index.js +2 -0
  87. package/dist/verifier/mapping.d.ts +139 -0
  88. package/dist/verifier/mapping.js +1 -0
  89. package/dist/verifier/negotiation.d.ts +2 -1
  90. package/dist/verifier/negotiation.js +6 -3
  91. package/dist/verifier/plain.d.ts +4 -0
  92. package/dist/verifier/plain.js +38 -0
  93. package/dist/verifier/predicate.d.ts +7 -0
  94. package/dist/verifier/predicate.js +60 -1
  95. package/dist/verifier/reconcile.d.ts +37 -0
  96. package/dist/verifier/reconcile.js +115 -0
  97. package/dist/verifier/registry.js +9 -51
  98. package/dist/verifier/registry_engine.d.ts +3 -0
  99. package/dist/verifier/registry_engine.js +8 -8
  100. package/dist/verifier/results.d.ts +3 -0
  101. package/dist/verifier/results.js +13 -0
  102. package/dist/verifier/runner.d.ts +2 -0
  103. package/dist/verifier/runner.js +115 -16
  104. package/dist/verifier/signature.d.ts +17 -6
  105. package/dist/verifier/signature.js +41 -25
  106. package/package.json +17 -12
  107. package/dist/corpus/schemas/estate-contract.schema.json +0 -1
@@ -0,0 +1,200 @@
1
+ {
2
+ "type": "object",
3
+ "properties": {
4
+ "surface": {
5
+ "const": "digest.tagged"
6
+ },
7
+ "input": {
8
+ "type": "object",
9
+ "properties": {
10
+ "text": {
11
+ "type": "string"
12
+ },
13
+ "base64url": {
14
+ "type": "string"
15
+ },
16
+ "raw_file": {
17
+ "type": "string"
18
+ },
19
+ "non_binary": {
20
+ "type": "boolean"
21
+ },
22
+ "tagged": {
23
+ "type": "string"
24
+ },
25
+ "declared": {
26
+ "type": "string"
27
+ },
28
+ "domain": {
29
+ "type": "string"
30
+ },
31
+ "sha256_base64url": {
32
+ "type": "string"
33
+ }
34
+ },
35
+ "required": [],
36
+ "additionalProperties": false
37
+ },
38
+ "expected": {
39
+ "oneOf": [
40
+ {
41
+ "type": "object",
42
+ "properties": {
43
+ "verdict": {
44
+ "const": "valid"
45
+ },
46
+ "tagged": {
47
+ "type": "string"
48
+ },
49
+ "verified": {
50
+ "type": "boolean"
51
+ }
52
+ },
53
+ "required": [
54
+ "verdict"
55
+ ],
56
+ "additionalProperties": false
57
+ },
58
+ {
59
+ "type": "object",
60
+ "properties": {
61
+ "verdict": {
62
+ "const": "invalid"
63
+ },
64
+ "code": {
65
+ "enum": [
66
+ "attestation_malformed",
67
+ "audience_mismatch",
68
+ "base64url_invalid",
69
+ "base64url_padded",
70
+ "binding_attestation_stale",
71
+ "binding_descriptor_mismatch",
72
+ "binding_incomplete",
73
+ "bound_source_missing",
74
+ "bound_unit_mismatch",
75
+ "bound_unknown",
76
+ "bound_value_invalid",
77
+ "ceiling:bytes",
78
+ "ceiling:depth",
79
+ "ceiling:items",
80
+ "ceiling:key",
81
+ "ceiling:members",
82
+ "ceiling:nodes",
83
+ "ceiling:number_lexeme",
84
+ "ceiling:string",
85
+ "compatibility_duplicate_entry",
86
+ "compatibility_entry_missing",
87
+ "compatibility_identity_inexact",
88
+ "corpus_applicability_incomplete",
89
+ "corpus_case_id_duplicate",
90
+ "corpus_case_invalid",
91
+ "corpus_count_mismatch",
92
+ "corpus_empty",
93
+ "corpus_file_set_mismatch",
94
+ "corpus_hash_mismatch",
95
+ "corpus_index_invalid",
96
+ "deployment_digest_mismatch",
97
+ "digest_algorithm_unsupported",
98
+ "digest_encoding_invalid",
99
+ "digest_mismatch",
100
+ "duplicate_member",
101
+ "extension_criticality_conflict",
102
+ "extension_duplicate",
103
+ "extension_namespace_invalid",
104
+ "extension_payload_forbidden",
105
+ "extension_retired",
106
+ "extension_schema_digest_mismatch",
107
+ "extension_schema_unavailable",
108
+ "extension_unknown_critical",
109
+ "federation_mapping_conflict",
110
+ "federation_state_unmappable",
111
+ "federation_terminal_conflict",
112
+ "forbidden_portable_value",
113
+ "integer_magnitude",
114
+ "invalid_cardinality",
115
+ "invalid_constraint",
116
+ "invalid_encoding",
117
+ "invalid_number",
118
+ "invalid_syntax",
119
+ "invalid_type",
120
+ "lifecycle_state_invalid",
121
+ "missing_ceiling",
122
+ "missing_required_field",
123
+ "no_authoritative_recovery",
124
+ "non_canonical_bytes",
125
+ "nonportable_content",
126
+ "number_not_double_expressible",
127
+ "predicate_nodes_exceeded",
128
+ "predicate_op_unknown",
129
+ "predicate_path_unresolved",
130
+ "protected_bound_clamp_denied",
131
+ "protocol_revision_unsupported",
132
+ "required_core_field_not_digest_covered",
133
+ "required_core_field_unsupported",
134
+ "schema_complexity_exceeded",
135
+ "schema_dialect_unknown",
136
+ "schema_invalid_shape",
137
+ "schema_keyword_not_allowed",
138
+ "schema_keyword_value_invalid",
139
+ "schema_ref_cycle",
140
+ "schema_ref_unresolvable",
141
+ "signature_algorithm_unsupported",
142
+ "signature_key_unsupported",
143
+ "signature_malformed",
144
+ "signature_not_verified",
145
+ "trailing_bytes",
146
+ "unknown_bound",
147
+ "unknown_member"
148
+ ]
149
+ }
150
+ },
151
+ "required": [
152
+ "verdict",
153
+ "code"
154
+ ],
155
+ "additionalProperties": false
156
+ }
157
+ ]
158
+ },
159
+ "class": {
160
+ "enum": [
161
+ "valid",
162
+ "boundary_near",
163
+ "exact_bound",
164
+ "maximum_plus_one",
165
+ "invalid_encoding",
166
+ "invalid_duplicate",
167
+ "invalid_type",
168
+ "invalid_constraint",
169
+ "invalid_cardinality",
170
+ "unknown_member",
171
+ "tamper_meaningful_byte",
172
+ "digest_mismatch",
173
+ "signature_invalid",
174
+ "revision_above_max",
175
+ "revision_below_min",
176
+ "required_field_unsupported",
177
+ "required_field_not_covered",
178
+ "extension_unknown_critical",
179
+ "extension_unknown_optional_roundtrip",
180
+ "extension_criticality_conflict",
181
+ "extension_schema_unavailable",
182
+ "extension_deprecated_retained",
183
+ "bound_widening_operational",
184
+ "bound_widening_protected",
185
+ "forbidden_portable_value",
186
+ "compatibility_range_rejected",
187
+ "binding_stale",
188
+ "federation_state_unmappable",
189
+ "federation_terminal_conflict",
190
+ "audience_mismatch",
191
+ "terminal_equivocation"
192
+ ]
193
+ }
194
+ },
195
+ "required": [
196
+ "surface",
197
+ "input",
198
+ "expected"
199
+ ]
200
+ }
@@ -0,0 +1,249 @@
1
+ {
2
+ "type": "object",
3
+ "properties": {
4
+ "protocol_revision": {
5
+ "type": "integer"
6
+ },
7
+ "blueprint_digest": {
8
+ "type": "string"
9
+ },
10
+ "deployment_digest": {
11
+ "type": "string"
12
+ },
13
+ "checks": {
14
+ "type": "array",
15
+ "items": {
16
+ "type": "object",
17
+ "properties": {
18
+ "surface": {
19
+ "type": "string"
20
+ },
21
+ "subject": {
22
+ "type": "array",
23
+ "items": {
24
+ "type": [
25
+ "string",
26
+ "integer"
27
+ ]
28
+ }
29
+ },
30
+ "verified": {
31
+ "type": "boolean"
32
+ },
33
+ "detail": {
34
+ "oneOf": [
35
+ {
36
+ "type": "null"
37
+ },
38
+ {
39
+ "type": "string"
40
+ },
41
+ {
42
+ "$ref": "#/$defs/clamp"
43
+ },
44
+ {
45
+ "type": "object",
46
+ "properties": {
47
+ "key_ids": {
48
+ "type": "array",
49
+ "items": {
50
+ "type": "string"
51
+ }
52
+ }
53
+ },
54
+ "required": [
55
+ "key_ids"
56
+ ],
57
+ "additionalProperties": false
58
+ },
59
+ {
60
+ "type": "object",
61
+ "properties": {
62
+ "checked": {
63
+ "type": "array",
64
+ "items": {
65
+ "type": "string"
66
+ }
67
+ },
68
+ "not_verified": {
69
+ "type": "array",
70
+ "items": {
71
+ "type": "string"
72
+ }
73
+ }
74
+ },
75
+ "required": [
76
+ "checked",
77
+ "not_verified"
78
+ ],
79
+ "additionalProperties": false
80
+ }
81
+ ]
82
+ }
83
+ },
84
+ "required": [
85
+ "surface",
86
+ "subject",
87
+ "verified",
88
+ "detail"
89
+ ],
90
+ "additionalProperties": false
91
+ }
92
+ },
93
+ "effective_bounds": {
94
+ "type": "object",
95
+ "properties": {
96
+ "max_attempts": {
97
+ "type": "integer"
98
+ },
99
+ "max_concurrency": {
100
+ "type": "integer"
101
+ },
102
+ "max_depth": {
103
+ "type": "integer"
104
+ },
105
+ "max_descendants": {
106
+ "type": "integer"
107
+ },
108
+ "max_elapsed_ms": {
109
+ "type": "integer"
110
+ },
111
+ "max_fan_out": {
112
+ "type": "integer"
113
+ },
114
+ "max_tokens": {
115
+ "type": "integer"
116
+ },
117
+ "max_cost": {
118
+ "type": "object",
119
+ "properties": {
120
+ "amount": {
121
+ "type": "integer"
122
+ },
123
+ "currency": {
124
+ "type": "string"
125
+ }
126
+ },
127
+ "required": [
128
+ "amount",
129
+ "currency"
130
+ ],
131
+ "additionalProperties": false
132
+ },
133
+ "classification_ceiling": {
134
+ "type": "object",
135
+ "properties": {
136
+ "ordinal": {
137
+ "type": "string"
138
+ },
139
+ "markers": {
140
+ "type": "array",
141
+ "items": {
142
+ "type": "string"
143
+ }
144
+ }
145
+ },
146
+ "required": [
147
+ "ordinal",
148
+ "markers"
149
+ ],
150
+ "additionalProperties": false
151
+ },
152
+ "disclosure_ceiling": {
153
+ "type": "string"
154
+ },
155
+ "effect_impact_ceiling": {
156
+ "type": "string"
157
+ },
158
+ "authority_trait": {
159
+ "type": "string"
160
+ },
161
+ "approval_trait": {
162
+ "type": "string"
163
+ }
164
+ },
165
+ "additionalProperties": false
166
+ },
167
+ "clamps": {
168
+ "type": "array",
169
+ "items": {
170
+ "$ref": "#/$defs/clamp"
171
+ }
172
+ },
173
+ "optional_extensions_retained": {
174
+ "type": "array",
175
+ "items": {
176
+ "type": "string"
177
+ }
178
+ },
179
+ "not_verified": {
180
+ "type": "array",
181
+ "items": {
182
+ "type": "string"
183
+ }
184
+ }
185
+ },
186
+ "required": [
187
+ "protocol_revision",
188
+ "blueprint_digest",
189
+ "deployment_digest",
190
+ "checks",
191
+ "effective_bounds",
192
+ "clamps",
193
+ "optional_extensions_retained",
194
+ "not_verified"
195
+ ],
196
+ "additionalProperties": false,
197
+ "$defs": {
198
+ "clamp": {
199
+ "type": "object",
200
+ "properties": {
201
+ "field": {
202
+ "type": "string"
203
+ },
204
+ "class": {
205
+ "type": "string"
206
+ },
207
+ "unit": {
208
+ "type": "string"
209
+ },
210
+ "requested": {
211
+ "type": [
212
+ "null",
213
+ "boolean",
214
+ "object",
215
+ "array",
216
+ "number",
217
+ "string"
218
+ ]
219
+ },
220
+ "effective": {
221
+ "type": [
222
+ "null",
223
+ "boolean",
224
+ "object",
225
+ "array",
226
+ "number",
227
+ "string"
228
+ ]
229
+ },
230
+ "source": {
231
+ "type": "string"
232
+ },
233
+ "acknowledged": {
234
+ "type": "boolean"
235
+ }
236
+ },
237
+ "required": [
238
+ "field",
239
+ "class",
240
+ "unit",
241
+ "requested",
242
+ "effective",
243
+ "source",
244
+ "acknowledged"
245
+ ],
246
+ "additionalProperties": false
247
+ }
248
+ }
249
+ }
@@ -0,0 +1,80 @@
1
+ # External conformance execution
2
+
3
+ This document is normative for conformance adapters. It specifies a process
4
+ transport, not a host execution or authorization protocol.
5
+
6
+ The harness spawns the command after `--`. Stdin and stdout carry UTF-8 JSON,
7
+ one object per LF-terminated line. Stdout has no banners. Stderr is diagnostic.
8
+ Each line, including LF, is at most 5,000,000 bytes. The harness defaults to
9
+ 30,000 ms for each response, configurable from 1 to 300,000 ms.
10
+
11
+ The first harness line has exactly `protocol` equal to
12
+ `agent-blueprint-protocol-conformance-execution`, integer `version` equal to
13
+ 1, `corpus_digest`, and `registry_digest`. The adapter MUST answer with the
14
+ same four members populated from its own corpus/registry view. Either side
15
+ MUST refuse a mismatch before executing cases.
16
+
17
+ Subsequent requests have exactly `{id, surface, input}`. They never carry
18
+ `expected`. Inputs and their referenced corpus data have the meaning in the
19
+ [runner contract](runner.md). An adapter resolves sidecars and schema files
20
+ from the corpus it identified at handshake. Requests arrive sorted by case
21
+ id. The adapter MUST emit exactly one `{id, result}` line in request order.
22
+ `result` is the complete projection specified by the runner contract, never
23
+ a boolean comparison with an answer supplied by the harness. Requests can
24
+ be pipelined. EOF on stdin ends the run; the adapter MUST drain its responses
25
+ and exit successfully. It MUST NOT emit an extra completion line.
26
+
27
+ For the release-certified corpus the harness checks each complete projection
28
+ against the shipped certified document, including the absence of extra result
29
+ members. For a named prior census it checks that census's expected fields.
30
+ It writes the canonical results
31
+ document, and exits nonzero on disagreement. Transport outcomes are harness
32
+ outcomes, not additions to the protocol's closed error vocabulary:
33
+
34
+ | Exit | Outcome |
35
+ |---|---|
36
+ | 0 | agreement |
37
+ | 2 | usage, corpus integrity, or claim-input failure |
38
+ | 10 | handshake_mismatch |
39
+ | 11 | duplicate_id |
40
+ | 12 | missing_response: successful adapter exit after some but not all replies |
41
+ | 13 | extra_response |
42
+ | 14 | reordered_response (including an unexpected id) |
43
+ | 15 | malformed_line (including wrong response members or unterminated line) |
44
+ | 16 | oversized_line |
45
+ | 17 | response_timeout: a response missed its deadline; a later response cannot restore success |
46
+ | 18 | early_exit: spawn failure, nonzero exit, or exit before the first case response |
47
+ | 19 | disagreement |
48
+
49
+ A successful exit with all expected responses is required even when every
50
+ individual projected verdict agrees. An adapter that exits before returning
51
+ its final responses cannot pass. Failure precedence follows observation:
52
+ line framing and shape, duplicate detection, order, agreement, then clean
53
+ termination. Clean process termination has the same deadline as a response,
54
+ even if stdout has already closed. A deadline failure ends the process and invalidates late output.
55
+
56
+ ## Running and publishing a claim
57
+
58
+ The npm kit supplies the harness:
59
+
60
+ ```sh
61
+ agent-blueprint-protocol conformance run --corpus ./conformance --results results.json -- ./example-adapter
62
+ ```
63
+
64
+ After a pass, `--claim claim.json --implementation example-verifier
65
+ --implementation-version 1 --source https://example.com/source
66
+ --platform example-platform --date 2026-11-10` emits an unsigned claim.
67
+ `claim.schema.json` defines its format. The fields identify implementation,
68
+ version, source URL, platform, corpus digest, registry digest, SHA-256 digest
69
+ of the exact results document (`sha-256:` plus unpadded base64url), and date.
70
+
71
+ A claim requires the release-certified corpus. To claim a named prior census,
72
+ use `--prior-corpus-digest <exact-tagged-digest>` explicitly; that value MUST
73
+ match the loaded prior corpus and appear in the shipped release history. A non-certified corpus never silently becomes
74
+ a current-release claim. Publish the claim beside the exact results document,
75
+ source revision and reproducible command on the implementation's own release
76
+ page. No claim registry is created by this specification.
77
+
78
+ A corpus pass does not prove honest computation: the corpus and its expected
79
+ answers are public. It proves nothing outside that corpus census. It says
80
+ nothing about any host behavior, trust selection, authorization, or execution.