erosolar-cli 2.1.282 → 2.1.283
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/core/unifiedOrchestrator.d.ts +54 -4
- package/dist/core/unifiedOrchestrator.d.ts.map +1 -1
- package/dist/core/unifiedOrchestrator.js +198 -22
- package/dist/core/unifiedOrchestrator.js.map +1 -1
- package/dist/shell/interactiveShell.d.ts +1 -0
- package/dist/shell/interactiveShell.d.ts.map +1 -1
- package/dist/shell/interactiveShell.js +57 -8
- package/dist/shell/interactiveShell.js.map +1 -1
- package/dist/tools/tao/rl.d.ts.map +1 -1
- package/dist/tools/tao/rl.js +2 -1
- package/dist/tools/tao/rl.js.map +1 -1
- package/dist/ui/orchestration/OrchestrationUIBridge.d.ts +117 -0
- package/dist/ui/orchestration/OrchestrationUIBridge.d.ts.map +1 -0
- package/dist/ui/orchestration/OrchestrationUIBridge.js +435 -0
- package/dist/ui/orchestration/OrchestrationUIBridge.js.map +1 -0
- package/dist/ui/orchestration/StatusOrchestrator.d.ts +24 -0
- package/dist/ui/orchestration/StatusOrchestrator.d.ts.map +1 -1
- package/dist/ui/orchestration/StatusOrchestrator.js +94 -0
- package/dist/ui/orchestration/StatusOrchestrator.js.map +1 -1
- package/dist/ui/orchestration/index.d.ts +15 -0
- package/dist/ui/orchestration/index.d.ts.map +1 -0
- package/dist/ui/orchestration/index.js +18 -0
- package/dist/ui/orchestration/index.js.map +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* OrchestrationUIBridge - Unified bridge between orchestration execution and UI updates
|
|
3
|
+
*
|
|
4
|
+
* This module provides real-time integration between the UnifiedOrchestrator and the UI system.
|
|
5
|
+
* It ensures orchestration progress is displayed as it happens, not just at completion.
|
|
6
|
+
*
|
|
7
|
+
* Architecture:
|
|
8
|
+
* - Wraps UnifiedOrchestrator with event emission
|
|
9
|
+
* - Connects to UIUpdateCoordinator for serialized UI updates
|
|
10
|
+
* - Connects to StatusOrchestrator for status management
|
|
11
|
+
* - Provides Display integration for output rendering
|
|
12
|
+
*
|
|
13
|
+
* Key Features:
|
|
14
|
+
* - Real-time command execution feedback
|
|
15
|
+
* - Progressive findings display
|
|
16
|
+
* - Status line updates during execution
|
|
17
|
+
* - Proper error handling and recovery
|
|
18
|
+
* - Clean separation of concerns
|
|
19
|
+
*/
|
|
20
|
+
import { EventEmitter } from 'node:events';
|
|
21
|
+
import { type ExecutionResult, type Finding, type OperationReport, type OperationConfig } from '../../core/unifiedOrchestrator.js';
|
|
22
|
+
import { UIUpdateCoordinator } from './UIUpdateCoordinator.js';
|
|
23
|
+
import { StatusOrchestrator } from './StatusOrchestrator.js';
|
|
24
|
+
import { Display } from '../display.js';
|
|
25
|
+
export type OrchestrationPhase = 'initializing' | 'analyzing' | 'executing' | 'reporting' | 'complete' | 'error';
|
|
26
|
+
export interface OrchestrationProgress {
|
|
27
|
+
phase: OrchestrationPhase;
|
|
28
|
+
currentCommand?: string;
|
|
29
|
+
commandIndex: number;
|
|
30
|
+
totalCommands: number;
|
|
31
|
+
elapsedMs: number;
|
|
32
|
+
findings: Finding[];
|
|
33
|
+
errors: string[];
|
|
34
|
+
}
|
|
35
|
+
export interface OrchestrationEvent {
|
|
36
|
+
type: 'start' | 'progress' | 'command' | 'finding' | 'complete' | 'error';
|
|
37
|
+
timestamp: number;
|
|
38
|
+
data: unknown;
|
|
39
|
+
}
|
|
40
|
+
export interface OrchestrationUIBridgeConfig {
|
|
41
|
+
display: Display;
|
|
42
|
+
updateCoordinator?: UIUpdateCoordinator;
|
|
43
|
+
statusOrchestrator?: StatusOrchestrator;
|
|
44
|
+
showRealTimeOutput?: boolean;
|
|
45
|
+
showProgressBar?: boolean;
|
|
46
|
+
maxVisibleFindings?: number;
|
|
47
|
+
verboseMode?: boolean;
|
|
48
|
+
}
|
|
49
|
+
export interface OrchestrationUIState {
|
|
50
|
+
isRunning: boolean;
|
|
51
|
+
phase: OrchestrationPhase;
|
|
52
|
+
progress: number;
|
|
53
|
+
currentCommand: string | null;
|
|
54
|
+
findingsCount: number;
|
|
55
|
+
errorsCount: number;
|
|
56
|
+
elapsedMs: number;
|
|
57
|
+
}
|
|
58
|
+
export declare class OrchestrationUIBridge extends EventEmitter {
|
|
59
|
+
private readonly display;
|
|
60
|
+
private readonly updateCoordinator;
|
|
61
|
+
private readonly statusOrchestrator;
|
|
62
|
+
private readonly config;
|
|
63
|
+
private orchestrator;
|
|
64
|
+
private currentState;
|
|
65
|
+
private startTime;
|
|
66
|
+
private commandResults;
|
|
67
|
+
private findings;
|
|
68
|
+
private heartbeatId;
|
|
69
|
+
private disposed;
|
|
70
|
+
constructor(config: OrchestrationUIBridgeConfig);
|
|
71
|
+
/**
|
|
72
|
+
* Execute an orchestration operation with real-time UI updates.
|
|
73
|
+
*/
|
|
74
|
+
execute(objective: string, options?: Partial<OperationConfig>): Promise<OperationReport>;
|
|
75
|
+
/**
|
|
76
|
+
* Execute a specific command with UI feedback.
|
|
77
|
+
*/
|
|
78
|
+
executeCommand(command: string, timeout?: number): Promise<ExecutionResult>;
|
|
79
|
+
/**
|
|
80
|
+
* Get current orchestration state.
|
|
81
|
+
*/
|
|
82
|
+
getState(): OrchestrationUIState;
|
|
83
|
+
/**
|
|
84
|
+
* Check if orchestration is currently running.
|
|
85
|
+
*/
|
|
86
|
+
isRunning(): boolean;
|
|
87
|
+
/**
|
|
88
|
+
* Dispose the bridge and clean up resources.
|
|
89
|
+
*/
|
|
90
|
+
dispose(): void;
|
|
91
|
+
private executeWithProgress;
|
|
92
|
+
private showStartBanner;
|
|
93
|
+
private displayCommandResult;
|
|
94
|
+
private displayReport;
|
|
95
|
+
private handleError;
|
|
96
|
+
private setPhase;
|
|
97
|
+
private updateStatus;
|
|
98
|
+
private getProgress;
|
|
99
|
+
private startHeartbeat;
|
|
100
|
+
private stopHeartbeat;
|
|
101
|
+
private updateElapsedTime;
|
|
102
|
+
private setupStatusListeners;
|
|
103
|
+
private handleToolStatusEvent;
|
|
104
|
+
private emitEvent;
|
|
105
|
+
private enqueueUIUpdate;
|
|
106
|
+
private createInitialState;
|
|
107
|
+
private reset;
|
|
108
|
+
private truncate;
|
|
109
|
+
private formatElapsed;
|
|
110
|
+
private getSeverityColor;
|
|
111
|
+
}
|
|
112
|
+
/**
|
|
113
|
+
* Create an OrchestrationUIBridge with default configuration.
|
|
114
|
+
*/
|
|
115
|
+
export declare function createOrchestrationUIBridge(display: Display, options?: Partial<Omit<OrchestrationUIBridgeConfig, 'display'>>): OrchestrationUIBridge;
|
|
116
|
+
export type { ExecutionResult, Finding, OperationReport, OperationConfig, };
|
|
117
|
+
//# sourceMappingURL=OrchestrationUIBridge.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OrchestrationUIBridge.d.ts","sourceRoot":"","sources":["../../../src/ui/orchestration/OrchestrationUIBridge.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAC3C,OAAO,EAEL,KAAK,eAAe,EACpB,KAAK,OAAO,EACZ,KAAK,eAAe,EACpB,KAAK,eAAe,EACrB,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EAAE,mBAAmB,EAAkC,MAAM,0BAA0B,CAAC;AAC/F,OAAO,EAAE,kBAAkB,EAAmB,MAAM,yBAAyB,CAAC;AAC9E,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAOxC,MAAM,MAAM,kBAAkB,GAC1B,cAAc,GACd,WAAW,GACX,WAAW,GACX,WAAW,GACX,UAAU,GACV,OAAO,CAAC;AAEZ,MAAM,WAAW,qBAAqB;IACpC,KAAK,EAAE,kBAAkB,CAAC;IAC1B,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,YAAY,EAAE,MAAM,CAAC;IACrB,aAAa,EAAE,MAAM,CAAC;IACtB,SAAS,EAAE,MAAM,CAAC;IA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IBridge - Unified bridge between orchestration execution and UI updates
|
|
3
|
+
*
|
|
4
|
+
* This module provides real-time integration between the UnifiedOrchestrator and the UI system.
|
|
5
|
+
* It ensures orchestration progress is displayed as it happens, not just at completion.
|
|
6
|
+
*
|
|
7
|
+
* Architecture:
|
|
8
|
+
* - Wraps UnifiedOrchestrator with event emission
|
|
9
|
+
* - Connects to UIUpdateCoordinator for serialized UI updates
|
|
10
|
+
* - Connects to StatusOrchestrator for status management
|
|
11
|
+
* - Provides Display integration for output rendering
|
|
12
|
+
*
|
|
13
|
+
* Key Features:
|
|
14
|
+
* - Real-time command execution feedback
|
|
15
|
+
* - Progressive findings display
|
|
16
|
+
* - Status line updates during execution
|
|
17
|
+
* - Proper error handling and recovery
|
|
18
|
+
* - Clean separation of concerns
|
|
19
|
+
*/
|
|
20
|
+
import { EventEmitter } from 'node:events';
|
|
21
|
+
import { UnifiedOrchestrator, } from '../../core/unifiedOrchestrator.js';
|
|
22
|
+
import { UIUpdateCoordinator } from './UIUpdateCoordinator.js';
|
|
23
|
+
import { StatusOrchestrator } from './StatusOrchestrator.js';
|
|
24
|
+
import { theme, icons } from '../theme.js';
|
|
25
|
+
// ============================================================================
|
|
26
|
+
// OrchestrationUIBridge
|
|
27
|
+
// ============================================================================
|
|
28
|
+
export class OrchestrationUIBridge extends EventEmitter {
|
|
29
|
+
display;
|
|
30
|
+
updateCoordinator;
|
|
31
|
+
statusOrchestrator;
|
|
32
|
+
config;
|
|
33
|
+
orchestrator = null;
|
|
34
|
+
currentState;
|
|
35
|
+
startTime = 0;
|
|
36
|
+
commandResults = [];
|
|
37
|
+
findings = [];
|
|
38
|
+
heartbeatId = null;
|
|
39
|
+
disposed = false;
|
|
40
|
+
constructor(config) {
|
|
41
|
+
super();
|
|
42
|
+
this.display = config.display;
|
|
43
|
+
this.updateCoordinator = config.updateCoordinator ?? new UIUpdateCoordinator('idle');
|
|
44
|
+
this.statusOrchestrator = config.statusOrchestrator ?? new StatusOrchestrator();
|
|
45
|
+
this.config = {
|
|
46
|
+
showRealTimeOutput: config.showRealTimeOutput ?? true,
|
|
47
|
+
showProgressBar: config.showProgressBar ?? true,
|
|
48
|
+
maxVisibleFindings: config.maxVisibleFindings ?? 5,
|
|
49
|
+
verboseMode: config.verboseMode ?? false,
|
|
50
|
+
};
|
|
51
|
+
this.currentState = this.createInitialState();
|
|
52
|
+
this.setupStatusListeners();
|
|
53
|
+
}
|
|
54
|
+
// --------------------------------------------------------------------------
|
|
55
|
+
// Public API
|
|
56
|
+
// --------------------------------------------------------------------------
|
|
57
|
+
/**
|
|
58
|
+
* Execute an orchestration operation with real-time UI updates.
|
|
59
|
+
*/
|
|
60
|
+
async execute(objective, options) {
|
|
61
|
+
if (this.disposed) {
|
|
62
|
+
throw new Error('OrchestrationUIBridge has been disposed');
|
|
63
|
+
}
|
|
64
|
+
this.reset();
|
|
65
|
+
this.startTime = Date.now();
|
|
66
|
+
this.orchestrator = new UnifiedOrchestrator(options?.target);
|
|
67
|
+
try {
|
|
68
|
+
this.setPhase('initializing');
|
|
69
|
+
this.updateCoordinator.setMode('processing');
|
|
70
|
+
this.startHeartbeat();
|
|
71
|
+
this.showStartBanner(objective);
|
|
72
|
+
this.setPhase('analyzing');
|
|
73
|
+
this.updateStatus(`Analyzing: ${this.truncate(objective, 50)}`);
|
|
74
|
+
this.setPhase('executing');
|
|
75
|
+
const report = await this.executeWithProgress(objective, options);
|
|
76
|
+
this.setPhase('reporting');
|
|
77
|
+
this.displayReport(report);
|
|
78
|
+
this.setPhase('complete');
|
|
79
|
+
return report;
|
|
80
|
+
}
|
|
81
|
+
catch (error) {
|
|
82
|
+
this.setPhase('error');
|
|
83
|
+
this.handleError(error);
|
|
84
|
+
throw error;
|
|
85
|
+
}
|
|
86
|
+
finally {
|
|
87
|
+
this.stopHeartbeat();
|
|
88
|
+
this.updateCoordinator.setMode('idle');
|
|
89
|
+
this.orchestrator = null;
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* Execute a specific command with UI feedback.
|
|
94
|
+
*/
|
|
95
|
+
async executeCommand(command, timeout) {
|
|
96
|
+
if (!this.orchestrator) {
|
|
97
|
+
this.orchestrator = new UnifiedOrchestrator();
|
|
98
|
+
}
|
|
99
|
+
this.currentState.currentCommand = command;
|
|
100
|
+
this.updateStatus(`Running: ${this.truncate(command, 40)}`);
|
|
101
|
+
const startTime = Date.now();
|
|
102
|
+
const result = this.orchestrator.exec(command, timeout);
|
|
103
|
+
const duration = Date.now() - startTime;
|
|
104
|
+
this.commandResults.push(result);
|
|
105
|
+
this.currentState.currentCommand = null;
|
|
106
|
+
// Analyze for findings
|
|
107
|
+
const newFindings = this.orchestrator.analyze(result.output, command);
|
|
108
|
+
this.findings.push(...newFindings);
|
|
109
|
+
// Emit events
|
|
110
|
+
this.emitEvent('command', { command, result, duration });
|
|
111
|
+
for (const finding of newFindings) {
|
|
112
|
+
this.emitEvent('finding', finding);
|
|
113
|
+
}
|
|
114
|
+
// Update UI
|
|
115
|
+
if (this.config.showRealTimeOutput) {
|
|
116
|
+
this.displayCommandResult(command, result);
|
|
117
|
+
}
|
|
118
|
+
return result;
|
|
119
|
+
}
|
|
120
|
+
/**
|
|
121
|
+
* Get current orchestration state.
|
|
122
|
+
*/
|
|
123
|
+
getState() {
|
|
124
|
+
return { ...this.currentState };
|
|
125
|
+
}
|
|
126
|
+
/**
|
|
127
|
+
* Check if orchestration is currently running.
|
|
128
|
+
*/
|
|
129
|
+
isRunning() {
|
|
130
|
+
return this.currentState.isRunning;
|
|
131
|
+
}
|
|
132
|
+
/**
|
|
133
|
+
* Dispose the bridge and clean up resources.
|
|
134
|
+
*/
|
|
135
|
+
dispose() {
|
|
136
|
+
if (this.disposed)
|
|
137
|
+
return;
|
|
138
|
+
this.disposed = true;
|
|
139
|
+
this.stopHeartbeat();
|
|
140
|
+
this.statusOrchestrator.dispose();
|
|
141
|
+
this.updateCoordinator.dispose();
|
|
142
|
+
this.removeAllListeners();
|
|
143
|
+
}
|
|
144
|
+
// --------------------------------------------------------------------------
|
|
145
|
+
// Execution with Progress
|
|
146
|
+
// --------------------------------------------------------------------------
|
|
147
|
+
async executeWithProgress(objective, options) {
|
|
148
|
+
if (!this.orchestrator) {
|
|
149
|
+
throw new Error('Orchestrator not initialized');
|
|
150
|
+
}
|
|
151
|
+
// Use the orchestrator's execute method but intercept progress
|
|
152
|
+
const report = await this.orchestrator.execute({
|
|
153
|
+
objective,
|
|
154
|
+
...options,
|
|
155
|
+
});
|
|
156
|
+
// Collect results and findings
|
|
157
|
+
this.commandResults = this.orchestrator.getResults();
|
|
158
|
+
this.findings = this.orchestrator.getFindings();
|
|
159
|
+
// Update state
|
|
160
|
+
this.currentState.findingsCount = this.findings.length;
|
|
161
|
+
this.currentState.errorsCount = this.commandResults.filter(r => !r.success).length;
|
|
162
|
+
this.currentState.progress = 100;
|
|
163
|
+
return report;
|
|
164
|
+
}
|
|
165
|
+
// --------------------------------------------------------------------------
|
|
166
|
+
// UI Updates
|
|
167
|
+
// --------------------------------------------------------------------------
|
|
168
|
+
showStartBanner(objective) {
|
|
169
|
+
const lines = [
|
|
170
|
+
'',
|
|
171
|
+
theme.gradient?.primary?.('━'.repeat(60)) ?? '━'.repeat(60),
|
|
172
|
+
`${icons.action ?? '▶'} ${theme.bold?.('Orchestration Started') ?? 'Orchestration Started'}`,
|
|
173
|
+
theme.gradient?.primary?.('━'.repeat(60)) ?? '━'.repeat(60),
|
|
174
|
+
'',
|
|
175
|
+
`${theme.secondary?.('Objective:') ?? 'Objective:'} ${objective}`,
|
|
176
|
+
'',
|
|
177
|
+
];
|
|
178
|
+
this.enqueueUIUpdate('prompt', () => {
|
|
179
|
+
this.display.writeRaw(lines.join('\n'));
|
|
180
|
+
}, 'orchestration-banner');
|
|
181
|
+
}
|
|
182
|
+
displayCommandResult(command, result) {
|
|
183
|
+
const status = result.success
|
|
184
|
+
? theme.success?.('✓') ?? '✓'
|
|
185
|
+
: theme.error?.('✗') ?? '✗';
|
|
186
|
+
const duration = result.duration < 1000
|
|
187
|
+
? `${result.duration}ms`
|
|
188
|
+
: `${(result.duration / 1000).toFixed(1)}s`;
|
|
189
|
+
const line = ` ${status} ${this.truncate(command, 60)} ${theme.ui?.muted?.(`(${duration})`) ?? `(${duration})`}`;
|
|
190
|
+
this.enqueueUIUpdate('tool', () => {
|
|
191
|
+
this.display.writeRaw(`${line}\n`);
|
|
192
|
+
}, `cmd-${Date.now()}`);
|
|
193
|
+
// Show errors inline
|
|
194
|
+
if (!result.success && result.error) {
|
|
195
|
+
const errorLine = ` ${theme.error?.(result.error) ?? result.error}`;
|
|
196
|
+
this.enqueueUIUpdate('tool', () => {
|
|
197
|
+
this.display.writeRaw(`${errorLine}\n`);
|
|
198
|
+
}, `cmd-err-${Date.now()}`);
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
displayReport(report) {
|
|
202
|
+
const lines = [''];
|
|
203
|
+
// Header
|
|
204
|
+
const statusIcon = report.success
|
|
205
|
+
? theme.success?.('✓') ?? '✓'
|
|
206
|
+
: theme.warning?.('⚠') ?? '⚠';
|
|
207
|
+
const statusText = report.success ? 'Complete' : 'Issues Found';
|
|
208
|
+
lines.push(`${statusIcon} ${theme.bold?.(statusText) ?? statusText}`);
|
|
209
|
+
// Metrics
|
|
210
|
+
const duration = report.duration < 1000
|
|
211
|
+
? `${report.duration}ms`
|
|
212
|
+
: `${(report.duration / 1000).toFixed(1)}s`;
|
|
213
|
+
const successCount = report.results.filter(r => r.success).length;
|
|
214
|
+
lines.push(` Duration: ${duration}`);
|
|
215
|
+
lines.push(` Commands Executed: ${report.results.length}`);
|
|
216
|
+
lines.push(` Success Rate: ${successCount}/${report.results.length}`);
|
|
217
|
+
lines.push('');
|
|
218
|
+
// Findings
|
|
219
|
+
if (report.findings.length > 0) {
|
|
220
|
+
lines.push(theme.bold?.('Findings') ?? 'Findings');
|
|
221
|
+
for (const finding of report.findings.slice(0, this.config.maxVisibleFindings)) {
|
|
222
|
+
const severityColor = this.getSeverityColor(finding.severity);
|
|
223
|
+
lines.push(` • ${severityColor(`[${finding.severity.toUpperCase()}]`)} ${finding.title}`);
|
|
224
|
+
if (finding.recommendation) {
|
|
225
|
+
lines.push(` Recommendation: ${finding.recommendation}`);
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
if (report.findings.length > this.config.maxVisibleFindings) {
|
|
229
|
+
lines.push(` ... and ${report.findings.length - this.config.maxVisibleFindings} more`);
|
|
230
|
+
}
|
|
231
|
+
lines.push('');
|
|
232
|
+
}
|
|
233
|
+
// Failed commands
|
|
234
|
+
const failed = report.results.filter(r => !r.success);
|
|
235
|
+
if (failed.length > 0) {
|
|
236
|
+
lines.push(theme.bold?.('Failed Commands') ?? 'Failed Commands');
|
|
237
|
+
for (const result of failed.slice(0, 5)) {
|
|
238
|
+
lines.push(` • ${theme.error?.('✗') ?? '✗'} ${this.truncate(result.command ?? 'unknown', 60)}`);
|
|
239
|
+
if (result.error) {
|
|
240
|
+
lines.push(` ${theme.ui?.muted?.(result.error) ?? result.error}`);
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
if (failed.length > 5) {
|
|
244
|
+
lines.push(` ... and ${failed.length - 5} more`);
|
|
245
|
+
}
|
|
246
|
+
lines.push('');
|
|
247
|
+
}
|
|
248
|
+
// Summary
|
|
249
|
+
lines.push(theme.bold?.('Summary') ?? 'Summary');
|
|
250
|
+
lines.push(` ${report.summary}`);
|
|
251
|
+
lines.push('');
|
|
252
|
+
this.enqueueUIUpdate('prompt', () => {
|
|
253
|
+
this.display.writeRaw(lines.join('\n'));
|
|
254
|
+
}, 'orchestration-report');
|
|
255
|
+
}
|
|
256
|
+
handleError(error) {
|
|
257
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
258
|
+
this.currentState.errorsCount++;
|
|
259
|
+
this.enqueueUIUpdate('prompt', () => {
|
|
260
|
+
this.display.showError('Orchestration Error', error);
|
|
261
|
+
}, 'orchestration-error');
|
|
262
|
+
this.emitEvent('error', { error: message });
|
|
263
|
+
}
|
|
264
|
+
// --------------------------------------------------------------------------
|
|
265
|
+
// Status Management
|
|
266
|
+
// --------------------------------------------------------------------------
|
|
267
|
+
setPhase(phase) {
|
|
268
|
+
this.currentState.phase = phase;
|
|
269
|
+
this.currentState.isRunning = phase !== 'complete' && phase !== 'error';
|
|
270
|
+
this.currentState.elapsedMs = Date.now() - this.startTime;
|
|
271
|
+
const phaseDescriptions = {
|
|
272
|
+
initializing: 'Initializing orchestration...',
|
|
273
|
+
analyzing: 'Analyzing objective...',
|
|
274
|
+
executing: 'Executing commands...',
|
|
275
|
+
reporting: 'Generating report...',
|
|
276
|
+
complete: 'Orchestration complete',
|
|
277
|
+
error: 'Orchestration error',
|
|
278
|
+
};
|
|
279
|
+
this.updateStatus(phaseDescriptions[phase]);
|
|
280
|
+
this.emitEvent('progress', this.getProgress());
|
|
281
|
+
}
|
|
282
|
+
updateStatus(status) {
|
|
283
|
+
this.statusOrchestrator.setBaseStatus({
|
|
284
|
+
text: status,
|
|
285
|
+
tone: 'info',
|
|
286
|
+
startedAt: this.startTime,
|
|
287
|
+
});
|
|
288
|
+
}
|
|
289
|
+
getProgress() {
|
|
290
|
+
return {
|
|
291
|
+
phase: this.currentState.phase,
|
|
292
|
+
currentCommand: this.currentState.currentCommand ?? undefined,
|
|
293
|
+
commandIndex: this.commandResults.length,
|
|
294
|
+
totalCommands: this.commandResults.length,
|
|
295
|
+
elapsedMs: Date.now() - this.startTime,
|
|
296
|
+
findings: [...this.findings],
|
|
297
|
+
errors: this.commandResults.filter(r => !r.success).map(r => r.error ?? 'Unknown error'),
|
|
298
|
+
};
|
|
299
|
+
}
|
|
300
|
+
// --------------------------------------------------------------------------
|
|
301
|
+
// Heartbeat & Status Updates
|
|
302
|
+
// --------------------------------------------------------------------------
|
|
303
|
+
startHeartbeat() {
|
|
304
|
+
if (this.heartbeatId)
|
|
305
|
+
return;
|
|
306
|
+
this.heartbeatId = `orchestration-heartbeat-${Date.now()}`;
|
|
307
|
+
this.updateCoordinator.startHeartbeat(this.heartbeatId, {
|
|
308
|
+
intervalMs: 1000,
|
|
309
|
+
run: () => {
|
|
310
|
+
if (this.currentState.isRunning) {
|
|
311
|
+
this.updateElapsedTime();
|
|
312
|
+
}
|
|
313
|
+
},
|
|
314
|
+
mode: ['processing', 'tooling'],
|
|
315
|
+
immediate: false,
|
|
316
|
+
});
|
|
317
|
+
}
|
|
318
|
+
stopHeartbeat() {
|
|
319
|
+
if (this.heartbeatId) {
|
|
320
|
+
this.updateCoordinator.stopHeartbeat(this.heartbeatId);
|
|
321
|
+
this.heartbeatId = null;
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
updateElapsedTime() {
|
|
325
|
+
this.currentState.elapsedMs = Date.now() - this.startTime;
|
|
326
|
+
const elapsed = this.formatElapsed(this.currentState.elapsedMs);
|
|
327
|
+
const statusText = this.currentState.currentCommand
|
|
328
|
+
? `Running: ${this.truncate(this.currentState.currentCommand, 40)} (${elapsed})`
|
|
329
|
+
: `Orchestrating... (${elapsed})`;
|
|
330
|
+
this.statusOrchestrator.setBaseStatus({
|
|
331
|
+
text: statusText,
|
|
332
|
+
tone: 'info',
|
|
333
|
+
startedAt: this.startTime,
|
|
334
|
+
});
|
|
335
|
+
}
|
|
336
|
+
// --------------------------------------------------------------------------
|
|
337
|
+
// Event Handling
|
|
338
|
+
// --------------------------------------------------------------------------
|
|
339
|
+
setupStatusListeners() {
|
|
340
|
+
this.statusOrchestrator.subscribe((event) => {
|
|
341
|
+
if (event.type.startsWith('tool.')) {
|
|
342
|
+
this.handleToolStatusEvent(event.type, event.data);
|
|
343
|
+
}
|
|
344
|
+
});
|
|
345
|
+
}
|
|
346
|
+
handleToolStatusEvent(type, status) {
|
|
347
|
+
// Bridge tool status to orchestration progress
|
|
348
|
+
if (type === 'tool.start') {
|
|
349
|
+
this.currentState.currentCommand = status.description;
|
|
350
|
+
}
|
|
351
|
+
else if (type === 'tool.complete' || type === 'tool.error') {
|
|
352
|
+
this.currentState.currentCommand = null;
|
|
353
|
+
}
|
|
354
|
+
}
|
|
355
|
+
emitEvent(type, data) {
|
|
356
|
+
const event = {
|
|
357
|
+
type,
|
|
358
|
+
timestamp: Date.now(),
|
|
359
|
+
data,
|
|
360
|
+
};
|
|
361
|
+
this.emit(type, event);
|
|
362
|
+
this.emit('event', event);
|
|
363
|
+
}
|
|
364
|
+
// --------------------------------------------------------------------------
|
|
365
|
+
// UI Update Coordination
|
|
366
|
+
// --------------------------------------------------------------------------
|
|
367
|
+
enqueueUIUpdate(lane, run, coalesceKey) {
|
|
368
|
+
this.updateCoordinator.enqueue({
|
|
369
|
+
lane,
|
|
370
|
+
run,
|
|
371
|
+
description: 'orchestration-update',
|
|
372
|
+
priority: 'normal',
|
|
373
|
+
coalesceKey,
|
|
374
|
+
});
|
|
375
|
+
}
|
|
376
|
+
// --------------------------------------------------------------------------
|
|
377
|
+
// Helpers
|
|
378
|
+
// --------------------------------------------------------------------------
|
|
379
|
+
createInitialState() {
|
|
380
|
+
return {
|
|
381
|
+
isRunning: false,
|
|
382
|
+
phase: 'initializing',
|
|
383
|
+
progress: 0,
|
|
384
|
+
currentCommand: null,
|
|
385
|
+
findingsCount: 0,
|
|
386
|
+
errorsCount: 0,
|
|
387
|
+
elapsedMs: 0,
|
|
388
|
+
};
|
|
389
|
+
}
|
|
390
|
+
reset() {
|
|
391
|
+
this.currentState = this.createInitialState();
|
|
392
|
+
this.commandResults = [];
|
|
393
|
+
this.findings = [];
|
|
394
|
+
this.startTime = 0;
|
|
395
|
+
}
|
|
396
|
+
truncate(text, maxLength) {
|
|
397
|
+
if (text.length <= maxLength)
|
|
398
|
+
return text;
|
|
399
|
+
return `${text.slice(0, maxLength - 3)}...`;
|
|
400
|
+
}
|
|
401
|
+
formatElapsed(ms) {
|
|
402
|
+
const seconds = Math.floor(ms / 1000);
|
|
403
|
+
if (seconds < 60)
|
|
404
|
+
return `${seconds}s`;
|
|
405
|
+
const minutes = Math.floor(seconds / 60);
|
|
406
|
+
const remainingSeconds = seconds % 60;
|
|
407
|
+
return `${minutes}m ${remainingSeconds}s`;
|
|
408
|
+
}
|
|
409
|
+
getSeverityColor(severity) {
|
|
410
|
+
switch (severity) {
|
|
411
|
+
case 'critical':
|
|
412
|
+
case 'high':
|
|
413
|
+
return theme.error ?? ((t) => t);
|
|
414
|
+
case 'medium':
|
|
415
|
+
return theme.warning ?? ((t) => t);
|
|
416
|
+
case 'low':
|
|
417
|
+
case 'info':
|
|
418
|
+
default:
|
|
419
|
+
return theme.ui?.muted ?? ((t) => t);
|
|
420
|
+
}
|
|
421
|
+
}
|
|
422
|
+
}
|
|
423
|
+
// ============================================================================
|
|
424
|
+
// Factory Function
|
|
425
|
+
// ============================================================================
|
|
426
|
+
/**
|
|
427
|
+
* Create an OrchestrationUIBridge with default configuration.
|
|
428
|
+
*/
|
|
429
|
+
export function createOrchestrationUIBridge(display, options) {
|
|
430
|
+
return new OrchestrationUIBridge({
|
|
431
|
+
display,
|
|
432
|
+
...options,
|
|
433
|
+
});
|
|
434
|
+
}
|
|
435
|
+
//# sourceMappingURL=OrchestrationUIBridge.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OrchestrationUIBridge.js","sourceRoot":"","sources":["../../../src/ui/orchestration/OrchestrationUIBridge.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAC3C,OAAO,EACL,mBAAmB,GAKpB,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EAAE,mBAAmB,EAAkC,MAAM,0BAA0B,CAAC;AAC/F,OAAO,EAAE,kBAAkB,EAAmB,MAAM,yBAAyB,CAAC;AAE9E,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAkD3C,+EAA+E;AAC/E,wBAAwB;AACxB,+EAA+E;AAE/E,MAAM,OAAO,qBAAsB,SAAQ,YAAY;IACpC,OAAO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ChB,KAAK,MAAM;gBACT,OAAO,KAAK,CAAC,KAAK,IAAI,CAAC,CAAC,CAAS,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC;YAC3C,KAAK,QAAQ;gBACX,OAAO,KAAK,CAAC,OAAO,IAAI,CAAC,CAAC,CAAS,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC;YAC7C,KAAK,KAAK,CAAC;YACX,KAAK,MAAM,CAAC;YACZ;gBACE,OAAO,KAAK,CAAC,EAAE,EAAE,KAAK,IAAI,CAAC,CAAC,CAAS,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC;QACjD,CAAC;IACH,CAAC;CACF;AAED,+EAA+E;AAC/E,mBAAmB;AACnB,+EAA+E;AAE/E;;GAEG;AACH,MAAM,UAAU,2BAA2B,CACzC,OAAgB,EAChB,OAA+D;IAE/D,OAAO,IAAI,qBAAqB,CAAC;QAC/B,OAAO;QACP,GAAG,OAAO;KACX,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -1,10 +1,16 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* StatusOrchestrator - Unified status management system
|
|
3
3
|
* Coordinates between tool execution, live status tracking, and overlay display
|
|
4
|
+
*
|
|
5
|
+
* Integration with OrchestrationUIBridge:
|
|
6
|
+
* - Receives orchestration events and converts them to UI status updates
|
|
7
|
+
* - Manages tool status lifecycle with proper cleanup
|
|
8
|
+
* - Provides real-time status for the status line display
|
|
4
9
|
*/
|
|
5
10
|
import { EventEmitter } from 'events';
|
|
6
11
|
import { ToolCallRequest } from '../../core/types.js';
|
|
7
12
|
import { LiveStatusState, LiveStatusTone } from '../../shell/liveStatus.js';
|
|
13
|
+
import type { OrchestratorEvent } from '../../core/unifiedOrchestrator.js';
|
|
8
14
|
export type StatusEventType = 'status.base.changed' | 'status.override.pushed' | 'status.override.cleared' | 'tool.start' | 'tool.progress' | 'tool.complete' | 'tool.error' | 'animation.frame' | 'interrupt.received';
|
|
9
15
|
export interface StatusEvent {
|
|
10
16
|
type: StatusEventType;
|
|
@@ -158,6 +164,24 @@ export declare class StatusOrchestrator extends EventEmitter {
|
|
|
158
164
|
* Get full context for debugging
|
|
159
165
|
*/
|
|
160
166
|
getContext(): StatusContext;
|
|
167
|
+
/**
|
|
168
|
+
* Handle orchestration command start event
|
|
169
|
+
*/
|
|
170
|
+
onOrchestrationCommandStart(event: OrchestratorEvent): void;
|
|
171
|
+
/**
|
|
172
|
+
* Handle orchestration command complete event
|
|
173
|
+
*/
|
|
174
|
+
onOrchestrationCommandComplete(event: OrchestratorEvent): void;
|
|
175
|
+
/**
|
|
176
|
+
* Handle orchestration phase change event
|
|
177
|
+
*/
|
|
178
|
+
onOrchestrationPhaseChange(event: OrchestratorEvent): void;
|
|
179
|
+
/**
|
|
180
|
+
* Connect to an orchestrator instance and handle its events
|
|
181
|
+
*/
|
|
182
|
+
connectOrchestrator(orchestrator: {
|
|
183
|
+
onEvent: (callback: (event: OrchestratorEvent) => void) => () => void;
|
|
184
|
+
}): () => void;
|
|
161
185
|
/**
|
|
162
186
|
* Reset all status
|
|
163
187
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StatusOrchestrator.d.ts","sourceRoot":"","sources":["../../../src/ui/orchestration/StatusOrchestrator.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"StatusOrchestrator.d.ts","sourceRoot":"","sources":["../../../src/ui/orchestration/StatusOrchestrator.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AACtC,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAC5E,OAAO,KAAK,EACV,iBAAiB,EAIlB,MAAM,mCAAmC,CAAC;AAE3C,MAAM,MAAM,eAAe,GACvB,qBAAqB,GACrB,wBAAwB,GACxB,yBAAyB,GACzB,YAAY,GACZ,eAAe,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