@adhdev/daemon-standalone 0.9.76-rc.46 → 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 CHANGED
@@ -51613,7 +51613,7 @@ Run 'adhdev doctor' for detailed diagnostics.`
51613
51613
  function buildMeshSystemMessage(args) {
51614
51614
  const metadata = formatCompletionMetadata(args.metadataEvent);
51615
51615
  if (args.event === "agent:generating_completed") {
51616
- return `[System] ${args.nodeLabel} has completed its task and is now idle${metadata}. You may use mesh_read_chat to review its progress.`;
51616
+ 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.`;
51617
51617
  }
51618
51618
  if (args.event === "agent:waiting_approval") {
51619
51619
  return `[System] ${args.nodeLabel} is waiting for approval to proceed${metadata}. You may use mesh_read_chat and mesh_approve to handle it.`;
@@ -52560,6 +52560,7 @@ Run 'adhdev doctor' for detailed diagnostics.`
52560
52560
  const stoppedSessionIds = [];
52561
52561
  const deletedSessionIds = [];
52562
52562
  const skippedSessionIds = [];
52563
+ const deleteUnsupportedSessionIds = [];
52563
52564
  const errors = [];
52564
52565
  for (const record2 of matched) {
52565
52566
  const sessionId = String(record2.sessionId);
@@ -52589,7 +52590,22 @@ Run 'adhdev doctor' for detailed diagnostics.`
52589
52590
  continue;
52590
52591
  }
52591
52592
  } catch (e) {
52592
- errors.push({ sessionId, error: e?.message || String(e) });
52593
+ const message = e?.message || String(e);
52594
+ if (message.includes("Unsupported session host request: delete_session") && (args.mode === "delete_stopped" || args.mode === "stop_and_delete")) {
52595
+ deleteUnsupportedSessionIds.push(sessionId);
52596
+ if (args.mode === "stop_and_delete" && !completed) {
52597
+ try {
52598
+ await this.deps.sessionHostControl.stopSession(sessionId);
52599
+ stoppedSessionIds.push(sessionId);
52600
+ } catch (stopError) {
52601
+ errors.push({ sessionId, error: stopError?.message || String(stopError) });
52602
+ continue;
52603
+ }
52604
+ }
52605
+ skippedSessionIds.push(sessionId);
52606
+ continue;
52607
+ }
52608
+ errors.push({ sessionId, error: message });
52593
52609
  }
52594
52610
  }
52595
52611
  return {
@@ -52600,6 +52616,7 @@ Run 'adhdev doctor' for detailed diagnostics.`
52600
52616
  stoppedSessionIds,
52601
52617
  deletedSessionIds,
52602
52618
  skippedSessionIds,
52619
+ ...deleteUnsupportedSessionIds.length ? { deleteUnsupportedSessionIds } : {},
52603
52620
  ...errors.length ? { errors } : {}
52604
52621
  };
52605
52622
  }