feat(FN-4583): complete Step 2 — expose engine chat store accessor

Fusion-Task-Id: FN-4583
Fusion-Task-Lineage: 4d9b088d-a705-4376-b547-15b37e5370aa
This commit is contained in:
Fusion
2026-05-15 01:59:43 -07:00
committed by gsxdsm
parent a24d601b86
commit 8b5e467f5c
3 changed files with 21 additions and 0 deletions

View File

@@ -8,4 +8,12 @@ describe("InProcessRuntime onStart duplicate guard", () => {
expect(source).toContain("if (this.taskAgentMap.has(task.id))");
expect(source).toContain("Skipping task-worker creation for");
});
it("exposes getChatStore and wires HeartbeatMonitor to the runtime chatStore instance", () => {
const source = readFileSync(join(process.cwd(), "src/runtimes/in-process-runtime.ts"), "utf-8");
expect(source).toContain("this.chatStore ??= new ChatStore(this.taskStore.getFusionDir(), this.taskStore.getDatabase());");
expect(source).toContain("chatStore: this.chatStore,");
expect(source).toContain("getChatStore(): import(\"@fusion/core\").ChatStore | undefined {");
expect(source).toContain("return this.chatStore;");
});
});