import type { AppInfo, HermesPushEvent, HotkeyEvent, HttpProxyRequest, HttpProxyResponse, HttpStreamEvent, HttpStreamStart, LogEntry, SystemMetrics, WebhookStatus, WindowMode } from './ipc'; export type Unsubscribe = () => void; /** The API exposed on `window.eveflow` by the preload script. */ export interface EveFlowBridge { window: { control: (action: 'minimize' | 'maximize' | 'close' | 'hide') => void; setMode: (mode: WindowMode) => void; onModeChanged: (cb: (mode: WindowMode) => void) => Unsubscribe; }; log: (entry: LogEntry) => void; store: { get: (key: string) => Promise; set: (key: string, value: unknown) => Promise; delete: (key: string) => Promise; }; http: { fetch: (req: HttpProxyRequest) => Promise; streamStart: (id: string, req: HttpProxyRequest) => Promise; streamAbort: (id: string) => void; onStreamEvent: (cb: (event: HttpStreamEvent) => void) => Unsubscribe; }; system: { metrics: () => Promise; appInfo: () => Promise; }; files: { readLocal: (filePath: string) => Promise; writeShared: (filename: string, content: string, isBase64?: boolean) => Promise<{ path: string; url: string }>; openPath: (filePath: string) => Promise; showInFolder: (filePath: string) => Promise; }; hermes: { onPush: (cb: (event: HermesPushEvent) => void) => Unsubscribe; webhookStatus: () => Promise; webhookRestart: () => Promise; }; hotkeys: { on: (cb: (event: HotkeyEvent) => void) => Unsubscribe; }; }