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#6989
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-Engine/pull/5919
Author: @kolacheee
Created: 9/7/2026
Status: ✅ Merged
Merged: 9/7/2026
Merged by: @kolacheee
Base:
staging← Head:feat/5798-gm-verb-schema📝 Commits (9)
6777d3efeat(capability): package-declared GM verb schema (#5798)509e6d3fix(capability): derive the GM verb guards from every source they claim (#5798)c7edf3afix(capability): sweep every chat-metadata write shape and narration parser (#5798)6109deefix(capability): close the spatial namespace and re-pin the tag canary (#5798)3f6dc95fix(capability): sweep the direct metadata-route writes and correct three comments (#5798)22baa5bfix(capability): close the GM verb review round's five gaps (#5798)36fe85edocs(agent-packages): scope the description control-character rule to the guard (#5798)f215fcdMerge remote-tracking branch 'origin/staging' into feat/5798-gm-verb-schema452b682test(capability): read the GM verb sweeps through the compiler's own lexer (#5798)📊 Changes
4 files changed (+1789 additions, -0 deletions)
View changed files
📝
CHANGELOG.md(+1 -0)📝
docs/development/optional-agent-packages.md(+186 -0)➕
packages/shared/src/schemas/gm-verb-table.schema.ts(+556 -0)➕
scripts/regressions/capability-gm-verbs.regression.ts(+1046 -0)📄 Description
This PR is inert. Nothing in the Engine imports what it adds, so on merge day no installed Agent, no chat and no generated turn behaves any differently. It is the declaration half of the write-back channel: the file format a package uses to say which Game Master actions it wants, and the rules the Engine will check that declaration against. The runtime that reads these files is a separate, stacked PR that follows this one.
Linked issue
References #5798. This PR does not close it — it ships the declaration format only. The runtime PR stacked on top of this one closes the issue.
Why this change
An Experience package can read the chat today: the host hands it props every turn and it can subscribe to a small set of engine-defined events. There is no lane in the other direction. When the GM narrates "the storm rolls in", the package never hears about it, so the sky stays fair. The narrator's world and the surface the player is standing on drift apart, and nothing reconciles them.
The requested shape is deliberately not a free-form state patch: a closed list of named actions with typed arguments, published by the package, validated by the Engine before anything happens. That keeps the model from acquiring authority over a package's geometry and determinism, which is the whole reason a package like Pixelforge can be seeded and replayed at all.
Splitting the declaration out is what makes this PR reviewable on its own. The rules that decide whether a package's declaration is legal are the part that has to be right — a bad rule here hands model output a write into an Engine-owned chat setting — and they are much easier to judge without a runtime moving underneath them.
What changed
packages/shared/src/schemas/gm-verb-table.schema.ts. A package shipsgm-verbs.json: 1–16 actions, each with a lowercase name (max 32 chars), a one-line description (1–200 chars), and 0–6 arguments typedstring,numberorboolean. String arguments may declare a closed list of 1–16 accepted values; a string argument without one must declare its own maximum length (1–500), because the parser that will read these payloads inherits no ceiling of its own.metadataKeywrites into that chat setting. An action without one is delivered live to the package and writes nothing. An action that is not a writer may not name a key it will never write, so it cannot reserve a name against the ownership rules below.conversation-callsnormalizes toconversationCalls, andconversationCallsEnabledis an existing Engine chat setting that plain set membership would have left writable from model output.[Note:capitalized while the parse is case-insensitive.COMMANDS:block, where either would split the block or take the shape of another tag.docs/development/optional-agent-packages.mddescribing the format, the rules, the deliberate costs, and the blind spots below.scripts/regressions/capability-gm-verbs.regression.ts.No
supportedCapabilityApibump here. That constant is what every Engine compares a package's declared version against, so bumping it advertises the seam whether or not the runtime exists — it rides the runtime PR instead. Today the constant is still 1.15, which means a package declaring 1.16 right now is refused at install by every Engine there is.What the guards pin, and how
Two of the constants in this file are copies of facts that live elsewhere in the tree, and a copy silently falling behind is exactly how a guard develops a hole. So the regression re-derives both from their real sources on every run and fails when the copy and the derivation disagree. Each derivation also asserts it found something before it compares, so a broken extractor cannot make a pin pass vacuously.
[name:the GM format reminder and the party prompt renderer can produce, plus the full vocabulary of five client and server narration parsers, case-folded.patchMetadata/updateMetadatawrite, in all three of its call shapes (bare object, concise updater callback, block updater callback); the client's metadata update hook and the settings sections that forward into it; property reads offparseChatMetadata(...); the hand-maintained list of per-chat keys excluded from chat settings profiles; and the client code that PATCHes the chat metadata route directly.What the derivation honestly cannot see
Named here rather than left for review to find:
spatialContexttakes: it is written by another package's own client through the metadata route, so no write literal in this repository names it, and both Engine readers take it off a parameter. It is pinned today because the hand-maintained chat-settings exclusion list happens to name it, not because a sweep can see it. Another key in that same shape would be missed.persona, is hand-added — no source produces it today, and it is held by an explicit floor assertion rather than by the derivation.Deliberate costs
conversation-callsandnoodlecannot own chat settings keys under their own ids, because of the uppercase-boundary extension rule above. Both can still declare the live-delivery kind of action, which owns no key. This is a real narrowing and the docs state it.The regression
scripts/regressions/capability-gm-verbs.regression.tsre-derives both pinned constants as described above, exercises every refusal (reserved name, foreign key, engine namespace, extension at an uppercase boundary, missing length cap on an open string, a key declared by a non-writing action, a writer with no key), proves per-entry degradation keeps the good entries, pins the 16-action cap in all three places it is expressed, and asserts the schema has no importer anywhere in the tree. It runs in well under the 30-second budget.Validation
pnpm checkpasses locallyCONTRIBUTING.mdManual verification notes
There is nothing to click through: the schema has no importer, so no screen, no turn and no installed package reaches it. The verification that matters here is that the claim of inertness is true and that the guards are not decorative.
pnpm checkand confirm it exits clean.node ./scripts/run-regressions.mjs --filter capability-gm-verbsand confirm it passes.gm-verb-tableand check that the only tracked source hit is the regression file itself (a hit underpackages/shared/dist/is a build artifact on a gitignored path).supportedCapabilityApiis untouched at 1.15 inpackages/shared/src/schemas/capability-package.schema.ts.During development
pnpm checkexited clean,pnpm version:checkreported the version files in sync for 2.4.5, and the regression passed. Those runs are context, not a substitute for the boxes above.Docs and release impact
docs-i18nbranch updated to match, or a[docs-i18n]follow-up issue opened (see CONTRIBUTING.md § Translated documentation)What this PR actually does to docs and release metadata, for the reviewer to confirm against the boxes:
docs/development/optional-agent-packages.mdand one line toCHANGELOG.md. No README, CONTRIBUTING or android/README change is needed.docs-i18nare not updated here. This section is new prose in a file the stacked runtime PR also edits, so it belongs in the batched[docs-i18n]follow-up rather than a per-PR mirror.supportedCapabilityApiis deliberately not touched, sopnpm version:checkhas nothing to reconcile.UI evidence (if applicable)
Not applicable — no user-facing surface changes in this PR.
Summary by CodeRabbit
New Features
gm-verbs.jsonformat for packages to declare Game Master actions.Documentation
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.