[PR #220] [MERGED] fix(cli): restrict production MCP dispatch #1870

Closed
opened 2026-10-16 21:12:01 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/morluto/rea/pull/220
Author: @N0zoM1z0
Created: 7/14/2026
Status: ✅ Merged
Merged: 7/14/2026
Merged by: @morluto

Base: main ← Head: agent/dispatcher-route


📝 Commits (1)

  • 190e5d3 fix(cli): restrict production MCP dispatch

📊 Changes

2 files changed (+65 additions, -1 deletions)

View changed files

📝 scripts/rea.mjs (+1 -1)
➕ tests/dispatcher.test.ts (+64 -0)

📄 Description

Summary

  • route to the production stdio adapter only for the single bare mcp or --mcp argument
  • leave multi-argument registration utilities and malformed invocations to Incur’s CLI parser
  • add a packaged-dispatch seam covering both bare routes and multi-argument counterexamples

The root cause was checking argv cardinality for mcp but not for --mcp, so any invocation beginning with --mcp bypassed the CLI adapter.

Verification

  • focused dispatcher Vitest passed
  • npm run typecheck
  • touched-file oxlint
  • touched-file Prettier check
  • diff check

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/morluto/rea/pull/220 **Author:** [@N0zoM1z0](https://github.com/N0zoM1z0) **Created:** 7/14/2026 **Status:** ✅ Merged **Merged:** 7/14/2026 **Merged by:** [@morluto](https://github.com/morluto) **Base:** `main` ← **Head:** `agent/dispatcher-route` --- ### 📝 Commits (1) - [`190e5d3`](https://github.com/morluto/rea/commit/190e5d3282f0f1bc980ad488a7774a500ae3e87d) fix(cli): restrict production MCP dispatch ### 📊 Changes **2 files changed** (+65 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `scripts/rea.mjs` (+1 -1) ➕ `tests/dispatcher.test.ts` (+64 -0) </details> ### 📄 Description ## Summary - route to the production stdio adapter only for the single bare `mcp` or `--mcp` argument - leave multi-argument registration utilities and malformed invocations to Incur’s CLI parser - add a packaged-dispatch seam covering both bare routes and multi-argument counterexamples The root cause was checking argv cardinality for `mcp` but not for `--mcp`, so any invocation beginning with `--mcp` bypassed the CLI adapter. ## Verification - focused dispatcher Vitest passed - `npm run typecheck` - touched-file `oxlint` - touched-file Prettier check - diff check --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-16 21:12:01 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
morluto/rea#1870
No description provided.