feat(FN-3803): add universal web fetch to reviewer, merger, and triage agen

The merge introduces the universal web fetch tool across reviewer/merger/triage agents (FN-3803, 4 commits) with docs and regression test, extracts the roadmap as a plugin scaffold in `plugins/fusion-plugin-reports` (FN-3166, FN-3165) while removing dashboard roadmap backend and associated tests, ad

Fusion-Task-Id: FN-3803
This commit is contained in:
Fusion
2026-05-08 23:53:08 -07:00
committed by gsxdsm
parent 9d1c05a7d9
commit 5bfe12615c
8 changed files with 52 additions and 6 deletions

View File

@@ -201,7 +201,7 @@ describe("reviewStep — spec review type", () => {
const opts = mockedCreateFnAgent.mock.calls[0][0];
expect(opts.systemPrompt).toContain("## Project Memory");
expect(opts.systemPrompt).toContain("Do not update memory during review");
expect(opts.customTools?.map((tool: any) => tool.name)).toEqual(["fn_memory_search", "fn_memory_get"]);
expect(opts.customTools?.map((tool: any) => tool.name)).toEqual(["fn_web_fetch", "fn_memory_search", "fn_memory_get"]);
});
it("omits reviewer memory tools and instructions when memory is disabled", async () => {
@@ -217,7 +217,7 @@ describe("reviewStep — spec review type", () => {
const opts = mockedCreateFnAgent.mock.calls[0][0];
expect(opts.systemPrompt).not.toContain("## Project Memory");
expect(opts.customTools).toBeUndefined();
expect(opts.customTools?.map((tool: any) => tool.name)).toEqual(["fn_web_fetch"]);
});
it("builds review request with spec-specific instructions", async () => {

View File

@@ -0,0 +1,36 @@
import { readFileSync } from "node:fs";
import { join } from "node:path";
import { describe, expect, it } from "vitest";
function readSource(file: string): string {
return readFileSync(join(import.meta.dirname, "..", file), "utf8");
}
describe("fn_web_fetch universal registration", () => {
it("executor registers fn_web_fetch", () => {
expect(readSource("executor.ts")).toContain("createWebFetchTool()");
});
it("step-session executor registers fn_web_fetch", () => {
expect(readSource("step-session-executor.ts")).toContain("createWebFetchTool()");
});
it("reviewer registers fn_web_fetch", () => {
expect(readSource("reviewer.ts")).toContain("customTools: [createWebFetchTool()");
});
it("merger registers fn_web_fetch", () => {
expect(readSource("merger.ts")).toContain("customTools: [reportBuildFailureTool, createWebFetchTool()]");
});
it("triage registers fn_web_fetch", () => {
expect(readSource("triage.ts")).toContain("createWebFetchTool(),");
});
it("heartbeat registers fn_web_fetch for task and no-task branches", () => {
const source = readSource("agent-heartbeat.ts");
expect(source).toContain("heartbeatTools.push(createWebFetchTool())");
expect(source).toContain("if (taskId)");
expect(source).toContain("else {");
});
});

View File

@@ -66,6 +66,7 @@ import { resolveAgentInstructions, buildSystemPromptWithInstructions } from "./a
import type { ToolDefinition } from "@mariozechner/pi-coding-agent";
import { Type } from "typebox";
import { createRunAuditor, generateSyntheticRunId, type EngineRunContext } from "./run-audit.js";
import { createWebFetchTool } from "./agent-tools.js";
/** Conflict type classification for merge conflict resolution */
export type ConflictType =
@@ -6443,7 +6444,7 @@ async function runAiAgentForCommit(params: AiAgentParams): Promise<{ success: bo
cwd: rootDir,
systemPrompt: mergerSystemPrompt,
tools: "coding",
customTools: [reportBuildFailureTool],
customTools: [reportBuildFailureTool, createWebFetchTool()],
onText: agentLogger.onText,
onThinking: agentLogger.onThinking,
onToolStart: agentLogger.onToolStart,

View File

@@ -22,7 +22,7 @@ import {
buildPluginPromptSection,
} from "./agent-instructions.js";
import { createFallbackModelObserver } from "./fallback-model-observer.js";
import { createMemoryGetTool, createMemorySearchTool } from "./agent-tools.js";
import { createMemoryGetTool, createMemorySearchTool, createWebFetchTool } from "./agent-tools.js";
export const REVIEWER_SYSTEM_PROMPT = `You are an independent code and plan reviewer.
@@ -496,7 +496,7 @@ export async function reviewStep(
cwd,
systemPrompt: reviewerSystemPromptFinal,
tools: "readonly",
customTools: memoryTools,
customTools: [createWebFetchTool(), ...(memoryTools ?? [])],
onText: agentLogger ? agentLogger.onText : (delta) => options.onText?.(delta),
onThinking: agentLogger?.onThinking,
onToolStart: agentLogger?.onToolStart,

View File

@@ -52,6 +52,7 @@ import {
createListAgentsTool,
createMemoryTools,
createResearchTools,
createWebFetchTool,
createTaskDocumentReadTool,
createTaskDocumentWriteTool,
} from "./agent-tools.js";
@@ -966,6 +967,7 @@ export class TriageProcessor {
},
}
: undefined),
createWebFetchTool(),
// Agent delegation tools — discover and delegate work to other agents.
...(this.options.agentStore ? [
createListAgentsTool(this.options.agentStore),