@wrongstack/tui 0.306.4 → 0.307.1

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 (43) hide show
  1. package/dist/app-state-core-types.d.ts +7 -0
  2. package/dist/app-view-pickers.d.ts +13 -0
  3. package/dist/app-view-sidebar.d.ts +19 -0
  4. package/dist/app.d.ts +1 -1
  5. package/dist/components/context-panel.d.ts +18 -0
  6. package/dist/components/history/copy-registry.d.ts +28 -0
  7. package/dist/components/history/entry-helpers.d.ts +63 -0
  8. package/dist/components/history/entry.d.ts +1 -15
  9. package/dist/components/history/sage-memory-block.d.ts +44 -0
  10. package/dist/components/history/tool-entry.d.ts +11 -0
  11. package/dist/components/history/use-history-controller.d.ts +66 -0
  12. package/dist/components/scrollable-history.d.ts +0 -24
  13. package/dist/components/sidebar-content.d.ts +15 -1
  14. package/dist/components/sidebar-panels-shared.d.ts +20 -0
  15. package/dist/components/sidebar-panels-task.d.ts +65 -0
  16. package/dist/components/sidebar-panels-workspace.d.ts +50 -0
  17. package/dist/components/sidebar-panels.d.ts +3 -139
  18. package/dist/components/status-bar-icons.d.ts +45 -0
  19. package/dist/components/status-bar-rails.d.ts +89 -0
  20. package/dist/components/status-bar.d.ts +1 -2
  21. package/dist/hooks/use-active-theme.d.ts +1 -1
  22. package/dist/hooks/use-app-event-bridges.d.ts +46 -0
  23. package/dist/hooks/use-app-execution-pipeline.d.ts +24 -0
  24. package/dist/hooks/use-app-panels-state.d.ts +34 -0
  25. package/dist/hooks/use-app-pipeline-builders.d.ts +101 -0
  26. package/dist/hooks/use-picker-keys-auth-model.d.ts +4 -0
  27. package/dist/hooks/use-picker-keys-tools-settings.d.ts +4 -0
  28. package/dist/hooks/use-session-rewind.d.ts +14 -0
  29. package/dist/hooks/use-status-sync-interval.d.ts +23 -0
  30. package/dist/hooks/use-statusbar-view-model.d.ts +25 -1
  31. package/dist/hooks/use-theme-picker-handler.d.ts +13 -0
  32. package/dist/index.js +29439 -28703
  33. package/dist/input-tokens.d.ts +10 -4
  34. package/dist/memory-slash-gather.d.ts +8 -0
  35. package/dist/memory-slash-render.d.ts +62 -0
  36. package/dist/memory-slash-renderers.d.ts +16 -0
  37. package/dist/memory-slash-types.d.ts +91 -0
  38. package/dist/memory-slash-write.d.ts +38 -0
  39. package/dist/theme-presets.d.ts +6 -0
  40. package/dist/theme-types.d.ts +42 -0
  41. package/dist/theme-utils.d.ts +63 -0
  42. package/dist/theme.d.ts +5 -215
  43. package/package.json +11 -11
