11/**
22 * Live progress for a dispatched sub-agent's pending transcript row, plus the
3- * fleet-level roll-up of those lanes .
3+ * fleet roll-up.
44 *
5- * The pending row lives for the worker's lifetime, not just the tool call in
6- * flight — the immediate `{status:running}` result must not drop live clocks.
7- * Lane and fleet share one stalled definition (`laneState` below ).
5+ * The pending row lives for the worker's lifetime, not just the tool call —
6+ * the immediate `{status:running}` result must not drop live clocks. Lane and
7+ * fleet share one stalled definition (`laneState`).
88 */
99
1010/** Minimal session shape this module reads — avoids a hard dep on the store. */
@@ -37,7 +37,7 @@ export interface AgentProgressSession {
3737/**
3838 * What a lane is doing, not how long it has been alive.
3939 *
40- * A worker inside one long tool call emits nothing, so silence alone cannot
40+ * A worker in one long tool call emits nothing, so silence alone cannot
4141 * tell a wedged reactor from a long test run. `stalled` is quiet with no
4242 * outstanding tool to explain it — the only case an operator can act on.
4343 */
@@ -57,21 +57,20 @@ export interface AgentProgress {
5757/**
5858 * Silence after which a running worker reads as hung rather than thinking.
5959 *
60- * Grok routinely sits 60–120s between tool cycles, so a 2-minute bar painted
61- * healthy gaps as stalled rows and drove dig/cascade thrash. Matches the
60+ * Grok sits 60–120s between tool cycles, so a 2-minute bar painted healthy
61+ * gaps as stalled rows and drove dig/cascade thrash. Matches the
6262 * 5-minute sub-agent stall nudge so UI and salvage agree on "quiet too long".
6363 */
6464export const DEFAULT_STALL_MS = 300_000 ;
6565
6666/**
67- * How long one tool call may stay outstanding before the lane reads as
68- * stalled anyway.
67+ * How long one tool call may stay outstanding before the lane reads stalled.
6968 *
7069 * Without it `in_tool` would be terminal: a wedged build or a shell blocked
71- * on stdin would read as busy forever. Generous on purpose — real test
72- * suites and builds run for minutes. Also backstops calls that never report
73- * a result: the approval-suspend path emits no completion, so it would
74- * otherwise leave a call outstanding forever.
70+ * on stdin reads busy forever. Generous on purpose — real test suites and
71+ * builds run for minutes. Also backstops calls that never report a result:
72+ * the approval-suspend path emits no completion, so a call stays outstanding
73+ * forever.
7574 */
7675export const IN_TOOL_STALL_MS = 600_000 ;
7776
@@ -130,8 +129,8 @@ export function agentLaneIsLive(session: {
130129 * Progress for a running session's pending row, or null once it has finished
131130 * (a terminal session resolves its row through the tool-result path instead).
132131 *
133- * The number always explains the state: lifetime for a healthy lane, tool
134- * runtime for one in a tool, silence length for a quiet one.
132+ * The number explains the state: lifetime for a healthy lane, tool runtime
133+ * for one in a tool, silence length for a quiet one.
135134 */
136135export function agentProgress (
137136 session : AgentProgressSession ,
@@ -151,8 +150,6 @@ export function agentProgress(
151150 } ;
152151 }
153152 const elapsed = clockLabel ( nowMs - session . startedAt ) ;
154- // Prefer the argument subject over the bare tool name so shell commands
155- // stay distinguishable.
156153 const preview = session . currentToolPreview ;
157154 const tool = session . currentToolName ;
158155 const subject =
@@ -197,11 +194,11 @@ export function agentProgress(
197194}
198195
199196/**
200- * What the whole fleet is doing, rolled up from the per-lane states.
197+ * Fleet roll- up of the per-lane states.
201198 *
202- * Without the roll-up the top-level indicator reports the parent's own
203- * activity — mostly awaiting children at fleet scale — so it would read
204- * "working" while every lane is stuck.
199+ * Without it the top-level indicator reports the parent's own activity —
200+ * mostly awaiting children — so it reads "working" while every lane is
201+ * stuck.
205202 */
206203export interface FleetProgress {
207204 readonly running : number ;
0 commit comments