@wrongstack/tui 1.0.17 → 1.0.24

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 (94) hide show
  1. package/dist/app-action-type.d.ts +31 -0
  2. package/dist/app-key-handler.d.ts +1 -1
  3. package/dist/app-panel-state.d.ts +536 -0
  4. package/dist/app-props.d.ts +1 -1
  5. package/dist/app-state.d.ts +8 -534
  6. package/dist/app-status-region.d.ts +2 -1
  7. package/dist/app-ui-state.d.ts +2 -0
  8. package/dist/app-view-pickers.d.ts +2 -1
  9. package/dist/app-view-state.d.ts +2 -0
  10. package/dist/app.d.ts +2 -2
  11. package/dist/auth-panel-model.d.ts +1 -0
  12. package/dist/components/agent-monitor-presentation.d.ts +61 -0
  13. package/dist/components/agents-monitor.d.ts +3 -49
  14. package/dist/components/audit-panel.d.ts +2 -1
  15. package/dist/components/auth-panel.d.ts +3 -1
  16. package/dist/components/brain-panel.d.ts +3 -1
  17. package/dist/components/checkpoint-timeline.d.ts +1 -1
  18. package/dist/components/confirm-prompt.d.ts +6 -7
  19. package/dist/components/connections-panel.d.ts +2 -1
  20. package/dist/components/context-panel-sections.d.ts +53 -0
  21. package/dist/components/context-panel-types.d.ts +66 -0
  22. package/dist/components/context-panel.d.ts +2 -66
  23. package/dist/components/exit-confirm-panel.d.ts +2 -0
  24. package/dist/components/file-picker.d.ts +2 -1
  25. package/dist/components/help-panel.d.ts +5 -3
  26. package/dist/components/history/utils.d.ts +3 -9
  27. package/dist/components/history/visual-tool-output.d.ts +8 -0
  28. package/dist/components/input.d.ts +1 -1
  29. package/dist/components/inspect-overlay.d.ts +1 -1
  30. package/dist/components/kanban-panel-presentation.d.ts +114 -0
  31. package/dist/components/kanban-panel.d.ts +2 -47
  32. package/dist/components/mailbox-panel.d.ts +2 -1
  33. package/dist/components/mcp-picker.d.ts +3 -1
  34. package/dist/components/mode-picker.d.ts +3 -1
  35. package/dist/components/model-picker.d.ts +1 -1
  36. package/dist/components/monitor-shell.d.ts +14 -3
  37. package/dist/components/plugin-picker.d.ts +3 -1
  38. package/dist/components/powerline-rail.d.ts +6 -3
  39. package/dist/components/provider-colors.d.ts +2 -12
  40. package/dist/components/refine-countdown-panel.d.ts +4 -3
  41. package/dist/components/settings-picker-row-list.d.ts +2 -1
  42. package/dist/components/settings-picker.d.ts +3 -1
  43. package/dist/components/shadow-panel.d.ts +2 -1
  44. package/dist/components/sidebar-content.d.ts +1 -47
  45. package/dist/components/sidebar-ipc-icons.d.ts +9 -0
  46. package/dist/components/sidebar-presentation.d.ts +98 -0
  47. package/dist/components/sidebar.d.ts +3 -1
  48. package/dist/components/skill-picker.d.ts +2 -1
  49. package/dist/components/slash-confirm-panel.d.ts +2 -0
  50. package/dist/components/slash-menu.d.ts +2 -1
  51. package/dist/components/slash-modal-frame.d.ts +9 -0
  52. package/dist/components/status-bar.d.ts +1 -1
  53. package/dist/components/statusline-picker.d.ts +2 -2
  54. package/dist/components/tools-picker.d.ts +3 -1
  55. package/dist/components/user-input-prompt.d.ts +4 -2
  56. package/dist/connection-actions.d.ts +20 -0
  57. package/dist/connections-health.d.ts +8 -1
  58. package/dist/esc-close-panels.d.ts +0 -1
  59. package/dist/f-key-panels.d.ts +4 -0
  60. package/dist/hooks/use-active-theme.d.ts +2 -1
  61. package/dist/hooks/use-app-panels-state.d.ts +1 -1
  62. package/dist/hooks/use-app-picker-keys.d.ts +2 -1
  63. package/dist/hooks/use-fleet-generation-gate.d.ts +4 -3
  64. package/dist/hooks/use-panel-controllers.d.ts +1 -1
  65. package/dist/hooks/use-picker-keys-types.d.ts +1 -0
  66. package/dist/hooks/use-shadow-panel.d.ts +1 -1
  67. package/dist/hooks/use-sidebar-panel-data.d.ts +7 -5
  68. package/dist/hooks/use-skill-mention-picker.d.ts +6 -0
  69. package/dist/hooks/use-statusbar-view-model.d.ts +2 -2
  70. package/dist/hooks/use-windowed-picker.d.ts +3 -4
  71. package/dist/index.js +9799 -7534
  72. package/dist/ink.d.ts +4 -4
  73. package/dist/input-graphemes.d.ts +4 -0
  74. package/dist/input-key-router.d.ts +2 -0
  75. package/dist/input-tokens.d.ts +10 -0
  76. package/dist/input-validation/action-types.d.ts +1 -1
  77. package/dist/input-validation-coordination.d.ts +9 -0
  78. package/dist/kanban-arguments.d.ts +48 -0
  79. package/dist/kanban-audit.d.ts +1 -1
  80. package/dist/kanban-command-types.d.ts +53 -0
  81. package/dist/kanban-reports.d.ts +42 -0
  82. package/dist/kanban-slash.d.ts +4 -125
  83. package/dist/key-routes/key-route-overlay.d.ts +2 -2
  84. package/dist/on-panel-open.d.ts +1 -1
  85. package/dist/picker-text-input.d.ts +4 -0
  86. package/dist/reducers/composer.d.ts +1 -1
  87. package/dist/reducers/panel-pickers.d.ts +1 -1
  88. package/dist/reducers/workspace-panels.d.ts +1 -1
  89. package/dist/run-tui-options.d.ts +1 -1
  90. package/dist/statusline-palette.d.ts +4 -0
  91. package/dist/theme-utils.d.ts +1 -1
  92. package/dist/ui-contracts.d.ts +1 -0
  93. package/dist/use-app-controller.d.ts +157 -0
  94. package/package.json +7 -7
