@wrongstack/tui 1.0.19 → 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 (159) hide show
  1. package/dist/app-action-type.d.ts +85 -1
  2. package/dist/app-key-handler.d.ts +1 -1
  3. package/dist/app-panel-state.d.ts +561 -0
  4. package/dist/app-props.d.ts +21 -1
  5. package/dist/app-reducer.d.ts +1 -1
  6. package/dist/app-state-core-types.d.ts +13 -0
  7. package/dist/app-state.d.ts +8 -534
  8. package/dist/app-status-region.d.ts +2 -1
  9. package/dist/app-ui-state.d.ts +2 -0
  10. package/dist/app-view-contract.d.ts +1 -1
  11. package/dist/app-view-pickers.d.ts +2 -1
  12. package/dist/app-view-state.d.ts +2 -0
  13. package/dist/app.d.ts +2 -2
  14. package/dist/auth-panel-model.d.ts +1 -0
  15. package/dist/background-strip-model.d.ts +65 -0
  16. package/dist/brain-panel-model.d.ts +7 -7
  17. package/dist/chat-search-slash.d.ts +15 -0
  18. package/dist/clipboard.d.ts +14 -1
  19. package/dist/components/agent-monitor-presentation.d.ts +61 -0
  20. package/dist/components/agents-monitor.d.ts +3 -49
  21. package/dist/components/audit-panel.d.ts +2 -1
  22. package/dist/components/auth-panel.d.ts +3 -1
  23. package/dist/components/background-strip.d.ts +20 -0
  24. package/dist/components/brain-panel.d.ts +3 -1
  25. package/dist/components/chat-search-bar.d.ts +19 -0
  26. package/dist/components/checkpoint-timeline.d.ts +7 -3
  27. package/dist/components/confirm-prompt.d.ts +6 -7
  28. package/dist/components/connections-panel.d.ts +2 -1
  29. package/dist/components/context-panel-sections.d.ts +53 -0
  30. package/dist/components/context-panel-types.d.ts +66 -0
  31. package/dist/components/context-panel.d.ts +2 -66
  32. package/dist/components/exit-confirm-panel.d.ts +2 -0
  33. package/dist/components/file-picker.d.ts +2 -1
  34. package/dist/components/help-panel.d.ts +5 -3
  35. package/dist/components/history/code-block.d.ts +2 -136
  36. package/dist/components/history/diff-model.d.ts +143 -0
  37. package/dist/components/history/scroll-controller-types.d.ts +11 -0
  38. package/dist/components/history/scrollbar-rail.d.ts +14 -2
  39. package/dist/components/history/use-history-controller.d.ts +5 -0
  40. package/dist/components/history/utils.d.ts +3 -9
  41. package/dist/components/history/visual-tool-output.d.ts +8 -0
  42. package/dist/components/input.d.ts +1 -1
  43. package/dist/components/kanban-panel-presentation.d.ts +114 -0
  44. package/dist/components/kanban-panel.d.ts +2 -47
  45. package/dist/components/mailbox-panel.d.ts +2 -1
  46. package/dist/components/mcp-picker.d.ts +3 -1
  47. package/dist/components/mode-picker.d.ts +3 -1
  48. package/dist/components/model-picker.d.ts +1 -1
  49. package/dist/components/monitor-shell.d.ts +19 -4
  50. package/dist/components/phase-monitor.d.ts +3 -1
  51. package/dist/components/plugin-picker.d.ts +3 -1
  52. package/dist/components/powerline-rail.d.ts +6 -3
  53. package/dist/components/prompt-picker-model.d.ts +16 -0
  54. package/dist/components/prompt-picker.d.ts +2 -16
  55. package/dist/components/provider-colors.d.ts +2 -12
  56. package/dist/components/refine-countdown-panel.d.ts +4 -3
  57. package/dist/components/resource-menu-model.d.ts +3 -0
  58. package/dist/components/resource-menu.d.ts +3 -3
  59. package/dist/components/scrollable-history.d.ts +1 -1
  60. package/dist/components/send-mode-model.d.ts +44 -0
  61. package/dist/components/send-mode-picker.d.ts +2 -43
  62. package/dist/components/settings-picker-row-list.d.ts +2 -1
  63. package/dist/components/settings-picker.d.ts +3 -1
  64. package/dist/components/shadow-panel.d.ts +2 -1
  65. package/dist/components/sidebar-content.d.ts +1 -47
  66. package/dist/components/sidebar-ipc-icons.d.ts +9 -0
  67. package/dist/components/sidebar-panel-agents.d.ts +10 -0
  68. package/dist/components/sidebar-panel-connections.d.ts +11 -0
  69. package/dist/components/sidebar-panel-coordinator.d.ts +11 -0
  70. package/dist/components/sidebar-panel-fleet.d.ts +16 -0
  71. package/dist/components/sidebar-panel-project.d.ts +12 -0
  72. package/dist/components/sidebar-panel-worktree.d.ts +10 -0
  73. package/dist/components/sidebar-panel-wrong-proxy.d.ts +25 -0
  74. package/dist/components/sidebar-panels-workspace.d.ts +10 -79
  75. package/dist/components/sidebar-presentation.d.ts +98 -0
  76. package/dist/components/sidebar.d.ts +3 -1
  77. package/dist/components/skill-picker.d.ts +2 -1
  78. package/dist/components/slash-confirm-panel.d.ts +2 -0
  79. package/dist/components/slash-menu.d.ts +2 -1
  80. package/dist/components/slash-modal-frame.d.ts +9 -0
  81. package/dist/components/status-bar-rails-async.d.ts +2 -2
  82. package/dist/components/status-bar-types.d.ts +6 -0
  83. package/dist/components/status-bar.d.ts +1 -1
  84. package/dist/components/statusline-picker-model.d.ts +45 -0
  85. package/dist/components/statusline-picker.d.ts +2 -41
  86. package/dist/components/tools-picker.d.ts +3 -1
  87. package/dist/components/user-input-prompt.d.ts +4 -2
  88. package/dist/connection-actions.d.ts +20 -0
  89. package/dist/connections-health.d.ts +8 -1
  90. package/dist/esc-close-panels.d.ts +0 -1
  91. package/dist/f-key-panels.d.ts +4 -0
  92. package/dist/hooks/fork-at-checkpoint.d.ts +25 -0
  93. package/dist/hooks/use-active-theme.d.ts +2 -1
  94. package/dist/hooks/use-app-execution-pipeline.d.ts +1 -1
  95. package/dist/hooks/use-app-panels-state.d.ts +1 -1
  96. package/dist/hooks/use-app-picker-keys.d.ts +5 -2
  97. package/dist/hooks/use-chip-staleness-guard.d.ts +6 -0
  98. package/dist/hooks/use-core-tui-commands.d.ts +7 -2
  99. package/dist/hooks/use-file-search.d.ts +10 -0
  100. package/dist/hooks/use-fleet-generation-gate.d.ts +4 -3
  101. package/dist/hooks/use-panel-controllers.d.ts +1 -1
  102. package/dist/hooks/use-picker-keys-brain-statusline.d.ts +4 -0
  103. package/dist/hooks/use-picker-keys-types.d.ts +1 -0
  104. package/dist/hooks/use-provider-warmup.d.ts +9 -0
  105. package/dist/hooks/use-queue-manager.d.ts +11 -1
  106. package/dist/hooks/use-session-rewind.d.ts +8 -1
  107. package/dist/hooks/use-shadow-panel.d.ts +1 -1
  108. package/dist/hooks/use-sidebar-panel-data.d.ts +7 -5
  109. package/dist/hooks/use-skill-mention-picker.d.ts +6 -0
  110. package/dist/hooks/use-slash-picker.d.ts +1 -1
  111. package/dist/hooks/use-stable-key-handler.d.ts +8 -1
  112. package/dist/hooks/use-status-sync-interval.d.ts +3 -2
  113. package/dist/hooks/use-statusbar-view-model.d.ts +2 -2
  114. package/dist/hooks/use-tui-environment-state.d.ts +3 -0
  115. package/dist/hooks/use-tui-event-bridge.d.ts +12 -0
  116. package/dist/hooks/use-windowed-picker.d.ts +3 -4
  117. package/dist/index.js +29522 -25452
  118. package/dist/ink.d.ts +5 -5
  119. package/dist/input-graphemes.d.ts +4 -0
  120. package/dist/input-key-router.d.ts +2 -0
  121. package/dist/input-tokens.d.ts +10 -0
  122. package/dist/input-validation/action-types.d.ts +1 -1
  123. package/dist/input-validation/limits.d.ts +2 -0
  124. package/dist/input-validation-coordination.d.ts +9 -0
  125. package/dist/input-validation-display.d.ts +9 -0
  126. package/dist/input-validation.d.ts +0 -52
  127. package/dist/kanban-arguments.d.ts +48 -0
  128. package/dist/kanban-command-types.d.ts +53 -0
  129. package/dist/kanban-reports.d.ts +42 -0
  130. package/dist/kanban-slash.d.ts +4 -125
  131. package/dist/key-routes/key-route-background-strip.d.ts +14 -0
  132. package/dist/key-routes/key-route-chat-search.d.ts +24 -0
  133. package/dist/key-routes/key-route-overlay.d.ts +2 -2
  134. package/dist/layout-store.d.ts +2 -2
  135. package/dist/memory-slash-render.d.ts +1 -1
  136. package/dist/message-checkpoint.d.ts +19 -0
  137. package/dist/motion.d.ts +16 -0
  138. package/dist/on-panel-open.d.ts +1 -1
  139. package/dist/picker-text-input.d.ts +4 -0
  140. package/dist/reducers/chat-search.d.ts +11 -0
  141. package/dist/reducers/composer-action-types.d.ts +6 -0
  142. package/dist/reducers/composer-pickers.d.ts +4 -0
  143. package/dist/reducers/composer.d.ts +1 -5
  144. package/dist/reducers/message-jump.d.ts +16 -0
  145. package/dist/reducers/panel-pickers.d.ts +1 -1
  146. package/dist/reducers/workspace-panels.d.ts +1 -1
  147. package/dist/resume-session-tree.d.ts +8 -0
  148. package/dist/rewind-prompt.d.ts +24 -0
  149. package/dist/run-tui-options.d.ts +24 -5
  150. package/dist/scroll-anchor.d.ts +6 -0
  151. package/dist/statusline-palette.d.ts +4 -0
  152. package/dist/submit-controller.d.ts +1 -1
  153. package/dist/submit-slash-command.d.ts +67 -0
  154. package/dist/theme-utils.d.ts +1 -1
  155. package/dist/transcript-search.d.ts +38 -0
  156. package/dist/ui-contracts.d.ts +2 -1
  157. package/dist/use-app-controller.d.ts +157 -0
  158. package/dist/use-controller-key-pipeline.d.ts +217 -0
  159. package/package.json +7 -7
