@eleboucher/pi-memini 0.5.11 → 0.5.12
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/index.js +21 -5
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -417,6 +417,12 @@ export default function meminiExtension(pi) {
|
|
|
417
417
|
"current workspace state and the user's instructions):",
|
|
418
418
|
...fit.items,
|
|
419
419
|
];
|
|
420
|
+
// /v1/search sets `degraded: "keyword_only"` (plus a `note`) when the query
|
|
421
|
+
// embed was unavailable and it fell back to keyword-only matching; both are
|
|
422
|
+
// already on `result`, so surfacing them is a one-line addition.
|
|
423
|
+
if (result?.degraded) {
|
|
424
|
+
lines.push(`[memini: ${result.note || "semantic search unavailable — results are keyword-only and may be incomplete"}]`);
|
|
425
|
+
}
|
|
420
426
|
if (fit.dropped > 0)
|
|
421
427
|
lines.push(`[... ${fit.dropped} item(s) truncated by token budget]`);
|
|
422
428
|
return {
|
|
@@ -467,7 +473,11 @@ export default function meminiExtension(pi) {
|
|
|
467
473
|
pi.registerTool({
|
|
468
474
|
name: "memory_recall",
|
|
469
475
|
label: "Recall memory",
|
|
470
|
-
description: "Recall relevant memories from long-term memory (memini) via hybrid (semantic + keyword) search."
|
|
476
|
+
description: "Recall relevant memories from long-term memory (memini) via hybrid (semantic + keyword) search. " +
|
|
477
|
+
"Call before starting work that may have history: editing an unfamiliar file, debugging a recurring " +
|
|
478
|
+
"issue, or when asked what's known about something. A degraded:\"keyword_only\" field in the result " +
|
|
479
|
+
"means semantic search was unavailable and results came from keyword matching alone — treat as " +
|
|
480
|
+
"incomplete, not exhaustive.",
|
|
471
481
|
parameters: Type.Object({
|
|
472
482
|
query: Type.String({ description: "What to search for" }),
|
|
473
483
|
limit: Type.Optional(Type.Number({ description: "Max results (default 3)" })),
|
|
@@ -488,7 +498,9 @@ export default function meminiExtension(pi) {
|
|
|
488
498
|
tier: r?.memory?.tier || "",
|
|
489
499
|
score: typeof r?.score === "number" ? r.score : 0,
|
|
490
500
|
}));
|
|
491
|
-
|
|
501
|
+
// /v1/search already carries `degraded`/`note` on `res`; pass them through
|
|
502
|
+
// rather than dropping them silently.
|
|
503
|
+
return text(res?.degraded ? { results, degraded: res.degraded, note: res.note } : { results });
|
|
492
504
|
},
|
|
493
505
|
});
|
|
494
506
|
pi.registerTool({
|
|
@@ -519,7 +531,9 @@ export default function meminiExtension(pi) {
|
|
|
519
531
|
pi.registerTool({
|
|
520
532
|
name: "memory_remember",
|
|
521
533
|
label: "Remember",
|
|
522
|
-
description: "Store a durable fact, decision, or preference in long-term memory (memini)."
|
|
534
|
+
description: "Store a durable fact, decision, or preference in long-term memory (memini). Call proactively when " +
|
|
535
|
+
"the user says 'remember this', after an architectural decision (capture the why), or after " +
|
|
536
|
+
"discovering a non-obvious bug or convention. Keep memories atomic — one self-contained fact per call.",
|
|
523
537
|
parameters: Type.Object({
|
|
524
538
|
content: Type.String({ description: "The fact to remember" }),
|
|
525
539
|
tier: Type.Optional(Type.String({
|
|
@@ -548,8 +562,10 @@ export default function meminiExtension(pi) {
|
|
|
548
562
|
pi.registerTool({
|
|
549
563
|
name: "memory_forget",
|
|
550
564
|
label: "Forget",
|
|
551
|
-
description: "
|
|
552
|
-
"outdated, or poisoned. Get the id from memory_recall or memory_list.
|
|
565
|
+
description: "Permanently delete a memory from long-term memory (memini) by its id — use when a recalled memory " +
|
|
566
|
+
"is wrong, outdated, or poisoned. Get the id from memory_recall or memory_list. To correct a fact, " +
|
|
567
|
+
"forget the stale one and remember the corrected version — this integration talks to memini over " +
|
|
568
|
+
"REST, which has no partial-update endpoint.",
|
|
553
569
|
parameters: Type.Object({
|
|
554
570
|
id: Type.String({ description: "The id of the memory to forget (from memory_recall / memory_list)." }),
|
|
555
571
|
}),
|