@mu-crew/mu 3.10.1 → 3.11.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.
Files changed (46) hide show
  1. package/dist/{chunk-7OQNJWBY.js → chunk-2FJK6OOZ.js} +3 -3
  2. package/dist/{chunk-XXK7FR37.js → chunk-DXKJY3NT.js} +3 -3
  3. package/dist/{chunk-WT7IN2OD.js → chunk-JYZUNPPO.js} +44 -3
  4. package/dist/chunk-JYZUNPPO.js.map +1 -0
  5. package/dist/{chunk-YIF3X32A.js → chunk-WYBOR4FX.js} +2 -2
  6. package/dist/{chunk-YIF3X32A.js.map → chunk-WYBOR4FX.js.map} +1 -1
  7. package/dist/{cli-KJGVEZW5.js → cli-GRAPF5VC.js} +14 -9
  8. package/dist/cli-GRAPF5VC.js.map +1 -0
  9. package/dist/cli.js +1 -1
  10. package/dist/extension/mu-pi.js +2 -2
  11. package/dist/extension/mu-pi.js.map +1 -1
  12. package/dist/index.d.ts +22 -2
  13. package/dist/index.js +5 -3
  14. package/dist/{tui-X2XICJTN.js → tui-DGDEH4JX.js} +5 -5
  15. package/dist/{tui-X2XICJTN.js.map → tui-DGDEH4JX.js.map} +1 -1
  16. package/dist/tui-sync-worker.js +1 -1
  17. package/docs/VISION.md +3 -0
  18. package/docs/guide/delegate.md +1 -1
  19. package/package.json +1 -1
  20. package/skills/mu/SKILL.md +29 -37
  21. package/skills/mu/recipes/adversarial-review.md +26 -21
  22. package/skills/mu/recipes/brief.md +3 -2
  23. package/skills/mu/recipes/codemode-driver.md +9 -6
  24. package/skills/mu/recipes/deep-research.md +2 -1
  25. package/skills/mu/recipes/drift-audit.md +5 -4
  26. package/skills/mu/recipes/fan-out.md +5 -3
  27. package/skills/mu/recipes/findings.md +7 -3
  28. package/skills/mu/recipes/hypothesis-panel.md +2 -1
  29. package/skills/mu/recipes/models.md +102 -0
  30. package/skills/mu/recipes/orchestrator-loop.md +6 -8
  31. package/skills/mu/recipes/plan.md +5 -5
  32. package/skills/mu/recipes/recovery.md +9 -8
  33. package/skills/mu/recipes/refute.md +7 -4
  34. package/skills/mu/recipes/remote-workers.md +22 -14
  35. package/skills/mu/recipes/review-panel.md +4 -3
  36. package/skills/mu/recipes/rules-audit.md +7 -6
  37. package/skills/mu/recipes/tasks-or-calls.md +6 -5
  38. package/skills/mu/recipes/tournament.md +5 -2
  39. package/skills/mu/recipes/ultrathink.md +6 -4
  40. package/skills/mu/recipes/watcher.md +4 -0
  41. package/skills/mu/recipes/waves.md +5 -4
  42. package/skills/mu/recipes/worker.md +2 -2
  43. package/dist/chunk-WT7IN2OD.js.map +0 -1
  44. package/dist/cli-KJGVEZW5.js.map +0 -1
  45. /package/dist/{chunk-7OQNJWBY.js.map → chunk-2FJK6OOZ.js.map} +0 -0
  46. /package/dist/{chunk-XXK7FR37.js.map → chunk-DXKJY3NT.js.map} +0 -0
@@ -7,10 +7,10 @@ import {
7
7
  pc,
8
8
  renderBoxTable,
9
9
  renderOp
10
- } from "./chunk-WT7IN2OD.js";
10
+ } from "./chunk-JYZUNPPO.js";
11
11
  import {
12
12
  formatPair
13
- } from "./chunk-YIF3X32A.js";
13
+ } from "./chunk-WYBOR4FX.js";
14
14
 
15
15
  // src/cli/format.ts
16
16
  var STATUS_COLORS = {
@@ -388,4 +388,4 @@ export {
388
388
  sortTasks,
389
389
  relTimeBasisForSort
390
390
  };
391
- //# sourceMappingURL=chunk-7OQNJWBY.js.map
391
+ //# sourceMappingURL=chunk-2FJK6OOZ.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  groupIdFromPrefix
3
- } from "./chunk-WT7IN2OD.js";
3
+ } from "./chunk-JYZUNPPO.js";
4
4
  import {
5
5
  LEGACY_LOG_ONLY_SQL_EXCLUSION,
6
6
  localMachineId,
@@ -9,7 +9,7 @@ import {
9
9
  resolvePair,
10
10
  resolveWorkstreamId,
11
11
  withOpContext
12
- } from "./chunk-YIF3X32A.js";
12
+ } from "./chunk-WYBOR4FX.js";
13
13
 
14
14
  // src/undo.ts
