clone

an offline map explorer where each world, from a game map to a city's open data, ships as one .atlas file

feat/atlas-next-horizon
atlas / docs / workbench.md
workbench.md 3.8K rendered
1# The workbench23The workbench is the visual surface beside the Atlas reader. It measures the4installed library and authors exactly one `.atlas-project` selected when the5server starts.67```sh8atlas workbench [-addr 127.0.0.1:6180] [-bundles DIR] [-cache DIR] \9 examples/sample-region.atlas-project10```1112The URL is printed on stdout. `-bundles` defaults to the Atlas library and13`-cache` defaults to the shared authoring cache.1415## Surface1617| Route | Purpose |18|---|---|19| `GET /` | Installed volumes and serving maturity. |20| `GET /volume/{slug}` | One volume's builds, score, semantic contents and provenance. |21| `GET /volume/{slug}/diff` | Build comparison. |22| `GET /project` | The fixed manifest, resolved plan, build controls, run history and artifact handoff. |23| `POST /project/save` | Strictly validate a candidate, then atomically replace the fixed manifest. |24| `POST /project/build` | Start the one native build operation. |25| `GET /project/run` | Replay the latest build rows for live polling or a page reload. |26| `POST /project/open` | Hand the completed file to the operating system to open in Atlas. |27| `GET /project/artifact` | Drag-out/download body for the completed file. |2829The old `/sources`, `/operations`, and `/operations/run` routes are gone. Source30selection, protocol settings, semantic mapping and presentation all live in the31manifest; five partially overlapping commands no longer define creation.3233## Authority and safety3435The command host supplies the absolute manifest, cache, binary and library36paths. No browser field can change them. All state-changing requests are37same-origin checked. Manifest candidates are size-limited, staged beside the38real file, decoded with unknown-field rejection, fully validated, synced and39renamed only after success.4041One build runs at a time. Its argv is always:4243```text44atlas build --log-json -cache CACHE -bundles LIBRARY [-offline] MANIFEST45```4647Arguments are passed directly to the operating system without a shell. The48subprocess belongs to an in-memory supervisor, not the initiating HTTP request.49Closing or reloading the page therefore does not cancel it; the next page load50replays every retained row. A failed or successful result remains visible until51the next build.5253The native-open action accepts only a `.atlas` path reported by the build and54contained by the configured library. The drag card publishes the same artifact55through browser drag data (`DownloadURL`, URI and path); clicking the card never56navigates the workbench webview to the file. **Open in Atlas** is an explicit57native handoff.5859## Page model6061The Project page is a compact projection of the compiler:6263```text64feature adapters ─┐65 ├─ exact requests ─ evidence cache ─ observations ─┐66raster adapters ──┘ │67 ├─ native volume68typed mappings ───────── semantic feature sets + relationships ──────┤69presentation ─────────── styles + ordered layers + labels ────────────┘70```7172It shows request cache state, estimated bytes, the project digest, source73adapters, obligations, semantic-set/layer counts, and output library before any74build begins. The manifest editor is deliberately the durable configuration75rather than a second form model that could drift from it.7677## Boundaries7879`internal/workbench` imports the native authoring planner for read-only plan80projection and shells out to the same `atlas` executable for builds. The81library/diff pages continue to read installed native volumes. The host injects82the hypermedia runtime and native-open function. OS process execution stays in83the operation runner; native application choice stays in the command host.