@adhdev/daemon-standalone 0.9.82-rc.84 → 0.9.82-rc.85
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 +12 -9
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -38166,7 +38166,7 @@ ${effect.notification.body || ""}`.trim();
|
|
|
38166
38166
|
};
|
|
38167
38167
|
}
|
|
38168
38168
|
function buildNativeHistoryFallbackReason(args) {
|
|
38169
|
-
if (!supportsCliNativeTranscript(args.providerType)) return "provider_native_transcript_not_supported";
|
|
38169
|
+
if (!supportsCliNativeTranscript(args.providerType, args.provider)) return "provider_native_transcript_not_supported";
|
|
38170
38170
|
if (args.nativeSource === "native-unavailable") return "native_history_unavailable";
|
|
38171
38171
|
if (args.nativeSource && args.nativeSource !== "provider-native") return `native_history_source_${args.nativeSource}`;
|
|
38172
38172
|
if (args.nativeMessageCount <= 0) return "native_history_empty";
|
|
@@ -38174,8 +38174,9 @@ ${effect.notification.body || ""}`.trim();
|
|
|
38174
38174
|
if (!args.freshEnough) return "native_history_stale";
|
|
38175
38175
|
return "native_history_not_selected";
|
|
38176
38176
|
}
|
|
38177
|
-
function supportsCliNativeTranscript(providerType) {
|
|
38178
|
-
|
|
38177
|
+
function supportsCliNativeTranscript(providerType, provider) {
|
|
38178
|
+
if (CLI_NATIVE_TRANSCRIPT_PROVIDERS.has(providerType)) return true;
|
|
38179
|
+
return provider?.category === "cli" && provider?.canonicalHistory?.mode === "native-source";
|
|
38179
38180
|
}
|
|
38180
38181
|
function hasSafeNativeHistoryMapping(args) {
|
|
38181
38182
|
const explicitSessionId = String(args.historySessionId || args.providerSessionId || "").trim();
|
|
@@ -38782,12 +38783,12 @@ ${effect.notification.body || ""}`.trim();
|
|
|
38782
38783
|
let messageSource = buildCliMessageSourceProvenance({
|
|
38783
38784
|
selected: "pty-parser",
|
|
38784
38785
|
provider: adapter.cliType,
|
|
38785
|
-
fallbackReason: supportsCliNativeTranscript(providerType) ? "native_history_not_checked" : "provider_native_transcript_not_supported",
|
|
38786
|
+
fallbackReason: supportsCliNativeTranscript(providerType, provider) ? "native_history_not_checked" : "provider_native_transcript_not_supported",
|
|
38786
38787
|
ptyMessages: returnedMessages,
|
|
38787
38788
|
returnedMessages,
|
|
38788
38789
|
ptyStatusApprovalOnly: false
|
|
38789
38790
|
});
|
|
38790
|
-
if (supportsCliNativeTranscript(providerType) && provider?.canonicalHistory?.mode === "native-source") {
|
|
38791
|
+
if (supportsCliNativeTranscript(providerType, provider) && provider?.canonicalHistory?.mode === "native-source") {
|
|
38791
38792
|
const agentStr = provider?.type || args?.agentType || getCurrentProviderType(h, adapter.cliType);
|
|
38792
38793
|
const workspace = typeof args?.workspace === "string" ? args.workspace : typeof h.currentSession?.workspace === "string" ? h.currentSession.workspace : typeof adapter.workingDir === "string" ? adapter.workingDir : void 0;
|
|
38793
38794
|
const nativeHistoryLimit = Math.max(
|
|
@@ -38855,6 +38856,7 @@ ${effect.notification.body || ""}`.trim();
|
|
|
38855
38856
|
} else {
|
|
38856
38857
|
const fallbackReason = buildNativeHistoryFallbackReason({
|
|
38857
38858
|
providerType,
|
|
38859
|
+
provider,
|
|
38858
38860
|
nativeSource: nativeHistory.source,
|
|
38859
38861
|
nativeMessageCount: nativeMessages.length,
|
|
38860
38862
|
safeMapping,
|
|
@@ -38893,7 +38895,7 @@ ${effect.notification.body || ""}`.trim();
|
|
|
38893
38895
|
returnedStatus: String(returnedStatus || ""),
|
|
38894
38896
|
selectedMessageSource: messageSource.selected,
|
|
38895
38897
|
messageSource,
|
|
38896
|
-
shouldPreferAdapterMessages: supportsCliNativeTranscript(providerType) && messageSource.selected !== "native-history",
|
|
38898
|
+
shouldPreferAdapterMessages: supportsCliNativeTranscript(providerType, provider) && messageSource.selected !== "native-history",
|
|
38897
38899
|
parsedMsgCount: parsedRecord.messages.length,
|
|
38898
38900
|
returnedMsgCount: selectedMessages.length
|
|
38899
38901
|
},
|
|
@@ -38919,19 +38921,20 @@ ${effect.notification.body || ""}`.trim();
|
|
|
38919
38921
|
});
|
|
38920
38922
|
const historyProviderSessionId = typeof history?.providerSessionId === "string" ? history.providerSessionId : historySessionId;
|
|
38921
38923
|
const historyMessages = Array.isArray(history?.messages) ? normalizeChatMessages(history.messages) : [];
|
|
38922
|
-
const safeMapping = supportsCliNativeTranscript(agentStr) ? hasSafeNativeHistoryMapping({
|
|
38924
|
+
const safeMapping = supportsCliNativeTranscript(agentStr, provider) ? hasSafeNativeHistoryMapping({
|
|
38923
38925
|
historySessionId,
|
|
38924
38926
|
providerSessionId: historyProviderSessionId,
|
|
38925
38927
|
workspace,
|
|
38926
38928
|
nativeMessages: historyMessages
|
|
38927
38929
|
}) : false;
|
|
38928
|
-
const nativeSelected = supportsCliNativeTranscript(agentStr) && history.source === "provider-native" && historyMessages.length > 0 && safeMapping;
|
|
38930
|
+
const nativeSelected = supportsCliNativeTranscript(agentStr, provider) && history.source === "provider-native" && historyMessages.length > 0 && safeMapping;
|
|
38929
38931
|
const messageSource = buildCliMessageSourceProvenance({
|
|
38930
38932
|
selected: nativeSelected ? "native-history" : "pty-parser",
|
|
38931
38933
|
provider: agentStr,
|
|
38932
38934
|
nativeHandle: historyProviderSessionId || historySessionId,
|
|
38933
38935
|
fallbackReason: nativeSelected ? void 0 : buildNativeHistoryFallbackReason({
|
|
38934
38936
|
providerType: agentStr,
|
|
38937
|
+
provider,
|
|
38935
38938
|
nativeSource: history.source,
|
|
38936
38939
|
nativeMessageCount: historyMessages.length,
|
|
38937
38940
|
safeMapping,
|
|
@@ -38946,7 +38949,7 @@ ${effect.notification.body || ""}`.trim();
|
|
|
38946
38949
|
freshEnough: true,
|
|
38947
38950
|
ptyStatusApprovalOnly: false
|
|
38948
38951
|
});
|
|
38949
|
-
const requiresNativeSource = supportsCliNativeTranscript(agentStr) && provider?.canonicalHistory?.mode === "native-source";
|
|
38952
|
+
const requiresNativeSource = supportsCliNativeTranscript(agentStr, provider) && provider?.canonicalHistory?.mode === "native-source";
|
|
38950
38953
|
if (requiresNativeSource && !nativeSelected) {
|
|
38951
38954
|
return {
|
|
38952
38955
|
success: false,
|