@@ -1,140 +1,4 @@
1
- import type { TodoItem } from '@wrongstack/core/agent';
2
- import type React from 'react';
3
- import type { FleetEntry, GoalSummary, ResumeSessionEntry } from '../app-state.js';
4
- import type { QueueItem } from '../app-state-core-types.js';
5
- import type { WorktreeRow } from '../ui-contracts.js';
6
- import type { ProjectPickerItem } from './project-picker.js';
7
- import type { LiveSessionEntry } from './sessions-panel.js';
8
- export interface ProjectPickerSidebarProps {
9
- /** Already-filtered picker items. Navigation indices target this list directly. */
10
- items: readonly ProjectPickerItem[];
11
- /** Index into `items`. */
12
- selected: number;
13
- /** Current filter text. */
14
- filter: string;
15
- /** Optional status/error hint shown below the list. */
16
- hint?: string | undefined;
17
- /** Current project name to highlight. */
18
- currentProject?: string | undefined;
19
- /** Width of the sidebar in columns. */
20
- width: number;
21
- }
22
- export declare function ProjectPickerSidebar({ items, selected, filter, hint, currentProject, width, }: ProjectPickerSidebarProps): React.ReactElement;
23
- export interface FleetPanelSidebarProps {
24
- entries: Record<string, FleetEntry>;
25
- /** Active (running) subagent count. */
26
- runningCount: number;
27
- /** Width of the sidebar in columns. */
28
- width: number;
29
- }
30
- export declare function FleetPanelSidebar({ entries, runningCount, width, }: FleetPanelSidebarProps): React.ReactElement;
31
- export interface AgentsPanelSidebarProps {
32
- entries: Record<string, FleetEntry>;
33
- totalCost: number;
34
- nowTick: number;
35
- width: number;
36
- }
37
- export declare function AgentsPanelSidebar({ entries, totalCost, nowTick, width, }: AgentsPanelSidebarProps): React.ReactElement;
38
- export interface WorktreePanelSidebarProps {
39
- worktrees: Record<string, WorktreeRow>;
40
- /** Width of the sidebar in columns. */
41
- width: number;
42
- }
43
- export declare function WorktreePanelSidebar({ worktrees, width, }: WorktreePanelSidebarProps): React.ReactElement;
44
- export interface PlanPanelSidebarProps {
45
- /** Plan items grouped by status. */
46
- openCount: number;
47
- inProgressCount: number;
48
- doneCount: number;
49
- /** Up to N plan item titles to display. */
50
- items: readonly {
51
- id: string;
52
- title: string;
53
- status: 'open' | 'in_progress' | 'done';
54
- }[];
55
- /** Title of the plan (if any). */
56
- title?: string | undefined;
57
- width: number;
58
- }
59
- export declare function PlanPanelSidebar({ openCount, inProgressCount, doneCount, items, title, width, }: PlanPanelSidebarProps): React.ReactElement;
60
- export interface TodosPanelSidebarProps {
61
- todos: readonly TodoItem[];
62
- width: number;
63
- }
64
- export declare function TodosPanelSidebar({ todos, width }: TodosPanelSidebarProps): React.ReactElement;
65
- export interface QueuePanelSidebarProps {
66
- items: readonly QueueItem[];
67
- width: number;
68
- }
69
- export declare function QueuePanelSidebar({ items, width }: QueuePanelSidebarProps): React.ReactElement;
70
- export interface ProcessListPanelSidebarProps {
71
- /** Active process count and a few process summaries. */
72
- activeCount: number;
73
- /** Total process count. */
74
- totalCount: number;
75
- /** Up to 8 process rows: name + pid. */
76
- processes: readonly {
77
- pid: number;
78
- name: string;
79
- status?: string;
80
- }[];
81
- width: number;
82
- }
83
- export declare function ProcessListPanelSidebar({ activeCount, totalCount, processes, width, }: ProcessListPanelSidebarProps): React.ReactElement;
84
- export interface GoalPanelSidebarProps {
85
- goal: GoalSummary | null;
86
- coordinatorRunning: boolean;
87
- width: number;
88
- }
89
- export declare function GoalPanelSidebar({ goal, coordinatorRunning, width, }: GoalPanelSidebarProps): React.ReactElement;
90
- export interface SessionsPanelSidebarProps {
91
- liveSessions?: readonly LiveSessionEntry[] | undefined;
92
- resumeSessions?: readonly ResumeSessionEntry[] | undefined;
93
- currentSessionId?: string | undefined;
94
- /**
95
- * Reference timestamp for relative-time labels (e.g. "2d"). Defaults to
96
- * `Date.now()` at render time. Accepts an injected value so visual snapshots
97
- * stay deterministic across calendar-day boundaries.
98
- */
99
- now?: number | undefined;
100
- width: number;
101
- }
102
- export declare function SessionsPanelSidebar({ liveSessions, resumeSessions, currentSessionId, now, width, }: SessionsPanelSidebarProps): React.ReactElement;
103
- export interface CoordinatorPanelSidebarProps {
104
- running: boolean;
105
- /** Active phase count. */
106
- activePhases: number;
107
- /** Completed phase count. */
108
- completedPhases: number;
109
- /** Up to 5 active phase names. */
110
- phaseNames: readonly string[];
111
- /** Elapsed ms since coordinator started. */
112
- elapsedMs: number;
113
- width: number;
114
- }
115
- export declare function CoordinatorPanelSidebar({ running, activePhases, completedPhases, phaseNames, elapsedMs, width, }: CoordinatorPanelSidebarProps): React.ReactElement;
116
- export interface KanbanPanelSidebarProps {
117
- /** Per-column counts: Backlog / Up Next / In Progress / Review / Done. */
118
- columns: readonly {
119
- name: string;
120
- count: number;
121
- wip?: number;
122
- }[];
123
- /** Active card count (total cards across all columns). */
124
- totalActive: number;
125
- /** Up to 6 active card titles. */
126
- activeCardTitles: readonly string[];
127
- width: number;
128
- }
129
- export declare function KanbanPanelSidebar({ columns, totalActive, activeCardTitles, width, }: KanbanPanelSidebarProps): React.ReactElement;
130
- export interface ConnectionsPanelSidebarProps {
131
- /** Connection summaries: name + status badge. */
132
- connections: readonly {
133
- name: string;
134
- status: 'ok' | 'warn' | 'down' | 'unknown';
135
- latencyMs?: number | undefined;
136
- }[];
137
- width: number;
138
- }
139
- export declare function ConnectionsPanelSidebar({ connections, width, }: ConnectionsPanelSidebarProps): React.ReactElement;
1
+ export { fleetStatusVisual, fmtRelative, fmtShortDuration, liveSessionColor, liveSessionGlyph, SidebarWorklistRow, } from './sidebar-panels-shared.js';
2
+ export { type AgentsPanelSidebarProps, AgentsPanelSidebar, type ConnectionsPanelSidebarProps, ConnectionsPanelSidebar, type CoordinatorPanelSidebarProps, CoordinatorPanelSidebar, type FleetPanelSidebarProps, FleetPanelSidebar, type ProjectPickerSidebarProps, ProjectPickerSidebar, type WorktreePanelSidebarProps, WorktreePanelSidebar, } from './sidebar-panels-workspace.js';
3
+ export { type GoalPanelSidebarProps, GoalPanelSidebar, type KanbanPanelSidebarProps, KanbanPanelSidebar, type PlanPanelSidebarProps, PlanPanelSidebar, type ProcessListPanelSidebarProps, ProcessListPanelSidebar, type QueuePanelSidebarProps, QueuePanelSidebar, type SessionsPanelSidebarProps, SessionsPanelSidebar, type TodosPanelSidebarProps, TodosPanelSidebar, } from './sidebar-panels-task.js';
140
4
  //# sourceMappingURL=sidebar-panels.d.ts.map
