mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #7886] [MERGED] fix(packages): game boards render once, clear install errors, schedule updates from calls #7984
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#7984
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/7886
Author: @SpicyMarinara
Created: 10/20/2026
Status: ✅ Merged
Merged: 10/20/2026
Merged by: @SpicyMarinara
Base:
staging← Head:fix/dedup-review-engine📝 Commits (1)
864b11cfix(packages): game boards render once, clear install errors, schedule updates from calls📊 Changes
10 files changed (+424 additions, -26 deletions)
View changed files
📝
docs/development/optional-agent-packages.md(+10 -0)📝
packages/client/src/components/chat/ConversationView.tsx(+8 -20)📝
packages/client/src/hooks/use-capability-packages.ts(+39 -0)📝
packages/server/src/routes/capability-packages.routes.ts(+7 -1)📝
packages/server/src/services/capability-packages/capability-persistence.service.ts(+63 -0)📝
packages/server/src/services/capability-packages/package-manager.service.ts(+11 -3)📝
packages/shared/src/types/capability-runtime.ts(+30 -1)➕
scripts/regressions/capability-package-install-refusal.regression.ts(+104 -0)📝
scripts/regressions/capability-runtime-host-services.regression.ts(+87 -1)➕
scripts/regressions/conversation-turn-game-surface.regression.ts(+65 -0)📄 Description
Linked issue
Refs Pasta-Devs/Marinara-Agents#1496. Its "Additional context" lists these three Engine-side findings from the host de-duplication review (Pasta-Devs/Marinara-Agents#1494, Pasta-Devs/Marinara-Engine#7858). There is no separate Engine issue for them. The package fixes in that issue stay with Marinara-Agents.
@SpicyMarinara
Why this change
The review of the host de-duplication found three problems in the Engine. The packages cannot fix any of them:
conversation-surfaceslot in its manifest.ConversationViewmounts every turn game's board itself, and then the slot mounts it again. The Engine has done this sinceae92414ad(2026-08-04), so v2.5.0 has it too. The fix belongs in the Engine. Removing the slot from the game manifests would not help: games people already installed, and older Engines, would still show two boards.[schedule_update]does not last. The character card now owns presence. The chat'scharacterSchedulesmap is only a cache, and the next presence read replaces it. Calls can only patch that map, so the nextGET /api/chats/:idwipes the change. The same command in a normal Conversation reply puts a status on the card. Calls needs a host member that reaches the card.Decisions:
api.runtime.persistence.updateCharacterStatus(chatId, characterId, update). Its name and shape match the other contract §2.2 persistence writers (patchChatMetadata,appendMessages,createChatNote). It does not copy the host's code. It hands the command tohandleConversationScheduleCommand, the same function the generate route uses. That keeps the manual-status precedence, the 60-minute default and one-week limit on duration, and the cache refresh.chat-write, like every other persistence writer. It checks the input first. The chat must exist and be a Conversation chat. The character must be in that chat, which is the same check the reply path makes, since a command only reaches a character of its own chat. In a shared room it changes nothing and returns null, because rooms keep their own routines and never write the card.speechmember set the precedent of an optional member with no new minor. 1.341 has not shipped in any release yet: v2.5.0 reports 1.66. v2.5.1 will be the first release to report 1.341, and it will include this member. Only pre-release staging builds report 1.341 without it, which is why packages feature-detect it.What changed
ConversationViewtakes its turn games andconversation-surfacepackages from new selectors inhooks/use-capability-packages.ts. The slot leaves out turn games, because their boards are already mounted. Calls and other surface packages are unchanged. The Roleplay surface is unchanged, because it mounts games only through the slot.installCatalogPackagethrowsCapabilityPackageCompatibilityErrorfor the three checks it runs before downloading: install issue, capability API and Engine range.POST /api/capability-packages/:id/installanswers 409{ error: <message> }for it, the same way it already answers a version mismatch. Other failures still go to the error handler.CapabilityPersistenceHost.updateCharacterStatuswith shared typesCapabilityCharacterStatusUpdateandCapabilityCharacterStatusResult, implemented incapability-persistence.service.ts. It is documented indocs/development/optional-agent-packages.md, under "Capability API 1.341", next to the other persistence members.conversation-turn-game-surface(new),capability-package-install-refusal(new) and anupdateCharacterStatusblock incapability-runtime-host-services.Validation
pnpm checkpasses locallyCONTRIBUTING.mdAgent-run checks (for reference, not a substitute for the boxes above):
pnpm checkpassed. Its only output was an existing lint warning in a file this PR does not touch.conversation-turn-game-surface,capability-package-install-refusalandcapability-runtime-host-services.capability-package-lifecycle,capability-package-cache,capability-package-disk-cleanup,capability-persistence-permissions,capability-package-chat-controls,capability-gm-verbs,capability-preview-overlay,capability-release-notes,agent-registry-hydration,agents-see-whispers,character-schedule-ownership,conversation-game-slash,game-tool-controls,game-ruleset-packages,marinara-host-namespace,chat-window-icons,open-issuesandrobustness-runtime-diagnostics.instanceoffrom the install route, and the refusal regression failed with500 !== 409. The turn-game regression counts each surface mount. With the old slot filter, UNO would be mounted twice.Claim boundary (risky work: install/update flow, writes to character data):
[schedule_update]to the character card through the host.ConversationViewsurface mounts;POST /api/capability-packages/:id/install;api.runtime.persistence.updateCharacterStatus.fetchis stubbed to fail).schemaVersion: 1games still declare the slot and are still left out of it, because the filter useskind, not the manifest version.chat-write. None of these changes the card.marinara-capability-eightball[view=surface]elements under the same parent, HTTP 500 for 8 refused installs, and a call'sschedule_updatewiped by the next presence read.Manual verification notes
MARINARA_AGENT_CATALOG_URLpointing at a copy where one package declarescapabilityApi.minor342), click Install or Update in Download Agents. The toast should read "Package requires capability API 1.342; this Engine supports 1.341", not "Internal Server Error".updateCharacterStatusis installed: in a call, have the character change its status (for example, to Do Not Disturb). The presence card should show the new status, keep it after a page reload, and keep it in the character's other Conversation chats until it ends.Docs and release impact
docs-i18nbranch updated to match, or a[docs-i18n]follow-up issue opened (see CONTRIBUTING.md § Translated documentation)Docs for translation:
docs/development/optional-agent-packages.md: one new bullet under "Capability API 1.341: host runtime services and shared server libraries" (runtime.persistence.updateCharacterStatus).No capability API bump, no version bump, no
CHANGELOG.mdedit.UI evidence (if applicable)
None captured: no browser was run for this PR. The board fix only changes which components mount, so the verifier screenshots of two boards (listed in Pasta-Devs/Marinara-Agents#1496) show the before state.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.