adhdev 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/cli/index.js CHANGED
@@ -41603,7 +41603,20 @@ var init_router = __esm({
41603
41603
  }
41604
41604
  if (!mesh) return { success: false, error: "Mesh not found" };
41605
41605
  if (!Array.isArray(mesh.nodes) || mesh.nodes.length === 0) return { success: false, error: "No nodes in mesh" };
41606
- const workspace = mesh.nodes[0].workspace;
41606
+ const requestedCoordinatorNodeId = typeof args?.coordinatorNodeId === "string" ? args.coordinatorNodeId.trim() : "";
41607
+ const preferredCoordinatorNodeId = requestedCoordinatorNodeId || (typeof mesh.coordinator?.preferredNodeId === "string" ? mesh.coordinator.preferredNodeId.trim() : "");
41608
+ const coordinatorNode = preferredCoordinatorNodeId ? mesh.nodes.find((node) => node?.id === preferredCoordinatorNodeId || node?.nodeId === preferredCoordinatorNodeId) : mesh.nodes[0];
41609
+ if (!coordinatorNode) {
41610
+ return {
41611
+ success: false,
41612
+ code: "mesh_coordinator_node_not_found",
41613
+ error: `Coordinator node ${preferredCoordinatorNodeId} was not found in mesh`,
41614
+ meshId,
41615
+ cliType
41616
+ };
41617
+ }
41618
+ const workspace = typeof coordinatorNode.workspace === "string" ? coordinatorNode.workspace.trim() : "";
41619
+ if (!workspace) return { success: false, error: "Coordinator node workspace required", meshId, cliType };
41607
41620
  const providerMeta = this.deps.providerLoader.resolve?.(cliType) || this.deps.providerLoader.getMeta(cliType);
41608
41621
  const coordinatorSetup = resolveMeshCoordinatorSetup({
41609
41622
  provider: providerMeta,
@@ -90239,7 +90252,7 @@ var init_adhdev_daemon = __esm({
90239
90252
  init_version();
90240
90253
  init_src();
90241
90254
  init_runtime_defaults();
90242
- pkgVersion = resolvePackageVersion({ injectedVersion: "0.9.72" });
90255
+ pkgVersion = resolvePackageVersion({ injectedVersion: "0.9.73" });
90243
90256
  AdhdevDaemon = class _AdhdevDaemon {
90244
90257
  localHttpServer = null;
90245
90258
  localWss = null;