@adhdev/daemon-standalone 1.0.28-rc.7 → 1.0.28-rc.9

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-DHSDD-eN.js"></script>
10
+ <script type="module" crossorigin src="/assets/index-CD0m71Da.js"></script>
11
11
  <link rel="modulepreload" crossorigin href="/assets/vendor-DyCWA2YZ.js">
12
12
  <link rel="stylesheet" crossorigin href="/assets/index-8TNNoifN.css">
13
13
  </head>
@@ -2082,7 +2082,19 @@ function buildDirectTaskPayload(message, via, opts) {
2082
2082
  ...opts.targetSessionId ? { targetSessionId: opts.targetSessionId } : {},
2083
2083
  ...opts.dispatchedToIdleSession !== void 0 ? { dispatchedToIdleSession: opts.dispatchedToIdleSession } : {},
2084
2084
  ...opts.coordinatorSessionId ? { coordinatorSessionId: opts.coordinatorSessionId } : {},
2085
- ...opts.coordinatorDaemonId ? { coordinatorDaemonId: opts.coordinatorDaemonId } : {}
2085
+ ...opts.coordinatorDaemonId ? { coordinatorDaemonId: opts.coordinatorDaemonId } : {},
2086
+ // Uniform routing rationale (mirrors the queue-claim task_dispatched shape) so both
2087
+ // paths render identically in mesh_task_history / the dashboard. The legacy top-level
2088
+ // `source`/`via`/`providerType` fields above are preserved verbatim for existing
2089
+ // consumers (mesh-active-work / mesh-events-stale key on payload.source === 'direct').
2090
+ routingDecision: {
2091
+ source: "direct",
2092
+ via,
2093
+ ...opts.selectedNodeId ? { selectedNodeId: opts.selectedNodeId } : {},
2094
+ ...opts.providerType ? { resolvedProviderType: opts.providerType } : {},
2095
+ ...opts.resolvedModel ? { resolvedModel: opts.resolvedModel } : {},
2096
+ ...opts.resolvedThinkingLevel ? { resolvedThinkingLevel: opts.resolvedThinkingLevel } : {}
2097
+ }
2086
2098
  };
2087
2099
  }
2088
2100
  function findNode(mesh, nodeId) {
@@ -2847,11 +2859,27 @@ function isGitStatusDirty(status) {
2847
2859
  if (Array.isArray(status?.submodules) && status.submodules.some((submodule) => submodule?.dirty || submodule?.outOfSync || submodule?.error)) return true;
2848
2860
  return countUncommittedChanges(status) > 0;
2849
2861
  }
2862
+ var ROUTING_SKIPPED_COMPACT_MAX = 5;
2863
+ function compactRoutingDecision(routing) {
2864
+ const out = {};
2865
+ for (const [k, v] of Object.entries(routing)) {
2866
+ if (k === "skippedCandidates" && Array.isArray(v)) {
2867
+ const kept = v.slice(0, ROUTING_SKIPPED_COMPACT_MAX);
2868
+ out[k] = kept;
2869
+ if (v.length > kept.length) out.skippedCandidatesDropped = v.length - kept.length;
2870
+ } else {
2871
+ out[k] = v;
2872
+ }
2873
+ }
2874
+ return out;
2875
+ }
2850
2876
  function slimLedgerPayload(payload) {
2851
2877
  const slim = {};
2852
2878
  for (const [k, v] of Object.entries(payload)) {
2853
2879
  if (k === "message" || k === "taskSummary") {
2854
2880
  slim[k] = typeof v === "string" && v.length > 200 ? v.slice(0, 200) + "\u2026" : v;
2881
+ } else if (k === "routingDecision" && v && typeof v === "object" && !Array.isArray(v)) {
2882
+ slim[k] = compactRoutingDecision(v);
2855
2883
  } else if (k === "evidence" || k === "workerResult" || k === "gitStatus" || k === "validationResults") {
2856
2884
  } else if (k === "finalSummary") {
2857
2885
  slim[k] = typeof v === "string" && v.length > 300 ? v.slice(0, 300) + "\u2026" : v;
@@ -6523,6 +6551,7 @@ async function meshSendTask(ctx, args) {
6523
6551
  taskMode,
6524
6552
  providerType,
6525
6553
  targetSessionId: dispatchedSessionId,
6554
+ ...args.node_id ? { selectedNodeId: args.node_id } : {},
6526
6555
  ...ctx.coordinatorSessionId ? { coordinatorSessionId: ctx.coordinatorSessionId } : {},
6527
6556
  // COORD-EVENT-MISROUTE: persist the dispatching coordinator daemon anchor
6528
6557
  // (same value stamped into meshContext above) so a transcript-reconcile
@@ -6685,6 +6714,7 @@ async function meshSendTask(ctx, args) {
6685
6714
  providerType: resolvedProviderType,
6686
6715
  targetSessionId: args.session_id,
6687
6716
  dispatchedToIdleSession: sessionWasIdle,
6717
+ ...args.node_id ? { selectedNodeId: args.node_id } : {},
6688
6718
  ...ctx.coordinatorSessionId ? { coordinatorSessionId: ctx.coordinatorSessionId } : {},
6689
6719
  // COORD-EVENT-MISROUTE: persist the dispatching coordinator daemon anchor so a
6690
6720
  // transcript-reconcile synth recovers it from the ledger rather than stamping