@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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adhdev/daemon-core",
3
- "version": "0.9.76-rc.47",
3
+ "version": "0.9.76-rc.48",
4
4
  "description": "ADHDev daemon core — CDP, IDE detection, providers, command execution",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -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
- errors.push({ sessionId, error: e?.message || String(e) });
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
  }
@@ -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}. You may use mesh_read_chat to review its progress.`;
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.`;