mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #8413] [MERGED] feat(capability): let a package register a service only the Engine can read #8585
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#8585
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?
📋 Pull Request Information
Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/8413
Author: @Promansis
Created: 10/28/2026
Status: ✅ Merged
Merged: 10/28/2026
Merged by: @Promansis
Base:
staging← Head:feature(capability)/host-only-service📝 Commits (1)
943d43afeat(capability): let a package register a service only the Engine can read (#8408)📊 Changes
7 files changed (+68 additions, -17 deletions)
View changed files
📝
docs/development/optional-agent-packages.md(+16 -1)📝
packages/server/src/services/capability-packages/capability-module-runtime.service.ts(+14 -7)📝
packages/server/src/services/capability-packages/capability-service-registry.service.ts(+12 -2)📝
packages/shared/src/schemas/capability-package.schema.ts(+3 -1)📝
packages/shared/src/types/capability-runtime.ts(+2 -1)📝
scripts/regressions/capability-package-lifecycle.regression.ts(+6 -5)📝
scripts/regressions/capability-runtime-host-services.regression.ts(+15 -0)📄 Description
Linked issue
Closes #8408
Why this change
Packages share services through one registry, and any package can read any key with
runtime.services.get. Only theagent-runtime:andmari-actions:prefixes were host-only. Long-Term Memory registerslong-term-memory:runtimefor the Engine's generation recall and profile restore, so any installed package could also take it. It could runrecallfor any chat (skipping the "Other Agents can read memories" switch), callrecordPromptAccepted, or hold the vault lock.What changed
api.registerService(key, service, { hostOnly: true }): the Engine'sgetCapabilityService(key)still returns the service, whileruntime.services.get(key)returnsnullfor every package, including the owner. This is the rule the two prefixes already follow.Setbeside the map. Releasing the service clears the flag under the existing identity check, andresetCapabilityServicesclears the set. A duplicate registration throws before the flag is set.supportedCapabilityApi, the lifecycle regression's supported-minor assertions (the unsupported-minor probe moves to 1.389), and a 1.388 section indocs/development/optional-agent-packages.md.capability-runtime-host-servicesregisters a hidden service. The Engine reads it, while the reader and the owner both getnull. After the hidden service is released, the same key registered without the flag is visible.long-term-memory:runtime,hierarchical-maps:*andconversation-calls:*, and the key-namespace gap the issue lists as out of scope. Long-Term Memory adopting the flag is a follow-up in Marinara-Agents.Security note: this narrows what packages can read and adds no permission.
Validation
pnpm checkpasses locallyCONTRIBUTING.mdCommands run locally on the pushed HEAD:
build:shared; regressionscapability-runtime-host-services,capability-package-lifecycle,capability-agent-runtime,mari-package-service,world-one-place,spatial-context;format:check;lint;tsc --noEmitinpackages/server;git diff --check. The new regression fails without the server changes. A fullpnpm checkwas not run locally.Manual verification notes
hostOnly: trueinstalled, another package'sruntime.services.getfor that key returnsnull, and the Engine feature that reads it still works.Docs and release impact
docs-i18nbranch updated to match, or a[docs-i18n]follow-up issue opened (see CONTRIBUTING.md § Translated documentation)UI evidence (if applicable)
None; no UI change.
🤖 Generated with Claude Code
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.