[PR #4493] [MERGED] Fix Docker proxy settings, agent removal, prompts, tools, and character macros #6400

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

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/4493
Author: @SpicyMarinara
Created: 8/3/2026
Status: ✅ Merged
Merged: 8/3/2026
Merged by: @SpicyMarinara

Base: staging ← Head: agent/fix-open-issues-4492


📝 Commits (6)

  • f51b669 chore: start open issue sweep
  • 0234e08 fix: address assigned issue sweep
  • debd71f docs: clarify privileged Docker sandbox runtime
  • c2fd7a9 fix: address review feedback
  • c3a4d09 test: cover character reference cap
  • 0fbc166 fix: serialize summary prompt saves

📊 Changes

27 files changed (+653 additions, -160 deletions)

View changed files

📝 Dockerfile (+1 -0)
📝 docker-compose.yml (+3 -0)
📝 docs/TROUBLESHOOTING.md (+18 -1)
📝 docs/extending/personal-extensions.md (+3 -0)
📝 docs/prompts/macros.md (+2 -2)
📝 packages/client/src/components/chat/SummaryPopover.tsx (+118 -35)
📝 packages/client/src/components/panels/AgentsPanel.tsx (+117 -59)
📝 packages/client/src/localization/locales/en.json (+10 -1)
📝 packages/server/src/routes/chats.routes.ts (+15 -18)
📝 packages/server/src/services/capability-packages/package-manager.service.ts (+1 -1)
📝 packages/server/src/services/extensions/personal-extension-sandbox.ts (+8 -8)
📝 packages/server/src/services/generation/roleplay-summary-runtime.ts (+5 -0)
📝 packages/server/src/services/generation/tool-resolution-runtime.ts (+6 -3)
📝 packages/server/src/services/professor-mari/workspace-shell-sandbox.ts (+8 -15)
📝 packages/server/src/services/prompt/assembler.ts (+52 -2)
📝 packages/server/src/services/prompt/macro-context.ts (+7 -3)
📝 packages/server/src/services/prompt/marker-expander.ts (+9 -0)
➕ packages/server/src/services/sandbox/bubblewrap-runtime.ts (+54 -0)
📝 packages/shared/src/constants/agent-prompts.ts (+4 -0)
📝 packages/shared/src/features/agents/agent-manifest.types.ts (+2 -0)

...and 7 more files

📄 Description

Linked issues

Closes #4456
Closes #4485
Closes #4486
Closes #4487
Closes #4488
Closes #4492

Follow-up: #4494

Why this change

The assigned reports exposed focused gaps in Docker configuration, downloaded-agent lifecycle handling, summary prompt control, Music DJ tool ownership, and character-card reference macros. These fixes keep each behavior close to its existing implementation while adding regression proof and user guidance.

What changed

  • Forward reverse-proxy trust and origin variables through the stock Compose service.
  • Bundle Bubblewrap in the official image, probe whether it can actually create its sandbox, and document the least-privileged Docker default plus the explicit privileged override.
  • Expose downloaded package ownership in the agent registry so sidebar and batch removal uninstall the package instead of only hiding its configuration.
  • Add an editable combine-summary prompt beside the existing summary prompt settings.
  • Keep Spotify tools out of the default chat-function set unless Music DJ or an explicit tool selection owns them.
  • Resolve direct 21-character card-ID macros from chat and activated lorebook entries, inject the requested card fields into system context, and clarify that literal angle brackets are not used.
  • Add targeted regression coverage for each server/runtime path.

Validation performed

  • pnpm check
  • Prompt regression suite
  • Open-issues regression suite
  • Capability-package lifecycle regression
  • Request Host security regression
  • Personal Extension sandbox regression
  • Professor Mari shell sandbox regression
  • Localization key-reference regression
  • Documentation language regression
  • Full Playwright smoke: 183 passed, 96 skipped; three unrelated baseline failures reproduced outside changed files:
    • current v2.4.1 fallback conflicts with stale v2.4.0 What's New assertions on desktop and mobile
    • an existing CharactersPanel row label intercepts its add-action button, including in an isolated one-worker rerun

Manual verification

  • Manually verify reverse-proxy environment forwarding with Docker Compose.
  • Manually verify the documented privileged Docker sandbox override on Linux.
  • Manually remove a downloaded agent from the sidebar and confirm the package returns to the Download Agents catalog.
  • Manually edit the combine-summary prompt and merge summaries.
  • Manually use a direct character-ID macro in chat and in an activated lorebook entry.

Contributor checklist

  • pnpm check passes locally
  • Container (Docker / Podman) built and ran without issue
  • Ran the app, clicked through the changes manually
  • Checked edge cases (light + dark mode, mobile viewport, empty states, error paths)
  • Above manual verification completed
  • Read and followed CONTRIBUTING.md

Docs and release impact

  • No docs changes needed
  • Updated docs as needed
  • Translated docs on the docs-i18n branch updated to match, or a [docs-i18n] follow-up issue opened
  • Version/release files updated (only if this PR includes a version bump)

Docs were updated in this PR; translation follow-up #4494 is open. No version bump is included.

Summary by CodeRabbit

  • New Features

    • Customize how chat summaries are combined through prompt settings.
    • Character references in lorebooks now provide richer context, including example dialogue.
    • Remove agents and their associated capability packages.
    • Configure trusted hosts, CORS origins, and CSRF origins in Docker deployments.
    • Spotify tools are disabled by default in chats.
  • Bug Fixes

    • Improved character-card macro resolution, summary prompt defaults, and token handling.
    • Enhanced sandbox availability reporting and Docker support.
  • Documentation

    • Added Docker and Android platform guidance, sandbox troubleshooting, and security considerations.

🔄 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/4493 **Author:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Created:** 8/3/2026 **Status:** ✅ Merged **Merged:** 8/3/2026 **Merged by:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Base:** `staging` ← **Head:** `agent/fix-open-issues-4492` --- ### 📝 Commits (6) - [`f51b669`](https://github.com/Pasta-Devs/Marinara-Engine/commit/f51b66997d3b9f7caff72291b19ad95d81a0876e) chore: start open issue sweep - [`0234e08`](https://github.com/Pasta-Devs/Marinara-Engine/commit/0234e08bc15df0fc801f51ec00afb8d3bbb09609) fix: address assigned issue sweep - [`debd71f`](https://github.com/Pasta-Devs/Marinara-Engine/commit/debd71f6e45784da81c35c3e377ff2f37cda3e87) docs: clarify privileged Docker sandbox runtime - [`c2fd7a9`](https://github.com/Pasta-Devs/Marinara-Engine/commit/c2fd7a9f5338750a3f93f9c664499dcfcbe47f7f) fix: address review feedback - [`c3a4d09`](https://github.com/Pasta-Devs/Marinara-Engine/commit/c3a4d09895025bcd343e9b8c4120b73b141c7554) test: cover character reference cap - [`0fbc166`](https://github.com/Pasta-Devs/Marinara-Engine/commit/0fbc1660c551f184e5635da969b374971e397643) fix: serialize summary prompt saves ### 📊 Changes **27 files changed** (+653 additions, -160 deletions) <details> <summary>View changed files</summary> 📝 `Dockerfile` (+1 -0) 📝 `docker-compose.yml` (+3 -0) 📝 `docs/TROUBLESHOOTING.md` (+18 -1) 📝 `docs/extending/personal-extensions.md` (+3 -0) 📝 `docs/prompts/macros.md` (+2 -2) 📝 `packages/client/src/components/chat/SummaryPopover.tsx` (+118 -35) 📝 `packages/client/src/components/panels/AgentsPanel.tsx` (+117 -59) 📝 `packages/client/src/localization/locales/en.json` (+10 -1) 📝 `packages/server/src/routes/chats.routes.ts` (+15 -18) 📝 `packages/server/src/services/capability-packages/package-manager.service.ts` (+1 -1) 📝 `packages/server/src/services/extensions/personal-extension-sandbox.ts` (+8 -8) 📝 `packages/server/src/services/generation/roleplay-summary-runtime.ts` (+5 -0) 📝 `packages/server/src/services/generation/tool-resolution-runtime.ts` (+6 -3) 📝 `packages/server/src/services/professor-mari/workspace-shell-sandbox.ts` (+8 -15) 📝 `packages/server/src/services/prompt/assembler.ts` (+52 -2) 📝 `packages/server/src/services/prompt/macro-context.ts` (+7 -3) 📝 `packages/server/src/services/prompt/marker-expander.ts` (+9 -0) ➕ `packages/server/src/services/sandbox/bubblewrap-runtime.ts` (+54 -0) 📝 `packages/shared/src/constants/agent-prompts.ts` (+4 -0) 📝 `packages/shared/src/features/agents/agent-manifest.types.ts` (+2 -0) _...and 7 more files_ </details> ### 📄 Description ## Linked issues Closes #4456 Closes #4485 Closes #4486 Closes #4487 Closes #4488 Closes #4492 Follow-up: #4494 ## Why this change The assigned reports exposed focused gaps in Docker configuration, downloaded-agent lifecycle handling, summary prompt control, Music DJ tool ownership, and character-card reference macros. These fixes keep each behavior close to its existing implementation while adding regression proof and user guidance. ## What changed - Forward reverse-proxy trust and origin variables through the stock Compose service. - Bundle Bubblewrap in the official image, probe whether it can actually create its sandbox, and document the least-privileged Docker default plus the explicit privileged override. - Expose downloaded package ownership in the agent registry so sidebar and batch removal uninstall the package instead of only hiding its configuration. - Add an editable combine-summary prompt beside the existing summary prompt settings. - Keep Spotify tools out of the default chat-function set unless Music DJ or an explicit tool selection owns them. - Resolve direct 21-character card-ID macros from chat and activated lorebook entries, inject the requested card fields into system context, and clarify that literal angle brackets are not used. - Add targeted regression coverage for each server/runtime path. ## Validation performed - `pnpm check` - Prompt regression suite - Open-issues regression suite - Capability-package lifecycle regression - Request Host security regression - Personal Extension sandbox regression - Professor Mari shell sandbox regression - Localization key-reference regression - Documentation language regression - Full Playwright smoke: 183 passed, 96 skipped; three unrelated baseline failures reproduced outside changed files: - current v2.4.1 fallback conflicts with stale v2.4.0 What's New assertions on desktop and mobile - an existing CharactersPanel row label intercepts its add-action button, including in an isolated one-worker rerun ## Manual verification - [ ] Manually verify reverse-proxy environment forwarding with Docker Compose. - [ ] Manually verify the documented privileged Docker sandbox override on Linux. - [ ] Manually remove a downloaded agent from the sidebar and confirm the package returns to the Download Agents catalog. - [ ] Manually edit the combine-summary prompt and merge summaries. - [ ] Manually use a direct character-ID macro in chat and in an activated lorebook entry. ## Contributor checklist - [ ] `pnpm check` passes locally - [ ] Container (Docker / Podman) built and ran without issue - [ ] Ran the app, clicked through the changes manually - [ ] Checked edge cases (light + dark mode, mobile viewport, empty states, error paths) - [ ] Above manual verification completed - [ ] Read and followed `CONTRIBUTING.md` ## Docs and release impact - [ ] No docs changes needed - [ ] Updated docs as needed - [ ] Translated docs on the `docs-i18n` branch updated to match, or a `[docs-i18n]` follow-up issue opened - [ ] Version/release files updated (only if this PR includes a version bump) Docs were updated in this PR; translation follow-up #4494 is open. No version bump is included. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Customize how chat summaries are combined through prompt settings. - Character references in lorebooks now provide richer context, including example dialogue. - Remove agents and their associated capability packages. - Configure trusted hosts, CORS origins, and CSRF origins in Docker deployments. - Spotify tools are disabled by default in chats. - **Bug Fixes** - Improved character-card macro resolution, summary prompt defaults, and token handling. - Enhanced sandbox availability reporting and Docker support. - **Documentation** - Added Docker and Android platform guidance, sandbox troubleshooting, and security considerations. <!-- 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:10:03 +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#6400
No description provided.