@wrongstack/tui 0.281.3 → 0.282.1
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/README.md +2 -2
- package/dist/index.d.ts +39 -29
- package/dist/index.js +4312 -3266
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -23,7 +23,7 @@ const exitCode = await runTui({
|
|
|
23
23
|
slashRegistry, // SlashCommandRegistry
|
|
24
24
|
attachments: new DefaultAttachmentStore(),
|
|
25
25
|
events: new DefaultEventBus(),
|
|
26
|
-
model: '
|
|
26
|
+
model: 'anthropic-test-model',
|
|
27
27
|
banner: true,
|
|
28
28
|
yolo: false,
|
|
29
29
|
appVersion: '0.1.6',
|
|
@@ -40,7 +40,7 @@ process.exit(exitCode);
|
|
|
40
40
|
|
|
41
41
|
```
|
|
42
42
|
┌─ banner ─────────────────────────────────────────────┐
|
|
43
|
-
│ wrongstack 0.1.6 — anthropic ·
|
|
43
|
+
│ wrongstack 0.1.6 — anthropic · anthropic-test-model │
|
|
44
44
|
└──────────────────────────────────────────────────────┘
|
|
45
45
|
user> refactor auth.ts to async/await
|
|
46
46
|
⠋ thinking (3 tools used · 4.2k tokens · 1.3s)
|
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,6 +213,20 @@ interface ProviderOption {
|
|
|
209
213
|
modelsLabel?: string | undefined;
|
|
210
214
|
}
|
|
211
215
|
|
|
216
|
+
interface PluginPickerItem {
|
|
217
|
+
name: string;
|
|
218
|
+
enabled: boolean;
|
|
219
|
+
risk: 'low' | 'medium' | 'high';
|
|
220
|
+
summary: string;
|
|
221
|
+
/**
|
|
222
|
+
* When false the row is locked: the picker renders a 🔒 marker and ignores
|
|
223
|
+
* Enter/←/→ on it. The current built-in audit list is fully toggleable, but
|
|
224
|
+
* the component keeps this marker for future or externally supplied locked
|
|
225
|
+
* rows.
|
|
226
|
+
*/
|
|
227
|
+
lockable?: boolean | undefined;
|
|
228
|
+
}
|
|
229
|
+
|
|
212
230
|
/** Context window mode options — cyclable via ←/→. */
|
|
213
231
|
declare const CONTEXT_MODES: readonly ["balanced", "frugal", "deep", "archival"];
|
|
214
232
|
type ContextMode = (typeof CONTEXT_MODES)[number];
|
|
@@ -222,21 +240,6 @@ type CacheTtl = (typeof CACHE_TTLS)[number];
|
|
|
222
240
|
/** All possible statusline chip keys. */
|
|
223
241
|
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
242
|
|
|
225
|
-
interface PluginPickerItem {
|
|
226
|
-
name: string;
|
|
227
|
-
enabled: boolean;
|
|
228
|
-
risk: 'low' | 'medium' | 'high';
|
|
229
|
-
summary: string;
|
|
230
|
-
/**
|
|
231
|
-
* When false the row is locked: the picker renders a 🔒 marker and ignores
|
|
232
|
-
* Enter/←/→ on it. Core plugins (security, prompts, skills, sync, git, …)
|
|
233
|
-
* and the critical guard plugins (secret-scanner, branch-guard) set this
|
|
234
|
-
* to false so they stay visible in the menu but cannot be toggled off —
|
|
235
|
-
* matching the rationale in `PLUGIN_AUDIT_ENTRIES`.
|
|
236
|
-
*/
|
|
237
|
-
lockable?: boolean | undefined;
|
|
238
|
-
}
|
|
239
|
-
|
|
240
243
|
/** Thin view over a SessionSummary for the resume picker. */
|
|
241
244
|
interface ResumeSessionEntry {
|
|
242
245
|
id: string;
|
|
@@ -447,6 +450,16 @@ interface RunTuiOptions {
|
|
|
447
450
|
toolCount?: number | undefined;
|
|
448
451
|
/** Live getter for the agent mode label so the status bar updates after /mode. */
|
|
449
452
|
getModeLabel?: (() => string) | undefined;
|
|
453
|
+
/**
|
|
454
|
+
* Get all available agent modes with their names, descriptions, and the
|
|
455
|
+
* currently active mode id. Used by the `/mode` picker in the TUI.
|
|
456
|
+
*/
|
|
457
|
+
getModes?: (() => Promise<{
|
|
458
|
+
modes: _wrongstack_core.Mode[];
|
|
459
|
+
activeId: string | null;
|
|
460
|
+
}>) | undefined;
|
|
461
|
+
/** Switch to a different agent mode by id (e.g. "teach", "brief"). */
|
|
462
|
+
switchMode?: ((modeId: string) => Promise<string | null>) | undefined;
|
|
450
463
|
/**
|
|
451
464
|
* Called ONCE on mount by the App to install its debug-stream telemetry
|
|
452
465
|
* callback. The CLI wires this to setDebugStreamCallback() from
|
|
@@ -828,22 +841,20 @@ declare function replaySessionEvents(events: SessionEvent[], startId: number): H
|
|
|
828
841
|
* Unified next-steps suggestion parser.
|
|
829
842
|
*
|
|
830
843
|
* Three code paths feed into the suggestion store:
|
|
831
|
-
* 1. TUI rendering — entry.tsx parses
|
|
832
|
-
* 2. REPL store — repl.ts parses
|
|
844
|
+
* 1. TUI rendering — entry.tsx parses only "<nextsteps>" from assistant output
|
|
845
|
+
* 2. REPL store — repl.ts parses only "<nextsteps>" from final agent output
|
|
833
846
|
* 3. /suggest output — suggest.ts parses LLM-generated numbered lists
|
|
834
847
|
*
|
|
835
848
|
* Heading mode (`requireHeading = true`):
|
|
836
|
-
*
|
|
837
|
-
*
|
|
849
|
+
* Assistant-output paths accept only balanced <nextsteps>...</nextsteps> blocks.
|
|
850
|
+
* Loose headings like "Next steps:" are intentionally ignored so `/next` only
|
|
851
|
+
* activates for the canonical machine-readable format.
|
|
838
852
|
*
|
|
839
853
|
* Raw mode (`requireHeading = false`):
|
|
840
854
|
* Parses numbered/bullet items from anywhere in text (subagent /suggest output).
|
|
841
855
|
*
|
|
842
|
-
* Supported
|
|
843
|
-
*
|
|
844
|
-
* ## Next steps (markdown heading)
|
|
845
|
-
* Next steps (plain text)
|
|
846
|
-
* <next_steps> (new XML tag format - preferred)
|
|
856
|
+
* Supported assistant-output format:
|
|
857
|
+
* <nextsteps> (canonical XML tag format)
|
|
847
858
|
*/
|
|
848
859
|
interface ParsedNextStep {
|
|
849
860
|
index: number;
|
|
@@ -857,7 +868,7 @@ interface ParseNextStepsResult {
|
|
|
857
868
|
/** Flat string array — what gets stored in the suggestion store. */
|
|
858
869
|
texts: string[];
|
|
859
870
|
/**
|
|
860
|
-
* Content with the entire
|
|
871
|
+
* Content with the entire canonical "<nextsteps>" block removed.
|
|
861
872
|
* Used by entry.tsx to strip suggestions from the rendered message body.
|
|
862
873
|
*/
|
|
863
874
|
stripped: string;
|
|
@@ -865,12 +876,11 @@ interface ParseNextStepsResult {
|
|
|
865
876
|
autoTexts: string[];
|
|
866
877
|
}
|
|
867
878
|
/**
|
|
868
|
-
* Parse "<
|
|
879
|
+
* Parse canonical "<nextsteps>" blocks from assistant output (or raw numbered lines).
|
|
869
880
|
*
|
|
870
881
|
* @param content — raw assistant message text or subagent output
|
|
871
|
-
* @param strict
|
|
872
|
-
*
|
|
873
|
-
* @param requireHeading — when true, a heading must precede the item list.
|
|
882
|
+
* @param strict — retained for compatibility; assistant-output paths always require the canonical XML tag.
|
|
883
|
+
* @param requireHeading — when true, a canonical XML tag must precede the item list.
|
|
874
884
|
* when false, numbered/bullet items are parsed from anywhere in text
|
|
875
885
|
* (used by /suggest subagent output which has no heading).
|
|
876
886
|
*/
|