@adhdev/daemon-standalone 0.9.77-rc.14 → 0.9.77-rc.16

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/public/index.html CHANGED
@@ -7,7 +7,7 @@
7
7
  <meta name="description" content="ADHDev self-hosted dashboard for controlling AI agents" />
8
8
  <link rel="icon" href="/otter-logo.png" />
9
9
  <link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap" rel="stylesheet" />
10
- <script type="module" crossorigin src="/assets/index-6WEc6L46.js"></script>
10
+ <script type="module" crossorigin src="/assets/index-CWWeDAva.js"></script>
11
11
  <link rel="modulepreload" crossorigin href="/assets/vendor-CLec0455.js">
12
12
  <link rel="stylesheet" crossorigin href="/assets/index-DftJ2WZr.css">
13
13
  </head>
@@ -33701,7 +33701,7 @@ async function handleOpenPanel(h, args) {
33701
33701
  async function handlePtyInput(h, args) {
33702
33702
  const { cliType, data, targetSessionId } = args || {};
33703
33703
  if (!data) return { success: false, error: "data required" };
33704
- const cleanData = typeof data === "string" ? data.replace(/\x1b\[\?[0-9;]*c/g, "") : data;
33704
+ const cleanData = typeof data === "string" ? data.replace(/\x1b\[[?>][0-9;]*c/g, "") : data;
33705
33705
  if (!cleanData) return { success: true };
33706
33706
  const adapter = h.getCliAdapter(targetSessionId || cliType);
33707
33707
  if (!adapter || typeof adapter.writeRaw !== "function") {
@@ -57410,6 +57410,10 @@ function resolveCoordinatorNode(ctx) {
57410
57410
  const preferred = ctx.mesh.nodes.find((n) => n.id === preferredNodeId && typeof n.daemonId === "string" && n.daemonId.trim());
57411
57411
  if (preferred) return preferred;
57412
57412
  }
57413
+ if (ctx.localMachineId) {
57414
+ const byMachine = ctx.mesh.nodes.find((n) => n.machineId === ctx.localMachineId);
57415
+ if (byMachine) return byMachine;
57416
+ }
57413
57417
  if (ctx.localDaemonId) {
57414
57418
  return ctx.mesh.nodes.find((n) => n.daemonId === ctx.localDaemonId);
57415
57419
  }
@@ -57499,7 +57503,8 @@ function getNodeLaunchReadiness(node) {
57499
57503
  };
57500
57504
  }
57501
57505
  async function commandForNode(ctx, node, command, args = {}) {
57502
- if (ctx.transport instanceof IpcTransport && node.daemonId && node.daemonId !== ctx.localDaemonId) {
57506
+ const isLocalNode = ctx.localMachineId && node.machineId === ctx.localMachineId || ctx.localDaemonId && node.daemonId === ctx.localDaemonId;
57507
+ if (ctx.transport instanceof IpcTransport && node.daemonId && !isLocalNode) {
57503
57508
  return ctx.transport.meshCommand(node.daemonId, command, args);
57504
57509
  }
57505
57510
  if (isLocalTransport(ctx.transport)) {
@@ -59948,6 +59953,15 @@ async function startMcpServer(opts) {
59948
59953
  process.exit(1);
59949
59954
  }
59950
59955
  let localDaemonId;
59956
+ let localMachineId;
59957
+ if (transport instanceof LocalTransport || transport instanceof IpcTransport) {
59958
+ try {
59959
+ const { loadConfig: loadConfig2 } = await Promise.resolve().then(() => (init_dist2(), dist_exports));
59960
+ const cfg = loadConfig2();
59961
+ if (cfg.registeredMachineId) localMachineId = cfg.registeredMachineId;
59962
+ } catch {
59963
+ }
59964
+ }
59951
59965
  if (transport instanceof IpcTransport) {
59952
59966
  try {
59953
59967
  const statusResult = await transport.getStatus();
@@ -59956,7 +59970,7 @@ async function startMcpServer(opts) {
59956
59970
  } catch {
59957
59971
  }
59958
59972
  }
59959
- const meshCtx = { mesh, transport, ...localDaemonId ? { localDaemonId } : {} };
59973
+ const meshCtx = { mesh, transport, ...localDaemonId ? { localDaemonId } : {}, ...localMachineId ? { localMachineId } : {} };
59960
59974
  const coordinatorPrompt = await buildMeshModeCoordinatorPrompt(mesh);
59961
59975
  const server2 = new import_server.Server(
59962
59976
  { name: "adhdev-mcp-server", version: "0.9.76" },