mirror of
https://github.com/R0m1k3/EveFlow.git
synced 2026-10-11 17:29:03 +02:00
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:
239 files changed
+11351
-86495
No files matched your search
@@ -0,0 +1,82 @@
|
||||
// Generates build/icon.png (256x256 arc-reactor style icon) without any native dependency.
|
||||
import { deflateSync } from 'node:zlib';
|
||||
import { writeFileSync, mkdirSync } from 'node:fs';
|
||||
|
||||
const SIZE = 256;
|
||||
const px = new Uint8Array(SIZE * SIZE * 4);
|
||||
|
||||
function put(x, y, r, g, b, a) {
|
||||
const i = (y * SIZE + x) * 4;
|
||||
const src = a / 255;
|
||||
const dst = px[i + 3] / 255;
|
||||
const out = src + dst * (1 - src);
|
||||
if (out === 0) return;
|
||||
px[i] = Math.round((r * src + px[i] * dst * (1 - src)) / out);
|
||||
px[i + 1] = Math.round((g * src + px[i + 1] * dst * (1 - src)) / out);
|
||||
px[i + 2] = Math.round((b * src + px[i + 2] * dst * (1 - src)) / out);
|
||||
px[i + 3] = Math.round(out * 255);
|
||||
}
|
||||
|
||||
const cx = SIZE / 2;
|
||||
const cy = SIZE / 2;
|
||||
for (let y = 0; y < SIZE; y++) {
|
||||
for (let x = 0; x < SIZE; x++) {
|
||||
const d = Math.hypot(x - cx + 0.5, y - cy + 0.5);
|
||||
const ang = Math.atan2(y - cy, x - cx);
|
||||
// dark disc background
|
||||
if (d < 122) put(x, y, 4, 12, 22, 235);
|
||||
// outer ring
|
||||
if (d > 104 && d < 114) put(x, y, 52, 228, 255, 255);
|
||||
// segmented ring with ten gaps
|
||||
const seg = ((ang + Math.PI) / (Math.PI * 2)) * 10;
|
||||
if (d > 84 && d < 96 && seg % 1 > 0.18) put(x, y, 52, 228, 255, 200);
|
||||
// inner glow
|
||||
if (d < 62) {
|
||||
const t = 1 - d / 62;
|
||||
put(x, y, 120 + 100 * t, 240, 255, Math.round(90 + 165 * t));
|
||||
}
|
||||
if (d < 26) put(x, y, 235, 252, 255, 255);
|
||||
}
|
||||
}
|
||||
|
||||
function crc32(buf) {
|
||||
let c;
|
||||
const table = [];
|
||||
for (let n = 0; n < 256; n++) {
|
||||
c = n;
|
||||
for (let k = 0; k < 8; k++) c = c & 1 ? 0xedb88320 ^ (c >>> 1) : c >>> 1;
|
||||
table[n] = c >>> 0;
|
||||
}
|
||||
let crc = 0xffffffff;
|
||||
for (let i = 0; i < buf.length; i++) crc = table[(crc ^ buf[i]) & 0xff] ^ (crc >>> 8);
|
||||
return (crc ^ 0xffffffff) >>> 0;
|
||||
}
|
||||
|
||||
function chunk(type, data) {
|
||||
const len = Buffer.alloc(4);
|
||||
len.writeUInt32BE(data.length);
|
||||
const typeBuf = Buffer.from(type, 'ascii');
|
||||
const crc = Buffer.alloc(4);
|
||||
crc.writeUInt32BE(crc32(Buffer.concat([typeBuf, data])));
|
||||
return Buffer.concat([len, typeBuf, data, crc]);
|
||||
}
|
||||
|
||||
const raw = Buffer.alloc((SIZE * 4 + 1) * SIZE);
|
||||
for (let y = 0; y < SIZE; y++) {
|
||||
raw[y * (SIZE * 4 + 1)] = 0;
|
||||
Buffer.from(px.buffer, y * SIZE * 4, SIZE * 4).copy(raw, y * (SIZE * 4 + 1) + 1);
|
||||
}
|
||||
const ihdr = Buffer.alloc(13);
|
||||
ihdr.writeUInt32BE(SIZE, 0);
|
||||
ihdr.writeUInt32BE(SIZE, 4);
|
||||
ihdr[8] = 8; // bit depth
|
||||
ihdr[9] = 6; // RGBA
|
||||
const png = Buffer.concat([
|
||||
Buffer.from([0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a]),
|
||||
chunk('IHDR', ihdr),
|
||||
chunk('IDAT', deflateSync(raw)),
|
||||
chunk('IEND', Buffer.alloc(0))
|
||||
]);
|
||||
mkdirSync('build', { recursive: true });
|
||||
writeFileSync('build/icon.png', png);
|
||||
console.log(`build/icon.png written (${png.length} bytes)`);
|
||||
Reference in new issue
Block a user