skopix 2.0.109 → 2.0.110
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/cli/commands/agent.js
CHANGED
|
@@ -245,7 +245,10 @@ export async function agentCommand(options) {
|
|
|
245
245
|
send({ type: 'error', message: chunk.toString().trim().slice(0, 200) });
|
|
246
246
|
});
|
|
247
247
|
|
|
248
|
-
child.on('close', () => {
|
|
248
|
+
child.on('close', () => {
|
|
249
|
+
send({ type: 'stopped' });
|
|
250
|
+
try { ws.send(JSON.stringify({ type: 'jobDone', recordingId })); } catch {}
|
|
251
|
+
});
|
|
249
252
|
|
|
250
253
|
// Listen for stop signal from server
|
|
251
254
|
const stopHandler = (event) => {
|
|
@@ -2412,6 +2412,14 @@ export async function dashboardCommand(options) {
|
|
|
2412
2412
|
const agent = ws.agentId ? agents.get(ws.agentId) : null;
|
|
2413
2413
|
if (!agent) return;
|
|
2414
2414
|
|
|
2415
|
+
// Explicit job completion — always resets agent to idle regardless of job type
|
|
2416
|
+
if (msg.type === 'jobDone') {
|
|
2417
|
+
agent.status = 'idle';
|
|
2418
|
+
agent.currentJob = null;
|
|
2419
|
+
broadcastAgentList();
|
|
2420
|
+
return;
|
|
2421
|
+
}
|
|
2422
|
+
|
|
2415
2423
|
if (msg.type === 'jobUpdate') {
|
|
2416
2424
|
// Agent streaming step output back to server
|
|
2417
2425
|
const run = msg.runId ? activeRuns.get(msg.runId) : null;
|
package/package.json
CHANGED