@wrongstack/tui 0.313.1 → 0.316.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (171) hide show
  1. package/dist/app-action-type.d.ts +56 -0
  2. package/dist/app-initial-state.d.ts +2 -1
  3. package/dist/app-props.d.ts +45 -2
  4. package/dist/app-settings-type.d.ts +7 -0
  5. package/dist/app-state-core-types.d.ts +18 -0
  6. package/dist/app-state.d.ts +42 -0
  7. package/dist/app-status-region.d.ts +1 -1
  8. package/dist/app-view-contract.d.ts +2 -1
  9. package/dist/app-view-pickers.d.ts +2 -1
  10. package/dist/app-view-sidebar.d.ts +2 -1
  11. package/dist/brain-panel-model.d.ts +0 -2
  12. package/dist/checkpoint-retention.d.ts +2 -3
  13. package/dist/components/agents-monitor.d.ts +3 -3
  14. package/dist/components/auth-panel.d.ts +2 -1
  15. package/dist/components/brain-decision-prompt.d.ts +2 -1
  16. package/dist/components/clear-confirm-panel.d.ts +4 -3
  17. package/dist/components/composer-status-chip.d.ts +3 -2
  18. package/dist/components/confirm-prompt.d.ts +2 -1
  19. package/dist/components/context-panel.d.ts +2 -1
  20. package/dist/components/continue-confirm-panel.d.ts +3 -2
  21. package/dist/components/coordinator-panel.d.ts +2 -1
  22. package/dist/components/cron-jobs.d.ts +2 -1
  23. package/dist/components/design-picker.d.ts +2 -1
  24. package/dist/components/enhance-panel.d.ts +4 -3
  25. package/dist/components/esc-confirm-prompt.d.ts +2 -1
  26. package/dist/components/exit-confirm-panel.d.ts +3 -2
  27. package/dist/components/f-key-picker.d.ts +1 -2
  28. package/dist/components/fallback-overlay.d.ts +2 -1
  29. package/dist/components/fleet-monitor.d.ts +2 -1
  30. package/dist/components/fleet-panel.d.ts +4 -4
  31. package/dist/components/goal-kanban-panel.d.ts +2 -1
  32. package/dist/components/help-overlay.d.ts +2 -1
  33. package/dist/components/help-panel.d.ts +2 -1
  34. package/dist/components/history/code-block-diff-helpers.d.ts +1 -6
  35. package/dist/components/history/code-block.d.ts +0 -2
  36. package/dist/components/history/copy-registry.d.ts +2 -1
  37. package/dist/components/history/index.d.ts +2 -2
  38. package/dist/components/history/replay.d.ts +2 -1
  39. package/dist/components/history/sage-memory-block.d.ts +0 -6
  40. package/dist/components/history/scroll-controller-types.d.ts +7 -12
  41. package/dist/components/history/selection-band-store.d.ts +3 -2
  42. package/dist/components/history/selection-helpers.d.ts +24 -65
  43. package/dist/components/history/tool-card.d.ts +2 -1
  44. package/dist/components/history/tool-group.d.ts +0 -7
  45. package/dist/components/history/use-history-controller.d.ts +2 -1
  46. package/dist/components/history/utils.d.ts +1 -1
  47. package/dist/components/history/wrap-geometry.d.ts +18 -125
  48. package/dist/components/history.d.ts +1 -1
  49. package/dist/components/kanban-panel.d.ts +7 -25
  50. package/dist/components/live-activity-strip.d.ts +2 -1
  51. package/dist/components/mailbox-panel.d.ts +2 -1
  52. package/dist/components/mcp-picker.d.ts +2 -1
  53. package/dist/components/mode-picker.d.ts +2 -1
  54. package/dist/components/model-picker.d.ts +2 -1
  55. package/dist/components/monitor-shell.d.ts +3 -2
  56. package/dist/components/phase-monitor.d.ts +2 -1
  57. package/dist/components/plan-panel.d.ts +3 -2
  58. package/dist/components/plugin-picker.d.ts +2 -1
  59. package/dist/components/powerline-rail.d.ts +2 -1
  60. package/dist/components/project-picker.d.ts +2 -1
  61. package/dist/components/prompt-picker.d.ts +2 -1
  62. package/dist/components/refine-countdown-panel.d.ts +3 -2
  63. package/dist/components/refine-failure-panel.d.ts +2 -1
  64. package/dist/components/resource-menu.d.ts +2 -1
  65. package/dist/components/resume-picker.d.ts +2 -1
  66. package/dist/components/scrollable-history.d.ts +2 -2
  67. package/dist/components/send-mode-picker.d.ts +3 -2
  68. package/dist/components/sessions-panel.d.ts +2 -1
  69. package/dist/components/settings-picker-filter.d.ts +2 -1
  70. package/dist/components/settings-picker.d.ts +3 -1
  71. package/dist/components/shadow-panel.d.ts +2 -1
  72. package/dist/components/shell-command-warning.d.ts +2 -1
  73. package/dist/components/sidebar-content.d.ts +4 -9
  74. package/dist/components/sidebar-panel-frame.d.ts +2 -13
  75. package/dist/components/sidebar.d.ts +2 -1
  76. package/dist/components/skill-picker.d.ts +2 -1
  77. package/dist/components/slash-confirm-panel.d.ts +3 -2
  78. package/dist/components/slash-menu.d.ts +2 -1
  79. package/dist/components/status-bar-format.d.ts +2 -0
  80. package/dist/components/status-bar-icons.d.ts +4 -0
  81. package/dist/components/status-bar-rails.d.ts +19 -6
  82. package/dist/components/status-bar-types.d.ts +18 -0
  83. package/dist/components/status-bar.d.ts +17 -7
  84. package/dist/components/status-line-registry.d.ts +62 -0
  85. package/dist/components/statusline-picker.d.ts +5 -27
  86. package/dist/components/theme-picker.d.ts +2 -1
  87. package/dist/components/theme-preview.d.ts +2 -1
  88. package/dist/components/tools-picker.d.ts +2 -1
  89. package/dist/components/topic-check-panel.d.ts +2 -1
  90. package/dist/connections-slash.d.ts +2 -1
  91. package/dist/context-fill.d.ts +4 -3
  92. package/dist/context-slash.d.ts +3 -2
  93. package/dist/cron-slash.d.ts +2 -1
  94. package/dist/esc-close-panels.d.ts +2 -1
  95. package/dist/f-key-panels.d.ts +1 -1
  96. package/dist/git-info.d.ts +22 -3
  97. package/dist/height-cache.d.ts +2 -8
  98. package/dist/history-entry.d.ts +4 -3
  99. package/dist/history-retention.d.ts +16 -6
  100. package/dist/hit-test.d.ts +2 -1
  101. package/dist/hooks/subagent-history-format.d.ts +2 -1
  102. package/dist/hooks/use-app-session-state.d.ts +2 -1
  103. package/dist/hooks/use-auth-panel.d.ts +2 -1
  104. package/dist/hooks/use-brain-panel.d.ts +2 -1
  105. package/dist/hooks/use-chip-staleness-guard.d.ts +4 -3
  106. package/dist/hooks/use-core-tui-commands.d.ts +1 -1
  107. package/dist/hooks/use-director-fleet-bridge.d.ts +2 -4
  108. package/dist/hooks/use-exit-command.d.ts +1 -1
  109. package/dist/hooks/use-file-search.d.ts +3 -7
  110. package/dist/hooks/use-fleet-generation-gate.d.ts +2 -1
  111. package/dist/hooks/use-git-session-status.d.ts +1 -1
  112. package/dist/hooks/use-history-archive.d.ts +3 -2
  113. package/dist/hooks/use-input-history-persistence.d.ts +2 -1
  114. package/dist/hooks/use-mode-picker.d.ts +2 -1
  115. package/dist/hooks/use-model-pick.d.ts +2 -1
  116. package/dist/hooks/use-next-steps-auto-submit.d.ts +2 -2
  117. package/dist/hooks/use-panel-controllers.d.ts +3 -1
  118. package/dist/hooks/use-paste-handling.d.ts +2 -1
  119. package/dist/hooks/use-prompt-picker.d.ts +4 -3
  120. package/dist/hooks/use-session-rewind.d.ts +2 -1
  121. package/dist/hooks/use-shadow-panel.d.ts +2 -1
  122. package/dist/hooks/use-sidebar-panel-data.d.ts +4 -3
  123. package/dist/hooks/use-status-sync-interval.d.ts +2 -1
  124. package/dist/hooks/use-statusline-hidden-sync.d.ts +2 -1
  125. package/dist/hooks/use-statusline-state.d.ts +9 -3
  126. package/dist/hooks/use-stream-chip-expiration.d.ts +3 -2
  127. package/dist/hooks/use-terminal-size.d.ts +3 -2
  128. package/dist/hooks/use-theme-picker-handler.d.ts +2 -1
  129. package/dist/hooks/use-tui-activity.d.ts +2 -1
  130. package/dist/hooks/use-tui-controllers.d.ts +2 -1
  131. package/dist/hooks/use-tui-environment-state.d.ts +7 -5
  132. package/dist/hooks/use-tui-event-bridge.d.ts +1 -1
  133. package/dist/index.js +8509 -8341
  134. package/dist/ink.d.ts +1 -1
  135. package/dist/input-editing.d.ts +2 -1
  136. package/dist/input-tokens.d.ts +2 -1
  137. package/dist/input-validation/action-types.d.ts +1 -1
  138. package/dist/input-validation.d.ts +4 -4
  139. package/dist/kanban-slash.d.ts +8 -32
  140. package/dist/layout-store.d.ts +2 -1
  141. package/dist/markdown-table.d.ts +1 -3
  142. package/dist/memory-context-monitor.d.ts +3 -2
  143. package/dist/memory-lifecycle-entry.d.ts +2 -1
  144. package/dist/memory-slash-format.d.ts +0 -1
  145. package/dist/mouse.d.ts +3 -2
  146. package/dist/overlay-key-router.d.ts +5 -4
  147. package/dist/paste-accumulator.d.ts +3 -2
  148. package/dist/prompt-refinement-start.d.ts +1 -1
  149. package/dist/reducers/composer.d.ts +1 -1
  150. package/dist/reducers/conversation.d.ts +1 -1
  151. package/dist/reducers/helpers.d.ts +16 -3
  152. package/dist/resume-load.d.ts +131 -0
  153. package/dist/run-blocks-controller.d.ts +2 -1
  154. package/dist/run-tui-client-registration.d.ts +3 -2
  155. package/dist/run-tui-options.d.ts +35 -2
  156. package/dist/run-tui-teardown.d.ts +2 -1
  157. package/dist/run-tui-title-controller.d.ts +2 -1
  158. package/dist/scroll-anchor.d.ts +2 -4
  159. package/dist/slash-command-lifecycle.d.ts +2 -1
  160. package/dist/submit-history.d.ts +2 -1
  161. package/dist/submit-prompt-refinement.d.ts +3 -2
  162. package/dist/terminal-title.d.ts +2 -1
  163. package/dist/theme.d.ts +2 -2
  164. package/dist/token-previews.d.ts +2 -1
  165. package/dist/tui-host-capabilities.d.ts +1 -1
  166. package/dist/tui-memory-counters.d.ts +2 -1
  167. package/dist/ui-contracts.d.ts +1 -1
  168. package/dist/ui-glyphs.d.ts +3 -1
  169. package/dist/workbench-slash.d.ts +2 -1
  170. package/package.json +9 -9
  171. package/dist/react-children-flatten.d.ts +0 -28
