@adcp/sdk 15.4.0 → 15.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (164) hide show
  1. package/README.md +15 -0
  2. package/dist/lib/advanced.d.mts +2 -2
  3. package/dist/lib/advanced.d.ts +2 -2
  4. package/dist/lib/advanced.js +8 -2
  5. package/dist/lib/advanced.mjs +8 -2
  6. package/dist/lib/auth/oauth/index.d.mts +1 -0
  7. package/dist/lib/auth/oauth/index.d.ts +1 -0
  8. package/dist/lib/auth/oauth/index.js +5 -0
  9. package/dist/lib/auth/oauth/index.mjs +3 -0
  10. package/dist/lib/auth/oauth/pending-web-flow.d.mts +16 -0
  11. package/dist/lib/auth/oauth/pending-web-flow.d.ts +16 -0
  12. package/dist/lib/auth/oauth/pending-web-flow.js +66 -0
  13. package/dist/lib/auth/oauth/pending-web-flow.mjs +41 -0
  14. package/dist/lib/auth/oauth/web-flow.js +3 -3
  15. package/dist/lib/auth/oauth/web-flow.mjs +3 -3
  16. package/dist/lib/core/AgentClient.d.mts +4 -0
  17. package/dist/lib/core/AgentClient.d.ts +4 -0
  18. package/dist/lib/core/AgentClient.js +8 -0
  19. package/dist/lib/core/AgentClient.mjs +8 -0
  20. package/dist/lib/core/SingleAgentClient.d.mts +154 -0
  21. package/dist/lib/core/SingleAgentClient.d.ts +154 -0
  22. package/dist/lib/core/SingleAgentClient.js +661 -23
  23. package/dist/lib/core/SingleAgentClient.mjs +666 -23
  24. package/dist/lib/core/agent-discovery-cache.d.mts +103 -0
  25. package/dist/lib/core/agent-discovery-cache.d.ts +103 -0
  26. package/dist/lib/core/agent-discovery-cache.js +121 -0
  27. package/dist/lib/core/agent-discovery-cache.mjs +92 -0
  28. package/dist/lib/index.d.mts +5 -3
  29. package/dist/lib/index.d.ts +5 -3
  30. package/dist/lib/index.js +7 -0
  31. package/dist/lib/index.mjs +6 -0
  32. package/dist/lib/protocols/index.d.mts +2 -2
  33. package/dist/lib/protocols/index.d.ts +2 -2
  34. package/dist/lib/protocols/index.js +1 -1
  35. package/dist/lib/protocols/index.mjs +1 -1
  36. package/dist/lib/protocols/mcp-call-context.d.mts +109 -0
  37. package/dist/lib/protocols/mcp-call-context.d.ts +109 -0
  38. package/dist/lib/protocols/mcp-call-context.js +221 -0
  39. package/dist/lib/protocols/mcp-call-context.mjs +186 -0
  40. package/dist/lib/protocols/mcp-modern.d.mts +9 -1
  41. package/dist/lib/protocols/mcp-modern.d.ts +9 -1
  42. package/dist/lib/protocols/mcp-modern.js +180 -104
  43. package/dist/lib/protocols/mcp-modern.mjs +193 -104
  44. package/dist/lib/protocols/mcp-scope.d.mts +15 -0
  45. package/dist/lib/protocols/mcp-scope.d.ts +15 -0
  46. package/dist/lib/protocols/mcp.d.mts +4 -2
  47. package/dist/lib/protocols/mcp.d.ts +4 -2
  48. package/dist/lib/protocols/mcp.js +178 -154
  49. package/dist/lib/protocols/mcp.mjs +189 -153
  50. package/dist/lib/protocols/transportDiagnostics.d.mts +33 -1
  51. package/dist/lib/protocols/transportDiagnostics.d.ts +33 -1
  52. package/dist/lib/protocols/transportDiagnostics.js +128 -12
  53. package/dist/lib/protocols/transportDiagnostics.mjs +128 -12
  54. package/dist/lib/registry/types.generated.d.mts +63 -1
  55. package/dist/lib/registry/types.generated.d.ts +63 -1
  56. package/dist/lib/reporting/azure/index.d.mts +26 -0
  57. package/dist/lib/reporting/azure/index.d.ts +26 -0
  58. package/dist/lib/reporting/azure/index.js +247 -0
  59. package/dist/lib/reporting/azure/index.mjs +230 -0
  60. package/dist/lib/reporting/bigquery/index.d.mts +127 -0
  61. package/dist/lib/reporting/bigquery/index.d.ts +127 -0
  62. package/dist/lib/reporting/bigquery/index.js +379 -0
  63. package/dist/lib/reporting/bigquery/index.mjs +341 -0
  64. package/dist/lib/reporting/gcs/index.d.mts +2 -0
  65. package/dist/lib/reporting/gcs/index.d.ts +2 -0
  66. package/dist/lib/reporting/gcs/index.js +3 -0
  67. package/dist/lib/reporting/gcs/index.mjs +2 -0
  68. package/dist/lib/reporting/gcs/row-provider.d.mts +32 -0
  69. package/dist/lib/reporting/gcs/row-provider.d.ts +32 -0
  70. package/dist/lib/reporting/gcs/row-provider.js +205 -0
  71. package/dist/lib/reporting/gcs/row-provider.mjs +188 -0
  72. package/dist/lib/reporting/ledger/change-feed.d.mts +41 -0
  73. package/dist/lib/reporting/ledger/change-feed.d.ts +41 -0
  74. package/dist/lib/reporting/ledger/change-feed.js +101 -0
  75. package/dist/lib/reporting/ledger/change-feed.mjs +74 -0
  76. package/dist/lib/reporting/ledger/handler.js +22 -8
  77. package/dist/lib/reporting/ledger/handler.mjs +22 -8
  78. package/dist/lib/reporting/ledger/index.d.mts +4 -0
  79. package/dist/lib/reporting/ledger/index.d.ts +4 -0
  80. package/dist/lib/reporting/ledger/index.js +9 -1
  81. package/dist/lib/reporting/ledger/index.mjs +4 -0
  82. package/dist/lib/reporting/ledger/managed-postgres.d.mts +2 -0
  83. package/dist/lib/reporting/ledger/managed-postgres.d.ts +2 -0
  84. package/dist/lib/reporting/ledger/managed-postgres.js +21 -1
  85. package/dist/lib/reporting/ledger/managed-postgres.mjs +21 -1
  86. package/dist/lib/reporting/ledger/managed.d.mts +9 -0
  87. package/dist/lib/reporting/ledger/managed.d.ts +9 -0
  88. package/dist/lib/reporting/ledger/managed.js +18 -0
  89. package/dist/lib/reporting/ledger/managed.mjs +18 -0
  90. package/dist/lib/reporting/ledger/postgres.d.mts +185 -0
  91. package/dist/lib/reporting/ledger/postgres.d.ts +185 -0
  92. package/dist/lib/reporting/ledger/postgres.js +872 -26
  93. package/dist/lib/reporting/ledger/postgres.mjs +880 -26
  94. package/dist/lib/reporting/ledger/producer.js +10 -1
  95. package/dist/lib/reporting/ledger/producer.mjs +10 -1
  96. package/dist/lib/reporting/ledger/row-storage-errors.d.mts +7 -0
  97. package/dist/lib/reporting/ledger/row-storage-errors.d.ts +7 -0
  98. package/dist/lib/reporting/ledger/row-storage-errors.js +41 -0
  99. package/dist/lib/reporting/ledger/row-storage-errors.mjs +16 -0
  100. package/dist/lib/reporting/ledger/row-storage-migration.d.mts +41 -0
  101. package/dist/lib/reporting/ledger/row-storage-migration.d.ts +41 -0
  102. package/dist/lib/reporting/ledger/row-storage-migration.js +234 -0
  103. package/dist/lib/reporting/ledger/row-storage-migration.mjs +208 -0
  104. package/dist/lib/reporting/ledger/row-storage-object.d.mts +112 -0
  105. package/dist/lib/reporting/ledger/row-storage-object.d.ts +112 -0
  106. package/dist/lib/reporting/ledger/row-storage-object.js +304 -0
  107. package/dist/lib/reporting/ledger/row-storage-object.mjs +262 -0
  108. package/dist/lib/reporting/ledger/row-storage-provider-io.d.mts +44 -0
  109. package/dist/lib/reporting/ledger/row-storage-provider-io.d.ts +44 -0
  110. package/dist/lib/reporting/ledger/row-storage-provider-io.js +142 -0
  111. package/dist/lib/reporting/ledger/row-storage-provider-io.mjs +111 -0
  112. package/dist/lib/reporting/ledger/row-storage.d.mts +224 -0
  113. package/dist/lib/reporting/ledger/row-storage.d.ts +224 -0
  114. package/dist/lib/reporting/ledger/row-storage.js +692 -0
  115. package/dist/lib/reporting/ledger/row-storage.mjs +680 -0
  116. package/dist/lib/reporting/ledger/types.d.mts +8 -0
  117. package/dist/lib/reporting/ledger/types.d.ts +8 -0
  118. package/dist/lib/reporting/s3/index.d.mts +29 -0
  119. package/dist/lib/reporting/s3/index.d.ts +29 -0
  120. package/dist/lib/reporting/s3/index.js +324 -0
  121. package/dist/lib/reporting/s3/index.mjs +317 -0
  122. package/dist/lib/reporting/service/index.d.mts +43 -1
  123. package/dist/lib/reporting/service/index.d.ts +43 -1
  124. package/dist/lib/reporting/service/index.js +69 -1
  125. package/dist/lib/reporting/service/index.mjs +71 -1
  126. package/dist/lib/schemas/browser.d.mts +14 -0
  127. package/dist/lib/schemas/browser.d.ts +14 -0
  128. package/dist/lib/schemas/browser.js +48 -0
  129. package/dist/lib/schemas/browser.mjs +20 -0
  130. package/dist/lib/schemas/index.d.mts +2 -120
  131. package/dist/lib/schemas/index.d.ts +2 -120
  132. package/dist/lib/schemas/index.js +3 -11
  133. package/dist/lib/schemas/index.mjs +1 -9
  134. package/dist/lib/schemas-data/v2.5/_provenance.json +1 -1
  135. package/dist/lib/testing/index.d.mts +1 -0
  136. package/dist/lib/testing/index.d.ts +1 -0
  137. package/dist/lib/testing/index.js +3 -0
  138. package/dist/lib/testing/index.mjs +2 -0
  139. package/dist/lib/testing/pending-web-flow-store.d.mts +20 -0
  140. package/dist/lib/testing/pending-web-flow-store.d.ts +20 -0
  141. package/dist/lib/testing/pending-web-flow-store.js +132 -0
  142. package/dist/lib/testing/pending-web-flow-store.mjs +98 -0
  143. package/dist/lib/testing/storyboard/validations.d.mts +1 -1
  144. package/dist/lib/testing/storyboard/validations.d.ts +1 -1
  145. package/dist/lib/validation/get-products-request.d.mts +122 -0
  146. package/dist/lib/validation/get-products-request.d.ts +122 -0
  147. package/dist/lib/validation/get-products-request.js +39 -0
  148. package/dist/lib/validation/get-products-request.mjs +14 -0
  149. package/dist/lib/version.d.mts +3 -3
  150. package/dist/lib/version.d.ts +3 -3
  151. package/dist/lib/version.js +3 -3
  152. package/dist/lib/version.mjs +3 -3
  153. package/docs/README.md +1 -1
  154. package/docs/TYPE-SUMMARY.md +35 -2
  155. package/docs/ZOD-SCHEMAS.md +13 -1
  156. package/docs/guides/DISCOVERY-CACHE-AND-SESSION-REUSE.md +142 -0
  157. package/docs/guides/EXISTING-PLATFORM.md +43 -12
  158. package/docs/guides/OAUTH-ISSUER-BINDING.md +6 -0
  159. package/docs/guides/REPORTING-LEDGER.md +374 -0
  160. package/docs/guides/REPORTING-OPERATIONS.md +76 -1
  161. package/docs/guides/WEB-OAUTH.md +48 -1
  162. package/docs/llms.txt +4 -2
  163. package/docs/migration-14.x-rc-worksheet.md +6 -4
  164. package/package.json +64 -1
