tycono 0.1.33 → 0.1.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 +1 -1
- package/src/api/src/routes/execute.ts +6 -1
- package/src/api/src/services/job-manager.ts +2 -5
- package/src/web/dist/assets/{index-CYBgtkj3.js → index-d14ep4_R.js} +28 -28
- package/src/web/dist/assets/{preview-app-mMmnwqgt.js → preview-app-esKbryZP.js} +1 -1
- package/src/web/dist/index.html +1 -1
package/package.json
CHANGED
|
@@ -232,11 +232,16 @@ function handleJobStream(jobId: string, fromSeq: number, req: IncomingMessage, r
|
|
|
232
232
|
if (event.seq >= fromSeq) {
|
|
233
233
|
sendSSE(res, 'activity', event);
|
|
234
234
|
}
|
|
235
|
-
// Auto-close SSE when job ends (
|
|
235
|
+
// Auto-close SSE when job ends or CEO replies (new stream takes over)
|
|
236
236
|
if (event.type === 'job:done' || event.type === 'job:error') {
|
|
237
237
|
sendSSE(res, 'stream:end', { reason: event.type === 'job:done' ? 'done' : 'error' });
|
|
238
238
|
res.end();
|
|
239
239
|
job.stream.unsubscribe(subscriber);
|
|
240
|
+
} else if (event.type === 'job:reply') {
|
|
241
|
+
// CEO replied → close this stream; frontend will connect to continuation job
|
|
242
|
+
sendSSE(res, 'stream:end', { reason: 'replied' });
|
|
243
|
+
res.end();
|
|
244
|
+
job.stream.unsubscribe(subscriber);
|
|
240
245
|
}
|
|
241
246
|
// awaiting_input keeps SSE open (sends event but doesn't close)
|
|
242
247
|
};
|
|
@@ -331,14 +331,11 @@ class JobManager {
|
|
|
331
331
|
const job = this.jobs.get(id);
|
|
332
332
|
if (!job || job.status !== 'awaiting_input') return null;
|
|
333
333
|
|
|
334
|
-
// Mark previous job as done
|
|
334
|
+
// Mark previous job as done (don't emit job:done — the stream stays open
|
|
335
|
+
// for the continuation job which will emit its own job:done when finished)
|
|
335
336
|
job.status = 'done';
|
|
336
337
|
completeActivity(job.roleId);
|
|
337
338
|
job.stream.emit('job:reply', job.roleId, { response });
|
|
338
|
-
job.stream.emit('job:done', job.roleId, {
|
|
339
|
-
output: job.result?.output?.slice(-1000) ?? '',
|
|
340
|
-
repliedWith: response,
|
|
341
|
-
});
|
|
342
339
|
|
|
343
340
|
// Build continuation prompt with previous context
|
|
344
341
|
const prevOutput = job.result?.output ?? '';
|