@adhdev/daemon-standalone 0.9.82-rc.90 → 0.9.82-rc.91
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 +27 -15
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -31533,7 +31533,19 @@ ${lastSnapshot}`;
|
|
|
31533
31533
|
if (!node) return { staleReason: "direct task node is no longer in the live mesh" };
|
|
31534
31534
|
if (!sessionId) return {};
|
|
31535
31535
|
const candidates = [];
|
|
31536
|
-
for (const value of [
|
|
31536
|
+
for (const value of [
|
|
31537
|
+
node.sessions,
|
|
31538
|
+
node.activeSessions,
|
|
31539
|
+
node.active_sessions,
|
|
31540
|
+
node.activeSessionDetails,
|
|
31541
|
+
node.active_session_details,
|
|
31542
|
+
node.sessionDetails,
|
|
31543
|
+
node.session_details,
|
|
31544
|
+
node.lastProbe?.sessions,
|
|
31545
|
+
node.last_probe?.sessions,
|
|
31546
|
+
node.lastProbe?.status?.sessions,
|
|
31547
|
+
node.last_probe?.status?.sessions
|
|
31548
|
+
]) {
|
|
31537
31549
|
if (Array.isArray(value)) candidates.push(...value);
|
|
31538
31550
|
}
|
|
31539
31551
|
for (const value of [node.activeSession, node.active_session, node.currentSession, node.current_session, node.runtimeSession, node.runtime_session, node.session]) {
|
|
@@ -33847,15 +33859,6 @@ ${lastSnapshot}`;
|
|
|
33847
33859
|
if (text) return text.slice(0, maxChars);
|
|
33848
33860
|
}
|
|
33849
33861
|
}
|
|
33850
|
-
for (let i = messages.length - 1; i >= 0; i--) {
|
|
33851
|
-
const msg = messages[i];
|
|
33852
|
-
if (!msg) continue;
|
|
33853
|
-
const classification = classifyChatMessageVisibility(msg);
|
|
33854
|
-
if (classification.isUserFacing) {
|
|
33855
|
-
const text = flattenContent(msg.content).trim();
|
|
33856
|
-
if (text) return text.slice(0, maxChars);
|
|
33857
|
-
}
|
|
33858
|
-
}
|
|
33859
33862
|
return "";
|
|
33860
33863
|
}
|
|
33861
33864
|
var BUILTIN_CHAT_MESSAGE_KINDS = ["standard", "thought", "tool", "terminal", "system"];
|
|
@@ -38277,8 +38280,8 @@ ${effect.notification.body || ""}`.trim();
|
|
|
38277
38280
|
historyBehavior: args.historyBehavior,
|
|
38278
38281
|
scripts: args.scripts
|
|
38279
38282
|
});
|
|
38280
|
-
if (sessionHistory.source !== "native-unavailable" || !args.historySessionId || !args.workspace) {
|
|
38281
|
-
return { ...sessionHistory, lookup: "session" };
|
|
38283
|
+
if (sessionHistory.source !== "native-unavailable" || args.exactSessionScoped || !args.historySessionId || !args.workspace) {
|
|
38284
|
+
return { ...sessionHistory, lookup: args.historySessionId ? "session" : "workspace" };
|
|
38282
38285
|
}
|
|
38283
38286
|
const workspaceHistory = readProviderChatHistory(agentStr, {
|
|
38284
38287
|
canonicalHistory: args.canonicalHistory,
|
|
@@ -38899,6 +38902,9 @@ ${effect.notification.body || ""}`.trim();
|
|
|
38899
38902
|
returnedMessages.length,
|
|
38900
38903
|
200
|
|
38901
38904
|
);
|
|
38905
|
+
const exactNativeHistoryScope = Boolean(
|
|
38906
|
+
typeof args?.historySessionId === "string" && args.historySessionId.trim() || typeof args?.providerSessionId === "string" && args.providerSessionId.trim() || providerSessionId || h.currentSession?.sessionId === args?.targetSessionId && typeof h.currentSession?.providerSessionId === "string" && h.currentSession.providerSessionId.trim()
|
|
38907
|
+
);
|
|
38902
38908
|
let nativeHistory = null;
|
|
38903
38909
|
try {
|
|
38904
38910
|
nativeHistory = readCliProviderNativeHistory(agentStr, {
|
|
@@ -38909,7 +38915,8 @@ ${effect.notification.body || ""}`.trim();
|
|
|
38909
38915
|
limit: nativeHistoryLimit,
|
|
38910
38916
|
excludeRecentCount: 0,
|
|
38911
38917
|
historyBehavior: provider?.historyBehavior,
|
|
38912
|
-
scripts: provider?.scripts
|
|
38918
|
+
scripts: provider?.scripts,
|
|
38919
|
+
exactSessionScoped: exactNativeHistoryScope
|
|
38913
38920
|
});
|
|
38914
38921
|
} catch (error48) {
|
|
38915
38922
|
const fallbackReason = `native_history_error:${error48?.message || String(error48)}`;
|
|
@@ -39013,6 +39020,9 @@ ${effect.notification.body || ""}`.trim();
|
|
|
39013
39020
|
try {
|
|
39014
39021
|
const agentStr = provider?.type || args?.agentType || getCurrentProviderType(h);
|
|
39015
39022
|
const workspace = typeof args?.workspace === "string" ? args.workspace : typeof h.currentSession?.workspace === "string" ? h.currentSession.workspace : void 0;
|
|
39023
|
+
const exactNativeHistoryScope = Boolean(
|
|
39024
|
+
typeof args?.historySessionId === "string" && args.historySessionId.trim() || typeof args?.providerSessionId === "string" && args.providerSessionId.trim() || h.currentSession?.sessionId === args?.targetSessionId && typeof h.currentSession?.providerSessionId === "string" && h.currentSession.providerSessionId.trim()
|
|
39025
|
+
);
|
|
39016
39026
|
const history = supportsCliNativeTranscript(agentStr, provider) && isNativeSourceCanonicalHistory(provider?.canonicalHistory) ? readCliProviderNativeHistory(agentStr, {
|
|
39017
39027
|
canonicalHistory: provider?.canonicalHistory,
|
|
39018
39028
|
historySessionId,
|
|
@@ -39021,7 +39031,8 @@ ${effect.notification.body || ""}`.trim();
|
|
|
39021
39031
|
limit: historyLimit,
|
|
39022
39032
|
excludeRecentCount: 0,
|
|
39023
39033
|
historyBehavior: provider?.historyBehavior,
|
|
39024
|
-
scripts: provider?.scripts
|
|
39034
|
+
scripts: provider?.scripts,
|
|
39035
|
+
exactSessionScoped: exactNativeHistoryScope
|
|
39025
39036
|
}) : readProviderChatHistory(agentStr, {
|
|
39026
39037
|
canonicalHistory: provider?.canonicalHistory,
|
|
39027
39038
|
historySessionId,
|
|
@@ -41762,6 +41773,7 @@ ${effect.notification.body || ""}`.trim();
|
|
|
41762
41773
|
}
|
|
41763
41774
|
const runtime = this.adapter.getRuntimeMetadata();
|
|
41764
41775
|
this.maybeAppendRuntimeRecoveryMessage(runtime);
|
|
41776
|
+
const activeChatId = this.providerSessionId || runtime?.runtimeId || this.instanceId;
|
|
41765
41777
|
let parsedMessages = Array.isArray(parsedStatus?.messages) ? parsedStatus.messages : [];
|
|
41766
41778
|
const historyMessageCount = Number.isFinite(parsedStatus?.historyMessageCount) ? Math.max(0, Number(parsedStatus.historyMessageCount)) : null;
|
|
41767
41779
|
if (historyMessageCount !== null) {
|
|
@@ -41817,7 +41829,7 @@ ${effect.notification.body || ""}`.trim();
|
|
|
41817
41829
|
status: visibleStatus,
|
|
41818
41830
|
mode: this.presentationMode,
|
|
41819
41831
|
activeChat: {
|
|
41820
|
-
id:
|
|
41832
|
+
id: activeChatId,
|
|
41821
41833
|
title: parsedStatus?.title || dirName,
|
|
41822
41834
|
status: activeChatStatus,
|
|
41823
41835
|
messages: mergedMessages,
|