studio-worker 0.4.11

Pull-based image-generation worker for the minis.gg studio.
Documentation
# studio-worker wiki

Project-level documentation. Architecture deep-dives, concept
pages, operator playbooks, contributor reference.

For day-to-day install / register / first-run instructions, see the
top-level [`README.md`](../README.md).  For active plans, see
[`plans/`](../plans).

## Architecture

- [Overview]architecture/overview.md — what the worker is, how it
  boots, the lifecycle of one job, every Rust module's role, the
  HTTP + WebSocket surfaces it speaks to the studio.
- [Flows]architecture/flows.md — every flow end-to-end
  (registration, WS session, offer/dispatch, model provisioning,
  result delivery, failure/retry, pause, logs, update, UI), each
  cross-referenced to the studio-side implementation.

## Runtime

- [Daemon and tray UI]runtime/daemon-and-tray.md — the headless daemon hosts every
  model and job; the always-on tray UI is its client over the local API: per-job logs,
  thumbnails, model lifecycle, display wait.
- [Model lifecycle]runtime/model-lifecycle.md — loaded models, residency, admission.
- [Local API]local-api.md — loopback HTTP API: generation, catalogue, lifecycle,
  daemon control.

- [ModelSource]runtime/model-source.md — studio-driven download
  spec attached to every Offer.  The contract that lets the worker
  serve any model the studio adds without a rebuild.
- [Pause / Resume]runtime/pause-resume.md — runtime-only operator
  toggle that replaces the legacy persisted `auto_enabled` field.
- [No-fallback policy]operations/no-fallback.md — every offer
  carries `task` + `modelSource`; the synthetic engine only serves
  models whose source engine is `synthetic`.

## Engines

- [sd-cpp engine]engines/sdcpp.md — real image inference via
  `stable-diffusion.cpp` as a subprocess.  Auto-provisions `sd-cli`
  and downloads model weights on demand, cached in `cfg.models_root`.

## Operations

- [Installing sd-cli]operations/sd-cli-install.md — the worker
  auto-provisions `sd-cli`; this is the override / manual-install
  playbook (CUDA build, air-gapped mirror, unsupported targets).
- [Dev loop (PM2 + cargo-watch)]operations/dev-loop.md — the two
  flavours of dev process and when to use each.
- [Job-state recovery]operations/recovery.md — D1 reset SQL for
  zombie / synthetic-bad / failed rows.

## Screenshots

[Jobs](screenshots/jobs.png) ·
[Jobs (a failed job)](screenshots/jobs-failed.png) ·
[Models](screenshots/models.png) ·
[Worker](screenshots/worker.png) ·
[Worker (waiting for approval)](screenshots/worker-register.png) ·
[Logs](screenshots/logs.png) ·
[Config](screenshots/config.png) ·
[Daemon not reachable](screenshots/daemon-unreachable.png)