@@ -0,0 +1,45 @@
1
+ export declare const STATUSLINE_ICONS: {
2
+ readonly auto_proceed: string;
3
+ readonly autonomy: string;
4
+ readonly brain: string;
5
+ readonly breaker: string;
6
+ readonly cache: string;
7
+ readonly context: string;
8
+ readonly cost: string;
9
+ readonly debug_stream: string;
10
+ readonly elapsed: string;
11
+ readonly enhance: string;
12
+ readonly eternal_stage: string;
13
+ readonly fleet: string;
14
+ readonly fleet_agents: string;
15
+ readonly git: string;
16
+ readonly goal: string;
17
+ readonly hint: string;
18
+ readonly index: string;
19
+ readonly mailbox: string;
20
+ readonly memory_context: string;
21
+ readonly mode: string;
22
+ readonly model: string;
23
+ readonly next_steps: string;
24
+ readonly plan: string;
25
+ readonly processes: string;
26
+ readonly project: string;
27
+ readonly queue: string;
28
+ readonly sessions: string;
29
+ readonly side_effects: string;
30
+ readonly state: string;
31
+ readonly tasks: string;
32
+ readonly token_saving: string;
33
+ readonly tokens: string;
34
+ readonly todos: string;
35
+ readonly tools: string;
36
+ readonly working_dir: string;
37
+ readonly yolo: string;
38
+ };
39
+ export declare const COMPACT_THRESHOLD = 50;
40
+ export declare function chipColor(color: string, isNoColor: boolean): string | undefined;
41
+ export declare const STACK_ORANGE = "#FD9F02";
42
+ export declare const LINE_BG_COLORS: readonly [string, string, string, string];
43
+ export declare const SPINNER_FRAMES: string[];
44
+ export declare const SPINNER_INTERVAL_MS = 1000;
45
+ //# sourceMappingURL=status-bar-icons.d.ts.map
@@ -0,0 +1,89 @@
1
+ import type React from 'react';
2
+ import type { AnimationStyle } from './animation-style.js';
3
+ import type { RailSpanEntry } from './powerline-rail.js';
4
+ import type { FleetAgentDetail, MailboxStatus, StatusBarProps } from './status-bar-types.js';
5
+ import type { StatuslineItem } from './statusline-picker.js';
6
+ export interface StatusBarRailBuildParams {
7
+ showChip: (item: StatuslineItem) => boolean;
8
+ isNoColor: boolean;
9
+ model: string;
10
+ provider?: string | undefined;
11
+ version?: string | undefined;
12
+ latestVersion?: string | undefined;
13
+ updateAvailable?: boolean | undefined;
14
+ yolo?: boolean | undefined;
15
+ autonomy?: StatusBarProps['autonomy'];
16
+ processCount?: number | undefined;
17
+ stateStatusChip: React.ReactElement | null;
18
+ fleetWorkingTime?: number | undefined;
19
+ primaryChips: React.ReactElement[];
20
+ context?: StatusBarProps['context'];
21
+ contextStrategy?: string | undefined;
22
+ showTokenDisplay: boolean;
23
+ displayTokens: {
24
+ input: number;
25
+ output: number;
26
+ };
27
+ cost?: {
28
+ total: number;
29
+ } | undefined;
30
+ cache?: {
31
+ hitRatio: number;
32
+ } | undefined;
33
+ queueCount?: number | undefined;
34
+ hint?: string | undefined;
35
+ breakerCountdown?: StatusBarProps['breakerCountdown'];
36
+ projectName?: string | undefined;
37
+ workingDir?: string | undefined;
38
+ git?: StatusBarProps['git'];
39
+ modeLabel?: string | undefined;
40
+ sessionCount?: number | undefined;
41
+ toolCount?: number | undefined;
42
+ tokenSavingMode?: string | undefined;
43
+ sideEffectCount?: number | undefined;
44
+ todos?: StatusBarProps['todos'];
45
+ todosCleared: boolean;
46
+ plan?: StatusBarProps['plan'];
47
+ tasks?: StatusBarProps['tasks'];
48
+ hasTaskActivity: boolean | null | undefined;
49
+ fleet?: StatusBarProps['fleet'];
50
+ fleetHasActivity: boolean | null | undefined;
51
+ subagentCount: number;
52
+ showBrain: boolean;
53
+ brain?: StatusBarProps['brain'];
54
+ showDebugStream: boolean;
55
+ debugStreamStats?: StatusBarProps['debugStreamStats'];
56
+ showEnhance: boolean;
57
+ enhanceCountdown?: StatusBarProps['enhanceCountdown'];
58
+ hasNextStepsAutoSubmit: boolean;
59
+ nextStepsAutoSubmitCountdown?: StatusBarProps['nextStepsAutoSubmitCountdown'];
60
+ nextStepsAutoSubmitLabel?: StatusBarProps['nextStepsAutoSubmitLabel'];
61
+ nextStepsColor: string;
62
+ showEternalStage: boolean;
63
+ eternalStage?: StatusBarProps['eternalStage'];
64
+ hasActiveGoal: boolean;
65
+ goalSummary?: StatusBarProps['goalSummary'];
66
+ hasAutoProceed: boolean;
67
+ autoProceedCountdown?: StatusBarProps['autoProceedCountdown'];
68
+ droppedTools?: number | undefined;
69
+ detailChips: React.ReactElement[];
70
+ minimalWorkParts: string[];
71
+ thinking: boolean;
72
+ statePrefix: string;
73
+ stateLabel: string;
74
+ stateColor: string;
75
+ animationStyle: AnimationStyle | 'cycle';
76
+ spinnerIdx: number;
77
+ cycleTick: number;
78
+ memoryContextMonitor?: StatusBarProps['memoryContextMonitor'];
79
+ Sage?: StatusBarProps['Sage'];
80
+ indexState?: StatusBarProps['indexState'];
81
+ }
82
+ export declare function buildPrimaryChips(p: StatusBarRailBuildParams): React.ReactElement[];
83
+ export declare function buildModeChipEntries(p: StatusBarRailBuildParams, modelStatusChip: React.ReactElement | null): RailSpanEntry[];
84
+ export declare function buildMinimumChips(p: StatusBarRailBuildParams): React.ReactElement[];
85
+ export declare function buildMailboxDetailChips(mailbox: MailboxStatus | undefined, showMailbox: boolean, isNoColor: boolean, fleetAgents?: FleetAgentDetail[] | undefined, showFleetAgents?: boolean | undefined): React.ReactElement[];
86
+ export declare function buildWorkRowEntries(p: StatusBarRailBuildParams): RailSpanEntry[];
87
+ export declare function buildIndexStatusChip(indexState: StatusBarProps['indexState'], showChip: (item: StatuslineItem) => boolean, isNoColor: boolean): React.ReactElement | null;
88
+ export declare function buildMemoryDetailChips(memoryContextMonitor: StatusBarProps['memoryContextMonitor'], Sage: StatusBarProps['Sage'], isNoColor: boolean): React.ReactElement[];
89
+ //# sourceMappingURL=status-bar-rails.d.ts.map
@@ -1,9 +1,8 @@
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
5
  export type { BrainStatusChip, ContextWindow, FleetAgentDetail, FleetCounts, MailboxStatus, PlanCounts, StatusBarProps, TaskCounts, TodoCounts, } from './status-bar-types.js';
