@wrongstack/tui 0.32.0 → 0.51.3
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 +51 -26
- package/dist/index.js +399 -44
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
package/dist/index.d.ts
CHANGED
|
@@ -13,6 +13,54 @@ interface ProviderOption {
|
|
|
13
13
|
modelsLabel?: string;
|
|
14
14
|
}
|
|
15
15
|
|
|
16
|
+
type SerialAutonomyStage = {
|
|
17
|
+
phase: 'idle';
|
|
18
|
+
} | {
|
|
19
|
+
phase: 'decide';
|
|
20
|
+
reason: string;
|
|
21
|
+
} | {
|
|
22
|
+
phase: 'execute';
|
|
23
|
+
task: string;
|
|
24
|
+
} | {
|
|
25
|
+
phase: 'reflect';
|
|
26
|
+
status: 'success' | 'failure' | 'aborted' | 'skipped';
|
|
27
|
+
note?: string;
|
|
28
|
+
} | {
|
|
29
|
+
phase: 'sleep';
|
|
30
|
+
ms: number;
|
|
31
|
+
} | {
|
|
32
|
+
phase: 'paused';
|
|
33
|
+
} | {
|
|
34
|
+
phase: 'stopped';
|
|
35
|
+
} | {
|
|
36
|
+
phase: 'error';
|
|
37
|
+
message: string;
|
|
38
|
+
};
|
|
39
|
+
type ParallelAutonomyStage = {
|
|
40
|
+
phase: 'idle';
|
|
41
|
+
} | {
|
|
42
|
+
phase: 'decompose';
|
|
43
|
+
} | {
|
|
44
|
+
phase: 'fanout';
|
|
45
|
+
slots: number;
|
|
46
|
+
} | {
|
|
47
|
+
phase: 'await';
|
|
48
|
+
taskIds: string[];
|
|
49
|
+
} | {
|
|
50
|
+
phase: 'aggregate';
|
|
51
|
+
successCount: number;
|
|
52
|
+
total: number;
|
|
53
|
+
goalComplete: boolean;
|
|
54
|
+
} | {
|
|
55
|
+
phase: 'sleep';
|
|
56
|
+
ms: number;
|
|
57
|
+
} | {
|
|
58
|
+
phase: 'stopped';
|
|
59
|
+
} | {
|
|
60
|
+
phase: 'error';
|
|
61
|
+
message: string;
|
|
62
|
+
};
|
|
63
|
+
type AutonomyStage = SerialAutonomyStage | ParallelAutonomyStage;
|
|
16
64
|
interface RunTuiOptions {
|
|
17
65
|
agent: Agent;
|
|
18
66
|
slashRegistry: SlashCommandRegistry;
|
|
@@ -51,33 +99,10 @@ interface RunTuiOptions {
|
|
|
51
99
|
*/
|
|
52
100
|
subscribeEternalIteration?: (fn: (entry: _wrongstack_core.JournalEntry) => void) => () => void;
|
|
53
101
|
/**
|
|
54
|
-
* Subscribe to per-iteration stage transitions from the
|
|
55
|
-
* TUI uses this to render live status
|
|
56
|
-
* sleep/paused/stopped) in the status bar.
|
|
102
|
+
* Subscribe to per-iteration stage transitions from the autonomy engines.
|
|
103
|
+
* TUI uses this to render live status in the status bar.
|
|
57
104
|
*/
|
|
58
|
-
subscribeEternalStage?: (fn: (stage:
|
|
59
|
-
phase: 'idle';
|
|
60
|
-
} | {
|
|
61
|
-
phase: 'decide';
|
|
62
|
-
reason: string;
|
|
63
|
-
} | {
|
|
64
|
-
phase: 'execute';
|
|
65
|
-
task: string;
|
|
66
|
-
} | {
|
|
67
|
-
phase: 'reflect';
|
|
68
|
-
status: 'success' | 'failure' | 'aborted' | 'skipped';
|
|
69
|
-
note?: string;
|
|
70
|
-
} | {
|
|
71
|
-
phase: 'sleep';
|
|
72
|
-
ms: number;
|
|
73
|
-
} | {
|
|
74
|
-
phase: 'paused';
|
|
75
|
-
} | {
|
|
76
|
-
phase: 'stopped';
|
|
77
|
-
} | {
|
|
78
|
-
phase: 'error';
|
|
79
|
-
message: string;
|
|
80
|
-
}) => void) => () => void;
|
|
105
|
+
subscribeEternalStage?: (fn: (stage: AutonomyStage) => void) => () => void;
|
|
81
106
|
/** Renders in the startup banner. Read from the CLI's package.json. */
|
|
82
107
|
appVersion?: string;
|
|
83
108
|
/** Provider id for the startup banner ("openai", "anthropic", ...). */
|