15
15
  var UndoGroupNotFoundError = class extends Error {
@@ -637,4 +637,4 @@ export {
637
637
  planUndo,
638
638
  undoGroup
639
639
  };
640
- //# sourceMappingURL=chunk-XXK7FR37.js.map
640
+ //# sourceMappingURL=chunk-DXKJY3NT.js.map
@@ -21,7 +21,7 @@ import {
21
21
  withCaptureSuppressed,
22
22
  withFileLock,
23
23
  withOpContext
24
- } from "./chunk-YIF3X32A.js";
24
+ } from "./chunk-WYBOR4FX.js";
25
25
  import {
26
26
  defaultStateDir
27
27
  } from "./chunk-4PACTXAB.js";
@@ -3532,6 +3532,7 @@ async function listCommitsForWorkspace(db, agent, opts) {
3532
3532
  return { vcs: row.backend, baseRef, commits, workspacePath: row.path };
3533
3533
  }
3534
3534
  async function isWorkspaceClean(row) {
3535
+ if (row.backend === "none") return false;
3535
3536
  const backend = backendByName(row.backend);
3536
3537
  let clean;
3537
3538
  try {
@@ -3540,7 +3541,6 @@ async function isWorkspaceClean(row) {
3540
3541
  return false;
3541
3542
  }
3542
3543
  if (!clean) return false;
3543
- if (row.backend === "none") return true;
3544
3544
  if (row.parentRef === null || row.parentRef.length === 0) return false;
3545
3545
  try {
3546
3546
  const commits = await backend.commitsSinceBase(row.path, row.parentRef);
@@ -4744,6 +4744,36 @@ var AgentCtlUnreachableError = class extends Error {
4744
4744
  ];
4745
4745
  }
4746
4746
  };
4747
+ var AgentPaneDeadError = class extends Error {
4748
+ constructor(agentName, workstream, paneId) {
4749
+ super(
4750
+ `agent ${agentName} is dead: its pane ${paneId} no longer exists, so its control socket is gone`
4751
+ );
4752
+ this.agentName = agentName;
4753
+ this.workstream = workstream;
4754
+ this.paneId = paneId;
4755
+ }
4756
+ agentName;
4757
+ workstream;
4758
+ paneId;
4759
+ name = "AgentPaneDeadError";
4760
+ errorNextSteps() {
4761
+ return [
4762
+ {
4763
+ intent: "Read the log for why it exited (a bad model or missing API key is common)",
4764
+ command: `mu log -w ${this.workstream}`
4765
+ },
4766
+ {
4767
+ intent: "Drop the dead registry row, then respawn",
4768
+ command: `mu agent close ${this.agentName} -w ${this.workstream}`
4769
+ },
4770
+ {
4771
+ intent: "Respawn it",
4772
+ command: `mu agent spawn ${this.agentName} -w ${this.workstream}`
4773
+ }
4774
+ ];
4775
+ }
4776
+ };
4747
4777
  var AgentAbortNeedsCtlError = class extends Error {
4748
4778
  constructor(agentName, workstream, cli) {
4749
4779
  super(
@@ -4933,6 +4963,9 @@ async function ctlRequestFor(agent, sock, req) {
4933
4963
  async function ctlFailure(agent, sock, e) {
4934
4964
  if (e instanceof CtlVersionError) return e;
4935
4965
  if (e instanceof CtlUnknownOpError) return extensionOutdated(agent, sock, e);
4966
+ if (await paneGone(agent.paneId)) {
4967
+ return new AgentPaneDeadError(agent.name, agent.workstreamName, agent.paneId);
4968
+ }
4936
4969
  return new AgentCtlUnreachableError(
4937
4970
  agent.name,
4938
4971
  agent.workstreamName,
@@ -4940,6 +4973,13 @@ async function ctlFailure(agent, sock, e) {
4940
4973
  errCode(e) === "ENOENT" ? "missing" : "refused"
4941
4974
  );
4942
4975
  }
4976
+ async function paneGone(paneId) {
4977
+ try {
4978
+ return !await (await activeMux()).paneExists(paneId);
4979
+ } catch {
4980
+ return false;
4981
+ }
4982
+ }
4943
4983
  function recordSend(db, agent, mode, bytes, fields2) {
4944
4984
  const detail = Object.entries({ mode, ...fields2 }).filter(([, v]) => v !== void 0).map(([k, v]) => `${k}=${k === "since" ? new Date(Number(v)).toISOString() : v}`).join(" ");
4945
4985
  emitEvent(
@@ -9816,6 +9856,7 @@ export {
9816
9856
  AgentSpawnStartupError,
9817
9857
  WorkspacePreservedError,
9818
9858
  AgentCtlUnreachableError,
9859
+ AgentPaneDeadError,
9819
9860
  AgentAbortNeedsCtlError,
9820
9861
  AgentAbortTimeoutError,
9821
9862
  AgentFreshNeedsCtlError,
@@ -9884,4 +9925,4 @@ export {
9884
9925
  agentStateHistogram,
9885
9926
  summarizeOwnedTasks
9886
9927
  };
9887
- //# sourceMappingURL=chunk-WT7IN2OD.js.map
9928
+ //# sourceMappingURL=chunk-JYZUNPPO.js.map