@yawlabs/mcp 1.1.6 → 1.1.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -4,6 +4,16 @@ All notable changes to `@yawlabs/mcp` (formerly `@yawlabs/mcph`) are documented
4
4
 
5
5
  ## Unreleased
6
6
 
7
+ ## 1.1.7 -- a server Windows will not start is named with its likely cause, instead of a bare `spawn UNKNOWN`
8
+
9
+ **Fixed -- a server whose executable Windows will not run is named, with the likely cause, instead of a bare `spawn UNKNOWN`**
10
+
11
+ A local server whose binary exists but cannot be started -- built for another CPU architecture (an ARM32 exe on Windows ARM64), empty, truncated, or not a program at all -- failed activation with `spawn UNKNOWN` or `spawn EFTYPE` and nothing else: no file name, no cause, because the spawn error carries neither. It now says which command could not be started and why that usually happens, and names the rewritten binary when a uv or oam rewrite was the one that failed. When yaw-mcp itself runs on oam 0.19.2 or later, the Win32 code oam attaches (`winError`) is included, and 216 (`ERROR_EXE_MACHINE_TYPE_MISMATCH`) is called out by name. These failures are now in the `spawn_failure` category rather than `unknown`.
12
+
13
+ **Changed -- the `MCP_CONNECT_TIMEOUT` docs no longer name oam on Windows as a runtime that reports no CPU load**
14
+
15
+ oam before 0.19.2 reported every `os.cpus()` time as 0 on every platform, not only Windows; 0.19.2 reports real counters, so yaw-mcp running on it reads the machine load as it does on node. The handshake extension for unknown load is unchanged. The oam floor stays at 0.19.1.
16
+
7
17
  ## 1.1.6 -- `install gemini-cli` says Gemini CLI starts no server in an untrusted folder, and the client matrix passes on macOS and Linux
8
18
 
9
19
  **Changed -- `install gemini-cli` says Gemini CLI starts no server in an untrusted folder**
package/README.md CHANGED
@@ -430,7 +430,7 @@ Common ones (run `yaw-mcp --help` for the full list):
430
430
  | `YAW_MCP_MAX_RESULT_BYTES` | Ceiling on a single proxied tool result. Over it, the reply is cut and carries a marker saying so, with the byte total and what was dropped -- a silently truncated result reads to the model as a complete one. Default `100000` (~25k tokens); `0` disables. `structuredContent` is passed through verbatim and is never cut. |
431
431
  | `YAW_MCP_TOOL_TOKEN_CAP` | Ceiling on the estimated tokens of the whole loaded tool surface, checked alongside `YAW_MCP_SERVER_CAP` when a server is activated. The server cap counts servers, which says nothing about their size: six 3-tool servers and six 60-tool servers both sit at a cap of `6`. Default off. |
432
432
  | `YAW_MCP_TOOL_EXPOSURE` | How much of the catalog `tools/list` advertises. `gateway`: the meta-tools plus the servers loaded this session. `lite`: only `mcp_connect_exec` / `find_tool` / `read_tool` plus the loaded servers, for a client that inlines every listed tool into every request; the other meta-tools stay callable by name. `full`: the pre-gateway surface, with a placeholder for every cached-but-unloaded tool. Unset, yaw-mcp picks `lite` when the client's MCP `clientInfo.name` is `typed-cli` and `gateway` otherwise; a set value always wins over that. Re-read on every `tools/list`, so a change lands without a restart. An unrecognised value logs a warning once and falls back to the client default. |
433
- | `MCP_CONNECT_TIMEOUT` | Milliseconds to wait for a server's MCP handshake. Default `15000`; a server's own `connectTimeoutMs` in `bundles.json` always wins. Whole milliseconds in `1..2147483647` -- anything else falls back to the default with one warn. When the machine is saturated (CPU at least 50% busy over the wait) and the local child is still running at the deadline, it gets the same deadline once more -- at most twice the value in all (a runtime that reports no CPU load, such as oam on Windows, counts as busy); a per-server `connectTimeoutMs` is never extended. |
433
+ | `MCP_CONNECT_TIMEOUT` | Milliseconds to wait for a server's MCP handshake. Default `15000`; a server's own `connectTimeoutMs` in `bundles.json` always wins. Whole milliseconds in `1..2147483647` -- anything else falls back to the default with one warn. When the machine is saturated (CPU at least 50% busy over the wait) and the local child is still running at the deadline, it gets the same deadline once more -- at most twice the value in all (a runtime that reports no CPU load, such as oam before 0.19.2, counts as busy); a per-server `connectTimeoutMs` is never extended. |
434
434
  | `MCP_LIST_TIMEOUT` | Milliseconds to wait for a server's tool/resource/prompt inventory calls after the handshake. Default `15000`; same `1..2147483647` whole-millisecond parse, invalid values fall back with one warn. |
