@mushi-mushi/cli 0.31.0 → 0.32.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.
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  MUSHI_CLI_VERSION,
4
4
  MUSHI_MCP_PIN_SPEC
5
- } from "./chunk-KSEZHXYC.js";
5
+ } from "./chunk-XIB5NTHP.js";
6
6
  import {
7
7
  CLOUD_API_ENDPOINT,
8
8
  assertEndpoint,
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  MUSHI_CLI_VERSION
3
- } from "./chunk-B5J64VJ4.js";
3
+ } from "./chunk-MARVQVJC.js";
4
4
  import {
5
5
  assertEndpoint,
6
6
  normalizeEndpoint
@@ -0,0 +1,8 @@
1
+ // src/version.ts
2
+ var MUSHI_CLI_VERSION = true ? "0.32.0" : "0.0.0-dev";
3
+ var MUSHI_MCP_PIN_SPEC = "@mushi-mushi/mcp@0.28.0";
4
+
5
+ export {
6
+ MUSHI_CLI_VERSION,
7
+ MUSHI_MCP_PIN_SPEC
8
+ };
@@ -0,0 +1,10 @@
1
+ #!/usr/bin/env node
2
+
3
+ // src/version.ts
4
+ var MUSHI_CLI_VERSION = true ? "0.32.0" : "0.0.0-dev";
5
+ var MUSHI_MCP_PIN_SPEC = "@mushi-mushi/mcp@0.28.0";
6
+
7
+ export {
8
+ MUSHI_CLI_VERSION,
9
+ MUSHI_MCP_PIN_SPEC
10
+ };
@@ -2,8 +2,8 @@
2
2
  import {
3
3
  resolveSdkEnvKey,
4
4
  runConnect
5
- } from "./chunk-JFMM7FGM.js";
6
- import "./chunk-KSEZHXYC.js";
5
+ } from "./chunk-3YMPNCJ4.js";
6
+ import "./chunk-XIB5NTHP.js";
7
7
  import "./chunk-LGGE3LH7.js";
8
8
  import "./chunk-KOBEOGNF.js";
