@mu-crew/mu 4.2.0 → 4.2.2

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/index.d.ts CHANGED
@@ -15,10 +15,16 @@ type CtlBlocked = {
15
15
  /** Session commands the `command` op runs: `/new`, `/reload`, `/compact`. */
16
16
  declare const CTL_COMMANDS: readonly ["new", "reload", "compact"];
17
17
  type CtlCommandName = (typeof CTL_COMMANDS)[number];
18
- /** The tool pi is executing (innermost, latest started); `since` is ms epoch. */
18
+ /**
19
+ * The tool pi is executing (innermost, latest started); `since` is ms epoch.
20
+ * `quiet_ms`: how long since the tool last reported output (or started), measured
21
+ * by the extension's own clock so a remote host's skew cannot distort it; absent
22
+ * from older extensions.
23
+ */
19
24
  type CtlTool = {
20
25
  name: string;
21
26
  since: number;
27
+ quiet_ms?: number;
22
28
  };
23
29
 
24
30
  type RuntimeState = "busy" | "needs_input" | "needs_permission" | "unknown";
@@ -2561,6 +2567,8 @@ interface HumanNeededOptions {
2561
2567
  /** Who is stopping: `spawnerFromEnv()` (managed `<ws>/<agent>` or `pi:<session>`). */
2562
2568
  caller: string;
2563
2569
  reason: string;
2570
+ /** false: a human item that never stops the loop (no `human_needs` row). Default true. */
2571
+ stop?: boolean;
2564
2572
  }
2565
2573
  interface HumanNeeded {
2566
2574
  workstream: string;
@@ -5227,6 +5235,8 @@ interface AgentTool {
5227
5235
  since: number;
5228
5236
  /** Calculated at read time (`now - since`), when known. */
5229
5237
  elapsed_ms?: number;
5238
+ /** How long since the tool last reported output, by the agent's clock; absent from older extensions. */
5239
+ quiet_ms?: number;
5230
5240
  }
5231
5241
  interface DashboardWorkstream {
5232
5242
  name: string;
@@ -5358,7 +5368,8 @@ interface DashboardDelegate {
5358
5368
  *
5359
5369
  * - `dead`: the agent's pane (or gate process) is gone.
5360
5370
  * - `permission`: `needs_permission`; `text` carries how long.
5361
- * - `stalled`: one tool has run over `STALLED_TOOL_MS`.
5371
+ * - `stalled`: one tool has been quiet (no output) for `STALLED_TOOL_MS`; an
5372
+ * older extension that cannot say counts from the tool's start.
5362
5373
  * - `input`: `needs_input` past the idle threshold on an agent that owns work
5363
5374
  * (the registry's `idle` flag; `MU_IDLE_THRESHOLD_MS`, 0 disables).
5364
5375
  * - `delegate`: a delegate call that is `refused` (parked until its pi session
@@ -5448,7 +5459,7 @@ interface DashboardOptions {
5448
5459
  probe: boolean;
5449
5460
  };
5450
5461
  }
5451
- /** A tool running this long counts as stalled. */
5462
+ /** A tool quiet this long (no output; run time from an older extension) counts as stalled. */
5452
5463
  declare const STALLED_TOOL_MS: number;
5453
5464
  /**
5454
5465
  * Load the dashboard's whole read model in one pass. Read-only (see the file
package/dist/index.js CHANGED
@@ -2,7 +2,7 @@ import { createRequire as __muCreateRequire } from "node:module"; const require
2
2
  import {
3
3
  STALLED_TOOL_MS,
4
4
  loadDashboard
5
- } from "./chunk-UL2QE43S.js";
5
+ } from "./chunk-EIE5OKZZ.js";
6
6
  import {
7
7
  AGENT_STATE_GLYPH,
8
8
  DEFAULT_CTL_STUCK_AFTER_MS,
@@ -64,7 +64,7 @@ import {
64
64
  transitionActionReceipt,
65
65
  waitForEvents,
66
66
  waitWithActions
67
- } from "./chunk-3ZLI6YTV.js";
67
+ } from "./chunk-FHGYHXFB.js";
68
68
  import {
69
69
  COURSE_CHECK_AGE_MS,
70
70
  COURSE_CHECK_CLOSED,
@@ -137,7 +137,7 @@ import {
137
137
  syncEnabled,
138
138
  syncPass,
139
139
  verifyAgainstManifest
140
- } from "./chunk-RVWNQLFE.js";
140
+ } from "./chunk-FOWIQ4TP.js";
141
141
  import {
142
142
  AgentAbortNeedsCtlError,
143
143
  AgentAbortTimeoutError,
@@ -457,7 +457,7 @@ import {
457
457
  worktreePath,
458
458
  worktreeState,
459
459
  worktreesRoot
460
- } from "./chunk-SFV5RPZW.js";
460
+ } from "./chunk-4ZWBLTZK.js";
461
461
  import {
462
462
  defaultStateDir
463
463
  } from "./chunk-PZ5GOCWH.js";
@@ -3,14 +3,14 @@ import {
3
3
  formatElapsed,
4
4
  loadDashboard,
5
5
  matches
6
- } from "./chunk-UL2QE43S.js";
6
+ } from "./chunk-EIE5OKZZ.js";
7
7
  import {
8
8
  KNOWN_VERBS,
9
9
  ambientIngest,
10
10
  currentCallers,
11
11
  parseOpKey,
12
12
  syncEnabled
13
- } from "./chunk-RVWNQLFE.js";
13
+ } from "./chunk-FOWIQ4TP.js";
14
14
  import {
15
15
  DEFAULT_SUBSTATE,
16
16
  TASK_STATUSES,
@@ -27,7 +27,7 @@ import {
27
27
  spawnerFromEnv,
28
28
  tmuxAttachMode,
29
29
  verdictLineLabel
30
- } from "./chunk-SFV5RPZW.js";
30
+ } from "./chunk-4ZWBLTZK.js";
31
31
  import "./chunk-PZ5GOCWH.js";
32
32
 
33
33
  // src/cli/tui/index.ts
@@ -1391,7 +1391,7 @@ var fasterTick = (ms) => clampTick(Math.floor(ms / 2));
1391
1391
  var slowerTick = (ms) => clampTick(ms * 2);
1392
1392
  var snapshotKey = (s) => JSON.stringify(
1393
1393
  s,
1394
- (k, v) => k === "elapsed_ms" && typeof v === "number" ? Math.floor(v / 1e3) : v
1394
+ (k, v) => (k === "elapsed_ms" || k === "quiet_ms") && typeof v === "number" ? Math.floor(v / 1e3) : v
1395
1395
  );
1396
1396
  function useSnapshot(runtime, query, pollMs, slowMs = SLOW_TICK_MS) {
1397
1397
  const [state, setState] = useState2({
@@ -1844,4 +1844,4 @@ async function runDashboard(opts) {
1844
1844
  export {
1845
1845
  runDashboard
1846
1846
  };
1847
- //# sourceMappingURL=tui-3ZPLSLDW.js.map
1847
+ //# sourceMappingURL=tui-32NIE76L.js.map