@mushi-mushi/cli 0.37.2 → 0.39.0

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/dist/init.js CHANGED
@@ -25,18 +25,20 @@ import {
25
25
  saveConfig,
26
26
  savedSdkKeyFor,
27
27
  trySaveKeyToKeychain
28
- } from "./chunk-NP4I7OFD.js";
28
+ } from "./chunk-BG2TVTBN.js";
29
29
  import {
30
30
  MUSHI_CLI_VERSION
31
- } from "./chunk-VMPVQL26.js";
31
+ } from "./chunk-HQM2WZVF.js";
32
32
  import {
33
33
  FRAMEWORKS,
34
34
  detectFramework,
35
35
  detectPackageManager,
36
36
  envVarsToWrite,
37
37
  installCommand,
38
+ isLauncherOnly,
39
+ isMushiSdkPackage,
38
40
  readPackageJson
39
- } from "./chunk-AIZRI665.js";
41
+ } from "./chunk-AWASJDQI.js";
40
42
  import {
41
43
  CLOUD_API_ENDPOINT,
42
44
  CLOUD_MCP_OAUTH_URL,
@@ -609,6 +611,7 @@ async function checkSdkInstall(cwd) {
609
611
  const pkg = JSON.parse(await readFile(pkgPath, "utf8"));
610
612
  const deps = { ...pkg.dependencies ?? {}, ...pkg.devDependencies ?? {} };
611
613
  const sdks = [
614
+ "mushi-mushi",
612
615
  "@mushi-mushi/react",
613
616
  "@mushi-mushi/web",
614
617
  "@mushi-mushi/core",
@@ -619,11 +622,11 @@ async function checkSdkInstall(cwd) {
619
622
  "@mushi-mushi/capacitor",
620
623
  "@mushi-mushi/node"
621
624
  ];
622
- const installed = sdks.filter((s) => deps[s]);
625
+ const installed = sdks.filter((s) => deps[s] && !isLauncherOnly(s, deps[s]));
623
626
  return {
624
627
  name: "SDK installed in this repo",
625
628
  ok: installed.length > 0,
626
- detail: installed.length > 0 ? installed.map((s) => `${s}@${deps[s]}`).join(", ") : "No @mushi-mushi/* package in package.json \u2014 run `npx mushi-mushi` to install"
629
+ detail: installed.length > 0 ? installed.map((s) => `${s}@${deps[s]}`).join(", ") : "No Mushi Mushi SDK (mushi-mushi) in package.json \u2014 run `npx mushi-mushi` to install"
627
630
  };
628
631
  } catch {
629
632
  return null;
@@ -854,11 +857,13 @@ async function checkHostAppWiring(cwd) {
854
857
  detail: mcpFound ? `${mcpFound} present` : "No .mcp.json (Claude Code) or .cursor/mcp.json (Cursor) \u2014 run `npx mushi-mushi setup --ide claude` or `--ide cursor` for two-way reporter replies"
855
858
  });
856
859
  if (isCapHybrid) {
857
- const hasWebSdk = Boolean(deps["@mushi-mushi/web"] || deps["@mushi-mushi/react"]);
860
+ const hasWebSdk = Boolean(
861
+ deps["mushi-mushi"] && !isLauncherOnly("mushi-mushi", deps["mushi-mushi"]) || deps["@mushi-mushi/web"] || deps["@mushi-mushi/react"]
862
+ );
858
863
  checks.push({
859
864
  name: "[host] Capacitor hybrid \u2014 WebView SDK",
860
865
  ok: hasWebSdk,
861
- detail: hasWebSdk ? "Use @mushi-mushi/web or @mushi-mushi/react in the WebView (initMushi in main.tsx)" : "Install @mushi-mushi/web for Capacitor WebView reporting"
866
+ detail: hasWebSdk ? "Use mushi-mushi (or mushi-mushi/react) in the WebView (initMushi in main.tsx)" : "Install mushi-mushi for Capacitor WebView reporting"
862
867
  });
863
868
  checks.push({
864
869
  name: "[host] Capacitor native plugin (optional)",
@@ -1187,7 +1192,7 @@ async function checkVersionDrift(cwd, doFetch) {
1187
1192
  const { join: join3 } = await import("path");
1188
1193
  const pkg = JSON.parse(await readFile(join3(cwd, "package.json"), "utf8"));
1189
1194
  const deps = { ...pkg.dependencies, ...pkg.devDependencies };
1190
- const candidates = Object.entries(deps).filter(([name]) => name.startsWith("@mushi-mushi/")).filter(([, v]) => /^[~^]?\d/.test(v));
1195
+ const candidates = Object.entries(deps).filter(([name, spec]) => isMushiSdkPackage(name) && !isLauncherOnly(name, spec)).filter(([, v]) => /^[~^]?\d/.test(v));
1191
1196
  const drifted = (await Promise.all(
1192
1197
  candidates.map(async ([name, v]) => {
1193
1198
  try {
@@ -1311,7 +1316,7 @@ async function runDoctor(config, options = {}) {
1311
1316
  }
1312
1317
  if (sdkCheck) checks.push(sdkCheck);
1313
1318
  if (sdkCheck?.ok && !sdkCheck.warn) {
1314
- const { findSdkImport } = await import("./snippet-inject-NDAPEL2T.js");
1319
+ const { findSdkImport } = await import("./snippet-inject-AVGVHTUJ.js");
1315
1320
  const imported = await findSdkImport(options.cwd ?? process.cwd());
1316
1321
  checks.push(
1317
1322
  imported ? { name: "SDK init snippet wired", ok: true, detail: `Found SDK usage in ${imported.file}` } : {
@@ -1358,7 +1363,7 @@ async function runDoctor(config, options = {}) {
1358
1363
  ...checks[idx],
1359
1364
  ok: true,
1360
1365
  warn: true,
1361
- detail: "No @mushi-mushi/* found in cwd package.json \u2014 but live heartbeats confirm the SDK is active. Run from your app repo or install with `mushi init`."
1366
+ detail: "No mushi-mushi or @mushi-mushi/* package in cwd package.json \u2014 but live heartbeats confirm the SDK is active. Run from your app repo or install with `npx mushi-mushi`."
1362
1367
  };
1363
1368
  }
1364
1369
  }
@@ -1447,7 +1452,7 @@ async function runInit(options = {}) {
1447
1452
  const credentials = await acquireCredentials(options, consoleBase, endpoint);
1448
1453
  await verifyCredentials(credentials, options, consoleBase);
1449
1454
  const pm = detectPackageManager(cwd);
1450
- const packagesToInstall = framework.needsWebPackage ? [framework.packageName, "@mushi-mushi/web"] : [framework.packageName];
1455
+ const packagesToInstall = framework.needsWebPackage ? [framework.packageName, "mushi-mushi"] : [framework.packageName];
1451
1456
  if (!options.skipInstall) {
1452
1457
  await installPackages(pm, packagesToInstall, cwd);
1453
1458
  } else {
@@ -1493,7 +1498,7 @@ function maybeSuggestAudit(pkg) {
1493
1498
  ...pkg?.dependencies,
1494
1499
  ...pkg?.devDependencies
1495
1500
  };
1496
- if (Object.keys(deps).some((d) => d.startsWith("@mushi-mushi/"))) {
1501
+ if (Object.keys(deps).some(isMushiSdkPackage)) {
1497
1502
  p.log.info(
1498
1503
  "A Mushi SDK is already installed here. To health-check the existing setup instead, run `npx mushi-mushi --audit`."
1499
1504
  );
@@ -1525,7 +1530,7 @@ async function chooseFramework(detected, options) {
1525
1530
  options: Object.values(FRAMEWORKS).map((fw) => ({
1526
1531
  value: fw.id,
1527
1532
  label: `${fw.id === detected.id ? "\u2713 " : " "}${fw.label}`,
1528
- hint: fw.packageName
1533
+ hint: fw.importPath
1529
1534
  }))
1530
1535
  });
1531
1536
  if (p.isCancel(confirmed)) {
@@ -2071,7 +2076,7 @@ function emitWizardFunnelEvent(credentials, endpoint, event, metadata = {}) {
2071
2076
  }
2072
2077
  async function maybeInjectSnippet(cwd, framework, options) {
2073
2078
  if (options.yes || !process.stdin.isTTY) return;
2074
- const { ENTRY_CANDIDATES, injectSnippet, MUSHI_MARKER_START } = await import("./snippet-inject-NDAPEL2T.js");
2079
+ const { ENTRY_CANDIDATES, injectSnippet, MUSHI_MARKER_START } = await import("./snippet-inject-AVGVHTUJ.js");
2075
2080
  const candidates = ENTRY_CANDIDATES[framework.id];
2076
2081
  if (!candidates) return;
2077
2082
  const { readFile, writeFile } = await import("fs/promises");
@@ -2098,11 +2103,11 @@ function printNextSteps(framework, consoleBase, enableRewards = false) {
2098
2103
  p.note(framework.snippet(), "Add this to your app:");
2099
2104
  if (enableRewards) {
2100
2105
  const badgeSnippet = framework.id === "react" ? `// Add to your user menu or profile UI:
2101
- import { MushiRewardsBadge } from '@mushi-mushi/react';
2106
+ import { MushiRewardsBadge } from 'mushi-mushi/react';
2102
2107
 
2103
2108
  // Inside your component:
2104
2109
  <MushiRewardsBadge showPoints />` : `// Add to your user menu:
2105
- // import { MushiRewardsBadge } from '@mushi-mushi/react';
2110
+ // import { MushiRewardsBadge } from 'mushi-mushi/react';
2106
2111
  // <MushiRewardsBadge showPoints />`;
2107
2112
  p.note(badgeSnippet, "Rewards badge snippet:");
2108
2113
  p.log.info(`Enable rewards in your project settings at ${consoleUrl(consoleBase, "/rewards")}`);
@@ -2127,7 +2132,7 @@ async function maybeOfferConnect(credentials, options, _consoleBase) {
2127
2132
  if (p.isCancel(answer) || !answer) return;
2128
2133
  const endpoint = resolveCloudEndpoint(options.endpoint);
2129
2134
  try {
2130
- const { runConnect } = await import("./connect-6GMMSSE2.js");
2135
+ const { runConnect } = await import("./connect-BCCGBCYR.js");
2131
2136
  const saved = loadConfig();
2132
2137
  const result = await runConnect(
2133
2138
  {
@@ -28,6 +28,7 @@ ${cleaned}`;
28
28
  var SOURCE_DIRS = ["src", "app", "pages", "lib", "components"];
29
29
  var SOURCE_EXTS = /* @__PURE__ */ new Set([".ts", ".tsx", ".js", ".jsx", ".mjs", ".vue", ".svelte"]);
30
30
  var MAX_FILES_SCANNED = 2e3;
31
+ var SDK_IMPORT = /@mushi-mushi\/|['"]mushi-mushi(?:\/[\w-]+)*['"]|MushiProvider/;
31
32
  async function findSdkImport(cwd) {
32
33
  let scanned = 0;
33
34
  async function walk(dir, depth) {
@@ -48,7 +49,7 @@ async function findSdkImport(cwd) {
48
49
  scanned += 1;
49
50
  try {
50
51
  const content = await readFile(join(dir, entry.name), "utf8");
51
- if (content.includes("@mushi-mushi/") || content.includes("MushiProvider")) {
52
+ if (SDK_IMPORT.test(content)) {
52
53
  return { file: join(dir, entry.name) };
53
54
  }
54
55
  } catch {
@@ -64,7 +65,7 @@ async function findSdkImport(cwd) {
64
65
  for (const name of ["main.ts", "main.js", "index.js", "index.ts", "index.html"]) {
65
66
  try {
66
67
  const content = await readFile(join(cwd, name), "utf8");
67
- if (content.includes("@mushi-mushi/") || content.includes("MushiProvider") || content.includes("mushi-mushi")) {
68
+ if (SDK_IMPORT.test(content) || content.includes("mushi-mushi")) {
68
69
  return { file: join(cwd, name) };
69
70
  }
70
71
  } catch {
@@ -30,6 +30,7 @@ ${cleaned}`;
30
30
  var SOURCE_DIRS = ["src", "app", "pages", "lib", "components"];
31
31
  var SOURCE_EXTS = /* @__PURE__ */ new Set([".ts", ".tsx", ".js", ".jsx", ".mjs", ".vue", ".svelte"]);
32
32
  var MAX_FILES_SCANNED = 2e3;
33
+ var SDK_IMPORT = /@mushi-mushi\/|['"]mushi-mushi(?:\/[\w-]+)*['"]|MushiProvider/;
33
34
  async function findSdkImport(cwd) {
34
35
  let scanned = 0;
35
36
  async function walk(dir, depth) {
@@ -50,7 +51,7 @@ async function findSdkImport(cwd) {
50
51
  scanned += 1;
51
52
  try {
52
53
  const content = await readFile(join(dir, entry.name), "utf8");
53
- if (content.includes("@mushi-mushi/") || content.includes("MushiProvider")) {
54
+ if (SDK_IMPORT.test(content)) {
54
55
  return { file: join(dir, entry.name) };
55
56
  }
56
57
  } catch {
@@ -66,7 +67,7 @@ async function findSdkImport(cwd) {
66
67
  for (const name of ["main.ts", "main.js", "index.js", "index.ts", "index.html"]) {
67
68
  try {
68
69
  const content = await readFile(join(cwd, name), "utf8");
69
- if (content.includes("@mushi-mushi/") || content.includes("MushiProvider") || content.includes("mushi-mushi")) {
70
+ if (SDK_IMPORT.test(content) || content.includes("mushi-mushi")) {
70
71
  return { file: join(cwd, name) };
71
72
  }
72
73
  } catch {
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  MUSHI_CLI_VERSION,
4
4
  MUSHI_MCP_PIN_SPEC
5
- } from "./chunk-TPDK6BVO.js";
5
+ } from "./chunk-JQPLY3ZT.js";
6
6
  export {
7
7
  MUSHI_CLI_VERSION,
8
8
  MUSHI_MCP_PIN_SPEC
package/dist/version.d.ts CHANGED
@@ -14,6 +14,6 @@ declare const MUSHI_CLI_VERSION: string;
14
14
  * setup refreshes the pin. Synced to packages/mcp/package.json by
15
15
  * `scripts/sync-mcp-pin.mjs` — never hand-edit the version.
16
16
  */
17
- declare const MUSHI_MCP_PIN_SPEC = "@mushi-mushi/mcp@0.30.7";
17
+ declare const MUSHI_MCP_PIN_SPEC = "@mushi-mushi/mcp@0.31.1";
18
18
 
19
19
  export { MUSHI_CLI_VERSION, 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-VMPVQL26.js";
4
+ } from "./chunk-HQM2WZVF.js";
5
5
  export {
6
6
  MUSHI_CLI_VERSION,
7
7
  MUSHI_MCP_PIN_SPEC
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  FRAMEWORK_IDS,
3
3
  isFrameworkId
4
- } from "./chunk-AIZRI665.js";
4
+ } from "./chunk-AWASJDQI.js";
5
5
 
6
6
  // src/wizard-args.ts
7
7
  var MIN_NODE_MAJOR = 20;
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "@mushi-mushi/cli",
3
- "version": "0.37.2",
3
+ "version": "0.39.0",
4
4
  "license": "MIT",
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.",
5
+ "description": "Mushi Mushi CLI: SDK setup, MCP wiring, triage. One place to improve AI-built apps: fix bugs, smooth user journeys and clean up the code.",
6
6
  "bin": {
7
7
  "mushi": "./dist/index.js"
8
8
  },
@@ -1,10 +0,0 @@
1
- #!/usr/bin/env node
2
-
3
- // src/version.ts
4
- var MUSHI_CLI_VERSION = true ? "0.37.2" : "0.0.0-dev";
5
- var MUSHI_MCP_PIN_SPEC = "@mushi-mushi/mcp@0.30.7";
6
-
7
- export {
8
- MUSHI_CLI_VERSION,
9
- MUSHI_MCP_PIN_SPEC
10
- };
@@ -1,8 +0,0 @@
1
- // src/version.ts
2
- var MUSHI_CLI_VERSION = true ? "0.37.2" : "0.0.0-dev";
3
- var MUSHI_MCP_PIN_SPEC = "@mushi-mushi/mcp@0.30.7";
4
-
5
- export {
6
- MUSHI_CLI_VERSION,
7
- MUSHI_MCP_PIN_SPEC
8
- };