@wrongstack/tui 1.1.2 → 1.1.4
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/hooks/subagent-history-format.d.ts +8 -0
- package/dist/hooks/use-provider-slash-commands.d.ts +8 -0
- package/dist/index.js +3560 -3462
- 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
|
|
@@ -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
|
|
@@ -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
|