@adhdev/daemon-core 0.9.82-rc.334 → 0.9.82-rc.335

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.
@@ -182,6 +182,7 @@ export declare class ProviderCliAdapter implements CliAdapter {
182
182
  force?: boolean;
183
183
  }): Promise<void>;
184
184
  forceSendMessage(text: string): Promise<void>;
185
+ private waitForForceSubmitSettle;
185
186
  private enqueuePendingOutboundMessage;
186
187
  private shouldQueuePendingOutboundMessage;
187
188
  private schedulePendingOutboundFlush;
package/dist/index.js CHANGED
@@ -316,10 +316,10 @@ function readInjected(value) {
316
316
  }
317
317
  function getDaemonBuildInfo() {
318
318
  if (cached) return cached;
319
- const commit = readInjected(true ? "9e5ae5d2814077a6bf9e982b17066ca2051da97b" : void 0) ?? "unknown";
320
- const commitShort = readInjected(true ? "9e5ae5d2" : void 0) ?? (commit !== "unknown" ? commit.slice(0, 7) : "unknown");
321
- const version = readInjected(true ? "0.9.82-rc.334" : void 0) ?? readInjected(typeof process !== "undefined" ? process.env?.ADHDEV_PKG_VERSION : void 0) ?? "unknown";
322
- const builtAt = readInjected(true ? "2026-06-20T03:55:49.426Z" : void 0);
319
+ const commit = readInjected(true ? "e9e62c9770c0f4a419a90f5287125f3d3bb0fd95" : void 0) ?? "unknown";
320
+ const commitShort = readInjected(true ? "e9e62c97" : void 0) ?? (commit !== "unknown" ? commit.slice(0, 7) : "unknown");
321
+ const version = readInjected(true ? "0.9.82-rc.335" : void 0) ?? readInjected(typeof process !== "undefined" ? process.env?.ADHDEV_PKG_VERSION : void 0) ?? "unknown";
322
+ const builtAt = readInjected(true ? "2026-06-20T04:30:54.863Z" : void 0);
323
323
  cached = builtAt ? { commit, commitShort, version, builtAt } : { commit, commitShort, version };
324
324
  return cached;
325
325
  }
@@ -15128,7 +15128,7 @@ function appendBoundedText(current, chunk, maxChars) {
15128
15128
  if (current.length <= keepFromCurrent) return current + chunk;
15129
15129
  return current.slice(-keepFromCurrent) + chunk;
15130
15130
  }
15131
- var os14, import_session_host_core5, ProviderCliAdapter;
15131
+ var os14, import_session_host_core5, FORCE_SUBMIT_SETTLE_MS, FORCE_SUBMIT_MAX_WAIT_MS, FORCE_SUBMIT_POLL_MS, ProviderCliAdapter;
15132
15132
  var init_provider_cli_adapter = __esm({
15133
15133
  "src/cli-adapters/provider-cli-adapter.ts"() {
15134
15134
  "use strict";
@@ -15145,6 +15145,9 @@ var init_provider_cli_adapter = __esm({
15145
15145
  init_provider_cli_config();
15146
15146
  init_provider_cli_runtime();
15147
15147
  init_provider_cli_shared();
15148
+ FORCE_SUBMIT_SETTLE_MS = 150;
15149
+ FORCE_SUBMIT_MAX_WAIT_MS = 1500;
15150
+ FORCE_SUBMIT_POLL_MS = 50;
15148
15151
  ProviderCliAdapter = class _ProviderCliAdapter {
15149
15152
  constructor(provider, workingDir, extraArgs = [], extraEnv = {}, transportFactory = new NodePtyTransportFactory()) {
15150
15153
  this.extraArgs = extraArgs;
@@ -16073,9 +16076,23 @@ ${lastSnapshot}`;
16073
16076
  return;
16074
16077
  }
16075
16078
  LOG.info("CLI", `[${this.cliType}] force-sending prompt while status=${this.engine.currentStatus}`);
16076
- await this.writeToPty(content + this.sendKey);
16079
+ await this.writeToPty(content);
16080
+ await this.waitForForceSubmitSettle(content);
16081
+ await this.writeToPty(this.sendKey);
16077
16082
  this.onStatusChange?.();
16078
16083
  }
16084
+ async waitForForceSubmitSettle(content) {
16085
+ const startedAt = Date.now();
16086
+ const normalizedPromptSnippet = normalizePromptText(extractPromptRetrySnippet(content));
16087
+ await new Promise((resolve24) => setTimeout(resolve24, FORCE_SUBMIT_SETTLE_MS));
16088
+ if (!normalizedPromptSnippet) return;
16089
+ while (Date.now() - startedAt < FORCE_SUBMIT_MAX_WAIT_MS) {
16090
+ if (!this.ptyProcess) return;
16091
+ const screenText = this.terminalScreen.getText();
16092
+ if (promptLikelyVisible(screenText, normalizedPromptSnippet)) return;
16093
+ await new Promise((resolve24) => setTimeout(resolve24, FORCE_SUBMIT_POLL_MS));
16094
+ }
16095
+ }
16079
16096
  enqueuePendingOutboundMessage(text, reason) {
16080
16097
  const content = String(text || "");
16081
16098
  const duplicate = this.pendingOutboundQueue.some((message2) => message2.content === content);