@adhdev/daemon-standalone 0.9.82-rc.263 → 0.9.82-rc.264

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-C5W61nZC.js"></script>
10
+ <script type="module" crossorigin src="/assets/index-BF7lyi-_.js"></script>
11
11
  <link rel="modulepreload" crossorigin href="/assets/vendor-BHUMCOj6.js">
12
- <link rel="stylesheet" crossorigin href="/assets/index-DW-XJSIP.css">
12
+ <link rel="stylesheet" crossorigin href="/assets/index-CbR_x7-3.css">
13
13
  </head>
14
14
  <body>
15
15
  <!-- Apply theme immediately to prevent FOIT (Flash of Incorrect Theme) -->
@@ -1599,6 +1599,28 @@ function isGitStatusDirty(status) {
1599
1599
  if (Array.isArray(status?.submodules) && status.submodules.some((submodule) => submodule?.dirty || submodule?.outOfSync || submodule?.error)) return true;
1600
1600
  return countUncommittedChanges(status) > 0;
1601
1601
  }
1602
+ var LARGE_LEDGER_FIELD_KEYS = /* @__PURE__ */ new Set(["plan", "validationPlan", "suggestedConfig", "payload"]);
1603
+ var LARGE_LEDGER_OBJECT_THRESHOLD = 800;
1604
+ function summarizeLargeLedgerField(key, value) {
1605
+ if (typeof value === "string") {
1606
+ return value.length > 500 ? value.slice(0, 500) + "\u2026" : value;
1607
+ }
1608
+ if (Array.isArray(value)) {
1609
+ const serialized = JSON.stringify(value);
1610
+ if (serialized && serialized.length > LARGE_LEDGER_OBJECT_THRESHOLD) {
1611
+ return `[${key} summarized: ${value.length} items \u2014 use verbose=true or mesh_reconcile_ledger]`;
1612
+ }
1613
+ return value;
1614
+ }
1615
+ if (value && typeof value === "object") {
1616
+ const serialized = JSON.stringify(value);
1617
+ if (serialized && serialized.length > LARGE_LEDGER_OBJECT_THRESHOLD) {
1618
+ return `[${key} summarized: ${Object.keys(value).length} keys \u2014 use verbose=true or mesh_reconcile_ledger]`;
1619
+ }
1620
+ return value;
1621
+ }
1622
+ return value;
1623
+ }
1602
1624
  function slimLedgerPayload(payload) {
1603
1625
  const slim = {};
1604
1626
  for (const [k, v] of Object.entries(payload)) {
@@ -1607,6 +1629,8 @@ function slimLedgerPayload(payload) {
1607
1629
  } else if (k === "evidence" || k === "workerResult" || k === "gitStatus" || k === "validationResults") {
1608
1630
  } else if (k === "finalSummary") {
1609
1631
  slim[k] = typeof v === "string" && v.length > 300 ? v.slice(0, 300) + "\u2026" : v;
1632
+ } else if (LARGE_LEDGER_FIELD_KEYS.has(k)) {
1633
+ slim[k] = summarizeLargeLedgerField(k, v);
1610
1634
  } else {
1611
1635
  slim[k] = v;
1612
1636
  }
@@ -2312,11 +2336,13 @@ var MESH_PRUNE_STALE_DIRECT_TOOL = {
2312
2336
  };
2313
2337
  var MESH_REFINE_NODE_TOOL = {
2314
2338
  name: "mesh_refine_node",
2315
- description: "The Refinery: Accept an async validation/merge/cleanup job for a completed worktree node. The immediate response includes async:true, status:'accepted', jobId, interactionId, target node, and startedAt; completion/failure evidence is delivered through pending mesh events and the mesh task ledger.",
2339
+ description: "The Refinery: validate \u2192 merge \u2192 push \u2192 clean up a completed worktree node onto the base branch. Defaults to dry-run (plan only): returns the validation plan with mergeWillRun:false/cleanupWillRun:false and performs NO merge/push/cleanup. Pass execute=true to actually converge the node. execute=true is async: the immediate response includes async:true, status:'accepted', jobId, interactionId, target node, and startedAt; completion/failure evidence is delivered through pending mesh events and the mesh task ledger. dry_run=true overrides execute. Matches the mesh_refine_batch / mesh_fast_forward_node dry_run/execute contract.",
2316
2340
  inputSchema: {
2317
2341
  type: "object",
2318
2342
  properties: {
2319
- node_id: { type: "string", description: "Node ID of the completed worktree node to refine and merge." }
2343
+ node_id: { type: "string", description: "Node ID of the completed worktree node to refine and merge." },
2344
+ execute: { type: "boolean", description: "When true, run validation/merge/push/cleanup for this node. Defaults false/dry-run." },
2345
+ dry_run: { type: "boolean", description: "Preview the validation plan without merging. Defaults true unless execute=true; dry_run=true overrides execute." }
2320
2346
  },
2321
2347
  required: ["node_id"]
2322
2348
  }
@@ -2599,6 +2625,7 @@ async function meshStatus(ctx, args = {}) {
2599
2625
  const key = `${daemonId}::${behind.scope ?? ""}::${behind.buildCommit ?? ""}::${behind.head ?? ""}`;
2600
2626
  if (seenStale.has(key)) continue;
2601
2627
  seenStale.add(key);
2628
+ const isDaemonAffecting = behind.isDaemonAffecting !== false;
2602
2629
  staleDaemonBuilds.push({
2603
2630
  daemonId,
2604
2631
  nodeId: entry.nodeId,
@@ -2606,9 +2633,13 @@ async function meshStatus(ctx, args = {}) {
2606
2633
  liveBuildCommit: behind.buildCommit,
2607
2634
  liveBuildCommitShort: behind.buildCommitShort,
2608
2635
  head: behind.head,
2636
+ isDaemonAffecting,
2637
+ ...Array.isArray(behind.affectedPackages) && behind.affectedPackages.length > 0 ? { affectedPackages: behind.affectedPackages } : {},
2609
2638
  warning: behind.warning
2610
2639
  });
2611
2640
  }
2641
+ const daemonAffectingStaleBuilds = staleDaemonBuilds.filter((b) => b.isDaemonAffecting !== false);
2642
+ const webOnlyStaleBuilds = staleDaemonBuilds.filter((b) => b.isDaemonAffecting === false);
2612
2643
  const nodesForResponse = compact ? results.map((entry) => {
2613
2644
  if (!entry || typeof entry !== "object") return entry;
2614
2645
  const next = { ...entry };
@@ -2639,9 +2670,12 @@ async function meshStatus(ctx, args = {}) {
2639
2670
  nodes: nodesForResponse,
2640
2671
  ...compact && Object.keys(daemonSessions).length > 0 ? { daemonSessions } : {},
2641
2672
  ...Object.keys(daemonBuilds).length > 0 ? { daemonBuilds } : {},
2642
- ...staleDaemonBuilds.length > 0 ? {
2643
- staleDaemonBuilds,
2644
- staleDaemonBuildWarning: "One or more live daemons were built from a commit behind the workspace HEAD. Merged refinery/mesh-tool fixes are NOT live on those daemons until they are rebuilt/redeployed and restarted \u2014 a local daemon-core dist rebuild does not update a cloud daemon. Do not assume a just-merged fix is active."
2673
+ ...staleDaemonBuilds.length > 0 ? { staleDaemonBuilds } : {},
2674
+ ...daemonAffectingStaleBuilds.length > 0 ? {
2675
+ staleDaemonBuildWarning: "One or more live daemons were built from a commit behind the workspace HEAD with daemon-runtime package changes. Merged refinery/mesh-tool fixes are NOT live on those daemons until they are rebuilt/redeployed and restarted \u2014 a local daemon-core dist rebuild does not update a cloud daemon. Do not assume a just-merged fix is active."
2676
+ } : {},
2677
+ ...webOnlyStaleBuilds.length > 0 ? {
2678
+ webOnlyStaleBuildNote: 'One or more live daemons are behind workspace HEAD, but only web packages changed in that range. The daemon does NOT need a rebuild/restart \u2014 redeploy the web app to reflect those changes. This is informational, not a "fix not live" condition.'
2645
2679
  } : {},
2646
2680
  activeWork: activeWorkEvidence.activeWork,
2647
2681
  staleDirectWorkSummary,
@@ -2710,7 +2744,8 @@ async function meshTaskHistory(ctx, args) {
2710
2744
  const compact = args.verbose === true ? false : args.compact ?? true;
2711
2745
  const pendingEvents = await drainCoordinatorPendingEvents(ctx);
2712
2746
  const requestedTail = typeof args.tail === "number" && args.tail > 0 ? Math.floor(args.tail) : 20;
2713
- const tail = compact ? Math.min(requestedTail, 40) : Math.min(requestedTail, 200);
2747
+ const compactCap = requestedTail > 50 ? 20 : 30;
2748
+ const tail = compact ? Math.min(requestedTail, compactCap) : Math.min(requestedTail, 200);
2714
2749
  const kind = typeof args.kind === "string" && args.kind.trim() ? [args.kind.trim()] : void 0;
2715
2750
  const rawEntries = (0, import_daemon_core.readLedgerEntries)(mesh.id, { tail, kind });
2716
2751
  const entries = compact ? rawEntries.map((e) => ({
@@ -3934,6 +3969,8 @@ async function meshRefineNode(ctx, args) {
3934
3969
  const result = await commandForNode(ctx, node, "refine_mesh_node", {
3935
3970
  meshId: ctx.mesh.id,
3936
3971
  nodeId: args.node_id,
3972
+ ...args.execute !== void 0 ? { execute: args.execute } : {},
3973
+ ...args.dry_run !== void 0 ? { dryRun: args.dry_run } : {},
3937
3974
  inlineMesh: ctx.mesh
3938
3975
  });
3939
3976
  if (result?.success && result.async !== true && result.removeResult?.removed !== false) {