@wrongstack/tui 1.0.24 → 1.0.26

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 (84) hide show
  1. package/dist/app-action-type.d.ts +54 -1
  2. package/dist/app-panel-state.d.ts +25 -0
  3. package/dist/app-props.d.ts +20 -0
  4. package/dist/app-reducer.d.ts +1 -1
  5. package/dist/app-state-core-types.d.ts +13 -0
  6. package/dist/app-view-contract.d.ts +1 -1
  7. package/dist/background-strip-model.d.ts +65 -0
  8. package/dist/brain-panel-model.d.ts +7 -7
  9. package/dist/chat-search-slash.d.ts +15 -0
  10. package/dist/clipboard.d.ts +14 -1
  11. package/dist/components/background-strip.d.ts +20 -0
  12. package/dist/components/chat-search-bar.d.ts +19 -0
  13. package/dist/components/checkpoint-timeline.d.ts +6 -2
  14. package/dist/components/history/code-block.d.ts +2 -136
  15. package/dist/components/history/diff-model.d.ts +143 -0
  16. package/dist/components/history/scroll-controller-types.d.ts +11 -0
  17. package/dist/components/history/scrollbar-rail.d.ts +14 -2
  18. package/dist/components/history/use-history-controller.d.ts +5 -0
  19. package/dist/components/monitor-shell.d.ts +5 -1
  20. package/dist/components/phase-monitor.d.ts +3 -1
  21. package/dist/components/prompt-picker-model.d.ts +16 -0
  22. package/dist/components/prompt-picker.d.ts +2 -16
  23. package/dist/components/resource-menu-model.d.ts +3 -0
  24. package/dist/components/resource-menu.d.ts +3 -3
  25. package/dist/components/scrollable-history.d.ts +1 -1
  26. package/dist/components/send-mode-model.d.ts +44 -0
  27. package/dist/components/send-mode-picker.d.ts +2 -43
  28. package/dist/components/sidebar-panel-agents.d.ts +10 -0
  29. package/dist/components/sidebar-panel-connections.d.ts +11 -0
  30. package/dist/components/sidebar-panel-coordinator.d.ts +11 -0
  31. package/dist/components/sidebar-panel-fleet.d.ts +16 -0
  32. package/dist/components/sidebar-panel-project.d.ts +12 -0
  33. package/dist/components/sidebar-panel-worktree.d.ts +10 -0
  34. package/dist/components/sidebar-panel-wrong-proxy.d.ts +25 -0
  35. package/dist/components/sidebar-panels-workspace.d.ts +10 -79
  36. package/dist/components/status-bar-rails-async.d.ts +2 -2
  37. package/dist/components/status-bar-types.d.ts +6 -0
  38. package/dist/components/status-bar.d.ts +1 -1
  39. package/dist/components/statusline-picker-model.d.ts +45 -0
  40. package/dist/components/statusline-picker.d.ts +2 -41
  41. package/dist/hooks/fork-at-checkpoint.d.ts +25 -0
  42. package/dist/hooks/use-app-execution-pipeline.d.ts +1 -1
  43. package/dist/hooks/use-app-picker-keys.d.ts +4 -2
  44. package/dist/hooks/use-chip-staleness-guard.d.ts +6 -0
  45. package/dist/hooks/use-core-tui-commands.d.ts +7 -2
  46. package/dist/hooks/use-file-search.d.ts +10 -0
  47. package/dist/hooks/use-picker-keys-brain-statusline.d.ts +4 -0
  48. package/dist/hooks/use-provider-warmup.d.ts +9 -0
  49. package/dist/hooks/use-queue-manager.d.ts +11 -1
  50. package/dist/hooks/use-session-rewind.d.ts +8 -1
  51. package/dist/hooks/use-slash-picker.d.ts +1 -1
  52. package/dist/hooks/use-stable-key-handler.d.ts +8 -1
  53. package/dist/hooks/use-status-sync-interval.d.ts +3 -2
  54. package/dist/hooks/use-tui-environment-state.d.ts +3 -0
  55. package/dist/hooks/use-tui-event-bridge.d.ts +12 -0
  56. package/dist/index.js +22173 -20317
  57. package/dist/ink.d.ts +1 -1
  58. package/dist/input-validation/action-types.d.ts +1 -1
  59. package/dist/input-validation/limits.d.ts +2 -0
  60. package/dist/input-validation-display.d.ts +9 -0
  61. package/dist/input-validation.d.ts +0 -52
  62. package/dist/key-routes/key-route-background-strip.d.ts +14 -0
  63. package/dist/key-routes/key-route-chat-search.d.ts +24 -0
  64. package/dist/layout-store.d.ts +2 -2
  65. package/dist/memory-slash-render.d.ts +1 -1
  66. package/dist/message-checkpoint.d.ts +19 -0
  67. package/dist/motion.d.ts +16 -0
  68. package/dist/reducers/chat-search.d.ts +11 -0
  69. package/dist/reducers/composer-action-types.d.ts +6 -0
  70. package/dist/reducers/composer-pickers.d.ts +4 -0
  71. package/dist/reducers/composer.d.ts +1 -5
  72. package/dist/reducers/message-jump.d.ts +16 -0
  73. package/dist/reducers/workspace-panels.d.ts +1 -1
  74. package/dist/resume-session-tree.d.ts +8 -0
  75. package/dist/rewind-prompt.d.ts +24 -0
  76. package/dist/run-tui-options.d.ts +23 -4
  77. package/dist/scroll-anchor.d.ts +6 -0
  78. package/dist/submit-controller.d.ts +1 -1
  79. package/dist/submit-slash-command.d.ts +67 -0
  80. package/dist/transcript-search.d.ts +38 -0
  81. package/dist/ui-contracts.d.ts +1 -1
  82. package/dist/use-app-controller.d.ts +1 -1
  83. package/dist/use-controller-key-pipeline.d.ts +217 -0
  84. package/package.json +7 -7
