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:
@@ -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", () => {
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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");
|
||||
|
||||
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user