@mu-crew/mu 3.10.2 → 3.11.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-RXVYBV3P.js → chunk-2FJK6OOZ.js} +2 -2
- package/dist/{chunk-JEWHQ4GB.js → chunk-DXKJY3NT.js} +2 -2
- package/dist/{chunk-KGGOITI5.js → chunk-JYZUNPPO.js} +43 -2
- package/dist/chunk-JYZUNPPO.js.map +1 -0
- package/dist/{cli-GBIC22X7.js → cli-GRAPF5VC.js} +5 -5
- package/dist/cli.js +1 -1
- package/dist/extension/mu-pi.js +37 -7
- package/dist/extension/mu-pi.js.map +1 -1
- package/dist/index.d.ts +15 -1
- package/dist/index.js +4 -2
- package/dist/{tui-SKZMGHA6.js → tui-DGDEH4JX.js} +3 -3
- package/docs/VISION.md +3 -0
- package/docs/guide/delegate.md +4 -2
- package/package.json +1 -1
- package/skills/mu/SKILL.md +29 -37
- package/skills/mu/recipes/adversarial-review.md +26 -21
- package/skills/mu/recipes/brief.md +3 -2
- package/skills/mu/recipes/codemode-driver.md +9 -6
- package/skills/mu/recipes/deep-research.md +2 -1
- package/skills/mu/recipes/drift-audit.md +5 -4
- package/skills/mu/recipes/fan-out.md +5 -3
- package/skills/mu/recipes/findings.md +7 -3
- package/skills/mu/recipes/hypothesis-panel.md +2 -1
- package/skills/mu/recipes/models.md +102 -0
- package/skills/mu/recipes/orchestrator-loop.md +6 -8
- package/skills/mu/recipes/plan.md +5 -5
- package/skills/mu/recipes/recovery.md +9 -8
- package/skills/mu/recipes/refute.md +7 -4
- package/skills/mu/recipes/remote-workers.md +22 -14
- package/skills/mu/recipes/review-panel.md +4 -3
- package/skills/mu/recipes/rules-audit.md +7 -6
- package/skills/mu/recipes/tasks-or-calls.md +6 -5
- package/skills/mu/recipes/tournament.md +5 -2
- package/skills/mu/recipes/ultrathink.md +6 -4
- package/skills/mu/recipes/watcher.md +4 -0
- package/skills/mu/recipes/waves.md +5 -4
- package/skills/mu/recipes/worker.md +2 -2
- package/dist/chunk-KGGOITI5.js.map +0 -1
- /package/dist/{chunk-RXVYBV3P.js.map → chunk-2FJK6OOZ.js.map} +0 -0
- /package/dist/{chunk-JEWHQ4GB.js.map → chunk-DXKJY3NT.js.map} +0 -0
- /package/dist/{cli-GBIC22X7.js.map → cli-GRAPF5VC.js.map} +0 -0
- /package/dist/{tui-SKZMGHA6.js.map → tui-DGDEH4JX.js.map} +0 -0
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
planUndo,
|
|
7
7
|
resolveGroupId,
|
|
8
8
|
undoGroup
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-DXKJY3NT.js";
|
|
10
10
|
import {
|
|
11
11
|
IDLE_GLYPH,
|
|
12
12
|
TASK_SORT_KEYS,
|
|
@@ -28,7 +28,7 @@ import {
|
|
|
28
28
|
statusIcon,
|
|
29
29
|
truncate,
|
|
30
30
|
truncateFront
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-2FJK6OOZ.js";
|
|
32
32
|
import {
|
|
33
33
|
AgentAbortNeedsCtlError,
|
|
34
34
|
AgentAbortTimeoutError,
|
|
@@ -206,7 +206,7 @@ import {
|
|
|
206
206
|
waitForAgents,
|
|
207
207
|
waitForTasks,
|
|
208
208
|
weakDecisionWarning
|
|
209
|
-
} from "./chunk-
|
|
209
|
+
} from "./chunk-JYZUNPPO.js";
|
|
210
210
|
import {
|
|
211
211
|
CURRENT_SCHEMA_VERSION,
|
|
212
212
|
EXPECTED_TABLES,
|
|
@@ -4659,7 +4659,7 @@ async function resolveInitialTab(names, db) {
|
|
|
4659
4659
|
}
|
|
4660
4660
|
|
|
4661
4661
|
// src/cli/tui-load.ts
|
|
4662
|
-
async function importTui(load = () => import("./tui-
|
|
4662
|
+
async function importTui(load = () => import("./tui-DGDEH4JX.js")) {
|
|
4663
4663
|
const key = "NODE_ENV";
|
|
4664
4664
|
if (process.env[key] !== void 0) return load();
|
|
4665
4665
|
process.env[key] = "production";
|
|
@@ -6268,4 +6268,4 @@ export {
|
|
|
6268
6268
|
truncateFront,
|
|
6269
6269
|
withRoiAll
|
|
6270
6270
|
};
|
|
6271
|
-
//# sourceMappingURL=cli-
|
|
6271
|
+
//# sourceMappingURL=cli-GRAPF5VC.js.map
|
package/dist/cli.js
CHANGED
|
@@ -47,6 +47,6 @@ function enableCompileCacheIn(dir, enable = nodeEnable ?? null) {
|
|
|
47
47
|
|
|
48
48
|
// src/main.ts
|
|
49
49
|
enableCompileCacheIn(join(defaultStateDir(), "compile-cache"));
|
|
50
|
-
var { runCli } = await import("./cli-
|
|
50
|
+
var { runCli } = await import("./cli-GRAPF5VC.js");
|
|
51
51
|
await runCli(process.argv);
|
|
52
52
|
//# sourceMappingURL=cli.js.map
|
package/dist/extension/mu-pi.js
CHANGED
|
@@ -53,12 +53,13 @@ var DELEGATE_MESSAGE_TYPE = "mu-delegate";
|
|
|
53
53
|
var DELEGATE_WORKSTREAM = "scratch";
|
|
54
54
|
var DELEGATE_STATUS_KEY = "mu-delegate";
|
|
55
55
|
var PENDING_CHANNEL = "murmur:pending";
|
|
56
|
-
function delegateStatus(running, starting = 0, queued = 0, failed = 0) {
|
|
56
|
+
function delegateStatus(running, starting = 0, queued = 0, failed = 0, pending = 0) {
|
|
57
57
|
const parts = [];
|
|
58
58
|
if (running > 0) parts.push(`${running} delegate${running === 1 ? "" : "s"} running`);
|
|
59
59
|
if (starting > 0) parts.push(`${starting} starting`);
|
|
60
60
|
if (queued > 0) parts.push(`${queued} queued`);
|
|
61
61
|
if (failed > 0) parts.push(`${failed} failed`);
|
|
62
|
+
if (pending > 0) parts.push(`${pending} result${pending === 1 ? "" : "s"} pending`);
|
|
62
63
|
return parts.length > 0 ? parts.join(", ") : void 0;
|
|
63
64
|
}
|
|
64
65
|
var DELEGATE_TIMEOUT_S = 3600;
|
|
@@ -188,6 +189,8 @@ function registerDelegate(pi, run = defaultRunner()) {
|
|
|
188
189
|
const queue = [];
|
|
189
190
|
let queueSeq = 0;
|
|
190
191
|
const failed = /* @__PURE__ */ new Set();
|
|
192
|
+
const arriving = /* @__PURE__ */ new Map();
|
|
193
|
+
let deliverySeq = 0;
|
|
191
194
|
let ui;
|
|
192
195
|
let lastPending = 0;
|
|
193
196
|
const reportPending = () => {
|
|
@@ -204,7 +207,7 @@ function registerDelegate(pi, run = defaultRunner()) {
|
|
|
204
207
|
try {
|
|
205
208
|
ui?.setStatus?.(
|
|
206
209
|
DELEGATE_STATUS_KEY,
|
|
207
|
-
delegateStatus(inflight.size, starting, queue.length, failed.size)
|
|
210
|
+
delegateStatus(inflight.size, starting, queue.length, failed.size, arriving.size)
|
|
208
211
|
);
|
|
209
212
|
} catch {
|
|
210
213
|
}
|
|
@@ -335,7 +338,7 @@ function registerDelegate(pi, run = defaultRunner()) {
|
|
|
335
338
|
return `Recording on ${where} failed: ${e instanceof Error ? e.message : String(e)}. Record it yourself.`;
|
|
336
339
|
}
|
|
337
340
|
}
|
|
338
|
-
async function deliver(name, wait, keep, extras, record) {
|
|
341
|
+
async function deliver(name, wait, keep, extras, delivery, record) {
|
|
339
342
|
const agent = json(wait)?.agents?.[0];
|
|
340
343
|
const outcome = agent?.outcome;
|
|
341
344
|
const tail = outcome === "done" || outcome === "timeout" || outcome === "pending" || outcome === "error" ? void 0 : (await mu(["agent", "read", name, "-n", "50", "-w", W])).stdout;
|
|
@@ -370,7 +373,8 @@ ${recorded}` : message,
|
|
|
370
373
|
closed: pane.closed,
|
|
371
374
|
answer: outcome === "done" ? agent?.lastText ?? null : null,
|
|
372
375
|
elapsedMs: extras.elapsedMs ?? null,
|
|
373
|
-
workspace: extras.workspace ?? null
|
|
376
|
+
workspace: extras.workspace ?? null,
|
|
377
|
+
delivery
|
|
374
378
|
}
|
|
375
379
|
},
|
|
376
380
|
{ deliverAs: "followUp", triggerTurn: true }
|
|
@@ -434,6 +438,8 @@ ${task}` : task,
|
|
|
434
438
|
entry.abort.signal
|
|
435
439
|
);
|
|
436
440
|
const settle = async (r) => {
|
|
441
|
+
const delivery = ++deliverySeq;
|
|
442
|
+
arriving.set(delivery, false);
|
|
437
443
|
forget(name);
|
|
438
444
|
try {
|
|
439
445
|
await deliver(
|
|
@@ -447,8 +453,10 @@ ${task}` : task,
|
|
|
447
453
|
...attach ? { attach } : {},
|
|
448
454
|
...workspace ? { workspace } : {}
|
|
449
455
|
},
|
|
456
|
+
delivery,
|
|
450
457
|
entry.record
|
|
451
458
|
);
|
|
459
|
+
if (arriving.has(delivery)) arriving.set(delivery, true);
|
|
452
460
|
} catch (e) {
|
|
453
461
|
await Promise.resolve(
|
|
454
462
|
pi.sendMessage(
|
|
@@ -456,11 +464,13 @@ ${task}` : task,
|
|
|
456
464
|
customType: DELEGATE_MESSAGE_TYPE,
|
|
457
465
|
content: `Delegate ${W}/${name} settled, but delivering its answer failed: ${e instanceof Error ? e.message : String(e)}. Read it with: mu agent read ${name} -n 50 -w ${W}`,
|
|
458
466
|
display: true,
|
|
459
|
-
details: { name, workstream: W, outcome: null, closed: false }
|
|
467
|
+
details: { name, workstream: W, outcome: null, closed: false, delivery }
|
|
460
468
|
},
|
|
461
469
|
{ deliverAs: "followUp", triggerTurn: true }
|
|
462
470
|
)
|
|
463
471
|
).catch(() => {
|
|
472
|
+
arriving.delete(delivery);
|
|
473
|
+
showStatus();
|
|
464
474
|
});
|
|
465
475
|
}
|
|
466
476
|
};
|
|
@@ -526,7 +536,7 @@ ${task}` : task,
|
|
|
526
536
|
},
|
|
527
537
|
model: {
|
|
528
538
|
type: "string",
|
|
529
|
-
description: "Model for the subagent, passed to pi as --model (e.g. 'sonnet', '
|
|
539
|
+
description: "Model for the subagent, passed to pi as --model (e.g. 'sonnet', '<provider>/<model>:high' copied from `pi --list-models`); appended to the cli's command. Default: the cli's own model. Use it to vary models across a review panel."
|
|
530
540
|
},
|
|
531
541
|
keep: {
|
|
532
542
|
type: "boolean",
|
|
@@ -653,7 +663,27 @@ ${task}` : task,
|
|
|
653
663
|
return { content: [{ type: "text", text }], details: { name, workstream: W } };
|
|
654
664
|
}
|
|
655
665
|
});
|
|
666
|
+
pi.on("message_start", (e) => {
|
|
667
|
+
const m = e.message;
|
|
668
|
+
if (m?.role !== "custom" || m.customType !== DELEGATE_MESSAGE_TYPE) return;
|
|
669
|
+
const id = m.details?.delivery;
|
|
670
|
+
if (typeof id === "number" && arriving.delete(id)) showStatus();
|
|
671
|
+
});
|
|
672
|
+
pi.on("agent_settled", (e) => {
|
|
673
|
+
if (e.aborted !== true) return;
|
|
674
|
+
let dropped = false;
|
|
675
|
+
for (const [id, queued] of arriving)
|
|
676
|
+
if (queued) {
|
|
677
|
+
arriving.delete(id);
|
|
678
|
+
dropped = true;
|
|
679
|
+
}
|
|
680
|
+
if (dropped) showStatus();
|
|
681
|
+
});
|
|
656
682
|
pi.on("session_shutdown", (_e, ctx) => {
|
|
683
|
+
if (arriving.size > 0) {
|
|
684
|
+
arriving.clear();
|
|
685
|
+
showStatus();
|
|
686
|
+
}
|
|
657
687
|
if (inflight.size === 0 && queue.length === 0) return;
|
|
658
688
|
const names = [...inflight.keys()];
|
|
659
689
|
const never = queue.splice(0).map((q) => q.handle);
|
|
@@ -1102,7 +1132,7 @@ function registerRefuteNudge(pi, run = defaultRunner(), nested = notNested) {
|
|
|
1102
1132
|
}
|
|
1103
1133
|
|
|
1104
1134
|
// extension/mu-pi.ts
|
|
1105
|
-
var EXT_VERSION = true ? "3.
|
|
1135
|
+
var EXT_VERSION = true ? "3.11.1" : void 0;
|
|
1106
1136
|
var FRESH_COMMAND = "mu-fresh";
|
|
1107
1137
|
var FRESH_TIMEOUT_MS = 3e4;
|
|
1108
1138
|
function commandName(name) {
|