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:
@@ -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 () => {
|
||||
|
||||
36
packages/engine/src/__tests__/web-fetch-universal.test.ts
Normal file
36
packages/engine/src/__tests__/web-fetch-universal.test.ts
Normal 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 {");
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user