[GH-ISSUE #6385] Packages vendor 363 Engine files and ship stale forks of live services #3570

Closed
opened 2026-10-21 06:04:24 +07:00 by bsakaguchi · 1 comment
Owner

Originally created by @Gunterlie on GitHub (Sep 19, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/6385

Originally assigned to: @Gunterlie on GitHub.

Problem

Downloadable Agent packages cannot reach Engine functionality at runtime unless it is on the package host API. Today that API is narrow: registerService, registerPromptContext, registerPrivilegedRoutes, runInternalRoute, registerTables.

Everything else a package needs has to be inlined at build time. The Marinara-Agents repository therefore keeps a vendored snapshot of Engine sources in sources/engine/, and three shipped packages — slurp2, noodle and legacy slurp — bundle from it.

That snapshot does not refresh on its own, so the packages ship stale forks of live Engine code with no signal.

Measured today

Vendored Engine files 363 (6.6 MB)
Server services alone 52,170 lines
Differing from Engine staging 187 of 363
Present in the snapshot but deleted from staging 72
Engine commits since 2026-09-01 touching vendored service paths 89
…of those touching image generation or LLM providers 36

The largest copies are not helpers. They are live integrations:

Vendored file Lines Lines differing from staging
services/image/image-generation.ts 3450 809
services/llm/providers/openai.provider.ts 2481 786
services/video/video-generation.ts 1889 535

Plus the chats, characters and lorebooks storage layers.

What this costs, concretely

A user reported that Slurp images were missing the SwarmUI fixes from #6359, because the vendored image-generation.ts predated it: buildSwarmUiGenerationBody returned the body before attaching LoRAs or reference images whenever no custom ComfyUI workflow was set. Both were silently dropped for every Slurp user.

It was found by a user, not by CI. It was fixed by hand-backporting two hunks into the snapshot (Pasta-Devs/Marinara-Agents#954). Every future Engine image or provider fix needs the same manual backport, per package, or it never reaches users.

The 72 deleted files are also still shipping to users as dead code.

Proposal

Expose the integration services on the package host API, the way backup already is exposed as a capability service, so packages call them instead of copying them:

  • image generation
  • LLM providers and generation plumbing
  • video generation

Packages would then inherit Engine fixes automatically, with no snapshot and no backports. It also shrinks bundles substantially: slurp2's server.mjs is 3.00 MB today and is mostly inlined Engine service code.

Scope note

Inlining is not wrong in itself. A package must run inside whatever Engine version the user has installed, so it has to be self-contained, and inlining pure types, constants and helpers is fine — they rarely change meaning. The problem is specifically vendoring stateful integration services where the Engine is the live source of truth and fixes land continuously.

A companion issue on Marinara-Agents covers the detection half: a CI gate that fails when a vendored file drifts from Engine staging or no longer exists there.

Originally created by @Gunterlie on GitHub (Sep 19, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/6385 Originally assigned to: @Gunterlie on GitHub. ## Problem Downloadable Agent packages cannot reach Engine functionality at runtime unless it is on the package host API. Today that API is narrow: `registerService`, `registerPromptContext`, `registerPrivilegedRoutes`, `runInternalRoute`, `registerTables`. Everything else a package needs has to be inlined at build time. The Marinara-Agents repository therefore keeps a vendored snapshot of Engine sources in `sources/engine/`, and three shipped packages — `slurp2`, `noodle` and legacy `slurp` — bundle from it. That snapshot does not refresh on its own, so the packages ship stale forks of live Engine code with no signal. ## Measured today | | | | --- | --- | | Vendored Engine files | 363 (6.6 MB) | | Server services alone | 52,170 lines | | Differing from Engine `staging` | 187 of 363 | | Present in the snapshot but deleted from `staging` | 72 | | Engine commits since 2026-09-01 touching vendored service paths | 89 | | …of those touching image generation or LLM providers | 36 | The largest copies are not helpers. They are live integrations: | Vendored file | Lines | Lines differing from `staging` | | --- | --- | --- | | `services/image/image-generation.ts` | 3450 | 809 | | `services/llm/providers/openai.provider.ts` | 2481 | 786 | | `services/video/video-generation.ts` | 1889 | 535 | Plus the chats, characters and lorebooks storage layers. ## What this costs, concretely A user reported that Slurp images were missing the SwarmUI fixes from #6359, because the vendored `image-generation.ts` predated it: `buildSwarmUiGenerationBody` returned the body before attaching LoRAs or reference images whenever no custom ComfyUI workflow was set. Both were silently dropped for every Slurp user. It was found by a user, not by CI. It was fixed by hand-backporting two hunks into the snapshot (Pasta-Devs/Marinara-Agents#954). Every future Engine image or provider fix needs the same manual backport, per package, or it never reaches users. The 72 deleted files are also still shipping to users as dead code. ## Proposal Expose the integration services on the package host API, the way backup already is exposed as a capability service, so packages call them instead of copying them: - image generation - LLM providers and generation plumbing - video generation Packages would then inherit Engine fixes automatically, with no snapshot and no backports. It also shrinks bundles substantially: `slurp2`'s `server.mjs` is 3.00 MB today and is mostly inlined Engine service code. ## Scope note Inlining is not wrong in itself. A package must run inside whatever Engine version the user has installed, so it has to be self-contained, and inlining pure types, constants and helpers is fine — they rarely change meaning. The problem is specifically vendoring stateful integration services where the Engine is the live source of truth and fixes land continuously. A companion issue on Marinara-Agents covers the detection half: a CI gate that fails when a vendored file drifts from Engine `staging` or no longer exists there.
Author
Owner

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

Codex is handling this for @SpicyMarinara as part of the sweep; no linked implementation PR was present when work began. I am exposing typed entrypoints backed by the current Engine image/video/LLM implementations and will migrate the three package consumers in Marinara-Agents. The detection half is underway in Pasta-Devs/Marinara-Agents#967. I will preserve provider admission, fallback, network checks and debug prompt logging, and verify the actual package calls before closing this issue.

<!-- gh-comment-id:5749378288 --> @SpicyMarinara commented on GitHub (Sep 20, 2026): Codex is handling this for @SpicyMarinara as part of the sweep; no linked implementation PR was present when work began. I am exposing typed entrypoints backed by the current Engine image/video/LLM implementations and will migrate the three package consumers in Marinara-Agents. The detection half is underway in Pasta-Devs/Marinara-Agents#967. I will preserve provider admission, fallback, network checks and debug prompt logging, and verify the actual package calls before closing this issue.
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-Engine#3570
No description provided.