refactor(FN-2162): rename kb-agent identifiers to fn-agent

- Rename core loader, dashboard server chat/planning routes, and frontend agent IDs/storage keys from kb-agent to fn-agent naming
- Update dashboard hooks and components (agent list, chat view, quick chat) to use the new fn agent key prefixes consistently
- Refresh engine, dashboard, core, and CLI tests/mocks to remove remaining kb-agent route and temp prefix references
- Update storage/gap-analysis docs to reflect fn agent key names and add a @gsxdsm/fusion patch changeset for the rename
This commit is contained in:
Fusion
2026-04-19 19:40:10 -07:00
committed by gsxdsm
parent 0aa1360a18
commit 0b9bf62a2a
51 changed files with 878 additions and 873 deletions

View File

@@ -21,7 +21,7 @@ import { createHash } from "node:crypto";
import { CheckoutConflictError, type AgentCapability, type AgentState } from "./types.js";
function makeTmpDir(): string {
return mkdtempSync(join(tmpdir(), "kb-agent-store-test-"));
return mkdtempSync(join(tmpdir(), "fn-agent-store-test-"));
}
describe("AgentStore", () => {

View File

@@ -39,7 +39,7 @@ const engineReady: Promise<void> = initEngine();
* Returns `createFnAgent` from `@fusion/engine`, or `undefined` if the engine
* could not be loaded (typical in tests or when engine isn't installed).
*/
export async function getKbAgent(): Promise<CreateFnAgent> {
export async function getFnAgent(): Promise<CreateFnAgent> {
await engineReady;
return createFnAgent;
}

View File

@@ -11,7 +11,7 @@
* - Text length validation (201-2000 characters)
*/
import { getKbAgent, type AgentMessage } from "./ai-engine-loader.js";
import { getFnAgent, type AgentMessage } from "./ai-engine-loader.js";
// ── Constants ───────────────────────────────────────────────────────────────
@@ -209,7 +209,7 @@ export async function summarizeTitle(
return null; // Too short for summarization
}
const createFnAgent = await getKbAgent();
const createFnAgent = await getFnAgent();
if (!createFnAgent) {
if (DEBUG) console.log("[ai-summarize] AI engine not available");
throw new AiServiceError("AI engine not available");

View File

@@ -15,7 +15,7 @@
import type { ProjectSettings } from "./types.js";
import type { ScheduledTaskCreateInput } from "./automation.js";
import { getKbAgent, type AgentMessage } from "./ai-engine-loader.js";
import { getFnAgent, type AgentMessage } from "./ai-engine-loader.js";
// ── Constants ───────────────────────────────────────────────────────────────
@@ -79,7 +79,7 @@ export async function compactMemoryWithAi(
provider?: string,
modelId?: string
): Promise<string> {
const createFnAgent = await getKbAgent();
const createFnAgent = await getFnAgent();
if (!createFnAgent) {
if (DEBUG) console.log("[memory-compaction] AI engine not available");
throw new AiServiceError("AI engine not available");