@mushi-mushi/cli 0.36.0 → 0.36.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.
- package/README.md +4 -4
- package/dist/chunk-5DQLHMVZ.js +8 -0
- package/dist/{chunk-YJ5Z6ZDX.js → chunk-D3ABBB6H.js} +11 -6
- package/dist/{chunk-NHE5JMLQ.js → chunk-GLA6OXI3.js} +2 -2
- package/dist/{chunk-GHG5XKGP.js → chunk-MRQEXRAP.js} +1 -1
- package/dist/chunk-R4ZRRD4B.js +10 -0
- package/dist/{chunk-T2NBO4WL.js → chunk-TFNFJXCK.js} +2 -1
- package/dist/{connect-GVDAI3RJ.js → connect-PJ2KR2FI.js} +3 -3
- package/dist/{connect-CHLNFDG5.js → connect-X5OPJFCR.js} +2 -2
- package/dist/{daemon-ZGSTNMAY.js → daemon-VC4WW5GU.js} +3 -3
- package/dist/index.js +21 -6
- package/dist/init.js +3 -3
- package/dist/{version-673M6J44.js → version-5GNUKBUB.js} +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-FRVELHB4.js +0 -8
- package/dist/chunk-MV3SEIJM.js +0 -10
package/README.md
CHANGED
|
@@ -21,7 +21,7 @@ npm install -g @mushi-mushi/cli # optional: a global `mushi` command
|
|
|
21
21
|
|
|
22
22
|
The wizard detects your framework and package manager, checks your credentials, installs the right SDK, writes framework-prefixed env vars (`NEXT_PUBLIC_`, `VITE_`, `EXPO_PUBLIC_`…) to `.env.local`, prints the snippet to paste, and offers to send a test report. It never overwrites an existing env var or edits your code.
|
|
23
23
|
|
|
24
|
-
**Credentials** come from the [console](https://kensaur.us/mushi-mushi/admin): the **project ID** is on the
|
|
24
|
+
**Credentials** come from the [console](https://kensaur.us/mushi-mushi/admin): the **project ID** is on the **Manage apps** page; the **API key** is under **Set up → Test it → Generate API key** (`report:write`), not the AI keys in Settings. No project yet? The wizard can open the console for you.
|
|
25
25
|
|
|
26
26
|
For your editor, `mushi setup` writes the hosted MCP entry by default: the editor opens a browser sign-in on first use and no key is stored on disk. Add `--stdio` for a local server instead.
|
|
27
27
|
|
|
@@ -32,7 +32,7 @@ For your editor, `mushi setup` writes the hosted MCP entry by default: the edito
|
|
|
32
32
|
| Set up | `init`, `login`, `setup`, `connect`, `doctor`, `test` (send a test report), `upgrade`, `nudge`, `completion`, `profile` |
|
|
33
33
|
| Bugs | `reports list/show/search/triage`, `lessons list/show`, `sentry import` |
|
|
34
34
|
| Fixes | `fix <reportId>`, `fixes tail/merge/refresh-ci/review/verify`, `verify workflow` |
|
|
35
|
-
| Local agent | `work` (
|
|
35
|
+
| Local agent | `work` (the Cursor CLI or Claude Code on your own computer fixes a report; `mushi work` pushes and opens the draft PR with your `git` and `gh`), `worker install/status/revoke` (keeps it running, steered from the console) |
|
|
36
36
|
| Ship | `sourcemaps upload`, `deploy check`, `migrate`, `audit`, `releases` |
|
|
37
37
|
| Test and UX | `qa stories/runs/run`, `tdd gen/pending/approve/improve`, `stories map`, `ux` (including `ux fresh-eyes`, the first-time user test) |
|
|
38
38
|
| CI | `runner status/compare/bill`: where your tests run, what they cost, and whether a red check was your code or the machine |
|
|
@@ -45,7 +45,7 @@ For your editor, `mushi setup` writes the hosted MCP entry by default: the edito
|
|
|
45
45
|
```bash
|
|
46
46
|
mushi doctor --fix # check SDK, ingest and dispatch; fix what's safe locally
|
|
47
47
|
mushi reports list --status new --severity critical # what broke
|
|
48
|
-
mushi fix <reportId> --wait #
|
|
48
|
+
mushi fix <reportId> --wait # the built-in fixer opens a draft PR for it
|
|
49
49
|
mushi fixes merge <fixId> # merge it and mark the report Fixed
|
|
50
50
|
mushi upgrade # bump @mushi-mushi/* to the latest stable
|
|
51
51
|
mushi upgrade --check # CI: exit 0 current, 1 outdated, 2 registry down
|
|
@@ -62,7 +62,7 @@ MUSHI_API_KEY=mushi_xxx mushi connect --project-id <uuid> --endpoint <url> --wai
|
|
|
62
62
|
|
|
63
63
|
Other `init` flags: `--framework next`, `--cwd apps/web` (monorepos), `--endpoint <url>` (self-hosted), `--skip-install`, `--audit` (check an existing install instead).
|
|
64
64
|
|
|
65
|
-
**What needs your own key.** Reading reports, diagnoses and fix prompts does not. `mushi fix` hands the report to
|
|
65
|
+
**What needs your own key.** Reading reports, diagnoses and fix prompts does not. `mushi fix` hands the report to the built-in fixer by default (`--agent claude_code`): it uses your own Anthropic or OpenAI key when you have added one, and on hosted Mushi Mushi it falls back to Mushi Mushi's key when you have not. `--agent cursor_cloud` needs your own Cursor key. `mushi work` runs the Cursor CLI or Claude Code (`--agent claude`, CLI 0.36.0 or later) on your own computer instead, on the account that tool is signed in to.
|
|
66
66
|
|
|
67
67
|
## Environment variables
|
|
68
68
|
|
|
@@ -8,10 +8,10 @@ import {
|
|
|
8
8
|
requireConfig,
|
|
9
9
|
requireUuid,
|
|
10
10
|
tryLoadWorkerKey
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-TFNFJXCK.js";
|
|
12
12
|
import {
|
|
13
13
|
MUSHI_CLI_VERSION
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-R4ZRRD4B.js";
|
|
15
15
|
|
|
16
16
|
// src/worker/daemon.ts
|
|
17
17
|
import { existsSync as existsSync6, readFileSync as readFileSync5 } from "fs";
|
|
@@ -452,7 +452,7 @@ function cap(text, max) {
|
|
|
452
452
|
return t.length > max ? `${t.slice(0, max)} [cut]` : t;
|
|
453
453
|
}
|
|
454
454
|
function failureTail(r, max = 600) {
|
|
455
|
-
const t = [r.stdout, r.stderr].map((x) => x.trim()).filter(Boolean).join("\n").replace(/[ \t]+/g, " ");
|
|
455
|
+
const t = stripVTControlCharacters2([r.stdout, r.stderr].map((x) => x.trim()).filter(Boolean).join("\n")).replace(/[ \t]+/g, " ");
|
|
456
456
|
const lines = t.split("\n").map((l) => l.trim()).filter(Boolean);
|
|
457
457
|
const kept = [];
|
|
458
458
|
let size = 0;
|
|
@@ -1020,10 +1020,15 @@ async function installDeps(wt, log) {
|
|
|
1020
1020
|
const cmd = installCommand((f) => existsSync(join2(wt, f)));
|
|
1021
1021
|
if (!cmd) return;
|
|
1022
1022
|
log(` deps: ${cmd[0]} ${cmd[1][0]} (so the agent can run tests and the commit hooks work)`);
|
|
1023
|
-
|
|
1024
|
-
|
|
1023
|
+
const [bin, args] = windowsShim(cmd, process.platform);
|
|
1024
|
+
let r = await runProc(bin, args, { cwd: wt, timeoutMs: 10 * 6e4 });
|
|
1025
|
+
if (r.code !== 0) r = await runProc(bin, args, { cwd: wt, timeoutMs: 10 * 6e4 });
|
|
1025
1026
|
if (r.code !== 0) log(` deps: install failed twice, the agent works without them (${failureTail(r, 300)})`);
|
|
1026
1027
|
}
|
|
1028
|
+
function windowsShim(cmd, platform) {
|
|
1029
|
+
if (platform !== "win32") return cmd;
|
|
1030
|
+
return ["cmd.exe", ["/d", "/s", "/c", cmd[0], ...cmd[1]]];
|
|
1031
|
+
}
|
|
1027
1032
|
function isMissingModuleFailure(message) {
|
|
1028
1033
|
return /ERR_MODULE_NOT_FOUND|Cannot find (package|module)/.test(message);
|
|
1029
1034
|
}
|
|
@@ -1108,7 +1113,7 @@ function registerWorkCommands(program) {
|
|
|
1108
1113
|
if (opts.repoDir || opts.report || opts.followups) {
|
|
1109
1114
|
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");
|
|
1110
1115
|
}
|
|
1111
|
-
const { runDaemon: runDaemon2 } = await import("./daemon-
|
|
1116
|
+
const { runDaemon: runDaemon2 } = await import("./daemon-VC4WW5GU.js");
|
|
1112
1117
|
await runDaemon2({ configPath: opts.workerConfig, ...opts.agent !== void 0 ? { agent } : {} });
|
|
1113
1118
|
return;
|
|
1114
1119
|
}
|
|
@@ -9,10 +9,10 @@ import {
|
|
|
9
9
|
requireUuid,
|
|
10
10
|
saveConfig,
|
|
11
11
|
savedSdkKeyFor
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-TFNFJXCK.js";
|
|
13
13
|
import {
|
|
14
14
|
MUSHI_MCP_PIN_SPEC
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-R4ZRRD4B.js";
|
|
16
16
|
import {
|
|
17
17
|
assertEndpoint,
|
|
18
18
|
normalizeEndpoint
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
MUSHI_CLI_VERSION
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-R4ZRRD4B.js";
|
|
5
5
|
import {
|
|
6
6
|
CLOUD_API_ENDPOINT,
|
|
7
7
|
normalizeEndpoint
|
|
@@ -771,6 +771,7 @@ export {
|
|
|
771
771
|
getAbortSignal,
|
|
772
772
|
isKeychainEnabled,
|
|
773
773
|
trySaveKeyToKeychain,
|
|
774
|
+
tryLoadKeyFromKeychain,
|
|
774
775
|
syncKeychainAfterKeyChange,
|
|
775
776
|
trySaveWorkerKey,
|
|
776
777
|
tryLoadWorkerKey,
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
import {
|
|
3
3
|
resolveSdkEnvKey,
|
|
4
4
|
runConnect
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-GLA6OXI3.js";
|
|
6
6
|
import "./chunk-KOBEOGNF.js";
|
|
7
|
-
import "./chunk-
|
|
8
|
-
import "./chunk-
|
|
7
|
+
import "./chunk-TFNFJXCK.js";
|
|
8
|
+
import "./chunk-R4ZRRD4B.js";
|
|
9
9
|
import "./chunk-LGGE3LH7.js";
|
|
10
10
|
export {
|
|
11
11
|
resolveSdkEnvKey,
|
|
@@ -6,10 +6,10 @@ import {
|
|
|
6
6
|
saveConfig,
|
|
7
7
|
savedSdkKeyFor,
|
|
8
8
|
waitForIngestReady
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-MRQEXRAP.js";
|
|
10
10
|
import {
|
|
11
11
|
MUSHI_MCP_PIN_SPEC
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-5DQLHMVZ.js";
|
|
13
13
|
import {
|
|
14
14
|
detectFramework,
|
|
15
15
|
envVarsToWrite,
|
|
@@ -10,9 +10,9 @@ import {
|
|
|
10
10
|
readWorkerKey,
|
|
11
11
|
runDaemon,
|
|
12
12
|
workerHostId
|
|
13
|
-
} from "./chunk-
|
|
14
|
-
import "./chunk-
|
|
15
|
-
import "./chunk-
|
|
13
|
+
} from "./chunk-D3ABBB6H.js";
|
|
14
|
+
import "./chunk-TFNFJXCK.js";
|
|
15
|
+
import "./chunk-R4ZRRD4B.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-
|
|
25
|
+
} from "./chunk-GLA6OXI3.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-
|
|
53
|
+
} from "./chunk-D3ABBB6H.js";
|
|
54
54
|
import {
|
|
55
55
|
CONFIG_PATH,
|
|
56
56
|
MushiCliError,
|
|
@@ -86,13 +86,14 @@ import {
|
|
|
86
86
|
setGlobalOutputFormat,
|
|
87
87
|
syncKeychainAfterKeyChange,
|
|
88
88
|
tryDeleteWorkerKey,
|
|
89
|
+
tryLoadKeyFromKeychain,
|
|
89
90
|
trySaveKeyToKeychain,
|
|
90
91
|
trySaveWorkerKey
|
|
91
|
-
} from "./chunk-
|
|
92
|
+
} from "./chunk-TFNFJXCK.js";
|
|
92
93
|
import {
|
|
93
94
|
MUSHI_CLI_VERSION,
|
|
94
95
|
MUSHI_MCP_PIN_SPEC
|
|
95
|
-
} from "./chunk-
|
|
96
|
+
} from "./chunk-R4ZRRD4B.js";
|
|
96
97
|
import {
|
|
97
98
|
CLOUD_API_ENDPOINT,
|
|
98
99
|
CLOUD_MCP_OAUTH_URL,
|
|
@@ -427,6 +428,17 @@ function printAuthFailed(reason, detail) {
|
|
|
427
428
|
console.log("");
|
|
428
429
|
}
|
|
429
430
|
|
|
431
|
+
// src/env-key-override.ts
|
|
432
|
+
function envKeyOverrideLines(env, savedKey, platform = process.platform) {
|
|
433
|
+
const envKey = env.MUSHI_API_KEY?.trim();
|
|
434
|
+
if (!envKey || savedKey && envKey === savedKey) return [];
|
|
435
|
+
const where = platform === "win32" ? 'Remove it under Windows Settings \u2192 System \u2192 About \u2192 Advanced system settings \u2192 Environment Variables, or open a new terminal after `[Environment]::SetEnvironmentVariable("MUSHI_API_KEY", $null, "User")` in PowerShell.' : "Remove the `export MUSHI_API_KEY=\u2026` line from your shell profile, or run `unset MUSHI_API_KEY` in this terminal.";
|
|
436
|
+
return [
|
|
437
|
+
`\u26A0 MUSHI_API_KEY is set in your environment (${envKey.slice(0, 12)}\u2026), and it overrides ${savedKey ? `the saved key (${savedKey.slice(0, 12)}\u2026)` : "the saved key"}.`,
|
|
438
|
+
` Commands in this terminal use the environment key. ${where}`
|
|
439
|
+
];
|
|
440
|
+
}
|
|
441
|
+
|
|
430
442
|
// src/login.ts
|
|
431
443
|
function getPostLoginBannerMessage(opts) {
|
|
432
444
|
if (opts.suppressPostLoginBanner) return null;
|
|
@@ -674,8 +686,10 @@ error: Could not create project: ${err instanceof Error ? err.message : String(e
|
|
|
674
686
|
if (opts.upgradeScope) {
|
|
675
687
|
console.log(` \u2713 Full-scope CLI key saved (${apiKey.slice(0, 12)}\u2026)`);
|
|
676
688
|
console.log(` Scopes: report:write \xB7 mcp:read \xB7 mcp:write \u2014 SDK + MCP + admin CLI (incl. writes) all work with this key`);
|
|
689
|
+
for (const line of envKeyOverrideLines(process.env, apiKey)) console.log(` ${line}`);
|
|
677
690
|
} else {
|
|
678
691
|
console.log(` \u2713 CLI key saved (${apiKey.slice(0, 12)}\u2026)`);
|
|
692
|
+
for (const line of envKeyOverrideLines(process.env, apiKey)) console.log(` ${line}`);
|
|
679
693
|
console.log(` Scopes: report:write \xB7 mcp:read \u2014 SDK ingest + MCP read tools.`);
|
|
680
694
|
console.log(` Admin writes (mushi work, fix merge, billing cap, pipeline start) need: mushi login --upgrade-scope${chosenProjectId ? ` --project-id ${chosenProjectId}` : ""}`);
|
|
681
695
|
}
|
|
@@ -1595,7 +1609,7 @@ async function checkOnboardingStatus(config, _consoleBase, cwd, doFetch = global
|
|
|
1595
1609
|
}
|
|
1596
1610
|
async function checkVersionDrift(cwd, doFetch) {
|
|
1597
1611
|
const checks = [];
|
|
1598
|
-
const { MUSHI_CLI_VERSION: MUSHI_CLI_VERSION2 } = await import("./version-
|
|
1612
|
+
const { MUSHI_CLI_VERSION: MUSHI_CLI_VERSION2 } = await import("./version-5GNUKBUB.js");
|
|
1599
1613
|
if (MUSHI_CLI_VERSION2 === "0.0.0-dev") return checks;
|
|
1600
1614
|
const parse2 = (v) => {
|
|
1601
1615
|
const m = v.replace(/^[~^]/, "").match(/^(\d+)\.(\d+)\.(\d+)/);
|
|
@@ -2568,7 +2582,7 @@ async function maybeOfferConnect(credentials, options, _consoleBase) {
|
|
|
2568
2582
|
if (p.isCancel(answer) || !answer) return;
|
|
2569
2583
|
const endpoint = resolveCloudEndpoint(options.endpoint);
|
|
2570
2584
|
try {
|
|
2571
|
-
const { runConnect: runConnect2 } = await import("./connect-
|
|
2585
|
+
const { runConnect: runConnect2 } = await import("./connect-PJ2KR2FI.js");
|
|
2572
2586
|
const saved = loadConfig();
|
|
2573
2587
|
const result = await runConnect2(
|
|
2574
2588
|
{
|
|
@@ -2915,6 +2929,7 @@ Useful after 'mushi login' to confirm credentials are correct.`).action(async (o
|
|
|
2915
2929
|
console.log(" Mint one on the console MCP page, or run `mushi login`.");
|
|
2916
2930
|
}
|
|
2917
2931
|
}
|
|
2932
|
+
for (const line of envKeyOverrideLines(process.env, tryLoadKeyFromKeychain() ?? void 0)) console.log(` ${line}`);
|
|
2918
2933
|
}
|
|
2919
2934
|
});
|
|
2920
2935
|
program2.command("ping").description("Check connectivity to the Mushi backend").option("--json", "Machine-readable JSON output").action(async (opts) => {
|
package/dist/init.js
CHANGED
|
@@ -25,10 +25,10 @@ import {
|
|
|
25
25
|
saveConfig,
|
|
26
26
|
savedSdkKeyFor,
|
|
27
27
|
trySaveKeyToKeychain
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-MRQEXRAP.js";
|
|
29
29
|
import {
|
|
30
30
|
MUSHI_CLI_VERSION
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-5DQLHMVZ.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-
|
|
2130
|
+
const { runConnect } = await import("./connect-X5OPJFCR.js");
|
|
2131
2131
|
const saved = loadConfig();
|
|
2132
2132
|
const result = await runConnect(
|
|
2133
2133
|
{
|
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.
|
|
17
|
+
declare const MUSHI_MCP_PIN_SPEC = "@mushi-mushi/mcp@0.30.7";
|
|
18
18
|
|
|
19
19
|
export { MUSHI_CLI_VERSION, MUSHI_MCP_PIN_SPEC };
|
package/dist/version.js
CHANGED
package/package.json
CHANGED
package/dist/chunk-FRVELHB4.js
DELETED