the provider round and the provider-flow round, plus the template and box packages

the provider round (2026-11-18, batteries-included): providers are first-class entities, the config is server-written state (state/config.json), and a fresh clone boots playable -- the opencode/free singleton auto-added and discovered on the empty list, playable with zero secrets. Every request resolves a full spec {provider, model, effort}: no unset effort, the per-run params layer retired, the mind verb the only sampling source. The registry is per-provider sections (state/models.json), refine caches adjudications under the double spec tuple (state/refine-cache.json), run picks are invalidatable (a removed provider or drifted model blocks the run with the note naming what died), and the housekeeper inherits the player spec's provider default (#16 closed). The no-legacy pass died the same day it shipped: bootImport deleted (server.json is bind + contwin), the registry's v1/v2 in-memory migrations deleted (models.json rewritten on disk into the per-provider shape), bare-string model picks deleted (Chloe's run.json migrated to spec objects, shape-preserving), the clerk's create model arg deleted, apiKeyEnv and the contextWindow alias gone. The live arc proven from a bare boot: invite minted, o/f auto-added, a custom provider with a bogus key (the recognizable 401), the auth fixed (13 models), the default pair selected, and a real glm-5.3 turn through the full path. Two live findings: opencode.ai serves 89 models keyless but 401s an empty Bearer header (the auth header rides only when a key exists), and the failure log line rides stderr.

the provider-flow round (2026-11-19, GM-designed): discovery IS the probe. The add takes only the endpoint -- {slug, baseUrl} or {builtin: true}, an apiKey in the body 400s (the auth route is the only key path) -- and a working keyless listing never sees a key field. A 401/403 stands the provider broken: the entity carries a probe record (outcome ok/auth/error, detail, at), the card opens the ask, and only the explicit acts move the record -- add, key, remove-key, discover; usage errors are transient and the op's to fix, nothing in the runtime flips provider state. The auth route is probe-then-save: the candidate key checks on reception, saves only on success -- a still-refused key never reaches the config, the previous state returns, the ask repeats. Every other discovery failure refuses the add outright with rollback: an endpoint that cannot answer is not a provider, nothing stands (the old code let it stand on any failure). The remove-key control (custom providers, armed) clears and re-probes: a provider gone public lands working keyless, a locked one re-opens the ask -- which is the key-replacement path. o/f never asks in any state: its auth failures are upstream breakage to show, not a prompt. The universal retry rule: NO automatic retries anywhere -- every inference call is user-initiated (the send, the housekeeping run, the refine) and every act has its manual retry; the curator's one auto-retry (the 2026-11-17 hiccup lesson) is deleted, the machine-label fallback the designed outcome. And failures never cache (GM: a failure is the absence of a measurement, not a measurement) -- the adjudication cache skips inference:false entries, the receipt line says "never cached, retried at every refine", and a transient battery error can never pin a false verdict; gev's 400s cost one cheap probe per refine and self-heal the day the backend learns tools. En-route fix the smoke earned: the create route validated body.spec AFTER the clerk built the run dir -- a refused spec left an orphan run (restart-check's exact count caught the sixth run); the spec validates first now, nothing lands on refusal.

the sheet's transport at the lint: the record is the only channel, the tag is view machinery composed by renderView, never authored by anyone -- the authored gate names the tag in any content (hers would never apply and primes the guarded emission; GM prose rides the view and story raw, the GM-side strips do not know it), names a sheet record on her turn, and checks object-ness on GM-turn records and boundary state notes both kinds; her emitted sheet in a carried tail stays legitimate history (the log keeps guard-conflicted emissions verbatim, and a stop can move one into the slidwin). The carryover editor teaches its own format now: a per-file hint between the editor and the save bar (one JSON object per line; status and agenda ride her turns; the sheet rides yours as the "sheet" field, never as a tag; the sigils and $VARS expand at start on the authored opening only).

