feat(memory-wiki): add prompt supplement integration

This commit is contained in:
Vincent Koc
2026-04-05 21:40:56 +01:00
parent 00372508b5
commit c11e7a7420
15 changed files with 154 additions and 16 deletions

View File

@@ -9,6 +9,7 @@ import {
buildMemoryPromptSection,
getMemoryRuntime,
registerMemoryFlushPlanResolver,
registerMemoryPromptSupplement,
registerMemoryPromptSection,
registerMemoryRuntime,
resolveMemoryFlushPlan,
@@ -156,6 +157,7 @@ describe("clearPluginLoaderCache", () => {
create: async () => ({ provider: null }),
});
registerMemoryPromptSection(() => ["stale memory section"]);
registerMemoryPromptSupplement("memory-wiki", () => ["stale wiki supplement"]);
registerMemoryFlushPlanResolver(() => ({
softThresholdTokens: 1,
forceFlushTranscriptBytes: 2,
@@ -174,6 +176,7 @@ describe("clearPluginLoaderCache", () => {
});
expect(buildMemoryPromptSection({ availableTools: new Set() })).toEqual([
"stale memory section",
"stale wiki supplement",
]);
expect(resolveMemoryFlushPlan({})?.relativePath).toBe("memory/stale.md");
expect(getMemoryRuntime()).toBeDefined();