@agent-blueprint-protocol/verifier 1.0.1 → 1.1.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 (48) hide show
  1. package/CHANGELOG.md +226 -194
  2. package/README.md +36 -15
  3. package/dist/examples/echo-blueprint.json +1 -0
  4. package/dist/examples/echo-deployment.json +1 -0
  5. package/dist/examples/extension-blueprint.json +1 -0
  6. package/dist/examples/federation-envelope.json +1 -0
  7. package/dist/examples/signed-blueprint.json +1 -0
  8. package/dist/release-history.json +1 -1
  9. package/dist/release-metadata.json +1 -1
  10. package/dist/spec/FOUNDATION-TRANSITION.md +9 -17
  11. package/dist/spec/IPR.md +1 -1
  12. package/dist/spec/README.md +2 -2
  13. package/dist/spec/conformance/runner.md +2 -2
  14. package/dist/spec/errata.md +1 -1
  15. package/dist/spec/grammar/blueprint.cddl +1 -1
  16. package/dist/spec/grammar/deployment.cddl +5 -3
  17. package/dist/spec/grammar/derived/deployment.schema.json +34 -21
  18. package/dist/spec/grammar/taskenvelope.cddl +1 -1
  19. package/dist/spec/protocol.md +86 -93
  20. package/dist/verifier/b64url.js +1 -1
  21. package/dist/verifier/blueprint.d.ts +17 -0
  22. package/dist/verifier/blueprint.js +12 -4
  23. package/dist/verifier/bounds.js +1 -1
  24. package/dist/verifier/bounds_algebra.js +1 -1
  25. package/dist/verifier/canonical.js +3 -3
  26. package/dist/verifier/cli.js +5 -5
  27. package/dist/verifier/compatibility.js +2 -2
  28. package/dist/verifier/corpus.js +2 -2
  29. package/dist/verifier/decode.js +4 -4
  30. package/dist/verifier/deployment.d.ts +17 -0
  31. package/dist/verifier/deployment.js +12 -4
  32. package/dist/verifier/digest.js +1 -1
  33. package/dist/verifier/extension.js +2 -2
  34. package/dist/verifier/facade.d.ts +6 -0
  35. package/dist/verifier/facade.js +6 -0
  36. package/dist/verifier/federation.d.ts +17 -0
  37. package/dist/verifier/federation.js +11 -3
  38. package/dist/verifier/mapping.d.ts +10 -10
  39. package/dist/verifier/mapping.js +1 -1
  40. package/dist/verifier/negotiation.js +4 -4
  41. package/dist/verifier/portability.js +2 -2
  42. package/dist/verifier/registry.js +1 -1
  43. package/dist/verifier/report.js +1 -1
  44. package/dist/verifier/runner.js +2 -2
  45. package/dist/verifier/schema.js +4 -4
  46. package/dist/verifier/signature.js +6 -6
  47. package/dist/verifier/value.js +3 -3
  48. package/package.json +3 -2
@@ -1,4 +1,4 @@
1
- // RFC 8785 JCS encoder — the mirror of AgentBlueprintProtocol.Canonicalization.
1
+ // RFC 8785 JCS encoder, the mirror of AgentBlueprintProtocol.Canonicalization.
2
2
  //
3
3
  // The ES6 number oracle lives HERE and only here: canonical
4
4
  // number emission and the decoder's window admission share one decision, the
@@ -7,12 +7,12 @@
7
7
  // §7.1.12.1 IS the native behavior); structure, sorting, and escaping are
8
8
  // hand-rolled so the corpus exercises this implementation, not V8's wholesale.
9
9
  //
10
- // Member sort: plain JS string comparison — `<` on strings is UTF-16 code-unit
10
+ // Member sort: plain JS string comparison; `<` on strings is UTF-16 code-unit
11
11
  // lexicographic, exactly RFC 8785 §3.2.3 (U+10000 sorts before U+FF3A).
12
12
  //
13
13
  // The decode ↔ canonical import cycle (verify needs decode; decode's window
14
14
  // rule needs the number oracle) is a node-ESM circular import over hoisted
15
- // function declarations — resolved at call time, never at module init.
15
+ // function declarations, resolved at call time, never at module init.
16
16
  import { coerce, maximum } from "./bounds.js";
17
17
  import { decode } from "./decode.js";
18
18
  import { err, ok, IJSON_MAX } from "./value.js";
@@ -1,10 +1,10 @@
1
- // The verifier CLI — the mirror of AgentBlueprintProtocol.Conformance.Cli:
1
+ // The verifier CLI, the mirror of AgentBlueprintProtocol.Conformance.Cli:
2
2
  // `--corpus <dir>` is REQUIRED (no default, so a vacuous run is impossible);
3
3
  // exit 0 agreement, 1 disagreement, 2 usage error or corpus integrity
4
- // failure. Report bytes go to stdout with NO trailing newline — including
4
+ // failure. Report bytes go to stdout with NO trailing newline, including
5
5
  // on exit 1 (disagreement still prints the report; the escript's
6
6
  // IO.binwrite parity). Exit 3 marks an internal invariant (outside the
7
- // 0/1/2 contract, exactly as an escript crash is — loud, never laundered
7
+ // 0/1/2 contract, exactly as an escript crash is, loud, never laundered
8
8
  // into "disagreement").
9
9
  import { resultsDocument, canonical } from "./results.js";
10
10
  import { serve } from "./execution.js";
@@ -58,7 +58,7 @@ async function main(argv) {
58
58
  return verifyArtifact(argv[1]);
59
59
  }
60
60
  // --prior-corpus: the compatibility-replay entry (a RELEASED census under
61
- // a newer verifier — the registry/floor couplings suspended by the
61
+ // a newer verifier; the registry/floor couplings suspended by the
62
62
  // loader's prior-census mode). The report and exit contract are identical
63
63
  // to --corpus; the compatibility gate byte-compares this output against
64
64
  // the Elixir side's in-process report.
@@ -94,7 +94,7 @@ async function main(argv) {
94
94
  const agreed = results.flat().filter((r) => r.agree).length;
95
95
  return agreed === results.flat().length && agreed > 0 ? 0 : 1;
96
96
  }
