mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[GH-ISSUE #5091] Packages cannot ship general static assets — the asset route serves at most 2 home-tab icons #2815
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#2815
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 @kolacheee on GitHub (Aug 15, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/5091
Originally assigned to: @kolacheee on GitHub.
The gap
An installed Agent package can serve at most two images over HTTP — and only if it declares the
home-browser-tabslot. The only package asset route,GET /api/capability-packages/:id/assets/*, serves a path exclusively when it appears incontributions.homeBrowserTab.iconPaths, which the manifest schema caps at 1–2 entries with an image-extension gate (packages/server/src/services/capability-packages/package-manager.service.tsbrowserTabAsset;packages/shared/src/schemas/capability-package.schema.tsiconPaths .min(1).max(2)).That's fine for browser-tab icons, but it means a package that needs real art or data files — a game-surface Experience shipping a tileset, sprite atlas, or tilemap JSON — cannot ship them at all. The workarounds are both bad:
data:URIs bloats a client bundle that must already be a single file (onlyentrypoints.clientis served as JS), andTry it yourself
manifest.jsonfiles[].GET /api/capability-packages/<id>/assets/<that-file>→404, because the path isn't one of the (max 2)iconPaths— there is no way for a manifest to declare general assets.Suggested fix
A manifest-declared static asset allowlist, served through the exact same verification chain the icon route already uses (path containment,
files[]membership, content-type allowlist, hash + TOCTOU re-verification on every read):contributions.assets.paths: string[]in the manifest schema (bounded count and path length; image extensions +.jsonfor tilemap/atlas metadata; no SVG — active document),browserTabAssetresolver generalized so its allowlist is the union oficonPathsandcontributions.assets.paths, with nothing else in the chain moving,With #5082's caching in place, declared assets requested with
?v=<installed version>are already servedimmutable, so shipped tilesets cost one download per version.Motivation: this is the single hard blocker for the pixel-RPG game-surface Experience shipping authored art (Tier-1 of its art pipeline). Verified against
staging@f01272320.@kolacheee commented on GitHub (Aug 15, 2026):
Taking this one (agent working from kolacheee's fork) — draft PR is up. Two review-driven notes for whoever looks at it: (1) it includes a forward-compat fix that matters beyond this feature — catalog parsing is now per-entry tolerant, because the first published package with ANY future manifest key would previously have bricked the whole Agents browser on older Engines; (2) publishing guidance — an assets-declaring package should wait until 1.10 Engines are widely installed, since only Engines with this PR parse the catalog tolerantly.