@adhdev/daemon-standalone 0.9.72 → 0.9.73

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
@@ -49284,7 +49284,20 @@ Run 'adhdev doctor' for detailed diagnostics.`
49284
49284
  }
49285
49285
  if (!mesh) return { success: false, error: "Mesh not found" };
49286
49286
  if (!Array.isArray(mesh.nodes) || mesh.nodes.length === 0) return { success: false, error: "No nodes in mesh" };
49287
- const workspace = mesh.nodes[0].workspace;
49287
+ const requestedCoordinatorNodeId = typeof args?.coordinatorNodeId === "string" ? args.coordinatorNodeId.trim() : "";
49288
+ const preferredCoordinatorNodeId = requestedCoordinatorNodeId || (typeof mesh.coordinator?.preferredNodeId === "string" ? mesh.coordinator.preferredNodeId.trim() : "");
49289
+ const coordinatorNode = preferredCoordinatorNodeId ? mesh.nodes.find((node) => node?.id === preferredCoordinatorNodeId || node?.nodeId === preferredCoordinatorNodeId) : mesh.nodes[0];
49290
+ if (!coordinatorNode) {
49291
+ return {
49292
+ success: false,
49293
+ code: "mesh_coordinator_node_not_found",
49294
+ error: `Coordinator node ${preferredCoordinatorNodeId} was not found in mesh`,
49295
+ meshId,
49296
+ cliType
49297
+ };
49298
+ }
49299
+ const workspace = typeof coordinatorNode.workspace === "string" ? coordinatorNode.workspace.trim() : "";
49300
+ if (!workspace) return { success: false, error: "Coordinator node workspace required", meshId, cliType };
49288
49301
  const providerMeta = this.deps.providerLoader.resolve?.(cliType) || this.deps.providerLoader.getMeta(cliType);
49289
49302
  const coordinatorSetup = resolveMeshCoordinatorSetup({
49290
49303
  provider: providerMeta,