agentfootprint 12.0.1 → 12.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +1 -1
- package/CAPABILITIES.md +3 -0
- package/ai-instructions/claude-code/SKILL.md +1 -1
- package/dist/adapters/mcp/agentcoreRuntime/invoke.js +113 -7
- package/dist/adapters/mcp/agentcoreRuntime/invoke.js.map +1 -1
- package/dist/adapters/mcp/agentcoreRuntime/session.js +21 -21
- package/dist/adapters/mcp/agentcoreRuntime/session.js.map +1 -1
- package/dist/adapters/mcp/agentcoreRuntime/transport.js +79 -5
- package/dist/adapters/mcp/agentcoreRuntime/transport.js.map +1 -1
- package/dist/core/Agent.js +6 -0
- package/dist/core/Agent.js.map +1 -1
- package/dist/core/agent/stages/toolCalls.js +4 -0
- package/dist/core/agent/stages/toolCalls.js.map +1 -1
- package/dist/core/slots/buildToolsSlot.js +8 -0
- package/dist/core/slots/buildToolsSlot.js.map +1 -1
- package/dist/esm/adapters/mcp/agentcoreRuntime/invoke.d.ts +23 -4
- package/dist/esm/adapters/mcp/agentcoreRuntime/invoke.js +112 -6
- package/dist/esm/adapters/mcp/agentcoreRuntime/invoke.js.map +1 -1
- package/dist/esm/adapters/mcp/agentcoreRuntime/session.d.ts +20 -6
- package/dist/esm/adapters/mcp/agentcoreRuntime/session.js +21 -21
- package/dist/esm/adapters/mcp/agentcoreRuntime/session.js.map +1 -1
- package/dist/esm/adapters/mcp/agentcoreRuntime/transport.js +81 -7
- package/dist/esm/adapters/mcp/agentcoreRuntime/transport.js.map +1 -1
- package/dist/esm/core/Agent.js +6 -0
- package/dist/esm/core/Agent.js.map +1 -1
- package/dist/esm/core/agent/stages/toolCalls.js +4 -0
- package/dist/esm/core/agent/stages/toolCalls.js.map +1 -1
- package/dist/esm/core/slots/buildToolsSlot.d.ts +12 -0
- package/dist/esm/core/slots/buildToolsSlot.js +8 -0
- package/dist/esm/core/slots/buildToolsSlot.js.map +1 -1
- package/dist/esm/events/payloads.d.ts +41 -0
- package/dist/esm/events/registry.d.ts +3 -1
- package/dist/esm/events/registry.js +2 -0
- package/dist/esm/events/registry.js.map +1 -1
- package/dist/esm/identity/types.d.ts +7 -3
- package/dist/esm/identity/types.js.map +1 -1
- package/dist/esm/index.d.ts +1 -1
- package/dist/esm/index.js +4 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/lib/boundedJson.d.ts +14 -7
- package/dist/esm/lib/boundedJson.js +14 -7
- package/dist/esm/lib/boundedJson.js.map +1 -1
- package/dist/esm/mcp/callChecks.d.ts +160 -0
- package/dist/esm/mcp/callChecks.js +237 -0
- package/dist/esm/mcp/callChecks.js.map +1 -0
- package/dist/esm/mcp/callLifetime.js +5 -2
- package/dist/esm/mcp/callLifetime.js.map +1 -1
- package/dist/esm/mcp/clientPort.d.ts +78 -0
- package/dist/esm/mcp/clientPort.js +33 -0
- package/dist/esm/mcp/clientPort.js.map +1 -0
- package/dist/esm/mcp/gatewayTransport.js +13 -3
- package/dist/esm/mcp/gatewayTransport.js.map +1 -1
- package/dist/esm/mcp/index.d.ts +11 -1
- package/dist/esm/mcp/index.js +15 -0
- package/dist/esm/mcp/index.js.map +1 -1
- package/dist/esm/mcp/listingGenerations.d.ts +54 -0
- package/dist/esm/mcp/listingGenerations.js +75 -0
- package/dist/esm/mcp/listingGenerations.js.map +1 -0
- package/dist/esm/mcp/mcpClient.d.ts +18 -1
- package/dist/esm/mcp/mcpClient.js +302 -57
- package/dist/esm/mcp/mcpClient.js.map +1 -1
- package/dist/esm/mcp/mockMcpClient.js +13 -0
- package/dist/esm/mcp/mockMcpClient.js.map +1 -1
- package/dist/esm/mcp/pool/boundTool.d.ts +58 -0
- package/dist/esm/mcp/pool/boundTool.js +218 -0
- package/dist/esm/mcp/pool/boundTool.js.map +1 -0
- package/dist/esm/mcp/pool/clientSet.d.ts +73 -0
- package/dist/esm/mcp/pool/clientSet.js +152 -0
- package/dist/esm/mcp/pool/clientSet.js.map +1 -0
- package/dist/esm/mcp/pool/definitions.d.ts +103 -0
- package/dist/esm/mcp/pool/definitions.js +168 -0
- package/dist/esm/mcp/pool/definitions.js.map +1 -0
- package/dist/esm/mcp/pool/errors.d.ts +76 -0
- package/dist/esm/mcp/pool/errors.js +91 -0
- package/dist/esm/mcp/pool/errors.js.map +1 -0
- package/dist/esm/mcp/pool/identityKey.d.ts +57 -0
- package/dist/esm/mcp/pool/identityKey.js +94 -0
- package/dist/esm/mcp/pool/identityKey.js.map +1 -0
- package/dist/esm/mcp/pool/lease.d.ts +36 -0
- package/dist/esm/mcp/pool/lease.js +51 -0
- package/dist/esm/mcp/pool/lease.js.map +1 -0
- package/dist/esm/mcp/pool/listTools.d.ts +33 -0
- package/dist/esm/mcp/pool/listTools.js +146 -0
- package/dist/esm/mcp/pool/listTools.js.map +1 -0
- package/dist/esm/mcp/pool/mcpClientPool.d.ts +121 -0
- package/dist/esm/mcp/pool/mcpClientPool.js +151 -0
- package/dist/esm/mcp/pool/mcpClientPool.js.map +1 -0
- package/dist/esm/mcp/pool/options.d.ts +183 -0
- package/dist/esm/mcp/pool/options.js +119 -0
- package/dist/esm/mcp/pool/options.js.map +1 -0
- package/dist/esm/mcp/pool/plan.d.ts +77 -0
- package/dist/esm/mcp/pool/plan.js +134 -0
- package/dist/esm/mcp/pool/plan.js.map +1 -0
- package/dist/esm/mcp/pool/pool.d.ts +307 -0
- package/dist/esm/mcp/pool/pool.js +1071 -0
- package/dist/esm/mcp/pool/pool.js.map +1 -0
- package/dist/esm/mcp/pool/pooledClient.d.ts +93 -0
- package/dist/esm/mcp/pool/pooledClient.js +90 -0
- package/dist/esm/mcp/pool/pooledClient.js.map +1 -0
- package/dist/esm/mcp/pool/record.d.ts +80 -0
- package/dist/esm/mcp/pool/record.js +75 -0
- package/dist/esm/mcp/pool/record.js.map +1 -0
- package/dist/esm/mcp/pool/sessionEnded.d.ts +24 -0
- package/dist/esm/mcp/pool/sessionEnded.js +31 -0
- package/dist/esm/mcp/pool/sessionEnded.js.map +1 -0
- package/dist/esm/mcp/pool/work.d.ts +116 -0
- package/dist/esm/mcp/pool/work.js +213 -0
- package/dist/esm/mcp/pool/work.js.map +1 -0
- package/dist/esm/mcp/requestGuard.d.ts +70 -0
- package/dist/esm/mcp/requestGuard.js +98 -0
- package/dist/esm/mcp/requestGuard.js.map +1 -0
- package/dist/esm/mcp/requestLedger.d.ts +35 -1
- package/dist/esm/mcp/requestLedger.js +76 -3
- package/dist/esm/mcp/requestLedger.js.map +1 -1
- package/dist/esm/mcp/seriesEvidence.d.ts +10 -6
- package/dist/esm/mcp/seriesEvidence.js +16 -7
- package/dist/esm/mcp/seriesEvidence.js.map +1 -1
- package/dist/esm/mcp/terminate.d.ts +94 -0
- package/dist/esm/mcp/terminate.js +184 -0
- package/dist/esm/mcp/terminate.js.map +1 -0
- package/dist/esm/mcp/throttleRetry.js +71 -7
- package/dist/esm/mcp/throttleRetry.js.map +1 -1
- package/dist/esm/mcp/toolList.d.ts +90 -0
- package/dist/esm/mcp/toolList.js +123 -0
- package/dist/esm/mcp/toolList.js.map +1 -0
- package/dist/esm/mcp/types.d.ts +197 -3
- package/dist/esm/redaction/knownStrings.js +34 -0
- package/dist/esm/redaction/knownStrings.js.map +1 -1
- package/dist/esm/tool-providers/index.d.ts +2 -2
- package/dist/esm/tool-providers/index.js +15 -1
- package/dist/esm/tool-providers/index.js.map +1 -1
- package/dist/esm/tools/mcpClientUse.d.ts +59 -0
- package/dist/esm/tools/mcpClientUse.js +216 -0
- package/dist/esm/tools/mcpClientUse.js.map +1 -0
- package/dist/esm/tools/toolProvider.d.ts +16 -0
- package/dist/esm/tools/toolSessions.d.ts +41 -0
- package/dist/esm/tools/toolSessions.js +41 -1
- package/dist/esm/tools/toolSessions.js.map +1 -1
- package/dist/events/registry.js +2 -0
- package/dist/events/registry.js.map +1 -1
- package/dist/identity/types.js.map +1 -1
- package/dist/index.js +6 -3
- package/dist/index.js.map +1 -1
- package/dist/lib/boundedJson.js +14 -7
- package/dist/lib/boundedJson.js.map +1 -1
- package/dist/mcp/callChecks.js +247 -0
- package/dist/mcp/callChecks.js.map +1 -0
- package/dist/mcp/callLifetime.js +5 -2
- package/dist/mcp/callLifetime.js.map +1 -1
- package/dist/mcp/clientPort.js +38 -0
- package/dist/mcp/clientPort.js.map +1 -0
- package/dist/mcp/gatewayTransport.js +13 -3
- package/dist/mcp/gatewayTransport.js.map +1 -1
- package/dist/mcp/index.js +25 -1
- package/dist/mcp/index.js.map +1 -1
- package/dist/mcp/listingGenerations.js +80 -0
- package/dist/mcp/listingGenerations.js.map +1 -0
- package/dist/mcp/mcpClient.js +306 -59
- package/dist/mcp/mcpClient.js.map +1 -1
- package/dist/mcp/mockMcpClient.js +13 -0
- package/dist/mcp/mockMcpClient.js.map +1 -1
- package/dist/mcp/pool/boundTool.js +223 -0
- package/dist/mcp/pool/boundTool.js.map +1 -0
- package/dist/mcp/pool/clientSet.js +157 -0
- package/dist/mcp/pool/clientSet.js.map +1 -0
- package/dist/mcp/pool/definitions.js +174 -0
- package/dist/mcp/pool/definitions.js.map +1 -0
- package/dist/mcp/pool/errors.js +96 -0
- package/dist/mcp/pool/errors.js.map +1 -0
- package/dist/mcp/pool/identityKey.js +99 -0
- package/dist/mcp/pool/identityKey.js.map +1 -0
- package/dist/mcp/pool/lease.js +55 -0
- package/dist/mcp/pool/lease.js.map +1 -0
- package/dist/mcp/pool/listTools.js +150 -0
- package/dist/mcp/pool/listTools.js.map +1 -0
- package/dist/mcp/pool/mcpClientPool.js +155 -0
- package/dist/mcp/pool/mcpClientPool.js.map +1 -0
- package/dist/mcp/pool/options.js +123 -0
- package/dist/mcp/pool/options.js.map +1 -0
- package/dist/mcp/pool/plan.js +140 -0
- package/dist/mcp/pool/plan.js.map +1 -0
- package/dist/mcp/pool/pool.js +1075 -0
- package/dist/mcp/pool/pool.js.map +1 -0
- package/dist/mcp/pool/pooledClient.js +94 -0
- package/dist/mcp/pool/pooledClient.js.map +1 -0
- package/dist/mcp/pool/record.js +80 -0
- package/dist/mcp/pool/record.js.map +1 -0
- package/dist/mcp/pool/sessionEnded.js +35 -0
- package/dist/mcp/pool/sessionEnded.js.map +1 -0
- package/dist/mcp/pool/work.js +219 -0
- package/dist/mcp/pool/work.js.map +1 -0
- package/dist/mcp/requestGuard.js +106 -0
- package/dist/mcp/requestGuard.js.map +1 -0
- package/dist/mcp/requestLedger.js +76 -3
- package/dist/mcp/requestLedger.js.map +1 -1
- package/dist/mcp/seriesEvidence.js +16 -7
- package/dist/mcp/seriesEvidence.js.map +1 -1
- package/dist/mcp/terminate.js +193 -0
- package/dist/mcp/terminate.js.map +1 -0
- package/dist/mcp/throttleRetry.js +71 -7
- package/dist/mcp/throttleRetry.js.map +1 -1
- package/dist/mcp/toolList.js +128 -0
- package/dist/mcp/toolList.js.map +1 -0
- package/dist/redaction/knownStrings.js +34 -0
- package/dist/redaction/knownStrings.js.map +1 -1
- package/dist/tool-providers/index.js +20 -1
- package/dist/tool-providers/index.js.map +1 -1
- package/dist/tools/mcpClientUse.js +225 -0
- package/dist/tools/mcpClientUse.js.map +1 -0
- package/dist/tools/toolSessions.js +44 -1
- package/dist/tools/toolSessions.js.map +1 -1
- package/dist/types/adapters/mcp/agentcoreRuntime/invoke.d.ts +23 -4
- package/dist/types/adapters/mcp/agentcoreRuntime/invoke.d.ts.map +1 -1
- package/dist/types/adapters/mcp/agentcoreRuntime/session.d.ts +20 -6
- package/dist/types/adapters/mcp/agentcoreRuntime/session.d.ts.map +1 -1
- package/dist/types/adapters/mcp/agentcoreRuntime/transport.d.ts.map +1 -1
- package/dist/types/core/Agent.d.ts.map +1 -1
- package/dist/types/core/agent/stages/toolCalls.d.ts.map +1 -1
- package/dist/types/core/slots/buildToolsSlot.d.ts +12 -0
- package/dist/types/core/slots/buildToolsSlot.d.ts.map +1 -1
- package/dist/types/events/payloads.d.ts +41 -0
- package/dist/types/events/payloads.d.ts.map +1 -1
- package/dist/types/events/registry.d.ts +3 -1
- package/dist/types/events/registry.d.ts.map +1 -1
- package/dist/types/identity/types.d.ts +7 -3
- package/dist/types/identity/types.d.ts.map +1 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/lib/boundedJson.d.ts +14 -7
- package/dist/types/lib/boundedJson.d.ts.map +1 -1
- package/dist/types/mcp/callChecks.d.ts +161 -0
- package/dist/types/mcp/callChecks.d.ts.map +1 -0
- package/dist/types/mcp/callLifetime.d.ts.map +1 -1
- package/dist/types/mcp/clientPort.d.ts +79 -0
- package/dist/types/mcp/clientPort.d.ts.map +1 -0
- package/dist/types/mcp/gatewayTransport.d.ts.map +1 -1
- package/dist/types/mcp/index.d.ts +11 -1
- package/dist/types/mcp/index.d.ts.map +1 -1
- package/dist/types/mcp/listingGenerations.d.ts +55 -0
- package/dist/types/mcp/listingGenerations.d.ts.map +1 -0
- package/dist/types/mcp/mcpClient.d.ts +18 -1
- package/dist/types/mcp/mcpClient.d.ts.map +1 -1
- package/dist/types/mcp/mockMcpClient.d.ts.map +1 -1
- package/dist/types/mcp/pool/boundTool.d.ts +59 -0
- package/dist/types/mcp/pool/boundTool.d.ts.map +1 -0
- package/dist/types/mcp/pool/clientSet.d.ts +74 -0
- package/dist/types/mcp/pool/clientSet.d.ts.map +1 -0
- package/dist/types/mcp/pool/definitions.d.ts +104 -0
- package/dist/types/mcp/pool/definitions.d.ts.map +1 -0
- package/dist/types/mcp/pool/errors.d.ts +77 -0
- package/dist/types/mcp/pool/errors.d.ts.map +1 -0
- package/dist/types/mcp/pool/identityKey.d.ts +58 -0
- package/dist/types/mcp/pool/identityKey.d.ts.map +1 -0
- package/dist/types/mcp/pool/lease.d.ts +37 -0
- package/dist/types/mcp/pool/lease.d.ts.map +1 -0
- package/dist/types/mcp/pool/listTools.d.ts +34 -0
- package/dist/types/mcp/pool/listTools.d.ts.map +1 -0
- package/dist/types/mcp/pool/mcpClientPool.d.ts +122 -0
- package/dist/types/mcp/pool/mcpClientPool.d.ts.map +1 -0
- package/dist/types/mcp/pool/options.d.ts +184 -0
- package/dist/types/mcp/pool/options.d.ts.map +1 -0
- package/dist/types/mcp/pool/plan.d.ts +78 -0
- package/dist/types/mcp/pool/plan.d.ts.map +1 -0
- package/dist/types/mcp/pool/pool.d.ts +308 -0
- package/dist/types/mcp/pool/pool.d.ts.map +1 -0
- package/dist/types/mcp/pool/pooledClient.d.ts +94 -0
- package/dist/types/mcp/pool/pooledClient.d.ts.map +1 -0
- package/dist/types/mcp/pool/record.d.ts +81 -0
- package/dist/types/mcp/pool/record.d.ts.map +1 -0
- package/dist/types/mcp/pool/sessionEnded.d.ts +25 -0
- package/dist/types/mcp/pool/sessionEnded.d.ts.map +1 -0
- package/dist/types/mcp/pool/work.d.ts +117 -0
- package/dist/types/mcp/pool/work.d.ts.map +1 -0
- package/dist/types/mcp/requestGuard.d.ts +71 -0
- package/dist/types/mcp/requestGuard.d.ts.map +1 -0
- package/dist/types/mcp/requestLedger.d.ts +35 -1
- package/dist/types/mcp/requestLedger.d.ts.map +1 -1
- package/dist/types/mcp/seriesEvidence.d.ts +10 -6
- package/dist/types/mcp/seriesEvidence.d.ts.map +1 -1
- package/dist/types/mcp/terminate.d.ts +95 -0
- package/dist/types/mcp/terminate.d.ts.map +1 -0
- package/dist/types/mcp/throttleRetry.d.ts.map +1 -1
- package/dist/types/mcp/toolList.d.ts +91 -0
- package/dist/types/mcp/toolList.d.ts.map +1 -0
- package/dist/types/mcp/types.d.ts +197 -3
- package/dist/types/mcp/types.d.ts.map +1 -1
- package/dist/types/redaction/knownStrings.d.ts.map +1 -1
- package/dist/types/tool-providers/index.d.ts +2 -2
- package/dist/types/tool-providers/index.d.ts.map +1 -1
- package/dist/types/tools/mcpClientUse.d.ts +60 -0
- package/dist/types/tools/mcpClientUse.d.ts.map +1 -0
- package/dist/types/tools/toolProvider.d.ts +16 -0
- package/dist/types/tools/toolProvider.d.ts.map +1 -1
- package/dist/types/tools/toolSessions.d.ts +41 -0
- package/dist/types/tools/toolSessions.d.ts.map +1 -1
- package/package.json +3 -3
|
@@ -93,7 +93,25 @@ export interface McpHttpTransport {
|
|
|
93
93
|
* reads, stores, logs or records the headers your function produces.
|
|
94
94
|
*/
|
|
95
95
|
readonly fetch?: (input: string | URL, init?: RequestInit) => Promise<Response>;
|
|
96
|
+
/**
|
|
97
|
+
* What a library-built transport keeps inside its `fetch`, stated as data:
|
|
98
|
+
* the settings that decide where a request lands and as whom, which no one can
|
|
99
|
+
* read back out of a function. `agentCoreRuntimeMcpTransport` fills it (its
|
|
100
|
+
* auth strategy, its session strategy, the bearer service, scopes and
|
|
101
|
+
* credential provider id). `mcpClientPool` compares it, with the URL and the
|
|
102
|
+
* header names, to decide whether two conversations open the same
|
|
103
|
+
* configuration (`McpClientPoolOptions.definitions`).
|
|
104
|
+
*
|
|
105
|
+
* Never a secret: names and modes only. A transport you write by hand may
|
|
106
|
+
* leave it out; your `configuration` name then covers what your `fetch` does.
|
|
107
|
+
*/
|
|
108
|
+
readonly settings?: McpTransportSettings;
|
|
96
109
|
}
|
|
110
|
+
/**
|
|
111
|
+
* The comparable settings of a transport — plain names and modes, never a
|
|
112
|
+
* credential. See {@link McpHttpTransport.settings}.
|
|
113
|
+
*/
|
|
114
|
+
export type McpTransportSettings = Readonly<Record<string, string | readonly string[]>>;
|
|
97
115
|
/**
|
|
98
116
|
* `gateway` transport — MCP over Streamable HTTP, with the auth headers vended
|
|
99
117
|
* **per request** by a {@link CredentialProvider} instead of fixed at connect
|
|
@@ -307,6 +325,25 @@ export interface McpClientOptions {
|
|
|
307
325
|
* @see McpSdk for the two static imports that produce it.
|
|
308
326
|
*/
|
|
309
327
|
readonly sdk?: McpSdk;
|
|
328
|
+
/**
|
|
329
|
+
* The JSON Schema validator a tool's `outputSchema` is checked with — the MCP
|
|
330
|
+
* SDK's own validator interface (`new AjvJsonSchemaValidator()` from
|
|
331
|
+
* `@modelcontextprotocol/sdk/validation/ajv`, `new CfWorkerJsonSchemaValidator()`,
|
|
332
|
+
* or your own).
|
|
333
|
+
*
|
|
334
|
+
* Why it exists: the SDK's `Client` checks a tool's output only for the tools
|
|
335
|
+
* of its most recent `tools/list` answer, so every tool the library hands out
|
|
336
|
+
* carries its own checks, and runs them whenever the SDK no longer holds its
|
|
337
|
+
* list: a paged list, a list a later answer replaced, a call made while a list
|
|
338
|
+
* is read — of the lists `tools()` and `refresh()` read (see
|
|
339
|
+
* `McpClient.tools()`; the client the library builds here never lists by
|
|
340
|
+
* itself). The client the library builds is handed this same validator, so
|
|
341
|
+
* one validator checks every call. Omit it and the library uses the SDK's
|
|
342
|
+
* default, loaded with the SDK itself; with `sdk`, where the library never
|
|
343
|
+
* touches its Node loader, such a call to a tool that declares an
|
|
344
|
+
* `outputSchema` is refused (`McpOutputUncheckedError`) unless you pass one.
|
|
345
|
+
*/
|
|
346
|
+
readonly jsonSchemaValidator?: McpJsonSchemaValidator;
|
|
310
347
|
/** @see McpConnectionOptions — never set on this arm. */
|
|
311
348
|
readonly connection?: undefined;
|
|
312
349
|
/**
|
|
@@ -346,10 +383,37 @@ export interface McpConnectionOptions {
|
|
|
346
383
|
/**
|
|
347
384
|
* A connection you already opened. The library never calls `connect()` on it;
|
|
348
385
|
* `close()` on the returned client closes it exactly once.
|
|
386
|
+
*
|
|
387
|
+
* Leave its tool discovery to `mcpClient`: the per-tool checks hold only for
|
|
388
|
+
* the lists `tools()` and `refresh()` read (see `McpClient.tools()`). Do not
|
|
389
|
+
* let the SDK client refresh itself (`listChanged.tools` with `autoRefresh`,
|
|
390
|
+
* which is on by default once `listChanged.tools` is given): set
|
|
391
|
+
* `autoRefresh: false` and call `refresh()` from `onChanged`, or give
|
|
392
|
+
* `mcpClient` a connection of its own. A connection of its own still needs
|
|
393
|
+
* the SDK's automatic discovery off: no `listChanged.tools`, or
|
|
394
|
+
* `autoRefresh: false` on it.
|
|
349
395
|
*/
|
|
350
396
|
readonly connection: McpConnection;
|
|
351
397
|
/** Abort the list / call paths. Rides the SDK's request options. */
|
|
352
398
|
readonly signal?: AbortSignal;
|
|
399
|
+
/**
|
|
400
|
+
* The JSON Schema validator your client checks tool output with — pass the
|
|
401
|
+
* SAME one you gave its constructor (`jsonSchemaValidator`), or the SDK's
|
|
402
|
+
* default, `new AjvJsonSchemaValidator()`.
|
|
403
|
+
*
|
|
404
|
+
* The SDK's `Client` checks a tool's output only for the tools of its most
|
|
405
|
+
* recent `tools/list` answer, so the library checks a tool itself, with this,
|
|
406
|
+
* whenever the SDK no longer holds its list: a paged list, a list a later
|
|
407
|
+
* answer replaced, a call made while a list is read. Without it, such a call
|
|
408
|
+
* to a tool that declares an `outputSchema` is refused
|
|
409
|
+
* (`McpOutputUncheckedError`); a one-page catalogue that is still the latest
|
|
410
|
+
* answer never needs it. It covers only the lists `tools()` and `refresh()`
|
|
411
|
+
* read: when the SDK client's cache is replaced some other way (its own
|
|
412
|
+
* automatic refresh, a `listTools` call of yours), the library still leaves
|
|
413
|
+
* the call to the SDK, and this validator is never asked (see
|
|
414
|
+
* `McpClient.tools()`).
|
|
415
|
+
*/
|
|
416
|
+
readonly jsonSchemaValidator?: McpJsonSchemaValidator;
|
|
353
417
|
/** @see McpClientOptions — never set on this arm. */
|
|
354
418
|
readonly transport?: undefined;
|
|
355
419
|
/** @see McpClientOptions — never set on this arm. */
|
|
@@ -376,16 +440,114 @@ export interface McpClient {
|
|
|
376
440
|
* after `mcpClient(...)` is the snapshot used to register on the
|
|
377
441
|
* agent; subsequent calls re-fetch (cheap, in-memory cached by the
|
|
378
442
|
* SDK between fetches).
|
|
443
|
+
*
|
|
444
|
+
* Every page of the server's `tools/list` answer is read: the client
|
|
445
|
+
* follows `nextCursor` until a page carries none, sending at most 100
|
|
446
|
+
* `tools/list` requests (a bound on requests, not on the catalogue's size).
|
|
447
|
+
* A list that does not end within them, or that names a cursor it already
|
|
448
|
+
* sent (a loop), is never returned cut short: the call rejects with
|
|
449
|
+
* `McpToolListIncompleteError`, whose `reason` says which and whose `tools`
|
|
450
|
+
* holds what was listed. `signal` rides every page and is checked before
|
|
451
|
+
* each page is asked for and when each answer arrives: once it has fired,
|
|
452
|
+
* nothing more is asked for and no page is accepted.
|
|
453
|
+
*
|
|
454
|
+
* Every tool keeps its checks, whatever `tools()` and `refresh()` list later —
|
|
455
|
+
* those of any `mcpClient` over the same client included. That holds only
|
|
456
|
+
* while all tool discovery on the client runs through them; see below. The
|
|
457
|
+
* SDK's `Client` checks a tool's call (a required task refused before
|
|
458
|
+
* sending; `structuredContent` required by an `outputSchema`, and matched
|
|
459
|
+
* against it) only for the tools of its most recent `tools/list` answer, so
|
|
460
|
+
* every tool returned here carries those checks itself. They are left to the
|
|
461
|
+
* SDK only for a tool of a one-page list whose answer is still the latest,
|
|
462
|
+
* with no list request out. Every other call runs the tool's own and fails
|
|
463
|
+
* with the same error: a paged list's tools, a tool held across a later
|
|
464
|
+
* `refresh()` (failed or not), a call made while a list is read. Where no JSON
|
|
465
|
+
* Schema validator is reachable (`jsonSchemaValidator` on the `sdk` and
|
|
466
|
+
* `connection` arms), such a call to a tool that declares an `outputSchema` is
|
|
467
|
+
* refused with `McpOutputUncheckedError`: before it is sent, or, when a list
|
|
468
|
+
* was read while it was out, once its answer is in, unread.
|
|
469
|
+
*
|
|
470
|
+
* What it does not cover: a listing the library does not send. Your own
|
|
471
|
+
* `listTools` calls, the SDK client's automatic discovery (`listChanged.tools`
|
|
472
|
+
* with `autoRefresh`, on by default once `listChanged.tools` is given), or any
|
|
473
|
+
* other replacement of the SDK client's cache leave a tool handed out here
|
|
474
|
+
* believing the SDK still holds its checks — so a call to it can bypass both
|
|
475
|
+
* checks, its output checks and its required-task refusal, even with
|
|
476
|
+
* `jsonSchemaValidator`. The client the library builds (the `transport` and
|
|
477
|
+
* `sdk` arms) never lists by itself; on a client you pass as `connection`,
|
|
478
|
+
* set `autoRefresh: false` and call `refresh()` from `onChanged`, or give
|
|
479
|
+
* `mcpClient` a connection of its own, which still needs the SDK's automatic
|
|
480
|
+
* discovery off (no `listChanged.tools`, or `autoRefresh: false` on it).
|
|
379
481
|
*/
|
|
380
482
|
tools(): Promise<readonly Tool[]>;
|
|
381
483
|
/**
|
|
382
484
|
* Force a refresh from the server. Use when you suspect the server
|
|
383
485
|
* has dynamically added/removed tools mid-session (e.g., after the
|
|
384
|
-
* server processes a config update).
|
|
486
|
+
* server processes a config update). Reads every page, as `tools()` does.
|
|
487
|
+
* When it fails it rejects, and `tools()` keeps serving the catalogue it
|
|
488
|
+
* had: those tools keep their own checks (see `tools()`). Route the server's
|
|
489
|
+
* list-changed notice here, rather than letting the SDK client refresh
|
|
490
|
+
* itself: a listing the library does not send is not covered.
|
|
385
491
|
*/
|
|
386
492
|
refresh(): Promise<readonly Tool[]>;
|
|
387
|
-
/**
|
|
493
|
+
/**
|
|
494
|
+
* Close the underlying transport. After `close()` the client is unusable.
|
|
495
|
+
*
|
|
496
|
+
* `close()` does not end the remote session; `terminate()` does, and says
|
|
497
|
+
* whether it did.
|
|
498
|
+
*/
|
|
388
499
|
close(): Promise<void>;
|
|
500
|
+
/**
|
|
501
|
+
* End the remote session, then close locally, whatever happened — and say
|
|
502
|
+
* what the remote side answered (`McpTerminateOutcome`).
|
|
503
|
+
*
|
|
504
|
+
* Optional: a capability, not a required member, so a hand-written
|
|
505
|
+
* `McpClient` keeps compiling. Ask {@link canTerminate} before calling it.
|
|
506
|
+
* `mcpClient()` and `mockMcpClient()` provide it.
|
|
507
|
+
*
|
|
508
|
+
* It sends the transport's own session termination (Streamable HTTP: a
|
|
509
|
+
* `DELETE` carrying `Mcp-Session-Id`) and reads the status itself, because
|
|
510
|
+
* the MCP SDK treats a 405 as success. The wait is bounded: after
|
|
511
|
+
* `TOOL_TEARDOWN_TIMEOUT_MS` (5 s) the request is aborted and the outcome is
|
|
512
|
+
* `'timed-out'`. Ends the client at most once: a second call answers the
|
|
513
|
+
* first outcome. Never throws for a remote failure; the outcome says it.
|
|
514
|
+
*
|
|
515
|
+
* @throws when called after `close()`, like every other method
|
|
516
|
+
*/
|
|
517
|
+
terminate?(): Promise<McpTerminateOutcome>;
|
|
518
|
+
}
|
|
519
|
+
/**
|
|
520
|
+
* What ending a client's remote session came to — `McpClient.terminate()`.
|
|
521
|
+
*
|
|
522
|
+
* `resolved` is true only when the remote side is known not to hold the session
|
|
523
|
+
* any more: `'terminated'`, `'already-gone'`, `'no-session'`. Every other
|
|
524
|
+
* outcome leaves the remote session to its own timeout, which nothing in this
|
|
525
|
+
* process can shorten. Local settlement and remote resolution are different
|
|
526
|
+
* facts: an ending can settle here and stay unresolved there.
|
|
527
|
+
*/
|
|
528
|
+
export interface McpTerminateOutcome {
|
|
529
|
+
/**
|
|
530
|
+
* - `'terminated'` — 2xx: the remote side ended the session it held.
|
|
531
|
+
* - `'already-gone'` — 404: it no longer held it.
|
|
532
|
+
* - `'no-session'` — nothing to end: no session id was ever issued (a
|
|
533
|
+
* `'per-call'` runtime transport, a server that issues none, stdio, the mock).
|
|
534
|
+
* - `'not-offered'` — 405: the server does not end sessions on request.
|
|
535
|
+
* - `'failed'` — the request failed (another status, or no answer).
|
|
536
|
+
* - `'timed-out'` — the local wait ended first, and the request was aborted.
|
|
537
|
+
* - `'handle-lost'` — this process no longer holds the session's handle, so
|
|
538
|
+
* nothing could be sent (`LocalSessionHandleLostError`).
|
|
539
|
+
* - `'unavailable'` — a client built on `connection`: the library did not
|
|
540
|
+
* build its transport, so it cannot end the session.
|
|
541
|
+
*/
|
|
542
|
+
readonly remote: 'terminated' | 'already-gone' | 'no-session' | 'not-offered' | 'failed' | 'timed-out' | 'handle-lost' | 'unavailable';
|
|
543
|
+
/** True only for `'terminated'`, `'already-gone'` and `'no-session'`. */
|
|
544
|
+
readonly resolved: boolean;
|
|
545
|
+
/** The HTTP status the remote side answered with, when one was read. */
|
|
546
|
+
readonly status?: number;
|
|
547
|
+
/** A failure's class name — never its message. */
|
|
548
|
+
readonly errorClass?: string;
|
|
549
|
+
/** How long the ending took, as the caller waited for it. */
|
|
550
|
+
readonly durationMs: number;
|
|
389
551
|
}
|
|
390
552
|
/**
|
|
391
553
|
* A live MCP connection you opened and connected yourself.
|
|
@@ -412,8 +574,17 @@ export interface McpClient {
|
|
|
412
574
|
* convenience version of it.
|
|
413
575
|
*/
|
|
414
576
|
export interface McpConnection {
|
|
415
|
-
|
|
577
|
+
/**
|
|
578
|
+
* One page of the server's tool list. The first page is asked with no params;
|
|
579
|
+
* each later page with the `nextCursor` the page before it returned, as
|
|
580
|
+
* `{ cursor }`. A connection that never pages returns no `nextCursor`.
|
|
581
|
+
*/
|
|
582
|
+
listTools(params?: {
|
|
583
|
+
readonly cursor?: string;
|
|
584
|
+
}, options?: McpRequestOptions): Promise<{
|
|
416
585
|
readonly tools: ReadonlyArray<McpListedTool>;
|
|
586
|
+
/** Present while the server has more tools: what to ask for the next page with. */
|
|
587
|
+
readonly nextCursor?: string;
|
|
417
588
|
}>;
|
|
418
589
|
callTool(params: {
|
|
419
590
|
readonly name: string;
|
|
@@ -510,6 +681,29 @@ export interface McpListedTool {
|
|
|
510
681
|
readonly inputSchema: Readonly<Record<string, unknown>>;
|
|
511
682
|
/** MCP's extensibility bag. Absent from most servers' tools. */
|
|
512
683
|
readonly _meta?: Readonly<Record<string, unknown>>;
|
|
684
|
+
/**
|
|
685
|
+
* What the tool's `structuredContent` must match. Read for the one reason the
|
|
686
|
+
* SDK's `Client` reads it: a tool that declares one must answer with
|
|
687
|
+
* matching `structuredContent` (see `McpClient.tools()` for a paged list).
|
|
688
|
+
*/
|
|
689
|
+
readonly outputSchema?: Readonly<Record<string, unknown>>;
|
|
690
|
+
/** How the tool may run: `taskSupport: 'required'` means only as a task, never a plain `tools/call`. */
|
|
691
|
+
readonly execution?: {
|
|
692
|
+
readonly taskSupport?: string;
|
|
693
|
+
};
|
|
694
|
+
}
|
|
695
|
+
/**
|
|
696
|
+
* A JSON Schema validator, as the MCP SDK's `Client` takes one
|
|
697
|
+
* (`jsonSchemaValidator`): `getValidator(schema)` compiles a schema once and
|
|
698
|
+
* returns a function that checks one value against it. Typed STRUCTURALLY so
|
|
699
|
+
* this declaration never references the optional peer; the SDK's own
|
|
700
|
+
* `AjvJsonSchemaValidator` and `CfWorkerJsonSchemaValidator` satisfy it.
|
|
701
|
+
*/
|
|
702
|
+
export interface McpJsonSchemaValidator {
|
|
703
|
+
getValidator(schema: object): (input: unknown) => {
|
|
704
|
+
readonly valid: boolean;
|
|
705
|
+
readonly errorMessage?: string;
|
|
706
|
+
};
|
|
513
707
|
}
|
|
514
708
|
/**
|
|
515
709
|
* What `tools/call` can answer with — **a union, because the protocol is one.**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/mcp/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAC9C,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC/D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAC1D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AACpD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAIvD;;;;GAIG;AACH,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,SAAS,EAAE,OAAO,CAAC;IAC5B,iEAAiE;IACjE,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,yCAAyC;IACzC,QAAQ,CAAC,IAAI,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAClC;;;;;;OAMG;IACH,QAAQ,CAAC,GAAG,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;IAChD,4CAA4C;IAC5C,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC;CACvB;AAED;;;GAGG;AACH,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,SAA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S,CAAC,CAAC;AAwwCzE,6DAA6D;AAC7D,eAAO,MAAM,aAAa,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,IAAI,CAAC,CAAS,CAAC;AAEnE,2DAA2D;AAC3D,eAAO,MAAM,WAAW,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,IAAI,CAAC,CAAU,CAAC;AAKlE,6FAA6F;AAC7F,wBAAgB,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAElD;AAKD;;;;;;;;;GASG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAEvD"}
|
|
@@ -51,7 +51,7 @@ export { staticTools } from './staticTools.js';
|
|
|
51
51
|
export { gatedTools } from './gatedTools.js';
|
|
52
52
|
export { skillScopedTools, skillScopedToolsTarget, SKILL_SCOPED_TOOLS_ID_PREFIX, } from '../tools/skillScopedTools.js';
|
|
53
53
|
export type { ToolProvider, ToolDispatchContext, ToolGatePredicate, } from '../tools/toolProvider.js';
|
|
54
|
-
export { mcpClient, mcpServe, mockMcpClient, gatewayTransport, GatewayAuthorizationRequiredError, McpReplayUnavailableError, MCP_TOOL_EXTRAS_KEY, retryingFetch, } from '../mcp/index.js';
|
|
54
|
+
export { mcpClient, mcpServe, mockMcpClient, gatewayTransport, GatewayAuthorizationRequiredError, McpReplayUnavailableError, McpToolListIncompleteError, McpOutputUncheckedError, MCP_TOOL_EXTRAS_KEY, retryingFetch, canTerminate, mcpClientPool, MCP_POOL_DEFAULTS, MAX_DEFINITION_ENTRIES, MAX_SHARED_TOOLS, McpPoolRefusedError, PoolFullError, } from '../mcp/index.js';
|
|
55
55
|
export { agentCoreGatewayTransport, agentCoreGatewayUrl, gatewaySearchTool, hasGatewaySearch, AGENTCORE_GATEWAY_SEARCH_TOOL, AGENTCORE_POLICY_SESSION_HEADER, AGENTCORE_SIGV4_SERVICE, } from '../adapters/mcp/agentcore.js';
|
|
56
56
|
export type { AgentCoreGatewayTransportOptions, AgentCoreGatewayUrlOptions, } from '../adapters/mcp/agentcore.js';
|
|
57
57
|
export { agentCoreRuntimeMcpTransport, agentCoreRuntimeUrl, } from '../adapters/mcp/agentcoreRuntime/transport.js';
|
|
@@ -59,5 +59,5 @@ export { AGENTCORE_RUNTIME_SESSION_HEADER } from '../adapters/mcp/agentcoreRunti
|
|
|
59
59
|
export type { AgentCoreRuntimeAuth, AgentCoreRuntimeBearerAuth, AgentCoreRuntimeMcpTransportOptions, AgentCoreRuntimeRetryOptions, AgentCoreRuntimeUrlOptions, } from '../adapters/mcp/agentcoreRuntime/transport.js';
|
|
60
60
|
export type { AgentCoreRuntimeSession } from '../adapters/mcp/agentcoreRuntime/session.js';
|
|
61
61
|
export type { AgentCoreRuntimeSdkClient, BedrockAgentCoreRuntimeSdkModule, } from '../adapters/mcp/agentcoreRuntime/invoke.js';
|
|
62
|
-
export type { GatewayTransportOptions, McpCallToolResult, McpClient, McpClientOptions, McpReplayDeduplication, McpReplayKind, McpReplayOptions, McpReplayPolicy, McpReplayTool, McpReplayUnavailableReason, McpConnection, McpConnectionOptions, McpSdk, McpSdkClient, ThrottleFetch, McpTransport, McpStdioTransport, McpHttpTransport, McpGatewayTransport, MockMcpClientOptions, MockMcpTool, McpServeOptions, McpServeHandle, McpServeTransport, McpStdioServeTransport, McpHttpServeTransport, McpSdkServer, McpToolExtras, } from '../mcp/index.js';
|
|
62
|
+
export type { GatewayTransportOptions, McpCallToolResult, McpClient, McpClientOptions, McpReplayDeduplication, McpReplayKind, McpReplayOptions, McpReplayPolicy, McpReplayTool, McpReplayUnavailableReason, McpToolListIncompleteReason, McpConnection, McpConnectionOptions, McpJsonSchemaValidator, McpSdk, McpSdkClient, ThrottleFetch, McpTransport, McpStdioTransport, McpHttpTransport, McpGatewayTransport, MockMcpClientOptions, MockMcpTool, McpServeOptions, McpServeHandle, McpServeTransport, McpStdioServeTransport, McpHttpServeTransport, McpSdkServer, McpToolExtras, McpTerminateOutcome, TerminableMcpClient, McpTransportSettings, McpClientPool, McpClientPoolOptions, McpPoolDefinitionSharing, McpPoolEndReason, McpPoolIdentity, McpPoolLease, McpPoolLimit, McpPoolRefusal, McpPoolReport, McpPoolScope, McpPoolShareContext, McpPoolStats, } from '../mcp/index.js';
|
|
63
63
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/tool-providers/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgDG;AAEH,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EACL,gBAAgB,EAGhB,sBAAsB,EACtB,4BAA4B,GAC7B,MAAM,8BAA8B,CAAC;AACtC,YAAY,EACV,YAAY,EACZ,mBAAmB,EACnB,iBAAiB,GAClB,MAAM,0BAA0B,CAAC;AAKlC,OAAO,EACL,SAAS,EACT,QAAQ,EACR,aAAa,EACb,gBAAgB,EAChB,iCAAiC,EAIjC,yBAAyB,EAIzB,mBAAmB,EAKnB,aAAa,GACd,MAAM,iBAAiB,CAAC;AAKzB,OAAO,EACL,yBAAyB,EACzB,mBAAmB,EACnB,iBAAiB,EACjB,gBAAgB,EAChB,6BAA6B,EAC7B,+BAA+B,EAC/B,uBAAuB,GACxB,MAAM,8BAA8B,CAAC;AACtC,YAAY,EACV,gCAAgC,EAChC,0BAA0B,GAC3B,MAAM,8BAA8B,CAAC;AAKtC,OAAO,EACL,4BAA4B,EAC5B,mBAAmB,GACpB,MAAM,+CAA+C,CAAC;AACvD,OAAO,EAAE,gCAAgC,EAAE,MAAM,6CAA6C,CAAC;AAC/F,YAAY,EACV,oBAAoB,EACpB,0BAA0B,EAC1B,mCAAmC,EACnC,4BAA4B,EAC5B,0BAA0B,GAC3B,MAAM,+CAA+C,CAAC;AACvD,YAAY,EAAE,uBAAuB,EAAE,MAAM,6CAA6C,CAAC;AAC3F,YAAY,EACV,yBAAyB,EACzB,gCAAgC,GACjC,MAAM,4CAA4C,CAAC;AACpD,YAAY,EACV,uBAAuB,EACvB,iBAAiB,EACjB,SAAS,EACT,gBAAgB,EAGhB,sBAAsB,EACtB,aAAa,EACb,gBAAgB,EAChB,eAAe,EACf,aAAa,EACb,0BAA0B,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/tool-providers/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgDG;AAEH,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EACL,gBAAgB,EAGhB,sBAAsB,EACtB,4BAA4B,GAC7B,MAAM,8BAA8B,CAAC;AACtC,YAAY,EACV,YAAY,EACZ,mBAAmB,EACnB,iBAAiB,GAClB,MAAM,0BAA0B,CAAC;AAKlC,OAAO,EACL,SAAS,EACT,QAAQ,EACR,aAAa,EACb,gBAAgB,EAChB,iCAAiC,EAIjC,yBAAyB,EAIzB,0BAA0B,EAI1B,uBAAuB,EAIvB,mBAAmB,EAKnB,aAAa,EAGb,YAAY,EAGZ,aAAa,EACb,iBAAiB,EACjB,sBAAsB,EACtB,gBAAgB,EAChB,mBAAmB,EACnB,aAAa,GACd,MAAM,iBAAiB,CAAC;AAKzB,OAAO,EACL,yBAAyB,EACzB,mBAAmB,EACnB,iBAAiB,EACjB,gBAAgB,EAChB,6BAA6B,EAC7B,+BAA+B,EAC/B,uBAAuB,GACxB,MAAM,8BAA8B,CAAC;AACtC,YAAY,EACV,gCAAgC,EAChC,0BAA0B,GAC3B,MAAM,8BAA8B,CAAC;AAKtC,OAAO,EACL,4BAA4B,EAC5B,mBAAmB,GACpB,MAAM,+CAA+C,CAAC;AACvD,OAAO,EAAE,gCAAgC,EAAE,MAAM,6CAA6C,CAAC;AAC/F,YAAY,EACV,oBAAoB,EACpB,0BAA0B,EAC1B,mCAAmC,EACnC,4BAA4B,EAC5B,0BAA0B,GAC3B,MAAM,+CAA+C,CAAC;AACvD,YAAY,EAAE,uBAAuB,EAAE,MAAM,6CAA6C,CAAC;AAC3F,YAAY,EACV,yBAAyB,EACzB,gCAAgC,GACjC,MAAM,4CAA4C,CAAC;AACpD,YAAY,EACV,uBAAuB,EACvB,iBAAiB,EACjB,SAAS,EACT,gBAAgB,EAGhB,sBAAsB,EACtB,aAAa,EACb,gBAAgB,EAChB,eAAe,EACf,aAAa,EACb,0BAA0B,EAC1B,2BAA2B,EAI3B,aAAa,EACb,oBAAoB,EAEpB,sBAAsB,EACtB,MAAM,EACN,YAAY,EACZ,aAAa,EACb,YAAY,EACZ,iBAAiB,EACjB,gBAAgB,EAChB,mBAAmB,EACnB,oBAAoB,EACpB,WAAW,EACX,eAAe,EACf,cAAc,EACd,iBAAiB,EACjB,sBAAsB,EACtB,qBAAqB,EACrB,YAAY,EACZ,aAAa,EAEb,mBAAmB,EACnB,mBAAmB,EAEnB,oBAAoB,EAEpB,aAAa,EACb,oBAAoB,EACpB,wBAAwB,EACxB,gBAAgB,EAChB,eAAe,EACf,YAAY,EACZ,YAAY,EACZ,cAAc,EACd,aAAa,EACb,YAAY,EACZ,mBAAmB,EACnB,YAAY,GACb,MAAM,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* mcpClientUse — the door an MCP client pool's use of a client enters the run by.
|
|
3
|
+
*
|
|
4
|
+
* Pattern: a per-dispatch port (the `requestEvidence.ts` precedent) for a call,
|
|
5
|
+
* and a per-context ledger for a listing, behind one allow-list.
|
|
6
|
+
* Role: `mcpClientPool` (`mcp/pool/`, layer L12) runs below the agent (L9):
|
|
7
|
+
* it cannot reach a scope, and the agent cannot import it. Both reach
|
|
8
|
+
* this module, which sits under both:
|
|
9
|
+
*
|
|
10
|
+
* - a CALL: the dispatch loop puts a port on each call's context
|
|
11
|
+
* (`mcpClientUseFor`), stamped with that call's id; a pooled tool files its
|
|
12
|
+
* use through it once, as its `execute` settles;
|
|
13
|
+
* - a LISTING: the pool files its use against the `ToolDispatchContext`
|
|
14
|
+
* object it was handed (`fileListUse`); the tools slot takes the uses filed
|
|
15
|
+
* against the context it passed (`takeListUses`) after `list(ctx)`, and
|
|
16
|
+
* emits them.
|
|
17
|
+
*
|
|
18
|
+
* Either way the event is `agentfootprint.tools.mcp_client`, emitted by the
|
|
19
|
+
* library stage that called the pool, mid-stage, through `typedEmit` — so the
|
|
20
|
+
* run's redaction rule serves it and its meta carries the real stage.
|
|
21
|
+
*
|
|
22
|
+
* THE ALLOW-LIST is the whole record: the fields of `ToolsMcpClientPayload`,
|
|
23
|
+
* the library's own words for each, numbers, and two ids of the pool's own
|
|
24
|
+
* making (`keyHash`, `clientId`) under a fixed shape. A filing with anything
|
|
25
|
+
* else — a field nobody listed, a word outside its set, a non-plain value — is
|
|
26
|
+
* refused whole, never trimmed into something it did not say.
|
|
27
|
+
*/
|
|
28
|
+
import type { ToolsMcpClientPayload } from '../events/payloads.js';
|
|
29
|
+
import { type EmitableScope } from '../recorders/core/typedEmit.js';
|
|
30
|
+
/** What a pool use files: the payload, less the call id the dispatch stamps. */
|
|
31
|
+
export type McpClientUse = Omit<ToolsMcpClientPayload, 'toolCallId'>;
|
|
32
|
+
/** Where one dispatched call's pool use goes. */
|
|
33
|
+
export interface McpClientUseSink {
|
|
34
|
+
/** File the use. Never throws; a filing outside the allow-list is refused whole. */
|
|
35
|
+
file(use: McpClientUse): void;
|
|
36
|
+
}
|
|
37
|
+
/** @internal The context key the dispatcher puts a call's sink under. */
|
|
38
|
+
export declare const MCP_CLIENT_USE: unique symbol;
|
|
39
|
+
/** What the dispatcher spreads into a call's context. */
|
|
40
|
+
export interface McpClientUsePort {
|
|
41
|
+
readonly [MCP_CLIENT_USE]: McpClientUseSink;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* The port for one dispatch: files `agentfootprint.tools.mcp_client` at
|
|
45
|
+
* `'call'`, stamped with the call's id, at most once.
|
|
46
|
+
*/
|
|
47
|
+
export declare function mcpClientUseFor(scope: EmitableScope, call: {
|
|
48
|
+
readonly toolCallId: string;
|
|
49
|
+
}): McpClientUsePort;
|
|
50
|
+
/** The sink a call's context carries, or `undefined`. Never throws, whatever `ctx` is. */
|
|
51
|
+
export declare function mcpClientUseOf(ctx: unknown): McpClientUseSink | undefined;
|
|
52
|
+
/** File a listing's use against the `ToolDispatchContext` it was asked with. Never throws. */
|
|
53
|
+
export declare function fileListUse(ctx: unknown, use: McpClientUse): void;
|
|
54
|
+
/** Take (and forget) every listing use filed against `ctx`. */
|
|
55
|
+
export declare function takeListUses(ctx: object): readonly McpClientUse[];
|
|
56
|
+
/** Emit the listing uses filed against `ctx`, as the tools slot does after `list(ctx)`. */
|
|
57
|
+
export declare function emitListUses(scope: EmitableScope, ctx: object): void;
|
|
58
|
+
/** The use as the record may carry it, or `undefined` when it is outside the allow-list. */
|
|
59
|
+
export declare function servedUse(use: McpClientUse): McpClientUse | undefined;
|
|
60
|
+
//# sourceMappingURL=mcpClientUse.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mcpClientUse.d.ts","sourceRoot":"","sources":["../../../src/tools/mcpClientUse.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAIH,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AACnE,OAAO,EAAa,KAAK,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAE/E,gFAAgF;AAChF,MAAM,MAAM,YAAY,GAAG,IAAI,CAAC,qBAAqB,EAAE,YAAY,CAAC,CAAC;AAErE,iDAAiD;AACjD,MAAM,WAAW,gBAAgB;IAC/B,oFAAoF;IACpF,IAAI,CAAC,GAAG,EAAE,YAAY,GAAG,IAAI,CAAC;CAC/B;AAED,yEAAyE;AACzE,eAAO,MAAM,cAAc,EAAE,OAAO,MAAgD,CAAC;AAErF,yDAAyD;AACzD,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,CAAC,cAAc,CAAC,EAAE,gBAAgB,CAAC;CAC7C;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAC7B,KAAK,EAAE,aAAa,EACpB,IAAI,EAAE;IAAE,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAA;CAAE,GACpC,gBAAgB,CAUlB;AAED,0FAA0F;AAC1F,wBAAgB,cAAc,CAAC,GAAG,EAAE,OAAO,GAAG,gBAAgB,GAAG,SAAS,CAYzE;AAKD,8FAA8F;AAC9F,wBAAgB,WAAW,CAAC,GAAG,EAAE,OAAO,EAAE,GAAG,EAAE,YAAY,GAAG,IAAI,CAKjE;AAED,+DAA+D;AAC/D,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,YAAY,EAAE,CAIjE;AAED,2FAA2F;AAC3F,wBAAgB,YAAY,CAAC,KAAK,EAAE,aAAa,EAAE,GAAG,EAAE,MAAM,GAAG,IAAI,CAEpE;AA6ED,4FAA4F;AAC5F,wBAAgB,SAAS,CAAC,GAAG,EAAE,YAAY,GAAG,YAAY,GAAG,SAAS,CAmCrE"}
|
|
@@ -99,6 +99,22 @@ export interface ToolDispatchContext {
|
|
|
99
99
|
readonly principal?: string;
|
|
100
100
|
readonly conversationId: string;
|
|
101
101
|
};
|
|
102
|
+
/**
|
|
103
|
+
* The identity the CALLER named in `run({ identity })` — the same fact a
|
|
104
|
+
* tool's `ToolExecutionContext.identity` carries. **Absent when the run's
|
|
105
|
+
* identity was derived** (from a `sessionId`, or the per-run default), which
|
|
106
|
+
* {@link identity} is not: it falls back to `{ conversationId: sessionId }` or
|
|
107
|
+
* `{ conversationId: runId }`, and a derived tuple is not an authenticated
|
|
108
|
+
* identity — a session id is caller data.
|
|
109
|
+
*
|
|
110
|
+
* A provider that keys anything live on the caller (a client per
|
|
111
|
+
* conversation, `mcpClientPool`'s provider) reads only this one.
|
|
112
|
+
*/
|
|
113
|
+
readonly callerIdentity?: {
|
|
114
|
+
readonly tenant?: string;
|
|
115
|
+
readonly principal?: string;
|
|
116
|
+
readonly conversationId: string;
|
|
117
|
+
};
|
|
102
118
|
/**
|
|
103
119
|
* Optional abort signal propagated from the agent's `run({ env })` /
|
|
104
120
|
* AbortController. Async providers (network discovery, MCP catalog
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toolProvider.d.ts","sourceRoot":"","sources":["../../../src/tools/toolProvider.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkDG;AAEH,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAEvC;;;;GAIG;AACH,MAAM,WAAW,mBAAmB;IAClC,yCAAyC;IACzC,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B;;;;;;;;;OASG;IACH,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,CAAC;IAChC;;;;;;;;;;;;;;;;;;OAkBG;IACH,QAAQ,CAAC,cAAc,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAC5C;;;;OAIG;IACH,QAAQ,CAAC,QAAQ,CAAC,EAAE;QAClB,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;QACzB,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;QAC5B,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;KACjC,CAAC;IACF;;;;;;;OAOG;IACH,QAAQ,CAAC,MAAM,CAAC,EAAE,WAAW,CAAC;CAC/B;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,MAAM,WAAW,YAAY;IAC3B;;;;;;;OAOG;IACH,IAAI,CAAC,GAAG,EAAE,mBAAmB,GAAG,SAAS,IAAI,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;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,MAAM,WAAW,YAAY;IAC3B;;;;;;;OAOG;IACH,IAAI,CAAC,GAAG,EAAE,mBAAmB,GAAG,SAAS,IAAI,EAAE,GAAG,OAAO,CAAC,SAAS,IAAI,EAAE,CAAC,CAAC;IAE3E;;;;;;OAMG;IACH,QAAQ,CAAC,EAAE,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,iEAAiE;AACjE,MAAM,MAAM,iBAAiB,GAAG,CAAC,QAAQ,EAAE,MAAM,EAAE,GAAG,EAAE,mBAAmB,KAAK,OAAO,CAAC"}
|
|
@@ -319,4 +319,45 @@ export declare class ToolTeardownTimeoutError extends Error {
|
|
|
319
319
|
readonly timeoutMs: number;
|
|
320
320
|
constructor(what: string, timeoutMs: number);
|
|
321
321
|
}
|
|
322
|
+
/**
|
|
323
|
+
* This process no longer holds the handle a conversation's session was reached
|
|
324
|
+
* by, so the call was not sent.
|
|
325
|
+
*
|
|
326
|
+
* Not an expiry: nothing was sent and nothing answered. The transport that held
|
|
327
|
+
* the handle forgot it (`evidence`), and the remote session's fate is unknown
|
|
328
|
+
* (`remote`) — it may still run, and it can no longer be ended from here,
|
|
329
|
+
* because its id went with the handle.
|
|
330
|
+
*
|
|
331
|
+
* The message is one fixed sentence; `cause`, when present, is for the app.
|
|
332
|
+
*/
|
|
333
|
+
export declare class LocalSessionHandleLostError extends Error {
|
|
334
|
+
readonly code: "ERR_LOCAL_SESSION_HANDLE_LOST";
|
|
335
|
+
/** What proves the loss: the transport no longer holds the handle. */
|
|
336
|
+
readonly evidence: "transport-forgot-handle";
|
|
337
|
+
/** What is known of the remote session: nothing. */
|
|
338
|
+
readonly remote: "unknown";
|
|
339
|
+
constructor(options?: {
|
|
340
|
+
readonly cause?: unknown;
|
|
341
|
+
});
|
|
342
|
+
}
|
|
343
|
+
/**
|
|
344
|
+
* Is `error` a {@link LocalSessionHandleLostError}? By its code as well as its
|
|
345
|
+
* class, so a second copy of the module (a CJS and an ESM build in one
|
|
346
|
+
* process) is still recognised.
|
|
347
|
+
*/
|
|
348
|
+
export declare function isLocalSessionHandleLost(error: unknown): error is LocalSessionHandleLostError;
|
|
349
|
+
/**
|
|
350
|
+
* Run `work`, giving up after `timeoutMs`.
|
|
351
|
+
*
|
|
352
|
+
* The abandoned promise is deliberately NOT cancelled — there is nothing to
|
|
353
|
+
* cancel a vendor's in-flight `Stop` with, and pretending otherwise would be
|
|
354
|
+
* worse than saying we stopped waiting. The timer is unref'd where the runtime
|
|
355
|
+
* allows it, so a pending teardown can never be the reason a process stays up.
|
|
356
|
+
*
|
|
357
|
+
* Shared, not copied: the MCP client's `terminate()` bounds its wait with it.
|
|
358
|
+
*
|
|
359
|
+
* @throws {@link ToolTeardownTimeoutError} when `timeoutMs` passes first; what
|
|
360
|
+
* `work` throws, otherwise
|
|
361
|
+
*/
|
|
362
|
+
export declare function withTimeout(work: () => Promise<void>, timeoutMs: number, what: string): Promise<void>;
|
|
322
363
|
//# sourceMappingURL=toolSessions.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toolSessions.d.ts","sourceRoot":"","sources":["../../../src/tools/toolSessions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuDG;AAKH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAC;AAEvD;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,MAAM,aAAa,GAAG,MAAM,GAAG,KAAK,GAAG,SAAS,GAAG,UAAU,CAAC;AAEpE,4EAA4E;AAC5E,MAAM,MAAM,cAAc,GACtB,UAAU,GACV,SAAS,GACT,aAAa,GACb,UAAU,GACV,MAAM,GACN,SAAS,CAAC;AAEd,4DAA4D;AAC5D,MAAM,WAAW,eAAe;IAC9B;uDACmD;IACnD,QAAQ,C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
"version": "12.2.0",
|
|
4
4
|
"description": "The explainable agent framework — backtrack a wrong answer to the exact context that caused it (evidence, not guesses). Built on footprintjs.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "commonjs",
|
|
@@ -505,7 +505,7 @@
|
|
|
505
505
|
"@types/node": "^25.5.2",
|
|
506
506
|
"@typescript-eslint/eslint-plugin": "^8.71.2",
|
|
507
507
|
"@typescript-eslint/parser": "^8.71.2",
|
|
508
|
-
"@vitest/coverage-v8": "^4.1.
|
|
508
|
+
"@vitest/coverage-v8": "^4.1.12",
|
|
509
509
|
"@yarflam/potion-base-8m": "^1.0.4",
|
|
510
510
|
"esbuild": "^0.28.0",
|
|
511
511
|
"eslint": "^8.57.1",
|
|
@@ -525,7 +525,7 @@
|
|
|
525
525
|
"typedoc-plugin-markdown": "^4.11.0",
|
|
526
526
|
"typescript": "~5.4.5",
|
|
527
527
|
"unpdf": "^1.8.0",
|
|
528
|
-
"vitest": "^4.1.
|
|
528
|
+
"vitest": "^4.1.12",
|
|
529
529
|
"zod": "^3.25.76"
|
|
530
530
|
},
|
|
531
531
|
"dependencies": {
|