@yawlabs/mcp 1.1.0 → 1.1.2

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.
@@ -161,8 +161,13 @@ function stripInternalSecretsFromEnv(env) {
161
161
 
162
162
  // src/logger.ts
163
163
  var LOG_LEVELS = { debug: 0, info: 1, warn: 2, error: 3 };
164
+ function resolveLogLevel() {
165
+ const raw = process.env.LOG_LEVEL?.trim().toLowerCase();
166
+ return raw !== void 0 && Object.hasOwn(LOG_LEVELS, raw) ? raw : null;
167
+ }
164
168
  function minLevel() {
165
- return LOG_LEVELS[process.env.LOG_LEVEL?.toLowerCase()] ?? LOG_LEVELS.info;
169
+ const level = resolveLogLevel();
170
+ return level === null ? LOG_LEVELS.info : LOG_LEVELS[level];
166
171
  }
167
172
  function guardStderrErrors() {
168
173
  try {
@@ -178,8 +183,7 @@ function setLogSurface(next) {
178
183
  surface = next;
179
184
  }
180
185
  function logLevelRequested() {
181
- const raw = process.env.LOG_LEVEL?.trim().toLowerCase();
182
- return raw !== void 0 && raw in LOG_LEVELS;
186
+ return resolveLogLevel() !== null;
183
187
  }
184
188
  function renderData(data) {
185
189
  if (data === void 0) return "";
@@ -245,6 +249,21 @@ function isFeatureDisabled(name, env = process.env) {
245
249
  if (trimmed === "") return false;
246
250
  return trimmed === "0" || trimmed.toLowerCase() === "false";
247
251
  }
252
+ function isFeatureEnabled(name, env = process.env) {
253
+ const raw = env[name];
254
+ if (raw === void 0) return false;
255
+ const trimmed = raw.trim();
256
+ return trimmed === "1" || trimmed.toLowerCase() === "true";
257
+ }
258
+ function resolveNonNegativeIntEnv(name, defaultValue, env = process.env, min = 0) {
259
+ const raw = env[name];
260
+ if (raw === void 0) return defaultValue;
261
+ const trimmed = raw.trim();
262
+ if (!/^\d+$/.test(trimmed)) return defaultValue;
263
+ const n = Number.parseInt(trimmed, 10);
264
+ if (!Number.isFinite(n) || n < min) return defaultValue;
265
+ return n;
266
+ }
248
267
  function isTestSandbox(env = process.env) {
249
268
  const raw = env.VITEST;
250
269
  return raw !== void 0 && raw !== "";
@@ -701,6 +720,12 @@ function addJsoncArrayElement(src, path5, value) {
701
720
  const errors = [];
702
721
  const root = parseTree(debommed, errors, { allowTrailingComma: true });
703
722
  const existing = root === void 0 ? void 0 : findNodeAtLocation(root, path5);
723
+ if (existing?.type === "array") {
724
+ const wanted2 = JSON.stringify(value);
725
+ const elements = (existing.children ?? []).map(elementValue);
726
+ if (elements.some((e) => JSON.stringify(e) === wanted2)) return src;
727
+ return editJsoncPath(debommed, path5, [...elements, value]);
728
+ }
704
729
  if (existing !== void 0) {
705
730
  throw new Error(`addJsoncArrayElement: ${path5.join(".")} is a ${existing.type}, not an array`);
706
731
  }
@@ -721,7 +746,16 @@ function removeJsoncArrayElements(src, path5, matches) {
721
746
  if (path5.length === 0) throw new Error("removeJsoncArrayElements: path must not be empty");
722
747
  const debommed = src.charCodeAt(0) === 65279 ? src.slice(1) : src;
723
748
  const array = arrayNodeAt(debommed, path5);
724
- if (array === null) return src;
749
+ if (array === null) {
750
+ const errors = [];
751
+ const root = parseTree(debommed, errors, { allowTrailingComma: true });
752
+ const existing = root === void 0 ? void 0 : findNodeAtLocation(root, path5);
753
+ if (existing?.type !== "array") return src;
754
+ const elements = (existing.children ?? []).map(elementValue);
755
+ const kept = elements.filter((e) => !matches(e));
756
+ if (kept.length === elements.length) return src;
757
+ return editJsoncPath(debommed, path5, kept);
758
+ }
725
759
  const doomed = (array.children ?? []).filter((child) => matches(elementValue(child)));
726
760
  if (doomed.length === 0) return src;
727
761
  let text = debommed;
@@ -1134,7 +1168,7 @@ function makeView(read, raw, address, addressIndex, adapter, opts) {
1134
1168
  legacyKey: () => findLegacyKey(entries.map((e) => e.key)),
1135
1169
  otherServerKeys: () => {
1136
1170
  const skip = /* @__PURE__ */ new Set([ENTRY_NAME, ...LEGACY_ENTRY_NAMES]);
1137
- return entries.filter((e) => !skip.has(e.key) && typeof e.value === "object" && e.value !== null && !Array.isArray(e.value)).map((e) => e.key);
1171
+ return entries.filter((e) => !skip.has(e.key) && isRecord(e.value)).map((e) => e.key);
1138
1172
  },
1139
1173
  count: () => entries.length,
1140
1174
  carryableEnv: (key) => carryableEnvOf(at(key)?.value),
@@ -2121,7 +2155,7 @@ function tomlNumber(value, key) {
2121
2155
  if (!Number.isFinite(value)) {
2122
2156
  throw new TomlRenderError(`cannot write ${String(value)} as the "${key}" value: it is not a finite number`);
2123
2157
  }
2124
- if (FLOAT_FIELDS.has(key) && Number.isInteger(value)) return `${value}.0`;
2158
+ if (FLOAT_FIELDS.has(key) && Number.isInteger(value) && Math.abs(value) < 1e21) return `${value}.0`;
2125
2159
  return String(value);
2126
2160
  }
2127
2161
  function tomlValue(value, key) {
@@ -3084,7 +3118,7 @@ var ZED_TARGET = defineTarget({
3084
3118
  entry: {
3085
3119
  carry: carryZedFields
3086
3120
  },
3087
- notes: "Zed reads context_servers from settings.json, which allows // comments and trailing commas, and starts, restarts or stops servers when the file is saved -- no restart needed. On Linux the path follows $XDG_CONFIG_HOME when it is set; the Flatpak build reads $FLATPAK_XDG_CONFIG_HOME/zed/settings.json instead, which install does not follow. Zed ignores a project's .zed/settings.json until you trust the project. Needs Zed v0.214.5 (2025-11-26) or newer: earlier versions reject this entry shape.",
3121
+ notes: "Zed reads context_servers from settings.json, which allows // comments and trailing commas, and starts, restarts or stops servers when the file is saved -- no restart needed. On Linux the path follows an absolute $XDG_CONFIG_HOME (Zed ignores a relative one, and so does install); the Flatpak build reads $FLATPAK_XDG_CONFIG_HOME/zed/settings.json instead, which install does not follow. Zed ignores a project's .zed/settings.json until you trust the project. Needs Zed v0.214.5 (2025-11-26) or newer: earlier versions reject this entry shape.",
3088
3122
  resolvePath: resolveZedPath,
3089
3123
  scopes: [
3090
3124
  // User FIRST, like every other multi-scope row: the probe walks this array
@@ -3156,8 +3190,9 @@ async function settingsFingerprint(path5) {
3156
3190
  try {
3157
3191
  const st = await stat2(path5);
3158
3192
  return { mtimeMs: st.mtimeMs, size: st.size };
3159
- } catch {
3160
- return null;
3193
+ } catch (err) {
3194
+ if (err?.code === "ENOENT") return null;
3195
+ throw err;
3161
3196
  }
3162
3197
  }
3163
3198
  async function prepareClaudeCodeSettingsPatch(opts) {
@@ -3169,7 +3204,21 @@ async function prepareClaudeCodeSettingsPatch(opts) {
3169
3204
  if (!path5) return null;
3170
3205
  let existing = {};
3171
3206
  let rawSettings = null;
3172
- const fingerprint = await settingsFingerprint(path5);
3207
+ let fingerprint;
3208
+ try {
3209
+ fingerprint = await settingsFingerprint(path5);
3210
+ } catch (e) {
3211
+ return {
3212
+ path: path5,
3213
+ nextJson: "",
3214
+ changed: false,
3215
+ added: [],
3216
+ removed: [],
3217
+ malformed: true,
3218
+ malformedReason: `could not stat it (${e.message})`,
3219
+ fingerprint: null
3220
+ };
3221
+ }
3173
3222
  if (fingerprint !== null) {
3174
3223
  try {
3175
3224
  const raw = await readFile2(path5, "utf8");
@@ -3229,6 +3278,20 @@ async function prepareClaudeCodeSettingsPatch(opts) {
3229
3278
  }
3230
3279
  try {
3231
3280
  const next = patchPermissionsAllowText(rawSettings, [CLAUDE_CODE_ALLOW_PATTERN], op);
3281
+ const nextAllow = parseJsonc(next)?.permissions?.allow;
3282
+ const hasPattern = Array.isArray(nextAllow) && nextAllow.includes(CLAUDE_CODE_ALLOW_PATTERN);
3283
+ if (next === rawSettings || hasPattern !== (op === "add")) {
3284
+ return {
3285
+ path: path5,
3286
+ nextJson: "",
3287
+ changed: false,
3288
+ added: [],
3289
+ removed: [],
3290
+ malformed: true,
3291
+ malformedReason: `could not splice permissions.allow (the edit left the pattern ${op === "add" ? "absent" : "present"})`,
3292
+ fingerprint
3293
+ };
3294
+ }
3232
3295
  return { path: path5, nextJson: terminateWithNewline(next), changed: true, added, removed, fingerprint };
3233
3296
  } catch (e) {
3234
3297
  return {
@@ -3837,7 +3900,7 @@ function rememberWarnedUntrustedDir(candidate) {
3837
3900
  }
3838
3901
  function ownedByCurrentUser(st, env) {
3839
3902
  const geteuid = process.geteuid;
3840
- if (typeof geteuid !== "function") return env[ALLOW_UNOWNED_ENV] === "1";
3903
+ if (typeof geteuid !== "function") return isFeatureEnabled(ALLOW_UNOWNED_ENV, env);
3841
3904
  return typeof st.uid === "number" && st.uid === geteuid.call(process);
3842
3905
  }
3843
3906
  async function findProjectConfigDir(start, home = homedir3(), env = process.env) {
@@ -4030,9 +4093,7 @@ var STATE_SCHEMA_VERSION = 2;
4030
4093
  var STATE_FILENAME = "state.json";
4031
4094
  var DISABLE_PERSISTENCE_ENV = "YAW_MCP_DISABLE_PERSISTENCE";
4032
4095
  function isPersistenceDisabled(env = process.env) {
4033
- const raw = env[DISABLE_PERSISTENCE_ENV]?.trim();
4034
- if (raw === void 0 || raw === "") return false;
4035
- return raw === "1" || raw.toLowerCase() === "true";
4096
+ return isFeatureEnabled(DISABLE_PERSISTENCE_ENV, env);
4036
4097
  }
4037
4098
  var READABLE_STATE_VERSIONS = /* @__PURE__ */ new Set([1, STATE_SCHEMA_VERSION]);
4038
4099
  function isReadableStateVersion(version) {
@@ -4605,6 +4666,18 @@ function oamInstallAdvice(os) {
4605
4666
  if (os === CURRENT_OS && !oamPublishesBinaryForThisMachine()) return oamNoBinaryReason();
4606
4667
  return oamInstallCommand(os);
4607
4668
  }
4669
+ function oamReleaseDir(os) {
4670
+ return os === "windows" ? "%LOCALAPPDATA%\\oam\\bin" : "~/.oam/bin";
4671
+ }
4672
+ function oamBuildTreeFix(os, viaOamBin = false) {
4673
+ const dir = oamReleaseDir(os);
4674
+ const where = `${dir} (the installer default; OAM_INSTALL_DIR changes it)`;
4675
+ if (viaOamBin) {
4676
+ return `point OAM_BIN at an installed release oam, or unset it to use the oam on PATH; with no release installed, install one first (${oamInstallCommand(os)}, into ${where})`;
4677
+ }
4678
+ const override = os === "windows" ? " (OAM_SKIP_PATH_SHADOW=1 overrides it)" : "";
4679
+ return `put the release oam's dir, ${where}, ahead of the build tree on PATH, or point OAM_BIN at an installed release oam; with no release installed, reorder PATH first, since the installer (${oamInstallCommand(os)}) refuses while another oam resolves ahead of its dir${override}`;
4680
+ }
4608
4681
  function oamHeapOomHint(stderr) {
4609
4682
  if (!stderr.includes("OAM-RT-OOM")) return null;
4610
4683
  return `The oam-hosted child hit its V8 heap cap. Raise it with OAM_MAX_HEAP_MB=<mb> in this server's env, or set "runtime": "node" for this server in bundles.json.`;
@@ -4841,7 +4914,7 @@ async function probeOamUncached(run, generation) {
4841
4914
  if (run === spawnVersionProbe && absResolved !== null && isBuildTreePath(absResolved)) {
4842
4915
  log("warn", "oam resolves to a local build-tree binary; falling back to node for this process", {
4843
4916
  bin: absResolved,
4844
- fix: explicit ? "point OAM_BIN at the installed oam (~/.oam/bin)" : "put ~/.oam/bin ahead of the build tree on PATH",
4917
+ fix: oamBuildTreeFix(CURRENT_OS, explicit),
4845
4918
  thenRestart: "restart yaw-mcp; this probe is cached for the process lifetime"
4846
4919
  });
4847
4920
  return publish({
@@ -4850,7 +4923,8 @@ async function probeOamUncached(run, generation) {
4850
4923
  version: null,
4851
4924
  belowMin: false,
4852
4925
  failure: "build-tree",
4853
- failureDetail: `${absResolved} is a compiler output binary (build-tree), not a release`
4926
+ failureDetail: `${absResolved} is a compiler output binary (build-tree), not a release`,
4927
+ viaOamBin: explicit
4854
4928
  });
4855
4929
  }
4856
4930
  const identity = (() => {
@@ -4891,13 +4965,15 @@ async function probeOamUncached(run, generation) {
4891
4965
  // on), so below-min always means out of date, and oam updates itself
4892
4966
  // in place.
4893
4967
  updateWith: "oam self-update",
4894
- // ...but updating alone changes nothing here. oamProbeCache is written
4895
- // once per process and only ever cleared by a test hook, so every
4896
- // opted-in server keeps landing on node until the broker restarts --
4897
- // and an MCP broker under a desktop client lives for days. Without this
4898
- // the user runs the update, sees no further log line, and reads a
4899
- // working fix as a fix that did not work. The timeout and generic
4900
- // failure warns say "for this process" for the same reason.
4968
+ // ...but updating alone changes nothing here. A non-timeout verdict
4969
+ // like this one is cached for the process lifetime and only cleared by
4970
+ // a test hook (only a timeout verdict lapses, after
4971
+ // OAM_PROBE_TIMEOUT_RECHECK_MS), so every opted-in server keeps landing
4972
+ // on node until the broker restarts -- and an MCP broker under a
4973
+ // desktop client lives for days. Without this the user runs the update,
4974
+ // sees no further log line, and reads a working fix as a fix that did
4975
+ // not work. The generic failure warns say "for this process" for the
4976
+ // same reason; the timeout warn says it is probed again instead.
4901
4977
  thenRestart: "restart yaw-mcp; this probe is cached for the process lifetime"
4902
4978
  });
4903
4979
  return publish({ bin: null, binPath: null, version, belowMin: true, failure: null, failureDetail: null });
@@ -5034,11 +5110,11 @@ function managedNodeBin(env = process.env, platform = process.platform, execPath
5034
5110
  return resolveBinAbsolute("node", env, platform);
5035
5111
  }
5036
5112
  function rewriteNpmToManagedNode(command, args, deps) {
5113
+ if (nodeLaunchKind(command) !== "npx") return { command, args };
5037
5114
  if (!deps.nodeBin) {
5038
5115
  log("debug", "no node binary located for the managed sidecar spawn; staying on npx", { command });
5039
5116
  return { command, args };
5040
5117
  }
5041
- if (nodeLaunchKind(command) !== "npx") return { command, args };
5042
5118
  const specIdx = npxSpecIndex(args);
5043
5119
  const spec = specIdx === -1 ? void 0 : args[specIdx];
5044
5120
  if (!spec) return { command, args };
@@ -5306,7 +5382,7 @@ function notePinnedSidecar(pkg, version, source, from) {
5306
5382
  pinnedReported.add(pkg);
5307
5383
  log(
5308
5384
  source === "managed" ? "debug" : "info",
5309
- "hosting sidecar on oam from an on-disk copy; it will not self-update the way npx does",
5385
+ "running sidecar from an on-disk copy instead of npx; it will not self-update the way npx does",
5310
5386
  {
5311
5387
  package: pkg,
5312
5388
  version: version ?? "unknown",
@@ -5370,9 +5446,10 @@ async function resolveOamSpawn(command, args, optedIn = true) {
5370
5446
  });
5371
5447
  }
5372
5448
  var managedEntryMemo = /* @__PURE__ */ new Map();
5373
- function resolveManagedSpawn(command, args, fromUrl = import.meta.url, npmCache = npmCacheDir(fromUrl), managedRoot = sidecarsNodeModules(), nodeBin = managedNodeBin()) {
5449
+ function resolveManagedSpawn(command, args, fromUrl = import.meta.url, npmCache = npmCacheDir(fromUrl), managedRoot = sidecarsNodeModules(), nodeBin) {
5450
+ if (nodeLaunchKind(command) !== "npx") return { command, args };
5374
5451
  return rewriteNpmToManagedNode(command, args, {
5375
- nodeBin,
5452
+ nodeBin: nodeBin === void 0 ? managedNodeBin() : nodeBin,
5376
5453
  resolveEntry: (pkg, wantVersion) => {
5377
5454
  if (wantVersion !== null) return resolveNpmEntry(pkg, fromUrl, npmCache, managedRoot, wantVersion);
5378
5455
  const memoed = managedEntryMemo.get(pkg);
@@ -5469,7 +5546,6 @@ function classifyEntrypoint(argvPath) {
5469
5546
  if (/\/npm\/node_modules\/@yawlabs\/mcp\//.test(normalized)) return "global-npm";
5470
5547
  if (POSIX_GLOBAL_LIB_PREFIX.test(normalized)) return "global-npm";
5471
5548
  if (MANAGED_NODE_LIB_PREFIX.test(normalized)) return "global-npm";
5472
- if (/\/AppData\/Roaming\/npm\/node_modules\/@yawlabs\/mcp\//.test(normalized)) return "global-npm";
5473
5549
  if (/\/\.npm-global\/(?:lib\/)?node_modules\/@yawlabs\/mcp\//.test(normalized)) return "global-npm";
5474
5550
  if (/\/bin\/node_modules\/@yawlabs\/mcp\//.test(normalized)) return "global-npm";
5475
5551
  if (/\/pnpm\/global\/\d+\/node_modules\/@yawlabs\/mcp\//.test(normalized)) return "pnpm-global";
@@ -5478,10 +5554,19 @@ function classifyEntrypoint(argvPath) {
5478
5554
  if (/\/(yaw-mcp|mcph|mcp)\/(dist|src)\//.test(normalized)) return "dev-checkout";
5479
5555
  return "unknown";
5480
5556
  }
5481
- function localInstallRoot(argvPath) {
5557
+ function localInstallRoot(argvPath, realpath3 = realpathSync2) {
5482
5558
  if (!argvPath) return null;
5483
- const idx = argvPath.replace(/\\/g, "/").indexOf("/node_modules/");
5484
- return idx > 0 ? argvPath.slice(0, idx) : null;
5559
+ const literal = treeRootOf(argvPath);
5560
+ if (literal !== null) return literal;
5561
+ try {
5562
+ return treeRootOf(realpath3(argvPath));
5563
+ } catch {
5564
+ return null;
5565
+ }
5566
+ }
5567
+ function treeRootOf(p) {
5568
+ const idx = p.replace(/\\/g, "/").indexOf("/node_modules/");
5569
+ return idx > 0 ? p.slice(0, idx) : null;
5485
5570
  }
5486
5571
  function runningPackageDir(argvPath, realpath3 = realpathSync2) {
5487
5572
  if (!argvPath) return null;
@@ -5685,17 +5770,17 @@ async function oamFloorLines(probe) {
5685
5770
  }
5686
5771
  async function defaultRunningPrefix(argvPath) {
5687
5772
  if (isTestSandbox()) return null;
5688
- const { detectRunningInstallPrefix: detectRunningInstallPrefix2 } = await import("./auto-upgrade-3IZNHFYK.js");
5773
+ const { detectRunningInstallPrefix: detectRunningInstallPrefix2 } = await import("./auto-upgrade-XHSUUYUG.js");
5689
5774
  return detectRunningInstallPrefix2(argvPath);
5690
5775
  }
5691
5776
  async function defaultAcquireLock(prefixDir) {
5692
5777
  if (isTestSandbox()) return () => {
5693
5778
  };
5694
- const { acquireUpgradeLock: acquireUpgradeLock2 } = await import("./auto-upgrade-3IZNHFYK.js");
5779
+ const { acquireUpgradeLock: acquireUpgradeLock2 } = await import("./auto-upgrade-XHSUUYUG.js");
5695
5780
  return acquireUpgradeLock2(prefixDir);
5696
5781
  }
5697
5782
  async function upgradeLockPath(prefixDir) {
5698
- const { UPGRADE_LOCK_NAME: UPGRADE_LOCK_NAME2 } = await import("./auto-upgrade-3IZNHFYK.js");
5783
+ const { UPGRADE_LOCK_NAME: UPGRADE_LOCK_NAME2 } = await import("./auto-upgrade-XHSUUYUG.js");
5699
5784
  return join11(prefixDir, UPGRADE_LOCK_NAME2);
5700
5785
  }
5701
5786
  async function defaultSpawn(cmd, args, cwd) {
@@ -5743,7 +5828,8 @@ async function runUpgrade(opts = {}) {
5743
5828
  const current = opts.currentVersion ?? readCurrentVersion();
5744
5829
  const argvPath = opts.argvPath ?? process.argv[1];
5745
5830
  const sea = opts.isSea ? opts.isSea() : await detectSea();
5746
- const method = sea ? "binary" : await refineInstallMethod(detectInstallMethod(argvPath), argvPath, opts.npmPrefix);
5831
+ const realpath3 = opts.realpath ?? realpathSync2;
5832
+ const method = sea ? "binary" : await refineInstallMethod(detectInstallMethod(argvPath, realpath3), argvPath, opts.npmPrefix);
5747
5833
  let latest;
5748
5834
  try {
5749
5835
  latest = await fetcher();
@@ -5757,7 +5843,7 @@ async function runUpgrade(opts = {}) {
5757
5843
  if (method === "global-npm") {
5758
5844
  rawPrefix = await (opts.runningPrefix ?? defaultRunningPrefix)(argvPath);
5759
5845
  if (rawPrefix !== null) {
5760
- const { quoteArgForDisplay: quoteArgForDisplay2, quoteShellArgIfNeeded: quoteShellArgIfNeeded2 } = await import("./auto-upgrade-3IZNHFYK.js");
5846
+ const { quoteArgForDisplay: quoteArgForDisplay2, quoteShellArgIfNeeded: quoteShellArgIfNeeded2 } = await import("./auto-upgrade-XHSUUYUG.js");
5761
5847
  const spawnForm = quoteShellArgIfNeeded2(rawPrefix, opts.platform);
5762
5848
  const displayForm = quoteArgForDisplay2(rawPrefix, opts.platform);
5763
5849
  if (spawnForm !== null && displayForm !== null) {
@@ -5767,7 +5853,7 @@ async function runUpgrade(opts = {}) {
5767
5853
  }
5768
5854
  }
5769
5855
  }
5770
- const installRoot = method === "local-node-modules" ? localInstallRoot(argvPath) : null;
5856
+ const installRoot = method === "local-node-modules" ? localInstallRoot(argvPath, realpath3) : null;
5771
5857
  if (opts.json) {
5772
5858
  print(JSON.stringify({ ...plan, command: suggestedCommand, cwd: installRoot }, null, 2));
5773
5859
  return { exitCode: plan.stale ? 1 : 0, lines };
@@ -5867,7 +5953,7 @@ async function runUpgrade(opts = {}) {
5867
5953
  if (code === 0) {
5868
5954
  print("");
5869
5955
  print(`OK: Upgraded @yawlabs/mcp to ${latest}`);
5870
- const pkgDir = runningPackageDir(argvPath);
5956
+ const pkgDir = runningPackageDir(argvPath, realpath3);
5871
5957
  const running = pkgDir === null ? null : await (opts.installedVersion ?? defaultInstalledVersion)(pkgDir);
5872
5958
  const bare = (s) => s.startsWith("v") ? s.slice(1) : s;
5873
5959
  if (running !== null && compareVersions(bare(running), bare(latest)) < 0) {
@@ -5889,7 +5975,7 @@ async function runUpgrade(opts = {}) {
5889
5975
  return { exitCode: 3, lines };
5890
5976
  }
5891
5977
  function readCurrentVersion() {
5892
- return true ? "1.1.0" : "dev";
5978
+ return true ? "1.1.2" : "dev";
5893
5979
  }
5894
5980
 
5895
5981
  // src/auto-upgrade.ts
@@ -6181,7 +6267,7 @@ function defaultSpawn2(cmd, args, onDone = () => {
6181
6267
  }
6182
6268
  async function maybeAutoUpgrade(deps = {}) {
6183
6269
  if (isFeatureDisabled("YAW_MCP_AUTO_UPGRADE")) return;
6184
- const current = deps.currentVersion ?? (true ? "1.1.0" : "dev");
6270
+ const current = deps.currentVersion ?? (true ? "1.1.2" : "dev");
6185
6271
  if (current === "dev") return;
6186
6272
  const argvPath = deps.argvPath ?? process.argv[1];
6187
6273
  let method = (deps.isSeaImpl ? await deps.isSeaImpl() : await detectSea()) ? "binary" : detectInstallMethod(argvPath, realpathSync3, ["unknown", "local-node-modules"]);
@@ -6298,6 +6384,10 @@ export {
6298
6384
  stripTrailingCommas,
6299
6385
  parseJsonc,
6300
6386
  editJsoncPath,
6387
+ isFeatureDisabled,
6388
+ isFeatureEnabled,
6389
+ resolveNonNegativeIntEnv,
6390
+ isTestSandbox,
6301
6391
  cacheDir,
6302
6392
  CONFIG_DIRNAME,
6303
6393
  sidecarsRoot,
@@ -6310,8 +6400,6 @@ export {
6310
6400
  ALLOW_UNOWNED_ENV,
6311
6401
  findProjectConfigDir,
6312
6402
  guidePath,
6313
- isFeatureDisabled,
6314
- isTestSandbox,
6315
6403
  launchOf,
6316
6404
  canonicalJson,
6317
6405
  describeValueShape,
@@ -6385,6 +6473,7 @@ export {
6385
6473
  oamPublishesBinaryForThisMachine,
6386
6474
  oamNoBinaryReason,
6387
6475
  oamInstallAdvice,
6476
+ oamBuildTreeFix,
6388
6477
  oamHeapOomHint,
6389
6478
  oamFailureLabel,
6390
6479
  compareVersions,