@yawlabs/mcp 1.0.3 → 1.0.4

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
@@ -12,9 +12,9 @@ In an augment pane, the line `uninstall` prints when it keeps the `~/.claude/set
12
12
 
13
13
  **Fixed -- on Windows, an audit stops failing on the lock the audit before it was releasing**
14
14
 
15
- A release run died in its test gate: `grades-cache.test.ts`'s concurrent-writes case threw `EPERM: operation not permitted, open '...\.yaw-mcp\grades.json.lock'`. It was not the test. On Windows, creating a file with `O_EXCL` while another thread or process is deleting the same path fails `EPERM` instead of succeeding or answering "already exists" -- 225 times in 2000 races on the machine that failed (Windows 11, Node 22.22.2). The grade cache's lock take treated every errno other than "already exists" as fatal, so a `yaw-mcp audit` whose wait happened to land inside the previous holder's release failed with exit 3, grade computed but not cached. The Yaw Terminal MCP panel grading two servers at once is exactly that shape. The take now retries `EPERM`, `EBUSY` and `EACCES` on Windows -- the codes `atomicWriteFile` already retries its rename on -- for up to a second, then reports the real errno rather than a lock-timeout message. POSIX is unchanged.
15
+ A release run died in its test gate: `grades-cache.test.ts`'s concurrent-writes case threw `EPERM: operation not permitted, open '...\.yaw-mcp\grades.json.lock'`. It was not the test. On Windows, creating a file with `O_EXCL` while another thread or process is deleting the same path fails `EPERM` instead of succeeding or answering "already exists". On the machine that failed (Windows 11, Node 22.22.2), a probe racing three creates against one delete 2000 times hit it in every one of 20 runs. The grade cache's lock take treated every errno other than "already exists" as fatal, so a `yaw-mcp audit` whose wait happened to land inside the previous holder's release failed with exit 3, grade computed but not cached. The Yaw Terminal MCP panel grading two servers at once is exactly that shape. The take now retries `EPERM`, `EBUSY` and `EACCES` on Windows -- the codes `atomicWriteFile` already retries its rename on -- for up to a second, then reports the real errno rather than a lock-timeout message. POSIX is unchanged.
16
16
 
17
- The same take backs the `bundles.json` write lock, the sidecars install lock and the self-upgrade lock, and there the misread was quieter: a lock it could not create was treated as "no lock possible here, proceed", so the same `EPERM` ran the write or the install unlocked beside whichever process took the lock next. It now retries those codes three times, 26 ms in all, before falling back to that best-effort answer.
17
+ The same take backs the `bundles.json` write lock, the sidecars install lock and the self-upgrade lock, and there the misread was quieter: a lock it could not create was treated as "no lock possible here, proceed", so the same `EPERM` ran the write or the install unlocked beside whichever process took the lock next. It now retries those codes three times before falling back to that best-effort answer. The backoffs add up to 26 ms on paper and measured 31-74 ms on an idle Windows machine, since short waits there overshoot.
18
18
 
19
19
  ## 1.0.2 -- `install --force` stops keeping the env it promised to overwrite, editing a client config stops rewriting the entry next to ours, and the install surfaces stop stating things that are not so
20
20
 
@@ -9,7 +9,7 @@ import {
9
9
  readCheckMemo,
10
10
  recordAttemptAt,
11
11
  writeCheckMemo
12
- } from "./chunk-7AUZKQTT.js";
12
+ } from "./chunk-YYZYSCOI.js";
13
13
  export {
14
14
  acquireUpgradeLock,
15
15
  attemptedRecentlyAt,
@@ -4387,7 +4387,7 @@ async function oamFloorLines(probe) {
4387
4387
  }
4388
4388
  async function defaultRunningPrefix(argvPath) {
4389
4389
  if (process.env.VITEST) return null;
4390
- const { detectRunningInstallPrefix: detectRunningInstallPrefix2 } = await import("./auto-upgrade-S4MOIA6T.js");
4390
+ const { detectRunningInstallPrefix: detectRunningInstallPrefix2 } = await import("./auto-upgrade-HYJENL2G.js");
4391
4391
  return detectRunningInstallPrefix2(argvPath);
4392
4392
  }
4393
4393
  async function defaultSpawn(cmd, args, cwd) {
@@ -4448,7 +4448,7 @@ async function runUpgrade(opts = {}) {
4448
4448
  if (method === "global-npm") {
4449
4449
  const rawPrefix = await (opts.runningPrefix ?? defaultRunningPrefix)(argvPath);
4450
4450
  if (rawPrefix !== null) {
4451
- const { quoteArgForDisplay: quoteArgForDisplay2, quoteShellArgIfNeeded: quoteShellArgIfNeeded2 } = await import("./auto-upgrade-S4MOIA6T.js");
4451
+ const { quoteArgForDisplay: quoteArgForDisplay2, quoteShellArgIfNeeded: quoteShellArgIfNeeded2 } = await import("./auto-upgrade-HYJENL2G.js");
4452
4452
  const spawnForm = quoteShellArgIfNeeded2(rawPrefix, opts.platform);
4453
4453
  const displayForm = quoteArgForDisplay2(rawPrefix, opts.platform);
4454
4454
  if (spawnForm !== null && displayForm !== null) {
@@ -4565,7 +4565,7 @@ async function runUpgrade(opts = {}) {
4565
4565
  return { exitCode: 3, lines };
4566
4566
  }
4567
4567
  function readCurrentVersion() {
4568
- return true ? "1.0.3" : "dev";
4568
+ return true ? "1.0.4" : "dev";
4569
4569
  }
4570
4570
 
4571
4571
  // src/auto-upgrade.ts
@@ -4847,7 +4847,7 @@ function defaultSpawn2(cmd, args, onDone = () => {
4847
4847
  async function maybeAutoUpgrade(deps = {}) {
4848
4848
  const optOut = process.env.YAW_MCP_AUTO_UPGRADE;
4849
4849
  if (optOut === "0" || optOut?.toLowerCase() === "false") return;
4850
- const current = deps.currentVersion ?? (true ? "1.0.3" : "dev");
4850
+ const current = deps.currentVersion ?? (true ? "1.0.4" : "dev");
4851
4851
  if (current === "dev") return;
4852
4852
  const argvPath = deps.argvPath ?? process.argv[1];
4853
4853
  const method = (deps.isSeaImpl ? await deps.isSeaImpl() : await detectSea()) ? "binary" : detectInstallMethod(argvPath, realpathSync2, ["unknown", "local-node-modules"]);
package/dist/index.js CHANGED
@@ -91,7 +91,7 @@ import {
91
91
  unparseableConfigFix,
92
92
  userConfigDir,
93
93
  yawModeOverlay
94
- } from "./chunk-7AUZKQTT.js";
94
+ } from "./chunk-YYZYSCOI.js";
95
95
 
96
96
  // src/audit-cmd.ts
97
97
  import { homedir as homedir6 } from "os";
@@ -561,6 +561,7 @@ async function withGradesLock(path5, opts, fn) {
561
561
  const lockPath = `${path5}${GRADES_LOCK_SUFFIX}`;
562
562
  const staleMs = opts.lockStaleMs ?? GRADES_LOCK_STALE_MS;
563
563
  const waitMs = opts.lockWaitMs ?? GRADES_LOCK_WAIT_MS;
564
+ const transientMs = opts.lockTransientMs ?? GRADES_LOCK_TRANSIENT_MS;
564
565
  const token = `${process.pid}-${++lockSeq}
