@mushi-mushi/cli 0.15.0 → 0.16.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/README.md CHANGED
@@ -215,6 +215,77 @@ mushi fixes tail --report-id 11111111-2222-3333-4444-555555555555
215
215
  Exits automatically when the job reaches a terminal status (`completed`,
216
216
  `failed`, `cancelled`, `skipped`).
217
217
 
218
+ ### `mushi fixes merge <fixId>`
219
+
220
+ Squash-merge (or merge/rebase) the fix PR on GitHub and run the same post-merge
221
+ bookkeeping as the admin console: `merged_at`, report → **Fixed**, reporter
222
+ notification, `fix.applied` webhooks.
223
+
224
+ ```bash
225
+ mushi fixes merge 75199dde-f726-404a-b5f7-be17bf7a3a46
226
+ mushi fixes merge <fixId> --method squash # default
227
+ mushi fixes merge <fixId> --method merge
228
+ mushi fixes merge <fixId> --method rebase
229
+ mushi fixes merge <fixId> --json
230
+ ```
231
+
232
+ Requires an admin API key with `mcp:write` scope and a connected GitHub App or PAT.
233
+ Draft PRs are auto-readied via GraphQL before merge.
234
+
235
+ ### `mushi fixes refresh-ci <fixId>`
236
+
237
+ Pull the latest GitHub Actions check-run status on demand (same as **Refresh CI
238
+ status** in the console). Useful when webhooks drop or you just pushed to the PR
239
+ branch.
240
+
241
+ ```bash
242
+ mushi fixes refresh-ci <fixId>
243
+ mushi fixes refresh-ci <fixId> --json
244
+ ```
245
+
246
+ ---
247
+
248
+ ## QA coverage & TDD
249
+
250
+ ```bash
251
+ mushi stories map --url https://your-app.com --wait
252
+ mushi tdd gen <storyId> --mode review
253
+ mushi tdd pending
254
+ mushi tdd approve <qaStoryId>
255
+ mushi tdd improve
256
+ mushi qa stories
257
+ mushi qa runs <storyId>
258
+ mushi qa run <storyId>
259
+ mushi qa audit
260
+ ```
261
+
262
+ ---
263
+
264
+ ## Skill pipelines
265
+
266
+ ```bash
267
+ mushi skills list [--category workflow] [--search "fix"]
268
+ mushi skills show workflow-fix-and-ship
269
+ mushi skills sync
270
+
271
+ mushi pipeline start <reportId> --skill workflow-fix-and-ship [--mode cloud|handoff]
272
+ mushi pipeline watch <runId-or-prefix>
273
+ mushi pipeline checkin <runId-or-prefix> --step 0 --status passed
274
+ ```
275
+
276
+ ---
277
+
278
+ ## Integrations & BYOK
279
+
280
+ ```bash
281
+ mushi integrations list
282
+ mushi integrations test slack|sentry|github
283
+ mushi keys list
284
+ MUSHI_BYOK_KEY=sk-ant-... mushi keys add --provider anthropic --label "Backup"
285
+ mushi slack status
286
+ mushi slack test
287
+ ```
288
+
218
289
  ## Security notes
219
290
 
220
291
  - `~/.mushirc` is written with mode `0o600` on Unix. Legacy configs with looser permissions are tightened on load.
@@ -0,0 +1,6 @@
1
+ // src/version.ts
2
+ var MUSHI_CLI_VERSION = true ? "0.16.0" : "0.0.0-dev";
3
+
4
+ export {
5
+ MUSHI_CLI_VERSION
6
+ };
package/dist/index.js CHANGED
@@ -598,7 +598,7 @@ function getFrameworkFromPkg(pkg) {
598
598
  }
599
599
 
600
600
  // src/version.ts
601
- var MUSHI_CLI_VERSION = true ? "0.15.0" : "0.0.0-dev";
601
+ var MUSHI_CLI_VERSION = true ? "0.16.0" : "0.0.0-dev";
602
602
 
603
603
  // src/init.ts
604
604
  var ENV_FILES = [".env.local", ".env"];
@@ -3302,6 +3302,79 @@ fixes.command("tail").description(
3302
3302
  }
3303
3303
  }
3304
3304
  });
