mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[GH-ISSUE #7858] [Issue]: Agent packages carry duplicated Engine code: host namespace, runtime services and disk cleanup #4324
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#4324
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 @SpicyMarinara on GitHub (Oct 19, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/7858
Originally assigned to: @SpicyMarinara on GitHub.
Summary
Downloaded agent packages carry their own copies of Engine code, and the Engine keeps more copies of every installed package on disk than it needs. Copies with their own state cause wrong settings, wrong-chat writes, game boards that don't lock and a second Local Model process. The rest wastes disk space.
Expected behavior
Actual behavior
sidecar-config.json(reproduced).client.js, which the server never loads (46–56% of their bytes);Steps to reproduce
DATA_DIR/capability-runtime-snapshots: the killed run's copies are still there, each withclient.js.DATA_DIR/capability-packages/versions/<id>keeps all three versions.Environment
Logs, screenshots, or video
None. The steps above show it.
Additional context
Plan (Engine side; the package rebuild is Pasta-Devs/Marinara-Agents#1487):
globalThis.__MARINARA_HOST__ = { version: 1, ... }, set before any package client loads. It holds the live stores (ui, chat including pending map moves, agent, sidecar, dialog, gallery, encounter, game state, backfill), the TTS and dialog services, the shared libraries (React, React DOM, React Query, zustand, sonner, zod, i18next, react-i18next, framer-motion, tailwind-merge, clsx), the QueryClient, Modal, the emoji catalog and the API client. The guard against older packages' settings writes stays.api.runtimemembers (services.get,commands,integrations.haptics,integrations.spotify,integrations.admission, local Whisper, chat-gallery writes and patch-style chat writes) and capability API 1.341. Package servers load shared libraries from the Engine'snode_modules, and a moved install relinks that folder.client.jsout of runtime copies; keep only the current and previous version of each package. User data, chats and package data folders are never touched.Template check
Please uncheck (untick) the box below before submitting so we know you read the template. It is intentionally pre-checked:
@SpicyMarinara commented on GitHub (Oct 20, 2026):
The client part is done on staging by #7869: the
globalThis.__MARINARA_HOST__namespace, the UI settings guard, and app dialogs on the top layer. This issue stays open for the other two Engine parts, #7868 (runtime services and the capability API bump) and #7870 (package disk cleanup), and then the Agents rebuild (Pasta-Devs/Marinara-Agents#1487).@SpicyMarinara commented on GitHub (Oct 20, 2026):
Disk-cleanup part done on staging by #7870. The client namespace part is on staging through #7869. This issue stays open until the runtime-services part (#7868) is on staging too.
@SpicyMarinara commented on GitHub (Oct 20, 2026):
Done on staging by #7868.