Files
apress/vitest.config.ts
T
Omar SobhandClaude Opus 4.8 f21bbdf31e feat(apess): wire real ZeroClaw nodes + live/sim mode + cloud→local fallback
Turn the workshop shell into a real on-device agent platform: APESS now
proxies each team's Arduino Uno Q (running ZeroClaw) and drives
generate → compile → flash from the UI, with a simulation fallback.

api — node backbone
- nodes.ts: team→node registry, a pure ZeroClaw /api/events → WsEvent
  mapper, per-node live SSE subscription fanned out to the collective hub
  AND per-team participant listeners, and a prompt proxy. Bearer tokens
  stay server-side; list()/broadcasts never expose them.
- routes: POST/GET/DELETE /nodes (register is admin-only), public
  POST /nodes/:teamId/prompt, and a participant-scoped SSE
  GET /nodes/:teamId/events.
- WsEvent gains node:status / node:activity.

front-end
- session store: mode 'live' | 'sim' (default sim); a 'local' provider
  and a harness.fallbackLocal toggle ("cloud first, on-board Qwen if it
  fails") reflected in the harness.toml preview.
- EnvSetup: Simulation / Live board toggle — sim runs a virtual board
  (self-test + Proceed with no hardware), live requires a registered node.
- BuildFlash panel (in Module 2): prompt the board, watch activity stream
  live (SSE) or a simulated generate→flash sequence.
- lib/api: sendPrompt + openTeamActivity (EventSource).

housekeeping
- better-sqlite3 → 12.11 (Node 26 support; the 11.x native build fails on
  Node 26's V8).
- vitest excludes the vendored Uno-QClaw/ tree.

Tests: front-end 172, api 29, typecheck clean, prod build passes.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
2026-07-03 05:52:51 -07:00

22 lines
597 B
TypeScript

import { defineConfig } from 'vitest/config'
import react from '@vitejs/plugin-react'
import path from 'node:path'
export default defineConfig({
plugins: [react()],
resolve: {
alias: {
'@': path.resolve(__dirname, './src'),
},
},
test: {
globals: true,
environment: 'jsdom',
setupFiles: ['./src/setupTests.ts'],
css: true,
// Our app tests only. Exclude the vendored QClaw/llama.cpp tree, which ships
// its own Svelte/e2e tests that this React+jsdom runner can't transform.
exclude: ['**/node_modules/**', '**/dist/**', 'Uno-QClaw/**'],
},
})