3305
+ fixes.command("merge <fixId>").description(
3306
+ "Squash-merge the fix PR on GitHub and mark the report Fixed (same as console merge)"
3307
+ ).option(
3308
+ "--method <method>",
3309
+ "GitHub merge method: squash (default), merge, or rebase",
3310
+ "squash"
3311
+ ).option("--json", "Machine-readable JSON output").action(async (fixId, opts) => {
3312
+ const config = loadConfig();
3313
+ if (!config.apiKey) {
3314
+ console.error("Run `mushi login` first");
3315
+ process.exit(1);
3316
+ }
3317
+ if (!config.endpoint) {
3318
+ console.error("No endpoint configured. Run `mushi init`");
3319
+ process.exit(1);
3320
+ }
3321
+ const method = opts.method;
3322
+ if (!["squash", "merge", "rebase"].includes(method)) {
3323
+ console.error("--method must be squash, merge, or rebase");
3324
+ process.exit(1);
3325
+ }
3326
+ const result = await apiCall(`/v1/admin/fixes/${fixId}/merge`, config, {
3327
+ method: "POST",
3328
+ body: JSON.stringify({ mergeMethod: method })
3329
+ });
3330
+ if (!result.ok) {
3331
+ if (opts.json) {
3332
+ console.log(JSON.stringify({ ok: false, error: result.error }, null, 2));
3333
+ } else {
3334
+ console.error("Merge failed:", result.error.message);
3335
+ }
3336
+ process.exit(1);
3337
+ }
3338
+ const data = result.data ?? {};
3339
+ if (opts.json) {
3340
+ console.log(JSON.stringify({ ok: true, ...data }, null, 2));
3341
+ return;
3342
+ }
3343
+ if (data.alreadyMerged) {
3344
+ console.log(`PR was already merged. Report status: ${data.reportStatus ?? "unknown"}`);
3345
+ } else {
3346
+ console.log(`Merged successfully. Report status: ${data.reportStatus ?? "fixed"}`);
3347
+ }
3348
+ });
3349
+ 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) => {
3350
+ const config = loadConfig();
3351
+ if (!config.apiKey) {
3352
+ console.error("Run `mushi login` first");
3353
+ process.exit(1);
3354
+ }
3355
+ if (!config.endpoint) {
3356
+ console.error("No endpoint configured. Run `mushi init`");
3357
+ process.exit(1);
3358
+ }
3359
+ const result = await apiCall(`/v1/admin/fixes/${fixId}/refresh-ci`, config, { method: "POST" });
3360
+ if (!result.ok) {
3361
+ if (opts.json) {
3362
+ console.log(JSON.stringify({ ok: false, error: result.error }, null, 2));
3363
+ } else {
3364
+ console.error("CI refresh failed:", result.error.message);
3365
+ }
3366
+ process.exit(1);
3367
+ }
3368
+ const data = result.data ?? {};
3369
+ if (opts.json) {
3370
+ console.log(JSON.stringify({ ok: true, ...data }, null, 2));
3371
+ return;
3372
+ }
3373
+ const status = data.check_run_status ?? "unknown";
3374
+ const conclusion = data.check_run_conclusion ?? "\u2014";
3375
+ const updated = data.check_run_updated_at ? new Date(data.check_run_updated_at).toISOString() : "\u2014";
3376
+ console.log(`CI status: ${status} \xB7 conclusion: ${conclusion} \xB7 updated: ${updated}`);
3377
+ });
3305
3378
  var stories = program.command("stories").description("TDD story mapping and test generation");
3306
3379
  stories.command("map").description("Crawl a live app URL and automatically discover user stories (writes inventory proposal)").requiredOption("--url <url>", "Live app URL to crawl (e.g. https://your-app.vercel.app)").option("--max-pages <n>", "Max pages to crawl", "20").option("--provider <p>", "Crawl provider: firecrawl (default) or browserbase", "firecrawl").option("--cursor-refine", "Open a Cursor Cloud PR to refine the draft against repo code").option("--wait", "Wait for the crawl to complete and print results").action(async (opts) => {
3307
3380
  const config = loadConfig();
package/dist/init.js CHANGED
@@ -8,7 +8,7 @@ import {
8
8
  } from "./chunk-NYPX5KXR.js";
9
9
  import {
10
10
  MUSHI_CLI_VERSION
11
- } from "./chunk-UTST6AEP.js";
11
+ } from "./chunk-BCTHNCIY.js";
12
12
 
13
13
  // src/init.ts
14
14
  import * as p from "@clack/prompts";
package/dist/version.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  MUSHI_CLI_VERSION
3
- } from "./chunk-UTST6AEP.js";
3
+ } from "./chunk-BCTHNCIY.js";
4
4
  export {
5
5
  MUSHI_CLI_VERSION
6
6
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mushi-mushi/cli",
3
- "version": "0.15.0",
3
+ "version": "0.16.0",
4
4
  "license": "MIT",
5
5
  "description": "CLI for Mushi Mushi — `mushi init` wizard installs the right SDK for your framework, plus report triage and pipeline health commands",
6
6
  "bin": {
@@ -1,6 +0,0 @@
1
- // src/version.ts
2
- var MUSHI_CLI_VERSION = true ? "0.15.0" : "0.0.0-dev";
3
-
4
- export {
5
- MUSHI_CLI_VERSION
6
- };