package/README.md CHANGED
@@ -57,8 +57,23 @@ Large workspaces should keep the generated schema surface out of the default typ
57
57
  | Client, server, signing, and response helpers | `@adcp/sdk`, `@adcp/sdk/client`, `@adcp/sdk/server`, or another focused runtime subpath |
58
58
  | One tool's request/response types | `@adcp/sdk/types/<tool>` such as `@adcp/sdk/types/sync-accounts` |
59
59
  | Runtime Zod schemas and tool schema maps | `@adcp/sdk/schemas` |
60
+ | Runtime Zod schemas in browser UIs | `@adcp/sdk/schemas/browser` |
60
61
  | Broad generated protocol type barrel | `@adcp/sdk/types` |
61
62
 
63
+ Browser widgets and dashboards can validate AdCP objects with the generated Zod schemas:
64
+
65
+ ```ts
66
+ import {
67
+ EventSourceHealthSchema,
68
+ SyncAudiencesResponseSchema,
69
+ SyncEventSourcesResponseSchema,
70
+ } from '@adcp/sdk/schemas/browser';
71
+
72
+ const health = EventSourceHealthSchema.parse(rawHealth);
73
+ ```
74
+
75
+ The browser entry also exports `GetProductsRequestSchema` and `LegacyGetProductsRequestSchema`, `BiddingPolicySchema`, `CanonicalBudgetAllocationSchema`, and the strict `SyncCreatives*` validators, with the same validation behavior as the Node entry. It has no Node built-ins in its import graph. JSON Schema loading and tool registration helpers remain available from `@adcp/sdk/schemas`. The generated schemas still initialize together, so importing one schema can retain the full generated module in a browser bundle; per-schema tree-shaking is tracked in [#3178](https://github.com/adcontextprotocol/adcp-client/issues/3178).
76
+
62
77
  ### Focused client runtime (`@adcp/sdk/client/core`)
63
78
 
64
79
  Applications that only call AdCP agents can avoid evaluating the SDK's server,
@@ -37,5 +37,5 @@
37
37
  * - Type-safe tool methods
38
38
  * - Error handling and validation
39
39
  */
40
- export { ProtocolClient, callMCPTool, callMCPToolWithOAuth, connectMCP, callA2ATool, createMCPClient, createA2AClient, } from './protocols/index.mjs';
41
- export type { MCPCallOptions, MCPConnectionResult } from './protocols/index.mjs';
40
+ export { ProtocolClient, callMCPTool, callMCPToolWithOAuth, connectMCP, callA2ATool, createMCPClient, createA2AClient, closeConnections, closeScopedConnections, withMCPConnectionScope, } from './protocols/index.mjs';
41
+ export type { MCPCallOptions, MCPConnectionResult, TransportActivity, TransportActivityType, TransportResponseOutcome, } from './protocols/index.mjs';
@@ -37,5 +37,5 @@
37
37
  * - Type-safe tool methods
38
38
  * - Error handling and validation
39
39
  */
40
- export { ProtocolClient, callMCPTool, callMCPToolWithOAuth, connectMCP, callA2ATool, createMCPClient, createA2AClient, } from './protocols';
41
- export type { MCPCallOptions, MCPConnectionResult } from './protocols';
40
+ export { ProtocolClient, callMCPTool, callMCPToolWithOAuth, connectMCP, callA2ATool, createMCPClient, createA2AClient, closeConnections, closeScopedConnections, withMCPConnectionScope, } from './protocols';
41
+ export type { MCPCallOptions, MCPConnectionResult, TransportActivity, TransportActivityType, TransportResponseOutcome, } from './protocols';
@@ -22,9 +22,12 @@ __export(advanced_exports, {
22
22
  callA2ATool: () => import_protocols.callA2ATool,
23
23
  callMCPTool: () => import_protocols.callMCPTool,
24
24
  callMCPToolWithOAuth: () => import_protocols.callMCPToolWithOAuth,
25
+ closeConnections: () => import_protocols.closeConnections,
26
+ closeScopedConnections: () => import_protocols.closeScopedConnections,
25
27
  connectMCP: () => import_protocols.connectMCP,
26
28
  createA2AClient: () => import_protocols.createA2AClient,
27
- createMCPClient: () => import_protocols.createMCPClient
29
+ createMCPClient: () => import_protocols.createMCPClient,
30
+ withMCPConnectionScope: () => import_protocols.withMCPConnectionScope
28
31
  });
29
32
  module.exports = __toCommonJS(advanced_exports);
30
33
  var import_protocols = require('./protocols/index.js');
@@ -34,7 +37,10 @@ var import_protocols = require('./protocols/index.js');
34
37
  callA2ATool,
35
38
  callMCPTool,
36
39
  callMCPToolWithOAuth,
40
+ closeConnections,
41
+ closeScopedConnections,
37
42
  connectMCP,
38
43
  createA2AClient,
39
- createMCPClient
44
+ createMCPClient,
45
+ withMCPConnectionScope
40
46
  });
