@wrongstack/tui 0.264.0 → 0.267.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/index.d.ts +35 -3
- package/dist/index.js +1178 -103
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as _wrongstack_core from '@wrongstack/core';
|
|
2
|
-
import { Agent, SlashCommandRegistry, AttachmentStore, EventBus, TokenCounter, QueueStore, AutonomyStage, Director, Message, AutonomousCoordinator, CoordinatorEvent, SessionEvent } from '@wrongstack/core';
|
|
2
|
+
import { TokenSavingTier, Agent, SlashCommandRegistry, AttachmentStore, EventBus, TokenCounter, QueueStore, AutonomyStage, Director, Message, AutonomousCoordinator, CoordinatorEvent, SessionEvent } from '@wrongstack/core';
|
|
3
3
|
export { buildGoalPreamble } from '@wrongstack/core';
|
|
4
4
|
import { VisionAdapters } from '@wrongstack/runtime/vision';
|
|
5
5
|
import React from 'react';
|
|
@@ -125,6 +125,10 @@ interface ProviderOption {
|
|
|
125
125
|
modelsLabel?: string | undefined;
|
|
126
126
|
}
|
|
127
127
|
|
|
128
|
+
/** Context window mode options — cyclable via ←/→. */
|
|
129
|
+
declare const CONTEXT_MODES: readonly ["balanced", "frugal", "deep", "archival"];
|
|
130
|
+
type ContextMode = (typeof CONTEXT_MODES)[number];
|
|
131
|
+
|
|
128
132
|
/** Thin view over a SessionSummary for the resume picker. */
|
|
129
133
|
interface ResumeSessionEntry {
|
|
130
134
|
id: string;
|
|
@@ -153,12 +157,14 @@ type Settings = {
|
|
|
153
157
|
featureMemory: boolean;
|
|
154
158
|
featureSkills: boolean;
|
|
155
159
|
featureModelsRegistry: boolean;
|
|
156
|
-
/** Token-saving
|
|
157
|
-
featureTokenSaving:
|
|
160
|
+
/** Token-saving tier: off | minimal | light | medium | aggressive. */
|
|
161
|
+
featureTokenSaving: TokenSavingTier;
|
|
158
162
|
/** Allow tools to access paths outside the project root. Default: true (open). */
|
|
159
163
|
allowOutsideProjectRoot: boolean;
|
|
160
164
|
contextAutoCompact: boolean;
|
|
161
165
|
contextStrategy: 'hybrid' | 'intelligent' | 'selective';
|
|
166
|
+
contextMode: ContextMode;
|
|
167
|
+
maxConcurrent: number;
|
|
162
168
|
logLevel: 'error' | 'warn' | 'info' | 'debug' | 'trace';
|
|
163
169
|
auditLevel: 'minimal' | 'standard' | 'full';
|
|
164
170
|
indexOnStart: boolean;
|
|
@@ -177,6 +183,10 @@ type Settings = {
|
|
|
177
183
|
configScope: 'global' | 'project';
|
|
178
184
|
/** Full mouse mode: in-app managed scroll + clickable UI (SGR tracking on). */
|
|
179
185
|
mouseMode?: boolean | undefined;
|
|
186
|
+
/** Whether the process circuit breaker gates bash/exec. Default false (off). */
|
|
187
|
+
breakerEnabled?: boolean | undefined;
|
|
188
|
+
/** Auto kill/reset delay (ms) when the breaker trips. 0 = manual recovery. */
|
|
189
|
+
breakerAutoKillResetMs?: number | undefined;
|
|
180
190
|
};
|
|
181
191
|
|
|
182
192
|
interface RunTuiOptions {
|
|
@@ -359,6 +369,12 @@ interface RunTuiOptions {
|
|
|
359
369
|
*/
|
|
360
370
|
statuslineHiddenItems: Array<'todos' | 'plan' | 'tasks' | 'fleet' | 'git' | 'elapsed' | 'context' | 'cost' | 'working_dir'>;
|
|
361
371
|
setStatuslineHiddenItems: (items: Array<'todos' | 'plan' | 'tasks' | 'fleet' | 'git' | 'elapsed' | 'context' | 'cost' | 'working_dir'>) => void;
|
|
372
|
+
/**
|
|
373
|
+
* Atomically updates in-memory state AND persists to
|
|
374
|
+
* ~/.wrongstack/statusline.json. Used by the statusline picker to
|
|
375
|
+
* make each toggle immediately durable.
|
|
376
|
+
*/
|
|
377
|
+
saveStatuslineHiddenItems: (items: Array<'todos' | 'plan' | 'tasks' | 'fleet' | 'git' | 'elapsed' | 'context' | 'cost' | 'working_dir'>) => Promise<void>;
|
|
362
378
|
/**
|
|
363
379
|
* Controller for the agents monitor overlay. App installs a dispatch-backed
|
|
364
380
|
* setter on mount so the `/agents on|off` slash command can toggle the
|
|
@@ -368,6 +384,14 @@ interface RunTuiOptions {
|
|
|
368
384
|
visible: boolean;
|
|
369
385
|
setVisible: (visible: boolean) => void;
|
|
370
386
|
} | undefined;
|
|
387
|
+
/**
|
|
388
|
+
* Mutable ref for opening TUI panels from slash commands. The slash commands
|
|
389
|
+
* call `onPanelOpen.current(action)` to open panels. The App sets
|
|
390
|
+
* `onPanelOpen.current` to its actual dispatch function on mount.
|
|
391
|
+
*/
|
|
392
|
+
onPanelOpen?: {
|
|
393
|
+
current: ((action: string) => boolean) | null;
|
|
394
|
+
} | undefined;
|
|
371
395
|
/**
|
|
372
396
|
* If set, the App boots straight into goal mode — the text is wrapped
|
|
373
397
|
* in the GOAL preamble and submitted as the first turn. Lets users
|
|
@@ -521,6 +545,14 @@ interface RunTuiOptions {
|
|
|
521
545
|
* Returns an unsubscribe function.
|
|
522
546
|
*/
|
|
523
547
|
subscribeCoordinatorEvents?: (fn: (event: CoordinatorEvent) => void) => () => void;
|
|
548
|
+
/**
|
|
549
|
+
* Start the AutonomousCoordinator loop. Fire-and-forget — run() loops
|
|
550
|
+
* asynchronously. Pass a goal string to begin decomposition and task
|
|
551
|
+
* auction immediately.
|
|
552
|
+
*/
|
|
553
|
+
onCoordinatorStart?: ((goal?: string) => void) | undefined;
|
|
554
|
+
/** Stop the AutonomousCoordinator loop. */
|
|
555
|
+
onCoordinatorStop?: (() => void) | undefined;
|
|
524
556
|
}
|
|
525
557
|
declare function runTui(opts: RunTuiOptions): Promise<number>;
|
|
526
558
|
|