@@ -1,14 +1,24 @@
1
1
  import type React from 'react';
2
2
  import type { StatusBarProps } from './status-bar-types.js';
3
3
  export { contextBarColor, fmtElapsed, hasTokenDisplay, nodeText, planChipFit, renderMeter, renderProgress, stateChip, type TokenDisplayTotals, tokenDisplayTotals, truncateChip, } from './status-bar-format.js';
4
- export { chipColor, COMPACT_THRESHOLD, LINE_BG_COLORS, SPINNER_FRAMES, SPINNER_INTERVAL_MS, STACK_ORANGE, STATUSLINE_ICONS, } from './status-bar-icons.js';
4
+ export { chipColor, SPINNER_INTERVAL_MS, STACK_ORANGE, STATUSLINE_ICONS } from './status-bar-icons.js';
5
5
  export type { BrainStatusChip, ContextWindow, FleetAgentDetail, FleetCounts, MailboxStatus, PlanCounts, StatusBarProps, TaskCounts, TodoCounts, } from './status-bar-types.js';
6
6
  /**
7
- * Two-line status bar. The first line stays compact and shows the
8
- * workspace route followed by provider/model, context, tokens, cost, queue,
9
- * and other runtime essentials. The second line opts in only when there's actually something
10
- * to show — git branch, elapsed time, todo counts, YOLO marker — so a
11
- * vanilla session keeps the original single-line footprint.
7
+ * Four-rail status bar — one semantic question per line, left-to-right in
8
+ * descending importance:
9
+ *
10
+ * L1 workspace & identity (static): project, working_dir, git, model, mode,
11
+ * prompt_variant, theme, sessions, tools; version right-anchored.
12
+ * L2 run state, safety & vitals (live): state, yolo, autonomy,
13
+ * eternal_stage, breaker, ctx·tokens·cost·cache, queue, processes,
14
+ * elapsed, token_saving, side_effects; hint last (first dropped).
15
+ * L3 active work & countdowns (conditional): goal, todos, plan, tasks,
16
+ * next_steps, auto_proceed, enhance, dropped_tools.
17
+ * L4 fleet, connectivity & services (conditional): fleet, mailbox, brain,
18
+ * debug_stream, memory; index right-anchored.
19
+ *
20
+ * L3/L4 gates derive from the rendered entries themselves, so an empty rail
21
+ * never renders and a vanilla session keeps its two-line footprint.
12
22
  */
