@199-bio/engram 0.11.0 → 0.11.1
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 +10 -3
- package/package.json +1 -1
- package/src/index.ts +10 -3
package/dist/index.js
CHANGED
|
@@ -480,18 +480,25 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
|
480
480
|
const year = ts.getFullYear();
|
|
481
481
|
return year === currentYear ? `${month} ${day}` : `${month} ${day} '${String(year).slice(-2)}`;
|
|
482
482
|
};
|
|
483
|
-
// Add memories as simple dated entries
|
|
483
|
+
// Add memories as simple dated entries, track IDs for feedback
|
|
484
|
+
const memoryIds = [];
|
|
484
485
|
for (const r of response.results) {
|
|
485
486
|
context.push(`${formatDate(r.memory.timestamp)}: ${r.memory.content}`);
|
|
487
|
+
memoryIds.push(r.memory.id);
|
|
486
488
|
}
|
|
487
489
|
// Add connected memories
|
|
488
490
|
for (const c of response.connected_memories) {
|
|
489
491
|
context.push(`${formatDate(c.memory.timestamp)}: ${c.memory.content}`);
|
|
492
|
+
memoryIds.push(c.memory.id);
|
|
490
493
|
}
|
|
491
494
|
// Check if consolidation is needed
|
|
492
495
|
const unconsolidated = db.countUnconsolidatedMemories();
|
|
493
|
-
//
|
|
494
|
-
const result = {
|
|
496
|
+
// Lean response with feedback support
|
|
497
|
+
const result = {
|
|
498
|
+
context,
|
|
499
|
+
_ids: memoryIds,
|
|
500
|
+
_recall: response.recall_id,
|
|
501
|
+
};
|
|
495
502
|
// Only add consolidation hint if needed (≥20 unconsolidated)
|
|
496
503
|
if (unconsolidated >= 20) {
|
|
497
504
|
result._consolidate = unconsolidated;
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -544,21 +544,28 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
|
544
544
|
return year === currentYear ? `${month} ${day}` : `${month} ${day} '${String(year).slice(-2)}`;
|
|
545
545
|
};
|
|
546
546
|
|
|
547
|
-
// Add memories as simple dated entries
|
|
547
|
+
// Add memories as simple dated entries, track IDs for feedback
|
|
548
|
+
const memoryIds: string[] = [];
|
|
548
549
|
for (const r of response.results) {
|
|
549
550
|
context.push(`${formatDate(r.memory.timestamp)}: ${r.memory.content}`);
|
|
551
|
+
memoryIds.push(r.memory.id);
|
|
550
552
|
}
|
|
551
553
|
|
|
552
554
|
// Add connected memories
|
|
553
555
|
for (const c of response.connected_memories) {
|
|
554
556
|
context.push(`${formatDate(c.memory.timestamp)}: ${c.memory.content}`);
|
|
557
|
+
memoryIds.push(c.memory.id);
|
|
555
558
|
}
|
|
556
559
|
|
|
557
560
|
// Check if consolidation is needed
|
|
558
561
|
const unconsolidated = db.countUnconsolidatedMemories();
|
|
559
562
|
|
|
560
|
-
//
|
|
561
|
-
const result: Record<string, unknown> = {
|
|
563
|
+
// Lean response with feedback support
|
|
564
|
+
const result: Record<string, unknown> = {
|
|
565
|
+
context,
|
|
566
|
+
_ids: memoryIds,
|
|
567
|
+
_recall: response.recall_id,
|
|
568
|
+
};
|
|
562
569
|
|
|
563
570
|
// Only add consolidation hint if needed (≥20 unconsolidated)
|
|
564
571
|
if (unconsolidated >= 20) {
|