@mushi-mushi/cli 0.39.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.
- package/dist/{chunk-UVAADP4O.js → chunk-3B7PXCRR.js} +12 -4
- package/dist/chunk-CP57NSIY.js +8 -0
- package/dist/{chunk-BG2TVTBN.js → chunk-KIWSPGQB.js} +1 -1
- package/dist/chunk-KQHEYAEK.js +10 -0
- package/dist/{chunk-OZPDPF6G.js → chunk-OVBRQDHI.js} +2 -2
- package/dist/{chunk-PPES6C4Y.js → chunk-QKO42UPX.js} +1 -1
- package/dist/chunk-RH5VBBIV.js +2279 -0
- package/dist/chunk-TNTSV54C.js +160 -0
- package/dist/{connect-RZV3PXP3.js → connect-LCTKRHV7.js} +3 -3
- package/dist/{connect-BCCGBCYR.js → connect-Q6LFT6QA.js} +2 -2
- package/dist/{daemon-ASMMT73O.js → daemon-JX6IG454.js} +5 -3
- package/dist/index.js +82 -39
- package/dist/init.js +11 -2269
- package/dist/{version-MGHYYC2T.js → version-T27RO74F.js} +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/dist/wizard-args.d.ts +35 -1
- package/dist/wizard-args.js +14 -95
- package/dist/wizard-bin.d.ts +32 -0
- package/dist/wizard-bin.js +106 -0
- package/package.json +8 -1
- package/templates/node/.env.example +4 -0
- package/templates/node/README.md +12 -0
- package/templates/node/gitignore +6 -0
- package/templates/node/package.json +15 -0
- package/templates/node/src/server.mjs +38 -0
- package/templates/svelte/.env.example +4 -0
- package/templates/svelte/README.md +10 -0
- package/templates/svelte/gitignore +6 -0
- package/templates/svelte/index.html +12 -0
- package/templates/svelte/package.json +20 -0
- package/templates/svelte/src/App.svelte +20 -0
- package/templates/svelte/src/main.ts +12 -0
- package/templates/svelte/vite.config.ts +6 -0
- package/templates/vue/.env.example +4 -0
- package/templates/vue/README.md +10 -0
- package/templates/vue/gitignore +6 -0
- package/templates/vue/index.html +12 -0
- package/templates/vue/package.json +20 -0
- package/templates/vue/src/App.vue +22 -0
- package/templates/vue/src/main.ts +12 -0
- package/templates/vue/vite.config.ts +6 -0
- package/dist/chunk-HQM2WZVF.js +0 -8
- package/dist/chunk-JQPLY3ZT.js +0 -10
|
@@ -8,10 +8,10 @@ import {
|
|
|
8
8
|
requireConfig,
|
|
9
9
|
requireUuid,
|
|
10
10
|
tryLoadWorkerKey
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-QKO42UPX.js";
|
|
12
12
|
import {
|
|
13
13
|
MUSHI_CLI_VERSION
|
|
14
|
-
} from "./chunk-
|
|
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-
|
|
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,
|
|
@@ -9,10 +9,10 @@ import {
|
|
|
9
9
|
requireUuid,
|
|
10
10
|
saveConfig,
|
|
11
11
|
savedSdkKeyFor
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-QKO42UPX.js";
|
|
13
13
|
import {
|
|
14
14
|
MUSHI_MCP_PIN_SPEC
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-KQHEYAEK.js";
|
|
16
16
|
import {
|
|
17
17
|
assertEndpoint,
|
|
18
18
|
normalizeEndpoint
|