@@ -0,0 +1,143 @@
1
+ /**
2
+ * Pure diff model for tool-result cards: per-file preview types, render
3
+ * ceilings, multi-file rollups and extraction from tool output. No Ink or
4
+ * React — `code-block.tsx` renders it and re-exports it.
5
+ */
6
+ import { type DiffPreview } from '@wrongstack/tools/tool-diff';
7
+ export type { DiffLineKind, DiffLineRow, DiffPreview } from '@wrongstack/tools/tool-diff';
8
+ /**
9
+ * A parsed diff paired with the file it belongs to. Used when a tool
10
+ * produces diffs for several files at once (currently `replace`); each
11
+ * `DiffFilePreview` renders as one labeled `DiffFileBlock`.
12
+ */
13
+ export interface DiffFilePreview {
14
+ path: string;
15
+ preview: DiffPreview;
16
+ }
17
+ interface OmittedDiffSummary {
18
+ fileCount: number;
19
+ added: number;
20
+ removed: number;
21
+ }
22
+ /** Renderable file previews plus aggregate data for files omitted by the cap. */
23
+ export type DiffFilePreviews = DiffFilePreview[] & {
24
+ omitted?: OmittedDiffSummary | undefined;
25
+ };
26
+ /**
27
+ * Hard ceiling for one file's rendered diff preview. Diff rows are React/Ink
28
+ * elements and therefore retained by the active virtual-history window; an
29
+ * unbounded preview lets a single generated-file edit defeat virtualization.
30
+ * Totals for the whole diff remain available through `added`/`removed`, while
31
+ * the footer reports the hidden portion.
32
+ */
33
+ export declare const DIFF_MAX_LINES = 200;
34
+ /** Maximum number of per-file diff blocks retained for one tool entry. */
35
+ export declare const MULTI_DIFF_MAX_FILES = 20;
36
+ /** Maximum rendered diff rows retained across every file in one tool entry. */
37
+ export declare const MULTI_DIFF_MAX_ROWS = 400;
38
+ /**
39
+ * Minimum number of files before a summary footer is rendered above the
40
+ * per-file blocks. Below this threshold each file's own `… +N -M hidden`
41
+ * footer carries enough signal; above it, a single aggregate line keeps
42
+ * the screen from being drowned in per-file tail lines.
43
+ *
44
+ * This is the default when no user-tunable value is supplied. The
45
+ * settings picker exposes `MULTI_DIFF_SUMMARY_THRESHOLD_PRESETS` so
46
+ * users can raise the cutoff (e.g. for very wide terminals) or lower
47
+ * it (e.g. for tiny scrollback), or set it to 0 to suppress the
48
+ * summary entirely.
49
+ */
50
+ export declare const MULTI_DIFF_SUMMARY_THRESHOLD = 5;
51
+ /**
52
+ * Aggregate stats across a list of per-file diffs — used to print a
53
+ * single summary line at the top of a multi-file diff view when there
54
+ * are enough files to make the rollup useful.
55
+ */
56
+ export interface MultiDiffSummary {
57
+ fileCount: number;
58
+ added: number;
59
+ removed: number;
60
+ hiddenAdded: number;
61
+ hiddenRemoved: number;
62
+ /** Number of rendered files whose preview was truncated (has hidden rows).
63
+ * Does not include files omitted entirely by the multi-file render ceiling;
64
+ * those are tracked separately via {@link omittedFiles}. */
65
+ truncatedFiles: number;
66
+ /** Files omitted entirely by the multi-file render ceiling. Guaranteed non-negative. */
67
+ omittedFiles: number;
68
+ }
69
+ /**
70
+ * Sum the totals of a list of per-file diff previews. Files that were
71
+ * parsed but have no rows (e.g. entirely empty after the no-op skip) are
72
+ * excluded from the rollup so the summary reflects what the user will
73
+ * actually see rendered below.
74
+ */
75
+ export declare function summarizeMultiFileDiffs(items: DiffFilePreviews): MultiDiffSummary;
76
+ /**
77
+ * Format a multi-file diff summary as a single dim italic line, suitable
78
+ * for rendering above the per-file blocks. Mirrors the per-file footer's
79
+ * `… +N -M hidden` shape so a reader who has seen the footer recognises
80
+ * the format. Returns `null` when there's nothing useful to surface
81
+ * (no files, or below the user's threshold where the per-file footer
82
+ * already covers the rollup).
83
+ *
84
+ * @param threshold User-tunable cutoff. Pass `MULTI_DIFF_SUMMARY_THRESHOLD`
85
+ * for the default behaviour, `0` to suppress the summary entirely
86
+ * (always returns null), or a positive number to set a custom cutoff.
87
+ * A negative value is treated as "use default" so callers can pass an
88
+ * `undefined`-coerced settings value without a separate branch.
89
+ */
90
+ export declare function formatMultiDiffSummary(summary: MultiDiffSummary, threshold?: number): string | null;
91
+ /**
92
+ * Human-readable change-size line for a diff — `Added N lines, removed M
93
+ * lines` (Claude Code phrasing). Omits the zero side; returns `null` when
94
+ * nothing changed so callers can skip the line entirely.
95
+ */
96
+ export declare function formatDiffStats(added: number, removed: number): string | null;
97
+ /**
98
+ * Parse a unified-diff string into a {@link DiffPreview}. Thin wrapper over the
99
+ * shared, single-source-of-truth `parseUnifiedDiffPreview` in
100
+ * @wrongstack/tools/tool-diff (which the WebUI and HQ also read). Kept as a
101
+ * local export so this module's many callers and tests are unchanged.
102
+ */
103
+ export declare function parseUnifiedDiff(diff: string, maxLines: number): DiffPreview;
104
+ /**
105
+ * Pull a unified-diff string out of a tool's JSON output, then turn it
106
+ * into a small, structured preview suitable for colour-coded rendering.
107
+ */
108
+ export declare function extractDiffPreview(toolName: string, output: string | undefined, input?: unknown | undefined): DiffPreview | undefined;
109
+ /**
110
+ * Pull one diff preview per file from a `replace` tool result. Each entry
111
+ * has a `path` (best-effort: `results[i].path`, falling back to the input
112
+ * argument when every result is for the same file) and a `preview` ready
113
+ * for `DiffFileBlock` / `DiffBlock` rendering.
114
+ *
115
+ * Returns `undefined` when no per-file diff is recoverable (e.g. an empty
116
+ * `results` array, no diff fields, or the result isn't a JSON object).
117
+ *
118
+ * Note: For a single entry point that handles `replace`, `diff`, and
119
+ * `patch` (the three tools whose output can span multiple files), use
120
+ * {@link extractMultiFileDiffs} instead — this function is kept for the
121
+ * narrower replace-specific test cases.
122
+ */
123
+ export declare function extractReplaceDiffs(toolName: string, output: string | undefined, input?: unknown | undefined): DiffFilePreviews | undefined;
124
+ /**
125
+ * Pull a list of per-file diffs from a tool result that may span multiple
126
+ * files. Handles:
127
+ *
128
+ * - `replace`: JSON `{ results: [{ path, diff }, …] }` (path per result,
129
+ * fallback to the input path when the result omits one).
130
+ * - `diff`: JSON `{ diff: string }` where `diff` is a git-style multi-file
131
+ * unified diff (split on `diff --git` headers).
132
+ * - `patch`: either JSON `{ diff: string, files: string[] }` or a raw
133
+ * unified-diff string (split on `diff --git` headers, falling back to
134
+ * `--- a/<path>` if no `diff --git` is present).
135
+ *
136
+ * Returns `undefined` when the tool isn't multi-file capable, the output
137
+ * is missing/unparseable, or no per-file diff is recoverable. Returns an
138
+ * empty array (not undefined) when the output parses but every entry has
139
+ * an empty diff after trimming — the caller treats both as "nothing to
140
+ * render" but the distinction is useful in tests.
141
+ */
142
+ export declare function extractMultiFileDiffs(toolName: string, output: string | undefined, input?: unknown | undefined): DiffFilePreviews | undefined;
143
+ //# sourceMappingURL=diff-model.d.ts.map
@@ -25,6 +25,12 @@ export interface HistoryScrollController {
25
25
  scrollToBottom(): void;
26
26
  /** Jump to a 0-based cell clicked/dragged on the scrollbar track. */
27
27
  scrollToTrackCell(cell: number): void;
28
+ /**
29
+ * Bring the card holding `entryId` to the viewport top (re-pinning when it
30
+ * sits too close to the bottom). Returns false when the entry is not
31
+ * retained or not rendered.
32
+ */
33
+ scrollToEntry(entryId: number): boolean;
28
34
  /** True while the viewport is scrolled away from the newest output. */
29
35
  isScrolled(): boolean;
30
36
  /**
@@ -151,6 +157,11 @@ export interface ScrollableHistoryProps extends HistoryProps {
151
157
  * `null` / undefined = no card highlighted.
152
158
  */
153
159
  copiedEntryId?: number | null | undefined;
160
+ /**
161
+ * Entry the transcript search currently selects. Its card gets a marker in
162
+ * the rail's reserved gap column, so marking never reflows content.
163
+ */
164
+ markedEntryId?: number | null | undefined;
154
165
  /**
155
166
  * Called when the user scrolls near the top of the currently loaded
156
167
  * entries. The host should respond by loading older entries from the
@@ -15,12 +15,24 @@
15
15
  import type React from 'react';
16
16
  import type { CopyHit } from './copy-geometry.js';
17
17
  import { type SelectionBandStore } from './selection-band-store.js';
18
- export declare function Scrollbar({ rows, offset, total, copyHits, copiedEntryId, selectionBandStore, }: {
18
+ interface ScrollbarProps {
19
19
  rows: number;
20
20
  offset: number;
21
21
  total: number;
22
22
  copyHits: readonly CopyHit[];
23
23
  copiedEntryId?: number | null | undefined;
24
+ /** Transcript-search hit; its card's first row shows a marker in the gap column. */
25
+ markedEntryId?: number | null | undefined;
24
26
  selectionBandStore?: SelectionBandStore | undefined;
25
- }): React.ReactElement;
27
+ }
28
+ /**
29
+ * The rail renders one Box + five Texts per viewport row, and its parent
30
+ * rebuilds `copyHits` as a fresh array on every flush (streaming included).
31
+ * Compare only what the rail actually draws — each hit's row, entry id and
32
+ * whether it has an inspect glyph — so an unchanged rail skips the repaint.
33
+ * Drag-selection updates bypass props entirely through the band store.
34
+ */
35
+ export declare function scrollbarPropsEqual(prev: ScrollbarProps, next: ScrollbarProps): boolean;
36
+ export declare const Scrollbar: React.MemoExoticComponent<({ rows, offset, total, copyHits, copiedEntryId, markedEntryId, selectionBandStore, }: ScrollbarProps) => React.ReactElement>;
37
+ export {};
26
38
  //# sourceMappingURL=scrollbar-rail.d.ts.map
