Bash Refactor Plan 3
Scope: Register forge-bash in LibreChat, update FORGE.md and references, create TypeScript migration evaluation
Note: Only Forge/Configs-debian/ is in scope for config changes. Forge/Configs/ is not modified.
Spec: Bash Refactor Spec
Prior plan: Bash Refactor Plan 2
Task 1 — Register forge-bash in librechat.yaml
Spec Section 8: “forge-bash is registered in
librechat.yaml…”
Add the forge-bash entry to the MCP servers section of Forge/Configs-debian/librechat.yaml:
Keep the existing uvilo-shell entry unchanged — both coexist during validation.
Task 2 — Update FORGE.md
Spec Section 9: “All references to the removed permission system are cleaned up.”
Make these surgical edits to Forge/Configs/FORGE.md (and the debian copy at Forge/Configs-debian/FORGE.md if it differs):
-
Remove PERMISSION RULE: Delete the entire “PERMISSION RULE” paragraph (“Never set grant values yourself…”).
-
Remove project session workflow step 2: Delete “Check
git statusfor uncommittedshell-permissions.yamlchanges; commit if present”. Renumber subsequent steps. -
Replace uvilo-shell MCP server instructions with forge-bash instructions:
-
Update any other references to
uvilo-shelltool name (e.g., in tool schema descriptions, examples) to referenceforge-bash.
Task 3 — Update /end-session Command
Spec Section 9: “
/end-sessioncommand updated to remove the shell-permissions commit step.”
Read Forge/Skills/Create_Command/references/commands.md, find the /end-session entry, and remove the step that commits shell-permissions.yaml changes. Also check any referenced skill files for shell-permissions references.
Task 4 — Write TypeScript Migration Evaluation
Requirements R7: “The project must evaluate the feasibility and trade-offs of migrating all Forge MCP tools to TypeScript.”
The Research document (Section 8) already contains the full evaluation with decisions. Extract the final evaluation into a standalone document at Forge/Projects/Bash_Refactor/Bash_Refactor_TS_Migration_Evaluation.md with:
-
Summary: Gradual migration starting with forge-bash as proof of concept. TypeScript SDK is mature, dependencies bundle cleanly, Node.js APIs cover all needed functionality. No blocking issues found.
-
Current Python servers inventory (from Research 8.1):
Server Lines Dependencies Complexity Migration Effort uvilo-trash ~290 mcp, pydantic Medium Low-Medium typesense-mcp ~160 mcp, pydantic Low Low suprsend-mcp-proxy ~80 mcp Low Low -
SDK support:
@modelcontextprotocol/serverTypeScript SDK is mature.McpServermaps 1:1 to Python’sFastMCP. Zod replaces Pydantic. -
Per-tool migration concerns (from Research 8.1):
- uvilo-trash: File system ops → Node.js
fs.promises - typesense-mcp: HTTP requests → native
fetch(Node 18+) - suprsend-mcp-proxy: Spawns binary →
child_process.execFile
- uvilo-trash: File system ops → Node.js
-
Cost-benefit: Single language, no Python runtime, smaller Docker image, faster cold starts. Con: ~2-3 days migration effort for remaining servers.
-
Decision: Gradual migration (Option B from Research). forge-bash validates the approach; other servers migrate one at a time after validation.
Add sidebar entry using the Update_Sidebar skill. Build to verify.
Task 5 — Update Project Research Skill
Research Section 11: “Research documents should present only the current state of findings and decisions.”
Update Forge/Skills/Project_Research/SKILL.md to replace the current rule “Research is historical/append-only — never replace existing sections” with:
No historical residue. When a recommendation changes during research, update the Finding and Recommendation sections in-place. Do not append notes about previous drafts or abandoned alternatives. Research documents are not frozen until approved — before approval, they should always reflect the current best thinking. If a decision rationale needs to be preserved, it belongs in Learnings, not in the Research document.
Add a note that the append-only rule still applies to decisions after approval (use dated revision notes), but not to findings and recommendations during research.
Task 6 — Verify No Stale References Remain
Requirements R9, Verification V9: “Grep for ‘PERMISSION REQUIRED’, ‘grant’, ‘shell-permissions’ returns no hits outside the project docs.”
Run these searches across the repo (excluding .trash/, node_modules/, dist/, and the project’s own documentation):
grep -rl 'PERMISSION REQUIRED' --exclude-dir=.trash --exclude-dir=node_modules --exclude-dir=dist Forge/grep -rl 'shell-permissions' --exclude-dir=.trash --exclude-dir=node_modules --exclude-dir=dist Forge/grep -rl 'grant.*parameter' --exclude-dir=.trash --exclude-dir=node_modules --exclude-dir=dist Forge/(context-dependent — only flag permission-related uses)
Allowed hits: files inside Forge/Projects/Bash_Refactor/ (project documentation) and Forge/Archived/Bash_Refactor/ (historical archive). All other hits must be cleaned up.
Commit all changes, build, and push.