mirror of
https://github.com/Pasta-Devs/Marinara-Agents.git
synced 2026-12-03 18:55:07 +07:00
[PR #1025] [MERGED] feat(gacha-forge): 1.8.5 — an optional opening story, a saved wizard … #1256
Labels
No labels
agent: chess
agent: conversation-calls
agent: eightball
agent: haptic
agent: hierarchical-maps
agent: hierarchical-maps
agent: illustrator
agent: poker
agent: rock-paper-scissors
agent: tic-tac-toe
agent: uno
artifacts
bug
bugfix
build
catalog
ci
client
dependencies
docs
documentation
enhancement
feature
fixed-in-staging
in-pr
normal-scope
packages
pull-request
qol
regression
roadmap
scope-risk
server
soup
upstream
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Pasta-Devs/Marinara-Agents#1256
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Pasta-Devs/Marinara-Agents/pull/1025
Author: @SonaGat3
Created: 9/21/2026
Status: ✅ Merged
Merged: 9/22/2026
Merged by: @SpicyMarinara
Base:
staging← Head:feature/gacha-forge-1.8.5📝 Commits (2)
4fcdae5feat(gacha-forge): 1.8.5 — an optional opening story, a saved wizard with presets, and room for models that thinkcd42500Merge branch 'staging' into feature/gacha-forge-1.8.5📊 Changes
12 files changed (+408 additions, -345 deletions)
View changed files
➕
artifacts/gacha-forge-1.8.5.zip(+0 -0)📝
catalog/catalog.json(+8 -8)📝
catalog/notes.json(+6 -0)📝
catalog/v2/catalog.json(+8 -8)📝
catalog/v2/notes.json(+6 -0)📝
catalog/v3/catalog.json(+8 -8)📝
catalog/v3/notes.json(+6 -0)📝
packages/gacha-forge/CHANGELOG.md(+7 -0)📝
packages/gacha-forge/README.md(+2 -0)📝
packages/gacha-forge/client.js(+248 -215)📝
packages/gacha-forge/manifest.json(+5 -5)📝
packages/gacha-forge/server.mjs(+104 -101)📄 Description
Linked issue
Closes #1023
Why this change
stagingcarries Gacha Forge 1.8.2. This is what players ran into creating worlds, plus one player'sledger that explains why a reasoning model "fails constantly".
A world that cannot write its first chapter cannot exist. Creating a world ended on the opening story:
more than half of the wait and the heaviest calls of the creation (measured: 20k tokens in for the plan,
13.6k for the first scene). When that forge failed, the ways out were Retry and deleting the world.
A reasoning model lost the first try of nearly every call. GLM 5.3, 149 calls: 82% of what came back
was reasoning; 12 of 15 scenes and 3 of 3 chapter plans were cut at exactly their cap (text + a fixed
6,000) with no answer; every doubled retry landed under 9.6k. A cap saves nothing — tokens are paid as
written — and a call cut short is paid in full for nothing.
What you type in world creation was lost on a reload, on leaving, on Cancel, and when a creation
failed or was cancelled.
What changed
run.storyDeferred). OneprologueOwed()answers the four readers(
/state, the locks, the gift,/story/start); a postponed world owes no prologue, so Summon, its giftand the guides open on the first Home. "Forge this world" asks are you sure? and then now or later, in
a two-page pop-up drawn in place over the wizard (a repaint would empty its seven steps). A world whose
story waits forges nothing by itself: the state machine, Modes > Story,
_openChapterand the plan thatcreation fired behind the art all ask first. Modes > Story answers with a question; Write it now forges
chapter one and opens its first scene through
/story/start, which answersspent: 0, opening: truefor that one node.
POST /story/deferis the third way out of a failed opening forge (the plan or thefirst scene). The Summon gift of a postponed world is named "Starting reward": it completed no prologue.
setup-store.js, one package-wide document, declared inNON_RUN_KINDSsodeleting a world cannot take it). The draft and every preset are the wizard's own
snapshot(),whitelisted and byte-capped (200 KB) by one function. The draft is read once per visit and mounted from;
nothing is saved until that read settles, and a player already typing is never overwritten.
/runstampsit with the world it became: held while that world is being created, back if it is cancelled, spent once
the founding cast stands and no prologue is owed. Presets: up to 30, unique names, save / overwrite /
rename / delete; load prunes what the Engine no longer has (connection, persona, lorebooks, cards,
themes) and counts it, and a list that could not be read prunes nothing. "Save as preset" on a world is
built in the client by the schema (
snapshotFromRun) and kept through the same route.REASONING_HEADROOM6,000 → 16,000,learnedHeadroom,capWithinContext). Theheadroom is learned per connection from the ledger's own rows — half as much again for a call that
finished thinking, double for one cut off still thinking, never over 64,000 — seeded from the stored
ledger once per process. The Engine takes
maxTokensout of the connection's context window and trimsthe prompt to fit, so on a small window the headroom gives way first, never below text + 6,000; the window
comes from the
/api/connectionsread that already fetched the player's parameters. The first budgetcut of a generation spends no attempt, the cap grows from where it is, and the ledger records
msandcap.watchEngineinapi.js): away is a press outside the game, a hidden tabor a blurred window; back is the pointer or focus entering the game, the tab showing, the window
focusing; after a touch outside it re-reads once the outside goes quiet. The six loads (cards, lorebooks,
connections, image options, personas; connections and image options in Settings) repaint on change
only, keep what was chosen and never trade a good list for an error. The watch is anchored to a node of
its paint and ends itself when repainted.
loreSubject,subjectsonbuildRunLore): the card's nameand text, the Cast-book sheet the call just drew (the Cast book is drawn first now), the persona, and the
five-stars of a signature weapon. The haystack is matched and never sent: it costs no tokens, and what
it wakes still fits the World budget.
Generated outputs
packages/gacha-forge/client.js,server.mjs,manifest.json, the artifact zip, the catalog family andthe release-notes sidecars were re-derived by
node scripts/build-gacha-forge-package.mjsfrom thecommitted payload bytes. Nothing was hand-edited; re-running the builder after the commit leaves the tree
clean.
Package and security impact
capabilityApi, theenginerange, permissions, contribution slots, assets,builtAgainstandrestartRequiredare unchanged. The only manifest field that moved isversion, verified by diffingagainst the
stagingmanifest with the hash lines filtered out.GET/POST /setup/draft,POST /setup/draft/clear,GET /setup/presets,POST /setup/preset/save | delete | load,POST /story/defer. None removed.(
/api/connections,/api/characters/personas/list,/api/characters/catalog,/api/lorebooks), eachwith a 2 s ceiling, and only when a preset is loaded.
cap; a preset's name is one line, trimmed and capped at 60; every row of the presets pop-up is escaped
(the probe feeds it
<img onerror>and<script>).client.js1,412,419 → 1,433,495 bytes,server.mjs483,868 → 492,116, artifact7,796,444 → 7,825,768. No art changes (245 of 247 payload files are byte-identical).
Validation
node scripts/validate-catalog.mjspasses locallygit diff --checkpasses locallyCONTRIBUTING.mdManual verification notes
origin/staging(d64cac96);git ls-files --eol | grep -c w/crlf→ 0;git diff --check "origin/staging...HEAD"clean; the build is reproducible.pull-request-checks.ymlatorigin/staging, so its 24 steps cannot go stale: 23 of 24 green --npm ci,npm run check(0 errors),typecheck:packages, the Calls, Memory Nag, Pixelforge and Beholder regressions (Beholder parity 239/239),vendored-engine,test-catalog-lanes, the locale validators,validate-catalog(v2=38, v3=38),catalog-generatedat-determinism,catalog-release-notes,ruleset-package, the World Maps and Long-Term Memory UI contracts,validate-pr-triage,test-owner-approval,git diff --check. ⚠️npm run test:securityfails on Windows for a reason unrelated to this change (catalog-path-safety.regression.mjsexpects a POSIX path and getsD:\tmp\package\assets\icon.png); its log never names gacha-forge, and it failed identically on a cleanstagingcheckout for the 1.8.2 PR.change carries a check verified failing against the previous code.
the way back and keep what was chosen; the two pages of Forge's question; Modes > Story's question; the
three ways out of a failed opening forge; the draft coming back on its step; the presets pop-up, a taken
name, a loaded preset saying what it left out; "Save as preset" on a world.
24,288 on their first attempt and chapter plans with 22,692.
Documentation impact
packages/gacha-forge/README.mdgains the 1.8.5 paragraph;packages/gacha-forge/CHANGELOG.mdgains1.8.5. The repository README is unchanged.
UI evidence (if applicable)
Summary by CodeRabbit
New Features
Bug Fixes
Documentation
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.