@@ -5,14 +5,20 @@ import {
5
5
  connectMCP,
6
6
  callA2ATool,
7
7
  createMCPClient,
8
- createA2AClient
8
+ createA2AClient,
9
+ closeConnections,
10
+ closeScopedConnections,
11
+ withMCPConnectionScope
9
12
  } from "./protocols/index.mjs";
10
13
  export {
11
14
  ProtocolClient,
12
15
  callA2ATool,
13
16
  callMCPTool,
14
17
  callMCPToolWithOAuth,
18
+ closeConnections,
19
+ closeScopedConnections,
15
20
  connectMCP,
16
21
  createA2AClient,
17
- createMCPClient
22
+ createMCPClient,
23
+ withMCPConnectionScope
18
24
  };
@@ -37,6 +37,7 @@ export { DEFAULT_CLIENT_METADATA, OAuthError, OAuthCancelledError, OAuthTimeoutE
37
37
  export { CLIFlowHandler, type CLIFlowHandlerConfig } from './CLIFlowHandler.mjs';
38
38
  export { NonInteractiveFlowHandler, type NonInteractiveFlowHandlerConfig } from './NonInteractiveFlowHandler.mjs';
39
39
  export { startWebOAuthFlow, completeWebOAuthFlow, safeReturnTo, InMemoryPendingFlowStore, InvalidOrExpiredFlowError, StateMismatchError, BrowserBindingRequiredError, TokenExchangeError, ProtectedResourceMetadataError, AgentVanishedDuringFlowError, AgentChangedDuringFlowError, ConfidentialClientNotAllowedError, DEFAULT_WEB_FLOW_TTL_MS, type PendingWebFlow, type PendingWebFlowStore, type PendingFlowStore, type StartWebFlowOptions, type StartWebFlowResult, type CompleteWebFlowOptions, type CompleteWebFlowResult, } from './web-flow.mjs';
40
+ export { serializePendingWebFlow, parsePendingWebFlow } from './pending-web-flow.mjs';
40
41
  export { MCPOAuthProvider } from './MCPOAuthProvider.mjs';
41
42
  import { MCPOAuthProvider } from './MCPOAuthProvider.mjs';
42
43
  import type { OAuthClientMetadata, OAuthConfigStorage, AgentConfig } from './types.mjs';
@@ -37,6 +37,7 @@ export { DEFAULT_CLIENT_METADATA, OAuthError, OAuthCancelledError, OAuthTimeoutE
37
37
  export { CLIFlowHandler, type CLIFlowHandlerConfig } from './CLIFlowHandler';
38
38
  export { NonInteractiveFlowHandler, type NonInteractiveFlowHandlerConfig } from './NonInteractiveFlowHandler';
39
39
  export { startWebOAuthFlow, completeWebOAuthFlow, safeReturnTo, InMemoryPendingFlowStore, InvalidOrExpiredFlowError, StateMismatchError, BrowserBindingRequiredError, TokenExchangeError, ProtectedResourceMetadataError, AgentVanishedDuringFlowError, AgentChangedDuringFlowError, ConfidentialClientNotAllowedError, DEFAULT_WEB_FLOW_TTL_MS, type PendingWebFlow, type PendingWebFlowStore, type PendingFlowStore, type StartWebFlowOptions, type StartWebFlowResult, type CompleteWebFlowOptions, type CompleteWebFlowResult, } from './web-flow';
40
+ export { serializePendingWebFlow, parsePendingWebFlow } from './pending-web-flow';
40
41
  export { MCPOAuthProvider } from './MCPOAuthProvider';
41
42
  import { MCPOAuthProvider } from './MCPOAuthProvider';
42
43
  import type { OAuthClientMetadata, OAuthConfigStorage, AgentConfig } from './types';
@@ -62,11 +62,13 @@ __export(oauth_exports, {
62
62
  hasValidatedMcpAuthorizationRequirements: () => import_authorization_required.hasValidatedMcpAuthorizationRequirements,
63
63
  isEnvSecretReference: () => import_secret_resolver.isEnvSecretReference,
64
64
  isOAuthRequired: () => isOAuthRequired,
65
+ parsePendingWebFlow: () => import_pending_web_flow.parsePendingWebFlow,
65
66
  parseWWWAuthenticate: () => import_diagnostics.parseWWWAuthenticate,
66
67
  probeAuthChallenge: () => import_authorization_required.probeAuthChallenge,
67
68
  resolveSecret: () => import_secret_resolver.resolveSecret,
68
69
  runAuthDiagnosis: () => import_diagnose.runAuthDiagnosis,
69
70
  safeReturnTo: () => import_web_flow.safeReturnTo,
71
+ serializePendingWebFlow: () => import_pending_web_flow.serializePendingWebFlow,
70
72
  startWebOAuthFlow: () => import_web_flow.startWebOAuthFlow,
71
73
  supportsDynamicRegistration: () => import_discovery.supportsDynamicRegistration,
72
74
  supportsOAuth: () => import_discovery.supportsOAuth,
@@ -81,6 +83,7 @@ var import_types = require('./types.js');
81
83
  var import_CLIFlowHandler = require('./CLIFlowHandler.js');
82
84
  var import_NonInteractiveFlowHandler = require('./NonInteractiveFlowHandler.js');
83
85
  var import_web_flow = require('./web-flow.js');
86
+ var import_pending_web_flow = require('./pending-web-flow.js');
84
87
  var import_MCPOAuthProvider = require('./MCPOAuthProvider.js');
85
88
  var import_MCPOAuthProvider2 = require('./MCPOAuthProvider.js');
86
89
  var import_CLIFlowHandler2 = require('./CLIFlowHandler.js');
@@ -214,11 +217,13 @@ function getEffectiveAuthToken(agent) {
214
217
  hasValidatedMcpAuthorizationRequirements,
215
218
  isEnvSecretReference,
216
219
  isOAuthRequired,
220
+ parsePendingWebFlow,
217
221
  parseWWWAuthenticate,
218
222
  probeAuthChallenge,
219
223
  resolveSecret,
220
224
  runAuthDiagnosis,
221
225
  safeReturnTo,
226
+ serializePendingWebFlow,
222
227
  startWebOAuthFlow,
223
228
  supportsDynamicRegistration,
224
229
  supportsOAuth,
@@ -25,6 +25,7 @@ import {
25
25
  ConfidentialClientNotAllowedError,
26
26
  DEFAULT_WEB_FLOW_TTL_MS
27
27
  } from "./web-flow.mjs";
28
+ import { serializePendingWebFlow, parsePendingWebFlow } from "./pending-web-flow.mjs";
28
29
  import { MCPOAuthProvider } from "./MCPOAuthProvider.mjs";
29
30
  import { MCPOAuthProvider as MCPOAuthProvider2 } from "./MCPOAuthProvider.mjs";
30
31
  import { CLIFlowHandler as CLIFlowHandler2 } from "./CLIFlowHandler.mjs";
@@ -183,11 +184,13 @@ export {
183
184
  hasValidatedMcpAuthorizationRequirements,
184
185
  isEnvSecretReference,
185
186
  isOAuthRequired,
187
+ parsePendingWebFlow,
186
188
  parseWWWAuthenticate,
187
189
  probeAuthChallenge,
188
190
  resolveSecret,
189
191
  runAuthDiagnosis,
190
192
  safeReturnTo,
193
+ serializePendingWebFlow,
191
194
  startWebOAuthFlow,
192
195
  supportsDynamicRegistration,
193
196
  supportsOAuth,
@@ -0,0 +1,16 @@
1
+ import type { PendingWebFlow } from './web-flow.mjs';
2
+ /**
3
+ * Serialize a pending flow for a durable store, preserving unknown fields.
4
+ * Throws for malformed SDK fields or JSON.stringify failures. The payload
5
+ * contains PKCE/client secrets; the store owns encryption, TTL and atomic consume.
6
+ */
7
+ export declare function serializePendingWebFlow(flow: PendingWebFlow): string;
8
+ /**
9
+ * Validate a JSON string or decoded JSON value (e.g. PostgreSQL jsonb), and revive
10
+ * createdAt/expiresAt as Dates. Unknown fields (including client metadata)
11
+ * pass through unchanged. Malformed input
12
+ * returns null. Expiry and issuer trust are enforced by the store/callback,
13
+ * not by this parser; legacy rows without a frozen issuer remain parseable.
14
+ * The store must also bind the parsed state to the key it consumed.
15
+ */
16
+ export declare function parsePendingWebFlow(json: unknown): PendingWebFlow | null;
@@ -0,0 +1,16 @@
1
+ import type { PendingWebFlow } from './web-flow';
2
+ /**
3
+ * Serialize a pending flow for a durable store, preserving unknown fields.
4
+ * Throws for malformed SDK fields or JSON.stringify failures. The payload
5
+ * contains PKCE/client secrets; the store owns encryption, TTL and atomic consume.
6
+ */
7
+ export declare function serializePendingWebFlow(flow: PendingWebFlow): string;
8
+ /**
9
+ * Validate a JSON string or decoded JSON value (e.g. PostgreSQL jsonb), and revive
10
+ * createdAt/expiresAt as Dates. Unknown fields (including client metadata)
11
+ * pass through unchanged. Malformed input
12
+ * returns null. Expiry and issuer trust are enforced by the store/callback,
13
+ * not by this parser; legacy rows without a frozen issuer remain parseable.
14
+ * The store must also bind the parsed state to the key it consumed.
15
+ */
16
+ export declare function parsePendingWebFlow(json: unknown): PendingWebFlow | null;
@@ -0,0 +1,66 @@
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 __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+ var pending_web_flow_exports = {};
20
+ __export(pending_web_flow_exports, {
21
+ parsePendingWebFlow: () => parsePendingWebFlow,
22
+ serializePendingWebFlow: () => serializePendingWebFlow
23
+ });
24
+ module.exports = __toCommonJS(pending_web_flow_exports);
25
+ var import_auth = require("@modelcontextprotocol/sdk/shared/auth.js");
26
+ var import_zod = require("zod");
27
+ const persistedDate = import_zod.z.iso.datetime({ offset: true }).transform((value) => new Date(value)).pipe(import_zod.z.date());
28
+ const pendingWebFlowShape = {
29
+ state: import_zod.z.string(),
30
+ agentId: import_zod.z.string(),
31
+ agentUrl: import_zod.z.string(),
32
+ codeVerifier: import_zod.z.string(),
33
+ redirectUri: import_zod.z.string(),
34
+ resource: import_zod.z.string().optional(),
35
+ resourceOverride: import_zod.z.string().optional(),
36
+ resourceOverrideAction: import_zod.z.enum(["set", "clear"]).optional(),
37
+ resourceOverrideSnapshot: import_zod.z.string().nullable().optional(),
38
+ scope: import_zod.z.string().optional(),
39
+ authorizationServerUrl: import_zod.z.string(),
40
+ authorizationServerIssuer: import_zod.z.string().optional(),
41
+ // The MCP schema strips extensions and catches invalid issuer values. Stored
42
+ // credentials must retain extensions and reject a malformed issuer instead.
43
+ clientInformation: import_auth.OAuthClientInformationSchema.extend({ issuer: import_zod.z.string().optional() }).loose(),
44
+ createdAt: persistedDate,
45
+ expiresAt: persistedDate,
46
+ carry: import_zod.z.record(import_zod.z.string(), import_zod.z.unknown()).optional()
47
+ };
48
+ const persistedPendingWebFlowSchema = import_zod.z.looseObject(pendingWebFlowShape);
49
+ function serializePendingWebFlow(flow) {
50
+ const json = JSON.stringify(flow);
51
+ if (!parsePendingWebFlow(json)) throw new TypeError("Invalid PendingWebFlow payload");
52
+ return json;
53
+ }
54
+ function parsePendingWebFlow(json) {
55
+ try {
56
+ const parsed = persistedPendingWebFlowSchema.safeParse(typeof json === "string" ? JSON.parse(json) : json);
57
+ return parsed.success ? parsed.data : null;
58
+ } catch {
59
+ return null;
60
+ }
61
+ }
62
+ // Annotate the CommonJS export names for ESM import in node:
63
+ 0 && (module.exports = {
64
+ parsePendingWebFlow,
65
+ serializePendingWebFlow
66
+ });
@@ -0,0 +1,41 @@
1
+ import { OAuthClientInformationSchema } from "@modelcontextprotocol/sdk/shared/auth.js";
2
+ import { z } from "zod";
3
+ const persistedDate = z.iso.datetime({ offset: true }).transform((value) => new Date(value)).pipe(z.date());
4
+ const pendingWebFlowShape = {
5
+ state: z.string(),
6
+ agentId: z.string(),
7
+ agentUrl: z.string(),
8
+ codeVerifier: z.string(),
9
+ redirectUri: z.string(),
10
+ resource: z.string().optional(),
11
+ resourceOverride: z.string().optional(),
12
+ resourceOverrideAction: z.enum(["set", "clear"]).optional(),
13
+ resourceOverrideSnapshot: z.string().nullable().optional(),
14
+ scope: z.string().optional(),
15
+ authorizationServerUrl: z.string(),
16
+ authorizationServerIssuer: z.string().optional(),
17
+ // The MCP schema strips extensions and catches invalid issuer values. Stored
18
+ // credentials must retain extensions and reject a malformed issuer instead.
19
+ clientInformation: OAuthClientInformationSchema.extend({ issuer: z.string().optional() }).loose(),
20
+ createdAt: persistedDate,
21
+ expiresAt: persistedDate,
22
+ carry: z.record(z.string(), z.unknown()).optional()
23
+ };
24
+ const persistedPendingWebFlowSchema = z.looseObject(pendingWebFlowShape);
25
+ function serializePendingWebFlow(flow) {
26
+ const json = JSON.stringify(flow);
27
+ if (!parsePendingWebFlow(json)) throw new TypeError("Invalid PendingWebFlow payload");
28
+ return json;
29
+ }
30
+ function parsePendingWebFlow(json) {
31
+ try {
32
+ const parsed = persistedPendingWebFlowSchema.safeParse(typeof json === "string" ? JSON.parse(json) : json);
33
+ return parsed.success ? parsed.data : null;
34
+ } catch {
35
+ return null;
36
+ }
37
+ }
38
+ export {
39
+ parsePendingWebFlow,
40
+ serializePendingWebFlow
41
+ };
@@ -223,7 +223,7 @@ async function completeWebOAuthFlow(opts) {
223
223
  throw new StateMismatchError();
224
224
  }
225
225
  const flow = await pendingFlowStore.consume(state);
226
- if (!flow || flow.expiresAt.getTime() < Date.now()) {
226
+ if (!flow || flow.expiresAt.getTime() <= Date.now()) {
227
227
  throw new InvalidOrExpiredFlowError(state);
228
228
  }
229
229
  const guardedFetch = createSsrfSafeOAuthFetch(fetchFn, allowHttp);
@@ -345,14 +345,14 @@ class InMemoryPendingFlowStore {
345
345
  const flow = this.flows.get(state);
346
346
  if (!flow) return null;
347
347
  this.flows.delete(state);
348
- if (flow.expiresAt.getTime() < Date.now()) return null;
348
+ if (flow.expiresAt.getTime() <= Date.now()) return null;
349
349
  return flow;
350
350
  }
351
351
  async cleanupExpired() {
352
352
  const now = Date.now();
353
353
  let removed = 0;
354
354
  for (const [state, flow] of this.flows) {
355
- if (flow.expiresAt.getTime() < now) {
355
+ if (flow.expiresAt.getTime() <= now) {
356
356
  this.flows.delete(state);
357
357
  removed++;
358
358
  }
@@ -202,7 +202,7 @@ async function completeWebOAuthFlow(opts) {
202
202
  throw new StateMismatchError();
203
203
  }
204
204
  const flow = await pendingFlowStore.consume(state);
205
- if (!flow || flow.expiresAt.getTime() < Date.now()) {
205
+ if (!flow || flow.expiresAt.getTime() <= Date.now()) {
206
206
  throw new InvalidOrExpiredFlowError(state);
207
207
  }
208
208
  const guardedFetch = createSsrfSafeOAuthFetch(fetchFn, allowHttp);
@@ -324,14 +324,14 @@ class InMemoryPendingFlowStore {
324
324
  const flow = this.flows.get(state);
325
325
  if (!flow) return null;
326
326
  this.flows.delete(state);
327
- if (flow.expiresAt.getTime() < Date.now()) return null;
327
+ if (flow.expiresAt.getTime() <= Date.now()) return null;
328
328
  return flow;
329
329
  }
330
330
  async cleanupExpired() {
331
331
  const now = Date.now();
332
332
  let removed = 0;
333
333
  for (const [state, flow] of this.flows) {
334
- if (flow.expiresAt.getTime() < now) {
334
+ if (flow.expiresAt.getTime() <= now) {
335
335
  this.flows.delete(state);
336
336
  removed++;
337
337
  }
@@ -543,6 +543,10 @@ export declare class AgentClient {
543
543
  resolveCreativeFormatWireMode(taskType: 'sync_creatives' | 'create_media_buy' | 'update_media_buy', options?: Pick<TaskOptions, 'signal' | 'transport'>): Promise<CreativeFormatWireMode>;
544
544
  /** Scope token for a tenant-bound, application-owned capability preflight. */
545
545
  getCapabilityEvidenceScope(): import('./SingleAgentClient.mjs').CapabilityEvidenceScope;
546
+ /** Drop this client's discovery evidence and its shared `discoveryCache` entry. */
547
+ invalidateDiscoveryCache(options?: Pick<TaskOptions, 'transport'>): Promise<void>;
548
+ /** Pre-seed the shared `discoveryCache` so peer clients skip discovery within the TTL. */
549
+ primeDiscoveryCache(seed: import('./SingleAgentClient.mjs').AgentDiscoverySeed): Promise<boolean>;
546
550
  /** Install fresh capability evidence without making a redundant probe. */
547
551
  primeCapabilities(snapshot: import('./SingleAgentClient.mjs').CapabilityEvidenceSnapshot): boolean;
548
552
  /**
@@ -543,6 +543,10 @@ export declare class AgentClient {
543
543
  resolveCreativeFormatWireMode(taskType: 'sync_creatives' | 'create_media_buy' | 'update_media_buy', options?: Pick<TaskOptions, 'signal' | 'transport'>): Promise<CreativeFormatWireMode>;
544
544
  /** Scope token for a tenant-bound, application-owned capability preflight. */
545
545
  getCapabilityEvidenceScope(): import('./SingleAgentClient').CapabilityEvidenceScope;
546
+ /** Drop this client's discovery evidence and its shared `discoveryCache` entry. */
547
+ invalidateDiscoveryCache(options?: Pick<TaskOptions, 'transport'>): Promise<void>;
548
+ /** Pre-seed the shared `discoveryCache` so peer clients skip discovery within the TTL. */
549
+ primeDiscoveryCache(seed: import('./SingleAgentClient').AgentDiscoverySeed): Promise<boolean>;
546
550
  /** Install fresh capability evidence without making a redundant probe. */
547
551
  primeCapabilities(snapshot: import('./SingleAgentClient').CapabilityEvidenceSnapshot): boolean;
548
552
  /**
@@ -805,6 +805,14 @@ class AgentClient {
805
805
  getCapabilityEvidenceScope() {
806
806
  return this.client.getCapabilityEvidenceScope();
807
807
  }
808
+ /** Drop this client's discovery evidence and its shared `discoveryCache` entry. */
809
+ invalidateDiscoveryCache(options) {
810
+ return this.client.invalidateDiscoveryCache(options);
811
+ }
812
+ /** Pre-seed the shared `discoveryCache` so peer clients skip discovery within the TTL. */
813
+ primeDiscoveryCache(seed) {
814
+ return this.client.primeDiscoveryCache(seed);
815
+ }
808
816
  /** Install fresh capability evidence without making a redundant probe. */
809
817
  primeCapabilities(snapshot) {
810
818
  return this.client.primeCapabilities(snapshot);
@@ -773,6 +773,14 @@ class AgentClient {
773
773
  getCapabilityEvidenceScope() {
774
774
  return this.client.getCapabilityEvidenceScope();
775
775
  }
776
+ /** Drop this client's discovery evidence and its shared `discoveryCache` entry. */
777
+ invalidateDiscoveryCache(options) {
778
+ return this.client.invalidateDiscoveryCache(options);
779
+ }
780
+ /** Pre-seed the shared `discoveryCache` so peer clients skip discovery within the TTL. */
781
+ primeDiscoveryCache(seed) {
782
+ return this.client.primeDiscoveryCache(seed);
783
+ }
776
784
  /** Install fresh capability evidence without making a redundant probe. */
777
785
  primeCapabilities(snapshot) {
778
786
  return this.client.primeCapabilities(snapshot);
@@ -14,6 +14,7 @@ import { type WebhookHeaderValue, type WebhookHeadersLike } from '../webhooks/in
14
14
  import { type WebhookRegistration, type WebhookRegistrationStore } from './webhook-registration.mjs';
15
15
  import { type ReplayStore, type RevocationStore, type JwksResolver, type WebhookSignatureErrorCode, type ResolvedAgentJwksResolverOptions } from '../signing/server.mjs';
16
16
  import type { AdcpCapabilities, FeatureName } from '../utils/capabilities.mjs';
17
+ import { type AgentDiscoveryCacheConfig } from './agent-discovery-cache.mjs';
17
18
  import { BuyerAccountRegistry, type AccountPolicy, type BuyerAccountStorage } from './buyer-account-registry.mjs';
18
19
  import type { ProductCache } from './product-cache.mjs';
19
20
  import { type ResolveAccountOptions } from './account-resolution.mjs';
@@ -208,6 +209,21 @@ export interface SingleAgentClientConfig extends ConversationConfig {
208
209
  /** Trusted stable caller identity for durable registry partitioning. Default is credential fingerprint. */
209
210
  accountRegistryScope?: string;
210
211
  productCache?: ProductCache;
212
+ /**
213
+ * Share endpoint discovery, the `tools/list` schema map and
214
+ * `get_adcp_capabilities` across client instances. Opt-in: nothing is shared
215
+ * unless a cache and a caller-owned `authIdentity` are supplied.
216
+ *
217
+ * Entries are keyed by agent URL, `authIdentity`, the pinned AdCP version, the
218
+ * non-correlation request headers (tenant/routing headers included), the
219
+ * signing identity and the transport policy (`allowPrivateIp`,
220
+ * `maxResponseBytes`), and expire after `ttlMs`. Synthetic capabilities
221
+ * (a seller whose capabilities call failed or that has no
222
+ * `get_adcp_capabilities`) are never shared, and calls that use a scoped
223
+ * `trustedFetchFn` bypass the cache entirely.
224
+ * See `docs/guides/DISCOVERY-CACHE-AND-SESSION-REUSE.md`.
225
+ */
226
+ discoveryCache?: AgentDiscoveryCacheConfig;
211
227
  /** Durable storage for restart-safe A2A human continuations. */
212
228
  deferredStorage?: DeferredTaskStorage;
213
229
  /** Resolve current trusted agent configuration for a persisted continuation. */
@@ -489,6 +505,21 @@ export interface CapabilityEvidenceSnapshot {
489
505
  /** `tools/list` input-schema properties keyed by tool name; optional when capabilities already carry discoveredTools. */
490
506
  toolSchemas?: Readonly<Record<string, Readonly<Record<string, unknown>>>>;
491
507
  }
508
+ /** Capability evidence to pre-seed into a shared `discoveryCache`. */
509
+ export interface AgentDiscoverySeed {
510
+ /** Authoritative capabilities (never synthetic). */
511
+ capabilities: AdcpCapabilities;
512
+ /** `tools/list` input-schema properties keyed by tool name; optional when capabilities carry discoveredTools. */
513
+ toolSchemas?: Readonly<Record<string, Readonly<Record<string, unknown>>>>;
514
+ /**
515
+ * The MCP endpoint serving this agent, to skip endpoint probing. Must be a
516
+ * credential-free URL on the configured agent's origin, without query or fragment.
517
+ */
518
+ endpoint?: {
519
+ agentUri: string;
520
+ mcpEra?: 'legacy' | 'modern';
521
+ };
522
+ }
492
523
  export declare class SingleAgentClient {
493
524
  private agent;
494
525
  private config;
@@ -522,6 +553,13 @@ export declare class SingleAgentClient {
522
553
  private primedCapabilitiesExpiresAt?;
523
554
  private capabilityEvidenceScopeKey;
524
555
  private capabilityEvidenceAuthMaterial?;
556
+ private capabilitiesFromSharedCache;
557
+ private discoveryEpoch;
558
+ private discoveredEndpointKey?;
559
+ private discoveredEndpointEpoch?;
560
+ private discoveredEndpointExpiresAt?;
561
+ private sharedEvidenceEpoch?;
562
+ private sharedEvidenceKey?;
525
563
  private _v2WarningFired;
526
564
  private _syntheticV3WarningFired;
527
565
  private _syntheticV2WarningFired;
@@ -1443,6 +1481,17 @@ export declare class SingleAgentClient {
1443
1481
  * ```
1444
1482
  */
1445
1483
  getCapabilities(options?: ReadRequestOptions): Promise<AdcpCapabilities>;
1484
+ /**
1485
+ * Serve capabilities from the shared `discoveryCache`, or discover them live
1486
+ * as the single in-process "leader" for this cache key. Concurrent clients
1487
+ * for the same key wait for the leader under their *own* signal and deadline;
1488
+ * a leader that fails or is cancelled never fails its followers, which then
1489
+ * discover for themselves.
1490
+ */
1491
+ private discoverCapabilitiesThroughSharedCache;
1492
+ /** Install capabilities from a shared entry; `undefined` when the entry is not usable evidence. */
1493
+ private installSharedCapabilities;
1494
+ private discoverCapabilitiesLive;
1446
1495
  /**
1447
1496
  * Return the client-bound scope required by {@link primeCapabilities}.
1448
1497
  *
@@ -1463,6 +1512,105 @@ export declare class SingleAgentClient {
1463
1512
  * within their own request scope.
1464
1513
  */
1465
1514
  primeCapabilities(snapshot: CapabilityEvidenceSnapshot): boolean;
1515
+ /** Which kind of credential this client presents (never its value), so an unauthenticated client cannot adopt an authenticated one's evidence. */
1516
+ private discoveryCredentialKind;
1517
+ /** Epoch of this client's evidence for the call's effective shared key; `undefined` without a shared cache. */
1518
+ private discoveryEpochSnapshot;
1519
+ private discoveryEpochIs;
1520
+ /** The latest invalidation that applies to `key`: its own, combined with the cache's floor of forgotten ones. */
1521
+ private sharedInvalidationRecord;
1522
+ private sharedInvalidationEpoch;
1523
+ private bumpSharedInvalidationEpoch;
1524
+ /**
1525
+ * Remember which key the local capability evidence belongs to and, unless it
1526
+ * is application-owned (`primeCapabilities`), the shared invalidation epoch it
1527
+ * was obtained under. Application-owned evidence keeps its caller-declared
1528
+ * freshness and is not discarded by another instance's invalidation.
1529
+ */
1530
+ private recordSharedEvidence;
1531
+ /** Non-secret fingerprint of the request-signing identity, so keys never mix signing identities. */
1532
+ private discoverySigningFingerprint;
1533
+ /**
1534
+ * Shared-discovery key for the effective transport policy of this call, or
1535
+ * `undefined` when sharing is off or the call uses a scoped `trustedFetchFn`
1536
+ * (whose network boundary is per-call, so its evidence is never shared).
1537
+ */
1538
+ private sharedDiscoveryKey;
1539
+ /**
1540
+ * Run a shared-cache operation under the caller's signal and a fixed backend
1541
+ * deadline, so an unresponsive store can neither make a call uncancellable nor
1542
+ * stall it beyond {@link SHARED_DISCOVERY_CACHE_TIMEOUT_MS}. Rejects on the
1543
+ * caller's abort or when the backend fails or times out; callers decide which
1544
+ * of those is a miss.
1545
+ */
1546
+ private boundedCacheOperation;
1547
+ /**
1548
+ * Run one backend mutation (or read-modify-write) for a shared key strictly
1549
+ * after every earlier mutation of that key in this process has actually
1550
+ * settled. The caller's wait is still bounded: an unresponsive backend makes
1551
+ * the caller see a miss, but later mutations stay queued behind the hung
1552
+ * operation, so an old callback can never land after a newer one.
1553
+ *
1554
+ * The queue is bounded. A `droppable` mutation (a write or cleanup) is
1555
+ * abandoned when its caller stopped waiting before it started, and is refused
1556
+ * when the key's queue is full; refusal is a failed write, never a call
1557
+ * failure. A `delete` is never refused for a known key: while one is queued
1558
+ * and not yet started, a newer invalidation joins it. Only for a new key beyond
1559
+ * the key cap is a delete refused — the invalidation tombstone still hides the
1560
+ * entry from this process's readers.
1561
+ */
1562
+ private serializedCacheMutation;
1563
+ /** Is this stored entry structurally sound and not expired (before any caller-TTL cap)? */
1564
+ private isLiveSharedEntry;
1565
+ /**
1566
+ * Read a fresh, structurally valid shared entry. A backend failure or
1567
+ * timeout is a miss, never a call failure; the caller's own abort propagates.
1568
+ */
1569
+ private readSharedDiscovery;
1570
+ /**
1571
+ * Merge fresh evidence into the shared entry; the merged entry never outlives
1572
+ * its oldest part. Returns the stored entry, or `undefined` when it was not
1573
+ * stored: automatic writes
1574
+ * ignore a `false` (a failed write only costs a later rediscovery), while
1575
+ * {@link primeDiscoveryCache} reports it.
1576
+ */
1577
+ private writeSharedDiscovery;
1578
+ /** Is `agentUri` a credential-free URL on the configured agent's origin (all discovery ever tries)? */
1579
+ private isDiscoverableEndpoint;
1580
+ /** Adopt a previously discovered MCP endpoint instead of re-probing the agent. */
1581
+ private adoptSharedEndpoint;
1582
+ /**
1583
+ * Drop discovery evidence for this client: its in-memory capability and
1584
+ * tool-schema caches, the discovered endpoint, and the shared
1585
+ * `discoveryCache` entry (when configured). The next call rediscovers.
1586
+ *
1587
+ * Call this when you learn the seller changed (a deploy, a version bump, a
1588
+ * capability-dependent error you observed). The SDK also invalidates by
1589
+ * itself when a feature check fails against shared evidence, and when a
1590
+ * seller answers with a version or capability error.
1591
+ */
1592
+ invalidateDiscoveryCache(options?: Pick<TaskOptions, 'transport'>): Promise<void>;
1593
+ /**
1594
+ * Pre-seed the shared `discoveryCache` with capability evidence the caller
1595
+ * already holds (for example from a registry sync), so no client sharing
1596
+ * this identity probes the seller within the TTL. Unlike
1597
+ * {@link primeCapabilities} the seeded evidence outlives this instance.
1598
+ *
1599
+ * Returns `true` only once the backing cache has accepted the entry. Returns
1600
+ * `false` — having seeded nothing — when sharing is not configured, the
1601
+ * client uses a scoped `trustedFetchFn`, or the evidence is synthetic,
1602
+ * malformed or not cloneable. When the cache rejects the write or does not
1603
+ * answer within the backend deadline, the result is also `false`, but the
1604
+ * outcome is indeterminate: a write already handed to the backend may still
1605
+ * land, whereas one still queued behind earlier operations is dropped. Treat
1606
+ * `false` as "not confirmed", and seed again (or invalidate) rather than
1607
+ * assuming the cache is empty. Seed `endpoint` as well
1608
+ * to skip the endpoint probe on the first call; without it that probe still
1609
+ * runs once per cold client.
1610
+ */
1611
+ primeDiscoveryCache(seed: AgentDiscoverySeed): Promise<boolean>;
1612
+ /** Drop shared evidence when a seller answers with an error that says our cached view of it is stale. */
1613
+ private invalidateDiscoveryOnCapabilityError;
1466
1614
  /**
1467
1615
  * Emit a one-time warning when the agent reports v2 capabilities.
1468
1616
  *
@@ -1564,6 +1712,12 @@ export declare class SingleAgentClient {
1564
1712
  * with an actionable error message.
1565
1713
  */
1566
1714
  require(...features: FeatureName[]): Promise<void>;
1715
+ /**
1716
+ * Throw {@link FeatureUnsupportedError} when a feature is missing, deciding on
1717
+ * live capabilities when the refusal would rest on shared evidence that may
1718
+ * predate a seller upgrade.
1719
+ */
1720
+ private assertFeaturesSupported;
1567
1721
  /**
1568
1722
  * Force-refresh cached capabilities from the server.
1569
1723
  * Useful when seller capabilities may have changed.