tycono 0.1.96-beta.33 → 0.1.96-beta.35
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/package.json
CHANGED
|
@@ -282,17 +282,44 @@ class SupervisorHeartbeat {
|
|
|
282
282
|
* CEO reads files and answers directly.
|
|
283
283
|
*/
|
|
284
284
|
private spawnConversation(state: SupervisorState, directive: string): void {
|
|
285
|
-
// Build conversation context
|
|
285
|
+
// Build conversation context: previous directives + last execution summary
|
|
286
286
|
const deliveredDirectives = state.pendingDirectives.filter(d => d.delivered);
|
|
287
|
-
const
|
|
288
|
-
?
|
|
287
|
+
const directiveHistory = deliveredDirectives.length > 0
|
|
288
|
+
? deliveredDirectives.map(d => `- CEO: "${d.text}"`).join('\n')
|
|
289
289
|
: '';
|
|
290
290
|
|
|
291
|
-
|
|
291
|
+
// Extract last execution's output from activity stream (what "just happened")
|
|
292
|
+
let lastExecutionSummary = '';
|
|
293
|
+
if (state.supervisorSessionId) {
|
|
294
|
+
try {
|
|
295
|
+
const events = ActivityStream.readAll(state.supervisorSessionId);
|
|
296
|
+
// Get last text outputs (the supervisor's final response)
|
|
297
|
+
const textEvents = events.filter(e => e.type === 'text' && e.roleId === 'ceo');
|
|
298
|
+
const toolEvents = events.filter(e => e.type === 'tool:start' && e.roleId === 'ceo');
|
|
299
|
+
|
|
300
|
+
// Summarize: what tools were used + final text
|
|
301
|
+
const toolSummary = toolEvents.slice(-10).map(e => {
|
|
302
|
+
const name = (e.data.name as string) ?? '';
|
|
303
|
+
const inp = e.data.input as Record<string, unknown> | undefined;
|
|
304
|
+
const detail = inp?.file_path ?? inp?.command ?? '';
|
|
305
|
+
return ` → ${name} ${String(detail).slice(0, 60)}`;
|
|
306
|
+
}).join('\n');
|
|
307
|
+
|
|
308
|
+
const lastText = textEvents.slice(-5).map(e => String(e.data.text ?? '')).join('').slice(-500);
|
|
309
|
+
|
|
310
|
+
if (toolSummary || lastText) {
|
|
311
|
+
lastExecutionSummary = `\n[Previous execution in this wave]\nTools used:\n${toolSummary}\n\nLast response:\n${lastText.slice(0, 500)}\n`;
|
|
312
|
+
}
|
|
313
|
+
} catch { /* ignore */ }
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
const context = [directiveHistory, lastExecutionSummary].filter(Boolean).join('\n');
|
|
317
|
+
|
|
318
|
+
const task = `${context ? context + '\n' : ''}[CEO Question] ${directive}
|
|
292
319
|
|
|
293
|
-
You are the CEO's AI assistant.
|
|
294
|
-
|
|
295
|
-
|
|
320
|
+
You are the CEO's AI assistant. The above shows what happened previously in this wave.
|
|
321
|
+
Answer the CEO's question based on context. Be specific — reference files, results, and actions from the previous execution.
|
|
322
|
+
Do NOT dispatch anyone. Do NOT create new files. Just answer concisely.`;
|
|
296
323
|
|
|
297
324
|
// Reuse session
|
|
298
325
|
let sessionId = state.supervisorSessionId;
|
|
@@ -172,20 +172,10 @@ export const PanelMode: React.FC<PanelModeProps> = ({
|
|
|
172
172
|
{/* Left: Wave title + Org Tree + Wave tabs */}
|
|
173
173
|
<Box flexDirection="column" width={leftWidth}>
|
|
174
174
|
{/* Wave title */}
|
|
175
|
-
|
|
176
|
-
<
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
<Text color="gray"> </Text>
|
|
180
|
-
<Text color="white" wrap="truncate">
|
|
181
|
-
{focusedWave?.directive ? focusedWave.directive.slice(0, leftWidth - 6) : '(idle)'}
|
|
182
|
-
</Text>
|
|
183
|
-
</Box>
|
|
184
|
-
|
|
185
|
-
{/* Session count */}
|
|
186
|
-
{waveSessionCount > 0 && (
|
|
187
|
-
<Box paddingX={1}>
|
|
188
|
-
<Text color="gray">{waveSessionCount} sessions</Text>
|
|
175
|
+
{focusedWaveIndex > 0 && (
|
|
176
|
+
<Box paddingX={1} marginBottom={0}>
|
|
177
|
+
<Text color="green" bold>Wave {focusedWaveIndex}</Text>
|
|
178
|
+
{waveSessionCount > 0 && <Text color="gray"> ({waveSessionCount})</Text>}
|
|
189
179
|
</Box>
|
|
190
180
|
)}
|
|
191
181
|
|
|
@@ -198,21 +188,19 @@ export const PanelMode: React.FC<PanelModeProps> = ({
|
|
|
198
188
|
ceoStatus={waveScopedStatuses['ceo'] ?? 'idle'}
|
|
199
189
|
/>
|
|
200
190
|
|
|
201
|
-
{/* Wave tabs at bottom */}
|
|
191
|
+
{/* Wave tabs at bottom — compact inline */}
|
|
202
192
|
{waves.length > 1 && (
|
|
203
193
|
<Box paddingX={1} marginTop={1}>
|
|
194
|
+
<Text color="gray">W </Text>
|
|
204
195
|
{waves.map((w, i) => {
|
|
205
196
|
const isFocused = w.waveId === focusedWaveId;
|
|
206
197
|
return (
|
|
207
|
-
<
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
{` ${i + 1} `}
|
|
214
|
-
</Text>
|
|
215
|
-
</Box>
|
|
198
|
+
<Text key={w.waveId}
|
|
199
|
+
color={isFocused ? 'green' : 'gray'}
|
|
200
|
+
bold={isFocused}
|
|
201
|
+
>
|
|
202
|
+
{isFocused ? `[${i + 1}]` : ` ${i + 1} `}
|
|
203
|
+
</Text>
|
|
216
204
|
);
|
|
217
205
|
})}
|
|
218
206
|
</Box>
|