@adhdev/daemon-standalone 0.9.82-rc.4 → 0.9.82-rc.6

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,9 +7,9 @@
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-BLzTtSTm.js"></script>
10
+ <script type="module" crossorigin src="/assets/index-BG1OOql2.js"></script>
11
11
  <link rel="modulepreload" crossorigin href="/assets/vendor-piMzuE8Y.js">
12
- <link rel="stylesheet" crossorigin href="/assets/index-CMNWyMpB.css">
12
+ <link rel="stylesheet" crossorigin href="/assets/index-B8fg8KB1.css">
13
13
  </head>
14
14
  <body>
15
15
  <!-- Apply theme immediately to prevent FOIT (Flash of Incorrect Theme) -->
@@ -583,10 +583,18 @@ function isIdleSessionRecord(session) {
583
583
  function chooseDispatchableSession(sessions, providerType, meshId, nodeId) {
584
584
  const live = sessions.filter((session) => !isTerminalSessionRecord(session));
585
585
  const matchingProvider = (session) => !providerType || session?.providerType === providerType || session?.cliType === providerType;
586
+ const isMeshOwnedDelegateSession = (session) => {
587
+ const settings = session?.settings;
588
+ const sessionMeshId = typeof settings?.meshNodeFor === "string" ? settings.meshNodeFor.trim() : "";
589
+ const coordinatorDaemonId = typeof settings?.meshCoordinatorDaemonId === "string" ? settings.meshCoordinatorDaemonId.trim() : "";
590
+ const sessionNodeId = typeof settings?.meshNodeId === "string" ? settings.meshNodeId.trim() : "";
591
+ if (sessionMeshId !== meshId || !coordinatorDaemonId) return false;
592
+ return !sessionNodeId || sessionNodeId === nodeId;
593
+ };
586
594
  const meshSessions = live.filter(
587
- (session) => session?.settings?.meshNodeFor === meshId || session?.settings?.meshNodeId === nodeId
595
+ (session) => isMeshOwnedDelegateSession(session)
588
596
  );
589
- return meshSessions.find((session) => isIdleSessionRecord(session) && matchingProvider(session)) || meshSessions.find(matchingProvider) || live.find((session) => isIdleSessionRecord(session) && matchingProvider(session)) || live.find(matchingProvider) || live.find(isIdleSessionRecord) || live[0];
597
+ return meshSessions.find((session) => isIdleSessionRecord(session) && matchingProvider(session)) || meshSessions.find(matchingProvider) || void 0;
590
598
  }
591
599
  function findNestedPayload(value, predicate) {
592
600
  const seen = /* @__PURE__ */ new Set();