mirror of
https://github.com/R0m1k3/EveFlow.git
synced 2026-10-11 17:29:03 +02:00
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
21 lines
1.1 KiB
TypeScript
21 lines
1.1 KiB
TypeScript
import { describe, expect, it } from 'vitest';
|
|
import { normalizeHermesPush } from '../shared/hermesPush';
|
|
|
|
describe('normalizeHermesPush', () => {
|
|
it('handles run.completed with input/output', () => {
|
|
const events = normalizeHermesPush({ event: 'run.completed', input: 'hi', output: 'hello', platform: 'telegram' });
|
|
expect(events.map((e) => [e.role, e.text, e.source])).toEqual([['user', 'hi', 'telegram'], ['assistant', 'hello', 'telegram']]);
|
|
});
|
|
it('handles cron job payloads and images', () => {
|
|
const [e] = normalizeHermesPush({ event: 'job.completed', job: { name: 'Daily', last_status: 'ok' }, output: 'report', images: ['https://a/b.png'] });
|
|
expect(e.type).toBe('job');
|
|
expect(e.jobName).toBe('Daily');
|
|
expect(e.images).toEqual(['https://a/b.png']);
|
|
});
|
|
it('handles direct and legacy shapes', () => {
|
|
expect(normalizeHermesPush({ role: 'user', text: 'x' })[0].role).toBe('user');
|
|
expect(normalizeHermesPush({ type: 'assistant_message', text: 'y' })[0].role).toBe('assistant');
|
|
expect(normalizeHermesPush({ foo: 1 })[0].type).toBe('raw');
|
|
});
|
|
});
|