565
566
  `;
566
567
  const isLive = (ageMs) => ageMs > -GRADES_LOCK_FUTURE_SKEW_MS && ageMs < staleMs;
@@ -575,7 +576,7 @@ async function withGradesLock(path5, opts, fn) {
575
576
  if (!isWin32TransientFsError(err)) throw err;
576
577
  const now = Date.now();
577
578
  transientSince ??= now;
578
- if (now >= deadline || now - transientSince >= GRADES_LOCK_TRANSIENT_MS) throw err;
579
+ if (now >= deadline || now - transientSince >= transientMs) throw err;
579
580
  await delay(GRADES_LOCK_POLL_MS);
580
581
  continue;
581
582
  }
@@ -3193,7 +3194,7 @@ async function connectToUpstreamOnce(config, onDisconnect, onListChanged, bridge
3193
3194
  if (downstreamCaps?.sampling) capabilities.sampling = downstreamCaps.sampling;
3194
3195
  if (downstreamCaps?.roots) capabilities.roots = {};
3195
3196
  const client = new Client(
3196
- { name: "yaw-mcp", version: true ? "1.0.3" : "dev" },
3197
+ { name: "yaw-mcp", version: true ? "1.0.4" : "dev" },
3197
3198
  { capabilities }
3198
3199
  );
3199
3200
  if (bridge && capabilities.elicitation) {
@@ -11028,7 +11029,7 @@ function foldBundleWarnings(warnings, probe) {
11028
11029
  const prefix = `${probe.path}:`;
11029
11030
  return warnings.filter((w) => !w.startsWith(prefix));
11030
11031
  }
11031
- var VERSION = true ? "1.0.3" : "dev";
11032
+ var VERSION = true ? "1.0.4" : "dev";
11032
11033
  var DOCTOR_USAGE = `Usage: yaw-mcp doctor [--json]
11033
11034
 
11034
11035
  Print a diagnostic of your yaw-mcp setup.
@@ -17659,7 +17660,7 @@ var ConnectServer = class _ConnectServer {
17659
17660
  static SHUTDOWN_DRAIN_MS = 2e3;
17660
17661
  constructor() {
17661
17662
  this.server = new Server(
17662
- { name: "yaw-mcp", version: true ? "1.0.3" : "dev" },
17663
+ { name: "yaw-mcp", version: true ? "1.0.4" : "dev" },
17663
17664
  {
17664
17665
  capabilities: {
17665
17666
  tools: { listChanged: true },
@@ -21062,7 +21063,7 @@ function registerShutdownTriggers(shutdown, targets) {
21062
21063
  // src/status-cmd.ts
21063
21064
  import { existsSync as existsSync10 } from "fs";
21064
21065
  import { homedir as homedir23 } from "os";
21065
- var VERSION2 = true ? "1.0.3" : "dev";
21066
+ var VERSION2 = true ? "1.0.4" : "dev";
21066
21067
  var STATUS_SCHEMA_VERSION = 1;
21067
21068
  var STATUS_USAGE = `Usage: yaw-mcp status [--json]
21068
21069
 
@@ -21814,7 +21815,7 @@ if (subcommand === "compliance") {
21814
21815
  `);
21815
21816
  process.exitCode = 0;
21816
21817
  } else if (subcommand === "--version" || subcommand === "-V") {
21817
- process.stdout.write(`yaw-mcp ${true ? "1.0.3" : "dev"}
21818
+ process.stdout.write(`yaw-mcp ${true ? "1.0.4" : "dev"}
21818
21819
  `);
21819
21820
  process.exitCode = 0;
21820
21821
  } 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.0.3",
3
+ "version": "1.0.4",
4
4
  "mcpName": "io.github.YawLabs/mcp",
5
5
  "description": "MCP gateway and orchestrator: one local install fronts every MCP server for Claude Code, Cursor, and VS Code, loading tools on demand.",
6
6
  "license": "SEE LICENSE IN LICENSE.md",