@adhdev/daemon-standalone 0.9.76-rc.57 → 0.9.76-rc.59
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 +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/vendor/mcp-server/index.js +51 -3
- package/vendor/mcp-server/index.js.map +1 -1
package/package.json
CHANGED
|
@@ -25756,7 +25756,7 @@ function buildRulesSection(coordinatorCliType) {
|
|
|
25756
25756
|
- **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.
|
|
25757
25757
|
- **Respect explicit provider requests.** If the user names an agent/provider, pass the matching provider type to \`mesh_launch_session\`: Hermes \u2192 \`hermes-cli\`, Claude Code/Claude \u2192 \`claude-cli\`, Codex \u2192 \`codex-cli\`, Gemini \u2192 \`gemini-cli\`. Never substitute \`claude-cli\` just because the coordinator itself is Claude Code.
|
|
25758
25758
|
- **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.
|
|
25759
|
-
- **Don't inspect code.**
|
|
25759
|
+
- **Don't inspect code.** Treat delegated agent summaries as self-reports, not verification. Verify side effects via \`mesh_git_status\` (including related repo freshness when configured), not by reading source files.
|
|
25760
25760
|
- **Don't over-parallelize.** Start with 1-2 concurrent tasks. Scale up if they succeed. Never launch a duplicate session or second worker solely because \`mesh_read_chat\` has no final assistant message while the delegated session is still showing tool/terminal activity.
|
|
25761
25761
|
- **Handle failures gracefully.** If a task fails, read the chat to understand why, then retry or reassign.
|
|
25762
25762
|
- **Keep the user informed.** Report progress after each delegation round \u2014 one or two sentences, not a narration.
|
|
@@ -57192,6 +57192,49 @@ function isGitStatusDirty(status) {
|
|
|
57192
57192
|
if (typeof status?.dirty === "boolean") return status.dirty;
|
|
57193
57193
|
return countUncommittedChanges(status) > 0;
|
|
57194
57194
|
}
|
|
57195
|
+
function readRelatedRepos(node) {
|
|
57196
|
+
const raw = Array.isArray(node.relatedRepos) ? node.relatedRepos : Array.isArray(node.policy?.relatedRepos) ? node.policy.relatedRepos : [];
|
|
57197
|
+
return raw.map((entry) => ({
|
|
57198
|
+
label: typeof entry?.label === "string" ? entry.label.trim() : "",
|
|
57199
|
+
workspace: typeof entry?.workspace === "string" ? entry.workspace.trim() : ""
|
|
57200
|
+
})).filter((entry) => Boolean(entry.label && entry.workspace));
|
|
57201
|
+
}
|
|
57202
|
+
function summarizeRelatedRepoStatus(repo, status) {
|
|
57203
|
+
const dirty = isGitStatusDirty(status);
|
|
57204
|
+
return {
|
|
57205
|
+
label: repo.label,
|
|
57206
|
+
workspace: repo.workspace,
|
|
57207
|
+
isGitRepo: status?.isGitRepo === true,
|
|
57208
|
+
branch: status?.branch ?? null,
|
|
57209
|
+
ahead: Number.isFinite(Number(status?.ahead)) ? Number(status.ahead) : 0,
|
|
57210
|
+
behind: Number.isFinite(Number(status?.behind)) ? Number(status.behind) : 0,
|
|
57211
|
+
dirty,
|
|
57212
|
+
uncommittedChanges: countUncommittedChanges(status),
|
|
57213
|
+
head: status?.headCommit ?? null,
|
|
57214
|
+
lastCommitSummary: status?.headMessage ?? null,
|
|
57215
|
+
...status?.reason ? { reason: status.reason } : {},
|
|
57216
|
+
...status?.error ? { error: status.error } : {}
|
|
57217
|
+
};
|
|
57218
|
+
}
|
|
57219
|
+
async function collectRelatedRepoStatuses(ctx, node) {
|
|
57220
|
+
const relatedRepos = readRelatedRepos(node);
|
|
57221
|
+
if (!relatedRepos.length) return [];
|
|
57222
|
+
const results = [];
|
|
57223
|
+
for (const repo of relatedRepos) {
|
|
57224
|
+
try {
|
|
57225
|
+
const statusResult = !isLocalTransport(ctx.transport) && node.daemonId ? await ctx.transport.gitStatus(node.daemonId, repo.workspace, false) : await commandForNode(ctx, node, "git_status", { workspace: repo.workspace });
|
|
57226
|
+
const status = extractGitStatus(statusResult);
|
|
57227
|
+
results.push(summarizeRelatedRepoStatus(repo, status));
|
|
57228
|
+
} catch (e) {
|
|
57229
|
+
results.push({
|
|
57230
|
+
label: repo.label,
|
|
57231
|
+
workspace: repo.workspace,
|
|
57232
|
+
error: e?.message || "related repo status failed"
|
|
57233
|
+
});
|
|
57234
|
+
}
|
|
57235
|
+
}
|
|
57236
|
+
return results;
|
|
57237
|
+
}
|
|
57195
57238
|
function readProviderPriority(policy) {
|
|
57196
57239
|
const raw = policy?.providerPriority;
|
|
57197
57240
|
return Array.isArray(raw) ? raw.map((type2) => typeof type2 === "string" ? type2.trim() : "").filter(Boolean) : [];
|
|
@@ -57432,6 +57475,8 @@ async function meshStatus(ctx) {
|
|
|
57432
57475
|
entry.health = "degraded";
|
|
57433
57476
|
entry.error = e.message;
|
|
57434
57477
|
}
|
|
57478
|
+
const relatedRepos = await collectRelatedRepoStatuses(ctx, node);
|
|
57479
|
+
if (relatedRepos.length) entry.relatedRepos = relatedRepos;
|
|
57435
57480
|
results.push(entry);
|
|
57436
57481
|
}
|
|
57437
57482
|
return JSON.stringify({
|
|
@@ -57455,6 +57500,7 @@ async function meshListNodes(ctx) {
|
|
|
57455
57500
|
repoRoot: n.repoRoot,
|
|
57456
57501
|
isLocalWorktree: n.isLocalWorktree,
|
|
57457
57502
|
policy: n.policy,
|
|
57503
|
+
relatedRepos: readRelatedRepos(n),
|
|
57458
57504
|
...getNodeLaunchReadiness(n),
|
|
57459
57505
|
userOverrides: n.userOverrides
|
|
57460
57506
|
}))
|
|
@@ -57592,7 +57638,8 @@ async function meshGitStatus(ctx, args) {
|
|
|
57592
57638
|
nodeId: args.node_id,
|
|
57593
57639
|
workspace: node.workspace,
|
|
57594
57640
|
status: extractGitStatus(result),
|
|
57595
|
-
diff: extractGitDiff(result)
|
|
57641
|
+
diff: extractGitDiff(result),
|
|
57642
|
+
relatedRepos: await collectRelatedRepoStatuses(ctx, node)
|
|
57596
57643
|
}, null, 2);
|
|
57597
57644
|
} else if (isLocalTransport(ctx.transport)) {
|
|
57598
57645
|
const statusResult = await commandForNode(ctx, node, "git_status", {
|
|
@@ -57605,7 +57652,8 @@ async function meshGitStatus(ctx, args) {
|
|
|
57605
57652
|
nodeId: args.node_id,
|
|
57606
57653
|
workspace: node.workspace,
|
|
57607
57654
|
status: extractGitStatus(statusResult),
|
|
57608
|
-
diff: extractGitDiff(diffResult)
|
|
57655
|
+
diff: extractGitDiff(diffResult),
|
|
57656
|
+
relatedRepos: await collectRelatedRepoStatuses(ctx, node)
|
|
57609
57657
|
}, null, 2);
|
|
57610
57658
|
} else {
|
|
57611
57659
|
return JSON.stringify({ error: "No daemonId available for cloud git_status probe" });
|