@adcp/sdk 16.0.0-beta.1 → 16.0.0-beta.3

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 (155) hide show
  1. package/README.md +54 -0
  2. package/dist/lib/core/ConversationTypes.d.mts +8 -3
  3. package/dist/lib/core/ConversationTypes.d.ts +8 -3
  4. package/dist/lib/core/SingleAgentClient.d.mts +15 -4
  5. package/dist/lib/core/SingleAgentClient.d.ts +15 -4
  6. package/dist/lib/core/SingleAgentClient.js +29 -8
  7. package/dist/lib/core/SingleAgentClient.mjs +29 -8
  8. package/dist/lib/core/TaskExecutor.js +5 -1
  9. package/dist/lib/core/TaskExecutor.mjs +5 -1
  10. package/dist/lib/errors/index.d.mts +9 -4
  11. package/dist/lib/errors/index.d.ts +9 -4
  12. package/dist/lib/identity-3.3/generated-compat.d.mts +34 -0
  13. package/dist/lib/identity-3.3/generated-compat.d.ts +34 -0
  14. package/dist/lib/identity-3.3/generated-compat.js +16 -0
  15. package/dist/lib/identity-3.3/generated-compat.mjs +0 -0
  16. package/dist/lib/identity-3.3/index.d.mts +2 -2
  17. package/dist/lib/identity-3.3/index.d.ts +2 -2
  18. package/dist/lib/identity-3.3/index.js +4 -0
  19. package/dist/lib/identity-3.3/index.mjs +5 -1
  20. package/dist/lib/identity-3.3/lifecycle.d.mts +17 -5
  21. package/dist/lib/identity-3.3/lifecycle.d.ts +17 -5
  22. package/dist/lib/identity-3.3/lifecycle.js +32 -5
  23. package/dist/lib/identity-3.3/lifecycle.mjs +38 -6
  24. package/dist/lib/identity-3.3/revocation.d.mts +39 -3
  25. package/dist/lib/identity-3.3/revocation.d.ts +39 -3
  26. package/dist/lib/identity-3.3/revocation.js +88 -18
  27. package/dist/lib/identity-3.3/revocation.mjs +89 -19
  28. package/dist/lib/identity-3.3/server.d.mts +12 -0
  29. package/dist/lib/identity-3.3/server.d.ts +12 -0
  30. package/dist/lib/identity-3.3/server.js +103 -43
  31. package/dist/lib/identity-3.3/server.mjs +111 -45
  32. package/dist/lib/identity-3.3/trust.d.mts +62 -1
  33. package/dist/lib/identity-3.3/trust.d.ts +62 -1
  34. package/dist/lib/identity-3.3/trust.js +126 -21
  35. package/dist/lib/identity-3.3/trust.mjs +124 -21
  36. package/dist/lib/identity-3.3/types.d.mts +39 -11
  37. package/dist/lib/identity-3.3/types.d.ts +39 -11
  38. package/dist/lib/index.d.mts +3 -3
  39. package/dist/lib/index.d.ts +3 -3
  40. package/dist/lib/index.js +8 -0
  41. package/dist/lib/index.mjs +9 -1
  42. package/dist/lib/negotiation/types.d.mts +20 -39
  43. package/dist/lib/negotiation/types.d.ts +20 -39
  44. package/dist/lib/protocols/index.d.mts +61 -25
  45. package/dist/lib/protocols/index.d.ts +61 -25
  46. package/dist/lib/protocols/index.js +11 -6
  47. package/dist/lib/protocols/index.mjs +5 -2
  48. package/dist/lib/protocols/mcp-modern.js +1 -0
  49. package/dist/lib/protocols/mcp-modern.mjs +2 -1
  50. package/dist/lib/protocols/mcp.js +1 -0
  51. package/dist/lib/protocols/mcp.mjs +2 -1
  52. package/dist/lib/protocols/responseSizeLimit.d.mts +91 -5
  53. package/dist/lib/protocols/responseSizeLimit.d.ts +91 -5
  54. package/dist/lib/protocols/responseSizeLimit.js +195 -31
  55. package/dist/lib/protocols/responseSizeLimit.mjs +192 -31
  56. package/dist/lib/reporting/bigquery/index.js +8 -0
  57. package/dist/lib/reporting/bigquery/index.mjs +8 -0
  58. package/dist/lib/schemas-data/v2.5/_provenance.json +1 -1
  59. package/dist/lib/server/auth-signature.d.mts +6 -1
  60. package/dist/lib/server/auth-signature.d.ts +6 -1
  61. package/dist/lib/server/auth-signature.js +24 -13
  62. package/dist/lib/server/auth-signature.mjs +29 -13
  63. package/dist/lib/server/auth.d.mts +2 -2
  64. package/dist/lib/server/auth.d.ts +2 -2
  65. package/dist/lib/server/create-adcp-server.js +31 -10
  66. package/dist/lib/server/create-adcp-server.mjs +37 -11
  67. package/dist/lib/signing/crypto.d.mts +15 -0
  68. package/dist/lib/signing/crypto.d.ts +15 -0
  69. package/dist/lib/signing/crypto.js +83 -3
  70. package/dist/lib/signing/crypto.mjs +86 -3
  71. package/dist/lib/signing/fetch-async.js +1 -1
  72. package/dist/lib/signing/fetch-async.mjs +1 -1
  73. package/dist/lib/signing/fetch.js +1 -1
  74. package/dist/lib/signing/fetch.mjs +1 -1
  75. package/dist/lib/signing/middleware.js +9 -0
  76. package/dist/lib/signing/middleware.mjs +14 -0
  77. package/dist/lib/signing/parser.d.mts +8 -5
  78. package/dist/lib/signing/parser.d.ts +8 -5
  79. package/dist/lib/signing/parser.js +77 -61
  80. package/dist/lib/signing/parser.mjs +77 -61
  81. package/dist/lib/signing/revocation.js +3 -0
  82. package/dist/lib/signing/revocation.mjs +3 -0
  83. package/dist/lib/signing/server.d.mts +1 -1
  84. package/dist/lib/signing/server.d.ts +1 -1
  85. package/dist/lib/signing/server.js +2 -0
  86. package/dist/lib/signing/server.mjs +2 -1
  87. package/dist/lib/signing/signer.js +2 -8
  88. package/dist/lib/signing/signer.mjs +3 -9
  89. package/dist/lib/signing/testing.js +2 -6
  90. package/dist/lib/signing/testing.mjs +3 -7
  91. package/dist/lib/signing/verifier.js +3 -3
  92. package/dist/lib/signing/verifier.mjs +4 -4
  93. package/dist/lib/signing/web-bot-auth.d.mts +84 -10
  94. package/dist/lib/signing/web-bot-auth.d.ts +84 -10
  95. package/dist/lib/signing/web-bot-auth.js +278 -88
  96. package/dist/lib/signing/web-bot-auth.mjs +279 -94
  97. package/dist/lib/signing/webhook-verifier.js +3 -3
  98. package/dist/lib/signing/webhook-verifier.mjs +4 -4
  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/request-signing/builder.js +2 -5
  118. package/dist/lib/testing/storyboard/request-signing/builder.mjs +3 -6
  119. package/dist/lib/testing/storyboard/signer-grader/grader.js +2 -7
  120. package/dist/lib/testing/storyboard/signer-grader/grader.mjs +2 -7
  121. package/dist/lib/testing/storyboard/validations.d.mts +1 -1
  122. package/dist/lib/testing/storyboard/validations.d.ts +1 -1
  123. package/dist/lib/types/enums.generated.d.mts +3 -0
  124. package/dist/lib/types/enums.generated.d.ts +3 -0
  125. package/dist/lib/types/enums.generated.js +9 -0
  126. package/dist/lib/types/enums.generated.mjs +6 -0
  127. package/dist/lib/v2/projection/catalog-snapshot.js +3 -1
  128. package/dist/lib/v2/projection/catalog-snapshot.mjs +3 -1
  129. package/dist/lib/v2/projection/creative-delivery.d.mts +31 -9
  130. package/dist/lib/v2/projection/creative-delivery.d.ts +31 -9
  131. package/dist/lib/v2/projection/index.d.mts +1 -1
  132. package/dist/lib/v2/projection/index.d.ts +1 -1
  133. package/dist/lib/v2/projection/index.js +2 -0
  134. package/dist/lib/v2/projection/index.mjs +2 -0
  135. package/dist/lib/v2/projection/legacy-routes.d.mts +10 -0
  136. package/dist/lib/v2/projection/legacy-routes.d.ts +10 -0
  137. package/dist/lib/v2/projection/legacy-routes.js +7 -0
  138. package/dist/lib/v2/projection/legacy-routes.mjs +6 -0
  139. package/dist/lib/validation/schema-loader.js +25 -0
  140. package/dist/lib/validation/schema-loader.mjs +24 -0
  141. package/dist/lib/version.d.mts +3 -3
  142. package/dist/lib/version.d.ts +3 -3
  143. package/dist/lib/version.js +3 -3
  144. package/dist/lib/version.mjs +3 -3
  145. package/docs/TYPE-SUMMARY.md +7 -2
  146. package/docs/guides/DISCOVERY-CACHE-AND-SESSION-REUSE.md +3 -2
  147. package/docs/guides/REPORTING-LEDGER.md +15 -5
  148. package/docs/guides/REPORTING-OPERATIONS.md +17 -11
  149. package/docs/guides/UNIVERSAL-MACRO-COMPILATION.md +38 -0
  150. package/docs/guides/VALIDATE-YOUR-AGENT.md +12 -0
  151. package/docs/llms.txt +2 -2
  152. package/docs/migration-12-to-13.md +8 -0
  153. package/docs/migration-14.x-rc-worksheet.md +4 -4
  154. package/docs/migration-agent-identity-3.3.md +150 -11
  155. package/package.json +4 -1
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
@@ -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
  }
