@adhdev/daemon-core 0.9.82-rc.254 → 0.9.82-rc.255
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 +26 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +26 -0
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/commands/router.ts +21 -0
- package/src/providers/cli-provider-instance.ts +27 -0
package/dist/index.mjs
CHANGED
|
@@ -30943,6 +30943,20 @@ var CliProviderInstance = class {
|
|
|
30943
30943
|
const adapterOwnsMessagesElsewhere = this.adapter?.chatMessagesOwnedExternally === true;
|
|
30944
30944
|
const finalAssistantEvidence = this.completionFinalAssistantEvidence(parsed?.messages);
|
|
30945
30945
|
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
|
+
}
|
|
30946
30960
|
LOG.debug("CLI", `[${this.type}] finalAssistantEvidence: present=${finalAssistantEvidence.present} source=${finalAssistantEvidence.source} adapterOwnsMessagesElsewhere=${adapterOwnsMessagesElsewhere} parsedStatus=${parsedStatus}`);
|
|
30947
30961
|
if (!finalAssistantEvidence.present) {
|
|
30948
30962
|
if (adapterOwnsMessagesElsewhere) {
|
|
@@ -42190,6 +42204,18 @@ ${tail}` : ""
|
|
|
42190
42204
|
return { success: true };
|
|
42191
42205
|
}
|
|
42192
42206
|
case "launch_cli": {
|
|
42207
|
+
{
|
|
42208
|
+
const launchSettings = args?.settings && typeof args.settings === "object" ? args.settings : void 0;
|
|
42209
|
+
const isMeshWorkerLaunch = !!launchSettings && (readStringValue(launchSettings.meshNodeFor) || launchSettings.launchedByCoordinator === true);
|
|
42210
|
+
const hasCoordinatorDaemonId = !!launchSettings && !!readStringValue(launchSettings.meshCoordinatorDaemonId);
|
|
42211
|
+
if (launchSettings && isMeshWorkerLaunch && !hasCoordinatorDaemonId) {
|
|
42212
|
+
try {
|
|
42213
|
+
const localDaemonId = readStringValue(loadConfig().machineId);
|
|
42214
|
+
if (localDaemonId) launchSettings.meshCoordinatorDaemonId = localDaemonId;
|
|
42215
|
+
} catch {
|
|
42216
|
+
}
|
|
42217
|
+
}
|
|
42218
|
+
}
|
|
42193
42219
|
const launchResult = await this.deps.cliManager.handleCliCommand(cmd, args);
|
|
42194
42220
|
const meshNodeId = readStringValue(args?.settings?.meshNodeId);
|
|
42195
42221
|
const meshId = readStringValue(args?.settings?.meshNodeFor);
|