@wrongstack/tui 0.281.3 → 0.282.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 CHANGED
@@ -47,6 +47,10 @@ type HistoryEntry = {
47
47
  id: number;
48
48
  kind: 'assistant';
49
49
  text: string;
50
+ } | {
51
+ id: number;
52
+ kind: 'thinking';
53
+ text: string;
50
54
  } | {
51
55
  id: number;
52
56
  kind: 'tool';
@@ -209,19 +213,6 @@ interface ProviderOption {
209
213
  modelsLabel?: string | undefined;
210
214
  }
211
215
 
212
- /** Context window mode options — cyclable via ←/→. */
213
- declare const CONTEXT_MODES: readonly ["balanced", "frugal", "deep", "archival"];
214
- type ContextMode = (typeof CONTEXT_MODES)[number];
215
- declare const STATUSLINE_MODES: readonly ["minimum", "detailed"];
216
- type StatuslineMode = (typeof STATUSLINE_MODES)[number];
217
- declare const REASONING_EFFORTS: readonly ["none", "minimal", "low", "medium", "high", "xhigh", "max"];
218
- type ReasoningEffort = (typeof REASONING_EFFORTS)[number];
219
- declare const CACHE_TTLS: readonly ["default", "5m", "1h"];
220
- type CacheTtl = (typeof CACHE_TTLS)[number];
221
-
222
- /** All possible statusline chip keys. */
223
- type StatuslineItem = 'version' | 'state' | 'model' | 'tokens' | 'cache' | 'queue' | 'processes' | 'hint' | 'index' | 'breaker' | 'todos' | 'plan' | 'tasks' | 'fleet' | 'fleet_agents' | 'git' | 'elapsed' | 'context' | 'cost' | 'working_dir' | 'project' | 'yolo' | 'autonomy' | 'eternal_stage' | 'goal' | 'mode' | 'auto_proceed' | 'sessions' | 'tools' | 'token_saving' | 'brain' | 'mailbox' | 'enhance' | 'debug_stream' | 'next_steps';
224
-
225
216
  interface PluginPickerItem {
226
217
  name: string;
227
218
  enabled: boolean;
@@ -237,6 +228,19 @@ interface PluginPickerItem {
237
228
  lockable?: boolean | undefined;
238
229
  }
239
230
 
231
+ /** Context window mode options — cyclable via ←/→. */
232
+ declare const CONTEXT_MODES: readonly ["balanced", "frugal", "deep", "archival"];
233
+ type ContextMode = (typeof CONTEXT_MODES)[number];
234
+ declare const STATUSLINE_MODES: readonly ["minimum", "detailed"];
235
+ type StatuslineMode = (typeof STATUSLINE_MODES)[number];
236
+ declare const REASONING_EFFORTS: readonly ["none", "minimal", "low", "medium", "high", "xhigh", "max"];
237
+ type ReasoningEffort = (typeof REASONING_EFFORTS)[number];
238
+ declare const CACHE_TTLS: readonly ["default", "5m", "1h"];
239
+ type CacheTtl = (typeof CACHE_TTLS)[number];
240
+
241
+ /** All possible statusline chip keys. */
242
+ type StatuslineItem = 'version' | 'state' | 'model' | 'tokens' | 'cache' | 'queue' | 'processes' | 'hint' | 'index' | 'breaker' | 'todos' | 'plan' | 'tasks' | 'fleet' | 'fleet_agents' | 'git' | 'elapsed' | 'context' | 'cost' | 'working_dir' | 'project' | 'yolo' | 'autonomy' | 'eternal_stage' | 'goal' | 'mode' | 'auto_proceed' | 'sessions' | 'tools' | 'token_saving' | 'brain' | 'mailbox' | 'enhance' | 'debug_stream' | 'next_steps';
243
+
240
244
  /** Thin view over a SessionSummary for the resume picker. */
241
245
  interface ResumeSessionEntry {
242
246
  id: string;
@@ -447,6 +451,16 @@ interface RunTuiOptions {
447
451
  toolCount?: number | undefined;
448
452
  /** Live getter for the agent mode label so the status bar updates after /mode. */
449
453
  getModeLabel?: (() => string) | undefined;
454
+ /**
455
+ * Get all available agent modes with their names, descriptions, and the
456
+ * currently active mode id. Used by the `/mode` picker in the TUI.
457
+ */
458
+ getModes?: (() => Promise<{
459
+ modes: _wrongstack_core.Mode[];
460
+ activeId: string | null;
461
+ }>) | undefined;
462
+ /** Switch to a different agent mode by id (e.g. "teach", "brief"). */
463
+ switchMode?: ((modeId: string) => Promise<string | null>) | undefined;
450
464
  /**
451
465
  * Called ONCE on mount by the App to install its debug-stream telemetry
452
466
  * callback. The CLI wires this to setDebugStreamCallback() from