gaunt-sloth 2.0.0-beta.12 → 2.0.0-beta.13

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 (76) hide show
  1. package/cli.js +49 -0
  2. package/dist/commands/adkEvalRunner.d.ts +7 -6
  3. package/dist/commands/adkEvalRunner.js +3 -3
  4. package/dist/commands/adkEvalRunner.js.map +1 -1
  5. package/dist/commands/agUiEvalRunner.d.ts +4 -4
  6. package/dist/commands/agUiEvalRunner.js +8 -7
  7. package/dist/commands/agUiEvalRunner.js.map +1 -1
  8. package/dist/commands/askCommand.js +9 -1
  9. package/dist/commands/askCommand.js.map +1 -1
  10. package/dist/commands/batchCommand.d.ts +2 -2
  11. package/dist/commands/batchCommand.js +2 -2
  12. package/dist/commands/configCommand.d.ts +1 -1
  13. package/dist/commands/configCommand.js +1 -1
  14. package/dist/commands/configSetup.d.ts +1 -1
  15. package/dist/commands/evalCommand.d.ts +1 -1
  16. package/dist/commands/evalCommand.js +8 -3
  17. package/dist/commands/evalCommand.js.map +1 -1
  18. package/dist/commands/execCommand.d.ts +1 -1
  19. package/dist/commands/execCommand.js +9 -2
  20. package/dist/commands/execCommand.js.map +1 -1
  21. package/dist/commands/firstRunDialog.d.ts +3 -3
  22. package/dist/commands/firstRunDialog.js +2 -2
  23. package/dist/commands/historyCommand.d.ts +1 -1
  24. package/dist/commands/historyCommand.js +16 -4
  25. package/dist/commands/historyCommand.js.map +1 -1
  26. package/dist/commands/prDiscovery.d.ts +1 -1
  27. package/dist/tui/components/App.js +249 -24
  28. package/dist/tui/components/App.js.map +1 -1
  29. package/dist/tui/components/DebugPanel.d.ts +6 -3
  30. package/dist/tui/components/DebugPanel.js +15 -3
  31. package/dist/tui/components/DebugPanel.js.map +1 -1
  32. package/dist/tui/components/FetchProgress.d.ts +1 -1
  33. package/dist/tui/components/LaunchBanner.d.ts +1 -1
  34. package/dist/tui/components/LaunchBanner.js +1 -1
  35. package/dist/tui/components/LiveTurn.d.ts +6 -5
  36. package/dist/tui/components/LiveTurn.js +15 -14
  37. package/dist/tui/components/LiveTurn.js.map +1 -1
  38. package/dist/tui/components/PromptInput.d.ts +2 -2
  39. package/dist/tui/components/PromptInput.js +11 -6
  40. package/dist/tui/components/PromptInput.js.map +1 -1
  41. package/dist/tui/components/ResumePicker.d.ts +69 -0
  42. package/dist/tui/components/ResumePicker.js +93 -0
  43. package/dist/tui/components/ResumePicker.js.map +1 -0
  44. package/dist/tui/components/SelectList.d.ts +1 -1
  45. package/dist/tui/components/SelectList.js +1 -1
  46. package/dist/tui/components/SlashCommandMenu.d.ts +1 -1
  47. package/dist/tui/components/SlashCommandMenu.js +1 -1
  48. package/dist/tui/components/StatusBar.d.ts +27 -1
  49. package/dist/tui/components/StatusBar.js +13 -2
  50. package/dist/tui/components/StatusBar.js.map +1 -1
  51. package/dist/tui/debugRender.d.ts +26 -3
  52. package/dist/tui/debugRender.js +220 -2
  53. package/dist/tui/debugRender.js.map +1 -1
  54. package/dist/tui/fixtureAgent.d.ts +2 -2
  55. package/dist/tui/fixtureAgent.js +2 -2
  56. package/dist/tui/keyGuards.d.ts +1 -1
  57. package/dist/tui/keyGuards.js +1 -1
  58. package/dist/tui/ruleWidth.d.ts +1 -1
  59. package/dist/tui/ruleWidth.js +1 -1
  60. package/dist/tui/selectCancelled.d.ts +1 -1
  61. package/dist/tui/selectCancelled.js +1 -1
  62. package/dist/tui/transcriptWindow.js +7 -1
  63. package/dist/tui/transcriptWindow.js.map +1 -1
  64. package/dist/tui/tuiSessionModule.js +17 -1
  65. package/dist/tui/tuiSessionModule.js.map +1 -1
  66. package/dist/tui/types.d.ts +45 -7
  67. package/dist/tui/useMouse.d.ts +1 -1
  68. package/dist/tui/useMouse.js +1 -1
  69. package/dist/tui/useSlothAnimation.d.ts +1 -1
  70. package/dist/tui/viewModel.d.ts +64 -12
  71. package/dist/tui/viewModel.js +38 -11
  72. package/dist/tui/viewModel.js.map +1 -1
  73. package/dist/utils/configErrorGuard.d.ts +11 -3
  74. package/dist/utils/configErrorGuard.js +11 -3
  75. package/dist/utils/configErrorGuard.js.map +1 -1
  76. package/package.json +5 -5