the packages: template (the base for new packages -- the mood-indexed voice examples, the settings comment convention, non-playable as-is) and box (the sheet's first consumer: an incremental-game economy as ERP, GP and BP as two currencies with the room pushing her to fund her own punishments; the opening turn third-person per the typography ruling, ending on the display that needs a second read; the amnesiac rings empty by design; the erased name reading "(redacted)" after sigil expansion). The review found and fixed: both carryovers were pretty-printed JSON with duplicate keys -- unstartable under every per-line reader, flattened to true JSONL; the box's opening sheet rode her authored prose -- dead on every surface (the scan reads GM-turn records only, the strips eat it) and priming the exact emission the guard conflicts -- moved to the GM turn's sheet record, the override's shape; the gm.md "take of leave" typo fixed in all three packages.

the lint's rule 4 scoped to the substrate (GM, 2026-11-19): a banned word in a package's prose is fine -- the packages are the fiction and their words are the story's; README and the root prompts stay patrolled, and the box's "Or windows" is an architectural plural in a padded cell.

verified: typecheck green both programs; smoke ALL PASS (+27 the provider-flow battery: apiKey-on-add 400, the dead-endpoint refusal with config rollback, the auth-standing card with its probe record, probe-then-save both ways, the remove-key round trip, the o/f guards, the failures-never-cache proof over mock-fail -- verdict with the marker, absent from the cache file, re-probed fresh while the passing three serve from cache, not selectable, no orphan run; +8 the sheet-transport lint battery); restart + reminder checks green; a browser pass driving the whole add-flow machine on a mock+debug server (the hidden key field opening on the 401, the key landing through the auth route, the remove-key round trip re-opening the ask, the dead add refusing with the banner and no card, zero console errors beyond the expected 401/500 resource lines); check-repo clean with the box's windows. detention stays untracked WIP, untouched.
This commit is contained in:
2026-11-19 08:35:23 +00:00
parent 14b9b01d86
commit e60fd63d2b
42 changed files with 3071 additions and 1086 deletions
+105 -5
View File
@@ -27,6 +27,16 @@ memory the agent owes itself across sessions.
the system, flag ripples, name what works and why -- the verdict on
creative content is theirs. GM-private files (gm.md) are never edited
and only flagged.
- **No legacy (GM, 2026-11-18):** when a shape changes, change it,
then fix what's broken in a one-time manual migration -- no
permanent tolerance paths in the code, logs included (GM, same
day: mechanical drift in logs that doesn't change meaning is fine
-- the log serves a purpose, and the purpose isn't broken because
the server got an update; it is not court evidence). The one
boundary is meaning, not bytes: a migration that would change
what a story says is a GM decision; shape-preserving rewrites
(envelope fields, event spellings, machinery records -- never
message content) are mechanical and mine to do.
- Standing agreements (folded from the handoff's working-agreements
section when it slimmed, 2026-11-15): character and world work is
done together, unhurried ("we'll get there together"); the GM runs
@@ -154,6 +164,89 @@ memory the agent owes itself across sessions.
## State pointers
- **The provider-flow round is BUILT (2026-11-19): discovery is the
probe, the key path opens only on a 401/403, no automatic
retries anywhere, and failures never cache.** The add takes only
{slug, baseUrl} or {builtin} (apiKey in the body 400s); a
working keyless endpoint never sees a key field; an auth refusal
stands the provider broken with the probe record on the entity
(outcome ok/auth/error, only the explicit acts move it -- usage
errors are transient, the op's to fix, nothing auto-flips); the
auth route is probe-then-save (a refused candidate never reaches
the config, the ask repeats); every other discovery failure
refuses the add with rollback. The remove-key control clears and
re-probes (the replacement path: remove, then the re-opened
ask). o/f never asks, any state. The curator's auto-retry is
deleted (the universal rule: every inference call is manual with
a manual retry; the fallback is the designed outcome). The
adjudication cache skips inference:false entries -- every refine
re-probes its failures, so a transient battery error never pins
a verdict (gev is a 400, not a 200-failure; it re-probes cheap
forever, which self-heals if the backend ever learns tools).
En-route fix the smoke earned: the create route validated
body.spec AFTER the clerk built the run dir -- refused specs
left orphan runs (restart-check's exact count caught it);
validate first, nothing lands on refusal. Verified: typecheck
both programs, smoke ALL PASS (+27), restart + reminder green,
browser pass on the whole UI machine (mock+debug coexist for
drivable UI tests), check-repo clean. Lesson renewed hard: the
edit tool's comment-block transcriptions failed three times this
round -- byte-dump with node + JSON.stringify BEFORE the first
attempt on any multi-line prose edit, never after it fails.
- **The provider round is BUILT (2026-11-18, the
batteries-included arc): providers are entities, config is
server-written state (state/config.json), a fresh clone boots
playable (the o/f singleton auto-added and discovered on the
empty list). Every request resolves a full spec {provider,
model, effort} -- no unset effort, the per-run params layer
retired (the mind verb is the only sampling source). Registry:
per-provider sections in state/models.json; refine caches its
adjudications in state/refine-cache.json keyed by the double
spec tuple. Run picks are invalidatable (the run blocks with a
note until re-picked); the housekeeper inherits the player
provider's default (#16 closed). The dev machine migrated:
provider 'llm-exan-tech' (from server.json's import), 13
measured models preserved, default glm-5.3 at max. Clients
percent-encode provider slugs in paths -- the slug may carry a
slash (opencode/free) and the router splits before decoding.
Uncommitted, on top of the superseded vector round.
- **The provider-vector round is BUILT (2026-11-18, GM ruling "we
can do it right away"): server.json's endpoint became `endpoints`,
a list of (baseUrl, auth) pairs, auth optional.** The scaffold's
prerequisite -- the free keyless default and the op's real key
coexist as entries, they do not replace each other. As built:
one provider client per pair (main.mjs builds the map, config
order = priority order); discovery scrapes EVERY configured
endpoint and tags each model with its base (first-listed wins an
id collision -- the registry is keyed by id, the tag routes);
every call site routes through providerFor (provider.mjs: map
walk + a loud 409 when the registry knows a model whose endpoint
left the config); the registry file's `endpoint` became
`endpoints: string[]` with a one-time normalize-on-open (the
singular-era file migrates in memory, models inherit the one
base -- the measured registry survives unregenerated). The mock
runs the same steps over TWO synthetic endpoints (mock-a/mock-b)
so the merge and tagging are smoke-proven. Config files: the
example carries the vector with the opencode free endpoint first
(keyless) -- the pending GM call is whether the free default
ships in the scaffold or stays example-only; the dev server.json
hand-migrated to the vector. Verified: typecheck green both
programs, smoke ALL PASS (+the vector assertion: two endpoints,
every model tagged, mock-cheap on the second base), restart +
reminder checks green, and the live debug server on the REAL
registry (13 models, singular-era on disk) normalizing and
routing glm-5.3 to its base. Standing lesson renewed: template
literals and backticks inside PowerShell-wrapped node -e strings
get EATEN -- multi-line patch scripts go through a temp .cjs
file written by the write tool, never inline. EXTENDED (the
provider round, same day): a node -e REPLACE whose replacement
string contained ${...} ran inside a DOUBLE-quoted PowerShell
string -- PowerShell expanded the ${} to empty, and six template
holes landed in view-home.mjs (dead provider paths, caught in
the browser pass). Any generated replacement containing ${ or
backticks goes through a temp script, no exceptions.
- **The deployment box exists and is oriented (2026-11-18): a burble
VM, bare but ready.** The connection specifics (address, port,
key) live in `.ssh/box.md` -- gitignored on purpose, this note
@@ -643,7 +736,14 @@ memory the agent owes itself across sessions.
proof mid-action: waiting on a word that lives on a BUTTON label
("rewind") matches instantly while the send is still in flight and
the mid-flight DOM looks like failure -- probe the settled state
via evaluate on a later tick instead. Added
via evaluate on a later tick instead. Added 2026-11-18 (provider
round): the a11y snapshot does not show the admin block's
dynamically-built provider cards at all (the tree ends at the
static buttons) -- probe such surfaces by DOM (evaluate), never
read a clean snapshot as an empty page; evaluate has no timers
(setTimeout is undefined in its sandbox) -- wait on settled text
instead; and the armed buttons' 5s confirm window expires between
evaluate calls -- arm and fire within one script. Added
2026-11-14 (multiuser round): the a11y snapshot races async renders
-- waiting for static skeleton text ("RUNS", the aside headings)
snapshots BEFORE the fetches land and looks like a rendering bug;
@@ -845,10 +945,10 @@ memory the agent owes itself across sessions.
into the server loop.
- Open decisions live in QUESTIONS.md -- read it first; the resolved
record is DECISIONS.md (the old queue, kept by number). QUESTIONS is
open items only now (2026-11-15 split). Remaining: #16 (which model
the housekeeper defaults to), #19c
(seed voice, GM may revisit -- non-blocking), and the turn-surgery
build details.
open items only now (2026-11-15 split). Remaining: #19c only (seed
voice, GM may revisit -- non-blocking). #16 closed with the provider
round (2026-11-18: the housekeeper inherits the player spec's
provider default), the turn-surgery details with the rewind round.
- The tree is usually dirty by design; git status is not an alarm.
- Edit-tool lesson repeated (2026-11-13): nested-list indentation in
HANDOFF failed twice from memory -- always transcribe oldString from a