@mushi-mushi/cli 0.37.0 → 0.37.1

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.
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  MUSHI_CLI_VERSION
3
- } from "./chunk-GLPJO6XP.js";
3
+ } from "./chunk-IMASP6GK.js";
4
4
  import {
5
5
  assertEndpoint,
6
6
  normalizeEndpoint
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
 
3
3
  // src/version.ts
4
- var MUSHI_CLI_VERSION = true ? "0.37.0" : "0.0.0-dev";
4
+ var MUSHI_CLI_VERSION = true ? "0.37.1" : "0.0.0-dev";
5
5
  var MUSHI_MCP_PIN_SPEC = "@mushi-mushi/mcp@0.30.7";
6
6
 
7
7
  export {
@@ -1,5 +1,5 @@
1
1
  // src/version.ts
2
- var MUSHI_CLI_VERSION = true ? "0.37.0" : "0.0.0-dev";
2
+ var MUSHI_CLI_VERSION = true ? "0.37.1" : "0.0.0-dev";
3
3
  var MUSHI_MCP_PIN_SPEC = "@mushi-mushi/mcp@0.30.7";
4
4
 
5
5
  export {
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  MUSHI_CLI_VERSION
4
- } from "./chunk-AIEM5ZMZ.js";
4
+ } from "./chunk-GZ2WEGNU.js";
5
5
  import {
6
6
  CLOUD_API_ENDPOINT,
7
7
  normalizeEndpoint
@@ -8,10 +8,10 @@ import {
8
8
  requireConfig,
9
9
  requireUuid,
10
10
  tryLoadWorkerKey
11
- } from "./chunk-7ZZIY5CW.js";
11
+ } from "./chunk-P6DI2XN7.js";
12
12
  import {
13
13
  MUSHI_CLI_VERSION
14
- } from "./chunk-AIEM5ZMZ.js";
14
+ } from "./chunk-GZ2WEGNU.js";
15
15
 
16
16
  // src/worker/daemon.ts
17
17
  import { existsSync as existsSync6, readFileSync as readFileSync5 } from "fs";
@@ -447,7 +447,7 @@ import { spawn } from "child_process";
447
447
  import { createHash as createHash2 } from "crypto";
448
448
  import { existsSync as existsSync2, mkdirSync as mkdirSync2, rmSync } from "fs";
449
449
  import { homedir as homedir2, tmpdir as tmpdir2 } from "os";
450
- import { basename as basename2, join as join4 } from "path";
450
+ import { basename as basename2, join as join4, win32 } from "path";
451
451
  import { stripVTControlCharacters as stripVTControlCharacters2 } from "util";
452
452
 
453
453
  // src/commands/work-recheck.ts
@@ -875,7 +875,7 @@ function hookFailureDetail(r, max = 900) {
875
875
  const out = `hook steps failed: ${failed.join(", ")}. ${parts.join(" / ")}`.replace(/[ \t]+/g, " ");
876
876
  return out.length > max ? `${out.slice(0, max)} [cut]` : out;
877
877
  }
