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
This commit is contained in:
Claude committed 2026-09-03 13:40:59 +00:00
1 parent 5217eee53a
commit 127a2083a1
239 files changed
+11351 -86495

No files matched your search

+77
View File
@@ -0,0 +1,77 @@
import { useEffect, useState } from 'react';
import { bridge } from '../../lib/bridge';
import { httpFetch } from '../../lib/transport';
import { useSettings } from '../../state/settings';
import { hermesBaseUrl } from '../../services/hermes/client';
const cache = new Map<string, string>();
const failures = new Map<string, string>();
interface Props {
src?: string;
alt?: string;
onOpen?: (src: string) => void;
}
/**
* Renders images coming from Hermes: data URLs, http(s), Windows/file paths (read through the
* main process) and server-side absolute paths (fetched from the Hermes host with auth).
*/
export function ResilientImage({ src = '', alt, onOpen }: Props) {
const [resolved, setResolved] = useState<string>(() => cache.get(src) ?? '');
const [error, setError] = useState<string>(() => failures.get(src) ?? '');
const hermes = useSettings((s) => s.settings.hermes);
useEffect(() => {
if (!src) return;
let cancelled = false;
const ok = (value: string) => {
cache.set(src, value);
if (!cancelled) {
setResolved(value);
setError('');
}
};
const fail = (message: string) => {
failures.set(src, message);
if (!cancelled) setError(message);
};
if (cache.has(src)) {
setResolved(cache.get(src)!);
return;
}
if (src.startsWith('data:') || src.startsWith('blob:') || /^https?:\/\//i.test(src)) {
ok(src);
return;
}
const api = bridge();
const isLocal = src.startsWith('file://') || /^[a-zA-Z]:[\\/]/.test(src);
const fromHermes = async () => {
if (!hermes.url) throw new Error('chemin local inaccessible');
const base = hermesBaseUrl(hermes.url);
const path = src.replace(/^file:\/\//, '').replace(/\\/g, '/');
const headers: Record<string, string> = {};
if (hermes.apiKey) headers.Authorization = `Bearer ${hermes.apiKey}`;
const res = await httpFetch({ url: `${base}/${path.replace(/^\//, '')}`, headers, responseType: 'binary', timeoutMs: 15_000 });
if (!res.ok || !res.binary) throw new Error(`HTTP ${res.status}`);
const type = res.headers['content-type'] || 'image/png';
const bytes = new Uint8Array(res.binary);
return URL.createObjectURL(new Blob([bytes], { type }));
};
const task = isLocal && api ? api.files.readLocal(src).catch(fromHermes) : fromHermes();
task.then(ok).catch((err: Error) => fail(err.message || 'image inaccessible'));
return () => {
cancelled = true;
};
}, [src, hermes.url, hermes.apiKey]);
if (error && !resolved) {
return (
<span className="img-error" title={src}>
Image inaccessible ({error})
</span>
);
}
if (!resolved) return <span className="img-error pulse">chargement…</span>;
return <img src={resolved} alt={alt ?? 'image'} loading="lazy" onClick={() => onOpen?.(resolved)} />;
}