@adhdev/daemon-standalone 1.0.1 → 1.0.3-rc.1

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
@@ -30217,10 +30217,10 @@ var require_dist3 = __commonJS({
30217
30217
  }
30218
30218
  function getDaemonBuildInfo() {
30219
30219
  if (cached2) return cached2;
30220
- const commit = readInjected(true ? "78b108fb45ca3cc0168a6664f4adbbb97a70664c" : void 0) ?? "unknown";
30221
- const commitShort = readInjected(true ? "78b108fb" : void 0) ?? (commit !== "unknown" ? commit.slice(0, 7) : "unknown");
30222
- const version2 = readInjected(true ? "1.0.0" : void 0) ?? readInjected(typeof process !== "undefined" ? process.env?.ADHDEV_PKG_VERSION : void 0) ?? "unknown";
30223
- const builtAt = readInjected(true ? "2026-07-19T04:24:30.893Z" : void 0);
30220
+ const commit = readInjected(true ? "6f5b9cdd8abf9605aa9f817151a1ca6d1e949a93" : void 0) ?? "unknown";
30221
+ const commitShort = readInjected(true ? "6f5b9cdd" : void 0) ?? (commit !== "unknown" ? commit.slice(0, 7) : "unknown");
30222
+ const version2 = readInjected(true ? "1.0.3-rc.1" : void 0) ?? readInjected(typeof process !== "undefined" ? process.env?.ADHDEV_PKG_VERSION : void 0) ?? "unknown";
30223
+ const builtAt = readInjected(true ? "2026-07-19T09:54:50.090Z" : void 0);
30224
30224
  cached2 = builtAt ? { commit, commitShort, version: version2, builtAt } : { commit, commitShort, version: version2 };
30225
30225
  return cached2;
30226
30226
  }
@@ -48076,6 +48076,7 @@ The mesh has no work in flight. For each mission, decide its outcome: continue i
48076
48076
  }
48077
48077
  getCursorPosition() {
48078
48078
  if (this.disposed) return { col: 0, row: 0 };
48079
+ if (typeof this.terminal.getCursorPosition !== "function") return { col: 0, row: 0 };
48079
48080
  return this.terminal.getCursorPosition();
48080
48081
  }
48081
48082
  dispose() {
@@ -48130,6 +48131,7 @@ The mesh has no work in flight. For each mission, decide its outcome: continue i
48130
48131
  return this.terminal.getTextWithScrollback();
48131
48132
  }
48132
48133
  getCursorPosition() {
48134
+ if (typeof this.terminal.getCursorPosition !== "function") return { col: 0, row: 0 };
48133
48135
  return this.terminal.getCursorPosition();
48134
48136
  }
48135
48137
  /** Current viewport dimensions (cols × rows). */
@@ -76002,6 +76004,14 @@ ${body}
76002
76004
  * MCP config), so this routing keeps the dashboard honest until
76003
76005
  * hermes ships a runtime MCP override. */
76004
76006
  spawnedEnv = {};
76007
+ /** Wall clock at the moment an approval modal was last resolved (auto-approve,
76008
+ * dashboard, or mesh_approve) via a successful button press. Powers
76009
+ * isApprovalRecentlyResolved() — the second suppression signal the mesh event
76010
+ * forwarder uses to drop a duplicate agent:waiting_approval re-emitted across
76011
+ * the approval↔busy TUI flap window (AUTOAPPROVE-FLAP). Mirrors the
76012
+ * cli-state-engine's lastApprovalResolvedAt for the spec-driven adapter path
76013
+ * (claude-cli specs/4.0.json), which previously stubbed the method to false. */
76014
+ lastApprovalResolvedAt = 0;
76005
76015
  constructor(specPath, workingDir, cliArgs, extraEnv, transportFactory) {
76006
76016
  const raw = JSON.parse(fs20.readFileSync(specPath, "utf8"));
76007
76017
  this.spec = {
@@ -76139,6 +76149,11 @@ ${body}
76139
76149
  // the char count still looks safe.
76140
76150
  static TERMINAL_SNAPSHOT_DEFAULT_MAX_BYTES = 32 * 1024;
76141
76151
  static TERMINAL_SNAPSHOT_ABSOLUTE_MAX_BYTES = 64 * 1024;
76152
+ /** Window during which isApprovalRecentlyResolved() reports a just-resolved
76153
+ * approval. Matches CliProviderInstance.APPROVAL_LOCAL_RESOLUTION_COOLDOWN_MS
76154
+ * (8000) — the same auto-approve suppression window signal1 uses — so a modal
76155
+ * re-emitted within the approval↔busy flap is suppressed by signal2 too. */
76156
+ static APPROVAL_RESOLVED_COOLDOWN_MS = 8e3;
76142
76157
  /**
76143
76158
  * MESH-READ-TERMINAL (feature 2: RAW terminal read). Least-privilege read
76144
76159
  * of the CURRENT rendered viewport for mesh_read_terminal on the spec path
@@ -76242,7 +76257,11 @@ ${body}
76242
76257
  resolveModalMatched(buttonIndex) {
76243
76258
  const buttons = this.latestModal?.buttons ?? [];
76244
76259
  const target = buttonIndex >= 0 && buttonIndex < buttons.length ? buttons[buttonIndex].index : buttonIndex + 1;
76245
- return this.driver.clickModalButton(target);
76260
+ const pressed = this.driver.clickModalButton(target);
76261
+ if (pressed && this.latestState?.status === "approval") {
76262
+ this.lastApprovalResolvedAt = Date.now();
76263
+ }
76264
+ return pressed;
76246
76265
  }
76247
76266
  async resolveAction(data) {
76248
76267
  const args = data && typeof data === "object" ? data : {};
@@ -76283,7 +76302,7 @@ ${body}
76283
76302
  this.statusCallback?.();
76284
76303
  }
76285
76304
  isApprovalRecentlyResolved() {
76286
- return false;
76305
+ return !!(this.lastApprovalResolvedAt && Date.now() - this.lastApprovalResolvedAt < _SpecCliAdapter.APPROVAL_RESOLVED_COOLDOWN_MS);
76287
76306
  }
76288
76307
  clearHistory() {
76289
76308
  }