@adhdev/daemon-standalone 0.9.82-rc.115 → 0.9.82-rc.116
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 +25 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/vendor/mcp-server/index.js +42 -1
- package/vendor/mcp-server/index.js.map +1 -1
package/dist/index.js
CHANGED
|
@@ -38979,16 +38979,39 @@ ${effect.notification.body || ""}`.trim();
|
|
|
38979
38979
|
return false;
|
|
38980
38980
|
}
|
|
38981
38981
|
function hasSafeNativeHistoryMapping(args) {
|
|
38982
|
+
const isCoordinatorTranscript = args.nativeMessages.some((m) => {
|
|
38983
|
+
const text = typeof m?.content === "string" ? m.content : JSON.stringify(m?.content || "");
|
|
38984
|
+
return text.includes("mesh_send_task") || text.includes("mesh_status") || text.includes("mesh_read_chat") || text.includes("mesh_launch_session");
|
|
38985
|
+
});
|
|
38982
38986
|
const explicitSessionId = String(args.historySessionId || args.providerSessionId || "").trim();
|
|
38983
38987
|
if (explicitSessionId) {
|
|
38984
38988
|
const messageSessionIds = args.nativeMessages.map((message) => typeof message?.historySessionId === "string" ? message.historySessionId.trim() : "").filter(Boolean);
|
|
38985
|
-
if (messageSessionIds.length
|
|
38986
|
-
|
|
38989
|
+
if (messageSessionIds.length > 0) {
|
|
38990
|
+
return messageSessionIds.some((id) => id === explicitSessionId);
|
|
38991
|
+
}
|
|
38992
|
+
if (isCoordinatorTranscript && args.ptyMessages && args.ptyMessages.length > 0) {
|
|
38993
|
+
const ptyHasCoordinator = args.ptyMessages.some((m) => {
|
|
38994
|
+
const text = typeof m?.content === "string" ? m.content : JSON.stringify(m?.content || "");
|
|
38995
|
+
return text.includes("mesh_send_task") || text.includes("mesh_status") || text.includes("mesh_read_chat");
|
|
38996
|
+
});
|
|
38997
|
+
if (!ptyHasCoordinator) {
|
|
38998
|
+
return false;
|
|
38999
|
+
}
|
|
39000
|
+
}
|
|
38987
39001
|
}
|
|
38988
39002
|
const workspace = String(args.workspace || "").trim();
|
|
38989
39003
|
if (!workspace) return false;
|
|
38990
39004
|
const workspaceMatches = args.nativeMessages.some((message) => String(message?.workspace || "").trim() === workspace);
|
|
38991
39005
|
if (!workspaceMatches) return false;
|
|
39006
|
+
if (isCoordinatorTranscript && args.ptyMessages && args.ptyMessages.length > 0) {
|
|
39007
|
+
const ptyHasCoordinator = args.ptyMessages.some((m) => {
|
|
39008
|
+
const text = typeof m?.content === "string" ? m.content : JSON.stringify(m?.content || "");
|
|
39009
|
+
return text.includes("mesh_send_task") || text.includes("mesh_status") || text.includes("mesh_read_chat");
|
|
39010
|
+
});
|
|
39011
|
+
if (!ptyHasCoordinator) {
|
|
39012
|
+
return false;
|
|
39013
|
+
}
|
|
39014
|
+
}
|
|
38992
39015
|
if (!args.requireWorkspaceContentOverlap) return true;
|
|
38993
39016
|
return hasOverlappingVisibleConversationText(args.nativeMessages, args.ptyMessages || []);
|
|
38994
39017
|
}
|