AI Engineering Workspace
PartialChat, files, terminal and preview in one place. Chat sessions run on a durable Postgres-backed queue (chat only: no tools or shell). Live models need an API key; the terminal is unavailable.
Project files
read-only- ..
- assets
- basic-languages
- editor
- language
- nls
- abap-D-t0cyap.js
- apex-CcIm7xu6.js
- azcli-BA0tQDCg.js
- bat-C397hTD6.js
- bicep-DF5aW17k.js
- cameligo-plsz8qhj.js
- clojure-Y2auQMzK.js
- coffee-Bu45yuWE.js
- cpp-CkKPQIni.js
- csharp-CX28MZyh.js
- csp-D8uWnyxW.js
- css-CaeNmE3S.js
- css.worker-C7XcYe5x.js
- cssMode-DpEkhVlW.js
- cypher-DVThT8BS.js
- dart-CmGfCvrO.js
- dockerfile-CZqqYdch.js
- ecl-30fUercY.js
- editor-CG9c2pE-.js
- editor.js
- elixir-O3PRlgxO.js
- flow9-DqtmStfK.js
- freemarker2-DTUDMAl2.js
- fsharp-BOMdg4U1.js
- go-D_hbi-Jt.js
- graphql-CKUU4kLG.js
- handlebars-qLqoXa-4.js
- hcl-DTaboeZW.js
- html-DTxBj26n.js
- html.worker-VIR_LTyv.js
- htmlMode-DFBg6CMj.js
- index-BVflv2uG.js
- index.js
- ini--YXggpAu.js
- java-CI4ZMsH9.js
- javascript-BiL3JN6i.js
- json.worker-DzWXGkG8.js
- jsonMode-Dz4r0pwo.js
- julia-BwzEvaQw.js
- kotlin-IUYPiTV8.js
- less-C0eDYdqa.js
- lexon-iON-Kj97.js
- liquid-lXEUQRVn.js
- loader.js
- lspLanguageFeatures-IeRAvoKK.js
- lua-DtygF91M.js
- m3-CsR4AuFi.js
- markdown-C_rD0bIw.js
- mdx-Dtr248s4.js
- mips-CiYP61RB.js
- monaco.contribution-BRs4bdz5.js
- monaco.contribution-ChoOM5Gg.js
- monaco.contribution-DbKqsbmO.js
- monaco.contribution-DKFaWvum.js
- msdax-C38-sJlp.js
- mysql-CdtbpvbG.js
- nls.messages-loader.js
- objective-c-CntZFaHX.js
- pascal-r6kuqfl_.js
- pascaligo-BiXoTmXh.js
- perl-DABw_TcH.js
- pgsql-me_jFXeX.js
- php-D_kh-9LK.js
- pla-VfZjczW0.js
- postiats-BBSzz8Pk.js
- powerquery-Dt-g_2cc.js
- powershell-B-7ap1zc.js
- protobuf-BmtuEB1A.js
- pug-BRpRNeEb.js
- python-Cma5OvNe.js
- qsharp-BzsFaUU9.js
- r-f8dDdrp4.js
- razor-C8pOqqry.js
- redis-fvZQY4PI.js
- redshift-45Et0LQi.js
- restructuredtext-C7UUFKFD.js
- ruby-CZO8zYTz.js
- rust-Bfetafyc.js
- sb-3GYllVck.js
- scala-foMgrKo1.js
- scheme-CHdMtr7p.js
- scss-C1cmLt9V.js
- shell-ClXCKCEW.js
- solidity-MZ6ExpPy.js
- sophia-DWkuSsPQ.js
- sparql-AUGFYSyk.js
- sql-32GpJSV2.js
- st-CuDFIVZ_.js
- swift-t-PfMj7W.js
- systemverilog-Ch4vA8Yt.js
- tcl-D74tq1nH.js
- toggleHighContrast-CmI6H2gJ.js
- ts.worker-Dp2_QI6H.js
- tsMode-DgC3tGu_.js
- twig-C6taOxMV.js
- typescript-PjDChiYw.js
- typespec-D-PIh9Xw.js
- vb-Dyb2648j.js
- wgsl-BhLXMOR0.js
- workers-B_Zs9c54.js
- xml-BgCkTIhY.js
- yaml-D0tu26m-.js
CLAUDE.md
1# CLAUDE.md23This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.45## Environment quirks6- No passwordless sudo: everything runs in user space. Node 22 lives in `~/.local/node/bin` (not on PATH by default): `export PATH=$HOME/.local/node/bin:$PATH`. `scripts/env.sh` does this for scripts.7- Do not use `pkill -f` with patterns that appear in your own command line (it kills the tool shell). Use `scripts/stop-app.sh`.8- Keep `typescript@5.9` — Next 15 does not support TypeScript 7.9- SQLite rows are null-prototype objects: map to plain objects before passing to Client Components.10- Chromium for Playwright needs libs unpacked in `~/.local/chromelibs`: `export LD_LIBRARY_PATH=$HOME/.local/chromelibs/usr/lib/x86_64-linux-gnu`.1112## Commands (run from `app/` unless noted)13- Build: `npx next build` · Typecheck: `npx tsc --noEmit`14- Deploy (build, restart, health-check, record deployment): `scripts/deploy.sh [version]` from repo root. Edge serves HTTP `:8080` (read-only) and HTTPS `:8443`; Next app is loopback `:3000`. Build takes ~2 min: run in background and do not edit `app/src` meanwhile.15- Supervisor: `scripts/ensure-running.sh` (cron `@reboot` + every minute). Logs in `.runtime/`.16- Also `node qa/opencode-engine.mjs` and `node qa/ai-adapters.mjs` (test doubles). Sign-ins are rate-limited (8/min): QA uses `qaLogin`/`uiLogin` retry helpers.17- Full browser QA (5 viewports, functional, security): `node qa/run.mjs [baseUrl]` — writes `design/verification/results.json` and publishes screenshots.1819## Architecture20- `app/` Next.js App Router. Server components read directly from `src/lib/*`; mutations go through `src/app/api/*` route handlers guarded by `requireWrite()` (same-origin check + session).21- Data is PostgreSQL 16 in user space (`scripts/pg-*.sh`). Route groups: `(marketing)` public Zoo Cloud site, `(app)` authenticated shell (`/console` home). Endpoints/cookies come from `src/lib/config.ts` (never hard-code a domain).22- AI: `app/scripts/worker.mjs` claims `ai_runs` (SKIP LOCKED, lease/heartbeat, retries, handoff); adapters in `ai-adapters.mjs`; OpenCode engine in `opencode-engine.mjs` (CLI child process, deny-by-default policy, per-project lock + git worktree). Never use `pkill -f`/`pgrep -f` with your own command text; keep supervisor lock fd out of children (see ensure-running.sh).23- Auth is an interim local token (`~/.config/zoo-cloud-studio/admin-token`) with server-side sessions in PostgreSQL, HTTPS-only, pending Zoo IAM OIDC. Public visitors see a read-only demo view; project data, audit log and all writes require sign-in.24- `src/lib/modules.ts` is the single source of module/feature maturity; `/progress` and the sidebar derive from it. Update it whenever a feature's real state changes — never mark simulated things as functional.25- `src/lib/design.ts`: public `/design-assets/*` serves only files listed in `design/manifests/manifest.json` whose sha256 still matches. Screenshots are staged then published with a manifest rebuild (`POST /api/design/rebuild`). `src/lib/ssrf.ts` guards URL ingestion.26- `src/lib/audit.ts`: append-only SHA-256 hash-chained audit log. `src/lib/files.ts`: read-only, deny-listed file explorer.27- Data: PostgreSQL (SQLite file `app/data/studio.db` retained only as migration backup). Workspaces: `app/data/workspaces/<projectId>`. Design assets: `design/`.2829## Project state docs30`docs/SPEC.md` (R0 architecture, authoritative), `docs/TRACKER.md`, plus root `PROJECT-STATE.md`, `BLOCKERS.md`, `NEXT-ACTIONS.md`, `EXECUTION-QUEUE.md`, `DEPLOYMENT-STATUS.md`, `TEST-RESULTS.md`, `DESIGN-STATUS.md`, `MASTER-TRACKER.md`. `BLOCKERS.md` and `NEXT-ACTIONS.md` bullets feed `/progress`.3132## Constraints33Dedicated OIDC client `zoo-cloud-studio` only; never touch other Zoo systems; no secrets in repo/UI; agents never get host root or docker.sock; no simulated integration shown as live.34
Conversation
PartialSign in to start AI sessions.
Task checklist
- Application shell deployed
- Persistent projects
- Agent runtime
- Sandboxed terminal
Execution activity
No agent sessions. Git HEAD 1c27633 on master.
Approval requests
None pending.