morluto and 2SinceJuly
a3be3f429a
fix(setup): honor Mastra Code's MCP disable flag ( #15126 )
...
* 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 >
2026-11-29 20:17:58 +00:00
..
2026-11-23 01:42:41 +00:00
2026-11-27 15:46:45 -05:00
2026-11-27 05:21:32 +08:00
2026-11-27 08:42:41 +08:00
2026-11-24 11:05:11 -05:00
2026-11-23 02:33:17 +00:00
2026-11-24 23:25:08 -05:00
2026-11-28 16:14:52 -05:00
2026-11-27 20:07:08 -05:00
2026-11-25 08:34:14 -05:00
2026-11-26 18:10:02 -05:00
2026-11-29 00:57:55 +00:00
2026-11-26 13:31:15 -05:00
2026-11-23 02:25:12 +00:00
2026-11-26 10:22:28 -05:00
2026-11-24 06:31:12 -05:00
2026-11-16 03:56:10 +08:00
2026-11-24 11:05:11 -05:00
2026-11-23 02:33:17 +00:00
2026-11-23 12:00:29 -05:00
2026-11-23 12:00:29 -05:00
2026-11-23 12:00:29 -05:00
2026-11-23 12:00:29 -05:00
2026-11-27 01:25:26 +08:00
2026-11-24 06:31:12 -05:00
2026-11-27 07:23:03 +08:00
2026-11-23 02:33:17 +00:00
2026-11-27 22:26:04 +00:00
2026-11-22 03:43:13 -05:00
2026-11-23 12:00:29 -05:00
2026-11-25 15:19:22 +00:00
2026-11-25 22:24:51 -05:00
2026-11-24 06:31:12 -05:00
2026-11-26 20:02:44 +00:00
2026-11-23 02:33:17 +00:00
2026-11-25 22:09:23 -05:00
2026-11-16 09:28:35 +08:00
2026-11-24 06:31:12 -05:00
2026-11-24 23:25:08 -05:00
2026-11-26 16:46:08 +00:00
2026-11-23 12:00:29 -05:00
2026-11-25 08:34:14 -05:00
2026-11-26 10:45:06 -05:00
2026-11-24 06:31:12 -05:00
2026-11-26 22:03:28 +00:00
2026-11-27 09:46:01 +08:00
2026-11-27 18:57:06 +00:00
2026-11-16 03:56:10 +08:00
2026-11-16 03:56:10 +08:00
2026-11-17 18:48:24 -05:00
2026-11-16 03:56:10 +08:00
2026-11-16 06:28:01 +08:00
2026-11-23 13:40:10 +00:00
2026-11-17 14:16:24 -05:00
2026-11-16 03:56:10 +08:00
2026-11-29 13:08:56 -05:00
2026-11-22 15:41:50 +08:00
2026-11-25 08:28:23 -05:00
2026-11-22 15:41:50 +08:00
2026-11-20 04:10:06 +00:00
2026-11-16 07:28:20 +08:00
2026-11-23 12:00:29 -05:00
2026-11-16 03:56:10 +08:00
2026-11-25 07:59:59 +00:00
2026-11-28 16:14:52 -05:00
2026-11-26 15:45:19 +08:00
2026-11-21 16:57:36 -05:00
2026-11-27 08:28:44 +08:00
2026-11-16 03:56:10 +08:00
2026-11-16 03:56:10 +08:00
2026-11-26 15:45:19 +08:00
2026-11-26 19:04:14 +08:00
2026-11-16 03:56:10 +08:00
2026-11-16 06:28:01 +08:00
2026-11-22 20:53:25 -05:00
2026-11-24 11:05:11 -05:00
2026-11-22 20:53:25 -05:00
2026-11-16 03:56:10 +08:00
2026-11-22 14:54:02 +00:00
2026-11-17 18:48:24 -05:00
2026-11-24 12:05:57 -05:00
2026-11-24 15:23:06 +00:00
2026-11-16 03:05:55 +08:00
2026-11-29 19:47:55 +00:00
2026-11-26 21:15:44 -05:00
2026-11-26 21:15:44 -05:00
2026-11-17 14:16:24 -05:00
2026-11-22 03:20:23 +00:00
2026-11-16 03:56:10 +08:00
2026-11-23 13:40:10 +00:00
2026-11-28 16:15:38 +08:00
2026-11-23 13:40:10 +00:00
2026-11-23 13:40:10 +00:00
2026-11-23 13:40:10 +00:00
2026-11-28 16:15:38 +08:00
2026-11-23 13:40:10 +00:00
2026-11-26 21:15:44 -05:00
2026-11-27 14:22:18 +00:00
2026-11-29 18:11:19 +00:00
2026-11-23 00:11:42 +00:00
2026-11-23 13:40:10 +00:00
2026-11-23 13:40:10 +00:00
2026-11-29 18:11:19 +00:00
2026-11-16 07:05:30 +08:00
2026-11-23 00:47:47 -05:00
2026-11-23 00:47:47 -05:00
2026-11-29 11:02:35 +08:00
2026-11-14 04:08:37 -05:00
2026-11-23 00:47:47 -05:00
2026-11-29 20:17:58 +00:00
2026-11-15 19:39:33 +08:00
2026-11-20 00:00:10 +00:00
2026-11-25 00:31:32 +00:00
2026-11-16 03:56:10 +08:00
2026-11-27 05:07:20 -05:00
2026-11-19 07:31:26 -05:00
2026-11-24 12:05:57 -05:00
2026-11-16 05:31:37 +08:00
2026-11-25 00:31:32 +00:00
2026-11-17 19:58:40 +08:00
2026-11-27 12:03:37 +00:00
2026-11-25 13:48:08 +00:00
2026-11-23 22:48:18 -05:00
2026-11-25 00:31:32 +00:00
2026-11-25 13:48:08 +00:00
2026-11-23 13:40:10 +00:00
2026-11-23 13:40:10 +00:00
2026-11-17 18:48:24 -05:00
2026-11-16 03:56:10 +08:00
2026-11-16 03:56:10 +08:00
2026-11-17 18:48:24 -05:00
2026-11-27 13:19:09 -05:00
2026-11-23 03:12:28 +00:00
2026-11-27 13:19:09 -05:00
2026-11-24 11:05:11 -05:00
2026-11-22 15:21:00 -05:00
2026-11-19 03:30:41 +00:00
2026-11-19 03:30:41 +00:00
2026-11-24 12:05:57 -05:00
2026-11-22 04:01:42 +00:00
2026-11-16 06:28:01 +08:00
2026-11-27 01:25:26 +08:00
2026-11-29 20:17:58 +00:00
2026-11-14 04:08:37 -05:00
2026-11-24 08:55:02 +00:00
2026-11-22 04:08:28 +00:00
2026-11-16 03:56:10 +08:00
2026-11-22 04:08:28 +00:00
2026-11-25 15:48:43 -05:00
2026-11-22 04:26:57 +00:00
2026-11-23 01:18:46 +00:00
2026-11-23 13:40:10 +00:00
2026-11-24 08:55:02 +00:00
2026-11-27 04:21:36 +08:00
2026-11-27 04:21:36 +08:00
2026-11-23 00:07:49 +00:00
2026-11-23 00:07:49 +00:00
2026-11-29 11:02:35 +08:00
2026-11-23 02:25:46 +00:00
2026-11-17 18:38:27 -05:00
2026-11-22 15:56:02 -05:00
2026-11-16 10:59:18 +08:00
2026-11-16 20:55:14 -05:00
2026-11-23 00:47:47 -05:00
2026-11-23 13:40:10 +00:00
2026-11-16 10:59:18 +08:00
2026-11-21 22:02:35 +00:00
2026-11-22 18:23:12 +00:00
2026-11-14 19:28:38 +08:00
2026-11-15 18:38:24 +08:00
2026-11-23 00:07:49 +00:00
2026-11-27 04:21:09 +08:00
2026-11-29 20:17:58 +00:00
2026-11-23 00:47:47 -05:00
2026-11-23 13:40:10 +00:00
2026-11-23 00:47:47 -05:00
2026-11-25 18:20:28 +00:00
2026-11-29 20:17:58 +00:00
2026-11-26 14:58:47 +00:00
2026-11-29 19:47:55 +00:00
2026-11-29 20:17:58 +00:00
2026-11-23 13:40:10 +00:00
2026-11-26 21:15:44 -05:00
2026-11-17 18:48:24 -05:00
2026-11-23 13:40:10 +00:00
2026-11-26 21:15:44 -05:00
2026-11-19 15:37:21 +00:00
2026-11-24 14:07:27 +00:00
2026-11-23 00:25:51 +00:00
2026-11-25 18:24:23 +00:00
2026-11-19 08:21:16 -05:00
2026-11-21 18:50:36 +00:00
2026-11-24 15:23:06 +00:00
2026-11-27 01:25:26 +08:00
2026-11-25 08:28:50 -05:00
2026-11-17 18:48:24 -05:00
2026-11-16 03:56:10 +08:00
2026-11-16 03:56:10 +08:00
2026-11-15 20:06:47 +08:00
2026-11-23 01:13:14 -05:00
2026-11-23 02:33:17 +00:00
2026-11-27 14:22:18 +00:00
2026-11-25 03:51:47 +00:00
2026-11-29 19:19:32 +00:00
2026-11-14 14:16:39 +01:00
2026-11-16 06:28:01 +08:00
2026-11-25 08:29:20 -05:00
2026-11-25 08:29:20 -05:00
2026-11-25 08:29:20 -05:00
2026-11-24 08:55:02 +00:00
2026-11-25 15:19:22 +00:00
2026-11-14 14:16:39 +01:00
2026-11-16 06:28:01 +08:00
2026-11-25 08:34:14 -05:00
2026-11-25 09:52:35 +00:00
2026-11-15 20:53:36 -05:00
2026-11-21 20:27:50 +01:00
2026-11-16 03:56:10 +08:00
2026-11-24 21:26:48 +08:00
2026-11-24 21:26:48 +08:00
2026-11-27 12:03:37 +00:00
2026-11-27 05:07:20 -05:00
2026-11-17 19:58:40 +08:00
2026-11-17 18:48:24 -05:00
2026-11-17 18:48:24 -05:00
2026-11-23 22:48:18 -05:00
2026-11-17 18:48:24 -05:00
2026-11-17 18:48:24 -05:00
2026-11-17 18:48:24 -05:00
2026-11-16 03:56:10 +08:00
2026-11-16 03:56:10 +08:00
2026-11-16 03:56:10 +08:00
2026-11-25 08:29:25 -05:00
2026-11-29 20:17:58 +00:00
2026-11-23 13:40:10 +00:00
2026-11-16 03:56:10 +08:00
2026-11-21 22:19:56 +00:00
2026-11-14 05:36:32 +01:00
2026-11-14 05:36:32 +01:00
2026-11-17 18:48:24 -05:00
2026-11-21 22:02:35 +00:00
2026-11-27 22:46:23 +00:00
2026-11-27 18:57:06 +00:00
2026-11-22 18:23:12 +00:00
2026-11-23 13:40:10 +00:00
2026-11-27 14:22:18 +00:00
2026-11-16 03:56:10 +08:00
2026-11-26 21:15:44 -05:00
2026-11-29 19:47:55 +00:00
2026-11-23 13:40:10 +00:00
2026-11-23 00:40:07 -05:00
2026-11-23 01:03:48 +00:00
2026-11-23 01:03:48 +00:00
2026-11-20 04:10:06 +00:00
2026-11-16 07:05:30 +08:00
2026-11-16 07:05:30 +08:00
2026-11-29 19:19:32 +00:00
2026-11-16 07:05:30 +08:00
2026-11-21 22:02:35 +00:00
2026-11-21 22:02:35 +00:00
2026-11-15 19:54:39 +08:00
2026-11-15 20:53:36 -05:00
2026-11-21 06:02:44 -05:00
2026-11-22 08:04:05 -05:00
2026-11-16 03:56:10 +08:00
2026-11-22 15:42:13 +08:00
2026-11-22 15:42:13 +08:00
2026-11-16 03:56:10 +08:00
2026-11-16 07:04:34 +08:00
2026-11-25 08:30:04 -05:00
2026-11-21 05:41:12 -05:00
2026-11-15 20:53:36 -05:00
2026-11-16 03:56:10 +08:00
2026-11-22 14:00:41 +00:00
2026-11-29 00:57:55 +00:00
2026-11-22 03:03:29 +00:00
2026-11-24 08:55:02 +00:00