fix(dashboard): restore engine namespace import in chat/planning

The auto-resolved FN-2614 merge swapped `import * as engine` for a narrow
named import but left dangling `engine.X` references, breaking the
dashboard build. Restore the namespace import and drop the now-orphaned
engineExports/ntfy helper consts.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
gsxdsm
2026-04-26 20:32:22 -07:00
parent 0a1e441c79
commit 80813dc73e
2 changed files with 2 additions and 40 deletions

View File

@@ -30,50 +30,13 @@ import {
resetDiagnosticsSink,
nonfatal,
} from "./ai-session-diagnostics.js";
import { createFnAgent as engineCreateFnAgent } from "@fusion/engine";
import * as engine from "@fusion/engine";
// eslint-disable-next-line @typescript-eslint/no-explicit-any
type AgentResult = any;
// eslint-disable-next-line @typescript-eslint/no-explicit-any
let createFnAgent: any = engine.createFnAgent;
const engineExports = engine as Record<string, unknown>;
const engineIsNtfyEventEnabled =
("isNtfyEventEnabled" in engineExports &&
typeof engineExports["isNtfyEventEnabled"] === "function"
? engineExports["isNtfyEventEnabled"]
: (events: NtfyNotificationEvent[] | undefined, event: NtfyNotificationEvent) =>
Array.isArray(events) && events.includes(event)) as (
events: NtfyNotificationEvent[] | undefined,
event: NtfyNotificationEvent
) => boolean;
const engineBuildNtfyClickUrl =
("buildNtfyClickUrl" in engineExports &&
typeof engineExports["buildNtfyClickUrl"] === "function"
? engineExports["buildNtfyClickUrl"]
: (_options: { dashboardHost?: string; projectId?: string; taskId?: string }) => undefined) as (
options: { dashboardHost?: string; projectId?: string; taskId?: string }
) => string | undefined;
const engineSendNtfyNotification =
("sendNtfyNotification" in engineExports &&
typeof engineExports["sendNtfyNotification"] === "function"
? engineExports["sendNtfyNotification"]
: async (_input: {
ntfyBaseUrl?: string;
topic: string;
title: string;
message: string;
priority?: "low" | "default" | "high" | "urgent";
clickUrl?: string;
}) => {}) as (input: {
ntfyBaseUrl?: string;
topic: string;
title: string;
message: string;
priority?: "low" | "default" | "high" | "urgent";
clickUrl?: string;
}) => Promise<void>;
interface PlanningNtfyConfig {
enabled: boolean;
topic?: string;