Files
EveFlow/shared/bridge.ts
T
Claude 127a2083a1 feat!: rebuild EveFlow as a JARVIS-style voice HUD for Hermes Agent (v2.0.0)
Complete rewrite of the application:

- Toolchain: Electron 44, Vite 8, React 19, TypeScript 5.9, Zustand, Vitest;
  main process rewritten in TypeScript (electron/), typed IPC contract (shared/),
  sandboxed renderer with webSecurity on and an HTTP/SSE proxy in the main process.
- Voice: AudioWorklet microphone capture at 16 kHz with adaptive energy VAD and
  auto-stop, WAV encoder, OpenAI-compatible STT, TTS queue with sentence-level
  streaming, prefetch and Web Audio playback feeding an analyser; hands-free mode,
  global push-to-talk hotkey, system-voice fallback.
- Hermes: full API client (capabilities, health, models, skills, toolsets,
  sessions, jobs) with automatic transport selection: runs API (SSE lifecycle,
  approvals, steer, stop) > sessions stream > chat completions with local tools;
  tolerant event normalisation; webhook receiver hardened (secret, size limit).
- UI: JARVIS arc-reactor core on Canvas 2D reacting to the real audio signal,
  holographic HUD layout (transcript, core, Hermes ops panel with tools/crons/
  skills/sessions/link tabs, telemetry), settings drawer, approval modals,
  compact floating widget, four themes, tray icon and global shortcuts.
- Removed the 3D Eve robot, three.js and legacy assets; migrated 1.x settings.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017Wn5VX9HNbJ7N54hR24u9Y
2026-09-03 13:40:59 +00:00

55 lines
1.7 KiB
TypeScript

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: <T = unknown>(key: string) => Promise<T | null>;
set: (key: string, value: unknown) => Promise<boolean>;
delete: (key: string) => Promise<boolean>;
};
http: {
fetch: (req: HttpProxyRequest) => Promise<HttpProxyResponse>;
streamStart: (id: string, req: HttpProxyRequest) => Promise<HttpStreamStart>;
streamAbort: (id: string) => void;
onStreamEvent: (cb: (event: HttpStreamEvent) => void) => Unsubscribe;
};
system: {
metrics: () => Promise<SystemMetrics>;
appInfo: () => Promise<AppInfo>;
};
files: {
readLocal: (filePath: string) => Promise<string>;
writeShared: (filename: string, content: string, isBase64?: boolean) => Promise<{ path: string; url: string }>;
openPath: (filePath: string) => Promise<boolean>;
showInFolder: (filePath: string) => Promise<boolean>;
};
hermes: {
onPush: (cb: (event: HermesPushEvent) => void) => Unsubscribe;
webhookStatus: () => Promise<WebhookStatus>;
webhookRestart: () => Promise<WebhookStatus>;
};
hotkeys: {
on: (cb: (event: HotkeyEvent) => void) => Unsubscribe;
};
}