13
- export declare function StatusBar({ 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, mode, events, sessionId, eternalStage, goalSummary, droppedTools, indexState, breakerCountdown, modeLabel, debugStreamStats, enhanceCountdown, nextStepsAutoSubmitCountdown, nextStepsAutoSubmitLabel, autoProceedCountdown, sessionCount, mailbox, tokenSavingMode, toolCount, visibleChips, sideEffectCount, maxWidth, clickMapRef, }: StatusBarProps): React.ReactElement;
23
+ export declare function StatusBar({ 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, 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;
14
24
  //# sourceMappingURL=status-bar.d.ts.map
@@ -0,0 +1,62 @@
1
+ import type React from 'react';
2
+ import { type StatuslineItem, type StatuslineLine, type StatuslineLines } from '@wrongstack/core/statusline';
3
+ import type { RailSpanEntry } from './powerline-rail.js';
4
+ import { type StatusBarRailBuildParams } from './status-bar-rails.js';
5
+ /**
6
+ * Status-line registry — the composition layer between the chip contract
7
+ * (`@wrongstack/core/statusline`) and the rail builders in
8
+ * `status-bar-rails.tsx`.
9
+ *
10
+ * The builders stay the single source of chip JSX + data gating; this module
11
+ * owns WHERE each built entry renders: it maps every rail entry id to its
12
+ * canonical chip key, applies the user's per-chip line assignment
13
+ * (`StatuslineLines`), and places the right-anchored chips (version, index)
14
+ * on their assigned line. With default lines the partition is byte-identical
15
+ * to the pre-registry four-rail composition, which the
16
+ * `status-bar-rail-order` / `status-bar-separators` suites pin.
17
+ */
18
+ /** A rail (physical status bar line) in the detailed layout: left chips in
19
+ * render order plus an optional right-anchored chip. */
20
+ export interface DetailedRail {
21
+ entries: RailSpanEntry[];
22
+ rightAnchor: React.ReactElement | null;
23
+ }
24
+ /**
25
+ * Map a rail entry id to its canonical statusline chip key.
26
+ *
27
+ * Composite and detail spans carry synthetic ids that travel with their
28
+ * parent chip: `primary-0` is the ctx·tokens·cost·cache telemetry composite
29
+ * (key `context`), `detail-N` are the mailbox peer/detail chips (key
30
+ * `mailbox`), and `memory-N` are the memory-context group (key
31
+ * `memory_context`). Returns null for ids outside the contract — those fall
32
+ * back to their builder's default line.
33
+ */
34
+ export declare function canonicalChipKey(entryId: string): StatuslineItem | null;
35
+ /** One builder's output plus the line its unmapped ids fall back to. */
36
+ export interface RailSource {
37
+ entries: RailSpanEntry[];
38
+ fallbackLine: StatuslineLine;
39
+ }
40
+ /**
41
+ * Partition built rail entries into four lines. Pure — no builder calls, so
42
+ * tests can exercise line assignment with synthetic entries.
43
+ */
44
+ export declare function partitionRailEntries(sources: readonly RailSource[], lines?: StatuslineLines): DetailedRail[];
45
+ export interface DetailedRailBuildOptions {
46
+ /** Pre-built provider/model chip (status-bar.tsx owns its dim-provider styling). */
47
+ modelChip: React.ReactElement | null;
48
+ /** `v{version} (update …)` chip, right-anchored on its assigned line. */
49
+ versionChip: React.ReactElement | null;
50
+ /** Codebase-index health chip, right-anchored on its assigned line. */
51
+ indexChip: React.ReactElement | null;
52
+ /** Per-chip line overrides; absent = `DEFAULT_LINES`. */
53
+ lines?: StatuslineLines | undefined;
54
+ }
55
+ /**
56
+ * Build the four detailed-mode rails: run the rail builders (which apply
57
+ * each chip's data + hidden gates), then partition the surviving entries by
58
+ * the user's line assignment. Rails are returned in logical order 1–4;
59
+ * rendering/click-map code decides which rails render.
60
+ */
61
+ export declare function buildDetailedRails(p: StatusBarRailBuildParams, opts: DetailedRailBuildOptions): DetailedRail[];
62
+ //# sourceMappingURL=status-line-registry.d.ts.map
@@ -1,12 +1,8 @@
1
1
  import type React from 'react';
2
- /** All possible statusline chip keys.
3
-
4
- * NOTE: `'cpu'` and `'memory'` were removed — CPU/RAM/heap metrics now live
5
- * in the right sidebar's SYSTEM card (sidebar-content.tsx). Any stale entries
6
- * in a saved statusline profile are silently ignored by `showChip` since no
7
- * chip renders them anymore, mirroring how removed phantom items ('version',
8
- * 'time', 'sage') are handled. */
9
- export type StatuslineItem = 'state' | 'model' | 'tokens' | 'cache' | 'queue' | 'hint' | 'index' | 'breaker' | 'todos' | 'plan' | 'tasks' | 'fleet' | 'fleet_agents' | 'git' | 'elapsed' | 'context' | 'cost' | 'processes' | 'working_dir' | 'project' | 'yolo' | 'autonomy' | 'eternal_stage' | 'goal' | 'mode' | 'auto_proceed' | 'sessions' | 'tools' | 'token_saving' | 'brain' | 'mailbox' | 'enhance' | 'debug_stream' | 'next_steps' | 'memory_context' | 'side_effects';
2
+ import { DEFAULT_LINES, STATUSLINE_FIELD_COUNT, STATUSLINE_ITEMS, type StatuslineItem } from '@wrongstack/core/statusline';
3
+ export { DEFAULT_LINES, STATUSLINE_FIELD_COUNT, STATUSLINE_ITEMS };
4
+ export { DEFAULT_LINES as ITEM_LINE };
5
+ export type { StatuslineItem };
10
6
  /**
11
7
  * Metadata for a temporarily-visible chip (one that appeared due to data,
12
8
  * not user toggle). Tracked so the chip can auto-expire.
@@ -33,19 +29,7 @@ export declare function isChipExpired(meta: ChipMeta, now?: number): boolean;
33
29
  * Returns null if the chip has no expiration or has already expired.
34
30
  */
35
31
  export declare function getExpiresInLabel(meta: ChipMeta, now?: number): string | null;
36
- /**
37
- * Which TUI status bar line each chip appears on. Used to group chips
38
- * visually in the picker. MUST mirror the actual render lines in
39
- * `status-bar.tsx`: line 1 = workspace + runtime chips (mode/project/workdir
40
- * state + cheap provider/model/context telemetry), line 2 = session context
41
- * (memory pressure, git, mode label, tools), line 3 = active work +
42
- * connectivity (todos, plan, tasks, fleet, brain, mailbox, goals,
43
- * countdowns), line 4 = background services (memory context lifecycle,
44
- * codebase-index server health). Exported so the navigation-order test guards
45
- * against drift instead of duplicating it.
46
- */
47
- export declare const ITEM_LINE: Record<StatuslineItem, number>;
48
- export interface StatuslinePickerProps {
32
+ interface StatuslinePickerProps {
49
33
  /** Focused field index. */
50
34
  field: number;
51
35
  /** Current hidden-items list. */
@@ -55,11 +39,5 @@ export interface StatuslinePickerProps {
55
39
  /** Optional hint message from the reducer. */
56
40
  hint?: string | undefined;
57
41
  }
58
- /** Total number of statusline fields. */
59
- export declare const STATUSLINE_FIELD_COUNT: number;
60
- /** Ordered list of statusline items — grouped by display line, then alphabetically within each line for consistent navigation. */
61
- export declare const STATUSLINE_ITEMS: StatuslineItem[];
62
- /** Stream-triggered chips — these auto-expire unless the user has toggled them on permanently. */
63
- export declare const STREAM_CHIP_KEYS: StatuslineItem[];
64
42
  export declare function StatuslinePicker({ field, hiddenItems, visibleChips, hint, }: StatuslinePickerProps): React.ReactElement;
65
43
  //# sourceMappingURL=statusline-picker.d.ts.map
@@ -1,6 +1,6 @@
1
1
  import type React from 'react';
2
2
  import type { ThemeName, ThemePickerOption } from '../theme.js';
3
- export interface ThemePickerProps {
3
+ interface ThemePickerProps {
4
4
  options: readonly ThemePickerOption[];
5
5
  selected: number;
6
6
  activeId: ThemeName;
@@ -42,4 +42,5 @@ export interface ThemePickerProps {
42
42
  * preview header, which is what frees the list to show more rows.
43
43
  */
44
44
  export declare function ThemePicker({ options, selected, activeId, hint, columns, maxRows, }: ThemePickerProps): React.ReactElement;
45
+ export {};
45
46
  //# sourceMappingURL=theme-picker.d.ts.map
@@ -1,6 +1,6 @@
1
1
  import type React from 'react';
2
2
  import { type ThemeName } from '../theme.js';
3
- export interface ThemePreviewProps {
3
+ interface ThemePreviewProps {
4
4
  /** Preset whose palette this preview renders. Must exist in `themePresets`. */
5
5
  presetId: ThemeName;
6
6
  /** Whether this preset is the currently applied one (`[active]` marker). */
@@ -36,4 +36,5 @@ export interface ThemePreviewProps {
36
36
  * passes hex through untouched.
37
37
  */
38
38
  export declare function ThemePreview({ presetId, active, columns, maxRows, }: ThemePreviewProps): React.ReactElement;
39
+ export {};
39
40
  //# sourceMappingURL=theme-preview.d.ts.map
@@ -10,7 +10,7 @@ export interface ToolPickerItem {
10
10
  descMode: 'extend' | 'simple';
11
11
  description: string;
12
12
  }
13
- export interface ToolsPickerProps {
13
+ interface ToolsPickerProps {
14
14
  items: ToolPickerItem[];
15
15
  selected: number;
16
16
  busy?: boolean | undefined;
@@ -18,4 +18,5 @@ export interface ToolsPickerProps {
18
18
  filter?: string | undefined;
19
19
  }
20
20
  export declare function ToolsPicker({ items, selected, busy, hint, filter, }: ToolsPickerProps): React.ReactElement;
21
+ export {};
21
22
  //# sourceMappingURL=tools-picker.d.ts.map
@@ -1,7 +1,8 @@
1
1
  import type React from 'react';
2
- export interface TopicCheckPanelProps {
2
+ interface TopicCheckPanelProps {
3
3
  prompt: string;
4
4
  }
5
5
  /** Short-lived submit gate shown only when local continuity checks are ambiguous. */
6
6
  export declare function TopicCheckPanel({ prompt }: TopicCheckPanelProps): React.ReactElement;
7
+ export {};
7
8
  //# sourceMappingURL=topic-check-panel.d.ts.map
@@ -1,5 +1,5 @@
1
1
  import type { SlashCommand } from '@wrongstack/core/types';
2
- export interface ConnectionsSlashDeps {
2
+ interface ConnectionsSlashDeps {
3
3
  onPanelOpen?: {
4
4
  current: ((action: string) => boolean) | null;
5
5
  } | undefined;
@@ -9,4 +9,5 @@ export interface ConnectionsSlashDeps {
9
9
  * opens the interactive service health panel and emits nothing to chat history.
10
10
  */
11
11
  export declare function createConnectionsSlashCommand(deps: ConnectionsSlashDeps): SlashCommand;
12
+ export {};
12
13
  //# sourceMappingURL=connections-slash.d.ts.map
@@ -13,7 +13,7 @@
13
13
  * This module is the single place that decides *which* number the chip shows.
14
14
  * It is pure so the precedence can be tested without rendering the App.
15
15
  */
16
- export interface ContextFillInputs {
16
+ interface ContextFillInputs {
17
17
  /**
18
18
  * Tokens reported by the agent loop's `ctx.pct` event
19
19
  * (`state.leader.ctxTokens`). Authoritative: it anchors on the provider's real
@@ -31,8 +31,8 @@ export interface ContextFillInputs {
31
31
  /** Live per-model context ceiling. */
32
32
  maxContext: number;
33
33
  }
34
- export type ContextFillSource = 'loop' | 'provider' | 'local' | 'none';
35
- export interface ContextFillResult {
34
+ type ContextFillSource = 'loop' | 'provider' | 'local' | 'none';
35
+ interface ContextFillResult {
36
36
  /** Tokens to display as "used". Always `<= maxContext` (and `>= 0`). */
37
37
  used: number;
38
38
  /**
@@ -58,4 +58,5 @@ export interface ContextFillResult {
58
58
  * valid answer to "how full is the context window?".
59
59
  */
60
60
  export declare function resolveContextFill(inputs: ContextFillInputs): ContextFillResult;
61
+ export {};
61
62
  //# sourceMappingURL=context-fill.d.ts.map
@@ -1,5 +1,5 @@
1
1
  import type { SlashCommand } from '@wrongstack/core/types';
2
- export interface ContextSlashDeps {
2
+ interface ContextSlashDeps {
3
3
  /** Bridge from slash-command execution to the mounted TUI reducer. */
4
4
  onPanelOpen?: {
5
5
  current: ((action: string) => boolean) | null;
@@ -16,7 +16,7 @@ export interface ContextSlashDeps {
16
16
  */
17
17
  fallback?: SlashCommand | undefined;
18
18
  }
19
- export interface ContextPanelSummary {
19
+ interface ContextPanelSummary {
20
20
  contextPct?: number | undefined;
21
21
  contextTokens?: number | undefined;
22
22
  contextMaxTokens?: number | undefined;
@@ -43,4 +43,5 @@ export declare function contextBar(pct: number, width: number): string;
43
43
  */
44
44
  export declare function createContextSlashCommand(deps: ContextSlashDeps): SlashCommand;
45
45
  export declare function formatContextPanelSummary(summary: ContextPanelSummary | undefined): string;
46
+ export {};
46
47
  //# sourceMappingURL=context-slash.d.ts.map
@@ -24,11 +24,12 @@ export interface CronListResult {
24
24
  jobs: CronJobView[];
25
25
  error?: string | undefined;
26
26
  }
27
- export interface CronSlashDeps {
27
+ interface CronSlashDeps {
28
28
  getCronJobs: () => Promise<CronListResult>;
29
29
  }
30
30
  /** Build the shared cron-list loader used by both the slash command and panel. */
31
31
  export declare function createCronJobsGetter(agent: Pick<Agent, 'ctx' | 'tools'>): () => Promise<CronListResult>;
32
32
  export declare function createCronSlashCommand(deps: CronSlashDeps): SlashCommand;
33
33
  export declare function renderCronList(result: CronListResult): string;
34
+ export {};
34
35
  //# sourceMappingURL=cron-slash.d.ts.map
@@ -23,7 +23,7 @@
23
23
  * in the table as a safety net in case those earlier handlers change.
24
24
  */
25
25
  import type { Action, State } from './app-reducer.js';
26
- export interface EscCloseEntry {
26
+ interface EscCloseEntry {
27
27
  /** Human-readable name for debugging and tests. */
28
28
  name: string;
29
29
  /** Whether this panel is currently open. */
@@ -49,4 +49,5 @@ export declare function escCloseAction(state: State): Action | null;
49
49
  * the run on the same keypress.
50
50
  */
51
51
  export declare function escSelfOwnedPanelOpen(state: State): boolean;
52
+ export {};
52
53
  //# sourceMappingURL=esc-close-panels.d.ts.map
@@ -2,7 +2,7 @@ import type { Action } from './app-action-type.js';
2
2
  import type { StatuslineItem } from './components/statusline-picker.js';
3
3
  export type FKeyPanelAction = 'projectPickerOpen' | 'toggleMonitor' | 'toggleAgentsMonitor' | 'toggleWorktreeMonitor' | 'togglePlanPanel' | 'toggleTodosMonitor' | 'toggleQueuePanel' | 'toggleProcessList' | 'toggleKanbanPanel' | 'toggleGoalPanel' | 'toggleSessionsPanel' | 'toggleCoordinatorMonitor' | 'toggleCronMonitor' | 'toggleConnectionsPanel' | 'statuslineOpen';
4
4
  /** Host-side action keys that require work beyond a reducer dispatch. */
5
- export type FKeyHostAction = 'openProjectPicker' | 'loadLiveSessions' | 'openStatuslinePicker';
5
+ type FKeyHostAction = 'openProjectPicker' | 'loadLiveSessions' | 'openStatuslinePicker';
6
6
  /** A single F-key panel entry shared by the picker, help overlay, and tests. */
7
7
  export interface FKeyPanelEntry {
8
8
  key: number;
@@ -12,9 +12,28 @@ export interface GitInfo {
12
12
  * when the directory isn't a git repository or git isn't installed —
13
13
  * the status bar just hides the git chip in that case.
14
14
  *
15
- * Spawns two short-lived `git` processes in parallel. Cheap enough to
16
- * call on a 3–5 second interval; the caller is responsible for the
17
- * cadence (this function is purely fire-and-result).
15
+ * Spawns TWO short-lived `git` processes in parallel — `status
16
+ * --porcelain=v2 --branch` (branch name, detached OID, untracked count) and
17
+ * `diff HEAD --numstat` (line counts). It used to be three: `branch
18
+ * --show-current` was its own spawn, plus a fourth `rev-parse --short`
19
+ * whenever HEAD was detached. Porcelain v2's `# branch.oid` / `# branch.head`
20
+ * header carries both, so those spawns are gone.
21
+ *
22
+ * Process spawn is the dominant cost here (~40-80ms each on Windows), not
23
+ * git's own work, so spawn count is the number that matters. The caller owns
24
+ * the cadence and should skip calling this when nothing has changed — see
25
+ * `use-git-session-status.ts`.
18
26
  */
19
27
  export declare function readGitInfo(cwd: string): Promise<GitInfo | null>;
28
+ /**
29
+ * Collapse porcelain v2's branch header into the chip's single label.
30
+ *
31
+ * `branch.head` is the branch name, or the literal `(detached)`. On a
32
+ * detached HEAD we render the short OID so the chip is never blank;
33
+ * `branch.oid` is `(initial)` in a repo with no commits yet, which is not a
34
+ * SHA and must not be shown as one. OID length depends on the repo's object
35
+ * format — 40 hex for SHA-1 repos, 64 for SHA-256 (`git init
36
+ * --object-format=sha256`) — so both bounds are accepted.
37
+ */
38
+ export declare function branchLabel(head: string, oid: string): string;
20
39
  //# sourceMappingURL=git-info.d.ts.map
@@ -9,13 +9,6 @@
9
9
  * This module is pure TypeScript — no React, no Ink, no DOM dependencies.
10
10
  * It can be unit-tested without mounting components.
11
11
  */
12
- /**
13
- * Default height (in terminal rows) assumed for an entry before its first
14
- * measurement. 3 rows is a reasonable floor for a single-line entry
15
- * (border + content + margin) and prevents a flash of zero-height spacers
16
- * during the first render pass.
17
- */
18
- export declare const DEFAULT_ENTRY_HEIGHT = 3;
19
12
  /**
20
13
  * Prefix-sum-based height cache for history entries.
21
14
  *
@@ -147,7 +140,7 @@ export declare class EntryHeightCache {
147
140
  * Returns a result with `startIdx`, `endIdx`, `spacerAbove`, and `spacerBelow`
148
141
  * that the caller uses to render only the visible window.
149
142
  */
150
- export interface ComputeWindowResult {
143
+ interface ComputeWindowResult {
151
144
  /** Index of the first entry to render (inclusive). */
152
145
  startIdx: number;
153
146
  /** Index of the last entry to render (exclusive, like Array.slice end). */
@@ -174,4 +167,5 @@ export interface ComputeWindowResult {
174
167
  * @returns A {@link ComputeWindowResult} describing the visible slice.
175
168
  */
176
169
  export declare function computeWindow(totalHeight: number, viewportRows: number, scrollOffset: number, entryCount: number, cache: EntryHeightCache): ComputeWindowResult;
170
+ export {};
177
171
  //# sourceMappingURL=height-cache.d.ts.map
@@ -1,6 +1,6 @@
1
1
  /** Render-neutral conversation entry contracts retained by TUI state. */
2
2
  /** One seat's observable vote. No hidden chain-of-thought is retained. */
3
- export interface BrainCouncilSeatTrace {
3
+ interface BrainCouncilSeatTrace {
4
4
  seatId: string;
5
5
  persona: string;
6
6
  status: 'valid' | 'invalid' | 'failed' | 'cancelled';
@@ -19,7 +19,7 @@ export interface BrainCouncilSeatTrace {
19
19
  * the bus but no surface consumed them, so a slow, costly decision looked
20
20
  * identical to a free policy one.
21
21
  */
22
- export interface BrainCouncilTrace {
22
+ interface BrainCouncilTrace {
23
23
  resolution: string;
24
24
  configuredSeatCount: number;
25
25
  validVoteCount: number;
@@ -40,7 +40,7 @@ export interface AutonomyAgentStatus {
40
40
  /** Optional detail line (risk level, interval, model, etc.). */
41
41
  detail?: string | undefined;
42
42
  }
43
- export interface MemoryScoreTerm {
43
+ interface MemoryScoreTerm {
44
44
  label: string;
45
45
  value: number;
46
46
  }
@@ -272,4 +272,5 @@ export type HistoryEntry = {
272
272
  text: string;
273
273
  detail?: string | undefined;
274
274
  };
275
+ export {};
275
276
  //# sourceMappingURL=history-entry.d.ts.map
@@ -8,17 +8,27 @@ export declare const TUI_HISTORY_MAX_ENTRIES = 400;
8
8
  export declare const TUI_HISTORY_MAX_BYTES: number;
9
9
  /** No single display entry may monopolize the aggregate history budget. */
10
10
  export declare const TUI_HISTORY_MAX_ENTRY_BYTES: number;
11
- /**
12
- * Enforce the per-entry display budget before aggregate history retention.
13
- * Common text entries keep a readable prefix; unusual oversized structured
14
- * entries degrade to a small marker rather than retaining an unbounded graph.
15
- */
16
- export declare function retainTuiHistoryEntry(entry: HistoryEntry, maxBytes?: number): HistoryEntry;
17
11
  export interface TuiHistoryBudget {
18
12
  maxEntries?: number | undefined;
19
13
  maxBytes?: number | undefined;
20
14
  maxEntryBytes?: number | undefined;
21
15
  }
16
+ /**
17
+ * Retention budget for a session the user explicitly resumed.
18
+ *
19
+ * The live budget (400 entries / 1 MB) sizes a scrollback window that grows a
20
+ * few entries at a time and is backed by a journal the user can always reopen.
21
+ * A resume is the opposite: the whole conversation arrives at once and IS what
22
+ * was asked for. Measured on this corpus, a 131 MB journal replays to 740
23
+ * entries / 1.28 MB — under the live budget it lost 340 of them to the count
24
+ * cap before the user saw anything, which reads as "resume did not load".
25
+ *
26
+ * These caps still bound the window (a resume cannot make history unbounded)
27
+ * but with roughly 5x headroom over the largest session observed here. The
28
+ * per-entry cap is deliberately NOT raised: one pathological tool payload
29
+ * should never be allowed to consume the whole budget.
30
+ */
31
+ export declare const TUI_RESUME_HISTORY_BUDGET: TuiHistoryBudget;
22
32
  /**
23
33
  * Retain the newest display entries within both a count and serialized-byte
24
34
  * budget. The first banner that still fits after per-entry compaction is
@@ -22,7 +22,7 @@ export interface MouseLayout {
22
22
  /** Rows the history viewport occupies, from the top of the screen. */
23
23
  viewportRows: number;
24
24
  }
25
- export type HitRegion =
25
+ type HitRegion =
26
26
  /** The copy/scroll rail; `cell` is the 0-based row on the track. */
27
27
  {
28
28
  kind: 'scrollbar';
@@ -76,4 +76,5 @@ export declare function statusBarLineRow(opts: {
76
76
  /** 0-based content line index (line 1 = 0, line 2 = 1, …). */
77
77
  line: number;
78
78
  }): number | null;
79
+ export {};
79
80
  //# sourceMappingURL=hit-test.d.ts.map
@@ -10,7 +10,7 @@
10
10
  export declare function formatHistoryDuration(ms: number): string;
11
11
  /** Collapse whitespace and hard-cap a task/description for a single history line. */
12
12
  export declare function shortenTaskPreview(task: string, maxChars?: number): string;
13
- export interface SubagentCompletionLike {
13
+ interface SubagentCompletionLike {
14
14
  status: string;
15
15
  iterations: number;
16
16
  toolCalls: number;
@@ -42,4 +42,5 @@ export declare function formatDelegateSuccessText(input: {
42
42
  toolCalls: number;
43
43
  durationMs: number;
44
44
  }): string;
45
+ export {};
45
46
  //# sourceMappingURL=subagent-history-format.d.ts.map
@@ -1,7 +1,7 @@
1
1
  import type { FleetChatVerbosity } from '@wrongstack/core/types';
2
2
  import type { AppProps } from '../app-props.js';
3
3
  import { LayoutStore } from '../layout-store.js';
4
- export interface AppSessionStateOptions {
4
+ interface AppSessionStateOptions {
5
5
  agent: AppProps['agent'];
6
6
  banner: boolean;
7
7
  appVersion?: string | undefined;
@@ -25,4 +25,5 @@ export declare function useAppSessionState(options: AppSessionStateOptions): {
25
25
  dispatch: import("react").ActionDispatch<[action: import("../app-action-type.js").Action]>;
26
26
  layoutStore: LayoutStore;
27
27
  };
28
+ export {};
28
29
  //# sourceMappingURL=use-app-session-state.d.ts.map
@@ -1,6 +1,6 @@
1
1
  import type { Action, State } from '../app-reducer.js';
2
2
  import { type AuthPanelHost } from '../auth-panel-model.js';
3
- export interface UseAuthPanelOptions {
3
+ interface UseAuthPanelOptions {
4
4
  authHost: AuthPanelHost | undefined;
5
5
  stateRef: {
6
6
  current: State;
@@ -39,4 +39,5 @@ export interface AuthPanelController {
39
39
  readText: (label: string) => Promise<string>;
40
40
  }
41
41
  export declare function useAuthPanel(opts: UseAuthPanelOptions): AuthPanelController;
42
+ export {};
42
43
  //# sourceMappingURL=use-auth-panel.d.ts.map
@@ -13,7 +13,7 @@ export type ModelPickSelection = {
13
13
  providerId: string;
14
14
  model: string;
15
15
  } | null;
16
- export interface UseBrainPanelOptions {
16
+ interface UseBrainPanelOptions {
17
17
  dispatch: React.Dispatch<Action>;
18
18
  getBrainData?: (() => {
19
19
  riskLevel: BrainRiskLevel;
@@ -40,4 +40,5 @@ export interface BrainPanelController {
40
40
  handleBrainVoterMod: (index: number, mod: 'persona' | 'veto') => void;
41
41
  }
42
42
  export declare function useBrainPanel(opts: UseBrainPanelOptions): BrainPanelController;
43
+ export {};
43
44
  //# sourceMappingURL=use-brain-panel.d.ts.map
@@ -17,7 +17,7 @@
17
17
  * staleness is detected, it bumps a counter that the StatusBar uses as a
18
18
  * `key` fragment to force a full re-render of the chip rail.
19
19
  */
20
- export type ChipStalenessRootCause = 'animation_frozen' | 'data_source_stale' | 'subscription_dropped';
20
+ type ChipStalenessRootCause = 'animation_frozen' | 'data_source_stale' | 'subscription_dropped';
21
21
  export interface ChipStalenessDiagnosis {
22
22
  /** Which chip category is stale. */
23
23
  chip: string;
@@ -28,7 +28,7 @@ export interface ChipStalenessDiagnosis {
28
28
  /** Timestamp when staleness was first detected. */
29
29
  detectedAt: number;
30
30
  }
31
- export interface ChipStalenessGuardState {
31
+ interface ChipStalenessGuardState {
32
32
  /** Bumped every time a forced re-render is triggered. Use as a key fragment. */
33
33
  renderNonce: number;
34
34
  /** Current staleness diagnoses (empty = all healthy). */
@@ -36,7 +36,7 @@ export interface ChipStalenessGuardState {
36
36
  /** Total number of staleness recoveries since mount. */
37
37
  recoveryCount: number;
38
38
  }
39
- export interface UseChipStalenessGuardOptions {
39
+ interface UseChipStalenessGuardOptions {
40
40
  /** Agent run state — determines which chips SHOULD be updating. */
41
41
  agentState: 'idle' | 'running' | 'streaming' | 'aborting';
42
42
  /** Current spinner phase index (advances every SPINNER_INTERVAL_MS while active). */
@@ -80,4 +80,5 @@ export declare function computeTokenFingerprint(input: number | undefined, outpu
80
80
  * Useful for the /statusline detail panel or debug logging.
81
81
  */
82
82
  export declare function formatDiagnosis(d: ChipStalenessDiagnosis): string;
83
+ export {};
83
84
  //# sourceMappingURL=use-chip-staleness-guard.d.ts.map
@@ -1,7 +1,7 @@
1
1
  import type { Director } from '@wrongstack/core/coordination';
2
2
  import { type Dispatch, type MutableRefObject, type SetStateAction } from 'react';
3
- import type { AppProps } from '../app-props.js';
4
3
  import type { Action } from '../app-action-type.js';
4
+ import type { AppProps } from '../app-props.js';
5
5
  import type { State } from '../app-state.js';
6
6
  import { createCronJobsGetter } from '../cron-slash.js';
7
7
  import type { MemoryContextMonitorState } from '../memory-context-monitor.js';
@@ -1,10 +1,7 @@
1
1
  import type { Director } from '@wrongstack/core/coordination';
2
2
  import type { FleetChatVerbosity } from '@wrongstack/core/types';
3
3
  import type { Action, State } from '../app-reducer.js';
4
- /** A completed subagent bubble remains useful, but must not retain an
5
- * arbitrarily large model response in the bridge before its turn boundary. */
6
- export declare const MAX_FLEET_HISTORY_BUFFER_CHARS: number;
7
- export interface UseDirectorFleetBridgeOptions {
4
+ interface UseDirectorFleetBridgeOptions {
8
5
  director: Director | null;
9
6
  dispatch: React.Dispatch<Action>;
10
7
  stateRef: React.MutableRefObject<State>;
@@ -33,4 +30,5 @@ export interface UseDirectorFleetBridgeOptions {
33
30
  * entries are never rehydrated on resume.
34
31
  */
35
32
  export declare function useDirectorFleetBridge({ director, dispatch, stateRef, chatMode, sessionGenerationRef, }: UseDirectorFleetBridgeOptions): void;
33
+ export {};
36
34
  //# sourceMappingURL=use-director-fleet-bridge.d.ts.map
@@ -16,7 +16,7 @@ interface SlashRegistryLike {
16
16
  unregister(name: string): void;
17
17
  get?(name: string): SlashCommand | undefined;
18
18
  }
19
- export interface UseExitCommandOptions {
19
+ interface UseExitCommandOptions {
20
20
  slashRegistry: SlashRegistryLike;
21
21
  dispatch: (action: Action) => void;
22
22
  /**
@@ -9,11 +9,6 @@
9
9
  import type { InputBuilder } from '@wrongstack/core/agent';
10
10
  import type { Action, State } from '../app-reducer.js';
11
11
  import { type TokenPreviewStore } from '../token-previews.js';
12
- /**
13
- * Keystroke coalescing window for `@`-file search. Long enough to swallow a
14
- * burst of typing, short enough that the results feel attached to the keys.
15
- */
16
- export declare const FILE_SEARCH_DEBOUNCE_MS = 150;
17
12
  /**
18
13
  * Find an active `@<query>` token at the cursor. The token starts at the
19
14
  * last `@` not preceded by a non-whitespace char, and runs up to the cursor
@@ -24,7 +19,7 @@ export declare function detectAtToken(buffer: string, cursor: number): {
24
19
  end: number;
25
20
  query: string;
26
21
  } | null;
27
- export interface UseFileSearchOptions {
22
+ interface UseFileSearchOptions {
28
23
  state: State;
29
24
  dispatch: React.Dispatch<Action>;
30
25
  projectRoot: string;
@@ -36,7 +31,7 @@ export interface UseFileSearchOptions {
36
31
  setDraft: (buffer: string, cursor: number) => void;
37
32
  tokenPreviewsRef: React.MutableRefObject<TokenPreviewStore>;
38
33
  }
39
- export interface FileSearchResult {
34
+ interface FileSearchResult {
40
35
  /** Called from the host's Enter handler when the file picker is open. */
41
36
  onPickerEnter: () => Promise<void>;
42
37
  }
@@ -45,4 +40,5 @@ export interface FileSearchResult {
45
40
  * provides the Enter handler for the <FilePicker> component.
46
41
  */
47
42
  export declare function useFileSearch(options: UseFileSearchOptions): FileSearchResult;
43
+ export {};
48
44
  //# sourceMappingURL=use-file-search.d.ts.map
@@ -21,7 +21,7 @@
21
21
  * When `sessionGenerationRef` is absent (no /clear support wired), `isLive`
22
22
  * always returns `true` — backward-compatible no-op.
23
23
  */
24
- export interface FleetGenerationGate {
24
+ interface FleetGenerationGate {
25
25
  /** Record that a subagent was first seen at the current generation.
26
26
  * Call on spawn or first event. No-op when no sessionGenerationRef. */
27
27
  track: (subagentId: string) => void;
@@ -36,4 +36,5 @@ export interface FleetGenerationGate {
36
36
  export declare function useFleetGenerationGate(sessionGenerationRef?: {
37
37
  current: number;
38
38
  } | undefined): FleetGenerationGate;
39
+ export {};
39
40
  //# sourceMappingURL=use-fleet-generation-gate.d.ts.map