Repository navigation
fix(launcher): forward gentle-shell mcp to pi's own mcp command - #2204
Conversation
pi dispatches mcp on argv[0], but mcp was missing from PI_SUBCOMMANDS, so the launcher injected -e ahead of it and pi treated 'mcp list' as a prompt. A separator after a pi subcommand is now kept, so 'mcp add <name> -- <cmd>' reaches pi verbatim. Closes #2140.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Merge Risk: ⚪ Minimal · up to
|
…ng#2205, Gentleman-Programming#2207) before resolving the launcher import conflict # Conflicts: # bin/gentle-shell.mjs
Closes #2140
Summary
gentle-shell mcp <command>now reaches Pi's ownmcpcommand against the resolved home, so standalone installs can add, list, log in to and log out of MCP servers.mcpwas missing fromPI_SUBCOMMANDS, so the launcher injected-e <package>ahead of it and Pi treatedmcp listas a prompt (it asked for an API key;mcp addwrote nothing).--that follows a pi subcommand is now kept, sogentle-shell mcp add <name> -- <command>reaches Pi verbatim. A leading--is still the launcher's own separator.Changes
lib/gentle-shell-launcher.ts(+ generatedruntime/gentle-shell-launcher.mjs)mcptoPI_SUBCOMMANDS; keep a separator after a pi subcommand; help texttests/gentle-shell-bin.test.tsmcp add <name> -- <cmd>;--helplistsmcptests/gentle-shell-launcher.test.tsdocs/readme-reference.mdTest plan
['-e', '<pkg>', 'mcp', 'add', 'demo', 'npx', ...](separator lost);--helphad nomcp.node --experimental-strip-types --test tests/gentle-shell-launcher.test.ts tests/gentle-shell-bin.test.ts: 374 pass, 0 fail.npm test: 6629 pass, 0 fail (unit, provider-contract, runtime-harness).node scripts/check-types.mjs: no regressions;pnpm run check:runtime-modules: runtime matches sources.HOME,GENTLE_SHELL_NO_AUTO_SETUP=1:gentle-shell mcp add demo -- echo hiwrote~/.gentle-shell/agent/mcp.json;gentle-shell mcp listlisted it.Summary by CodeRabbit
mcpcommand to pass commands through to Pi, including support for adding stdio and remote servers and listing configured servers.mcpexamples. Restart Gentle Shell to load newly configured servers.--when passing commands tomcp add, so command arguments are forwarded correctly.