@@ -1,11 +1,7 @@
1
1
  import type { Action } from '../app-action-type.js';
2
2
  import type { State } from '../app-state.js';
3
- declare const composerActionTypes: readonly ["brainPromptSet", "brainPromptClear", "pickerOpen", "pickerClose", "pickerSetMatches", "pickerMove", "toolStarted", "toolEnded", "toolStreamAppend", "toolStreamClear", "enqueue", "dequeueFirst", "queueClear", "queueDelete", "queueToggleRefine", "bashModeEnter", "bashModeExit", "slashPickerOpen", "slashPickerClose", "slashPickerMove", "historyPush", "historyUp", "historyDown", "setInputHistory", "clearInputHistory", "modelPickerOpen", "modelPickerClose", "modelPickerMove", "modelPickerPickProvider", "modelPickerBack", "modelPickerSearch", "modelPickerEffort", "modelPickerHint", "autonomyPickerOpen", "autonomyPickerClose", "autonomyPickerMove", "autonomyPickerHint", "themePickerOpen", "themePickerClose", "themePickerMove", "themePickerHint", "modePickerOpen", "modePickerClose", "modePickerMove", "modePickerHint", "skillPickerOpen", "skillPickerClose", "skillPickerMove", "skillPickerHint", "resourceMenuOpen", "resourceMenuClose", "resourceMenuMove", "resourceMenuHint", "resourceMenuFilter", "resourceMenuConfirm", "designPickerOpen", "designPickerClose", "designPickerMove", "designPickerStack", "promptPickerOpen", "promptPickerClose", "promptPickerMove", "promptPickerCategory", "resumePickerOpen", "resumePickerClose", "resumePickerMove", "resumePickerBusy", "resumePickerHint", "resumePickerError", "replaceHistory", "resumeLoadStart", "resumeLoadTick", "resumeStreamChunk", "resumeLoadAbort"];
4
- type ComposerAction = Extract<Action, {
5
- type: (typeof composerActionTypes)[number];
6
- }>;
3
+ import { type ComposerAction } from './composer-action-types.js';
7
4
  export declare function isComposerAction(action: Action): action is ComposerAction;