5
- /** Minimum terminal width before we switch to ultra-compact mode. */
6
- export declare const COMPACT_THRESHOLD = 50;
7
6
  /**
8
7
  * Two-line status bar. The first line stays compact and shows the
9
8
  * workspace route followed by provider/model, context, tokens, cost, queue,
@@ -10,5 +10,5 @@
10
10
  * but exposing it lets test code and stat panels introspect the active
11
11
  * palette without re-implementing the listener.
12
12
  */
13
- export declare function useActiveTheme(): import("../theme.js").Theme;
13
+ export declare function useActiveTheme(): import("../theme-types.js").Theme;
14
14
  //# sourceMappingURL=use-active-theme.d.ts.map
@@ -0,0 +1,46 @@
1
+ export declare function useAppEventBridges(params: {
2
+ events: any;
3
+ agent: any;
4
+ dispatch: any;
5
+ streamingTextRef: any;
6
+ streamSegmentsRef: any;
7
+ pendingDeltaRef: any;
8
+ flushTimerRef: any;
9
+ sessionGenerationRef: any;
10
+ activeRunGenerationRef: any;
11
+ assistantCommittedThisRunRef: any;
12
+ setMemoryContextMonitor: any;
13
+ clientId: any;
14
+ tokenCounter: any;
15
+ getAutonomy: any;
16
+ registerDebugStreamCallback: any;
17
+ restoreDebugStreamCallback: any;
18
+ stateRef: any;
19
+ setActiveMaxContext: any;
20
+ subscribeGoal: any;
21
+ onClearHistory: any;
22
+ fleetChat: any;
23
+ enhanceEnabled: boolean;
24
+ agentsMonitorOpen: boolean;
25
+ fleetStreamController: any;
26
+ enhanceController: any;
27
+ agentsMonitorController: any;
28
+ interruptController: any;
29
+ activeCtrlRef: any;
30
+ activeRunSettledRef: any;
31
+ eternalLoopRunningRef: any;
32
+ parallelLoopRunningRef: any;
33
+ tokenPreviewsRef: any;
34
+ clearPendingConfirms: () => void;
35
+ getEternalEngine: any;
36
+ getParallelEngine: any;
37
+ getSddRun: any;
38
+ switchAutonomy: any;
39
+ slashRegistry: any;
40
+ exitConfirm: any;
41
+ liveDirector: any;
42
+ director: any;
43
+ }): {
44
+ getLeaderTranscript: () => import("@wrongstack/core/coordination").AgentTimelineEntry[];
45
+ };
46
+ //# sourceMappingURL=use-app-event-bridges.d.ts.map
@@ -0,0 +1,24 @@
1
+ import { createAppKeyHandler } from '../app-key-handler.js';
2
+ import { createRunBlocksController } from '../run-blocks-controller.js';
3
+ import { createSubmitController } from '../submit-controller.js';
4
+ export type KeyHandlerParams = Parameters<typeof createAppKeyHandler>[0];
5
+ export type RunBlocksParams = Parameters<typeof createRunBlocksController>[0];
6
+ export type SubmitParams = Parameters<typeof createSubmitController>[0];
7
+ export interface AppExecutionPipelineArgs {
8
+ keyHandlerParams: KeyHandlerParams;
9
+ runBlocksParams: RunBlocksParams;
10
+ submitParams: SubmitParams;
11
+ runBlocksRef: {
12
+ current: ReturnType<typeof createRunBlocksController>;
13
+ };
14
+ submitRef: {
15
+ current: any;
16
+ };
17
+ }
18
+ export declare function useAppExecutionPipeline(args: AppExecutionPipelineArgs): {
19
+ handleKey: (input: string, key: import("../components/input.js").KeyEvent) => Promise<void>;
20
+ runBlocks: (blocks: import("@wrongstack/core/types").ContentBlock[]) => Promise<void>;
21
+ submit: (overrideRaw?: string) => Promise<void>;
22
+ stableOnKey: (input: string, key: import("../components/input.js").KeyEvent) => Promise<void>;
23
+ };
24
+ //# sourceMappingURL=use-app-execution-pipeline.d.ts.map
@@ -0,0 +1,34 @@
1
+ import type { Dispatch } from 'react';
2
+ import type { AppProps } from '../app-props.js';
3
+ import type { Action, State } from '../app-reducer.js';
4
+ export declare function useAppPanelsState(params: {
5
+ projectRoot: string;
6
+ dispatch: Dispatch<Action>;
7
+ state: State;
8
+ getModes?: any;
9
+ getPickableProviders?: any;
10
+ getBrainData?: any;
11
+ brainPanelHost?: any;
12
+ onBrainRiskLevel?: any;
13
+ getShadowData?: any;
14
+ onShadowStart?: any;
15
+ onShadowStop?: any;
16
+ slashRegistry?: AppProps['slashRegistry'];
17
+ hiddenItems: any;
18
+ setHiddenItems: (items: any) => void;
19
+ subscribeCoordinatorEvents?: any;
20
+ }): {
21
+ openPromptPicker: () => Promise<void>;
22
+ setPromptFavorite: (slug: string, favorite: boolean) => Promise<void>;
23
+ openModePicker: () => Promise<void>;
24
+ requestModelPick: (title: string) => Promise<import("./use-model-pick.js").ModelPickSelection>;
25
+ handleModelPicked: (providerId: string, modelId: string) => void;
26
+ brainCtl: import("./use-brain-panel.js").BrainPanelController;
27
+ openBrainPanel: () => void;
28
+ changeBrainRisk: (delta: number) => void;
29
+ openShadowPanel: () => void;
30
+ handleShadowStart: () => Promise<void>;
31
+ handleShadowStop: () => Promise<void>;
32
+ openHelpPanel: () => void;
33
+ };
34
+ //# sourceMappingURL=use-app-panels-state.d.ts.map
@@ -0,0 +1,101 @@
1
+ import type { AppProps } from '../app-props.js';
2
+ import type { State } from '../app-reducer.js';
3
+ import type { AppExecutionPipelineArgs } from './use-app-execution-pipeline.js';
4
+ export declare function buildAppPipelineArgs(params: {
5
+ props: AppProps;
6
+ state: State;
7
+ dispatch: any;
8
+ historyScrollRef: any;
9
+ runInterruptLadder: any;
10
+ enhanceCancelledRef: any;
11
+ enhanceAbortRef: any;
12
+ enhanceOriginalRef: any;
13
+ enhanceEnabledRef: any;
14
+ inputGateRef: any;
15
+ lastEscAtRef: any;
16
+ dismissedEscAtRef: any;
17
+ streamingTextRef: any;
18
+ streamSegmentsRef: any;
19
+ pendingDeltaRef: any;
20
+ flushTimerRef: any;
21
+ sessionGenerationRef: any;
22
+ activeRunGenerationRef: any;
23
+ activeRunSettledRef: any;
24
+ assistantCommittedThisRunRef: any;
25
+ confirmExitRef: any;
26
+ chimeRef: any;
27
+ activeCtrlRef: any;
28
+ clearPendingConfirms: any;
29
+ liveDirector: any;
30
+ openProjectPicker: any;
31
+ loadLiveSessions: any;
32
+ openStatuslinePicker: any;
33
+ statuslineHiddenItems: any;
34
+ lastEnterAtRef: any;
35
+ draftRef: any;
36
+ setDraft: any;
37
+ clearDraft: any;
38
+ mouseMode: any;
39
+ nativeMouse: any;
40
+ termRows: any;
41
+ terminalColumns: any;
42
+ terminalRows: any;
43
+ mainColumnWidth: any;
44
+ overlayOpen: any;
45
+ effectiveSwarmOnSidebar: any;
46
+ sidebarTwinRowCount: any;
47
+ statusBarWrapRef: any;
48
+ belowStatusBarRef: any;
49
+ statusBarClickMapRef: any;
50
+ openModelPicker: any;
51
+ nextStepsAutoSubmitTimerRef: any;
52
+ nextStepsAutoSubmitSuggestionRef: any;
53
+ nextStepsAutoSubmitLabel: any;
54
+ setNextStepsAutoSubmitCountdown: any;
55
+ setNextStepsAutoSubmitLabel: any;
56
+ cancelNextStepsCountdown: any;
57
+ pasteClipboardText: any;
58
+ pasteClipboardImage: any;
59
+ onHistoryCopy: any;
60
+ tryPickerKey: any;
61
+ pasteAccumRef: any;
62
+ pasteFlushTimerRef: any;
63
+ commitPaste: any;
64
+ builderRef: any;
65
+ tokenPreviewsRef: any;
66
+ interruptsSyncRef: any;
67
+ stateRef: any;
68
+ runBlocksRef: any;
69
+ submitRef: any;
70
+ liveModel: any;
71
+ liveProvider: any;
72
+ activeMaxContext: any;
73
+ yoloLive: any;
74
+ autonomyLive: any;
75
+ liveModeLabel: any;
76
+ setMouseMode: any;
77
+ setNativeMouse: any;
78
+ setLiveModel: any;
79
+ setLiveProvider: any;
80
+ setActiveMaxContext: any;
81
+ setYoloLive: any;
82
+ setAutonomyLive: any;
83
+ setLiveModeLabel: any;
84
+ setLiveToolCount: any;
85
+ autoSubmitStreakRef: any;
86
+ autoSubmitCapWarnedRef: any;
87
+ autoSubmitLoopGuardRef: any;
88
+ runEternalLoopRef: any;
89
+ runParallelLoopRef: any;
90
+ midRunSendPickerRef: any;
91
+ openPromptPicker: any;
92
+ refreshGoalSummary: any;
93
+ exit: any;
94
+ setMemoryContextMonitor: any;
95
+ runSteerSequence: any;
96
+ setEnhanceStartedAt: any;
97
+ setEnhanceDurationMs: any;
98
+ setRefineProviderId: any;
99
+ setRefineModel: any;
100
+ }): AppExecutionPipelineArgs;
101
+ //# sourceMappingURL=use-app-pipeline-builders.d.ts.map
@@ -0,0 +1,4 @@
1
+ import type { KeyEvent } from '../components/input.js';
2
+ import type { PickerKeysHost } from './use-picker-keys-types.js';
3
+ export declare function tryAuthModelPickerKeys(host: PickerKeysHost, input: string, key: KeyEvent, isEnter: boolean, debouncedEnter: (host: PickerKeysHost) => boolean): boolean;
4
+ //# sourceMappingURL=use-picker-keys-auth-model.d.ts.map
@@ -0,0 +1,4 @@
1
+ import type { KeyEvent } from '../components/input.js';
2
+ import type { PickerKeysHost } from './use-picker-keys-types.js';
3
+ export declare function tryToolsSettingsPickerKeys(host: PickerKeysHost, input: string, key: KeyEvent, isEnter: boolean, debouncedEnter: (host: PickerKeysHost) => boolean): boolean;
4
+ //# sourceMappingURL=use-picker-keys-tools-settings.d.ts.map
@@ -0,0 +1,14 @@
1
+ import type { Agent } from '@wrongstack/core/agent';
2
+ import type { Director } from '@wrongstack/core/coordination';
3
+ import type { SessionInterruptController } from './use-session-interrupt-controller.js';
4
+ export interface UseSessionRewindOptions {
5
+ agent: Agent;
6
+ sessionsDir?: string | undefined;
7
+ interruptController?: SessionInterruptController | undefined;
8
+ liveDirector: () => Director | null;
9
+ sessionGenerationRef: React.MutableRefObject<number>;
10
+ }
11
+ export declare function useSessionRewind({ agent, sessionsDir, interruptController, liveDirector, sessionGenerationRef, }: UseSessionRewindOptions): {
12
+ handleRewindTo: (checkpointIndex: number) => Promise<void>;
13
+ };
14
+ //# sourceMappingURL=use-session-rewind.d.ts.map
@@ -0,0 +1,23 @@
1
+ import type { Agent } from '@wrongstack/core/agent';
2
+ export interface UseStatusSyncIntervalOptions {
3
+ getAutonomy?: (() => string) | undefined;
4
+ getYolo?: (() => boolean) | undefined;
5
+ getModeLabel?: (() => string) | undefined;
6
+ getEternalEngine?: unknown;
7
+ getParallelEngine?: unknown;
8
+ agent: Agent;
9
+ autonomyLive: string;
10
+ yoloLive: boolean;
11
+ liveModeLabel: string;
12
+ liveModel: string;
13
+ liveProvider: string;
14
+ setAutonomyLive: (v: any) => void;
15
+ setYoloLive: (v: boolean) => void;
16
+ setLiveModeLabel: (v: string) => void;
17
+ setLiveModel: (v: string) => void;
18
+ setLiveProvider: (v: string) => void;
19
+ runEternalLoopRef: React.MutableRefObject<() => Promise<void>>;
20
+ runParallelLoopRef: React.MutableRefObject<() => Promise<void>>;
21
+ }
22
+ export declare function useStatusSyncInterval({ getAutonomy, getYolo, getModeLabel, getEternalEngine, getParallelEngine, agent, autonomyLive, yoloLive, liveModeLabel, liveModel, liveProvider, setAutonomyLive, setYoloLive, setLiveModeLabel, setLiveModel, setLiveProvider, runEternalLoopRef, runParallelLoopRef, }: UseStatusSyncIntervalOptions): void;
23
+ //# sourceMappingURL=use-status-sync-interval.d.ts.map
@@ -1,7 +1,9 @@
1
+ import type { CacheStats } from '@wrongstack/core/types';
1
2
  import { type ContextBreakdown } from '@wrongstack/core/utils';