package/dist/app.d.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  import type React from 'react';
2
+ import type { AppProps } from './app-props.js';
2
3
  export { buildGoalPreamble } from '@wrongstack/core/execution';
3
4
  export type { AppProps } from './app-props.js';
4
5
  export { type Action, type FleetEntry, type QueueItem, type ResumeSessionEntry, reducer, type Settings, type SlashCommandMatch, type State, } from './app-reducer.js';
@@ -6,6 +7,5 @@ export { nextInputWordStart, previousInputWordStart } from './input-editing.js';
6
7
  export { renderRunningTools } from './running-tools.js';
7
8
  export { selectedSlashCommandLine } from './slash-command-search.js';
8
9
  export { buildSteeringPreamble } from './steering-preamble.js';
9
- import type { AppProps } from './app-props.js';
10
- export declare function App(props: AppProps): React.ReactElement;
10
+ export declare function App(props0: AppProps): React.ReactElement;
11
11
  //# sourceMappingURL=app.d.ts.map
@@ -172,6 +172,7 @@ export interface AuthPanelHost {
172
172
  addLocal(presetId: string, io: AuthFlowIo, opts?: {
173
173
  baseUrl?: string;
174
174
  apiKey?: string;
175
+ alias?: string;
175
176
  }): Promise<AuthFlowResult>;
176
177
  oauthLogin(kind: AuthOAuthKind, io: AuthFlowIo): Promise<AuthFlowResult>;
177
178
  /**
@@ -0,0 +1,61 @@
1
+ import type { AgentTimelineEntry } from '@wrongstack/core/coordination';
2
+ import type { FleetEntry } from '../app-state.js';
3
+ import type { HistoryEntry } from './history.js';
4
+ export declare function isLeaderEntry(entry: FleetEntry): boolean;
5
+ /**
6
+ * Select the agents the live monitor should render. Only actively-running
7
+ * subagents are detail-worthy; idle workers are retained by the coordinator for
8
+ * reuse but should not keep the TUI crowded after their task closes. LEADER
9
+ * stays visible while a subagent is running (or while LEADER itself is running)
10
+ * so F3 always has a detail card fallback.
11
+ */
12
+ export declare function selectLiveAgents(all: FleetEntry[], _now: number, _idleHideMs?: number): FleetEntry[];
13
+ export declare function fmtTokens(n: number): string;
14
+ export declare function fmtExactTokens(n: number): string;
15
+ export declare function snippet(s: string, max?: number): string;
16
+ export declare function formatContextRunway(tokens?: number, maxTokens?: number): string;
17
+ export declare function formatRecentToolChip(tool: FleetEntry['recentTools'][number]): string;
18
+ export declare function formatAgentDetailHeader(entry: FleetEntry): string;
19
+ export declare function agentRisk(entry: FleetEntry): 'calm' | 'busy' | 'hot' | 'critical';
20
+ export declare function riskMeta(risk: ReturnType<typeof agentRisk>): {
21
+ icon: string;
22
+ color: string;
23
+ label: string;
24
+ };
25
+ export declare function currentAction(entry: FleetEntry, now: number): string;
26
+ export declare function selectAgentDetail(live: FleetEntry[], selectedId?: string): FleetEntry | undefined;
27
+ export declare function nextEmptyAgentsCloseStartedAt(liveCount: number, now: number, currentStartedAt?: number): number | undefined;
28
+ export declare function shouldCloseEmptyAgentsMonitor(liveCount: number, now: number, emptyStartedAt: number | undefined, delayMs?: number): boolean;
29
+ export declare function selectHotAgent(entries: FleetEntry[]): FleetEntry | undefined;
30
+ export declare function pctTextFromRatio(pct: number | undefined): string;
31
+ /**
32
+ * Rows of transcript content for the current terminal. Constant for a
33
+ * given terminal size and agent count, so agent switches never change
34
+ * the panel height — only explicit resizes / fleet composition do.
35
+ * `fullscreen` lifts the 24-row cap: the F3 monitor owns the whole
36
+ * screen (chat history hidden), so the pane should fill every row the
37
+ * chrome doesn't need.
38
+ */
39
+ export declare function transcriptRowsForTerminal(termRows: number | undefined, rosterCount: number, fullscreen?: boolean): number;
40
+ /** One transcript entry as a single display line: `HH:MM:SS L3 🔧 …`. */
41
+ export declare function formatTranscriptLine(e: AgentTimelineEntry, maxWidth?: number): string;
42
+ /**
43
+ * Map the main chat's history entries into the transcript timeline shape
44
+ * so LEADER gets its own clean per-agent view in the F3 monitor. Subagent
45
+ * lines are EXCLUDED — that separation (leader vs subagents, not
46
+ * interleaved) is the whole point of the per-agent view. Banners and
47
+ * confirm prompts are UI chrome, not history, and are skipped too.
48
+ */
49
+ export declare function leaderTimelineFromEntries(entries: readonly HistoryEntry[]): AgentTimelineEntry[];
50
+ /**
51
+ * Slice a transcript (OLDEST first) into the fixed viewing window.
52
+ * `scrollOffset` counts lines scrolled UP from the tail (0 = pinned to
53
+ * newest). Returns the visible slice plus how many entries are hidden
54
+ * above/below the window.
55
+ */
56
+ export declare function selectTranscriptWindow(entries: readonly AgentTimelineEntry[], scrollOffset: number, rows?: number): {
57
+ slice: AgentTimelineEntry[];
58
+ above: number;
59
+ below: number;
60
+ };
61
+ //# sourceMappingURL=agent-monitor-presentation.d.ts.map
@@ -1,9 +1,8 @@
1
- import type React from 'react';
2
1
  import type { AgentTimelineEntry } from '@wrongstack/core/coordination';
2
+ import type React from 'react';
3
+ import type { FleetEntry } from '../app-state.js';
3
4
  import type { AgentTranscriptReader } from '../ui-contracts.js';
4
5
  export type { AgentTranscriptReader } from '../ui-contracts.js';
5
- import type { FleetEntry } from '../app-state.js';
6
- import type { HistoryEntry } from './history.js';
7
6
  /**
8
7
  * Narrow read-only view of per-subagent transcripts. AgentMonitorService
9
8
  * (created in the CLI host) satisfies this structurally; the TUI never
@@ -24,53 +23,8 @@ interface AgentsMonitorProps {
24
23
  leaderTranscript?: (() => AgentTimelineEntry[]) | undefined;
25
24
  fullscreen?: boolean | undefined;
26
25
  }
26
+ export { agentRisk, fmtExactTokens, formatAgentDetailHeader, formatContextRunway, formatRecentToolChip, formatTranscriptLine, leaderTimelineFromEntries, nextEmptyAgentsCloseStartedAt, selectAgentDetail, selectLiveAgents, selectTranscriptWindow, shouldCloseEmptyAgentsMonitor, transcriptRowsForTerminal, } from './agent-monitor-presentation.js';
27
27
  export { EMPTY_AGENTS_CLOSE_DELAY_MS, IDLE_HIDE_MS } from './agents-monitor-constants.js';
28
- /**
29
- * Select the agents the live monitor should render. Only actively-running
30
- * subagents are detail-worthy; idle workers are retained by the coordinator for
31
- * reuse but should not keep the TUI crowded after their task closes. LEADER
32
- * stays visible while a subagent is running (or while LEADER itself is running)
33
- * so F3 always has a detail card fallback.
34
- */
35
- export declare function selectLiveAgents(all: FleetEntry[], _now: number, _idleHideMs?: number): FleetEntry[];
36
- export declare function fmtExactTokens(n: number): string;
37
- export declare function formatContextRunway(tokens?: number, maxTokens?: number): string;
38
- export declare function formatRecentToolChip(tool: FleetEntry['recentTools'][number]): string;
39
- export declare function formatAgentDetailHeader(entry: FleetEntry): string;
40
- export declare function agentRisk(entry: FleetEntry): 'calm' | 'busy' | 'hot' | 'critical';
41
- export declare function selectAgentDetail(live: FleetEntry[], selectedId?: string): FleetEntry | undefined;
42
- export declare function nextEmptyAgentsCloseStartedAt(liveCount: number, now: number, currentStartedAt?: number): number | undefined;
43
- export declare function shouldCloseEmptyAgentsMonitor(liveCount: number, now: number, emptyStartedAt: number | undefined, delayMs?: number): boolean;
44
- /**
45
- * Rows of transcript content for the current terminal. Constant for a
46
- * given terminal size and agent count, so agent switches never change
47
- * the panel height — only explicit resizes / fleet composition do.
48
- * `fullscreen` lifts the 24-row cap: the F3 monitor owns the whole
49
- * screen (chat history hidden), so the pane should fill every row the
50
- * chrome doesn't need.
51
- */
52
- export declare function transcriptRowsForTerminal(termRows: number | undefined, rosterCount: number, fullscreen?: boolean): number;
53
- /** One transcript entry as a single display line: `HH:MM:SS L3 🔧 …`. */
54
- export declare function formatTranscriptLine(e: AgentTimelineEntry, maxWidth?: number): string;
55
- /**
56
- * Map the main chat's history entries into the transcript timeline shape
57
- * so LEADER gets its own clean per-agent view in the F3 monitor. Subagent
58
- * lines are EXCLUDED — that separation (leader vs subagents, not
59
- * interleaved) is the whole point of the per-agent view. Banners and
60
- * confirm prompts are UI chrome, not history, and are skipped too.
61
- */
62
- export declare function leaderTimelineFromEntries(entries: readonly HistoryEntry[]): AgentTimelineEntry[];
63
- /**
64
- * Slice a transcript (OLDEST first) into the fixed viewing window.
65
- * `scrollOffset` counts lines scrolled UP from the tail (0 = pinned to
66
- * newest). Returns the visible slice plus how many entries are hidden
67
- * above/below the window.
68
- */
69
- export declare function selectTranscriptWindow(entries: readonly AgentTimelineEntry[], scrollOffset: number, rows?: number): {
70
- slice: AgentTimelineEntry[];
71
- above: number;
72
- below: number;
73
- };
74
28
  /**
75
29
  * Agents panel — the redesigned F3 view.
76
30
  *
@@ -3,7 +3,8 @@ interface AuditPanelProps {
3
3
  /** Side effects from ctx.sideEffects, passed from the host. */
4
4
  sideEffects: SideEffect[];
5
5
  onClose: () => void;
6
+ maxRows?: number | undefined;
6
7
  }
