mirror of
https://github.com/morluto/rea.git
synced 2026-11-30 02:17:09 +00:00
* fix(setup): report Mastra Code's MASTRACODE_DISABLE_MCP switch Mastra Code reads MASTRACODE_DISABLE_MCP at startup and stops loading every MCP source. REA's client table has no such fact, so doctor kept reporting ~/.mastracode/mcp.json as aligned while Mastra started no server, and setup rewrote a registration the running client ignores. readClientPolicyBlock now answers for mastracode through a small module of its own. The value is truthy only for 1/true/yes/on, case-insensitively and after trimming, matching Mastra Code's isTruthyEnv. Doctor, setup's inspect/configure and mcp add pass the launcher environment they already resolve, so a supplied environment decides the outcome instead of the host process.env. The documented load order also lists the project .mcp.json, which this change does not read yet; #15038 stays open for that half. Tests: mastracodePolicySources (13, new) covers the value table; mastracodeDisabledRegistration (2, new) covers status, setup refusal and an unchanged file; geminiPolicySources (4) and setupPolicySnapshot (7) still pass. check:fast is green across 3328 files. The CLI boundary suite mcpAddClientPolicy needs a compiled dist/cli-runtime and was not run. Refs #15038 (cherry picked from commit 4e5ea523f4a4c3040c7d172758558fb6a0241966) * fix(setup): enforce the Mastra flag for project MCP registration * style(test): format Mastra MCP regression * test(doctor): prove the Mastra disable policy gates a valid launcher --------- Co-authored-by: 2SinceJuly <202121119+2SinceJuly@users.noreply.github.com>