@caupulican/pi-adaptative 0.80.72 → 0.80.74

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.
@@ -38,6 +38,7 @@ import { MemoryManager } from "./memory/memory-manager.js";
38
38
  import { FileStoreProvider } from "./memory/providers/file-store.js";
39
39
  import { TranscriptRecallProvider } from "./memory/providers/transcript-recall.js";
40
40
  import { compactToolResultDetailsForRetention } from "./message-retention.js";
41
+ import { createCustomMessage } from "./messages.js";
41
42
  import { resolveProfileModelSettings } from "./model-resolver.js";
42
43
  import { expandPromptTemplate } from "./prompt-templates.js";
43
44
  import { stripResourceProfileBlocks } from "./resource-profile-blocks.js";
@@ -1126,7 +1127,11 @@ export class AgentSession {
1126
1127
  if (recall) {
1127
1128
  injectedRecall = recall;
1128
1129
  recallQuery = expandedText;
1129
- messages.push({ role: "user", content: [{ type: "text", text: recall }], timestamp: Date.now() });
1130
+ // Inject as a GC-managed custom context message (role "custom", customType
1131
+ // "memory_context"), NOT a persisted user message: the semantic-memory context-GC packs
1132
+ // stale recall pages so they don't accumulate forever (Bug #7), and the transcript index
1133
+ // only re-reads user/assistant text so recalled snippets can't recirculate (Bug #10).
1134
+ messages.push(createCustomMessage("memory_context", recall, false, undefined, new Date().toISOString()));
1130
1135
  }
1131
1136
  }
1132
1137
  catch {