@@ -7,7 +7,10 @@ import type { AutocompactStatus } from '@gaunt-sloth/core/core/compactionThresho
7
7
  import type { TokenBudget } from '@gaunt-sloth/core/config.js';
8
8
  import type { ApprovalStopPart } from '@gaunt-sloth/core/core/shell/approvalStop.js';
9
9
  import type { GthTerminationReason } from '@gaunt-sloth/core/core/terminationReason.js';
10
+ import type { GthOutstandingWork } from '@gaunt-sloth/core/core/outstandingWork.js';
11
+ import type { GthRunRecap } from '@gaunt-sloth/core/core/runRecap.js';
10
12
  import type { LiveNegotiationRound } from '@gaunt-sloth/core/core/shell/negotiation.js';
13
+ import type { ApprovalDecisionCapture } from '@gaunt-sloth/core/core/shell/approvalCapture.js';
11
14
  import type { CommandNoticeTone } from '#src/tui/components/CommandNotice.js';
12
15
  import type { DebugDumpInput } from '@gaunt-sloth/agent/modules/slashCommands.js';
13
16
  import type { ResumeResolution, ResumeTarget } from '@gaunt-sloth/agent/modules/sessionResume.js';
@@ -15,11 +18,11 @@ import type { ConversationSummary } from '@gaunt-sloth/core/history/historyStore
15
18
  import type { MouseSubscribe } from '#src/tui/useMouse.js';
16
19
  /**
17
20
  * One in-flight tool-approval request bridged from the runner into the mounted `<App>`
18
- * (EXT-9 Phase B2): the {@link PendingToolInterrupt} the runner suspended on, plus a `resolve`
19
- * that hands the human's {@link ToolApprovalDecision} back to the awaiting runner callback.
21
+ * (EXT-9 Phase B2): the {@link @gaunt-sloth/core!core/types.PendingToolInterrupt | PendingToolInterrupt} the runner suspended on, plus a `resolve`
22
+ * that hands the human's {@link @gaunt-sloth/core!core/types.ToolApprovalDecision | ToolApprovalDecision} back to the awaiting runner callback.
20
23
  * Idempotent — calling `resolve` more than once is a no-op (the first decision wins).
21
24
  *
22
- * [[EXT-150]] — **`resolve` answers back.** It returns the {@link ApprovalOutcome} the runner
25
+ * [[EXT-150]] — **`resolve` answers back.** It returns the {@link @gaunt-sloth/core!core/types.ApprovalOutcome | ApprovalOutcome} the runner
23
26
  * reports once it has recorded the answer, which is the only way this surface can learn whether an
24
27
  * `always` reached the project file: [[EXT-149]] decides that inside the runner, after the decision
25
28
  * has already been handed back. `null` means no outcome will arrive — the session ended with the
@@ -35,8 +38,8 @@ export interface PendingApproval {
35
38
  }
36
39
  /**
37
40
  * [[TUI-C68]] §6.1 — one in-flight **attack halt** bridged from the runner into the mounted
38
- * `<App>`: the {@link PendingAttackHalt} the rater produced, plus a `resolve` that hands the
39
- * human's {@link AttackHaltAnswer} back to the awaiting runner callback. Idempotent, like
41
+ * `<App>`: the {@link @gaunt-sloth/core!core/types.PendingAttackHalt | PendingAttackHalt} the rater produced, plus a `resolve` that hands the
42
+ * human's {@link @gaunt-sloth/core!core/types.AttackHaltAnswer | AttackHaltAnswer} back to the awaiting runner callback. Idempotent, like
40
43
  * {@link PendingApproval} — the first answer wins.
41
44
  *
42
45
  * Deliberately NOT a {@link PendingApproval} with a special decision. The banner is a different
@@ -50,7 +53,7 @@ export interface PendingAttackBanner {
50
53
  /**
51
54
  * The minimal agent surface the Ink `<App>` drives. Decoupling the component from
52
55
  * `GthAgentRunner` keeps the UI unit-testable with a scripted fake (a generator that
53
- * yields {@link AgentStreamEvent}s) — see the component spec.
56
+ * yields {@link @gaunt-sloth/core!core/types.AgentStreamEvent | AgentStreamEvent}s) — see the component spec.
54
57
  */
