@adhdev/daemon-core 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 +11 -5
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +11 -5
- package/dist/index.mjs.map +1 -1
- package/dist/repo-mesh-types.d.ts +1 -0
- package/package.json +2 -2
- package/src/cli-adapters/provider-cli-adapter.ts +7 -1
- package/src/mesh/coordinator-prompt.ts +7 -5
- package/src/repo-mesh-types.ts +1 -0
- package/node_modules/@adhdev/session-host-core/dist/defaults.d.mts +0 -6
- package/node_modules/@adhdev/session-host-core/dist/defaults.d.ts +0 -6
- package/node_modules/@adhdev/session-host-core/dist/defaults.js +0 -49
- package/node_modules/@adhdev/session-host-core/dist/defaults.js.map +0 -1
- package/node_modules/@adhdev/session-host-core/dist/defaults.mjs +0 -21
- package/node_modules/@adhdev/session-host-core/dist/defaults.mjs.map +0 -1
- package/node_modules/@adhdev/session-host-core/dist/index.d.mts +0 -444
- package/node_modules/@adhdev/session-host-core/dist/index.d.ts +0 -444
- package/node_modules/@adhdev/session-host-core/dist/index.js +0 -702
- package/node_modules/@adhdev/session-host-core/dist/index.js.map +0 -1
- package/node_modules/@adhdev/session-host-core/dist/index.mjs +0 -648
- package/node_modules/@adhdev/session-host-core/dist/index.mjs.map +0 -1
- package/node_modules/@adhdev/session-host-core/package.json +0 -49
package/dist/index.mjs
CHANGED
|
@@ -487,7 +487,7 @@ function buildNodeConfigSection(mesh) {
|
|
|
487
487
|
for (const n of mesh.nodes) {
|
|
488
488
|
const labels = [];
|
|
489
489
|
if (n.isLocalWorktree) labels.push("worktree");
|
|
490
|
-
if (n.policy
|
|
490
|
+
if (n.policy?.readOnly) labels.push("read-only");
|
|
491
491
|
const suffix = labels.length ? ` [${labels.join(", ")}]` : "";
|
|
492
492
|
lines.push(`- **${n.workspace}** (${n.id})${suffix}`);
|
|
493
493
|
}
|
|
@@ -533,18 +533,20 @@ var init_coordinator_prompt = __esm({
|
|
|
533
533
|
3. **Delegate** \u2014 For each task:
|
|
534
534
|
a. Pick the best node (consider: health, dirty state, current workload).
|
|
535
535
|
b. If no session exists, call \`mesh_launch_session\` to start one.
|
|
536
|
-
c. Call \`mesh_send_task\` with a
|
|
536
|
+
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.
|
|
537
537
|
4. **Monitor** \u2014 Periodically call \`mesh_read_chat\` to check progress. Handle approvals via \`mesh_approve\`.
|
|
538
538
|
5. **Verify** \u2014 When a task reports completion, call \`mesh_git_status\` to verify changes were made.
|
|
539
539
|
6. **Checkpoint** \u2014 Call \`mesh_checkpoint\` to save the work.
|
|
540
540
|
7. **Report** \u2014 Summarize what was done, what changed, and any issues.`;
|
|
541
541
|
RULES_SECTION = `## Rules
|
|
542
542
|
|
|
543
|
-
- **
|
|
544
|
-
- **
|
|
543
|
+
- **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.
|
|
544
|
+
- **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.
|
|
545
|
+
- **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.
|
|
546
|
+
- **Don't inspect code.** Trust the agent's output. Verify via \`mesh_git_status\`, not by reading source files.
|
|
545
547
|
- **Don't over-parallelize.** Start with 1-2 concurrent tasks. Scale up if they succeed.
|
|
546
548
|
- **Handle failures gracefully.** If a task fails, read the chat to understand why, then retry or reassign.
|
|
547
|
-
- **Keep the user informed.** Report progress after each delegation round.
|
|
549
|
+
- **Keep the user informed.** Report progress after each delegation round \u2014 one or two sentences, not a narration.
|
|
548
550
|
- **Respect node capabilities.** Don't send build tasks to read-only nodes. Don't push from nodes that aren't allowed to.
|
|
549
551
|
- **Never fabricate tool results.** Always call the actual tool; never pretend you did.`;
|
|
550
552
|
}
|
|
@@ -1760,6 +1762,10 @@ var init_provider_cli_adapter = __esm({
|
|
|
1760
1762
|
const currentSnapshot = normalizeScreenSnapshot(screenText);
|
|
1761
1763
|
const lastSnapshot = this.lastScreenSnapshot;
|
|
1762
1764
|
if (!lastSnapshot || lastSnapshot === currentSnapshot) return screenText;
|
|
1765
|
+
const staleSnapshotLooksActive = /\besc to (?:interrupt|stop)\b|Enter to interrupt, Ctrl\+C to cancel/i.test(lastSnapshot);
|
|
1766
|
+
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);
|
|
1767
|
+
if (staleSnapshotLooksActive && currentScreenLooksIdle) return screenText;
|
|
1768
|
+
if (currentSnapshot.length >= lastSnapshot.length) return screenText;
|
|
1763
1769
|
return `${screenText}
|
|
1764
1770
|
${lastSnapshot}`;
|
|
1765
1771
|
}
|