@wrongstack/tui 0.284.1 → 0.285.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 (239) hide show
  1. package/dist/app-initial-state.d.ts +26 -0
  2. package/dist/app-initial-state.d.ts.map +1 -0
  3. package/dist/app-reducer.d.ts +5 -0
  4. package/dist/app-reducer.d.ts.map +1 -0
  5. package/dist/app-state.d.ts +1801 -0
  6. package/dist/app-state.d.ts.map +1 -0
  7. package/dist/app.d.ts +579 -0
  8. package/dist/app.d.ts.map +1 -0
  9. package/dist/clipboard.d.ts +2 -0
  10. package/dist/clipboard.d.ts.map +1 -0
  11. package/dist/components/agents-monitor.d.ts +49 -0
  12. package/dist/components/agents-monitor.d.ts.map +1 -0
  13. package/dist/components/animation-style.d.ts +51 -0
  14. package/dist/components/animation-style.d.ts.map +1 -0
  15. package/dist/components/audit-panel.d.ts +9 -0
  16. package/dist/components/audit-panel.d.ts.map +1 -0
  17. package/dist/components/auth-panel-model.d.ts +150 -0
  18. package/dist/components/auth-panel-model.d.ts.map +1 -0
  19. package/dist/components/auth-panel.d.ts +8 -0
  20. package/dist/components/auth-panel.d.ts.map +1 -0
  21. package/dist/components/autonomy-picker.d.ts +15 -0
  22. package/dist/components/autonomy-picker.d.ts.map +1 -0
  23. package/dist/components/brain-decision-prompt.d.ts +28 -0
  24. package/dist/components/brain-decision-prompt.d.ts.map +1 -0
  25. package/dist/components/brain-panel.d.ts +16 -0
  26. package/dist/components/brain-panel.d.ts.map +1 -0
  27. package/dist/components/checkpoint-timeline.d.ts +19 -0
  28. package/dist/components/checkpoint-timeline.d.ts.map +1 -0
  29. package/dist/components/confirm-prompt.d.ts +26 -0
  30. package/dist/components/confirm-prompt.d.ts.map +1 -0
  31. package/dist/components/continue-confirm-panel.d.ts +47 -0
  32. package/dist/components/continue-confirm-panel.d.ts.map +1 -0
  33. package/dist/components/coordinator-panel.d.ts +11 -0
  34. package/dist/components/coordinator-panel.d.ts.map +1 -0
  35. package/dist/components/design-picker.d.ts +14 -0
  36. package/dist/components/design-picker.d.ts.map +1 -0
  37. package/dist/components/enhance-panel.d.ts +36 -0
  38. package/dist/components/enhance-panel.d.ts.map +1 -0
  39. package/dist/components/esc-confirm-prompt.d.ts +17 -0
  40. package/dist/components/esc-confirm-prompt.d.ts.map +1 -0
  41. package/dist/components/f-key-picker.d.ts +13 -0
  42. package/dist/components/f-key-picker.d.ts.map +1 -0
  43. package/dist/components/file-picker.d.ts +8 -0
  44. package/dist/components/file-picker.d.ts.map +1 -0
  45. package/dist/components/fleet-monitor.d.ts +60 -0
  46. package/dist/components/fleet-monitor.d.ts.map +1 -0
  47. package/dist/components/fleet-panel.d.ts +69 -0
  48. package/dist/components/fleet-panel.d.ts.map +1 -0
  49. package/dist/components/goal-panel.d.ts +17 -0
  50. package/dist/components/goal-panel.d.ts.map +1 -0
  51. package/dist/components/help-overlay.d.ts +27 -0
  52. package/dist/components/help-overlay.d.ts.map +1 -0
  53. package/dist/components/help-panel.d.ts +16 -0
  54. package/dist/components/help-panel.d.ts.map +1 -0
  55. package/dist/components/history/assistant.d.ts +61 -0
  56. package/dist/components/history/assistant.d.ts.map +1 -0
  57. package/dist/components/history/banner.d.ts +13 -0
  58. package/dist/components/history/banner.d.ts.map +1 -0
  59. package/dist/components/history/code-block.d.ts +217 -0
  60. package/dist/components/history/code-block.d.ts.map +1 -0
  61. package/dist/components/history/entry.d.ts +19 -0
  62. package/dist/components/history/entry.d.ts.map +1 -0
  63. package/dist/components/history/index.d.ts +21 -0
  64. package/dist/components/history/index.d.ts.map +1 -0
  65. package/dist/components/history/replay.d.ts +44 -0
  66. package/dist/components/history/replay.d.ts.map +1 -0
  67. package/dist/components/history/types.d.ts +146 -0
  68. package/dist/components/history/types.d.ts.map +1 -0
  69. package/dist/components/history/utils.d.ts +65 -0
  70. package/dist/components/history/utils.d.ts.map +1 -0
  71. package/dist/components/history.d.ts +2 -0
  72. package/dist/components/history.d.ts.map +1 -0
  73. package/dist/components/input.d.ts +57 -0
  74. package/dist/components/input.d.ts.map +1 -0
  75. package/dist/components/kanban-panel.d.ts +7 -0
  76. package/dist/components/kanban-panel.d.ts.map +1 -0
  77. package/dist/components/key-hint-bar.d.ts +31 -0
  78. package/dist/components/key-hint-bar.d.ts.map +1 -0
  79. package/dist/components/live-activity-strip.d.ts +39 -0
  80. package/dist/components/live-activity-strip.d.ts.map +1 -0
  81. package/dist/components/mailbox-panel.d.ts +40 -0
  82. package/dist/components/mailbox-panel.d.ts.map +1 -0
  83. package/dist/components/mcp-picker.d.ts +18 -0
  84. package/dist/components/mcp-picker.d.ts.map +1 -0
  85. package/dist/components/mode-picker.d.ts +17 -0
  86. package/dist/components/mode-picker.d.ts.map +1 -0
  87. package/dist/components/model-picker.d.ts +32 -0
  88. package/dist/components/model-picker.d.ts.map +1 -0
  89. package/dist/components/phase-monitor.d.ts +33 -0
  90. package/dist/components/phase-monitor.d.ts.map +1 -0
  91. package/dist/components/phase-panel.d.ts +22 -0
  92. package/dist/components/phase-panel.d.ts.map +1 -0
  93. package/dist/components/plan-panel.d.ts +17 -0
  94. package/dist/components/plan-panel.d.ts.map +1 -0
  95. package/dist/components/plugin-picker.d.ts +22 -0
  96. package/dist/components/plugin-picker.d.ts.map +1 -0
  97. package/dist/components/process-list.d.ts +14 -0
  98. package/dist/components/process-list.d.ts.map +1 -0
  99. package/dist/components/project-picker.d.ts +21 -0
  100. package/dist/components/project-picker.d.ts.map +1 -0
  101. package/dist/components/prompt-picker.d.ts +31 -0
  102. package/dist/components/prompt-picker.d.ts.map +1 -0
  103. package/dist/components/provider-colors.d.ts +40 -0
  104. package/dist/components/provider-colors.d.ts.map +1 -0
  105. package/dist/components/queue-panel.d.ts +16 -0
  106. package/dist/components/queue-panel.d.ts.map +1 -0
  107. package/dist/components/resume-picker.d.ts +16 -0
  108. package/dist/components/resume-picker.d.ts.map +1 -0
  109. package/dist/components/scrollable-history.d.ts +60 -0
  110. package/dist/components/scrollable-history.d.ts.map +1 -0
  111. package/dist/components/sdd-board-overlay.d.ts +15 -0
  112. package/dist/components/sdd-board-overlay.d.ts.map +1 -0
  113. package/dist/components/send-mode-picker.d.ts +64 -0
  114. package/dist/components/send-mode-picker.d.ts.map +1 -0
  115. package/dist/components/sessions-panel.d.ts +46 -0
  116. package/dist/components/sessions-panel.d.ts.map +1 -0
  117. package/dist/components/settings-picker.d.ts +371 -0
  118. package/dist/components/settings-picker.d.ts.map +1 -0
  119. package/dist/components/shadow-panel.d.ts +13 -0
  120. package/dist/components/shadow-panel.d.ts.map +1 -0
  121. package/dist/components/shell-command-warning.d.ts +9 -0
  122. package/dist/components/shell-command-warning.d.ts.map +1 -0
  123. package/dist/components/slash-menu.d.ts +9 -0
  124. package/dist/components/slash-menu.d.ts.map +1 -0
  125. package/dist/components/status-bar.d.ts +378 -0
  126. package/dist/components/status-bar.d.ts.map +1 -0
  127. package/dist/components/statusline-picker.d.ts +55 -0
  128. package/dist/components/statusline-picker.d.ts.map +1 -0
  129. package/dist/components/suggestions.d.ts +9 -0
  130. package/dist/components/suggestions.d.ts.map +1 -0
  131. package/dist/components/todos-monitor.d.ts +13 -0
  132. package/dist/components/todos-monitor.d.ts.map +1 -0
  133. package/dist/components/tools-picker.d.ts +20 -0
  134. package/dist/components/tools-picker.d.ts.map +1 -0
  135. package/dist/components/worktree-monitor.d.ts +23 -0
  136. package/dist/components/worktree-monitor.d.ts.map +1 -0
  137. package/dist/components/worktree-panel.d.ts +21 -0
  138. package/dist/components/worktree-panel.d.ts.map +1 -0
  139. package/dist/f-key-panels.d.ts +46 -0
  140. package/dist/f-key-panels.d.ts.map +1 -0
  141. package/dist/file-search.d.ts +3 -0
  142. package/dist/file-search.d.ts.map +1 -0
  143. package/dist/fn-keys.d.ts +20 -0
  144. package/dist/fn-keys.d.ts.map +1 -0
  145. package/dist/git-info.d.ts +20 -0
  146. package/dist/git-info.d.ts.map +1 -0
  147. package/dist/heap-watchdog.d.ts +41 -0
  148. package/dist/heap-watchdog.d.ts.map +1 -0
  149. package/dist/highlight.d.ts +30 -0
  150. package/dist/highlight.d.ts.map +1 -0
  151. package/dist/hit-test.d.ts +75 -0
  152. package/dist/hit-test.d.ts.map +1 -0
  153. package/dist/hooks/use-auth-panel.d.ts +38 -0
  154. package/dist/hooks/use-auth-panel.d.ts.map +1 -0
  155. package/dist/hooks/use-autonomous-coordinator.d.ts +21 -0
  156. package/dist/hooks/use-autonomous-coordinator.d.ts.map +1 -0
  157. package/dist/hooks/use-brain-events.d.ts +7 -0
  158. package/dist/hooks/use-brain-events.d.ts.map +1 -0
  159. package/dist/hooks/use-director-fleet-bridge.d.ts +17 -0
  160. package/dist/hooks/use-director-fleet-bridge.d.ts.map +1 -0
  161. package/dist/hooks/use-file-search.d.ts +42 -0
  162. package/dist/hooks/use-file-search.d.ts.map +1 -0
  163. package/dist/hooks/use-input-history-persistence.d.ts +14 -0
  164. package/dist/hooks/use-input-history-persistence.d.ts.map +1 -0
  165. package/dist/hooks/use-mode-picker.d.ts +15 -0
  166. package/dist/hooks/use-mode-picker.d.ts.map +1 -0
  167. package/dist/hooks/use-paste-handling.d.ts +30 -0
  168. package/dist/hooks/use-paste-handling.d.ts.map +1 -0
  169. package/dist/hooks/use-picker-keys.d.ts +58 -0
  170. package/dist/hooks/use-picker-keys.d.ts.map +1 -0
  171. package/dist/hooks/use-prompt-picker.d.ts +28 -0
  172. package/dist/hooks/use-prompt-picker.d.ts.map +1 -0
  173. package/dist/hooks/use-queue-manager.d.ts +26 -0
  174. package/dist/hooks/use-queue-manager.d.ts.map +1 -0
  175. package/dist/hooks/use-statusline-hidden-sync.d.ts +14 -0
  176. package/dist/hooks/use-statusline-hidden-sync.d.ts.map +1 -0
  177. package/dist/hooks/use-statusline-state.d.ts +44 -0
  178. package/dist/hooks/use-statusline-state.d.ts.map +1 -0
  179. package/dist/hooks/use-stream-chip-expiration.d.ts +25 -0
  180. package/dist/hooks/use-stream-chip-expiration.d.ts.map +1 -0
  181. package/dist/hooks/use-subagent-events.d.ts +8 -0
  182. package/dist/hooks/use-subagent-events.d.ts.map +1 -0
  183. package/dist/hooks/use-token-counter-refresh.d.ts +30 -0
  184. package/dist/hooks/use-token-counter-refresh.d.ts.map +1 -0
  185. package/dist/hooks/use-tui-controllers.d.ts +31 -0
  186. package/dist/hooks/use-tui-controllers.d.ts.map +1 -0
  187. package/dist/hooks/use-tui-event-bridge.d.ts +29 -0
  188. package/dist/hooks/use-tui-event-bridge.d.ts.map +1 -0
  189. package/dist/hooks/use-working-dir-chip.d.ts +8 -0
  190. package/dist/hooks/use-working-dir-chip.d.ts.map +1 -0
  191. package/dist/index.d.ts +11 -910
  192. package/dist/index.d.ts.map +1 -0
  193. package/dist/index.js +2633 -2188
  194. package/dist/index.js.map +7 -1
  195. package/dist/ink.d.ts +20 -0
  196. package/dist/ink.d.ts.map +1 -0
  197. package/dist/input-editing.d.ts +76 -0
  198. package/dist/input-editing.d.ts.map +1 -0
  199. package/dist/input-tokens.d.ts +65 -0
  200. package/dist/input-tokens.d.ts.map +1 -0
  201. package/dist/kill-slash.d.ts +3 -0
  202. package/dist/kill-slash.d.ts.map +1 -0
  203. package/dist/markdown-table.d.ts +45 -0
  204. package/dist/markdown-table.d.ts.map +1 -0
  205. package/dist/markdown.d.ts +47 -0
  206. package/dist/markdown.d.ts.map +1 -0
  207. package/dist/mouse.d.ts +73 -0
  208. package/dist/mouse.d.ts.map +1 -0
  209. package/dist/on-panel-open.d.ts +62 -0
  210. package/dist/on-panel-open.d.ts.map +1 -0
  211. package/dist/paste-accumulator.d.ts +19 -0
  212. package/dist/paste-accumulator.d.ts.map +1 -0
  213. package/dist/ps-slash.d.ts +7 -0
  214. package/dist/ps-slash.d.ts.map +1 -0
  215. package/dist/queue-slash.d.ts +24 -0
  216. package/dist/queue-slash.d.ts.map +1 -0
  217. package/dist/reducers/fleet.d.ts +16 -0
  218. package/dist/reducers/fleet.d.ts.map +1 -0
  219. package/dist/reducers/helpers.d.ts +38 -0
  220. package/dist/reducers/helpers.d.ts.map +1 -0
  221. package/dist/rehydrate-history.d.ts +40 -0
  222. package/dist/rehydrate-history.d.ts.map +1 -0
  223. package/dist/run-tui.d.ts +507 -0
  224. package/dist/run-tui.d.ts.map +1 -0
  225. package/dist/slash-command-search.d.ts +10 -0
  226. package/dist/slash-command-search.d.ts.map +1 -0
  227. package/dist/steering-preamble.d.ts +25 -0
  228. package/dist/steering-preamble.d.ts.map +1 -0
  229. package/dist/submit-history.d.ts +17 -0
  230. package/dist/submit-history.d.ts.map +1 -0
  231. package/dist/terminal-title.d.ts +12 -0
  232. package/dist/terminal-title.d.ts.map +1 -0
  233. package/dist/theme.d.ts +91 -0
  234. package/dist/theme.d.ts.map +1 -0
  235. package/dist/thinking-word.d.ts +26 -0
  236. package/dist/thinking-word.d.ts.map +1 -0
  237. package/dist/tool-glyph.d.ts +18 -0
  238. package/dist/tool-glyph.d.ts.map +1 -0
  239. package/package.json +8 -9
