@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 CHANGED
@@ -31275,6 +31275,20 @@ var CliProviderInstance = class {
31275
31275
  const adapterOwnsMessagesElsewhere = this.adapter?.chatMessagesOwnedExternally === true;
31276
31276
  const finalAssistantEvidence = this.completionFinalAssistantEvidence(parsed?.messages);
31277
31277
  const allowMissingAssistantTimeout = !!(this.settings.meshNodeFor || this.settings.meshActiveTaskId || this.settings.launchedByCoordinator);
31278
+ if (adapterOwnsMessagesElsewhere && finalAssistantEvidence.source === "external-native") {
31279
+ const prevProbe = (pending.transcriptProbeHistory || [])[(pending.transcriptProbeHistory?.length ?? 0) - 1];
31280
+ this.readExternalCompletionMessages();
31281
+ const settleProbe = this.lastExternalCompletionProbe;
31282
+ if (settleProbe && prevProbe) {
31283
+ const stillGrowing = settleProbe.msgCount > prevProbe.msgCount || settleProbe.lastRole === "assistant" && settleProbe.contentLen > prevProbe.contentLen;
31284
+ if (stillGrowing) {
31285
+ this.recordPendingTranscriptProbe(pending);
31286
+ return { reason: `transcript_settling:${prevProbe.contentLen}->${settleProbe.contentLen}`, terminal: false };
31287
+ }
31288
+ } else if (settleProbe) {
31289
+ this.recordPendingTranscriptProbe(pending);
31290
+ }
31291
+ }
31278
31292
  LOG.debug("CLI", `[${this.type}] finalAssistantEvidence: present=${finalAssistantEvidence.present} source=${finalAssistantEvidence.source} adapterOwnsMessagesElsewhere=${adapterOwnsMessagesElsewhere} parsedStatus=${parsedStatus}`);
31279
31293
  if (!finalAssistantEvidence.present) {
31280
31294
  if (adapterOwnsMessagesElsewhere) {
@@ -42517,6 +42531,18 @@ ${tail}` : ""
42517
42531
  return { success: true };
42518
42532
  }
42519
42533
  case "launch_cli": {
42534
+ {
42535
+ const launchSettings = args?.settings && typeof args.settings === "object" ? args.settings : void 0;
42536
+ const isMeshWorkerLaunch = !!launchSettings && (readStringValue(launchSettings.meshNodeFor) || launchSettings.launchedByCoordinator === true);
42537
+ const hasCoordinatorDaemonId = !!launchSettings && !!readStringValue(launchSettings.meshCoordinatorDaemonId);
42538
+ if (launchSettings && isMeshWorkerLaunch && !hasCoordinatorDaemonId) {
42539
+ try {
42540
+ const localDaemonId = readStringValue(loadConfig().machineId);
42541
+ if (localDaemonId) launchSettings.meshCoordinatorDaemonId = localDaemonId;
42542
+ } catch {
42543
+ }
42544
+ }
42545
+ }
42520
42546
  const launchResult = await this.deps.cliManager.handleCliCommand(cmd, args);
42521
42547
  const meshNodeId = readStringValue(args?.settings?.meshNodeId);
42522
42548
  const meshId = readStringValue(args?.settings?.meshNodeFor);