878
- var INFRA_FAILURE = /\b(?:EACCES|EPERM|ENOSPC|ENOMEM|ECONNRESET|ECONNREFUSED|ETIMEDOUT|EAI_AGAIN|ENOTFOUND|E_NETWORK|E_AUTH_MISSING)\b|permission denied|could not resolve host|unable to access|connection (?:lost|reset|refused|timed out)|rate limit|index\.lock|cannot lock ref|unable to create .*\.lock|no space left|out of memory|cannot allocate memory|killed|signal 9|timed out|resource temporarily unavailable|segmentation fault|SIGSEGV|core dumped|exit (?:code|status) 139/i;
878
+ var INFRA_FAILURE = /\b(?:EACCES|EPERM|ENOSPC|ENOMEM|ECONNRESET|ECONNREFUSED|ETIMEDOUT|EAI_AGAIN|ENOTFOUND|E_NETWORK|E_AUTH_MISSING)\b|permission denied|could not resolve host|unable to access|connection (?:lost|reset|refused|timed out)|rate limit|index\.lock|cannot lock ref|unable to create .*\.lock|no space left|out of memory|cannot allocate memory|killed|signal 9|timed out|resource temporarily unavailable|segmentation fault|SIGSEGV|core dumped|exit (?:code|status) 139|Native stack trace|FailureMessage Object|FATAL ERROR:|JavaScript heap out of memory/i;
879
879
  function classifyFailure(message, stage) {
880
880
  if (stage === "prepare") return "infra";
881
881
  return INFRA_FAILURE.test(message) ? "infra" : "code";
@@ -1483,14 +1483,25 @@ async function installDeps(wt, log) {
1483
1483
  const cmd = installCommand((f) => existsSync2(join4(wt, f)));
1484
1484
  if (!cmd) return;
1485
1485
  log(` deps: ${cmd[0]} ${cmd[1][0]} (so the agent can run tests and the commit hooks work)`);
1486
- const [bin, args] = windowsShim(cmd, process.platform);
1486
+ const spawnable = windowsInstaller(cmd, process.platform, process.execPath, existsSync2);
1487
+ if (!spawnable) {
1488
+ log(` deps: no ${cmd[0]} script next to this Node, so no install; the agent works without dependencies`);
1489
+ return;
1490
+ }
1491
+ const [bin, args] = spawnable;
1487
1492
  let r = await runProc(bin, args, { cwd: wt, timeoutMs: 10 * 6e4 });
1488
1493
  if (r.code !== 0) r = await runProc(bin, args, { cwd: wt, timeoutMs: 10 * 6e4 });
1489
1494
  if (r.code !== 0) log(` deps: install failed twice, the agent works without them (${failureTail(r, 300)})`);
1490
1495
  }
1491
- function windowsShim(cmd, platform) {
1496
+ var WINDOWS_PM_SCRIPTS = {
1497
+ npm: ["node_modules/npm/bin/npm-cli.js"],
1498
+ pnpm: ["node_modules/pnpm/bin/pnpm.cjs", "node_modules/corepack/dist/pnpm.js"],
1499
+ yarn: ["node_modules/yarn/bin/yarn.js", "node_modules/corepack/dist/yarn.js"]
1500
+ };
1501
+ function windowsInstaller(cmd, platform, nodeExe, hasFile) {
1492
1502
  if (platform !== "win32") return cmd;
1493
- return ["cmd.exe", ["/d", "/s", "/c", cmd[0], ...cmd[1]]];
1503
+ const script = (WINDOWS_PM_SCRIPTS[cmd[0]] ?? []).map((rel) => win32.join(win32.dirname(nodeExe), rel)).find((p) => hasFile(p));
1504
+ return script ? [nodeExe, [script, ...cmd[1]]] : null;
1494
1505
  }
1495
1506
  function isMissingModuleFailure(message) {
1496
1507
  return /ERR_MODULE_NOT_FOUND|Cannot find (package|module)/.test(message);
@@ -1595,7 +1606,7 @@ function registerWorkCommands(program) {
1595
1606
  if (opts.repoDir || opts.report || opts.followups || opts.recheck) {
1596
1607
  throw new MushiCliError("E_INVALID_INPUT", "--daemon takes its lanes and clones from the worker config, not from --repo-dir, --report or --followups.", "mushi worker install");
1597
1608
  }
1598
- const { runDaemon: runDaemon2 } = await import("./daemon-EARIQMQY.js");
1609
+ const { runDaemon: runDaemon2 } = await import("./daemon-WUYNF5E5.js");
1599
1610
  await runDaemon2({ configPath: opts.workerConfig, ...opts.agent !== void 0 ? { agent } : {}, ...opts.anyRepo ? { anyRepo: true } : {} });
1600
1611
  return;
1601
1612
  }
@@ -9,10 +9,10 @@ import {
9
9
  requireUuid,
10
10
  saveConfig,
11
11
  savedSdkKeyFor
12
- } from "./chunk-7ZZIY5CW.js";
12
+ } from "./chunk-P6DI2XN7.js";
13
13
  import {
14
14
  MUSHI_MCP_PIN_SPEC
15
- } from "./chunk-AIEM5ZMZ.js";
15
+ } from "./chunk-GZ2WEGNU.js";
16
16
  import {
17
17
  assertEndpoint,
18
18
  normalizeEndpoint
@@ -6,10 +6,10 @@ import {
6
6
  saveConfig,
7
7
  savedSdkKeyFor,
8
8
  waitForIngestReady
9
- } from "./chunk-TWWJZ64B.js";
9
+ } from "./chunk-GGIRTNKP.js";
10
10
  import {
11
11
  MUSHI_MCP_PIN_SPEC
12
- } from "./chunk-GLPJO6XP.js";
12
+ } from "./chunk-IMASP6GK.js";
13
13
  import {
14
14
  detectFramework,
15
15
  envVarsToWrite,
@@ -2,10 +2,10 @@
2
2
  import {
3
3
  resolveSdkEnvKey,
4
4
  runConnect
5
- } from "./chunk-DX3VPJSS.js";
5
+ } from "./chunk-STITR7EL.js";
6
6
  import "./chunk-KOBEOGNF.js";
7
- import "./chunk-7ZZIY5CW.js";
8
- import "./chunk-AIEM5ZMZ.js";
7
+ import "./chunk-P6DI2XN7.js";
8
+ import "./chunk-GZ2WEGNU.js";
9
9
  import "./chunk-LGGE3LH7.js";
10
10
  export {
11
11
  resolveSdkEnvKey,
@@ -10,9 +10,9 @@ import {
10
10
  readWorkerKey,
11
11
  runDaemon,
12
12
  workerHostId
13
- } from "./chunk-RQY6YTWU.js";
14
- import "./chunk-7ZZIY5CW.js";
15
- import "./chunk-AIEM5ZMZ.js";
13
+ } from "./chunk-SP55DHLD.js";
14
+ import "./chunk-P6DI2XN7.js";
15
+ import "./chunk-GZ2WEGNU.js";
16
16
  import "./chunk-LGGE3LH7.js";
