@wrongstack/tui 0.284.1 → 0.286.0
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.
- package/dist/app-initial-state.d.ts +28 -0
- package/dist/app-initial-state.d.ts.map +1 -0
- package/dist/app-reducer.d.ts +5 -0
- package/dist/app-reducer.d.ts.map +1 -0
- package/dist/app-state.d.ts +1841 -0
- package/dist/app-state.d.ts.map +1 -0
- package/dist/app.d.ts +593 -0
- package/dist/app.d.ts.map +1 -0
- package/dist/clipboard.d.ts +2 -0
- package/dist/clipboard.d.ts.map +1 -0
- package/dist/components/agents-monitor.d.ts +114 -0
- package/dist/components/agents-monitor.d.ts.map +1 -0
- package/dist/components/animation-style.d.ts +51 -0
- package/dist/components/animation-style.d.ts.map +1 -0
- package/dist/components/audit-panel.d.ts +9 -0
- package/dist/components/audit-panel.d.ts.map +1 -0
- package/dist/components/auth-panel-model.d.ts +150 -0
- package/dist/components/auth-panel-model.d.ts.map +1 -0
- package/dist/components/auth-panel.d.ts +8 -0
- package/dist/components/auth-panel.d.ts.map +1 -0
- package/dist/components/autonomy-picker.d.ts +15 -0
- package/dist/components/autonomy-picker.d.ts.map +1 -0
- package/dist/components/brain-decision-prompt.d.ts +28 -0
- package/dist/components/brain-decision-prompt.d.ts.map +1 -0
- package/dist/components/brain-panel-model.d.ts +107 -0
- package/dist/components/brain-panel-model.d.ts.map +1 -0
- package/dist/components/brain-panel.d.ts +22 -0
- package/dist/components/brain-panel.d.ts.map +1 -0
- package/dist/components/checkpoint-timeline.d.ts +19 -0
- package/dist/components/checkpoint-timeline.d.ts.map +1 -0
- package/dist/components/confirm-prompt.d.ts +26 -0
- package/dist/components/confirm-prompt.d.ts.map +1 -0
- package/dist/components/continue-confirm-panel.d.ts +47 -0
- package/dist/components/continue-confirm-panel.d.ts.map +1 -0
- package/dist/components/coordinator-panel.d.ts +11 -0
- package/dist/components/coordinator-panel.d.ts.map +1 -0
- package/dist/components/design-picker.d.ts +14 -0
- package/dist/components/design-picker.d.ts.map +1 -0
- package/dist/components/enhance-panel.d.ts +36 -0
- package/dist/components/enhance-panel.d.ts.map +1 -0
- package/dist/components/esc-confirm-prompt.d.ts +17 -0
- package/dist/components/esc-confirm-prompt.d.ts.map +1 -0
- package/dist/components/f-key-picker.d.ts +13 -0
- package/dist/components/f-key-picker.d.ts.map +1 -0
- package/dist/components/file-picker.d.ts +8 -0
- package/dist/components/file-picker.d.ts.map +1 -0
- package/dist/components/fleet-monitor.d.ts +60 -0
- package/dist/components/fleet-monitor.d.ts.map +1 -0
- package/dist/components/fleet-panel.d.ts +69 -0
- package/dist/components/fleet-panel.d.ts.map +1 -0
- package/dist/components/goal-panel.d.ts +17 -0
- package/dist/components/goal-panel.d.ts.map +1 -0
- package/dist/components/help-overlay.d.ts +27 -0
- package/dist/components/help-overlay.d.ts.map +1 -0
- package/dist/components/help-panel.d.ts +16 -0
- package/dist/components/help-panel.d.ts.map +1 -0
- package/dist/components/history/assistant.d.ts +61 -0
- package/dist/components/history/assistant.d.ts.map +1 -0
- package/dist/components/history/banner.d.ts +13 -0
- package/dist/components/history/banner.d.ts.map +1 -0
- package/dist/components/history/code-block.d.ts +217 -0
- package/dist/components/history/code-block.d.ts.map +1 -0
- package/dist/components/history/entry.d.ts +19 -0
- package/dist/components/history/entry.d.ts.map +1 -0
- package/dist/components/history/index.d.ts +21 -0
- package/dist/components/history/index.d.ts.map +1 -0
- package/dist/components/history/replay.d.ts +44 -0
- package/dist/components/history/replay.d.ts.map +1 -0
- package/dist/components/history/types.d.ts +146 -0
- package/dist/components/history/types.d.ts.map +1 -0
- package/dist/components/history/utils.d.ts +65 -0
- package/dist/components/history/utils.d.ts.map +1 -0
- package/dist/components/history.d.ts +2 -0
- package/dist/components/history.d.ts.map +1 -0
- package/dist/components/input.d.ts +57 -0
- package/dist/components/input.d.ts.map +1 -0
- package/dist/components/kanban-panel.d.ts +7 -0
- package/dist/components/kanban-panel.d.ts.map +1 -0
- package/dist/components/key-hint-bar.d.ts +31 -0
- package/dist/components/key-hint-bar.d.ts.map +1 -0
- package/dist/components/live-activity-strip.d.ts +39 -0
- package/dist/components/live-activity-strip.d.ts.map +1 -0
- package/dist/components/mailbox-panel.d.ts +40 -0
- package/dist/components/mailbox-panel.d.ts.map +1 -0
- package/dist/components/mcp-picker.d.ts +18 -0
- package/dist/components/mcp-picker.d.ts.map +1 -0
- package/dist/components/mode-picker.d.ts +17 -0
- package/dist/components/mode-picker.d.ts.map +1 -0
- package/dist/components/model-picker.d.ts +37 -0
- package/dist/components/model-picker.d.ts.map +1 -0
- package/dist/components/phase-monitor.d.ts +33 -0
- package/dist/components/phase-monitor.d.ts.map +1 -0
- package/dist/components/phase-panel.d.ts +22 -0
- package/dist/components/phase-panel.d.ts.map +1 -0
- package/dist/components/plan-panel.d.ts +17 -0
- package/dist/components/plan-panel.d.ts.map +1 -0
- package/dist/components/plugin-picker.d.ts +22 -0
- package/dist/components/plugin-picker.d.ts.map +1 -0
- package/dist/components/process-list.d.ts +14 -0
- package/dist/components/process-list.d.ts.map +1 -0
- package/dist/components/project-picker.d.ts +21 -0
- package/dist/components/project-picker.d.ts.map +1 -0
- package/dist/components/prompt-picker.d.ts +31 -0
- package/dist/components/prompt-picker.d.ts.map +1 -0
- package/dist/components/provider-colors.d.ts +40 -0
- package/dist/components/provider-colors.d.ts.map +1 -0
- package/dist/components/queue-panel.d.ts +16 -0
- package/dist/components/queue-panel.d.ts.map +1 -0
- package/dist/components/resume-picker.d.ts +16 -0
- package/dist/components/resume-picker.d.ts.map +1 -0
- package/dist/components/scrollable-history.d.ts +60 -0
- package/dist/components/scrollable-history.d.ts.map +1 -0
- package/dist/components/sdd-board-overlay.d.ts +15 -0
- package/dist/components/sdd-board-overlay.d.ts.map +1 -0
- package/dist/components/send-mode-picker.d.ts +64 -0
- package/dist/components/send-mode-picker.d.ts.map +1 -0
- package/dist/components/sessions-panel.d.ts +46 -0
- package/dist/components/sessions-panel.d.ts.map +1 -0
- package/dist/components/settings-picker.d.ts +387 -0
- package/dist/components/settings-picker.d.ts.map +1 -0
- package/dist/components/shadow-panel.d.ts +13 -0
- package/dist/components/shadow-panel.d.ts.map +1 -0
- package/dist/components/shell-command-warning.d.ts +9 -0
- package/dist/components/shell-command-warning.d.ts.map +1 -0
- package/dist/components/slash-menu.d.ts +9 -0
- package/dist/components/slash-menu.d.ts.map +1 -0
- package/dist/components/status-bar.d.ts +378 -0
- package/dist/components/status-bar.d.ts.map +1 -0
- package/dist/components/statusline-picker.d.ts +55 -0
- package/dist/components/statusline-picker.d.ts.map +1 -0
- package/dist/components/suggestions.d.ts +9 -0
- package/dist/components/suggestions.d.ts.map +1 -0
- package/dist/components/todos-monitor.d.ts +13 -0
- package/dist/components/todos-monitor.d.ts.map +1 -0
- package/dist/components/tools-picker.d.ts +20 -0
- package/dist/components/tools-picker.d.ts.map +1 -0
- package/dist/components/worktree-monitor.d.ts +23 -0
- package/dist/components/worktree-monitor.d.ts.map +1 -0
- package/dist/components/worktree-panel.d.ts +21 -0
- package/dist/components/worktree-panel.d.ts.map +1 -0
- package/dist/f-key-panels.d.ts +46 -0
- package/dist/f-key-panels.d.ts.map +1 -0
- package/dist/file-search.d.ts +3 -0
- package/dist/file-search.d.ts.map +1 -0
- package/dist/fn-keys.d.ts +20 -0
- package/dist/fn-keys.d.ts.map +1 -0
- package/dist/git-info.d.ts +20 -0
- package/dist/git-info.d.ts.map +1 -0
- package/dist/heap-watchdog.d.ts +41 -0
- package/dist/heap-watchdog.d.ts.map +1 -0
- package/dist/highlight.d.ts +30 -0
- package/dist/highlight.d.ts.map +1 -0
- package/dist/hit-test.d.ts +75 -0
- package/dist/hit-test.d.ts.map +1 -0
- package/dist/hooks/fleet-chat-coalescer.d.ts +32 -0
- package/dist/hooks/fleet-chat-coalescer.d.ts.map +1 -0
- package/dist/hooks/use-auth-panel.d.ts +38 -0
- package/dist/hooks/use-auth-panel.d.ts.map +1 -0
- package/dist/hooks/use-autonomous-coordinator.d.ts +21 -0
- package/dist/hooks/use-autonomous-coordinator.d.ts.map +1 -0
- package/dist/hooks/use-brain-events.d.ts +7 -0
- package/dist/hooks/use-brain-events.d.ts.map +1 -0
- package/dist/hooks/use-brain-panel.d.ts +43 -0
- package/dist/hooks/use-brain-panel.d.ts.map +1 -0
- package/dist/hooks/use-director-fleet-bridge.d.ts +31 -0
- package/dist/hooks/use-director-fleet-bridge.d.ts.map +1 -0
- package/dist/hooks/use-file-search.d.ts +42 -0
- package/dist/hooks/use-file-search.d.ts.map +1 -0
- package/dist/hooks/use-input-history-persistence.d.ts +14 -0
- package/dist/hooks/use-input-history-persistence.d.ts.map +1 -0
- package/dist/hooks/use-mode-picker.d.ts +15 -0
- package/dist/hooks/use-mode-picker.d.ts.map +1 -0
- package/dist/hooks/use-model-pick.d.ts +34 -0
- package/dist/hooks/use-model-pick.d.ts.map +1 -0
- package/dist/hooks/use-paste-handling.d.ts +30 -0
- package/dist/hooks/use-paste-handling.d.ts.map +1 -0
- package/dist/hooks/use-picker-keys.d.ts +72 -0
- package/dist/hooks/use-picker-keys.d.ts.map +1 -0
- package/dist/hooks/use-prompt-picker.d.ts +28 -0
- package/dist/hooks/use-prompt-picker.d.ts.map +1 -0
- package/dist/hooks/use-queue-manager.d.ts +26 -0
- package/dist/hooks/use-queue-manager.d.ts.map +1 -0
- package/dist/hooks/use-statusline-hidden-sync.d.ts +14 -0
- package/dist/hooks/use-statusline-hidden-sync.d.ts.map +1 -0
- package/dist/hooks/use-statusline-state.d.ts +44 -0
- package/dist/hooks/use-statusline-state.d.ts.map +1 -0
- package/dist/hooks/use-stream-chip-expiration.d.ts +25 -0
- package/dist/hooks/use-stream-chip-expiration.d.ts.map +1 -0
- package/dist/hooks/use-subagent-events.d.ts +16 -0
- package/dist/hooks/use-subagent-events.d.ts.map +1 -0
- package/dist/hooks/use-token-counter-refresh.d.ts +30 -0
- package/dist/hooks/use-token-counter-refresh.d.ts.map +1 -0
- package/dist/hooks/use-tui-controllers.d.ts +37 -0
- package/dist/hooks/use-tui-controllers.d.ts.map +1 -0
- package/dist/hooks/use-tui-event-bridge.d.ts +29 -0
- package/dist/hooks/use-tui-event-bridge.d.ts.map +1 -0
- package/dist/hooks/use-working-dir-chip.d.ts +8 -0
- package/dist/hooks/use-working-dir-chip.d.ts.map +1 -0
- package/dist/index.d.ts +12 -910
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +4348 -2974
- package/dist/index.js.map +7 -1
- package/dist/ink.d.ts +20 -0
- package/dist/ink.d.ts.map +1 -0
- package/dist/input-editing.d.ts +76 -0
- package/dist/input-editing.d.ts.map +1 -0
- package/dist/input-tokens.d.ts +65 -0
- package/dist/input-tokens.d.ts.map +1 -0
- package/dist/kill-slash.d.ts +3 -0
- package/dist/kill-slash.d.ts.map +1 -0
- package/dist/markdown-table.d.ts +45 -0
- package/dist/markdown-table.d.ts.map +1 -0
- package/dist/markdown.d.ts +47 -0
- package/dist/markdown.d.ts.map +1 -0
- package/dist/mouse.d.ts +73 -0
- package/dist/mouse.d.ts.map +1 -0
- package/dist/on-panel-open.d.ts +62 -0
- package/dist/on-panel-open.d.ts.map +1 -0
- package/dist/paste-accumulator.d.ts +19 -0
- package/dist/paste-accumulator.d.ts.map +1 -0
- package/dist/ps-slash.d.ts +7 -0
- package/dist/ps-slash.d.ts.map +1 -0
- package/dist/queue-slash.d.ts +24 -0
- package/dist/queue-slash.d.ts.map +1 -0
- package/dist/reducers/fleet.d.ts +16 -0
- package/dist/reducers/fleet.d.ts.map +1 -0
- package/dist/reducers/helpers.d.ts +38 -0
- package/dist/reducers/helpers.d.ts.map +1 -0
- package/dist/rehydrate-history.d.ts +40 -0
- package/dist/rehydrate-history.d.ts.map +1 -0
- package/dist/run-tui.d.ts +522 -0
- package/dist/run-tui.d.ts.map +1 -0
- package/dist/sdd-lifecycle-entry.d.ts +18 -0
- package/dist/sdd-lifecycle-entry.d.ts.map +1 -0
- package/dist/slash-command-search.d.ts +10 -0
- package/dist/slash-command-search.d.ts.map +1 -0
- package/dist/steering-preamble.d.ts +25 -0
- package/dist/steering-preamble.d.ts.map +1 -0
- package/dist/submit-history.d.ts +17 -0
- package/dist/submit-history.d.ts.map +1 -0
- package/dist/terminal-title.d.ts +12 -0
- package/dist/terminal-title.d.ts.map +1 -0
- package/dist/theme.d.ts +91 -0
- package/dist/theme.d.ts.map +1 -0
- package/dist/thinking-word.d.ts +26 -0
- package/dist/thinking-word.d.ts.map +1 -0
- package/dist/tool-glyph.d.ts +18 -0
- package/dist/tool-glyph.d.ts.map +1 -0
- package/package.json +8 -9
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
import type React from 'react';
|
|
2
|
+
import type { AgentTimelineEntry } from '@wrongstack/core/coordination';
|
|
3
|
+
import type { FleetEntry } from '../app.js';
|
|
4
|
+
import type { HistoryEntry } from './history/types.js';
|
|
5
|
+
/**
|
|
6
|
+
* Narrow read-only view of per-subagent transcripts. AgentMonitorService
|
|
7
|
+
* (created in the CLI host) satisfies this structurally; the TUI never
|
|
8
|
+
* imports from @wrongstack/cli. `getTranscript` returns entries NEWEST
|
|
9
|
+
* FIRST (mirroring AgentMonitorService.getTranscript).
|
|
10
|
+
*/
|
|
11
|
+
export interface AgentTranscriptReader {
|
|
12
|
+
getTranscript(subagentId: string, limit?: number): AgentTimelineEntry[];
|
|
13
|
+
}
|
|
14
|
+
export interface AgentsMonitorProps {
|
|
15
|
+
entries: Record<string, FleetEntry>;
|
|
16
|
+
/** Fleet (subagents) accumulated cost — excludes the leader/main session. */
|
|
17
|
+
totalCost: number;
|
|
18
|
+
/**
|
|
19
|
+
* Leader (main session) cost — the same figure the statusline shows. Added
|
|
20
|
+
* to `totalCost` for a trustworthy grand total. Optional for callers that
|
|
21
|
+
* don't track it (defaults to 0).
|
|
22
|
+
*/
|
|
23
|
+
leaderCost?: number | undefined;
|
|
24
|
+
/** Fleet-wide token totals, when available. */
|
|
25
|
+
totalTokens?: {
|
|
26
|
+
input: number;
|
|
27
|
+
output: number;
|
|
28
|
+
};
|
|
29
|
+
/** 1s clock tick so elapsed times + sparklines stay live. */
|
|
30
|
+
nowTick: number;
|
|
31
|
+
/** Called when there are no active/detail-worthy agents left to show. */
|
|
32
|
+
onClose?: (() => void) | undefined;
|
|
33
|
+
/**
|
|
34
|
+
* Optional transcript reader — when provided, the selected agent's
|
|
35
|
+
* detail card renders a scrollable full-transcript pane (PgUp/PgDn)
|
|
36
|
+
* with a CONSTANT-height layout, so switching agents never changes the
|
|
37
|
+
* panel height (no scrollback churn). Falls back to the streaming-tail
|
|
38
|
+
* snippet when absent.
|
|
39
|
+
*/
|
|
40
|
+
transcripts?: AgentTranscriptReader | undefined;
|
|
41
|
+
/**
|
|
42
|
+
* Optional leader history source (oldest first) — the main chat's own
|
|
43
|
+
* entries mapped to timeline shape, WITHOUT subagent lines, so selecting
|
|
44
|
+
* LEADER shows a clean per-agent view just like the subagents.
|
|
45
|
+
*/
|
|
46
|
+
leaderTranscript?: (() => AgentTimelineEntry[]) | undefined;
|
|
47
|
+
/**
|
|
48
|
+
* Fullscreen mode: the App hides the chat history while this monitor is
|
|
49
|
+
* open, so the transcript pane may claim every row the chrome doesn't
|
|
50
|
+
* need (the usual 24-row cap is lifted).
|
|
51
|
+
*/
|
|
52
|
+
fullscreen?: boolean | undefined;
|
|
53
|
+
}
|
|
54
|
+
/** Retained for callers/tests that tune the empty-state grace window. */
|
|
55
|
+
export declare const IDLE_HIDE_MS = 60000;
|
|
56
|
+
export declare const EMPTY_AGENTS_CLOSE_DELAY_MS = 7500;
|
|
57
|
+
/**
|
|
58
|
+
* Select the agents the live monitor should render. Only actively-running
|
|
59
|
+
* subagents are detail-worthy; idle workers are retained by the coordinator for
|
|
60
|
+
* reuse but should not keep the TUI crowded after their task closes. LEADER
|
|
61
|
+
* stays visible while a subagent is running (or while LEADER itself is running)
|
|
62
|
+
* so F3 always has a detail card fallback.
|
|
63
|
+
*/
|
|
64
|
+
export declare function selectLiveAgents(all: FleetEntry[], _now: number, _idleHideMs?: number): FleetEntry[];
|
|
65
|
+
export declare function fmtExactTokens(n: number): string;
|
|
66
|
+
export declare function formatContextRunway(tokens?: number, maxTokens?: number): string;
|
|
67
|
+
export declare function formatRecentToolChip(tool: FleetEntry['recentTools'][number]): string;
|
|
68
|
+
export declare function formatAgentDetailHeader(entry: FleetEntry): string;
|
|
69
|
+
export declare function agentRisk(entry: FleetEntry): 'calm' | 'busy' | 'hot' | 'critical';
|
|
70
|
+
export declare function selectAgentDetail(live: FleetEntry[], selectedId?: string): FleetEntry | undefined;
|
|
71
|
+
export declare function nextEmptyAgentsCloseStartedAt(liveCount: number, now: number, currentStartedAt?: number): number | undefined;
|
|
72
|
+
export declare function shouldCloseEmptyAgentsMonitor(liveCount: number, now: number, emptyStartedAt: number | undefined, delayMs?: number): boolean;
|
|
73
|
+
/** Fallback rows of transcript content when terminal height is unknown. */
|
|
74
|
+
export declare const TRANSCRIPT_ROWS = 10;
|
|
75
|
+
/** Full in-memory transcript depth to fetch (AgentMonitorService ring size). */
|
|
76
|
+
export declare const TRANSCRIPT_FETCH_LIMIT = 500;
|
|
77
|
+
/**
|
|
78
|
+
* Rows of transcript content for the current terminal. Constant for a
|
|
79
|
+
* given terminal size and agent count, so agent switches never change
|
|
80
|
+
* the panel height — only explicit resizes / fleet composition do.
|
|
81
|
+
* `fullscreen` lifts the 24-row cap: the F3 monitor owns the whole
|
|
82
|
+
* screen (chat history hidden), so the pane should fill every row the
|
|
83
|
+
* chrome doesn't need.
|
|
84
|
+
*/
|
|
85
|
+
export declare function transcriptRowsForTerminal(termRows: number | undefined, rosterCount: number, fullscreen?: boolean): number;
|
|
86
|
+
/** One transcript entry as a single display line: `HH:MM:SS L3 🔧 …`. */
|
|
87
|
+
export declare function formatTranscriptLine(e: AgentTimelineEntry, maxWidth?: number): string;
|
|
88
|
+
/**
|
|
89
|
+
* Map the main chat's history entries into the transcript timeline shape
|
|
90
|
+
* so LEADER gets its own clean per-agent view in the F3 monitor. Subagent
|
|
91
|
+
* lines are EXCLUDED — that separation (leader vs subagents, not
|
|
92
|
+
* interleaved) is the whole point of the per-agent view. Banners and
|
|
93
|
+
* confirm prompts are UI chrome, not history, and are skipped too.
|
|
94
|
+
*/
|
|
95
|
+
export declare function leaderTimelineFromEntries(entries: readonly HistoryEntry[]): AgentTimelineEntry[];
|
|
96
|
+
/**
|
|
97
|
+
* Slice a transcript (OLDEST first) into the fixed viewing window.
|
|
98
|
+
* `scrollOffset` counts lines scrolled UP from the tail (0 = pinned to
|
|
99
|
+
* newest). Returns the visible slice plus how many entries are hidden
|
|
100
|
+
* above/below the window.
|
|
101
|
+
*/
|
|
102
|
+
export declare function selectTranscriptWindow(entries: readonly AgentTimelineEntry[], scrollOffset: number, rows?: number): {
|
|
103
|
+
slice: AgentTimelineEntry[];
|
|
104
|
+
above: number;
|
|
105
|
+
below: number;
|
|
106
|
+
};
|
|
107
|
+
/**
|
|
108
|
+
* Live per-agent monitor (Ctrl+G / F3). Hybrid compact view:
|
|
109
|
+
* - All agents, including LEADER, are available via ↑↓ navigation.
|
|
110
|
+
* - Non-selected agents render as single-line rows.
|
|
111
|
+
* - The selected agent expands in place into a titled detail rectangle.
|
|
112
|
+
*/
|
|
113
|
+
export declare function AgentsMonitor({ entries, totalCost, leaderCost, totalTokens, nowTick, onClose, transcripts, leaderTranscript, fullscreen, }: AgentsMonitorProps): React.ReactElement;
|
|
114
|
+
//# sourceMappingURL=agents-monitor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agents-monitor.d.ts","sourceRoot":"","sources":["../../src/components/agents-monitor.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AACxE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAC5C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAKvD;;;;;GAKG;AACH,M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AC,KAAK,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAO/D;AAiQD;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,EAC5B,OAAO,EACP,SAAS,EACT,UAAc,EACd,WAAW,EACX,OAAO,EACP,OAAO,EACP,WAAW,EACX,gBAAgB,EAChB,UAAkB,GACnB,EAAE,kBAAkB,GAAG,KAAK,CAAC,YAAY,CAgLzC"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
export declare const HUE_WHEEL: string[];
|
|
2
|
+
export declare const BREATHE_FRAMES: string[];
|
|
3
|
+
export declare const DOTS_FRAMES: string[];
|
|
4
|
+
export declare const ANIMATION_STYLES: readonly ['rainbow', 'wave', 'pulse', 'dots', 'breathe'];
|
|
5
|
+
export type AnimationStyle = (typeof ANIMATION_STYLES)[number];
|
|
6
|
+
export declare const DEFAULT_ANIMATION_STYLE: AnimationStyle;
|
|
7
|
+
export declare const ANIMATION_STYLE_DESCS: Record<AnimationStyle, string>;
|
|
8
|
+
/**
|
|
9
|
+
* Seconds the user must be idle on the same style before `cycle` advances
|
|
10
|
+
* to the next one. Picked to feel like a "shuffle" rather than a flicker.
|
|
11
|
+
*/
|
|
12
|
+
export declare const CYCLE_INTERVAL_SECONDS = 12;
|
|
13
|
+
/**
|
|
14
|
+
* Milliseconds between each cycle tick. Picked so the cycle timer doesn't
|
|
15
|
+
* drive unnecessary re-renders for idle sessions (the StatusBar pauses the
|
|
16
|
+
* timer when state is idle/aborting).
|
|
17
|
+
*/
|
|
18
|
+
export declare const CYCLE_TICK_INTERVAL_MS = 1000;
|
|
19
|
+
/**
|
|
20
|
+
* Cycle through every other `AnimationStyle` in order, returning to the
|
|
21
|
+
* start once the list is exhausted. `rainbow` is excluded from the cycle
|
|
22
|
+
* (it's the default/canonical look); cycle goes through the four variant
|
|
23
|
+
* styles only.
|
|
24
|
+
*/
|
|
25
|
+
export declare const CYCLE_ORDER: readonly AnimationStyle[];
|
|
26
|
+
/**
|
|
27
|
+
* Map a coarse `tick` (seconds elapsed since the cycle started) onto the
|
|
28
|
+
* currently-active style. Returns the style at the cycle index derived from
|
|
29
|
+
* `floor(tick / CYCLE_INTERVAL_SECONDS)`.
|
|
30
|
+
*
|
|
31
|
+
* Pure + exported for testing.
|
|
32
|
+
*/
|
|
33
|
+
export declare function styleForCycleTick(tick: number): AnimationStyle;
|
|
34
|
+
/** Mix two `#rrggbb` colors by `t ∈ [0,1]`. Pure. */
|
|
35
|
+
export declare function mixHex(a: string, b: string, t: number): string;
|
|
36
|
+
/**
|
|
37
|
+
* Pick a colour for the given glyph index + phase under the `wave` style —
|
|
38
|
+
* interpolates from `DIM` to `ACCENT` along a sinusoidal band so the bright
|
|
39
|
+
* spot glides smoothly across the text. Pure for testing.
|
|
40
|
+
*/
|
|
41
|
+
export declare function waveColor(charIndex: number, phase: number, length: number): string;
|
|
42
|
+
/**
|
|
43
|
+
* Pick a colour for the whole text under the `pulse` style — single color
|
|
44
|
+
* modulated by an oscillator so the whole chip dims/brightens together.
|
|
45
|
+
* Pure for testing.
|
|
46
|
+
*/
|
|
47
|
+
export declare function pulseColor(phase: number): string;
|
|
48
|
+
/** Strip trailing `.`, `…`, etc. so the `dots` style doesn't double up on
|
|
49
|
+
* the user-supplied label. */
|
|
50
|
+
export declare function stripTrailingDots(text: string): string;
|
|
51
|
+
//# sourceMappingURL=animation-style.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"animation-style.d.ts","sourceRoot":"","sources":["../../src/components/animation-style.tsx"],"names":[],"mappings":"AAwBA,eAAO,MAAM,SAAS,UAarB,CAAC;AAWF,eAAO,MAAM,cAAc,UAAqD,CAAC;AAOjF,eAAO,MAAM,WAAW,UAAoC,CAAC;AAE7D,eAAO,MAAM,gBAAgB,YAAI,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,SAAS,CAAU,CAAC;AACzF,MAAM,MAAM,cAAc,GAAG,CAAC,OAAO,gBAAgB,CAAC,CAAC,MAAM,CAAC,CAAC;AAE/D,eAAO,MAAM,uBAAuB,EAAE,cAA0B,CAAC;AAEjE,eAAO,MAAM,qBAAqB,EAAE,MAAM,CAAC,cAAc,EAAE,MAAM,CAMhE,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,sBAAsB,KAAK,CAAC;AAEzC;;;;GAIG;AACH,eAAO,MAAM,sBAAsB,OAAO,CAAC;AAE3C;;;;;GAKG;AACH,eAAO,MAAM,WAAW,EAAE,SAAS,cAAc,EAAyC,CAAC;AAE3F;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,GAAG,cAAc,CAI9D;AAED,qDAAqD;AACrD,wBAAgB,MAAM,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAS9D;AAWD;;;;GAIG;AACH,wBAAgB,SAAS,CAAC,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAIlF;AAED;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAIhD;AAED;+BAC+B;AAC/B,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAWtD"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { SideEffect } from '@wrongstack/core';
|
|
2
|
+
interface AuditPanelProps {
|
|
3
|
+
/** Side effects from ctx.sideEffects, passed from the host. */
|
|
4
|
+
sideEffects: SideEffect[];
|
|
5
|
+
onClose: () => void;
|
|
6
|
+
}
|
|
7
|
+
export declare function AuditPanel({ sideEffects, onClose: _onClose }: AuditPanelProps): import("react").JSX.Element;
|
|
8
|
+
export {};
|
|
9
|
+
//# sourceMappingURL=audit-panel.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"audit-panel.d.ts","sourceRoot":"","sources":["../../src/components/audit-panel.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAEnD,UAAU,eAAe;IACvB,+DAA+D;IAC/D,WAAW,EAAE,UAAU,EAAE,CAAC;IAC1B,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB;AAwBD,wBAAgB,UAAU,CAAC,EAAE,WAAW,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE,eAAe,+BA6C7E"}
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
/** One saved API key / OAuth token, with the secret already masked. */
|
|
2
|
+
export interface AuthKeyRow {
|
|
3
|
+
label: string;
|
|
4
|
+
/** Pre-masked display form ("sk-a…f3k2" / "••••••") — never the secret. */
|
|
5
|
+
masked: string;
|
|
6
|
+
createdAt: string;
|
|
7
|
+
active: boolean;
|
|
8
|
+
authMethod?: 'api_key' | 'oauth' | 'session_token' | undefined;
|
|
9
|
+
expiresAt?: string | undefined;
|
|
10
|
+
}
|
|
11
|
+
/** One saved provider from ~/.wrongstack/config.json. */
|
|
12
|
+
export interface AuthProviderRow {
|
|
13
|
+
id: string;
|
|
14
|
+
type?: string | undefined;
|
|
15
|
+
family?: string | undefined;
|
|
16
|
+
baseUrl?: string | undefined;
|
|
17
|
+
models: string[];
|
|
18
|
+
envVars: string[];
|
|
19
|
+
keys: AuthKeyRow[];
|
|
20
|
+
}
|
|
21
|
+
/** One models.dev catalog entry offered by "Add provider (catalog)". */
|
|
22
|
+
export interface AuthCatalogRow {
|
|
23
|
+
id: string;
|
|
24
|
+
name: string;
|
|
25
|
+
family: string;
|
|
26
|
+
apiBase?: string | undefined;
|
|
27
|
+
envVars: string[];
|
|
28
|
+
/** Already present in the saved config (shown as ◉). */
|
|
29
|
+
saved: boolean;
|
|
30
|
+
}
|
|
31
|
+
/** One local-LLM preset (OmniRoute / Ollama / vLLM / LM Studio). */
|
|
32
|
+
export interface AuthLocalPresetRow {
|
|
33
|
+
id: string;
|
|
34
|
+
label: string;
|
|
35
|
+
defaultBaseUrl: string;
|
|
36
|
+
noAuth: boolean;
|
|
37
|
+
hint: string;
|
|
38
|
+
}
|
|
39
|
+
export type AuthOAuthKind = 'chatgpt' | 'claude' | 'copilot';
|
|
40
|
+
/**
|
|
41
|
+
* Bridge the CLI flows use to talk to the panel while a flow runs.
|
|
42
|
+
* `prompt` REJECTS when the user cancels (Esc) — flows treat a thrown
|
|
43
|
+
* prompt as user-cancel, which aborts before anything is saved.
|
|
44
|
+
*/
|
|
45
|
+
export interface AuthFlowIo {
|
|
46
|
+
onLog(line: string): void;
|
|
47
|
+
prompt(question: string, opts: {
|
|
48
|
+
secret: boolean;
|
|
49
|
+
}): Promise<string>;
|
|
50
|
+
signal: AbortSignal;
|
|
51
|
+
}
|
|
52
|
+
export interface AuthFlowResult {
|
|
53
|
+
ok: boolean;
|
|
54
|
+
message?: string | undefined;
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Host callbacks the CLI provides. Simple mutations return an error
|
|
58
|
+
* string (or null on success); multi-step interactions run as "flows"
|
|
59
|
+
* that log and prompt through {@link AuthFlowIo}.
|
|
60
|
+
*/
|
|
61
|
+
export interface AuthPanelHost {
|
|
62
|
+
listProviders(): Promise<AuthProviderRow[]>;
|
|
63
|
+
listCatalog(): Promise<AuthCatalogRow[]>;
|
|
64
|
+
localPresets(): AuthLocalPresetRow[];
|
|
65
|
+
setActiveKey(providerId: string, label: string): Promise<string | null>;
|
|
66
|
+
deleteKey(providerId: string, label: string): Promise<string | null>;
|
|
67
|
+
removeProvider(providerId: string): Promise<string | null>;
|
|
68
|
+
addKey(providerId: string, io: AuthFlowIo): Promise<AuthFlowResult>;
|
|
69
|
+
updateKey(providerId: string, label: string, io: AuthFlowIo): Promise<AuthFlowResult>;
|
|
70
|
+
editField(providerId: string, field: 'family' | 'baseUrl' | 'models', io: AuthFlowIo): Promise<AuthFlowResult>;
|
|
71
|
+
addCatalogProvider(catalogId: string, io: AuthFlowIo): Promise<AuthFlowResult>;
|
|
72
|
+
addCustomProvider(io: AuthFlowIo): Promise<AuthFlowResult>;
|
|
73
|
+
addLocal(presetId: string, io: AuthFlowIo): Promise<AuthFlowResult>;
|
|
74
|
+
oauthLogin(kind: AuthOAuthKind, io: AuthFlowIo): Promise<AuthFlowResult>;
|
|
75
|
+
}
|
|
76
|
+
export type AuthPanelView = 'list' | 'provider' | 'catalog' | 'local' | 'oauth' | 'flow';
|
|
77
|
+
export type AuthConfirmAction = {
|
|
78
|
+
kind: 'delete-key';
|
|
79
|
+
providerId: string;
|
|
80
|
+
label: string;
|
|
81
|
+
} | {
|
|
82
|
+
kind: 'remove-provider';
|
|
83
|
+
providerId: string;
|
|
84
|
+
};
|
|
85
|
+
export interface AuthPanelState {
|
|
86
|
+
open: boolean;
|
|
87
|
+
view: AuthPanelView;
|
|
88
|
+
busy: boolean;
|
|
89
|
+
hint?: string | undefined;
|
|
90
|
+
providers: AuthProviderRow[];
|
|
91
|
+
presets: AuthLocalPresetRow[];
|
|
92
|
+
catalog: AuthCatalogRow[];
|
|
93
|
+
/** Cursor index into `authPanelRows(state)` for the current view. */
|
|
94
|
+
selected: number;
|
|
95
|
+
/** Provider shown in the 'provider' detail view. */
|
|
96
|
+
providerId?: string | undefined;
|
|
97
|
+
/** Type-to-filter query for the catalog view. */
|
|
98
|
+
filter: string;
|
|
99
|
+
/** Running/last flow (OAuth, catalog add, local add, key edit, …). */
|
|
100
|
+
flowTitle: string;
|
|
101
|
+
log: string[];
|
|
102
|
+
flowDone: boolean;
|
|
103
|
+
flowOk?: boolean | undefined;
|
|
104
|
+
/** Modal one-line prompt raised by a flow (masked for secrets). */
|
|
105
|
+
input?: {
|
|
106
|
+
label: string;
|
|
107
|
+
masked: boolean;
|
|
108
|
+
draft: string;
|
|
109
|
+
} | undefined;
|
|
110
|
+
/** Modal y/N confirmation for destructive actions. */
|
|
111
|
+
confirm?: {
|
|
112
|
+
question: string;
|
|
113
|
+
action: AuthConfirmAction;
|
|
114
|
+
} | undefined;
|
|
115
|
+
}
|
|
116
|
+
export declare const AUTH_PANEL_INITIAL: AuthPanelState;
|
|
117
|
+
export type AuthPanelRow = {
|
|
118
|
+
kind: 'provider';
|
|
119
|
+
provider: AuthProviderRow;
|
|
120
|
+
} | {
|
|
121
|
+
kind: 'list-action';
|
|
122
|
+
action: 'catalog' | 'local' | 'custom' | 'oauth';
|
|
123
|
+
} | {
|
|
124
|
+
kind: 'key';
|
|
125
|
+
keyRow: AuthKeyRow;
|
|
126
|
+
} | {
|
|
127
|
+
kind: 'provider-action';
|
|
128
|
+
action: 'add-key' | 'edit-family' | 'edit-base-url' | 'edit-models' | 'remove';
|
|
129
|
+
} | {
|
|
130
|
+
kind: 'catalog-entry';
|
|
131
|
+
entry: AuthCatalogRow;
|
|
132
|
+
} | {
|
|
133
|
+
kind: 'local-preset';
|
|
134
|
+
preset: AuthLocalPresetRow;
|
|
135
|
+
} | {
|
|
136
|
+
kind: 'oauth-option';
|
|
137
|
+
oauth: AuthOAuthKind;
|
|
138
|
+
};
|
|
139
|
+
/** Case-insensitive substring filter over id + name + family. */
|
|
140
|
+
export declare function filterAuthCatalog(catalog: AuthCatalogRow[], filter: string): AuthCatalogRow[];
|
|
141
|
+
export declare function authSelectedProvider(state: AuthPanelState): AuthProviderRow | undefined;
|
|
142
|
+
/**
|
|
143
|
+
* Selectable rows for the current view, in render order. The component
|
|
144
|
+
* renders exactly this list; the reducer clamps `selected` to its length;
|
|
145
|
+
* the Enter handler dispatches on `rows[selected]`.
|
|
146
|
+
*/
|
|
147
|
+
export declare function authPanelRows(state: AuthPanelState): AuthPanelRow[];
|
|
148
|
+
/** Wrap-around cursor move over the current view's rows. */
|
|
149
|
+
export declare function authMoveSelected(state: AuthPanelState, delta: number): number;
|
|
150
|
+
//# sourceMappingURL=auth-panel-model.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auth-panel-model.d.ts","sourceRoot":"","sources":["../../src/components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5D,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,cAAc,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAI7E"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type React from 'react';
|
|
2
|
+
import { type AuthPanelState } from './auth-panel-model.js';
|
|
3
|
+
export interface AuthPanelProps {
|
|
4
|
+
panel: AuthPanelState;
|
|
5
|
+
}
|
|
6
|
+
export declare function isAuthFlowUrlLine(line: string): boolean;
|
|
7
|
+
export declare function AuthPanel({ panel }: AuthPanelProps): React.ReactElement;
|
|
8
|
+
//# sourceMappingURL=auth-panel.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auth-panel.d.ts","sourceRoot":"","sources":["../../src/components/auth-panel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAGL,KAAK,cAAc,EAGpB,MAAM,uBAAuB,CAAC;AAS/B,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE,cAAc,CAAC;CACvB;AA8ID,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAEvD;AAsCD,wBAAgB,SAAS,CAAC,EAAE,KAAK,EAAE,EAAE,cAAc,GAAG,KAAK,CAAC,YAAY,CA8HvE"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type React from 'react';
|
|
2
|
+
export interface AutonomyOption {
|
|
3
|
+
mode: 'off' | 'suggest' | 'auto' | 'eternal' | 'eternal-parallel';
|
|
4
|
+
label: string;
|
|
5
|
+
description: string;
|
|
6
|
+
color: string;
|
|
7
|
+
}
|
|
8
|
+
export interface AutonomyPickerProps {
|
|
9
|
+
options: AutonomyOption[];
|
|
10
|
+
selected: number;
|
|
11
|
+
hint?: string | undefined;
|
|
12
|
+
}
|
|
13
|
+
export declare const AUTONOMY_OPTIONS: AutonomyOption[];
|
|
14
|
+
export declare function AutonomyPicker({ options, selected, hint, }: AutonomyPickerProps): React.ReactElement;
|
|
15
|
+
//# sourceMappingURL=autonomy-picker.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"autonomy-picker.d.ts","sourceRoot":"","sources":["../../src/components/autonomy-picker.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,KAAK,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,GAAG,kBAAkB,CAAC;IAClE,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,mBAAmB;IAClC,OAAO,EAAE,cAAc,EAAE,CAAC;IAC1B,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC3B;AAED,eAAO,MAAM,gBAAgB,EAAE,cAAc,EA+B5C,CAAC;AAEF,wBAAgB,cAAc,CAAC,EAC7B,OAAO,EACP,QAAQ,EACR,IAAI,GACL,EAAE,mBAAmB,GAAG,KAAK,CAAC,YAAY,CAqB1C"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type React from 'react';
|
|
2
|
+
export interface BrainDecisionPromptOption {
|
|
3
|
+
id: string;
|
|
4
|
+
label: string;
|
|
5
|
+
risk?: 'low' | 'medium' | 'high' | 'critical' | string | undefined;
|
|
6
|
+
consequence?: string | undefined;
|
|
7
|
+
recommended?: boolean | undefined;
|
|
8
|
+
}
|
|
9
|
+
export interface BrainDecisionPromptProps {
|
|
10
|
+
requestId: string;
|
|
11
|
+
source: string;
|
|
12
|
+
risk: 'low' | 'medium' | 'high' | 'critical' | string;
|
|
13
|
+
question: string;
|
|
14
|
+
context?: string | undefined;
|
|
15
|
+
options?: BrainDecisionPromptOption[] | undefined;
|
|
16
|
+
onAnswer?: (answer: {
|
|
17
|
+
id: string;
|
|
18
|
+
optionId?: string | undefined;
|
|
19
|
+
deny?: boolean | undefined;
|
|
20
|
+
text?: string | undefined;
|
|
21
|
+
}) => void;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Brain escalation panel. It renders the options and, when `onAnswer` is wired,
|
|
25
|
+
* maps A/B/C (or 1/2/3) to the matching option and Esc/D to a safe denial.
|
|
26
|
+
*/
|
|
27
|
+
export declare function BrainDecisionPrompt({ requestId, source, risk, question, context, options, onAnswer, }: BrainDecisionPromptProps): React.ReactElement;
|
|
28
|
+
//# sourceMappingURL=brain-decision-prompt.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"brain-decision-prompt.d.ts","sourceRoot":"","sources":["../../src/components/brain-decision-prompt.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,MAAM,WAAW,yBAAyB;IACxC,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,KAAK,GAAG,QAAQ,GAAG,MAAM,GAAG,UAAU,GAAG,MAAM,GAAG,SAAS,CAAC;IACnE,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACjC,WAAW,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;CACnC;AAED,MAAM,WAAW,wBAAwB;IACvC,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,KAAK,GAAG,QAAQ,GAAG,MAAM,GAAG,UAAU,GAAG,MAAM,CAAC;IACtD,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC7B,OAAO,CAAC,EAAE,yBAAyB,EAAE,GAAG,SAAS,CAAC;IAClD,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;QAAC,IAAI,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;KAAE,KAAK,IAAI,CAAC;CACnI;AA0BD;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,EAClC,SAAS,EACT,MAAM,EACN,IAAI,EACJ,QAAQ,EACR,OAAO,EACP,OAAY,EACZ,QAAQ,GACT,EAAE,wBAAwB,GAAG,KAAK,CAAC,YAAY,CAiE/C"}
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Brain panel data model — pure types + row derivation shared by the
|
|
3
|
+
* reducer (cursor clamping), the key hook (action dispatch), and the
|
|
4
|
+
* component (render). Mirrors the auth-panel pattern: the TUI never
|
|
5
|
+
* touches config files — every mutation goes through the host bridge,
|
|
6
|
+
* which the CLI implements on top of its BrainRuntime (live apply +
|
|
7
|
+
* persist to the global config).
|
|
8
|
+
*/
|
|
9
|
+
import type { BrainRiskLevel } from './brain-panel.js';
|
|
10
|
+
/** One configured pool entry / council voter, display-mapped. */
|
|
11
|
+
export interface BrainPanelVoter {
|
|
12
|
+
label: string;
|
|
13
|
+
persona?: string | undefined;
|
|
14
|
+
veto?: boolean | undefined;
|
|
15
|
+
weight?: number | undefined;
|
|
16
|
+
}
|
|
17
|
+
/** Display-mapped snapshot of the live Brain settings. */
|
|
18
|
+
export interface BrainPanelSettings {
|
|
19
|
+
mode: 'headless' | 'interactive';
|
|
20
|
+
riskLevel: BrainRiskLevel;
|
|
21
|
+
strategy: 'fallback' | 'round-robin';
|
|
22
|
+
decisionTimeoutMs?: number | undefined;
|
|
23
|
+
humanTimeoutMs?: number | undefined;
|
|
24
|
+
/** Configured pool entries as compact "provider/model" labels. */
|
|
25
|
+
pool: string[];
|
|
26
|
+
/** Resolved pool labels from the last assembly (≤ pool.length). */
|
|
27
|
+
poolResolved: string[];
|
|
28
|
+
usingSessionModel: boolean;
|
|
29
|
+
councilEnabled: boolean;
|
|
30
|
+
councilMinRisk: 'medium' | 'high' | 'critical';
|
|
31
|
+
/** Explicitly configured voters (empty = seats derive from the pool). */
|
|
32
|
+
voters: BrainPanelVoter[];
|
|
33
|
+
/** Effective council seat labels (empty = council disabled). */
|
|
34
|
+
councilSeats: string[];
|
|
35
|
+
judgeLabel?: string | undefined;
|
|
36
|
+
ledgerEnabled: boolean;
|
|
37
|
+
autoDenyAfterFailures?: number | undefined;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Host bridge implemented by the CLI. Every setter returns an error string
|
|
41
|
+
* (shown as the panel hint) or null on success; all setters apply LIVE and
|
|
42
|
+
* persist to ~/.wrongstack/config.json. Model SELECTION is not part of this
|
|
43
|
+
* bridge — the panel uses the shared /model picker via requestModelPick.
|
|
44
|
+
*/
|
|
45
|
+
export interface BrainPanelHost {
|
|
46
|
+
getSettings(): BrainPanelSettings;
|
|
47
|
+
setMode(mode: 'headless' | 'interactive'): Promise<string | null>;
|
|
48
|
+
setRisk(level: BrainRiskLevel): Promise<string | null>;
|
|
49
|
+
setStrategy(strategy: 'fallback' | 'round-robin'): Promise<string | null>;
|
|
50
|
+
setDecisionTimeout(ms: number | undefined): Promise<string | null>;
|
|
51
|
+
setHumanTimeout(ms: number | undefined): Promise<string | null>;
|
|
52
|
+
addPoolModel(providerId: string, model: string): Promise<string | null>;
|
|
53
|
+
removePoolModel(index: number): Promise<string | null>;
|
|
54
|
+
clearPool(): Promise<string | null>;
|
|
55
|
+
setCouncilEnabled(on: boolean): Promise<string | null>;
|
|
56
|
+
setCouncilMinRisk(risk: 'medium' | 'high' | 'critical'): Promise<string | null>;
|
|
57
|
+
addVoter(providerId: string, model: string): Promise<string | null>;
|
|
58
|
+
removeVoter(index: number): Promise<string | null>;
|
|
59
|
+
cycleVoterPersona(index: number): Promise<string | null>;
|
|
60
|
+
toggleVoterVeto(index: number): Promise<string | null>;
|
|
61
|
+
setJudge(providerId: string, model: string): Promise<string | null>;
|
|
62
|
+
clearJudge(): Promise<string | null>;
|
|
63
|
+
setLedgerEnabled(on: boolean): Promise<string | null>;
|
|
64
|
+
setAutoDeny(count: number | undefined): Promise<string | null>;
|
|
65
|
+
}
|
|
66
|
+
/** One selectable row of the settings view. */
|
|
67
|
+
export type BrainPanelRow = {
|
|
68
|
+
kind: 'mode';
|
|
69
|
+
} | {
|
|
70
|
+
kind: 'risk';
|
|
71
|
+
} | {
|
|
72
|
+
kind: 'strategy';
|
|
73
|
+
} | {
|
|
74
|
+
kind: 'timeout';
|
|
75
|
+
} | {
|
|
76
|
+
kind: 'humanTimeout';
|
|
77
|
+
} | {
|
|
78
|
+
kind: 'poolModel';
|
|
79
|
+
index: number;
|
|
80
|
+
} | {
|
|
81
|
+
kind: 'poolAdd';
|
|
82
|
+
} | {
|
|
83
|
+
kind: 'councilToggle';
|
|
84
|
+
} | {
|
|
85
|
+
kind: 'councilMinRisk';
|
|
86
|
+
} | {
|
|
87
|
+
kind: 'voter';
|
|
88
|
+
index: number;
|
|
89
|
+
} | {
|
|
90
|
+
kind: 'voterAdd';
|
|
91
|
+
} | {
|
|
92
|
+
kind: 'judge';
|
|
93
|
+
} | {
|
|
94
|
+
kind: 'ledgerToggle';
|
|
95
|
+
} | {
|
|
96
|
+
kind: 'autoDeny';
|
|
97
|
+
};
|
|
98
|
+
/** Derive the selectable rows for a settings snapshot. */
|
|
99
|
+
export declare function brainPanelRows(settings: BrainPanelSettings): BrainPanelRow[];
|
|
100
|
+
/** Preset ladders for ←/→ cycling on numeric rows. */
|
|
101
|
+
export declare const DECISION_TIMEOUT_PRESETS: ReadonlyArray<number | undefined>;
|
|
102
|
+
export declare const HUMAN_TIMEOUT_PRESETS: ReadonlyArray<number | undefined>;
|
|
103
|
+
export declare const AUTO_DENY_PRESETS: ReadonlyArray<number | undefined>;
|
|
104
|
+
export declare const PERSONA_CYCLE: readonly ['executor', 'skeptic', 'auditor'];
|
|
105
|
+
/** Cycle helper: step through a preset ladder from the current value. */
|
|
106
|
+
export declare function cyclePreset<T>(presets: ReadonlyArray<T>, current: T, delta: number): T;
|
|
107
|
+
//# sourceMappingURL=brain-panel-model.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"brain-panel-model.d.ts","sourceRoot":"","sources":["../../src/components/brain-panel-model.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAEvD,iEAAiE;AACjE,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC7B,IAAI,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAC3B,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC7B;AAED,0DAA0D;AAC1D,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,UAAU,GAAG,aAAa,CAAC;IACjC,SAAS,EAAE,cAAc,CAAC;IAC1B,QAAQ,EAAE,UAAU,GAAG,aAAa,CAAC;IACrC,iBAAiB,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACvC,cAAc,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACpC,kEAAkE;IAClE,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,mEAAmE;IACnE,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,iBAAiB,EAAE,OAAO,CAAC;IAC3B,cAAc,EAAE,OAAO,CAAC;IACxB,cAAc,EAAE,QAAQ,GAAG,MAAM,GAAG,UAAU,CAAC;IAC/C,yEAAyE;IACzE,MAAM,EAAE,eAAe,EAAE,CAAC;IAC1B,gEAAgE;IAChE,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,UAAU,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAChC,aAAa,EAAE,OAAO,CAAC;IACvB,qBAAqB,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC5C;AAED;;;;;GAKG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AkB,GAAG,aAAa,EAAE,CAe5E;AAED,sDAAsD;AACtD,eAAO,MAAM,wBAAwB,EAAE,aAAa,CAAC,MAAM,GAAG,SAAS,CAOtE,CAAC;AACF,eAAO,MAAM,qBAAqB,EAAE,aAAa,CAAC,MAAM,GAAG,SAAS,CAMnE,CAAC;AACF,eAAO,MAAM,iBAAiB,EAAE,aAAa,CAAC,MAAM,GAAG,SAAS,CAA2B,CAAC;AAC5F,eAAO,MAAM,aAAa,YAAI,UAAU,EAAE,SAAS,EAAE,SAAS,CAAU,CAAC;AAEzE,yEAAyE;AACzE,wBAAgB,WAAW,CAAC,CAAC,EAAE,OAAO,EAAE,aAAa,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,GAAG,CAAC,CAKtF"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type React from 'react';
|
|
2
|
+
import { type BrainPanelSettings } from './brain-panel-model.js';
|
|
3
|
+
export type BrainRiskLevel = 'off' | 'low' | 'medium' | 'high' | 'all';
|
|
4
|
+
export interface BrainLogEntry {
|
|
5
|
+
kind: string;
|
|
6
|
+
question: string;
|
|
7
|
+
outcome: string;
|
|
8
|
+
age: string;
|
|
9
|
+
}
|
|
10
|
+
export interface BrainPanelProps {
|
|
11
|
+
riskLevel: BrainRiskLevel;
|
|
12
|
+
log: BrainLogEntry[];
|
|
13
|
+
selected: number;
|
|
14
|
+
hint?: string | undefined;
|
|
15
|
+
/** Settings editor state — absent on hosts without a BrainPanelHost (legacy view). */
|
|
16
|
+
view?: 'settings' | 'log' | undefined;
|
|
17
|
+
settings?: BrainPanelSettings | undefined;
|
|
18
|
+
row?: number | undefined;
|
|
19
|
+
busy?: boolean | undefined;
|
|
20
|
+
}
|
|
21
|
+
export declare function BrainPanel({ riskLevel, log, selected, hint, view, settings, row, busy, }: BrainPanelProps): React.ReactElement;
|
|
22
|
+
//# sourceMappingURL=brain-panel.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"brain-panel.d.ts","sourceRoot":"","sources":["../../src/components/brain-panel.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAEL,KAAK,kBAAkB,EAExB,MAAM,wBAAwB,CAAC;AAEhC,MAAM,MAAM,cAAc,GAAG,KAAK,GAAG,KAAK,GAAG,QAAQ,GAAG,MAAM,GAAG,KAAK,CAAC;AAEvE,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,GAAG,EAAE,MAAM,CAAC;CACb;AAED,MAAM,WAAW,eAAe;IAC9B,SAAS,EAAE,cAAc,CAAC;IAC1B,GAAG,EAAE,aAAa,EAAE,CAAC;IACrB,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1B,sFAAsF;IACtF,IAAI,CAAC,EAAE,UAAU,GAAG,KAAK,GAAG,SAAS,CAAC;IACtC,QAAQ,CAAC,EAAE,kBAAkB,GAAG,SAAS,CAAC;IAC1C,GAAG,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACzB,IAAI,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;CAC5B;AAsGD,wBAAgB,UAAU,CAAC,EACzB,SAAS,EACT,GAAG,EACH,QAAQ,EACR,IAAI,EACJ,IAAI,EACJ,QAAQ,EACR,GAAG,EACH,IAAI,GACL,EAAE,eAAe,GAAG,KAAK,CAAC,YAAY,CA6GtC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type React from 'react';
|
|
2
|
+
export interface CheckpointTimelineProps {
|
|
3
|
+
checkpoints: Array<{
|
|
4
|
+
promptIndex: number;
|
|
5
|
+
promptPreview: string;
|
|
6
|
+
ts: string;
|
|
7
|
+
fileCount: number;
|
|
8
|
+
}>;
|
|
9
|
+
selected: number;
|
|
10
|
+
onSelect: (index: number) => void;
|
|
11
|
+
onConfirm: (index: number) => void;
|
|
12
|
+
onClose: () => void;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Full-screen checkpoint timeline overlay for the /rewind command.
|
|
16
|
+
* Arrow keys to navigate, Enter to rewind to selected, Esc to close.
|
|
17
|
+
*/
|
|
18
|
+
export declare function CheckpointTimeline({ checkpoints, selected, onSelect, onConfirm, onClose, }: CheckpointTimelineProps): React.ReactElement;
|
|
19
|
+
//# sourceMappingURL=checkpoint-timeline.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"checkpoint-timeline.d.ts","sourceRoot":"","sources":["../../src/components/checkpoint-timeline.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,MAAM,WAAW,uBAAuB;IACtC,WAAW,EAAE,KAAK,CAAC;QACjB,WAAW,EAAE,MAAM,CAAC;QACpB,aAAa,EAAE,MAAM,CAAC;QACtB,EAAE,EAAE,MAAM,CAAC;QACX,SAAS,EAAE,MAAM,CAAC;KACnB,CAAC,CAAC;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,SAAS,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,EACjC,WAAW,EACX,QAAQ,EACR,QAAQ,EACR,SAAS,EACT,OAAO,GACR,EAAE,uBAAuB,GAAG,KAAK,CAAC,YAAY,CAgD9C"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export type ConfirmDecision = 'yes' | 'no' | 'always' | 'deny';
|
|
3
|
+
export interface ConfirmPromptProps {
|
|
4
|
+
toolName: string;
|
|
5
|
+
input: unknown;
|
|
6
|
+
suggestedPattern: string;
|
|
7
|
+
onDecision: (decision: ConfirmDecision) => void;
|
|
8
|
+
/** Enable YOLO mode (capital Y). Approves the current call. */
|
|
9
|
+
onEnableYolo: () => void;
|
|
10
|
+
/** Whether this call was classified destructive. */
|
|
11
|
+
destructive?: boolean;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* 0-based column spans of each button WITHIN the dialog's content area (i.e.
|
|
15
|
+
* relative to the first printable column inside the border + paddingX). Used
|
|
16
|
+
* by the TUI mouse handler to map a click on the button row to a decision.
|
|
17
|
+
* Derived from the same `buttonLabels` the component renders, so the offsets
|
|
18
|
+
* always match what's on screen.
|
|
19
|
+
*/
|
|
20
|
+
export declare function confirmButtonSegments(suggestedPattern: string): Array<{
|
|
21
|
+
decision: ConfirmDecision;
|
|
22
|
+
start: number;
|
|
23
|
+
len: number;
|
|
24
|
+
}>;
|
|
25
|
+
export declare function ConfirmPrompt({ toolName, input, suggestedPattern, onDecision, onEnableYolo, destructive, }: ConfirmPromptProps): React.ReactElement;
|
|
26
|
+
//# sourceMappingURL=confirm-prompt.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"confirm-prompt.d.ts","sourceRoot":"","sources":["../../src/components/confirm-prompt.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,MAAM,MAAM,eAAe,GAAG,KAAK,GAAG,IAAI,GAAG,QAAQ,GAAG,MAAM,CAAC;AAE/D,MAAM,WAAW,kBAAkB;IACjC,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,OAAO,CAAC;IACf,gBAAgB,EAAE,MAAM,CAAC;IACzB,UAAU,EAAE,CAAC,QAAQ,EAAE,eAAe,KAAK,IAAI,CAAC;IAChD,+DAA+D;IAC/D,YAAY,EAAE,MAAM,IAAI,CAAC;IACzB,oDAAoD;IACpD,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AA6BD;;;;;;GAMG;AACH,wBAAgB,qBAAqB,CACnC,gBAAgB,EAAE,MAAM,GACvB,KAAK,CAAC;IAAE,QAAQ,EAAE,eAAe,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE,CAAC,CASlE;AA8ED,wBAAgB,aAAa,CAAC,EAC5B,QAAQ,EACR,KAAK,EACL,gBAAgB,EAChB,UAAU,EACV,YAAY,EACZ,WAAW,GACZ,EAAE,kBAAkB,GAAG,KAAK,CAAC,YAAY,CA8EzC"}
|