mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[GH-ISSUE #3861] [Feature]: Custom agent repo URLs in Agents Manager (feature-flag gated) #2086
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#2086
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 @Gunterlie on GitHub (Jul 20, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/3861
Originally assigned to: @SpicyMarinara on GitHub.
Just fishing for thoughts on this one. Feedback welcome.
What problem does this solve?
Users who write their own custom agents (prompts/tooling defs) currently have no way to share them with others or sync them into the Agents Manager except manual copy/paste. There's no way to point the engine at a repo of custom agent definitions and have it pull them in — and no way to build a wider community around sharing agent setups the way people already share prompts, character cards, and configs elsewhere.
A repo-based flow would let people publish their agent collections on GitHub, point others at the URL, and let it stay in sync as they iterate.
Proposed solution
Core idea: let a user add one or more repo URLs to a list in the Agents Manager. The engine fetches agent definitions from each configured repo and makes them available/installable, similar to how capability packages are installed today. Re-syncing a repo updates the agent configs it previously imported, not just a one-time import — so a repo owner can push an improved prompt or new tool config and everyone subscribed picks it up on next sync.
This turns "custom agent" from a private, per-install thing into something shareable: someone builds a good agent, publishes the repo, and anyone can add the URL and get it (and future updates) without copy/pasting JSON around Discord/forums.
Relationship to the official catalog: community repo URLs stay unmoderated/unvetted by design (see trust warning below), but they can also act as a farm team for the official
Marinara-Agentscatalog. Mari's take is that genuinely good agents should be able to graduate into the curated, PastaDevs-vetted catalog repo — not that every community repo becomes catalog-equal. This issue is just the decentralized add-a-repo mechanism; promotion into the official catalog stays a separate, human-reviewed step (a maintainer pulls in / merges an agent def they've vetted), not something this feature auto-does.Feature flag: because this pulls arbitrary user-supplied remote content into a running instance, it should ship disabled by default and gated behind an env flag (e.g.
ENABLE_CUSTOM_AGENT_REPOS), following the existingisEnabledFlag()pattern used for flags likeIP_ALLOWLIST_ENABLEDinpackages/server/src/config/runtime-config.ts.Implementation path: reuse the existing capability-package pipeline (
packages/server/src/services/capability-packages/package-manager.service.ts):safeFetch()for SSRF-safe outbound requestsadm-zipfor archive extraction, with the existing zip-slip/symlink/size-cap guardspackagedAgentDefinitionSchemafor validating fetched agent JSONNo new git dependency and no
git clone— resolve a repo URL to an archive snapshot instead (e.g. a GitHub codeload zip).Trust/consent UX (mandatory, not optional): any third-party repo/agent is unaffiliated, unreviewed, unmoderated content run against the user's own connections and tools. Before a repo is added, and before each sync that changes an agent, the UI must show an explicit warning along the lines of:
This requires an explicit confirm (not a pre-checked box) to add a repo, plus a lighter-weight "this agent was updated by its remote repo" notice — with a diff/preview, not silent auto-merge — on subsequent syncs.
Key design points to nail down during implementation:
repoUrl+ slug) so re-sync updates existingAgentConfigrows instead of duplicatingAlternatives considered
git cloneof the repo — rejected. Pulls in a new dependency and a much larger attack surface (arbitrary.githooks/submodules) for no benefit over an archive snapshot fetch.Additional context
Related existing systems this should reuse rather than duplicate:
packages/server/src/services/capability-packages/package-manager.service.tspackages/server/src/utils/security.ts(safeFetch)packages/shared/src/schemas/capability-package.schema.ts(packagedAgentDefinitionSchema)packages/server/src/config/runtime-config.ts(isEnabledFlag)ENABLE_CUSTOM_AGENT_REPOSgateTemplate check
@SpicyMarinara commented on GitHub (Jul 20, 2026):
Claiming this for SpicyMarinara. I’ll implement it in a separate, feature-flagged PR against staging with manual-only sync, explicit trust confirmation, SSRF/ZIP/schema validation, stable source identity, and preview-before-apply so remote changes cannot silently overwrite local state.
@SpicyMarinara commented on GitHub (Jul 20, 2026):
Implementation is now tracked in draft PR #3863: https://github.com/Pasta-Devs/Marinara-Engine/pull/3863