@adhdev/daemon-standalone 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-standalone",
3
- "version": "0.9.76-rc.47",
3
+ "version": "0.9.76-rc.48",
4
4
  "description": "ADHDev standalone daemon — embedded HTTP/WS server for local dashboard",
5
5
  "main": "dist/index.js",
6
6
  "bin": {
@@ -34593,7 +34593,7 @@ function formatCompletionMetadata(event) {
34593
34593
  function buildMeshSystemMessage(args) {
34594
34594
  const metadata = formatCompletionMetadata(args.metadataEvent);
34595
34595
  if (args.event === "agent:generating_completed") {
34596
- return `[System] ${args.nodeLabel} has completed its task and is now idle${metadata}. You may use mesh_read_chat to review its progress.`;
34596
+ 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.`;
34597
34597
  }
34598
34598
  if (args.event === "agent:waiting_approval") {
34599
34599
  return `[System] ${args.nodeLabel} is waiting for approval to proceed${metadata}. You may use mesh_read_chat and mesh_approve to handle it.`;
@@ -50762,6 +50762,7 @@ Run 'adhdev doctor' for detailed diagnostics.`
50762
50762
  const stoppedSessionIds = [];
50763
50763
  const deletedSessionIds = [];
50764
50764
  const skippedSessionIds = [];
50765
+ const deleteUnsupportedSessionIds = [];
50765
50766
  const errors = [];
50766
50767
  for (const record2 of matched) {
50767
50768
  const sessionId = String(record2.sessionId);
@@ -50791,7 +50792,22 @@ Run 'adhdev doctor' for detailed diagnostics.`
50791
50792
  continue;
50792
50793
  }
50793
50794
  } catch (e) {
50794
- errors.push({ sessionId, error: e?.message || String(e) });
50795
+ const message = e?.message || String(e);
50796
+ if (message.includes("Unsupported session host request: delete_session") && (args.mode === "delete_stopped" || args.mode === "stop_and_delete")) {
50797
+ deleteUnsupportedSessionIds.push(sessionId);
50798
+ if (args.mode === "stop_and_delete" && !completed) {
50799
+ try {
50800
+ await this.deps.sessionHostControl.stopSession(sessionId);
50801
+ stoppedSessionIds.push(sessionId);
50802
+ } catch (stopError) {
50803
+ errors.push({ sessionId, error: stopError?.message || String(stopError) });
50804
+ continue;
50805
+ }
50806
+ }
50807
+ skippedSessionIds.push(sessionId);
50808
+ continue;
50809
+ }
50810
+ errors.push({ sessionId, error: message });
50795
50811
  }
50796
50812
  }
50797
50813
  return {
@@ -50802,6 +50818,7 @@ Run 'adhdev doctor' for detailed diagnostics.`
50802
50818
  stoppedSessionIds,
50803
50819
  deletedSessionIds,
50804
50820
  skippedSessionIds,
50821
+ ...deleteUnsupportedSessionIds.length ? { deleteUnsupportedSessionIds } : {},
50805
50822
  ...errors.length ? { errors } : {}
50806
50823
  };
50807
50824
  }
@@ -55698,9 +55715,10 @@ var IpcTransport = class {
55698
55715
  }
55699
55716
  fn();
55700
55717
  };
55718
+ const timeoutMs = type2 === "mesh_relay_command" ? 6e4 : 15e3;
55701
55719
  const timeout = setTimeout(() => {
55702
- finish(() => reject(new Error(`Daemon IPC command '${type2}' timed out after 15s`)));
55703
- }, 15e3);
55720
+ finish(() => reject(new Error(`Daemon IPC command '${type2}' timed out after ${Math.round(timeoutMs / 1e3)}s`)));
55721
+ }, timeoutMs);
55704
55722
  let commandSent = false;
55705
55723
  const send = () => {
55706
55724
  if (commandSent) return;
@@ -57043,7 +57061,7 @@ function getNodeLaunchReadiness(node) {
57043
57061
  };
57044
57062
  }
57045
57063
  async function commandForNode(ctx, node, command, args = {}) {
57046
- if (ctx.transport instanceof IpcTransport && node.daemonId) {
57064
+ if (ctx.transport instanceof IpcTransport && node.daemonId && node.daemonId !== ctx.localDaemonId) {
57047
57065
  return ctx.transport.meshCommand(node.daemonId, command, args);
57048
57066
  }
57049
57067
  if (isLocalTransport(ctx.transport)) {