Self-hosted, local-first AI application builder. Design and architecture: see docs/.
- Environment
- Architecture
- Security
- Roadmap
- Operations
- Memory
- Control & Insight (milestones 9-12; M9-M12 shipped)
- UX review & polish plan (milestones 13-18, planned)
npm install
cp .env.example .env
npm run devOpen http://localhost:3000 to create and manage projects. Project storage defaults to ./data (override with DATA_DIR — the repo drive has little free space).
Per project you can start the workspace (spawns a loopback OpenCode server), then send an agent task from the project page: the request goes to a real session, normalized activity streams live to the page, tasks reach an explicit terminal state (completed/failed/cancelled/timed_out), and each finished task shows its changed files with a unified diff. You can also start a live preview (npm run dev on an allocated port) with captured logs and parsed errors; errors from the latest preview run are fed back into the agent's next prompt. Requires an OpenCode model provider configured for the machine (see docs/environment.md §2).
Safety and recovery (Milestone 5): each project gets an OpenCode permission policy (opencode.json, written gitignored into the project at workspace start) that allow-lists the template's declared validation commands and asks for everything else. When the agent needs a shell command beyond the allow-list, the task pauses as waiting_for_approval and the project page raises an approval prompt (Approve once / Always allow / Reject); the decision is sent back to the session through the SDK. Tasks time out on their own deadline (time spent waiting for an approval is excluded, with a separate APPROVAL_WAIT_TIMEOUT_MS ceiling), cancellation cleans up pending requests, checkpoints are created before dirty tasks and after every successful task, the Checkpoints panel can undo/restore to any checkpoint (backend-controlled with explicit confirmation), and every meaningful action lands in an append-only audit log (project page → Show audit log).
Quality (Milestone 6): GET /api/health reports DB / disk / git / opencode probes (200 ok / 503 degraded); npm test runs unit + integration + failure-path + restart/recovery suites (175 tests across 19 files — including the FTS-backed history search), and npx playwright test drives the happy-path vertical slice plus the Control & Insight file/preview, M11 sessions/presets/skills and M12 search/palette/onboarding flows in your system Chrome against a deterministic fake agent (npm run test:e2e). The operations runbook (docs/operations.md) covers env vars, backups, recovery and troubleshooting.
Control & Insight I (Milestone 9, 2026-08-21): the agent page now lets you pick a project default model and a per-task override (validated provider/model, with a fail-fast test probe), watch a step timeline (reasoning/text/tool/file/patch with per-step tokens and click-to-fix on errored steps), see per-task and per-project usage & cost (honest "unavailable" when the provider omits it, a labelled estimated price otherwise — nothing leaves the machine), and drive the task lifecycle: re-run, edit-then-rerun, cancel-with-reason, and quick actions (fix lint / add tests / explain diff / update README). A power-user inspector shows the normalized (and optionally raw) event stream per task, with a per-project toggle to persist full history.
Control & Insight II (Milestone 10, 2026-08-22): each project page now has a read-first file explorer — searchable pre-order tree, text view with sha256 + binary detection, download, and an audited Edit flow (draft → in-browser diff review → Apply) that auto-checkpoints a dirty tree and returns the authoritative git diff; a file upload control with an explicit tracked-vs-ignored decision (tracked uploads are staged so checkpoints capture them); a preview control room (viewport presets, reload / open-in-tab / restart / stop, boot-phase status and a live logs drawer with error highlighting); and checkpoint compare — diff any two refs, name/label checkpoints, and undo/restore.
Control & Insight III (Milestone 11, 2026-08-21): each project page now has a Sessions panel — named conversations you can create / rename / archive / resume / switch, reconciled with the live OpenCode server (so they survive a restart), with new tasks targeting the active session and a per-session Compact button that tries native compaction, falls back honestly to the server's summarize endpoint (needs a project model) or a fresh session, and never fakes it. An Agent presets panel defines named AgentConfig roles (model / instructions / mode) that are injected into the project's opencode.json agent map on the next
59EC
workspace start; the task form picks the agent to run each task (preset or built-in) and the task list shows which one ran. A Skills panel lists built-in + in-project skills, lets you author custom skills (content treated as untrusted) and enable/disable them — custom skills are physically moved out of discovery, built-in disable is a recorded-but-honest preference.
Control & Insight IV (Milestone 12, 2026-08-21): each project page now has a history search
box (tasks, audit, checkpoints and events through a SQLite FTS5 index, with <mark>-highlighted
snippets that open the result in place), a command palette (Ctrl/Cmd+K) with keyboard
shortcuts (Ctrl+S checkpoint, Ctrl+Shift+F search), a light/dark/system theme plus
per-project layout and task-default persistence that survive reloads (hydration-safe
localStorage), one-click feed-errors-back from failed tasks or the preview (staged,
editable), a dismissible first-run onboarding card with an in-app docs page, and
accessibility polish (aria-live task status, approval focus, keyboard nav, long-output
truncation). Full scope: docs/control-and-insight.md.
Live end-to-end checks: node scripts/m3-live-smoke.mjs (agent pipeline), node scripts/m4-live-smoke.mjs (preview + diffs), and node scripts/m5-live-smoke.mjs (policy + approval workflow + checkpoints + undo + audit; see the header comments for runbooks).
Up next: the UX polish program is complete — all Milestones 13-18 from the fresh-user UX review (docs/ux-review.md) shipped 2026-08-21/22: M13 first-run clarity, M14 preview safety & busy feedback, M15 command palette discoverability, M16 fresh data & cancel reasons, M17 page structure & task form hierarchy, and M18 search readability (friendly hit titles, prettified bodies, type-grouped results with counts, exact-word empty-state copy). The only remaining roadmap work — Milestone 7 (Docker isolation, gated on Docker Desktop running) and Milestone 8 (scale, only after local mode is reliable and explicitly requested) — starts only on an explicit go.