@adhdev/daemon-standalone 0.9.76-rc.55 → 0.9.76-rc.57
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 +39 -22
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/public/assets/index-CPCf-dYE.js +96 -0
- package/public/index.html +1 -1
- package/vendor/mcp-server/index.js +39 -22
- package/vendor/mcp-server/index.js.map +1 -1
package/dist/index.js
CHANGED
|
@@ -31863,7 +31863,7 @@ ${rules.join("\n")}`;
|
|
|
31863
31863
|
- **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.
|
|
31864
31864
|
- **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.
|
|
31865
31865
|
- **Don't inspect code.** Trust the agent's output. Verify via \`mesh_git_status\`, not by reading source files.
|
|
31866
|
-
- **Don't over-parallelize.** Start with 1-2 concurrent tasks. Scale up if they succeed.
|
|
31866
|
+
- **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.
|
|
31867
31867
|
- **Handle failures gracefully.** If a task fails, read the chat to understand why, then retry or reassign.
|
|
31868
31868
|
- **Keep the user informed.** Report progress after each delegation round \u2014 one or two sentences, not a narration.
|
|
31869
31869
|
- **Respect node capabilities.** Don't send build tasks to read-only nodes. Don't push from nodes that aren't allowed to.
|
|
@@ -31900,8 +31900,8 @@ ${rules.join("\n")}`;
|
|
|
31900
31900
|
b. If you need branch isolation for parallel work, call \`mesh_clone_node\` to create a worktree node first.
|
|
31901
31901
|
c. If no session exists, call \`mesh_launch_session\` to start one.
|
|
31902
31902
|
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.
|
|
31903
|
-
4. **Monitor** \u2014
|
|
31904
|
-
5. **Verify** \u2014 When a task reports completion, call \`mesh_git_status\` to verify changes were made.
|
|
31903
|
+
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\`.
|
|
31904
|
+
5. **Verify** \u2014 When a task reports completion or git work is visible, call \`mesh_git_status\` to verify changes were made.
|
|
31905
31905
|
6. **Checkpoint** \u2014 Call \`mesh_checkpoint\` to save the work.
|
|
31906
31906
|
7. **Clean up** \u2014 Remove worktree nodes via \`mesh_remove_node\` after their work is merged or no longer needed.
|
|
31907
31907
|
8. **Report** \u2014 Summarize what was done, what changed, and any issues.`;
|
|
@@ -39302,21 +39302,31 @@ ${lastSnapshot}`;
|
|
|
39302
39302
|
const meta3 = message?.meta;
|
|
39303
39303
|
return meta3 && typeof meta3 === "object" && !Array.isArray(meta3) ? meta3 : null;
|
|
39304
39304
|
}
|
|
39305
|
-
function
|
|
39306
|
-
|
|
39307
|
-
const visibility = typeof meta3.transcriptVisibility === "string" ? meta3.transcriptVisibility.trim().toLowerCase() : "";
|
|
39308
|
-
return visibility === "hidden" || visibility === "debug" || meta3.internal === true || meta3.debug === true || meta3.statusOnly === true || meta3.controlOnly === true;
|
|
39305
|
+
function readStringField(value) {
|
|
39306
|
+
return typeof value === "string" ? value.trim().toLowerCase() : "";
|
|
39309
39307
|
}
|
|
39310
|
-
function
|
|
39311
|
-
|
|
39312
|
-
|
|
39313
|
-
|
|
39308
|
+
function readVisibilityField(message, meta3) {
|
|
39309
|
+
const record2 = message;
|
|
39310
|
+
return readStringField(record2.visibility ?? record2.transcriptVisibility ?? meta3?.visibility ?? meta3?.transcriptVisibility);
|
|
39311
|
+
}
|
|
39312
|
+
function isExplicitlyHiddenFromTranscript(message, meta3) {
|
|
39313
|
+
const record2 = message;
|
|
39314
|
+
const visibility = readVisibilityField(message, meta3);
|
|
39315
|
+
const audience = readStringField(record2.audience ?? meta3?.audience);
|
|
39316
|
+
const source = readStringField(record2.source ?? meta3?.source);
|
|
39317
|
+
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;
|
|
39318
|
+
}
|
|
39319
|
+
function isExplicitlyVisibleInTranscript(message, meta3) {
|
|
39320
|
+
const record2 = message;
|
|
39321
|
+
const visibility = readVisibilityField(message, meta3);
|
|
39322
|
+
const audience = readStringField(record2.audience ?? meta3?.audience);
|
|
39323
|
+
return visibility === "visible" || visibility === "user" || visibility === "chat" || audience === "chat" || record2.userFacing === true || meta3?.userFacing === true;
|
|
39314
39324
|
}
|
|
39315
39325
|
function isUserFacingChatMessage(message) {
|
|
39316
39326
|
if (!message) return false;
|
|
39317
39327
|
const meta3 = readMessageMeta(message);
|
|
39318
|
-
if (isExplicitlyHiddenFromTranscript(meta3)) return false;
|
|
39319
|
-
if (isExplicitlyVisibleInTranscript(meta3)) return true;
|
|
39328
|
+
if (isExplicitlyHiddenFromTranscript(message, meta3)) return false;
|
|
39329
|
+
if (isExplicitlyVisibleInTranscript(message, meta3)) return true;
|
|
39320
39330
|
const role = typeof message.role === "string" ? message.role.trim().toLowerCase() : "";
|
|
39321
39331
|
const kind = resolveChatMessageKind(message);
|
|
39322
39332
|
if (role === "user" || role === "human") return kind === "standard" || kind === "";
|
|
@@ -41284,6 +41294,14 @@ ${effect.notification.body || ""}`.trim();
|
|
|
41284
41294
|
if (typeof message.senderName === "string") normalized.senderName = message.senderName;
|
|
41285
41295
|
if (typeof message._type === "string") normalized._type = message._type;
|
|
41286
41296
|
if (typeof message._sub === "string") normalized._sub = message._sub;
|
|
41297
|
+
if (typeof message.visibility === "string") normalized.visibility = message.visibility;
|
|
41298
|
+
if (typeof message.transcriptVisibility === "string") normalized.transcriptVisibility = message.transcriptVisibility;
|
|
41299
|
+
if (typeof message.audience === "string") normalized.audience = message.audience;
|
|
41300
|
+
if (typeof message.source === "string") normalized.source = message.source;
|
|
41301
|
+
if (typeof message.userFacing === "boolean") normalized.userFacing = message.userFacing;
|
|
41302
|
+
if (typeof message.internal === "boolean") normalized.internal = message.internal;
|
|
41303
|
+
if (typeof message.isInternal === "boolean") normalized.isInternal = message.isInternal;
|
|
41304
|
+
if (typeof message.debug === "boolean") normalized.debug = message.debug;
|
|
41287
41305
|
return normalized;
|
|
41288
41306
|
}
|
|
41289
41307
|
function validateModal(activeModal, status, source) {
|
|
@@ -43252,19 +43270,19 @@ ${effect.notification.body || ""}`.trim();
|
|
|
43252
43270
|
const visibleMessages = filterUserFacingChatMessages(messages);
|
|
43253
43271
|
const sync = buildFullTail(visibleMessages, normalizeReadChatTailLimit(args));
|
|
43254
43272
|
const hiddenMsgCount = Math.max(0, messages.length - visibleMessages.length);
|
|
43255
|
-
const
|
|
43256
|
-
...debugReadChat
|
|
43257
|
-
fullMsgCount: messages.length,
|
|
43273
|
+
const returnedDebugReadChat = debugReadChat ? {
|
|
43274
|
+
...debugReadChat,
|
|
43275
|
+
fullMsgCount: typeof debugReadChat.fullMsgCount === "number" ? debugReadChat.fullMsgCount : messages.length,
|
|
43258
43276
|
visibleMsgCount: visibleMessages.length,
|
|
43259
43277
|
hiddenMsgCount,
|
|
43260
43278
|
returnedMsgCount: sync.messages.length
|
|
43261
|
-
};
|
|
43279
|
+
} : void 0;
|
|
43262
43280
|
return {
|
|
43263
43281
|
success: true,
|
|
43264
43282
|
...validatedPayload,
|
|
43265
43283
|
messages: sync.messages,
|
|
43266
43284
|
totalMessages: sync.totalMessages,
|
|
43267
|
-
debugReadChat:
|
|
43285
|
+
...returnedDebugReadChat ? { debugReadChat: returnedDebugReadChat } : {}
|
|
43268
43286
|
};
|
|
43269
43287
|
}
|
|
43270
43288
|
var DEFAULT_DEBUG_SANITIZE_OPTIONS = {
|
|
@@ -46873,12 +46891,11 @@ ${effect.notification.body || ""}`.trim();
|
|
|
46873
46891
|
return Number.isFinite(value) && value > 0 ? value : 0;
|
|
46874
46892
|
};
|
|
46875
46893
|
const getRole = (message) => typeof message.role === "string" ? message.role.trim().toLowerCase() : "";
|
|
46876
|
-
const
|
|
46894
|
+
const isRuntimeOverlay = (entry) => {
|
|
46877
46895
|
if (entry.source !== "runtime") return false;
|
|
46878
46896
|
const key = typeof entry.runtimeKey === "string" ? entry.runtimeKey.trim().toLowerCase() : "";
|
|
46879
46897
|
if (key.startsWith("auto_approval:")) return true;
|
|
46880
|
-
|
|
46881
|
-
return content.startsWith("auto-approved:");
|
|
46898
|
+
return !isUserFacingChatMessage(entry.message);
|
|
46882
46899
|
};
|
|
46883
46900
|
const shouldKeepParsedBeforeUntimedRuntime = (message) => {
|
|
46884
46901
|
const role = getRole(message);
|
|
@@ -46897,7 +46914,7 @@ ${effect.notification.body || ""}`.trim();
|
|
|
46897
46914
|
if (a.source !== b2.source && aTime !== bTime) {
|
|
46898
46915
|
const parsedEntry = a.source === "parsed" ? a : b2.source === "parsed" ? b2 : null;
|
|
46899
46916
|
const runtimeEntry = a.source === "runtime" ? a : b2.source === "runtime" ? b2 : null;
|
|
46900
|
-
if (parsedEntry && runtimeEntry &&
|
|
46917
|
+
if (parsedEntry && runtimeEntry && isRuntimeOverlay(runtimeEntry) && getTime(parsedEntry.message) === 0 && getTime(runtimeEntry.message) > 0) {
|
|
46901
46918
|
if (shouldKeepParsedBeforeUntimedRuntime(parsedEntry.message)) {
|
|
46902
46919
|
return a.source === "parsed" ? -1 : 1;
|
|
46903
46920
|
}
|