feat(FN-3738): add fusion-plugin-even-realities-glasses plugin package with

Implements a new Fusion plugin package (`fusion-plugin-even-realities-glasses`) providing settings schema, a Fusion HTTP API client, cards, quick capture actions, a notifier, and transport stub — plus plugin routes and lifecycle hooks wired into the pi extension. The branch concludes with a small fi

Fusion-Task-Id: FN-3738
This commit is contained in:
Fusion
2026-05-08 12:05:46 -07:00
committed by gsxdsm
parent ab1398eb52
commit a6ec5b9ce6
43 changed files with 1358 additions and 36 deletions

View File

@@ -1855,4 +1855,45 @@ describe("CronRunner", () => {
expect(isInProcessScheduledEvalCommand("echo fn eval --scheduled-batch")).toBe(false);
});
});
describe("scheduled eval command feature gating", () => {
it("returns a disabled result when evalsView experimental feature is off", async () => {
const store = createMockStore({ experimentalFeatures: { evalsView: false } as Settings["experimentalFeatures"] });
const schedule = createMockSchedule({ id: "eval-off", command: "fn eval --scheduled-batch" });
runner = new CronRunner(store, createMockAutomationStore());
const runResult = await (runner as unknown as { executeLegacyCommand: (s: ScheduledTask, startedAt: string) => Promise<AutomationRunResult> })
.executeLegacyCommand(schedule, new Date().toISOString());
expect(runResult.success).toBe(false);
expect(runResult.output).toBe("evals-experimental-disabled");
expect(runResult.error).toBe("Evals experimental feature is disabled");
});
it("does not return the disabled sentinel when evalsView experimental feature is on", async () => {
const store = createMockStore({ experimentalFeatures: { evalsView: true } as Settings["experimentalFeatures"] }) as unknown as {
getEvalStore: () => {
listRuns: () => Array<{ id: string; status: string; metadata?: Record<string, unknown>; window: { until?: string } }>;
createRun: (input: { projectId: string; trigger: string; scope: string; window: { since?: string; until: string }; metadata: Record<string, unknown> }) => { id: string; startedAt?: string; window: { until: string } };
appendRunEvent: (runId: string, event: Record<string, unknown>) => void;
updateRun: (runId: string, patch: Record<string, unknown>) => void;
};
listTasks: (opts: { column: string }) => Promise<Array<{ id: string; column: string; createdAt: string; updatedAt: string; executionCompletedAt?: string; title: string; summary?: string }>>;
};
store.getEvalStore = () => ({
listRuns: () => [],
createRun: () => ({ id: "run-1", window: { until: new Date().toISOString() } }),
appendRunEvent: () => {},
updateRun: () => {},
});
store.listTasks = async () => [];
const schedule = createMockSchedule({ id: "eval-on", command: "fn eval --scheduled-batch" });
runner = new CronRunner(store as unknown as TaskStore, createMockAutomationStore());
const runResult = await (runner as unknown as { executeLegacyCommand: (s: ScheduledTask, startedAt: string) => Promise<AutomationRunResult> })
.executeLegacyCommand(schedule, new Date().toISOString());
expect(runResult.output).not.toBe("evals-experimental-disabled");
});
});
});

View File

@@ -4,6 +4,7 @@ import {
resolveProjectDefaultModel,
runScheduledEvalBatch,
resolveTaskEvaluationSettings,
isEvalsExperimentalEnabled,
type TaskStore,
type AutomationStore,
type ScheduledTask,
@@ -487,6 +488,15 @@ export class CronRunner {
startedAt: string,
): Promise<AutomationRunResult> {
const settings = await this.store.getSettings();
if (!isEvalsExperimentalEnabled(settings)) {
return {
success: false,
output: "evals-experimental-disabled",
error: "Evals experimental feature is disabled",
startedAt,
completedAt: new Date().toISOString(),
};
}
const evalSettings = resolveTaskEvaluationSettings(settings);
const evaluator = new HybridEvaluatorService({ cwd: this.options.workingDirectory ?? process.cwd(), store: this.store });