97
- // Single-artifact mode — a kit-side convenience the escript deliberately
97
+ // Single-artifact mode: a kit-side convenience the escript deliberately
98
98
  // does NOT mirror (its CLI contract stays --corpus-only, so a vacuous run
99
99
  // stays impossible there). One artifact file, verified against all three
100
100
  // artifact kinds; valid iff any kind decodes. A valid report names the
@@ -14,7 +14,7 @@ export function verify(deployment, observed) {
14
14
  return validated;
15
15
  return matchManifest(manifest.v, validated.v);
16
16
  }
17
- // The exactness predicate (public on the twin): total over junk input — any
17
+ // The exactness predicate (public on the twin): total over junk input; any
18
18
  // non-conforming shape answers false.
19
19
  export function exact(identity) {
20
20
  if (!identity || typeof identity !== "object")
@@ -82,7 +82,7 @@ function validatedObserved(identities) {
82
82
  }
83
83
  return { ok: true, v: out };
84
84
  }
85
- // Match, manifest member order: per identity — its own exactness, the
85
+ // Match, manifest member order: per identity, its own exactness, the
86
86
  // unique-by name re-assertion, then the observed candidates with the exact
87
87
  // tuple. None denies missing; many deny duplicate; one emits the check with
88
88
  // the parsed observed digest.
@@ -1,4 +1,4 @@
1
- // The conformance-corpus loader and integrity verifier — the mirror of
1
+ // The conformance-corpus loader and integrity verifier, the mirror of
2
2
  // AgentBlueprintProtocol.Conformance.Corpus. No I/O: load() takes a path→bytes
3
3
  // map; the CLI owns the filesystem. Every check is two-directional and fails
4
4
  // with the twin's typed, value-free codes (exit 2 at the CLI):