7
- export declare function AuditPanel({ sideEffects, onClose: _onClose }: AuditPanelProps): import("react").JSX.Element;
8
+ export declare function AuditPanel({ sideEffects, onClose: _onClose, maxRows }: AuditPanelProps): import("react").JSX.Element;
8
9
  export {};
9
10
  //# sourceMappingURL=audit-panel.d.ts.map
@@ -1,6 +1,8 @@
1
1
  import type React from 'react';
2
2
  import { type AuthPanelState } from './auth-panel-model.js';
3
3
  interface AuthPanelProps {
4
+ maxRows?: number | undefined;
5
+ columns?: number | undefined;
4
6
  panel: AuthPanelState;
5
7
  }
6
8
  export declare function formatExpiry(expiresAt: string | undefined): {
@@ -10,6 +12,6 @@ export declare function formatExpiry(expiresAt: string | undefined): {
10
12
  export declare function isAuthFlowUrlLine(line: string): boolean;
11
13
  /** Keep the newest authorize URL pinned even as later status lines arrive. */
12
14
  export declare function latestAuthFlowUrl(lines: readonly string[]): string | undefined;
13
- export declare function AuthPanel({ panel }: AuthPanelProps): React.ReactElement;
15
+ export declare function AuthPanel({ panel, maxRows, columns }: AuthPanelProps): React.ReactElement;
14
16
  export {};
15
17
  //# sourceMappingURL=auth-panel.d.ts.map
@@ -3,6 +3,8 @@ import type { BrainLogEntry, BrainRiskLevel } from '../brain-contracts.js';
3
3
  export type { BrainLogEntry, BrainRiskLevel } from '../brain-contracts.js';
4
4
  import { type BrainPanelSettings } from './brain-panel-model.js';
5
5
  export interface BrainPanelProps {
6
+ maxRows?: number | undefined;
7
+ columns?: number | undefined;
6
8
  riskLevel: BrainRiskLevel;
7
9
  log: BrainLogEntry[];
8
10
  selected: number;
@@ -13,5 +15,5 @@ export interface BrainPanelProps {
13
15
  row?: number | undefined;
14
16
  busy?: boolean | undefined;
15
17
  }
16
- export declare function BrainPanel({ riskLevel, log, selected, hint, view, settings, row, busy, }: BrainPanelProps): React.ReactElement;
18
+ export declare function BrainPanel({ riskLevel, log, selected, hint, view, settings, row, busy, maxRows, columns, }: BrainPanelProps): React.ReactElement;
17
19
  //# sourceMappingURL=brain-panel.d.ts.map
@@ -8,7 +8,7 @@ export interface CheckpointTimelineProps {
8
8
  }>;
9
9
  selected: number;
10
10
  onSelect: (index: number) => void;
11
- onConfirm: (index: number) => void;
11
+ onConfirm: (index: number) => void | Promise<void>;
12
12
  onClose: () => void;
13
13
  }
14
14
  /**
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- export type ConfirmDecision = 'yes' | 'no' | 'always' | 'deny';
2
+ export type ConfirmDecision = 'yes' | 'no' | 'always' | 'always-exact' | 'always-command' | 'always-tool' | 'deny';
3
3
  interface ConfirmPromptProps {
4
4
  toolName: string;
5
5
  input: unknown;
@@ -7,6 +7,7 @@ interface ConfirmPromptProps {
7
7
  onDecision: (decision: ConfirmDecision) => void;
8
8
  /** Enable YOLO mode (capital Y). Destructive current calls remain pending. */
9
9
  onEnableYolo: () => void;
10
+ maxRows?: number | undefined;
10
11
  /** Whether this call was classified destructive. */
11
12
  destructive?: boolean;
12
13
  boundaryReason?: string | undefined;
@@ -19,12 +20,10 @@ interface ConfirmPromptProps {
19
20
  }
20
21
  /**
21
22
  * 0-based column spans of each button WITHIN the dialog's content area (i.e.
22
- * relative to the first printable column inside the border + paddingX). Used
23
- * by the TUI mouse handler to map a click on the button row to a decision.
24
- * Derived from the same `buttonLabels` the component renders, so the offsets
25
- * always match what's on screen.
23
+ * relative to the first printable column inside the border + paddingX).
24
+ * These describe an unwrapped row; the live handler uses measured DOM boxes.
26
25
  */
27
- export declare function confirmButtonSegments(suggestedPattern: string): Array<{
26
+ export declare function confirmButtonSegments(suggestedPattern: string, toolName?: string): Array<{
28
27
  decision: ConfirmDecision;
29
28
  start: number;
30
29
  len: number;
@@ -43,6 +42,6 @@ export declare function confirmButtonSegments(suggestedPattern: string): Array<{
43
42
  * through the same DiffBlock the committed history entries use.
44
43
  */
45
44
  export declare function payloadDiff(input: unknown): string;
46
- export declare function ConfirmPrompt({ toolName, input, suggestedPattern, onDecision, onEnableYolo, destructive, boundaryReason, writeTargets, }: ConfirmPromptProps): React.ReactElement;
45
+ export declare function ConfirmPrompt({ toolName, input, suggestedPattern, onDecision, onEnableYolo, destructive, boundaryReason, writeTargets, maxRows, }: ConfirmPromptProps): React.ReactElement;
47
46
  export {};
48
47
  //# sourceMappingURL=confirm-prompt.d.ts.map
@@ -1,7 +1,8 @@
1
1
  interface ConnectionsPanelProps {
2
2
  projectRoot: string;
3
3
  onClose: () => void;
4
+ maxRows?: number | undefined;
4
5
  }
5
- export declare function ConnectionsPanel({ projectRoot, onClose, }: ConnectionsPanelProps): React.ReactElement;
6
+ export declare function ConnectionsPanel({ projectRoot, onClose, maxRows, }: ConnectionsPanelProps): React.ReactElement;
6
7
  export {};
7
8
  //# sourceMappingURL=connections-panel.d.ts.map
@@ -0,0 +1,53 @@
1
+ import type { ContextBreakdown } from '@wrongstack/core/utils';
2
+ import type React from 'react';
3
+ import type { ContextPanelData } from './context-panel-types.js';
4
+ type ZoneLevel = 'safe' | 'warning' | 'critical' | 'danger';
5
+ export declare function zoneFor(pct: number): ZoneLevel;
6
+ export declare function zoneColor(zone: ZoneLevel): string;
7
+ export declare function zoneEmoji(pct: number): string;
8
+ export declare function zoneLabel(pct: number): string;
9
+ export declare function PressureSection({ data, contentWidth, }: {
10
+ data: ContextPanelData;
11
+ contentWidth: number;
12
+ }): React.ReactElement;
13
+ /**
14
+ * Real composition, measured from the assembled request. Top-level categories
15
+ * (System / Tools / History / Volatile) each render a bar sized to their share
16
+ * of the total, plus a muted sub-line of the biggest constituents.
17
+ */
18
+ export declare function CompositionSection({ breakdown, contentWidth, }: {
19
+ breakdown: ContextBreakdown | undefined;
20
+ contentWidth: number;
21
+ }): React.ReactElement;
22
+ export declare function ThresholdSection({ data, contentWidth, }: {
23
+ data: ContextPanelData;
24
+ contentWidth: number;
25
+ }): React.ReactElement;
26
+ export declare function CompactionSection({ data }: {
27
+ data: ContextPanelData;
28
+ }): React.ReactElement;
29
+ export declare function AgentFootprintSection({ data, contentWidth, }: {
30
+ data: ContextPanelData;
31
+ contentWidth: number;
32
+ }): React.ReactElement;
33
+ export declare function MetricsSection({ data }: {
34
+ data: ContextPanelData;
35
+ }): React.ReactElement;
36
+ /**
37
+ * Cache coverage section — answers "exactly how far does the prompt cache
38
+ * extend into the live request?" Renders the cumulative cache hit ratio
39
+ * plus a per-request coverage meter that visibly marks where the cached
40
+ * prefix ends. Hidden when nothing has been cached yet so the panel does
41
+ * not advertise a 0% figure as if it were meaningful.
42
+ */
43
+ export declare function CacheSection({ data }: {
44
+ data: ContextPanelData;
45
+ }): React.ReactElement;
46
+ export declare function StatusSection({ data }: {
47
+ data: ContextPanelData;
48
+ }): React.ReactElement;
49
+ export declare function MemoryContextSection({ data }: {
50
+ data: ContextPanelData;
51
+ }): React.ReactElement;
52
+ export {};
53
+ //# sourceMappingURL=context-panel-sections.d.ts.map
@@ -0,0 +1,66 @@
1
+ import type { ContextBreakdown } from '@wrongstack/core/utils';
2
+ import type { MemoryContextMonitorState } from '../memory-context-monitor.js';
3
+ export interface ContextPanelData {
4
+ ctxPct: number | undefined;
5
+ ctxTokens: number | undefined;
6
+ ctxMaxTokens: number | undefined;
7
+ provider: string;
8
+ model: string;
9
+ mode: string;
10
+ uptime: string;
11
+ /**
12
+ * Cumulative prompt-cache stats from the per-session TokenCounter.
13
+ * Surfaced in the panel so `/context` answers "how much of my spend
14
+ * is hitting the cache" without asking the user to chase the CLI
15
+ * `/context cache` subcommand.
16
+ *
17
+ * `savedUsd` is the gross read-discount USD figure computed by the
18
+ * counter (cache-read tokens × (input price − cache-read price)).
19
+ * `cacheWrite5m` / `cacheWrite1h` are present when the upstream exposed
20
+ * an Anthropic-style TTL split (Anthropic family, including MiniMax
21
+ * routed through the Anthropic Messages surface); OpenAI-family
22
+ * gateways emit only the aggregate and leave them undefined.
23
+ */
24
+ cacheStats?: {
25
+ readTokens: number;
26
+ writeTokens: number;
27
+ cacheWrite5m?: number | undefined;
28
+ cacheWrite1h?: number | undefined;
29
+ hitRatio: number;
30
+ savedUsd: number;
31
+ } | undefined;
32
+ /**
33
+ * How far the cached prefix reaches through the live request, in
34
+ * tokens. Drawn on the per-request coverage meter so users see the
35
+ * exact extent of the cache, not just a percentage.
36
+ */
37
+ cacheCoverageTokens?: number | undefined;
38
+ /** Session cache telemetry split by provider, including fallback/model switches. */
39
+ providerCacheStats?: Array<{
40
+ provider: string;
41
+ input: number;
42
+ cacheRead: number;
43
+ cacheWrite: number;
44
+ cacheWrite5m?: number | undefined;
45
+ cacheWrite1h?: number | undefined;
46
+ hitRatio: number;
47
+ }> | undefined;
48
+ /**
49
+ * Real, measured per-category token accounting for the live request. When
50
+ * present the Composition tab shows honest numbers; when absent (no request
51
+ * has been assembled yet) the tab shows an empty state instead of fabricated
52
+ * percentages.
53
+ */
54
+ breakdown: ContextBreakdown | undefined;
55
+ fleetEntries: Array<{
56
+ name: string;
57
+ status: string;
58
+ currentTool: string | undefined;
59
+ ctxPct: number | undefined;
60
+ }>;
61
+ leaderIterations: number;
62
+ leaderToolCalls: number;
63
+ leaderStatus: string;
64
+ memoryContext: MemoryContextMonitorState;
65
+ }
66
+ //# sourceMappingURL=context-panel-types.d.ts.map
@@ -1,73 +1,9 @@
1
- import type { ContextBreakdown } from '@wrongstack/core/utils';
2
1
  import type React from 'react';
3
- import type { MemoryContextMonitorState } from '../memory-context-monitor.js';
4
- export interface ContextPanelData {
5
- ctxPct: number | undefined;
6
- ctxTokens: number | undefined;
7
- ctxMaxTokens: number | undefined;
8
- provider: string;
9
- model: string;
10
- mode: string;
11
- uptime: string;
12
- /**
13
- * Cumulative prompt-cache stats from the per-session TokenCounter.
14
- * Surfaced in the panel so `/context` answers "how much of my spend
15
- * is hitting the cache" without asking the user to chase the CLI
16
- * `/context cache` subcommand.
17
- *
18
- * `savedUsd` is the gross read-discount USD figure computed by the
19
- * counter (cache-read tokens × (input price − cache-read price)).
20
- * `cacheWrite5m` / `cacheWrite1h` are present when the upstream exposed
21
- * an Anthropic-style TTL split (Anthropic family, including MiniMax
22
- * routed through the Anthropic Messages surface); OpenAI-family
23
- * gateways emit only the aggregate and leave them undefined.
24
- */
25
- cacheStats?: {
26
- readTokens: number;
27
- writeTokens: number;
28
- cacheWrite5m?: number | undefined;
29
- cacheWrite1h?: number | undefined;
30
- hitRatio: number;
31
- savedUsd: number;
32
- } | undefined;
33
- /**
34
- * How far the cached prefix reaches through the live request, in
35
- * tokens. Drawn on the per-request coverage meter so users see the
36
- * exact extent of the cache, not just a percentage.
37
- */
38
- cacheCoverageTokens?: number | undefined;
39
- /** Session cache telemetry split by provider, including fallback/model switches. */
40
- providerCacheStats?: Array<{
41
- provider: string;
42
- input: number;
43
- cacheRead: number;
44
- cacheWrite: number;
45
- cacheWrite5m?: number | undefined;
46
- cacheWrite1h?: number | undefined;
47
- hitRatio: number;
48
- }> | undefined;
49
- /**
50
- * Real, measured per-category token accounting for the live request. When
51
- * present the Composition tab shows honest numbers; when absent (no request
52
- * has been assembled yet) the tab shows an empty state instead of fabricated
53
- * percentages.
54
- */
55
- breakdown: ContextBreakdown | undefined;
56
- fleetEntries: Array<{
57
- name: string;
58
- status: string;
59
- currentTool: string | undefined;
60
- ctxPct: number | undefined;
61
- }>;
62
- leaderIterations: number;
63
- leaderToolCalls: number;
64
- leaderStatus: string;
65
- memoryContext: MemoryContextMonitorState;
66
- }
2
+ import type { ContextPanelData } from './context-panel-types.js';
67
3
  interface ContextPanelProps {
68
4
  data: ContextPanelData;
69
5
  onClose: () => void;
70
6
  }
71
7
  export declare function ContextPanel({ data, onClose }: ContextPanelProps): React.ReactElement;
72
- export {};
8
+ export type { ContextPanelData } from './context-panel-types.js';
73
9
  //# sourceMappingURL=context-panel.d.ts.map
@@ -5,6 +5,8 @@ interface ExitConfirmPanelProps {
5
5
  backgroundCount?: number | undefined;
6
6
  }
7
7
  export interface ExitConfirmationKey {
8
+ ctrl?: boolean | undefined;
9
+ meta?: boolean | undefined;
8
10
  escape?: boolean | undefined;
9
11
  return?: boolean | undefined;
10
12
  }
@@ -3,6 +3,7 @@ export interface FilePickerProps {
3
3
  query: string;
4
4
  matches: string[];
5
5
  selected: number;
6
+ maxRows?: number | undefined;
6
7
  }
7
- export declare function FilePicker({ query, matches, selected }: FilePickerProps): React.ReactElement;
8
+ export declare function FilePicker({ query, matches, selected, maxRows, }: FilePickerProps): React.ReactElement;
8
9
  //# sourceMappingURL=file-picker.d.ts.map
@@ -5,13 +5,15 @@ export interface HelpEntry {
5
5
  category: string;
6
6
  aliases?: string[] | undefined;
7
7
  argsHint?: string | undefined;
8
+ help?: string | undefined;
8
9
  }
9
- interface HelpPanelProps {
10
+ export interface HelpPanelProps {
10
11
  entries: HelpEntry[];
11
12
  filter: string;
12
13
  selected: number;
13
14
  hint?: string | undefined;
15
+ maxRows?: number | undefined;
16
+ detailScroll?: number | undefined;
14
17
  }
15
- export declare function HelpPanel({ entries, filter, selected, hint }: HelpPanelProps): React.ReactElement;
16
- export {};
18
+ export declare function HelpPanel({ entries, filter, selected, hint, maxRows, detailScroll, }: HelpPanelProps): React.ReactElement;
17
19
  //# sourceMappingURL=help-panel.d.ts.map
@@ -1,10 +1,10 @@
1
1
  export { countLines, firstNonEmpty, fmtBytes, fmtDuration, fmtTok, formatMatchHit, numOf, scanNumberedRange, shortenPath, stringOf, truncMid, tryParseJson, } from './basic-format.js';
2
+ export { extractSageBlock, type ParsedSageMemoryLine, parseSageMemoryLine, resolveEntrySage, type SageSplit, } from './sage-output-format.js';
2
3
  export { AssistantStreamBox, assistantStreamBoxHeight, MAX_STREAM_DISPLAY_CHARS, streamBoxRows, ToolStreamBox, tailForDisplay, toolStreamBoxHeight, } from './stream-box.js';
4
+ export { formatToolArgs } from './tool-arg-format.js';
3
5
  export type { ToolVisualLine, ToolVisualLineKind } from './tool-visual-types.js';
4
6
  export { ToolOutputLines } from './visual-lines.js';
5
- import type { ToolVisualLine } from './tool-visual-types.js';
6
- export { extractSageBlock, type ParsedSageMemoryLine, parseSageMemoryLine, resolveEntrySage, type SageSplit, } from './sage-output-format.js';
7
- export { formatToolArgs } from './tool-arg-format.js';
7
+ export { formatToolVisualOutput } from './visual-tool-output.js';
8
8
  /**
9
9
  * Like `formatToolOutput` but strips SAGE-injected memory lines first.
10
10
  * Returns the tool output lines and any SAGE block lines separately.
@@ -20,10 +20,4 @@ sageLines?: readonly string[] | undefined): {
20
20
  * Distil a tool's result text into 0–N digest lines the renderer can stack.
21
21
  */
22
22
  export declare function formatToolOutput(toolName: string, output: string | undefined, ok: boolean, _outputBytes?: number | undefined, outputLines?: number | undefined): string[];
23
- /**
24
- * Build richer terminal-native rows for common tool outputs. This handles both
25
- * raw JSON-shaped results used by unit tests and the compact serializer text
26
- * emitted in real sessions.
27
- */
28
- export declare function formatToolVisualOutput(toolName: string, output: string | undefined, ok: boolean, input?: unknown | undefined): ToolVisualLine[] | undefined;
29
23
  //# sourceMappingURL=utils.d.ts.map
@@ -0,0 +1,8 @@
1
+ import type { ToolVisualLine } from './tool-visual-types.js';
2
+ /**
3
+ * Build richer terminal-native rows for common tool outputs. This handles both
4
+ * raw JSON-shaped results used by unit tests and the compact serializer text
5
+ * emitted in real sessions.
6
+ */
7
+ export declare function formatToolVisualOutput(toolName: string, output: string | undefined, ok: boolean, input?: unknown | undefined): ToolVisualLine[] | undefined;
8
+ //# sourceMappingURL=visual-tool-output.d.ts.map
@@ -91,5 +91,5 @@ export interface KeyEvent {
91
91
  fn?: number | undefined;
92
92
  }
93
93
  export declare const EMPTY_KEY: KeyEvent;
94
- export declare const Input: React.MemoExoticComponent<({ prompt, value, cursor, disabled, hint, title, railIcon, accent, status, animationStyle, workingTime, footerHint, hidden, placeholderHeight, onKey, maxWidth, }: InputProps) => React.ReactElement>;
94
+ export declare const Input: React.MemoExoticComponent<({ prompt, value, cursor, disabled, hint, title, railIcon, accent, status, animationStyle, workingTime, footerHint, hidden, placeholderHeight, onKey, maxWidth, }: InputProps) => React.ReactElement | null>;
95
95
  //# sourceMappingURL=input.d.ts.map
@@ -47,6 +47,6 @@ interface InspectOverlayProps {
47
47
  copied?: boolean | undefined;
48
48
  headerRef?: MutableRefObject<DOMElement | null> | undefined;
49
49
  }
50
- export declare function InspectOverlay({ title, body, scroll, termCols, viewportRows, onScroll, onClose, copied, headerRef, }: InspectOverlayProps): React.ReactElement;
50
+ export declare const InspectOverlay: React.MemoExoticComponent<({ title, body, scroll, termCols, viewportRows, onScroll, onClose, copied, headerRef, }: InspectOverlayProps) => React.ReactElement>;
51
51
  export {};
52
52
  //# sourceMappingURL=inspect-overlay.d.ts.map