[PR #3863] [MERGED] feat: add feature-gated custom agent repositories #6133

Closed
opened 2026-10-23 04:07:23 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/3863
Author: @SpicyMarinara
Created: 7/20/2026
Status: ✅ Merged
Merged: 7/20/2026
Merged by: @SpicyMarinara

Base: staging ← Head: feature/3861-custom-agent-repositories


📝 Commits (6)

  • efdcd7f chore: start custom agent repository support
  • 4dd25ed feat: add custom agent repository syncing
  • 9967c9a Merge remote-tracking branch 'origin/staging' into feature/3861-custom-agent-repositories
  • 0debef1 Merge remote-tracking branch 'origin/staging' into feature/3861-custom-agent-repositories
  • 5fd4ecc Merge remote-tracking branch 'origin/staging' into feature/3861-custom-agent-repositories
  • 60ceabb Address custom repository review feedback

📊 Changes

17 files changed (+1159 additions, -13 deletions)

View changed files

📝 .env.example (+2 -0)
📝 CHANGELOG.md (+1 -0)
📝 docs/CONFIGURATION.md (+23 -0)
📝 e2e/core-flows.e2e.ts (+52 -0)
📝 package.json (+2 -0)
📝 packages/client/src/components/agents/AgentCatalogView.tsx (+17 -0)
➕ packages/client/src/components/agents/CustomAgentRepositoriesModal.tsx (+330 -0)
➕ packages/client/src/hooks/use-custom-agent-repositories.ts (+73 -0)
📝 packages/server/src/config/runtime-config.ts (+4 -0)
➕ packages/server/src/routes/custom-agent-repositories.routes.ts (+104 -0)
📝 packages/server/src/routes/index.ts (+2 -0)
➕ packages/server/src/services/agents/custom-agent-repositories.service.ts (+417 -0)
📝 packages/server/src/services/capability-packages/package-manager.service.ts (+17 -12)
📝 packages/server/src/utils/security.ts (+9 -0)
📝 packages/shared/src/schemas/capability-package.schema.ts (+31 -0)
📝 pnpm-lock.yaml (+6 -0)
📝 scripts/regressions/open-issues.regression.ts (+69 -1)

📄 Description

Why

Users who intentionally opt into third-party agent repositories need a controlled way to preview and manually synchronize agent definitions without mixing them into the official catalog or allowing silent remote overwrites.

Closes #3861

What changed

  • Added a disabled-by-default ENABLE_CUSTOM_AGENT_REPOS gate and a separate Custom Sources surface in Agents Manager.
  • Accepts public GitHub repository-root URLs only, with redirect-host restrictions, bounded downloads/archives, safe archive paths, and strict agents.json validation.
  • Shows agent-by-agent prompts, settings, tools, and change summaries before anything is applied.
  • Requires explicit trust confirmation on initial import and whenever a later manual sync would change managed content.
  • Uses stable repository-plus-agent identity; remote managed fields win on sync while local connection/artwork choices and removed agents remain available.
  • Documents the repository format, trust model, feature flag, and manual-only synchronization behavior.

Validation performed

  • pnpm check
  • pnpm build:shared && pnpm regression:issues
  • Targeted Playwright catalog/custom-source flow on desktop Chromium and mobile Chromium (2 passed)
  • git diff --check

Manual verification

  • Manually verify the disabled state and opt-in Agents Manager flow in browser.
  • Manually verify add/sync trust prompts against a real public repository.
  • Manually verify repository removal keeps imported agents and their local state.

Summary by CodeRabbit

  • New Features

    • Added support for custom GitHub agent repositories in Agents Manager.
    • Preview repository agents and review detected additions, updates, and removals before applying changes.
    • Import, sync, and remove repositories with explicit trust confirmation.
    • Custom repositories are disabled by default and can be enabled through configuration.
  • Security

    • Added repository and archive validation, including hostname restrictions and SSRF protections.
  • Documentation

    • Added configuration guidance and changelog details for custom agent repositories.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Pasta-Devs/Marinara-Engine/pull/3863 **Author:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Created:** 7/20/2026 **Status:** ✅ Merged **Merged:** 7/20/2026 **Merged by:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Base:** `staging` ← **Head:** `feature/3861-custom-agent-repositories` --- ### 📝 Commits (6) - [`efdcd7f`](https://github.com/Pasta-Devs/Marinara-Engine/commit/efdcd7f069d3d168233776b3467c9b5ac52529bb) chore: start custom agent repository support - [`4dd25ed`](https://github.com/Pasta-Devs/Marinara-Engine/commit/4dd25edacdf61495cd9e93f68f9b7f040b0bc3e8) feat: add custom agent repository syncing - [`9967c9a`](https://github.com/Pasta-Devs/Marinara-Engine/commit/9967c9a18f0f654a746053e08362d635699da013) Merge remote-tracking branch 'origin/staging' into feature/3861-custom-agent-repositories - [`0debef1`](https://github.com/Pasta-Devs/Marinara-Engine/commit/0debef10a2ce82bb7894cd7de61c41e7b55cfba6) Merge remote-tracking branch 'origin/staging' into feature/3861-custom-agent-repositories - [`5fd4ecc`](https://github.com/Pasta-Devs/Marinara-Engine/commit/5fd4eccd607b7eb65ad5ca2693a0e488e7a0dac1) Merge remote-tracking branch 'origin/staging' into feature/3861-custom-agent-repositories - [`60ceabb`](https://github.com/Pasta-Devs/Marinara-Engine/commit/60ceabbd1b2a60b687593e1aaaa19594c8ac9a76) Address custom repository review feedback ### 📊 Changes **17 files changed** (+1159 additions, -13 deletions) <details> <summary>View changed files</summary> 📝 `.env.example` (+2 -0) 📝 `CHANGELOG.md` (+1 -0) 📝 `docs/CONFIGURATION.md` (+23 -0) 📝 `e2e/core-flows.e2e.ts` (+52 -0) 📝 `package.json` (+2 -0) 📝 `packages/client/src/components/agents/AgentCatalogView.tsx` (+17 -0) ➕ `packages/client/src/components/agents/CustomAgentRepositoriesModal.tsx` (+330 -0) ➕ `packages/client/src/hooks/use-custom-agent-repositories.ts` (+73 -0) 📝 `packages/server/src/config/runtime-config.ts` (+4 -0) ➕ `packages/server/src/routes/custom-agent-repositories.routes.ts` (+104 -0) 📝 `packages/server/src/routes/index.ts` (+2 -0) ➕ `packages/server/src/services/agents/custom-agent-repositories.service.ts` (+417 -0) 📝 `packages/server/src/services/capability-packages/package-manager.service.ts` (+17 -12) 📝 `packages/server/src/utils/security.ts` (+9 -0) 📝 `packages/shared/src/schemas/capability-package.schema.ts` (+31 -0) 📝 `pnpm-lock.yaml` (+6 -0) 📝 `scripts/regressions/open-issues.regression.ts` (+69 -1) </details> ### 📄 Description ## Why Users who intentionally opt into third-party agent repositories need a controlled way to preview and manually synchronize agent definitions without mixing them into the official catalog or allowing silent remote overwrites. Closes #3861 ## What changed - Added a disabled-by-default `ENABLE_CUSTOM_AGENT_REPOS` gate and a separate Custom Sources surface in Agents Manager. - Accepts public GitHub repository-root URLs only, with redirect-host restrictions, bounded downloads/archives, safe archive paths, and strict `agents.json` validation. - Shows agent-by-agent prompts, settings, tools, and change summaries before anything is applied. - Requires explicit trust confirmation on initial import and whenever a later manual sync would change managed content. - Uses stable repository-plus-agent identity; remote managed fields win on sync while local connection/artwork choices and removed agents remain available. - Documents the repository format, trust model, feature flag, and manual-only synchronization behavior. ## Validation performed - `pnpm check` - `pnpm build:shared && pnpm regression:issues` - Targeted Playwright catalog/custom-source flow on desktop Chromium and mobile Chromium (2 passed) - `git diff --check` ## Manual verification - [ ] Manually verify the disabled state and opt-in Agents Manager flow in browser. - [ ] Manually verify add/sync trust prompts against a real public repository. - [ ] Manually verify repository removal keeps imported agents and their local state. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added support for custom GitHub agent repositories in Agents Manager. * Preview repository agents and review detected additions, updates, and removals before applying changes. * Import, sync, and remove repositories with explicit trust confirmation. * Custom repositories are disabled by default and can be enabled through configuration. * **Security** * Added repository and archive validation, including hostname restrictions and SSRF protections. * **Documentation** * Added configuration guidance and changelog details for custom agent repositories. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-23 04:07:23 +07:00
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#6133
No description provided.