8
5
  /** Reduces composer tools, queues, history navigation, and session/model pickers. */
9
6
  export declare function reduceComposer(state: State, action: ComposerAction): State;
10
- export {};
11
7
  //# sourceMappingURL=composer.d.ts.map
@@ -0,0 +1,16 @@
1
+ import type { Action } from '../app-action-type.js';
2
+ import type { State } from '../app-state.js';
3
+ type MessageJumpAction = Extract<Action, {
4
+ type: 'messageJump';
5
+ }>;
6
+ /**
7
+ * Alt+↑ / Alt+↓: step through the user's own messages in the transcript.
8
+ * The first Alt+↑ lands on the newest one; further steps stop at either end.
9
+ * `seq` increments on every step so the view scrolls even when the target
10
+ * entry is the same one (the user may have scrolled away since).
11
+ */
12
+ export declare function reduceMessageJump(state: State, action: MessageJumpAction): State;
13
+ /** Drop the marked message (Esc, or any key that goes on to the composer). */
14
+ export declare function clearMessageJump(state: State): State;
15
+ export {};
16
+ //# sourceMappingURL=message-jump.d.ts.map
@@ -1,6 +1,6 @@
1
1
  import type { Action } from '../app-action-type.js';
2
2
  import type { State } from '../app-state.js';
3
- declare const panelPickerActionTypes: readonly ["statuslineOpen", "statuslineClose", "statuslineFieldMove", "statuslineFieldSet", "statuslineToggle", "statuslineSetLine", "statuslineMoveLine", "statuslineMoveOrder", "statuslineSetDensity", "statuslineToggleLine", "statuslineResetLayout", "statuslineFilter", "statuslineHint", "statuslineChipShow", "statuslineChipExpire", "statuslineVisibleChipsSync", "pluginPickerOpen", "pluginPickerClose", "pluginPickerMove", "pluginPickerSetItems", "pluginPickerBusy", "pluginPickerHint", "mcpPickerOpen", "mcpPickerClose", "mcpPickerMove", "mcpPickerSetItems", "mcpPickerBusy", "mcpPickerHint", "toolsPickerOpen", "toolsPickerClose", "toolsPickerMove", "toolsPickerSetItems", "toolsPickerToggle", "toolsPickerBusy", "toolsPickerHint", "toolsPickerFilter", "brainOpen", "brainClose", "brainMove", "brainRiskChange", "brainSetLog", "brainHint", "brainSettingsLoaded", "brainView", "brainRowMove", "brainBusy", "helpOpen", "helpClose", "helpMove", "helpFilter", "helpHint", "shadowOpen", "shadowClose", "shadowUpdate", "shadowHint", "subagentModelsOpen", "subagentModelsClose", "subagentModelsMove", "subagentModelsUpdate", "subagentModelsHint"];
3
+ declare const panelPickerActionTypes: readonly ["statuslineOpen", "statuslineClose", "statuslineFieldMove", "statuslineFieldSet", "statuslineToggle", "statuslineSetLine", "statuslineMoveLine", "statuslineMoveOrder", "statuslineSetDensity", "statuslineToggleLine", "statuslineResetLayout", "statuslineFilter", "statuslineHint", "statuslineChipShow", "statuslineChipExpire", "statuslineVisibleChipsSync", "pluginPickerOpen", "pluginPickerClose", "pluginPickerMove", "pluginPickerSetItems", "pluginPickerBusy", "pluginPickerHint", "mcpPickerOpen", "mcpPickerClose", "mcpPickerMove", "mcpPickerSetItems", "mcpPickerBusy", "mcpPickerHint", "toolsPickerOpen", "toolsPickerClose", "toolsPickerMove", "toolsPickerSetItems", "toolsPickerToggle", "toolsPickerBusy", "toolsPickerHint", "toolsPickerFilter", "brainOpen", "brainClose", "brainMove", "brainRiskChange", "brainSetLog", "brainHint", "brainSettingsLoaded", "brainView", "brainRowMove", "brainBusy", "helpOpen", "helpClose", "helpScrollDetail", "helpMove", "helpFilter", "helpHint", "helpScrollDetail", "shadowOpen", "shadowClose", "shadowUpdate", "shadowHint", "subagentModelsOpen", "subagentModelsClose", "subagentModelsMove", "subagentModelsUpdate", "subagentModelsHint"];
4
4
  type PanelPickerAction = Extract<Action, {
5
5
  type: (typeof panelPickerActionTypes)[number];
6
6
  }>;
@@ -10,7 +10,7 @@ import type { State } from '../app-state.js';
10
10
  * {@link computeMaxSidebarScroll}; see its doc for the layout budget.
11
11
  */
12
12
  export declare function estimateSidebarMaxScroll(state: State, viewportHeight?: number, effectiveSwarmOnSidebar?: boolean | undefined): number;
