agentfootprint 7.22.0 → 7.23.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/ai-instructions/claude-code/SKILL.md +2 -1
- package/dist/adapters/hosting/agentcore.js +68 -8
- package/dist/adapters/hosting/agentcore.js.map +1 -1
- package/dist/adapters/memory/agentcore.js +116 -11
- package/dist/adapters/memory/agentcore.js.map +1 -1
- package/dist/core/agent/middleware/runChain.js +4 -0
- package/dist/core/agent/middleware/runChain.js.map +1 -1
- package/dist/core/agent/stages/toolCalls.js +9 -1
- package/dist/core/agent/stages/toolCalls.js.map +1 -1
- package/dist/core/tools.js.map +1 -1
- package/dist/esm/adapters/hosting/agentcore.d.ts +34 -4
- package/dist/esm/adapters/hosting/agentcore.js +68 -8
- package/dist/esm/adapters/hosting/agentcore.js.map +1 -1
- package/dist/esm/adapters/memory/agentcore.d.ts +59 -1
- package/dist/esm/adapters/memory/agentcore.js +114 -10
- package/dist/esm/adapters/memory/agentcore.js.map +1 -1
- package/dist/esm/core/agent/middleware/runChain.d.ts +2 -0
- package/dist/esm/core/agent/middleware/runChain.js +4 -0
- package/dist/esm/core/agent/middleware/runChain.js.map +1 -1
- package/dist/esm/core/agent/middleware/types.d.ts +12 -0
- package/dist/esm/core/agent/stages/toolCalls.js +9 -1
- package/dist/esm/core/agent/stages/toolCalls.js.map +1 -1
- package/dist/esm/core/tools.d.ts +18 -0
- package/dist/esm/core/tools.js.map +1 -1
- package/dist/esm/hosting/envelope.d.ts +31 -2
- package/dist/esm/hosting/envelope.js +42 -7
- package/dist/esm/hosting/envelope.js.map +1 -1
- package/dist/esm/hosting/errors.d.ts +44 -1
- package/dist/esm/hosting/errors.js +81 -1
- package/dist/esm/hosting/errors.js.map +1 -1
- package/dist/esm/hosting/index.d.ts +5 -1
- package/dist/esm/hosting/index.js +5 -1
- package/dist/esm/hosting/index.js.map +1 -1
- package/dist/esm/hosting/standingAgent.d.ts +9 -0
- package/dist/esm/hosting/standingAgent.js +30 -9
- package/dist/esm/hosting/standingAgent.js.map +1 -1
- package/dist/esm/lib/mcp/index.d.ts +1 -1
- package/dist/esm/lib/mcp/mcpClient.js +104 -11
- package/dist/esm/lib/mcp/mcpClient.js.map +1 -1
- package/dist/esm/lib/mcp/mcpServe.js +6 -0
- package/dist/esm/lib/mcp/mcpServe.js.map +1 -1
- package/dist/esm/lib/mcp/mockMcpClient.js +4 -0
- package/dist/esm/lib/mcp/mockMcpClient.js.map +1 -1
- package/dist/esm/lib/mcp/types.d.ts +71 -7
- package/dist/esm/lib/storedPreview.d.ts +58 -0
- package/dist/esm/lib/storedPreview.js +97 -0
- package/dist/esm/lib/storedPreview.js.map +1 -0
- package/dist/esm/memory-providers.d.ts +1 -1
- package/dist/esm/memory-providers.js +1 -1
- package/dist/esm/memory-providers.js.map +1 -1
- package/dist/esm/tool-providers/index.d.ts +1 -1
- package/dist/hosting/envelope.js +42 -7
- package/dist/hosting/envelope.js.map +1 -1
- package/dist/hosting/errors.js +83 -2
- package/dist/hosting/errors.js.map +1 -1
- package/dist/hosting/index.js +6 -1
- package/dist/hosting/index.js.map +1 -1
- package/dist/hosting/standingAgent.js +29 -8
- package/dist/hosting/standingAgent.js.map +1 -1
- package/dist/lib/mcp/mcpClient.js +104 -11
- package/dist/lib/mcp/mcpClient.js.map +1 -1
- package/dist/lib/mcp/mcpServe.js +6 -0
- package/dist/lib/mcp/mcpServe.js.map +1 -1
- package/dist/lib/mcp/mockMcpClient.js +4 -0
- package/dist/lib/mcp/mockMcpClient.js.map +1 -1
- package/dist/lib/storedPreview.js +102 -0
- package/dist/lib/storedPreview.js.map +1 -0
- package/dist/memory-providers.js +2 -1
- package/dist/memory-providers.js.map +1 -1
- package/dist/types/adapters/hosting/agentcore.d.ts +34 -4
- package/dist/types/adapters/hosting/agentcore.d.ts.map +1 -1
- package/dist/types/adapters/memory/agentcore.d.ts +59 -1
- package/dist/types/adapters/memory/agentcore.d.ts.map +1 -1
- package/dist/types/core/agent/middleware/runChain.d.ts +2 -0
- package/dist/types/core/agent/middleware/runChain.d.ts.map +1 -1
- package/dist/types/core/agent/middleware/types.d.ts +12 -0
- package/dist/types/core/agent/middleware/types.d.ts.map +1 -1
- package/dist/types/core/agent/stages/toolCalls.d.ts.map +1 -1
- package/dist/types/core/tools.d.ts +18 -0
- package/dist/types/core/tools.d.ts.map +1 -1
- package/dist/types/hosting/envelope.d.ts +31 -2
- package/dist/types/hosting/envelope.d.ts.map +1 -1
- package/dist/types/hosting/errors.d.ts +44 -1
- package/dist/types/hosting/errors.d.ts.map +1 -1
- package/dist/types/hosting/index.d.ts +5 -1
- package/dist/types/hosting/index.d.ts.map +1 -1
- package/dist/types/hosting/standingAgent.d.ts +9 -0
- package/dist/types/hosting/standingAgent.d.ts.map +1 -1
- package/dist/types/lib/mcp/index.d.ts +1 -1
- package/dist/types/lib/mcp/index.d.ts.map +1 -1
- package/dist/types/lib/mcp/mcpClient.d.ts.map +1 -1
- package/dist/types/lib/mcp/mcpServe.d.ts.map +1 -1
- package/dist/types/lib/mcp/types.d.ts +71 -7
- package/dist/types/lib/mcp/types.d.ts.map +1 -1
- package/dist/types/lib/storedPreview.d.ts +59 -0
- package/dist/types/lib/storedPreview.d.ts.map +1 -0
- package/dist/types/memory-providers.d.ts +1 -1
- package/dist/types/memory-providers.d.ts.map +1 -1
- package/dist/types/tool-providers/index.d.ts +1 -1
- package/dist/types/tool-providers/index.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mcpClient.d.ts","sourceRoot":"","sources":["../../../../src/lib/mcp/mcpClient.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AAGH,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"mcpClient.d.ts","sourceRoot":"","sources":["../../../../src/lib/mcp/mcpClient.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AAGH,OAAO,KAAK,EAEV,SAAS,EACT,gBAAgB,EAGjB,MAAM,YAAY,CAAC;AAYpB;;;;;;;;GAQG;AACH,wBAAsB,SAAS,CAAC,IAAI,EAAE,gBAAgB,GAAG,OAAO,CAAC,SAAS,CAAC,CA6C1E"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mcpServe.d.ts","sourceRoot":"","sources":["../../../../src/lib/mcp/mcpServe.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoDG;AAMH,OAAO,KAAK,EAAE,IAAI,EAAwB,MAAM,qBAAqB,CAAC;AAGtE,OAAO,KAAK,EAIV,cAAc,EACd,eAAe,EAEhB,MAAM,YAAY,CAAC;AAQpB;;;;;;;;;GASG;AACH,wBAAsB,QAAQ,CAC5B,KAAK,EAAE,SAAS,IAAI,EAAE,EACtB,IAAI,GAAE,eAAoB,GACzB,OAAO,CAAC,cAAc,CAAC,
|
|
1
|
+
{"version":3,"file":"mcpServe.d.ts","sourceRoot":"","sources":["../../../../src/lib/mcp/mcpServe.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoDG;AAMH,OAAO,KAAK,EAAE,IAAI,EAAwB,MAAM,qBAAqB,CAAC;AAGtE,OAAO,KAAK,EAIV,cAAc,EACd,eAAe,EAEhB,MAAM,YAAY,CAAC;AAQpB;;;;;;;;;GASG;AACH,wBAAsB,QAAQ,CAC5B,KAAK,EAAE,SAAS,IAAI,EAAE,EACtB,IAAI,GAAE,eAAoB,GACzB,OAAO,CAAC,cAAc,CAAC,CA0IzB;AAmKD;;;;GAIG;AACH,eAAO,MAAM,mBAAmB;;EAA0C,CAAC;AAC3E,yCAAyC;AACzC,eAAO,MAAM,kBAAkB;;EAA0C,CAAC"}
|
|
@@ -54,6 +54,42 @@ export interface McpHttpTransport {
|
|
|
54
54
|
readonly url: string;
|
|
55
55
|
/** Optional auth headers (e.g., `Authorization: Bearer ...`). */
|
|
56
56
|
readonly headers?: Readonly<Record<string, string>>;
|
|
57
|
+
/**
|
|
58
|
+
* Your own `fetch`, used for every request this transport makes —
|
|
59
|
+
* `initialize`, `tools/list`, `tools/call` and the SSE stream alike.
|
|
60
|
+
*
|
|
61
|
+
* It exists because some endpoints do not want a header, they want a
|
|
62
|
+
* **signature**: SigV4, DPoP, an HMAC over the body, a digest of the bytes
|
|
63
|
+
* about to be sent. None of those can be decided when the connection is
|
|
64
|
+
* built, because they are computed FROM the request — its method, its URL,
|
|
65
|
+
* its body. A header fixed at construction cannot express them.
|
|
66
|
+
*
|
|
67
|
+
* So this library does not implement any of them. It hands you the one hook
|
|
68
|
+
* the MCP SDK already has, and you sign in your own code: **zero vendor code
|
|
69
|
+
* lives here**, and a signing scheme this repo has never heard of works on
|
|
70
|
+
* the day you write it.
|
|
71
|
+
*
|
|
72
|
+
* ```ts
|
|
73
|
+
* transport: {
|
|
74
|
+
* transport: 'http',
|
|
75
|
+
* url: process.env.MCP_URL!,
|
|
76
|
+
* fetch: async (url, init) => {
|
|
77
|
+
* const headers = new Headers(init?.headers);
|
|
78
|
+
* headers.set('authorization', await sign(init?.method ?? 'GET', url, init?.body));
|
|
79
|
+
* return fetch(url, { ...init, headers });
|
|
80
|
+
* },
|
|
81
|
+
* }
|
|
82
|
+
* ```
|
|
83
|
+
*
|
|
84
|
+
* Composes with {@link headers}: both are applied. The SDK merges the static
|
|
85
|
+
* headers into the `init.headers` your function receives, so you see them and
|
|
86
|
+
* have the last word — set the same header name and yours is what goes on the
|
|
87
|
+
* wire. Omit this and behaviour is byte-identical to before it existed.
|
|
88
|
+
*
|
|
89
|
+
* Whatever you set here is between you and the server: this library never
|
|
90
|
+
* reads, stores, logs or records the headers your function produces.
|
|
91
|
+
*/
|
|
92
|
+
readonly fetch?: (input: string | URL, init?: RequestInit) => Promise<Response>;
|
|
57
93
|
}
|
|
58
94
|
/**
|
|
59
95
|
* `gateway` transport — MCP over Streamable HTTP, with the auth headers vended
|
|
@@ -122,6 +158,11 @@ export interface McpClientOptions {
|
|
|
122
158
|
/**
|
|
123
159
|
* @internal Pre-built SDK client for tests. Skips SDK import +
|
|
124
160
|
* transport construction. Same convention as `AnthropicProvider._client`.
|
|
161
|
+
*
|
|
162
|
+
* Because it skips transport construction it also skips everything the
|
|
163
|
+
* transport carries — `headers`, `fetch`, a gateway's vending. Nothing about
|
|
164
|
+
* authentication can be proven through this seam, which is why the signing
|
|
165
|
+
* tests run against a real socket.
|
|
125
166
|
*/
|
|
126
167
|
readonly _client?: McpSdkClient;
|
|
127
168
|
}
|
|
@@ -179,15 +220,38 @@ export interface McpSdkClient {
|
|
|
179
220
|
readonly arguments?: Readonly<Record<string, unknown>>;
|
|
180
221
|
},
|
|
181
222
|
/** The SDK's result schema. We always want its default, so we pass `undefined`. */
|
|
182
|
-
resultSchema?: undefined, options?: McpRequestOptions): Promise<
|
|
183
|
-
readonly content: ReadonlyArray<{
|
|
184
|
-
readonly type: string;
|
|
185
|
-
readonly text?: string;
|
|
186
|
-
}>;
|
|
187
|
-
readonly isError?: boolean;
|
|
188
|
-
}>;
|
|
223
|
+
resultSchema?: undefined, options?: McpRequestOptions): Promise<McpCallToolResult>;
|
|
189
224
|
close(): Promise<void>;
|
|
190
225
|
}
|
|
226
|
+
/**
|
|
227
|
+
* What `tools/call` can answer with — **a union, because the protocol is one.**
|
|
228
|
+
*
|
|
229
|
+
* The current shape carries `content` blocks. The 2024-10-07 shape carries a
|
|
230
|
+
* bare `toolResult` and no `content` at all, and the SDK still accepts it: its
|
|
231
|
+
* own declared return type for `callTool` is exactly this union, and servers
|
|
232
|
+
* that predate the change are still running.
|
|
233
|
+
*
|
|
234
|
+
* It is spelled out here rather than narrowed away because a shim that promised
|
|
235
|
+
* only the `content` arm made `result.content.map(...)` compile against a value
|
|
236
|
+
* that can legitimately arrive without one. That failed two different ways,
|
|
237
|
+
* both invisible to a compiler reading the old shim: **a crash** where the raw
|
|
238
|
+
* legacy object reaches the reader (a caller-supplied `_client`, an SDK build
|
|
239
|
+
* that does not normalise), and **a silently empty answer** where the SDK's own
|
|
240
|
+
* result schema defaults `content` to `[]` beside the `toolResult` it could not
|
|
241
|
+
* express. The union is what makes handling both arms a compile-time obligation
|
|
242
|
+
* instead of a thing someone remembers.
|
|
243
|
+
*/
|
|
244
|
+
export type McpCallToolResult = {
|
|
245
|
+
readonly content: ReadonlyArray<{
|
|
246
|
+
readonly type: string;
|
|
247
|
+
readonly text?: string;
|
|
248
|
+
}>;
|
|
249
|
+
readonly isError?: boolean;
|
|
250
|
+
}
|
|
251
|
+
/** The 2024-10-07 arm. No `content`, and no `isError` — the shape predates it. */
|
|
252
|
+
| {
|
|
253
|
+
readonly toolResult: unknown;
|
|
254
|
+
};
|
|
191
255
|
/**
|
|
192
256
|
* The SDK's trailing per-request options argument, narrowed to the one
|
|
193
257
|
* field we forward from {@link McpClientOptions.signal}.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/lib/mcp/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAC;AAChD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAIlE;;;;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,4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S,OAAO,sCAAsC,EAAE,cAAc,EAAE,CAAC;IACnG;;;OAGG;IACH,QAAQ,CAAC,OAAO,CAAC,EAAE,YAAY,CAAC;CACjC;AAED;;;GAGG;AACH,MAAM,WAAW,cAAc;IAC7B,iDAAiD;IACjD,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,4EAA4E;IAC5E,QAAQ,CAAC,SAAS,EAAE,SAAS,MAAM,EAAE,CAAC;IACtC;;;;;;;;;;;;;OAaG;IACH,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IACvB;;;;;;;;;OASG;IACH,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAC1B;;;;OAIG;IACH,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;CACxB;AAED;;;;;GAKG;AACH,MAAM,WAAW,YAAY;IAC3B,iBAAiB,CACf,MAAM,EAAE,OAAO,EACf,OAAO,EAAE,CAAC,OAAO,EAAE,kBAAkB,EAAE,KAAK,EAAE;QAAE,QAAQ,CAAC,MAAM,CAAC,EAAE,WAAW,CAAA;KAAE,KAAK,OAAO,GAC1F,IAAI,CAAC;IACR,OAAO,CAAC,SAAS,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC3C,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;CACxB;AAED;;;GAGG;AACH,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,MAAM,CAAC,EAAE;QAChB,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;QACvB,QAAQ,CAAC,SAAS,CAAC,EAAE,OAAO,CAAC;KAC9B,CAAC;CACH"}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* lib/storedPreview — how much of somebody's stored data an error may quote.
|
|
3
|
+
*
|
|
4
|
+
* A refusal about unreadable bytes has to show enough of them to be diagnosable
|
|
5
|
+
* ("ah, that is our envelope stringified by something that was not JSON") and no
|
|
6
|
+
* more, because the rest of those bytes are a conversation, a memory, or
|
|
7
|
+
* whatever else a user said. Error messages travel: they land in logs, in
|
|
8
|
+
* dashboards, in bug reports pasted into chat windows. So the quote is capped,
|
|
9
|
+
* and the cap lives HERE rather than being re-decided by each adapter that needs
|
|
10
|
+
* one — two copies of a redaction rule is one copy that will drift.
|
|
11
|
+
*
|
|
12
|
+
* Structured values are SUMMARISED rather than serialized: an array reports its
|
|
13
|
+
* length and an object its keys, because `String(anObject)` and
|
|
14
|
+
* `JSON.stringify(anArray)` are both ways of accidentally printing the payload
|
|
15
|
+
* this file exists to keep out of the message.
|
|
16
|
+
*
|
|
17
|
+
* Two functions, because a cap is only safe when the first bytes are structure.
|
|
18
|
+
* {@link previewStored} quotes a capped prefix — right for a value whose opening
|
|
19
|
+
* fields are metadata. {@link describeStoredShape} quotes nothing at all — right
|
|
20
|
+
* for a value whose content starts immediately. Choosing between them is the
|
|
21
|
+
* caller's job because only the caller knows what its bytes begin with.
|
|
22
|
+
*/
|
|
23
|
+
/**
|
|
24
|
+
* How much of a stored value a refusal may quote. Enough to recognise a mangled
|
|
25
|
+
* encoding at a glance; not enough to leak what was being said.
|
|
26
|
+
*/
|
|
27
|
+
export declare const STORED_PREVIEW_LIMIT = 64;
|
|
28
|
+
/**
|
|
29
|
+
* Describe what a store handed back WITHOUT quoting the whole thing.
|
|
30
|
+
*
|
|
31
|
+
* @example
|
|
32
|
+
* previewStored('{format=conversation-v1, data={version=1, …}}')
|
|
33
|
+
* // → '"{format=conversation-v1, data={version=1, …" (96 chars)'
|
|
34
|
+
* previewStored({ id: 'm-1', value: 'her address is …' })
|
|
35
|
+
* // → 'an object with keys: id, value'
|
|
36
|
+
*/
|
|
37
|
+
export declare function previewStored(value: unknown): string;
|
|
38
|
+
/**
|
|
39
|
+
* Describe a stored value **without quoting any of it** — its type, its size and
|
|
40
|
+
* its shape, and nothing that came from a person.
|
|
41
|
+
*
|
|
42
|
+
* Use this instead of {@link previewStored} wherever the stored bytes carry
|
|
43
|
+
* user content from their first characters, so that even a capped prefix would
|
|
44
|
+
* leak. A `CheckpointEnvelope` opens with `format`, `data`, `savedAt` and can
|
|
45
|
+
* afford to be quoted; a `MemoryEntry` opens with `id` and then `value`, so its
|
|
46
|
+
* second field IS the thing somebody asked an agent to remember. The cap is a
|
|
47
|
+
* policy about how MUCH may be shown; this is the answer when the honest amount
|
|
48
|
+
* is none.
|
|
49
|
+
*
|
|
50
|
+
* It stays diagnosable, which is the whole job of the quote it replaces: a
|
|
51
|
+
* length, whether it is JSON at all, and its opening character are enough to
|
|
52
|
+
* recognise "an object stringified by something that was not JSON".
|
|
53
|
+
*
|
|
54
|
+
* @example
|
|
55
|
+
* describeStoredShape('{id=a, value={text=her address is …}}')
|
|
56
|
+
* // → "a 37-character string that is not JSON, starting '{'"
|
|
57
|
+
*/
|
|
58
|
+
export declare function describeStoredShape(value: unknown): string;
|
|
59
|
+
//# sourceMappingURL=storedPreview.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"storedPreview.d.ts","sourceRoot":"","sources":["../../../src/lib/storedPreview.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH;;;GAGG;AACH,eAAO,MAAM,oBAAoB,KAAK,CAAC;AAEvC;;;;;;;;GAQG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAOpD;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CA2B1D"}
|
|
@@ -33,6 +33,6 @@
|
|
|
33
33
|
* import { RedisStore, AgentCoreStore } from 'agentfootprint/memory-providers';
|
|
34
34
|
*/
|
|
35
35
|
export { RedisStore, type RedisStoreOptions, type RedisLikeClient, type RedisLikePipeline, } from './adapters/memory/redis.js';
|
|
36
|
-
export { AgentCoreStore, type AgentCoreStoreOptions, type AgentCoreLikeClient, type AgentCoreEvent, type AgentCoreMemoryRecord, } from './adapters/memory/agentcore.js';
|
|
36
|
+
export { AgentCoreStore, UnreadableMemoryEntryError, type AgentCoreStoreOptions, type AgentCoreLikeClient, type AgentCoreEvent, type AgentCoreMemoryRecord, } from './adapters/memory/agentcore.js';
|
|
37
37
|
export { BedrockAgentMemory, type BedrockAgentMemoryOptions, type BedrockAgentMemoryLikeClient, type BedrockAgentSummary, } from './adapters/memory/bedrockAgentMemory.js';
|
|
38
38
|
//# sourceMappingURL=memory-providers.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"memory-providers.d.ts","sourceRoot":"","sources":["../../src/memory-providers.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AAKH,OAAO,EACL,UAAU,EACV,KAAK,iBAAiB,EACtB,KAAK,eAAe,EACpB,KAAK,iBAAiB,GACvB,MAAM,4BAA4B,CAAC;AAEpC,OAAO,EACL,cAAc,EACd,KAAK,qBAAqB,EAC1B,KAAK,mBAAmB,EACxB,KAAK,cAAc,EACnB,KAAK,qBAAqB,GAC3B,MAAM,gCAAgC,CAAC;AAIxC,OAAO,EACL,kBAAkB,EAClB,KAAK,yBAAyB,EAC9B,KAAK,4BAA4B,EACjC,KAAK,mBAAmB,GACzB,MAAM,yCAAyC,CAAC"}
|
|
1
|
+
{"version":3,"file":"memory-providers.d.ts","sourceRoot":"","sources":["../../src/memory-providers.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AAKH,OAAO,EACL,UAAU,EACV,KAAK,iBAAiB,EACtB,KAAK,eAAe,EACpB,KAAK,iBAAiB,GACvB,MAAM,4BAA4B,CAAC;AAEpC,OAAO,EACL,cAAc,EACd,0BAA0B,EAC1B,KAAK,qBAAqB,EAC1B,KAAK,mBAAmB,EACxB,KAAK,cAAc,EACnB,KAAK,qBAAqB,GAC3B,MAAM,gCAAgC,CAAC;AAIxC,OAAO,EACL,kBAAkB,EAClB,KAAK,yBAAyB,EAC9B,KAAK,4BAA4B,EACjC,KAAK,mBAAmB,GACzB,MAAM,yCAAyC,CAAC"}
|
|
@@ -48,5 +48,5 @@ export { gatedTools } from './gatedTools.js';
|
|
|
48
48
|
export { skillScopedTools } from './skillScopedTools.js';
|
|
49
49
|
export type { ToolProvider, ToolDispatchContext, ToolGatePredicate } from './types.js';
|
|
50
50
|
export { mcpClient, mcpServe, mockMcpClient, gatewayTransport, GatewayAuthorizationRequiredError, } from '../lib/mcp/index.js';
|
|
51
|
-
export type { GatewayTransportOptions, McpClient, McpClientOptions, McpSdkClient, McpTransport, McpStdioTransport, McpHttpTransport, McpGatewayTransport, MockMcpClientOptions, MockMcpTool, McpServeOptions, McpServeHandle, McpServeTransport, McpStdioServeTransport, McpHttpServeTransport, McpSdkServer, } from '../lib/mcp/index.js';
|
|
51
|
+
export type { GatewayTransportOptions, McpCallToolResult, McpClient, McpClientOptions, McpSdkClient, McpTransport, McpStdioTransport, McpHttpTransport, McpGatewayTransport, MockMcpClientOptions, MockMcpTool, McpServeOptions, McpServeHandle, McpServeTransport, McpStdioServeTransport, McpHttpServeTransport, McpSdkServer, } from '../lib/mcp/index.js';
|
|
52
52
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/tool-providers/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AAEH,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,YAAY,EAAE,YAAY,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAKvF,OAAO,EACL,SAAS,EACT,QAAQ,EACR,aAAa,EACb,gBAAgB,EAChB,iCAAiC,GAClC,MAAM,qBAAqB,CAAC;AAC7B,YAAY,EACV,uBAAuB,EACvB,SAAS,EACT,gBAAgB,EAChB,YAAY,EACZ,YAAY,EACZ,iBAAiB,EACjB,gBAAgB,EAChB,mBAAmB,EACnB,oBAAoB,EACpB,WAAW,EACX,eAAe,EACf,cAAc,EACd,iBAAiB,EACjB,sBAAsB,EACtB,qBAAqB,EACrB,YAAY,GACb,MAAM,qBAAqB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/tool-providers/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AAEH,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,YAAY,EAAE,YAAY,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAKvF,OAAO,EACL,SAAS,EACT,QAAQ,EACR,aAAa,EACb,gBAAgB,EAChB,iCAAiC,GAClC,MAAM,qBAAqB,CAAC;AAC7B,YAAY,EACV,uBAAuB,EACvB,iBAAiB,EACjB,SAAS,EACT,gBAAgB,EAChB,YAAY,EACZ,YAAY,EACZ,iBAAiB,EACjB,gBAAgB,EAChB,mBAAmB,EACnB,oBAAoB,EACpB,WAAW,EACX,eAAe,EACf,cAAc,EACd,iBAAiB,EACjB,sBAAsB,EACtB,qBAAqB,EACrB,YAAY,GACb,MAAM,qBAAqB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "agentfootprint",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.23.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
|
"author": "Sanjay Krishna Anbalagan",
|