agentfootprint 9.69.0 → 9.71.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/CLAUDE.md +2 -0
- package/canonical-notes.json +16 -0
- package/dist/artifacts/placement.js +21 -7
- package/dist/artifacts/placement.js.map +1 -1
- package/dist/core/agent/stages/toolCalls.js +7 -1
- package/dist/core/agent/stages/toolCalls.js.map +1 -1
- package/dist/core/tools.js +102 -29
- package/dist/core/tools.js.map +1 -1
- package/dist/esm/artifacts/placement.d.ts +22 -7
- package/dist/esm/artifacts/placement.js +21 -7
- package/dist/esm/artifacts/placement.js.map +1 -1
- package/dist/esm/core/agent/stages/toolCalls.d.ts +3 -2
- package/dist/esm/core/agent/stages/toolCalls.js +7 -1
- package/dist/esm/core/agent/stages/toolCalls.js.map +1 -1
- package/dist/esm/core/agent/types.d.ts +3 -2
- package/dist/esm/core/tools.d.ts +80 -0
- package/dist/esm/core/tools.js +98 -28
- package/dist/esm/core/tools.js.map +1 -1
- package/dist/esm/index.d.ts +1 -1
- package/dist/esm/index.js +6 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/lib/injection-engine/types.d.ts +2 -1
- package/dist/esm/lib/injection-engine/types.js.map +1 -1
- package/dist/esm/lib/mcp/index.d.ts +1 -0
- package/dist/esm/lib/mcp/index.js +3 -0
- package/dist/esm/lib/mcp/index.js.map +1 -1
- package/dist/esm/lib/mcp/mcpClient.d.ts +6 -0
- package/dist/esm/lib/mcp/mcpClient.js +14 -0
- package/dist/esm/lib/mcp/mcpClient.js.map +1 -1
- package/dist/esm/lib/mcp/mcpServe.d.ts +8 -0
- package/dist/esm/lib/mcp/mcpServe.js +23 -5
- package/dist/esm/lib/mcp/mcpServe.js.map +1 -1
- package/dist/esm/lib/mcp/mockMcpClient.d.ts +26 -0
- package/dist/esm/lib/mcp/mockMcpClient.js +5 -0
- package/dist/esm/lib/mcp/mockMcpClient.js.map +1 -1
- package/dist/esm/lib/mcp/toolExtras.d.ts +129 -0
- package/dist/esm/lib/mcp/toolExtras.js +198 -0
- package/dist/esm/lib/mcp/toolExtras.js.map +1 -0
- package/dist/esm/lib/mcp/types.d.ts +18 -5
- package/dist/esm/tool-providers/index.d.ts +2 -2
- package/dist/esm/tool-providers/index.js +5 -1
- package/dist/esm/tool-providers/index.js.map +1 -1
- package/dist/index.js +8 -3
- package/dist/index.js.map +1 -1
- package/dist/lib/injection-engine/types.js.map +1 -1
- package/dist/lib/mcp/index.js +5 -1
- package/dist/lib/mcp/index.js.map +1 -1
- package/dist/lib/mcp/mcpClient.js +14 -0
- package/dist/lib/mcp/mcpClient.js.map +1 -1
- package/dist/lib/mcp/mcpServe.js +23 -5
- package/dist/lib/mcp/mcpServe.js.map +1 -1
- package/dist/lib/mcp/mockMcpClient.js +5 -0
- package/dist/lib/mcp/mockMcpClient.js.map +1 -1
- package/dist/lib/mcp/toolExtras.js +204 -0
- package/dist/lib/mcp/toolExtras.js.map +1 -0
- package/dist/tool-providers/index.js +5 -1
- package/dist/tool-providers/index.js.map +1 -1
- package/dist/types/artifacts/placement.d.ts +22 -7
- package/dist/types/artifacts/placement.d.ts.map +1 -1
- package/dist/types/core/agent/stages/toolCalls.d.ts +3 -2
- package/dist/types/core/agent/stages/toolCalls.d.ts.map +1 -1
- package/dist/types/core/agent/types.d.ts +3 -2
- package/dist/types/core/agent/types.d.ts.map +1 -1
- package/dist/types/core/tools.d.ts +80 -0
- package/dist/types/core/tools.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/injection-engine/types.d.ts +2 -1
- package/dist/types/lib/injection-engine/types.d.ts.map +1 -1
- package/dist/types/lib/mcp/index.d.ts +1 -0
- package/dist/types/lib/mcp/index.d.ts.map +1 -1
- package/dist/types/lib/mcp/mcpClient.d.ts +6 -0
- package/dist/types/lib/mcp/mcpClient.d.ts.map +1 -1
- package/dist/types/lib/mcp/mcpServe.d.ts +8 -0
- package/dist/types/lib/mcp/mcpServe.d.ts.map +1 -1
- package/dist/types/lib/mcp/mockMcpClient.d.ts +26 -0
- package/dist/types/lib/mcp/mockMcpClient.d.ts.map +1 -1
- package/dist/types/lib/mcp/toolExtras.d.ts +130 -0
- package/dist/types/lib/mcp/toolExtras.d.ts.map +1 -0
- package/dist/types/lib/mcp/types.d.ts +18 -5
- package/dist/types/lib/mcp/types.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/package.json +5 -3
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* toolExtras — agentfootprint's own tool DECLARATIONS, carried over MCP.
|
|
3
|
+
*
|
|
4
|
+
* A `Tool` is two different things at once. Half of it is EXECUTION — the
|
|
5
|
+
* handler, the credential it needs, the human it wants to check in with. The
|
|
6
|
+
* other half is DECLARATION — flat, inert facts about the tool that no code
|
|
7
|
+
* runs and every consumer-side rail READS: where its arguments come from, what
|
|
8
|
+
* kind of artifact its result is, who owns it, what class of answer it gives,
|
|
9
|
+
* how big a result is too big.
|
|
10
|
+
*
|
|
11
|
+
* Over MCP only the execution half used to cross. A tool served by `mcpServe`
|
|
12
|
+
* arrived at a client as a name, a description and an input schema, so every
|
|
13
|
+
* rail that reads a declaration went quiet for it: the dangling-reference and
|
|
14
|
+
* unsupported-argument checks never armed, placement minted
|
|
15
|
+
* `tool-result/<name>` that no `wants` could spend, and the identity joins had
|
|
16
|
+
* no subject. An MCP server could be somebody's whole tool catalogue and still
|
|
17
|
+
* be a second-class citizen of every check this library ships.
|
|
18
|
+
*
|
|
19
|
+
* ── The carrier ─────────────────────────────────────────────────────────
|
|
20
|
+
* MCP's own extensibility bag: `Tool._meta`, under ONE namespaced key
|
|
21
|
+
* ({@link MCP_TOOL_EXTRAS_KEY}). `_meta` is declared on the spec's `Tool`
|
|
22
|
+
* object (`@modelcontextprotocol/sdk` types it as
|
|
23
|
+
* `z.record(z.string(), z.unknown()).optional()` on `ToolSchema`), so it
|
|
24
|
+
* survives the SDK's own `tools/list` validation in both directions and needs
|
|
25
|
+
* no new protocol, no side channel and no version negotiation. A server that
|
|
26
|
+
* has never heard of agentfootprint sends no bag; a client that has never
|
|
27
|
+
* heard of it ignores the key.
|
|
28
|
+
*
|
|
29
|
+
* ── What may travel, and the bar ────────────────────────────────────────
|
|
30
|
+
* **A declaration a consumer-side check or rail reads; nothing that governs
|
|
31
|
+
* execution.** The five fields below pass it. `needs` (credentials), `checkIn`
|
|
32
|
+
* (human consent) and the session hooks do NOT and never will: they govern how
|
|
33
|
+
* a tool RUNS, and the tool runs on the server. Sending them would tell a
|
|
34
|
+
* client to hold a gate that the only executor of the tool has already held,
|
|
35
|
+
* or — worse — that nobody is holding at all. `mcpServe` already refuses to
|
|
36
|
+
* serve a `checkIn` tool for exactly that reason; this list is the same law,
|
|
37
|
+
* stated on the way out.
|
|
38
|
+
*
|
|
39
|
+
* ── The asymmetry that matters ──────────────────────────────────────────
|
|
40
|
+
* SERVING validates nothing new: the tool was built by `defineTool`, which
|
|
41
|
+
* already refused every malformed declaration at definition time.
|
|
42
|
+
*
|
|
43
|
+
* INGEST validates everything and THROWS NOTHING. A bag comes from a server
|
|
44
|
+
* this process does not control, and one server's typo must not take down a
|
|
45
|
+
* bulk register of forty tools. So each field is judged by the SAME rule
|
|
46
|
+
* `defineTool` enforces (literally the same exported assert), and a field that
|
|
47
|
+
* fails is warned about once — naming the server, the tool, the field and the
|
|
48
|
+
* rule — and DROPPED. The tool still registers, without that one declaration.
|
|
49
|
+
* That is the honest outcome: the rail it would have armed stays unarmed, and
|
|
50
|
+
* the developer is told which rail and why.
|
|
51
|
+
*/
|
|
52
|
+
import { type Tool, type ToolOwner, type ToolResultCeiling } from '../../core/tools.js';
|
|
53
|
+
import type { ToolResultClass } from '../semantics/types.js';
|
|
54
|
+
/**
|
|
55
|
+
* The single `_meta` key every agentfootprint declaration travels under.
|
|
56
|
+
*
|
|
57
|
+
* Namespaced so it can never collide with another vendor's `_meta` entry, and
|
|
58
|
+
* a CONSTANT so there is exactly one spelling in the codebase — the
|
|
59
|
+
* `branchSegment.ts` precedent upstream: one owner of the grammar, and nobody
|
|
60
|
+
* else may write the string.
|
|
61
|
+
*/
|
|
62
|
+
export declare const MCP_TOOL_EXTRAS_KEY = "agentfootprint";
|
|
63
|
+
/**
|
|
64
|
+
* The declarations that cross an MCP boundary — the plain-data half of a
|
|
65
|
+
* `Tool`, in the shape the receiving side puts straight back onto a `Tool`.
|
|
66
|
+
*
|
|
67
|
+
* Every field is optional and ABSENT MEANS ABSENT: a tool that declares
|
|
68
|
+
* nothing sends no bag at all, and a tool that declares two sends two keys,
|
|
69
|
+
* never five with three empty placeholders. "Said nothing" and "said empty"
|
|
70
|
+
* are different statements everywhere else in this library, and they are
|
|
71
|
+
* different here.
|
|
72
|
+
*
|
|
73
|
+
* @see MCP_TOOL_EXTRAS_KEY for the `_meta` key it rides under.
|
|
74
|
+
*/
|
|
75
|
+
export interface McpToolExtras {
|
|
76
|
+
/** Where this tool's arguments come from — see {@link Tool.argumentsFrom}.
|
|
77
|
+
* Arms the dangling-reference and unsupported-argument checks. */
|
|
78
|
+
readonly argumentsFrom?: readonly string[];
|
|
79
|
+
/** The artifact kind a PLACED result is minted under — see
|
|
80
|
+
* {@link Tool.resultKind}. What makes a placed result spendable by `wants`. */
|
|
81
|
+
readonly resultKind?: string;
|
|
82
|
+
/** The identity edge integrity checks join on — see {@link Tool.owner}. */
|
|
83
|
+
readonly owner?: ToolOwner;
|
|
84
|
+
/** The declared class of this tool's results — see {@link Tool.resultClass}. */
|
|
85
|
+
readonly resultClass?: ToolResultClass;
|
|
86
|
+
/** The author's refusing ceiling on this tool's result — see
|
|
87
|
+
* {@link Tool.resultCeiling}. */
|
|
88
|
+
readonly resultCeiling?: ToolResultCeiling;
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* The declarations on `tool`, ready to be written into an MCP `_meta` bag —
|
|
92
|
+
* or `undefined` when the tool declares none, so `mcpServe` can leave `_meta`
|
|
93
|
+
* off the listing entirely rather than sending an empty object.
|
|
94
|
+
*
|
|
95
|
+
* Copied verbatim, never inferred or defaulted. This is the SERVE side, and
|
|
96
|
+
* the values were already vetted by `defineTool`.
|
|
97
|
+
*/
|
|
98
|
+
export declare function toolExtrasOf(tool: Tool): McpToolExtras | undefined;
|
|
99
|
+
/** Where a rejected declaration came from, for the warning that names it. */
|
|
100
|
+
export interface McpToolExtrasOrigin {
|
|
101
|
+
/** The client's logical name — `mcpClient({ name })`. */
|
|
102
|
+
readonly server: string;
|
|
103
|
+
/** The tool the bag was attached to. */
|
|
104
|
+
readonly tool: string;
|
|
105
|
+
}
|
|
106
|
+
/**
|
|
107
|
+
* Read an MCP `Tool._meta` bag into declarations a `Tool` can carry.
|
|
108
|
+
*
|
|
109
|
+
* **Never throws.** Everything here is somebody else's data:
|
|
110
|
+
*
|
|
111
|
+
* - no `_meta`, no `agentfootprint` key, or a non-object under it → `{}`,
|
|
112
|
+
* and the ingest is byte-identical to every release before this existed;
|
|
113
|
+
* - a field the receiving side does not know → ignored in silence (a NEWER
|
|
114
|
+
* server talking to an OLDER client is not an error, and warning about it
|
|
115
|
+
* would make every upgrade noisy at the wrong end);
|
|
116
|
+
* - a field this library DOES know but cannot honour → warned once and
|
|
117
|
+
* dropped, and the rest of the bag still lands.
|
|
118
|
+
*
|
|
119
|
+
* The rule each field is judged by is the exported assert `defineTool` itself
|
|
120
|
+
* calls, so a declaration that would have been refused at definition time is
|
|
121
|
+
* refused here too, with the same sentence.
|
|
122
|
+
*/
|
|
123
|
+
export declare function readToolExtras(meta: unknown, origin: McpToolExtrasOrigin): McpToolExtras;
|
|
124
|
+
/**
|
|
125
|
+
* Forget every warning issued so far.
|
|
126
|
+
* @internal test seam — the ledger is process-wide and warn-ONCE, so a test
|
|
127
|
+
* proving the warning fires must be able to start from silence.
|
|
128
|
+
*/
|
|
129
|
+
export declare function _resetToolExtrasWarnings(): void;
|
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* toolExtras — agentfootprint's own tool DECLARATIONS, carried over MCP.
|
|
3
|
+
*
|
|
4
|
+
* A `Tool` is two different things at once. Half of it is EXECUTION — the
|
|
5
|
+
* handler, the credential it needs, the human it wants to check in with. The
|
|
6
|
+
* other half is DECLARATION — flat, inert facts about the tool that no code
|
|
7
|
+
* runs and every consumer-side rail READS: where its arguments come from, what
|
|
8
|
+
* kind of artifact its result is, who owns it, what class of answer it gives,
|
|
9
|
+
* how big a result is too big.
|
|
10
|
+
*
|
|
11
|
+
* Over MCP only the execution half used to cross. A tool served by `mcpServe`
|
|
12
|
+
* arrived at a client as a name, a description and an input schema, so every
|
|
13
|
+
* rail that reads a declaration went quiet for it: the dangling-reference and
|
|
14
|
+
* unsupported-argument checks never armed, placement minted
|
|
15
|
+
* `tool-result/<name>` that no `wants` could spend, and the identity joins had
|
|
16
|
+
* no subject. An MCP server could be somebody's whole tool catalogue and still
|
|
17
|
+
* be a second-class citizen of every check this library ships.
|
|
18
|
+
*
|
|
19
|
+
* ── The carrier ─────────────────────────────────────────────────────────
|
|
20
|
+
* MCP's own extensibility bag: `Tool._meta`, under ONE namespaced key
|
|
21
|
+
* ({@link MCP_TOOL_EXTRAS_KEY}). `_meta` is declared on the spec's `Tool`
|
|
22
|
+
* object (`@modelcontextprotocol/sdk` types it as
|
|
23
|
+
* `z.record(z.string(), z.unknown()).optional()` on `ToolSchema`), so it
|
|
24
|
+
* survives the SDK's own `tools/list` validation in both directions and needs
|
|
25
|
+
* no new protocol, no side channel and no version negotiation. A server that
|
|
26
|
+
* has never heard of agentfootprint sends no bag; a client that has never
|
|
27
|
+
* heard of it ignores the key.
|
|
28
|
+
*
|
|
29
|
+
* ── What may travel, and the bar ────────────────────────────────────────
|
|
30
|
+
* **A declaration a consumer-side check or rail reads; nothing that governs
|
|
31
|
+
* execution.** The five fields below pass it. `needs` (credentials), `checkIn`
|
|
32
|
+
* (human consent) and the session hooks do NOT and never will: they govern how
|
|
33
|
+
* a tool RUNS, and the tool runs on the server. Sending them would tell a
|
|
34
|
+
* client to hold a gate that the only executor of the tool has already held,
|
|
35
|
+
* or — worse — that nobody is holding at all. `mcpServe` already refuses to
|
|
36
|
+
* serve a `checkIn` tool for exactly that reason; this list is the same law,
|
|
37
|
+
* stated on the way out.
|
|
38
|
+
*
|
|
39
|
+
* ── The asymmetry that matters ──────────────────────────────────────────
|
|
40
|
+
* SERVING validates nothing new: the tool was built by `defineTool`, which
|
|
41
|
+
* already refused every malformed declaration at definition time.
|
|
42
|
+
*
|
|
43
|
+
* INGEST validates everything and THROWS NOTHING. A bag comes from a server
|
|
44
|
+
* this process does not control, and one server's typo must not take down a
|
|
45
|
+
* bulk register of forty tools. So each field is judged by the SAME rule
|
|
46
|
+
* `defineTool` enforces (literally the same exported assert), and a field that
|
|
47
|
+
* fails is warned about once — naming the server, the tool, the field and the
|
|
48
|
+
* rule — and DROPPED. The tool still registers, without that one declaration.
|
|
49
|
+
* That is the honest outcome: the rail it would have armed stays unarmed, and
|
|
50
|
+
* the developer is told which rail and why.
|
|
51
|
+
*/
|
|
52
|
+
import { assertArgumentsFrom, assertResultCeiling, assertResultClass, assertResultKind, assertToolOwner, } from '../../core/tools.js';
|
|
53
|
+
/**
|
|
54
|
+
* The single `_meta` key every agentfootprint declaration travels under.
|
|
55
|
+
*
|
|
56
|
+
* Namespaced so it can never collide with another vendor's `_meta` entry, and
|
|
57
|
+
* a CONSTANT so there is exactly one spelling in the codebase — the
|
|
58
|
+
* `branchSegment.ts` precedent upstream: one owner of the grammar, and nobody
|
|
59
|
+
* else may write the string.
|
|
60
|
+
*/
|
|
61
|
+
export const MCP_TOOL_EXTRAS_KEY = 'agentfootprint';
|
|
62
|
+
/**
|
|
63
|
+
* The declarations on `tool`, ready to be written into an MCP `_meta` bag —
|
|
64
|
+
* or `undefined` when the tool declares none, so `mcpServe` can leave `_meta`
|
|
65
|
+
* off the listing entirely rather than sending an empty object.
|
|
66
|
+
*
|
|
67
|
+
* Copied verbatim, never inferred or defaulted. This is the SERVE side, and
|
|
68
|
+
* the values were already vetted by `defineTool`.
|
|
69
|
+
*/
|
|
70
|
+
export function toolExtrasOf(tool) {
|
|
71
|
+
const extras = {
|
|
72
|
+
...(tool.argumentsFrom !== undefined && { argumentsFrom: tool.argumentsFrom }),
|
|
73
|
+
...(tool.resultKind !== undefined && { resultKind: tool.resultKind }),
|
|
74
|
+
...(tool.owner !== undefined && { owner: tool.owner }),
|
|
75
|
+
...(tool.resultClass !== undefined && { resultClass: tool.resultClass }),
|
|
76
|
+
...(tool.resultCeiling !== undefined && { resultCeiling: tool.resultCeiling }),
|
|
77
|
+
};
|
|
78
|
+
return Object.keys(extras).length > 0 ? extras : undefined;
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* Read an MCP `Tool._meta` bag into declarations a `Tool` can carry.
|
|
82
|
+
*
|
|
83
|
+
* **Never throws.** Everything here is somebody else's data:
|
|
84
|
+
*
|
|
85
|
+
* - no `_meta`, no `agentfootprint` key, or a non-object under it → `{}`,
|
|
86
|
+
* and the ingest is byte-identical to every release before this existed;
|
|
87
|
+
* - a field the receiving side does not know → ignored in silence (a NEWER
|
|
88
|
+
* server talking to an OLDER client is not an error, and warning about it
|
|
89
|
+
* would make every upgrade noisy at the wrong end);
|
|
90
|
+
* - a field this library DOES know but cannot honour → warned once and
|
|
91
|
+
* dropped, and the rest of the bag still lands.
|
|
92
|
+
*
|
|
93
|
+
* The rule each field is judged by is the exported assert `defineTool` itself
|
|
94
|
+
* calls, so a declaration that would have been refused at definition time is
|
|
95
|
+
* refused here too, with the same sentence.
|
|
96
|
+
*/
|
|
97
|
+
export function readToolExtras(meta, origin) {
|
|
98
|
+
const bag = bagOf(meta);
|
|
99
|
+
if (bag === undefined)
|
|
100
|
+
return {};
|
|
101
|
+
const kept = (field, assert) => keepField(bag, field, origin, assert);
|
|
102
|
+
// One line per field, in the declaration order of `McpToolExtras` — a reader
|
|
103
|
+
// comparing the two lists should not have to sort. The casts inside each
|
|
104
|
+
// rule are the point of the exercise: the value is untyped until its own
|
|
105
|
+
// rule has agreed it is the shape the field claims.
|
|
106
|
+
const argumentsFrom = kept('argumentsFrom', (v) => assertArgumentsFrom(origin.tool, v));
|
|
107
|
+
const resultKind = kept('resultKind', (v) => assertResultKind(origin.tool, v));
|
|
108
|
+
const owner = kept('owner', (v) => assertToolOwner(origin.tool, v));
|
|
109
|
+
const resultClass = kept('resultClass', (v) => assertResultClass(origin.tool, v));
|
|
110
|
+
const resultCeiling = kept('resultCeiling', (v) => assertResultCeiling(origin.tool, v));
|
|
111
|
+
return {
|
|
112
|
+
...(argumentsFrom !== undefined && { argumentsFrom }),
|
|
113
|
+
...(resultKind !== undefined && { resultKind }),
|
|
114
|
+
...(owner !== undefined && { owner }),
|
|
115
|
+
...(resultClass !== undefined && { resultClass }),
|
|
116
|
+
...(resultCeiling !== undefined && { resultCeiling }),
|
|
117
|
+
};
|
|
118
|
+
}
|
|
119
|
+
// ─── The reading, field by field ───────────────────────────────────
|
|
120
|
+
/** The bag under our key, or `undefined` when there is nothing to read. */
|
|
121
|
+
function bagOf(meta) {
|
|
122
|
+
if (typeof meta !== 'object' || meta === null)
|
|
123
|
+
return undefined;
|
|
124
|
+
const bag = meta[MCP_TOOL_EXTRAS_KEY];
|
|
125
|
+
if (typeof bag !== 'object' || bag === null || Array.isArray(bag))
|
|
126
|
+
return undefined;
|
|
127
|
+
return bag;
|
|
128
|
+
}
|
|
129
|
+
/**
|
|
130
|
+
* Judge ONE field and answer with the value to keep, or `undefined` to drop.
|
|
131
|
+
*
|
|
132
|
+
* The rule is passed IN rather than looked up here, so this function owns the
|
|
133
|
+
* never-throw discipline and nothing else: every rule lives in `core/tools.ts`
|
|
134
|
+
* where `defineTool` reads it, and there is no second copy of any of them in
|
|
135
|
+
* this file.
|
|
136
|
+
*/
|
|
137
|
+
function keepField(bag, field, origin, assert) {
|
|
138
|
+
// `in` rather than a truthiness test: a server that sent the key holding a
|
|
139
|
+
// `null` said something wrong and should hear about it, while a server that
|
|
140
|
+
// never sent the key said nothing and should not.
|
|
141
|
+
if (!(field in bag))
|
|
142
|
+
return undefined;
|
|
143
|
+
const value = bag[field];
|
|
144
|
+
if (value === undefined)
|
|
145
|
+
return undefined;
|
|
146
|
+
try {
|
|
147
|
+
assert(value);
|
|
148
|
+
}
|
|
149
|
+
catch (error) {
|
|
150
|
+
warnOnce(origin, field, error instanceof Error ? error.message : String(error));
|
|
151
|
+
return undefined;
|
|
152
|
+
}
|
|
153
|
+
return value;
|
|
154
|
+
}
|
|
155
|
+
// ─── The warning ───────────────────────────────────────────────────
|
|
156
|
+
/**
|
|
157
|
+
* Warn-once ledger, keyed by server + tool + field.
|
|
158
|
+
*
|
|
159
|
+
* ONCE because `.refresh()` re-lists the whole catalogue and an agent that
|
|
160
|
+
* refreshes every minute would otherwise print the same complaint every
|
|
161
|
+
* minute. Bounded because the key contains a remote server's tool names, and
|
|
162
|
+
* an unbounded Set fed by a remote party is a memory leak with a hostname
|
|
163
|
+
* attached — past the cap the warning simply repeats, which is the harmless
|
|
164
|
+
* failure mode.
|
|
165
|
+
*/
|
|
166
|
+
const warned = new Set();
|
|
167
|
+
const MAX_WARNED = 500;
|
|
168
|
+
/**
|
|
169
|
+
* NOT gated on `isDevMode()`, unlike the tool-NAME warning next door.
|
|
170
|
+
*
|
|
171
|
+
* A dropped declaration is not a style note: it is a check that will not arm,
|
|
172
|
+
* a placed result that will not be spendable, an identity join with no
|
|
173
|
+
* subject — and the symptom is silence, which looks exactly like a rail that
|
|
174
|
+
* ran and agreed. The precedent is `toolArgsValidation`'s uncompilable
|
|
175
|
+
* `pattern`: an ingested declaration this library cannot honour is reported
|
|
176
|
+
* unconditionally, once, and then ignored.
|
|
177
|
+
*/
|
|
178
|
+
function warnOnce(origin, field, rule) {
|
|
179
|
+
const key = `${origin.server}${origin.tool}${field}`;
|
|
180
|
+
if (warned.has(key))
|
|
181
|
+
return;
|
|
182
|
+
if (warned.size < MAX_WARNED)
|
|
183
|
+
warned.add(key);
|
|
184
|
+
// eslint-disable-next-line no-console
|
|
185
|
+
console.warn(`[agentfootprint] MCP server '${origin.server}' declared \`${field}\` on tool ` +
|
|
186
|
+
`'${origin.tool}' in its _meta.${MCP_TOOL_EXTRAS_KEY} bag, and this library cannot ` +
|
|
187
|
+
`honour it — the field was DROPPED and the tool registered without it, so whatever ` +
|
|
188
|
+
`that declaration would have armed stays unarmed. The rule it broke: ${rule}`);
|
|
189
|
+
}
|
|
190
|
+
/**
|
|
191
|
+
* Forget every warning issued so far.
|
|
192
|
+
* @internal test seam — the ledger is process-wide and warn-ONCE, so a test
|
|
193
|
+
* proving the warning fires must be able to start from silence.
|
|
194
|
+
*/
|
|
195
|
+
export function _resetToolExtrasWarnings() {
|
|
196
|
+
warned.clear();
|
|
197
|
+
}
|
|
198
|
+
//# sourceMappingURL=toolExtras.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toolExtras.js","sourceRoot":"","sources":["../../../../src/lib/mcp/toolExtras.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkDG;AAEH,OAAO,EACL,mBAAmB,EACnB,mBAAmB,EACnB,iBAAiB,EACjB,gBAAgB,EAChB,eAAe,GAIhB,MAAM,qBAAqB,CAAC;AAG7B;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,gBAAgB,CAAC;AA8BpD;;;;;;;GAOG;AACH,MAAM,UAAU,YAAY,CAAC,IAAU;IACrC,MAAM,MAAM,GAAkB;QAC5B,GAAG,CAAC,IAAI,CAAC,aAAa,KAAK,SAAS,IAAI,EAAE,aAAa,EAAE,IAAI,CAAC,aAAa,EAAE,CAAC;QAC9E,GAAG,CAAC,IAAI,CAAC,UAAU,KAAK,SAAS,IAAI,EAAE,UAAU,EAAE,IAAI,CAAC,UAAU,EAAE,CAAC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ient {
|
|
|
253
253
|
export interface McpSdkClient {
|
|
254
254
|
connect(transport: unknown, options?: McpRequestOptions): Promise<void>;
|
|
255
255
|
listTools(params?: undefined, options?: McpRequestOptions): Promise<{
|
|
256
|
-
readonly tools: ReadonlyArray<
|
|
257
|
-
readonly name: string;
|
|
258
|
-
readonly description?: string;
|
|
259
|
-
readonly inputSchema: Readonly<Record<string, unknown>>;
|
|
260
|
-
}>;
|
|
256
|
+
readonly tools: ReadonlyArray<McpListedTool>;
|
|
261
257
|
}>;
|
|
262
258
|
callTool(params: {
|
|
263
259
|
readonly name: string;
|
|
@@ -267,6 +263,23 @@ export interface McpSdkClient {
|
|
|
267
263
|
resultSchema?: undefined, options?: McpRequestOptions): Promise<McpCallToolResult>;
|
|
268
264
|
close(): Promise<void>;
|
|
269
265
|
}
|
|
266
|
+
/**
|
|
267
|
+
* One entry of a `tools/list` answer, narrowed to what this client reads.
|
|
268
|
+
*
|
|
269
|
+
* `_meta` is the spec's own extensibility bag on a `Tool` object, and it is in
|
|
270
|
+
* this shim because agentfootprint's tool DECLARATIONS ride in it under one
|
|
271
|
+
* namespaced key (see `toolExtras.ts`). It is typed as a loose record on
|
|
272
|
+
* purpose: everything in it is written by a server this process does not
|
|
273
|
+
* control, so the shim promises only that it is an object, and
|
|
274
|
+
* `readToolExtras` does the judging.
|
|
275
|
+
*/
|
|
276
|
+
export interface McpListedTool {
|
|
277
|
+
readonly name: string;
|
|
278
|
+
readonly description?: string;
|
|
279
|
+
readonly inputSchema: Readonly<Record<string, unknown>>;
|
|
280
|
+
/** MCP's extensibility bag. Absent from most servers' tools. */
|
|
281
|
+
readonly _meta?: Readonly<Record<string, unknown>>;
|
|
282
|
+
}
|
|
270
283
|
/**
|
|
271
284
|
* What `tools/call` can answer with — **a union, because the protocol is one.**
|
|
272
285
|
*
|
|
@@ -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 './skillScopedTools.js';
|
|
53
53
|
export type { ToolProvider, ToolDispatchContext, ToolGatePredicate } from './types.js';
|
|
54
|
-
export { mcpClient, mcpServe, mockMcpClient, gatewayTransport, GatewayAuthorizationRequiredError, } from '../lib/mcp/index.js';
|
|
54
|
+
export { mcpClient, mcpServe, mockMcpClient, gatewayTransport, GatewayAuthorizationRequiredError, MCP_TOOL_EXTRAS_KEY, } from '../lib/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
|
-
export type { GatewayTransportOptions, McpCallToolResult, McpClient, McpClientOptions, McpSdkClient, McpTransport, McpStdioTransport, McpHttpTransport, McpGatewayTransport, MockMcpClientOptions, MockMcpTool, McpServeOptions, McpServeHandle, McpServeTransport, McpStdioServeTransport, McpHttpServeTransport, McpSdkServer, } from '../lib/mcp/index.js';
|
|
57
|
+
export type { GatewayTransportOptions, McpCallToolResult, McpClient, McpClientOptions, McpSdkClient, McpTransport, McpStdioTransport, McpHttpTransport, McpGatewayTransport, MockMcpClientOptions, MockMcpTool, McpServeOptions, McpServeHandle, McpServeTransport, McpStdioServeTransport, McpHttpServeTransport, McpSdkServer, McpToolExtras, } from '../lib/mcp/index.js';
|
|
@@ -56,7 +56,11 @@ skillScopedToolsTarget, SKILL_SCOPED_TOOLS_ID_PREFIX, } from './skillScopedTools
|
|
|
56
56
|
// Re-export tool sources from the MCP module so consumers find them in
|
|
57
57
|
// one place. This subpath is the ONLY place `mcpClient` is public — the
|
|
58
58
|
// top-level barrel does not re-export it.
|
|
59
|
-
export { mcpClient, mcpServe, mockMcpClient, gatewayTransport, GatewayAuthorizationRequiredError,
|
|
59
|
+
export { mcpClient, mcpServe, mockMcpClient, gatewayTransport, GatewayAuthorizationRequiredError,
|
|
60
|
+
// The `_meta` key agentfootprint's tool declarations travel under, in both
|
|
61
|
+
// directions (9.71.0). Public so a server this library did not write can
|
|
62
|
+
// speak it, and so a client can read a bag it received.
|
|
63
|
+
MCP_TOOL_EXTRAS_KEY, } from '../lib/mcp/index.js';
|
|
60
64
|
// Reaching an AWS Bedrock AgentCore Gateway (9.66.0). A configuration of
|
|
61
65
|
// `gatewayTransport` plus the four facts that are AgentCore's alone — kept in
|
|
62
66
|
// the vendor's own file so the transport above stays able to say, truthfully,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","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;AAChB,kFAAkF;AAClF,kFAAkF;AAClF,sBAAsB,EACtB,4BAA4B,GAC7B,MAAM,uBAAuB,CAAC;AAG/B,uEAAuE;AACvE,wEAAwE;AACxE,0CAA0C;AAC1C,OAAO,EACL,SAAS,EACT,QAAQ,EACR,aAAa,EACb,gBAAgB,EAChB,iCAAiC,
|
|
1
|
+
{"version":3,"file":"index.js","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;AAChB,kFAAkF;AAClF,kFAAkF;AAClF,sBAAsB,EACtB,4BAA4B,GAC7B,MAAM,uBAAuB,CAAC;AAG/B,uEAAuE;AACvE,wEAAwE;AACxE,0CAA0C;AAC1C,OAAO,EACL,SAAS,EACT,QAAQ,EACR,aAAa,EACb,gBAAgB,EAChB,iCAAiC;AACjC,2EAA2E;AAC3E,yEAAyE;AACzE,wDAAwD;AACxD,mBAAmB,GACpB,MAAM,qBAAqB,CAAC;AAC7B,yEAAyE;AACzE,8EAA8E;AAC9E,8EAA8E;AAC9E,yCAAyC;AACzC,OAAO,EACL,yBAAyB,EACzB,mBAAmB,EACnB,iBAAiB,EACjB,gBAAgB,EAChB,6BAA6B,EAC7B,+BAA+B,EAC/B,uBAAuB,GACxB,MAAM,8BAA8B,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -22,9 +22,9 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
22
22
|
};
|
|
23
23
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
24
24
|
exports.buildAgentMessageApiChart = exports.LLMCallBuilder = exports.LLMCall = exports.selectCommentaryKey = exports.renderCommentary = exports.extractCommentaryVars = exports.extractAgentName = exports.defaultCommentaryTemplates = exports.CheckInRecorder = exports.minimalEvidenceAssembler = exports.standardEvidenceAssembler = exports.lexicalDriverScorer = exports.isCheckInDecision = exports.checkInDeclined = exports.checkInApproved = exports.ACT_KEYS = exports.actKeyFor = exports.LOOP_MOMENTS = exports.MessageDeniedError = exports.deny = exports.ask = exports.allow = exports.InvalidAskComponentError = exports.assertAskComponent = exports.readAskComponent = exports.PauseAnswerRequiredError = exports.StaleDecisionError = exports.DecisionRequiredError = exports.pauseDemandsDecision = exports.isAskPause = exports.isCheckInPause = exports.isPaused = exports.isPauseRequest = exports.askHuman = exports.pauseHere = exports.makeRunId = exports.RunnerBase = exports.BASELINE_SOURCES = exports.ENGINEERED_SOURCES = exports.isBaselineSource = exports.isEngineeredSource = exports.contextEngineering = exports.COMPOSITION_KEYS = exports.isReservedSubflowSegment = exports.RESERVED_SUBFLOW_PREFIX = exports.milestoneFor = exports.stageRole = exports.isInjectionKey = exports.injectionKeyForSlot = exports.INJECTION_KEYS = void 0;
|
|
25
|
-
exports.
|
|
26
|
-
exports.
|
|
27
|
-
exports.topK = exports.indexDocuments = exports.DEFAULT_CORPUS_IDENTITY = exports.defineRAG = exports.providerFromEnv = exports.Graph = exports.graph = exports.Workflow = exports.workflow = exports.LoopBuilder = exports.Loop = exports.ConditionalBuilder = exports.Conditional = exports.ParallelBuilder = exports.Parallel = exports.SequenceBuilder = exports.Sequence = exports.PRESENT_TOOL_NAME = exports.placedResultKind = exports.isPlacedToolResult = void 0;
|
|
25
|
+
exports.readAbsence = exports.COVERAGE_NOTE = exports.COVERAGE_MARKER = exports.COVERAGE_BLOCK_HEADING = exports.coverage = exports.absent = exports.ABSENCE_NOTE = exports.ABSENCE_MARKER = exports.TOOL_RESULT_STATUSES = exports.readToolResultEnvelope = exports.explainStatusOnlyNearMiss = exports.warnIfInvalidToolName = exports.assertResultKind = exports.assertResultClass = exports.assertResultCeiling = exports.assertValidToolName = exports.defineTool = exports.flowchartAsTool = exports.RunInFlightError = exports.PendingQuestionError = exports.NoConversationError = exports.isContextWindowExceeded = exports.ERR_CONTEXT_WINDOW_EXCEEDED = exports.ContextWindowExceededError = exports.DEFAULT_SESSION_STORAGE_KEY = exports.browserSessionId = exports.RunCheckpointError = exports.ConversationMismatchError = exports.canResume = exports.UnsupportedValuesError = exports.EVIDENCE_CHECK_FRAME_PREFIX = exports.isSchemaCheckMessage = exports.SCHEMA_TOOL_NAME = exports.SCHEMA_CHECK_FRAME_PREFIX = exports.InvalidRunInputError = exports.applyOutputSchema = exports.OutputSchemaError = exports.isTruncatedToolResult = exports.tokenBudget = exports.summarizeOldest = exports.slidingWindow = exports.isDropNotice = exports.isCompactedSummary = exports.foldedSpanFor = exports.foldedMessages = exports.DROP_NOTICE_PREFIX = exports.COMPACTED_FRAME_PREFIX = exports.CompactionUnmeasurableError = exports.AgentBuilder = exports.Agent = void 0;
|
|
26
|
+
exports.runArtifactStoreConformance = exports.runArtifactStoreCase = exports.formatArtifactStoreReport = exports.artifactStoreConformance = exports.canStreamArtifacts = exports.canPutArtifactStream = exports.canGetArtifactStream = exports.UnreadableArtifactStoreError = exports.UnreadableArtifactFileError = exports.UnknownParentRefError = exports.unconfiguredArtifacts = exports.sqliteArtifacts = exports.s3Artifacts = exports.mintArtifactRef = exports.isArtifactRef = exports.InvalidArtifactError = exports.inMemoryArtifacts = exports.gcsArtifacts = exports.fileArtifacts = exports.DEFAULT_IN_MEMORY_ARTIFACT_RETENTION = exports.UnserializableRecordingError = exports.recordingPutInput = exports.RECORDING_MEDIA_TYPE = exports.RECORDING_ARTIFACT_KIND = exports.bindArtifacts = exports.ArtifactIntegrityError = exports.ARTIFACT_REF_PREFIX = exports.formatToolContractCheckup = exports.toolContractCheckup = exports.TOOL_SESSIONS = exports.toolSessionsOf = exports.codeRunsOf = exports.codeShape = exports.codeRunnerTool = exports.TOOL_TEARDOWN_TIMEOUT_MS = exports.ToolTeardownTimeoutError = exports.hashSessionKey = exports.toolSessionKey = exports.semanticsForModel = exports.SEMANTICS_NOTE = exports.SEMANTICS_MARKER = exports.semantic = exports.RESULT_CLASSES = exports.readSemantics = exports.isCounterLookingAggregation = exports.explainSemantics = exports.COUNTER_AGGREGATION_WORDS = exports.composeNotCovered = exports.readCoverageResult = exports.readCoverageLedger = void 0;
|
|
27
|
+
exports.topK = exports.indexDocuments = exports.DEFAULT_CORPUS_IDENTITY = exports.defineRAG = exports.providerFromEnv = exports.Graph = exports.graph = exports.Workflow = exports.workflow = exports.LoopBuilder = exports.Loop = exports.ConditionalBuilder = exports.Conditional = exports.ParallelBuilder = exports.Parallel = exports.SequenceBuilder = exports.Sequence = exports.PRESENT_TOOL_NAME = exports.placedResultKind = exports.isPlacedToolResult = exports.assertToolWants = void 0;
|
|
28
28
|
// Side-effect imports — auto-register v2.6+ cache strategies in the
|
|
29
29
|
// strategy registry. Without these, only the wildcard NoOp is
|
|
30
30
|
// registered and `Agent.create({ provider: browserAnthropic({...}) })`
|
|
@@ -293,6 +293,11 @@ Object.defineProperty(exports, "defineTool", { enumerable: true, get: function (
|
|
|
293
293
|
Object.defineProperty(exports, "assertValidToolName", { enumerable: true, get: function () { return tools_js_1.assertValidToolName; } });
|
|
294
294
|
Object.defineProperty(exports, "assertResultCeiling", { enumerable: true, get: function () { return tools_js_1.assertResultCeiling; } });
|
|
295
295
|
Object.defineProperty(exports, "assertResultClass", { enumerable: true, get: function () { return tools_js_1.assertResultClass; } });
|
|
296
|
+
// The placed-result kind (9.70.0) — `Tool.resultKind` lets a tool declare
|
|
297
|
+
// the artifact kind its PLACED result is minted under, so the ticket speaks
|
|
298
|
+
// the vocabulary a `wants` argument names. Exported beside the other two
|
|
299
|
+
// for consumers assembling `Tool` objects by hand.
|
|
300
|
+
Object.defineProperty(exports, "assertResultKind", { enumerable: true, get: function () { return tools_js_1.assertResultKind; } });
|
|
296
301
|
Object.defineProperty(exports, "warnIfInvalidToolName", { enumerable: true, get: function () { return tools_js_1.warnIfInvalidToolName; } });
|
|
297
302
|
// Typed tool effects (9.19.0) — the result envelope a tool may return to
|
|
298
303
|
// steer the run with DATA instead of string conventions: propose a graph
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;;;;;;;;;;;;;;;;;AAEH,oEAAoE;AACpE,8DAA8D;AAC9D,uEAAuE;AACvE,kEAAkE;AAClE,sEAAsE;AACtE,sDAAsD;AACtD,wDAAsD;AACtD,qDAAmD;AACnD,sDAAoD;AAsCpD,6BAA6B;AAC7B,sDAAoC;AAEpC,yEAAyE;AACzE,uDAAuD;AACvD,mDA0B0B;AAzBxB,gHAAA,cAAc,OAAA;AACd,qHAAA,mBAAmB,OAAA;AACnB,gHAAA,cAAc,OAAA;AAEd,yE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;AAExF,sEAK0C;AAJxC,oHAAA,eAAe,OAAA;AAMjB,+DAA+D;AAE/D,oEAAoE;AACpE,gEAAgE;AAEhE,qEAAqE;AACrE,0DAA0D;AAC1D,sDAAoC;AAEpC,uEAAuE;AACvE,uEAAuE;AACvE,oEAAoE;AACpE,sEAAsE;AACtE,8CAA8C;AAE9C,wEAAwE;AACxE,sEAAsE;AACtE,sEAAsE;AACtE,gDAO4B;AAN1B,sGAAA,SAAS,OAAA;AACT,oHAAA,uBAAuB,OAAA;AAEvB,2GAAA,cAAc,OAAA;AAKhB,yEAAyE;AACzE,0EAA0E;AAC1E,qEAAqE;AACrE,iEAAiE;AACjE,yDAOqC;AANnC,iGAAA,IAAI,OAAA;AAQN,qEAAqE;AACrE,wEAAwE;AACxE,uEAAuE;AACvE,oEAAoE;AACpE,yDAAyD;AACzD,wEAAwE;AACxE,gDAAgD;AAChD,wEAAwE;AACxE,gEAAgE;AAEhE,wEAAwE;AACxE,wEAAwE;AACxE,uDAAuD;AAEvD,mEAAmE;AACnE,oEAAoE;AACpE,sDAAsD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/lib/injection-engine/types.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;GAiBG;;;AAKH,2DAAqD;
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/lib/injection-engine/types.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;GAiBG;;;AAKH,2DAAqD;AAiSrD;;;;;;;;GAQG;AACH,SAAgB,aAAa,CAAC,GAAqB;IAMjD,OAAO,GAAG,CAAC,WAAW,IAAI,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;AAC7E,CAAC;AAPD,sCAOC;AAoMD;;;;;;;;;;;;;GAaG;AACH,SAAgB,sBAAsB,CACpC,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AAQ,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,GAAG,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC;YACpF,GAAG,CAAC,GAAG,CAAC,MAAM,CAAC,KAAK,IAAI;gBACtB,KAAK,EAAE,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;oBAClC,MAAM,EAAE,EAAE,GAAG,CAAC,CAAC,MAAM,EAAE;oBACvB,WAAW,EAAE,GAAG,CAAC,EAAE;iBACpB,CAAC,CAAC;aACJ,CAAC;SACH;KACF,CAAC;IACF,OAAO,GAAG,CAAC;AACb,CAAC;AA/CD,wDA+CC"}
|
package/dist/lib/mcp/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.GatewayAuthorizationRequiredError = exports.gatewayTransport = exports.mockMcpClient = exports.mcpServe = exports.mcpClient = void 0;
|
|
3
|
+
exports.GatewayAuthorizationRequiredError = exports.gatewayTransport = exports.mockMcpClient = exports.MCP_TOOL_EXTRAS_KEY = exports.mcpServe = exports.mcpClient = void 0;
|
|
4
4
|
/**
|
|
5
5
|
* MCP — Model Context Protocol, both directions. `mcpClient` connects to
|
|
6
6
|
* someone else's MCP server and registers its tools on your Agent;
|
|
@@ -11,6 +11,10 @@ var mcpClient_js_1 = require("./mcpClient.js");
|
|
|
11
11
|
Object.defineProperty(exports, "mcpClient", { enumerable: true, get: function () { return mcpClient_js_1.mcpClient; } });
|
|
12
12
|
var mcpServe_js_1 = require("./mcpServe.js");
|
|
13
13
|
Object.defineProperty(exports, "mcpServe", { enumerable: true, get: function () { return mcpServe_js_1.mcpServe; } });
|
|
14
|
+
// The declaration bag both directions speak (9.71.0) — one namespaced `_meta`
|
|
15
|
+
// key, and the shape a non-agentfootprint server writes to be understood.
|
|
16
|
+
var toolExtras_js_1 = require("./toolExtras.js");
|
|
17
|
+
Object.defineProperty(exports, "MCP_TOOL_EXTRAS_KEY", { enumerable: true, get: function () { return toolExtras_js_1.MCP_TOOL_EXTRAS_KEY; } });
|
|
14
18
|
var mockMcpClient_js_1 = require("./mockMcpClient.js");
|
|
15
19
|
Object.defineProperty(exports, "mockMcpClient", { enumerable: true, get: function () { return mockMcpClient_js_1.mockMcpClient; } });
|
|
16
20
|
var gatewayTransport_js_1 = require("./gatewayTransport.js");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/lib/mcp/index.ts"],"names":[],"mappings":";;;AAAA;;;;;GAKG;AACH,+CAA2C;AAAlC,yGAAA,SAAS,OAAA;AAClB,6CAAyC;AAAhC,uGAAA,QAAQ,OAAA;AACjB,uDAAgG;AAAvF,iHAAA,aAAa,OAAA;AACtB,6DAI+B;AAH7B,uHAAA,gBAAgB,OAAA;AAChB,wIAAA,iCAAiC,OAAA"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/lib/mcp/index.ts"],"names":[],"mappings":";;;AAAA;;;;;GAKG;AACH,+CAA2C;AAAlC,yGAAA,SAAS,OAAA;AAClB,6CAAyC;AAAhC,uGAAA,QAAQ,OAAA;AACjB,8EAA8E;AAC9E,0EAA0E;AAC1E,iDAA0E;AAAjE,oHAAA,mBAAmB,OAAA;AAC5B,uDAAgG;AAAvF,iHAAA,aAAa,OAAA;AACtB,6DAI+B;AAH7B,uHAAA,gBAAgB,OAAA;AAChB,wIAAA,iCAAiC,OAAA"}
|
|
@@ -23,6 +23,12 @@
|
|
|
23
23
|
* Role: Layer-3 integration. Sits next to `defineTool` — same
|
|
24
24
|
* shape, different source. Once tools land on the agent,
|
|
25
25
|
* the rest of the library doesn't know they came from MCP.
|
|
26
|
+
* Since 9.71.0 that is true of DECLARATIONS too: a server's
|
|
27
|
+
* `_meta` bag becomes `argumentsFrom` / `resultKind` / `owner`
|
|
28
|
+
* / `resultClass` / `resultCeiling` on the registered `Tool`,
|
|
29
|
+
* so the integrity checks, the placement mint and the identity
|
|
30
|
+
* joins arm for a remote tool exactly as for a local one. The
|
|
31
|
+
* reading NEVER throws — see `toolExtras.ts`.
|
|
26
32
|
*
|
|
27
33
|
* Emits: N/A — wrapped tools emit the standard
|
|
28
34
|
* `agentfootprint.stream.tool_start` / `tool_end` events
|
|
@@ -36,6 +42,7 @@
|
|
|
36
42
|
*/
|
|
37
43
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
38
44
|
exports.mcpClient = void 0;
|
|
45
|
+
const toolExtras_js_1 = require("./toolExtras.js");
|
|
39
46
|
const gatewayTransport_js_1 = require("./gatewayTransport.js");
|
|
40
47
|
const throttleRetry_js_1 = require("./throttleRetry.js");
|
|
41
48
|
const lazyRequire_js_1 = require("../lazyRequire.js");
|
|
@@ -189,6 +196,13 @@ function wrapMcpTool(serverName, sdk, mcp, signal) {
|
|
|
189
196
|
// bare tool name cannot tell two servers' identically-named tools apart;
|
|
190
197
|
// this is the fact that lets it. See `Tool.source`.
|
|
191
198
|
source: serverName,
|
|
199
|
+
// The DECLARATIONS the server sent in MCP's `_meta` bag (9.71.0) — read
|
|
200
|
+
// defensively, per field, by the same rules `defineTool` enforces, and
|
|
201
|
+
// NEVER throwing: a malformed field is warned about once and dropped, and
|
|
202
|
+
// this tool still registers. That is what keeps one bad tool from killing
|
|
203
|
+
// a forty-tool bulk register. A server that sent no bag adds no keys here,
|
|
204
|
+
// so the Tool is byte-identical to one built before this existed.
|
|
205
|
+
...(0, toolExtras_js_1.readToolExtras)(mcp._meta, { server: serverName, tool: mcp.name }),
|
|
192
206
|
execute: async (args) => {
|
|
193
207
|
// The agent passes args as `unknown` per Tool contract. MCP
|
|
194
208
|
// expects a JSON object — non-object inputs become `{}` rather
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mcpClient.js","sourceRoot":"","sources":["../../../src/lib/mcp/mcpClient.ts"],"names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