refactor(FN-2161): standardize on createFnAgent naming

- Rename engine export and call sites to use createFnAgent consistently across runtime flows
- Update core lazy engine loader and dashboard agent-generation/planning/chat paths to reference createFnAgent
- Refresh affected unit and integration tests, including renaming pi-create-kb-agent.test.ts to pi-create-fn-agent.test.ts
- Update AGENTS.md documentation references to match the new createFnAgent name
This commit is contained in:
Fusion
2026-04-19 17:50:41 -07:00
committed by gsxdsm
parent 0df3234349
commit 6714f7654b
58 changed files with 425 additions and 425 deletions

View File

@@ -7,7 +7,7 @@ const { mockCreateKbAgent } = vi.hoisted(() => ({
}));
vi.mock("@fusion/engine", () => ({
createKbAgent: mockCreateKbAgent,
createFnAgent: mockCreateKbAgent,
}));
import {
@@ -217,7 +217,7 @@ describe("milestone-slice-interview module", () => {
beforeEach(async () => {
vi.clearAllMocks();
__resetMilestoneSliceInterviewState();
// Reset cached createKbAgent to force re-import with mock
// Reset cached createFnAgent to force re-import with mock
const mod = await import("./milestone-slice-interview.js") as any;
mod.__resetEngine?.();
mockCreateKbAgent.mockImplementation(async () => createMockAgent([createQuestionJson()]));