[GH-ISSUE #1487] [Issue]: Packages carry copies of Engine server services, libraries and styles (beyond #1478) #754

Closed
opened 2026-10-20 17:30:25 +07:00 by bsakaguchi · 1 comment
Owner

Originally created by @SpicyMarinara on GitHub (Oct 19, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Agents/issues/1487

Originally assigned to: @SpicyMarinara on GitHub.

Summary

Pasta-Devs/Marinara-Agents#1478 covers one copy: the Engine's UI settings store inside nine package clients. The packages carry many more copies of Engine code. Some of them have their own state and break things for users; the rest only cost download and disk space.

Affected package

  • Server copies with their own state: conversation-calls 1.1.4, noodle 1.5.6, slurp2 0.3.49.
  • Client store copies: chess, eightball, poker, rock-paper-scissors, tic-tac-toe and uno 1.0.5, conversation-calls 1.1.4, noodle 1.5.6, slurp2 0.3.49, and hierarchical-maps 1.5.1 (its own copy of the Engine's pending map moves).
  • Library and stylesheet copies: the 12 React packages above plus long-term-memory and memory-nag.

Expected behavior

  • A package uses the Engine's own Local Model, connection queue, ChatGPT login, chat saving, haptics, Spotify, logger, dialogs, toasts, stores and libraries. There is one of each.
  • Changing a setting in a package changes the chat you are looking at.
  • Installed agents do not carry the Engine's code, libraries or stylesheet.

Actual behavior

From the audit of every catalog package (traced in code unless marked reproduced):

  • Calls, Noodle and Slurp each run their own copy of the Engine's Local Model manager. Noodle image captioning and the Noodle and Slurp picture-prompt rewrite can start a second llama-server and load the model again. Every Engine start rewrites models/sidecar-config.json with the copy's older rules (reproduced).
  • Their own connection queue: Noodle's refresh and Slurp's background jobs don't wait for the chat you are replying in. 23 Slurp files create providers directly.
  • Their own ChatGPT login refresh: up to four copies can refresh the same token at once, which can force a new login.
  • Their own chat-save queue: Calls saves character schedules by overwriting the chat's whole metadata, so a change the Engine saves at the same time can be lost.
  • Calls has its own haptics client (a second Intiface connection), its own Spotify token lock and media queue.
  • Slurp's "lately" lookup in Long-Term Memory always comes back empty, because it asks its own empty service list.
  • Calls ignores command tags that other packages register ([chess], [uno] and so on).
  • Client: the Calls connection switcher and the sticker and emoji settings in Calls, Noodle and Slurp change the chat that was open when the page loaded. Game boards never lock while the character replies. Calls' [youtube] command does nothing, its sticker dialogs never open and it never offers Local Model. There are 12 React Query caches, about 10 toast stacks, and Escape can close a package dialog and an Engine dialog at once.
  • Size: the 16 code packages ship 26.25 MB of code. About 16.2 MB is a copy of something the Engine already has: libraries 9.3 MB (React 12 times, the Claude Agent SDK 3 times at 3.9 MB, zod, React Query, sonner), the Engine's shared package 2.0 MB, Engine client code 1.36 MB, Engine server code 1.48 MB, and the Engine's stylesheet compiled into Noodle and Slurp, about 1.9 MB.

Steps to reproduce

  1. Unpack artifacts/conversation-calls-1.1.4.zip, noodle-1.5.6.zip or slurp2-0.3.49.zip and search server.mjs for sidecar-config.json, llama-server and CLAUDE_CODE_ENTRYPOINT.
  2. Import one of those server.mjs files with DATA_DIR set: models/sidecar-config.json is rewritten before the package is activated.
  3. Unpack any game's client.js and search for marinara-active-chat-id: the copy of the chat store reads the open chat once, when the page loads.

Environment

  • Marinara Engine version: 2.5.0 and staging
  • Package version: listed above
  • Install type: source
  • OS + version: macOS
  • Browser or app shell: Chromium (Playwright)

Logs, screenshots, or video

None. The steps above show it.

Additional context

Plan, in one rebuild per package after the Engine side lands (Pasta-Devs/Marinara-Engine#7858):

  • Client: build overlays replace the Engine's stores, TTS, dialogs, Modal, emoji catalog and API client with adapters to the Engine's globalThis.__MARINARA_HOST__. The ui and chat adapters keep a read-only copy that never writes when the Engine has none. An esbuild plugin points React, React Query, zustand, sonner, zod, i18next, react-i18next, framer-motion, tailwind-merge and clsx at the Engine's copies, and the build fails if a package imports a name the Engine's copy does not export. Packages use the Engine's QueryClient and toasts, and Noodle and Slurp stop rendering their own dialogs.
  • During a call, the connection switcher and emoji settings use the call's chat. Noodle and Slurp hide the chat-scoped emoji settings.
  • Server: overlays send Local Model, Whisper, provider creation, the connection queue, chat writes, images, haptics, Spotify, command tags, the service lookup and logging to api.runtime. When the Engine has no such member, the feature reports that it is unavailable; a package never falls back to its own copy.
  • zod, adm-zip, dotenv, nanoid and jsonrepair become externals that load from the Engine. Noodle and Slurp build their stylesheet from their own sources only. The shared package is tree-shaken.
  • Gates: CI fails on writes to Engine-owned storage keys, on Engine stores or libraries inside a bundle, and on new server copies.
  • Every rebuilt package requires the new capability API. Older Engines never install them and keep the version they already have.

Template check

Please uncheck (untick) the box below before submitting so we know you read the template. It is intentionally pre-checked:

  • I DID NOT read this template and provide the requested details.
Originally created by @SpicyMarinara on GitHub (Oct 19, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Agents/issues/1487 Originally assigned to: @SpicyMarinara on GitHub. ## Summary Pasta-Devs/Marinara-Agents#1478 covers one copy: the Engine's UI settings store inside nine package clients. The packages carry many more copies of Engine code. Some of them have their own state and break things for users; the rest only cost download and disk space. ## Affected package - Server copies with their own state: `conversation-calls` 1.1.4, `noodle` 1.5.6, `slurp2` 0.3.49. - Client store copies: `chess`, `eightball`, `poker`, `rock-paper-scissors`, `tic-tac-toe` and `uno` 1.0.5, `conversation-calls` 1.1.4, `noodle` 1.5.6, `slurp2` 0.3.49, and `hierarchical-maps` 1.5.1 (its own copy of the Engine's pending map moves). - Library and stylesheet copies: the 12 React packages above plus `long-term-memory` and `memory-nag`. ## Expected behavior - A package uses the Engine's own Local Model, connection queue, ChatGPT login, chat saving, haptics, Spotify, logger, dialogs, toasts, stores and libraries. There is one of each. - Changing a setting in a package changes the chat you are looking at. - Installed agents do not carry the Engine's code, libraries or stylesheet. ## Actual behavior From the audit of every catalog package (traced in code unless marked reproduced): - Calls, Noodle and Slurp each run their own copy of the Engine's Local Model manager. Noodle image captioning and the Noodle and Slurp picture-prompt rewrite can start a second llama-server and load the model again. Every Engine start rewrites `models/sidecar-config.json` with the copy's older rules (reproduced). - Their own connection queue: Noodle's refresh and Slurp's background jobs don't wait for the chat you are replying in. 23 Slurp files create providers directly. - Their own ChatGPT login refresh: up to four copies can refresh the same token at once, which can force a new login. - Their own chat-save queue: Calls saves character schedules by overwriting the chat's whole metadata, so a change the Engine saves at the same time can be lost. - Calls has its own haptics client (a second Intiface connection), its own Spotify token lock and media queue. - Slurp's "lately" lookup in Long-Term Memory always comes back empty, because it asks its own empty service list. - Calls ignores command tags that other packages register (`[chess]`, `[uno]` and so on). - Client: the Calls connection switcher and the sticker and emoji settings in Calls, Noodle and Slurp change the chat that was open when the page loaded. Game boards never lock while the character replies. Calls' `[youtube]` command does nothing, its sticker dialogs never open and it never offers Local Model. There are 12 React Query caches, about 10 toast stacks, and Escape can close a package dialog and an Engine dialog at once. - Size: the 16 code packages ship 26.25 MB of code. About 16.2 MB is a copy of something the Engine already has: libraries 9.3 MB (React 12 times, the Claude Agent SDK 3 times at 3.9 MB, zod, React Query, sonner), the Engine's shared package 2.0 MB, Engine client code 1.36 MB, Engine server code 1.48 MB, and the Engine's stylesheet compiled into Noodle and Slurp, about 1.9 MB. ## Steps to reproduce 1. Unpack `artifacts/conversation-calls-1.1.4.zip`, `noodle-1.5.6.zip` or `slurp2-0.3.49.zip` and search `server.mjs` for `sidecar-config.json`, `llama-server` and `CLAUDE_CODE_ENTRYPOINT`. 2. Import one of those `server.mjs` files with `DATA_DIR` set: `models/sidecar-config.json` is rewritten before the package is activated. 3. Unpack any game's `client.js` and search for `marinara-active-chat-id`: the copy of the chat store reads the open chat once, when the page loads. ## Environment - Marinara Engine version: 2.5.0 and staging - Package version: listed above - Install type: source - OS + version: macOS - Browser or app shell: Chromium (Playwright) ## Logs, screenshots, or video None. The steps above show it. ## Additional context Plan, in one rebuild per package after the Engine side lands (Pasta-Devs/Marinara-Engine#7858): - Client: build overlays replace the Engine's stores, TTS, dialogs, Modal, emoji catalog and API client with adapters to the Engine's `globalThis.__MARINARA_HOST__`. The ui and chat adapters keep a read-only copy that never writes when the Engine has none. An esbuild plugin points React, React Query, zustand, sonner, zod, i18next, react-i18next, framer-motion, tailwind-merge and clsx at the Engine's copies, and the build fails if a package imports a name the Engine's copy does not export. Packages use the Engine's QueryClient and toasts, and Noodle and Slurp stop rendering their own dialogs. - During a call, the connection switcher and emoji settings use the call's chat. Noodle and Slurp hide the chat-scoped emoji settings. - Server: overlays send Local Model, Whisper, provider creation, the connection queue, chat writes, images, haptics, Spotify, command tags, the service lookup and logging to `api.runtime`. When the Engine has no such member, the feature reports that it is unavailable; a package never falls back to its own copy. - zod, adm-zip, dotenv, nanoid and jsonrepair become externals that load from the Engine. Noodle and Slurp build their stylesheet from their own sources only. The shared package is tree-shaken. - Gates: CI fails on writes to Engine-owned storage keys, on Engine stores or libraries inside a bundle, and on new server copies. - Every rebuilt package requires the new capability API. Older Engines never install them and keep the version they already have. ## Template check Please **uncheck (untick)** the box below before submitting so we know you read the template. It is intentionally pre-checked: - [ ] I DID NOT read this template and provide the requested details.
Author
Owner

@SpicyMarinara commented on GitHub (Oct 20, 2026):

Done on staging by #1494.

<!-- gh-comment-id:6290818873 --> @SpicyMarinara commented on GitHub (Oct 20, 2026): Done on staging by #1494.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Pasta-Devs/Marinara-Agents#754
No description provided.