13
- declare const workspacePanelActionTypes: readonly ["toggleMonitor", "toggleAgentsMonitor", "toggleHelp", "toggleTodosMonitor", "toggleQueuePanel", "toggleProcessList", "toggleCronMonitor", "togglePlanPanel", "closeAllPanels", "toggleSidebarFocus", "sidebarScroll", "sidebarScrollSet", "sidebarScrollReset", "toggleKanbanPanel", "toggleGoalPanel", "toggleGoalKanbanPanel", "toggleContextPanel", "toggleConnectionsPanel", "checkpointReceived", "rewindOverlayOpen", "rewindOverlayClose", "rewindOverlayMove", "sessionRewound", "eternalStage", "goalSummary", "goalRunInit", "goalRunPhaseUpdate", "goalRunTaskActive", "goalRunRunningPhases", "goalRunElapsed", "goalRunMonitorToggle", "goalRunReset", "sddBoardSnapshot", "toggleSddBoardMonitor", "sddBoardFocusNext", "sddBoardFocusPrev", "worktreeUpsert", "worktreeRemove", "toggleWorktreeMonitor"];
13
+ declare const workspacePanelActionTypes: readonly ["toggleMonitor", "toggleAgentsMonitor", "toggleHelp", "toggleTodosMonitor", "toggleQueuePanel", "toggleProcessList", "toggleCronMonitor", "togglePlanPanel", "closeAllPanels", "toggleSidebarFocus", "sidebarScroll", "sidebarScrollSet", "sidebarScrollReset", "toggleKanbanPanel", "toggleGoalPanel", "toggleGoalKanbanPanel", "toggleContextPanel", "toggleConnectionsPanel", "checkpointReceived", "rewindOverlayOpen", "rewindOverlayClose", "rewindOverlayMove", "checkpointFork", "forkRequestDone", "sessionRewound", "eternalStage", "goalSummary", "goalRunInit", "goalRunPhaseUpdate", "goalRunTaskActive", "goalRunTaskAgent", "goalRunTaskCompleted", "goalRunRunningPhases", "goalRunElapsed", "goalRunMonitorToggle", "goalRunReset", "sddBoardSnapshot", "toggleSddBoardMonitor", "sddBoardFocusNext", "sddBoardFocusPrev", "worktreeUpsert", "worktreeRemove", "toggleWorktreeMonitor"];
14
14
  type WorkspacePanelAction = Extract<Action, {
15
15
  type: (typeof workspacePanelActionTypes)[number];
16
16
  }>;
