# Changelog

## 0.1.2 — 2026-10-06

Docs-only release (code unchanged: `sha1 a0beb8c3…`).

- **SETUP.md: "Worked example: Strata + `swift-1.5`"** — the reference stack this extension was
  built and tested on, which 0.1.0/0.1.1 described only generically:
  - the hybrid roster topology (llama.cpp models on `${PORT}` + Strata on the literal `:1301`)
  - **swift-1.5 is not a llama-server process**: the roster `cmd` starts the Strata python HTTP
    parent (`server.py --engine strata --config … --port 1301`), which spawns `strata --serve` over
    pipes — call the binary directly and llama-swap and the parent disagree about ownership
  - the roster entry verbatim (`proxy:` literal port → read as-is, `ttl: 0`, `unloadTimeout: 90`)
  - the Strata config that makes the cold start expensive (MoE pack, expert profile + expert cache,
    MTP draft, `--max-context 131072`, `--kv int8`, `--kv-resident 32768`)
  - the `models.json` entry (`contextWindow` matching `--max-context`, `thinkingLevelMap`)
  - `strataPort` corroboration line (`/slots` → `is_processing: false` before you swap)
  - why the gate fires here: `sessionDefault = swift-1.5` ⇒ every swap has `E = {swift-1.5}`; a live
    session bound to it refuses the swap; restore is the expensive direction
- **`examples/pi-model-swap.strata.json`** shipped in the tarball (paths as `/path/to/…` placeholders).
- README: reference-stack pointer; "Known limitations" heading no longer pinned to v0.1.0.

## 0.1.1 — 2026-10-06

Docs-only release (no code change).

- **`SETUP.md` shipped in the tarball**: the end-to-end chain the extension sits on top of —
  llama.cpp `llama-server` flags that matter for swapping, llama-swap config (`startPort`,
  `healthCheckTimeout`, `globalTTL`, loopback bind, no `apiKeys`, SSH tunnel for a remote box),
  the roster's `proxy:` lines and the `${PORT}` = `startPort + roster index` ordering rule, the pi
  `models.json` provider entry (`baseUrl`, `api`, `compat.chatTemplateKwargs.reasoning_effort`,
  per-model `thinkingLevelMap`), a full annotated `pi-model-swap.json`, a verify sequence, a
  refusal-message table, and the multi-session claim rule.
- README: **Linux-only** requirement stated (`ss` from iproute2 + `/proc`), pointer to SETUP.md,
  "every key is required" made explicit.
- Id-matching rule documented: roster id == llama-swap model id == `models.json` model id == the id
  passed to `/swap`.

## 0.1.0 — 2026-10-06

First packaged form of the extension (previously a single file in `~/.pi/agent/extensions/`).

- Packaged for `pi install npm:pi-model-swap`: `pi.extensions` manifest, `pi-package` keyword,
  `peerDependencies` on `@earendil-works/pi-coding-agent`, `@earendil-works/pi-ai`, `typebox`.
- Surface: `/swap` command + `model_swap` tool (identical output on both paths).
- Fail-closed config: missing/unparseable `pi-model-swap.json` gates every mutator (MAJOR-5/T006).
- Census must be READ: `GET /running` bodies in the llama-swap v262 `{"running":[{model:…}]}`
  envelope are parsed, not rejected (defect 1, verified live 2026-10-06 — legs 1-4, 6/6).
- Eviction set computed from the roster's `proxy:` ports; Strata `/slots` used as corroboration.
- Claim-file phases enumerated (`idle armed verifying committed rolling_back restoring`),
  `active` normalised on read; self-claims exempted from the step-0 phase check.
- Offline suite: 30/30 harness legs, forbidden-key gate, `tsc` clean.
- Known limitations documented in README (config keys required, no per-model thinking cap, claim
  staleness bound, gate↔writeClaim TOCTOU).
- **Neutral defaults (T008):** `DEFAULT_CONFIG` no longer contains one developer's machine
  (`/media/adam/...` roster, `swift-1.5`, `:1301`). Machine-specific keys are required; timing
  knobs keep real defaults. A config that sets a key is unaffected (merge is
  `{...DEFAULT_CONFIG, ...configFile}`).
- **Cold-start warning derived from the eviction set:** names the models the swap can actually
  evict, prints nothing when the eviction set is empty (kills the same-model no-op warning), and
  the wording is generic ("full cold start", not one server's name). Slot-corroboration line
  labelled `(model server)`.
- Harness T14 assertion updated to the new fail-closed wording ("no fallback defaults are
  configured"). Suite re-run on the packaged build: 30/30, gate PASS, `tsc` clean, live `pi -e`
  legs re-verified.
