@adhdev/daemon-standalone 1.0.45-rc.6 → 1.0.45-rc.7

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-Bf3SwIU_.js"></script>
10
+ <script type="module" crossorigin src="/assets/index-DU3ukph2.js"></script>
11
11
  <link rel="modulepreload" crossorigin href="/assets/vendor-DgFmqOGd.js">
12
12
  <link rel="stylesheet" crossorigin href="/assets/index-zRNkTYHz.css">
13
13
  </head>
@@ -407,6 +407,16 @@ function normalizeNodeCapabilitySlots(raw) {
407
407
  }
408
408
  return out;
409
409
  }
410
+ function deriveProviderPriorityFromSlots(slots) {
411
+ const seen = /* @__PURE__ */ new Set();
412
+ const out = [];
413
+ for (const slot of normalizeNodeCapabilitySlots(slots)) {
414
+ if (seen.has(slot.provider)) continue;
415
+ seen.add(slot.provider);
416
+ out.push(slot.provider);
417
+ }
418
+ return out;
419
+ }
410
420
  var CLI_SLOT_RECIPES = Object.freeze({
411
421
  "claude-cli": [
412
422
  {
@@ -3049,7 +3059,7 @@ async function ipcDispatchToRemoteAgent(ctx, node, args) {
3049
3059
  const daemonId = node.daemonId;
3050
3060
  const dispatchCoordinatorDaemonId = readString(args.meshContext?.coordinatorDaemonId) || "";
3051
3061
  let sessionId = args.session_id?.trim() || "";
3052
- const providerPriorityList = Array.isArray(node.policy?.providerPriority) ? node.policy.providerPriority : [];
3062
+ const providerPriorityList = readProviderPriority(node.policy);
3053
3063
  let resolvedProviderType = args.providerType?.trim() || providerPriorityList[0] || "";
3054
3064
  if (sessionId && args.verifiedSession) {
3055
3065
  const explicitSession = args.verifiedSession;
@@ -3333,7 +3343,9 @@ async function collectRelatedRepoStatuses(ctx, node) {
3333
3343
  }
3334
3344
  function readProviderPriority(policy) {
3335
3345
  const raw = policy?.providerPriority;
3336
- return Array.isArray(raw) ? raw.map((type) => typeof type === "string" ? type.trim() : "").filter(Boolean) : [];
3346
+ const explicit = Array.isArray(raw) ? raw.map((type) => typeof type === "string" ? type.trim() : "").filter(Boolean) : [];
3347
+ if (explicit.length) return explicit;
3348
+ return deriveProviderPriorityFromSlots(policy?.slots);
3337
3349
  }
3338
3350
  function readNodeSupportedProviders(policy) {
3339
3351
  const seen = /* @__PURE__ */ new Set();