@@ -0,0 +1,8 @@
1
+ import type { ResumeSessionEntry } from './app-state-core-types.js';
2
+ /**
3
+ * Picker order for `/resume`: this worktree's sessions first, then each other
4
+ * worktree of the repository in the host's order. Inside each group, forks
5
+ * sit under their parent (see `orderSessionTree`) with a tree connector.
6
+ */
7
+ export declare function orderResumeEntries(entries: readonly ResumeSessionEntry[]): ResumeSessionEntry[];
8
+ //# sourceMappingURL=resume-session-tree.d.ts.map
@@ -0,0 +1,24 @@
1
+ import type { RewoundConversation } from '@wrongstack/core/storage';
2
+ import type { Action } from './app-action-type.js';
3
+ /**
4
+ * After a rewind or a fork, hand the prompt that was taken back to the user
5
+ * to edit and send again.
6
+ *
7
+ * Both wipe the composer (a rewind clears the transcript view, a fork
8
+ * resumes another session), so the draft from before is passed in. A draft
9
+ * wins over the prompt: it is what the user was typing, and losing it to a
10
+ * rewind was a bug of its own. The prompt is then shown as a note instead.
11
+ */
12
+ export declare function restoreRewoundPrompt(dispatch: (action: Action) => void, draftBefore: string, promptText: string | undefined): void;
13
+ /**
14
+ * Redraw the transcript from the conversation a rewind or redo left. The
15
+ * rewind event clears the screen; without this the turns that survived the
16
+ * rewind vanished from view while the model still had them.
17
+ */
18
+ export declare function showConversation(dispatch: (action: Action) => void, conversation: RewoundConversation): void;
19
+ /** After a rewind: the surviving turns on screen, the prompt back in the composer. */
20
+ export declare function showRewind(dispatch: (action: Action) => void, draftBefore: string, outcome: {
21
+ promptText?: string | undefined;
22
+ conversation?: RewoundConversation | undefined;
23
+ }): void;
24
+ //# sourceMappingURL=rewind-prompt.d.ts.map
@@ -34,6 +34,12 @@ export interface RunTuiOptions {
34
34
  banner?: boolean | undefined;
35
35
  /** Persists the input queue across crashes; if omitted, the queue is in-memory only. */
36
36
  queueStore?: QueueStore | undefined;
37
+ /**
38
+ * The queue store of another session. With it, `/resume` brings that
39
+ * session's queue along (the WebUI keeps its queue in the same file) and
40
+ * leaves the previous session's on disk.
41
+ */
42
+ queueStoreFor?: ((sessionId: string) => QueueStore | undefined) | undefined;
37
43
  /**
38
44
  * Called with the queue's display texts (head first) on EVERY queue change
39
45
  * — enqueue, /queue delete, /queue clear, dequeue-for-delivery. The CLI
@@ -118,6 +124,12 @@ export interface RunTuiOptions {
118
124
  * the version chip when this is true, so users notice without having
119
125
  * to read the stderr notice. */
120
126
  updateAvailable?: boolean | undefined;
127
+ /**
128
+ * The standalone executable's background update: called with the version
129
+ * once it is downloaded, verified and waiting to be swapped in when this
130
+ * session exits. The status bar's version chip then says so.
131
+ */
132
+ subscribeUpdateReady?: ((listener: (version: string) => void) => () => void) | undefined;
121
133
  /** Snapshot of keyed providers + their model lists for the `/model` picker. Async — the catalog fetch may need to hit disk/network. */
122
134
  getPickableProviders?: (() => Promise<import('./components/model-picker.js').ProviderOption[]>) | undefined;
123
135
  /** Apply a (provider, model) pair after the picker confirms. Returns an error string on failure. */
@@ -126,10 +138,9 @@ export interface RunTuiOptions {
126
138
  switchAutonomy?: ((mode: 'off' | 'suggest' | 'auto' | 'eternal' | 'eternal-parallel') => string | null) | undefined;
127
139
  /**
128
140
  * Model-specific maxContext (tokens), resolved by the CLI via the
129
- * ModelsRegistry. When omitted, the TUI falls back to the provider
130
- * family's baseline (e.g. anthropic = 200_000), which can be wrong
131
- * for variants like the 1M-context Opus build. The status bar's
132
- * context chip uses this for its progress denominator.
141
+ * ModelsRegistry. When omitted, the TUI falls back to the provider's
142
+ * reported window, which is 0 (unknown) until the catalog resolves one.
143
+ * The status bar's context chip uses this for its progress denominator.
133
144
  */
134
145
  effectiveMaxContext?: number | undefined;
135
146
  /** Absolute project root for goal.json loading. */
@@ -520,6 +531,14 @@ export interface RunTuiOptions {
520
531
  * from the session store and returns ResumeSessionEntry-shaped data.
521
532
  */
522
533
  listSessions?: ((limit?: number) => Promise<import('./app-state.js').ResumeSessionEntry[]>) | undefined;
534
+ /**
535
+ * Branch a session at a checkpoint (the conversation before that prompt)
536
+ * into a new session, leaving the original as it is. Returns the new id;
537
+ * the TUI then resumes it. The working tree is shared, not copied.
538
+ */
539
+ forkSession?: ((sessionId: string, checkpointPromptIndex: number) => Promise<{
540
+ id: string;
541
+ }>) | undefined;
523
542
  /**
524
543
  * Resume a session by id: load JSONL events, replay history entries,
525
544
  * rebuild agent context, and return hydrated entries for the TUI to
@@ -559,7 +578,7 @@ export interface RunTuiOptions {
559
578
  nextSteps?: string[] | undefined;
560
579
  } | null>) | undefined;
561
580
  getProjectPickerItems?: (() => Promise<import('./components/project-picker.js').ProjectPickerItem[]>) | undefined;
562
- onProjectSelect?: ((key: string, kind: 'project' | 'action') => void) | undefined;
581
+ onProjectSelect?: ((key: string, kind: 'project' | 'action') => void | string | null | Promise<void | string | null>) | undefined;
563
582
  /**
564
583
  * Request the TUI to exit with a specific code. Used by the project picker
565
584
  * to trigger a clean exit before spawning a new wstack process in a different
@@ -59,6 +59,12 @@ export declare function anchorAtTopRow(geometry: ScrollGeometry, topRow: number)
59
59
  * bottom returns `null` (re-pin).
60
60
  */
61
61
  export declare function scrollAnchorBy(geometry: ScrollGeometry, current: ScrollAnchor | null, deltaUp: number): ScrollAnchor | null;
62
+ /**
63
+ * Anchor that puts the start of render group `index` at the viewport top.
64
+ * Groups too close to the bottom to reach the top re-pin (`null`), which
65
+ * still shows them. Out-of-range indexes return `undefined` (no move).
66
+ */
67
+ export declare function anchorForGroupIndex(geometry: ScrollGeometry, index: number): ScrollAnchor | null | undefined;
62
68
  /** Anchor for the very top of the transcript (or `null` when it all fits). */
63
69
  export declare function scrollAnchorToTop(geometry: ScrollGeometry): ScrollAnchor | null;
64
70
  /** Rows moved by one PageUp/PageDown press. */
@@ -0,0 +1,4 @@
1
+ import type { Theme } from './theme-types.js';
2
+ /** Preserve the preset's five hues while keeping small status text at 4.5:1. */
3
+ export declare function statuslineBackgrounds(palette: Theme): string[];
4
+ //# sourceMappingURL=statusline-palette.d.ts.map
@@ -2,7 +2,7 @@ import { type InputBuilder } from '@wrongstack/core/agent';
2
2
  import type { Director } from '@wrongstack/core/coordination';
3
3
  import type { AttachmentStore, ContentBlock } from '@wrongstack/core/types';
4
4
  import type { Action, State } from './app-reducer.js';
5
- import { emptyMemoryContextMonitor } from './memory-context-monitor.js';
5
+ import type { emptyMemoryContextMonitor } from './memory-context-monitor.js';
6
6
  import type { MutableCell } from './shared-types.js';
7
7
  import { type TokenPreviewStore } from './token-previews.js';
8
8
  import type { SubmitCapabilities } from './tui-host-capabilities.js';
@@ -0,0 +1,67 @@
1
+ export declare function submitSlashCommand({ trimmed, sessionGenerationRef, attachments, tokenPreviewsRef, isAutomaticBugHuntReplay, dispatch, pushSubmittedHistory, clearDraft, slashRegistry, agent, refreshGoalSummary, onBugHuntStarted, mouseMode, nativeMouse, setNativeMouse, setMouseMode, getSettings, saveSettings, liveModel, setLiveModel, liveProvider, setLiveProvider, activeMaxContext, setActiveMaxContext, getYolo, yoloLive, setYoloLive, getAutonomy, autonomyLive, setAutonomyLive, getEternalEngine, runEternalLoopRef, getParallelEngine, runParallelLoopRef, getModeLabel, liveModeLabel, setLiveModeLabel, getToolsItems, setLiveToolCount, exit, onExit, builderRef, waitForIdleSettle, stateRef, runBlocks, liveDirector, clearTerminal, onClearHistory, setMemoryContextMonitor, tokenCounter, enhanceAbortRef, enhanceCancelledRef, enhanceOriginalRef, nextStepsAutoSubmitTimerRef, autoSubmitStreakRef, autoSubmitCapWarnedRef, autoSubmitLoopGuardRef, onAfterClear, }: {
2
+ trimmed: string;
3
+ sessionGenerationRef: import('./shared-types.js').MutableCell<number>;
4
+ attachments: import('@wrongstack/core/types').AttachmentStore;
5
+ tokenPreviewsRef: import('./shared-types.js').MutableCell<import('./token-previews.js').TokenPreviewStore>;
6
+ isAutomaticBugHuntReplay: boolean;
7
+ dispatch: (action: import('./app-action-type.js').Action) => void;
8
+ pushSubmittedHistory: () => void;
9
+ clearDraft: () => void;
10
+ slashRegistry: import('@wrongstack/core/registry').SlashCommandRegistry;
11
+ agent: import('@wrongstack/core/agent').Agent;
12
+ refreshGoalSummary: () => void;
13
+ onBugHuntStarted: (command: string, totalRounds?: number | undefined) => void;
14
+ mouseMode: boolean;
15
+ nativeMouse: boolean;
16
+ setNativeMouse: (value: boolean) => void;
17
+ setMouseMode: (value: boolean) => void;
18
+ getSettings: (() => import('./app-settings-type.js').Settings) | undefined;
19
+ saveSettings: ((settings: import('./app-settings-type.js').Settings) => string | Promise<string | null> | null) | undefined;
20
+ liveModel: string;
21
+ setLiveModel: (value: string) => void;
22
+ liveProvider: string;
23
+ setLiveProvider: (value: string) => void;
24
+ activeMaxContext: number | undefined;
25
+ setActiveMaxContext: (value: number) => void;
26
+ getYolo: (() => boolean) | undefined;
27
+ yoloLive: boolean;
28
+ setYoloLive: (value: boolean) => void;
29
+ getAutonomy: (() => 'off' | 'suggest' | 'auto' | 'eternal' | 'eternal-parallel') | undefined;
30
+ autonomyLive: 'off' | 'suggest' | 'auto' | 'eternal' | 'eternal-parallel';
31
+ setAutonomyLive: (value: 'off' | 'suggest' | 'auto' | 'eternal' | 'eternal-parallel') => void;
32
+ getEternalEngine: (() => unknown) | undefined;
33
+ runEternalLoopRef: import('./shared-types.js').MutableCell<() => Promise<void>>;
34
+ getParallelEngine: (() => unknown) | undefined;
35
+ runParallelLoopRef: import('./shared-types.js').MutableCell<() => Promise<void>>;
36
+ getModeLabel: (() => string) | undefined;
37
+ liveModeLabel: string | undefined;
38
+ setLiveModeLabel: (value: string) => void;
39
+ getToolsItems: (() => {
40
+ enabled: boolean;
41
+ }[]) | undefined;
42
+ setLiveToolCount: (value: number) => void;
43
+ exit: () => void;
44
+ onExit: (code: number) => void;
45
+ builderRef: import('./shared-types.js').MutableCell<import('@wrongstack/core/agent').InputBuilder | null>;
46
+ waitForIdleSettle: (isIdle: () => boolean, deadlineMs: number, opts?: {
47
+ maxPollMs?: number;
48
+ }) => Promise<boolean>;
49
+ stateRef: import('./shared-types.js').MutableCell<import('./app-state.js').State>;
50
+ runBlocks: (blocks: import('@wrongstack/core/types').ContentBlock[]) => Promise<void>;
51
+ liveDirector: () => import('@wrongstack/core/coordination').Director | null;
52
+ clearTerminal: (() => void) | undefined;
53
+ onClearHistory: import('./tui-host-capabilities.js').SubmitCapabilities['onClearHistory'];
54
+ setMemoryContextMonitor: (value: import('./memory-context-monitor.js').MemoryContextMonitorState) => void;
55
+ tokenCounter: import('@wrongstack/core/types').TokenCounter | undefined;
56
+ enhanceAbortRef: import('./shared-types.js').MutableCell<AbortController | null>;
57
+ enhanceCancelledRef: import('./shared-types.js').MutableCell<boolean>;
58
+ enhanceOriginalRef: import('./shared-types.js').MutableCell<string>;
59
+ nextStepsAutoSubmitTimerRef: import('./shared-types.js').MutableCell<NodeJS.Timeout | undefined>;
60
+ autoSubmitStreakRef: import('./shared-types.js').MutableCell<number>;
61
+ autoSubmitCapWarnedRef: import('./shared-types.js').MutableCell<boolean>;
62
+ autoSubmitLoopGuardRef: import('./shared-types.js').MutableCell<{
63
+ reset(): void;
64
+ }>;
65
+ onAfterClear: (() => void) | undefined;
66
+ }): Promise<void>;
67
+ //# sourceMappingURL=submit-slash-command.d.ts.map
@@ -60,7 +60,7 @@ export declare function resolveSyntaxColor(role: SyntaxRole, palette: Theme): st
60
60
  export declare function resolveSyntaxPalette(palette: Theme): SyntaxPalette;
61
61
  export declare function softColorWithTheme(color: string | undefined, currentTheme: Theme): string | undefined;
62
62
  /**
63
- * Mix two hex colors in linear-light sRGB. `weight` is the fraction of
63
+ * Mix two hex colors in encoded sRGB. `weight` is the fraction of
64
64
  * `colorA` (0..1) — at 0 the result is `colorB`, at 1 it is `colorA`. Used
65
65
  * by the sidebar's card tints to derive per-card "raised" surfaces from
66
66
  * the theme's accent + surface tokens, so each panel feels color-coded
@@ -0,0 +1,38 @@
1
+ import type { HistoryEntry } from './history-entry.js';
2
+ /** One match per entry: the first hit inside that entry's text. */
3
+ export interface TranscriptMatch {
4
+ entryId: number;
5
+ /** The line containing the first hit, untrimmed. */
6
+ line: string;
7
+ /** Code-unit offset of the hit inside {@link line}. */
8
+ column: number;
9
+ /** Code-unit length of the hit. */
10
+ length: number;
11
+ }
12
+ export interface TranscriptSearchOptions {
13
+ /** Thinking cards are hidden unless model reasoning is shown. */
14
+ includeReasoning: boolean;
15
+ }
16
+ /** Per-entry text is capped so one huge tool result cannot stall a keystroke. */
17
+ export declare const MAX_SEARCH_CHARS_PER_ENTRY = 200000;
18
+ /** Matches in transcript order (oldest first), at most one per entry. */
19
+ export declare function findTranscriptMatches(entries: readonly HistoryEntry[], query: string, options: TranscriptSearchOptions): TranscriptMatch[];
20
+ /**
21
+ * Next selected entry after moving `delta` matches: -1 = older, +1 = newer.
22
+ * Wraps at both ends. A selection that is no longer a match (retention
23
+ * evicted it, or the query changed) restarts from the newest match.
24
+ */
25
+ export declare function stepTranscriptMatch(matches: readonly TranscriptMatch[], selectedEntryId: number | null, delta: -1 | 1): number | null;
26
+ /**
27
+ * Fit a match line into `width` columns, keeping the hit visible. Returns the
28
+ * three display segments; an ellipsis marks each trimmed side. Widths are
29
+ * counted in code units, which is exact for the ASCII-dominant transcript
30
+ * text and conservative (never overflowing) for wide glyphs after the
31
+ * caller's own display-width truncation.
32
+ */
33
+ export declare function transcriptMatchSnippet(match: Pick<TranscriptMatch, 'line' | 'column' | 'length'>, width: number): {
34
+ before: string;
35
+ hit: string;
36
+ after: string;
37
+ };
38
+ //# sourceMappingURL=transcript-search.d.ts.map
@@ -22,7 +22,7 @@ export declare const PILL_MIN_INNER_WIDTH = 22;
22
22
  * starts rendering per-row "metric" columns (latency, diff, elapsed, agent
23
23
  * count, relative time). Below this threshold the row keeps its identity
24
24
  * label only; the secondary metric is dropped to preserve the title.
25
- * Centralized so the F twins in `sidebar-panels-workspace.tsx` and
25
+ * Centralized so the F twins in `sidebar-panel-*.tsx` and
26
26
  * `sidebar-panels-task.tsx` stop hand-rolling the literal `24`.
27
27
  */
28
28
  export declare const METRIC_MIN_BODY_WIDTH = 24;
@@ -142,6 +142,7 @@ export interface HelpEntry {
142
142
  category: string;
143
143
  aliases?: string[] | undefined;
144
144
  argsHint?: string | undefined;
145
+ help?: string | undefined;
145
146
  }
146
147
  export interface McpPickerItem {
147
148
  name: string;
@@ -0,0 +1,157 @@
1
+ import type { Director } from '@wrongstack/core/coordination';
2
+ import type { AppProps } from './app-props.js';
3
+ import type { StatuslineItem } from './components/statusline-picker.js';
4
+ export declare function useAppController(props: AppProps): {
5
+ pendingUserInput: import("./components/user-input-prompt.js").PendingUserInput | null;
6
+ runInterruptLadder: () => void;
7
+ props: AppProps;
8
+ state: import("./app-state.js").State;
9
+ dispatch: import("react").ActionDispatch<[action: import("./app-action-type.js").Action]>;
10
+ historyScrollRef: import("react").RefObject<import("./key-handler-context.js").HistoryScrollController | null>;
11
+ onScrollInfo: (info: {
12
+ scrolled: boolean;
13
+ }) => void;
14
+ onRequestOlderEntries: () => void;
15
+ activity: {
16
+ displayThinkingWord: string;
17
+ startedAt: number;
18
+ nowTick: number;
19
+ setNowTick: import("react").Dispatch<import("react").SetStateAction<number>>;
20
+ workingTimeMs: number;
21
+ fleetWorkingTimeMs: number;
22
+ processMemory: import("@wrongstack/core/utils").HeapSample;
23
+ cpuPercent: number | undefined;
24
+ cpuHistory: number[];
25
+ rssHistory: number[];
26
+ heapHistory: number[];
27
+ totalMem: number;
28
+ enhanceDots: number;
29
+ refreshGoalSummary: () => void;
30
+ };
31
+ environment: {
32
+ liveModel: string;
33
+ setLiveModel: (v: string) => void;
34
+ liveProvider: string;
35
+ setLiveProvider: (v: string) => void;
36
+ activeMaxContext: number | undefined;
37
+ setActiveMaxContext: (v: number | undefined) => void;
38
+ yoloLive: boolean;
39
+ setYoloLive: (v: boolean) => void;
40
+ autonomyLive: import("./hooks/use-statusline-state.js").AutonomyStage;
41
+ setAutonomyLive: (v: import("./hooks/use-statusline-state.js").AutonomyStage) => void;
42
+ liveModeLabel: string;
43
+ setLiveModeLabel: (v: string) => void;
44
+ hiddenItems: StatuslineItem[];
45
+ setHiddenItems: (v: StatuslineItem[]) => void;
46
+ lines: import("@wrongstack/core/statusline").StatuslineLines;
47
+ setLines: (v: import("@wrongstack/core/statusline").StatuslineLines) => void;
48
+ densities: import("@wrongstack/core/statusline").StatuslineDensities;
49
+ setDensities: (v: import("@wrongstack/core/statusline").StatuslineDensities) => void;
50
+ order: import("@wrongstack/core/statusline").StatuslineOrder;
51
+ setOrder: (v: import("@wrongstack/core/statusline").StatuslineOrder) => void;
52
+ sessionCount: number;
53
+ setSessionCount: (v: number) => void;
54
+ hiddenItemsRef: import("react").RefObject<StatuslineItem[]>;
55
+ memoryContextMonitor: import("./memory-context-monitor.js").MemoryContextMonitorState;
56
+ setMemoryContextMonitor: import("react").Dispatch<import("react").SetStateAction<import("./memory-context-monitor.js").MemoryContextMonitorState>>;
57
+ memoryRecordTotal: number | undefined;
58
+ memoryContextMonitorRef: import("react").RefObject<import("./memory-context-monitor.js").MemoryContextMonitorState>;
59
+ memoryRecordTotalRef: import("react").RefObject<number | undefined>;
60
+ activeMemoryInContext: number;
61
+ liveToolCount: number | undefined;
62
+ setLiveToolCount: import("react").Dispatch<import("react").SetStateAction<number | undefined>>;
63
+ indexState: {
64
+ ready: boolean;
65
+ indexing: boolean;
66
+ currentFile: number;
67
+ totalFiles: number;
68
+ lastError: string | null;
69
+ server: import("@wrongstack/tools").ProjectIndexServerConnectionState;
70
+ circuit: import("@wrongstack/tools").CircuitSnapshot;
71
+ };
72
+ breakerCountdown: import("@wrongstack/tools").BreakerCountdown | null;
73
+ };
74
+ statusbar: {
75
+ contextBreakdown: import("@wrongstack/core/utils").ContextBreakdown | undefined;
76
+ currentContextTokens: number;
77
+ contextWindow: {
78
+ used: number;
79
+ max: number;
80
+ } | undefined;
81
+ cacheStats: import("@wrongstack/core/types").CacheStats;
82
+ cacheCoverageTokens: number;
83
+ todos: {
84
+ pending: number;
85
+ inProgress: number;
86
+ completed: number;
87
+ };
88
+ fleetCounts: {
89
+ running: number;
90
+ idle: number;
91
+ pending: number;
92
+ completed: number;
93
+ } | undefined;
94
+ visibleSubagentCount: number;
95
+ hasVisibleFleetPanel: boolean;
96
+ entriesWithLeader: Record<string, import("./app-state-fleet.js").FleetEntry>;
97
+ planCounts: import("./hooks/use-statusbar-view-model.js").PlanCounts | null;
98
+ taskCounts: import("./hooks/use-statusbar-view-model.js").TaskCounts | null;
99
+ droppedTools: number;
100
+ };
101
+ mailbox: {
102
+ mailboxStatus: import("./components/status-bar-types.js").MailboxStatus;
103
+ mailboxPanelOpen: boolean;
104
+ setMailboxPanelOpen: import("react").Dispatch<import("react").SetStateAction<boolean>>;
105
+ mailboxMessages: import("./components/mailbox-panel.js").MailboxMessageEntry[];
106
+ mailboxAgents: import("./components/mailbox-panel.js").MailboxAgentEntry[];
107
+ };
108
+ gitInfo: import("./git-info.js").GitInfo | null;
109
+ viewState: {
110
+ inputHint: string;
111
+ composerStatus: import("./components/composer-status-chip.js").ComposerStatus;
112
+ composerAnimationStyle: "breathe" | "cycle" | "dots" | "pulse" | "rainbow" | "static" | "wave";
113
+ inputHeight: number;
114
+ hideInput: boolean;
115
+ lowerFunctionPanelOpen: boolean;
116
+ functionPanel: number | null;
117
+ panelOwnsInput: boolean;
118
+ };
119
+ mouseMode: boolean;
120
+ termRows: number;
121
+ statusBarRows: number;
122
+ bottomRegionRef: import("react").RefObject<import("./ink.js").DOMElement | null>;
123
+ statusBarWrapRef: import("react").RefObject<import("./ink.js").DOMElement | null>;
124
+ belowStatusBarRef: import("react").RefObject<import("./ink.js").DOMElement | null>;
125
+ statusBarClickMapRef: import("react").RefObject<import("./key-handler-context.js").StatusBarClickMap | null>;
126
+ inspectOverlayHeaderRef: import("react").RefObject<import("./ink.js").DOMElement | null>;
127
+ stableOnKey: (input: string, key: import("./components/input.js").KeyEvent) => Promise<void>;
128
+ liveTodos: import("@wrongstack/core/agent").TodoItem[];
129
+ liveSettings: import("./app-settings-type.js").Settings | undefined;
130
+ liveAnimationStyle: "breathe" | "cycle" | "dots" | "pulse" | "rainbow" | "static" | "wave";
131
+ liveStatuslineMode: import("./settings-contracts.js").StatuslineMode;
132
+ projectName: string | undefined;
133
+ workingDirChip: string | undefined;
134
+ handleRewindTo: (checkpointIndex: number) => Promise<import("./hooks/use-session-rewind.js").RewindOutcome>;
135
+ activeCtrlRef: import("react").RefObject<AbortController | null>;
136
+ clearPendingConfirms: () => void;
137
+ liveDirector: () => Director | null;
138
+ dismissedEscAtRef: import("react").RefObject<number>;
139
+ enhanceOriginalRef: import("react").MutableRefObject<string>;
140
+ enhanceStartedAt: number | null;
141
+ enhanceDurationMs: number | null;
142
+ refineProviderId: string | null;
143
+ refineModel: string | null;
144
+ setEnhanceCountdown: import("react").Dispatch<import("react").SetStateAction<number | null>>;
145
+ enhanceCountdown: number | null;
146
+ nextStepsAutoSubmitCountdown: number | null;
147
+ nextStepsAutoSubmitLabel: string | null;
148
+ nextStepsAutoSubmitDeadlineMs: number | null;
149
+ setDraft: (buffer: string, cursor: number) => void;
150
+ focusedBoardId: string | null;
151
+ getCronJobs: () => Promise<import("./cron-slash.js").CronListResult>;
152
+ getLeaderTranscript: () => import("@wrongstack/core/coordination").AgentTimelineEntry[];
153
+ coordinatorRunning: boolean;
154
+ enhanceDelayMs: number;
155
+ layoutStore: import("./layout-store.js").LayoutStore;
156
+ };
157
+ //# sourceMappingURL=use-app-controller.d.ts.map