@mushi-mushi/cli 0.40.0 → 0.40.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.
@@ -8,10 +8,10 @@ import {
8
8
  requireConfig,
9
9
  requireUuid,
10
10
  tryLoadWorkerKey
11
- } from "./chunk-ETFORW35.js";
11
+ } from "./chunk-QKO42UPX.js";
12
12
  import {
13
13
  MUSHI_CLI_VERSION
14
- } from "./chunk-CNJIN4ST.js";
14
+ } from "./chunk-KQHEYAEK.js";
15
15
 
16
16
  // src/worker/daemon.ts
17
17
  import { existsSync as existsSync6, readFileSync as readFileSync5 } from "fs";
@@ -1613,7 +1613,7 @@ function registerWorkCommands(program) {
1613
1613
  if (opts.repoDir || opts.report || opts.followups || opts.recheck) {
1614
1614
  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");
1615
1615
  }
1616
- const { runDaemon: runDaemon2 } = await import("./daemon-6SCU35YF.js");
1616
+ const { runDaemon: runDaemon2 } = await import("./daemon-JX6IG454.js");
1617
1617
  await runDaemon2({ configPath: opts.workerConfig, ...opts.agent !== void 0 ? { agent } : {}, ...opts.anyRepo ? { anyRepo: true } : {} });
1618
1618
  return;
1619
1619
  }
@@ -2474,6 +2474,9 @@ var INFRA_BACKOFF_MAX_MS = 30 * 6e4;
2474
2474
  var AGENT_UNAVAILABLE_WAIT_MS = 30 * 6e4;
2475
2475
  var GH_CHECK_MS = 5 * 6e4;
2476
2476
  var CURSOR_CHECK_MS = 20 * 6e4;
2477
+ function fairOrder(lanes) {
2478
+ return lanes.map((lane, i) => ({ lane, i })).sort((a, b) => a.lane.servedAt - b.lane.servedAt || a.i - b.i).map((x) => x.lane);
2479
+ }
2477
2480
  function infraBackoffMs(streak) {
2478
2481
  return streak <= 1 ? 0 : Math.min(INFRA_BACKOFF_MS * 2 ** (streak - 2), INFRA_BACKOFF_MAX_MS);
2479
2482
  }
