feat(FN-3705): gate research tools behind experimental flag

This merge introduces two major themes. First, research tools in both the engine and CLI are now gated behind an experimental flag, using a shared helper from core — the research tools are documented as experimental and the dashboard settings reference is updated. Second, the testing suite receives

Fusion-Task-Id: FN-3705
This commit is contained in:
Fusion
2026-05-07 10:29:03 -07:00
committed by gsxdsm
parent 1c0aef28cd
commit af82119a75
13 changed files with 243 additions and 32 deletions

View File

@@ -1,7 +1,21 @@
import { describe, expect, it } from "vitest";
import { resolveResearchSettings } from "../research-settings.js";
import { isResearchExperimentalEnabled, resolveResearchSettings } from "../research-settings.js";
import type { Settings } from "../types.js";
describe("isResearchExperimentalEnabled", () => {
it("returns false when settings are missing", () => {
expect(isResearchExperimentalEnabled(undefined)).toBe(false);
});
it("returns false when researchView is false", () => {
expect(isResearchExperimentalEnabled({ experimentalFeatures: { researchView: false } as Record<string, boolean> } as Settings)).toBe(false);
});
it("returns true when researchView is true", () => {
expect(isResearchExperimentalEnabled({ experimentalFeatures: { researchView: true } as Record<string, boolean> } as Settings)).toBe(true);
});
});
describe("resolveResearchSettings", () => {
it("resolves global-only defaults", () => {
const resolved = resolveResearchSettings({

View File

@@ -721,7 +721,7 @@ export type {
ResearchCancellationState,
} from "./research-types.js";
export { resolveResearchSettings } from "./research-settings.js";
export { isResearchExperimentalEnabled, resolveResearchSettings } from "./research-settings.js";
export type { ResolvedResearchSettings } from "./research-settings.js";
export { resolveEvalSettings } from "./eval-settings.js";

View File

@@ -1,5 +1,9 @@
import type { ResearchEnabledSources, Settings } from "./types.js";
export function isResearchExperimentalEnabled(settings: Partial<Settings> | undefined): boolean {
return settings?.experimentalFeatures?.researchView === true;
}
export interface ResolvedResearchSettings {
enabled: boolean;
searchProvider?: string;