@@ -524,7 +524,7 @@ function verifyCaseValidity(cases) {
524
524
  return caseInvalid();
525
525
  if (!CLASSES.includes(caseObj.klass))
526
526
  return caseInvalid();
527
- // A verdict-only valid expectation agrees with any ok-map — the vacuous
527
+ // A verdict-only valid expectation agrees with any ok-map; the vacuous
528
528
  // green; a valid case must pin at least one projection field.
529
529
  if (caseObj.expected.t === "obj") {
530
530
  const verdict = memberString(caseObj.expected, "verdict");
@@ -1,4 +1,4 @@
1
- // Bounded JSON scanner — the mirror of AgentBlueprintProtocol.Json over
1
+ // Bounded JSON scanner, the mirror of AgentBlueprintProtocol.Json over
2
2
  // Erlang's :json decoder. Own scanner (JSON.parse keeps LAST duplicate, the
3
3
  // proven divergence the design names), every ceiling enforced, duplicate members
4
4
  // rejected, the integer window admitted through the one ES6 oracle.
@@ -9,12 +9,12 @@
9
9
  // duplicate rejection at container close → trailing bytes at root.
10
10
  // A STRUCTURAL parse failure classifies by whole-input UTF-8 validity (the
11
11
  // twin's classify_parse_error): invalid_encoding when any byte is bad, else
12
- // invalid_syntax. Ceiling/code failures carry their own reason verbatim —
12
+ // invalid_syntax. Ceiling/code failures carry their own reason verbatim;
13
13
  // the twin throws those from inside :json's hooks with the reason attached.
14
14
  import { coerce, maximum } from "./bounds.js";
15
15
  import { number } from "./canonical.js";
16
16
  import { err, ok } from "./value.js";
17
- // Thrown for ceiling/code denials — reason rides the exception.
17
+ // Thrown for ceiling/code denials; reason rides the exception.
18
18
  export class CodeFail extends Error {
19
19
  code;
20
20
  constructor(code) {
@@ -22,7 +22,7 @@ export class CodeFail extends Error {
22
22
  this.code = code;
23
23
  }
24
24
  }
25
- // Thrown for structural parse failures — classified by input validity.
25
+ // Thrown for structural parse failures, classified by input validity.
26
26
  export class SyntaxFail extends Error {
27
27
  }
28
28
  export function decode(input, bounds) {
@@ -63,4 +63,21 @@ export declare function verifyContentDigest(deployment: Deployment): VResult;
63
63
  export declare function verifyBinding(deployment: Deployment, bound: blueprint.Blueprint, obs: Observations): VResult;
64
64
  export declare function scan(value: Value, authoredNs: Set<string>): VResult;
65
65
  export declare function parseTimestamp(stamped: string): number | null;
66
+ /** Sorted artifact vocabulary for a supported protocol revision. */
67
+ export declare function members(revision: unknown): {
68
+ ok: true;
69
+ v: string[];
70
+ subject?: undefined;
71
+ e?: undefined;
72
+ } | {
73
+ v?: undefined;
74
+ ok: false;
75
+ e: string;
76
+ subject: string[];
77
+ } | {
78
+ v?: undefined;
79
+ subject?: undefined;
80
+ ok: false;
81
+ e: string;
82
+ };
66
83
  export {};
@@ -682,7 +682,7 @@ function checkSignatureEntry(entry) {
682
682
  return attrs;
683
683
  return attrs.v.purpose === "deployment" ? { ok: true } : { ok: false, e: "invalid_constraint" };
684
684
  }
685
- // An eligibility expression: any non-empty JSON object — the host's policy
685
+ // An eligibility expression: any non-empty JSON object; the host's policy
686
686
  // DSL, held verbatim and name-denylist-scanned.
687
687
  function checkExpression(value) {
688
688
  if (value.t === "obj" && value.v.length > 0)
@@ -691,7 +691,7 @@ function checkExpression(value) {
691
691
  }
692
692
  // The as_of total rule: exactly (required + positive age) or (none + null).
693
693
  // A MISSING max_age_ms defers to the member recursion; a bad mode defers to
694
- // its enum — one reason per defect, no collisions.
694
+ // its enum; one reason per defect, no collisions.
695
695
  function checkAsOf(value) {
696
696
  if (value.t !== "obj")
697
697
  return { ok: true };
@@ -810,7 +810,7 @@ function scanOpenRegions(members, validatedNs) {
810
810
  }
811
811
  return { ok: true };
812
812
  }
813
- // Value shapes over every other core string, recursively — no member of this
813
+ // Value shapes over every other core string, recursively; no member of this
814
814
  // artifact is exempt.
815
815
  function scanCoreStrings(members) {
816
816
  for (const [name, value] of members) {
@@ -825,7 +825,7 @@ function scanCoreStrings(members) {
825
825
  return { ok: true };
826
826
  }
827
827
  // The one free string inside an evidence entry: evidence members are
828
- // digest-UNCOVERED — a secret-shaped key there must still red.
828
+ // digest-UNCOVERED; a secret-shaped key there must still red.
829
829
  function scanEvidenceKeyIds(members) {
830
830
  const signatures = keyfind(members, "signatures");
831
831
  if (signatures === null || signatures.t !== "arr")
@@ -866,3 +866,11 @@ export function parseTimestamp(stamped) {
866
866
  }
867
867
  return ms;
868
868
  }
869
+ /** Sorted artifact vocabulary for a supported protocol revision. */
870
+ export function members(revision) {
871
+ if (revision === 1)
872
+ return { ok: true, v: table().map(spec => spec.name).sort() };
873
+ if (typeof revision === 'number' && Number.isInteger(revision))
874
+ return { ok: false, e: 'protocol_revision_unsupported', subject: ['protocol_revision'] };
875
+ return { ok: false, e: 'invalid_type' };
876
+ }
@@ -1,4 +1,4 @@
1
- // Domain-separated SHA-256 digests — the mirror of AgentBlueprintProtocol.Digest:
1
+ // Domain-separated SHA-256 digests, the mirror of AgentBlueprintProtocol.Digest:
2
2
  // preimage `separator || 0x00 || jcs_bytes` under the registered separator
3
3
  // (protocol §5), tagged wire form "sha-256:<43-char unpadded base64url>".
4
4
  import { createHash } from "node:crypto";
@@ -34,7 +34,7 @@ export function envelopeOk(value) {
34
34
  return { ok: true };
35
35
  }
36
36
  // Every {namespace, body} pair in the envelope, both regions, in document
37
- // order — the scan's walk over the open region. `members` is the ROOT member
37
+ // order; the scan's walk over the open region. `members` is the ROOT member
38
38
  // list (the "extensions" member is located by name).
39
39
  export function bodies(members) {
40
40
  const out = [];
@@ -49,7 +49,7 @@ export function bodies(members) {
49
49
  }
50
50
  return out;
51
51
  }
52
- // The critical region's namespace set for THIS value — the authored-channel
52
+ // The critical region's namespace set for THIS value: the authored-channel
53
53
  // tie (a validated-critical list must sit inside this set).
54
54
  export function criticalNamespaces(members) {
55
55
  const out = new Set();
@@ -279,6 +279,12 @@ export interface ResultsDocument {
279
279
  readonly result: Readonly<Record<string, JsonValue>>;
280
280
  }[];
281
281
  }
282
+ /** Return the sorted Blueprint Core vocabulary for the revision (since 1.1.0). */
283
+ export declare function blueprintMembers(revision: unknown): Result<readonly string[]>;
284
+ /** Return the sorted Deployment Manifest vocabulary for the revision (since 1.1.0). */
285
+ export declare function deploymentMembers(revision: unknown): Result<readonly string[]>;
286
+ /** Return the sorted Federation TaskEnvelope vocabulary for the revision (since 1.1.0). */
287
+ export declare function federationMembers(revision: unknown): Result<readonly string[]>;
282
288
  /** Decode canonical Blueprint bytes under optional tightened ceilings. */
283
289
  export declare function decodeBlueprint(input: Uint8Array | string, options?: DecodeOptions): Result<Blueprint>;
284
290
  /** Decode canonical Deployment bytes under optional tightened ceilings. */
@@ -37,6 +37,12 @@ function support(s) { return { revisions: new Set(s.revisions), coreFields: new
37
37
  function artifact(kind, result, mod) { if (!result.ok)
38
38
  return result; const encoded = mod.canonicalBytes(result.v); if (!encoded.ok)
39
39
  return encoded; return { ok: true, v: { kind, value: plain(result.v.value), canonicalBytes: Buffer.from(encoded.v), contentDigest: kind === 'federation' ? null : mod.contentDigest(result.v) } }; }
40
+ /** Return the sorted Blueprint Core vocabulary for the revision (since 1.1.0). */
41
+ export function blueprintMembers(revision) { return guarded(() => bp.members(revision)); }
42
+ /** Return the sorted Deployment Manifest vocabulary for the revision (since 1.1.0). */
43
+ export function deploymentMembers(revision) { return guarded(() => dep.members(revision)); }
44
+ /** Return the sorted Federation TaskEnvelope vocabulary for the revision (since 1.1.0). */
45
+ export function federationMembers(revision) { return guarded(() => fed.members(revision)); }
40
46
  /** Decode canonical Blueprint bytes under optional tightened ceilings. */
41
47
  export function decodeBlueprint(input, options = {}) { return guarded(() => artifact('blueprint', bp.decode(bytes(input), options.bounds), bp)); }
42
48
  /** Decode canonical Deployment bytes under optional tightened ceilings. */
@@ -74,3 +74,20 @@ export declare function verifyCommitment(envelope: Envelope, context: Context):
74
74
  ok: false;
75
75
  e: string;
76
76
  };
77
+ /** Sorted artifact vocabulary for a supported protocol revision. */
78
+ export declare function members(revision: unknown): {
79
+ subject?: undefined;
80
+ e?: undefined;
81
+ ok: true;
82
+ v: string[];
83
+ } | {
84
+ v?: undefined;
85
+ ok: false;
86
+ e: string;
87
+ subject: string[];
88
+ } | {
89
+ v?: undefined;
90
+ subject?: undefined;
91
+ ok: false;
92
+ e: string;
93
+ };
@@ -332,7 +332,7 @@ function scan(value) {
332
332
  }
333
333
  return { ok: true };
334
334
  }
335
- // R4: correlation grants nothing — an authority-shaped claim is nonportable
335
+ // R4: correlation grants nothing; an authority-shaped claim is nonportable
336
336
  // content, denied with the claim's schema path.
337
337
  function claimScan(claim, index) {
338
338
  if (claim.t !== "obj")
@@ -348,7 +348,7 @@ function claimScan(claim, index) {
348
348
  return result.ok ? { ok: true } : { ok: false, e: result.e };
349
349
  }
350
350
  // The receipt's signature entry carries key ids in two positions (protected
351
- // kid and signed key_id — equal by the JWS shape check), both scanned STRICT.
351
+ // kid and signed key_id; equal by the JWS shape check), both scanned STRICT.
352
352
  function keyIdPositions(entry) {
353
353
  const header = keyfind(entry, "protected");
354
354
  const attrs = keyfind(entry, "signed_attributes");
@@ -694,7 +694,7 @@ function contextCompare(members, context) {
694
694
  continue;
695
695
  // The twin's exact match: members[m] must equal {:string, pin}. A pin
696
696
  // that is present but not a string can NEVER equal a string member, so
697
- // it denies — the receiver's constraint is enforced, never dropped.
697
+ // it denies; the receiver's constraint is enforced, never dropped.
698
698
  const found = members.get(member);
699
699
  const pinValue = pin;
700
700
  const matches = pinValue !== null &&
@@ -762,3 +762,11 @@ function parseTimestampMs(stamped) {
762
762
  return null;
763
763
  return Date.UTC(Number(y), Number(mo) - 1, Number(d), Number(h), Number(mi), Number(s));
764
764
  }
765
+ /** Sorted artifact vocabulary for a supported protocol revision. */
766
+ export function members(revision) {
767
+ if (revision === 1)
768
+ return { ok: true, v: table().map(spec => spec.name).sort() };
769
+ if (typeof revision === 'number' && Number.isInteger(revision))
770
+ return { ok: false, e: 'protocol_revision_unsupported', subject: ['protocol_revision'] };
771
+ return { ok: false, e: 'invalid_type' };
772
+ }
@@ -6,21 +6,21 @@ export declare const rows: readonly [{
6
6
  readonly verdict: "native";
7
7
  }, {
8
8
  readonly index: 2;
9
- readonly a2a_location: "none — Message.message_id (a2a.proto:262) is a message id, not an idempotency key";
9
+ readonly a2a_location: "none: Message.message_id (a2a.proto:262) is a message id, not an idempotency key";
10
10
  readonly logical_field: "idempotency_identity";
11
11
  readonly mcp_location: "none";
12
12
  readonly verdict: "extension";
13
13
  }, {
14
14
  readonly index: 3;
15
- readonly a2a_location: "Message.reference_task_ids (a2a.proto:276), Task.context_id (a2a.proto:173) — a reference, not a parent execution";
15
+ readonly a2a_location: "Message.reference_task_ids (a2a.proto:276), Task.context_id (a2a.proto:173): a reference, not a parent execution";
16
16
  readonly logical_field: "parent_execution_reference";
17
17
  readonly mcp_location: "none";
18
18
  readonly verdict: "partial";
19
19
  }, {
20
20
  readonly index: 4;
21
- readonly a2a_location: "none — SecurityScheme/SecurityRequirement (a2a.proto:495-517) are transport-level";
21
+ readonly a2a_location: "none: SecurityScheme/SecurityRequirement (a2a.proto:495-517) are transport-level";
22
22
  readonly logical_field: "initiating_subject";
23
- readonly mcp_location: "none — transport auth";
23
+ readonly mcp_location: "none: transport auth";
24
24
  readonly verdict: "extension";
25
25
  }, {
26
26
  readonly index: 5;
@@ -36,13 +36,13 @@ export declare const rows: readonly [{
36
36
  readonly verdict: "extension";
37
37
  }, {
38
38
  readonly index: 7;
39
- readonly a2a_location: "Message.parts[].data (a2a.proto:233), Part.metadata (a2a.proto:236) — a payload home, not a digest commitment";
39
+ readonly a2a_location: "Message.parts[].data (a2a.proto:233), Part.metadata (a2a.proto:236): a payload home, not a digest commitment";
40
40
  readonly logical_field: "input_commitment";
41
41
  readonly mcp_location: "request params";
42
42
  readonly verdict: "partial";
43
43
  }, {
44
44
  readonly index: 8;
45
- readonly a2a_location: "Part.media_type (a2a.proto:241), AgentSkill.output_modes (a2a.proto:449) — media type is not a schema identity";
45
+ readonly a2a_location: "Part.media_type (a2a.proto:241), AgentSkill.output_modes (a2a.proto:449): media type is not a schema identity";
46
46
  readonly logical_field: "result_schema";
47
47
  readonly mcp_location: "CompletedTask.result {[key: string]: unknown} (mcp-schema.ts:135)";
48
48
  readonly verdict: "extension";
@@ -56,7 +56,7 @@ export declare const rows: readonly [{
56
56
  readonly index: 10;
57
57
  readonly a2a_location: "SendMessageConfiguration (a2a.proto:143-161) has no time bound";
58
58
  readonly logical_field: "time_policy";
59
- readonly mcp_location: "Task.ttlMs (mcp-schema.ts:82) — a storage TTL, NOT an execution bound";
59
+ readonly mcp_location: "Task.ttlMs (mcp-schema.ts:82): a storage TTL, NOT an execution bound";
60
60
  readonly verdict: "partial";
61
61
  }, {
62
62
  readonly index: 11;
@@ -96,7 +96,7 @@ export declare const rows: readonly [{
96
96
  readonly verdict: "extension";
97
97
  }, {
98
98
  readonly index: 17;
99
- readonly a2a_location: "TASK_STATE_INPUT_REQUIRED (a2a.proto:201) + TaskStatus.message — free-form, not typed";
99
+ readonly a2a_location: "TASK_STATE_INPUT_REQUIRED (a2a.proto:201) + TaskStatus.message: free-form, not typed";
100
100
  readonly logical_field: "checkpoint_request";
101
101
  readonly mcp_location: "status input_required + inputRequests: InputRequest union (mcp-schema.ts:111-119, mcp-spec.types.ts:545)";
102
102
  readonly verdict: "partial";
@@ -116,7 +116,7 @@ export declare const rows: readonly [{
116
116
  readonly index: 20;
117
117
  readonly a2a_location: "TASK_STATE_COMPLETED/FAILED/CANCELED/REJECTED (a2a.proto:194-205)";
118
118
  readonly logical_field: "terminal_state";
119
- readonly mcp_location: "completed/failed/cancelled (mcp-schema.ts:31-36) — lossy both directions";
119
+ readonly mcp_location: "completed/failed/cancelled (mcp-schema.ts:31-36): lossy both directions";
120
120
  readonly verdict: "partial";
121
121
  }, {
122
122
  readonly index: 21;
@@ -126,7 +126,7 @@ export declare const rows: readonly [{
126
126
  readonly verdict: "extension";
127
127
  }, {
128
128
  readonly index: 22;
129
- readonly a2a_location: "AgentCard.version (a2a.proto:374-376) — a version string, not an exact build identity";
129
+ readonly a2a_location: "AgentCard.version (a2a.proto:374-376): a version string, not an exact build identity";
130
130
  readonly logical_field: "compatibility_reference";
131
131
  readonly mcp_location: "none";
132
132
  readonly verdict: "extension";
@@ -1 +1 @@
1
- export const rows = [{ "index": 1, "a2a_location": "Task.id (a2a.proto:170)", "logical_field": "task_identity", "mcp_location": "Task.taskId (mcp-schema.ts:47)", "verdict": "native" }, { "index": 2, "a2a_location": "none — Message.message_id (a2a.proto:262) is a message id, not an idempotency key", "logical_field": "idempotency_identity", "mcp_location": "none", "verdict": "extension" }, { "index": 3, "a2a_location": "Message.reference_task_ids (a2a.proto:276), Task.context_id (a2a.proto:173) — a reference, not a parent execution", "logical_field": "parent_execution_reference", "mcp_location": "none", "verdict": "partial" }, { "index": 4, "a2a_location": "none — SecurityScheme/SecurityRequirement (a2a.proto:495-517) are transport-level", "logical_field": "initiating_subject", "mcp_location": "none — transport auth", "verdict": "extension" }, { "index": 5, "a2a_location": "none", "logical_field": "blueprint_digest", "mcp_location": "none", "verdict": "extension" }, { "index": 6, "a2a_location": "none", "logical_field": "deployment_digest", "mcp_location": "none", "verdict": "extension" }, { "index": 7, "a2a_location": "Message.parts[].data (a2a.proto:233), Part.metadata (a2a.proto:236) — a payload home, not a digest commitment", "logical_field": "input_commitment", "mcp_location": "request params", "verdict": "partial" }, { "index": 8, "a2a_location": "Part.media_type (a2a.proto:241), AgentSkill.output_modes (a2a.proto:449) — media type is not a schema identity", "logical_field": "result_schema", "mcp_location": "CompletedTask.result {[key: string]: unknown} (mcp-schema.ts:135)", "verdict": "extension" }, { "index": 9, "a2a_location": "none", "logical_field": "result_classification_ceiling", "mcp_location": "none", "verdict": "extension" }, { "index": 10, "a2a_location": "SendMessageConfiguration (a2a.proto:143-161) has no time bound", "logical_field": "time_policy", "mcp_location": "Task.ttlMs (mcp-schema.ts:82) — a storage TTL, NOT an execution bound", "verdict": "partial" }, { "index": 11, "a2a_location": "none", "logical_field": "resource_policy", "mcp_location": "none", "verdict": "extension" }, { "index": 12, "a2a_location": "Task.id + GetTask (a2a.proto:45)", "logical_field": "recovery_handle", "mcp_location": "taskId + tasks/get (mcp-tasks.md Task Polling)", "verdict": "native" }, { "index": 13, "a2a_location": "transport-level only (SecurityScheme)", "logical_field": "issuer", "mcp_location": "transport auth", "verdict": "extension" }, { "index": 14, "a2a_location": "none", "logical_field": "subject", "mcp_location": "none", "verdict": "extension" }, { "index": 15, "a2a_location": "none", "logical_field": "audience", "mcp_location": "none", "verdict": "extension" }, { "index": 16, "a2a_location": "none", "logical_field": "identity_mapping_evidence", "mcp_location": "none", "verdict": "extension" }, { "index": 17, "a2a_location": "TASK_STATE_INPUT_REQUIRED (a2a.proto:201) + TaskStatus.message — free-form, not typed", "logical_field": "checkpoint_request", "mcp_location": "status input_required + inputRequests: InputRequest union (mcp-schema.ts:111-119, mcp-spec.types.ts:545)", "verdict": "partial" }, { "index": 18, "a2a_location": "TaskStatus.state (a2a.proto:213)", "logical_field": "checkpoint_status", "mcp_location": "Task.status (mcp-schema.ts:31-36)", "verdict": "native" }, { "index": 19, "a2a_location": "none", "logical_field": "checkpoint_commitment", "mcp_location": "tasks/update inputResponses (mcp-schema.ts:232-246) carries responses, no commitment digest", "verdict": "extension" }, { "index": 20, "a2a_location": "TASK_STATE_COMPLETED/FAILED/CANCELED/REJECTED (a2a.proto:194-205)", "logical_field": "terminal_state", "mcp_location": "completed/failed/cancelled (mcp-schema.ts:31-36) — lossy both directions", "verdict": "partial" }, { "index": 21, "a2a_location": "AgentCardSignature (a2a.proto:455-467) signs the AgentCard, not a task result", "logical_field": "evidence_receipt", "mcp_location": "none", "verdict": "extension" }, { "index": 22, "a2a_location": "AgentCard.version (a2a.proto:374-376) — a version string, not an exact build identity", "logical_field": "compatibility_reference", "mcp_location": "none", "verdict": "extension" }, { "index": 23, "a2a_location": "transport-level only", "logical_field": "authority_proof_references", "mcp_location": "transport auth", "verdict": "extension" }];
1
+ export const rows = [{ "index": 1, "a2a_location": "Task.id (a2a.proto:170)", "logical_field": "task_identity", "mcp_location": "Task.taskId (mcp-schema.ts:47)", "verdict": "native" }, { "index": 2, "a2a_location": "none: Message.message_id (a2a.proto:262) is a message id, not an idempotency key", "logical_field": "idempotency_identity", "mcp_location": "none", "verdict": "extension" }, { "index": 3, "a2a_location": "Message.reference_task_ids (a2a.proto:276), Task.context_id (a2a.proto:173): a reference, not a parent execution", "logical_field": "parent_execution_reference", "mcp_location": "none", "verdict": "partial" }, { "index": 4, "a2a_location": "none: SecurityScheme/SecurityRequirement (a2a.proto:495-517) are transport-level", "logical_field": "initiating_subject", "mcp_location": "none: transport auth", "verdict": "extension" }, { "index": 5, "a2a_location": "none", "logical_field": "blueprint_digest", "mcp_location": "none", "verdict": "extension" }, { "index": 6, "a2a_location": "none", "logical_field": "deployment_digest", "mcp_location": "none", "verdict": "extension" }, { "index": 7, "a2a_location": "Message.parts[].data (a2a.proto:233), Part.metadata (a2a.proto:236): a payload home, not a digest commitment", "logical_field": "input_commitment", "mcp_location": "request params", "verdict": "partial" }, { "index": 8, "a2a_location": "Part.media_type (a2a.proto:241), AgentSkill.output_modes (a2a.proto:449): media type is not a schema identity", "logical_field": "result_schema", "mcp_location": "CompletedTask.result {[key: string]: unknown} (mcp-schema.ts:135)", "verdict": "extension" }, { "index": 9, "a2a_location": "none", "logical_field": "result_classification_ceiling", "mcp_location": "none", "verdict": "extension" }, { "index": 10, "a2a_location": "SendMessageConfiguration (a2a.proto:143-161) has no time bound", "logical_field": "time_policy", "mcp_location": "Task.ttlMs (mcp-schema.ts:82): a storage TTL, NOT an execution bound", "verdict": "partial" }, { "index": 11, "a2a_location": "none", "logical_field": "resource_policy", "mcp_location": "none", "verdict": "extension" }, { "index": 12, "a2a_location": "Task.id + GetTask (a2a.proto:45)", "logical_field": "recovery_handle", "mcp_location": "taskId + tasks/get (mcp-tasks.md Task Polling)", "verdict": "native" }, { "index": 13, "a2a_location": "transport-level only (SecurityScheme)", "logical_field": "issuer", "mcp_location": "transport auth", "verdict": "extension" }, { "index": 14, "a2a_location": "none", "logical_field": "subject", "mcp_location": "none", "verdict": "extension" }, { "index": 15, "a2a_location": "none", "logical_field": "audience", "mcp_location": "none", "verdict": "extension" }, { "index": 16, "a2a_location": "none", "logical_field": "identity_mapping_evidence", "mcp_location": "none", "verdict": "extension" }, { "index": 17, "a2a_location": "TASK_STATE_INPUT_REQUIRED (a2a.proto:201) + TaskStatus.message: free-form, not typed", "logical_field": "checkpoint_request", "mcp_location": "status input_required + inputRequests: InputRequest union (mcp-schema.ts:111-119, mcp-spec.types.ts:545)", "verdict": "partial" }, { "index": 18, "a2a_location": "TaskStatus.state (a2a.proto:213)", "logical_field": "checkpoint_status", "mcp_location": "Task.status (mcp-schema.ts:31-36)", "verdict": "native" }, { "index": 19, "a2a_location": "none", "logical_field": "checkpoint_commitment", "mcp_location": "tasks/update inputResponses (mcp-schema.ts:232-246) carries responses, no commitment digest", "verdict": "extension" }, { "index": 20, "a2a_location": "TASK_STATE_COMPLETED/FAILED/CANCELED/REJECTED (a2a.proto:194-205)", "logical_field": "terminal_state", "mcp_location": "completed/failed/cancelled (mcp-schema.ts:31-36): lossy both directions", "verdict": "partial" }, { "index": 21, "a2a_location": "AgentCardSignature (a2a.proto:455-467) signs the AgentCard, not a task result", "logical_field": "evidence_receipt", "mcp_location": "none", "verdict": "extension" }, { "index": 22, "a2a_location": "AgentCard.version (a2a.proto:374-376): a version string, not an exact build identity", "logical_field": "compatibility_reference", "mcp_location": "none", "verdict": "extension" }, { "index": 23, "a2a_location": "transport-level only", "logical_field": "authority_proof_references", "mcp_location": "transport auth", "verdict": "extension" }];
@@ -1,5 +1,5 @@
1
1
  import { isValue } from "./value.js";
2
- // Negotiation — the mirror of AgentBlueprintProtocol.Negotiation: the
2
+ // Negotiation, the mirror of AgentBlueprintProtocol.Negotiation: the
3
3
  // evolution gate over protocol machinery only (protocol_revision →
4
4
  // required_core_fields → extensions, precedence pinned), the host-pinned
5
5
  // lifecycle-only registry view layered over the compiled registry, the
@@ -54,7 +54,7 @@ const DEPLOYMENT_CORE_MEMBERS = [
54
54
  ];
55
55
  const BLUEPRINT_EVIDENCE_MEMBERS = ["content_digest", "signatures", "attestations"];
56
56
  const DEPLOYMENT_EVIDENCE_MEMBERS = ["deployment_digest", "signatures", "attestations"];
57
- // The protected families + the eight ceilings, snake and camel — stored
57
+ // The protected families + the eight ceilings, snake and camel: stored
58
58
  // NORMALIZED; kebab/upper/case-collapsed spellings converge at compare time.
59
59
  const RESERVED_NAMES = new Set([
60
60
  "approval_trait",
@@ -90,7 +90,7 @@ export function negotiate(artifact, support) {
90
90
  Object.values(support.registry).some((entry) => !entry || typeof entry !== "object") ||
91
91
  !support.schemas || typeof support.schemas !== "object" || Array.isArray(support.schemas))
92
92
  return { ok: false, e: "invalid_type" };
93
- // Revision stays FIRST — a max+1 artifact reports its revision reason
93
+ // Revision stays FIRST; a max+1 artifact reports its revision reason
94
94
  // before any other defect.
95
95
  const revision = revisionCheck(artifact, support);
96
96
  if (!revision.ok)
@@ -173,7 +173,7 @@ function extensionsCheck(value, support) {
173
173
  if (found.t !== "obj")
174
174
  return { ok: false, e: "invalid_type" };
175
175
  const regions = found.v;
176
- // Both regions present, both objects — anything else is malformed machinery.
176
+ // Both regions present, both objects; anything else is malformed machinery.
177
177
  const names = regions.map(([name]) => name).sort();
178
178
  const allObjects = regions.every(([, region]) => region.t === "obj");
179
179
  if (names.length !== 2 || names[0] !== "critical" || names[1] !== "optional" || !allObjects) {
@@ -1,4 +1,4 @@
1
- // The never-portable structural guard — the mirror of AgentBlueprintProtocol.Portability:
1
+ // The never-portable structural guard, the mirror of AgentBlueprintProtocol.Portability:
2
2
  // member-name and value-shape denylists over tagged values, four walks
3
3
  // (scan / scanAuthored / scanIdentifier / scanValue) with the position-scoped
4
4
  // identifier exemption and bounded recursion. Malformed inputs deny by type.
@@ -169,7 +169,7 @@ function authorityStart(s, at) {
169
169
  function paddedStandardB64(s) {
170
170
  return /^[A-Za-z0-9+/]{32,}={1,6}$/.test(s) || /^[A-Za-z0-9+/]{43,}$/.test(s);
171
171
  }
172
- // 1-2 hex digits per ":" chunk, 24+ CHUNKS — each chunk is one byte in the
172
+ // 1-2 hex digits per ":" chunk, 24+ CHUNKS; each chunk is one byte in the
173
173
  // SSH-fingerprint / EUI form, so zero-stripped one-digit chunks count fully.
174
174
  function colonHexFingerprint(s) {
175
175
  const chunks = s.split(":");
@@ -4,7 +4,7 @@
4
4
  import * as digest from "./digest.js";
5
5
  import { encode } from "./canonical.js";
6
6
  import { bool, int, nil, obj, str } from "./value.js";
7
- // The federation envelope's minimal schema — owned by this package, inside
7
+ // The federation envelope's minimal schema, owned by this package, inside
8
8
  // the bounded dialect (closed object, no reserved-semantics names).
9
9
  export function federationSchema() {
10
10
  return obj([
@@ -1,4 +1,4 @@
1
- // The report builder — the mirror of AgentBlueprintProtocol.Conformance.Report:
1
+ // The report builder, the mirror of AgentBlueprintProtocol.Conformance.Report:
2
2
  // refuses vacuous green (agreement requires total > 0 AND zero disagreements)
3
3
  // and emits deterministic JCS report bytes identity-bound to the corpus.
4
4
  import { encode } from "./canonical.js";
@@ -3,7 +3,7 @@ import * as predicate from "./predicate.js";
3
3
  import { plain, jsonValue } from "./plain.js";
4
4
  import * as canonical from "./canonical.js";
5
5
  import { isValue } from "./value.js";
6
- // The case executor — the mirror of AgentBlueprintProtocol.Conformance.Runner:
6
+ // The case executor, the mirror of AgentBlueprintProtocol.Conformance.Runner:
7
7
  // dispatches each corpus case against the verifier's own surface twins and
8
8
  // compares to the case's code-level, shape-agnostic expectation (invalid →
9
9
  // projected error-code string; valid → per-surface projection members with
@@ -700,7 +700,7 @@ function buildObserved(input) {
700
700
  return { ok: false, e: "invalid_type" };
701
701
  const out = [];
702
702
  // A malformed identity element denies typed at the RUNNER (the twin's
703
- // prior_receipts pattern) — never reaches Compatibility, never crashes.
703
+ // prior_receipts pattern), never reaches Compatibility, never crashes.
704
704
  for (const entry of identities.v) {
705
705
  if (entry.t !== "obj")
706
706
  return { ok: false, e: "invalid_type" };
@@ -1,4 +1,4 @@
1
- // Bounded JSON Schema 2020-12 dialect + instance validator — the mirror of
1
+ // Bounded JSON Schema 2020-12 dialect + instance validator, the mirror of
2
2
  // AgentBlueprintProtocol.Schema: the closed 16-keyword subset, positional
3
3
  // keyword recognition, document-local $ref (RFC 6901 pointers), the 512
4
4
  // complexity ceiling, application-edge cycle denial, and evaluation in the
@@ -9,7 +9,7 @@ import { err, ok, isValue as wellFormed } from "./value.js";
9
9
  const DIALECT = "https://json-schema.org/draft/2020-12/schema";
10
10
  const CEILING = 512;
11
11
  const TYPE_NAMES = new Set(["null", "boolean", "object", "array", "number", "string", "integer"]);
12
- // Canonical evaluation order — the FIRST failure in this sequence is the
12
+ // Canonical evaluation order: the FIRST failure in this sequence is the
13
13
  // reported reason, independent of document member order.
14
14
  const KEYWORD_ORDER = [
15
15
  "$ref",
@@ -227,7 +227,7 @@ function descend(key, value, path, acc, pointers, edges, validate) {
227
227
  return ok({ acc, pointers, edges: [[pathKey(path), tokens], ...edges] });
228
228
  }
229
229
  if (key === "oneOf" && value.t === "arr") {
230
- // the branch array itself is a document node — count it
230
+ // the branch array itself is a document node; count it
231
231
  const bumped = {
232
232
  ...acc,
233
233
  branches: acc.branches + value.v.length,
@@ -237,7 +237,7 @@ function descend(key, value, path, acc, pointers, edges, validate) {
237
237
  return walkIndexed(value.v, 0, key, path, bumped, pointers, edges, validate);
238
238
  }
239
239
  if (NAME_MAP_VALUED.includes(key) && value.t === "obj") {
240
- // the name map itself is a document node — count it, then walk its
240
+ // the name map itself is a document node; count it, then walk its
241
241
  // schema-position values
242
242
  const bumped = {
243
243
  ...acc,
@@ -1,12 +1,12 @@
1
- // Detached JWS verification — the mirror of AgentBlueprintProtocol.Signature:
1
+ // Detached JWS verification, the mirror of AgentBlueprintProtocol.Signature:
2
2
  // RFC 7515 compact + RFC 7797 b64=false unencoded detached payload, Ed25519
3
3
  // via node:crypto (one-shot verify arg order on node ≥ 24 is
4
- // (algorithm, data, key, signature) — probed on v25.9.0), and the
4
+ // (algorithm, data, key, signature); probed on v25.9.0), and the
5
5
  // small-order / off-curve public-key rejection the Elixir twin also
6
6
  // carries, added after a live finding (:crypto accepts forgeries under small-order keys: under the
7
7
  // identity key, R = identity with S = 0 verifies for every message; measured
8
8
  // October 14, 2026, node:crypto on Node 22.23.1 accepts the same forgery and
9
- // Node 24.19.0 rejects it — runtime-dependent, which is why the rule lives
9
+ // Node 24.19.0 rejects it; runtime-dependent, which is why the rule lives
10
10
  // here), and the strict
11
11
  // signature rule (R canonical and not small-order, S < L) checked before
12
12
  // node:crypto, so the verdict never depends on the runtime's backend.
@@ -218,7 +218,7 @@ function keyObject(raw) {
218
218
  // The scalar rule: S < L (RFC 8032 5.1.7 step 1). Both run before
219
219
  // node:crypto, whose own verdict on a small-order R differs by runtime
220
220
  // (node 22.23.1 accepts R = the identity with S = k*a mod L under an
221
- // honest key; node 24.19.0 rejects it) — mirrors the Elixir twin.
221
+ // honest key; node 24.19.0 rejects it); mirrors the Elixir twin.
222
222
  const ED_L = 2n ** 252n + 27742317777372353535851937790883648493n;
223
223
  export function strictSignature(signature) {
224
224
  if (!Buffer.isBuffer(signature) || signature.length !== 64)
@@ -236,7 +236,7 @@ const ED_D = 3709570593466943934313808350875456518954211387984321901638878553308
236
236
  const ED_SQRT_M1 = 19681161376707505956807079304988542015446066515923890162744021073123829784752n;
237
237
  // The literals, exposed so the self-check battery can re-derive each one
238
238
  // from the curve definition (d = -121665/121666, sqrt(-1) = 2^((p-1)/4),
239
- // L = 2^252 + c) and assert equality — a mistyped digit reds there.
239
+ // L = 2^252 + c) and assert equality; a mistyped digit reds there.
240
240
  export const ED25519_CONSTANTS = { p: ED_P, d: ED_D, sqrtM1: ED_SQRT_M1, l: ED_L };
241
241
  function modPow(base, exponent) {
242
242
  let result = 1n;
@@ -276,7 +276,7 @@ export function usableEd25519Key(input) {
276
276
  root = null;
277
277
  if (root === null)
278
278
  return false; // not on the curve
279
- // root == 0 happens iff y ∈ {1, p−1} — the identity (order 1) and the
279
+ // root == 0 happens iff y ∈ {1, p−1}: the identity (order 1) and the
280
280
  // order-2 point: non-canonical when sign-set, small-order when sign-clear;
281
281
  // both reject (mirrors the Elixir fix found by this mirror's torsion battery).
282
282
  if (root === 0n)
@@ -1,9 +1,9 @@
1
- // The closed tagged value algebra — the mirror of AgentBlueprintProtocol.Json's
1
+ // The closed tagged value algebra, the mirror of AgentBlueprintProtocol.Json's
2
2
  // value() union. Objects are pair-arrays so member order, "__proto__" keys, and
3
3
  // integer-like keys keep byte-level semantics (no JS object coercion anywhere).
4
4
  //
5
5
  // Errors are value-free strings in the runner's projected form ("duplicate_member",
6
- // "ceiling:depth", …) — the same vocabulary the Elixir side projects for comparison.
6
+ // "ceiling:depth", …); the same vocabulary the Elixir side projects for comparison.
7
7
  export const ok = (v) => ({ ok: true, v });
8
8
  export const err = (e) => ({ ok: false, e });
9
9
  export const nil = { t: "null" };
@@ -16,7 +16,7 @@ export const obj = (v) => ({ t: "obj", v });
16
16
  // The I-JSON / RFC 8785 §3.1 magnitude bound mirrored from the decoder.
17
17
  export const IJSON_MAX = 9_007_199_254_740_991;
18
18
  // Deep equality over the tagged algebra. Numbers compare numerically
19
- // (int 2 equals float 2.0 — Elixir's `==` semantics, which the runner's
19
+ // (int 2 equals float 2.0; Elixir's `==` semantics, which the runner's
20
20
  // expectation comparison relies on); ±0 are equal.
21
21
  // Host-built tagged values are bounded before recursive projections or comparisons.
22
22
  export function isValue(value) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agent-blueprint-protocol/verifier",
3
- "version": "1.0.1",
3
+ "version": "1.1.0-rc.2",
4
4
  "description": "Installable verifier for the Agent Blueprint Protocol: canonical-bytes, digest, signature, bounds, and conformance-corpus verification. Non-authorizing: evidence, never a decision.",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -26,7 +26,8 @@
26
26
  "README.md",
27
27
  "CHANGELOG.md",
28
28
  "LICENSE",
29
- "NOTICE"
29
+ "NOTICE",
30
+ "dist/examples"
30
31
  ],
31
32
  "keywords": [
32
33
  "agent",