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
+257 -30
View File
@@ -9,7 +9,169 @@ file is the "where did we leave off" map.
## Where we are
- **Everything is built and committed through `53f992a` (2026-11-18).**
- **The provider-flow round is BUILT and verified (2026-11-19,
GM-designed in conversation): discovery is the probe, the key
path opens only on refusal, and the retry story is settled
universal.** The state machine as ruled: 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 runs
discovery as its probe. A working keyless listing never sees a
key field. A 401/403 stands the provider broken (the card
carries the probe record, the ask opens -- an inline password
input on the card and in the add form). The auth route is
probe-then-save: the candidate key is checked on reception, saved
only on success -- a still-refused key never reaches the config,
the previous state returns, the ask repeats (mock-lock proves
it). Every OTHER 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 -- found and fixed).
The remove-key control (custom providers only, armed): clear,
auto re-discover -- a provider gone public lands working keyless,
a locked one re-opens the ask, which is the key-replacement path
(remove, then key). o/f never asks in any state: its auth
failures are upstream breakage to show, never a prompt (the card
says so; the auth routes 403 it both ways). The probe record
(outcome ok/auth/error + detail + at) lives on the entity and
ONLY the explicit acts move it -- add, key, remove-key, discover
(and the boot self-heal); usage errors are transient and the
op's to fix eventually, nothing in the runtime flips provider
state (GM: marking a provider broken mid-play is disruptive; the
failed turn already lands its req event). The universal retry
rule (GM, 2026-11-19): 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 is the designed outcome, not
a degraded one. And the cache rule (GM, 2026-11-19): failures
NEVER cache -- a failure is the absence of a measurement, not a
measurement; every refine re-probes the models that failed the
last one (the receipt says so), so a transient error during a
battery can never pin a false verdict -- gev's 400s cost one
cheap probe per refine and self-heal the day the backend learns
tools. The gev finding that shaped it: the GM's example of a
200-failure is actually a 400, and the bright 200/non-200 line
died for the simpler rule. En-route fix the smoke earned: the
create route built the run dir BEFORE validating body.spec -- a
refused spec left an orphan run (the sixth run in
restart-check's count); the spec validates first now, nothing
lands on refusal. Verified: typecheck green both programs, smoke
ALL PASS (+27: the add-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, fixture cleanup; and the
mock-c battery -- mock-fail lands its verdict with the
never-cache marker, absent from the cache file, re-probed fresh
on the re-refine while the passing three serve from cache, not
selectable, and no orphan run), restart + reminder checks green
(5 runs again -- the leak gone), a browser pass on the mock
server driving the whole UI machine (the form's 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), and the debug server back on
the real state (Chloe + Irene). Docs: README's add-flow and
cache passages amended. The dev refine-cache never existed (the
real refine predates the cache), so no hand-clean was needed.
- **Design research landed in ROADMAP (2026-11-19, GM): two open
questions worked in conversation, nothing built.** "Teaching the
model style" -- register is a consequence, not a setting;
entrainment is the runtime mechanism (the bundle's own prose is
the in-context corpus); the corpus-free levers, cheapest first
(the GM's narration, the package lens, moves-as-tests, fixing
the two disease-teaching prompt lines, the sampling layer); the
packager (the housekeeper pattern: no direct quotes, no plot, a
no-clone gate). And "the happy camper": small scope without the
erotic copout -- gravity not walls, membrane not seal, Chekhov
debt in two currencies, no in-setting telos, demand and
forgiveness as separate axes, the model's drama gravity as the
honest difficulty. Findings only, stated generic -- the record
exists so future rounds start from it; the pilot below is its
own order of operations.
- **The provider round is BUILT and verified (2026-11-18, the
batteries-included arc): providers are first-class entities, the
config is server-written state, and a fresh clone boots
playable.** state/config.json holds the entities (slug,
baseUrl, optional key, the op's default {model, effort} pair);
the SPA manages them -- the binary add (the opencode/free
singleton or a custom provider), removal (the singleton holds
while it is all that stands), per-provider discover/refine with
the meter, the selection prompt, and the curator's
recommendation with its one-click apply. server.json shrank to
bind + contwin (optional) and imports once on first open: the
dev machine migrated (provider 'llm-exan-tech', the 13
measured models preserved, the glm-5.3 pin carried as the
default at max). The self-heal boot: an empty provider list is
auto-fixed -- opencode/free added and discovered in the
background, boot never blocks. The spec model: every request
resolves {provider, model, effort} -- no unset effort
(amending the 2026-11-16 measured-default ruling), the per-run
params layer retired (the <mind> verb is the only sampling
source; max_tokens died with it, the turn meter scales on
history alone). The registry is per-provider sections; the
adjudication cache is keyed by the double spec tuple (churn
reuses, re-probes refresh -- the smoke caught the first build
caching the bare probe and stripping curation on a cached
re-refine). Run picks are invalidatable: a removed provider, a
drifted or disqualified model blocks the run with the note
naming what died; the housekeeper inherits the player spec's
provider default (#16 closed). Legacy bare-string picks resolve
through the registry -- Chloe stays playable, Irene blocks
honestly (she never runs again by ruling). Verified: typecheck
green both programs, smoke ALL PASS with the provider battery
(the self-heal boot, the binary add, the o/f guard, the
selection-then-refine flow, the per-provider meters, the cache
hit and purge, invalidation end to end, the restore cycle),
restart + reminder checks green, a browser pass over the admin
block and the model box with zero console errors (the
refine-then-recommend-then-apply loop, the spec saves, the
inheritance health line), and the live debug server migrated
and serving. The staged vector round is superseded by this one
-- its endpoints vector survives as the import's input shape.
The same sitting proved the whole arc LIVE, from nothing
(sandboxed, then restored): bare boot with no server.json and
no state mints the invite, auto-adds opencode/free; claim, add
a custom provider with a bogus key (the recognizable 401), fix
the auth (the listing retries, 13 models), select the default
pair, create a run with its spec, start, and play a real
glm-5.3 turn -- 116s, actual prose, the full path walked clean.
Two live findings: opencode.ai serves 89 models keyless but
401s an EMPTY Bearer header (fixed: the auth header rides only
when a key exists -- the anonymous fallback was broken against
its own endpoint), and the failure log line rides stderr
(console.error), not stdout. THE NO-LEGACY PASS (GM's new rule,
2026-11-18, recorded in AGENTS): the four legacy paths this
round shipped with died the same day -- bootImport deleted (the
dev config exists; server.json cleaned to bind + contwin), the
registry's v1/v2 in-memory migration deleted (models.json
rewritten on disk into the per-provider shape), the
bare-string model picks deleted (Chloe's run.json migrated to
spec objects, shape-preserving: exactly what the runtime
resolved), the clerk's create model arg deleted (the hidden
legacy writer), plus apiKeyEnv and the contextWindow alias.
Re-verified after the pass: typecheck green both programs,
smoke ALL PASS, restart + reminder checks green, check-repo
clean, the debug server on the migrated state (Chloe resolves
spec-only, the registry reads the v3 file directly).
- **Superseded:** the provider-vector round (2026-11-18) --
endpoints as a config list -- was folded into the provider
round above the same day; its build verified as described
there, and the vector survives as the server.json import's
input shape.
- **The provider-vector round is BUILT and verified (2026-11-18),
uncommitted.** `server.json`'s singular endpoint became
`endpoints`: a list of (baseUrl, auth) pairs, auth optional --
the scaffold's prerequisite, so the free keyless default and the
op's real key coexist as entries. One client per pair, discovery
scrapes every configured endpoint and tags each model with its
base, every call routes through `providerFor`, and the
singular-era registry normalizes on open (the measured registry
survives unregenerated). Smoke-proven over two synthetic mock
endpoints; live-proven on the real 13-model registry.
- **Everything else is built and committed through `14b9b01`
(2026-11-18).**
The latest commit carries the day's three pieces:
- **The rewind round**: the GM's take-back riding the send --
`rewind` (a log line index naming one of your turns) truncates
@@ -95,53 +257,118 @@ file is the "where did we leave off" map.
restraints as income-producing assets); still missing: the opening
turn, real memory seeds, a gm.md (the task stream, the facility's
voice, the release-target ruling) -- its current seeds are
la-caramba leftovers. `packages/detention/` is also WIP, untouched.
la-caramba leftovers. `packages/detention/` and
`packages/template/` are also WIP, untouched.
- **The deployment thread (2026-11-18): the box is oriented, the
story is ruled, the build has not started.** A burble VM (Debian
13, single-core, 4G swap live; connection specifics in the
gitignored `.ssh/box.md`). The ruled shape: release dirs with a
moving symlink (the runner stages, the unit's ExecStartPre
relinks and prunes); the graceful stop as an in-process state
machine (starting -> alive -> waiting -> exited -- USR1 sets the
drain, refuses new ops, uncancellable, awaits the run locks and
the jobs, capped ~10 min; TERM/HUP/QUIT exit immediately;
systemd KillSignal=USR1 makes stop/restart the graceful path);
the state home moving out of the repo (default `~/.tiny-worlds`,
env override, first-start scaffold -- the release tree carries
nothing gitignored); TLS terminates in caddy (automatic
TLS-ALPN-01, staged against LE's staging endpoint first); node
via nvm at the current stable branch; the pipeline is a gitea
runner on the box, stage-and-signal, no test gates in it (the
smoke needs clean state, which the box can never give). The
The provider round (above) settled the scaffold's provider
story: the o/f singleton ships, auto-added and discovered on the
empty provider list -- playable with zero secrets. Unverified:
whether the free models pass the discovery battery's tool probe
(the listing is real and keyless: 89 models at the time of the
fresh-path test -- a full refine on it is 89 batteries, which
makes the parked short-list rule suddenly relevant).
- **The debug server runs the current code** (port 7350, pid in the
temp pid file; sessions rebuilt for Chloe and Irene at boot).
state/ holds the refined registry. Four commits await the GM's
push (`bbaf336`, `5279dd3`, `eefb721`, `53f992a` -- the ssh key
takes a passphrase, pushes are the GM's).
state/ holds the refined registry (per-provider shape on disk,
migrated in the no-legacy pass) and the provider config
('llm-exan-tech', default glm-5.3 at max). Five commits await
the GM's push (`bbaf336`, `5279dd3`, `eefb721`, `53f992a`,
`14b9b01` -- the ssh key takes a passphrase, pushes are the
GM's), with the provider round and the no-legacy pass staged
beside them.
## Immediate next steps, in order
1. **First start under multiuser (op, one-time).** Start the server
normally, claim the bootstrap invite
(`state/bootstrap-invite.txt` and the console both carry it).
Nothing live has touched the auth spine yet -- mock-proven only.
2. **The fresh run.** Create it from la caramba (the box waits on its
files), pick the model and the effort at create time, and play.
1. **The deploy build.** The free-default call is RESOLVED
(2026-11-18, the provider round): the opencode/free singleton
ships -- auto-added and discovered on the empty provider list,
playable with zero secrets; the box's first refine on it is
the live test of whether its free models pass the battery's
tool probe. What remains is the state-home half, by the book
after the fresh-boot observation on this laptop (GM,
2026-11-18): the state home out of the repo (default
~/.tiny-worlds, env override, first-start scaffold -- the dev
machine migrates once, and the smoke gets its own temp home,
killing the state-backup dance), the USR1 state machine + the
immediate-exit handlers, the systemd unit (KillSignal,
TimeoutStopSec above the cap, ExecStartPre relink + prune),
caddy with its TLS-ALPN-01 cert (staging endpoint first), the
gitea runner workflow (stage, signal, restart), and the
box-side install (nvm + current stable node, runner
registration). The first start under multiuser rides this: the
op's bootstrap-invite claim happens ON the box.
2. **The fresh run.** Create it from la caramba
its files), pick the model and the effort at create time, and
play -- on the debug server or the deployment, the GM's choice.
It carries everything new at once: the 2026-11-17 prompt set's
first live test (the audience doctrine, the typography rule, the
no-echo teaching), the full-block protocol's first live run (her
first own whole-list emission is still unplayed), the measured
effort default riding unset turns, and the turn meter under real
use. Her first stop carries the first real housekeeping pass, the
slidwin carry test, and the boundary state note. Decide before
the first turn whether max effort is wanted: a fresh glm-5.3 run
sends `reasoning_effort: max` by the measured default (the
disposable test run's turns thought 12.1k/3.9k/6.5k chars against
~1.4k of prose) -- the knob is one click on the run's model box.
3. **Prompt reviews (GM-led).** housekeeper.md: read it, tweak,
first live test (the audience doctrine, the typography rule,
the no-echo teaching), the reminder's checked-action metrics,
the full-block protocol's first live run (her first own
whole-list emission is still unplayed), and the spec picks and
the turn meter under real use. Her first stop carries the first
real housekeeping pass, the slidwin carry test, and the boundary
state note. The effort is a deliberate pick now (there is no
unset effort): decide it at the setup box -- the measured
ladders pre-select each model's max-mean level.
3. **The style pilot (zero build -- the design research's own
first move).** Hand-place a style chapter in a dormant run's
handbook copy (the file editor already allows it), a
style-by-name line in character.md, the opening turn in-voice:
an evening's work testing whether register carries through
entrainment at all -- the packager only earns its build if the
mechanism proves. Riding along, the two lines that teach the
disease (design research, lever 4): the reminder's "Decorate
the turn with additional flavour" (decoration is the failure
mode as a verb) and the handbook's uncashed "Flavourful
language" pointer -- prompt files, so the drafts are mine and
the red pen is the GM's.
4. **Prompt reviews (GM-led).** housekeeper.md: read it, tweak,
replay -- the dry-run button re-runs housekeeping with nothing
applied. curator.md likewise: read, red-pen, re-run refine (one
click; the meter watches it now).
4. **Finish the box** (GM's): the files above, then it becomes the
5. **Finish the box** (GM's): the files above, then it becomes the
sheet's first consumer.
5. **Keep playing -- and watch.** The standing observables (#12
6. **Keep playing -- and watch.** The standing observables
status discipline, #14 turn lengthening vs the reminder), the
protocol's firsts (does she restate her blocks every turn or on
change; does the `<model>` block teach her anything; does she
ever state a `<mind>`; does a GM override read as her state and
does she adopt or fight it), the effort knob's texture and cost
curve, the prompt-craft rules against a live model (no-echo,
bold-not-italics), the variantary firsts (the pick against a real
model, the metric's curve, coin-flip personality), and the sheet
once the box runs.
does she adopt or fight it), the conflict quotes doing their
job (does a kept mistake stop repeating), the rewind under real
regret, the effort knob's texture and cost curve, the
prompt-craft rules against a live model (no-echo,
bold-not-italics), the variantary firsts (the pick against a
real model, the metric's curve, coin-flip personality), and the
sheet once the box runs.
## Not yet exercised (expect first-use friction)
- **First start under multiuser** -- the auth spine, invites, fork,
non-owner reads: all mock-proven only.
non-owner reads: all mock-proven only. Its first live run rides
the deployment (the op claims the box's bootstrap invite).
- **The free models against the battery** -- the o/f listing is
live-proven (89 models keyless, the empty-Bearer 401 found and
fixed in the fresh-path test), and a live second provider rode
beside it (the dv add in the same test) -- what no traffic has
touched is a refine over the free models: the tool probe, the
ladders, the curator on a free model. The box's first refine
is the test.
- **The rewind against a live model** -- mock- and browser-proven;
the fresh run's first real regret is its first live test, and the
expect guard's 409 has never fired outside the smoke.