feat(FN-2996): add research agent tools with extension wiring, remote setti

This merge brings multiple substantial features: new research extension tools wired through the AI engine (with full test coverage and documentation), legacy routines agentId backward compatibility with migration paths, migration of experimental remote settings to the global scope, Nerd Font glyph a

Fusion-Task-Id: FN-2996
This commit is contained in:
Fusion
2026-04-30 20:37:18 -07:00
committed by gsxdsm
parent 97bb80e75c
commit 864f5bbb8c
15 changed files with 730 additions and 30 deletions

View File

@@ -523,6 +523,11 @@ describe("buildSpecificationPrompt", () => {
});
describe("TRIAGE_SYSTEM_PROMPT", () => {
it("includes bounded research guidance", () => {
expect(TRIAGE_SYSTEM_PROMPT).toContain("fn_research_run");
expect(TRIAGE_SYSTEM_PROMPT).toContain("Keep research bounded");
});
it("requires specs to keep lint, tests, build, and typecheck green even outside initial file scope", () => {
expect(TRIAGE_SYSTEM_PROMPT).toContain("If keeping lint/tests/build/typecheck green requires edits outside the initial File Scope");
expect(TRIAGE_SYSTEM_PROMPT).toContain("Run lint check");
@@ -694,6 +699,10 @@ describe("fast-mode triage", () => {
const { promptWithFallback } = await import("../pi.js");
(promptWithFallback as ReturnType<typeof vi.fn>).mockImplementationOnce(async () => {
expect(capturedTools.some((tool: any) => tool.name === "fn_research_run")).toBe(true);
expect(capturedTools.some((tool: any) => tool.name === "fn_research_list")).toBe(true);
expect(capturedTools.some((tool: any) => tool.name === "fn_research_get")).toBe(true);
expect(capturedTools.some((tool: any) => tool.name === "fn_research_cancel")).toBe(true);
await writeFile(promptPath, "# Task: FN-FAST-004 - Fast\n\n## Mission\n\nShip it.");
const reviewTool = capturedTools.find((tool) => tool.name === "fn_review_spec");
expect(reviewTool).toBeDefined();