@adhdev/daemon-standalone 1.0.50-rc.2 → 1.0.50-rc.3

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/dist/index.js CHANGED
@@ -37075,10 +37075,10 @@ var require_dist3 = __commonJS({
37075
37075
  }
37076
37076
  function getDaemonBuildInfo() {
37077
37077
  if (cached2) return cached2;
37078
- const commit = readInjected(true ? "413492581e750d1b33890b790c694af135ae057f" : void 0) ?? "unknown";
37079
- const commitShort = readInjected(true ? "41349258" : void 0) ?? (commit !== "unknown" ? commit.slice(0, 7) : "unknown");
37080
- const version2 = readInjected(true ? "1.0.50-rc.2" : void 0) ?? readInjected(typeof process !== "undefined" ? process.env?.ADHDEV_PKG_VERSION : void 0) ?? "unknown";
37081
- const builtAt = readInjected(true ? "2026-08-16T15:25:02.700Z" : void 0);
37078
+ const commit = readInjected(true ? "c5ed815b44c5354a0d19f1340cddbfb530dff5c2" : void 0) ?? "unknown";
37079
+ const commitShort = readInjected(true ? "c5ed815b" : void 0) ?? (commit !== "unknown" ? commit.slice(0, 7) : "unknown");
37080
+ const version2 = readInjected(true ? "1.0.50-rc.3" : void 0) ?? readInjected(typeof process !== "undefined" ? process.env?.ADHDEV_PKG_VERSION : void 0) ?? "unknown";
37081
+ const builtAt = readInjected(true ? "2026-08-16T16:22:13.076Z" : void 0);
37082
37082
  cached2 = builtAt ? { commit, commitShort, version: version2, builtAt } : { commit, commitShort, version: version2 };
37083
37083
  return cached2;
37084
37084
  }
@@ -52909,13 +52909,19 @@ Valid status values: \`completed\` | \`failed\` | \`blocked\` | \`partial\`.`;
52909
52909
  if (byteLength2(prompt) <= PROMPT_SOFT_CAP_BYTES) return prompt;
52910
52910
  if (usesOverrideBase(ctx)) return prompt;
52911
52911
  const shed = [];
52912
- prompt = assembleCoordinatorPrompt(ctx, { dropOperatingNotes: true });
52913
- shed.push("operating notes");
52912
+ const hasPinnedNotes = (ctx.operatingNotes ?? []).some((note) => note?.pinned === true);
52913
+ prompt = assembleCoordinatorPrompt(ctx, { dropUnpinnedNotes: true });
52914
+ shed.push(hasPinnedNotes ? "unpinned operating notes" : "operating notes");
52914
52915
  if (byteLength2(prompt) <= PROMPT_SOFT_CAP_BYTES) {
52915
52916
  return appendTruncationNotice(prompt, shed);
52916
52917
  }
52917
- prompt = assembleCoordinatorPrompt(ctx, { dropOperatingNotes: true, dropRecentActivity: true });
52918
+ prompt = assembleCoordinatorPrompt(ctx, { dropUnpinnedNotes: true, dropRecentActivity: true });
52918
52919
  shed.push("recent activity");
52920
+ if (byteLength2(prompt) <= PROMPT_SOFT_CAP_BYTES || !hasPinnedNotes) {
52921
+ return appendTruncationNotice(prompt, shed);
52922
+ }
52923
+ prompt = assembleCoordinatorPrompt(ctx, { dropOperatingNotes: true, dropRecentActivity: true });
52924
+ shed.push("pinned operating notes");
52919
52925
  return appendTruncationNotice(prompt, shed);
52920
52926
  }
52921
52927
  function usesOverrideBase(ctx) {
@@ -52983,7 +52989,8 @@ Default branch: \`${mesh.defaultBranch}\`` : ""}`);
52983
52989
  if (recentActivity) sections.push(recentActivity);
52984
52990
  }
52985
52991
  if (!drop.dropOperatingNotes) {
52986
- const operatingNotes = buildOperatingNotesSection(ctx.operatingNotes);
52992
+ const notes = drop.dropUnpinnedNotes ? (ctx.operatingNotes ?? []).filter((note) => note?.pinned === true) : ctx.operatingNotes;
52993
+ const operatingNotes = buildOperatingNotesSection(notes);
52987
52994
  if (operatingNotes) sections.push(operatingNotes);
52988
52995
  }
52989
52996
  sections.push(buildPolicySection(mergeAndNormalizePolicy(void 0, mesh.policy)));
@@ -53141,7 +53148,7 @@ Default branch: \`${mesh.defaultBranch}\`` : ""}`);
53141
53148
  const counts = [];
53142
53149
  if (pending > 0) counts.push(`**${pending}** pending`);
53143
53150
  if (assigned > 0) counts.push(`**${assigned}** assigned`);
53144
- if (stalled > 0) counts.push(`**${stalled}** stalled`);
53151
+ if (stalled > 0) counts.push(`**${stalled}** stalled (all-time ledger total, not current backlog)`);
53145
53152
  if (recentFailureCount > 0) counts.push(`**${recentFailureCount}** failed in the last ${windowMinutes3} min`);
53146
53153
  if (counts.length) lines.push(`- Queue/ledger: ${counts.join(", ")}.`);
53147
53154
  if (activity.lastActivityAt) lines.push(`- Last ledger activity: ${activity.lastActivityAt}.`);
@@ -53375,7 +53382,7 @@ ${rules.join("\n")}`;
53375
53382
  - **Don't split investigation from the fix.** When a task will plainly end in a code change, dispatch it as \`code_change\` from the start rather than a read-only investigation you hand off afterwards. The session that did the investigating already holds the findings; making a second session redo that context \u2014 especially on a different machine, where the findings have to be rewritten into a new task message \u2014 is pure loss. Carrying an investigation forward into its own fix is the SAME subject and belongs in that session (see the idle-session reuse rule). Split only when the fix genuinely belongs on another machine for reason (a) above.
