feat(FN-3612): preserve fusion context in hermes runtime skill forwarding

Merges five commits implementing centralized runtime skill forwarding that preserves Fusion context across the Hermes runtime layer. The engine's `agent-runtime` and `agent-session-helpers` were updated to forward skills at runtime, with `runtime-adapter.ts` and its types extended to carry context.

Fusion-Task-Id: FN-3612
This commit is contained in:
Fusion
2026-05-06 12:57:21 -07:00
committed by gsxdsm
parent 884b91dfc2
commit 2ca67c02f2
9 changed files with 121 additions and 7 deletions

View File

@@ -61,7 +61,8 @@ describe("HermesRuntimeAdapter — promptWithFallback", () => {
expect(mockInvoke).toHaveBeenCalledTimes(1);
const [prompt, settings, resumeId] = mockInvoke.mock.calls[0];
expect(prompt).toBe("first prompt");
expect(prompt).toContain("User request:\nfirst prompt");
expect(prompt).toContain("Fusion runtime context:");
expect(settings.model).toBe("claude-sonnet-4-5");
expect(resumeId).toBeUndefined();
expect(onText).toHaveBeenCalledWith("hello from hermes");
@@ -78,7 +79,8 @@ describe("HermesRuntimeAdapter — promptWithFallback", () => {
await adapter.promptWithFallback(session, "p1");
await adapter.promptWithFallback(session, "p2");
const [, , resume2] = mockInvoke.mock.calls[1];
const [prompt2, , resume2] = mockInvoke.mock.calls[1];
expect(prompt2).toBe("p2");
expect(resume2).toBe("20260427_120000_abc123");
});