mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #6800] [MERGED] feat(mari): let Professor Mari list and run actions that packages offer #7336
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#7336
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/6800
Author: @Gunterlie
Created: 9/28/2026
Status: ✅ Merged
Merged: 9/28/2026
Merged by: @Gunterlie
Base:
staging← Head:feat/mari-package-service-tool📝 Commits (7)
7a5367efeat(mari): let Professor Mari list and run actions that packages offer her871090bfix(mari): bound package actions and their textfecc4cffix(mari): a package run that throws at once cannot crash the Engine3a4b752docs(changelog): link the Mari package actions issueb71246aMerge remote-tracking branch 'origin/staging' into codex/assigned-68005a78945fix(mari): cancel package action discovery on Stope0f4c13fix(mari): reject stale package actions after deactivation📊 Changes
10 files changed (+673 additions, -10 deletions)
View changed files
📝
CHANGELOG.md(+4 -0)📝
docs/development/optional-agent-packages.md(+46 -0)➕
packages/server/src/services/capability-packages/capability-mari-actions.service.ts(+202 -0)📝
packages/server/src/services/capability-packages/capability-module-runtime.service.ts(+2 -0)📝
packages/server/src/services/capability-packages/capability-service-registry.service.ts(+4 -0)📝
packages/server/src/services/professor-mari/workspace-agent.service.ts(+82 -4)📝
packages/shared/src/schemas/capability-package.schema.ts(+16 -1)📝
packages/shared/src/types/professor-mari-workspace.ts(+2 -1)📝
scripts/regressions/capability-package-lifecycle.regression.ts(+4 -4)➕
scripts/regressions/mari-package-service.regression.ts(+311 -0)📄 Description
Linked issue
Closes #6799
Why this change
mariCLI only reaches the Engine data service, and the capability activation API has no way for a package to offer her anything.slurp2) registers aslurp2:actionsservice with nine actions (write or improve a text field, draw a picture, steer a Creator, add a post idea, write a post, …). A user who asks Mari "give this Creator an idea for a rainy-day post" gets nothing today.What changed
mari-actions, Capability API 1.50 (capability-package.schema.ts). A manifest that declares it with an oldercapabilityApiis refused, liketoolsandachievements.capability-mari-actions.service.ts, wired intoregisterServiceincapability-module-runtime.service.ts). A package with the permission registersmari-actions:<its own id>with{ list, run }. Without the permission, or under another package's id, registration throws. This mirrors theagent-runtime:<id>gate, so the key proves which package owns the actions.package_service(workspace-agent.service.ts,MariWorkspaceToolName):packageonly → one package. Read-only.package+action+input→ runs one action. This counts as a change for Permissions Mode: Plan refuses it, Manual holds it for Accept, and the ask latch applies.AbortSignalthat fires on Mari's Stop, and the Engine stops waiting after 5 minutes even if the package ignores it, so a stuck package cannot hold Mari's serialized change lane. Error text is capped at 2,000 characters. Data URLs are elided from results and errors.listCapabilityServiceKeys(prefix)in the service registry.docs/development/optional-agent-packages.md; CHANGELOG[Unreleased]entry.scripts/regressions/mari-package-service.regression.ts;capability-package-lifecycle.regression.tsbumped to 1.50.Package side (not in this PR): Slurp would add the
mari-actionspermission,capabilityApi1.50 and oneapi.registerService("mari-actions:slurp2", …)line next to its existingslurp2:actionsregistration. Until a package does that, Mari's list says no package offers actions.Security notes
This lets a model-driven agent act inside package code, so it is security-sensitive.
mari-actions:<own-id>, only with a bounded plain-JSON object, and only under the user's Permissions Mode.registerServicein the capability runtime; the Mari command dispatcher, classifiers (isReadOnlyWorkspaceCommand,isMutatingWorkspaceCommand), claim audit (resolveWorkspaceMutationVerification,isSuccessfulStateRead) and protocol parsers.mariCLI, the shell sandbox orapp_data. Packages still cannot look up each other's services.list(), data URLs in results and errors, a list used as a state read.Validation
pnpm checkpasses locallyCONTRIBUTING.mdManual verification notes
What the agent ran on devbox (automated only; the boxes above are for the human reviewer):
pnpm check: passed on the code commits (format, lint, e2e/token types, build). The last commit only adds the issue number to CHANGELOG.node scripts/run-regressions.mjs --filter scripts/regressions/mari-package-service.regression.ts: passed. The synchronous-throw assertion was shown to fail with its fix removed.--filter capability: 17/17 passed.--filter shell-sandbox: 1/1 passed.--filter mari: 27/28 passed.mari-completion-frames.regression.tstimes out at 30 s on this host, and times out the same way with this PR's server sources replaced by thestagingversions, so it is not caused by this change.origin/staging: 0 findings. Two read-only Opus review passes; all their findings are fixed in this branch.Still to verify by hand:
mari-actions:<id>: ask Mari which actions your packages offer, and check she lists them.Docs and release impact
docs-i18nbranch updated to match, or a[docs-i18n]follow-up issue opened (see CONTRIBUTING.md § Translated documentation)Docs touched:
CHANGELOG.md,docs/development/optional-agent-packages.md. The translated copies ofdevelopment/optional-agent-packages.mdondocs-i18nare not updated; translation follow-up #6803 covers this new section. No version bump.UI evidence (if applicable)
No UI change. The Agents catalog shows raw permission ids, so the new permission appears as "mari actions" without new copy.
Summary by CodeRabbit
Maintainer review validation
Reviewed and corrected at
5a789451c: Stop now cancels both discovery and pre-run action listing; malformed input is rejected before package code runs. The staging changelog conflict is resolved.pnpm checkpassed, package-service regression passed, capability regressions passed 17/17, and Mari regressions passed 28/28 (including the previously reported completion-frame timeout and shell sandbox). These checks use disposable data.Local CodeRabbit completed with three findings dismissed after checking the actual source: the alleged duplicate module blocks do not exist (each function/regression declaration occurs once), and the requested signal parameter/abort race is present in
actionsOfandlistCapabilityMariActions. Type checking, production build and cancellation regression all pass. Hosted review of the pushed revision remains a merge gate. Human verification boxes remain unchanged.Follow-up independent lifecycle review at
e0f4c1393: if a package unregisters or replaces its service whilelist()is pending, the stale service is no longer advertised or executed. Deterministic removal/replacement regressions pass,pnpm checkpasses, and capability regressions pass 17/17. The prior head’s hosted CodeRabbit review completed before this follow-up was pushed; new-head review and checks remain required.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.