adhdev 0.5.32 → 0.5.34

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/cli/index.js CHANGED
@@ -18540,7 +18540,15 @@ var require_dist = __commonJS({
18540
18540
  this.pushEvent({ event: "agent:generating_started", chatTitle, timestamp: now });
18541
18541
  } else if (agentStatus === "waiting_approval") {
18542
18542
  if (!this.generatingStartedAt) this.generatingStartedAt = now;
18543
- this.pushEvent({ event: "agent:waiting_approval", chatTitle, timestamp: now });
18543
+ this.pushEvent({
18544
+ event: "agent:waiting_approval",
18545
+ chatTitle,
18546
+ timestamp: now,
18547
+ ideType: this.ideType,
18548
+ agentType: this.type,
18549
+ modalMessage: data?.activeModal?.message || data?.modalMessage,
18550
+ modalButtons: data?.activeModal?.buttons || data?.modalButtons
18551
+ });
18544
18552
  } else if (agentStatus === "idle" && (this.lastAgentStatus === "generating" || this.lastAgentStatus === "waiting_approval")) {
18545
18553
  const duration3 = this.generatingStartedAt ? Math.round((now - this.generatingStartedAt) / 1e3) : 0;
18546
18554
  this.pushEvent({ event: "agent:generating_completed", chatTitle, duration: duration3, timestamp: now });
@@ -23609,6 +23617,7 @@ var require_dist = __commonJS({
23609
23617
  monitor;
23610
23618
  generatingDebounceTimer = null;
23611
23619
  generatingDebouncePending = null;
23620
+ lastApprovalEventAt = 0;
23612
23621
  historyWriter;
23613
23622
  instanceId;
23614
23623
  // ─── Lifecycle ─────────────────────────────────
@@ -23739,13 +23748,17 @@ var require_dist = __commonJS({
23739
23748
  if (!this.generatingStartedAt) this.generatingStartedAt = now;
23740
23749
  const modal = adapterStatus.activeModal;
23741
23750
  LOG5.info("CLI", `[${this.type}] approval modal: "${modal?.message?.slice(0, 80) ?? "none"}"`);
23742
- this.pushEvent({
23743
- event: "agent:waiting_approval",
23744
- chatTitle,
23745
- timestamp: now,
23746
- modalMessage: modal?.message,
23747
- modalButtons: modal?.buttons
23748
- });
23751
+ const approvalCooldown = 5e3;
23752
+ if (this.lastStatus !== "waiting_approval" && (!this.lastApprovalEventAt || now - this.lastApprovalEventAt > approvalCooldown)) {
23753
+ this.lastApprovalEventAt = now;
23754
+ this.pushEvent({
23755
+ event: "agent:waiting_approval",
23756
+ chatTitle,
23757
+ timestamp: now,
23758
+ modalMessage: modal?.message,
23759
+ modalButtons: modal?.buttons
23760
+ });
23761
+ }
23749
23762
  } else if (newStatus === "idle" && (this.lastStatus === "generating" || this.lastStatus === "waiting_approval")) {
23750
23763
  const duration3 = this.generatingStartedAt ? Math.round((now - this.generatingStartedAt) / 1e3) : 0;
23751
23764
  if (this.generatingDebouncePending) {
@@ -25166,7 +25179,8 @@ ${installInfo}`
25166
25179
  extensionId: this.extensionId,
25167
25180
  status: "error",
25168
25181
  messages: [],
25169
- inputContent: ""
25182
+ inputContent: "",
25183
+ _error: message
25170
25184
  };
25171
25185
  }
25172
25186
  };
@@ -25183,9 +25197,11 @@ ${installInfo}`
25183
25197
  if (providerLoader) {
25184
25198
  const allExtProviders = providerLoader.getByCategory("extension");
25185
25199
  for (const p of allExtProviders) {
25186
- const adapter = new ProviderStreamAdapter(p);
25200
+ const resolved = providerLoader.resolve(p.type);
25201
+ if (!resolved) continue;
25202
+ const adapter = new ProviderStreamAdapter(resolved);
25187
25203
  this.allAdapters.push(adapter);
25188
- this.logFn(`[AgentStream] Adapter created: ${p.type} (${p.name})`);
25204
+ this.logFn(`[AgentStream] Adapter created: ${p.type} (${p.name}) scripts=${Object.keys(resolved.scripts || {}).join(",") || "none"}`);
25189
25205
  }
25190
25206
  }
25191
25207
  }
@@ -25272,6 +25288,7 @@ ${installInfo}`
25272
25288
  try {
25273
25289
  const evaluate = (expr, timeout) => cdp.evaluateInSessionFrame(agent.sessionId, expr, timeout);
25274
25290
  const state = await agent.adapter.readChat(evaluate);
25291
+ this.logFn(`[AgentStream] readChat(${type}) result: status=${state.status} msgs=${state.messages?.length || 0} model=${state.model || ""}${state.status === "error" ? " error=" + JSON.stringify(state.error || state._error || "unknown") : ""}`);
25275
25292
  agent.lastState = state;
25276
25293
  agent.lastError = null;
25277
25294
  if (state.status === "panel_hidden") {
@@ -30313,7 +30330,7 @@ var init_adhdev_daemon = __esm({
30313
30330
  path2 = __toESM(require("path"));
30314
30331
  crypto2 = __toESM(require("crypto"));
30315
30332
  import_chalk = __toESM(require("chalk"));
30316
- pkgVersion = "0.5.32";
30333
+ pkgVersion = "0.5.34";
30317
30334
  if (pkgVersion === "unknown") {
30318
30335
  try {
30319
30336
  const possiblePaths = [