2
3
  import type { AppProps } from '../app-props.js';
3
4
  import type { FleetEntry, State } from '../app-state.js';
4
5
  import type { StatuslineItem } from '../components/statusline-picker.js';
6
+ import type { TokenRefreshData } from './use-token-counter-refresh.js';
5
7
  interface StatusbarViewModelOptions {
6
8
  agent: AppProps['agent'];
7
9
  tokenCounter: AppProps['tokenCounter'];
@@ -20,6 +22,17 @@ interface StatusbarViewModelOptions {
20
22
  * user-hidden, skip the poll entirely until it is visible again.
21
23
  */
22
24
  hiddenItems?: readonly StatuslineItem[] | undefined;
25
+ /**
26
+ * Live token-counter refresh snapshot — supplies per-request
27
+ * `currentRequestTokens` plus cumulative `cacheStats`. When omitted the
28
+ * view model falls back to reading the counter directly so existing
29
+ * callers stay correct (the older path was a render-time poll of
30
+ * mutable counters and lagged async provider responses).
31
+ *
32
+ * Typed as the exact `TokenRefreshData` shape so callers passing the
33
+ * hook's return value stay assignable under `exactOptionalPropertyTypes`.
34
+ */
35
+ tokenRefresh?: TokenRefreshData;
23
36
  }
24
37
  interface PlanCounts {
25
38
  open: number;
@@ -34,13 +47,24 @@ interface TaskCounts {
34
47
  failed: number;
35
48
  }
36
49
  /** Builds status-bar projections without coupling them to the root App render. */
37
- export declare function useStatusbarViewModel({ agent, tokenCounter, activeMaxContext, effectiveMaxContext, liveProvider, liveModel, liveTodos, sidebarVisible, state, hiddenItems, }: StatusbarViewModelOptions): {
50
+ export declare function useStatusbarViewModel({ agent, tokenCounter, activeMaxContext, effectiveMaxContext, liveProvider, liveModel, liveTodos, sidebarVisible, state, hiddenItems, tokenRefresh, }: StatusbarViewModelOptions): {
38
51
  contextBreakdown: ContextBreakdown | undefined;
39
52
  currentContextTokens: number;
40
53
  contextWindow: {
41
54
  used: number;
42
55
  max: number;
43
56
  } | undefined;
57
+ cacheStats: CacheStats;
58
+ /**
59
+ * "Cache coverage" — how far the cached prefix reaches through the live
60
+ * request, expressed in tokens. Computed from the per-request
61
+ * `cacheRead` snapshot (the cached prefix of the current prompt) and
62
+ * the measured `used` total. Capped at `used` so the figure never
63
+ * overshoots the actual request size. Zero when no cache read was
64
+ * reported on the latest request — the indicator stays hidden instead
65
+ * of suggesting a meaningless 0.
66
+ */
67
+ cacheCoverageTokens: number;
44
68
  todos: {
45
69
  pending: number;
46
70
  inProgress: number;
@@ -0,0 +1,13 @@
1
+ import type { ConfigStore } from '@wrongstack/core/types';
2
+ import type { Action } from '../app-reducer.js';
3
+ import { type ThemeName } from '../theme.js';
4
+ export interface UseThemePickerHandlerOptions {
5
+ configStore?: ConfigStore | undefined;
6
+ saveThemePreset?: ((theme: ThemeName) => Promise<void>) | undefined;
7
+ dispatch: React.Dispatch<Action>;
8
+ selectedIndex: number;
9
+ }
10
+ export declare function useThemePickerHandler({ configStore, saveThemePreset, dispatch, selectedIndex, }: UseThemePickerHandlerOptions): {
11
+ onThemePickerEnter: () => void;
12
+ };
13
+ //# sourceMappingURL=use-theme-picker-handler.d.ts.map