@@ -2495,6 +2498,7 @@ function createDaemon(cfg, deps) {
2495
2498
  nextClaimAt: 0,
2496
2499
  nextFollowupAt: 0,
2497
2500
  infraStreak: 0,
2501
+ servedAt: 0,
2498
2502
  state: deps.notReady?.has(local.name) ? "not-ready" : "starting",
2499
2503
  seenState: "",
2500
2504
  stateAt: deps.now(),
@@ -2621,6 +2625,7 @@ function createDaemon(cfg, deps) {
2621
2625
  lane.running.set(claim.id, ac);
2622
2626
  lane.state = "working";
2623
2627
  const t0 = deps.now();
2628
+ lane.servedAt = t0;
2624
2629
  const runModel = model(claim.model ?? lane.config?.model);
2625
2630
  const track = newRun(claim.id, "fix", { reportId: claim.report.id, model: runModel, now: t0, stage: "prepare" });
2626
2631
  lane.tracks.set(claim.id, track);
@@ -2678,6 +2683,7 @@ function createDaemon(cfg, deps) {
2678
2683
  lane.running.set(claimId, ac);
2679
2684
  lane.state = "working";
2680
2685
  const t0 = deps.now();
2686
+ lane.servedAt = t0;
2681
2687
  const track = newRun(claimId, kind, { model: lane.config?.model ?? null, now: t0 });
2682
2688
  lane.tracks.set(claimId, track);
2683
2689
  const log = (l) => {
@@ -2727,6 +2733,7 @@ function createDaemon(cfg, deps) {
2727
2733
  function startFollowup(lane, f) {
2728
2734
  lane.followup = true;
2729
2735
  const t0 = deps.now();
2736
+ lane.servedAt = t0;
2730
2737
  const runId = `followup-${f.fixId.replace(/-/g, "").slice(0, 8).toLowerCase()}`;
2731
2738
  const track = newRun(runId, "followup", { model: lane.config?.model ?? null, now: t0, stage: "prepare" });
2732
2739
  lane.tracks.set(runId, track);
@@ -2932,7 +2939,7 @@ function createDaemon(cfg, deps) {
2932
2939
  waitWhy = null;
2933
2940
  hostState = "working";
2934
2941
  const now = deps.now();
2935
- for (const l of lanes) {
2942
+ for (const l of fairOrder(lanes)) {
2936
2943
  if (stopped) break;
2937
2944
  await laneStep(l, now, guards);
2938
2945
  }
@@ -3191,6 +3198,7 @@ export {
3191
3198
  WORKER_KEY_PATH,
3192
3199
  validateWorkerConfig,
3193
3200
  loadWorkerConfig,
3201
+ fairOrder,
3194
3202
  infraBackoffMs,
3195
3203
  machineFailed,
3196
3204
  modelFor,
@@ -0,0 +1,8 @@
1
+ // src/version.ts
2
+ var MUSHI_CLI_VERSION = true ? "0.40.1" : "0.0.0-dev";
3
+ var MUSHI_MCP_PIN_SPEC = "@mushi-mushi/mcp@0.31.3";
4
+
5
+ export {
6
+ MUSHI_CLI_VERSION,
7
+ MUSHI_MCP_PIN_SPEC
8
+ };
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  MUSHI_CLI_VERSION
3
- } from "./chunk-JWG2QI3W.js";
3
+ } from "./chunk-CP57NSIY.js";
4
4
  import {
5
5
  assertEndpoint,
6
6
  normalizeEndpoint
@@ -0,0 +1,10 @@
1
+ #!/usr/bin/env node
2
+
3
+ // src/version.ts
4
+ var MUSHI_CLI_VERSION = true ? "0.40.1" : "0.0.0-dev";
5
+ var MUSHI_MCP_PIN_SPEC = "@mushi-mushi/mcp@0.31.3";
6
+
7
+ export {
8
+ MUSHI_CLI_VERSION,
9
+ MUSHI_MCP_PIN_SPEC
10
+ };
@@ -9,10 +9,10 @@ import {
9
9
  requireUuid,
10
10
  saveConfig,
11
11
  savedSdkKeyFor
12
- } from "./chunk-ETFORW35.js";
12
+ } from "./chunk-QKO42UPX.js";
13
13
  import {
14
14
  MUSHI_MCP_PIN_SPEC
15
- } from "./chunk-CNJIN4ST.js";
15
+ } from "./chunk-KQHEYAEK.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-CNJIN4ST.js";
4
+ } from "./chunk-KQHEYAEK.js";
5
5
  import {
6
6
  CLOUD_API_ENDPOINT,
7
7
  normalizeEndpoint
@@ -25,10 +25,10 @@ import {
25
25
  saveConfig,
26
26
  savedSdkKeyFor,
27
27
  trySaveKeyToKeychain
28
- } from "./chunk-UV4DMSQH.js";
28
+ } from "./chunk-KIWSPGQB.js";
29
29
  import {
30
30
  MUSHI_CLI_VERSION
31
- } from "./chunk-JWG2QI3W.js";
31
+ } from "./chunk-CP57NSIY.js";
32
32
  import {
33
33
  FRAMEWORKS,
34
34
  detectFramework,
@@ -2132,7 +2132,7 @@ async function maybeOfferConnect(credentials, options, _consoleBase) {
2132
2132
  if (p.isCancel(answer) || !answer) return;
2133
2133
  const endpoint = resolveCloudEndpoint(options.endpoint);
2134
2134
  try {
2135
- const { runConnect } = await import("./connect-BSMHOKUQ.js");
2135
+ const { runConnect } = await import("./connect-Q6LFT6QA.js");
2136
2136
  const saved = loadConfig();
2137
2137
  const result = await runConnect(
2138
2138
  {
@@ -2,10 +2,10 @@
2
2
  import {
3
3
  resolveSdkEnvKey,
4
4
  runConnect
5
- } from "./chunk-WXICRZIU.js";
5
+ } from "./chunk-OVBRQDHI.js";
6
6
  import "./chunk-CG5KPP4S.js";
7
- import "./chunk-ETFORW35.js";
8
- import "./chunk-CNJIN4ST.js";
7
+ import "./chunk-QKO42UPX.js";
8
+ import "./chunk-KQHEYAEK.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-UV4DMSQH.js";
9
+ } from "./chunk-KIWSPGQB.js";
10
10
  import {
11
11
  MUSHI_MCP_PIN_SPEC
12
- } from "./chunk-JWG2QI3W.js";
12
+ } from "./chunk-CP57NSIY.js";
13
13
  import {
14
14
  detectFramework,
15
15
  envVarsToWrite,
@@ -4,21 +4,23 @@ import {
4
4
  createDaemon,
5
5
  createHostReadings,
6
6
  cursorStateFor,
7
+ fairOrder,
7
8
  infraBackoffMs,
8
9
  machineFailed,
9
10
  modelFor,
10
11
  readWorkerKey,
11
12
  runDaemon,
12
13
  workerHostId
13
- } from "./chunk-PGLH5XP2.js";
14
- import "./chunk-ETFORW35.js";
15
- import "./chunk-CNJIN4ST.js";
14
+ } from "./chunk-3B7PXCRR.js";
15
+ import "./chunk-QKO42UPX.js";
16
+ import "./chunk-KQHEYAEK.js";
16
17
  import "./chunk-LGGE3LH7.js";
17
18
  export {
18
19
  assertWorkerKey,
19
20
  createDaemon,
20
21
  createHostReadings,
21
22
  cursorStateFor,
23
+ fairOrder,
22
24
  infraBackoffMs,
23
25
  machineFailed,
24
26
  modelFor,
package/dist/index.js CHANGED
@@ -22,7 +22,7 @@ import {
22
22
  sanitizeEndpoint,
23
23
  sanitizeProjectId,
24
24
  writeMcpServerEntry
25
- } from "./chunk-WXICRZIU.js";
25
+ } from "./chunk-OVBRQDHI.js";
26
26
  import {
27
27
  FRAMEWORKS,
28
28
  FRAMEWORK_IDS,
@@ -53,7 +53,7 @@ import {
53
53
  registerUxCommands,
54
54
  registerWorkCommands,
55
55
  validateWorkerConfig
56
- } from "./chunk-PGLH5XP2.js";
56
+ } from "./chunk-3B7PXCRR.js";
57
57
  import {
58
58
  CONFIG_PATH,
59
59
  MushiCliError,
@@ -92,11 +92,11 @@ import {
92
92
  tryLoadKeyFromKeychain,
93
93
  trySaveKeyToKeychain,
94
94
  trySaveWorkerKey
95
- } from "./chunk-ETFORW35.js";
95
+ } from "./chunk-QKO42UPX.js";
96
96
  import {
97
97
  MUSHI_CLI_VERSION,
98
98
  MUSHI_MCP_PIN_SPEC
99
- } from "./chunk-CNJIN4ST.js";
99
+ } from "./chunk-KQHEYAEK.js";
100
100
  import {
101
101
  CLOUD_API_ENDPOINT,
102
102
  CLOUD_MCP_OAUTH_URL,
@@ -1615,7 +1615,7 @@ async function checkOnboardingStatus(config, _consoleBase, cwd, doFetch = global
1615
1615
  }
1616
1616
  async function checkVersionDrift(cwd, doFetch) {
1617
1617
  const checks = [];
1618
- const { MUSHI_CLI_VERSION: MUSHI_CLI_VERSION2 } = await import("./version-SLVFYTAI.js");
1618
+ const { MUSHI_CLI_VERSION: MUSHI_CLI_VERSION2 } = await import("./version-T27RO74F.js");
1619
1619
  if (MUSHI_CLI_VERSION2 === "0.0.0-dev") return checks;
1620
1620
  const parse2 = (v) => {
1621
1621
  const m = v.replace(/^[~^]/, "").match(/^(\d+)\.(\d+)\.(\d+)/);
@@ -2588,7 +2588,7 @@ async function maybeOfferConnect(credentials, options, _consoleBase) {
2588
2588
  if (p.isCancel(answer) || !answer) return;
2589
2589
  const endpoint = resolveCloudEndpoint(options.endpoint);
2590
2590
  try {
2591
- const { runConnect: runConnect2 } = await import("./connect-NKWXYGN7.js");
2591
+ const { runConnect: runConnect2 } = await import("./connect-LCTKRHV7.js");
2592
2592
  const saved = loadConfig();
2593
2593
  const result = await runConnect2(
2594
2594
  {
package/dist/init.js CHANGED
@@ -5,9 +5,9 @@ import {
5
5
  resolveSavedCredentials,
6
6
  runInit,
7
7
  sanitizeSecret
8
- } from "./chunk-FA5LABKE.js";
9
- import "./chunk-UV4DMSQH.js";
10
- import "./chunk-JWG2QI3W.js";
8
+ } from "./chunk-RH5VBBIV.js";
9
+ import "./chunk-KIWSPGQB.js";
10
+ import "./chunk-CP57NSIY.js";
11
11
  import "./chunk-AWASJDQI.js";
12
12
  import "./chunk-2DMHQVRU.js";
13
13
  export {
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  MUSHI_CLI_VERSION,
4
4
  MUSHI_MCP_PIN_SPEC
5
- } from "./chunk-CNJIN4ST.js";
5
+ } from "./chunk-KQHEYAEK.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.31.2";
17
+ declare const MUSHI_MCP_PIN_SPEC = "@mushi-mushi/mcp@0.31.3";
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-JWG2QI3W.js";
4
+ } from "./chunk-CP57NSIY.js";
5
5
  export {
6
6
  MUSHI_CLI_VERSION,
7
7
  MUSHI_MCP_PIN_SPEC
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  runInit
3
- } from "./chunk-FA5LABKE.js";
3
+ } from "./chunk-RH5VBBIV.js";
4
4
  import {
5
5
  FLAGS_HELP,
6
6
  UNKNOWN_COMMAND_EXIT,
@@ -10,8 +10,8 @@ import {
10
10
  parseArgs,
11
11
  scaffoldTemplate
12
12
  } from "./chunk-TNTSV54C.js";
13
- import "./chunk-UV4DMSQH.js";
14
- import "./chunk-JWG2QI3W.js";
13
+ import "./chunk-KIWSPGQB.js";
14
+ import "./chunk-CP57NSIY.js";
15
15
  import "./chunk-AWASJDQI.js";
16
16
  import "./chunk-2DMHQVRU.js";
17
17
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mushi-mushi/cli",
3
- "version": "0.40.0",
3
+ "version": "0.40.1",
4
4
  "license": "MIT",
5
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": {
@@ -1,10 +0,0 @@
1
- #!/usr/bin/env node
2
-
3
- // src/version.ts
4
- var MUSHI_CLI_VERSION = true ? "0.40.0" : "0.0.0-dev";
5
- var MUSHI_MCP_PIN_SPEC = "@mushi-mushi/mcp@0.31.2";
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.40.0" : "0.0.0-dev";
3
- var MUSHI_MCP_PIN_SPEC = "@mushi-mushi/mcp@0.31.2";
4
-
5
- export {
6
- MUSHI_CLI_VERSION,
7
- MUSHI_MCP_PIN_SPEC
8
- };