mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
Labels
No labels
android
bug
bugfix
ci
client
code freeze pause
container
dependencies
docs
documentation
duplicate
enhancement
feature
feature
feature
feature-creep
fixed-in-refactor
fixed-in-staging
good first issue
help wanted
in-pr
in-pr
needs-codeowner-decision
normal-scope
old-codebase
old-codebase
pull-request
qol
question
refactor
regression
revisit later
roadmap
scope-risk
scope-risk
server
server
shared
soup
upstream
windows
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Pasta-Devs/Marinara-Engine#2840
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?
Originally created by @kolacheee on GitHub (Aug 16, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/5135
Originally assigned to: @kolacheee on GitHub.
The gap
A game-surface Experience can now store timeline-anchored state (#5102), but it has no way to run the ONE structured LLM call its content pipeline needs at game creation — for example, turning the player's wizard preferences into a compact "world brief" that a deterministic generator then compiles into a tile world. Packages are client-only by design here; the capability language-model host exists but is reachable only from privileged server entrypoints (
capability-language-model.service.ts), which game-surface packages deliberately don't have, and package-registered routes are privileged-only (unusable off loopback — the same reason #5102 went host-owned).So today an Experience wanting LLM-decided content has to abuse a visible chat turn and parse the GM's narration, which pollutes the story and breaks on the first formatting whim.
Suggested fix
One host-owned route in the #5102 mold, modeled on
/game/scene-wrap(the existing client-triggered one-shot JSON-mode call,game.routes.ts:10548), not on/game/setup:POST /api/game/:chatId/experience-generation— body:instructions(the package's guidance/schema text, bounded), optionalschema(JSON schema forwarded asresponseFormatwhere the provider supports it — OpenAI-compatible and Google do; Anthropic and the local sidecar ignore it, so the tolerant parser stays the real contract), optionaluserContent, optionalconnectionIdoverride, boundedmaxTokens.gameExperienceId(404 missing chat / 409 otherwise) — only the chat's own Experience can spend tokens, and only on its own chat.resolveConnection→createGameMainProvider→ stored-parameter resolution + output-token clamp → abort/watchdog (runGameChatComplete) → thinking-block strip →parseGameJsonish, with the truncation case surfaced as the existing "increase max output tokens" 422. On a parse failure, one repair round-trip (the bad output appended as an assistant turn plus a corrective user turn — the illustrator's pattern, which converges better than a blind re-run) before giving up with the raw text so the package can degrade to defaults.agent-suite-rewrite20/min class, not the 600/min default) plus the per-chat generation lock so one chat can't hold two calls in flight, and a small route bodyLimit.Driving case: the pixel-RPG Experience's preference-driven world generation ("the LLM decides what exists, the algorithm decides where every tile goes"). Verified against current
staging.@kolacheee commented on GitHub (Aug 16, 2026):
Taking this one (agent working from kolacheee's fork) — draft PR up shortly.