@adhdev/daemon-standalone 0.9.76-rc.56 → 0.9.76-rc.58

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,7 +7,7 @@
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-B2Vx7PG3.js"></script>
10
+ <script type="module" crossorigin src="/assets/index-CPCf-dYE.js"></script>
11
11
  <link rel="modulepreload" crossorigin href="/assets/vendor-CLec0455.js">
12
12
  <link rel="stylesheet" crossorigin href="/assets/index-Pbz3ARg_.css">
13
13
  </head>
@@ -25756,8 +25756,8 @@ 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.** Trust the agent's output. Verify via \`mesh_git_status\`, not by reading source files.
25760
- - **Don't over-parallelize.** Start with 1-2 concurrent tasks. Scale up if they succeed.
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
+ - **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.
25763
25763
  - **Respect node capabilities.** Don't send build tasks to read-only nodes. Don't push from nodes that aren't allowed to.
@@ -28803,18 +28803,22 @@ function readMessageMeta(message) {
28803
28803
  function readStringField(value) {
28804
28804
  return typeof value === "string" ? value.trim().toLowerCase() : "";
28805
28805
  }
28806
+ function readVisibilityField(message, meta3) {
28807
+ const record2 = message;
28808
+ return readStringField(record2.visibility ?? record2.transcriptVisibility ?? meta3?.visibility ?? meta3?.transcriptVisibility);
28809
+ }
28806
28810
  function isExplicitlyHiddenFromTranscript(message, meta3) {
28807
28811
  const record2 = message;
28808
- const visibility = readStringField(record2.visibility || meta3?.visibility || meta3?.transcriptVisibility);
28809
- const audience = readStringField(record2.audience || meta3?.audience);
28810
- const source = readStringField(record2.source || meta3?.source);
28811
- return visibility === "hidden" || visibility === "debug" || visibility === "internal" || audience === "debug" || audience === "trace" || audience === "internal" || source === "runtime_status" || source === "provider_chrome" || source === "control" || record2.internal === true || record2.isInternal === true || record2.debug === true || meta3?.internal === true || meta3?.isInternal === true || meta3?.debug === true || meta3?.statusOnly === true || meta3?.controlOnly === true;
28812
+ const visibility = readVisibilityField(message, meta3);
28813
+ const audience = readStringField(record2.audience ?? meta3?.audience);
28814
+ const source = readStringField(record2.source ?? meta3?.source);
28815
+ return visibility === "hidden" || visibility === "debug" || visibility === "internal" || audience === "debug" || audience === "trace" || audience === "internal" || source === "runtime_status" || source === "runtime_activity" || source === "provider_chrome" || source === "control" || record2.internal === true || record2.isInternal === true || record2.debug === true || meta3?.internal === true || meta3?.isInternal === true || meta3?.debug === true || meta3?.statusOnly === true || meta3?.controlOnly === true;
28812
28816
  }
28813
28817
  function isExplicitlyVisibleInTranscript(message, meta3) {
28814
28818
  const record2 = message;
28815
- const visibility = readStringField(record2.visibility || meta3?.visibility || meta3?.transcriptVisibility);
28816
- const audience = readStringField(record2.audience || meta3?.audience);
28817
- return visibility === "visible" || visibility === "user" || audience === "chat" || record2.userFacing === true || meta3?.userFacing === true;
28819
+ const visibility = readVisibilityField(message, meta3);
28820
+ const audience = readStringField(record2.audience ?? meta3?.audience);
28821
+ return visibility === "visible" || visibility === "user" || visibility === "chat" || audience === "chat" || record2.userFacing === true || meta3?.userFacing === true;
28818
28822
  }
28819
28823
  function isUserFacingChatMessage(message) {
28820
28824
  if (!message) return false;
@@ -30009,6 +30013,14 @@ function validateMessage(message, source, index) {
30009
30013
  if (typeof message.senderName === "string") normalized.senderName = message.senderName;
30010
30014
  if (typeof message._type === "string") normalized._type = message._type;
30011
30015
  if (typeof message._sub === "string") normalized._sub = message._sub;
30016
+ if (typeof message.visibility === "string") normalized.visibility = message.visibility;
30017
+ if (typeof message.transcriptVisibility === "string") normalized.transcriptVisibility = message.transcriptVisibility;
30018
+ if (typeof message.audience === "string") normalized.audience = message.audience;
30019
+ if (typeof message.source === "string") normalized.source = message.source;
30020
+ if (typeof message.userFacing === "boolean") normalized.userFacing = message.userFacing;
30021
+ if (typeof message.internal === "boolean") normalized.internal = message.internal;
30022
+ if (typeof message.isInternal === "boolean") normalized.isInternal = message.isInternal;
30023
+ if (typeof message.debug === "boolean") normalized.debug = message.debug;
30012
30024
  return normalized;
30013
30025
  }
30014
30026
  function validateModal(activeModal, status, source) {
@@ -40170,8 +40182,8 @@ var init_dist2 = __esm({
40170
40182
  b. If you need branch isolation for parallel work, call \`mesh_clone_node\` to create a worktree node first.
40171
40183
  c. If no session exists, call \`mesh_launch_session\` to start one.
40172
40184
  d. 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.
40173
- 4. **Monitor** \u2014 Periodically call \`mesh_read_chat\` to check progress. Handle approvals via \`mesh_approve\`.
40174
- 5. **Verify** \u2014 When a task reports completion, call \`mesh_git_status\` to verify changes were made.
40185
+ 4. **Monitor** \u2014 Prefer event-driven completion/status notifications. Do **not** poll \`mesh_read_chat\` repeatedly just because the delegated session has not produced a final assistant message yet; tool/terminal activity means work may still be in progress. Use at most one compact \`mesh_read_chat\` check after a completion/approval signal, an explicit user status request, or a real timeout/stall. Handle approvals via \`mesh_approve\`.
40186
+ 5. **Verify** \u2014 When a task reports completion or git work is visible, call \`mesh_git_status\` to verify changes were made.
40175
40187
  6. **Checkpoint** \u2014 Call \`mesh_checkpoint\` to save the work.
40176
40188
  7. **Clean up** \u2014 Remove worktree nodes via \`mesh_remove_node\` after their work is merged or no longer needed.
40177
40189
  8. **Report** \u2014 Summarize what was done, what changed, and any issues.`;
@@ -57180,6 +57192,49 @@ function isGitStatusDirty(status) {
57180
57192
  if (typeof status?.dirty === "boolean") return status.dirty;
57181
57193
  return countUncommittedChanges(status) > 0;
57182
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
+ }
57183
57238
  function readProviderPriority(policy) {
57184
57239
  const raw = policy?.providerPriority;
57185
57240
  return Array.isArray(raw) ? raw.map((type2) => typeof type2 === "string" ? type2.trim() : "").filter(Boolean) : [];
@@ -57420,6 +57475,8 @@ async function meshStatus(ctx) {
57420
57475
  entry.health = "degraded";
57421
57476
  entry.error = e.message;
57422
57477
  }
57478
+ const relatedRepos = await collectRelatedRepoStatuses(ctx, node);
57479
+ if (relatedRepos.length) entry.relatedRepos = relatedRepos;
57423
57480
  results.push(entry);
57424
57481
  }
57425
57482
  return JSON.stringify({
@@ -57443,6 +57500,7 @@ async function meshListNodes(ctx) {
57443
57500
  repoRoot: n.repoRoot,
57444
57501
  isLocalWorktree: n.isLocalWorktree,
57445
57502
  policy: n.policy,
57503
+ relatedRepos: readRelatedRepos(n),
57446
57504
  ...getNodeLaunchReadiness(n),
57447
57505
  userOverrides: n.userOverrides
57448
57506
  }))
@@ -57580,7 +57638,8 @@ async function meshGitStatus(ctx, args) {
57580
57638
  nodeId: args.node_id,
57581
57639
  workspace: node.workspace,
57582
57640
  status: extractGitStatus(result),
57583
- diff: extractGitDiff(result)
57641
+ diff: extractGitDiff(result),
57642
+ relatedRepos: await collectRelatedRepoStatuses(ctx, node)
57584
57643
  }, null, 2);
57585
57644
  } else if (isLocalTransport(ctx.transport)) {
57586
57645
  const statusResult = await commandForNode(ctx, node, "git_status", {
@@ -57593,7 +57652,8 @@ async function meshGitStatus(ctx, args) {
57593
57652
  nodeId: args.node_id,
57594
57653
  workspace: node.workspace,
57595
57654
  status: extractGitStatus(statusResult),
57596
- diff: extractGitDiff(diffResult)
57655
+ diff: extractGitDiff(diffResult),
57656
+ relatedRepos: await collectRelatedRepoStatuses(ctx, node)
57597
57657
  }, null, 2);
57598
57658
  } else {
57599
57659
  return JSON.stringify({ error: "No daemonId available for cloud git_status probe" });