adhdev 0.9.75 → 0.9.76-rc.2

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
@@ -2387,7 +2387,7 @@ function buildNodeConfigSection(mesh) {
2387
2387
  for (const n of mesh.nodes) {
2388
2388
  const labels = [];
2389
2389
  if (n.isLocalWorktree) labels.push("worktree");
2390
- if (n.policy.readOnly) labels.push("read-only");
2390
+ if (n.policy?.readOnly) labels.push("read-only");
2391
2391
  const suffix = labels.length ? ` [${labels.join(", ")}]` : "";
2392
2392
  lines.push(`- **${n.workspace}** (${n.id})${suffix}`);
2393
2393
  }
@@ -2433,18 +2433,20 @@ var init_coordinator_prompt = __esm({
2433
2433
  3. **Delegate** \u2014 For each task:
2434
2434
  a. Pick the best node (consider: health, dirty state, current workload).
2435
2435
  b. If no session exists, call \`mesh_launch_session\` to start one.
2436
- c. Call \`mesh_send_task\` with a clear, self-contained natural-language instruction.
2436
+ c. Call \`mesh_send_task\` with a **complete, self-contained** instruction that includes all context the agent needs (file paths, line numbers, what to change, why). Do not send partial instructions expecting future follow-up.
2437
2437
  4. **Monitor** \u2014 Periodically call \`mesh_read_chat\` to check progress. Handle approvals via \`mesh_approve\`.
2438
2438
  5. **Verify** \u2014 When a task reports completion, call \`mesh_git_status\` to verify changes were made.
2439
2439
  6. **Checkpoint** \u2014 Call \`mesh_checkpoint\` to save the work.
2440
2440
  7. **Report** \u2014 Summarize what was done, what changed, and any issues.`;
2441
2441
  RULES_SECTION = `## Rules
2442
2442
 
2443
- - **Be conversational.** Delegate work the way a tech lead would \u2014 clear, specific instructions in natural language.
2444
- - **Don't inspect code.** Trust the agent's output. Verify via git diff/status, not by reading source files.
2443
+ - **Minimize coordinator context.** The coordinator's job is routing, not implementing. Do not read source files, run commands, or analyze code directly \u2014 delegate all of that to node agents. Your context should stay lean.
2444
+ - **Delegate analysis too.** If you need to understand a bug or explore the codebase, send that investigation as a task to a node. Do not do it yourself.
2445
+ - **Front-load the task message.** When calling \`mesh_send_task\`, include everything the agent needs: what files to touch, what the problem is, what the fix should look like. The agent won't ask follow-up questions.
2446
+ - **Don't inspect code.** Trust the agent's output. Verify via \`mesh_git_status\`, not by reading source files.
2445
2447
  - **Don't over-parallelize.** Start with 1-2 concurrent tasks. Scale up if they succeed.
2446
2448
  - **Handle failures gracefully.** If a task fails, read the chat to understand why, then retry or reassign.
2447
- - **Keep the user informed.** Report progress after each delegation round.
2449
+ - **Keep the user informed.** Report progress after each delegation round \u2014 one or two sentences, not a narration.
2448
2450
  - **Respect node capabilities.** Don't send build tasks to read-only nodes. Don't push from nodes that aren't allowed to.
2449
2451
  - **Never fabricate tool results.** Always call the actual tool; never pretend you did.`;
2450
2452
  }
@@ -13676,6 +13678,10 @@ var init_provider_cli_adapter = __esm({
13676
13678
  const currentSnapshot = normalizeScreenSnapshot(screenText);
13677
13679
  const lastSnapshot = this.lastScreenSnapshot;
13678
13680
  if (!lastSnapshot || lastSnapshot === currentSnapshot) return screenText;
13681
+ const staleSnapshotLooksActive = /\besc to (?:interrupt|stop)\b|Enter to interrupt, Ctrl\+C to cancel/i.test(lastSnapshot);
13682
+ const currentScreenLooksIdle = /(?:^|\n|\r)\s*[❯›>]\s*(?:\n|\r|$)/.test(screenText) && !/\besc to (?:interrupt|stop)\b|Enter to interrupt, Ctrl\+C to cancel/i.test(screenText);
13683
+ if (staleSnapshotLooksActive && currentScreenLooksIdle) return screenText;
13684
+ if (currentSnapshot.length >= lastSnapshot.length) return screenText;
13679
13685
  return `${screenText}
13680
13686
  ${lastSnapshot}`;
13681
13687
  }
@@ -59148,7 +59154,7 @@ var init_adhdev_daemon = __esm({
59148
59154
  init_version();
59149
59155
  init_src();
59150
59156
  init_runtime_defaults();
59151
- pkgVersion = resolvePackageVersion({ injectedVersion: "0.9.75" });
59157
+ pkgVersion = resolvePackageVersion({ injectedVersion: "0.9.76-rc.2" });
59152
59158
  AdhdevDaemon = class _AdhdevDaemon {
59153
59159
  localHttpServer = null;
59154
59160
  localWss = null;