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
+265 -4
View File
@@ -6,7 +6,8 @@ be worked through one by one; statuses in caps, decisions dated.
## Operator's queue (don't edit, don't work on)
- template package
- inventorise possible human roles (clear distinction between GM and the developer)
- revisit the debug mode, hardcode loobpack
- "create new package" in SPA
- sec review
- refactor to add first-class GM agent
@@ -123,8 +124,15 @@ example, gitignored real file, env-var option).
in play -- state/models.json is the registry of selectable models,
written by the op's two-step discover/refine act and gating all
model use; server.json's explicit pick beats the registry's
discovered default.) Which model the housekeeper DEFAULT points at
stays open (#16); the mechanism is settled.
(Amended 2026-11-18, the provider round: the picks are full specs
{provider, model, effort} -- no unset effort, the per-run sampling
knob layer retired (params are per-turn, the <mind> verb's alone);
the deployment-default layer became the op's per-provider
selection, which also names the refine curator. #16 closed with
it: the housekeeper inherits the player spec's provider default.
Picks are invalidatable -- a removed provider, a drifted or
disqualified model blocks the run until the GM re-picks, the note
naming what died.)
- **The player prompt is battery included, split along ownership seams
(ruled 2026-11-13; cut executed by the GM 2026-11-14).** Three tiers,
three files:
@@ -188,7 +196,22 @@ example, gitignored real file, env-var option).
discussion, a gitea runner the leading idea; node on the box
comes via nvm at the current stable branch, no version pin
(GM, 2026-11-18 -- apt's node is too old for node:sqlite, and
there is no reason to pin a branch.)
The provider config is a first-class ENTITY now (GM, 2026-11-18,
superseding the same day's vector): a user-named slug, config in
state/config.json (server-written, SPA-managed, zero hand edits),
the free keyless default as the opencode/free singleton --
authless, auto-added and discovered on the empty provider list
(the self-heal rule), removable only while another provider
stands. A fresh deployment ships playable with zero secrets and
zero manual files; the first human beat is the model selection
after the auto-discovery greets the op.
rulings beside it: release dirs with a moving symlink, the
graceful stop as an in-process state machine
(starting -> alive -> waiting -> exited, USR1 = drain, uncancellable,
TERM/HUP/QUIT immediate, systemd KillSignal does the glue), and
the state home moving out of the repo (default ~/.tiny-worlds,
env override, first-start scaffold -- the release tree carries
nothing gitignored).
- **Boutique is dormant** -- a stub that never reached its design step;
untouched until its drafting session.
- **Stack: zero-dependency runtime** (DECISIONS #4, amended
@@ -285,6 +308,17 @@ Current answer: close the session. Fine for the test; revisit if real
sessions regularly overflow.
Status: DEFERRED.
## Parked for later (2026-11-18, the provider round)
- **The pre-refine deterministic short-list.** The battery bills
every model on a provider; a deterministic rule over the scrape's
own metadata (ceilings, id heuristics) can short-list what gets
probed when the list is big. The op's refine stays the surface;
the rule is a cost valve, not a gate.
- **The GM's model-selection UX polish.** The spec model landed in
the data and the surfaces; the remaining roughness (the selection
prompt's presentation, the create flow landing the pick at
create-time vs setup-time) is interface craft for a later pass.
## Deferred tasks (ruled out of the dormant-session rework, 2026-11-15)
- **Save-as-package beyond drafts.** Today it fires only from
@@ -307,6 +341,233 @@ Status: DEFERRED.
lines anchor to which turns); the honest tools are GM discipline
and fork-covers-it (the fork copies the notepad with the branch).
## Design research -- teaching style and the happy camper (2026-11-19)
Two open design questions worked in conversation, nothing built or
scheduled. This is the record so the future rounds start from the
findings instead of re-deriving them. Findings only: the worked
examples stay out of the file, the ideas are stated generic.
### Teaching the model style; distilling prior art as the shortcut
The goal: player prose in a chosen literary register (symbolic,
colourful, witty, immediately legible) without shipping a corpus of
examples in the prompts.
- **Adjectives do not work.** Asking for "witty, colourful" summons
the model's caricature of those words, and the caricature IS the
failure mode (ornament, uncashed metaphor, workshop mush). The
priming lesson applies twice over: counterexamples prime what they
prohibit, so the defense must be stated as positive tests.
- **Register is a consequence, not a setting.** Wit and colour
emerge from a mind holding a specific vocabulary that the
situation keeps breaking; the vocabulary is material, and
material can be authored. Generic minds produce generic prose;
the fix is input, not instruction. Register is also where
analysis and generation split: models read a register fine,
they cannot reliably HOLD it while writing -- subtext promotes
to text, or the scene tips crude. The register being
load-bearing (about something) is what separates craft from
decoration.
- **The runtime mechanism already exists: entrainment.** The
bundle's own prose (backdrop, character, her authored opening
turn) is the in-context style corpus, and the GM's narration
re-teaches every turn ("match its register the way you match its
format" is already the content-stance ruling). Nothing new rides
the contwin; what is missing is authored material in the
register.
- Corpus-free levers, cheapest first:
1. **The GM's own narration** -- the biggest live lever, testable
today with zero changes. Costs the GM every turn; risks making
the story's voice the GM's rather than hers.
2. **The package lens** -- character.md's voice field as a
perceptual vocabulary ("she was a court reporter; she thinks
in testimony"), backdrop written in-register, the opening
turn in-voice. The mind-verb philosophy applies: the substrate
teaches the channel, the package teaches the vocabulary.
3. **Moves as tests, with inline micro-examples** -- the metaphor
states its meaning in the same breath (the prompt-prose house
rule applied to her output); an image lands once, never
restated three ways; the concrete detail undercuts the high
line on purpose. Inline authored examples are house style
("tense is the camera" passed the red pen with examples riding
along), not a corpus -- where the micro-example/corpus line
sits is the GM's to rule.
4. **Fix the two lines that teach the disease** -- 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.
5. **The sampling layer** -- effort and temperature move prose
style more than prompts do; effort-max lengthens thinking, and
thinking depth is where self-critique lives.
- **The packager** (working name; the housekeeper pattern -- fresh
invocation, structured output, validated apply, human curates,
never model-facing): reads prior art, drafts package material,
the GM cuts. Rulings so far (GM): **no direct quotes** -- style,
not prose; derive new example lines, never lift text. This is
mechanically enforceable in the project's own idiom: a no-clone
gate, verbatim n-gram overlap against the source rejects loudly
(the clerk-validates-manifests pattern). **No plot** -- import
the story up to a cut point, leave it open from there.
- The cut maps onto the existing package slots: the story-so-far
lands as her memories (a manifest in housekeeper vocabulary
through memory.json's standard apply path -- implanted or
inherited memory is exactly what the testimony rule already
handles: record what she believes, attributed), the world at the
cut as backdrop in-register, the cut moment as the carryover
opening, the situation and the GM's register crib as gm.md (the
crib is half the value: the human GM's narration training wheels,
the countermeasure to a mechanical-and-boring GM sinking the
prose). The cut itself is a design choice -- the packager
proposes candidates with what each buys, the GM picks. Books
exceed the contwin: the packager reads chunked (distill,
accumulate, assemble).
- **Source selection is a scope question.** Liftable art has a
contained vantage: the story's events reachable from one spot,
the wide world arriving only as backdrop (public knowledge that
fits a bundle chunk) or rings (her slice, capped at 500/3000).
The cut is spatial as much as temporal -- choose the vantage,
do not shrink the book. "Keep scope small" is enforced by the
memory budget, not just taste: a sprawling import thrashes the
rings in act one.
- **Niche beats famous.** A model-unknown source is the clean
experiment (zero parametric contamination -- any register carry
is attributable to the package alone) and forces the real
reading pipeline, which is the general case anyway: the art worth
stealing for a specific package is rarely canonical. Famous
sources carry the hazard both ways -- her weights hold the
post-cut future (mitigate: state the divergence in the package,
cut early, lean on the purview/veto machinery), and distillation
rounds famous style to caricature.
- **Rights posture:** style-only derivation is clean; world-import
packages (premise, cast, situation) are more derivative. The
publication ruling for derived packages on a shared deployment
is pending -- style packs may publish freely while world imports
stay private by default.
- **Order of operations:** zero-build pilot first -- 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 in-voice. An evening's work testing whether register
carries through entrainment at all; the packager only earns its
build if the mechanism proves.
### The happy camper: small scope without the erotic copout
The problem: small scope is needed for the model's focus and
coherence, but confinement reads as torture. Every package drafted
so far rationalizes the tiny world erotically -- restraints as the
scope instrument, arousal as the comfort-converter that keeps
confinement from reading as torture (one draft states the
dependency outright). The queue item: a package that never dips
into the copout. Constraints (GM): minimal suffering, no horror,
plot conflicts permitted, the GM must not bore either -- cozy is
fine to consume, much harder to keep generating.
- **The question is who endorses the boundary.** Torture is a
boundary the character rejects; the kink frame is a boundary
converted into desire (that conversion is the actual work
erotication does here); the third option is a boundary endorsed
through meaning -- ownership, people, identity, open threads.
A proven genre lives in that third option already: slice-of-life,
iyashikei, cozy fantasy, the workplace story, the chamber play
without horror.
- **Emergence turns justification into maintenance** (GM ruling
out the decree). Authored cozy can decree stasis ("she never
moves out"); emergent play cannot -- a realistic character
generates leave-pressure (boredom, wanderlust) and the
player-model plays it honestly, so the decree schedules the
failure. Therefore **gravity, not walls**: countervailing wants
that keep winning most days, maintained in-fiction. Mechanisms:
live open loops she owns (leaving abandons threads), identity
(she IS the role), and the rings compound it -- played coziness
accumulates weight the way authored coziness cannot; three
hundred ring-B entries of life in a place are roots made of her
own past. Restlessness is a beat, not a failure: answered
in-fiction, possibly as a bounded excursion; the camera comes
home. Scope small is where the story's weight rests, not where
her feet may step.
- **Membrane, not seal.** A sealed tiny world exhausts (novelty
must come from inside; a realistic character eventually claws at
the walls). A membrane -- road, mail, door, tide -- passes
events: travelers carry the world in episodically, the world
stays small, the content does not. One mechanism serves both
the character's novelty and the GM's fuel line: each arrival is
a GM prompt, and gm.md becomes a situation generator (serial
novelty, a seasonal loop, slow mysteries, progressive
deepening).
- **Chekhov debt is paid in two currencies** (GM ruling on the
membrane's accumulated lore). Threads: few, deliberate, paying
off in drama. Texture: plentiful, owing recurrence rather than
payoff -- the reader needs the world to demonstrate memory, and
recurrence is the cozy story's version of narrative promise.
The housekeeper's gate is the existing debt filter (most
arrivals die unrecorded, the cheap honest dismissal), and events
staged off-stage accumulate no lore at all -- the existing
drafts' technique for consequences they do not want on the map.
If everything is a thread the play drowns in debt; if nothing
is, the reader learns to stop expecting anything.
- **An in-setting game cannot be the endorsement** (GM ruling).
Terminal states summon the optimizer: the player-model will
minmax the exit condition and abandon the story for the optimal
endgame. A telic sheet makes a leaving-story -- sometimes
exactly the right story (a sentence to serve is a legitimate
arc), with a no-time-skip rule as its pacing guard; telic is
not evil, it makes leaving-stories, and runs are allowed to
end. A staying-story's design rule: no exit condition, no
exchange rate -- several incommensurable
values on the sheet, no single gradient to descend (any single
measured metric becomes the target). The sheet is an inventory
of a life, not a scoreboard. The game survives as the rhythm
section: calendar, chores, situation generator -- the spine the
story grows on, never the reason she stays. Story grows on a
game exactly at the friction points where strategy fails.
- **Demand and forgiveness are separate axes.** The genre's most
famous cozy game is in truth a brutal schedule organiser: cozy
is not undemanding. The design target is high demand, high
forgiveness -- busy hands, soft landings; flow inside
obligation is the comfortable state, and the empty-room case
states the same law from the other side (with nothing to do,
boredom itself becomes the plot). The schedule is a plate
rack, demanding on purpose and forgiving on principle: a
homeostatic process with no global gradient, only Tuesday's
local choice -- which also makes it min-max-proof. Dropping a
plate is a story beat. The stakes currency is vexation, not
torment: renewable, comic, keeps the three-part gate fed without
asking the GM to author suffering.
- Engines without suffering: **the project** (tending is
renewable -- the shop opens again tomorrow; homeostasis resets
each session, which suits multi-session runs: suffering arcs
burn a character out, tended things reset), **curiosity**
(interiors as discoveries, not menaces; the whole world can
simply be the room, with the wide world riding as non-load-
bearing memory -- scope is what the play touches, not what the
memory holds), **the cast** (a small social world where
relationships are the content, conflicts interpersonal and
resolvable).
- Substrate readiness is real: records (the card index, the
ledger -- born for ownership stories; the housekeeper's
customer-card example is already this package's prose), the
sheet as inventory and accounts, the parked bookkeeper as the
arithmetic servant, the status gate admitting comfort states
fine (flowing, deadline-tomorrow, smitten). The drafted
packages each hold half the answer: a shelved shop draft had
warmth and no machine; a single-room points-economy draft has
a machine (a cozy-game progression loop in fetish skin) and no
world; a third names the gravity problem in its own notes (no
hook, no reason to come back). The no-copout package is their
product: the cozy membrane, the gravity, the homeostatic
economy -- the loop wearing an apron instead of a collar.
- **The honest difficulty is the model's drama gravity**: trained
on fiction, it escalates (robbers, fires, betrayal within
twenty turns of a cozy shop). Defenses: a positively-phrased
suffering-stance in the package (conflicts are situational,
interpersonal, or creative; stakes are things she cares about,
not things that hurt her -- no counterexamples, they prime),
plus the GM's narration holding the line, the same lever the
content stance already trusts. Ownership, in the broad sense,
is the non-erotic engine: the place is hers, and specificity
is what makes small stakes matter.
## Distant extension points (someday, not scheduled)
- **the bookkeeper: a sheet-keeping agent.** The GM is the sheet's