@adhdev/daemon-core 0.9.82-rc.255 → 0.9.82-rc.256
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 +11 -16
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +11 -16
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/providers/cli-provider-instance.ts +25 -29
package/dist/index.mjs
CHANGED
|
@@ -30843,8 +30843,17 @@ var CliProviderInstance = class {
|
|
|
30843
30843
|
};
|
|
30844
30844
|
}
|
|
30845
30845
|
completionFinalSummary(parsedMessages) {
|
|
30846
|
-
const
|
|
30847
|
-
|
|
30846
|
+
const adapterOwnsMessagesElsewhere = this.adapter?.chatMessagesOwnedExternally === true;
|
|
30847
|
+
const parsedSummary = extractFinalSummaryFromMessages(
|
|
30848
|
+
this.completionHasFinalAssistantMessage(parsedMessages) ? Array.isArray(parsedMessages) ? parsedMessages : [] : []
|
|
30849
|
+
);
|
|
30850
|
+
if (adapterOwnsMessagesElsewhere) {
|
|
30851
|
+
const externalMessages = this.readExternalCompletionMessages();
|
|
30852
|
+
const externalSummary = externalMessages ? extractFinalSummaryFromMessages(externalMessages) : "";
|
|
30853
|
+
if (externalSummary) return externalSummary;
|
|
30854
|
+
return parsedSummary || void 0;
|
|
30855
|
+
}
|
|
30856
|
+
return parsedSummary || void 0;
|
|
30848
30857
|
}
|
|
30849
30858
|
buildCompletedFinalizationDiagnostic(args) {
|
|
30850
30859
|
let parsed = null;
|
|
@@ -30943,20 +30952,6 @@ var CliProviderInstance = class {
|
|
|
30943
30952
|
const adapterOwnsMessagesElsewhere = this.adapter?.chatMessagesOwnedExternally === true;
|
|
30944
30953
|
const finalAssistantEvidence = this.completionFinalAssistantEvidence(parsed?.messages);
|
|
30945
30954
|
const allowMissingAssistantTimeout = !!(this.settings.meshNodeFor || this.settings.meshActiveTaskId || this.settings.launchedByCoordinator);
|
|
30946
|
-
if (adapterOwnsMessagesElsewhere && finalAssistantEvidence.source === "external-native") {
|
|
30947
|
-
const prevProbe = (pending.transcriptProbeHistory || [])[(pending.transcriptProbeHistory?.length ?? 0) - 1];
|
|
30948
|
-
this.readExternalCompletionMessages();
|
|
30949
|
-
const settleProbe = this.lastExternalCompletionProbe;
|
|
30950
|
-
if (settleProbe && prevProbe) {
|
|
30951
|
-
const stillGrowing = settleProbe.msgCount > prevProbe.msgCount || settleProbe.lastRole === "assistant" && settleProbe.contentLen > prevProbe.contentLen;
|
|
30952
|
-
if (stillGrowing) {
|
|
30953
|
-
this.recordPendingTranscriptProbe(pending);
|
|
30954
|
-
return { reason: `transcript_settling:${prevProbe.contentLen}->${settleProbe.contentLen}`, terminal: false };
|
|
30955
|
-
}
|
|
30956
|
-
} else if (settleProbe) {
|
|
30957
|
-
this.recordPendingTranscriptProbe(pending);
|
|
30958
|
-
}
|
|
30959
|
-
}
|
|
30960
30955
|
LOG.debug("CLI", `[${this.type}] finalAssistantEvidence: present=${finalAssistantEvidence.present} source=${finalAssistantEvidence.source} adapterOwnsMessagesElsewhere=${adapterOwnsMessagesElsewhere} parsedStatus=${parsedStatus}`);
|
|
30961
30956
|
if (!finalAssistantEvidence.present) {
|
|
30962
30957
|
if (adapterOwnsMessagesElsewhere) {
|