@@ -98,7 +98,16 @@ export type WebhookParseErrorCode = WebhookSignatureErrorCode | 'webhook_signatu
98
98
  export interface WebhookVerificationConfig {
99
99
  webBotAuth?: {
100
100
  directory: import('../signing/web-bot-auth.mjs').SignatureDirectoryResolver;
101
- isRevoked: (origin: string, keyid: string) => Promise<boolean>;
101
+ /**
102
+ * Seller origin revocation, checked after verification. A revoked key is
103
+ * refused; unknown status is retryable; a seller that serves no list is
104
+ * accepted (webhooks do not spend). Usually an `OriginRevocationResolver`.
105
+ */
106
+ revocation?: {
107
+ status(origin: string, keyid: string): Promise<import('../identity-3.3/revocation.mjs').OriginRevocationStatus>;
108
+ };
109
+ /** @deprecated Use `revocation`. Conservative: a seller that serves no list is refused. */
110
+ isRevoked?: (origin: string, keyid: string) => Promise<boolean>;
102
111
  };
103
112
  /** Applicable pins from persisted media-buy records. Reuse refresh callbacks bound to the seller/publisher/tenant across deliveries to share their cooldown. Never use webhook payload fields. */
104
113
  publisherPins?: (registration: Readonly<WebhookRegistration>) => Promise<readonly import('../signing/publisher-pins.mjs').PublisherSigningKeyPin[]>;
@@ -486,9 +495,11 @@ export interface SingleAgentClientConfig extends ConversationConfig {
486
495
  * Transport-level safeguards. Applies to every call this client dispatches
487
496
  * unless overridden at call time.
488
497
  *
489
- * Set `maxResponseBytes` when crawling untrusted agents (registries,
490
- * federated discovery layers) to prevent a hostile vendor from buffering
491
- * 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
492
503
  * `requestTimeoutMs` to override the default 60s cap on A2A agent-card
493
504
  * discovery; use `0` to disable the SDK-imposed discovery timeout.
494
505
  */
@@ -98,7 +98,16 @@ export type WebhookParseErrorCode = WebhookSignatureErrorCode | 'webhook_signatu
98
98
  export interface WebhookVerificationConfig {
99
99
  webBotAuth?: {
100
100
  directory: import('../signing/web-bot-auth').SignatureDirectoryResolver;
101
- isRevoked: (origin: string, keyid: string) => Promise<boolean>;
101
+ /**
102
+ * Seller origin revocation, checked after verification. A revoked key is
103
+ * refused; unknown status is retryable; a seller that serves no list is
104
+ * accepted (webhooks do not spend). Usually an `OriginRevocationResolver`.
105
+ */
106
+ revocation?: {
107
+ status(origin: string, keyid: string): Promise<import('../identity-3.3/revocation').OriginRevocationStatus>;
108
+ };
109
+ /** @deprecated Use `revocation`. Conservative: a seller that serves no list is refused. */
110
+ isRevoked?: (origin: string, keyid: string) => Promise<boolean>;
102
111
  };
103
112
  /** Applicable pins from persisted media-buy records. Reuse refresh callbacks bound to the seller/publisher/tenant across deliveries to share their cooldown. Never use webhook payload fields. */
104
113
  publisherPins?: (registration: Readonly<WebhookRegistration>) => Promise<readonly import('../signing/publisher-pins').PublisherSigningKeyPin[]>;
@@ -486,9 +495,11 @@ export interface SingleAgentClientConfig extends ConversationConfig {
486
495
  * Transport-level safeguards. Applies to every call this client dispatches
487
496
  * unless overridden at call time.
488
497
  *
489
- * Set `maxResponseBytes` when crawling untrusted agents (registries,
490
- * federated discovery layers) to prevent a hostile vendor from buffering
491
- * 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
492
503
  * `requestTimeoutMs` to override the default 60s cap on A2A agent-card
493
504
  * discovery; use `0` to disable the SDK-imposed discovery timeout.
494
505
  */
@@ -2450,7 +2450,7 @@ Hint: this usually means agent_uri does not include the MCP endpoint path. The S
2450
2450
  }
2451
2451
  }
2452
2452
  if (registration?.mode === "rfc9421") {
2453
- const { verifyWebBotAuth, selectSignatureProfile, WebBotAuthError } = loadWebBotAuth();
2453
+ const { verifyWebBotAuth, selectSignatureProfile, WebBotAuthError, WebBotAuthUnavailableError } = loadWebBotAuth();
2454
2454
  const requestMethod = options.requestMethod;
2455
2455
  const requestUrl = options.requestUrl;
2456
2456
  if (rawBody === void 0 || !options.headers || !trustedOperationId || !requestMethod || !requestUrl) {
@@ -2474,17 +2474,30 @@ Hint: this usually means agent_uri does not include the MCP endpoint path. The S
2474
2474
  method: requestMethod,
2475
2475
  url: requestUrl,
2476
2476
  headers: normalizedHeaders.headers,
2477
- body: typeof rawBody === "string" ? rawBody : new TextDecoder("utf-8", { fatal: true }).decode(rawBody)
2477
+ body: typeof rawBody === "string" ? rawBody : (
2478
+ // ignoreBOM: Content-Digest covers the exact received bytes.
2479
+ new TextDecoder("utf-8", { fatal: true, ignoreBOM: true }).decode(rawBody)
2480
+ )
2478
2481
  },
2479
2482
  {
2480
2483
  directory: config.directory,
2481
2484
  replayStore: this.webhookReplayStore,
2482
- isRevoked: config.isRevoked,
2485
+ ...config.isRevoked && !config.revocation && { isRevoked: config.isRevoked },
2483
2486
  now: this.config.webhookVerification?.now
2484
2487
  }
2485
2488
  );
2486
2489
  if (signers.length !== 1 || signers[0].origin !== (0, import_canonicalize.canonicalAgentOrigin)(registration.agentUrl))
2487
2490
  throw new WebBotAuthError(403, "webhook_signer_mismatch");
2491
+ if (config.revocation) {
2492
+ let status;
2493
+ try {
2494
+ status = await config.revocation.status(signers[0].origin, signers[0].keyid);
2495
+ } catch (error) {
2496
+ throw new WebBotAuthUnavailableError("revocation_persistence_failed", error);
2497
+ }
2498
+ if (status === "revoked") throw new WebBotAuthError(403, "key_revoked");
2499
+ if (status === "unknown") throw new WebBotAuthError(403, "identity_unverified");
2500
+ } else if (!config.isRevoked) throw new WebBotAuthError(403, "webhook_revocation_not_configured");
2488
2501
  } else {
2489
2502
  if (actualProfile === "web-bot-auth") throw new WebBotAuthError(403, "webhook_profile_mismatch");
2490
2503
  const delegatedOperatorAuthorization = this.delegatedOperatorAuthorizationForRegistration(registration);
@@ -2510,14 +2523,17 @@ Hint: this usually means agent_uri does not include the MCP endpoint path. The S
2510
2523
  );
2511
2524
  }
