@adhdev/daemon-standalone 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
@@ -60872,6 +60872,20 @@ ${formatManifestValidationIssues2(validation.issues)}`,
60872
60872
  const adapterOwnsMessagesElsewhere = this.adapter?.chatMessagesOwnedExternally === true;
60873
60873
  const finalAssistantEvidence = this.completionFinalAssistantEvidence(parsed?.messages);
60874
60874
  const allowMissingAssistantTimeout = !!(this.settings.meshNodeFor || this.settings.meshActiveTaskId || this.settings.launchedByCoordinator);
60875
+ if (adapterOwnsMessagesElsewhere && finalAssistantEvidence.source === "external-native") {
60876
+ const prevProbe = (pending.transcriptProbeHistory || [])[(pending.transcriptProbeHistory?.length ?? 0) - 1];
60877
+ this.readExternalCompletionMessages();
60878
+ const settleProbe = this.lastExternalCompletionProbe;
60879
+ if (settleProbe && prevProbe) {
60880
+ const stillGrowing = settleProbe.msgCount > prevProbe.msgCount || settleProbe.lastRole === "assistant" && settleProbe.contentLen > prevProbe.contentLen;
60881
+ if (stillGrowing) {
60882
+ this.recordPendingTranscriptProbe(pending);
60883
+ return { reason: `transcript_settling:${prevProbe.contentLen}->${settleProbe.contentLen}`, terminal: false };
60884
+ }
60885
+ } else if (settleProbe) {
60886
+ this.recordPendingTranscriptProbe(pending);
60887
+ }
60888
+ }
60875
60889
  LOG2.debug("CLI", `[${this.type}] finalAssistantEvidence: present=${finalAssistantEvidence.present} source=${finalAssistantEvidence.source} adapterOwnsMessagesElsewhere=${adapterOwnsMessagesElsewhere} parsedStatus=${parsedStatus}`);
60876
60890
  if (!finalAssistantEvidence.present) {
60877
60891
  if (adapterOwnsMessagesElsewhere) {
@@ -72064,6 +72078,18 @@ ${tail}` : ""
72064
72078
  return { success: true };
72065
72079
  }
72066
72080
  case "launch_cli": {
72081
+ {
72082
+ const launchSettings = args?.settings && typeof args.settings === "object" ? args.settings : void 0;
72083
+ const isMeshWorkerLaunch = !!launchSettings && (readStringValue(launchSettings.meshNodeFor) || launchSettings.launchedByCoordinator === true);
72084
+ const hasCoordinatorDaemonId = !!launchSettings && !!readStringValue(launchSettings.meshCoordinatorDaemonId);
72085
+ if (launchSettings && isMeshWorkerLaunch && !hasCoordinatorDaemonId) {
72086
+ try {
72087
+ const localDaemonId = readStringValue(loadConfig2().machineId);
72088
+ if (localDaemonId) launchSettings.meshCoordinatorDaemonId = localDaemonId;
72089
+ } catch {
72090
+ }
72091
+ }
72092
+ }
72067
72093
  const launchResult = await this.deps.cliManager.handleCliCommand(cmd, args);
72068
72094
  const meshNodeId = readStringValue(args?.settings?.meshNodeId);
72069
72095
  const meshId = readStringValue(args?.settings?.meshNodeFor);