@adcp/sdk 16.0.0-beta.2 → 16.0.0-beta.4

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 (248) hide show
  1. package/README.md +54 -0
  2. package/dist/lib/auth/oauth/diagnose.js +3 -11
  3. package/dist/lib/auth/oauth/diagnose.mjs +4 -12
  4. package/dist/lib/auth/oauth/diagnostics.d.mts +2 -1
  5. package/dist/lib/auth/oauth/diagnostics.d.ts +2 -1
  6. package/dist/lib/auth/oauth/diagnostics.js +8 -10
  7. package/dist/lib/auth/oauth/diagnostics.mjs +7 -10
  8. package/dist/lib/core/ConversationTypes.d.mts +8 -3
  9. package/dist/lib/core/ConversationTypes.d.ts +8 -3
  10. package/dist/lib/core/SingleAgentClient.d.mts +5 -3
  11. package/dist/lib/core/SingleAgentClient.d.ts +5 -3
  12. package/dist/lib/core/TaskExecutor.js +5 -1
  13. package/dist/lib/core/TaskExecutor.mjs +5 -1
  14. package/dist/lib/errors/index.d.mts +9 -4
  15. package/dist/lib/errors/index.d.ts +9 -4
  16. package/dist/lib/index.d.mts +3 -3
  17. package/dist/lib/index.d.ts +3 -3
  18. package/dist/lib/index.js +8 -0
  19. package/dist/lib/index.mjs +14 -2
  20. package/dist/lib/negotiation/types.d.mts +20 -39
  21. package/dist/lib/negotiation/types.d.ts +20 -39
  22. package/dist/lib/protocols/index.d.mts +60 -24
  23. package/dist/lib/protocols/index.d.ts +60 -24
  24. package/dist/lib/protocols/index.js +9 -4
  25. package/dist/lib/protocols/index.mjs +3 -0
  26. package/dist/lib/protocols/mcp-modern.js +1 -0
  27. package/dist/lib/protocols/mcp-modern.mjs +2 -1
  28. package/dist/lib/protocols/mcp.js +1 -0
  29. package/dist/lib/protocols/mcp.mjs +2 -1
  30. package/dist/lib/protocols/responseSizeLimit.d.mts +91 -5
  31. package/dist/lib/protocols/responseSizeLimit.d.ts +91 -5
  32. package/dist/lib/protocols/responseSizeLimit.js +195 -31
  33. package/dist/lib/protocols/responseSizeLimit.mjs +192 -31
  34. package/dist/lib/reporting/consumer-runtime.js +2 -1
  35. package/dist/lib/reporting/consumer-runtime.mjs +2 -1
  36. package/dist/lib/reporting/ledger/handler.js +50 -11
  37. package/dist/lib/reporting/ledger/handler.mjs +50 -12
  38. package/dist/lib/reporting/ledger/index.d.mts +17 -14
  39. package/dist/lib/reporting/ledger/index.d.ts +17 -14
  40. package/dist/lib/reporting/ledger/index.js +32 -20
  41. package/dist/lib/reporting/ledger/index.mjs +21 -10
  42. package/dist/lib/reporting/ledger/offering-validation.d.mts +9 -0
  43. package/dist/lib/reporting/ledger/offering-validation.d.ts +9 -0
  44. package/dist/lib/reporting/{gcs/bucket-policy.js → ledger/offering-validation.js} +9 -8
  45. package/dist/lib/reporting/ledger/offering-validation.mjs +8 -0
  46. package/dist/lib/reporting/ledger/receipts.d.mts +48 -0
  47. package/dist/lib/reporting/ledger/receipts.d.ts +48 -0
  48. package/dist/lib/reporting/ledger/receipts.js +186 -0
  49. package/dist/lib/reporting/ledger/receipts.mjs +161 -0
  50. package/dist/lib/reporting/ledger/status-ingest.js +3 -3
  51. package/dist/lib/reporting/ledger/status-ingest.mjs +4 -5
  52. package/dist/lib/reporting/ledger/types.d.mts +43 -0
  53. package/dist/lib/reporting/ledger/types.d.ts +43 -0
  54. package/dist/lib/reporting/ledger/types.js +31 -2
  55. package/dist/lib/reporting/ledger/types.mjs +26 -1
  56. package/dist/lib/reporting/pagination.d.mts +6 -0
  57. package/dist/lib/reporting/pagination.d.ts +6 -0
  58. package/dist/lib/reporting/{gcs/errors.js → pagination.js} +12 -17
  59. package/dist/lib/reporting/pagination.mjs +12 -0
  60. package/dist/lib/reporting/reconciliation.d.mts +1 -0
  61. package/dist/lib/reporting/reconciliation.d.ts +1 -0
  62. package/dist/lib/reporting/reconciliation.js +3 -2
  63. package/dist/lib/reporting/reconciliation.mjs +3 -2
  64. package/dist/lib/reporting/service/index.d.mts +79 -153
  65. package/dist/lib/reporting/service/index.d.ts +79 -153
  66. package/dist/lib/reporting/service/index.js +34 -491
  67. package/dist/lib/reporting/service/index.mjs +36 -510
  68. package/dist/lib/reporting/service/scheduler-support.d.mts +43 -0
  69. package/dist/lib/reporting/service/scheduler-support.d.ts +43 -0
  70. package/dist/lib/reporting/service/scheduler-support.js +125 -0
  71. package/dist/lib/reporting/service/scheduler-support.mjs +96 -0
  72. package/dist/lib/schemas-data/v2.5/_provenance.json +1 -1
  73. package/dist/lib/signing/canonicalize.d.mts +4 -0
  74. package/dist/lib/signing/canonicalize.d.ts +4 -0
  75. package/dist/lib/signing/canonicalize.js +14 -8
  76. package/dist/lib/signing/canonicalize.mjs +14 -8
  77. package/dist/lib/signing/content-digest.d.mts +8 -0
  78. package/dist/lib/signing/content-digest.d.ts +8 -0
  79. package/dist/lib/signing/content-digest.js +11 -5
  80. package/dist/lib/signing/content-digest.mjs +10 -5
  81. package/dist/lib/signing/crypto.d.mts +15 -0
  82. package/dist/lib/signing/crypto.d.ts +15 -0
  83. package/dist/lib/signing/crypto.js +75 -3
  84. package/dist/lib/signing/crypto.mjs +78 -3
  85. package/dist/lib/signing/server.d.mts +1 -1
  86. package/dist/lib/signing/server.d.ts +1 -1
  87. package/dist/lib/signing/server.js +2 -0
  88. package/dist/lib/signing/server.mjs +2 -1
  89. package/dist/lib/signing/signer.js +11 -14
  90. package/dist/lib/signing/signer.mjs +13 -16
  91. package/dist/lib/signing/testing.js +2 -6
  92. package/dist/lib/signing/testing.mjs +3 -7
  93. package/dist/lib/signing/verifier.js +2 -2
  94. package/dist/lib/signing/verifier.mjs +3 -3
  95. package/dist/lib/signing/web-bot-auth.js +122 -43
  96. package/dist/lib/signing/web-bot-auth.mjs +128 -44
  97. package/dist/lib/signing/webhook-verifier.js +2 -2
  98. package/dist/lib/signing/webhook-verifier.mjs +3 -3
  99. package/dist/lib/substitution/compile.js +2 -1
  100. package/dist/lib/substitution/compile.mjs +2 -1
  101. package/dist/lib/substitution/consent-macros.d.mts +4 -0
  102. package/dist/lib/substitution/consent-macros.d.ts +4 -0
  103. package/dist/lib/substitution/consent-macros.js +45 -0
  104. package/dist/lib/substitution/consent-macros.mjs +20 -0
  105. package/dist/lib/substitution/index.d.mts +1 -1
  106. package/dist/lib/substitution/index.d.ts +1 -1
  107. package/dist/lib/substitution/index.js +2 -0
  108. package/dist/lib/substitution/index.mjs +2 -1
  109. package/dist/lib/substitution/translate.d.mts +15 -2
  110. package/dist/lib/substitution/translate.d.ts +15 -2
  111. package/dist/lib/substitution/translate.js +148 -26
  112. package/dist/lib/substitution/translate.mjs +147 -26
  113. package/dist/lib/testing/client.js +2 -1
  114. package/dist/lib/testing/client.mjs +2 -1
  115. package/dist/lib/testing/scenarios/capabilities.js +1 -1
  116. package/dist/lib/testing/scenarios/capabilities.mjs +1 -1
  117. package/dist/lib/testing/storyboard/junit.js +16 -3
  118. package/dist/lib/testing/storyboard/junit.mjs +16 -3
  119. package/dist/lib/testing/storyboard/request-signing/builder.js +12 -14
  120. package/dist/lib/testing/storyboard/request-signing/builder.mjs +13 -15
  121. package/dist/lib/testing/storyboard/runner.js +94 -25
  122. package/dist/lib/testing/storyboard/runner.mjs +94 -25
  123. package/dist/lib/testing/storyboard/signer-grader/grader.js +2 -7
  124. package/dist/lib/testing/storyboard/signer-grader/grader.mjs +2 -7
  125. package/dist/lib/testing/storyboard/types.d.mts +6 -0
  126. package/dist/lib/testing/storyboard/types.d.ts +6 -0
  127. package/dist/lib/testing/storyboard/validations.d.mts +1 -1
  128. package/dist/lib/testing/storyboard/validations.d.ts +1 -1
  129. package/dist/lib/types/enums.generated.d.mts +3 -0
  130. package/dist/lib/types/enums.generated.d.ts +3 -0
  131. package/dist/lib/types/enums.generated.js +9 -0
  132. package/dist/lib/types/enums.generated.mjs +6 -0
  133. package/dist/lib/validation/schema-loader.js +25 -0
  134. package/dist/lib/validation/schema-loader.mjs +24 -0
  135. package/dist/lib/version.d.mts +3 -3
  136. package/dist/lib/version.d.ts +3 -3
  137. package/dist/lib/version.js +3 -3
  138. package/dist/lib/version.mjs +3 -3
  139. package/docs/TYPE-SUMMARY.md +28 -5
  140. package/docs/guides/DISCOVERY-CACHE-AND-SESSION-REUSE.md +3 -2
  141. package/docs/guides/REPORTING-GCS-FENCE.md +3 -3
  142. package/docs/guides/REPORTING-GCS-MANAGED.md +4 -4
  143. package/docs/guides/REPORTING-LEDGER-CUTOVER.md +7 -7
  144. package/docs/guides/REPORTING-LEDGER.md +107 -51
  145. package/docs/guides/REPORTING-OPERATIONS.md +66 -5
  146. package/docs/guides/REPORTING-STABILITY.md +36 -32
  147. package/docs/guides/UNIVERSAL-MACRO-COMPILATION.md +38 -0
  148. package/docs/guides/VALIDATE-YOUR-AGENT.md +12 -0
  149. package/docs/llms.txt +4 -3
  150. package/docs/migration-14.x-rc-worksheet.md +4 -7
  151. package/docs/migration-reporting-storage-package.md +186 -0
  152. package/examples/README.md +1 -1
  153. package/package.json +14 -78
  154. package/dist/lib/reporting/azure/index.d.mts +0 -31
  155. package/dist/lib/reporting/azure/index.d.ts +0 -31
  156. package/dist/lib/reporting/azure/index.js +0 -266
  157. package/dist/lib/reporting/azure/index.mjs +0 -249
  158. package/dist/lib/reporting/bigquery/index.d.mts +0 -246
  159. package/dist/lib/reporting/bigquery/index.d.ts +0 -246
  160. package/dist/lib/reporting/bigquery/index.js +0 -633
  161. package/dist/lib/reporting/bigquery/index.mjs +0 -594
  162. package/dist/lib/reporting/gcs/adapter.d.mts +0 -38
  163. package/dist/lib/reporting/gcs/adapter.d.ts +0 -38
  164. package/dist/lib/reporting/gcs/adapter.js +0 -342
  165. package/dist/lib/reporting/gcs/adapter.mjs +0 -325
  166. package/dist/lib/reporting/gcs/bucket-policy.d.mts +0 -3
  167. package/dist/lib/reporting/gcs/bucket-policy.d.ts +0 -3
  168. package/dist/lib/reporting/gcs/bucket-policy.mjs +0 -7
  169. package/dist/lib/reporting/gcs/errors.d.mts +0 -11
  170. package/dist/lib/reporting/gcs/errors.d.ts +0 -11
  171. package/dist/lib/reporting/gcs/errors.mjs +0 -16
  172. package/dist/lib/reporting/gcs/fence.d.mts +0 -41
  173. package/dist/lib/reporting/gcs/fence.d.ts +0 -41
  174. package/dist/lib/reporting/gcs/fence.js +0 -250
  175. package/dist/lib/reporting/gcs/fence.mjs +0 -230
  176. package/dist/lib/reporting/gcs/index.d.mts +0 -18
  177. package/dist/lib/reporting/gcs/index.d.ts +0 -18
  178. package/dist/lib/reporting/gcs/index.js +0 -44
  179. package/dist/lib/reporting/gcs/index.mjs +0 -14
  180. package/dist/lib/reporting/gcs/io.d.mts +0 -7
  181. package/dist/lib/reporting/gcs/io.d.ts +0 -7
  182. package/dist/lib/reporting/gcs/io.js +0 -95
  183. package/dist/lib/reporting/gcs/io.mjs +0 -69
  184. package/dist/lib/reporting/gcs/reader.d.mts +0 -67
  185. package/dist/lib/reporting/gcs/reader.d.ts +0 -67
  186. package/dist/lib/reporting/gcs/reader.js +0 -193
  187. package/dist/lib/reporting/gcs/reader.mjs +0 -169
  188. package/dist/lib/reporting/gcs/row-provider.d.mts +0 -39
  189. package/dist/lib/reporting/gcs/row-provider.d.ts +0 -39
  190. package/dist/lib/reporting/gcs/row-provider.js +0 -225
  191. package/dist/lib/reporting/gcs/row-provider.mjs +0 -208
  192. package/dist/lib/reporting/gcs/validation.d.mts +0 -5
  193. package/dist/lib/reporting/gcs/validation.d.ts +0 -5
  194. package/dist/lib/reporting/gcs/validation.js +0 -49
  195. package/dist/lib/reporting/gcs/validation.mjs +0 -25
  196. package/dist/lib/reporting/ledger/change-feed.d.mts +0 -69
  197. package/dist/lib/reporting/ledger/change-feed.d.ts +0 -69
  198. package/dist/lib/reporting/ledger/change-feed.js +0 -107
  199. package/dist/lib/reporting/ledger/change-feed.mjs +0 -80
  200. package/dist/lib/reporting/ledger/managed-postgres.d.mts +0 -293
  201. package/dist/lib/reporting/ledger/managed-postgres.d.ts +0 -293
  202. package/dist/lib/reporting/ledger/managed-postgres.js +0 -2346
  203. package/dist/lib/reporting/ledger/managed-postgres.mjs +0 -2332
  204. package/dist/lib/reporting/ledger/managed-router.d.mts +0 -148
  205. package/dist/lib/reporting/ledger/managed-router.d.ts +0 -148
  206. package/dist/lib/reporting/ledger/managed-router.js +0 -280
  207. package/dist/lib/reporting/ledger/managed-router.mjs +0 -258
  208. package/dist/lib/reporting/ledger/managed.d.mts +0 -535
  209. package/dist/lib/reporting/ledger/managed.d.ts +0 -535
  210. package/dist/lib/reporting/ledger/managed.js +0 -761
  211. package/dist/lib/reporting/ledger/managed.mjs +0 -729
  212. package/dist/lib/reporting/ledger/notification-activity.d.mts +0 -332
  213. package/dist/lib/reporting/ledger/notification-activity.d.ts +0 -332
  214. package/dist/lib/reporting/ledger/notification-activity.js +0 -1366
  215. package/dist/lib/reporting/ledger/notification-activity.mjs +0 -1337
  216. package/dist/lib/reporting/ledger/object-writes.d.mts +0 -128
  217. package/dist/lib/reporting/ledger/object-writes.d.ts +0 -128
  218. package/dist/lib/reporting/ledger/object-writes.js +0 -147
  219. package/dist/lib/reporting/ledger/object-writes.mjs +0 -114
  220. package/dist/lib/reporting/ledger/postgres.d.mts +0 -689
  221. package/dist/lib/reporting/ledger/postgres.d.ts +0 -689
  222. package/dist/lib/reporting/ledger/postgres.js +0 -4462
  223. package/dist/lib/reporting/ledger/postgres.mjs +0 -4462
  224. package/dist/lib/reporting/ledger/row-storage-migration.d.mts +0 -59
  225. package/dist/lib/reporting/ledger/row-storage-migration.d.ts +0 -59
  226. package/dist/lib/reporting/ledger/row-storage-migration.js +0 -365
  227. package/dist/lib/reporting/ledger/row-storage-migration.mjs +0 -339
  228. package/dist/lib/reporting/ledger/row-storage-object.d.mts +0 -203
  229. package/dist/lib/reporting/ledger/row-storage-object.d.ts +0 -203
  230. package/dist/lib/reporting/ledger/row-storage-object.js +0 -379
  231. package/dist/lib/reporting/ledger/row-storage-object.mjs +0 -335
  232. package/dist/lib/reporting/ledger/row-storage-provider-io.d.mts +0 -44
  233. package/dist/lib/reporting/ledger/row-storage-provider-io.d.ts +0 -44
  234. package/dist/lib/reporting/ledger/row-storage-provider-io.js +0 -142
  235. package/dist/lib/reporting/ledger/row-storage-provider-io.mjs +0 -111
  236. package/dist/lib/reporting/ledger/row-storage.d.mts +0 -316
  237. package/dist/lib/reporting/ledger/row-storage.d.ts +0 -316
  238. package/dist/lib/reporting/ledger/row-storage.js +0 -812
  239. package/dist/lib/reporting/ledger/row-storage.mjs +0 -802
  240. package/dist/lib/reporting/s3/index.d.mts +0 -34
  241. package/dist/lib/reporting/s3/index.d.ts +0 -34
  242. package/dist/lib/reporting/s3/index.js +0 -347
  243. package/dist/lib/reporting/s3/index.mjs +0 -340
  244. package/dist/lib/reporting/service/maintenance.d.mts +0 -148
  245. package/dist/lib/reporting/service/maintenance.d.ts +0 -148
  246. package/dist/lib/reporting/service/maintenance.js +0 -185
  247. package/dist/lib/reporting/service/maintenance.mjs +0 -159
  248. package/examples/reliable-reporting-service/README.md +0 -169
