@adhdev/daemon-core 0.9.76-rc.47 → 0.9.76-rc.48
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.js +19 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +19 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/commands/router.ts +19 -1
- package/src/mesh/mesh-events.ts +1 -1
package/package.json
CHANGED
package/src/commands/router.ts
CHANGED
|
@@ -381,6 +381,7 @@ export class DaemonCommandRouter {
|
|
|
381
381
|
const stoppedSessionIds: string[] = [];
|
|
382
382
|
const deletedSessionIds: string[] = [];
|
|
383
383
|
const skippedSessionIds: string[] = [];
|
|
384
|
+
const deleteUnsupportedSessionIds: string[] = [];
|
|
384
385
|
const errors: Array<{ sessionId: string; error: string }> = [];
|
|
385
386
|
|
|
386
387
|
for (const record of matched) {
|
|
@@ -413,7 +414,23 @@ export class DaemonCommandRouter {
|
|
|
413
414
|
continue;
|
|
414
415
|
}
|
|
415
416
|
} catch (e: any) {
|
|
416
|
-
|
|
417
|
+
const message = e?.message || String(e);
|
|
418
|
+
if (message.includes('Unsupported session host request: delete_session')
|
|
419
|
+
&& (args.mode === 'delete_stopped' || args.mode === 'stop_and_delete')) {
|
|
420
|
+
deleteUnsupportedSessionIds.push(sessionId);
|
|
421
|
+
if (args.mode === 'stop_and_delete' && !completed) {
|
|
422
|
+
try {
|
|
423
|
+
await this.deps.sessionHostControl.stopSession(sessionId);
|
|
424
|
+
stoppedSessionIds.push(sessionId);
|
|
425
|
+
} catch (stopError: any) {
|
|
426
|
+
errors.push({ sessionId, error: stopError?.message || String(stopError) });
|
|
427
|
+
continue;
|
|
428
|
+
}
|
|
429
|
+
}
|
|
430
|
+
skippedSessionIds.push(sessionId);
|
|
431
|
+
continue;
|
|
432
|
+
}
|
|
433
|
+
errors.push({ sessionId, error: message });
|
|
417
434
|
}
|
|
418
435
|
}
|
|
419
436
|
|
|
@@ -425,6 +442,7 @@ export class DaemonCommandRouter {
|
|
|
425
442
|
stoppedSessionIds,
|
|
426
443
|
deletedSessionIds,
|
|
427
444
|
skippedSessionIds,
|
|
445
|
+
...(deleteUnsupportedSessionIds.length ? { deleteUnsupportedSessionIds } : {}),
|
|
428
446
|
...(errors.length ? { errors } : {}),
|
|
429
447
|
};
|
|
430
448
|
}
|
package/src/mesh/mesh-events.ts
CHANGED
|
@@ -22,7 +22,7 @@ function buildMeshSystemMessage(args: {
|
|
|
22
22
|
}): string {
|
|
23
23
|
const metadata = formatCompletionMetadata(args.metadataEvent);
|
|
24
24
|
if (args.event === 'agent:generating_completed') {
|
|
25
|
-
return `[System] ${args.nodeLabel} has completed its task and is now idle${metadata}.
|
|
25
|
+
return `[System] ${args.nodeLabel} has completed its task and is now idle${metadata}. This completion came from the agent status event path; use mesh_read_chat once to review its final progress, but do not poll repeatedly.`;
|
|
26
26
|
}
|
|
27
27
|
if (args.event === 'agent:waiting_approval') {
|
|
28
28
|
return `[System] ${args.nodeLabel} is waiting for approval to proceed${metadata}. You may use mesh_read_chat and mesh_approve to handle it.`;
|