435
435
  | `MCP_CALL_TIMEOUT` | Milliseconds to wait for a single proxied `tools/call`. Default `60000` (the SDK's own bound); raise it for legitimately slow servers. Same `1..2147483647` whole-millisecond parse, invalid values fall back with one warn. |
436
436
  | `YAW_MCP_IDLE_THRESHOLD` | Non-matching tool calls a loaded server tolerates before it is unloaded. Default `10`; bursty servers earn more patience automatically. The older name `MCP_CONNECT_IDLE_THRESHOLD` still works as a fallback. |
@@ -11,7 +11,7 @@ import {
11
11
  recordAttemptAt,
12
12
  runsUnderNpmConfigPrefix,
13
13
  writeCheckMemo
14
- } from "./chunk-SZWFZ566.js";
14
+ } from "./chunk-TI26KSBV.js";
15
15
  export {
16
16
  UPGRADE_LOCK_NAME,
17
17
  acquireUpgradeLock,
@@ -5785,17 +5785,17 @@ async function oamFloorLines(probe) {
5785
5785
  }
5786
5786
  async function defaultRunningPrefix(argvPath) {
5787
5787
  if (isTestSandbox()) return null;
5788
- const { detectRunningInstallPrefix: detectRunningInstallPrefix2 } = await import("./auto-upgrade-MPJW56JO.js");
5788
+ const { detectRunningInstallPrefix: detectRunningInstallPrefix2 } = await import("./auto-upgrade-7FG236LQ.js");
5789
5789
  return detectRunningInstallPrefix2(argvPath);
5790
5790
  }
5791
5791
  async function defaultAcquireLock(prefixDir) {
5792
5792
  if (isTestSandbox()) return () => {
5793
5793
  };
5794
- const { acquireUpgradeLock: acquireUpgradeLock2 } = await import("./auto-upgrade-MPJW56JO.js");
5794
+ const { acquireUpgradeLock: acquireUpgradeLock2 } = await import("./auto-upgrade-7FG236LQ.js");
5795
5795
  return acquireUpgradeLock2(prefixDir);
5796
5796
  }
5797
5797
  async function upgradeLockPath(prefixDir) {
5798
- const { UPGRADE_LOCK_NAME: UPGRADE_LOCK_NAME2 } = await import("./auto-upgrade-MPJW56JO.js");
5798
+ const { UPGRADE_LOCK_NAME: UPGRADE_LOCK_NAME2 } = await import("./auto-upgrade-7FG236LQ.js");
5799
5799
  return join11(prefixDir, UPGRADE_LOCK_NAME2);
5800
5800
  }
5801
5801
  async function defaultSpawn(cmd, args, cwd) {
@@ -5858,7 +5858,7 @@ async function runUpgrade(opts = {}) {
5858
5858
  if (method === "global-npm") {
5859
5859
  rawPrefix = await (opts.runningPrefix ?? defaultRunningPrefix)(argvPath);
5860
5860
  if (rawPrefix !== null) {
5861
- const { quoteArgForDisplay: quoteArgForDisplay2, quoteShellArgIfNeeded: quoteShellArgIfNeeded2 } = await import("./auto-upgrade-MPJW56JO.js");
5861
+ const { quoteArgForDisplay: quoteArgForDisplay2, quoteShellArgIfNeeded: quoteShellArgIfNeeded2 } = await import("./auto-upgrade-7FG236LQ.js");
5862
5862
  const spawnForm = quoteShellArgIfNeeded2(rawPrefix, opts.platform);
5863
5863
  const displayForm = quoteArgForDisplay2(rawPrefix, opts.platform);
5864
5864
  if (spawnForm !== null && displayForm !== null) {
@@ -5990,7 +5990,7 @@ async function runUpgrade(opts = {}) {
5990
5990
  return { exitCode: 3, lines };
5991
5991
  }
5992
5992
  function readCurrentVersion() {
5993
- return true ? "1.1.6" : "dev";
5993
+ return true ? "1.1.7" : "dev";
5994
5994
  }
5995
5995
 
5996
5996
  // src/auto-upgrade.ts
@@ -6282,7 +6282,7 @@ function defaultSpawn2(cmd, args, onDone = () => {
6282
6282
  }
6283
6283
  async function maybeAutoUpgrade(deps = {}) {
6284
6284
  if (isFeatureDisabled("YAW_MCP_AUTO_UPGRADE")) return;
6285
- const current = deps.currentVersion ?? (true ? "1.1.6" : "dev");
6285
+ const current = deps.currentVersion ?? (true ? "1.1.7" : "dev");
6286
6286
  if (current === "dev") return;
6287
6287
  const argvPath = deps.argvPath ?? process.argv[1];
6288
6288
  let method = (deps.isSeaImpl ? await deps.isSeaImpl() : await detectSea()) ? "binary" : detectInstallMethod(argvPath, realpathSync3, ["unknown", "local-node-modules"]);
package/dist/index.js CHANGED
@@ -127,7 +127,7 @@ import {
127
127
  userConfigDir,
128
128
  withFileLock,
129
129
  yawModeOverlay
130
- } from "./chunk-SZWFZ566.js";
130
+ } from "./chunk-TI26KSBV.js";
131
131
 
132
132
  // src/audit-cmd.ts
133
133
  import { homedir as homedir6 } from "os";
@@ -3204,7 +3204,30 @@ function redactSecretsInOutput(text, env) {
3204
3204
  function withConfigPointer(message, config) {
3205
3205
  return `${message} -> Fix "${config.namespace}" in ${bundlesFileHint("defines-it")}, then activate it again -- the edit is picked up on the next mcp_connect_* call, with no client restart.`;
3206
3206
  }
3207
+ function unstartableFileCode(err) {
3208
+ if (typeof err !== "object" || err === null) return null;
3209
+ const { code, syscall } = err;
3210
+ if (code === "EFTYPE") return "EFTYPE";
3211
+ if (code === "UNKNOWN" && typeof syscall === "string" && syscall.startsWith("spawn")) return "UNKNOWN";
3212
+ return null;
3213
+ }
3214
+ function winErrorOf(err) {
3215
+ const value = typeof err === "object" && err !== null ? err.winError : void 0;
3216
+ return typeof value === "number" ? value : void 0;
3217
+ }
3218
+ var WIN32_EXE_MACHINE_TYPE_MISMATCH = 216;
3219
+ function unstartableFileMessage(code, err, command) {
3220
+ if (code === "EFTYPE") {
3221
+ return `Command '${command}' could not be started: the OS does not recognise it as a program (spawn EFTYPE -- an empty, truncated or non-executable file). Reinstall or re-download it.`;
3222
+ }
3223
+ const winError = winErrorOf(err);
3224
+ if (winError === WIN32_EXE_MACHINE_TYPE_MISMATCH) {
3225
+ return `Command '${command}' could not be started: it is built for a CPU architecture this machine cannot run, or is not a valid program file (spawn UNKNOWN, Win32 error 216 ERROR_EXE_MACHINE_TYPE_MISMATCH). Install the build for this machine.`;
3226
+ }
3227
+ return `Command '${command}' could not be started: the OS refused to run it (spawn UNKNOWN${winError === void 0 ? "" : `, Win32 error ${winError}`}). Common causes: a binary built for another CPU architecture, a corrupt or partial download, or an application-control or antivirus block.`;
3228
+ }
3207
3229
  function categorizeSpawnError(err) {
3230
+ if (unstartableFileCode(err)) return "spawn_failure";
3208
3231
  const msg = err instanceof Error ? err.message : String(err);
3209
3232
  if (/ENOENT|not found|cannot find|command failed to start/i.test(msg)) return "spawn_failure";
3210
3233
  if (/EACCES|permission denied/i.test(msg)) return "spawn_failure";
@@ -3341,7 +3364,7 @@ async function connectToUpstreamOnce(config, onDisconnect, onListChanged, bridge
3341
3364
  if (downstreamCaps?.sampling) capabilities.sampling = downstreamCaps.sampling;
3342
3365
  if (downstreamCaps?.roots) capabilities.roots = {};
3343
3366
  const client = new Client(
3344
- { name: "yaw-mcp", version: true ? "1.1.6" : "dev" },
3367
+ { name: "yaw-mcp", version: true ? "1.1.7" : "dev" },
3345
3368
  { capabilities }
3346
3369
  );
3347
3370
  if (bridge && capabilities.elicitation) {
@@ -3592,8 +3615,12 @@ async function connectToUpstreamOnce(config, onDisconnect, onListChanged, bridge
3592
3615
  message = oomHint ? `Server "${config.namespace}" ran out of memory. ${oomHint} stderr: ${safe.slice(-500)}` : `Server "${config.namespace}" failed to start. stderr: ${safe.slice(-500)}`;
3593
3616
  } else {
3594
3617
  category = categorizeSpawnError(err);
3595
- if (category === "spawn_failure") {
3596
- message = `Command '${config.command}' is not on PATH or is not executable. Verify the runtime is installed (e.g. Node.js for npx, Python for uvx).${spawnedCommand && spawnedCommand !== config.command ? ` The binary that actually failed to spawn was '${spawnedCommand}'.` : ""}`;
3618
+ const unstartable = unstartableFileCode(err);
3619
+ const spawnedNote = spawnedCommand && spawnedCommand !== config.command ? ` The binary that actually failed to spawn was '${spawnedCommand}'.` : "";
3620
+ if (unstartable) {
3621
+ message = `${unstartableFileMessage(unstartable, err, config.command)}${spawnedNote}`;
3622
+ } else if (category === "spawn_failure") {
3623
+ message = `Command '${config.command}' is not on PATH or is not executable. Verify the runtime is installed (e.g. Node.js for npx, Python for uvx).${spawnedNote}`;
3597
3624
  } else {
3598
3625
  message = err instanceof Error ? err.message : String(err);
3599
3626
  }
@@ -10757,7 +10784,7 @@ function foldBundleWarnings(warnings, probe) {
10757
10784
  const prefix = `${probe.path}:`;
10758
10785
  return warnings.filter((w) => !w.startsWith(prefix));
10759
10786
  }
10760
- var VERSION = true ? "1.1.6" : "dev";
10787
+ var VERSION = true ? "1.1.7" : "dev";
10761
10788
  var DOCTOR_USAGE = `Usage: yaw-mcp doctor [--json]
10762
10789
 
10763
10790
  Print a diagnostic of your yaw-mcp setup.
@@ -20400,7 +20427,7 @@ var ConnectServer = class _ConnectServer {
20400
20427
  * initialize handshake completes; see beginSession for why it waits. */
20401
20428
  buildServer(era, supportedProtocolVersions) {
20402
20429
  const s = new Server(
20403
- { name: "yaw-mcp", version: true ? "1.1.6" : "dev" },
20430
+ { name: "yaw-mcp", version: true ? "1.1.7" : "dev" },
20404
20431
  {
20405
20432
  capabilities: {
20406
20433
  tools: { listChanged: true },
@@ -24917,7 +24944,7 @@ function registerShutdownTriggers(shutdown, targets) {
24917
24944
  // src/status-cmd.ts
24918
24945
  import { existsSync as existsSync10 } from "fs";
24919
24946
  import { homedir as homedir23 } from "os";
24920
- var VERSION2 = true ? "1.1.6" : "dev";
24947
+ var VERSION2 = true ? "1.1.7" : "dev";
24921
24948
  var STATUS_SCHEMA_VERSION = 1;
24922
24949
  var STATUS_USAGE = `Usage: yaw-mcp status [--json]
24923
24950
 
@@ -25634,7 +25661,7 @@ if (subcommand === "compliance") {
25634
25661
  saturated machine (CPU >= 50% busy over the wait)
25635
25662
  a still-running local child gets this deadline
25636
25663
  once more, never longer (unknown load, as on
25637
- oam/Windows, counts as busy); a per-server
25664
+ oam before 0.19.2, counts as busy); a per-server
25638
25665
  \`connectTimeoutMs\` is never extended.
25639
25666
  MCP_LIST_TIMEOUT Milliseconds to wait for a server's tool/
25640
25667
  resource/prompt inventory calls after the
@@ -25761,7 +25788,7 @@ if (subcommand === "compliance") {
25761
25788
  `);
25762
25789
  process.exitCode = 0;
25763
25790
  } else if (subcommand === "--version" || subcommand === "-V") {
25764
- process.stdout.write(`yaw-mcp ${true ? "1.1.6" : "dev"}
25791
+ process.stdout.write(`yaw-mcp ${true ? "1.1.7" : "dev"}
25765
25792
  `);
25766
25793
  process.exitCode = 0;
25767
25794
  } else if (subcommand !== void 0 && !subcommand.startsWith("-")) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yawlabs/mcp",
3
- "version": "1.1.6",
3
+ "version": "1.1.7",
4
4
  "mcpName": "io.github.YawLabs/mcp",
5
5
  "description": "MCP gateway: one local install fronts every MCP server for Claude Code, Cursor, and VS Code.",
6
6
  "license": "SEE LICENSE IN LICENSE.md",