package/README.md CHANGED
@@ -602,6 +602,60 @@ app.post(
602
602
 
603
603
  Full guide covering key generation, JWKS publication, brand.json setup, webhook signing, capability declaration, key rotation, and conformance testing: **[docs/guides/SIGNING-GUIDE.md](./docs/guides/SIGNING-GUIDE.md)**.
604
604
 
605
+ ### Response Size Cap
606
+
607
+ Agent responses are untrusted input, so the SDK caps every response body it
608
+ reads. **The default is 4 MiB** (`DEFAULT_MAX_RESPONSE_BYTES`), applied on
609
+ every MCP and A2A call path: tool calls, endpoint discovery, `tools/list`,
610
+ A2A agent-card lookup, and OAuth token exchange. (OAuth metadata discovery
611
+ has its own, tighter 64 KiB cap and does not use this mechanism.)
612
+
613
+ Bytes are counted as they stream in, a declared `Content-Length` over the cap
614
+ is refused before the body is read, and an oversized response fails with a
615
+ typed `ResponseTooLargeError`. Nothing is silently truncated.
616
+
617
+ ```typescript
618
+ import { ResponseTooLargeError } from '@adcp/sdk';
619
+
620
+ // Raise the cap for an agent that legitimately publishes a large catalog.
621
+ const client = new ADCPMultiAgentClient(agents, {
622
+ transport: { maxResponseBytes: 32 * 1024 * 1024 },
623
+ });
624
+
625
+ // …or per call.
626
+ await client.agent('agent_x').getProducts(params, {
627
+ transport: { maxResponseBytes: 32 * 1024 * 1024 },
628
+ });
629
+
630
+ // Opt out entirely — explicit, never the default. Only `0` opts out;
631
+ // `Infinity` and negative values fall back to the 4 MiB default.
632
+ await client.agent('agent_x').getProducts(params, { transport: { maxResponseBytes: 0 } });
633
+
634
+ try {
635
+ await client.agent('agent_x').getProducts(params);
636
+ } catch (err) {
637
+ if (err instanceof ResponseTooLargeError) {
638
+ console.warn(`agent returned > ${err.limit} bytes from ${err.url}`);
639
+ }
640
+ }
641
+ ```
642
+
643
+ `text/event-stream` responses are covered too, with two bounds: no single
644
+ event frame may exceed `maxResponseBytes`, and the cumulative event-stream
645
+ octets read during one call may not exceed `maxResponseBytes * 2` (8 MiB by
646
+ default). A peer cannot escape the cap by replying with
647
+ `Content-Type: text/event-stream`.
648
+
649
+ The counter runs downstream of the runtime's content-decoder, so it measures
650
+ **decompressed** octets: a small gzip blob that inflates to gigabytes still
651
+ trips the cap after `maxResponseBytes` of output. The `Content-Length`
652
+ pre-check sees the compressed length, so it is a fast path rather than the
653
+ guarantee.
654
+
655
+ A per-call `transport` object **replaces** the client's `transport` rather
656
+ than merging into it — repeat `maxResponseBytes` when you override the object
657
+ for some other reason.
658
+
605
659
  ### Authentication
606
660
 
607
661
  ```typescript
@@ -370,7 +370,7 @@ function rankH2(agentUrl, refreshStep, refreshedDecoded) {
370
370
  ];
371
371
  return base;
372
372
  }
373
- const result = (0, import_diagnostics.validateTokenAudience)(jwtFromDecoded(refreshedDecoded), agentUrl);
373
+ const result = (0, import_diagnostics.validateDecodedTokenAudience)(refreshedDecoded, agentUrl);
374
374
  if (result.ok) {
375
375
  base.verdict = "ruled_out";
376
376
  base.summary = "Refreshed token `aud` claim matches the expected resource \u2014 AS honors RFC 8707 `resource`";
@@ -440,7 +440,7 @@ function rankH5(agentUrl, currentDecoded, prmStep) {
440
440
  const prmResource = prmStep?.http?.body && typeof prmStep.http.body.resource === "string" ? prmStep.http.body.resource : void 0;
441
441
  const expected = prmResource ?? agentUrl;
442
442
  const prmDiffersFromAgent = prmResource !== void 0 && normalizeForCompare(prmResource) !== normalizeForCompare(agentUrl);
443
- const result = (0, import_diagnostics.validateTokenAudience)(jwtFromDecoded(currentDecoded), expected);
443
+ const result = (0, import_diagnostics.validateDecodedTokenAudience)(currentDecoded, expected);
444
444
  if (result.ok) {
445
445
  base.verdict = "ruled_out";
446
446
  base.summary = `Saved token \`aud\` matches expected resource (${expected})`;
@@ -477,7 +477,7 @@ function rankH6(agentUrl, currentDecoded, toolStep) {
477
477
  base.summary = `tool_call returned HTTP ${toolStep.http.status} \u2014 agent did not accept the token blindly`;
478
478
  return base;
479
479
  }
480
- const audResult = (0, import_diagnostics.validateTokenAudience)(jwtFromDecoded(currentDecoded), agentUrl);
480
+ const audResult = (0, import_diagnostics.validateDecodedTokenAudience)(currentDecoded, agentUrl);
481
481
  if (audResult.ok) {
482
482
  base.verdict = "ruled_out";
483
483
  base.summary = "Token `aud` matches agent URL and tool_call succeeded \u2014 cannot distinguish from correct behavior";
@@ -588,14 +588,6 @@ function isDefaultPort(scheme, port) {
588
588
  if (scheme === "http:" && port === "80") return true;
589
589
  return false;
590
590
  }
591
- function jwtFromDecoded(_decoded) {
592
- const h = base64url(JSON.stringify(_decoded.header));
593
- const c = base64url(JSON.stringify(_decoded.claims));
594
- return `${h}.${c}.${_decoded.signature || "sig"}`;
595
- }
596
- function base64url(input) {
597
- return Buffer.from(input).toString("base64").replace(/\+/g, "-").replace(/\//g, "_").replace(/={0,2}$/, "");
598
- }
599
591
  function formatError(err) {
600
592
  if (err instanceof import_net.SsrfRefusedError) {
601
593
  return `SSRF guard refused: ${err.code} (${err.message})`;
@@ -1,6 +1,6 @@
1
1
  import { ssrfSafeFetch, decodeBodyAsJsonOrText, SsrfRefusedError } from "../../net/index.mjs";
2
2
  import { assertOAuthCredentialIssuer, assertOAuthServerIssuer, OAuthError } from "./types.mjs";
3
- import { decodeAccessTokenClaims, parseWWWAuthenticate, validateTokenAudience } from "./diagnostics.mjs";
3
+ import { decodeAccessTokenClaims, parseWWWAuthenticate, validateDecodedTokenAudience } from "./diagnostics.mjs";
4
4
  const AUTH_DIAGNOSIS_SCHEMA_VERSION = 1;
5
5
  async function runAuthDiagnosis(agent, options = {}) {
6
6
  const steps = [];
@@ -346,7 +346,7 @@ function rankH2(agentUrl, refreshStep, refreshedDecoded) {
346
346
  ];
347
347
  return base;
348
348
  }
349
- const result = validateTokenAudience(jwtFromDecoded(refreshedDecoded), agentUrl);
349
+ const result = validateDecodedTokenAudience(refreshedDecoded, agentUrl);
350
350
  if (result.ok) {
351
351
  base.verdict = "ruled_out";
352
352
  base.summary = "Refreshed token `aud` claim matches the expected resource \u2014 AS honors RFC 8707 `resource`";
@@ -416,7 +416,7 @@ function rankH5(agentUrl, currentDecoded, prmStep) {
416
416
  const prmResource = prmStep?.http?.body && typeof prmStep.http.body.resource === "string" ? prmStep.http.body.resource : void 0;
417
417
  const expected = prmResource ?? agentUrl;
418
418
  const prmDiffersFromAgent = prmResource !== void 0 && normalizeForCompare(prmResource) !== normalizeForCompare(agentUrl);
419
- const result = validateTokenAudience(jwtFromDecoded(currentDecoded), expected);
419
+ const result = validateDecodedTokenAudience(currentDecoded, expected);
420
420
  if (result.ok) {
421
421
  base.verdict = "ruled_out";
422
422
  base.summary = `Saved token \`aud\` matches expected resource (${expected})`;
@@ -453,7 +453,7 @@ function rankH6(agentUrl, currentDecoded, toolStep) {
453
453
  base.summary = `tool_call returned HTTP ${toolStep.http.status} \u2014 agent did not accept the token blindly`;
454
454
  return base;
455
455
  }
456
- const audResult = validateTokenAudience(jwtFromDecoded(currentDecoded), agentUrl);
456
+ const audResult = validateDecodedTokenAudience(currentDecoded, agentUrl);
457
457
  if (audResult.ok) {
458
458
  base.verdict = "ruled_out";
459
459
  base.summary = "Token `aud` matches agent URL and tool_call succeeded \u2014 cannot distinguish from correct behavior";
@@ -564,14 +564,6 @@ function isDefaultPort(scheme, port) {
564
564
  if (scheme === "http:" && port === "80") return true;
565
565
  return false;
566
566
  }
567
- function jwtFromDecoded(_decoded) {
568
- const h = base64url(JSON.stringify(_decoded.header));
569
- const c = base64url(JSON.stringify(_decoded.claims));
570
- return `${h}.${c}.${_decoded.signature || "sig"}`;
571
- }
572
- function base64url(input) {
573
- return Buffer.from(input).toString("base64").replace(/\+/g, "-").replace(/\//g, "_").replace(/={0,2}$/, "");
574
- }
575
567
  function formatError(err) {
576
568
  if (err instanceof SsrfRefusedError) {
577
569
  return `SSRF guard refused: ${err.code} (${err.message})`;
@@ -92,7 +92,8 @@ export interface DecodedAccessToken {
92
92
  *
93
93
  * For diagnostics only — the returned claims MUST NOT be trusted for
94
94
  * authorization decisions. Returns `null` if the token is not a well-formed
95
- * three-part JWT, or if the header/claims segments are not valid JSON.
95
+ * three-part JWS compact serialization: segments that are not base64url, or a
96
+ * header or claims set that is not a JSON object. Decoding uses `jose`.
96
97
  *
97
98
  * Opaque (non-JWT) tokens always return `null`, which is the expected outcome
98
99
  * for servers that issue reference tokens rather than JWTs.
@@ -92,7 +92,8 @@ export interface DecodedAccessToken {
92
92
  *
93
93
  * For diagnostics only — the returned claims MUST NOT be trusted for
94
94
  * authorization decisions. Returns `null` if the token is not a well-formed
95
- * three-part JWT, or if the header/claims segments are not valid JSON.
95
+ * three-part JWS compact serialization: segments that are not base64url, or a
96
+ * header or claims set that is not a JSON object. Decoding uses `jose`.
96
97
  *
97
98
  * Opaque (non-JWT) tokens always return `null`, which is the expected outcome
98
99
  * for servers that issue reference tokens rather than JWTs.
@@ -20,9 +20,11 @@ var diagnostics_exports = {};
20
20
  __export(diagnostics_exports, {
21
21
  decodeAccessTokenClaims: () => decodeAccessTokenClaims,
22
22
  parseWWWAuthenticate: () => parseWWWAuthenticate,
23
+ validateDecodedTokenAudience: () => validateDecodedTokenAudience,
23
24
  validateTokenAudience: () => validateTokenAudience
24
25
  });
25
26
  module.exports = __toCommonJS(diagnostics_exports);
27
+ var import_jose = require("jose");
26
28
  function parseWWWAuthenticate(header) {
27
29
  if (!header) return null;
28
30
  const trimmed = header.trim();
@@ -82,10 +84,8 @@ function decodeAccessTokenClaims(token) {
82
84
  const parts = token.split(".");
83
85
  if (parts.length !== 3) return null;
84
86
  try {
85
- const header = JSON.parse(base64UrlDecode(parts[0]));
86
- const claims = JSON.parse(base64UrlDecode(parts[1]));
87
- if (typeof header !== "object" || header === null) return null;
88
- if (typeof claims !== "object" || claims === null) return null;
87
+ const header = (0, import_jose.decodeProtectedHeader)(token);
88
+ const claims = (0, import_jose.decodeJwt)(token);
89
89
  return { header, claims, signature: parts[2] };
90
90
  } catch {
91
91
  return null;
@@ -96,6 +96,9 @@ function validateTokenAudience(token, expectedResource) {
96
96
  if (!decoded) {
97
97
  return { ok: false, reason: "Token is opaque or not a valid JWT; audience cannot be inspected" };
98
98
  }
99
+ return validateDecodedTokenAudience(decoded, expectedResource);
100
+ }
101
+ function validateDecodedTokenAudience(decoded, expectedResource) {
99
102
  const aud = decoded.claims.aud;
100
103
  if (aud === void 0) {
101
104
  return { ok: false, reason: "Token has no `aud` claim (RFC 8707 violation for resource-indicator flows)" };
@@ -131,15 +134,10 @@ function isDefaultPort(scheme, port) {
131
134
  if (scheme === "http:" && port === "80") return true;
132
135
  return false;
133
136
  }
134
- function base64UrlDecode(input) {
135
- const padded = input.replace(/-/g, "+").replace(/_/g, "/");
136
- const padLen = padded.length % 4;
137
- const full = padLen ? padded + "=".repeat(4 - padLen) : padded;
138
- return Buffer.from(full, "base64").toString("utf8");
139
- }
140
137
  // Annotate the CommonJS export names for ESM import in node:
141
138
  0 && (module.exports = {
142
139
  decodeAccessTokenClaims,
143
140
  parseWWWAuthenticate,
141
+ validateDecodedTokenAudience,
144
142
  validateTokenAudience
145
143
  });
@@ -1,3 +1,4 @@
1
+ import { decodeJwt, decodeProtectedHeader } from "jose";
1
2
  function parseWWWAuthenticate(header) {
2
3
  if (!header) return null;
3
4
  const trimmed = header.trim();
@@ -57,10 +58,8 @@ function decodeAccessTokenClaims(token) {
57
58
  const parts = token.split(".");
58
59
  if (parts.length !== 3) return null;
59
60
  try {
60
- const header = JSON.parse(base64UrlDecode(parts[0]));
61
- const claims = JSON.parse(base64UrlDecode(parts[1]));
62
- if (typeof header !== "object" || header === null) return null;
63
- if (typeof claims !== "object" || claims === null) return null;
61
+ const header = decodeProtectedHeader(token);
62
+ const claims = decodeJwt(token);
64
63
  return { header, claims, signature: parts[2] };
65
64
  } catch {
66
65
  return null;
@@ -71,6 +70,9 @@ function validateTokenAudience(token, expectedResource) {
71
70
  if (!decoded) {
72
71
  return { ok: false, reason: "Token is opaque or not a valid JWT; audience cannot be inspected" };
73
72
  }
73
+ return validateDecodedTokenAudience(decoded, expectedResource);
74
+ }
75
+ function validateDecodedTokenAudience(decoded, expectedResource) {
74
76
  const aud = decoded.claims.aud;
75
77
  if (aud === void 0) {
76
78
  return { ok: false, reason: "Token has no `aud` claim (RFC 8707 violation for resource-indicator flows)" };
@@ -106,14 +108,9 @@ function isDefaultPort(scheme, port) {
106
108
  if (scheme === "http:" && port === "80") return true;
107
109
  return false;
108
110
  }
109
- function base64UrlDecode(input) {
110
- const padded = input.replace(/-/g, "+").replace(/_/g, "/");
111
- const padLen = padded.length % 4;
112
- const full = padLen ? padded + "=".repeat(4 - padLen) : padded;
113
- return Buffer.from(full, "base64").toString("utf8");
114
- }
115
111
  export {
116
112
  decodeAccessTokenClaims,
117
113
  parseWWWAuthenticate,
114
+ validateDecodedTokenAudience,
118
115
  validateTokenAudience
119
116
  };
@@ -184,10 +184,15 @@ export interface TaskOptions {
184
184
  /** Additional metadata to include */
185
185
  metadata?: Record<string, any>;
186
186
  /**
187
- * Transport-level safeguards for this call. Overrides the matching field
188
- * on the client constructor's `transport` option. Use to lift or tighten
187
+ * Transport-level safeguards for this call. Use to lift or tighten
189
188
  * `maxResponseBytes` per call when an agent legitimately publishes large
190
- * catalogs (e.g., `list_creative_formats` on a generative seller).
189
+ * catalogs (e.g., `list_creative_formats` on a generative seller) — the
190
+ * default is 4 MiB.
191
+ *
192
+ * This object **replaces** the client constructor's `transport` rather than
193
+ * merging into it. A per-call object that sets only `requestTimeoutMs`
194
+ * drops the constructor's `maxResponseBytes` back to the default; repeat
195
+ * every field you still want.
191
196
  */
192
197
  transport?: import('../protocols/index.mjs').TransportOptions;
193
198
  }
@@ -184,10 +184,15 @@ export interface TaskOptions {
184
184
  /** Additional metadata to include */
185
185
  metadata?: Record<string, any>;
186
186
  /**
187
- * Transport-level safeguards for this call. Overrides the matching field
188
- * on the client constructor's `transport` option. Use to lift or tighten
187
+ * Transport-level safeguards for this call. Use to lift or tighten
189
188
  * `maxResponseBytes` per call when an agent legitimately publishes large
190
- * catalogs (e.g., `list_creative_formats` on a generative seller).
189
+ * catalogs (e.g., `list_creative_formats` on a generative seller) — the
190
+ * default is 4 MiB.
191
+ *
192
+ * This object **replaces** the client constructor's `transport` rather than
193
+ * merging into it. A per-call object that sets only `requestTimeoutMs`
194
+ * drops the constructor's `maxResponseBytes` back to the default; repeat
195
+ * every field you still want.
191
196
  */
192
197
  transport?: import('../protocols').TransportOptions;
193
198
  }
@@ -495,9 +495,11 @@ export interface SingleAgentClientConfig extends ConversationConfig {
495
495
  * Transport-level safeguards. Applies to every call this client dispatches
496
496
  * unless overridden at call time.
497
497
  *
498
- * Set `maxResponseBytes` when crawling untrusted agents (registries,
499
- * federated discovery layers) to prevent a hostile vendor from buffering
500
- * a large reply before any application-layer schema validation runs. Set
498
+ * `maxResponseBytes` defaults to 4 MiB on every call; raise it for an agent
499
+ * that legitimately publishes a large catalog, lower it when crawling
500
+ * untrusted agents (registries, federated discovery layers), or set it to
501
+ * exactly `0` to opt out of the cap entirely. A per-call `transport`
502
+ * replaces this object wholesale rather than merging into it. Set
501
503
  * `requestTimeoutMs` to override the default 60s cap on A2A agent-card
502
504
  * discovery; use `0` to disable the SDK-imposed discovery timeout.
503
505
  */
@@ -495,9 +495,11 @@ export interface SingleAgentClientConfig extends ConversationConfig {
495
495
  * Transport-level safeguards. Applies to every call this client dispatches
496
496
  * unless overridden at call time.
497
497
  *
498
- * Set `maxResponseBytes` when crawling untrusted agents (registries,
499
- * federated discovery layers) to prevent a hostile vendor from buffering
500
- * a large reply before any application-layer schema validation runs. Set
498
+ * `maxResponseBytes` defaults to 4 MiB on every call; raise it for an agent
499
+ * that legitimately publishes a large catalog, lower it when crawling
500
+ * untrusted agents (registries, federated discovery layers), or set it to
501
+ * exactly `0` to opt out of the cap entirely. A per-call `transport`
502
+ * replaces this object wholesale rather than merging into it. Set
501
503
  * `requestTimeoutMs` to override the default 60s cap on A2A agent-card
502
504
  * discovery; use `0` to disable the SDK-imposed discovery timeout.
503
505
  */
@@ -50,6 +50,7 @@ var import_signedRequestRejection = require('../protocols/signedRequestRejection
50
50
  var import_errors = require('../errors/index.js');
51
51
  var import_client_hooks = require('../validation/client-hooks.js');
52
52
  var import_schema_validator = require('../validation/schema-validator.js');
53
+ var import_schema_loader = require('../validation/schema-loader.js');
53
54
  var import_version = require('../version.js');
54
55
  var import_response_unwrapper = require('../utils/response-unwrapper.js');
55
56
  var import_error_extraction = require('../utils/error-extraction.js');
@@ -4458,7 +4459,10 @@ class TaskExecutor {
4458
4459
  const mode = this.responseValidationMode;
4459
4460
  const logViolations = this.config.logSchemaViolations !== false;
4460
4461
  try {
4461
- const validationVersion = (serverVersion ?? this.lastKnownServerVersion) === "v2" ? "v2.5" : this.responseAdcpVersionForValidation() ?? this.config.adcpVersion ?? import_version.ADCP_VERSION;
4462
+ let validationVersion = (serverVersion ?? this.lastKnownServerVersion) === "v2" ? "v2.5" : this.responseAdcpVersionForValidation() ?? this.config.adcpVersion ?? import_version.ADCP_VERSION;
4463
+ if (taskName === "get_adcp_capabilities" && validationVersion !== "v2.5") {
4464
+ validationVersion = (0, import_schema_loader.resolveServedValidationVersion)(response, validationVersion);
4465
+ }
4462
4466
  const normalizedResponse = this.normalizeResponseForValidation(response, taskName, validationVersion === "v2.5");
4463
4467
  const outcome = (this.config.experimentalIdentity33?.() || this.config.identity33SchemaExperiment && normalizedResponse && typeof normalizedResponse === "object" && (0, import_adcp_version_config.isAdcpVersionAtLeast)(normalizedResponse.adcp_version, "3.3")) && mode !== "off" ? validateIdentity33Payload(taskName, "response", normalizedResponse, validationVersion) : (0, import_client_hooks.validateIncomingResponse)(taskName, normalizedResponse, mode, void 0, validationVersion);
4464
4468
  if (outcome.valid) return { valid: true, errors: [] };
@@ -26,6 +26,7 @@ import {
26
26
  resolveValidationModes
27
27
  } from "../validation/client-hooks.mjs";
28
28
  import { formatIssues } from "../validation/schema-validator.mjs";
29
+ import { resolveServedValidationVersion } from "../validation/schema-loader.mjs";
29
30
  import { ADCP_VERSION } from "../version.mjs";
30
31
  import { unwrapProtocolResponse, isAdcpOperationSuccess } from "../utils/response-unwrapper.mjs";
31
32
  import { extractAdcpErrorInfo, extractCorrelationId } from "../utils/error-extraction.mjs";
@@ -4436,7 +4437,10 @@ class TaskExecutor {
4436
4437
  const mode = this.responseValidationMode;
4437
4438
  const logViolations = this.config.logSchemaViolations !== false;
4438
4439
  try {
4439
- const validationVersion = (serverVersion ?? this.lastKnownServerVersion) === "v2" ? "v2.5" : this.responseAdcpVersionForValidation() ?? this.config.adcpVersion ?? ADCP_VERSION;
4440
+ let validationVersion = (serverVersion ?? this.lastKnownServerVersion) === "v2" ? "v2.5" : this.responseAdcpVersionForValidation() ?? this.config.adcpVersion ?? ADCP_VERSION;
4441
+ if (taskName === "get_adcp_capabilities" && validationVersion !== "v2.5") {
4442
+ validationVersion = resolveServedValidationVersion(response, validationVersion);
4443
+ }
4440
4444
  const normalizedResponse = this.normalizeResponseForValidation(response, taskName, validationVersion === "v2.5");
4441
4445
  const outcome = (this.config.experimentalIdentity33?.() || this.config.identity33SchemaExperiment && normalizedResponse && typeof normalizedResponse === "object" && isAdcpVersionAtLeast(normalizedResponse.adcp_version, "3.3")) && mode !== "off" ? validateIdentity33Payload(taskName, "response", normalizedResponse, validationVersion) : validateIncomingResponse(taskName, normalizedResponse, mode, void 0, validationVersion);
4442
4446
  if (outcome.valid) return { valid: true, errors: [] };
@@ -374,10 +374,15 @@ export declare class ProtocolFeatureUnsupportedError extends FeatureUnsupportedE
374
374
  }
375
375
  export declare function getClientPreflightAdcpError(error: unknown): ClientPreflightAdcpErrorInfo | undefined;
376
376
  /**
377
- * Error thrown when a response body exceeds the configured `maxResponseBytes`
378
- * cap on the transport. Surfaced when crawling untrusted agents (registries,
379
- * federated discovery layers) to prevent a hostile vendor from buffering a
380
- * large reply before schema validation runs.
377
+ * Error thrown when a response body exceeds the `maxResponseBytes` cap on the
378
+ * transport — 4 MiB by default on every MCP and A2A call path. It prevents a
379
+ * hostile or merely careless agent from buffering a large reply before schema
380
+ * validation runs.
381
+ *
382
+ * Raised on three paths: a declared `Content-Length` over the cap, a one-shot
383
+ * body that crosses the cap mid-stream, and a `text/event-stream` response
384
+ * whose single event exceeds the cap or whose cumulative octets exceed the
385
+ * call's stream budget. Nothing is truncated — the read fails.
381
386
  *
382
387
  * Recovery: `terminal` from the SDK's view — repeating the call against the
383
388
  * same agent will hit the same cap. The buyer's options are to widen the
@@ -374,10 +374,15 @@ export declare class ProtocolFeatureUnsupportedError extends FeatureUnsupportedE
374
374
  }
375
375
  export declare function getClientPreflightAdcpError(error: unknown): ClientPreflightAdcpErrorInfo | undefined;
376
376
  /**
377
- * Error thrown when a response body exceeds the configured `maxResponseBytes`
378
- * cap on the transport. Surfaced when crawling untrusted agents (registries,
379
- * federated discovery layers) to prevent a hostile vendor from buffering a
380
- * large reply before schema validation runs.
377
+ * Error thrown when a response body exceeds the `maxResponseBytes` cap on the
378
+ * transport — 4 MiB by default on every MCP and A2A call path. It prevents a
379
+ * hostile or merely careless agent from buffering a large reply before schema
380
+ * validation runs.
381
+ *
382
+ * Raised on three paths: a declared `Content-Length` over the cap, a one-shot
383
+ * body that crosses the cap mid-stream, and a `text/event-stream` response
384
+ * whose single event exceeds the cap or whose cumulative octets exceed the
385
+ * call's stream budget. Nothing is truncated — the read fails.
381
386
  *
382
387
  * Recovery: `terminal` from the SDK's view — repeating the call against the
383
388
  * same agent will hit the same cap. The buyer's options are to widen the
@@ -165,7 +165,7 @@ export { BrandJsonSchema, AdagentsJsonSchema } from './types/wellknown-schemas.g
165
165
  export type { PlacementPresentationDocument, PlacementPresentationReference } from './types/core.generated.mjs';
166
166
  export { PlacementPresentationDocumentSchema, PlacementPresentationReferenceSchema } from './types/schemas.generated.mjs';
167
167
  export type { Error as TaskErrorDetail } from './types/core.generated.mjs';
168
- export { STANDARD_ERROR_CODES, isStandardErrorCode, getErrorRecovery } from './types/error-codes.mjs';
168
+ export { STANDARD_ERROR_CODES, isStandardErrorCode, getErrorRecovery, DEFAULT_UNKNOWN_ERROR_RECOVERY, } from './types/error-codes.mjs';
169
169
  export type { StandardErrorCode, ErrorRecovery } from './types/error-codes.mjs';
170
170
  export { adcpError, legacyCapabilitiesResponse, legacyProductsResponse, legacyMediaBuyResponse, legacyDeliveryResponse, legacyListAccountsResponse, legacyListCreativeFormatsResponse, legacyUpdateMediaBuyResponse, legacyGetMediaBuysResponse, legacyPerformanceFeedbackResponse, legacyBuildCreativeResponse, legacyBuildCreativeMultiResponse, legacyPreviewCreativeResponse, legacyCreativeDeliveryResponse, legacyListCreativesResponse, legacyListPropertyListsResponse, legacyListCollectionListsResponse, legacyListContentStandardsResponse, legacyGetPlanAuditLogsResponse, legacySyncCreativesResponse, legacyGetSignalsResponse, legacyActivateSignalResponse, legacyCancelMediaBuyResponse, legacyAcquireRightsResponse, legacyAcquireRightsAcquired, legacyAcquireRightsPendingApproval, legacyAcquireRightsRejected, legacySyncAccountsResponse, legacySyncGovernanceResponse, legacyReportUsageResponse, validActionsForStatus, MEDIA_BUY_TRANSITIONS, CREATIVE_ASSET_TRANSITIONS, isLegalMediaBuyTransition, isLegalCreativeTransition, assertMediaBuyTransition, assertCreativeTransition, getAccountMode, isSandboxOrMockAccount, assertSandboxAccount, taskToolResponse, registerAdcpTaskTool, createTaskCapableServer, InMemoryTaskStore, isTerminal, serve, taskScopeFromPrincipal, UnknownHostError, hostname, resolveHost, verifyIntrospection, registerTestController, handleTestControllerRequest, TestControllerError, toMcpResponse, TOOL_INPUT_SHAPE, CONTROLLER_SCENARIOS, DISCOVERY_ARM_SCENARIOS, SEED_SCENARIOS, SESSION_ENTRY_CAP, enforceMapCap, createSeedFixtureCache, PostgresTaskStore, cleanupExpiredTasks, getMcpTasksMigration, MCP_TASKS_MIGRATION, ADCP_PRE_TRANSPORT, checkGovernance, governanceDeniedError, DEFAULT_REPORTING_CAPABILITIES, InMemoryStateStore, PostgresStateStore, getAdcpStateMigration, ADCP_STATE_MIGRATION, StateError, PatchConflictError, SESSION_KEY_FIELD, createSessionedStore, scopedStore, patchWithRetry, isPutIfMatchConflict, requireSessionKey, structuredSerialize, structuredDeserialize, createIdempotencyStore, memoryBackend, pgBackend, getIdempotencyMigration, IDEMPOTENCY_MIGRATION, cleanupExpiredIdempotency, redisBackend, createLazyBackend, hashPayload, IdempotencyClaimOwnershipError, getServeRequestContext, ADCP_SERVE_REQUEST_CONTEXT, createA2AAdapter, A2AInvocationError, MCP_APP_RESOURCE_MIME_TYPE, ADCP_MIRRORED_STRUCTURED_CONTENT_META_KEY, } from './server/index.mjs';
171
171
  export type { AdcpErrorOptions, AdcpErrorResponse, McpToolResponse, ValidAction, CancelMediaBuyInput, AdcpTaskToolConfig, TaskStore, TaskMessageQueue, CreateTaskOptions, ToolTaskHandler, CreateTaskRequestHandlerExtra, TaskRequestHandlerExtra, CreateTaskResult, GetTaskResult, Task, ServeContext, ServeOptions, PgQueryable, PostgresTaskStoreOptions, TestControllerStore, TestControllerStoreFactory, TestControllerStoreOrFactory, ControllerScenario, SeedScenario, SeedFixtureCache, SessionContext, OnInstructionsError, MaybePromise, LegacyAdcpServerConfig, LegacyAdcpToolMap, AdcpServerToolName, AdcpCapabilitiesConfig, LegacyAdcpCustomToolConfig, LegacyAdcpCustomToolHandler, LegacyAdcpCustomToolHandlerExtra, McpAppUiMeta, McpAppMeta, AdcpMcpResourceDefinition, McpAppResourceCsp, McpAppResourcePermissions, McpAppResourceUiMeta, McpAppResourceMeta, McpAppResourceReadContext, AdcpLogger, LegacyHandlerContext, LegacyMediaBuyHandlers, LegacySignalsHandlers, LegacyCreativeHandlers, LegacyGovernanceHandlers, LegacyAccountHandlers, LegacyEventTrackingHandlers, LegacySponsoredIntelligenceHandlers, SignedRequestsConfig, AdcpPreTransport, AdcpServer, AdcpServerTransport, AdcpTestRequest, AdcpTestToolsCallRequest, AdcpTestResponse, AdcpInvokeOptions, StructuredContentFallbackTransport, StructuredContentTextFallback, StructuredContentTextFallbackContext, CheckGovernanceOptions, GovernanceCallResult, GovernanceApproved, GovernanceDenied, GovernanceConditions, AdcpStateStore, ListOptions as StateListOptions, ListResult as StateListResult, PostgresStateStoreOptions, InMemoryStateStoreOptions, VersionedDocument, PutIfMatchResult, PatchWithRetryOptions, StateErrorCode, SessionKeyContext, IdempotencyStore, IdempotencyStoreConfig, IdempotencyBackend, IdempotencyCacheEntry, IdempotencyCheckResult, MemoryBackendOptions, PgBackendOptions, RedisBackendOptions, RedisBackendClient, RedisLikeClient, LazyBackendFactory, LazyBackendOptions, A2AAdapter, A2AAdapterOptions, A2AAgentCardOverrides, A2AAgentCapabilitiesOverride, A2AAgentSkillOverride, A2AMountOptions, ExpressAppLike, LegacyHttpSecurityScheme, LegacySecurityScheme, AccountMode, RequireCacheScopeWhenProducts, ServerPayload, GetProductsPayload, CreateMediaBuyPayload, UpdateMediaBuyPayload, GetMediaBuysPayload, GetMediaBuyDeliveryPayload, ListCreativesPayload, GetCreativeDeliveryPayload, CanonicalPreviewCreativePayload, PreviewCreativePayload, LegacyGetProductsPayload, LegacyCreateMediaBuyPayload, LegacyUpdateMediaBuyPayload, LegacyGetMediaBuysPayload, LegacyGetMediaBuyDeliveryPayload, LegacyListCreativesPayload, LegacyGetCreativeDeliveryPayload, LegacyListCreativeFormatsPayload, LegacyListCreativeFormatsResponsePayload, LegacyListCreativeFormatsServerPayload, LegacyBuildCreativePayload, LegacyBuildCreativeMultiPayload, LegacyBuildCreativeVariantPayload, LegacyPreviewCreativePayload, SyncCreativesPayload, SyncCreativesSuccessPayload, SyncCreativesErrorPayload, } from './server/index.mjs';
@@ -190,7 +190,7 @@ export { runAuthDiagnosis, AUTH_DIAGNOSIS_SCHEMA_VERSION, type DiagnoseOptions,
190
190
  export { NeedsAuthorizationError, discoverAuthorizationRequirements, hasValidatedMcpAuthorizationRequirements, createFileOAuthStorage, bindAgentStorage, getAgentStorage, unbindAgentStorage, type AuthorizationRequirements, type DiscoverAuthorizationOptions, type FileOAuthStorageOptions, } from './auth/oauth/index.mjs';
191
191
  export { exchangeClientCredentials, ensureClientCredentialsTokens, ClientCredentialsExchangeError, MissingEnvSecretError, resolveSecret, isEnvSecretReference, toEnvSecretReference, extractEnvSecretName, type ExchangeClientCredentialsOptions, type EnsureClientCredentialsOptions, type AgentOAuthClientCredentials, AgentOAuthClientCredentialsSchema, } from './auth/oauth/index.mjs';
192
192
  export { validateAgentUrl, validateAdCPResponse, getExpectedSchema, handleAdCPResponse } from './validation/index.mjs';
193
- export { ProtocolClient, callMCPTool, callA2ATool, createA2AClientFromCardUrl, createMCPClient, createA2AClient, closeMCPConnections, closeOAuthConnections, closeScopedConnections, withMCPConnectionScope, bundleSupportsAdcpVersionField, BODY_SNIPPET_TIMEOUT_MS, OBSERVER_FLUSH_TIMEOUT_MS, sanitizeTransportHeaders, sanitizeTransportUrl, } from './protocols/index.mjs';
193
+ export { ProtocolClient, callMCPTool, callA2ATool, createA2AClientFromCardUrl, createMCPClient, createA2AClient, closeMCPConnections, closeOAuthConnections, closeScopedConnections, withMCPConnectionScope, bundleSupportsAdcpVersionField, BODY_SNIPPET_TIMEOUT_MS, OBSERVER_FLUSH_TIMEOUT_MS, sanitizeTransportHeaders, sanitizeTransportUrl, DEFAULT_MAX_RESPONSE_BYTES, SSE_CUMULATIVE_BUDGET_MULTIPLIER, } from './protocols/index.mjs';
194
194
  export { toReleasePrecisionWire, validateAdcpVersionWire } from './validation/schema-loader.mjs';
195
195
  export type { CallToolOptions, TransportActivity, TransportActivityContext, TransportActivityHandler, TransportActivityType, TransportResponseOutcome, TransportOptions, A2ALegacyCompatOptions, } from './protocols/index.mjs';
196
196
  import { bundleSupportsAdcpVersionField as _isSupported } from './protocols/index.mjs';
@@ -261,7 +261,7 @@ export declare function createAdCPClient(agents?: AgentConfig[]): ADCPMultiAgent
261
261
  * @deprecated Use ADCPMultiAgentClient.fromEnv() instead
262
262
  */
263
263
  export declare function createAdCPClientFromEnv(): ADCPMultiAgentClient;
264
- export { SubstitutionObserver, SubstitutionEncoder, PreviewFetchError, MacroInRawValueError, CATALOG_MACRO_VECTORS, getCatalogMacroVector, extractTrackerUrls, matchBindings, assertRfc3986Safe, assertUnreservedOnly, assertNoNestedExpansion, assertSchemePreserved, DEFAULT_MACRO_PROHIBITED_PATTERN, enforceSsrfPolicy, enforceSsrfPolicyResolved, DEFAULT_SSRF_POLICY, encodeUnreserved, equalUnderHexCasePolicy, isUnreservedOnly, divergenceOffset, translateUniversalMacros, UnsafeNativeMappingError, compileUniversalMacroTemplate, } from './substitution/index.mjs';
264
+ export { SubstitutionObserver, SubstitutionEncoder, PreviewFetchError, MacroInRawValueError, CATALOG_MACRO_VECTORS, getCatalogMacroVector, extractTrackerUrls, matchBindings, assertRfc3986Safe, assertUnreservedOnly, assertNoNestedExpansion, assertSchemePreserved, DEFAULT_MACRO_PROHIBITED_PATTERN, enforceSsrfPolicy, enforceSsrfPolicyResolved, DEFAULT_SSRF_POLICY, encodeUnreserved, equalUnderHexCasePolicy, isUnreservedOnly, divergenceOffset, translateUniversalMacros, UnsafeNativeMappingError, MultipleVendorConsentMacrosError, compileUniversalMacroTemplate, } from './substitution/index.mjs';
265
265
  export type { ObserverFetchOptions, ObserverDispatcher, CatalogMacroVectorName, AssertionOptions as SubstitutionAssertionOptions, AssertionResult as SubstitutionAssertionResult, BindingMatch, CatalogBinding, CatalogMacroVector, PolicyResult as SubstitutionPolicyResult, SsrfPolicy, TrackerUrlRecord, MacroMapping, TranslateResult, BuiltInSourceMacroSyntax, CompileUniversalMacroTemplateInput, CompileUniversalMacroTemplateResult, CustomSourceMacroSyntax, MacroDocumentationReference, SourceMacroMapping, SourceMacroRequirement, SourceMacroRequirementSatisfaction, SourceMacroSyntax, SourceMacroSyntaxDeclaration, UniversalMacroCompileDiagnostic, UniversalMacroOccurrence, } from './substitution/index.mjs';
266
266
  export { testAgent, testAgentA2A, testAgentClient, createTestAgent, TEST_AGENT_TOKEN, TEST_AGENT_MCP_CONFIG, TEST_AGENT_A2A_CONFIG, testAgentNoAuth, testAgentNoAuthA2A, TEST_AGENT_NO_AUTH_MCP_CONFIG, TEST_AGENT_NO_AUTH_A2A_CONFIG, creativeAgent, testBrandRightsFlow, hasBrandRightsTools, expectControllerError, expectControllerSuccess, RateLimitTripObserver, RATE_LIMIT_TRIP_CONTRACT, RATE_LIMIT_TRIP_DEFAULT_REPLAY_MAX_WAIT_SECONDS, RATE_LIMIT_TRIP_MAX_ATTEMPTS_MAX, RATE_LIMIT_TRIP_MAX_ATTEMPTS_MIN, validateRateLimitTripSpec, } from './testing/index.mjs';
267
267
  export type { ControllerErrorWithDetail, TestClient, RateLimitTripSpec, RateLimitTripClient, RateLimitTripFailureCode, RateLimitTripObservation, RateLimitTripObserverOptions, RateLimitTripResponseSnapshot, RateLimitTripStructuredResult, RateLimitTripTaskOptions, } from './testing/index.mjs';
@@ -165,7 +165,7 @@ export { BrandJsonSchema, AdagentsJsonSchema } from './types/wellknown-schemas.g
165
165
  export type { PlacementPresentationDocument, PlacementPresentationReference } from './types/core.generated';
166
166
  export { PlacementPresentationDocumentSchema, PlacementPresentationReferenceSchema } from './types/schemas.generated';
167
167
  export type { Error as TaskErrorDetail } from './types/core.generated';
168
- export { STANDARD_ERROR_CODES, isStandardErrorCode, getErrorRecovery } from './types/error-codes';
168
+ export { STANDARD_ERROR_CODES, isStandardErrorCode, getErrorRecovery, DEFAULT_UNKNOWN_ERROR_RECOVERY, } from './types/error-codes';
169
169
  export type { StandardErrorCode, ErrorRecovery } from './types/error-codes';
170
170
  export { adcpError, legacyCapabilitiesResponse, legacyProductsResponse, legacyMediaBuyResponse, legacyDeliveryResponse, legacyListAccountsResponse, legacyListCreativeFormatsResponse, legacyUpdateMediaBuyResponse, legacyGetMediaBuysResponse, legacyPerformanceFeedbackResponse, legacyBuildCreativeResponse, legacyBuildCreativeMultiResponse, legacyPreviewCreativeResponse, legacyCreativeDeliveryResponse, legacyListCreativesResponse, legacyListPropertyListsResponse, legacyListCollectionListsResponse, legacyListContentStandardsResponse, legacyGetPlanAuditLogsResponse, legacySyncCreativesResponse, legacyGetSignalsResponse, legacyActivateSignalResponse, legacyCancelMediaBuyResponse, legacyAcquireRightsResponse, legacyAcquireRightsAcquired, legacyAcquireRightsPendingApproval, legacyAcquireRightsRejected, legacySyncAccountsResponse, legacySyncGovernanceResponse, legacyReportUsageResponse, validActionsForStatus, MEDIA_BUY_TRANSITIONS, CREATIVE_ASSET_TRANSITIONS, isLegalMediaBuyTransition, isLegalCreativeTransition, assertMediaBuyTransition, assertCreativeTransition, getAccountMode, isSandboxOrMockAccount, assertSandboxAccount, taskToolResponse, registerAdcpTaskTool, createTaskCapableServer, InMemoryTaskStore, isTerminal, serve, taskScopeFromPrincipal, UnknownHostError, hostname, resolveHost, verifyIntrospection, registerTestController, handleTestControllerRequest, TestControllerError, toMcpResponse, TOOL_INPUT_SHAPE, CONTROLLER_SCENARIOS, DISCOVERY_ARM_SCENARIOS, SEED_SCENARIOS, SESSION_ENTRY_CAP, enforceMapCap, createSeedFixtureCache, PostgresTaskStore, cleanupExpiredTasks, getMcpTasksMigration, MCP_TASKS_MIGRATION, ADCP_PRE_TRANSPORT, checkGovernance, governanceDeniedError, DEFAULT_REPORTING_CAPABILITIES, InMemoryStateStore, PostgresStateStore, getAdcpStateMigration, ADCP_STATE_MIGRATION, StateError, PatchConflictError, SESSION_KEY_FIELD, createSessionedStore, scopedStore, patchWithRetry, isPutIfMatchConflict, requireSessionKey, structuredSerialize, structuredDeserialize, createIdempotencyStore, memoryBackend, pgBackend, getIdempotencyMigration, IDEMPOTENCY_MIGRATION, cleanupExpiredIdempotency, redisBackend, createLazyBackend, hashPayload, IdempotencyClaimOwnershipError, getServeRequestContext, ADCP_SERVE_REQUEST_CONTEXT, createA2AAdapter, A2AInvocationError, MCP_APP_RESOURCE_MIME_TYPE, ADCP_MIRRORED_STRUCTURED_CONTENT_META_KEY, } from './server';
171
171
  export type { AdcpErrorOptions, AdcpErrorResponse, McpToolResponse, ValidAction, CancelMediaBuyInput, AdcpTaskToolConfig, TaskStore, TaskMessageQueue, CreateTaskOptions, ToolTaskHandler, CreateTaskRequestHandlerExtra, TaskRequestHandlerExtra, CreateTaskResult, GetTaskResult, Task, ServeContext, ServeOptions, PgQueryable, PostgresTaskStoreOptions, TestControllerStore, TestControllerStoreFactory, TestControllerStoreOrFactory, ControllerScenario, SeedScenario, SeedFixtureCache, SessionContext, OnInstructionsError, MaybePromise, LegacyAdcpServerConfig, LegacyAdcpToolMap, AdcpServerToolName, AdcpCapabilitiesConfig, LegacyAdcpCustomToolConfig, LegacyAdcpCustomToolHandler, LegacyAdcpCustomToolHandlerExtra, McpAppUiMeta, McpAppMeta, AdcpMcpResourceDefinition, McpAppResourceCsp, McpAppResourcePermissions, McpAppResourceUiMeta, McpAppResourceMeta, McpAppResourceReadContext, AdcpLogger, LegacyHandlerContext, LegacyMediaBuyHandlers, LegacySignalsHandlers, LegacyCreativeHandlers, LegacyGovernanceHandlers, LegacyAccountHandlers, LegacyEventTrackingHandlers, LegacySponsoredIntelligenceHandlers, SignedRequestsConfig, AdcpPreTransport, AdcpServer, AdcpServerTransport, AdcpTestRequest, AdcpTestToolsCallRequest, AdcpTestResponse, AdcpInvokeOptions, StructuredContentFallbackTransport, StructuredContentTextFallback, StructuredContentTextFallbackContext, CheckGovernanceOptions, GovernanceCallResult, GovernanceApproved, GovernanceDenied, GovernanceConditions, AdcpStateStore, ListOptions as StateListOptions, ListResult as StateListResult, PostgresStateStoreOptions, InMemoryStateStoreOptions, VersionedDocument, PutIfMatchResult, PatchWithRetryOptions, StateErrorCode, SessionKeyContext, IdempotencyStore, IdempotencyStoreConfig, IdempotencyBackend, IdempotencyCacheEntry, IdempotencyCheckResult, MemoryBackendOptions, PgBackendOptions, RedisBackendOptions, RedisBackendClient, RedisLikeClient, LazyBackendFactory, LazyBackendOptions, A2AAdapter, A2AAdapterOptions, A2AAgentCardOverrides, A2AAgentCapabilitiesOverride, A2AAgentSkillOverride, A2AMountOptions, ExpressAppLike, LegacyHttpSecurityScheme, LegacySecurityScheme, AccountMode, RequireCacheScopeWhenProducts, ServerPayload, GetProductsPayload, CreateMediaBuyPayload, UpdateMediaBuyPayload, GetMediaBuysPayload, GetMediaBuyDeliveryPayload, ListCreativesPayload, GetCreativeDeliveryPayload, CanonicalPreviewCreativePayload, PreviewCreativePayload, LegacyGetProductsPayload, LegacyCreateMediaBuyPayload, LegacyUpdateMediaBuyPayload, LegacyGetMediaBuysPayload, LegacyGetMediaBuyDeliveryPayload, LegacyListCreativesPayload, LegacyGetCreativeDeliveryPayload, LegacyListCreativeFormatsPayload, LegacyListCreativeFormatsResponsePayload, LegacyListCreativeFormatsServerPayload, LegacyBuildCreativePayload, LegacyBuildCreativeMultiPayload, LegacyBuildCreativeVariantPayload, LegacyPreviewCreativePayload, SyncCreativesPayload, SyncCreativesSuccessPayload, SyncCreativesErrorPayload, } from './server';
@@ -190,7 +190,7 @@ export { runAuthDiagnosis, AUTH_DIAGNOSIS_SCHEMA_VERSION, type DiagnoseOptions,
190
190
  export { NeedsAuthorizationError, discoverAuthorizationRequirements, hasValidatedMcpAuthorizationRequirements, createFileOAuthStorage, bindAgentStorage, getAgentStorage, unbindAgentStorage, type AuthorizationRequirements, type DiscoverAuthorizationOptions, type FileOAuthStorageOptions, } from './auth/oauth';
191
191
  export { exchangeClientCredentials, ensureClientCredentialsTokens, ClientCredentialsExchangeError, MissingEnvSecretError, resolveSecret, isEnvSecretReference, toEnvSecretReference, extractEnvSecretName, type ExchangeClientCredentialsOptions, type EnsureClientCredentialsOptions, type AgentOAuthClientCredentials, AgentOAuthClientCredentialsSchema, } from './auth/oauth';
192
192
  export { validateAgentUrl, validateAdCPResponse, getExpectedSchema, handleAdCPResponse } from './validation';
193
- export { ProtocolClient, callMCPTool, callA2ATool, createA2AClientFromCardUrl, createMCPClient, createA2AClient, closeMCPConnections, closeOAuthConnections, closeScopedConnections, withMCPConnectionScope, bundleSupportsAdcpVersionField, BODY_SNIPPET_TIMEOUT_MS, OBSERVER_FLUSH_TIMEOUT_MS, sanitizeTransportHeaders, sanitizeTransportUrl, } from './protocols';
193
+ export { ProtocolClient, callMCPTool, callA2ATool, createA2AClientFromCardUrl, createMCPClient, createA2AClient, closeMCPConnections, closeOAuthConnections, closeScopedConnections, withMCPConnectionScope, bundleSupportsAdcpVersionField, BODY_SNIPPET_TIMEOUT_MS, OBSERVER_FLUSH_TIMEOUT_MS, sanitizeTransportHeaders, sanitizeTransportUrl, DEFAULT_MAX_RESPONSE_BYTES, SSE_CUMULATIVE_BUDGET_MULTIPLIER, } from './protocols';
194
194
  export { toReleasePrecisionWire, validateAdcpVersionWire } from './validation/schema-loader';
195
195
  export type { CallToolOptions, TransportActivity, TransportActivityContext, TransportActivityHandler, TransportActivityType, TransportResponseOutcome, TransportOptions, A2ALegacyCompatOptions, } from './protocols';
196
196
  import { bundleSupportsAdcpVersionField as _isSupported } from './protocols';
@@ -261,7 +261,7 @@ export declare function createAdCPClient(agents?: AgentConfig[]): ADCPMultiAgent
261
261
  * @deprecated Use ADCPMultiAgentClient.fromEnv() instead
262
262
  */
263
263
  export declare function createAdCPClientFromEnv(): ADCPMultiAgentClient;
264
- export { SubstitutionObserver, SubstitutionEncoder, PreviewFetchError, MacroInRawValueError, CATALOG_MACRO_VECTORS, getCatalogMacroVector, extractTrackerUrls, matchBindings, assertRfc3986Safe, assertUnreservedOnly, assertNoNestedExpansion, assertSchemePreserved, DEFAULT_MACRO_PROHIBITED_PATTERN, enforceSsrfPolicy, enforceSsrfPolicyResolved, DEFAULT_SSRF_POLICY, encodeUnreserved, equalUnderHexCasePolicy, isUnreservedOnly, divergenceOffset, translateUniversalMacros, UnsafeNativeMappingError, compileUniversalMacroTemplate, } from './substitution';
264
+ export { SubstitutionObserver, SubstitutionEncoder, PreviewFetchError, MacroInRawValueError, CATALOG_MACRO_VECTORS, getCatalogMacroVector, extractTrackerUrls, matchBindings, assertRfc3986Safe, assertUnreservedOnly, assertNoNestedExpansion, assertSchemePreserved, DEFAULT_MACRO_PROHIBITED_PATTERN, enforceSsrfPolicy, enforceSsrfPolicyResolved, DEFAULT_SSRF_POLICY, encodeUnreserved, equalUnderHexCasePolicy, isUnreservedOnly, divergenceOffset, translateUniversalMacros, UnsafeNativeMappingError, MultipleVendorConsentMacrosError, compileUniversalMacroTemplate, } from './substitution';
265
265
  export type { ObserverFetchOptions, ObserverDispatcher, CatalogMacroVectorName, AssertionOptions as SubstitutionAssertionOptions, AssertionResult as SubstitutionAssertionResult, BindingMatch, CatalogBinding, CatalogMacroVector, PolicyResult as SubstitutionPolicyResult, SsrfPolicy, TrackerUrlRecord, MacroMapping, TranslateResult, BuiltInSourceMacroSyntax, CompileUniversalMacroTemplateInput, CompileUniversalMacroTemplateResult, CustomSourceMacroSyntax, MacroDocumentationReference, SourceMacroMapping, SourceMacroRequirement, SourceMacroRequirementSatisfaction, SourceMacroSyntax, SourceMacroSyntaxDeclaration, UniversalMacroCompileDiagnostic, UniversalMacroOccurrence, } from './substitution';
266
266
  export { testAgent, testAgentA2A, testAgentClient, createTestAgent, TEST_AGENT_TOKEN, TEST_AGENT_MCP_CONFIG, TEST_AGENT_A2A_CONFIG, testAgentNoAuth, testAgentNoAuthA2A, TEST_AGENT_NO_AUTH_MCP_CONFIG, TEST_AGENT_NO_AUTH_A2A_CONFIG, creativeAgent, testBrandRightsFlow, hasBrandRightsTools, expectControllerError, expectControllerSuccess, RateLimitTripObserver, RATE_LIMIT_TRIP_CONTRACT, RATE_LIMIT_TRIP_DEFAULT_REPLAY_MAX_WAIT_SECONDS, RATE_LIMIT_TRIP_MAX_ATTEMPTS_MAX, RATE_LIMIT_TRIP_MAX_ATTEMPTS_MIN, validateRateLimitTripSpec, } from './testing/index';
267
267
  export type { ControllerErrorWithDetail, TestClient, RateLimitTripSpec, RateLimitTripClient, RateLimitTripFailureCode, RateLimitTripObservation, RateLimitTripObserverOptions, RateLimitTripResponseSnapshot, RateLimitTripStructuredResult, RateLimitTripTaskOptions, } from './testing/index';
package/dist/lib/index.js CHANGED
@@ -75,9 +75,11 @@ __export(index_exports, {
75
75
  CreativeFormatCapabilityError: () => import_projection2.CreativeFormatCapabilityError,
76
76
  CreativeFormatProjectionError: () => import_projection2.CreativeFormatProjectionError,
77
77
  DEFAULT_MACRO_PROHIBITED_PATTERN: () => import_substitution.DEFAULT_MACRO_PROHIBITED_PATTERN,
78
+ DEFAULT_MAX_RESPONSE_BYTES: () => import_protocols.DEFAULT_MAX_RESPONSE_BYTES,
78
79
  DEFAULT_MAX_SSE_FRAME_BYTES: () => import_registry2.DEFAULT_MAX_SSE_FRAME_BYTES,
79
80
  DEFAULT_REPORTING_CAPABILITIES: () => import_server.DEFAULT_REPORTING_CAPABILITIES,
80
81
  DEFAULT_SSRF_POLICY: () => import_substitution.DEFAULT_SSRF_POLICY,
82
+ DEFAULT_UNKNOWN_ERROR_RECOVERY: () => import_error_codes.DEFAULT_UNKNOWN_ERROR_RECOVERY,
81
83
  DISCOVERY_ARM_SCENARIOS: () => import_server.DISCOVERY_ARM_SCENARIOS,
82
84
  DeferredSettlementOwnershipError: () => import_TaskExecutor.DeferredSettlementOwnershipError,
83
85
  DeferredTaskError: () => import_errors.DeferredTaskError,
@@ -141,6 +143,7 @@ __export(index_exports, {
141
143
  MemoryStorage: () => import_MemoryStorage.MemoryStorage,
142
144
  MissingEnvSecretError: () => import_oauth4.MissingEnvSecretError,
143
145
  MissingInputHandlerError: () => import_errors.MissingInputHandlerError,
146
+ MultipleVendorConsentMacrosError: () => import_substitution.MultipleVendorConsentMacrosError,
144
147
  NeedsAuthorizationError: () => import_oauth3.NeedsAuthorizationError,
145
148
  NetworkConsistencyChecker: () => import_network_consistency_checker.NetworkConsistencyChecker,
146
149
  OBSERVER_FLUSH_TIMEOUT_MS: () => import_protocols.OBSERVER_FLUSH_TIMEOUT_MS,
@@ -183,6 +186,7 @@ __export(index_exports, {
183
186
  SIErrorCodes: () => import_adapters.SIErrorCodes,
184
187
  SIGNALS_TOOLS: () => import_capabilities.SIGNALS_TOOLS,
185
188
  SISessionManager: () => import_adapters.SISessionManager,
189
+ SSE_CUMULATIVE_BUDGET_MULTIPLIER: () => import_protocols.SSE_CUMULATIVE_BUDGET_MULTIPLIER,
186
190
  SSRF_TRANSIENT_CODES: () => import_net.SSRF_TRANSIENT_CODES,
187
191
  STANDARD_CREATIVE_AGENTS: () => import_CreativeAgentClient.STANDARD_CREATIVE_AGENTS,
188
192
  STANDARD_ERROR_CODES: () => import_error_codes.STANDARD_ERROR_CODES,
@@ -921,9 +925,11 @@ function createAdCPClientFromEnv() {
921
925
  CreativeFormatCapabilityError,
922
926
  CreativeFormatProjectionError,
923
927
  DEFAULT_MACRO_PROHIBITED_PATTERN,
928
+ DEFAULT_MAX_RESPONSE_BYTES,
924
929
  DEFAULT_MAX_SSE_FRAME_BYTES,
925
930
  DEFAULT_REPORTING_CAPABILITIES,
926
931
  DEFAULT_SSRF_POLICY,
932
+ DEFAULT_UNKNOWN_ERROR_RECOVERY,
927
933
  DISCOVERY_ARM_SCENARIOS,
928
934
  DeferredSettlementOwnershipError,
929
935
  DeferredTaskError,
@@ -987,6 +993,7 @@ function createAdCPClientFromEnv() {
987
993
  MemoryStorage,
988
994
  MissingEnvSecretError,
989
995
  MissingInputHandlerError,
996
+ MultipleVendorConsentMacrosError,
990
997
  NeedsAuthorizationError,
991
998
  NetworkConsistencyChecker,
992
999
  OBSERVER_FLUSH_TIMEOUT_MS,
@@ -1029,6 +1036,7 @@ function createAdCPClientFromEnv() {
1029
1036
  SIErrorCodes,
1030
1037
  SIGNALS_TOOLS,
1031
1038
  SISessionManager,
1039
+ SSE_CUMULATIVE_BUDGET_MULTIPLIER,
1032
1040
  SSRF_TRANSIENT_CODES,
1033
1041
  STANDARD_CREATIVE_AGENTS,
1034
1042
  STANDARD_ERROR_CODES,