@polpo-ai/tools 0.15.41 → 0.15.42
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/dist/__tests__/typed-memory-tools.test.d.ts +2 -0
- package/dist/__tests__/typed-memory-tools.test.d.ts.map +1 -0
- package/dist/__tests__/typed-memory-tools.test.js +299 -0
- package/dist/__tests__/typed-memory-tools.test.js.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/typed-memory-tools.d.ts +35 -0
- package/dist/typed-memory-tools.d.ts.map +1 -0
- package/dist/typed-memory-tools.js +277 -0
- package/dist/typed-memory-tools.js.map +1 -0
- package/package.json +3 -3
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"typed-memory-tools.test.d.ts","sourceRoot":"","sources":["../../src/__tests__/typed-memory-tools.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,299 @@
|
|
|
1
|
+
import { describe, expect, it } from "vitest";
|
|
2
|
+
import { InMemoryMemoryItemStore, createMemoryItem, } from "@polpo-ai/core";
|
|
3
|
+
import { createTypedMemoryTools, } from "../typed-memory-tools.js";
|
|
4
|
+
const now = "2026-07-28T10:00:00.000Z";
|
|
5
|
+
const toolContext = {
|
|
6
|
+
namespace: "project-a",
|
|
7
|
+
access: {
|
|
8
|
+
projectId: "project-a",
|
|
9
|
+
agentName: "support",
|
|
10
|
+
externalUserId: "user-a",
|
|
11
|
+
sessionId: "session-a",
|
|
12
|
+
},
|
|
13
|
+
surface: "chat",
|
|
14
|
+
now,
|
|
15
|
+
};
|
|
16
|
+
function createTools(grants, store = new InMemoryMemoryItemStore()) {
|
|
17
|
+
let id = 0;
|
|
18
|
+
return {
|
|
19
|
+
store,
|
|
20
|
+
tools: createTypedMemoryTools(store, {
|
|
21
|
+
agentName: "support",
|
|
22
|
+
context: toolContext,
|
|
23
|
+
grants,
|
|
24
|
+
writeScope: {
|
|
25
|
+
kind: "user",
|
|
26
|
+
subjectId: "user-a",
|
|
27
|
+
agentName: "support",
|
|
28
|
+
},
|
|
29
|
+
provenance: {
|
|
30
|
+
source: "tool",
|
|
31
|
+
actor: "agent",
|
|
32
|
+
runId: "run-a",
|
|
33
|
+
sessionId: "session-a",
|
|
34
|
+
toolName: "memory_remember",
|
|
35
|
+
},
|
|
36
|
+
createId: () => `memory-${++id}`,
|
|
37
|
+
createUsageId: () => `usage-${++id}`,
|
|
38
|
+
now: () => now,
|
|
39
|
+
}),
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
async function execute(tools, name, params) {
|
|
43
|
+
const tool = tools.find((candidate) => candidate.name === name);
|
|
44
|
+
if (!tool)
|
|
45
|
+
throw new Error(`Missing tool ${name}`);
|
|
46
|
+
return tool.execute("call-a", params);
|
|
47
|
+
}
|
|
48
|
+
describe("createTypedMemoryTools", () => {
|
|
49
|
+
it("returns no tools when no action is explicitly granted", () => {
|
|
50
|
+
expect(createTools({}).tools).toEqual([]);
|
|
51
|
+
});
|
|
52
|
+
it("can expose search without configuring any write authority", () => {
|
|
53
|
+
const tools = createTypedMemoryTools(new InMemoryMemoryItemStore(), {
|
|
54
|
+
agentName: "support",
|
|
55
|
+
context: toolContext,
|
|
56
|
+
grants: { search: true },
|
|
57
|
+
});
|
|
58
|
+
expect(tools.map((tool) => tool.name)).toEqual(["memory_search"]);
|
|
59
|
+
});
|
|
60
|
+
it("exposes only the explicitly granted actions", () => {
|
|
61
|
+
expect(createTools({ search: true }).tools.map((tool) => tool.name)).toEqual([
|
|
62
|
+
"memory_search",
|
|
63
|
+
]);
|
|
64
|
+
expect(createTools({
|
|
65
|
+
remember: true,
|
|
66
|
+
update: true,
|
|
67
|
+
forget: true,
|
|
68
|
+
writableScopeKinds: ["user"],
|
|
69
|
+
writableKinds: ["fact"],
|
|
70
|
+
}).tools.map((tool) => tool.name)).toEqual([
|
|
71
|
+
"memory_remember",
|
|
72
|
+
"memory_update_item",
|
|
73
|
+
"memory_forget",
|
|
74
|
+
]);
|
|
75
|
+
});
|
|
76
|
+
it("searches authorized memory read-only and records retrieval usage", async () => {
|
|
77
|
+
const { store, tools } = createTools({ search: true });
|
|
78
|
+
await store.create(createMemoryItem({
|
|
79
|
+
id: "memory-existing",
|
|
80
|
+
scope: {
|
|
81
|
+
kind: "user",
|
|
82
|
+
subjectId: "user-a",
|
|
83
|
+
agentName: "support",
|
|
84
|
+
},
|
|
85
|
+
kind: "fact",
|
|
86
|
+
content: "The customer's renewal date is in October.",
|
|
87
|
+
provenance: { source: "explicit", actor: "user" },
|
|
88
|
+
}, { now: () => now }), toolContext);
|
|
89
|
+
const result = await execute(tools, "memory_search", {
|
|
90
|
+
query: "renewal",
|
|
91
|
+
max_results: 3,
|
|
92
|
+
token_budget: 100,
|
|
93
|
+
});
|
|
94
|
+
expect(result.content[0].type).toBe("text");
|
|
95
|
+
const text = result.content[0].type === "text"
|
|
96
|
+
? result.content[0].text
|
|
97
|
+
: "";
|
|
98
|
+
expect(JSON.parse(text)).toMatchObject({
|
|
99
|
+
total: 1,
|
|
100
|
+
results: [
|
|
101
|
+
{
|
|
102
|
+
item: {
|
|
103
|
+
id: "memory-existing",
|
|
104
|
+
content: "The customer's renewal date is in October.",
|
|
105
|
+
},
|
|
106
|
+
},
|
|
107
|
+
],
|
|
108
|
+
});
|
|
109
|
+
expect(await store.listUsage("memory-existing", toolContext)).toEqual([
|
|
110
|
+
expect.objectContaining({
|
|
111
|
+
type: "retrieved",
|
|
112
|
+
runId: "run-a",
|
|
113
|
+
sessionId: "session-a",
|
|
114
|
+
}),
|
|
115
|
+
]);
|
|
116
|
+
expect(await store.list({}, toolContext)).toHaveLength(1);
|
|
117
|
+
});
|
|
118
|
+
it("remembers only in the host-fixed scope and rejects semantic duplicates", async () => {
|
|
119
|
+
const { store, tools } = createTools({
|
|
120
|
+
remember: true,
|
|
121
|
+
writableScopeKinds: ["user"],
|
|
122
|
+
writableKinds: ["preference"],
|
|
123
|
+
});
|
|
124
|
+
const first = await execute(tools, "memory_remember", {
|
|
125
|
+
kind: "preference",
|
|
126
|
+
content: "Prefer concise status updates.",
|
|
127
|
+
confidence: 0.8,
|
|
128
|
+
});
|
|
129
|
+
expect(first.details).toMatchObject({
|
|
130
|
+
item: {
|
|
131
|
+
id: "memory-1",
|
|
132
|
+
scope: {
|
|
133
|
+
kind: "user",
|
|
134
|
+
subjectId: "user-a",
|
|
135
|
+
agentName: "support",
|
|
136
|
+
},
|
|
137
|
+
},
|
|
138
|
+
});
|
|
139
|
+
await expect(execute(tools, "memory_remember", {
|
|
140
|
+
kind: "preference",
|
|
141
|
+
content: " prefer concise status updates. ",
|
|
142
|
+
})).rejects.toThrow("equivalent Memory item already exists");
|
|
143
|
+
expect(await store.list({}, toolContext)).toHaveLength(1);
|
|
144
|
+
});
|
|
145
|
+
it.each([
|
|
146
|
+
["scope kind", {
|
|
147
|
+
remember: true,
|
|
148
|
+
writableScopeKinds: ["agent"],
|
|
149
|
+
writableKinds: ["preference"],
|
|
150
|
+
}],
|
|
151
|
+
["memory kind", {
|
|
152
|
+
remember: true,
|
|
153
|
+
writableScopeKinds: ["user"],
|
|
154
|
+
writableKinds: ["fact"],
|
|
155
|
+
}],
|
|
156
|
+
])("fails closed when the %s grant does not authorize a write", async (_name, grants) => {
|
|
157
|
+
const { store, tools } = createTools(grants);
|
|
158
|
+
await expect(execute(tools, "memory_remember", {
|
|
159
|
+
kind: "preference",
|
|
160
|
+
content: "Prefer concise status updates.",
|
|
161
|
+
})).rejects.toThrow("not granted");
|
|
162
|
+
expect(await store.list({}, toolContext)).toEqual([]);
|
|
163
|
+
});
|
|
164
|
+
it("never persists or echoes sensitive content", async () => {
|
|
165
|
+
const secret = "neutral-fixture-value-12345";
|
|
166
|
+
const { store, tools } = createTools({
|
|
167
|
+
remember: true,
|
|
168
|
+
writableScopeKinds: ["user"],
|
|
169
|
+
writableKinds: ["fact"],
|
|
170
|
+
});
|
|
171
|
+
await expect(execute(tools, "memory_remember", {
|
|
172
|
+
kind: "fact",
|
|
173
|
+
content: `api_key: ${secret}`,
|
|
174
|
+
})).rejects.toThrow("Memory write denied");
|
|
175
|
+
expect(await store.list({}, toolContext)).toEqual([]);
|
|
176
|
+
});
|
|
177
|
+
it("updates and forgets only when each destructive action is granted", async () => {
|
|
178
|
+
const { store, tools } = createTools({
|
|
179
|
+
remember: true,
|
|
180
|
+
update: true,
|
|
181
|
+
forget: true,
|
|
182
|
+
writableScopeKinds: ["user"],
|
|
183
|
+
writableKinds: ["fact", "preference"],
|
|
184
|
+
});
|
|
185
|
+
await execute(tools, "memory_remember", {
|
|
186
|
+
kind: "fact",
|
|
187
|
+
content: "The renewal date is September.",
|
|
188
|
+
});
|
|
189
|
+
const updated = await execute(tools, "memory_update_item", {
|
|
190
|
+
id: "memory-1",
|
|
191
|
+
content: "The renewal date is October.",
|
|
192
|
+
summary: "Renewal in October",
|
|
193
|
+
});
|
|
194
|
+
expect(updated.details).toMatchObject({
|
|
195
|
+
item: {
|
|
196
|
+
id: "memory-1",
|
|
197
|
+
content: "The renewal date is October.",
|
|
198
|
+
},
|
|
199
|
+
});
|
|
200
|
+
const forgotten = await execute(tools, "memory_forget", {
|
|
201
|
+
id: "memory-1",
|
|
202
|
+
});
|
|
203
|
+
expect(forgotten.details).toEqual({
|
|
204
|
+
itemId: "memory-1",
|
|
205
|
+
forgotten: true,
|
|
206
|
+
});
|
|
207
|
+
expect(await store.get("memory-1", toolContext)).toBeUndefined();
|
|
208
|
+
});
|
|
209
|
+
it("does not reveal whether an unauthorized item exists", async () => {
|
|
210
|
+
const store = new InMemoryMemoryItemStore();
|
|
211
|
+
await store.create(createMemoryItem({
|
|
212
|
+
id: "private-memory",
|
|
213
|
+
scope: {
|
|
214
|
+
kind: "user",
|
|
215
|
+
subjectId: "other-user",
|
|
216
|
+
agentName: "support",
|
|
217
|
+
},
|
|
218
|
+
kind: "fact",
|
|
219
|
+
content: "Private fact",
|
|
220
|
+
provenance: { source: "explicit", actor: "user" },
|
|
221
|
+
}, { now: () => now }), {
|
|
222
|
+
...toolContext,
|
|
223
|
+
access: { ...toolContext.access, externalUserId: "other-user" },
|
|
224
|
+
});
|
|
225
|
+
const { tools } = createTools({
|
|
226
|
+
update: true,
|
|
227
|
+
forget: true,
|
|
228
|
+
writableScopeKinds: ["user"],
|
|
229
|
+
writableKinds: ["fact"],
|
|
230
|
+
}, store);
|
|
231
|
+
await expect(execute(tools, "memory_update_item", {
|
|
232
|
+
id: "private-memory",
|
|
233
|
+
content: "stolen",
|
|
234
|
+
})).rejects.toThrow("Memory item not found");
|
|
235
|
+
await expect(execute(tools, "memory_forget", {
|
|
236
|
+
id: "private-memory",
|
|
237
|
+
})).rejects.toThrow("Memory item not found");
|
|
238
|
+
});
|
|
239
|
+
it("keeps a completed write successful when usage telemetry fails", async () => {
|
|
240
|
+
class UsageFailureStore extends InMemoryMemoryItemStore {
|
|
241
|
+
async appendUsage() {
|
|
242
|
+
throw new Error("usage backend unavailable");
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
const errors = [];
|
|
246
|
+
const store = new UsageFailureStore();
|
|
247
|
+
const tools = createTypedMemoryTools(store, {
|
|
248
|
+
agentName: "support",
|
|
249
|
+
context: toolContext,
|
|
250
|
+
grants: {
|
|
251
|
+
remember: true,
|
|
252
|
+
writableScopeKinds: ["user"],
|
|
253
|
+
writableKinds: ["fact"],
|
|
254
|
+
},
|
|
255
|
+
writeScope: {
|
|
256
|
+
kind: "user",
|
|
257
|
+
subjectId: "user-a",
|
|
258
|
+
agentName: "support",
|
|
259
|
+
},
|
|
260
|
+
onUsageError: (error) => {
|
|
261
|
+
errors.push(error);
|
|
262
|
+
},
|
|
263
|
+
createId: () => "memory-a",
|
|
264
|
+
now: () => now,
|
|
265
|
+
});
|
|
266
|
+
const result = await execute(tools, "memory_remember", {
|
|
267
|
+
kind: "fact",
|
|
268
|
+
content: "The customer renewed.",
|
|
269
|
+
});
|
|
270
|
+
expect(result.details).toMatchObject({ remembered: true });
|
|
271
|
+
expect(errors).toHaveLength(1);
|
|
272
|
+
expect(await store.get("memory-a", toolContext)).toBeDefined();
|
|
273
|
+
});
|
|
274
|
+
it("rejects a host composition that binds tools to another agent", () => {
|
|
275
|
+
expect(() => createTypedMemoryTools(new InMemoryMemoryItemStore(), {
|
|
276
|
+
agentName: "other-agent",
|
|
277
|
+
context: toolContext,
|
|
278
|
+
grants: { search: true },
|
|
279
|
+
})).toThrow("does not match the agent");
|
|
280
|
+
});
|
|
281
|
+
it("rejects incomplete write grants at composition time", () => {
|
|
282
|
+
expect(() => createTypedMemoryTools(new InMemoryMemoryItemStore(), {
|
|
283
|
+
agentName: "support",
|
|
284
|
+
context: toolContext,
|
|
285
|
+
grants: { remember: true },
|
|
286
|
+
writeScope: { kind: "agent", agentName: "support" },
|
|
287
|
+
})).toThrow("require writable scope kinds");
|
|
288
|
+
expect(() => createTypedMemoryTools(new InMemoryMemoryItemStore(), {
|
|
289
|
+
agentName: "support",
|
|
290
|
+
context: toolContext,
|
|
291
|
+
grants: {
|
|
292
|
+
remember: true,
|
|
293
|
+
writableScopeKinds: ["agent"],
|
|
294
|
+
writableKinds: ["fact"],
|
|
295
|
+
},
|
|
296
|
+
})).toThrow("requires a host-fixed write scope");
|
|
297
|
+
});
|
|
298
|
+
});
|
|
299
|
+
//# sourceMappingURL=typed-memory-tools.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"typed-memory-tools.test.js","sourceRoot":"","sources":["../../src/__tests__/typed-memory-tools.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAC;AAC9C,OAAO,EACL,uBAAuB,EACvB,gBAAgB,GAGjB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EACL,sBAAsB,GAEvB,MAAM,0BAA0B,CAAC;AAElC,MAAM,GAAG,GAAG,0BAA0B,CAAC;AACvC,MA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,CAAC,8DAA8D,EAAE,GAAG,EAAE;QACtE,MAAM,CAAC,GAAG,EAAE,CAAC,sBAAsB,CAAC,IAAI,uBAAuB,EAAE,EAAE;YACjE,SAAS,EAAE,aAAa;YACxB,OAAO,EAAE,WAAW;YACpB,MAAM,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE;SACzB,CAAC,CAAC,CAAC,OAAO,CAAC,0BAA0B,CAAC,CAAC;IAC1C,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,qDAAqD,EAAE,GAAG,EAAE;QAC7D,MAAM,CAAC,GAAG,EAAE,CAAC,sBAAsB,CAAC,IAAI,uBAAuB,EAAE,EAAE;YACjE,SAAS,EAAE,SAAS;YACpB,OAAO,EAAE,WAAW;YACpB,MAAM,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE;YAC1B,UAAU,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE;SACpD,CAAC,CAAC,CAAC,OAAO,CAAC,8BAA8B,CAAC,CAAC;QAE5C,MAAM,CAAC,GAAG,EAAE,CAAC,sBAAsB,CAAC,IAAI,uBAAuB,EAAE,EAAE;YACjE,SAAS,EAAE,SAAS;YACpB,OAAO,EAAE,WAAW;YACpB,MAAM,EAAE;gBACN,QAAQ,EAAE,IAAI;gBACd,kBAAkB,EAAE,CAAC,OAAO,CAAC;gBAC7B,aAAa,EAAE,CAAC,MAAM,CAAC;aACxB;SACF,CAAC,CAAC,CAAC,OAAO,CAAC,mCAAmC,CAAC,CAAC;IACnD,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -26,6 +26,8 @@ export { createImageTools, ALL_IMAGE_TOOL_NAMES } from "./image-tools.js";
|
|
|
26
26
|
export { createAudioTools, ALL_AUDIO_TOOL_NAMES } from "./audio-tools.js";
|
|
27
27
|
export { createSearchTools, ALL_SEARCH_TOOL_NAMES } from "./search-tools.js";
|
|
28
28
|
export { createMemoryTools } from "./memory-tools.js";
|
|
29
|
+
export { ALL_TYPED_MEMORY_TOOL_NAMES, createTypedMemoryTools, } from "./typed-memory-tools.js";
|
|
30
|
+
export type { CreateTypedMemoryToolsOptions, TypedMemoryToolGrants, TypedMemoryToolName, } from "./typed-memory-tools.js";
|
|
29
31
|
export { NodeFileSystem } from "./adapters/node-filesystem.js";
|
|
30
32
|
export { NodeShell } from "./adapters/node-shell.js";
|
|
31
33
|
export { assertPathAllowed, resolveAllowedPaths, isPathAllowed } from "./path-sandbox.js";
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAGH,OAAO,EAAE,iBAAiB,EAAE,iBAAiB,IAAI,iBAAiB,EAAE,cAAc,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACnK,YAAY,EAAE,gBAAgB,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAGjF,OAAO,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AACxD,OAAO,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AACvE,OAAO,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAChG,OAAO,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AACvD,YAAY,EAAE,aAAa,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAGpF,OAAO,EAAE,kBAAkB,EAAE,sBAAsB,EAAE,0BAA0B,EAAE,MAAM,oBAAoB,CAAC;AAC5G,OAAO,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAC1E,OAAO,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAC1E,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B,GACjB,MAAM,wBAAwB,CAAC;AAGhC,YAAY,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -29,6 +29,7 @@ export { createSearchTools, ALL_SEARCH_TOOL_NAMES } from "./search-tools.js";
|
|
|
29
29
|
// Phone tools removed — VAPI integration moved out of the
|
|
30
30
|
// first-class catalog. Future: MCP-based.
|
|
31
31
|
export { createMemoryTools } from "./memory-tools.js";
|
|
32
|
+
export { ALL_TYPED_MEMORY_TOOL_NAMES, createTypedMemoryTools, } from "./typed-memory-tools.js";
|
|
32
33
|
// Adapters (FileSystem/Shell implementations)
|
|
33
34
|
export { NodeFileSystem } from "./adapters/node-filesystem.js";
|
|
34
35
|
export { NodeShell } from "./adapters/node-shell.js";
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,oBAAoB;AACpB,OAAO,EAAE,iBAAiB,EAAE,iBAAiB,IAAI,iBAAiB,EAAE,cAAc,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAGnK,qDAAqD;AACrD,OAAO,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AACxD,OAAO,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AACvE,OAAO,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAChG,OAAO,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AAGvD,0BAA0B;AAC1B,OAAO,EAAE,kBAAkB,EAAE,sBAAsB,EAAE,0BAA0B,EAAE,MAAM,oBAAoB,CAAC;AAC5G,OAAO,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAC1E,OAAO,EAAE,gBAAgB,EAA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AAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AACpE,OAAO,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AACvE,OAAO,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAC1E,OAAO,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAC1E,OAAO,EAAE,iBAAiB,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAC7E,0DAA0D;AAC1D,0CAA0C;AAC1C,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,EACL,2BAA2B,EAC3B,sBAAsB,GACvB,MAAM,yBAAyB,CAAC;AAOjC,8CAA8C;AAC9C,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAC/D,OAAO,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAErD,qBAAqB;AACrB,OAAO,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAC1F,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AACrD,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAEnD,4BAA4B;AAC5B,OAAO,EACL,UAAU,EACV,mBAAmB,EACnB,YAAY,EACZ,mBAAmB,EACnB,cAAc,EACd,iBAAiB,EACjB,oBAAoB,EACpB,uBAAuB,EACvB,0BAA0B,GAC3B,MAAM,mBAAmB,CAAC;AAU3B,OAAO,EACL,mBAAmB,EACnB,sBAAsB,GACvB,MAAM,wBAAwB,CAAC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { type MemoryItemStore, type MemoryKind, type MemoryProvenance, type MemoryScope, type MemoryScopeKind, type MemoryStoreContext, type MemoryUsageEvent, type PolpoTool } from "@polpo-ai/core";
|
|
2
|
+
export declare const ALL_TYPED_MEMORY_TOOL_NAMES: readonly ["memory_search", "memory_remember", "memory_update_item", "memory_forget"];
|
|
3
|
+
export type TypedMemoryToolName = (typeof ALL_TYPED_MEMORY_TOOL_NAMES)[number];
|
|
4
|
+
export interface TypedMemoryToolGrants {
|
|
5
|
+
readonly search?: boolean;
|
|
6
|
+
readonly remember?: boolean;
|
|
7
|
+
readonly update?: boolean;
|
|
8
|
+
readonly forget?: boolean;
|
|
9
|
+
/** Required to execute remember/update/forget. Missing means fail closed. */
|
|
10
|
+
readonly writableScopeKinds?: readonly MemoryScopeKind[];
|
|
11
|
+
/** Required to execute remember/update/forget. Missing means fail closed. */
|
|
12
|
+
readonly writableKinds?: readonly MemoryKind[];
|
|
13
|
+
}
|
|
14
|
+
export interface CreateTypedMemoryToolsOptions {
|
|
15
|
+
readonly agentName: string;
|
|
16
|
+
readonly context: MemoryStoreContext;
|
|
17
|
+
readonly grants: TypedMemoryToolGrants;
|
|
18
|
+
/** Fixed by the host; the model cannot choose a broader write scope. */
|
|
19
|
+
readonly writeScope?: MemoryScope;
|
|
20
|
+
/** Fixed by the host; the model cannot claim trusted provenance. */
|
|
21
|
+
readonly provenance?: MemoryProvenance;
|
|
22
|
+
readonly createId?: () => string;
|
|
23
|
+
readonly createUsageId?: () => string;
|
|
24
|
+
readonly now?: () => Date | string;
|
|
25
|
+
/** Usage telemetry is best-effort and must not change tool semantics. */
|
|
26
|
+
readonly onUsageError?: (error: unknown, event: MemoryUsageEvent) => void | Promise<void>;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Creates typed Memory tools for one already-authorized invocation.
|
|
30
|
+
*
|
|
31
|
+
* No tool is returned unless its action is explicitly granted. Write scope and
|
|
32
|
+
* provenance are host-owned closure values, never model-controlled arguments.
|
|
33
|
+
*/
|
|
34
|
+
export declare function createTypedMemoryTools(store: MemoryItemStore, value: CreateTypedMemoryToolsOptions): PolpoTool<any>[];
|
|
35
|
+
//# sourceMappingURL=typed-memory-tools.d.ts.map
|
|
@@ -0,0 +1 @@
|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EAAE,MAAM,IAAI,GAAG,MAAM,CAAC;IACnC,yEAAyE;IACzE,QAAQ,CAAC,YAAY,CAAC,EAAE,CACtB,KAAK,EAAE,OAAO,EACd,KAAK,EAAE,gBAAgB,KACpB,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CAC3B;AA2HD;;;;;GAKG;AACH,wBAAgB,sBAAsB,CACpC,KAAK,EAAE,eAAe,EACtB,KAAK,EAAE,6BAA6B,GACnC,SAAS,CAAC,GAAG,CAAC,EAAE,CA2MlB"}
|
|
@@ -0,0 +1,277 @@
|
|
|
1
|
+
import { Type } from "@sinclair/typebox";
|
|
2
|
+
import { nanoid } from "nanoid";
|
|
3
|
+
import { MEMORY_KINDS, MemoryConflictError, createMemoryItem, normalizeMemoryScope, } from "@polpo-ai/core";
|
|
4
|
+
export const ALL_TYPED_MEMORY_TOOL_NAMES = [
|
|
5
|
+
"memory_search",
|
|
6
|
+
"memory_remember",
|
|
7
|
+
"memory_update_item",
|
|
8
|
+
"memory_forget",
|
|
9
|
+
];
|
|
10
|
+
const memoryKindSchema = Type.Union(MEMORY_KINDS.map((kind) => Type.Literal(kind)));
|
|
11
|
+
const MemorySearchSchema = Type.Object({
|
|
12
|
+
query: Type.String({
|
|
13
|
+
minLength: 1,
|
|
14
|
+
maxLength: 2_000,
|
|
15
|
+
description: "What to recall from authorized typed Memory.",
|
|
16
|
+
}),
|
|
17
|
+
kinds: Type.Optional(Type.Array(memoryKindSchema, {
|
|
18
|
+
maxItems: MEMORY_KINDS.length,
|
|
19
|
+
})),
|
|
20
|
+
token_budget: Type.Optional(Type.Integer({ minimum: 0, maximum: 32_000 })),
|
|
21
|
+
max_results: Type.Optional(Type.Integer({ minimum: 0, maximum: 100 })),
|
|
22
|
+
});
|
|
23
|
+
const MemoryRememberSchema = Type.Object({
|
|
24
|
+
kind: memoryKindSchema,
|
|
25
|
+
content: Type.String({
|
|
26
|
+
minLength: 1,
|
|
27
|
+
maxLength: 32_000,
|
|
28
|
+
description: "The durable fact, preference, or episode to remember.",
|
|
29
|
+
}),
|
|
30
|
+
summary: Type.Optional(Type.String({ minLength: 1, maxLength: 2_000 })),
|
|
31
|
+
confidence: Type.Optional(Type.Number({ minimum: 0, maximum: 1 })),
|
|
32
|
+
expires_at: Type.Optional(Type.String({
|
|
33
|
+
description: "Optional ISO-8601 expiry timestamp.",
|
|
34
|
+
})),
|
|
35
|
+
pending: Type.Optional(Type.Boolean({
|
|
36
|
+
description: "Store as pending instead of active.",
|
|
37
|
+
})),
|
|
38
|
+
});
|
|
39
|
+
const MemoryUpdateSchema = Type.Object({
|
|
40
|
+
id: Type.String({ minLength: 1, maxLength: 256 }),
|
|
41
|
+
content: Type.Optional(Type.String({ minLength: 1, maxLength: 32_000 })),
|
|
42
|
+
summary: Type.Optional(Type.Union([
|
|
43
|
+
Type.String({ minLength: 1, maxLength: 2_000 }),
|
|
44
|
+
Type.Null(),
|
|
45
|
+
])),
|
|
46
|
+
confidence: Type.Optional(Type.Union([
|
|
47
|
+
Type.Number({ minimum: 0, maximum: 1 }),
|
|
48
|
+
Type.Null(),
|
|
49
|
+
])),
|
|
50
|
+
expires_at: Type.Optional(Type.Union([Type.String(), Type.Null()])),
|
|
51
|
+
});
|
|
52
|
+
const MemoryForgetSchema = Type.Object({
|
|
53
|
+
id: Type.String({ minLength: 1, maxLength: 256 }),
|
|
54
|
+
});
|
|
55
|
+
function operationTime(options) {
|
|
56
|
+
const value = options.now?.() ?? options.context.now ?? new Date();
|
|
57
|
+
const parsed = value instanceof Date ? value : new Date(value);
|
|
58
|
+
if (!Number.isFinite(parsed.getTime())) {
|
|
59
|
+
throw new Error("Memory operation time must be valid");
|
|
60
|
+
}
|
|
61
|
+
return parsed.toISOString();
|
|
62
|
+
}
|
|
63
|
+
async function appendUsage(store, options, memoryId, type, requestId) {
|
|
64
|
+
const event = {
|
|
65
|
+
id: options.createUsageId?.() ?? `memory-usage-${nanoid(16)}`,
|
|
66
|
+
memoryId,
|
|
67
|
+
type,
|
|
68
|
+
at: operationTime(options),
|
|
69
|
+
...(options.provenance?.runId
|
|
70
|
+
? { runId: options.provenance.runId }
|
|
71
|
+
: {}),
|
|
72
|
+
...(options.provenance?.sessionId
|
|
73
|
+
? { sessionId: options.provenance.sessionId }
|
|
74
|
+
: {}),
|
|
75
|
+
requestId,
|
|
76
|
+
};
|
|
77
|
+
try {
|
|
78
|
+
await store.appendUsage(event, options.context);
|
|
79
|
+
}
|
|
80
|
+
catch (error) {
|
|
81
|
+
try {
|
|
82
|
+
await options.onUsageError?.(error, event);
|
|
83
|
+
}
|
|
84
|
+
catch {
|
|
85
|
+
// Usage telemetry cannot change the completed Memory operation.
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
function assertWriteGrant(options, item) {
|
|
90
|
+
const scopes = options.grants.writableScopeKinds;
|
|
91
|
+
const kinds = options.grants.writableKinds;
|
|
92
|
+
if (!scopes?.includes(item.scope.kind) || !kinds?.includes(item.kind)) {
|
|
93
|
+
throw new Error("Memory write is not granted for this scope and kind");
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
async function getWritableItem(store, options, id) {
|
|
97
|
+
const item = await store.get(id, options.context, {
|
|
98
|
+
includeInactive: true,
|
|
99
|
+
includeExpired: true,
|
|
100
|
+
});
|
|
101
|
+
if (!item)
|
|
102
|
+
throw new Error("Memory item not found");
|
|
103
|
+
assertWriteGrant(options, item);
|
|
104
|
+
return item;
|
|
105
|
+
}
|
|
106
|
+
function resultText(value) {
|
|
107
|
+
return JSON.stringify(value);
|
|
108
|
+
}
|
|
109
|
+
/**
|
|
110
|
+
* Creates typed Memory tools for one already-authorized invocation.
|
|
111
|
+
*
|
|
112
|
+
* No tool is returned unless its action is explicitly granted. Write scope and
|
|
113
|
+
* provenance are host-owned closure values, never model-controlled arguments.
|
|
114
|
+
*/
|
|
115
|
+
export function createTypedMemoryTools(store, value) {
|
|
116
|
+
const hasWriteAction = Boolean(value.grants.remember
|
|
117
|
+
|| value.grants.update
|
|
118
|
+
|| value.grants.forget);
|
|
119
|
+
if (hasWriteAction
|
|
120
|
+
&& (!value.grants.writableScopeKinds?.length
|
|
121
|
+
|| !value.grants.writableKinds?.length)) {
|
|
122
|
+
throw new Error("Memory write grants require writable scope kinds and Memory kinds");
|
|
123
|
+
}
|
|
124
|
+
if (value.grants.remember && !value.writeScope) {
|
|
125
|
+
throw new Error("Memory remember grant requires a host-fixed write scope");
|
|
126
|
+
}
|
|
127
|
+
const options = {
|
|
128
|
+
...value,
|
|
129
|
+
context: {
|
|
130
|
+
...value.context,
|
|
131
|
+
access: { ...value.context.access },
|
|
132
|
+
},
|
|
133
|
+
...(value.writeScope
|
|
134
|
+
? { writeScope: normalizeMemoryScope(value.writeScope) }
|
|
135
|
+
: {}),
|
|
136
|
+
provenance: {
|
|
137
|
+
source: "tool",
|
|
138
|
+
actor: "agent",
|
|
139
|
+
toolName: "memory_remember",
|
|
140
|
+
...(value.provenance ?? {}),
|
|
141
|
+
},
|
|
142
|
+
};
|
|
143
|
+
if (options.context.access.agentName !== options.agentName) {
|
|
144
|
+
throw new Error("Memory tool context does not match the agent");
|
|
145
|
+
}
|
|
146
|
+
const tools = [];
|
|
147
|
+
if (options.grants.search) {
|
|
148
|
+
const search = {
|
|
149
|
+
name: "memory_search",
|
|
150
|
+
label: "Search Memory",
|
|
151
|
+
description: "Search only the typed Memory authorized for this agent and user context.",
|
|
152
|
+
parameters: MemorySearchSchema,
|
|
153
|
+
async execute(toolCallId, params) {
|
|
154
|
+
const results = await store.search({
|
|
155
|
+
query: params.query,
|
|
156
|
+
kinds: params.kinds,
|
|
157
|
+
tokenBudget: params.token_budget,
|
|
158
|
+
maxResults: params.max_results,
|
|
159
|
+
}, options.context);
|
|
160
|
+
for (const result of results) {
|
|
161
|
+
await appendUsage(store, options, result.item.id, "retrieved", toolCallId);
|
|
162
|
+
}
|
|
163
|
+
const data = { total: results.length, results };
|
|
164
|
+
return {
|
|
165
|
+
content: [{ type: "text", text: resultText(data) }],
|
|
166
|
+
details: data,
|
|
167
|
+
};
|
|
168
|
+
},
|
|
169
|
+
};
|
|
170
|
+
tools.push(search);
|
|
171
|
+
}
|
|
172
|
+
if (options.grants.remember) {
|
|
173
|
+
const remember = {
|
|
174
|
+
name: "memory_remember",
|
|
175
|
+
label: "Remember",
|
|
176
|
+
description: "Store one durable typed Memory item in the host-authorized scope.",
|
|
177
|
+
parameters: MemoryRememberSchema,
|
|
178
|
+
async execute(toolCallId, params) {
|
|
179
|
+
if (!options.writeScope) {
|
|
180
|
+
throw new Error("Memory write scope is not configured");
|
|
181
|
+
}
|
|
182
|
+
assertWriteGrant(options, {
|
|
183
|
+
scope: options.writeScope,
|
|
184
|
+
kind: params.kind,
|
|
185
|
+
});
|
|
186
|
+
const item = createMemoryItem({
|
|
187
|
+
scope: options.writeScope,
|
|
188
|
+
kind: params.kind,
|
|
189
|
+
content: params.content,
|
|
190
|
+
summary: params.summary,
|
|
191
|
+
provenance: options.provenance,
|
|
192
|
+
confidence: params.confidence,
|
|
193
|
+
status: params.pending ? "pending" : "active",
|
|
194
|
+
expiresAt: params.expires_at,
|
|
195
|
+
}, {
|
|
196
|
+
createId: options.createId,
|
|
197
|
+
now: options.now,
|
|
198
|
+
});
|
|
199
|
+
const duplicate = await store.findDedupeCandidate(item, options.context);
|
|
200
|
+
if (duplicate) {
|
|
201
|
+
throw new MemoryConflictError("An equivalent Memory item already exists");
|
|
202
|
+
}
|
|
203
|
+
const created = await store.create(item, options.context);
|
|
204
|
+
await appendUsage(store, options, created.id, "written", toolCallId);
|
|
205
|
+
return {
|
|
206
|
+
content: [{
|
|
207
|
+
type: "text",
|
|
208
|
+
text: resultText({ remembered: true, item: created }),
|
|
209
|
+
}],
|
|
210
|
+
details: { remembered: true, item: created },
|
|
211
|
+
};
|
|
212
|
+
},
|
|
213
|
+
};
|
|
214
|
+
tools.push(remember);
|
|
215
|
+
}
|
|
216
|
+
if (options.grants.update) {
|
|
217
|
+
const update = {
|
|
218
|
+
name: "memory_update_item",
|
|
219
|
+
label: "Update Memory",
|
|
220
|
+
description: "Update one existing typed Memory item when the host grants its scope and kind.",
|
|
221
|
+
parameters: MemoryUpdateSchema,
|
|
222
|
+
async execute(toolCallId, params) {
|
|
223
|
+
await getWritableItem(store, options, params.id);
|
|
224
|
+
const patch = {
|
|
225
|
+
...(params.content === undefined ? {} : { content: params.content }),
|
|
226
|
+
...(params.summary === undefined ? {} : { summary: params.summary }),
|
|
227
|
+
...(params.confidence === undefined
|
|
228
|
+
? {}
|
|
229
|
+
: { confidence: params.confidence }),
|
|
230
|
+
...(params.expires_at === undefined
|
|
231
|
+
? {}
|
|
232
|
+
: { expiresAt: params.expires_at }),
|
|
233
|
+
};
|
|
234
|
+
if (Object.keys(patch).length === 0) {
|
|
235
|
+
throw new Error("Memory update requires at least one field");
|
|
236
|
+
}
|
|
237
|
+
const item = await store.update(params.id, patch, options.context);
|
|
238
|
+
if (!item)
|
|
239
|
+
throw new Error("Memory item not found");
|
|
240
|
+
await appendUsage(store, options, item.id, "updated", toolCallId);
|
|
241
|
+
return {
|
|
242
|
+
content: [{
|
|
243
|
+
type: "text",
|
|
244
|
+
text: resultText({ updated: true, item }),
|
|
245
|
+
}],
|
|
246
|
+
details: { updated: true, item },
|
|
247
|
+
};
|
|
248
|
+
},
|
|
249
|
+
};
|
|
250
|
+
tools.push(update);
|
|
251
|
+
}
|
|
252
|
+
if (options.grants.forget) {
|
|
253
|
+
const forget = {
|
|
254
|
+
name: "memory_forget",
|
|
255
|
+
label: "Forget Memory",
|
|
256
|
+
description: "Soft-delete one typed Memory item when the host grants its scope and kind.",
|
|
257
|
+
parameters: MemoryForgetSchema,
|
|
258
|
+
async execute(toolCallId, params) {
|
|
259
|
+
await getWritableItem(store, options, params.id);
|
|
260
|
+
const forgotten = await store.forget(params.id, options.context);
|
|
261
|
+
if (!forgotten)
|
|
262
|
+
throw new Error("Memory item not found");
|
|
263
|
+
await appendUsage(store, options, params.id, "forgotten", toolCallId);
|
|
264
|
+
return {
|
|
265
|
+
content: [{
|
|
266
|
+
type: "text",
|
|
267
|
+
text: resultText({ forgotten: true, itemId: params.id }),
|
|
268
|
+
}],
|
|
269
|
+
details: { forgotten: true, itemId: params.id },
|
|
270
|
+
};
|
|
271
|
+
},
|
|
272
|
+
};
|
|
273
|
+
tools.push(forget);
|
|
274
|
+
}
|
|
275
|
+
return tools;
|
|
276
|
+
}
|
|
277
|
+
//# sourceMappingURL=typed-memory-tools.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"typed-memory-tools.js","sourceRoot":"","sources":["../src/typed-memory-tools.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AACzC,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAChC,OAAO,EACL,YAAY,EACZ,mBAAmB,EACnB,gBAAgB,EAChB,oBAAoB,GAYrB,MAAM,gBAAgB,CAAC;AAExB,MAAM,CAAC,MAAM,2BAA2B,GAAG;IACzC,eAAe;IACf,iBAAiB;IACjB,oBAAoB;IACpB,eAAe;CACP,CAAC;AAkCX,MAAM,gBAAgB,GAAG,IAAI,CAAC,KAAK,CACjC,YAAY,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAC/C,CAAC;AAEF,MAAM,kBAAkB,GAAG,IAAI,CAAC,MAAM,CAAC;IACrC,KAAK,EAAE,IAAI,CAAC,MAAM,CAAC;QACjB,SAAS,EAAE,CAAC;QACZ,SAAS,EAAE,KAAK;QAChB,WAAW,EAAE,8CAA8C;KAC5D,CAAC;IACF,KAAK,EAAE,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,gBAAgB,EAAE;QAChD,QAAQ,EAAE,YAAY,CAAC,MAAM;KAC9B,CAAC,CAAC;IACH,YAAY,EAAE,IAAI,CAAC,QAAQ,CAAC,IAAI,CAA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E,CAAC;QAC1B,MAAM,MAAM,GAAyC;YACnD,IAAI,EAAE,eAAe;YACrB,KAAK,EAAE,eAAe;YACtB,WAAW,EACT,4EAA4E;YAC9E,UAAU,EAAE,kBAAkB;YAC9B,KAAK,CAAC,OAAO,CAAC,UAAU,EAAE,MAAM;gBAC9B,MAAM,eAAe,CAAC,KAAK,EAAE,OAAO,EAAE,MAAM,CAAC,EAAE,CAAC,CAAC;gBACjD,MAAM,SAAS,GAAG,MAAM,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,EAAE,OAAO,CAAC,OAAO,CAAC,CAAC;gBACjE,IAAI,CAAC,SAAS;oBAAE,MAAM,IAAI,KAAK,CAAC,uBAAuB,CAAC,CAAC;gBACzD,MAAM,WAAW,CACf,KAAK,EACL,OAAO,EACP,MAAM,CAAC,EAAE,EACT,WAAW,EACX,UAAU,CACX,CAAC;gBACF,OAAO;oBACL,OAAO,EAAE,CAAC;4BACR,IAAI,EAAE,MAAM;4BACZ,IAAI,EAAE,UAAU,CAAC,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,EAAE,CAAC;yBACzD,CAAC;oBACF,OAAO,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,EAAE;iBAChD,CAAC;YACJ,CAAC;SACF,CAAC;QACF,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IACrB,CAAC;IAED,OAAO,KAAK,CAAC;AACf,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@polpo-ai/tools",
|
|
3
|
-
"version": "0.15.
|
|
3
|
+
"version": "0.15.42",
|
|
4
4
|
"description": "Agent tools for Polpo — coding, browser, email, search, and more. Core tools work everywhere, extended tools are opt-in.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -20,8 +20,8 @@
|
|
|
20
20
|
"@modelcontextprotocol/sdk": "^1.29.0",
|
|
21
21
|
"@sinclair/typebox": "^0.34.0",
|
|
22
22
|
"nanoid": "^5.0.0",
|
|
23
|
-
"@polpo-ai/
|
|
24
|
-
"@polpo-ai/
|
|
23
|
+
"@polpo-ai/core": "0.15.42",
|
|
24
|
+
"@polpo-ai/llm": "0.15.42"
|
|
25
25
|
},
|
|
26
26
|
"optionalDependencies": {
|
|
27
27
|
"@ai-sdk/anthropic": "^2.0.79",
|