fix(memory): use auto-incrementing id as tick proxy for recency scoring

Events recorded with tick: 0 now get a meaningful tick value from the
service's internal counter, ensuring selectForPrompt recency scoring
works correctly. Also fixed preferTypes to accept readonly arrays.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
root
2026-03-08 22:09:01 +00:00
parent ccb53d8a17
commit ce2caa4ae1
2 changed files with 6 additions and 3 deletions
+1 -1
View File
@@ -166,7 +166,7 @@ function describeRecentEvents(
const events = eventMemoryService.selectForPrompt(entityId, {
maxCount: 5,
preferTypes: preferTypes as any,
preferTypes,
});
if (events.length > 0) {
return events.map(e => `- ${e.detail}`).join('\n');