@@ -0,0 +1,13 @@
1
+ import type React from 'react';
2
+ export { F_KEY_PANEL_ENTRIES as F_KEY_ENTRIES } from '../f-key-panels.js';
3
+ export type { FKeyPanelEntry as FKeyEntry } from '../f-key-panels.js';
4
+ export interface FKeyPickerProps {
5
+ selected: number;
6
+ }
7
+ /**
8
+ * Keyboard-navigable F-key panel picker.
9
+ * Shown when the user types `/f` in the TUI.
10
+ * Arrow keys navigate, Enter opens the selected panel, Esc closes.
11
+ */
12
+ export declare function FKeyPicker({ selected }: FKeyPickerProps): React.ReactElement;
13
+ //# sourceMappingURL=f-key-picker.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"f-key-picker.d.ts","sourceRoot":"","sources":["../../src/components/f-key-picker.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,EAAE,mBAAmB,IAAI,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAC1E,YAAY,EAAE,cAAc,IAAI,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAEtE,MAAM,WAAW,eAAe;IAC9B,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,EAAE,QAAQ,EAAE,EAAE,eAAe,GAAG,KAAK,CAAC,YAAY,CAoC5E"}
@@ -0,0 +1,8 @@
1
+ import type React from 'react';
2
+ export interface FilePickerProps {
3
+ query: string;
4
+ matches: string[];
5
+ selected: number;
6
+ }
7
+ export declare function FilePicker({ query, matches, selected }: FilePickerProps): React.ReactElement;
8
+ //# sourceMappingURL=file-picker.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"file-picker.d.ts","sourceRoot":"","sources":["../../src/components/file-picker.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,wBAAgB,UAAU,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE,eAAe,GAAG,KAAK,CAAC,YAAY,CAmB5F"}
@@ -0,0 +1,60 @@
1
+ import type React from 'react';
2
+ import type { FleetEntry } from '../app.js';
3
+ export interface FleetMonitorProps {
4
+ entries: Record<string, FleetEntry>;
5
+ /** Fleet-wide accumulated cost. */
6
+ totalCost: number;
7
+ /** Fleet-wide token totals, when available. */
8
+ totalTokens?: {
9
+ input: number;
10
+ output: number;
11
+ };
12
+ /** Concurrency ceiling for the gauge. */
13
+ maxConcurrent?: number | undefined;
14
+ /** 1s clock tick so elapsed times + sparklines stay live. */
15
+ nowTick: number;
16
+ /** Active or completed collaborative debugging session. */
17
+ collabSession?: {
18
+ sessionId: string | null;
19
+ bugCount: number;
20
+ planCount: number;
21
+ evalCount: number;
22
+ overallVerdict: 'approve' | 'needs_revision' | 'reject' | null;
23
+ timeline: Array<{
24
+ at: number;
25
+ icon: string;
26
+ color: string;
27
+ text: string;
28
+ }>;
29
+ startedAt: number | null;
30
+ } | null;
31
+ }
32
+ /**
33
+ * Bucket recent tool executions into a fixed number of time bins ending at
34
+ * `now`, returning a per-bin count. Drives the per-agent activity sparkline
35
+ * in the Agents (live) monitor; exported here because it was historically
36
+ * defined alongside the fleet monitor.
37
+ */
38
+ export declare function bucketActivity(recentTools: ReadonlyArray<{
39
+ at: number;
40
+ }>, now: number, bins?: number, binMs?: number): number[];
41
+ /** Render a numeric series as a unicode sparkline. */
42
+ export declare function sparkline(values: number[]): string;
43
+ /**
44
+ * Compact `provider:model` label for the monitors. Strips any `provider/`
45
+ * prefix from the model id and keeps it terminal-friendly. Returns '' when
46
+ * neither is known (e.g. a leader entry before the first request resolves).
47
+ * Shared by the Agents (Ctrl+G) and Fleet (Ctrl+F) monitors.
48
+ */
49
+ export declare function fmtModelLabel(provider?: string, model?: string): string;
50
+ /**
51
+ * Fleet orchestration dashboard (Ctrl+F). Concurrency gauge, fleet totals,
52
+ * a compact one-line-per-agent table, and a recent-events timeline. Live
53
+ * per-agent context (current tool / streaming tail) lives in the Agents
54
+ * monitor (Ctrl+G) — this view is for "how the fleet is doing overall".
55
+ *
56
+ * Prunes terminal agents older than TERMINAL_TTL_MS from the table and
57
+ * timeline to prevent unbounded growth in long-running sessions.
58
+ */
59
+ export declare function FleetMonitor({ entries, totalCost, totalTokens, maxConcurrent, nowTick, collabSession, }: FleetMonitorProps): React.ReactElement;
60
+ //# sourceMappingURL=fleet-monitor.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fleet-monitor.d.ts","sourceRoot":"","sources":["../../src/components/fleet-monitor.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAQ5C,MAAM,WAAW,iBAAiB;IAChC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;IACpC,mCA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AO,EACP,aAAa,GACd,EAAE,iBAAiB,GAAG,KAAK,CAAC,YAAY,CA2MxC"}
@@ -0,0 +1,69 @@
1
+ import type { TodoItem } from '@wrongstack/core';
2
+ import type React from 'react';
3
+ import type { FleetEntry } from '../app.js';
4
+ export interface FleetPanelProps {
5
+ /** Per-subagent state, keyed by subagentId. */
6
+ entries: Record<string, FleetEntry>;
7
+ /** Fleet-wide accumulated cost (from FleetUsageAggregator). */
8
+ totalCost: number;
9
+ /** Optional roster for resolving role ids to display names. */
10
+ roster?: Record<string, {
11
+ name: string;
12
+ }> | undefined;
13
+ /** Live leader todo board, rendered as a compact preview below the swarm. */
14
+ todos?: readonly TodoItem[] | undefined;
15
+ /** 1s clock tick so activity meters and elapsed labels stay live. */
16
+ nowTick?: number | undefined;
17
+ /** When set, the LEADER row is always shown (even when idle) with a collab session indicator. */
18
+ collabSession?: {
19
+ sessionId: string | null;
20
+ bugCount: number;
21
+ planCount: number;
22
+ evalCount: number;
23
+ } | null;
24
+ }
25
+ type SwarmColor = 'blue' | 'cyan' | 'green' | 'gray' | 'red' | 'yellow';
26
+ export interface SwarmCell {
27
+ id: string;
28
+ index: string;
29
+ meter: string;
30
+ text: string;
31
+ color: SwarmColor;
32
+ dim?: boolean | undefined;
33
+ }
34
+ export interface SwarmGrid {
35
+ columns: number;
36
+ tileWidth: number;
37
+ overflow: number;
38
+ rows: SwarmCell[][];
39
+ }
40
+ export interface TodoPreviewRow {
41
+ id: string;
42
+ marker: string;
43
+ text: string;
44
+ color: SwarmColor;
45
+ dim?: boolean | undefined;
46
+ }
47
+ export declare function truncToWidth(text: string, width: number): string;
48
+ export declare function swarmMeter(entry: FleetEntry, now: number, width?: number): string;
49
+ export declare function swarmColumnCount(width: number): number;
50
+ export declare function selectSwarmEntries(entries: Record<string, FleetEntry>, _now: number, opts?: {
51
+ includeLeader?: boolean | undefined;
52
+ }): FleetEntry[];
53
+ export declare function buildSwarmGrid(entries: Record<string, FleetEntry>, now: number, width: number, opts?: {
54
+ includeLeader?: boolean | undefined;
55
+ maxRows?: number | undefined;
56
+ roster?: Record<string, {
57
+ name: string;
58
+ }> | undefined;
59
+ }): SwarmGrid;
60
+ export declare function buildTodoPreviewRows(todos: readonly TodoItem[] | undefined, width: number, maxRows?: number): TodoPreviewRow[];
61
+ /**
62
+ * Compact fleet summary rendered below the status bar when subagents are
63
+ * active. It is intentionally separate from the F2/F3 monitors: this is the
64
+ * always-visible "what is the fleet doing right now?" strip, while those
65
+ * panels remain the detailed drill-down surfaces.
66
+ */
67
+ export declare function FleetPanel({ entries, totalCost, roster, todos, nowTick, collabSession, }: FleetPanelProps): React.ReactElement | null;
68
+ export {};
69
+ //# sourceMappingURL=fleet-panel.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fleet-panel.d.ts","sourceRoot":"","sources":["../../src/components/fleet-panel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAEjD,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAE5C,MAAM,WAAW,eAAe;IAC9B,+CAA+C;IAC/C,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;IACpC,+DAA+D;IAC/D,SAAS,EAAE,MAAM,CAAC;IAClB,+DAA+D;IAC/D,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,GAAG,SAAS,CAAC;IACtD,6EAA6E;IAC7E,KAAK,CAAC,EAAE,SAAS,QAAQ,EAAE,GAAG,SAAS,CAAC;IACxC,qEAAqE;IACrE,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC7B,iGAAiG;IACjG,aAAa,CAAC,EAAE;QACd,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;QACzB,QAAQ,EAAE,MAAM,CAAC;QACjB,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B,cAAc,CAC5B,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,UAAU,CAAC,EACnC,GAAG,EAAE,MAAM,EACX,KAAK,EAAE,MAAM,EACb,IAAI,GAAE;IACJ,aAAa,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IACpC,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC7B,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,GAAG,SAAS,CAAC;CAClD,GACL,SAAS,CAsCX;AAED,wBAAgB,oBAAoB,CAClC,KAAK,EAAE,SAAS,QAAQ,EAAE,GAAG,SAAS,EACtC,KAAK,EAAE,MAAM,EACb,OAAO,SAAI,GACV,cAAc,EAAE,CA8ClB;AAED;;;;;GAKG;AACH,wBAAgB,UAAU,CAAC,EACzB,OAAO,EACP,SAAS,EACT,MAAM,EACN,KAAK,EACL,OAAO,EACP,aAAa,GACd,EAAE,eAAe,GAAG,KAAK,CAAC,YAAY,GAAG,IAAI,CAkF7C"}
@@ -0,0 +1,17 @@
1
+ import type React from 'react';
2
+ import type { GoalSummary } from '../app-state.js';
3
+ export interface GoalPanelProps {
4
+ goal: GoalSummary;
5
+ /** Start the AutonomousCoordinator with the given goal text. */
6
+ onCoordinatorStart?: ((goal: string) => void) | undefined;
7
+ /** Stop the AutonomousCoordinator. */
8
+ onCoordinatorStop?: (() => void) | undefined;
9
+ /** Whether the coordinator is currently running. */
10
+ coordinatorRunning?: boolean | undefined;
11
+ }
12
+ /**
13
+ * Full-screen overlay showing the current goal, deliverables checklist,
14
+ * and progress bar. Opened with F9.
15
+ */
16
+ export declare function GoalPanel({ goal, onCoordinatorStart, onCoordinatorStop, coordinatorRunning, }: GoalPanelProps): React.ReactElement;
17
+ //# sourceMappingURL=goal-panel.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"goal-panel.d.ts","sourceRoot":"","sources":["../../src/components/goal-panel.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAEnD,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,WAAW,CAAC;IAClB,gEAAgE;IAChE,kBAAkB,CAAC,EAAE,CAAC,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC,GAAG,SAAS,CAAC;IAC1D,sCAAsC;IACtC,iBAAiB,CAAC,EAAE,CAAC,MAAM,IAAI,CAAC,GAAG,SAAS,CAAC;IAC7C,oDAAoD;IACpD,kBAAkB,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;CAC1C;AAED;;;GAGG;AACH,wBAAgB,SAAS,CAAC,EACxB,IAAI,EACJ,kBAAkB,EAClB,iBAAiB,EACjB,kBAAkB,GACnB,EAAE,cAAc,GAAG,KAAK,CAAC,YAAY,CAgJrC"}
@@ -0,0 +1,27 @@
1
+ import type React from 'react';
2
+ export interface HelpEntry {
3
+ /** Key chord or command, e.g. `Ctrl+F` or `/model`. */
4
+ keys: string;
5
+ /** What it does. */
6
+ desc: string;
7
+ }
8
+ export interface HelpSection {
9
+ title: string;
10
+ entries: HelpEntry[];
11
+ }
12
+ /**
13
+ * Static cheat-sheet content: keybindings + common slash commands, grouped by
14
+ * area. Pure data (no JSX) so the exact set of entries is unit-testable and the
15
+ * overlay renders identically everywhere.
16
+ */
17
+ export declare function helpSections(): HelpSection[];
18
+ /**
19
+ * Full-width modal cheat-sheet overlay (opened with `?` on an empty prompt,
20
+ * closed with Esc / `?` / `q`). Mirrors the bordered-panel look of the monitor
21
+ * overlays so it sits naturally in the bottom region. Two columns: the key
22
+ * chord (accent) and its description (dim), with the key column padded to a
23
+ * shared width so descriptions align. The Tool Colors section uses two sub-columns
24
+ * so all legend entries fit without scrolling.
25
+ */
26
+ export declare function HelpOverlay(): React.ReactElement;
27
+ //# sourceMappingURL=help-overlay.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"help-overlay.d.ts","sourceRoot":"","sources":["../../src/components/help-overlay.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,MAAM,WAAW,SAAS;IACxB,uDAAuD;IACvD,IAAI,EAAE,MAAM,CAAC;IACb,oBAAoB;IACpB,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,WAAW;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,SAAS,EAAE,CAAC;CACtB;AAED;;;;GAIG;AACH,wBAAgB,YAAY,IAAI,WAAW,EAAE,CA4H5C;AA4ED;;;;;;;GAOG;AACH,wBAAgB,WAAW,IAAI,KAAK,CAAC,YAAY,CA+EhD"}
@@ -0,0 +1,16 @@
1
+ import type React from 'react';
2
+ export interface HelpEntry {
3
+ name: string;
4
+ description: string;
5
+ category: string;
6
+ aliases?: string[] | undefined;
7
+ argsHint?: string | undefined;
8
+ }
9
+ export interface HelpPanelProps {
10
+ entries: HelpEntry[];
11
+ filter: string;
12
+ selected: number;
13
+ hint?: string | undefined;
14
+ }
15
+ export declare function HelpPanel({ entries, filter, selected, hint, }: HelpPanelProps): React.ReactElement;
16
+ //# sourceMappingURL=help-panel.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"help-panel.d.ts","sourceRoot":"","sources":["../../src/components/help-panel.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,EAAE,GAAG,SAAS,CAAC;IAC/B,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC/B;AAED,MAAM,WAAW,cAAc;IAC7B,OAAO,EAAE,SAAS,EAAE,CAAC;IACrB,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC3B;AAwDD,wBAAgB,SAAS,CAAC,EACxB,OAAO,EACP,MAAM,EACN,QAAQ,EACR,IAAI,GACL,EAAE,cAAc,GAAG,KAAK,CAAC,YAAY,CAmGrC"}
@@ -0,0 +1,61 @@
1
+ import type React from 'react';
2
+ import type { BodySegment } from './types.js';
3
+ /**
4
+ * Width of the left border glyph in a single-border panel. Used to adjust
5
+ * content width calculations where the border is a separate UI element.
6
+ */
7
+ export declare const MESSAGE_PANEL_BORDER_WIDTH = 1;
8
+ /**
9
+ * Horizontal columns consumed by every bordered message panel
10
+ * (border glyph + paddingLeft). Exported so tests can assert consistency.
11
+ */
12
+ export declare const MESSAGE_PANEL_CHROME_WIDTH = 2;
13
+ /**
14
+ * Margin on each side of bordered panels, in columns. Prevents the
15
+ * last character of a full-width line from wrapping at the terminal edge
16
+ * and leaking into scrollback. Content inside the panel is narrower by
17
+ * twice this value (left + right).
18
+ */
19
+ export declare const MESSAGE_PANEL_MARGIN = 2;
20
+ /**
21
+ * Compute the real inner content width of an assistant panel.
22
+ * termWidth - chrome (border+padding) only — no margin since panels are now full-width.
23
+ */
24
+ export declare function assistantContentWidth(termWidth: number): number;
25
+ /**
26
+ * Split assistant text into prose and ```fenced``` code segments, in order.
27
+ * Pure + testable. An unterminated fence treats the remainder as code.
28
+ */
29
+ export declare function splitFencedBlocks(text: string): BodySegment[];
30
+ /**
31
+ * Assistant message body: prose (with markdown tables) interleaved with
32
+ * highlighted code blocks.
33
+ */
34
+ export declare function AssistantBody({ text, termWidth, contentWidth, }: {
35
+ text: string;
36
+ termWidth: number;
37
+ /** Real inner width of the surrounding panel. Defaults to `termWidth`. */
38
+ contentWidth?: number | undefined;
39
+ }): React.ReactElement;
40
+ /**
41
+ * Build the CONSTANT-height row set for the live assistant tail: always exactly
42
+ * `tailLines` rows (newest pinned to the bottom, blank padding on top), each
43
+ * truncated to `contentWidth` so nothing wraps. Pure + exported for testing.
44
+ */
45
+ export declare function assistantTailRows(text: string, tailLines: number, contentWidth: number): string[];
46
+ /**
47
+ * The live "ASSISTANT: (streaming...)" tail shown below committed history.
48
+ *
49
+ * Renders at a CONSTANT height (header + ASSISTANT_TAIL_LINES rows) with every
50
+ * line truncated to the terminal width so nothing wraps. A wrapping/growing
51
+ * tail pinned to the bottom of the screen forces the terminal to scroll on each
52
+ * delta, and in inline mode each scroll leaks the input prompt
53
+ * row into permanent scrollback. Holding the height fixed limits that to one
54
+ * scroll when streaming starts. Rows are bottom-aligned (blank padding on top)
55
+ * so the newest line stays pinned to the bottom.
56
+ */
57
+ export declare function AssistantTail({ text, termWidth, }: {
58
+ text: string;
59
+ termWidth: number;
60
+ }): React.ReactElement;
61
+ //# sourceMappingURL=assistant.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"assistant.d.ts","sourceRoot":"","sources":["../../../src/components/history/assistant.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAE9C;;;GAGG;AACH,eAAO,MAAM,0BAA0B,IAAI,CAAC;AAE5C;;;GAGG;AACH,eAAO,MAAM,0BAA0B,IAAI,CAAC;AAE5C;;;;;GAKG;AACH,eAAO,MAAM,oBAAoB,IAAI,CAAC;AAEtC;;;GAGG;AACH,wBAAgB,qBAAqB,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAE/D;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,GAAG,WAAW,EAAE,CAgC7D;AAED;;;GAGG;AACH,wBAAgB,aAAa,CAAC,EAC5B,IAAI,EACJ,SAAS,EACT,YAAY,GACb,EAAE;IACD,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,0EAA0E;IAC1E,YAAY,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CACnC,GAAG,KAAK,CAAC,YAAY,CAmBrB;AAMD;;;;GAIG;AACH,wBAAgB,iBAAiB,CAC/B,IAAI,EAAE,MAAM,EACZ,SAAS,EAAE,MAAM,EACjB,YAAY,EAAE,MAAM,GACnB,MAAM,EAAE,CAQV;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,aAAa,CAAC,EAC5B,IAAI,EACJ,SAAS,GACV,EAAE;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAA;CAAE,GAAG,KAAK,CAAC,YAAY,CA4B1D"}
@@ -0,0 +1,13 @@
1
+ import type React from 'react';
2
+ import type { HistoryEntry } from './types.js';
3
+ /**
4
+ * Startup splash. Renders into the Static area on mount and never
5
+ * re-renders, so it's safe to use rich layout without worrying about
6
+ * Ink's redraw cursor math.
7
+ */
8
+ export declare function Banner({ entry, }: {
9
+ entry: Extract<HistoryEntry, {
10
+ kind: 'banner';
11
+ }>;
12
+ }): React.ReactElement;
13
+ //# sourceMappingURL=banner.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"banner.d.ts","sourceRoot":"","sources":["../../../src/components/history/banner.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAG/C;;;;GAIG;AACH,wBAAgB,MAAM,CAAC,EACrB,KAAK,GACN,EAAE;IACD,KAAK,EAAE,OAAO,CAAC,YAAY,EAAE;QAAE,IAAI,EAAE,QAAQ,CAAA;KAAE,CAAC,CAAC;CAClD,GAAG,KAAK,CAAC,YAAY,CA+CrB"}
@@ -0,0 +1,217 @@
1
+ import type React from 'react';
2
+ import { type Lang, type Token } from '../../highlight.js';
3
+ import { type DiffLineRow, type DiffPreview } from '@wrongstack/tools/tool-diff';
4
+ export type { DiffLineKind, DiffLineRow, DiffPreview } from '@wrongstack/tools/tool-diff';
5
+ /**
6
+ * A parsed diff paired with the file it belongs to. Used when a tool
7
+ * produces diffs for several files at once (currently `replace`); each
8
+ * `DiffFilePreview` renders as one labeled `DiffFileBlock`.
9
+ */
10
+ export interface DiffFilePreview {
11
+ path: string;
12
+ preview: DiffPreview;
13
+ }
14
+ /** Max code-block lines rendered before a "+N more" footer. */
15
+ export declare const MAX_CODE_LINES = 80;
16
+ /**
17
+ * Default cap on rows surfaced by {@link parseUnifiedDiff} for the main
18
+ * Update tool diff view. Previously hardcoded to `12`, which silently
19
+ * truncated larger diffs and pushed the rest into a `… +N -M hidden`
20
+ * footer. The Update tool runs in a scrollable history surface, so a
21
+ * long diff is a legitimate read — let it render in full. Callers that
22
+ * still need a hard cap (e.g. the approval dialog's tighter box) pass
23
+ * their own number explicitly to `parseUnifiedDiff`; this default is
24
+ * for the unbounded read-everything path.
25
+ *
26
+ * Set to `Number.POSITIVE_INFINITY` so `parseUnifiedDiff`'s `if (all.length
27
+ * <= maxLines)` branch always matches and the slice/footer machinery
28
+ * becomes a no-op. The `DIFF_LINE_SAFETY_CAP` below still bounds
29
+ * individual row text length, which protects against pathological
30
+ * one-liners (minified bundles, huge JSON blobs).
31
+ */
32
+ export declare const DIFF_MAX_LINES: number;
33
+ /** Syntax-highlighted, framed code block. */
34
+ export declare function CodeBlock({ code, lang, contentWidth, }: {
35
+ code: string;
36
+ lang: Lang;
37
+ contentWidth: number;
38
+ }): React.ReactElement;
39
+ /**
40
+ * Minimum number of files before a summary footer is rendered above the
41
+ * per-file blocks. Below this threshold each file's own `… +N -M hidden`
42
+ * footer carries enough signal; above it, a single aggregate line keeps
43
+ * the screen from being drowned in per-file tail lines.
44
+ *
45
+ * This is the default when no user-tunable value is supplied. The
46
+ * settings picker exposes `MULTI_DIFF_SUMMARY_THRESHOLD_PRESETS` so
47
+ * users can raise the cutoff (e.g. for very wide terminals) or lower
48
+ * it (e.g. for tiny scrollback), or set it to 0 to suppress the
49
+ * summary entirely.
50
+ */
51
+ export declare const MULTI_DIFF_SUMMARY_THRESHOLD = 5;
52
+ /**
53
+ * Aggregate stats across a list of per-file diffs — used to print a
54
+ * single summary line at the top of a multi-file diff view when there
55
+ * are enough files to make the rollup useful.
56
+ */
57
+ export interface MultiDiffSummary {
58
+ fileCount: number;
59
+ added: number;
60
+ removed: number;
61
+ hiddenAdded: number;
62
+ hiddenRemoved: number;
63
+ /** Number of files whose preview was truncated by the per-file cap. */
64
+ truncatedFiles: number;
65
+ }
66
+ /**
67
+ * Sum the totals of a list of per-file diff previews. Files that were
68
+ * parsed but have no rows (e.g. entirely empty after the no-op skip) are
69
+ * excluded from the rollup so the summary reflects what the user will
70
+ * actually see rendered below.
71
+ */
72
+ export declare function summarizeMultiFileDiffs(items: DiffFilePreview[]): MultiDiffSummary;
73
+ /**
74
+ * Format a multi-file diff summary as a single dim italic line, suitable
75
+ * for rendering above the per-file blocks. Mirrors the per-file footer's
76
+ * `… +N -M hidden` shape so a reader who has seen the footer recognises
77
+ * the format. Returns `null` when there's nothing useful to surface
78
+ * (no files, or below the user's threshold where the per-file footer
79
+ * already covers the rollup).
80
+ *
81
+ * @param threshold User-tunable cutoff. Pass `MULTI_DIFF_SUMMARY_THRESHOLD`
82
+ * for the default behaviour, `0` to suppress the summary entirely
83
+ * (always returns null), or a positive number to set a custom cutoff.
84
+ * A negative value is treated as "use default" so callers can pass an
85
+ * `undefined`-coerced settings value without a separate branch.
86
+ */
87
+ export declare function formatMultiDiffSummary(summary: MultiDiffSummary, threshold?: number): string | null;
88
+ /**
89
+ * One labeled diff — used to render a per-file block inside multi-file
90
+ * diff views (e.g. when `replace` modifies several files). The path label
91
+ * is rendered dim and italic so the file boundary is visible without
92
+ * competing with the add/remove wash.
93
+ */
94
+ export declare function DiffFileBlock({ path, preview, useColor, contentWidth, }: {
95
+ path: string;
96
+ preview: DiffPreview;
97
+ /** Pass-through to {@link DiffBlock}. See that component for details. */
98
+ useColor?: boolean | undefined;
99
+ /** Pass-through to {@link DiffBlock}. See that component for details. */
100
+ contentWidth?: number | undefined;
101
+ }): React.ReactElement;
102
+ /**
103
+ * Human-readable change-size line for a diff — `Added N lines, removed M
104
+ * lines` (Claude Code phrasing). Omits the zero side; returns `null` when
105
+ * nothing changed so callers can skip the line entirely.
106
+ */
107
+ export declare function formatDiffStats(added: number, removed: number): string | null;
108
+ /**
109
+ * Return the token list to render on a diff wash (`diffAddBg` /
110
+ * `diffDelBg`). When `onWash` is false the input is returned unchanged —
111
+ * plain-background rendering keeps the conventional dim/gray comment
112
+ * look and there is no contrast reason to intervene.
113
+ *
114
+ * When `onWash` is true, comment tokens (color `gray`, conventionally
115
+ * `dim: true`) are promoted to a brighter foreground (`grayBright`) and
116
+ * lose their dim flag. The diff wash is dark enough that `dim gray`
117
+ * (`pastel.gray`) falls below WCAG AA contrast on either `theme.diffAddBg`
118
+ * (ratio ≈ 2.91) or `theme.diffDelBg` (ratio ≈ 3.47) and reads as near-
119
+ * invisible noise; `grayBright` clears both wash backgrounds (≥ 4.5) and
120
+ * keeps the comment visually secondary without becoming unreadable.
121
+ * Non-comment tokens pass through unchanged so the rest of the line keeps
122
+ * its existing syntax palette on the wash.
123
+ *
124
+ * Exported for unit testing — `renderTokens` calls it before mapping to
125
+ * `<Text>` elements so the override logic itself stays a pure function.
126
+ */
127
+ export declare function applyWashTokens(tokens: Token[], onWash: boolean): Token[];
128
+ export declare function DiffBlock({ rows, hidden, added, removed, hiddenAdded, hiddenRemoved, useColor, lang, showStats, contentWidth, }: {
129
+ rows: DiffLineRow[];
130
+ hidden: number;
131
+ /**
132
+ * Total lines added across the whole diff (not just the visible slice).
133
+ * Surfaced in the `⎿ Added N lines, removed M lines` stats line so the
134
+ * reader knows the change size even when the body is truncated.
135
+ */
136
+ added?: number | undefined;
137
+ /** Total lines removed across the whole diff (not just the visible slice). */
138
+ removed?: number | undefined;
139
+ hiddenAdded?: number | undefined;
140
+ hiddenRemoved?: number | undefined;
141
+ /**
142
+ * When true (default), added/removed rows get a dark green/maroon
143
+ * background wash (Claude Code style) with normal-brightness,
144
+ * syntax-highlighted foreground text. When false, only the `+`/`-`
145
+ * markers get colored (bright green/red, bold) so the diff stays
146
+ * readable on terminals that don't support truecolor backgrounds
147
+ * (TERM=xterm, `NO_COLOR=1`, etc.). Pass `theme.supportsBackground`
148
+ * from the entry-point.
149
+ */
150
+ useColor?: boolean | undefined;
151
+ /**
152
+ * Syntax-highlight language for line bodies (derive from the touched
153
+ * file's extension via `langFromPath`). `plain` disables highlighting.
154
+ */
155
+ lang?: Lang | undefined;
156
+ /**
157
+ * Render the leading `⎿ Added N lines, removed M lines` stats line.
158
+ * Callers that print their own header/stats (e.g. the Update(path)
159
+ * entry header) pass `false` to avoid the duplicate.
160
+ */
161
+ showStats?: boolean | undefined;
162
+ /**
163
+ * Terminal width available to this block. Line bodies longer than the
164
+ * remaining budget hard-wrap onto continuation rows (blank gutter, blank
165
+ * marker cell, same background wash) so the full line content is always
166
+ * visible without ever flowing under the gutter. When omitted, wrapping
167
+ * falls back to a 100-char budget.
168
+ */
169
+ contentWidth?: number | undefined;
170
+ }): React.ReactElement;
171
+ /**
172
+ * Parse a unified-diff string into a {@link DiffPreview}. Thin wrapper over the
173
+ * shared, single-source-of-truth `parseUnifiedDiffPreview` in
174
+ * @wrongstack/tools/tool-diff (which the WebUI and HQ also read). Kept as a
175
+ * local export so this module's many callers and tests are unchanged.
176
+ */
177
+ export declare function parseUnifiedDiff(diff: string, maxLines: number): DiffPreview;
178
+ /**
179
+ * Pull a unified-diff string out of a tool's JSON output, then turn it
180
+ * into a small, structured preview suitable for colour-coded rendering.
181
+ */
182
+ export declare function extractDiffPreview(toolName: string, output: string | undefined, input?: unknown | undefined): DiffPreview | undefined;
183
+ /**
184
+ * Pull one diff preview per file from a `replace` tool result. Each entry
185
+ * has a `path` (best-effort: `results[i].path`, falling back to the input
186
+ * argument when every result is for the same file) and a `preview` ready
187
+ * for `DiffFileBlock` / `DiffBlock` rendering.
188
+ *
189
+ * Returns `undefined` when no per-file diff is recoverable (e.g. an empty
190
+ * `results` array, no diff fields, or the result isn't a JSON object).
191
+ *
192
+ * Note: For a single entry point that handles `replace`, `diff`, and
193
+ * `patch` (the three tools whose output can span multiple files), use
194
+ * {@link extractMultiFileDiffs} instead — this function is kept for the
195
+ * narrower replace-specific test cases.
196
+ */
197
+ export declare function extractReplaceDiffs(toolName: string, output: string | undefined, input?: unknown | undefined): DiffFilePreview[] | undefined;
198
+ /**
199
+ * Pull a list of per-file diffs from a tool result that may span multiple
200
+ * files. Handles:
201
+ *
202
+ * - `replace`: JSON `{ results: [{ path, diff }, …] }` (path per result,
203
+ * fallback to the input path when the result omits one).
204
+ * - `diff`: JSON `{ diff: string }` where `diff` is a git-style multi-file
205
+ * unified diff (split on `diff --git` headers).
206
+ * - `patch`: either JSON `{ diff: string, files: string[] }` or a raw
207
+ * unified-diff string (split on `diff --git` headers, falling back to
208
+ * `--- a/<path>` if no `diff --git` is present).
209
+ *
210
+ * Returns `undefined` when the tool isn't multi-file capable, the output
211
+ * is missing/unparseable, or no per-file diff is recoverable. Returns an
212
+ * empty array (not undefined) when the output parses but every entry has
213
+ * an empty diff after trimming — the caller treats both as "nothing to
214
+ * render" but the distinction is useful in tests.
215
+ */
216
+ export declare function extractMultiFileDiffs(toolName: string, output: string | undefined, input?: unknown | undefined): DiffFilePreview[] | undefined;
217
+ //# sourceMappingURL=code-block.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"code-block.d.ts","sourceRoot":"","sources":["../../../src/components/history/code-block.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAGL,KAAK,IAAI,EAET,KAAK,KAAK,EACX,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAEL,KAAK,WAAW,EAChB,KAAK,WAAW,EAEjB,MAAM,6BAA6B,CAAC;AAarC,YAAY,EAAE,YAAY,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAE1F;;;;GAIG;AACH,MAA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,EAAE,OAAO,GAAG,SAAS,GAC1B,WAAW,GAAG,SAAS,CA0CzB;AAQD;;;;;;;;;;;;;GAaG;AACH,wBAAgB,mBAAmB,CACjC,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,MAAM,GAAG,SAAS,EAC1B,KAAK,CAAC,EAAE,OAAO,GAAG,SAAS,GAC1B,eAAe,EAAE,GAAG,SAAS,CAG/B;AA0BD;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,qBAAqB,CACnC,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,MAAM,GAAG,SAAS,EAC1B,KAAK,CAAC,EAAE,OAAO,GAAG,SAAS,GAC1B,eAAe,EAAE,GAAG,SAAS,CAa/B"}
@@ -0,0 +1,19 @@
1
+ import { type TodoItem } from '@wrongstack/core';
2
+ import React from 'react';
3
+ import type { HistoryEntry } from './types.js';
4
+ export declare const Entry: React.MemoExoticComponent<({ entry, termWidth, setSuggestions, autonomyMode, multiDiffSummaryThreshold, todos, }: {
5
+ entry: HistoryEntry;
6
+ termWidth: number;
7
+ /** Store parsed next steps in the shared suggestion store so /next 1 works. */
8
+ setSuggestions?: ((steps: string[]) => void) | undefined;
9
+ /** Current autonomy mode — when 'auto', first step shows an auto marker. */
10
+ autonomyMode?: string | undefined;
11
+ /** User-tunable cutoff for the multi-file diff summary footer. Passes
12
+ * through to `formatMultiDiffSummary`; `undefined` means "use default". */
13
+ multiDiffSummaryThreshold?: number | undefined;
14
+ /** Live todo list. When non-empty (pending/in_progress), the NEXT STEPS
15
+ * panel is hidden and the store is not written — same rule as the host
16
+ * callback (b0970387), so the two paths agree. */
17
+ todos?: readonly TodoItem[] | undefined;
18
+ }) => React.ReactElement>;
19
+ //# sourceMappingURL=entry.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"entry.d.ts","sourceRoot":"","sources":["../../../src/components/history/entry.tsx"],"names":[],"mappings":"AACA,OAAO,EAAgB,KAAK,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC/D,OAAO,KAA6B,MAAM,OAAO,CAAC;AAgBlD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAkD/C,eAAO,MAAM,KAAK,oHAOf;IACD,KAAK,EAAE,YAAY,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,+EAA+E;IAC/E,cAAc,CAAC,EAAE,CAAC,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC,GAAG,SAAS,CAAC;IACzD,4EAA4E;IAC5E,YAAY,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAClC;gFAC4E;IAC5E,yBAAyB,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC/C;;uDAEmD;IACnD,KAAK,CAAC,EAAE,SAAS,QAAQ,EAAE,GAAG,SAAS,CAAC;CACzC,KAAG,KAAK,CAAC,YAAY,CAkgBpB,CAAC"}
@@ -0,0 +1,21 @@
1
+ import type React from 'react';
2
+ import type { HistoryProps } from './types.js';
3
+ export type { HistoryEntry, HistoryProps } from './types.js';
4
+ export type { BodySegment } from './types.js';
5
+ export { Banner } from './banner.js';
6
+ export { CodeBlock, DiffBlock, DiffFileBlock, type DiffFilePreview, type DiffLineKind, type DiffLineRow, type DiffPreview, type MultiDiffSummary, MULTI_DIFF_SUMMARY_THRESHOLD, extractDiffPreview, extractMultiFileDiffs, extractReplaceDiffs, formatDiffStats, formatMultiDiffSummary, parseUnifiedDiff, summarizeMultiFileDiffs, } from './code-block.js';
7
+ export { Entry } from './entry.js';
8
+ export { MESSAGE_PANEL_BORDER_WIDTH, MESSAGE_PANEL_CHROME_WIDTH, MESSAGE_PANEL_MARGIN, AssistantBody, AssistantTail, assistantContentWidth, assistantTailRows, splitFencedBlocks } from './assistant.js';
9
+ export { shortenPath, previewArgs, previewOutput, fmtTok, fmtDuration, fmtBytes, truncMid, stringOf, numOf, tryParseJson, scanNumberedRange, countLines, firstNonEmpty, formatMatchHit, formatToolArgs, formatToolOutput, formatToolVisualOutput, type ToolVisualLine, type ToolVisualLineKind, ToolOutputLines, ToolStreamBox, streamBoxRows, MAX_STREAM_DISPLAY_CHARS, tailForDisplay, } from './utils.js';
10
+ /**
11
+ * History component — renders committed entries via <Static> so they
12
+ * flow into terminal scrollback, plus a live streaming assistant tail.
13
+ *
14
+ * Wrapped in `React.memo` so keystrokes in the input buffer (which
15
+ * change `state.buffer`/`state.cursor` in the same reducer) don't
16
+ * trigger an expensive full-history re-render. All props are either
17
+ * primitives or stable reducer references, so default shallow
18
+ * comparison is sufficient.
19
+ */
20
+ export declare const History: React.MemoExoticComponent<({ entries, generation, streamingText, toolStream, setSuggestions, autonomyMode, multiDiffSummaryThreshold, todos }: HistoryProps) => React.ReactElement>;
21
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/history/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAI/C,YAAY,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAC7D,YAAY,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAC9C,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EACL,SAAS,EACT,SAAS,EACT,aAAa,EACb,KAAK,eAAe,EACpB,KAAK,YAAY,EACjB,KAAK,WAAW,EAChB,KAAK,WAAW,EAChB,KAAK,gBAAgB,EACrB,4BAA4B,EAC5B,kBAAkB,EAClB,qBAAqB,EACrB,mBAAmB,EACnB,eAAe,EACf,sBAAsB,EACtB,gBAAgB,EAChB,uBAAuB,GACxB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACnC,OAAO,EAAE,0BAA0B,EAAE,0BAA0B,EAAE,oBAAoB,EAAE,aAAa,EAAE,aAAa,EAAE,qBAAqB,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AACzM,OAAO,EACL,WAAW,EACX,WAAW,EACX,aAAa,EACb,MAAM,EACN,WAAW,EACX,QAAQ,EACR,QAAQ,EACR,QAAQ,EACR,KAAK,EACL,YAAY,EACZ,iBAAiB,EACjB,UAAU,EACV,aAAa,EACb,cAAc,EACd,cAAc,EACd,gBAAgB,EAChB,sBAAsB,EACtB,KAAK,cAAc,EACnB,KAAK,kBAAkB,EACvB,eAAe,EACf,aAAa,EACb,aAAa,EACb,wBAAwB,EACxB,cAAc,GACf,MAAM,YAAY,CAAC;AAIpB;;;;;;;;;GASG;AACH,eAAO,MAAM,OAAO,iJAA6I,YAAY,KAAG,KAAK,CAAC,YAAY,CAkDhM,CAAC"}