@@ -36,6 +36,11 @@ interface UseHistoryControllerOptions {
36
36
  entriesByIdRef: {
37
37
  current: Map<number, HistoryEntry>;
38
38
  };
39
+ /** Render-group index for every retained entry id, including entries
40
+ * folded into a compact tool group. */
41
+ groupIndexByEntryIdRef?: {
42
+ current: ReadonlyMap<number, number>;
43
+ } | undefined;
39
44
  toolStreamRef: {
40
45
  current: {
41
46
  name: string;
@@ -30,7 +30,11 @@ interface MonitorShellProps {
30
30
  accent: string;
31
31
  icon: string;
32
32
  title: string;
33
- /** Quiet context beside the title, hidden by callers on narrow terminals. */
33
+ /**
34
+ * Quiet context beside the title. Shown only when title, kicker and the
35
+ * right-hand content all fit on the header row; callers pass it
36
+ * unconditionally.
37
+ */
34
38
  kicker?: string | undefined;
35
39
  right?: ReactNode | undefined;
36
40
  footer?: ReactNode | undefined;
@@ -1,5 +1,7 @@
1
1
  import type React from 'react';
2
2
  interface PhaseMonitorProps {
3
+ /** Human-readable Goal run title. */
4
+ title?: string | undefined;
3
5
  /** Per-phase state from the App reducer. */
4
6
  phases: Record<string, {
5
7
  name: string;
@@ -29,6 +31,6 @@ interface PhaseMonitorProps {
29
31
  * · icon · name · status · (task progress) · started/elapsed
30
32
  * Bottom: keyboard hint
31
33
  */
32
- export declare function PhaseMonitor({ phases, runningPhaseIds, elapsedMs, nowTick, }: PhaseMonitorProps): React.ReactElement;
34
+ export declare function PhaseMonitor({ title, phases, runningPhaseIds, elapsedMs, nowTick, }: PhaseMonitorProps): React.ReactElement;
33
35
  export {};
34
36
  //# sourceMappingURL=phase-monitor.d.ts.map
@@ -0,0 +1,16 @@
1
+ export interface PromptPickEntry {
2
+ slug: string;
3
+ title: string;
4
+ description: string;
5
+ category: string;
6
+ source: string;
7
+ content: string;
8
+ favorite: boolean;
9
+ }
10
+ /**
11
+ * Apply the picker's category filter. catIndex 0 (= "all") returns everything;
12
+ * "★ favorites" filters by the favorite flag; "🕘 recent" orders by the
13
+ * recently-used slug list (most-recent first).
14
+ */
15
+ export declare function filterPromptPicker(all: PromptPickEntry[], categories: string[], catIndex: number, recentSlugs?: string[]): PromptPickEntry[];
16
+ //# sourceMappingURL=prompt-picker-model.d.ts.map
@@ -1,19 +1,6 @@
1
1
  import type React from 'react';
2
- export interface PromptPickEntry {
3
- slug: string;
4
- title: string;
5
- description: string;
6
- category: string;
7
- source: string;
8
- content: string;
9
- favorite: boolean;
10
- }
11
- /**
12
- * Apply the picker's category filter. catIndex 0 (= "all") returns everything;
13
- * "★ favorites" filters by the favorite flag; "🕘 recent" orders by the
14
- * recently-used slug list (most-recent first).
15
- */
16
- export declare function filterPromptPicker(all: PromptPickEntry[], categories: string[], catIndex: number, recentSlugs?: string[]): PromptPickEntry[];
2
+ import type { PromptPickEntry } from './prompt-picker-model.js';
3
+ export * from './prompt-picker-model.js';
17
4
  interface PromptPickerProps {
18
5
  /** Already-filtered entries for the active category. */
19
6
  entries: PromptPickEntry[];
@@ -30,5 +17,4 @@ interface PromptPickerProps {
30
17
  * any `{{variables}}` left in place for the user to fill inline).
31
18
  */
32
19
  export declare function PromptPicker({ entries, selected, category, total, columns, maxRows, }: PromptPickerProps): React.ReactElement;
33
- export {};
34
20
  //# sourceMappingURL=prompt-picker.d.ts.map
@@ -0,0 +1,3 @@
1
+ import type { ResourceMenuItem, ResourceMenuSnapshot } from '../ui-contracts.js';
2
+ export declare function filterResourceMenuItems(snapshot: ResourceMenuSnapshot, filter: string): ResourceMenuItem[];
3
+ //# sourceMappingURL=resource-menu-model.d.ts.map
@@ -1,5 +1,7 @@
1
1
  import type React from 'react';
2
- import type { ResourceMenuItem, ResourceMenuSnapshot } from '../ui-contracts.js';
2
+ import type { ResourceMenuSnapshot } from '../ui-contracts.js';
3
+ import { filterResourceMenuItems } from './resource-menu-model.js';
4
+ export { filterResourceMenuItems };
3
5
  interface ResourceMenuProps {
4
6
  snapshot: ResourceMenuSnapshot;
5
7
  selected: number;
@@ -12,6 +14,4 @@ interface ResourceMenuProps {
12
14
  }
13
15
  /** Reusable two-pane browser for operational state exposed by slash commands. */
14
16
  export declare function ResourceMenu({ snapshot, selected, hint, confirming, filter, filtering, columns, maxRows, }: ResourceMenuProps): React.ReactElement;
15
- export declare function filterResourceMenuItems(snapshot: ResourceMenuSnapshot, filter: string): ResourceMenuItem[];
16
- export {};
17
17
  //# sourceMappingURL=resource-menu.d.ts.map
@@ -9,6 +9,6 @@ import type { ScrollableHistoryProps } from './history/scroll-controller-types.j
9
9
  /**
10
10
  * Bounded history viewport with stable-anchor virtual scrolling.
11
11
  */
12
- export declare const ScrollableHistory: React.MemoExoticComponent<({ entries, toolStream, streamingText, viewportRows, controllerRef, onScrollInfo, maxWidth, setSuggestions, autonomyMode, nextStepsAutoSubmitLabel, nextStepsAutoSubmitDeadlineMs, multiDiffSummaryThreshold, todos, showModelReasoning, showSageMemoryInject, layoutStore, copiedEntryId, onRequestOlderEntries, toolResultViewMode, toolResultViewOverrides, onToolResultViewChange, }: ScrollableHistoryProps) => React.ReactElement>;
12
+ export declare const ScrollableHistory: React.MemoExoticComponent<({ entries, toolStream, streamingText, viewportRows, controllerRef, onScrollInfo, maxWidth, setSuggestions, autonomyMode, nextStepsAutoSubmitLabel, nextStepsAutoSubmitDeadlineMs, multiDiffSummaryThreshold, todos, showModelReasoning, showSageMemoryInject, layoutStore, copiedEntryId, markedEntryId, onRequestOlderEntries, toolResultViewMode, toolResultViewOverrides, onToolResultViewChange, }: ScrollableHistoryProps) => React.ReactElement>;
13
13
  export type { HistoryEntry };
14
14
  //# sourceMappingURL=scrollable-history.d.ts.map
@@ -0,0 +1,44 @@
1
+ /**
2
+ * How a plain message typed mid-run should be delivered to the agent.
3
+ * Mirrors the WebUI's `QueueMode` vocabulary (ChatInput.tsx).
4
+ */
5
+ export type SendMode = 'queue' | 'btw' | 'steer';
6
+ interface SendModeOption {
7
+ mode: SendMode;
8
+ /** Quick-select key (lower-case). */
9
+ key: string;
10
+ label: string;
11
+ description: string;
12
+ color: string;
13
+ }
14
+ /**
15
+ * The three delivery modes, Queue first so it is the default highlight and
16
+ * the safest no-op-to-in-flight-work choice. Order is load-bearing: the
17
+ * reducer indexes selection into this array.
18
+ */
19
+ export declare const SEND_MODE_OPTIONS: SendModeOption[];
20
+ /**
21
+ * Clamp-free wrap-around index move. `delta` is +1 (down) / -1 (up).
22
+ * Pure — unit-tested independently of Ink.
23
+ */
24
+ export declare function nextSendModeIndex(selected: number, delta: number, len: number): number;
25
+ /** A minimal structural view of the key event — keeps the helper pure/testable. */
26
+ export interface SendModeKey {
27
+ upArrow?: boolean | undefined;
28
+ downArrow?: boolean | undefined;
29
+ return?: boolean | undefined;
30
+ escape?: boolean | undefined;
31
+ }
32
+ /**
33
+ * Map a keypress to a picker decision. Returns:
34
+ * - a `SendMode` when the user committed a choice (quick-key or Enter),
35
+ * - `'cancel'` on Esc,
36
+ * - `null` when the key only moves the selection / is irrelevant
37
+ * (the caller handles `↑/↓` movement separately).
38
+ *
39
+ * Pure: no Ink, no React. The single source of truth for key semantics.
40
+ */
41
+ export declare function sendModeFromKey(input: string, key: SendModeKey, selected: number): SendMode | 'cancel' | null;
42
+ export declare function formatSendModeMessagePreview(text: string, maxChars?: number): string;
43
+ export {};
44
+ //# sourceMappingURL=send-mode-model.d.ts.map
@@ -1,46 +1,6 @@
1
1
  import type React from 'react';
2
- /**
3
- * How a plain message typed mid-run should be delivered to the agent.
4
- * Mirrors the WebUI's `QueueMode` vocabulary (ChatInput.tsx).
5
- */
6
- export type SendMode = 'queue' | 'btw' | 'steer';
7
- interface SendModeOption {
8
- mode: SendMode;
9
- /** Quick-select key (lower-case). */
10
- key: string;
11
- label: string;
12
- description: string;
13
- color: string;
14
- }
15
- /**
16
- * The three delivery modes, Queue first so it is the default highlight and
17
- * the safest no-op-to-in-flight-work choice. Order is load-bearing: the
18
- * reducer indexes selection into this array.
19
- */
20
- export declare const SEND_MODE_OPTIONS: SendModeOption[];
21
- /**
22
- * Clamp-free wrap-around index move. `delta` is +1 (down) / -1 (up).
23
- * Pure — unit-tested independently of Ink.
24
- */
25
- export declare function nextSendModeIndex(selected: number, delta: number, len: number): number;
26
- /** A minimal structural view of the key event — keeps the helper pure/testable. */
27
- export interface SendModeKey {
28
- upArrow?: boolean | undefined;
29
- downArrow?: boolean | undefined;
30
- return?: boolean | undefined;
31
- escape?: boolean | undefined;
32
- }
33
- /**
34
- * Map a keypress to a picker decision. Returns:
35
- * - a `SendMode` when the user committed a choice (quick-key or Enter),
36
- * - `'cancel'` on Esc,
37
- * - `null` when the key only moves the selection / is irrelevant
38
- * (the caller handles `↑/↓` movement separately).
39
- *
40
- * Pure: no Ink, no React. The single source of truth for key semantics.
41
- */
42
- export declare function sendModeFromKey(input: string, key: SendModeKey, selected: number): SendMode | 'cancel' | null;
43
- export declare function formatSendModeMessagePreview(text: string, maxChars?: number): string;
2
+ import { type SendMode } from './send-mode-model.js';
3
+ export * from './send-mode-model.js';
44
4
  interface SendModePickerProps {
45
5
  selected: number;
46
6
  /** The message being routed, shown so the modal question has context. */
@@ -61,5 +21,4 @@ interface SendModePickerProps {
61
21
  * - Esc → cancel (caller restores the draft to the composer)
62
22
  */
63
23
  export declare function SendModePicker({ selected, messagePreview, onMove, onSelect, }: SendModePickerProps): React.ReactElement;
64
- export {};
65
24
  //# sourceMappingURL=send-mode-picker.d.ts.map
@@ -0,0 +1,10 @@
1
+ import type React from 'react';
2
+ import type { FleetEntry } from '../app-state.js';
3
+ export interface AgentsPanelSidebarProps {
4
+ entries: Record<string, FleetEntry>;
5
+ totalCost: number;
6
+ nowTick: number;
7
+ width: number;
8
+ }
9
+ export declare function AgentsPanelSidebar({ entries, totalCost, nowTick, width, }: AgentsPanelSidebarProps): React.ReactElement;
10
+ //# sourceMappingURL=sidebar-panel-agents.d.ts.map
@@ -0,0 +1,11 @@
1
+ import type React from 'react';
2
+ export interface ConnectionsPanelSidebarProps {
3
+ connections: readonly {
4
+ name: string;
5
+ status: 'ok' | 'warn' | 'down' | 'unknown';
6
+ latencyMs?: number | undefined;
7
+ }[];
8
+ width: number;
9
+ }
10
+ export declare function ConnectionsPanelSidebar({ connections, width, }: ConnectionsPanelSidebarProps): React.ReactElement;
11
+ //# sourceMappingURL=sidebar-panel-connections.d.ts.map
@@ -0,0 +1,11 @@
1
+ import type React from 'react';
2
+ export interface CoordinatorPanelSidebarProps {
3
+ running: boolean;
4
+ activePhases: number;
5
+ completedPhases: number;
6
+ phaseNames: readonly string[];
7
+ elapsedMs: number;
8
+ width: number;
9
+ }
10
+ export declare function CoordinatorPanelSidebar({ running, activePhases, completedPhases, phaseNames, elapsedMs, width, }: CoordinatorPanelSidebarProps): React.ReactElement;
11
+ //# sourceMappingURL=sidebar-panel-coordinator.d.ts.map
@@ -0,0 +1,16 @@
1
+ import type React from 'react';
2
+ import type { FleetEntry } from '../app-state.js';
3
+ export interface FleetPanelSidebarProps {
4
+ entries: Record<string, FleetEntry>;
5
+ /**
6
+ * Pre-computed running count from the caller. Retained for interface
7
+ * compatibility; the panel derives every displayed count (pill + chips)
8
+ * from `entries` so leader and subagents can never diverge.
9
+ */
10
+ runningCount: number;
11
+ /** Live tick (ms) — drives per-agent elapsed labels. Defaults to Date.now(). */
12
+ nowTick?: number | undefined;
13
+ width: number;
14
+ }
15
+ export declare function FleetPanelSidebar({ entries, nowTick, width, }: FleetPanelSidebarProps): React.ReactElement;
16
+ //# sourceMappingURL=sidebar-panel-fleet.d.ts.map
@@ -0,0 +1,12 @@
1
+ import type React from 'react';
2
+ import type { ProjectPickerItem } from './project-picker.js';
3
+ export interface ProjectPickerSidebarProps {
4
+ items: readonly ProjectPickerItem[];
5
+ selected: number;
6
+ filter: string;
7
+ hint?: string | undefined;
8
+ currentProject?: string | undefined;
9
+ width: number;
10
+ }
11
+ export declare function ProjectPickerSidebar({ items, selected, filter, hint, currentProject, width, }: ProjectPickerSidebarProps): React.ReactElement;
12
+ //# sourceMappingURL=sidebar-panel-project.d.ts.map
@@ -0,0 +1,10 @@
1
+ import type React from 'react';
2
+ import { type WorktreeRow } from '../ui-contracts.js';
3
+ export interface WorktreePanelSidebarProps {
4
+ worktrees: Record<string, WorktreeRow>;
5
+ /** Live tick (ms) — drives per-worktree age labels. Defaults to Date.now(). */
6
+ nowTick?: number | undefined;
7
+ width: number;
8
+ }
9
+ export declare function WorktreePanelSidebar({ worktrees, nowTick, width, }: WorktreePanelSidebarProps): React.ReactElement;
10
+ //# sourceMappingURL=sidebar-panel-worktree.d.ts.map
@@ -0,0 +1,25 @@
1
+ import type React from 'react';
2
+ import type { SidebarWrongProxy } from '../hooks/use-sidebar-panel-data.js';
3
+ export interface WrongProxyPanelSidebarProps {
4
+ /**
5
+ * Live probe state. When `null` (URL missing or probe disabled) the
6
+ * panel renders an idle placeholder inside the same frame so the
7
+ * layout never jumps when the toggle flips on mid-session.
8
+ */
9
+ proxy: SidebarWrongProxy | null;
10
+ width: number;
11
+ }
12
+ /**
13
+ * Sidebar twin for the live WrongProxy / WrongTrace daemon. Renders the
14
+ * proxy URL with its round-trip latency, the probe error detail when
15
+ * warn/down, and — when the daemon's `/api/health` body exposes them —
16
+ * the WrongTrace IPC socket path and daemon version.
17
+ *
18
+ * The panel is mounted only when `wrongProxyEnabled` is true at the
19
+ * `app-view-sidebar.tsx` gate — see the `wrongProxyEnabled` usage there.
20
+ * This component still defensively renders an empty-state when
21
+ * `proxy === null` so a mount/unmount race during a toggle flip does
22
+ * not flash an inconsistent card.
23
+ */
24
+ export declare function WrongProxyPanelSidebar({ proxy, width, }: WrongProxyPanelSidebarProps): React.ReactElement;
25
+ //# sourceMappingURL=sidebar-panel-wrong-proxy.d.ts.map
@@ -1,82 +1,13 @@
1
- import type React from 'react';
2
- import type { FleetEntry } from '../app-state.js';
3
- import type { SidebarWrongProxy } from '../hooks/use-sidebar-panel-data.js';
4
- import { type WorktreeRow } from '../ui-contracts.js';
5
- import type { ProjectPickerItem } from './project-picker.js';
6
- export interface ProjectPickerSidebarProps {
7
- items: readonly ProjectPickerItem[];
8
- selected: number;
9
- filter: string;
10
- hint?: string | undefined;
11
- currentProject?: string | undefined;
12
- width: number;
13
- }
14
- export declare function ProjectPickerSidebar({ items, selected, filter, hint, currentProject, width, }: ProjectPickerSidebarProps): React.ReactElement;
15
- export interface FleetPanelSidebarProps {
16
- entries: Record<string, FleetEntry>;
17
- /**
18
- * Pre-computed running count from the caller. Retained for interface
19
- * compatibility; the panel derives every displayed count (pill + chips)
20
- * from `entries` so leader and subagents can never diverge.
21
- */
22
- runningCount: number;
23
- /** Live tick (ms) — drives per-agent elapsed labels. Defaults to Date.now(). */
24
- nowTick?: number | undefined;
25
- width: number;
26
- }
27
- export declare function FleetPanelSidebar({ entries, nowTick, width, }: FleetPanelSidebarProps): React.ReactElement;
28
- export interface AgentsPanelSidebarProps {
29
- entries: Record<string, FleetEntry>;
30
- totalCost: number;
31
- nowTick: number;
32
- width: number;
33
- }
34
- export declare function AgentsPanelSidebar({ entries, totalCost, nowTick, width, }: AgentsPanelSidebarProps): React.ReactElement;
35
- export interface WorktreePanelSidebarProps {
36
- worktrees: Record<string, WorktreeRow>;
37
- /** Live tick (ms) — drives per-worktree age labels. Defaults to Date.now(). */
38
- nowTick?: number | undefined;
39
- width: number;
40
- }
41
- export declare function WorktreePanelSidebar({ worktrees, nowTick, width, }: WorktreePanelSidebarProps): React.ReactElement;
42
- export interface CoordinatorPanelSidebarProps {
43
- running: boolean;
44
- activePhases: number;
45
- completedPhases: number;
46
- phaseNames: readonly string[];
47
- elapsedMs: number;
48
- width: number;
49
- }
50
- export declare function CoordinatorPanelSidebar({ running, activePhases, completedPhases, phaseNames, elapsedMs, width, }: CoordinatorPanelSidebarProps): React.ReactElement;
51
- export interface ConnectionsPanelSidebarProps {
52
- connections: readonly {
53
- name: string;
54
- status: 'ok' | 'warn' | 'down' | 'unknown';
55
- latencyMs?: number | undefined;
56
- }[];
57
- width: number;
58
- }
59
- export declare function ConnectionsPanelSidebar({ connections, width, }: ConnectionsPanelSidebarProps): React.ReactElement;
60
- export interface WrongProxyPanelSidebarProps {
61
- /**
62
- * Live probe state. When `null` (URL missing or probe disabled) the
63
- * panel renders an idle placeholder inside the same frame so the
64
- * layout never jumps when the toggle flips on mid-session.
65
- */
66
- proxy: SidebarWrongProxy | null;
67
- width: number;
68
- }
69
1
  /**
70
- * Sidebar twin for the live WrongProxy / WrongTrace daemon. Renders the
71
- * proxy URL with its round-trip latency, the probe error detail when
72
- * warn/down, and — when the daemon's `/api/health` body exposes them —
73
- * the WrongTrace IPC socket path and daemon version.
74
- *
75
- * The panel is mounted only when `wrongProxyEnabled` is true at the
76
- * `app-view-sidebar.tsx` gate — see the `wrongProxyEnabled` usage there.
77
- * This component still defensively renders an empty-state when
78
- * `proxy === null` so a mount/unmount race during a toggle flip does
79
- * not flash an inconsistent card.
2
+ * Sidebar twins of the workspace F-key panels. Each twin lives in its own
3
+ * `sidebar-panel-<name>.tsx` module; this barrel keeps the historical import
4
+ * path stable for `sidebar-panels.tsx` and tests.
80
5
  */
81
- export declare function WrongProxyPanelSidebar({ proxy, width, }: WrongProxyPanelSidebarProps): React.ReactElement;
6
+ export { AgentsPanelSidebar, type AgentsPanelSidebarProps } from './sidebar-panel-agents.js';
7
+ export { ConnectionsPanelSidebar, type ConnectionsPanelSidebarProps, } from './sidebar-panel-connections.js';
8
+ export { CoordinatorPanelSidebar, type CoordinatorPanelSidebarProps, } from './sidebar-panel-coordinator.js';
9
+ export { FleetPanelSidebar, type FleetPanelSidebarProps } from './sidebar-panel-fleet.js';
10
+ export { ProjectPickerSidebar, type ProjectPickerSidebarProps } from './sidebar-panel-project.js';
11
+ export { WorktreePanelSidebar, type WorktreePanelSidebarProps } from './sidebar-panel-worktree.js';
12
+ export { WrongProxyPanelSidebar, type WrongProxyPanelSidebarProps, } from './sidebar-panel-wrong-proxy.js';
82
13
  //# sourceMappingURL=sidebar-panels-workspace.d.ts.map
@@ -1,5 +1,5 @@
1
- import type { RailSpanEntry } from "./powerline-rail.js";
2
- import { type StatusBarRailBuildParams } from "./status-bar-rails-common.js";
1
+ import type { RailSpanEntry } from './powerline-rail.js';
2
+ import { type StatusBarRailBuildParams } from './status-bar-rails-common.js';
3
3
  /**
4
4
  * Background activity: fleets, peers, services — plus the countdowns, which
5
5
  * tick every second and belong with the other things that arrive and leave
@@ -125,6 +125,12 @@ export interface StatusBarProps {
125
125
  * orange update notice on the status bar.
126
126
  */
127
127
  updateAvailable?: boolean | undefined;
128
+ /**
129
+ * A newer standalone build downloaded and waiting to be swapped in when
130
+ * the session exits. Replaces the "(update v…)" suffix, since there is
131
+ * nothing left to run: a restart picks it up.
132
+ */
133
+ updateReadyVersion?: string | undefined;
128
134
  state: 'idle' | 'running' | 'streaming' | 'aborting';
129
135
  /** Single word rendered in the rainbow working-state chip. */
130
136
  thinkingWord?: string | undefined;
@@ -22,5 +22,5 @@ export type { BrainStatusChip, ContextWindow, FleetAgentDetail, FleetCounts, Mai
22
22
  * the rendered entries themselves, so an empty rail never renders and a
23
23
  * vanilla session keeps its two-line footprint.
24
24
  */
25
- export declare const StatusBar: React.MemoExoticComponent<({ model, provider, version, latestVersion, updateAvailable, state, thinkingWord, thinkingAnimationStyle, tokenCounter, hint, queueCount, yolo, autonomy, fleetWorkingTime, todos, plan, tasks, fleet, fleetAgents, git, subagentCount, brain, projectName, workingDir, processCount, context, estimatedContextTokens, Sage, memoryContextMonitor, contextStrategy, hiddenItems, statuslineLines, statuslineDensities, statuslineOrder, mode, events, sessionId, eternalStage, goalSummary, droppedTools, indexState, breakerCountdown, modeLabel, promptVariant, themeName, debugStreamStats, enhanceCountdown, nextStepsAutoSubmitCountdown, nextStepsAutoSubmitLabel, autoProceedCountdown, sessionCount, mailbox, tokenSavingMode, toolCount, visibleChips, sideEffectCount, maxWidth, clickMapRef, }: StatusBarProps) => React.ReactElement>;
25
+ export declare const StatusBar: React.MemoExoticComponent<({ model, provider, version, latestVersion, updateAvailable, updateReadyVersion, state, thinkingWord, thinkingAnimationStyle, tokenCounter, hint, queueCount, yolo, autonomy, fleetWorkingTime, todos, plan, tasks, fleet, fleetAgents, git, subagentCount, brain, projectName, workingDir, processCount, context, estimatedContextTokens, Sage, memoryContextMonitor, contextStrategy, hiddenItems, statuslineLines, statuslineDensities, statuslineOrder, mode, events, sessionId, eternalStage, goalSummary, droppedTools, indexState, breakerCountdown, modeLabel, promptVariant, themeName, debugStreamStats, enhanceCountdown, nextStepsAutoSubmitCountdown, nextStepsAutoSubmitLabel, autoProceedCountdown, sessionCount, mailbox, tokenSavingMode, toolCount, visibleChips, sideEffectCount, maxWidth, clickMapRef, }: StatusBarProps) => React.ReactElement>;
26
26
  //# sourceMappingURL=status-bar.d.ts.map