Files
grabowski 1a1b62d475
Deploy web Studio / deploy (push) Successful in 3m3s
studio: agent window, a chat with a model that edits the scene
✦ Agent in the Studio's top bar opens a floating chat window. The model
(any OpenAI-compatible endpoint with tool calling; default B4L's inference
server, https://inference.p0.contact/v1) gets the 15 MCP tools plus two page
tools (select_object, set_view) and the Studio's state (selection, level,
rotation) in its system prompt. Answers and reasoning stream in; tool calls
show as rows with arguments and results; object ids link to the object;
Stop ends a turn; Undo takes the agent's edits back. The window moves by
its title bar and resizes at its top-left corner.

- studio/agent.js: shared by both front ends (waits for studio.js's
  isokit:studio event); MCP over /mcp or isokit.mcp in the web Studio
- isokit studio: /api/agent/{config,models,chat} relay the calls on their
  own threads (ureq, chunked and flushed per read), so the key stays on the
  machine and the endpoint needs no CORS; settings from ISOKIT_LLM_URL /
  _KEY / _MODEL or agent.json in the user's config folder
- web Studio: calls the endpoint from the page with a key kept in the
  browser; build_web.py --agent-url names a same-site relay as default; the
  deploy builds with /llm/v1, which deploy/Caddyfile forwards to the
  inference server (its nginx refuses the CORS preflight)
- tools/mock_llm.py + tools/agent_checks.py: the agent window checks in both
  check_studio.py and check_web.py
2026-10-23 19:35:53 +07:00

5.2 KiB

Roadmap

Each phase ends with tests, a Studio/viewer check in Edge, commit and push.

Phase 1: engine, Studio, MCP (done)

  • Core: projection with 4 rotations, primitives (box, prism, cylinder, frustum, face, poly, flat, openings, lines, disc, circle, stem, figures, puffs, fan, raw, groups, sequences), sprites with 90° object frames, depth sort ported from the JS views, SVG writer, tags, tooltips
  • Theme: built-in palette, materials and rules converted from the Mooban/CNX CSS; TOML overrides
  • Rhai runtime: drawing API, module imports from memory, errors with file:line, safety limits
  • Prefab library: site, area, road, parking, wall, fence, lamp, marker, tree, tree row, hedge, building (storeys, windows, door, flat/gable roof, solar, AC, cut-open levels), carport, shed, car (driving), truck, motorbike, person, crowd, tank, container, generator, solar field, chimney
  • Scene document + prefab catalog with property schemas
  • Project folder, ops (add/update/remove/duplicate/reorder/set_cfg/replace), Workspace (save, undo, reload on outside changes), check, static HTML page, SVG export
  • Viewer JS: port of the views' mount() (pan, pinch, wheel, declutter, tooltips, full screen) for prerendered, server and future WASM sources
  • Studio GUI: palette, object list, placing, drag-to-move with snap, keyboard, forms from schemas, levels, undo/redo, live follow of agent edits, MCP connection panel
  • MCP: 15 tools over stdio and HTTP (/mcp), validation messages for agents
  • Demo project, 52 Rust tests, Playwright Studio + MCP test

Web Studio (done)

  • isokit-wasm: the engine in the browser (wasm-bindgen, 2.8 MB / 0.75 MB gzipped); Store trait (folder or memory) under the Workspace; Studio JSON API shared with isokit studio
  • studio.js runs on a pluggable backend; the web shell answers it from WASM
  • Projects in IndexedDB; new, demo copy, delete; export / import .zip (stored or deflated) and folders (drop or pick); two tabs on one project stay in step
  • Folder projects (File System Access, Chrome / Edge): edits written to disk, outside changes followed live and undoable, Build page writes dist/index.html
  • Code editor for scripts, prefabs, theme and manifest, with script errors by file and line
  • MCP tools inside the page (isokit.mcp), WebMCP registration when the browser offers it
  • tools/build_web.py (static output), tools/check_web.py (44 checks, Edge)
  • Deploy a hosted copy; render in a Web Worker for very large scenes

Agent window (done)

  • ✦ Agent in the Studio: chat with a model on an OpenAI-compatible endpoint (default: B4L's inference server) that edits the scene with the MCP tools + page tools (select, view); streamed answers and reasoning, tool calls with results, clickable object ids, Stop, Undo
  • isokit studio relays the calls (/api/agent/*, key stays on the machine, no CORS); settings from ISOKIT_LLM_* or agent.json in the user's config folder
  • Web Studio calls the endpoint from the page; isokit.buildfor.life relays /llm/ to the inference server (Caddy) so the page needs no CORS from it
  • tools/mock_llm.py + tools/agent_checks.py in both Studio checks
  • Keep the conversation per project across reloads; attach a rendered view (PNG, Phase 4) for vision models

Phase 2: richer editing

  • Interior prefabs (desk, table with chairs, shelf, machine, bed, sofa, partition walls) and a building rooms prop, so the GF/1F levels show something
  • Path objects in the Studio: click points for areas, roads (polyline with width), fences, walls, pipe runs; vertex handles
  • Multi-select (box select, Shift-click), group move, align/distribute
  • Copy/paste between projects; prefab thumbnails in the palette (rendered icons)
  • Measure tool and grid overlay; numeric resize handles on the selection
  • Studio editor for theme.toml (colour pickers) and for project parameters

Phase 3: embedding in the other projects

  • Host pages on the WASM build (isokit-wasm exists, see Web Studio): the same scene recomputes in the browser when a host page's calculator changes the parameters (cnx_vinyl fleet calculator)
  • isokit build --fragment: <style> + <script> blocks for the Python build scripts of the host pages (replace inline.py)
  • Host API parity with CNXIso (mount, update(cfg), setLevel, focus, info, onPick)
  • Port the existing scenes: mooban estate, CNX Scuba centre (section cut), CNX Vinyl plant; check each against its old view with the QA checklist from the skill

Phase 4: output and QA

  • Section cut layer (underground scenes) from iso-scuba: cut plane, clip-path per cavity
  • PNG export (static style resolution + resvg) so agents get an image from render_view
  • isokit check rules from the QA checklist: props on paved areas, runs ending in the air, covers drawn over their contents, tag overlaps
  • Performance budget test (render ms per view, 60 fps pan) on a 3,500-node scene
  • Packaged desktop app (Tauri); shared projects for the hosted web Studio (behind login)