@adcp/sdk 15.0.0 → 15.2.0

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 (142) hide show
  1. package/bin/adcp-grade.js +46 -2
  2. package/bin/adcp.js +7 -2
  3. package/dist/lib/canonical-references/index.d.mts +19 -1
  4. package/dist/lib/canonical-references/index.d.ts +19 -1
  5. package/dist/lib/canonical-references/index.js +81 -9
  6. package/dist/lib/canonical-references/index.mjs +80 -9
  7. package/dist/lib/client/core.d.mts +1 -0
  8. package/dist/lib/client/core.d.ts +1 -0
  9. package/dist/lib/core/AgentClient.d.mts +9 -1
  10. package/dist/lib/core/AgentClient.d.ts +9 -1
  11. package/dist/lib/core/AgentClient.js +10 -0
  12. package/dist/lib/core/AgentClient.mjs +10 -0
  13. package/dist/lib/core/SingleAgentClient.d.mts +13 -2
  14. package/dist/lib/core/SingleAgentClient.d.ts +13 -2
  15. package/dist/lib/core/SingleAgentClient.js +23 -5
  16. package/dist/lib/core/SingleAgentClient.mjs +23 -5
  17. package/dist/lib/index.d.mts +1 -1
  18. package/dist/lib/index.d.ts +1 -1
  19. package/dist/lib/reporting/gcs/adapter.d.mts +31 -0
  20. package/dist/lib/reporting/gcs/adapter.d.ts +31 -0
  21. package/dist/lib/reporting/gcs/adapter.js +342 -0
  22. package/dist/lib/reporting/gcs/adapter.mjs +325 -0
  23. package/dist/lib/reporting/gcs/bucket-policy.d.mts +3 -0
  24. package/dist/lib/reporting/gcs/bucket-policy.d.ts +3 -0
  25. package/dist/lib/reporting/gcs/bucket-policy.js +31 -0
  26. package/dist/lib/reporting/gcs/bucket-policy.mjs +7 -0
  27. package/dist/lib/reporting/gcs/errors.d.mts +5 -0
  28. package/dist/lib/reporting/gcs/errors.d.ts +5 -0
  29. package/dist/lib/reporting/gcs/errors.js +41 -0
  30. package/dist/lib/reporting/gcs/errors.mjs +16 -0
  31. package/dist/lib/reporting/gcs/fence.d.mts +36 -0
  32. package/dist/lib/reporting/gcs/fence.d.ts +36 -0
  33. package/dist/lib/reporting/gcs/fence.js +250 -0
  34. package/dist/lib/reporting/gcs/fence.mjs +230 -0
  35. package/dist/lib/reporting/gcs/index.d.mts +7 -0
  36. package/dist/lib/reporting/gcs/index.d.ts +7 -0
  37. package/dist/lib/reporting/gcs/index.js +41 -0
  38. package/dist/lib/reporting/gcs/index.mjs +12 -0
  39. package/dist/lib/reporting/gcs/io.d.mts +7 -0
  40. package/dist/lib/reporting/gcs/io.d.ts +7 -0
  41. package/dist/lib/reporting/gcs/io.js +95 -0
  42. package/dist/lib/reporting/gcs/io.mjs +69 -0
  43. package/dist/lib/reporting/gcs/reader.d.mts +43 -0
  44. package/dist/lib/reporting/gcs/reader.d.ts +43 -0
  45. package/dist/lib/reporting/gcs/reader.js +193 -0
  46. package/dist/lib/reporting/gcs/reader.mjs +169 -0
  47. package/dist/lib/reporting/gcs/validation.d.mts +5 -0
  48. package/dist/lib/reporting/gcs/validation.d.ts +5 -0
  49. package/dist/lib/reporting/gcs/validation.js +49 -0
  50. package/dist/lib/reporting/gcs/validation.mjs +25 -0
  51. package/dist/lib/reporting/ledger/handler.d.mts +1 -0
  52. package/dist/lib/reporting/ledger/handler.d.ts +1 -0
  53. package/dist/lib/reporting/ledger/index.d.mts +1 -0
  54. package/dist/lib/reporting/ledger/index.d.ts +1 -0
  55. package/dist/lib/reporting/ledger/index.js +2 -0
  56. package/dist/lib/reporting/ledger/index.mjs +1 -0
  57. package/dist/lib/reporting/ledger/managed-postgres.d.mts +16 -1
  58. package/dist/lib/reporting/ledger/managed-postgres.d.ts +16 -1
  59. package/dist/lib/reporting/ledger/managed-postgres.js +243 -2
  60. package/dist/lib/reporting/ledger/managed-postgres.mjs +248 -2
  61. package/dist/lib/reporting/ledger/object-writes.d.mts +69 -0
  62. package/dist/lib/reporting/ledger/object-writes.d.ts +69 -0
  63. package/dist/lib/reporting/ledger/object-writes.js +147 -0
  64. package/dist/lib/reporting/ledger/object-writes.mjs +114 -0
  65. package/dist/lib/schemas-data/v2.5/_provenance.json +1 -1
  66. package/dist/lib/server/a2a-adapter.d.mts +50 -1
  67. package/dist/lib/server/a2a-adapter.d.ts +50 -1
  68. package/dist/lib/server/a2a-adapter.js +230 -7
  69. package/dist/lib/server/a2a-adapter.mjs +237 -7
  70. package/dist/lib/server/auth-signature.d.mts +84 -46
  71. package/dist/lib/server/auth-signature.d.ts +84 -46
  72. package/dist/lib/server/auth-signature.js +48 -14
  73. package/dist/lib/server/auth-signature.mjs +58 -15
  74. package/dist/lib/server/create-adcp-server.js +5 -16
  75. package/dist/lib/server/create-adcp-server.mjs +5 -16
  76. package/dist/lib/server/index.d.mts +1 -1
  77. package/dist/lib/server/index.d.ts +1 -1
  78. package/dist/lib/server/index.js +2 -0
  79. package/dist/lib/server/index.mjs +3 -1
  80. package/dist/lib/signing/agent-fetch.js +3 -33
  81. package/dist/lib/signing/agent-fetch.mjs +3 -33
  82. package/dist/lib/signing/middleware.d.mts +9 -1
  83. package/dist/lib/signing/middleware.d.ts +9 -1
  84. package/dist/lib/signing/operation-resolution.d.mts +37 -0
  85. package/dist/lib/signing/operation-resolution.d.ts +37 -0
  86. package/dist/lib/signing/operation-resolution.js +154 -0
  87. package/dist/lib/signing/operation-resolution.mjs +125 -0
  88. package/dist/lib/signing/postgres-replay-store.d.mts +1 -1
  89. package/dist/lib/signing/postgres-replay-store.d.ts +1 -1
  90. package/dist/lib/signing/redis-replay-store.d.mts +1 -1
  91. package/dist/lib/signing/redis-replay-store.d.ts +1 -1
  92. package/dist/lib/signing/server.d.mts +1 -0
  93. package/dist/lib/signing/server.d.ts +1 -0
  94. package/dist/lib/signing/server.js +7 -0
  95. package/dist/lib/signing/server.mjs +8 -0
  96. package/dist/lib/signing/verifier.d.mts +36 -1
  97. package/dist/lib/signing/verifier.d.ts +36 -1
  98. package/dist/lib/signing/verifier.js +66 -34
  99. package/dist/lib/signing/verifier.mjs +61 -34
  100. package/dist/lib/testing/storyboard/request-signing/a2a-dispatch.d.mts +12 -0
  101. package/dist/lib/testing/storyboard/request-signing/a2a-dispatch.d.ts +12 -0
  102. package/dist/lib/testing/storyboard/request-signing/a2a-dispatch.js +29 -2
  103. package/dist/lib/testing/storyboard/request-signing/a2a-dispatch.mjs +27 -1
  104. package/dist/lib/testing/storyboard/request-signing/a2a-operation-resolution.d.mts +61 -0
  105. package/dist/lib/testing/storyboard/request-signing/a2a-operation-resolution.d.ts +61 -0
  106. package/dist/lib/testing/storyboard/request-signing/a2a-operation-resolution.js +298 -0
  107. package/dist/lib/testing/storyboard/request-signing/a2a-operation-resolution.mjs +276 -0
  108. package/dist/lib/testing/storyboard/request-signing/grader.d.mts +31 -1
  109. package/dist/lib/testing/storyboard/request-signing/grader.d.ts +31 -1
  110. package/dist/lib/testing/storyboard/request-signing/grader.js +11 -0
  111. package/dist/lib/testing/storyboard/request-signing/grader.mjs +11 -0
  112. package/dist/lib/testing/storyboard/request-signing/index.d.mts +5 -4
  113. package/dist/lib/testing/storyboard/request-signing/index.d.ts +5 -4
  114. package/dist/lib/testing/storyboard/request-signing/index.js +13 -0
  115. package/dist/lib/testing/storyboard/request-signing/index.mjs +18 -2
  116. package/dist/lib/testing/storyboard/request-signing/types.d.mts +43 -0
  117. package/dist/lib/testing/storyboard/request-signing/types.d.ts +43 -0
  118. package/dist/lib/testing/storyboard/request-signing/types.js +3 -0
  119. package/dist/lib/testing/storyboard/request-signing/types.mjs +2 -0
  120. package/dist/lib/testing/storyboard/request-signing/vector-loader.d.mts +42 -1
  121. package/dist/lib/testing/storyboard/request-signing/vector-loader.d.ts +42 -1
  122. package/dist/lib/testing/storyboard/request-signing/vector-loader.js +100 -1
  123. package/dist/lib/testing/storyboard/request-signing/vector-loader.mjs +104 -3
  124. package/dist/lib/testing/storyboard/validations.d.mts +1 -1
  125. package/dist/lib/testing/storyboard/validations.d.ts +1 -1
  126. package/dist/lib/version.d.mts +3 -3
  127. package/dist/lib/version.d.ts +3 -3
  128. package/dist/lib/version.js +3 -3
  129. package/dist/lib/version.mjs +3 -3
  130. package/docs/TYPE-SUMMARY.md +2 -2
  131. package/docs/guides/BUILD-AN-AGENT.md +9 -4
  132. package/docs/guides/CREATIVE-DELIVERY.md +34 -0
  133. package/docs/guides/REPORTING-GCS-FENCE.md +52 -0
  134. package/docs/guides/REPORTING-GCS-MANAGED.md +56 -0
  135. package/docs/guides/REPORTING-OPERATIONS.md +4 -0
  136. package/docs/guides/SIGNING-GUIDE.md +20 -6
  137. package/docs/guides/VALIDATE-YOUR-AGENT.md +4 -0
  138. package/docs/llms.txt +2 -2
  139. package/docs/migration-14.x-rc-worksheet.md +5 -4
  140. package/docs/migration-buyer-agent-registry.md +1 -1
  141. package/package.json +19 -1
  142. package/skills/build-seller-agent/specialisms/signed-requests.md +2 -0
