@wrongstack/tui 1.1.2 → 1.1.5
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-action-workflows.d.ts +3 -0
- package/dist/app-state-fleet.d.ts +4 -0
- package/dist/components/agent-monitor-presentation.d.ts +20 -6
- package/dist/components/agents-monitor-constants.d.ts +6 -0
- package/dist/components/agents-monitor-parts.d.ts +69 -0
- package/dist/components/agents-monitor.d.ts +15 -16
- package/dist/components/context-panel-cache-memory.d.ts +17 -0
- package/dist/components/context-panel-sections.d.ts +1 -15
- package/dist/components/input-rows.d.ts +29 -0
- package/dist/components/input.d.ts +1 -1
- package/dist/components/settings-picker-rows.d.ts +9 -0
- package/dist/components/settings-picker.d.ts +1 -1
- package/dist/components/sidebar-cache-card.d.ts +8 -0
- package/dist/components/sidebar-panels-sessions.d.ts +23 -0
- package/dist/components/sidebar-panels-task.d.ts +3 -21
- package/dist/components/user-input-draft.d.ts +34 -0
- package/dist/components/user-input-prompt.d.ts +2 -18
- package/dist/hooks/app-resume-runner.d.ts +32 -0
- package/dist/hooks/auth-panel-support.d.ts +43 -0
- package/dist/hooks/provider-routing-events.d.ts +15 -0
- package/dist/hooks/subagent-history-format.d.ts +8 -0
- package/dist/hooks/use-auth-panel.d.ts +2 -41
- package/dist/hooks/use-picker-keys-navigation.d.ts +8 -0
- package/dist/hooks/use-provider-slash-commands.d.ts +8 -0
- package/dist/index.js +4838 -4654
- package/dist/run-tui-options.d.ts +3 -461
- package/dist/run-tui-surface-options.d.ts +468 -0
- package/dist/submit-controller-support.d.ts +92 -0
- package/dist/submit-controller.d.ts +2 -81
- package/dist/use-controller-confirm-auth.d.ts +1 -1
- package/package.json +7 -7
|
@@ -52,6 +52,7 @@ export type AppActionWorkflows = {
|
|
|
52
52
|
type: 'fleetStart';
|
|
53
53
|
id: string;
|
|
54
54
|
taskId?: string | undefined;
|
|
55
|
+
task?: string | undefined;
|
|
55
56
|
} | {
|
|
56
57
|
type: 'fleetDelta';
|
|
57
58
|
id: string;
|
|
@@ -90,6 +91,8 @@ export type AppActionWorkflows = {
|
|
|
90
91
|
toolCalls: number;
|
|
91
92
|
/** Human-readable failure reason, e.g. "provider_auth", "rate_limit", "timeout". */
|
|
92
93
|
failureReason?: string | undefined;
|
|
94
|
+
/** The task that ended, when the start event did not carry it. */
|
|
95
|
+
task?: string | undefined;
|
|
93
96
|
} | {
|
|
94
97
|
type: 'fleetRemove';
|
|
95
98
|
id: string;
|
|
@@ -40,5 +40,9 @@ export interface FleetEntry {
|
|
|
40
40
|
ctxMaxTokens?: number | undefined;
|
|
41
41
|
ctxCost?: number | undefined;
|
|
42
42
|
failureReason?: string | undefined;
|
|
43
|
+
/** What the agent was asked to do (the delegated task's description). */
|
|
44
|
+
task?: string | undefined;
|
|
45
|
+
/** When its last task ended; drives how long F3 keeps a finished agent listed. */
|
|
46
|
+
endedAt?: number | undefined;
|
|
43
47
|
}
|
|
44
48
|
//# sourceMappingURL=app-state-fleet.d.ts.map
|
|
@@ -2,14 +2,28 @@ import type { AgentTimelineEntry } from '@wrongstack/core/coordination';
|
|
|
2
2
|
import type { FleetEntry } from '../app-state.js';
|
|
3
3
|
import type { HistoryEntry } from './history.js';
|
|
4
4
|
export declare function isLeaderEntry(entry: FleetEntry): boolean;
|
|
5
|
+
export declare function isFinishedEntry(entry: FleetEntry): boolean;
|
|
5
6
|
/**
|
|
6
|
-
* Select the agents the live monitor should render
|
|
7
|
-
* subagents
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
* so F3 always has
|
|
7
|
+
* Select the agents the live monitor should render: LEADER, then running
|
|
8
|
+
* subagents in caller order, then subagents that finished within `keepMs`,
|
|
9
|
+
* newest first — so a failure stays readable after the fact. Idle workers are
|
|
10
|
+
* retained by the coordinator for reuse but are not shown. LEADER stays
|
|
11
|
+
* visible while anything else is (or while it runs itself) so F3 always has
|
|
12
|
+
* a detail card fallback.
|
|
11
13
|
*/
|
|
12
|
-
export declare function selectLiveAgents(all: FleetEntry[],
|
|
14
|
+
export declare function selectLiveAgents(all: FleetEntry[], now: number, keepMs?: number): FleetEntry[];
|
|
15
|
+
/**
|
|
16
|
+
* The one glyph a roster row leads with: a running agent's pressure (calm,
|
|
17
|
+
* busy, hot, critical), otherwise how its task ended.
|
|
18
|
+
*/
|
|
19
|
+
export declare function rosterGlyph(entry: FleetEntry): {
|
|
20
|
+
icon: string;
|
|
21
|
+
color: string;
|
|
22
|
+
};
|
|
23
|
+
/** Where the agent runs: `provider:model`, or what an external ACP worker is. */
|
|
24
|
+
export declare function formatAgentModel(entry: FleetEntry): string;
|
|
25
|
+
/** Dollars at a precision that reads: cents once there are any, else four places. */
|
|
26
|
+
export declare function fmtCost(usd: number): string;
|
|
13
27
|
export declare function fmtTokens(n: number): string;
|
|
14
28
|
export declare function fmtExactTokens(n: number): string;
|
|
15
29
|
export declare function snippet(s: string, max?: number): string;
|
|
@@ -5,6 +5,12 @@ export declare const STATUS: Record<FleetEntry['status'], {
|
|
|
5
5
|
color: string;
|
|
6
6
|
}>;
|
|
7
7
|
export declare const IDLE_HIDE_MS = 60000;
|
|
8
|
+
/**
|
|
9
|
+
* How long a finished agent stays listed in F3 after its task ends: long
|
|
10
|
+
* enough to read why it failed or what it returned, short enough that the
|
|
11
|
+
* roster does not fill with history.
|
|
12
|
+
*/
|
|
13
|
+
export declare const FINISHED_KEEP_MS: number;
|
|
8
14
|
export declare const EMPTY_AGENTS_CLOSE_DELAY_MS = 7500;
|
|
9
15
|
export declare const TRANSCRIPT_ROWS = 10;
|
|
10
16
|
export declare const TRANSCRIPT_FETCH_LIMIT = 500;
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The pieces of the F3 agents panel (`agents-monitor.tsx`): dashboard strip,
|
|
3
|
+
* roster rows, the detail column with its transcript, and the narrow-terminal
|
|
4
|
+
* roster. Every row is one truncating line, so the panel's height budget,
|
|
5
|
+
* which counts them, stays exact.
|
|
6
|
+
*/
|
|
7
|
+
import type { AgentTimelineEntry } from '@wrongstack/core/coordination';
|
|
8
|
+
import type React from 'react';
|
|
9
|
+
import type { FleetEntry } from '../app-state.js';
|
|
10
|
+
/**
|
|
11
|
+
* Dashboard strip — one line that truncates instead of wrapping: context
|
|
12
|
+
* pressure and the hottest agent, spend (total, leader, fleet), and tokens.
|
|
13
|
+
* Run counts live in the title row already.
|
|
14
|
+
*/
|
|
15
|
+
export declare function DashboardHeader({ pressure, grandCost, leaderCost, totalCost, totalTokens, hotAgent, hotRisk, }: {
|
|
16
|
+
pressure: number;
|
|
17
|
+
grandCost: number;
|
|
18
|
+
leaderCost: number;
|
|
19
|
+
totalCost: number;
|
|
20
|
+
totalTokens?: {
|
|
21
|
+
input: number;
|
|
22
|
+
output: number;
|
|
23
|
+
} | undefined;
|
|
24
|
+
hotAgent?: FleetEntry | undefined;
|
|
25
|
+
hotRisk?: {
|
|
26
|
+
icon: string;
|
|
27
|
+
color: string;
|
|
28
|
+
label: string;
|
|
29
|
+
} | undefined;
|
|
30
|
+
}): React.ReactElement;
|
|
31
|
+
/**
|
|
32
|
+
* Roster row — selection, one state glyph (pressure while running, outcome
|
|
33
|
+
* once finished), name, context bar and time. Never wraps: the name yields.
|
|
34
|
+
*/
|
|
35
|
+
export declare function AgentCard({ entry, now, selected, }: {
|
|
36
|
+
entry: FleetEntry;
|
|
37
|
+
now: number;
|
|
38
|
+
selected: boolean;
|
|
39
|
+
}): React.ReactElement;
|
|
40
|
+
/** The optional detail rows, so the height budget counts exactly what renders. */
|
|
41
|
+
export declare function detailRows(entry: FleetEntry, width: number): {
|
|
42
|
+
task: boolean;
|
|
43
|
+
tools: boolean;
|
|
44
|
+
};
|
|
45
|
+
/** The alert line: a failure, a budget limit, the leader's stream, or the current action. */
|
|
46
|
+
export declare function alertLine(entry: FleetEntry, now: number): {
|
|
47
|
+
color: string;
|
|
48
|
+
text: string;
|
|
49
|
+
} | undefined;
|
|
50
|
+
/**
|
|
51
|
+
* Detail column — who the agent is, what it was asked, how far it got, and
|
|
52
|
+
* its transcript. Every row is a single truncating line, so the height
|
|
53
|
+
* budget the panel computes is exact.
|
|
54
|
+
*/
|
|
55
|
+
export declare function AgentDetailPanel({ entry, now, transcript, transcriptScroll, transcriptRows: rows, width, }: {
|
|
56
|
+
entry: FleetEntry;
|
|
57
|
+
now: number;
|
|
58
|
+
transcript?: AgentTimelineEntry[] | undefined;
|
|
59
|
+
transcriptScroll?: number | undefined;
|
|
60
|
+
transcriptRows?: number | undefined;
|
|
61
|
+
width: number;
|
|
62
|
+
}): React.ReactElement;
|
|
63
|
+
/** Narrow terminals: one line per agent with its state, time and current action. */
|
|
64
|
+
export declare function CompactRoster({ agents, selected, now, }: {
|
|
65
|
+
agents: readonly FleetEntry[];
|
|
66
|
+
selected: FleetEntry | undefined;
|
|
67
|
+
now: number;
|
|
68
|
+
}): React.ReactElement;
|
|
69
|
+
//# sourceMappingURL=agents-monitor-parts.d.ts.map
|
|
@@ -24,25 +24,24 @@ interface AgentsMonitorProps {
|
|
|
24
24
|
fullscreen?: boolean | undefined;
|
|
25
25
|
}
|
|
26
26
|
export { agentRisk, fmtExactTokens, formatAgentDetailHeader, formatContextRunway, formatRecentToolChip, formatTranscriptLine, leaderTimelineFromEntries, nextEmptyAgentsCloseStartedAt, selectAgentDetail, selectLiveAgents, selectTranscriptWindow, shouldCloseEmptyAgentsMonitor, transcriptRowsForTerminal, } from './agent-monitor-presentation.js';
|
|
27
|
-
export { EMPTY_AGENTS_CLOSE_DELAY_MS, IDLE_HIDE_MS } from './agents-monitor-constants.js';
|
|
27
|
+
export { EMPTY_AGENTS_CLOSE_DELAY_MS, FINISHED_KEEP_MS, IDLE_HIDE_MS, } from './agents-monitor-constants.js';
|
|
28
28
|
/**
|
|
29
|
-
* Agents panel — the
|
|
29
|
+
* Agents panel — the F3 view.
|
|
30
30
|
*
|
|
31
31
|
* Layout:
|
|
32
|
-
*
|
|
33
|
-
* │ ◇ AGENTS / live
|
|
34
|
-
*
|
|
35
|
-
* │ agents
|
|
36
|
-
* │
|
|
37
|
-
* │
|
|
38
|
-
* │
|
|
39
|
-
* │
|
|
40
|
-
* │
|
|
41
|
-
* │
|
|
42
|
-
* │
|
|
43
|
-
*
|
|
44
|
-
*
|
|
45
|
-
* └─────────────────────────────────────────────────────────┘
|
|
32
|
+
* ┌──────────────────────────────────────────────────────────┐
|
|
33
|
+
* │ ◇ AGENTS / live operations ▶ 2 ✓ 5 × 1 │
|
|
34
|
+
* │ ctx 78% ▲ researcher │ $0.69 total · leader … │ 412k↑ … │ ← DashboardHeader
|
|
35
|
+
* │ agents 4 ┌─────────────────────────────────┐│
|
|
36
|
+
* │ › ● claude-code 07:00 │ claude-code external agent … ││
|
|
37
|
+
* │ ▲ researcher 03:00 │ task refactor the session … ││
|
|
38
|
+
* │ finished │ L1 · 17 tools · $0.21 · 07:00 ││
|
|
39
|
+
* │ ✗ reviewer 05:00 │ → bun test packages/acp 42s ││
|
|
40
|
+
* │ │ ┌ transcript ─────────────────┐ ││
|
|
41
|
+
* │ │ │ 20:18:02 L1 💬 … │ ││
|
|
42
|
+
* │ │ └─────────────────────────────┘ ││
|
|
43
|
+
* │ ↑↓ agent PgUp/Dn transcript F3/Esc close │
|
|
44
|
+
* └──────────────────────────────────────────────────────────┘
|
|
46
45
|
*/
|
|
47
46
|
export declare function AgentsMonitor({ entries, totalCost, leaderCost, totalTokens, nowTick, onClose, transcripts, leaderTranscript, fullscreen, }: AgentsMonitorProps): React.ReactElement;
|
|
48
47
|
//# sourceMappingURL=agents-monitor.d.ts.map
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type React from 'react';
|
|
2
|
+
import type { ContextPanelData } from './context-panel-types.js';
|
|
3
|
+
/**
|
|
4
|
+
* Cache coverage section — answers "exactly how far does the prompt cache
|
|
5
|
+
* extend into the live request?" Renders the last request's hit ratio (the
|
|
6
|
+
* session-cumulative one next to it lags: it carries the cold first request
|
|
7
|
+
* forever) plus a per-request coverage meter that visibly marks where the cached
|
|
8
|
+
* prefix ends. Hidden when nothing has been cached yet so the panel does
|
|
9
|
+
* not advertise a 0% figure as if it were meaningful.
|
|
10
|
+
*/
|
|
11
|
+
export declare function CacheSection({ data }: {
|
|
12
|
+
data: ContextPanelData;
|
|
13
|
+
}): React.ReactElement;
|
|
14
|
+
export declare function MemoryContextSection({ data }: {
|
|
15
|
+
data: ContextPanelData;
|
|
16
|
+
}): React.ReactElement;
|
|
17
|
+
//# sourceMappingURL=context-panel-cache-memory.d.ts.map
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { ContextBreakdown } from '@wrongstack/core/utils';
|
|
2
2
|
import type React from 'react';
|
|
3
3
|
import type { ContextPanelData } from './context-panel-types.js';
|
|
4
|
+
export { CacheSection, MemoryContextSection } from './context-panel-cache-memory.js';
|
|
4
5
|
type ZoneLevel = 'safe' | 'warning' | 'critical' | 'danger';
|
|
5
6
|
export declare function zoneFor(pct: number): ZoneLevel;
|
|
6
7
|
export declare function zoneColor(zone: ZoneLevel): string;
|
|
@@ -33,22 +34,7 @@ export declare function AgentFootprintSection({ data, contentWidth, }: {
|
|
|
33
34
|
export declare function MetricsSection({ data }: {
|
|
34
35
|
data: ContextPanelData;
|
|
35
36
|
}): React.ReactElement;
|
|
36
|
-
/**
|
|
37
|
-
* Cache coverage section — answers "exactly how far does the prompt cache
|
|
38
|
-
* extend into the live request?" Renders the last request's hit ratio (the
|
|
39
|
-
* session-cumulative one next to it lags: it carries the cold first request
|
|
40
|
-
* forever) plus a per-request coverage meter that visibly marks where the cached
|
|
41
|
-
* prefix ends. Hidden when nothing has been cached yet so the panel does
|
|
42
|
-
* not advertise a 0% figure as if it were meaningful.
|
|
43
|
-
*/
|
|
44
|
-
export declare function CacheSection({ data }: {
|
|
45
|
-
data: ContextPanelData;
|
|
46
|
-
}): React.ReactElement;
|
|
47
37
|
export declare function StatusSection({ data }: {
|
|
48
38
|
data: ContextPanelData;
|
|
49
39
|
}): React.ReactElement;
|
|
50
|
-
export declare function MemoryContextSection({ data }: {
|
|
51
|
-
data: ContextPanelData;
|
|
52
|
-
}): React.ReactElement;
|
|
53
|
-
export {};
|
|
54
40
|
//# sourceMappingURL=context-panel-sections.d.ts.map
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type React from 'react';
|
|
2
|
+
import type { InputCell } from '../input-tokens.js';
|
|
3
|
+
import type { AnimationStyle } from './animation-style.js';
|
|
4
|
+
import { type ComposerStatus } from './composer-status-chip.js';
|
|
5
|
+
/** Exact-width composer top rail with an isolated activity-icon timer.
|
|
6
|
+
*
|
|
7
|
+
* Layout:
|
|
8
|
+
* ╭─ icon TITLE ──────── status ─╮
|
|
9
|
+
* The provider/model is shown in the status bar instead.
|
|
10
|
+
*/
|
|
11
|
+
export declare function ComposerTopRail({ width, title, status, animationStyle, disabled, workingTime, icon, accent, }: {
|
|
12
|
+
width: number;
|
|
13
|
+
title: string;
|
|
14
|
+
status: ComposerStatus;
|
|
15
|
+
animationStyle: AnimationStyle | 'cycle';
|
|
16
|
+
disabled: boolean;
|
|
17
|
+
workingTime?: number | undefined;
|
|
18
|
+
/** Glyph drawn before the title; defaults to the brand glyph. */
|
|
19
|
+
icon?: string | undefined;
|
|
20
|
+
/** Rail color override (e.g. warn color while bash mode is active). */
|
|
21
|
+
accent?: string | undefined;
|
|
22
|
+
}): React.ReactElement;
|
|
23
|
+
/**
|
|
24
|
+
* Render one wrapped row of input cells into styled `<Text>` spans. Consecutive
|
|
25
|
+
* cells with the same style are coalesced into a single span; the cursor cell is
|
|
26
|
+
* always emitted on its own (inverse). `promptColor` styles the leading prompt.
|
|
27
|
+
*/
|
|
28
|
+
export declare function renderRow(cells: InputCell[], rowKey: string, promptColor: string): React.ReactNode[];
|
|
29
|
+
//# sourceMappingURL=input-rows.d.ts.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type React from 'react';
|
|
2
2
|
import { type MouseEventInfo } from '../mouse.js';
|
|
3
3
|
import type { AnimationStyle } from './animation-style.js';
|
|
4
|
-
import {
|
|
4
|
+
import type { ComposerStatus } from './composer-status-chip.js';
|
|
5
5
|
export declare const DEFAULT_INPUT_PROMPT: string;
|
|
6
6
|
/** Columns available to input tokens inside the two-sided composer rail. */
|
|
7
7
|
export declare function inputContentWidth(termColumns: number): number;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { SettingsPickerProps } from './settings-picker-props.js';
|
|
2
|
+
import type { SettingsPickerRowData } from './settings-picker-row-list.js';
|
|
3
|
+
/**
|
|
4
|
+
* The settings picker's row list — section headers and one row per field,
|
|
5
|
+
* each with its current value and a one-line description. Field order here
|
|
6
|
+
* IS the field index the reducer and jump chords use.
|
|
7
|
+
*/
|
|
8
|
+
export declare function buildSettingsPickerRows({ mode, delayMs, titleAnimation, yolo, fleetChat, chime, confirmExit, nextPrediction, featureMcp, featurePlugins, featureMemory, featureSkills, featureModelsRegistry, featureToolCoach, tokenSavingTier, allowOutsideProjectRoot, maxIterations, autoProceedMaxIterations, enhanceDelayMs, enhanceEnabled, enhanceLanguage, preRefineSeconds, indexOnStart, multiDiffSummaryThreshold, thinkingWord, thinkingWordEditing, thinkingWordDraft, wrongProxyUrlEditing, wrongProxyUrlDraft, reasoningMode, reasoningEffort, reasoningEffortLevels, reasoningPreserve, cacheTtl, contextAutoCompact, contextStrategy, contextMode, maxConcurrent, logLevel, auditLevel, debugStream, statuslineMode, configScope, animationStyle, breakerEnabled, breakerAutoKillResetMs, showModelReasoning, toolResultViewMode, showAgentSwarmPanel, showSidebar, showSageMemoryInject, sageMemoryInjectThreshold, nextStepsTool, nextStepsRequired, rememberStartupChoices, nextSystemPromptVariant, readSymbols, panelPositions, wrongProxyEnabled, wrongProxyUrl, }: SettingsPickerProps): SettingsPickerRowData[];
|
|
9
|
+
//# sourceMappingURL=settings-picker-rows.d.ts.map
|
|
@@ -3,5 +3,5 @@ import type { SettingsPickerProps } from './settings-picker-props.js';
|
|
|
3
3
|
export { SETTINGS_PICKER_JUMP_CHORDS, settingsPickerJumpByName, settingsPickerJumpField, settingsPickerJumpNames, } from './settings-picker-jumps.js';
|
|
4
4
|
export * from './settings-picker-model.js';
|
|
5
5
|
export type { SettingsPickerProps } from './settings-picker-props.js';
|
|
6
|
-
export declare function SettingsPicker(
|
|
6
|
+
export declare function SettingsPicker(props: SettingsPickerProps): React.ReactElement;
|
|
7
7
|
//# sourceMappingURL=settings-picker.d.ts.map
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { CacheStats } from '@wrongstack/core/types';
|
|
2
|
+
import type React from 'react';
|
|
3
|
+
/** Sidebar prompt-cache card: last-request hit ratio, session average and coverage. */
|
|
4
|
+
export declare function CacheCard({ cacheStats, innerWidth, }: {
|
|
5
|
+
cacheStats: CacheStats | undefined;
|
|
6
|
+
innerWidth: number;
|
|
7
|
+
}): React.ReactElement;
|
|
8
|
+
//# sourceMappingURL=sidebar-cache-card.d.ts.map
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type React from 'react';
|
|
2
|
+
import type { ResumeSessionEntry } from '../app-state.js';
|
|
3
|
+
import type { LiveSessionEntry } from './sessions-panel.js';
|
|
4
|
+
export interface SessionsPanelSidebarProps {
|
|
5
|
+
liveSessions?: readonly LiveSessionEntry[] | undefined;
|
|
6
|
+
resumeSessions?: readonly ResumeSessionEntry[] | undefined;
|
|
7
|
+
currentSessionId?: string | undefined;
|
|
8
|
+
now?: number | undefined;
|
|
9
|
+
width: number;
|
|
10
|
+
}
|
|
11
|
+
export declare function SessionsPanelSidebar({ liveSessions, resumeSessions, currentSessionId, now, width, }: SessionsPanelSidebarProps): React.ReactElement;
|
|
12
|
+
export interface KanbanPanelSidebarProps {
|
|
13
|
+
columns: readonly {
|
|
14
|
+
name: string;
|
|
15
|
+
count: number;
|
|
16
|
+
wip?: number;
|
|
17
|
+
}[];
|
|
18
|
+
totalActive: number;
|
|
19
|
+
activeCardTitles: readonly string[];
|
|
20
|
+
width: number;
|
|
21
|
+
}
|
|
22
|
+
export declare function KanbanPanelSidebar({ columns, totalActive, activeCardTitles, width, }: KanbanPanelSidebarProps): React.ReactElement;
|
|
23
|
+
//# sourceMappingURL=sidebar-panels-sessions.d.ts.map
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import type { TodoItem } from '@wrongstack/core/agent';
|
|
2
2
|
import type React from 'react';
|
|
3
|
-
import type { GoalSummary
|
|
3
|
+
import type { GoalSummary } from '../app-state.js';
|
|
4
4
|
import type { QueueItem } from '../app-state-core-types.js';
|
|
5
|
-
|
|
5
|
+
export type { KanbanPanelSidebarProps, SessionsPanelSidebarProps, } from './sidebar-panels-sessions.js';
|
|
6
|
+
export { KanbanPanelSidebar, SessionsPanelSidebar } from './sidebar-panels-sessions.js';
|
|
6
7
|
export interface PlanPanelSidebarProps {
|
|
7
8
|
openCount: number;
|
|
8
9
|
inProgressCount: number;
|
|
@@ -43,23 +44,4 @@ export interface GoalPanelSidebarProps {
|
|
|
43
44
|
width: number;
|
|
44
45
|
}
|
|
45
46
|
export declare function GoalPanelSidebar({ goal, coordinatorRunning, width, }: GoalPanelSidebarProps): React.ReactElement;
|
|
46
|
-
export interface SessionsPanelSidebarProps {
|
|
47
|
-
liveSessions?: readonly LiveSessionEntry[] | undefined;
|
|
48
|
-
resumeSessions?: readonly ResumeSessionEntry[] | undefined;
|
|
49
|
-
currentSessionId?: string | undefined;
|
|
50
|
-
now?: number | undefined;
|
|
51
|
-
width: number;
|
|
52
|
-
}
|
|
53
|
-
export declare function SessionsPanelSidebar({ liveSessions, resumeSessions, currentSessionId, now, width, }: SessionsPanelSidebarProps): React.ReactElement;
|
|
54
|
-
export interface KanbanPanelSidebarProps {
|
|
55
|
-
columns: readonly {
|
|
56
|
-
name: string;
|
|
57
|
-
count: number;
|
|
58
|
-
wip?: number;
|
|
59
|
-
}[];
|
|
60
|
-
totalActive: number;
|
|
61
|
-
activeCardTitles: readonly string[];
|
|
62
|
-
width: number;
|
|
63
|
-
}
|
|
64
|
-
export declare function KanbanPanelSidebar({ columns, totalActive, activeCardTitles, width, }: KanbanPanelSidebarProps): React.ReactElement;
|
|
65
47
|
//# sourceMappingURL=sidebar-panels-task.d.ts.map
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { UserInputAnswer, UserInputQuestion, UserInputRequest } from '@wrongstack/core/types';
|
|
2
|
+
import { type DOMElement } from '../ink.js';
|
|
3
|
+
export type AnswerDraft = {
|
|
4
|
+
selected: string[];
|
|
5
|
+
text: string;
|
|
6
|
+
customSelected: boolean;
|
|
7
|
+
delegated: boolean;
|
|
8
|
+
};
|
|
9
|
+
export type Draft = Record<string, AnswerDraft>;
|
|
10
|
+
export declare const EMPTY_ANSWER: AnswerDraft;
|
|
11
|
+
export declare function initialDraft(request: UserInputRequest): Draft;
|
|
12
|
+
export declare function canEditText(question: UserInputQuestion): boolean;
|
|
13
|
+
export declare function hasRecommendation(question: UserInputQuestion): boolean;
|
|
14
|
+
export declare function hasAnswer(question: UserInputQuestion, answer?: AnswerDraft): boolean;
|
|
15
|
+
export declare function validateDraft(questions: UserInputQuestion[], draft: Draft): {
|
|
16
|
+
valid: boolean;
|
|
17
|
+
missingCount: number;
|
|
18
|
+
firstMissing?: UserInputQuestion | undefined;
|
|
19
|
+
};
|
|
20
|
+
export declare function toAnswer(question: UserInputQuestion, answer: AnswerDraft): UserInputAnswer;
|
|
21
|
+
export declare function answerMarker(question: UserInputQuestion, answer?: AnswerDraft): string;
|
|
22
|
+
export declare function progressBar(completed: number, total: number, width: number): string;
|
|
23
|
+
/** Match one-based SGR mouse cells against Ink's measured zero-based rectangle. */
|
|
24
|
+
export declare function pointInsideElement(element: DOMElement | null, x: number, y: number): boolean;
|
|
25
|
+
export declare function truncate(value: string, width: number): string;
|
|
26
|
+
export declare function visibleWindow<T>(items: readonly T[], selected: number, limit: number): {
|
|
27
|
+
items: Array<{
|
|
28
|
+
item: T;
|
|
29
|
+
index: number;
|
|
30
|
+
}>;
|
|
31
|
+
above: number;
|
|
32
|
+
below: number;
|
|
33
|
+
};
|
|
34
|
+
//# sourceMappingURL=user-input-draft.d.ts.map
|
|
@@ -1,31 +1,15 @@
|
|
|
1
1
|
import type { EventBus } from '@wrongstack/core/kernel';
|
|
2
|
-
import type {
|
|
2
|
+
import type { UserInputRequest, UserInputResponse } from '@wrongstack/core/types';
|
|
3
3
|
import type React from 'react';
|
|
4
|
-
|
|
4
|
+
export { initialDraft, pointInsideElement, validateDraft } from './user-input-draft.js';
|
|
5
5
|
export type PendingUserInput = {
|
|
6
6
|
request: UserInputRequest;
|
|
7
7
|
resolve: (response: UserInputResponse) => void;
|
|
8
8
|
};
|
|
9
|
-
type AnswerDraft = {
|
|
10
|
-
selected: string[];
|
|
11
|
-
text: string;
|
|
12
|
-
customSelected: boolean;
|
|
13
|
-
delegated: boolean;
|
|
14
|
-
};
|
|
15
|
-
type Draft = Record<string, AnswerDraft>;
|
|
16
9
|
export declare function usePendingUserInput(events: EventBus): PendingUserInput | null;
|
|
17
10
|
interface UserInputPromptProps {
|
|
18
11
|
pending: PendingUserInput;
|
|
19
12
|
onInterrupt?: (() => void) | undefined;
|
|
20
13
|
}
|
|
21
14
|
export declare function UserInputPrompt(props: UserInputPromptProps): React.ReactElement;
|
|
22
|
-
export declare function initialDraft(request: UserInputRequest): Draft;
|
|
23
|
-
export declare function validateDraft(questions: UserInputQuestion[], draft: Draft): {
|
|
24
|
-
valid: boolean;
|
|
25
|
-
missingCount: number;
|
|
26
|
-
firstMissing?: UserInputQuestion | undefined;
|
|
27
|
-
};
|
|
28
|
-
/** Match one-based SGR mouse cells against Ink's measured zero-based rectangle. */
|
|
29
|
-
export declare function pointInsideElement(element: DOMElement | null, x: number, y: number): boolean;
|
|
30
|
-
export {};
|
|
31
15
|
//# sourceMappingURL=user-input-prompt.d.ts.map
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { Dispatch, MutableRefObject } from 'react';
|
|
2
|
+
import type { Action } from '../app-action-type.js';
|
|
3
|
+
import type { AppProps } from '../app-props.js';
|
|
4
|
+
import type { State } from '../app-state.js';
|
|
5
|
+
/** What one render of `useAppPickerKeys` hands the resume runner. */
|
|
6
|
+
export interface ResumeRunnerDeps {
|
|
7
|
+
state: State;
|
|
8
|
+
dispatch: Dispatch<Action>;
|
|
9
|
+
sessionGenerationRef?: MutableRefObject<number> | undefined;
|
|
10
|
+
/** Supersede token: bumped by every run, re-checked by every continuation. */
|
|
11
|
+
resumeRunRef: MutableRefObject<number>;
|
|
12
|
+
mountedRef: MutableRefObject<boolean>;
|
|
13
|
+
onResumeSession: AppProps['onResumeSession'];
|
|
14
|
+
switchQueueSession?: ((sessionId: string) => void) | undefined;
|
|
15
|
+
agent: AppProps['agent'];
|
|
16
|
+
setSuggestions: AppProps['setSuggestions'];
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Run one resume, from the wipe to the last streamed entry.
|
|
20
|
+
*
|
|
21
|
+
* Shared by the `/resume` picker and the F10 sessions panel so the two cannot
|
|
22
|
+
* drift into showing different things for the same operation.
|
|
23
|
+
*
|
|
24
|
+
* The shape of it is the whole feature: clear the screen the way `/clear`
|
|
25
|
+
* does, show a live block while the journal is read (seconds, with nothing
|
|
26
|
+
* else on screen), then stream the transcript in so it scrolls into place the
|
|
27
|
+
* way it did when it was live — and stop there, waiting.
|
|
28
|
+
*/
|
|
29
|
+
export declare function createResumeRunner({ state, dispatch, sessionGenerationRef, resumeRunRef, mountedRef, onResumeSession, switchQueueSession, agent, setSuggestions, }: ResumeRunnerDeps): (sessionId: string, label: string, hooks?: {
|
|
30
|
+
onSettled?: (() => void) | undefined;
|
|
31
|
+
}) => Promise<void>;
|
|
32
|
+
//# sourceMappingURL=app-resume-runner.d.ts.map
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import type { Action, State } from '../app-reducer.js';
|
|
2
|
+
import type { AuthPanelHost } from '../auth-panel-model.js';
|
|
3
|
+
export interface UseAuthPanelOptions {
|
|
4
|
+
authHost: AuthPanelHost | undefined;
|
|
5
|
+
stateRef: {
|
|
6
|
+
current: State;
|
|
7
|
+
};
|
|
8
|
+
dispatch: React.Dispatch<Action>;
|
|
9
|
+
/**
|
|
10
|
+
* Live `state.authPanel.open` — when the panel closes from OUTSIDE the
|
|
11
|
+
* controller (another panel's `closePanels`, an F-key toggle, Ctrl+C),
|
|
12
|
+
* any in-flight flow must be aborted so an invisible prompt can't leave
|
|
13
|
+
* an OAuth loopback server (or a pending readline promise) running
|
|
14
|
+
* behind a closed panel.
|
|
15
|
+
*/
|
|
16
|
+
open: boolean;
|
|
17
|
+
}
|
|
18
|
+
export interface AuthPanelController {
|
|
19
|
+
/** Open the panel (used by `/auth` via the panel bridge). No-op without a host. */
|
|
20
|
+
openAuthPanel: (view?: 'list' | 'oauth') => boolean;
|
|
21
|
+
onAuthEnter: () => void;
|
|
22
|
+
onAuthBack: () => void;
|
|
23
|
+
onAuthShortcut: (input: string) => void;
|
|
24
|
+
onAuthPromptSubmit: () => void;
|
|
25
|
+
onAuthPromptCancel: () => void;
|
|
26
|
+
onAuthConfirm: (yes: boolean) => void;
|
|
27
|
+
onAuthFlowCancel: () => void;
|
|
28
|
+
/**
|
|
29
|
+
* Ctrl+C while the panel is open. In raw-mode terminals (ConPTY, most
|
|
30
|
+
* Windows setups) Ctrl+C arrives as key DATA — not a SIGINT — so the
|
|
31
|
+
* key router must handle it; the app's SIGINT ladder covers the
|
|
32
|
+
* console-event delivery path. Both paths abort any in-flight flow and
|
|
33
|
+
* close the panel.
|
|
34
|
+
*/
|
|
35
|
+
onAuthCtrlC: () => void;
|
|
36
|
+
/** Open the existing masked modal for a slash-command secret prompt. */
|
|
37
|
+
readSecret: (label: string) => Promise<string>;
|
|
38
|
+
/** Open the same modal with visible text for slash-command selections. */
|
|
39
|
+
readText: (label: string) => Promise<string>;
|
|
40
|
+
}
|
|
41
|
+
export declare function abortError(): Error;
|
|
42
|
+
export declare function toMessage(err: unknown): string;
|
|
43
|
+
//# sourceMappingURL=auth-panel-support.d.ts.map
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { Dispatch } from 'react';
|
|
2
|
+
import type { Action } from '../app-action-type.js';
|
|
3
|
+
import type { AppProps } from '../app-props.js';
|
|
4
|
+
/**
|
|
5
|
+
* Subscribe the transcript to provider routing events: retries, errors,
|
|
6
|
+
* fallback hops, explicit and server-side model switches, and the fallback
|
|
7
|
+
* gate's pending prompt. Returns one unsubscribe for all of them.
|
|
8
|
+
*/
|
|
9
|
+
export declare function subscribeProviderRoutingEvents(events: AppProps['events'], { agent, dispatch, discardAbandonedStream, }: {
|
|
10
|
+
agent: AppProps['agent'];
|
|
11
|
+
dispatch: Dispatch<Action>;
|
|
12
|
+
/** Drop a partial stream a retry or fallback hop is about to re-send. */
|
|
13
|
+
discardAbandonedStream: () => void;
|
|
14
|
+
}): () => void;
|
|
15
|
+
//# sourceMappingURL=provider-routing-events.d.ts.map
|
|
@@ -54,5 +54,13 @@ export declare function formatDelegateSuccessText(input: {
|
|
|
54
54
|
toolCalls: number;
|
|
55
55
|
durationMs: number;
|
|
56
56
|
}): string;
|
|
57
|
+
/**
|
|
58
|
+
* Why a subagent's task failed, for the F3 detail: the error's own message
|
|
59
|
+
* (it names the cause, e.g. a spent quota and when it resets), else its kind.
|
|
60
|
+
*/
|
|
61
|
+
export declare function formatSubagentFailureReason(error: {
|
|
62
|
+
kind?: string | undefined;
|
|
63
|
+
message?: string | undefined;
|
|
64
|
+
} | undefined): string | undefined;
|
|
57
65
|
export {};
|
|
58
66
|
//# sourceMappingURL=subagent-history-format.d.ts.map
|
|
@@ -1,43 +1,4 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
|
|
3
|
-
interface UseAuthPanelOptions {
|
|
4
|
-
authHost: AuthPanelHost | undefined;
|
|
5
|
-
stateRef: {
|
|
6
|
-
current: State;
|
|
7
|
-
};
|
|
8
|
-
dispatch: React.Dispatch<Action>;
|
|
9
|
-
/**
|
|
10
|
-
* Live `state.authPanel.open` — when the panel closes from OUTSIDE the
|
|
11
|
-
* controller (another panel's `closePanels`, an F-key toggle, Ctrl+C),
|
|
12
|
-
* any in-flight flow must be aborted so an invisible prompt can't leave
|
|
13
|
-
* an OAuth loopback server (or a pending readline promise) running
|
|
14
|
-
* behind a closed panel.
|
|
15
|
-
*/
|
|
16
|
-
open: boolean;
|
|
17
|
-
}
|
|
18
|
-
export interface AuthPanelController {
|
|
19
|
-
/** Open the panel (used by `/auth` via the panel bridge). No-op without a host. */
|
|
20
|
-
openAuthPanel: (view?: 'list' | 'oauth') => boolean;
|
|
21
|
-
onAuthEnter: () => void;
|
|
22
|
-
onAuthBack: () => void;
|
|
23
|
-
onAuthShortcut: (input: string) => void;
|
|
24
|
-
onAuthPromptSubmit: () => void;
|
|
25
|
-
onAuthPromptCancel: () => void;
|
|
26
|
-
onAuthConfirm: (yes: boolean) => void;
|
|
27
|
-
onAuthFlowCancel: () => void;
|
|
28
|
-
/**
|
|
29
|
-
* Ctrl+C while the panel is open. In raw-mode terminals (ConPTY, most
|
|
30
|
-
* Windows setups) Ctrl+C arrives as key DATA — not a SIGINT — so the
|
|
31
|
-
* key router must handle it; the app's SIGINT ladder covers the
|
|
32
|
-
* console-event delivery path. Both paths abort any in-flight flow and
|
|
33
|
-
* close the panel.
|
|
34
|
-
*/
|
|
35
|
-
onAuthCtrlC: () => void;
|
|
36
|
-
/** Open the existing masked modal for a slash-command secret prompt. */
|
|
37
|
-
readSecret: (label: string) => Promise<string>;
|
|
38
|
-
/** Open the same modal with visible text for slash-command selections. */
|
|
39
|
-
readText: (label: string) => Promise<string>;
|
|
40
|
-
}
|
|
1
|
+
import type { AuthPanelController, UseAuthPanelOptions } from './auth-panel-support.js';
|
|
2
|
+
export type { AuthPanelController } from './auth-panel-support.js';
|
|
41
3
|
export declare function useAuthPanel(opts: UseAuthPanelOptions): AuthPanelController;
|
|
42
|
-
export {};
|
|
43
4
|
//# sourceMappingURL=use-auth-panel.d.ts.map
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { KeyEvent } from '../components/input.js';
|
|
2
|
+
import type { PickerKeysHost } from './use-picker-keys-types.js';
|
|
3
|
+
/**
|
|
4
|
+
* Keys for the navigation pickers — project, sessions panel, slash, F-key and
|
|
5
|
+
* the general picker. Tried last, after every tools/settings picker.
|
|
6
|
+
*/
|
|
7
|
+
export declare function tryNavigationPickerKeys(host: PickerKeysHost, input: string, key: KeyEvent, isEnter: boolean, debouncedEnter: (host: PickerKeysHost) => boolean): boolean;
|
|
8
|
+
//# sourceMappingURL=use-picker-keys-navigation.d.ts.map
|
|
@@ -9,5 +9,13 @@ import type { TuiSlashCommandOptions } from './tui-slash-command-options.js';
|
|
|
9
9
|
* registration order (tests/slash-registration-enumeration.test.ts,
|
|
10
10
|
* positions 2–3).
|
|
11
11
|
*/
|
|
12
|
+
/**
|
|
13
|
+
* `/model acp/claude-code` or `/model acp claude-code` → the pair to switch to.
|
|
14
|
+
* The provider id never contains a slash; the model id may (`openrouter/x/y`).
|
|
15
|
+
*/
|
|
16
|
+
export declare function parseModelTarget(args: string): {
|
|
17
|
+
provider: string;
|
|
18
|
+
model: string;
|
|
19
|
+
} | undefined;
|
|
12
20
|
export declare function useProviderSlashCommands(deps: TuiSlashCommandOptions): void;
|
|
13
21
|
//# sourceMappingURL=use-provider-slash-commands.d.ts.map
|