53376
53383
  - **Base nodes are reserved for environment-specific testing.** Do NOT use a base node for a general code change. If a task does not strictly test OS- or machine-specific physical behavior (win32 PATH/registry, clean install/uninstall on one OS, that machine's package-manager state, OS-dependent runtime behavior), you MUST clone a worktree with \`mesh_clone_node\` and assign the task there; pin genuine environment tasks to the base with \`required_tags\`/\`target_node_id\` instead. Having several nodes available is NOT branch isolation \u2014 every base node is one shared checkout of the same branch \u2014 and cloning is ~10s with auto-launch starting the session, so there is no dispatch-cost reason to skip it.
53377
53384
  - **Worktree affinity.** A worktree is a durable per-branch workspace; keep all of a branch's code_change/fix/review work on its worktree node. Target it with \`required_tags: ["worktree=<branch>"]\` or \`target_node_id\`. Get the id/branch from the \`mesh_clone_node\` result or a live \`mesh_status\` \u2014 the Configured Nodes snapshot won't list a worktree cloned after launch. Untargeted same-branch follow-ups drift to the base node. Only \`convergence\` (merge/push) runs on the base, never pinned to the worktree.
53378
- - **Classify task difficulty honestly.** For each task you enqueue, judge its execution difficulty and pass \`difficulty\`: \`easy\` (extraction, renames, doc tweaks, trivial fixes), \`medium\` (ordinary feature/bugfix work), \`difficult\` (architecture, tricky debugging, multi-file refactors, subtle reasoning), or \`freeform\`. This is a ROUTING HINT matched against node capability slots \u2014 the matched slot's OWN model/thinking is what launches, so difficulty does not name a model. Do NOT inflate or deflate difficulty to reach a model you want: fix the node's slots instead (\`mesh_node_slots_set\`). See the "Task difficulty" section below. You may still pass an explicit \`model\`/\`thinkingLevel\` to override for one task.
53385
+ - **Classify task difficulty honestly.** For each task you enqueue, judge its execution difficulty and pass \`difficulty\`: \`easy\` (extraction, renames, doc tweaks, trivial fixes), \`medium\` (ordinary feature/bugfix work), \`difficult\` (architecture, tricky debugging, multi-file refactors, subtle reasoning), or \`freeform\`. This is a ROUTING HINT matched against node capability slots \u2014 the matched slot's OWN model/thinking is what launches, so difficulty does not name a model. Do NOT inflate or deflate difficulty to reach a model you want: fix the node's slots instead (\`mesh_node_slots_set\`). See the "Task difficulty" section above. You may still pass an explicit \`model\`/\`thinkingLevel\` to override for one task.
53379
53386
  - **Retune node profiles when routing is a poor fit \u2014 but only with approval.** A node's capability slots (its provider/model/thinking + difficulty range + capability tags, seen via \`mesh_node_slots_list\`) are what task\u2192node fitness routing matches against. If you notice a persistent mismatch \u2014 e.g. every \`difficult\` task lands on a node whose only slot is a cheap model, or a capability a node clearly has isn't declared \u2014 you MAY propose a slot change with \`mesh_node_slots_set\` (write=false). That returns current-vs-proposed; present that diff to the user with a one-line reason and apply (write=true) ONLY after they approve. It is a WHOLESALE replacement of the node's slots, so include the slots you want to keep. Never rewrite a node's profile silently or without a clear routing reason.
53380
53387
  - **Bootstrap a node's slots from what's actually installed.** When a node has NO slots configured (routing then falls back to "first available provider"), or CLI agents were newly installed on it, call \`mesh_node_slots_propose({ node_id })\` instead of hand-writing a profile. It detects the node's installed CLI agents and drafts a slot list from them \u2014 read-only, it never writes. Present its \`proposedSlots\` with the \`droppedSlots\` / \`destructive\` fields it reports (a wholesale write would delete any existing hand-tuned slot the draft doesn't reproduce, including providers not currently on PATH), then apply with \`mesh_node_slots_set({ slots: proposedSlots, write: true })\` after approval. It flags \`unknownProvider\` / \`provisional\` slots whose placement is a conservative guess rather than an attested one \u2014 call those out rather than presenting them as settled.
53381
53388
  - **Respect explicit provider requests.** Map: Hermes \u2192 \`hermes-cli\`, Claude/Claude Code \u2192 \`claude-cli\`, Codex \u2192 \`codex-cli\`, Gemini \u2192 \`gemini-cli\`, Antigravity \u2192 \`antigravity-cli\`. Never substitute the coordinator's own runtime.
@@ -53422,10 +53429,10 @@ When you compose the task message you dispatch to a node, include this requireme
53422
53429
  init_mesh_node_slots();
53423
53430
  init_mesh_ledger();
53424
53431
  init_dist();
53425
- PROMPT_SOFT_CAP_BYTES = 60 * 1024;
53432
+ PROMPT_SOFT_CAP_BYTES = 96 * 1024;
53426
53433
  OPERATING_NOTES_PROMPT_CAP = 20;
53427
53434
  OPERATING_NOTE_MAX_CHARS = 300;
53428
- OPERATING_NOTE_INJECTION_BYTE_BUDGET = 6 * 1024;
53435
+ OPERATING_NOTE_INJECTION_BYTE_BUDGET = 8 * 1024;
53429
53436
  TOOLS_SECTION = `## Available Tools
53430
53437
 
53431
53438
  | Tool | Purpose |