2512
2525
  } catch (cause) {
2526
+ if (cause instanceof WebBotAuthUnavailableError)
2527
+ return { ok: false, code: "webhook_verification_unavailable", message: cause.message, cause };
2513
2528
  if (cause instanceof WebBotAuthError)
2514
2529
  return {
2515
2530
  ok: false,
2516
2531
  code: [
2517
2532
  "directory_unavailable",
2518
- "revocation_unavailable",
2519
- "verification_unavailable",
2520
- "directory_fetch_limit"
2533
+ "directory_fetch_limit",
2534
+ "directory_expired",
2535
+ "identity_unverified",
2536
+ "verification_unavailable"
2521
2537
  ].includes(cause.reason) ? "webhook_verification_unavailable" : "webhook_signature_invalid",
2522
2538
  message: cause.message,
2523
2539
  cause
@@ -4854,6 +4870,11 @@ Hint: this usually means agent_uri does not include the MCP endpoint path. The S
4854
4870
  const defaultAuth = !signed33Webhooks && this.config.webhookSecret ? { schemes: ["HMAC-SHA256"], credentials: this.config.webhookSecret } : void 0;
4855
4871
  const resolvedAuth = consumerAuth !== void 0 ? consumerAuth : consumerUrl === void 0 ? defaultAuth : void 0;
4856
4872
  if (!signed33Webhooks && resolvedAuth === void 0 || resolvedAuth === null) {
4873
+ if (consumerReportingWebhook && consumerUrl !== void 0 && consumerAuth === void 0) {
4874
+ throw new Error(
4875
+ "reporting_webhook requires an `authentication` block without positively negotiated 3.3 signed webhooks: a caller-supplied `reporting_webhook.url` must bring its own `reporting_webhook.authentication` (the client never pairs `webhookSecret` with a caller-controlled URL). Omit `url` to use the client's webhookUrlTemplate callback, or remove `reporting_webhook` if you do not need automated delivery reports."
4876
+ );
4877
+ }
4857
4878
  if (consumerReportingWebhook) {
4858
4879
  throw new Error(
4859
4880
  "reporting_webhook requires an `authentication` block without positively negotiated 3.3 signed webhooks, and no credential is available: set `webhookSecret` on the client, or pass `reporting_webhook.authentication` explicitly. Remove `reporting_webhook` from the request if you do not need automated delivery reports \u2014 the media buy itself does not require it."
@@ -4876,12 +4897,12 @@ Hint: this usually means agent_uri does not include the MCP endpoint path. The S
4876
4897
  ...resolvedAuth === void 0 && this.selectedWebhookSigningProfile() && { signing_profile: this.selectedWebhookSigningProfile() }
4877
4898
  }
4878
4899
  };
4879
- if (signed33Webhooks && resolvedAuth === void 0) {
4900
+ if (signed33Webhooks && resolvedAuth === void 0 && consumerUrl === void 0) {
4880
4901
  await this.persistWebhookRegistration({
4881
4902
  agent: this.normalizedAgent,
4882
4903
  taskType: "media_buy_delivery",
4883
4904
  operationId,
4884
- callbackUrl: consumerUrl ?? deliveryWebhookUrl,
4905
+ callbackUrl: deliveryWebhookUrl,
4885
4906
  mode: "rfc9421",
4886
4907
  signingProfile: this.selectedWebhookSigningProfile()
4887
4908
  });
@@ -2541,7 +2541,7 @@ Hint: this usually means agent_uri does not include the MCP endpoint path. The S
2541
2541
  }
2542
2542
  }
2543
2543
  if (registration?.mode === "rfc9421") {
2544
- const { verifyWebBotAuth, selectSignatureProfile, WebBotAuthError } = loadWebBotAuth();
2544
+ const { verifyWebBotAuth, selectSignatureProfile, WebBotAuthError, WebBotAuthUnavailableError } = loadWebBotAuth();
2545
2545
  const requestMethod = options.requestMethod;
2546
2546
  const requestUrl = options.requestUrl;
2547
2547
  if (rawBody === void 0 || !options.headers || !trustedOperationId || !requestMethod || !requestUrl) {
@@ -2565,17 +2565,30 @@ Hint: this usually means agent_uri does not include the MCP endpoint path. The S
2565
2565
  method: requestMethod,
2566
2566
  url: requestUrl,
2567
2567
  headers: normalizedHeaders.headers,
2568
- body: typeof rawBody === "string" ? rawBody : new TextDecoder("utf-8", { fatal: true }).decode(rawBody)
2568
+ body: typeof rawBody === "string" ? rawBody : (
2569
+ // ignoreBOM: Content-Digest covers the exact received bytes.
2570
+ new TextDecoder("utf-8", { fatal: true, ignoreBOM: true }).decode(rawBody)
2571
+ )
2569
2572
  },
2570
2573
  {
2571
2574
  directory: config.directory,
2572
2575
  replayStore: this.webhookReplayStore,
2573
- isRevoked: config.isRevoked,
2576
+ ...config.isRevoked && !config.revocation && { isRevoked: config.isRevoked },
2574
2577
  now: this.config.webhookVerification?.now
2575
2578
  }
2576
2579
  );
2577
2580
  if (signers.length !== 1 || signers[0].origin !== canonicalAgentOrigin(registration.agentUrl))
2578
2581
  throw new WebBotAuthError(403, "webhook_signer_mismatch");
2582
+ if (config.revocation) {
2583
+ let status;
2584
+ try {
2585
+ status = await config.revocation.status(signers[0].origin, signers[0].keyid);
2586
+ } catch (error) {
2587
+ throw new WebBotAuthUnavailableError("revocation_persistence_failed", error);
2588
+ }
2589
+ if (status === "revoked") throw new WebBotAuthError(403, "key_revoked");
2590
+ if (status === "unknown") throw new WebBotAuthError(403, "identity_unverified");
2591
+ } else if (!config.isRevoked) throw new WebBotAuthError(403, "webhook_revocation_not_configured");
2579
2592
  } else {
2580
2593
  if (actualProfile === "web-bot-auth") throw new WebBotAuthError(403, "webhook_profile_mismatch");
2581
2594
  const delegatedOperatorAuthorization = this.delegatedOperatorAuthorizationForRegistration(registration);
@@ -2601,14 +2614,17 @@ Hint: this usually means agent_uri does not include the MCP endpoint path. The S
2601
2614
  );
2602
2615
  }
2603
2616
  } catch (cause) {
2617
+ if (cause instanceof WebBotAuthUnavailableError)
2618
+ return { ok: false, code: "webhook_verification_unavailable", message: cause.message, cause };
2604
2619
  if (cause instanceof WebBotAuthError)
2605
2620
  return {
2606
2621
  ok: false,
2607
2622
  code: [
2608
2623
  "directory_unavailable",
2609
- "revocation_unavailable",
2610
- "verification_unavailable",
2611
- "directory_fetch_limit"
2624
+ "directory_fetch_limit",
2625
+ "directory_expired",
2626
+ "identity_unverified",
2627
+ "verification_unavailable"
2612
2628
  ].includes(cause.reason) ? "webhook_verification_unavailable" : "webhook_signature_invalid",
2613
2629
  message: cause.message,
2614
2630
  cause
@@ -4945,6 +4961,11 @@ Hint: this usually means agent_uri does not include the MCP endpoint path. The S
4945
4961
  const defaultAuth = !signed33Webhooks && this.config.webhookSecret ? { schemes: ["HMAC-SHA256"], credentials: this.config.webhookSecret } : void 0;
4946
4962
  const resolvedAuth = consumerAuth !== void 0 ? consumerAuth : consumerUrl === void 0 ? defaultAuth : void 0;
4947
4963
  if (!signed33Webhooks && resolvedAuth === void 0 || resolvedAuth === null) {
4964
+ if (consumerReportingWebhook && consumerUrl !== void 0 && consumerAuth === void 0) {
4965
+ throw new Error(
4966
+ "reporting_webhook requires an `authentication` block without positively negotiated 3.3 signed webhooks: a caller-supplied `reporting_webhook.url` must bring its own `reporting_webhook.authentication` (the client never pairs `webhookSecret` with a caller-controlled URL). Omit `url` to use the client's webhookUrlTemplate callback, or remove `reporting_webhook` if you do not need automated delivery reports."
4967
+ );
4968
+ }
4948
4969
  if (consumerReportingWebhook) {
4949
4970
  throw new Error(
4950
4971
  "reporting_webhook requires an `authentication` block without positively negotiated 3.3 signed webhooks, and no credential is available: set `webhookSecret` on the client, or pass `reporting_webhook.authentication` explicitly. Remove `reporting_webhook` from the request if you do not need automated delivery reports \u2014 the media buy itself does not require it."
@@ -4967,12 +4988,12 @@ Hint: this usually means agent_uri does not include the MCP endpoint path. The S
4967
4988
  ...resolvedAuth === void 0 && this.selectedWebhookSigningProfile() && { signing_profile: this.selectedWebhookSigningProfile() }
4968
4989
  }
4969
4990
  };
4970
- if (signed33Webhooks && resolvedAuth === void 0) {
4991
+ if (signed33Webhooks && resolvedAuth === void 0 && consumerUrl === void 0) {
4971
4992
  await this.persistWebhookRegistration({
4972
4993
  agent: this.normalizedAgent,
4973
4994
  taskType: "media_buy_delivery",
4974
4995
  operationId,
4975
- callbackUrl: consumerUrl ?? deliveryWebhookUrl,
4996
+ callbackUrl: deliveryWebhookUrl,
4976
4997
  mode: "rfc9421",
4977
4998
  signingProfile: this.selectedWebhookSigningProfile()
4978
4999
  });
@@ -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
@@ -0,0 +1,34 @@
1
+ /**
2
+ * Bridges the experimental AdCP 3.3 preview types to the generated wire types.
3
+ *
4
+ * The released SDK pins an AdCP schema version that predates the 3.3 identity
5
+ * drafts, so the preview types in `./types` start from hand-written drafts. Once
6
+ * the pinned schemas (or a candidate spec bundle built by the spec repo's
7
+ * "Generate TypeScript SDK" check) define a shape, the generated type wins: the
8
+ * preview type becomes an alias of it, so the two cannot drift apart and a
9
+ * server that accepts the preview shape always emits a generated-valid payload.
10
+ *
11
+ * Internal: not re-exported from `@adcp/sdk/identity-3.3`.
12
+ */
13
+ import type { GetAdCPCapabilitiesResponse } from '../types/tools.generated.mjs';
14
+ /**
15
+ * The value type of an optional property `K` on `T`, or `unknown` when `T`
16
+ * does not declare it. An object type without `K` is assignable to
17
+ * `{ K?: V }`, so the absent case infers `unknown` rather than failing.
18
+ * Non-distributive, so a union `T` resolves to the property's union rather
19
+ * than silently falling back when one member lacks it.
20
+ */
21
+ export type OptionalPropertyOf<T, K extends PropertyKey> = [T] extends [{
22
+ [P in K]?: infer V;
23
+ }] ? V : unknown;
24
+ /** `Generated` when the pinned schemas define it, otherwise `Draft`. */
25
+ export type PreferGenerated<Generated, Draft> = unknown extends Generated ? Draft : [NonNullable<Generated>] extends [never] ? Draft : NonNullable<Generated>;
26
+ /**
27
+ * Resolves `account.agent_onboarding` from a `get_adcp_capabilities` account
28
+ * shape, falling back to the draft when that shape does not declare it.
29
+ * Parameterised so type tests can exercise it against fixtures of newer
30
+ * generated shapes without regenerating the SDK.
31
+ */
32
+ export type ResolveAgentOnboarding<Account, Draft> = PreferGenerated<OptionalPropertyOf<NonNullable<Account>, 'agent_onboarding'>, Draft>;
33
+ /** `account` in the pinned `get_adcp_capabilities` response. */
34
+ export type GeneratedAccountCapabilities = NonNullable<GetAdCPCapabilitiesResponse['account']>;
@@ -0,0 +1,34 @@
1
+ /**
2
+ * Bridges the experimental AdCP 3.3 preview types to the generated wire types.
3
+ *
4
+ * The released SDK pins an AdCP schema version that predates the 3.3 identity
5
+ * drafts, so the preview types in `./types` start from hand-written drafts. Once
6
+ * the pinned schemas (or a candidate spec bundle built by the spec repo's
7
+ * "Generate TypeScript SDK" check) define a shape, the generated type wins: the
8
+ * preview type becomes an alias of it, so the two cannot drift apart and a
9
+ * server that accepts the preview shape always emits a generated-valid payload.
10
+ *
11
+ * Internal: not re-exported from `@adcp/sdk/identity-3.3`.
12
+ */
13
+ import type { GetAdCPCapabilitiesResponse } from '../types/tools.generated';
14
+ /**
15
+ * The value type of an optional property `K` on `T`, or `unknown` when `T`
16
+ * does not declare it. An object type without `K` is assignable to
17
+ * `{ K?: V }`, so the absent case infers `unknown` rather than failing.
18
+ * Non-distributive, so a union `T` resolves to the property's union rather
19
+ * than silently falling back when one member lacks it.
20
+ */
21
+ export type OptionalPropertyOf<T, K extends PropertyKey> = [T] extends [{
22
+ [P in K]?: infer V;
23
+ }] ? V : unknown;
24
+ /** `Generated` when the pinned schemas define it, otherwise `Draft`. */
25
+ export type PreferGenerated<Generated, Draft> = unknown extends Generated ? Draft : [NonNullable<Generated>] extends [never] ? Draft : NonNullable<Generated>;
26
+ /**
27
+ * Resolves `account.agent_onboarding` from a `get_adcp_capabilities` account
28
+ * shape, falling back to the draft when that shape does not declare it.
29
+ * Parameterised so type tests can exercise it against fixtures of newer
30
+ * generated shapes without regenerating the SDK.
31
+ */
32
+ export type ResolveAgentOnboarding<Account, Draft> = PreferGenerated<OptionalPropertyOf<NonNullable<Account>, 'agent_onboarding'>, Draft>;
33
+ /** `account` in the pinned `get_adcp_capabilities` response. */
34
+ export type GeneratedAccountCapabilities = NonNullable<GetAdCPCapabilitiesResponse['account']>;
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __copyProps = (to, from, except, desc) => {
7
+ if (from && typeof from === "object" || typeof from === "function") {
8
+ for (let key of __getOwnPropNames(from))
9
+ if (!__hasOwnProp.call(to, key) && key !== except)
10
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
11
+ }
12
+ return to;
13
+ };
14
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
15
+ var generated_compat_exports = {};
16
+ module.exports = __toCommonJS(generated_compat_exports);
File without changes
@@ -2,8 +2,8 @@ export * from './types.mjs';
2
2
  export * from './trust.mjs';
3
3
  export * from './lifecycle.mjs';
4
4
  export * from './revocation.mjs';
5
- export { WEB_BOT_AUTH_DRAFT_REVISION, verifyWebBotAuth, signWebBotAuth, createWebBotAuthFetch, createSignedSignatureDirectory, SignatureDirectoryResolver, verifySignatureDirectory, selectSignatureProfile, jwkThumbprint, WebBotAuthError, } from '../signing/web-bot-auth.mjs';
6
- export type { WebBotSigningKey, WebBotSigningOptions, VerifiedWebBotSigner, VerifyWebBotAuthOptions, } from '../signing/web-bot-auth.mjs';
5
+ export { WEB_BOT_AUTH_DRAFT_REVISION, verifyWebBotAuth, signWebBotAuth, createWebBotAuthFetch, createSignedSignatureDirectory, SignatureDirectoryResolver, verifySignatureDirectory, verifyKeyDirectory, selectSignatureProfile, jwkThumbprint, WebBotAuthError, WebBotAuthUnavailableError, } from '../signing/web-bot-auth.mjs';
6
+ export type { WebBotSigningKey, WebBotSigningOptions, VerifiedWebBotSigner, VerifyWebBotAuthOptions, VerifiedSignatureDirectory, SignatureDirectoryResolverOptions, } from '../signing/web-bot-auth.mjs';
7
7
  export { validateIdentity33Payload } from './validation.mjs';
8
8
  export { createIdentity33PrincipalResolver, createIdentity33PrincipalScopeResolver, createIdentity33Authorization, withIdentity33PrincipalHandlers, isIdentity33UnboundContext, } from './server.mjs';
9
9
  export { createIdentity33StateStores } from './store.mjs';
@@ -2,8 +2,8 @@ export * from './types';
2
2
  export * from './trust';
3
3
  export * from './lifecycle';
4
4
  export * from './revocation';
5
- export { WEB_BOT_AUTH_DRAFT_REVISION, verifyWebBotAuth, signWebBotAuth, createWebBotAuthFetch, createSignedSignatureDirectory, SignatureDirectoryResolver, verifySignatureDirectory, selectSignatureProfile, jwkThumbprint, WebBotAuthError, } from '../signing/web-bot-auth';
6
- export type { WebBotSigningKey, WebBotSigningOptions, VerifiedWebBotSigner, VerifyWebBotAuthOptions, } from '../signing/web-bot-auth';
5
+ export { WEB_BOT_AUTH_DRAFT_REVISION, verifyWebBotAuth, signWebBotAuth, createWebBotAuthFetch, createSignedSignatureDirectory, SignatureDirectoryResolver, verifySignatureDirectory, verifyKeyDirectory, selectSignatureProfile, jwkThumbprint, WebBotAuthError, WebBotAuthUnavailableError, } from '../signing/web-bot-auth';
6
+ export type { WebBotSigningKey, WebBotSigningOptions, VerifiedWebBotSigner, VerifyWebBotAuthOptions, VerifiedSignatureDirectory, SignatureDirectoryResolverOptions, } from '../signing/web-bot-auth';
7
7
  export { validateIdentity33Payload } from './validation';
8
8
  export { createIdentity33PrincipalResolver, createIdentity33PrincipalScopeResolver, createIdentity33Authorization, withIdentity33PrincipalHandlers, isIdentity33UnboundContext, } from './server';
9
9
  export { createIdentity33StateStores } from './store';
@@ -22,6 +22,7 @@ __export(identity_3_exports, {
22
22
  SignatureDirectoryResolver: () => import_web_bot_auth.SignatureDirectoryResolver,
23
23
  WEB_BOT_AUTH_DRAFT_REVISION: () => import_web_bot_auth.WEB_BOT_AUTH_DRAFT_REVISION,
24
24
  WebBotAuthError: () => import_web_bot_auth.WebBotAuthError,
25
+ WebBotAuthUnavailableError: () => import_web_bot_auth.WebBotAuthUnavailableError,
25
26
  createIdentity33Authorization: () => import_server.createIdentity33Authorization,
26
27
  createIdentity33PrincipalResolver: () => import_server.createIdentity33PrincipalResolver,
27
28
  createIdentity33PrincipalScopeResolver: () => import_server.createIdentity33PrincipalScopeResolver,
@@ -34,6 +35,7 @@ __export(identity_3_exports, {
34
35
  selectSignatureProfile: () => import_web_bot_auth.selectSignatureProfile,
35
36
  signWebBotAuth: () => import_web_bot_auth.signWebBotAuth,
36
37
  validateIdentity33Payload: () => import_validation.validateIdentity33Payload,
38
+ verifyKeyDirectory: () => import_web_bot_auth.verifyKeyDirectory,
37
39
  verifySignatureDirectory: () => import_web_bot_auth.verifySignatureDirectory,
38
40
  verifyWebBotAuth: () => import_web_bot_auth.verifyWebBotAuth,
39
41
  withIdentity33PrincipalHandlers: () => import_server.withIdentity33PrincipalHandlers
@@ -53,6 +55,7 @@ var import_webhook_registration = require('../core/webhook-registration.js');
53
55
  SignatureDirectoryResolver,
54
56
  WEB_BOT_AUTH_DRAFT_REVISION,
55
57
  WebBotAuthError,
58
+ WebBotAuthUnavailableError,
56
59
  createIdentity33Authorization,
57
60
  createIdentity33PrincipalResolver,
58
61
  createIdentity33PrincipalScopeResolver,
@@ -65,6 +68,7 @@ var import_webhook_registration = require('../core/webhook-registration.js');
65
68
  selectSignatureProfile,
66
69
  signWebBotAuth,
67
70
  validateIdentity33Payload,
71
+ verifyKeyDirectory,
68
72
  verifySignatureDirectory,
69
73
  verifyWebBotAuth,
70
74
  withIdentity33PrincipalHandlers,
@@ -10,9 +10,11 @@ import {
10
10
  createSignedSignatureDirectory,
11
11
  SignatureDirectoryResolver,
12
12
  verifySignatureDirectory,
13
+ verifyKeyDirectory,
13
14
  selectSignatureProfile,
14
15
  jwkThumbprint,
15
- WebBotAuthError
16
+ WebBotAuthError,
17
+ WebBotAuthUnavailableError
16
18
  } from "../signing/web-bot-auth.mjs";
17
19
  import { validateIdentity33Payload } from "./validation.mjs";
18
20
  import {
@@ -28,6 +30,7 @@ export {
28
30
  SignatureDirectoryResolver,
29
31
  WEB_BOT_AUTH_DRAFT_REVISION,
30
32
  WebBotAuthError,
33
+ WebBotAuthUnavailableError,
31
34
  createIdentity33Authorization,
32
35
  createIdentity33PrincipalResolver,
33
36
  createIdentity33PrincipalScopeResolver,
@@ -40,6 +43,7 @@ export {
40
43
  selectSignatureProfile,
41
44
  signWebBotAuth,
42
45
  validateIdentity33Payload,
46
+ verifyKeyDirectory,
43
47
  verifySignatureDirectory,
44
48
  verifyWebBotAuth,
45
49
  withIdentity33PrincipalHandlers