@adhdev/daemon-standalone 1.0.44 → 1.0.45-rc.10

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-DPxJxFII.js"></script>
10
+ <script type="module" crossorigin src="/assets/index-digx-PVW.js"></script>
11
11
  <link rel="modulepreload" crossorigin href="/assets/vendor-DgFmqOGd.js">
12
- <link rel="stylesheet" crossorigin href="/assets/index-zRNkTYHz.css">
12
+ <link rel="stylesheet" crossorigin href="/assets/index-TrEtD2r5.css">
13
13
  </head>
14
14
  <body>
15
15
  <!-- Apply theme immediately to prevent FOIT (Flash of Incorrect Theme) -->
@@ -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;
@@ -3149,6 +3159,8 @@ async function ipcDispatchToRemoteAgent(ctx, node, args) {
3149
3159
  cliType: resolvedProviderType,
3150
3160
  action: "send_chat",
3151
3161
  message: args.message,
3162
+ // DISPATCH-SOURCE-TRACE: call-site tag echoed in the worker daemon log.
3163
+ dispatchSource: "mesh-tools-internal:ipcDispatchToRemoteAgent",
3152
3164
  // WTCLAIM (B): carry the node workspace so a sessionless dispatch can be
3153
3165
  // scoped to THIS node's session on the worker (findAdapter dir match /
3154
3166
  // findMeshNodeAdapter). Without it, a worker hosting both a base node and a
@@ -3333,7 +3345,9 @@ async function collectRelatedRepoStatuses(ctx, node) {
3333
3345
  }
3334
3346
  function readProviderPriority(policy) {
3335
3347
  const raw = policy?.providerPriority;
3336
- return Array.isArray(raw) ? raw.map((type) => typeof type === "string" ? type.trim() : "").filter(Boolean) : [];
3348
+ const explicit = Array.isArray(raw) ? raw.map((type) => typeof type === "string" ? type.trim() : "").filter(Boolean) : [];
3349
+ if (explicit.length) return explicit;
3350
+ return deriveProviderPriorityFromSlots(policy?.slots);
3337
3351
  }
3338
3352
  function readNodeSupportedProviders(policy) {
3339
3353
  const seen = /* @__PURE__ */ new Set();
@@ -3917,6 +3931,10 @@ async function meshStatus(ctx, args = {}) {
3917
3931
  const { nodeId: _omit, ...rest } = nodeScheduling;
3918
3932
  entry.scheduling = compact ? { load: rest.load, capReached: rest.capReached } : rest;
3919
3933
  }
3934
+ const lastQuotaRanking = (0, import_daemon_core5.getLastQuotaRanking)(node.id);
3935
+ if (lastQuotaRanking) {
3936
+ entry.scheduling = { ...entry.scheduling ?? {}, lastQuotaRanking };
3937
+ }
3920
3938
  let liveTruthProbed = false;
3921
3939
  try {
3922
3940
  const autoDiscover = node.policy?.autoDiscoverSubmodules !== false;
@@ -6674,6 +6692,8 @@ ${magiOutputContractFor(kind)}`;
6674
6692
  agentType: task.assignedProviderType,
6675
6693
  action: "send_chat",
6676
6694
  message,
6695
+ // DISPATCH-SOURCE-TRACE: call-site tag echoed in the worker daemon log.
6696
+ dispatchSource: "mesh-tools-magi:sendKindRetry",
6677
6697
  meshContext: {
6678
6698
  meshId: ctx.mesh.id,
6679
6699
  nodeId: task.assignedNodeId,
@@ -7411,6 +7431,8 @@ async function meshSendTask(ctx, args) {
7411
7431
  providerType: resolvedProviderType,
7412
7432
  action: "send_chat",
7413
7433
  message,
7434
+ // DISPATCH-SOURCE-TRACE: call-site tag echoed in the worker daemon log.
7435
+ dispatchSource: "mesh-tools-session:mesh_send_task:direct",
7414
7436
  meshContext: {
7415
7437
  meshId: ctx.mesh.id,
7416
7438
  nodeId: args.node_id,