@wrongstack/tui 0.287.0 → 0.289.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 +19 -2
- package/dist/app-initial-state.d.ts.map +1 -1
- package/dist/app-props.d.ts +618 -0
- package/dist/app-props.d.ts.map +1 -0
- package/dist/app-reducer.d.ts.map +1 -1
- package/dist/app-state.d.ts +24 -11
- package/dist/app-state.d.ts.map +1 -1
- package/dist/app.d.ts +4 -595
- package/dist/app.d.ts.map +1 -1
- package/dist/components/auth-panel.d.ts.map +1 -1
- package/dist/components/enhance-panel.d.ts +11 -3
- package/dist/components/enhance-panel.d.ts.map +1 -1
- package/dist/components/history/banner.d.ts.map +1 -1
- package/dist/components/history/entry.d.ts +6 -1
- package/dist/components/history/entry.d.ts.map +1 -1
- package/dist/components/history/index.d.ts +2 -2
- package/dist/components/history/index.d.ts.map +1 -1
- package/dist/components/history/replay.d.ts +14 -38
- package/dist/components/history/replay.d.ts.map +1 -1
- package/dist/components/history/types.d.ts +16 -0
- package/dist/components/history/types.d.ts.map +1 -1
- package/dist/components/history.d.ts +1 -1
- package/dist/components/history.d.ts.map +1 -1
- package/dist/components/phase-panel.d.ts +1 -1
- package/dist/components/powerline-rail.d.ts.map +1 -1
- package/dist/components/process-list.d.ts.map +1 -1
- package/dist/components/scrollable-history.d.ts +1 -1
- package/dist/components/scrollable-history.d.ts.map +1 -1
- package/dist/components/settings-picker.d.ts +5 -2
- package/dist/components/settings-picker.d.ts.map +1 -1
- package/dist/components/status-bar.d.ts +20 -21
- package/dist/components/status-bar.d.ts.map +1 -1
- package/dist/components/statusline-picker.d.ts +1 -1
- package/dist/components/worktree-monitor.d.ts +1 -1
- package/dist/components/worktree-panel.d.ts +1 -1
- package/dist/esc-close-panels.d.ts +42 -0
- package/dist/esc-close-panels.d.ts.map +1 -0
- package/dist/f-key-panels.d.ts +13 -0
- package/dist/f-key-panels.d.ts.map +1 -1
- package/dist/hooks/use-auth-panel.d.ts +2 -0
- package/dist/hooks/use-auth-panel.d.ts.map +1 -1
- package/dist/hooks/use-director-fleet-bridge.d.ts +6 -1
- package/dist/hooks/use-director-fleet-bridge.d.ts.map +1 -1
- package/dist/hooks/use-fleet-generation-gate.d.ts +37 -0
- package/dist/hooks/use-fleet-generation-gate.d.ts.map +1 -0
- package/dist/hooks/use-live-todos.d.ts +4 -0
- package/dist/hooks/use-live-todos.d.ts.map +1 -0
- package/dist/hooks/use-session-interrupt-controller.d.ts +44 -0
- package/dist/hooks/use-session-interrupt-controller.d.ts.map +1 -0
- package/dist/hooks/use-subagent-events.d.ts +3 -1
- package/dist/hooks/use-subagent-events.d.ts.map +1 -1
- package/dist/hooks/use-tui-activity.d.ts +0 -1
- package/dist/hooks/use-tui-activity.d.ts.map +1 -1
- package/dist/hooks/use-tui-event-bridge.d.ts +9 -3
- package/dist/hooks/use-tui-event-bridge.d.ts.map +1 -1
- package/dist/index.d.ts +7 -7
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +19188 -18644
- package/dist/index.js.map +4 -4
- package/dist/reducers/helpers.d.ts +1 -1
- package/dist/reducers/helpers.d.ts.map +1 -1
- package/dist/run-tui.d.ts +19 -2
- package/dist/run-tui.d.ts.map +1 -1
- package/dist/slash-command-search.d.ts +5 -0
- package/dist/slash-command-search.d.ts.map +1 -1
- package/dist/submit-history.d.ts.map +1 -1
- package/dist/theme.d.ts.map +1 -1
- package/package.json +6 -6
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { AutonomyAgentStatus } from './components/history/types.js';
|
|
2
|
+
import type { FleetChatVerbosity, Message, SessionEvent } from '@wrongstack/core';
|
|
2
3
|
import type { State } from './app-state.js';
|
|
3
4
|
export type RestoredToolCall = {
|
|
4
5
|
name: string;
|
|
@@ -9,7 +10,19 @@ export type RestoredToolCall = {
|
|
|
9
10
|
outputTokens?: number | undefined;
|
|
10
11
|
outputLines?: number | undefined;
|
|
11
12
|
};
|
|
12
|
-
export declare function buildRestoredEntries(messages: Message[] | undefined, restoredToolCalls?: RestoredToolCall[] | undefined): State['entries'];
|
|
13
|
+
export declare function buildRestoredEntries(messages: Message[] | undefined, restoredToolCalls?: RestoredToolCall[] | undefined, restoredEvents?: SessionEvent[] | undefined): State['entries'];
|
|
14
|
+
/**
|
|
15
|
+
* Rebuild the checkpoint list from a resumed session's events.
|
|
16
|
+
*
|
|
17
|
+
* The live list is fed by the `checkpoint.written` EventBus bridge, which only
|
|
18
|
+
* fires for checkpoints written by THIS process — so without this a resumed
|
|
19
|
+
* session starts with an empty list and `/rewind` reports "no checkpoints"
|
|
20
|
+
* despite a JSONL full of them.
|
|
21
|
+
*
|
|
22
|
+
* `fileCount` is a live-only stat computed when the checkpoint is written; the
|
|
23
|
+
* JSONL does not carry it, so restored rows report 0.
|
|
24
|
+
*/
|
|
25
|
+
export declare function buildRestoredCheckpoints(restoredEvents?: SessionEvent[] | undefined): State['checkpoints'];
|
|
13
26
|
export interface CreateInitialStateOptions {
|
|
14
27
|
banner: boolean;
|
|
15
28
|
appVersion?: string | undefined;
|
|
@@ -18,7 +31,11 @@ export interface CreateInitialStateOptions {
|
|
|
18
31
|
cwd: string;
|
|
19
32
|
family?: string | undefined;
|
|
20
33
|
keyTail?: string | undefined;
|
|
34
|
+
/** Background autonomy agents to display in the banner. */
|
|
35
|
+
autonomyAgents?: ReadonlyArray<AutonomyAgentStatus> | undefined;
|
|
21
36
|
restoredEntries: State['entries'];
|
|
37
|
+
/** Checkpoints rebuilt from a resumed session's events. Empty for a fresh session. */
|
|
38
|
+
restoredCheckpoints?: State['checkpoints'] | undefined;
|
|
22
39
|
enhanceEnabled: boolean;
|
|
23
40
|
initialAgentsMonitorOpen?: boolean | undefined;
|
|
24
41
|
/** Boot-time fleet-chat verbosity (from persisted config). Default 'compact'. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"app-initial-state.d.ts","sourceRoot":"","sources":["../src/app-initial-state.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,OAAO,EAAmB,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"app-initial-state.d.ts","sourceRoot":"","sources":["../src/app-initial-state.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AACzE,OAAO,KAAK,EAAE,kBAAkB,EAAE,OAAO,EAAE,YAAY,EAAmB,MAAM,kBAAkB,CAAC;AAKnG,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAE5C,MAAM,MAAM,gBAAgB,GAAG;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;IACX,UAAU,EAAE,MAAM,CAAC;IACnB,EAAE,EAAE,OAAO,CAAC;IACZ,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACjC,YAAY,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAClC,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAClC,CAAC;AAEF,wBAAgB,oBAAoB,CAClC,QAAQ,EAAE,OAAO,EAAE,GAAG,SAAS,EAC/B,iBAAiB,CAAC,EAAE,gBAAgB,EAAE,GAAG,SAAS,EAClD,cAAc,CAAC,EAAE,YAAY,EAAE,GAAG,SAAS,GAC1C,KAAK,CAAC,SAAS,CAAC,CAelB;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,wBAAwB,CACtC,cAAc,CAAC,EAAE,YAAY,EAAE,GAAG,SAAS,GAC1C,KAAK,CAAC,aAAa,CAAC,CAatB;AAED,MAAM,WAAW,yBAAyB;IACxC,MAAM,EAAE,OAAO,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAChC,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC9B,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC5B,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC7B,2DAA2D;IAC3D,cAAc,CAAC,EAAE,aAAa,CAAC,mBAAmB,CAAC,GAAG,SAAS,CAAC;IAChE,eAAe,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC;IAClC,sFAAsF;IACtF,mBAAmB,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC,GAAG,SAAS,CAAC;IACvD,cAAc,EAAE,OAAO,CAAC;IACxB,wBAAwB,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAC/C,iFAAiF;IACjF,gBAAgB,CAAC,EAAE,kBAAkB,GAAG,SAAS,CAAC;CACnD;AAED,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,yBAAyB,GAAG,KAAK,CA8N5E"}
|
|
@@ -0,0 +1,618 @@
|
|
|
1
|
+
import type { Agent, AttachmentStore, AutonomyStage, CoordinatorEvent, Director, EventBus, FleetChatVerbosity, Message, QueueStore, SlashCommandRegistry, TokenCounter, TokenSavingTier } from '@wrongstack/core';
|
|
2
|
+
import type { VisionAdapters } from '@wrongstack/runtime/vision';
|
|
3
|
+
import type { SddLifecycleResult, SddRunControl } from '@wrongstack/sdd';
|
|
4
|
+
import type React from 'react';
|
|
5
|
+
import type { ResumeSessionEntry, Settings } from './app-reducer.js';
|
|
6
|
+
import type { AgentTranscriptReader } from './components/agents-monitor.js';
|
|
7
|
+
import type { AuthPanelHost } from './components/auth-panel-model.js';
|
|
8
|
+
import type { BrainRiskLevel } from './components/brain-panel.js';
|
|
9
|
+
import type { HistoryEntry } from './components/history.js';
|
|
10
|
+
import type { McpPickerItem } from './components/mcp-picker.js';
|
|
11
|
+
import type { ProviderOption } from './components/model-picker.js';
|
|
12
|
+
import type { PluginPickerItem } from './components/plugin-picker.js';
|
|
13
|
+
import type { StatuslineItem } from './components/statusline-picker.js';
|
|
14
|
+
import type { ToolPickerItem } from './components/tools-picker.js';
|
|
15
|
+
import type { SessionInterruptController } from './hooks/use-session-interrupt-controller.js';
|
|
16
|
+
/**
|
|
17
|
+
* Props for the TUI `<App>` shell.
|
|
18
|
+
*
|
|
19
|
+
* Extracted from app.tsx (which is line-capped by the hotspot guardrail) —
|
|
20
|
+
* this is the host↔TUI contract, not app logic, so it reads better on its
|
|
21
|
+
* own. `app.tsx` re-exports `AppProps` for consumers importing it from
|
|
22
|
+
* '@wrongstack/tui' / '../src/app.js'.
|
|
23
|
+
*/
|
|
24
|
+
export interface AppProps {
|
|
25
|
+
agent: Agent;
|
|
26
|
+
slashRegistry: SlashCommandRegistry;
|
|
27
|
+
/** Host-owned mutable bridge for slash commands that need masked input. */
|
|
28
|
+
secretInputController?: {
|
|
29
|
+
readSecret(prompt: string): Promise<string>;
|
|
30
|
+
} | undefined;
|
|
31
|
+
attachments: AttachmentStore;
|
|
32
|
+
events: EventBus;
|
|
33
|
+
tokenCounter?: TokenCounter | undefined;
|
|
34
|
+
visionAdapters?: VisionAdapters | undefined;
|
|
35
|
+
/** Resolve current model vision support. Falls back to provider capability when omitted. */
|
|
36
|
+
supportsVision?: (() => boolean | Promise<boolean>) | undefined;
|
|
37
|
+
model: string;
|
|
38
|
+
banner?: boolean | undefined;
|
|
39
|
+
/** Persists the queue across crashes; rehydrated on mount, written on every mutation. */
|
|
40
|
+
queueStore?: QueueStore | undefined;
|
|
41
|
+
/**
|
|
42
|
+
* Mirrors the queue's display texts (head first) to the host on every
|
|
43
|
+
* queue change, so a running agent can be told what's waiting (queue
|
|
44
|
+
* awareness — see core's queued-messages.ts). Display state is unaffected.
|
|
45
|
+
*/
|
|
46
|
+
onQueueChange?: ((items: string[]) => void) | undefined;
|
|
47
|
+
/** Reflects the policy's --yolo flag for the status bar's "⚠ YOLO" chip. */
|
|
48
|
+
yolo?: boolean | undefined;
|
|
49
|
+
/** Play terminal bell when an agent run completes. */
|
|
50
|
+
chime?: boolean | undefined;
|
|
51
|
+
/** When true, the first Ctrl+C aborts work and shows "confirm exit" rather than "exit". */
|
|
52
|
+
confirmExit?: boolean | undefined;
|
|
53
|
+
/** Live on/off control for the animated terminal title. Lets `/settings`
|
|
54
|
+
* toggle the title animation within the running session. */
|
|
55
|
+
titleController?: {
|
|
56
|
+
setEnabled: (on: boolean) => void;
|
|
57
|
+
} | undefined;
|
|
58
|
+
/**
|
|
59
|
+
* Token-saving mode tier. Rendered as a `💾 <tier>` chip on the status bar
|
|
60
|
+
* line 2 (hidden when tier is `'off'`) so the user knows which system-prompt
|
|
61
|
+
* compactness level is active. The tool count chip next to it always
|
|
62
|
+
* reflects the tier's registered (non-omitted) tool count.
|
|
63
|
+
*/
|
|
64
|
+
tokenSavingMode?: TokenSavingTier | undefined;
|
|
65
|
+
/** Number of registered tools, displayed on the status bar line 2. */
|
|
66
|
+
toolCount?: number | undefined;
|
|
67
|
+
/**
|
|
68
|
+
* Global mouse tracking. When true, SGR mouse reporting stays on for the
|
|
69
|
+
* whole session. When false (default), the App still enables it *only* while
|
|
70
|
+
* a selectable overlay (model/autonomy/settings/slash/@ picker) is open, so
|
|
71
|
+
* the wheel scrolls the picker selection without sacrificing native
|
|
72
|
+
* scrollback in the chat. See mouse.ts for the trade-off.
|
|
73
|
+
*/
|
|
74
|
+
mouse?: boolean | undefined;
|
|
75
|
+
/**
|
|
76
|
+
* Startup terminal capability profile — color depth, mouse protocol level,
|
|
77
|
+
* and title-set support. Probe results are stable throughout the session
|
|
78
|
+
* (locked in at boot). Drives feature-gates so the TUI degrades gracefully
|
|
79
|
+
* on legacy, non-TTY, or restricted-terminal environments.
|
|
80
|
+
*/
|
|
81
|
+
capability?: import('@wrongstack/core').TerminalCapability | undefined;
|
|
82
|
+
/**
|
|
83
|
+
* When true, free-text prompts are run through the prompt refiner
|
|
84
|
+
* ("did you mean this?") before reaching the main agent. Default on;
|
|
85
|
+
* toggled live via the `/enhance` slash command + `enhanceController`.
|
|
86
|
+
*/
|
|
87
|
+
enhanceEnabled?: boolean | undefined;
|
|
88
|
+
/**
|
|
89
|
+
* Shared controller for the `/enhance on|off` toggle. The TUI rebinds
|
|
90
|
+
* `setEnabled` on mount to a dispatch-backed setter so the slash command
|
|
91
|
+
* (handled in the CLI) flips the reducer flag. Mirrors `fleetStreamController`.
|
|
92
|
+
*/
|
|
93
|
+
enhanceController?: {
|
|
94
|
+
enabled: boolean;
|
|
95
|
+
setEnabled: (enabled: boolean) => void;
|
|
96
|
+
} | undefined;
|
|
97
|
+
/**
|
|
98
|
+
* When true (default), submitting a plain message while the agent is busy
|
|
99
|
+
* pops the send-mode picker (queue / by-the-way / steer) instead of silently
|
|
100
|
+
* queueing. Toggled live via `/queue picker on|off`; persisted to
|
|
101
|
+
* `autonomy.midRunSendPicker`.
|
|
102
|
+
*/
|
|
103
|
+
midRunSendPicker?: boolean | undefined;
|
|
104
|
+
/** Auto-send countdown (ms) for the refinement preview panel. Default 4000. */
|
|
105
|
+
enhanceDelayMs?: number | undefined;
|
|
106
|
+
/**
|
|
107
|
+
* Returns a capability-gated low-effort reasoning hint for the prompt
|
|
108
|
+
* refiner (or undefined when nothing can be safely reduced). Forwarded to
|
|
109
|
+
* `enhanceUserPrompt` so a slow reasoning model does not burn thinking
|
|
110
|
+
* tokens on this shallow rewrite. Absent → the refiner sends no reasoning
|
|
111
|
+
* field, exactly as before.
|
|
112
|
+
*/
|
|
113
|
+
getEnhancerReasoning?: (() => import('@wrongstack/core').ReasoningRequest | undefined) | undefined;
|
|
114
|
+
/**
|
|
115
|
+
* Build a Provider for a (providerId, modelId) pair WITHOUT switching the
|
|
116
|
+
* session — used to retry a failed refinement on the fallback/another model
|
|
117
|
+
* ephemerally. Returns undefined when the host can't build the provider
|
|
118
|
+
* (missing key, unknown id), in which case that recovery option is skipped.
|
|
119
|
+
*/
|
|
120
|
+
buildEnhancerProvider?: ((providerId: string, modelId: string) => Promise<import('@wrongstack/core').Provider | undefined>) | undefined;
|
|
121
|
+
/**
|
|
122
|
+
* Resolve the one-key "retry with another model" fallback ref
|
|
123
|
+
* (`provider/model`) offered on a refine failure, or undefined when none is
|
|
124
|
+
* configured/derivable. Recomputed per call so `/fallback` and `/model`
|
|
125
|
+
* changes are reflected.
|
|
126
|
+
*/
|
|
127
|
+
getEnhanceFallbackRef?: (() => string | undefined) | undefined;
|
|
128
|
+
/**
|
|
129
|
+
* Query the live YOLO state from the permission policy. Called after
|
|
130
|
+
* every slash-command dispatch so `/yolo off` (which mutates the
|
|
131
|
+
* policy inside the CLI) is immediately reflected in the status bar.
|
|
132
|
+
* Mirrors the `agent.ctx.model` → `setLiveModel` pattern used for
|
|
133
|
+
* provider/model sync.
|
|
134
|
+
*/
|
|
135
|
+
getYolo?: (() => boolean) | undefined;
|
|
136
|
+
/** Set the live YOLO state from TUI-owned controls such as ConfirmPrompt. */
|
|
137
|
+
onYolo?: ((enabled: boolean) => boolean) | undefined;
|
|
138
|
+
/** Query the live autonomy mode. */
|
|
139
|
+
getAutonomy?: (() => 'off' | 'suggest' | 'auto' | 'eternal' | 'eternal-parallel') | undefined;
|
|
140
|
+
/** Query the live agent mode label for the status bar (e.g. "teach"). */
|
|
141
|
+
getModeLabel?: (() => string) | undefined;
|
|
142
|
+
/**
|
|
143
|
+
* Get all available agent modes (teach/brief/code-reviewer/etc.) with
|
|
144
|
+
* their names, descriptions, and the currently active one. Used by the
|
|
145
|
+
* `/mode` picker to populate the interactive selection list.
|
|
146
|
+
*/
|
|
147
|
+
getModes?: (() => Promise<{
|
|
148
|
+
modes: import('@wrongstack/core').Mode[];
|
|
149
|
+
activeId: string | null;
|
|
150
|
+
}>) | undefined;
|
|
151
|
+
/** Switch to a different agent mode by id (e.g. "teach", "brief"). */
|
|
152
|
+
switchMode?: ((modeId: string) => Promise<string | null>) | undefined;
|
|
153
|
+
/**
|
|
154
|
+
* Access the eternal-autonomy engine. When autonomy mode goes to
|
|
155
|
+
* 'eternal' the TUI drives `runOneIteration()` from a post-slash hook
|
|
156
|
+
* so the engine and TUI never race for the shared Context.
|
|
157
|
+
*/
|
|
158
|
+
getEternalEngine?: (() => import('@wrongstack/core').EternalAutonomyEngine | null) | undefined;
|
|
159
|
+
/**
|
|
160
|
+
* Access the parallel-eternal engine. When autonomy mode goes to
|
|
161
|
+
* 'eternal-parallel' the TUI drives `runOneIteration()` from a post-slash
|
|
162
|
+
* hook so the engine and TUI never race for the shared Context.
|
|
163
|
+
*/
|
|
164
|
+
getParallelEngine?: (() => import('@wrongstack/core').ParallelEternalEngine | null) | undefined;
|
|
165
|
+
/**
|
|
166
|
+
* Access the active SDD parallel run's control surface (or null). The SIGINT
|
|
167
|
+
* handler uses it to stop a running `/sdd parallel` on the first Ctrl+C — the
|
|
168
|
+
* run has its own coordinator, so it is otherwise unreachable from there.
|
|
169
|
+
*/
|
|
170
|
+
getSddRun?: (() => SddRunControl | null) | undefined;
|
|
171
|
+
/**
|
|
172
|
+
* Apply a post-run SDD lifecycle op (clean / rollback / destroy) from the host.
|
|
173
|
+
* Drives board overlay keys c / z / x so they work after the run finished.
|
|
174
|
+
*/
|
|
175
|
+
onSddLifecycle?: ((op: 'cleanup_worktrees' | 'rollback' | 'destroy', opts?: {
|
|
176
|
+
revertMerged?: boolean;
|
|
177
|
+
}) => Promise<SddLifecycleResult>) | undefined;
|
|
178
|
+
/**
|
|
179
|
+
* Subscribe to live per-iteration events from the eternal engine. The
|
|
180
|
+
* TUI installs this on mount to render each iteration as a timeline
|
|
181
|
+
* entry the moment it lands — strictly more responsive than reading
|
|
182
|
+
* goal.json after the fact.
|
|
183
|
+
*/
|
|
184
|
+
subscribeEternalIteration?: ((fn: (entry: import('@wrongstack/core').JournalEntry) => void) => () => void) | undefined;
|
|
185
|
+
/**
|
|
186
|
+
* Subscribe to per-iteration stage transitions from the autonomy engines.
|
|
187
|
+
* Drives `state.eternalStage` used by the status bar to show the
|
|
188
|
+
* engine's current location.
|
|
189
|
+
*/
|
|
190
|
+
subscribeEternalStage?: ((fn: (stage: AutonomyStage) => void) => () => void) | undefined;
|
|
191
|
+
/**
|
|
192
|
+
* Subscribe to Goal phase/task events from the PhaseOrchestrator.
|
|
193
|
+
* Drives `state.goalRun` used by the PhaseMonitor component.
|
|
194
|
+
* Handlers receive the event name and payload from PhaseEventMap.
|
|
195
|
+
*/
|
|
196
|
+
subscribeGoal?: ((handler: (event: string, payload: unknown) => void) => () => void) | undefined;
|
|
197
|
+
/**
|
|
198
|
+
* Read the persisted autonomy settings (defaultMode, autoProceedDelayMs).
|
|
199
|
+
* Used by the SettingsPicker in the TUI on mount and after Ctrl+S toggle.
|
|
200
|
+
*/
|
|
201
|
+
/** Settings shape — shared between getSettings and saveSettings. */
|
|
202
|
+
getSettings?: (() => Settings) | undefined;
|
|
203
|
+
/**
|
|
204
|
+
* Persist settings changes. Returns null on success, or an
|
|
205
|
+
* error string on failure (so the TUI can display it as a hint).
|
|
206
|
+
*/
|
|
207
|
+
saveSettings?: ((s: Settings) => string | null | Promise<string | null>) | undefined;
|
|
208
|
+
/** Load toggleable plugin rows for the interactive plugin picker. */
|
|
209
|
+
getPluginItems?: (() => PluginPickerItem[]) | undefined;
|
|
210
|
+
/** Toggle one plugin from the interactive picker and return the refreshed rows. */
|
|
211
|
+
onPluginToggle?: ((name: string) => Promise<{
|
|
212
|
+
items: PluginPickerItem[];
|
|
213
|
+
message?: string | undefined;
|
|
214
|
+
error?: string | undefined;
|
|
215
|
+
}>) | undefined;
|
|
216
|
+
/** Load MCP server rows for the interactive MCP picker. */
|
|
217
|
+
getMcpServers?: (() => McpPickerItem[]) | undefined;
|
|
218
|
+
/** Toggle one MCP server (enable/disable) from the interactive picker. */
|
|
219
|
+
onMcpToggle?: ((name: string) => Promise<{
|
|
220
|
+
items: McpPickerItem[];
|
|
221
|
+
message?: string | undefined;
|
|
222
|
+
error?: string | undefined;
|
|
223
|
+
}>) | undefined;
|
|
224
|
+
/** Restart one MCP server from the interactive picker. */
|
|
225
|
+
onMcpRestart?: ((name: string) => Promise<{
|
|
226
|
+
items: McpPickerItem[];
|
|
227
|
+
message?: string | undefined;
|
|
228
|
+
error?: string | undefined;
|
|
229
|
+
}>) | undefined;
|
|
230
|
+
/** Load tool rows for the interactive tool picker. */
|
|
231
|
+
getToolsItems?: (() => ToolPickerItem[]) | undefined;
|
|
232
|
+
/** Toggle one tool (enable/disable) from the interactive tool picker. */
|
|
233
|
+
onToolToggle?: ((name: string) => Promise<{
|
|
234
|
+
items: ToolPickerItem[];
|
|
235
|
+
message?: string | undefined;
|
|
236
|
+
error?: string | undefined;
|
|
237
|
+
}>) | undefined;
|
|
238
|
+
/** Get current brain risk level and decision log. */
|
|
239
|
+
getBrainData?: (() => {
|
|
240
|
+
riskLevel: BrainRiskLevel;
|
|
241
|
+
log: Array<{
|
|
242
|
+
kind: string;
|
|
243
|
+
question: string;
|
|
244
|
+
outcome: string;
|
|
245
|
+
age: string;
|
|
246
|
+
}>;
|
|
247
|
+
}) | undefined;
|
|
248
|
+
/** Set brain risk ceiling. */
|
|
249
|
+
onBrainRiskLevel?: ((level: BrainRiskLevel) => string | undefined) | undefined;
|
|
250
|
+
/** Full Brain settings editor bridge (live apply + persist). */
|
|
251
|
+
brainPanelHost?: import('./components/brain-panel-model.js').BrainPanelHost | undefined;
|
|
252
|
+
/** Get current Shadow Agent state. */
|
|
253
|
+
getShadowData?: (() => {
|
|
254
|
+
activeId: string | null;
|
|
255
|
+
running: boolean;
|
|
256
|
+
model: string;
|
|
257
|
+
intervalMs: number;
|
|
258
|
+
}) | undefined;
|
|
259
|
+
/** Start Shadow Agent. Returns message or error. */
|
|
260
|
+
onShadowStart?: (() => Promise<string | undefined>) | undefined;
|
|
261
|
+
/** Stop Shadow Agent. Returns message or error. */
|
|
262
|
+
onShadowStop?: (() => Promise<string | undefined>) | undefined;
|
|
263
|
+
/**
|
|
264
|
+
* Host for the interactive `/auth` panel (provider/key management, OAuth
|
|
265
|
+
* sign-in, local-server add). Provided by the CLI; when absent, `/auth`
|
|
266
|
+
* falls back to its plain-text output.
|
|
267
|
+
*/
|
|
268
|
+
authHost?: AuthPanelHost | undefined;
|
|
269
|
+
/**
|
|
270
|
+
* Predict likely next steps after a completed turn (/next). The CLI owns the
|
|
271
|
+
* gating (toggle + autonomy off) and returns [] when disabled, so the App can
|
|
272
|
+
* call it unconditionally on a done turn. Display-only — never executed.
|
|
273
|
+
*/
|
|
274
|
+
predictNext?: ((input: {
|
|
275
|
+
userRequest: string;
|
|
276
|
+
assistantSummary: string;
|
|
277
|
+
}) => Promise<string[]>) | undefined;
|
|
278
|
+
/**
|
|
279
|
+
* Called after each agent turn with the assistant's final output text.
|
|
280
|
+
* The host parses "<nextsteps>" or "💡 Next steps" suggestions from the text and stores
|
|
281
|
+
* them in the shared suggestion store so `/next 1`, `/next 1 2 3` work.
|
|
282
|
+
*/
|
|
283
|
+
onSuggestionsParsed?: ((finalText: string) => void) | undefined;
|
|
284
|
+
/**
|
|
285
|
+
* Retrieve current suggestions from the shared suggestion store.
|
|
286
|
+
* Used by the TUI for next-steps auto-submit countdown in 'auto' mode.
|
|
287
|
+
*/
|
|
288
|
+
getSuggestions?: (() => string[]) | undefined;
|
|
289
|
+
/**
|
|
290
|
+
* Retrieve current auto suggestions (items with auto="true" attribute).
|
|
291
|
+
* Used by YOLO+auto mode for automatic next-step submission.
|
|
292
|
+
*/
|
|
293
|
+
getAutoSuggestions?: (() => string[]) | undefined;
|
|
294
|
+
/**
|
|
295
|
+
* Autonomy next prompt template for YOLO+auto mode. Contains {{suggestion}} placeholder.
|
|
296
|
+
*/
|
|
297
|
+
autonomyNextPrompt?: string | undefined;
|
|
298
|
+
/**
|
|
299
|
+
* Store suggestions in the shared suggestion store. Used by the Entry
|
|
300
|
+
* component after parsing "<nextsteps>" or "💡 Next steps" from assistant output so the
|
|
301
|
+
* /next command and auto-submit countdown can access them.
|
|
302
|
+
*/
|
|
303
|
+
setSuggestions?: ((steps: string[]) => void) | undefined;
|
|
304
|
+
/**
|
|
305
|
+
* SDD session context getter. When an SDD session is active, returns
|
|
306
|
+
* the AI prompt context to inject into user messages so the model
|
|
307
|
+
* knows it's in a spec-building conversation.
|
|
308
|
+
*/
|
|
309
|
+
getSDDContext?: (() => Promise<string | null>) | undefined;
|
|
310
|
+
/**
|
|
311
|
+
* Process AI output for SDD auto-detection (spec, tasks, plan).
|
|
312
|
+
* Called after every agent.run() completes. Returns displayable
|
|
313
|
+
* status messages (e.g. "✓ Spec detected and saved!").
|
|
314
|
+
*/
|
|
315
|
+
onSDDOutput?: ((output: string) => Promise<string[]>) | undefined;
|
|
316
|
+
/** Surfaced in the startup banner. Falls back to "dev" when omitted. */
|
|
317
|
+
appVersion?: string | undefined;
|
|
318
|
+
/** Provider id shown in the banner ("openai", "anthropic", …). Defaults to "agent". */
|
|
319
|
+
provider?: string | undefined;
|
|
320
|
+
/** Wire family for the configured provider — rendered under provider in the banner. */
|
|
321
|
+
family?: string | undefined;
|
|
322
|
+
/** Last 3 chars of the active API key, shown in the banner for "did I pick the right key?" verification. */
|
|
323
|
+
keyTail?: string | undefined;
|
|
324
|
+
/** Background autonomy agents to display in the banner (Brain, Shadow,
|
|
325
|
+
* Kanban, Mailbox, Memory, etc.). */
|
|
326
|
+
autonomyAgents?: import('./components/history/types.js').AutonomyAgentStatus[] | undefined;
|
|
327
|
+
/**
|
|
328
|
+
* Snapshot the keyed providers (and their model lists) for the
|
|
329
|
+
* `/model` picker. Called every time the picker opens, so the result
|
|
330
|
+
* stays in sync with config edits / new aliases. Async because the
|
|
331
|
+
* host may need to load the models.dev catalog.
|
|
332
|
+
*/
|
|
333
|
+
getPickableProviders?: (() => Promise<ProviderOption[]>) | undefined;
|
|
334
|
+
/**
|
|
335
|
+
* Apply a (provider, model) pair after the picker confirms. Returns
|
|
336
|
+
* an error message on failure; null on success. The host owns the
|
|
337
|
+
* actual Provider construction + Context mutation.
|
|
338
|
+
*/
|
|
339
|
+
switchProviderAndModel?: ((providerId: string, modelId: string) => string | null | Promise<string | null>) | undefined;
|
|
340
|
+
/**
|
|
341
|
+
* Apply an autonomy mode after the picker confirms. Returns
|
|
342
|
+
* an error string on failure; null on success.
|
|
343
|
+
*/
|
|
344
|
+
switchAutonomy?: ((mode: 'off' | 'suggest' | 'auto' | 'eternal' | 'eternal-parallel') => string | null) | undefined;
|
|
345
|
+
/**
|
|
346
|
+
* Real max-context token budget for the *active model*, resolved by the
|
|
347
|
+
* CLI via the ModelsRegistry. The provider object only knows its family
|
|
348
|
+
* default (e.g. anthropic = 200k) which is wrong for variants like the
|
|
349
|
+
* 1M-context Opus model. The status bar's context chip uses this when
|
|
350
|
+
* provided and falls back to the provider baseline otherwise.
|
|
351
|
+
*/
|
|
352
|
+
effectiveMaxContext?: number | undefined;
|
|
353
|
+
/** Absolute project root for goal.json loading. */
|
|
354
|
+
projectRoot?: string | undefined;
|
|
355
|
+
onExit: (code: number) => void;
|
|
356
|
+
/** Called when /clear is dispatched — the TUI should wipe its history entries (but keep the banner). */
|
|
357
|
+
onClearHistory?: ((dispatch: React.Dispatch<{
|
|
358
|
+
type: 'clearHistory';
|
|
359
|
+
model?: string | undefined;
|
|
360
|
+
} | {
|
|
361
|
+
type: 'resetContextChip';
|
|
362
|
+
} | {
|
|
363
|
+
type: 'streamReset';
|
|
364
|
+
} | {
|
|
365
|
+
type: 'toolStreamClear';
|
|
366
|
+
}>) => void) | undefined;
|
|
367
|
+
/**
|
|
368
|
+
* Called on `/clear` to physically wipe the terminal (visible screen +
|
|
369
|
+
* native scrollback) before the chat history is reset. Without this, the
|
|
370
|
+
* `clearHistory` remount only reprints the banner *below* the old chat,
|
|
371
|
+
* which stays reachable in scrollback. Owned by `run-tui` because it needs
|
|
372
|
+
* the live Ink instance to reset frame tracking and avoid a smeared status
|
|
373
|
+
* bar. No-op outside the TUI.
|
|
374
|
+
*/
|
|
375
|
+
clearTerminal?: (() => void) | undefined;
|
|
376
|
+
/**
|
|
377
|
+
* Called when the user selects a session in the /resume picker. The host
|
|
378
|
+
* loads the session JSONL, replays history entries, rebuilds the agent
|
|
379
|
+
* context, and returns the hydrated history entries + nextId for display.
|
|
380
|
+
* Returns null when resume fails (session not found, corrupt JSONL, etc.).
|
|
381
|
+
*
|
|
382
|
+
* The returned entries replace the TUI's current entries in a single
|
|
383
|
+
* `replaceHistory` dispatch, so the user sees the prior conversation
|
|
384
|
+
* exactly as it appeared during live interaction.
|
|
385
|
+
*/
|
|
386
|
+
onResumeSession?: ((sessionId: string) => Promise<{
|
|
387
|
+
entries: HistoryEntry[];
|
|
388
|
+
nextId: number;
|
|
389
|
+
sessionId: string;
|
|
390
|
+
} | null>) | undefined;
|
|
391
|
+
/**
|
|
392
|
+
* List recent session summaries for the /resume picker. The host reads
|
|
393
|
+
* from the session store and returns ResumeSessionEntry-shaped data.
|
|
394
|
+
* Used both by the /resume slash command (to populate the picker) and
|
|
395
|
+
* optionally by the startup rehydration path.
|
|
396
|
+
*/
|
|
397
|
+
listSessions?: ((limit?: number) => Promise<ResumeSessionEntry[]>) | undefined;
|
|
398
|
+
/**
|
|
399
|
+
* Goal text passed from `--goal "..."` on the command line. When set,
|
|
400
|
+
* the App mounts, renders the banner, then automatically dispatches
|
|
401
|
+
* a synthetic `/goal <text>` so the user lands in goal mode without
|
|
402
|
+
* having to type the slash command. Mutually advisory with `initialSteer`
|
|
403
|
+
* — `initialGoal` wins if both are present.
|
|
404
|
+
*/
|
|
405
|
+
initialGoal?: string | undefined;
|
|
406
|
+
/**
|
|
407
|
+
* Initial user message passed from `--ask "..."` on the command line.
|
|
408
|
+
* Submitted verbatim as the first turn (no preamble) so users can
|
|
409
|
+
* launch the TUI and pre-populate one turn from a shell alias / script.
|
|
410
|
+
*/
|
|
411
|
+
initialAsk?: string | undefined;
|
|
412
|
+
/** Directory for session JSONL files. Passed to App for /rewind. */
|
|
413
|
+
sessionsDir?: string | undefined;
|
|
414
|
+
/**
|
|
415
|
+
* Load project picker items from the global manifest.
|
|
416
|
+
* Called each time the project picker panel opens (F1).
|
|
417
|
+
*/
|
|
418
|
+
getProjectPickerItems?: (() => Promise<import('./components/project-picker.js').ProjectPickerItem[]>) | undefined;
|
|
419
|
+
/**
|
|
420
|
+
* Called when the user selects a project or action in the project picker.
|
|
421
|
+
* The host CLI handles project switching (stopping agents, spawning new session).
|
|
422
|
+
*/
|
|
423
|
+
onProjectSelect?: ((key: string, kind: 'project' | 'action') => void) | undefined;
|
|
424
|
+
/**
|
|
425
|
+
* Request the TUI to exit with a specific code. When a project is selected in
|
|
426
|
+
* the F1 picker, this is called to trigger a clean exit before the host CLI
|
|
427
|
+
* spawns a new wstack process in the target project directory.
|
|
428
|
+
*/
|
|
429
|
+
requestExit?: ((code: number) => void) | undefined;
|
|
430
|
+
/**
|
|
431
|
+
* Load live session data from the cross-process SessionRegistry.
|
|
432
|
+
* Called when the sessions panel opens (F10).
|
|
433
|
+
*/
|
|
434
|
+
getLiveSessions?: (() => Promise<import('./components/sessions-panel.js').LiveSessionEntry[]>) | undefined;
|
|
435
|
+
/**
|
|
436
|
+
* Called when the user selects a session from a DIFFERENT project
|
|
437
|
+
* in the F10 sessions panel. Spawns a new wstack terminal in the
|
|
438
|
+
* target project directory. Same-project sessions use onResumeSession.
|
|
439
|
+
*/
|
|
440
|
+
onSwitchToSession?: ((sessionId: string, projectRoot: string, projectName: string) => void) | undefined;
|
|
441
|
+
/** Live director for fleet panel rendering. Null when director mode is off. */
|
|
442
|
+
director: Director | null;
|
|
443
|
+
/**
|
|
444
|
+
* Read the CURRENT director. Unlike the static `director` prop (captured at
|
|
445
|
+
* boot, null in non---director sessions), this sees a director the fleet
|
|
446
|
+
* host built lazily on the first delegate/spawn. Fleet teardown paths
|
|
447
|
+
* (Ctrl+C, Esc, /steer) resolve through this.
|
|
448
|
+
*/
|
|
449
|
+
getDirector?: (() => Director | null) | undefined;
|
|
450
|
+
/** Optional roster for human-readable subagent names. */
|
|
451
|
+
fleetRoster?: Record<string, {
|
|
452
|
+
name: string;
|
|
453
|
+
}> | undefined;
|
|
454
|
+
/**
|
|
455
|
+
* Shared controller for the `/fleet stream on|off` and `/agents chat`
|
|
456
|
+
* slash commands. The App installs dispatch-backed setters on mount so
|
|
457
|
+
* the commands can flip the reducer's `fleetChat` mode from the CLI
|
|
458
|
+
* surface. Also seeds the boot value of `state.fleetChat` (cli-main
|
|
459
|
+
* creates it from the persisted config).
|
|
460
|
+
*/
|
|
461
|
+
fleetStreamController?: {
|
|
462
|
+
enabled: boolean;
|
|
463
|
+
setEnabled: (enabled: boolean) => void;
|
|
464
|
+
mode: FleetChatVerbosity;
|
|
465
|
+
setMode: (mode: FleetChatVerbosity) => void;
|
|
466
|
+
} | undefined;
|
|
467
|
+
/**
|
|
468
|
+
* Read-only per-subagent transcript access for the F3 agents monitor.
|
|
469
|
+
* The CLI passes AgentMonitorService (structurally compatible); absent
|
|
470
|
+
* in embedded/test surfaces, where the detail card falls back to the
|
|
471
|
+
* streaming-tail snippet.
|
|
472
|
+
*/
|
|
473
|
+
agentTranscripts?: AgentTranscriptReader | undefined;
|
|
474
|
+
/**
|
|
475
|
+
* Shared controller for the `/interrupt` slash command. The App installs the
|
|
476
|
+
* real `abortLeader` on mount so the command can abort the in-flight leader
|
|
477
|
+
* run (slash commands don't get the RunController). The fleet teardown is the
|
|
478
|
+
* command's own `onFleetKill`.
|
|
479
|
+
*/
|
|
480
|
+
interruptController?: SessionInterruptController | undefined;
|
|
481
|
+
/**
|
|
482
|
+
* Controller for status bar hidden items. App installs a dispatch-backed
|
|
483
|
+
* setter on mount so the /statusline slash command can update the TUI's
|
|
484
|
+
* visible bar without a round-trip. The initial value is loaded from
|
|
485
|
+
* the config file before App mounts.
|
|
486
|
+
*/
|
|
487
|
+
statuslineHiddenItems: StatuslineItem[];
|
|
488
|
+
setStatuslineHiddenItems: (items: StatuslineItem[]) => void;
|
|
489
|
+
/**
|
|
490
|
+
* Atomically persists statusline hidden items to disk. Used by the
|
|
491
|
+
* statusline picker so each toggle is immediately durable.
|
|
492
|
+
*/
|
|
493
|
+
saveStatuslineHiddenItems: (items: StatuslineItem[]) => Promise<void>;
|
|
494
|
+
/**
|
|
495
|
+
* Controller for the agents monitor overlay. App installs a dispatch-backed
|
|
496
|
+
* setter on mount so the `/agents on|off` slash command can toggle the
|
|
497
|
+
* overlay without a round-trip.
|
|
498
|
+
*/
|
|
499
|
+
agentsMonitorController?: {
|
|
500
|
+
visible: boolean;
|
|
501
|
+
setVisible: (visible: boolean) => void;
|
|
502
|
+
} | undefined;
|
|
503
|
+
/**
|
|
504
|
+
* Mutable ref for opening TUI panels from slash commands. The slash commands
|
|
505
|
+
* call `onPanelOpen.current(action)` to open panels. The App sets
|
|
506
|
+
* `onPanelOpen.current` to its actual dispatch function on mount.
|
|
507
|
+
*/
|
|
508
|
+
onPanelOpen?: {
|
|
509
|
+
current: ((action: string) => boolean) | null;
|
|
510
|
+
} | undefined;
|
|
511
|
+
/** Active agent mode label shown in the status bar (e.g. "teach", "brief"). */
|
|
512
|
+
modeLabel?: string | undefined;
|
|
513
|
+
/**
|
|
514
|
+
* Called ONCE on mount by the App to install its debug-stream telemetry
|
|
515
|
+
* callback. The callback receives throttled DebugStreamStats every ~200 ms
|
|
516
|
+
* while the stream debug feature is active. The App dispatches to its
|
|
517
|
+
* reducer; the StatusBar renders the stats on line 3. When omitted (headless
|
|
518
|
+
* CLI/no TTY), debug stats go to stderr via the default callback.
|
|
519
|
+
*/
|
|
520
|
+
registerDebugStreamCallback?: ((cb: (stats: {
|
|
521
|
+
chunkCount: number;
|
|
522
|
+
lastChunkSize: number;
|
|
523
|
+
lastDeltaMs: number;
|
|
524
|
+
totalBytes: number;
|
|
525
|
+
lastChunkAt: string;
|
|
526
|
+
}) => void) => void) | undefined;
|
|
527
|
+
/**
|
|
528
|
+
* Called on App unmount (via useEffect cleanup). Restores the debug-stream
|
|
529
|
+
* callback to the default stderr writer so non-TUI invocations continue to
|
|
530
|
+
* print debug lines.
|
|
531
|
+
*/
|
|
532
|
+
restoreDebugStreamCallback?: (() => void) | undefined;
|
|
533
|
+
/**
|
|
534
|
+
* Messages restored from a previous session. When provided (non-empty),
|
|
535
|
+
* the TUI renders the prior conversation as history entries so a resumed
|
|
536
|
+
* session shows its full chat context, not just the LLM's internal state.
|
|
537
|
+
*/
|
|
538
|
+
restoredMessages?: Message[] | undefined;
|
|
539
|
+
/**
|
|
540
|
+
* Tool execution records from a previous session, keyed by tool_use id.
|
|
541
|
+
* Used to render tool entries (name, duration, ok/error) in the TUI on
|
|
542
|
+
* resume. Events are `tool_call_end` records from the session JSONL.
|
|
543
|
+
*/
|
|
544
|
+
restoredToolCalls?: Array<{
|
|
545
|
+
name: string;
|
|
546
|
+
id: string;
|
|
547
|
+
durationMs: number;
|
|
548
|
+
ok: boolean;
|
|
549
|
+
outputBytes?: number | undefined;
|
|
550
|
+
outputTokens?: number | undefined;
|
|
551
|
+
outputLines?: number | undefined;
|
|
552
|
+
}> | undefined;
|
|
553
|
+
/**
|
|
554
|
+
* Raw prior-session JSONL events. When provided, the resumed history is
|
|
555
|
+
* rebuilt with the canonical renderer (tool I/O + interleaved audit markers)
|
|
556
|
+
* instead of meta-only tool chips. Omitted → legacy fallback.
|
|
557
|
+
*/
|
|
558
|
+
restoredEvents?: import('@wrongstack/core').SessionEvent[] | undefined;
|
|
559
|
+
/**
|
|
560
|
+
* When true, the agents monitor (F3) is open by default at TUI startup.
|
|
561
|
+
* Used by the `wrongstack quick` command to show agents panel immediately.
|
|
562
|
+
*/
|
|
563
|
+
initialAgentsMonitorOpen?: boolean | undefined;
|
|
564
|
+
/**
|
|
565
|
+
* Subscribe to live events from the AutonomousCoordinator. Returns an unsubscribe
|
|
566
|
+
* function. TUI uses this to drive the coordinator panel live view.
|
|
567
|
+
*/
|
|
568
|
+
subscribeCoordinatorEvents?: ((fn: (event: CoordinatorEvent) => void) => () => void) | undefined;
|
|
569
|
+
/** Start the AutonomousCoordinator with the given goal text. */
|
|
570
|
+
onCoordinatorStart?: ((goal: string) => void) | undefined;
|
|
571
|
+
/** Stop the AutonomousCoordinator. */
|
|
572
|
+
onCoordinatorStop?: (() => void) | undefined;
|
|
573
|
+
/** Whether the AutonomousCoordinator is currently running. */
|
|
574
|
+
coordinatorRunning?: boolean | undefined;
|
|
575
|
+
/** List available coordinator tasks the current terminal can claim. */
|
|
576
|
+
onCoordinatorTasks?: (() => Promise<Array<{
|
|
577
|
+
id: string;
|
|
578
|
+
title: string;
|
|
579
|
+
priority: string;
|
|
580
|
+
tags: string[];
|
|
581
|
+
}> | null>) | undefined;
|
|
582
|
+
/** Claim a coordinator task. Returns description on success. */
|
|
583
|
+
onCoordinatorClaim?: ((taskId: string) => Promise<string | null | {
|
|
584
|
+
description: string;
|
|
585
|
+
}>) | undefined;
|
|
586
|
+
/** Mark a claimed task as completed. */
|
|
587
|
+
onCoordinatorComplete?: ((taskId: string, result?: string) => Promise<string | null>) | undefined;
|
|
588
|
+
/** Mark a claimed task as failed. */
|
|
589
|
+
onCoordinatorFail?: ((taskId: string, error: string) => Promise<string | null>) | undefined;
|
|
590
|
+
/** Get coordinator stats for status display. */
|
|
591
|
+
onCoordinatorStatus?: (() => Promise<{
|
|
592
|
+
goals: {
|
|
593
|
+
total: number;
|
|
594
|
+
done: number;
|
|
595
|
+
pending: number;
|
|
596
|
+
failed: number;
|
|
597
|
+
};
|
|
598
|
+
dag: {
|
|
599
|
+
running: number;
|
|
600
|
+
ready: number;
|
|
601
|
+
done: number;
|
|
602
|
+
failed: number;
|
|
603
|
+
};
|
|
604
|
+
auction: {
|
|
605
|
+
pending: number;
|
|
606
|
+
inProgress: number;
|
|
607
|
+
};
|
|
608
|
+
} | null>) | undefined;
|
|
609
|
+
/**
|
|
610
|
+
* Unique client identifier (e.g. `tui@<uuid>`) used to tag `client.status`
|
|
611
|
+
* events emitted to the EventBus for the WebUI FleetHQ map HUD. When omitted,
|
|
612
|
+
* the App skips status emission.
|
|
613
|
+
*/
|
|
614
|
+
clientId?: string | undefined;
|
|
615
|
+
/** Access the persistent memory store for listing and inspecting memories. */
|
|
616
|
+
memoryStore?: import('@wrongstack/core').MemoryStore | undefined;
|
|
617
|
+
}
|
|
618
|
+
//# sourceMappingURL=app-props.d.ts.map
|