@vheins/local-memory-mcp 0.3.33 → 0.4.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/dist/dashboard/dashboard.test.js +10 -10
- package/dist/dashboard/dashboard.test.js.map +1 -1
- package/dist/dashboard/public/app.js +25 -2
- package/dist/dashboard/public/index.html +16 -0
- package/dist/resources/index.test.js +1 -0
- package/dist/resources/index.test.js.map +1 -1
- package/dist/router.test.js +1 -1
- package/dist/router.test.js.map +1 -1
- package/dist/storage/sqlite.d.ts +1 -0
- package/dist/storage/sqlite.d.ts.map +1 -1
- package/dist/storage/sqlite.js +100 -9
- package/dist/storage/sqlite.js.map +1 -1
- package/dist/storage/sqlite.test.js +1 -0
- package/dist/storage/sqlite.test.js.map +1 -1
- package/dist/tasks.bulk.test.js +55 -11
- package/dist/tasks.bulk.test.js.map +1 -1
- package/dist/tasks.e2e.test.js +94 -8
- package/dist/tasks.e2e.test.js.map +1 -1
- package/dist/tools/memory.store.d.ts.map +1 -1
- package/dist/tools/memory.store.js +8 -0
- package/dist/tools/memory.store.js.map +1 -1
- package/dist/tools/memory.update.d.ts.map +1 -1
- package/dist/tools/memory.update.js +11 -0
- package/dist/tools/memory.update.js.map +1 -1
- package/dist/tools/schemas.d.ts +61 -24
- package/dist/tools/schemas.d.ts.map +1 -1
- package/dist/tools/schemas.js +28 -15
- package/dist/tools/schemas.js.map +1 -1
- package/dist/tools/task.bulk-manage.d.ts.map +1 -1
- package/dist/tools/task.bulk-manage.js +14 -3
- package/dist/tools/task.bulk-manage.js.map +1 -1
- package/dist/tools/task.manage.d.ts.map +1 -1
- package/dist/tools/task.manage.js +35 -7
- package/dist/tools/task.manage.js.map +1 -1
- package/dist/types.d.ts +4 -1
- package/dist/types.d.ts.map +1 -1
- package/dist/v2-features.test.js +95 -0
- package/dist/v2-features.test.js.map +1 -1
- package/package.json +1 -1
|
@@ -2,9 +2,16 @@ import { randomUUID } from "crypto";
|
|
|
2
2
|
import { MemoryStoreSchema } from "./schemas.js";
|
|
3
3
|
import { logger } from "../utils/logger.js";
|
|
4
4
|
import { createMcpResponse } from "../utils/mcp-response.js";
|
|
5
|
+
function hasMetadataLikeTitle(title) {
|
|
6
|
+
const normalized = title.trim();
|
|
7
|
+
return /^\[[^\]]{0,200}(agent:|role:|model:|\d{4}-\d{2}-\d{2}|source_)[^\]]*\]/i.test(normalized);
|
|
8
|
+
}
|
|
5
9
|
export async function handleMemoryStore(params, db, vectors) {
|
|
6
10
|
// Validate input
|
|
7
11
|
const validated = MemoryStoreSchema.parse(params);
|
|
12
|
+
if (hasMetadataLikeTitle(validated.title)) {
|
|
13
|
+
throw new Error("Title appears to contain metadata. Keep title concise and move agent/role/date details into metadata or dedicated fields.");
|
|
14
|
+
}
|
|
8
15
|
// Create memory entry
|
|
9
16
|
const now = new Date().toISOString();
|
|
10
17
|
// Compute expires_at if ttlDays is provided
|
|
@@ -61,6 +68,7 @@ export async function handleMemoryStore(params, db, vectors) {
|
|
|
61
68
|
supersedes: validated.supersedes ?? null,
|
|
62
69
|
status: "active",
|
|
63
70
|
tags,
|
|
71
|
+
metadata: validated.metadata ?? {},
|
|
64
72
|
is_global: validated.is_global
|
|
65
73
|
};
|
|
66
74
|
// Store in SQLite
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"memory.store.js","sourceRoot":"","sources":["../../src/tools/memory.store.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AACpC,OAAO,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAGjD,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAC5C,OAAO,EAAE,iBAAiB,EAAe,MAAM,0BAA0B,CAAC;AAE1E,MAAM,CAAC,KAAK,UAAU,iBAAiB,CACrC,MAAW,EACX,EAAe,EACf,OAAoB;IAEpB,iBAAiB;IACjB,MAAM,SAAS,GAAG,iBAAiB,CAAC,KAAK,CA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QACJ,QAAQ,EAAE,SAAS,CAAC,QAAQ,IAAI,EAAE;QAClC,SAAS,EAAE,SAAS,CAAC,SAAS;KAC/B,CAAC;IAEF,kBAAkB;IAClB,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IAEjB,oDAAoD;IACpD,IAAI,CAAC;QACH,MAAM,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC;IAChD,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,MAAM,CAAC,IAAI,CAAC,qCAAqC,EAAE,EAAE,KAAK,EAAE,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;QAC7E,6DAA6D;IAC/D,CAAC;IAED,MAAM,CAAC,IAAI,CAAC,oBAAoB,EAAE,EAAE,IAAI,EAAE,SAAS,CAAC,KAAK,CAAC,IAAI,EAAE,EAAE,EAAE,KAAK,CAAC,EAAE,EAAE,KAAK,EAAE,KAAK,CAAC,KAAK,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,EAAE,UAAU,EAAE,KAAK,CAAC,UAAU,EAAE,CAAC,CAAC;IAEpJ,OAAO,iBAAiB,CACtB,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE,EAAE,KAAK,CAAC,EAAE,EAAE,EAC/B,iBAAiB,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,KAAK,CAC3C,CAAC;AACJ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"memory.update.d.ts","sourceRoot":"","sources":["../../src/tools/memory.update.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAqB,WAAW,EAAE,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"memory.update.d.ts","sourceRoot":"","sources":["../../src/tools/memory.update.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAqB,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAQ1E,wBAAsB,kBAAkB,CACtC,MAAM,EAAE,GAAG,EACX,EAAE,EAAE,WAAW,EACf,OAAO,EAAE,WAAW,GACnB,OAAO,CAAC,WAAW,CAAC,CA4CtB"}
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import { MemoryUpdateSchema } from "./schemas.js";
|
|
2
2
|
import { createMcpResponse } from "../utils/mcp-response.js";
|
|
3
3
|
import { logger } from "../utils/logger.js";
|
|
4
|
+
function hasMetadataLikeTitle(title) {
|
|
5
|
+
const normalized = title.trim();
|
|
6
|
+
return /^\[[^\]]{0,200}(agent:|role:|model:|\d{4}-\d{2}-\d{2}|source_)[^\]]*\]/i.test(normalized);
|
|
7
|
+
}
|
|
4
8
|
export async function handleMemoryUpdate(params, db, vectors) {
|
|
5
9
|
// Validate input
|
|
6
10
|
const validated = MemoryUpdateSchema.parse(params);
|
|
@@ -9,8 +13,13 @@ export async function handleMemoryUpdate(params, db, vectors) {
|
|
|
9
13
|
if (!existing) {
|
|
10
14
|
throw new Error(`Memory not found: ${validated.id}`);
|
|
11
15
|
}
|
|
16
|
+
if (validated.title !== undefined && hasMetadataLikeTitle(validated.title)) {
|
|
17
|
+
throw new Error("Title appears to contain metadata. Keep title concise and move agent/role/date details into metadata or dedicated fields.");
|
|
18
|
+
}
|
|
12
19
|
// Update in SQLite
|
|
13
20
|
const updates = {};
|
|
21
|
+
if (validated.type !== undefined)
|
|
22
|
+
updates.type = validated.type;
|
|
14
23
|
if (validated.title !== undefined)
|
|
15
24
|
updates.title = validated.title;
|
|
16
25
|
if (validated.content !== undefined)
|
|
@@ -27,6 +36,8 @@ export async function handleMemoryUpdate(params, db, vectors) {
|
|
|
27
36
|
updates.supersedes = validated.supersedes;
|
|
28
37
|
if (validated.tags !== undefined)
|
|
29
38
|
updates.tags = validated.tags;
|
|
39
|
+
if (validated.metadata !== undefined)
|
|
40
|
+
updates.metadata = validated.metadata;
|
|
30
41
|
if (validated.is_global !== undefined)
|
|
31
42
|
updates.is_global = validated.is_global;
|
|
32
43
|
if (validated.completed_at !== undefined)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"memory.update.js","sourceRoot":"","sources":["../../src/tools/memory.update.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAGlD,OAAO,EAAE,iBAAiB,EAAe,MAAM,0BAA0B,CAAC;AAC1E,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAE5C,MAAM,CAAC,KAAK,UAAU,kBAAkB,CACtC,MAAW,EACX,EAAe,EACf,OAAoB;IAEpB,iBAAiB;IACjB,MAAM,SAAS,GAAG,kBAAkB,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;IAEnD,yBAAyB;IACzB,MAAM,QAAQ,GAAG,EAAE,CAAC,OAAO,CAAC,SAAS,CAAC,EAAE,CAAC,CAAC;IAC1C,IAAI,CAAC,QAAQ,EAAE,CAAC;QACd,MAAM,IAAI,KAAK,CAAC,qBAAqB,SAAS,CAAC,EAAE,EAAE,CAAC,CAAC;IACvD,CAAC;IAED,mBAAmB;IACnB,MAAM,OAAO,GAAQ,EAAE,CAAC;IACxB,IAAI,SAAS,CAAC,KAAK,KAAK,SAAS;QAAE,OAAO,CAAC,KAAK,GAAG,SAAS,CAAC,KAAK,CAAC;IACnE,IAAI,SAAS,CAAC,OAAO,KAAK,SAAS;QAAE,OAAO,CAAC,OAAO,GAAG,SAAS,CAAC,OAAO,CAAC;IACzE,IAAI,SAAS,CAAC,UAAU,KAAK,SAAS;QAAE,OAAO,CAAC,UAAU,GAAG,SAAS,CAAC,UAAU,CAAC;IAClF,IAAI,SAAS,CAAC,KAAK,KA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S,EAAE,CAAC;QACpC,MAAM,OAAO,CAAC,MAAM,CAAC,SAAS,CAAC,EAAE,EAAE,SAAS,CAAC,OAAO,CAAC,CAAC;IACxD,CAAC;IAED,wBAAwB;IACxB,EAAE,CAAC,SAAS,CAAC,QAAQ,EAAE,QAAQ,CAAC,KAAK,CAAC,IAAI,EAAE,EAAE,QAAQ,EAAE,SAAS,CAAC,EAAE,EAAE,WAAW,EAAE,CAAC,EAAE,CAAC,CAAC;IACxF,MAAM,CAAC,IAAI,CAAC,qBAAqB,EAAE,EAAE,IAAI,EAAE,QAAQ,CAAC,KAAK,CAAC,IAAI,EAAE,EAAE,EAAE,SAAS,CAAC,EAAE,EAAE,MAAM,EAAE,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;IAElH,OAAO,iBAAiB,CACtB,EAAE,OAAO,EAAE,IAAI,EAAE,EACjB,kBAAkB,SAAS,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,KAAK,CAChD,CAAC;AACJ,CAAC"}
|
package/dist/tools/schemas.d.ts
CHANGED
|
@@ -12,6 +12,7 @@ export declare const MemoryTypeSchema: z.ZodEnum<{
|
|
|
12
12
|
pattern: "pattern";
|
|
13
13
|
agent_handoff: "agent_handoff";
|
|
14
14
|
agent_registered: "agent_registered";
|
|
15
|
+
file_claim: "file_claim";
|
|
15
16
|
}>;
|
|
16
17
|
export declare const MemoryStoreSchema: z.ZodObject<{
|
|
17
18
|
type: z.ZodEnum<{
|
|
@@ -21,6 +22,7 @@ export declare const MemoryStoreSchema: z.ZodObject<{
|
|
|
21
22
|
pattern: "pattern";
|
|
22
23
|
agent_handoff: "agent_handoff";
|
|
23
24
|
agent_registered: "agent_registered";
|
|
25
|
+
file_claim: "file_claim";
|
|
24
26
|
}>;
|
|
25
27
|
title: z.ZodString;
|
|
26
28
|
content: z.ZodString;
|
|
@@ -37,10 +39,20 @@ export declare const MemoryStoreSchema: z.ZodObject<{
|
|
|
37
39
|
ttlDays: z.ZodOptional<z.ZodNumber>;
|
|
38
40
|
supersedes: z.ZodOptional<z.ZodString>;
|
|
39
41
|
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
42
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
40
43
|
is_global: z.ZodDefault<z.ZodBoolean>;
|
|
41
44
|
}, z.core.$strip>;
|
|
42
45
|
export declare const MemoryUpdateSchema: z.ZodObject<{
|
|
43
46
|
id: z.ZodString;
|
|
47
|
+
type: z.ZodOptional<z.ZodEnum<{
|
|
48
|
+
code_fact: "code_fact";
|
|
49
|
+
decision: "decision";
|
|
50
|
+
mistake: "mistake";
|
|
51
|
+
pattern: "pattern";
|
|
52
|
+
agent_handoff: "agent_handoff";
|
|
53
|
+
agent_registered: "agent_registered";
|
|
54
|
+
file_claim: "file_claim";
|
|
55
|
+
}>>;
|
|
44
56
|
title: z.ZodOptional<z.ZodString>;
|
|
45
57
|
content: z.ZodOptional<z.ZodString>;
|
|
46
58
|
importance: z.ZodOptional<z.ZodNumber>;
|
|
@@ -52,6 +64,7 @@ export declare const MemoryUpdateSchema: z.ZodObject<{
|
|
|
52
64
|
}>>;
|
|
53
65
|
supersedes: z.ZodOptional<z.ZodString>;
|
|
54
66
|
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
67
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
55
68
|
is_global: z.ZodOptional<z.ZodBoolean>;
|
|
56
69
|
completed_at: z.ZodOptional<z.ZodString>;
|
|
57
70
|
}, z.core.$strip>;
|
|
@@ -66,6 +79,7 @@ export declare const MemorySearchSchema: z.ZodObject<{
|
|
|
66
79
|
pattern: "pattern";
|
|
67
80
|
agent_handoff: "agent_handoff";
|
|
68
81
|
agent_registered: "agent_registered";
|
|
82
|
+
file_claim: "file_claim";
|
|
69
83
|
}>>>;
|
|
70
84
|
minImportance: z.ZodOptional<z.ZodNumber>;
|
|
71
85
|
limit: z.ZodDefault<z.ZodNumber>;
|
|
@@ -131,6 +145,7 @@ export declare const TaskCreateSchema: z.ZodObject<{
|
|
|
131
145
|
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
132
146
|
parent_id: z.ZodOptional<z.ZodString>;
|
|
133
147
|
depends_on: z.ZodOptional<z.ZodString>;
|
|
148
|
+
est_tokens: z.ZodOptional<z.ZodNumber>;
|
|
134
149
|
}, z.core.$strip>;
|
|
135
150
|
export declare const TaskUpdateSchema: z.ZodObject<{
|
|
136
151
|
repo: z.ZodString;
|
|
@@ -197,6 +212,7 @@ export declare const TaskBulkManageSchema: z.ZodObject<{
|
|
|
197
212
|
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
198
213
|
parent_id: z.ZodOptional<z.ZodString>;
|
|
199
214
|
depends_on: z.ZodOptional<z.ZodString>;
|
|
215
|
+
est_tokens: z.ZodOptional<z.ZodNumber>;
|
|
200
216
|
}, z.core.$strip>>>;
|
|
201
217
|
ids: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
202
218
|
}, z.core.$strip>;
|
|
@@ -266,6 +282,10 @@ export declare const TOOL_DEFINITIONS: ({
|
|
|
266
282
|
};
|
|
267
283
|
description: string;
|
|
268
284
|
};
|
|
285
|
+
metadata: {
|
|
286
|
+
type: string;
|
|
287
|
+
description: string;
|
|
288
|
+
};
|
|
269
289
|
is_global: {
|
|
270
290
|
type: string;
|
|
271
291
|
description: string;
|
|
@@ -301,11 +321,10 @@ export declare const TOOL_DEFINITIONS: ({
|
|
|
301
321
|
priority?: undefined;
|
|
302
322
|
role?: undefined;
|
|
303
323
|
doc_path?: undefined;
|
|
304
|
-
metadata?: undefined;
|
|
305
324
|
parent_id?: undefined;
|
|
306
325
|
depends_on?: undefined;
|
|
307
|
-
comment?: undefined;
|
|
308
326
|
est_tokens?: undefined;
|
|
327
|
+
comment?: undefined;
|
|
309
328
|
action?: undefined;
|
|
310
329
|
tasks?: undefined;
|
|
311
330
|
};
|
|
@@ -338,6 +357,7 @@ export declare const TOOL_DEFINITIONS: ({
|
|
|
338
357
|
model?: undefined;
|
|
339
358
|
scope?: undefined;
|
|
340
359
|
tags?: undefined;
|
|
360
|
+
metadata?: undefined;
|
|
341
361
|
is_global?: undefined;
|
|
342
362
|
ttlDays?: undefined;
|
|
343
363
|
supersedes?: undefined;
|
|
@@ -361,11 +381,10 @@ export declare const TOOL_DEFINITIONS: ({
|
|
|
361
381
|
priority?: undefined;
|
|
362
382
|
role?: undefined;
|
|
363
383
|
doc_path?: undefined;
|
|
364
|
-
metadata?: undefined;
|
|
365
384
|
parent_id?: undefined;
|
|
366
385
|
depends_on?: undefined;
|
|
367
|
-
comment?: undefined;
|
|
368
386
|
est_tokens?: undefined;
|
|
387
|
+
comment?: undefined;
|
|
369
388
|
action?: undefined;
|
|
370
389
|
tasks?: undefined;
|
|
371
390
|
};
|
|
@@ -382,6 +401,11 @@ export declare const TOOL_DEFINITIONS: ({
|
|
|
382
401
|
format: string;
|
|
383
402
|
description?: undefined;
|
|
384
403
|
};
|
|
404
|
+
type: {
|
|
405
|
+
type: string;
|
|
406
|
+
enum: string[];
|
|
407
|
+
description?: undefined;
|
|
408
|
+
};
|
|
385
409
|
title: {
|
|
386
410
|
type: string;
|
|
387
411
|
minLength: number;
|
|
@@ -415,11 +439,14 @@ export declare const TOOL_DEFINITIONS: ({
|
|
|
415
439
|
};
|
|
416
440
|
description?: undefined;
|
|
417
441
|
};
|
|
442
|
+
metadata: {
|
|
443
|
+
type: string;
|
|
444
|
+
description?: undefined;
|
|
445
|
+
};
|
|
418
446
|
is_global: {
|
|
419
447
|
type: string;
|
|
420
448
|
description?: undefined;
|
|
421
449
|
};
|
|
422
|
-
type?: undefined;
|
|
423
450
|
agent?: undefined;
|
|
424
451
|
model?: undefined;
|
|
425
452
|
scope?: undefined;
|
|
@@ -445,11 +472,10 @@ export declare const TOOL_DEFINITIONS: ({
|
|
|
445
472
|
priority?: undefined;
|
|
446
473
|
role?: undefined;
|
|
447
474
|
doc_path?: undefined;
|
|
448
|
-
metadata?: undefined;
|
|
449
475
|
parent_id?: undefined;
|
|
450
476
|
depends_on?: undefined;
|
|
451
|
-
comment?: undefined;
|
|
452
477
|
est_tokens?: undefined;
|
|
478
|
+
comment?: undefined;
|
|
453
479
|
action?: undefined;
|
|
454
480
|
tasks?: undefined;
|
|
455
481
|
};
|
|
@@ -517,6 +543,7 @@ export declare const TOOL_DEFINITIONS: ({
|
|
|
517
543
|
model?: undefined;
|
|
518
544
|
scope?: undefined;
|
|
519
545
|
tags?: undefined;
|
|
546
|
+
metadata?: undefined;
|
|
520
547
|
is_global?: undefined;
|
|
521
548
|
ttlDays?: undefined;
|
|
522
549
|
supersedes?: undefined;
|
|
@@ -533,11 +560,10 @@ export declare const TOOL_DEFINITIONS: ({
|
|
|
533
560
|
priority?: undefined;
|
|
534
561
|
role?: undefined;
|
|
535
562
|
doc_path?: undefined;
|
|
536
|
-
metadata?: undefined;
|
|
537
563
|
parent_id?: undefined;
|
|
538
564
|
depends_on?: undefined;
|
|
539
|
-
comment?: undefined;
|
|
540
565
|
est_tokens?: undefined;
|
|
566
|
+
comment?: undefined;
|
|
541
567
|
action?: undefined;
|
|
542
568
|
tasks?: undefined;
|
|
543
569
|
};
|
|
@@ -570,6 +596,7 @@ export declare const TOOL_DEFINITIONS: ({
|
|
|
570
596
|
model?: undefined;
|
|
571
597
|
scope?: undefined;
|
|
572
598
|
tags?: undefined;
|
|
599
|
+
metadata?: undefined;
|
|
573
600
|
is_global?: undefined;
|
|
574
601
|
ttlDays?: undefined;
|
|
575
602
|
supersedes?: undefined;
|
|
@@ -594,11 +621,10 @@ export declare const TOOL_DEFINITIONS: ({
|
|
|
594
621
|
priority?: undefined;
|
|
595
622
|
role?: undefined;
|
|
596
623
|
doc_path?: undefined;
|
|
597
|
-
metadata?: undefined;
|
|
598
624
|
parent_id?: undefined;
|
|
599
625
|
depends_on?: undefined;
|
|
600
|
-
comment?: undefined;
|
|
601
626
|
est_tokens?: undefined;
|
|
627
|
+
comment?: undefined;
|
|
602
628
|
action?: undefined;
|
|
603
629
|
tasks?: undefined;
|
|
604
630
|
};
|
|
@@ -623,6 +649,7 @@ export declare const TOOL_DEFINITIONS: ({
|
|
|
623
649
|
model?: undefined;
|
|
624
650
|
scope?: undefined;
|
|
625
651
|
tags?: undefined;
|
|
652
|
+
metadata?: undefined;
|
|
626
653
|
is_global?: undefined;
|
|
627
654
|
ttlDays?: undefined;
|
|
628
655
|
supersedes?: undefined;
|
|
@@ -648,11 +675,10 @@ export declare const TOOL_DEFINITIONS: ({
|
|
|
648
675
|
priority?: undefined;
|
|
649
676
|
role?: undefined;
|
|
650
677
|
doc_path?: undefined;
|
|
651
|
-
metadata?: undefined;
|
|
652
678
|
parent_id?: undefined;
|
|
653
679
|
depends_on?: undefined;
|
|
654
|
-
comment?: undefined;
|
|
655
680
|
est_tokens?: undefined;
|
|
681
|
+
comment?: undefined;
|
|
656
682
|
action?: undefined;
|
|
657
683
|
tasks?: undefined;
|
|
658
684
|
};
|
|
@@ -685,6 +711,7 @@ export declare const TOOL_DEFINITIONS: ({
|
|
|
685
711
|
model?: undefined;
|
|
686
712
|
scope?: undefined;
|
|
687
713
|
tags?: undefined;
|
|
714
|
+
metadata?: undefined;
|
|
688
715
|
is_global?: undefined;
|
|
689
716
|
ttlDays?: undefined;
|
|
690
717
|
supersedes?: undefined;
|
|
@@ -709,11 +736,10 @@ export declare const TOOL_DEFINITIONS: ({
|
|
|
709
736
|
priority?: undefined;
|
|
710
737
|
role?: undefined;
|
|
711
738
|
doc_path?: undefined;
|
|
712
|
-
metadata?: undefined;
|
|
713
739
|
parent_id?: undefined;
|
|
714
740
|
depends_on?: undefined;
|
|
715
|
-
comment?: undefined;
|
|
716
741
|
est_tokens?: undefined;
|
|
742
|
+
comment?: undefined;
|
|
717
743
|
action?: undefined;
|
|
718
744
|
tasks?: undefined;
|
|
719
745
|
};
|
|
@@ -750,6 +776,7 @@ export declare const TOOL_DEFINITIONS: ({
|
|
|
750
776
|
model?: undefined;
|
|
751
777
|
scope?: undefined;
|
|
752
778
|
tags?: undefined;
|
|
779
|
+
metadata?: undefined;
|
|
753
780
|
is_global?: undefined;
|
|
754
781
|
ttlDays?: undefined;
|
|
755
782
|
supersedes?: undefined;
|
|
@@ -773,11 +800,10 @@ export declare const TOOL_DEFINITIONS: ({
|
|
|
773
800
|
priority?: undefined;
|
|
774
801
|
role?: undefined;
|
|
775
802
|
doc_path?: undefined;
|
|
776
|
-
metadata?: undefined;
|
|
777
803
|
parent_id?: undefined;
|
|
778
804
|
depends_on?: undefined;
|
|
779
|
-
comment?: undefined;
|
|
780
805
|
est_tokens?: undefined;
|
|
806
|
+
comment?: undefined;
|
|
781
807
|
action?: undefined;
|
|
782
808
|
tasks?: undefined;
|
|
783
809
|
};
|
|
@@ -840,6 +866,7 @@ export declare const TOOL_DEFINITIONS: ({
|
|
|
840
866
|
};
|
|
841
867
|
metadata: {
|
|
842
868
|
type: string;
|
|
869
|
+
description?: undefined;
|
|
843
870
|
};
|
|
844
871
|
parent_id: {
|
|
845
872
|
type: string;
|
|
@@ -849,6 +876,11 @@ export declare const TOOL_DEFINITIONS: ({
|
|
|
849
876
|
type: string;
|
|
850
877
|
format: string;
|
|
851
878
|
};
|
|
879
|
+
est_tokens: {
|
|
880
|
+
type: string;
|
|
881
|
+
minimum: number;
|
|
882
|
+
description: string;
|
|
883
|
+
};
|
|
852
884
|
type?: undefined;
|
|
853
885
|
content?: undefined;
|
|
854
886
|
importance?: undefined;
|
|
@@ -873,7 +905,6 @@ export declare const TOOL_DEFINITIONS: ({
|
|
|
873
905
|
ids?: undefined;
|
|
874
906
|
offset?: undefined;
|
|
875
907
|
comment?: undefined;
|
|
876
|
-
est_tokens?: undefined;
|
|
877
908
|
action?: undefined;
|
|
878
909
|
tasks?: undefined;
|
|
879
910
|
};
|
|
@@ -949,6 +980,7 @@ export declare const TOOL_DEFINITIONS: ({
|
|
|
949
980
|
};
|
|
950
981
|
metadata: {
|
|
951
982
|
type: string;
|
|
983
|
+
description?: undefined;
|
|
952
984
|
};
|
|
953
985
|
parent_id: {
|
|
954
986
|
type: string;
|
|
@@ -1012,6 +1044,7 @@ export declare const TOOL_DEFINITIONS: ({
|
|
|
1012
1044
|
model?: undefined;
|
|
1013
1045
|
scope?: undefined;
|
|
1014
1046
|
tags?: undefined;
|
|
1047
|
+
metadata?: undefined;
|
|
1015
1048
|
is_global?: undefined;
|
|
1016
1049
|
ttlDays?: undefined;
|
|
1017
1050
|
supersedes?: undefined;
|
|
@@ -1036,11 +1069,10 @@ export declare const TOOL_DEFINITIONS: ({
|
|
|
1036
1069
|
priority?: undefined;
|
|
1037
1070
|
role?: undefined;
|
|
1038
1071
|
doc_path?: undefined;
|
|
1039
|
-
metadata?: undefined;
|
|
1040
1072
|
parent_id?: undefined;
|
|
1041
1073
|
depends_on?: undefined;
|
|
1042
|
-
comment?: undefined;
|
|
1043
1074
|
est_tokens?: undefined;
|
|
1075
|
+
comment?: undefined;
|
|
1044
1076
|
action?: undefined;
|
|
1045
1077
|
tasks?: undefined;
|
|
1046
1078
|
};
|
|
@@ -1086,6 +1118,7 @@ export declare const TOOL_DEFINITIONS: ({
|
|
|
1086
1118
|
model?: undefined;
|
|
1087
1119
|
scope?: undefined;
|
|
1088
1120
|
tags?: undefined;
|
|
1121
|
+
metadata?: undefined;
|
|
1089
1122
|
is_global?: undefined;
|
|
1090
1123
|
ttlDays?: undefined;
|
|
1091
1124
|
supersedes?: undefined;
|
|
@@ -1107,11 +1140,10 @@ export declare const TOOL_DEFINITIONS: ({
|
|
|
1107
1140
|
priority?: undefined;
|
|
1108
1141
|
role?: undefined;
|
|
1109
1142
|
doc_path?: undefined;
|
|
1110
|
-
metadata?: undefined;
|
|
1111
1143
|
parent_id?: undefined;
|
|
1112
1144
|
depends_on?: undefined;
|
|
1113
|
-
comment?: undefined;
|
|
1114
1145
|
est_tokens?: undefined;
|
|
1146
|
+
comment?: undefined;
|
|
1115
1147
|
action?: undefined;
|
|
1116
1148
|
tasks?: undefined;
|
|
1117
1149
|
};
|
|
@@ -1186,6 +1218,11 @@ export declare const TOOL_DEFINITIONS: ({
|
|
|
1186
1218
|
type: string;
|
|
1187
1219
|
format: string;
|
|
1188
1220
|
};
|
|
1221
|
+
est_tokens: {
|
|
1222
|
+
type: string;
|
|
1223
|
+
minimum: number;
|
|
1224
|
+
description: string;
|
|
1225
|
+
};
|
|
1189
1226
|
};
|
|
1190
1227
|
required: string[];
|
|
1191
1228
|
};
|
|
@@ -1208,6 +1245,7 @@ export declare const TOOL_DEFINITIONS: ({
|
|
|
1208
1245
|
model?: undefined;
|
|
1209
1246
|
scope?: undefined;
|
|
1210
1247
|
tags?: undefined;
|
|
1248
|
+
metadata?: undefined;
|
|
1211
1249
|
is_global?: undefined;
|
|
1212
1250
|
ttlDays?: undefined;
|
|
1213
1251
|
supersedes?: undefined;
|
|
@@ -1232,11 +1270,10 @@ export declare const TOOL_DEFINITIONS: ({
|
|
|
1232
1270
|
priority?: undefined;
|
|
1233
1271
|
role?: undefined;
|
|
1234
1272
|
doc_path?: undefined;
|
|
1235
|
-
metadata?: undefined;
|
|
1236
1273
|
parent_id?: undefined;
|
|
1237
1274
|
depends_on?: undefined;
|
|
1238
|
-
comment?: undefined;
|
|
1239
1275
|
est_tokens?: undefined;
|
|
1276
|
+
comment?: undefined;
|
|
1240
1277
|
};
|
|
1241
1278
|
required: string[];
|
|
1242
1279
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../src/tools/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,eAAO,MAAM,iBAAiB;;;;;iBAK5B,CAAC;AAEH,eAAO,MAAM,gBAAgB
|
|
1
|
+
{"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../src/tools/schemas.ts"],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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAoV5B,CAAC"}
|
package/dist/tools/schemas.js
CHANGED
|
@@ -6,7 +6,7 @@ export const MemoryScopeSchema = z.object({
|
|
|
6
6
|
folder: z.string().optional(),
|
|
7
7
|
language: z.string().optional()
|
|
8
8
|
});
|
|
9
|
-
export const MemoryTypeSchema = z.enum(["code_fact", "decision", "mistake", "pattern", "agent_handoff", "agent_registered"]);
|
|
9
|
+
export const MemoryTypeSchema = z.enum(["code_fact", "decision", "mistake", "pattern", "agent_handoff", "agent_registered", "file_claim"]);
|
|
10
10
|
// Tool schemas
|
|
11
11
|
export const MemoryStoreSchema = z.object({
|
|
12
12
|
type: MemoryTypeSchema,
|
|
@@ -20,10 +20,12 @@ export const MemoryStoreSchema = z.object({
|
|
|
20
20
|
ttlDays: z.number().min(1).optional(),
|
|
21
21
|
supersedes: z.string().uuid().optional(),
|
|
22
22
|
tags: z.array(z.string()).optional(),
|
|
23
|
+
metadata: z.record(z.string(), z.any()).optional(),
|
|
23
24
|
is_global: z.boolean().default(false)
|
|
24
25
|
});
|
|
25
26
|
export const MemoryUpdateSchema = z.object({
|
|
26
27
|
id: z.string().uuid(),
|
|
28
|
+
type: MemoryTypeSchema.optional(),
|
|
27
29
|
title: z.string().min(3).max(100).optional(),
|
|
28
30
|
content: z.string().min(10).optional(),
|
|
29
31
|
importance: z.number().min(1).max(5).optional(),
|
|
@@ -32,9 +34,10 @@ export const MemoryUpdateSchema = z.object({
|
|
|
32
34
|
status: z.enum(["active", "archived"]).optional(),
|
|
33
35
|
supersedes: z.string().uuid().optional(),
|
|
34
36
|
tags: z.array(z.string()).optional(),
|
|
37
|
+
metadata: z.record(z.string(), z.any()).optional(),
|
|
35
38
|
is_global: z.boolean().optional(),
|
|
36
39
|
completed_at: z.string().optional()
|
|
37
|
-
}).refine((data) => data.content !== undefined || data.title !== undefined || data.importance !== undefined || data.status !== undefined || data.supersedes !== undefined || data.tags !== undefined || data.is_global !== undefined || data.agent !== undefined || data.role !== undefined || data.completed_at !== undefined, { message: "At least one field must be provided for update" });
|
|
40
|
+
}).refine((data) => data.type !== undefined || data.content !== undefined || data.title !== undefined || data.importance !== undefined || data.status !== undefined || data.supersedes !== undefined || data.tags !== undefined || data.metadata !== undefined || data.is_global !== undefined || data.agent !== undefined || data.role !== undefined || data.completed_at !== undefined, { message: "At least one field must be provided for update" });
|
|
38
41
|
export const MemorySearchSchema = z.object({
|
|
39
42
|
query: z.string().min(3),
|
|
40
43
|
prompt: z.string().optional(),
|
|
@@ -82,7 +85,8 @@ export const TaskCreateSchema = z.object({
|
|
|
82
85
|
tags: z.array(z.string()).optional(),
|
|
83
86
|
metadata: z.record(z.string(), z.any()).optional(),
|
|
84
87
|
parent_id: z.string().uuid().optional(),
|
|
85
|
-
depends_on: z.string().uuid().optional()
|
|
88
|
+
depends_on: z.string().uuid().optional(),
|
|
89
|
+
est_tokens: z.number().int().min(0).optional()
|
|
86
90
|
});
|
|
87
91
|
export const TaskUpdateSchema = z.object({
|
|
88
92
|
repo: z.string().min(1),
|
|
@@ -127,7 +131,8 @@ export const TaskBulkManageSchema = z.object({
|
|
|
127
131
|
tags: z.array(z.string()).optional(),
|
|
128
132
|
metadata: z.record(z.string(), z.any()).optional(),
|
|
129
133
|
parent_id: z.string().uuid().optional(),
|
|
130
|
-
depends_on: z.string().uuid().optional()
|
|
134
|
+
depends_on: z.string().uuid().optional(),
|
|
135
|
+
est_tokens: z.number().int().min(0).optional()
|
|
131
136
|
})).min(1).optional(),
|
|
132
137
|
ids: z.array(z.string().uuid()).min(1).optional()
|
|
133
138
|
}).refine((data) => (data.action === "bulk_create" && data.tasks) || (data.action === "bulk_delete" && data.ids), { message: "tasks is required for bulk_create, ids is required for bulk_delete" });
|
|
@@ -139,20 +144,20 @@ export const TaskDeleteSchema = z.object({
|
|
|
139
144
|
export const TOOL_DEFINITIONS = [
|
|
140
145
|
{
|
|
141
146
|
name: "memory-store",
|
|
142
|
-
description: "Store a new memory entry.
|
|
147
|
+
description: "Store a new memory entry. Keep 'title' concise and human-readable; do not embed agent/role/date metadata in the title. Put auxiliary context into 'metadata'. Use 'tags' for tech-stack and 'is_global' for universal rules.",
|
|
143
148
|
inputSchema: {
|
|
144
149
|
type: "object",
|
|
145
150
|
properties: {
|
|
146
151
|
type: {
|
|
147
152
|
type: "string",
|
|
148
|
-
enum: ["code_fact", "decision", "mistake", "pattern", "agent_handoff", "agent_registered"],
|
|
153
|
+
enum: ["code_fact", "decision", "mistake", "pattern", "agent_handoff", "agent_registered", "file_claim"],
|
|
149
154
|
description: "Type of memory being stored"
|
|
150
155
|
},
|
|
151
156
|
title: {
|
|
152
157
|
type: "string",
|
|
153
158
|
minLength: 3,
|
|
154
159
|
maxLength: 100,
|
|
155
|
-
description: "Short title for the memory"
|
|
160
|
+
description: "Short human-readable title for the memory. Do not embed bracketed metadata like agent/role/date prefixes here."
|
|
156
161
|
},
|
|
157
162
|
content: {
|
|
158
163
|
type: "string",
|
|
@@ -188,6 +193,10 @@ export const TOOL_DEFINITIONS = [
|
|
|
188
193
|
items: { type: "string" },
|
|
189
194
|
description: "Technology stack tags (e.g., ['filament', 'laravel'])"
|
|
190
195
|
},
|
|
196
|
+
metadata: {
|
|
197
|
+
type: "object",
|
|
198
|
+
description: "Structured metadata for non-title context such as source agent, claim fields, or timestamps"
|
|
199
|
+
},
|
|
191
200
|
is_global: {
|
|
192
201
|
type: "boolean",
|
|
193
202
|
description: "If true, this memory is shared across all repositories"
|
|
@@ -213,17 +222,19 @@ export const TOOL_DEFINITIONS = [
|
|
|
213
222
|
},
|
|
214
223
|
{
|
|
215
224
|
name: "memory-update",
|
|
216
|
-
description: "Update an existing memory entry",
|
|
225
|
+
description: "Update an existing memory entry. Keep 'title' concise and move agent/role/date or claim context into 'metadata' instead of the title.",
|
|
217
226
|
inputSchema: {
|
|
218
227
|
type: "object",
|
|
219
228
|
properties: {
|
|
220
229
|
id: { type: "string", format: "uuid" },
|
|
230
|
+
type: { type: "string", enum: ["code_fact", "decision", "mistake", "pattern", "agent_handoff", "agent_registered", "file_claim"] },
|
|
221
231
|
title: { type: "string", minLength: 3, maxLength: 100 },
|
|
222
232
|
content: { type: "string", minLength: 10 },
|
|
223
233
|
importance: { type: "number", minimum: 1, maximum: 5 },
|
|
224
234
|
status: { type: "string", enum: ["active", "archived"] },
|
|
225
235
|
supersedes: { type: "string", format: "uuid" },
|
|
226
236
|
tags: { type: "array", items: { type: "string" } },
|
|
237
|
+
metadata: { type: "object" },
|
|
227
238
|
is_global: { type: "boolean" }
|
|
228
239
|
},
|
|
229
240
|
required: ["id"]
|
|
@@ -245,7 +256,7 @@ export const TOOL_DEFINITIONS = [
|
|
|
245
256
|
},
|
|
246
257
|
types: {
|
|
247
258
|
type: "array",
|
|
248
|
-
items: { type: "string", enum: ["code_fact", "decision", "mistake", "pattern", "agent_handoff", "agent_registered"] }
|
|
259
|
+
items: { type: "string", enum: ["code_fact", "decision", "mistake", "pattern", "agent_handoff", "agent_registered", "file_claim"] }
|
|
249
260
|
},
|
|
250
261
|
minImportance: { type: "number", minimum: 1, maximum: 5 },
|
|
251
262
|
limit: { type: "number", minimum: 1, maximum: 10, default: 5 },
|
|
@@ -322,7 +333,7 @@ export const TOOL_DEFINITIONS = [
|
|
|
322
333
|
},
|
|
323
334
|
{
|
|
324
335
|
name: "task-create",
|
|
325
|
-
description: "Create a new task in a repository. task_code must be unique within the repository.",
|
|
336
|
+
description: "Create a new task in a repository. task_code must be unique within the repository. 'est_tokens' is optional during planning/creation.",
|
|
326
337
|
inputSchema: {
|
|
327
338
|
type: "object",
|
|
328
339
|
properties: {
|
|
@@ -339,14 +350,15 @@ export const TOOL_DEFINITIONS = [
|
|
|
339
350
|
tags: { type: "array", items: { type: "string" } },
|
|
340
351
|
metadata: { type: "object" },
|
|
341
352
|
parent_id: { type: "string", format: "uuid" },
|
|
342
|
-
depends_on: { type: "string", format: "uuid" }
|
|
353
|
+
depends_on: { type: "string", format: "uuid" },
|
|
354
|
+
est_tokens: { type: "number", minimum: 0, description: "Estimated tokens budget for this task" }
|
|
343
355
|
},
|
|
344
356
|
required: ["repo", "task_code", "phase", "title", "description", "status"]
|
|
345
357
|
}
|
|
346
358
|
},
|
|
347
359
|
{
|
|
348
360
|
name: "task-update",
|
|
349
|
-
description: "Update an existing task. Provide only the fields that need to be changed.",
|
|
361
|
+
description: "Update an existing task. Provide only the fields that need to be changed. When changing status to 'completed', include 'est_tokens' with the estimated total tokens actually used for the task.",
|
|
350
362
|
inputSchema: {
|
|
351
363
|
type: "object",
|
|
352
364
|
properties: {
|
|
@@ -367,7 +379,7 @@ export const TOOL_DEFINITIONS = [
|
|
|
367
379
|
metadata: { type: "object" },
|
|
368
380
|
parent_id: { type: "string", format: "uuid" },
|
|
369
381
|
depends_on: { type: "string", format: "uuid" },
|
|
370
|
-
est_tokens: { type: "number", minimum: 0, description: "Estimated tokens used for this task" }
|
|
382
|
+
est_tokens: { type: "number", minimum: 0, description: "Estimated total tokens actually used for this task. Required when status changes to 'completed'." }
|
|
371
383
|
},
|
|
372
384
|
required: ["repo", "id"]
|
|
373
385
|
}
|
|
@@ -422,7 +434,7 @@ export const TOOL_DEFINITIONS = [
|
|
|
422
434
|
},
|
|
423
435
|
{
|
|
424
436
|
name: "task-bulk-manage",
|
|
425
|
-
description: "Perform bulk operations on tasks (e.g., bulk creation, bulk deletion).",
|
|
437
|
+
description: "Perform bulk operations on tasks (e.g., bulk creation, bulk deletion). For bulk_create, 'est_tokens' is optional and can be filled later when the task is completed.",
|
|
426
438
|
inputSchema: {
|
|
427
439
|
type: "object",
|
|
428
440
|
properties: {
|
|
@@ -452,7 +464,8 @@ export const TOOL_DEFINITIONS = [
|
|
|
452
464
|
tags: { type: "array", items: { type: "string" } },
|
|
453
465
|
metadata: { type: "object" },
|
|
454
466
|
parent_id: { type: "string", format: "uuid" },
|
|
455
|
-
depends_on: { type: "string", format: "uuid" }
|
|
467
|
+
depends_on: { type: "string", format: "uuid" },
|
|
468
|
+
est_tokens: { type: "number", minimum: 0, description: "Estimated tokens budget for this task" }
|
|
456
469
|
},
|
|
457
470
|
required: ["task_code", "title", "phase", "description", "status"]
|
|
458
471
|
},
|