9
9
  export {
@@ -6,10 +6,10 @@ import {
6
6
  saveConfig,
7
7
  savedSdkKeyFor,
8
8
  waitForIngestReady
9
- } from "./chunk-RQO3VNO7.js";
9
+ } from "./chunk-7PSMATX3.js";
10
10
  import {
11
11
  MUSHI_MCP_PIN_SPEC
12
- } from "./chunk-B5J64VJ4.js";
12
+ } from "./chunk-MARVQVJC.js";
13
13
  import {
14
14
  detectFramework,
15
15
  envVarsToWrite,
package/dist/index.js CHANGED
@@ -54,11 +54,11 @@ import {
54
54
  syncKeychainAfterKeyChange,
55
55
  trySaveKeyToKeychain,
56
56
  writeMcpServerEntry
57
- } from "./chunk-JFMM7FGM.js";
57
+ } from "./chunk-3YMPNCJ4.js";
58
58
  import {
59
59
  MUSHI_CLI_VERSION,
60
60
  MUSHI_MCP_PIN_SPEC
61
- } from "./chunk-KSEZHXYC.js";
61
+ } from "./chunk-XIB5NTHP.js";
62
62
  import {
63
63
  CLOUD_API_ENDPOINT,
64
64
  CLOUD_MCP_OAUTH_URL,
@@ -1546,7 +1546,7 @@ async function checkOnboardingStatus(config, _consoleBase, cwd, doFetch = global
1546
1546
  }
1547
1547
  async function checkVersionDrift(cwd, doFetch) {
1548
1548
  const checks = [];
1549
- const { MUSHI_CLI_VERSION: MUSHI_CLI_VERSION2 } = await import("./version-XYJRQQMM.js");
1549
+ const { MUSHI_CLI_VERSION: MUSHI_CLI_VERSION2 } = await import("./version-AX72RMKE.js");
1550
1550
  if (MUSHI_CLI_VERSION2 === "0.0.0-dev") return checks;
1551
1551
  const parse2 = (v) => {
1552
1552
  const m = v.replace(/^[~^]/, "").match(/^(\d+)\.(\d+)\.(\d+)/);
@@ -2470,7 +2470,7 @@ async function maybeOfferConnect(credentials, options, _consoleBase) {
2470
2470
  if (p.isCancel(answer) || !answer) return;
2471
2471
  const endpoint = resolveCloudEndpoint(options.endpoint);
2472
2472
  try {
2473
- const { runConnect: runConnect2 } = await import("./connect-DKPQB4UI.js");
2473
+ const { runConnect: runConnect2 } = await import("./connect-JWNAYQEU.js");
2474
2474
  const saved = loadConfig();
2475
2475
  const result = await runConnect2(
2476
2476
  {
@@ -4521,6 +4521,9 @@ Examples:
4521
4521
  "--method <method>",
4522
4522
  "GitHub merge method: squash (default), merge, or rebase",
4523
4523
  "squash"
4524
+ ).option(
4525
+ "--override",
4526
+ 'Not available here: the CLI signs in with an API key, and only a person in the Mushi console can override an Opus "hold" (with a reason)'
4524
4527
  ).option("--json", "Machine-readable JSON output").action(async (fixId, opts) => {
4525
4528
  const config = loadConfig();
4526
4529
  if (!config.apiKey) {
@@ -4531,6 +4534,12 @@ Examples:
4531
4534
  console.error("No endpoint configured. Run `mushi init`");
4532
4535
  process.exit(1);
4533
4536
  }
4537
+ if (opts.override) {
4538
+ console.error(
4539
+ 'Overriding an Opus "hold" needs a person in the Mushi console: open the fix, read the findings, and choose Merge anyway with a reason. The CLI signs in with an API key, which cannot override (ADR 0030).'
4540
+ );
4541
+ process.exit(1);
4542
+ }
4534
4543
  const method = opts.method;
4535
4544
  if (!["squash", "merge", "rebase"].includes(method)) {
4536
4545
  console.error("--method must be squash, merge, or rebase");
@@ -4545,6 +4554,9 @@ Examples:
4545
4554
  console.log(JSON.stringify({ ok: false, error: result.error }, null, 2));
4546
4555
  } else {
4547
4556
  console.error("Merge failed:", result.error.message);
4557
+ if (result.error.code === "REVIEW_HOLD") {
4558
+ console.error(`Read the review: mushi fixes review ${fixId} --show. To merge anyway, override the hold in the Mushi console (with a reason).`);
4559
+ }
4548
4560
  }
4549
4561
  process.exit(1);
4550
4562
  }
@@ -4558,6 +4570,46 @@ Examples:
4558
4570
  } else {
4559
4571
  console.log(`Merged successfully. Report status: ${data.reportStatus ?? "fixed"}`);
4560
4572
  }
4573
+ if (data.review) {
4574
+ console.log(`${data.review.label}${data.review.overridden ? " (overridden)" : ""}`);
4575
+ }
4576
+ });
4577
+ function printReview(review) {
4578
+ console.log(review.label);
4579
+ if (review.reason) console.log(review.reason);
4580
+ if (review.summary) console.log(`
4581
+ ${review.summary}`);
4582
+ for (const f of review.findings) {
4583
+ const where = f.file === "(general)" ? "" : ` ${f.file}${f.line ? `:${f.line}` : ""}`;
4584
+ console.log(` - ${f.severity}${where}: ${f.issue} Fix: ${f.suggested_fix}`);
4585
+ }
4586
+ for (const r of review.removesBehavior) console.log(` - removes: ${r}`);
4587
+ if (review.needsHumanDecision) console.log(`Needs your decision: ${review.needsHumanDecision}`);
4588
+ if (review.commentUrl) console.log(`On GitHub: ${review.commentUrl}`);
4589
+ }
4590
+ fixes.command("review <fixId>").description("Re-run the Opus review of a fix PR (ADR 0030), or show the current one with --show").option("--show", "Show the current review instead of starting a new one").option("--json", "Machine-readable JSON output").action(async (fixId, opts) => {
4591
+ const config = loadConfig();
4592
+ if (!config.apiKey) {
4593
+ console.error("Run `mushi login` first");
4594
+ process.exit(1);
4595
+ }
4596
+ if (!config.endpoint) {
4597
+ console.error("No endpoint configured. Run `mushi init`");
4598
+ process.exit(1);
4599
+ }
4600
+ const result = opts.show ? await apiCall(`/v1/admin/fixes/${fixId}/timeline`, config) : await apiCall(`/v1/admin/fixes/${fixId}/review`, config, { method: "POST" });
4601
+ if (!result.ok) {
4602
+ if (opts.json) console.log(JSON.stringify({ ok: false, error: result.error }, null, 2));
4603
+ else console.error(opts.show ? "Could not read the review:" : "Review not started:", result.error.message);
4604
+ process.exit(1);
4605
+ }
4606
+ const review = result.data?.review;
4607
+ if (opts.json) {
4608
+ console.log(JSON.stringify({ ok: true, review: review ?? null }, null, 2));
4609
+ return;
4610
+ }
4611
+ if (!opts.show) console.log("Review queued. It takes a few minutes; check with --show.");
4612
+ if (review) printReview(review);
4561
4613
  });
4562
4614
  fixes.command("refresh-ci <fixId>").description("Pull latest GitHub Actions check-run status for a fix attempt (on-demand ci-sync)").option("--json", "Machine-readable JSON output").action(async (fixId, opts) => {
4563
4615
  const config = loadConfig();
package/dist/init.js CHANGED
@@ -25,10 +25,10 @@ import {
25
25
  saveConfig,
26
26
  savedSdkKeyFor,
27
27
  trySaveKeyToKeychain
28
- } from "./chunk-RQO3VNO7.js";
28
+ } from "./chunk-7PSMATX3.js";
29
29
  import {
30
30
  MUSHI_CLI_VERSION
31
- } from "./chunk-B5J64VJ4.js";
31
+ } from "./chunk-MARVQVJC.js";
32
32
  import {
33
33
  FRAMEWORKS,
34
34
  detectFramework,
@@ -2058,7 +2058,7 @@ async function maybeOfferConnect(credentials, options, _consoleBase) {
2058
2058
  if (p.isCancel(answer) || !answer) return;
2059
2059
  const endpoint = resolveCloudEndpoint(options.endpoint);
2060
2060
  try {
2061
- const { runConnect } = await import("./connect-GDCWQXKH.js");
2061
+ const { runConnect } = await import("./connect-MINIBKHX.js");
2062
2062
  const saved = loadConfig();
2063
2063
  const result = await runConnect(
2064
2064
  {
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  MUSHI_CLI_VERSION,
4
4
  MUSHI_MCP_PIN_SPEC
5
- } from "./chunk-KSEZHXYC.js";
5
+ } from "./chunk-XIB5NTHP.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.27.0";
17
+ declare const MUSHI_MCP_PIN_SPEC = "@mushi-mushi/mcp@0.28.0";
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-B5J64VJ4.js";
4
+ } from "./chunk-MARVQVJC.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.31.0",
3
+ "version": "0.32.0",
4
4
  "license": "MIT",
5
5
  "description": "Mushi CLI: SDK setup, MCP wiring, bug triage. The bug mediator for AI-built apps: plain-English diagnosis + a ready fix, in your editor.",
6
6
  "bin": {
@@ -1,8 +0,0 @@
1
- // src/version.ts
2
- var MUSHI_CLI_VERSION = true ? "0.31.0" : "0.0.0-dev";
3
- var MUSHI_MCP_PIN_SPEC = "@mushi-mushi/mcp@0.27.0";
4
-
5
- export {
6
- MUSHI_CLI_VERSION,
7
- MUSHI_MCP_PIN_SPEC
8
- };
@@ -1,10 +0,0 @@
1
- #!/usr/bin/env node
2
-
3
- // src/version.ts
4
- var MUSHI_CLI_VERSION = true ? "0.31.0" : "0.0.0-dev";
5
- var MUSHI_MCP_PIN_SPEC = "@mushi-mushi/mcp@0.27.0";
6
-
7
- export {
8
- MUSHI_CLI_VERSION,
9
- MUSHI_MCP_PIN_SPEC
10
- };