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 5de8c8dca7
commit a929b729b9
58 changed files with 425 additions and 425 deletions

View File

@@ -12,15 +12,15 @@ import type {
} from "@fusion/core";
vi.mock("./pi.js", () => ({
createKbAgent: vi.fn(),
createFnAgent: vi.fn(),
promptWithFallback: vi.fn(),
}));
import { createKbAgent, promptWithFallback } from "./pi.js";
import { createFnAgent, promptWithFallback } from "./pi.js";
import { AgentReflectionService } from "./agent-reflection.js";
import { createReflectOnPerformanceTool, reflectOnPerformanceParams } from "./agent-tools.js";
const mockedCreateKbAgent = vi.mocked(createKbAgent);
const mockedCreateKbAgent = vi.mocked(createFnAgent);
const mockedPromptWithFallback = vi.mocked(promptWithFallback);
function makeAgent(overrides: Partial<Agent> = {}): Agent {