17
17
  export {
18
18
  assertWorkerKey,
package/dist/index.js CHANGED
@@ -22,7 +22,7 @@ import {
22
22
  sanitizeEndpoint,
23
23
  sanitizeProjectId,
24
24
  writeMcpServerEntry
25
- } from "./chunk-DX3VPJSS.js";
25
+ } from "./chunk-STITR7EL.js";
26
26
  import {
27
27
  FRAMEWORKS,
28
28
  detectFramework,
@@ -50,7 +50,7 @@ import {
50
50
  registerUxCommands,
51
51
  registerWorkCommands,
52
52
  validateWorkerConfig
53
- } from "./chunk-RQY6YTWU.js";
53
+ } from "./chunk-SP55DHLD.js";
54
54
  import {
55
55
  CONFIG_PATH,
56
56
  MushiCliError,
@@ -89,11 +89,11 @@ import {
89
89
  tryLoadKeyFromKeychain,
90
90
  trySaveKeyToKeychain,
91
91
  trySaveWorkerKey
92
- } from "./chunk-7ZZIY5CW.js";
92
+ } from "./chunk-P6DI2XN7.js";
93
93
  import {
94
94
  MUSHI_CLI_VERSION,
95
95
  MUSHI_MCP_PIN_SPEC
96
- } from "./chunk-AIEM5ZMZ.js";
96
+ } from "./chunk-GZ2WEGNU.js";
97
97
  import {
98
98
  CLOUD_API_ENDPOINT,
99
99
  CLOUD_MCP_OAUTH_URL,
@@ -1609,7 +1609,7 @@ async function checkOnboardingStatus(config, _consoleBase, cwd, doFetch = global
1609
1609
  }
1610
1610
  async function checkVersionDrift(cwd, doFetch) {
1611
1611
  const checks = [];
1612
- const { MUSHI_CLI_VERSION: MUSHI_CLI_VERSION2 } = await import("./version-AD7XJENS.js");
1612
+ const { MUSHI_CLI_VERSION: MUSHI_CLI_VERSION2 } = await import("./version-JSSHATRX.js");
1613
1613
  if (MUSHI_CLI_VERSION2 === "0.0.0-dev") return checks;
1614
1614
  const parse2 = (v) => {
1615
1615
  const m = v.replace(/^[~^]/, "").match(/^(\d+)\.(\d+)\.(\d+)/);
@@ -2582,7 +2582,7 @@ async function maybeOfferConnect(credentials, options, _consoleBase) {
2582
2582
  if (p.isCancel(answer) || !answer) return;
2583
2583
  const endpoint = resolveCloudEndpoint(options.endpoint);
2584
2584
  try {
2585
- const { runConnect: runConnect2 } = await import("./connect-ZGWB7AVJ.js");
2585
+ const { runConnect: runConnect2 } = await import("./connect-YO4W7TAV.js");
2586
2586
  const saved = loadConfig();
2587
2587
  const result = await runConnect2(
2588
2588
  {
package/dist/init.js CHANGED
@@ -25,10 +25,10 @@ import {
25
25
  saveConfig,
26
26
  savedSdkKeyFor,
27
27
  trySaveKeyToKeychain
28
- } from "./chunk-TWWJZ64B.js";
28
+ } from "./chunk-GGIRTNKP.js";
29
29
  import {
30
30
  MUSHI_CLI_VERSION
31
- } from "./chunk-GLPJO6XP.js";
31
+ } from "./chunk-IMASP6GK.js";
32
32
  import {
33
33
  FRAMEWORKS,
34
34
  detectFramework,
@@ -2127,7 +2127,7 @@ async function maybeOfferConnect(credentials, options, _consoleBase) {
2127
2127
  if (p.isCancel(answer) || !answer) return;
2128
2128
  const endpoint = resolveCloudEndpoint(options.endpoint);
2129
2129
  try {
2130
- const { runConnect } = await import("./connect-QRRSLYCM.js");
2130
+ const { runConnect } = await import("./connect-224IWYXE.js");
2131
2131
  const saved = loadConfig();
2132
2132
  const result = await runConnect(
2133
2133
  {
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  MUSHI_CLI_VERSION,
4
4
  MUSHI_MCP_PIN_SPEC
5
- } from "./chunk-AIEM5ZMZ.js";
5
+ } from "./chunk-GZ2WEGNU.js";
6
6
  export {
7
7
  MUSHI_CLI_VERSION,
8
8
  MUSHI_MCP_PIN_SPEC
package/dist/version.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  MUSHI_CLI_VERSION,
3
3
  MUSHI_MCP_PIN_SPEC
4
- } from "./chunk-GLPJO6XP.js";
4
+ } from "./chunk-IMASP6GK.js";
5
5
  export {
6
6
  MUSHI_CLI_VERSION,
7
7
  MUSHI_MCP_PIN_SPEC
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mushi-mushi/cli",
3
- "version": "0.37.0",
3
+ "version": "0.37.1",
4
4
  "license": "MIT",
5
5
  "description": "Mushi Mushi CLI: SDK setup, MCP wiring, triage. Bug fixing for AI-built apps: plain-English diagnosis + a ready fix, in your editor.",
6
6
  "bin": {