mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #7366] [CLOSED] refactor(mari): move workspace tool definitions into a tool registry #7702
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#7702
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/7366
Author: @ATreemanDork
Created: 10/9/2026
Status: ❌ Closed
Base:
staging← Head:feat/mari-tool-registry📝 Commits (1)
74882darefactor(mari): move workspace tool definitions into a tool registry📊 Changes
4 files changed (+1342 additions, -411 deletions)
View changed files
➕
packages/server/src/services/professor-mari/tool-registry.ts(+1296 -0)📝
packages/server/src/services/professor-mari/workspace-agent.service.ts(+32 -407)📝
scripts/regressions/open-issues.regression.ts(+7 -1)📝
scripts/regressions/professor-mari/shell-sandbox.regression.ts(+7 -3)📄 Description
Linked issue
Closes #7367
Why this change
Professor Mari's 15 workspace tool definitions (including the 78-action
app_datatable) were inlined in the ~4,600-lineworkspace-agent.service.tsas three overlapping arrays, with read/write classification handled by ad-hoc regexes. Two problems this fixes:This extracts the tool definitions and action table into a
tool-registry.tssingle source of truth and rewrites the classifiers to consult it — behavior-preserving, verified by an offline parity proof.What changed
packages/server/src/services/professor-mari/tool-registry.ts:TOOLS(15 tools, descriptions verbatim from the service),APP_DATA_ACTIONS(78 actions with kind/selfVerifying/verifyWith metadata), derived exports (WORKSPACE_TOOL_NAMES,WORKSPACE_TOOL_DEFINITIONS,WORKSPACE_TEXTUAL_TOOL_DEFINITIONS,PROFESSOR_MARI_APP_DATA_ACTIONS), and lookup helpers (getTool,getAppDataAction,isAppDataRead,isAppDataWrite).workspace-agent.service.ts(−410/+39): inline arrays and the localWorkspaceToolDefinitiontype deleted;isReadOnlyWorkspaceCommand/isMutatingWorkspaceCommandnow classify via registry kind lookups;appDataActionLooksReadOnlydeleted. The v2.5.0decision.recordbookkeeping carve-out (non-mutating, no read-back) and thepackage_servicelist-vs-run split are preserved verbatim.PROFESSOR_MARI_APP_DATA_ACTIONSis re-exported from the service so existing importers keep working.scripts/regressions/professor-mari/shell-sandbox.regression.ts,scripts/regressions/open-issues.regression.ts) now readtool-registry.tsfor the moved tool-definition text assertions — the same patterns, asserted against the file that now carries the text. No assertions deleted, skipped, or loosened.No behavior change
app_dataactions × 3 apply variants + 15 tool sweeps — comparing old vs newisReadOnlyWorkspaceCommand/isMutatingWorkspaceCommand: zero divergence. Unknown/malformed actions remain mutating (thedatacase uses!isAppDataRead, which mirrors the old conservative regex for every input).prompt.regression.tspasses in the full suite.Validation
pnpm checkpasses locallyCONTRIBUTING.mdManual verification notes
pnpm regression:node), including theprofessor-mari/*lanes,open-issues, andprompt.regression.ts.decision.recorddoes not raise an approval card.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)
N/A — server-side refactor, no UI change.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.