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