55
58
  export interface TuiAgent {
56
59
  /** Run one user turn, yielding typed events; aborts when `signal` fires (Esc). */
@@ -66,6 +69,26 @@ export interface TuiAgent {
66
69
  * nothing, exactly as it did before.
67
70
  */
68
71
  getTerminationReason?(): GthTerminationReason | null;
72
+ /**
73
+ * [[EXT-158]] — the checklist work the turn that just ended left outstanding, or `null`.
74
+ *
75
+ * Read alongside {@link getTerminationReason} and for the same reason it is not an event: a
76
+ * value read after the stream is done is the only thing an abandoned turn can still answer.
77
+ *
78
+ * Optional, so the scripted fixture agent may omit it.
79
+ */
80
+ getOutstandingWork?(): GthOutstandingWork | null;
81
+ /**
82
+ * [[EXT-178]] — ask for an end-of-run recap of the turn that just ended, or `null`.
83
+ *
84
+ * The one method on this interface that may contact a model, and the only one that is awaited
85
+ * after the turn is already over. It answers `null` without contacting anything whenever the
86
+ * user's `recap` rung is `off` (the default) or the turn did not end at `completed`, so the App
87
+ * may always call it.
88
+ *
89
+ * It never continues the run — see `GthAgentRunner.requestRunRecap`, which this delegates to.
90
+ */
91
+ requestRunRecap?(reason: GthTerminationReason | null): Promise<GthRunRecap | null>;
69
92
  /**
70
93
  * Reset the agent's conversation thread so subsequent turns start from an empty model
71
94
  * context — wired to the TUI's `/clear`, which only clears the on-screen transcript.
@@ -77,7 +100,7 @@ export interface TuiAgent {
77
100
  * the App can render a state-aware notice and the status-bar badge. Wired to `/approvals
78
101
  * <rung>`. Optional so the fixture agent (no runner) may omit it.
79
102
  *
80
- * It returns the landed {@link ResolvedApprovals} rather than the requested rung so the copy
103
+ * It returns the landed {@link @gaunt-sloth/core!config/shell-policy.ResolvedApprovals | ResolvedApprovals} rather than the requested rung so the copy
81
104
  * can only ever describe the posture actually in force.
82
105
  */
83
106
  setApprovalRung?(rung: ApprovalRung): ResolvedApprovals;
@@ -204,6 +227,7 @@ export type TranscriptItem = {
204
227
  id: number;
205
228
  level: string;
206
229
  text: string;
230
+ raw?: string;
207
231
  } | {
208
232
  kind: 'notice';
209
233
  id: number;
@@ -360,6 +384,20 @@ export interface TuiAppProps {
360
384
  * so the readline/AG-UI paths and the fixture agent (which have no such sink) simply omit it.
361
385
  */
362
386
  subscribeDebug?: (cb: (capture: TuiDebugCapture) => void) => () => void;
387
+ /**
388
+ * [[TUI-C27]] — read the approvals gate's record of this session's gated tool calls, for the
389
+ * `/debug` panel's **Auto-mode** tab.
390
+ *
391
+ * **A getter rather than a subscription, because the case the tab exists for emits nothing.** A
392
+ * call the rater approves on its first rating relays no event to any surface — the tool simply
393
+ * runs — so a push bridge would carry the refusals and negotiations and silently miss exactly the
394
+ * decision this instrumentation was filed over. The panel therefore pulls, reading the live
395
+ * `ApprovalCaptureLog` snapshot while the tab is on screen.
396
+ *
397
+ * Optional, and absent is what a surface with no approvals gate means: the fixture agent and the
398
+ * AG-UI path omit it and the tab shows its empty state rather than an empty promise.
399
+ */
400
+ readApprovalCaptures?: () => readonly ApprovalDecisionCapture[];
363
401
  /**
364
402
  * Subscribe to tool-approval requests bridged from the runner (EXT-9 Phase B2): each
365
403
  * {@link PendingApproval} carries the pending `run_shell_command` interrupt and a `resolve`
@@ -24,7 +24,7 @@ export interface MouseProviderProps {
24
24
  * Wraps the live region and dispatches clicks against it.
25
25
  *
26
26
  * A region's claimed rectangle is an offset inside the frame, and the frame starts at screen row 0
27
- * (see {@link FRAME_ORIGIN_ROW}), so a claim maps to absolute screen cells with no arithmetic and
27
+ * (see `FRAME_ORIGIN_ROW`), so a claim maps to absolute screen cells with no arithmetic and
28
28
  * nothing to keep in step as the frame reflows.
29
29
  */
30
30
  export declare function MouseProvider({ subscribe, enabled, children }: MouseProviderProps): React.JSX.Element;
@@ -32,7 +32,7 @@ export function useMouseEnabled() {
32
32
  * Wraps the live region and dispatches clicks against it.
33
33
  *
34
34
  * A region's claimed rectangle is an offset inside the frame, and the frame starts at screen row 0
35
- * (see {@link FRAME_ORIGIN_ROW}), so a claim maps to absolute screen cells with no arithmetic and
35
+ * (see `FRAME_ORIGIN_ROW`), so a claim maps to absolute screen cells with no arithmetic and
36
36
  * nothing to keep in step as the frame reflows.
37
37
  */
38
38
  export function MouseProvider({ subscribe, enabled, children }) {
@@ -12,7 +12,7 @@
12
12
  */
13
13
  import { type SlothAnimation } from '@gaunt-sloth/core/core/launchBanner.js';
14
14
  export interface SlothAnimationPlayback {
15
- /** The face to draw right now — {@link RESTING_FACE} whenever nothing is playing. */
15
+ /** The face to draw right now — {@link @gaunt-sloth/core!core/launchBanner.RESTING_FACE | RESTING_FACE} whenever nothing is playing. */
16
16
  face: readonly string[];
17
17
  /** Start one animation. A call while one is already playing is ignored, never queued. */
18
18
  play: () => void;
@@ -4,7 +4,7 @@ import type { TranscriptItem } from '#src/tui/types.js';
4
4
  /**
5
5
  * Pure view-model layer for the Ink TUI.
6
6
  *
7
- * The TUI is a second consumer of {@link AgentStreamEvent} (the same typed event
7
+ * The TUI is a second consumer of {@link @gaunt-sloth/core!core/types.AgentStreamEvent | AgentStreamEvent} (the same typed event
8
8
  * contract the AG-UI SSE encoder renders); it must NOT be wired through `consoleUtils`.
9
9
  * `foldEvents` is the single source of truth for turning a stream of agent events into a
10
10
  * renderable shape, kept deliberately free of React/Ink so it is unit-testable in
@@ -188,8 +188,41 @@ export interface TurnViewModel {
188
188
  segments: TurnSegment[];
189
189
  /** True between `reasoning_start` and `reasoning_end`. */
190
190
  isReasoning: boolean;
191
+ /**
192
+ * [[EXT-92]] scope (e) — **set when this turn ended because the run threw, not because the model
193
+ * finished.**
194
+ *
195
+ * The measured defect: in the reporter's dump the turn that a shared-pool 429 killed carries 42
196
+ * completed tool calls, 3543 characters of reasoning and `text: ""` — no final message at all —
197
+ * and the user's very next words are *"what happend?"*. The error was on screen, as a free-
198
+ * floating `system` line **above** the turn, with no relationship to it; the turn itself was
199
+ * committed looking exactly like one that simply had nothing to say. A reader cannot tell those
200
+ * apart, and this field is what makes them different objects rather than two identical ones.
201
+ *
202
+ * **Why a field on the turn and not a segment.** A segment would place the mark at a point *in*
203
+ * the turn, and there is no such point: the turn did not reach one, it stopped. A segment would
204
+ * also have to be produced by `foldEvents`, which never sees the failure — errors are thrown, not
205
+ * streamed, so there is no event to fold — and adding a kind it cannot produce would put a case
206
+ * in five renderers that only one writer can ever reach. The fact belongs to the turn as a whole,
207
+ * it has exactly one writer (the catch that ends the run), and this is the shape that says so.
208
+ *
209
+ * Set only at commit time, so a live turn never carries it; `foldEvents` neither reads nor writes
210
+ * it.
211
+ */
212
+ endedInError?: boolean;
191
213
  }
192
214
  export declare const initialTurnViewModel: () => TurnViewModel;
215
+ /**
216
+ * [[EXT-92]] scope (e) — the line drawn on a turn whose run ended in an error.
217
+ *
218
+ * One exported string because two things draw from it: the renderer paints it and the row
219
+ * estimator counts it, and an estimator with its own copy of the wording is how the two come
220
+ * apart. It says **incomplete** rather than naming the condition: the condition is already stated,
221
+ * accurately and in the provider's own words, by the error item and the termination notice that
222
+ * bracket this turn. What only the turn can say is that the work above it stopped early — which is
223
+ * the question the reporter asked and nothing on screen answered.
224
+ */
225
+ export declare const TURN_ENDED_IN_ERROR_MARK = "\u26A0 This turn ended in an error \u2014 the work above it is incomplete.";
193
226
  /** Every tool call the turn made, in first-seen order — derived, never stored. */
194
227
  export declare function turnToolCalls(turn: TurnViewModel): ToolCallViewModel[];
195
228
  /**
@@ -211,7 +244,7 @@ export declare function turnText(turn: TurnViewModel): string;
211
244
  */
212
245
  export declare function turnReasoning(turn: TurnViewModel): string;
213
246
  /**
214
- * Reduce one {@link AgentStreamEvent} into the turn view-model. Pure and immutable:
247
+ * Reduce one {@link @gaunt-sloth/core!core/types.AgentStreamEvent | AgentStreamEvent} into the turn view-model. Pure and immutable:
215
248
  * always returns a new object on change so React can rely on reference equality.
216
249
  */
217
250
  export declare function foldEvents(state: TurnViewModel, event: AgentStreamEvent): TurnViewModel;
@@ -242,7 +275,7 @@ export interface SubagentTreeViewModel {
242
275
  }
243
276
  export declare const initialSubagentTree: () => SubagentTreeViewModel;
244
277
  /**
245
- * Fold one {@link AgentStreamEvent} into the subagent tree. Only `task` tool calls
278
+ * Fold one {@link @gaunt-sloth/core!core/types.AgentStreamEvent | AgentStreamEvent} into the subagent tree. Only `task` tool calls
246
279
  * are tracked; every other event passes through untouched (so the same stream can
247
280
  * be folded into both the turn view-model and this tree independently). Because
248
281
  * `tool_args` for `task` are streamed as JSON deltas, we accumulate the raw text on
@@ -283,7 +316,12 @@ export type ChecklistItemStatus = 'pending' | 'in_progress' | 'completed';
283
316
  /** One checklist row parsed from a `gth_checklist` tool call's args. */
284
317
  export interface ChecklistItemViewModel {
285
318
  /**
286
- * The row's text, **already neutralised and safe to paint verbatim**.
319
+ * The row's text, **already redacted and neutralised, and safe to paint verbatim**.
320
+ *
321
+ * Redaction is the half a reader is most likely to think belongs elsewhere. It does not: the row
322
+ * is painted on the panel closest to the prompt, and a plan step mentioning a key or a token is
323
+ * ordinary model output rather than an attack. The generic tool panel treats that case, and a
324
+ * row reaching this type untreated would be the one surface that does not.
287
325
  *
288
326
  * This is a model-written string — under prompt injection, attacker-chosen — and the panel it
289
327
  * feeds is pinned directly above the input dock, closer to the prompt than anything else on the
@@ -300,16 +338,30 @@ export interface ChecklistItemViewModel {
300
338
  }
301
339
  /**
302
340
  * Best-effort parse of a (possibly partial) streamed `gth_checklist` args JSON into rows. Mirrors
303
- * {@link parseTaskArgs}: a half-streamed or malformed buffer never throws — it returns `null` so
341
+ * `parseTaskArgs`: a half-streamed or malformed buffer never throws — it returns `null` so
304
342
  * the renderer keeps showing the last good state (or falls back to the generic tool panel).
305
343
  *
306
- * **Every row's text is neutralised here**, with the same shared helper the tool-display and
307
- * approval paths use, so control characters and ANSI reach the screen as printable escapes instead
308
- * of as instructions to the terminal. It sits on the producer rather than at the panel because this
309
- * is the only place checklist rows are made: a renderer rewritten around a different layout inherits
310
- * the guard, and there is no second call site for someone to forget. `status` needs no treatment —
311
- * it is accepted only when it matches one of three literals — and the glyphs and header the panel
312
- * draws around the text are the renderer's own constants.
344
+ * **Every row's text is redacted and then neutralised here**, with the same shared helpers the
345
+ * tool-display and approval paths use: secrets become the withheld marker, and control characters
346
+ * and ANSI reach the screen as printable escapes instead of as instructions to the terminal. Both
347
+ * sit on the producer rather than at the panel because this is the only place checklist rows are
348
+ * made: a renderer rewritten around a different layout inherits them, and there is no second call
349
+ * site for someone to forget. `status` needs no treatment — it is accepted only when it matches one
350
+ * of three literals — and the glyphs and header the panel draws around the text are the renderer's
351
+ * own constants.
352
+ *
353
+ * **The order of the two is load-bearing and is not a style choice.** Redaction runs on the RAW
354
+ * string. Neutralisation rewrites every control character to a printable escape, so a configured
355
+ * literal secret whose value carries one stops matching the instant it is rewritten — redacting
356
+ * second would leave that secret on screen while still passing any test written with a clean
357
+ * provider-shaped key, because the provider patterns anchor on printable ASCII that neutralisation
358
+ * never touches. This is the same ordering, for the same reason, that the generic tool panel
359
+ * states at `formatParamValue`.
360
+ *
361
+ * Redaction is the checklist's most ordinary hazard rather than its most hostile one: this panel is
362
+ * pinned directly above the input dock, and a model writing a plan step that mentions a key or a
363
+ * token is doing something entirely normal. The generic tool panel one row away already treats
364
+ * exactly that.
313
365
  */
314
366
  export declare function parseChecklistArgs(argsText: string): ChecklistItemViewModel[] | null;
315
367
  /**
@@ -1,4 +1,5 @@
1
1
  import { neutralizeUntrustedText } from '@gaunt-sloth/core/core/shell/framing.js';
2
+ import { redactForToolDisplay } from '@gaunt-sloth/core/core/toolDisplay.js';
2
3
  /** The hint the collapsed outcome line carries, naming the affordance that opens the detail. */
3
4
  export const APPROVAL_OUTCOME_EXPAND_HINT = ' (Ctrl+T for the request)';
4
5
  /**
@@ -57,6 +58,17 @@ export const initialTurnViewModel = () => ({
57
58
  segments: [],
58
59
  isReasoning: false,
59
60
  });
61
+ /**
62
+ * [[EXT-92]] scope (e) — the line drawn on a turn whose run ended in an error.
63
+ *
64
+ * One exported string because two things draw from it: the renderer paints it and the row
65
+ * estimator counts it, and an estimator with its own copy of the wording is how the two come
66
+ * apart. It says **incomplete** rather than naming the condition: the condition is already stated,
67
+ * accurately and in the provider's own words, by the error item and the termination notice that
68
+ * bracket this turn. What only the turn can say is that the work above it stopped early — which is
69
+ * the question the reporter asked and nothing on screen answered.
70
+ */
71
+ export const TURN_ENDED_IN_ERROR_MARK = '⚠ This turn ended in an error — the work above it is incomplete.';
60
72
  /** Every tool call the turn made, in first-seen order — derived, never stored. */
61
73
  export function turnToolCalls(turn) {
62
74
  const out = [];
@@ -141,7 +153,7 @@ function upsertTool(segments, id, patch) {
141
153
  return next;
142
154
  }
143
155
  /**
144
- * Reduce one {@link AgentStreamEvent} into the turn view-model. Pure and immutable:
156
+ * Reduce one {@link @gaunt-sloth/core!core/types.AgentStreamEvent | AgentStreamEvent} into the turn view-model. Pure and immutable:
145
157
  * always returns a new object on change so React can rely on reference equality.
146
158
  */
147
159
  export function foldEvents(state, event) {
@@ -298,7 +310,7 @@ function upsertSubagent(nodes, id, patch) {
298
310
  return next;
299
311
  }
300
312
  /**
301
- * Fold one {@link AgentStreamEvent} into the subagent tree. Only `task` tool calls
313
+ * Fold one {@link @gaunt-sloth/core!core/types.AgentStreamEvent | AgentStreamEvent} into the subagent tree. Only `task` tool calls
302
314
  * are tracked; every other event passes through untouched (so the same stream can
303
315
  * be folded into both the turn view-model and this tree independently). Because
304
316
  * `tool_args` for `task` are streamed as JSON deltas, we accumulate the raw text on
@@ -427,16 +439,30 @@ export function displaySegments(turn) {
427
439
  }
428
440
  /**
429
441
  * Best-effort parse of a (possibly partial) streamed `gth_checklist` args JSON into rows. Mirrors
430
- * {@link parseTaskArgs}: a half-streamed or malformed buffer never throws — it returns `null` so
442
+ * `parseTaskArgs`: a half-streamed or malformed buffer never throws — it returns `null` so
431
443
  * the renderer keeps showing the last good state (or falls back to the generic tool panel).
432
444
  *
433
- * **Every row's text is neutralised here**, with the same shared helper the tool-display and
434
- * approval paths use, so control characters and ANSI reach the screen as printable escapes instead
435
- * of as instructions to the terminal. It sits on the producer rather than at the panel because this
436
- * is the only place checklist rows are made: a renderer rewritten around a different layout inherits
437
- * the guard, and there is no second call site for someone to forget. `status` needs no treatment —
438
- * it is accepted only when it matches one of three literals — and the glyphs and header the panel
439
- * draws around the text are the renderer's own constants.
445
+ * **Every row's text is redacted and then neutralised here**, with the same shared helpers the
446
+ * tool-display and approval paths use: secrets become the withheld marker, and control characters
447
+ * and ANSI reach the screen as printable escapes instead of as instructions to the terminal. Both
448
+ * sit on the producer rather than at the panel because this is the only place checklist rows are
449
+ * made: a renderer rewritten around a different layout inherits them, and there is no second call
450
+ * site for someone to forget. `status` needs no treatment — it is accepted only when it matches one
451
+ * of three literals — and the glyphs and header the panel draws around the text are the renderer's
452
+ * own constants.
453
+ *
454
+ * **The order of the two is load-bearing and is not a style choice.** Redaction runs on the RAW
455
+ * string. Neutralisation rewrites every control character to a printable escape, so a configured
456
+ * literal secret whose value carries one stops matching the instant it is rewritten — redacting
457
+ * second would leave that secret on screen while still passing any test written with a clean
458
+ * provider-shaped key, because the provider patterns anchor on printable ASCII that neutralisation
459
+ * never touches. This is the same ordering, for the same reason, that the generic tool panel
460
+ * states at `formatParamValue`.
461
+ *
462
+ * Redaction is the checklist's most ordinary hazard rather than its most hostile one: this panel is
463
+ * pinned directly above the input dock, and a model writing a plan step that mentions a key or a
464
+ * token is doing something entirely normal. The generic tool panel one row away already treats
465
+ * exactly that.
440
466
  */
441
467
  export function parseChecklistArgs(argsText) {
442
468
  if (!argsText.trim())
@@ -459,7 +485,8 @@ export function parseChecklistArgs(argsText) {
459
485
  const status = raw.status;
460
486
  if (typeof content === 'string' &&
461
487
  (status === 'pending' || status === 'in_progress' || status === 'completed')) {
462
- rows.push({ content: neutralizeUntrustedText(content), status });
488
+ // Redact first, neutralise second — never the reverse. See this function's docblock.
489
+ rows.push({ content: neutralizeUntrustedText(redactForToolDisplay(content)), status });
463
490
  }
464
491
  }
465
492
  return rows.length ? rows : null;
@@ -1 +1 @@
1
- {"version":3,"file":"viewModel.js","sourceRoot":"","sources":["../../src/tui/viewModel.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,uBAAuB,EAAE,MAAM,yCAAyC,CAAC;AA6FlF,gGAAgG;AAChG,MAAM,CAAC,MAAM,4BAA4B,GAAG,4BAA4B,CAAC;AAEzE;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,UAAU,mBAAmB,CAAC,QAA+B,EAAE,QAAiB;IACpF,MAAM,QAAQ,GAAG,QAAQ,CAAC,QAAQ,KAAK,UAAU,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAC,CAAC,iBAAiB,CAAC;IAC1F,OAAO,KAAK,QAA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,CAAC,CAAC;QACxD,IAAI,KAAK;YAAE,OAAO,KAAK,CAAC;IAC1B,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,sBAAsB,CACpC,IAA0B,EAC1B,UAA4B;IAE5B,0DAA0D;IAC1D,IAAI,IAAI,EAAE,CAAC;QACT,MAAM,KAAK,GAAG,iBAAiB,CAAC,IAAI,CAAC,CAAC;QACtC,IAAI,KAAK;YAAE,OAAO,KAAK,CAAC;IAC1B,CAAC;IAED,gDAAgD;IAChD,KAAK,IAAI,CAAC,GAAG,UAAU,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;QAChD,MAAM,IAAI,GAAG,UAAU,CAAC,CAAC,CAAC,CAAC;QAC3B,IAAI,IAAI,CAAC,IAAI,KAAK,WAAW;YAAE,SAAS;QACxC,MAAM,KAAK,GAAG,iBAAiB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC3C,IAAI,KAAK;YAAE,OAAO,KAAK,CAAC;IAC1B,CAAC;IAED,OAAO,IAAI,CAAC;AACd,CAAC"}
@@ -36,9 +36,17 @@ export declare function handleConfigDiscoveryError(error: unknown): error is Con
36
36
  /**
37
37
  * Wrap a commander program so an unusable configuration terminates the CLI cleanly.
38
38
  *
39
- * Presented as a {@link ProgramLike} because that is the seam `readStdin` already parses through:
40
- * argument parsing is where every command action runs, so wrapping it catches the failure wherever
41
- * in the CLI it was raised, without each command growing its own try/catch. Any other rejection is
39
+ * Presented as a {@link @gaunt-sloth/core!utils/systemUtils.ProgramLike | ProgramLike} because that is the seam `readStdin` already parses through:
40
+ * argument parsing is where every command action runs, so wrapping it catches a failure that
41
+ * propagates out of one, without each command growing its own try/catch. Any other rejection is
42
42
  * re-thrown unchanged, leaving it in exactly the position it occupied before.
43
+ *
44
+ * It is NOT the termination point for every `ConfigDiscoveryError` the CLI can raise, and
45
+ * reading it as one is how a claim about user-facing output gets made without measuring it. A
46
+ * command action that handles its own failures ends the run before this wrapper sees anything: the
47
+ * single-shot runtime catches everything `GthAgentRunner.init` throws and renders it as the run's
48
+ * last line, so EXT-186's refusal of a config that defines no model reaches a person there, not
49
+ * here. What reaches this guard is a failure raised while the config is being loaded — before any
50
+ * command's own error handling is in play — which is where the loader raises.
43
51
  */
44
52
  export declare function guardProgramConfigErrors(program: ProgramLike): ProgramLike;
@@ -51,10 +51,18 @@ export function handleConfigDiscoveryError(error) {
51
51
  /**
52
52
  * Wrap a commander program so an unusable configuration terminates the CLI cleanly.
53
53
  *
54
- * Presented as a {@link ProgramLike} because that is the seam `readStdin` already parses through:
55
- * argument parsing is where every command action runs, so wrapping it catches the failure wherever
56
- * in the CLI it was raised, without each command growing its own try/catch. Any other rejection is
54
+ * Presented as a {@link @gaunt-sloth/core!utils/systemUtils.ProgramLike | ProgramLike} because that is the seam `readStdin` already parses through:
55
+ * argument parsing is where every command action runs, so wrapping it catches a failure that
56
+ * propagates out of one, without each command growing its own try/catch. Any other rejection is
57
57
  * re-thrown unchanged, leaving it in exactly the position it occupied before.
58
+ *
59
+ * It is NOT the termination point for every `ConfigDiscoveryError` the CLI can raise, and
60
+ * reading it as one is how a claim about user-facing output gets made without measuring it. A
61
+ * command action that handles its own failures ends the run before this wrapper sees anything: the
62
+ * single-shot runtime catches everything `GthAgentRunner.init` throws and renders it as the run's
63
+ * last line, so EXT-186's refusal of a config that defines no model reaches a person there, not
64
+ * here. What reaches this guard is a failure raised while the config is being loaded — before any
65
+ * command's own error handling is in play — which is where the loader raises.
58
66
  */
59
67
  export function guardProgramConfigErrors(program) {
60
68
  return {
@@ -1 +1 @@
1
- {"version":3,"file":"configErrorGuard.js","sourceRoot":"","sources":["../../src/utils/configErrorGuard.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,sBAAsB,EACtB,yBAAyB,GAG1B,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,YAAY,EAAE,MAAM,yCAAyC,CAAC;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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gaunt-sloth",
3
- "version": "2.0.0-beta.12",
3
+ "version": "2.0.0-beta.13",
4
4
  "description": "",
5
5
  "license": "MIT",
6
6
  "author": "Andrew Kondratev",
@@ -44,11 +44,11 @@
44
44
  "@langchain/xai": "^1.4.13",
45
45
  "commander": "^15.0.0",
46
46
  "zod": "^4.6.3",
47
- "@gaunt-sloth/batch": "2.0.0-beta.12",
48
- "@gaunt-sloth/review": "2.0.0-beta.12",
47
+ "@gaunt-sloth/agent": "2.0.0-beta.13",
48
+ "@gaunt-sloth/batch": "2.0.0-beta.13",
49
+ "@gaunt-sloth/core": "2.0.0-beta.13",
49
50
  "@gaunt-sloth/eval-reporter-junit": "0.1.0",
50
- "@gaunt-sloth/agent": "2.0.0-beta.12",
51
- "@gaunt-sloth/core": "2.0.0-beta.12"
51
+ "@gaunt-sloth/review": "2.0.0-beta.13"
52
52
  },
53
53
  "optionalDependencies": {
54
54
  "chalk": "^6.0.0",