Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/contracts.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ without a demonstrated consumer. See PLAN.md §5.1 for comparison rules and §8
| Tunnel probe: `GET <url>/openapi.json`, `info.title` = `Atomic Chat API Server Endpoints` | `src/remote-access/probe.ts`, served by `src/server/public/static.ts` | `remote_access/probe.rs` | `probe.test.ts` asserts the marker against the document the public server really serves |
| LAN addresses `GET /atomic/v1/lan-addresses` → `{addresses}` (IPv4, default route first, virtual adapters hidden, CGNAT kept) | `src/remote-access/{lan,lan-probe}.ts`, `src/server/control/routes/remote-access.ts` | image-generation line `remote_access/lan.rs` (`get_lan_addresses`) | ported `lan.rs` tables |
| Image generation wire types (camelCase; absent vs `null` as the plugin's serde produced), the 23 `DiffusionErrorCode`s incl. `ENGINE_UPDATE_REQUIRED` (409) and `INVALID_OUTPUT` (500) (statuses informational: 400/404/409/429/507/500), `files.llmVision`, events `diffusion:{state,progress,job,error}` | `src/contracts/{diffusion,errors,events}.ts`, `src/diffusion/{parse,errors}.ts`, `src/server/http.ts` | image-generation line `web-app/src/services/diffusion/types.ts`, plugin `tauri-plugin-atomic-diffusion/src/{state,error,events}.rs` at `ec1fd3ea7` | `contracts/errors.test.ts` (code list), `diffusion/parse.test.ts`, `server/http.test.ts` |
| `sd-server` argv (`--llm_vision` after `--llm`) and environment (`GGML_METAL_TENSOR_DISABLE=1` on an M5 with Metal) and `POST /sdcpp/v1/img_gen` body; output parsing (records, step lines, tile passes, diagnostic tail, exit classification, GPU-fault markers); progress tracking; request validation (Qwen-Image on Metal ≤ 1 MP); per-family workflows and `workflowsForSpec`; engine gating (Qwen Image 2.1 and Krea 2 Turbo need build ≥ 883, FLUX.3 Klein ≥ 968, `ENGINE_UPDATE_REQUIRED`) and install selection | `src/diffusion/{args,progress,tracker,validate,workflow,compat}.ts` | plugin `{args,progress,jobs,session}.rs` | the Rust `#[test]` tables ported by hand into the sibling tests; `test/fixtures/sdcpp/required-flags.txt` |
| `sd-server` argv (`--llm_vision` after `--llm`) and environment (`GGML_METAL_TENSOR_DISABLE=1` on an M5 with Metal) and `POST /sdcpp/v1/img_gen` body; output parsing (records, step lines, tile passes, diagnostic tail, exit classification, GPU-fault markers); progress tracking; request validation (Qwen-Image on Metal ≤ 1 MP); per-family workflows and `workflowsForSpec`; engine gating (Qwen Image 2.1 and Krea 2 Turbo need build ≥ 883, FLUX.3 Klein ≥ 968, MiniMax-H3-Image and P-H3-Image ≥ 1088, `ENGINE_UPDATE_REQUIRED`) and install selection | `src/diffusion/{args,progress,tracker,validate,workflow,compat}.ts` | plugin `{args,progress,jobs,session}.rs` | the Rust `#[test]` tables ported by hand into the sibling tests; `test/fixtures/sdcpp/required-flags.txt` |
| Gallery files: `<outputDir>/<jobId>-<index:02>.png` with `tEXt` chunks `atomic` (the `ImageRecipe` JSON, every key, `null`s) and `parameters` (A1111 line) right after `IHDR`; `<id>.thumb.png` (≤256 px); `.flags.json` `{id:{pinned,archived}}`. A PNG without a valid `atomic` recipe is foreign: never listed, never deleted. A batch with an all-black or all-white frame is refused before anything is saved (`INVALID_OUTPUT`); such an item an older build saved is hidden when its thumbnail (or PNG) is ≤ 128 KiB | `src/diffusion/{gallery,recipe,png}.ts` | plugin `gallery.rs` at `767ff6350` | ported `gallery.rs` tables; `test/fixtures/png/` (independent encoder, Pillow-checked); read-only run against images written by app v2.0.40 |
| Engine installs `<data>/diffusion/backends/<tag>/<backendId>/` with `.atomic-owned` and `install.json` `{tag,backendId,backend,engine,sha256,installedAtMs}` (written by the core's engine-builds install; the app's `finalize` wrote the same before it); the `--help` probe markers `stable-diffusion.cpp` / `--cfg-scale`; model files under `<data>/diffusion/models/` | `src/diffusion/{install,containment}.ts` | plugin `install.rs` | ported `install.rs` tables; read-only run against the engine installed by app v2.0.40 |
| Engine builds (`engine` ∈ `ENGINE_BUILD_IDS`: `sd-cpp`, `audio-cpp`, `mlx`, `foundry-local`, `litert-lm`, `geniex`; change `move-sdcpp-mlx-install-to-core`, ADR 2026-10-07; audio.cpp: ADR 2026-10-29, conf `backends/audiocpp-manifest.json`, `ATOMIC_AUDIOCPP_MANIFEST_URL`, tags `vX.Y.Z[-a<rev7>]`): `POST /atomic/v1/engine-builds/:engine/catalog {force?, proxy?}` → `{engine, manifest: {tag, published_at?, source: remote\|cache, fetched_at, error}\|null, manifest_error, host_backend_id, host_reason, host_download_bytes, installed[], active}` (`host_download_bytes`: every archive an install of the host build downloads, active build or not; `null` without one or with a size missing from the manifest), `POST …/updates {force?, proxy?}` → `{update_needed, current, target: {tag, backend_id, published_at?, download_bytes}\|null}`, `POST …/install {task_id, force?, proxy?}` (answers when done; `download:progress`/`download:stage` under `task_id`, cancel `POST /downloads/:task_id/cancel`) → `{installed, reason?: already-installed\|active-is-newer, build, retired[], kept_in_use[], failed_backend_ids?}`, `DELETE …/:tag/:backend_id` → `{removed}`; `engine` ∈ `sd-cpp`\|`mlx` (else `INVALID_ARGUMENT`), unknown body fields refused; errors `ENGINE_INSTALL_IN_PROGRESS`, `ENGINE_INSTALL_FAILED`, `BACKEND_INSUFFICIENT_DISK_SPACE` (< 3× the archives free), `CANCELLED`, `BACKEND_IN_USE`, `INVALID_REQUEST` (bundled or unmarked build), `UNSUPPORTED_BACKEND` (no build fits the host), `UPSTREAM_ERROR` (no manifest); event `engine-build:changed {engine, reason: install\|uninstall\|startup-cleanup}`. Manifests: conf `backends/sdcpp-manifest.json` and `backends/mlx-manifest.json`, overridable by `ATOMIC_SDCPP_MANIFEST_URL` / `ATOMIC_MLX_MANIFEST_URL` (`https://`, `file://`), cached at `<data>/diffusion/sdcpp-manifest.cache.json` and `<data>/mlx/mlx-manifest.cache.json`; probe failures remembered in `<data>/diffusion/failed-backends.json`. MLX builds under `<data>/mlx/backends/<tag>/macos-arm64/` with `install.json {tag, backendId, sha256, installedAtMs, publishedAt}`; the installer's `<resources-dir>/mlx-server` described by `mlx-server.json {tag, published_at}`; the newer by `published_at` runs, the installer on a tie | `src/engine-builds/`, `src/server/control/routes/engine-builds.ts`, `src/client/control-client.ts`, `src/contracts/engine-builds.ts` | app `web-app/src/services/diffusion/{install,backendMatrix}.ts` (branch `change/add-vllm-runtime`), conf `backends/{sdcpp,mlx}-schema.json` | `src/engine-builds/*.test.ts`, `routes/engine-builds.test.ts`, `control-client.test.ts`, `test/e2e/engine-builds.test.ts` |
Expand Down
Loading
Loading