@@ -66,6 +66,49 @@ export interface NegativeVector {
66
66
  spec_reference?: string;
67
67
  }
68
68
  export type Vector = PositiveVector | NegativeVector;
69
+ /**
70
+ * Conformance tier of an A2A operation-resolution vector (adcp#7945).
71
+ *
72
+ * - `contradiction-resolution`: grades the security erratum that fixes the
73
+ * `security.mdx` / A2A-profile contradiction. MUST for a 3.2 verifier.
74
+ * - `hardening`: grades clauses that go further. SHOULD in 3.2.x, MUST from 3.3.
75
+ */
76
+ export type A2aVectorTier = 'contradiction-resolution' | 'hardening';
77
+ export declare const A2A_VECTOR_TIERS: readonly A2aVectorTier[];
78
+ /**
79
+ * `expected_outcome` of an A2A operation-resolution vector. Wider than the
80
+ * root vectors': positives carry `status`, and both kinds may name the
81
+ * operation the verifier MUST resolve (`null` = "no operation") plus the
82
+ * dispatch the agent MUST perform. `failed_step: 0` is the pre-check, not a
83
+ * numbered checklist step.
84
+ */
85
+ export interface A2aExpectedOutcome {
86
+ success: boolean;
87
+ /** Positives only: `verified` (valid signature) or `unsigned` (no signature required). */
88
+ status?: 'verified' | 'unsigned';
89
+ /** Negatives only: `request_signature_required` or `request_body_malformed`. */
90
+ error_code?: RequestSignatureErrorCode;
91
+ failed_step?: number | string;
92
+ resolved_operation?: string | null;
93
+ dispatched_operation?: string;
94
+ dispatch?: string;
95
+ }
96
+ /** Positive A2A operation-resolution vector. Ids are prefixed `a2a/positive/`. */
97
+ export interface A2aPositiveVector extends PositiveVector {
98
+ tier: A2aVectorTier;
99
+ expected_outcome: A2aExpectedOutcome & {
100
+ success: true;
101
+ status: 'verified' | 'unsigned';
102
+ };
103
+ }
104
+ /** Negative A2A operation-resolution vector. Ids are prefixed `a2a/negative/`. */
105
+ export interface A2aNegativeVector extends NegativeVector {
106
+ tier: A2aVectorTier;
107
+ expected_outcome: A2aExpectedOutcome & {
108
+ success: false;
109
+ };
110
+ }
111
+ export type A2aVector = A2aPositiveVector | A2aNegativeVector;
69
112
  export interface TestKeypair {
70
113
  kid: string;
71
114
  kty: string;
@@ -66,6 +66,49 @@ export interface NegativeVector {
66
66
  spec_reference?: string;
67
67
  }
68
68
  export type Vector = PositiveVector | NegativeVector;
69
+ /**
70
+ * Conformance tier of an A2A operation-resolution vector (adcp#7945).
71
+ *
72
+ * - `contradiction-resolution`: grades the security erratum that fixes the
73
+ * `security.mdx` / A2A-profile contradiction. MUST for a 3.2 verifier.
74
+ * - `hardening`: grades clauses that go further. SHOULD in 3.2.x, MUST from 3.3.
75
+ */
76
+ export type A2aVectorTier = 'contradiction-resolution' | 'hardening';
77
+ export declare const A2A_VECTOR_TIERS: readonly A2aVectorTier[];
78
+ /**
79
+ * `expected_outcome` of an A2A operation-resolution vector. Wider than the
80
+ * root vectors': positives carry `status`, and both kinds may name the
81
+ * operation the verifier MUST resolve (`null` = "no operation") plus the
82
+ * dispatch the agent MUST perform. `failed_step: 0` is the pre-check, not a
83
+ * numbered checklist step.
84
+ */
85
+ export interface A2aExpectedOutcome {
86
+ success: boolean;
87
+ /** Positives only: `verified` (valid signature) or `unsigned` (no signature required). */
88
+ status?: 'verified' | 'unsigned';
89
+ /** Negatives only: `request_signature_required` or `request_body_malformed`. */
90
+ error_code?: RequestSignatureErrorCode;
91
+ failed_step?: number | string;
92
+ resolved_operation?: string | null;
93
+ dispatched_operation?: string;
94
+ dispatch?: string;
95
+ }
96
+ /** Positive A2A operation-resolution vector. Ids are prefixed `a2a/positive/`. */
97
+ export interface A2aPositiveVector extends PositiveVector {
98
+ tier: A2aVectorTier;
99
+ expected_outcome: A2aExpectedOutcome & {
100
+ success: true;
101
+ status: 'verified' | 'unsigned';
102
+ };
103
+ }
104
+ /** Negative A2A operation-resolution vector. Ids are prefixed `a2a/negative/`. */
105
+ export interface A2aNegativeVector extends NegativeVector {
106
+ tier: A2aVectorTier;
107
+ expected_outcome: A2aExpectedOutcome & {
108
+ success: false;
109
+ };
110
+ }
111
+ export type A2aVector = A2aPositiveVector | A2aNegativeVector;
69
112
  export interface TestKeypair {
70
113
  kid: string;
71
114
  kty: string;
@@ -18,11 +18,14 @@ var __copyProps = (to, from, except, desc) => {
18
18
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
19
  var types_exports = {};
20
20
  __export(types_exports, {
21
+ A2A_VECTOR_TIERS: () => A2A_VECTOR_TIERS,
21
22
  CONTRACT_IDS: () => CONTRACT_IDS
22
23
  });
23
24
  module.exports = __toCommonJS(types_exports);
24
25
  const CONTRACT_IDS = ["replay_window", "revocation", "rate_abuse"];
26
+ const A2A_VECTOR_TIERS = ["contradiction-resolution", "hardening"];
25
27
  // Annotate the CommonJS export names for ESM import in node:
26
28
  0 && (module.exports = {
29
+ A2A_VECTOR_TIERS,
27
30
  CONTRACT_IDS
28
31
  });
@@ -1,4 +1,6 @@
1
1
  const CONTRACT_IDS = ["replay_window", "revocation", "rate_abuse"];
2
+ const A2A_VECTOR_TIERS = ["contradiction-resolution", "hardening"];
2
3
  export {
4
+ A2A_VECTOR_TIERS,
3
5
  CONTRACT_IDS
4
6
  };
@@ -1,7 +1,22 @@
1
- import type { NegativeVector, PositiveVector, TestKeypair, TestKeyset } from './types.mjs';
1
+ import type { A2aNegativeVector, A2aPositiveVector, NegativeVector, PositiveVector, TestKeypair, TestKeyset } from './types.mjs';
2
2
  export interface LoadVectorsOptions {
3
3
  complianceDir?: string;
4
4
  version?: string;
5
+ /**
6
+ * Explicit directory holding the A2A operation-resolution vectors
7
+ * (`positive/` and `negative/` subdirectories). Takes precedence over the
8
+ * compliance cache and the vendored copy; falls back to the
9
+ * `ADCP_A2A_VECTORS_DIR` environment variable. A configured directory that
10
+ * does not exist is an error, not a silent fall-through.
11
+ */
12
+ a2aVectorsDir?: string;
13
+ /**
14
+ * Allow falling back to the vendored `test/fixtures/request-signing-a2a`
15
+ * copy when the compliance cache has no A2A vectors. Default `true`. Set
16
+ * `false` to see exactly what an installed package sees (the fixtures are
17
+ * not shipped), e.g. to test the "unavailable" report.
18
+ */
19
+ a2aVendoredFallback?: boolean;
5
20
  }
6
21
  export interface LoadedVectors {
7
22
  positive: PositiveVector[];
@@ -21,4 +36,30 @@ export declare function loadRequestSigningVectors(options?: LoadVectorsOptions):
21
36
  export declare function loadRequestSigningKeys(options?: LoadVectorsOptions): TestKeyset;
22
37
  /** Test-only: clear the memoization cache so a fresh cache path is reread. */
23
38
  export declare function __resetVectorCache(): void;
39
+ /** Where the A2A operation-resolution vectors came from. */
40
+ export type A2aVectorSource = 'override' | 'compliance_cache' | 'vendored_fixture' | 'none';
41
+ export interface LoadedA2aVectors {
42
+ positive: A2aPositiveVector[];
43
+ negative: A2aNegativeVector[];
44
+ source: A2aVectorSource;
45
+ /** Directory the vectors were read from; absent when `source` is `'none'`. */
46
+ sourceDir?: string;
47
+ }
48
+ /** Reported verbatim when the grader finds no A2A operation-resolution vectors. */
49
+ export declare const A2A_VECTORS_UNAVAILABLE_MESSAGE = "a2a operation-resolution vectors unavailable in this compliance bundle";
50
+ /** Env var naming an explicit A2A vector directory (tests, pre-release bundles). */
51
+ export declare const A2A_VECTORS_DIR_ENV = "ADCP_A2A_VECTORS_DIR";
52
+ /**
53
+ * Load the A2A operation-resolution vectors.
54
+ *
55
+ * Resolution order:
56
+ * 1. `options.a2aVectorsDir`, else `$ADCP_A2A_VECTORS_DIR` (explicit; must exist).
57
+ * 2. `<complianceCache>/test-vectors/request-signing/a2a/`.
58
+ * 3. The vendored `test/fixtures/request-signing-a2a/` copy, when present
59
+ * (repo checkouts only; never shipped).
60
+ *
61
+ * Returns `source: 'none'` with empty arrays when none exist; callers MUST
62
+ * report that rather than treating it as a pass.
63
+ */
64
+ export declare function loadA2aOperationResolutionVectors(options?: LoadVectorsOptions): LoadedA2aVectors;
24
65
  export declare function findKey(keyset: TestKeyset, kid: string): TestKeypair;
@@ -1,7 +1,22 @@
1
- import type { NegativeVector, PositiveVector, TestKeypair, TestKeyset } from './types';
1
+ import type { A2aNegativeVector, A2aPositiveVector, NegativeVector, PositiveVector, TestKeypair, TestKeyset } from './types';
2
2
  export interface LoadVectorsOptions {
3
3
  complianceDir?: string;
4
4
  version?: string;
5
+ /**
6
+ * Explicit directory holding the A2A operation-resolution vectors
7
+ * (`positive/` and `negative/` subdirectories). Takes precedence over the
8
+ * compliance cache and the vendored copy; falls back to the
9
+ * `ADCP_A2A_VECTORS_DIR` environment variable. A configured directory that
10
+ * does not exist is an error, not a silent fall-through.
11
+ */
12
+ a2aVectorsDir?: string;
13
+ /**
14
+ * Allow falling back to the vendored `test/fixtures/request-signing-a2a`
15
+ * copy when the compliance cache has no A2A vectors. Default `true`. Set
16
+ * `false` to see exactly what an installed package sees (the fixtures are
17
+ * not shipped), e.g. to test the "unavailable" report.
18
+ */
19
+ a2aVendoredFallback?: boolean;
5
20
  }
6
21
  export interface LoadedVectors {
7
22
  positive: PositiveVector[];
@@ -21,4 +36,30 @@ export declare function loadRequestSigningVectors(options?: LoadVectorsOptions):
21
36
  export declare function loadRequestSigningKeys(options?: LoadVectorsOptions): TestKeyset;
22
37
  /** Test-only: clear the memoization cache so a fresh cache path is reread. */
23
38
  export declare function __resetVectorCache(): void;
39
+ /** Where the A2A operation-resolution vectors came from. */
40
+ export type A2aVectorSource = 'override' | 'compliance_cache' | 'vendored_fixture' | 'none';
41
+ export interface LoadedA2aVectors {
42
+ positive: A2aPositiveVector[];
43
+ negative: A2aNegativeVector[];
44
+ source: A2aVectorSource;
45
+ /** Directory the vectors were read from; absent when `source` is `'none'`. */
46
+ sourceDir?: string;
47
+ }
48
+ /** Reported verbatim when the grader finds no A2A operation-resolution vectors. */
49
+ export declare const A2A_VECTORS_UNAVAILABLE_MESSAGE = "a2a operation-resolution vectors unavailable in this compliance bundle";
50
+ /** Env var naming an explicit A2A vector directory (tests, pre-release bundles). */
51
+ export declare const A2A_VECTORS_DIR_ENV = "ADCP_A2A_VECTORS_DIR";
52
+ /**
53
+ * Load the A2A operation-resolution vectors.
54
+ *
55
+ * Resolution order:
56
+ * 1. `options.a2aVectorsDir`, else `$ADCP_A2A_VECTORS_DIR` (explicit; must exist).
57
+ * 2. `<complianceCache>/test-vectors/request-signing/a2a/`.
58
+ * 3. The vendored `test/fixtures/request-signing-a2a/` copy, when present
59
+ * (repo checkouts only; never shipped).
60
+ *
61
+ * Returns `source: 'none'` with empty arrays when none exist; callers MUST
62
+ * report that rather than treating it as a pass.
63
+ */
64
+ export declare function loadA2aOperationResolutionVectors(options?: LoadVectorsOptions): LoadedA2aVectors;
24
65
  export declare function findKey(keyset: TestKeyset, kid: string): TestKeypair;
@@ -18,8 +18,11 @@ var __copyProps = (to, from, except, desc) => {
18
18
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
19
  var vector_loader_exports = {};
20
20
  __export(vector_loader_exports, {
21
+ A2A_VECTORS_DIR_ENV: () => A2A_VECTORS_DIR_ENV,
22
+ A2A_VECTORS_UNAVAILABLE_MESSAGE: () => A2A_VECTORS_UNAVAILABLE_MESSAGE,
21
23
  __resetVectorCache: () => __resetVectorCache,
22
24
  findKey: () => findKey,
25
+ loadA2aOperationResolutionVectors: () => loadA2aOperationResolutionVectors,
23
26
  loadRequestSigningKeys: () => loadRequestSigningKeys,
24
27
  loadRequestSigningVectors: () => loadRequestSigningVectors,
25
28
  selectRequestSigningVectors: () => selectRequestSigningVectors,
@@ -57,7 +60,8 @@ const ERROR_CODES = /* @__PURE__ */ new Set([
57
60
  "request_signature_invalid",
58
61
  "request_signature_digest_mismatch",
59
62
  "request_signature_replayed",
60
- "request_signature_rate_abuse"
63
+ "request_signature_rate_abuse",
64
+ "request_body_malformed"
61
65
  ]);
62
66
  const CONTRACT_ID_SET = new Set(import_types.CONTRACT_IDS);
63
67
  const VECTOR_CACHE = /* @__PURE__ */ new Map();
@@ -93,6 +97,98 @@ function loadRequestSigningKeys(options = {}) {
93
97
  }
94
98
  function __resetVectorCache() {
95
99
  VECTOR_CACHE.clear();
100
+ A2A_VECTOR_CACHE.clear();
101
+ }
102
+ const A2A_VECTORS_UNAVAILABLE_MESSAGE = "a2a operation-resolution vectors unavailable in this compliance bundle";
103
+ const A2A_VECTORS_DIR_ENV = "ADCP_A2A_VECTORS_DIR";
104
+ const A2A_VECTOR_CACHE = /* @__PURE__ */ new Map();
105
+ function vendoredA2aVectorsDir() {
106
+ return (0, import_path.resolve)(__dirname, "..", "..", "..", "..", "..", "test", "fixtures", "request-signing-a2a");
107
+ }
108
+ function hasA2aVectorDirs(dir) {
109
+ return (0, import_fs.existsSync)((0, import_path.join)(dir, "positive")) && (0, import_fs.existsSync)((0, import_path.join)(dir, "negative"));
110
+ }
111
+ function loadA2aOperationResolutionVectors(options = {}) {
112
+ const explicit = options.a2aVectorsDir ?? (process.env[A2A_VECTORS_DIR_ENV] || void 0);
113
+ let source;
114
+ let dir;
115
+ if (explicit) {
116
+ if (!hasA2aVectorDirs(explicit)) {
117
+ throw new Error(`A2A operation-resolution vectors not found at ${explicit} (expected positive/ and negative/).`);
118
+ }
119
+ source = "override";
120
+ dir = explicit;
121
+ } else {
122
+ const cacheDir = (0, import_path.join)((0, import_compliance.getComplianceCacheDir)(options), "test-vectors", "request-signing", "a2a");
123
+ const vendored = vendoredA2aVectorsDir();
124
+ if (hasA2aVectorDirs(cacheDir)) {
125
+ source = "compliance_cache";
126
+ dir = cacheDir;
127
+ } else if (options.a2aVendoredFallback !== false && hasA2aVectorDirs(vendored)) {
128
+ source = "vendored_fixture";
129
+ dir = vendored;
130
+ } else {
131
+ return { positive: [], negative: [], source: "none" };
132
+ }
133
+ }
134
+ let parsed = A2A_VECTOR_CACHE.get(dir);
135
+ if (!parsed) {
136
+ parsed = {
137
+ positive: loadDir((0, import_path.join)(dir, "positive"), parseA2aPositive, "a2a/positive/"),
138
+ negative: loadDir((0, import_path.join)(dir, "negative"), parseA2aNegative, "a2a/negative/")
139
+ };
140
+ A2A_VECTOR_CACHE.set(dir, parsed);
141
+ }
142
+ return { ...parsed, source, sourceDir: dir };
143
+ }
144
+ function parseA2aTier(id, r) {
145
+ const tier = r.tier;
146
+ if (typeof tier !== "string" || !import_types.A2A_VECTOR_TIERS.includes(tier)) {
147
+ throw new Error(`${id}: tier must be one of ${import_types.A2A_VECTOR_TIERS.join(", ")} (got ${JSON.stringify(tier)})`);
148
+ }
149
+ return tier;
150
+ }
151
+ function parseA2aOutcome(id, r) {
152
+ const o = r.expected_outcome;
153
+ const resolved = o.resolved_operation;
154
+ if (resolved !== void 0 && resolved !== null && typeof resolved !== "string") {
155
+ throw new Error(`${id}: expected_outcome.resolved_operation must be a string or null`);
156
+ }
157
+ const status = o.status;
158
+ if (status !== void 0 && status !== "verified" && status !== "unsigned") {
159
+ throw new Error(`${id}: expected_outcome.status must be "verified" or "unsigned"`);
160
+ }
161
+ return {
162
+ success: o.success,
163
+ ...status !== void 0 && { status },
164
+ ...typeof o.error_code === "string" && { error_code: o.error_code },
165
+ ...o.failed_step !== void 0 && { failed_step: o.failed_step },
166
+ ...resolved !== void 0 && { resolved_operation: resolved },
167
+ ...typeof o.dispatched_operation === "string" && { dispatched_operation: o.dispatched_operation },
168
+ ...typeof o.dispatch === "string" && { dispatch: o.dispatch }
169
+ };
170
+ }
171
+ function parseA2aPositive(id, raw) {
172
+ const r = raw;
173
+ const base = parsePositive(id, raw);
174
+ const expected_outcome = parseA2aOutcome(id, r);
175
+ if (expected_outcome.status === void 0) {
176
+ throw new Error(`${id}: positive A2A vector requires expected_outcome.status`);
177
+ }
178
+ return {
179
+ ...base,
180
+ tier: parseA2aTier(id, r),
181
+ expected_outcome
182
+ };
183
+ }
184
+ function parseA2aNegative(id, raw) {
185
+ const r = raw;
186
+ const base = parseNegative(id, raw);
187
+ return {
188
+ ...base,
189
+ tier: parseA2aTier(id, r),
190
+ expected_outcome: parseA2aOutcome(id, r)
191
+ };
96
192
  }
97
193
  function loadDir(dir, parse, idPrefix = "") {
98
194
  if (!(0, import_fs.existsSync)(dir)) {
@@ -284,8 +380,11 @@ function strArray(v, where) {
284
380
  }
285
381
  // Annotate the CommonJS export names for ESM import in node:
286
382
  0 && (module.exports = {
383
+ A2A_VECTORS_DIR_ENV,
384
+ A2A_VECTORS_UNAVAILABLE_MESSAGE,
287
385
  __resetVectorCache,
288
386
  findKey,
387
+ loadA2aOperationResolutionVectors,
289
388
  loadRequestSigningKeys,
290
389
  loadRequestSigningVectors,
291
390
  selectRequestSigningVectors,
@@ -1,7 +1,12 @@
1
+ import { fileURLToPath as __adcpFileURLToPath } from "node:url";
2
+ import { dirname as __adcpDirname } from "node:path";
3
+ import { createRequire as __adcpCreateRequire } from "node:module";
4
+ const __dirname = __adcpDirname(__adcpFileURLToPath(import.meta.url));
5
+ const require2 = __adcpCreateRequire(import.meta.url);
1
6
  import { existsSync, readFileSync, readdirSync } from "fs";
2
- import { basename, join } from "path";
7
+ import { basename, join, resolve } from "path";
3
8
  import { getComplianceCacheDir } from "../compliance.mjs";
4
- import { CONTRACT_IDS } from "./types.mjs";
9
+ import { A2A_VECTOR_TIERS, CONTRACT_IDS } from "./types.mjs";
5
10
  function selectRequestSigningVectors(loaded, signingProfileVersion) {
6
11
  const profile = signingProfileVersion ? loaded.profiles[signingProfileVersion] : void 0;
7
12
  if (!signingProfileVersion) return { positive: loaded.positive, negative: loaded.negative };
@@ -29,7 +34,8 @@ const ERROR_CODES = /* @__PURE__ */ new Set([
29
34
  "request_signature_invalid",
30
35
  "request_signature_digest_mismatch",
31
36
  "request_signature_replayed",
32
- "request_signature_rate_abuse"
37
+ "request_signature_rate_abuse",
38
+ "request_body_malformed"
33
39
  ]);
34
40
  const CONTRACT_ID_SET = new Set(CONTRACT_IDS);
35
41
  const VECTOR_CACHE = /* @__PURE__ */ new Map();
@@ -65,6 +71,98 @@ function loadRequestSigningKeys(options = {}) {
65
71
  }
66
72
  function __resetVectorCache() {
67
73
  VECTOR_CACHE.clear();
74
+ A2A_VECTOR_CACHE.clear();
75
+ }
76
+ const A2A_VECTORS_UNAVAILABLE_MESSAGE = "a2a operation-resolution vectors unavailable in this compliance bundle";
77
+ const A2A_VECTORS_DIR_ENV = "ADCP_A2A_VECTORS_DIR";
78
+ const A2A_VECTOR_CACHE = /* @__PURE__ */ new Map();
79
+ function vendoredA2aVectorsDir() {
80
+ return resolve(__dirname, "..", "..", "..", "..", "..", "test", "fixtures", "request-signing-a2a");
81
+ }
82
+ function hasA2aVectorDirs(dir) {
83
+ return existsSync(join(dir, "positive")) && existsSync(join(dir, "negative"));
84
+ }
85
+ function loadA2aOperationResolutionVectors(options = {}) {
86
+ const explicit = options.a2aVectorsDir ?? (process.env[A2A_VECTORS_DIR_ENV] || void 0);
87
+ let source;
88
+ let dir;
89
+ if (explicit) {
90
+ if (!hasA2aVectorDirs(explicit)) {
91
+ throw new Error(`A2A operation-resolution vectors not found at ${explicit} (expected positive/ and negative/).`);
92
+ }
93
+ source = "override";
94
+ dir = explicit;
95
+ } else {
96
+ const cacheDir = join(getComplianceCacheDir(options), "test-vectors", "request-signing", "a2a");
97
+ const vendored = vendoredA2aVectorsDir();
98
+ if (hasA2aVectorDirs(cacheDir)) {
99
+ source = "compliance_cache";
100
+ dir = cacheDir;
101
+ } else if (options.a2aVendoredFallback !== false && hasA2aVectorDirs(vendored)) {
102
+ source = "vendored_fixture";
103
+ dir = vendored;
104
+ } else {
105
+ return { positive: [], negative: [], source: "none" };
106
+ }
107
+ }
108
+ let parsed = A2A_VECTOR_CACHE.get(dir);
109
+ if (!parsed) {
110
+ parsed = {
111
+ positive: loadDir(join(dir, "positive"), parseA2aPositive, "a2a/positive/"),
112
+ negative: loadDir(join(dir, "negative"), parseA2aNegative, "a2a/negative/")
113
+ };
114
+ A2A_VECTOR_CACHE.set(dir, parsed);
115
+ }
116
+ return { ...parsed, source, sourceDir: dir };
117
+ }
118
+ function parseA2aTier(id, r) {
119
+ const tier = r.tier;
120
+ if (typeof tier !== "string" || !A2A_VECTOR_TIERS.includes(tier)) {
121
+ throw new Error(`${id}: tier must be one of ${A2A_VECTOR_TIERS.join(", ")} (got ${JSON.stringify(tier)})`);
122
+ }
123
+ return tier;
124
+ }
125
+ function parseA2aOutcome(id, r) {
126
+ const o = r.expected_outcome;
127
+ const resolved = o.resolved_operation;
128
+ if (resolved !== void 0 && resolved !== null && typeof resolved !== "string") {
129
+ throw new Error(`${id}: expected_outcome.resolved_operation must be a string or null`);
130
+ }
131
+ const status = o.status;
132
+ if (status !== void 0 && status !== "verified" && status !== "unsigned") {
133
+ throw new Error(`${id}: expected_outcome.status must be "verified" or "unsigned"`);
134
+ }
135
+ return {
136
+ success: o.success,
137
+ ...status !== void 0 && { status },
138
+ ...typeof o.error_code === "string" && { error_code: o.error_code },
139
+ ...o.failed_step !== void 0 && { failed_step: o.failed_step },
140
+ ...resolved !== void 0 && { resolved_operation: resolved },
141
+ ...typeof o.dispatched_operation === "string" && { dispatched_operation: o.dispatched_operation },
142
+ ...typeof o.dispatch === "string" && { dispatch: o.dispatch }
143
+ };
144
+ }
145
+ function parseA2aPositive(id, raw) {
146
+ const r = raw;
147
+ const base = parsePositive(id, raw);
148
+ const expected_outcome = parseA2aOutcome(id, r);
149
+ if (expected_outcome.status === void 0) {
150
+ throw new Error(`${id}: positive A2A vector requires expected_outcome.status`);
151
+ }
152
+ return {
153
+ ...base,
154
+ tier: parseA2aTier(id, r),
155
+ expected_outcome
156
+ };
157
+ }
158
+ function parseA2aNegative(id, raw) {
159
+ const r = raw;
160
+ const base = parseNegative(id, raw);
161
+ return {
162
+ ...base,
163
+ tier: parseA2aTier(id, r),
164
+ expected_outcome: parseA2aOutcome(id, r)
165
+ };
68
166
  }
69
167
  function loadDir(dir, parse, idPrefix = "") {
70
168
  if (!existsSync(dir)) {
@@ -255,8 +353,11 @@ function strArray(v, where) {
255
353
  return v;
256
354
  }
257
355
  export {
356
+ A2A_VECTORS_DIR_ENV,
357
+ A2A_VECTORS_UNAVAILABLE_MESSAGE,
258
358
  __resetVectorCache,
259
359
  findKey,
360
+ loadA2aOperationResolutionVectors,
260
361
  loadRequestSigningKeys,
261
362
  loadRequestSigningVectors,
262
363
  selectRequestSigningVectors,
@@ -197,7 +197,7 @@ export interface UpstreamTrafficQueryResult {
197
197
  */
198
198
  export declare function runValidations(validations: StoryboardValidation[], context: ValidationContext): ValidationResult[];
199
199
  /** Capability semver emitted in run summaries and used for advisory expiry. */
200
- export declare const RUNNER_CAPABILITY_VERSION = "15.0.0";
200
+ export declare const RUNNER_CAPABILITY_VERSION = "15.2.0";
201
201
  /** True when a failed validation contributes to the owning step's grade. */
202
202
  export declare function validationFailsStep(result: ValidationResult): boolean;
203
203
  /**
@@ -197,7 +197,7 @@ export interface UpstreamTrafficQueryResult {
197
197
  */
198
198
  export declare function runValidations(validations: StoryboardValidation[], context: ValidationContext): ValidationResult[];
199
199
  /** Capability semver emitted in run summaries and used for advisory expiry. */
200
- export declare const RUNNER_CAPABILITY_VERSION = "15.0.0";
200
+ export declare const RUNNER_CAPABILITY_VERSION = "15.2.0";
201
201
  /** True when a failed validation contributes to the owning step's grade. */
202
202
  export declare function validationFailsStep(result: ValidationResult): boolean;
203
203
  /**
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * AdCP SDK library version
3
3
  */
4
- export declare const LIBRARY_VERSION = "15.0.0";
4
+ export declare const LIBRARY_VERSION = "15.2.0";
5
5
  /**
6
6
  * AdCP specification version this library is built for
7
7
  */
@@ -33,10 +33,10 @@ export type AdcpVersion = (typeof COMPATIBLE_ADCP_VERSIONS)[number];
33
33
  * Full version information
34
34
  */
35
35
  export declare const VERSION_INFO: {
36
- readonly library: "15.0.0";
36
+ readonly library: "15.2.0";
37
37
  readonly adcp: "3.2.1";
38
38
  readonly compatibleVersions: readonly ["v2.5", "v2.6", "v3", "3.0.0", "3.0", "3.0.1", "3.0.2", "3.0.3", "3.0.4", "3.0.5", "3.0.6", "3.0.7", "3.0.8", "3.0.9", "3.0.10", "3.0.11", "3.0.12", "3.0.13", "3.0.14", "3.0.15", "3.0.16", "3.0.17", "3.0.18", "3.0.19", "3.0.20", "3.0.21", "3.0.22", "3.0.23", "3.0.24", "3.0.25", "3.1.0", "3.1", "3.1.1", "3.1.2", "3.1.3", "3.1.4", "3.1.5", "3.1.6", "3.1.7", "3.1.8", "3.1.9", "3.1.10", "3.1.11", "3.1.12", "3.1.13", "3.1.14", "3.1.15", "3.1.16", "3.1.17", "3.1.18", "3.1.19", "3.1.20", "3.1.21", "3.1.22", "3.1.23", "3.1.24", "3.2.1", "3.2"];
39
- readonly generatedAt: "2026-10-06T23:38:05.170Z";
39
+ readonly generatedAt: "2026-10-07T15:42:58.737Z";
40
40
  };
41
41
  /**
42
42
  * Get the AdCP specification version this library is built for
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * AdCP SDK library version
3
3
  */
4
- export declare const LIBRARY_VERSION = "15.0.0";
4
+ export declare const LIBRARY_VERSION = "15.2.0";
5
5
  /**
6
6
  * AdCP specification version this library is built for
7
7
  */
@@ -33,10 +33,10 @@ export type AdcpVersion = (typeof COMPATIBLE_ADCP_VERSIONS)[number];
33
33
  * Full version information
34
34
  */
35
35
  export declare const VERSION_INFO: {
36
- readonly library: "15.0.0";
36
+ readonly library: "15.2.0";
37
37
  readonly adcp: "3.2.1";
38
38
  readonly compatibleVersions: readonly ["v2.5", "v2.6", "v3", "3.0.0", "3.0", "3.0.1", "3.0.2", "3.0.3", "3.0.4", "3.0.5", "3.0.6", "3.0.7", "3.0.8", "3.0.9", "3.0.10", "3.0.11", "3.0.12", "3.0.13", "3.0.14", "3.0.15", "3.0.16", "3.0.17", "3.0.18", "3.0.19", "3.0.20", "3.0.21", "3.0.22", "3.0.23", "3.0.24", "3.0.25", "3.1.0", "3.1", "3.1.1", "3.1.2", "3.1.3", "3.1.4", "3.1.5", "3.1.6", "3.1.7", "3.1.8", "3.1.9", "3.1.10", "3.1.11", "3.1.12", "3.1.13", "3.1.14", "3.1.15", "3.1.16", "3.1.17", "3.1.18", "3.1.19", "3.1.20", "3.1.21", "3.1.22", "3.1.23", "3.1.24", "3.2.1", "3.2"];
39
- readonly generatedAt: "2026-10-06T23:38:05.170Z";
39
+ readonly generatedAt: "2026-10-07T15:42:58.737Z";
40
40
  };
41
41
  /**
42
42
  * Get the AdCP specification version this library is built for
@@ -31,7 +31,7 @@ __export(version_exports, {
31
31
  toReleasePrecisionVersion: () => toReleasePrecisionVersion
32
32
  });
33
33
  module.exports = __toCommonJS(version_exports);
34
- const LIBRARY_VERSION = "15.0.0";
34
+ const LIBRARY_VERSION = "15.2.0";
35
35
  const ADCP_VERSION = "3.2.1";
36
36
  const ADCP_MAJOR_VERSION = 3;
37
37
  const COMPATIBLE_ADCP_VERSIONS = [
@@ -95,10 +95,10 @@ const COMPATIBLE_ADCP_VERSIONS = [
95
95
  "3.2"
96
96
  ];
97
97
  const VERSION_INFO = {
98
- library: "15.0.0",
98
+ library: "15.2.0",
99
99
  adcp: "3.2.1",
100
100
  compatibleVersions: COMPATIBLE_ADCP_VERSIONS,
101
- generatedAt: "2026-10-06T23:38:05.170Z"
101
+ generatedAt: "2026-10-07T15:42:58.737Z"
102
102
  };
103
103
  function getAdcpVersion() {
104
104
  return ADCP_VERSION;
@@ -1,4 +1,4 @@
1
- const LIBRARY_VERSION = "15.0.0";
1
+ const LIBRARY_VERSION = "15.2.0";
2
2
  const ADCP_VERSION = "3.2.1";
3
3
  const ADCP_MAJOR_VERSION = 3;
4
4
  const COMPATIBLE_ADCP_VERSIONS = [
@@ -62,10 +62,10 @@ const COMPATIBLE_ADCP_VERSIONS = [
62
62
  "3.2"
63
63
  ];
64
64
  const VERSION_INFO = {
65
- library: "15.0.0",
65
+ library: "15.2.0",
66
66
  adcp: "3.2.1",
67
67
  compatibleVersions: COMPATIBLE_ADCP_VERSIONS,
68
- generatedAt: "2026-10-06T23:38:05.170Z"
68
+ generatedAt: "2026-10-07T15:42:58.737Z"
69
69
  };
70
70
  function getAdcpVersion() {
71
71
  return ADCP_VERSION;
@@ -1,7 +1,7 @@
1
1
  # AdCP Type Summary
2
2
 
3
- > Generated at: 2026-10-06
4
- > @adcp/sdk v15.0.0
3
+ > Generated at: 2026-10-07
4
+ > @adcp/sdk v15.2.0
5
5
 
6
6
  Curated reference of the types that matter for using the AdCP client. For full generated types see `src/lib/types/tools.generated.ts` and `src/lib/types/core.generated.ts`.
7
7