happy-imou-cloud 2.1.1 → 2.1.2

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.
Files changed (44) hide show
  1. package/bin/happy-cloud.mjs +21 -21
  2. package/compat/acp-sdk-schema/index.js +27 -27
  3. package/compat/acp-sdk-schema/types.gen.js +2 -2
  4. package/compat/acp-sdk-schema/zod.gen.js +1553 -1553
  5. package/compat/ink-build/components/Cursor.d.ts +83 -83
  6. package/compat/ink-build/components/Cursor.js +52 -52
  7. package/compat/ink-build/components/CursorContext.d.ts +11 -11
  8. package/compat/ink-build/components/CursorContext.js +7 -7
  9. package/compat/ink-build/components/ErrorBoundary.d.ts +18 -18
  10. package/compat/ink-build/components/ErrorBoundary.js +22 -22
  11. package/compat/ink-build/hooks/use-cursor.d.ts +12 -12
  12. package/compat/ink-build/hooks/use-cursor.js +28 -28
  13. package/dist/{BaseReasoningProcessor-Dn9FxfxU.mjs → BaseReasoningProcessor-BaOWkVcu.mjs} +3 -3
  14. package/dist/{BaseReasoningProcessor-CBMK-8Gi.cjs → BaseReasoningProcessor-CzvqwxuY.cjs} +3 -3
  15. package/dist/ProviderSelectionHandler-Q8pl7e-d.mjs +261 -0
  16. package/dist/ProviderSelectionHandler-wwbfeK_s.cjs +265 -0
  17. package/dist/{api-DBy5lPZw.mjs → api-Cxifhw5r.mjs} +3 -3
  18. package/dist/{api-DId_j3C2.cjs → api-DZimmN4C.cjs} +2 -2
  19. package/dist/{command-CeaBwYCW.mjs → command-B6LM3Nml.mjs} +3 -3
  20. package/dist/{command-DwfUpmId.cjs → command-RcCJI1jl.cjs} +3 -3
  21. package/dist/{index-CuuYSKiv.cjs → index-Cuvs0lFS.cjs} +168 -75
  22. package/dist/{index-66vjECEd.mjs → index-Des7I5WX.mjs} +165 -72
  23. package/dist/index.cjs +3 -3
  24. package/dist/index.mjs +3 -3
  25. package/dist/lib.cjs +1 -1
  26. package/dist/lib.d.cts +36 -36
  27. package/dist/lib.d.mts +36 -36
  28. package/dist/lib.mjs +1 -1
  29. package/dist/{persistence-BOWh1NER.mjs → persistence-6d4U4Sh8.mjs} +1 -1
  30. package/dist/{persistence-Dzr6sFwD.cjs → persistence-C8-MtdQK.cjs} +1 -1
  31. package/dist/{registerKillSessionHandler-D4_wpN18.mjs → registerKillSessionHandler-BFBkz_XT.mjs} +417 -5
  32. package/dist/{registerKillSessionHandler-Dg_iRBPm.cjs → registerKillSessionHandler-BapPCRmp.cjs} +419 -4
  33. package/dist/{runClaude-B74dHAnQ.mjs → runClaude-CPV5Uap2.mjs} +34 -5
  34. package/dist/{runClaude-oIFzkfuU.cjs → runClaude-DVnqKa1q.cjs} +37 -8
  35. package/dist/{runCodex-D_9CuL6M.cjs → runCodex-Bzsp8gFO.cjs} +29 -21
  36. package/dist/{runCodex-mLHjsgVj.mjs → runCodex-CwtLSTMJ.mjs} +26 -18
  37. package/dist/{runGemini-CcWGezMt.cjs → runGemini-6Dwyk_Km.cjs} +267 -82
  38. package/dist/{runGemini-BMiho2ab.mjs → runGemini-Bmoxehlh.mjs} +267 -82
  39. package/package.json +9 -9
  40. package/scripts/build.mjs +68 -68
  41. package/scripts/ensureAcpSdkCompat.mjs +170 -172
  42. package/scripts/release-smoke.mjs +38 -35
  43. package/dist/ProviderSelectionHandler-BuXk-8ji.cjs +0 -680
  44. package/dist/ProviderSelectionHandler-CMaQThYO.mjs +0 -673
@@ -1,6 +1,6 @@
1
1
  import{createRequire as _pkgrollCR}from"node:module";const require=_pkgrollCR(import.meta.url);import chalk from 'chalk';
2
- import { l as logger, e as encodeBase64, c as configuration, k as buildAuthenticatedHeaders, S as SigningBootstrapRequiredError, m as SIGNING_BOOTSTRAP_REQUIRED_MESSAGE, n as encodeBase64Url, h as delay, o as buildClientHeaders, q as decodeBase64, r as HAPPY_CLOUD_DAEMON_PORT, p as packageJson, A as ApiClient, t as HeadTailPreviewBuffer, u as getLatestDaemonLog } from './api-DBy5lPZw.mjs';
3
- import { writeCredentialsLegacy, writeCredentialsDataKey, readCredentials, readSettings, updateSettings, readDaemonState, clearDaemonState, acquireDaemonLock, writeDaemonState, releaseDaemonLock, validateProfileForAgent, getProfileEnvironmentVariables, clearCredentials, clearMachineId } from './persistence-BOWh1NER.mjs';
2
+ import { l as logger, e as encodeBase64, c as configuration, k as buildAuthenticatedHeaders, S as SigningBootstrapRequiredError, m as SIGNING_BOOTSTRAP_REQUIRED_MESSAGE, n as encodeBase64Url, h as delay, o as buildClientHeaders, q as decodeBase64, r as HAPPY_CLOUD_DAEMON_PORT, p as packageJson, A as ApiClient, t as HeadTailPreviewBuffer, u as getLatestDaemonLog } from './api-Cxifhw5r.mjs';
3
+ import { writeCredentialsLegacy, writeCredentialsDataKey, readCredentials, readSettings, updateSettings, readDaemonState, clearDaemonState, acquireDaemonLock, writeDaemonState, releaseDaemonLock, validateProfileForAgent, getProfileEnvironmentVariables, clearCredentials, clearMachineId } from './persistence-6d4U4Sh8.mjs';
4
4
  import { z } from 'zod';
5
5
  import fs, { writeFile as writeFile$1, rename, unlink as unlink$1 } from 'fs/promises';
6
6
  import os, { homedir } from 'os';
@@ -4845,10 +4845,10 @@ function truncateDisplayMessage(value, maxLength) {
4845
4845
  const DEFAULT_TIMEOUTS = {
4846
4846
  /** Default initialization timeout: 60 seconds */
4847
4847
  init: 6e4,
4848
- /** Default tool call timeout: 2 minutes */
4849
- toolCall: 12e4,
4850
- /** Think tool timeout: 30 seconds */
4851
- think: 3e4
4848
+ /** Default tool call timeout: 10 minutes */
4849
+ toolCall: 10 * 6e4,
4850
+ /** Think tool timeout: 2 minutes */
4851
+ think: 2 * 6e4
4852
4852
  };
4853
4853
  class DefaultTransport {
4854
4854
  agentName;
@@ -4925,7 +4925,7 @@ class DefaultTransport {
4925
4925
  return toolName;
4926
4926
  }
4927
4927
  getPostPromptNoUpdatesTimeoutMs() {
4928
- return 3e4;
4928
+ return 2 * 6e4;
4929
4929
  }
4930
4930
  }
4931
4931
 
@@ -4935,11 +4935,11 @@ const GEMINI_TIMEOUTS = {
4935
4935
  /** Gemini ACP can swallow an initialize request sent too early after spawn */
4936
4936
  initDelay: 2500,
4937
4937
  /** Standard tool call timeout */
4938
- toolCall: 12e4,
4938
+ toolCall: 10 * 6e4,
4939
4939
  /** Investigation tools (codebase_investigator) can run for a long time */
4940
- investigation: 6e5,
4940
+ investigation: 30 * 6e4,
4941
4941
  /** Think tools are usually quick */
4942
- think: 3e4,
4942
+ think: 2 * 6e4,
4943
4943
  /** Idle detection after last message chunk */
4944
4944
  idle: 500
4945
4945
  };
@@ -5136,6 +5136,21 @@ class GeminiTransport {
5136
5136
  }
5137
5137
  const geminiTransport = new GeminiTransport();
5138
5138
 
5139
+ const DEFAULT_CODEX_EXECUTE_TIMEOUT_MS = 30 * 6e4;
5140
+ function readPositiveIntegerEnv$1(name) {
5141
+ const raw = typeof process.env[name] === "string" ? process.env[name].trim() : "";
5142
+ if (!raw) {
5143
+ return null;
5144
+ }
5145
+ const value = Number(raw);
5146
+ if (!Number.isFinite(value) || !Number.isInteger(value) || value <= 0) {
5147
+ return null;
5148
+ }
5149
+ return value;
5150
+ }
5151
+ function resolveCodexExecuteTimeoutMs() {
5152
+ return readPositiveIntegerEnv$1("HAPPY_CODEX_EXECUTE_TIMEOUT_MS") ?? readPositiveIntegerEnv$1("HAPPIER_CODEX_EXECUTE_TIMEOUT_MS") ?? DEFAULT_CODEX_EXECUTE_TIMEOUT_MS;
5153
+ }
5139
5154
  class CodexTransport extends DefaultTransport {
5140
5155
  constructor() {
5141
5156
  super("codex");
@@ -5146,6 +5161,12 @@ class CodexTransport extends DefaultTransport {
5146
5161
  getIdleTimeout() {
5147
5162
  return 800;
5148
5163
  }
5164
+ getToolCallTimeout(toolCallId, toolKind) {
5165
+ if (toolKind === "execute") {
5166
+ return resolveCodexExecuteTimeoutMs();
5167
+ }
5168
+ return super.getToolCallTimeout(toolCallId, toolKind);
5169
+ }
5149
5170
  }
5150
5171
  new CodexTransport();
5151
5172
 
@@ -5176,7 +5197,7 @@ class CursorTransport extends DefaultTransport {
5176
5197
  const cursorTransport = new CursorTransport();
5177
5198
 
5178
5199
  const DEFAULT_IDLE_TIMEOUT_MS = 500;
5179
- const DEFAULT_TOOL_CALL_TIMEOUT_MS = 12e4;
5200
+ const DEFAULT_TOOL_CALL_TIMEOUT_MS = 10 * 6e4;
5180
5201
  const DEFAULT_TOOL_CALL_OUTPUT_PREVIEW_HEAD_BYTES = 2e3;
5181
5202
  const DEFAULT_TOOL_CALL_OUTPUT_PREVIEW_TAIL_BYTES = 4e3;
5182
5203
  function parseArgsFromContent(content) {
@@ -5436,41 +5457,14 @@ function startToolCall(toolCallId, toolKind, update, ctx, source) {
5436
5457
  }
5437
5458
  const timeoutMs = ctx.transport.getToolCallTimeout?.(toolCallId, toolKindStr) ?? DEFAULT_TOOL_CALL_TIMEOUT_MS;
5438
5459
  if (!ctx.toolCallTimeouts.has(toolCallId)) {
5439
- const timeout = setTimeout(() => {
5440
- const duration = formatDuration(ctx.toolCallStartTimes.get(toolCallId));
5441
- const timeoutLabel = formatToolCallTimeoutLimit(timeoutMs);
5442
- const timeoutDetail = `Tool call ${realToolName} timed out after ${timeoutLabel}`;
5443
- logger.debug(`[AcpBackend] \u23F1\uFE0F Tool call TIMEOUT (from ${source}): ${toolCallId} (${toolKind}) after ${timeoutLabel} - Duration: ${duration}, failing current turn`);
5444
- ctx.activeToolCalls.delete(toolCallId);
5445
- ctx.toolCallStartTimes.delete(toolCallId);
5446
- ctx.toolCallTimeouts.delete(toolCallId);
5447
- ctx.clearIdleTimeout();
5448
- const streamedOutput = renderToolOutput(ctx.toolCallOutputs.get(toolCallId));
5449
- ctx.toolCallOutputs.delete(toolCallId);
5450
- ctx.emit({
5451
- type: "tool-result",
5452
- toolName: realToolName,
5453
- result: streamedOutput ? {
5454
- stdout: streamedOutput,
5455
- error: timeoutDetail,
5456
- status: "failed",
5457
- timedOut: true
5458
- } : {
5459
- error: timeoutDetail,
5460
- status: "failed",
5461
- timedOut: true
5462
- },
5463
- callId: toolCallId
5464
- });
5465
- ctx.emit({
5466
- type: "status",
5467
- status: "error",
5468
- detail: timeoutDetail
5469
- });
5470
- ctx.failPendingResponseWait(new Error(timeoutDetail));
5471
- }, timeoutMs);
5472
- ctx.toolCallTimeouts.set(toolCallId, timeout);
5473
- logger.debug(`[AcpBackend] \u23F1\uFE0F Set timeout for ${toolCallId}: ${(timeoutMs / 1e3).toFixed(0)}s${isInvestigation ? " (investigation tool)" : ""}`);
5460
+ ctx.armToolCallTimeout({
5461
+ toolCallId,
5462
+ toolKind,
5463
+ toolName: realToolName,
5464
+ timeoutMs,
5465
+ source
5466
+ });
5467
+ logger.debug(`[AcpBackend] \u23F1\uFE0F Set no-progress timeout for ${toolCallId}: ${(timeoutMs / 1e3).toFixed(0)}s${isInvestigation ? " (investigation tool)" : ""}`);
5474
5468
  } else {
5475
5469
  logger.debug(`[AcpBackend] Timeout already set for ${toolCallId}, skipping`);
5476
5470
  }
@@ -5496,11 +5490,7 @@ function completeToolCall(toolCallId, toolKind, content, ctx) {
5496
5490
  const toolKindStr = typeof toolKind === "string" ? toolKind : "unknown";
5497
5491
  ctx.activeToolCalls.delete(toolCallId);
5498
5492
  ctx.toolCallStartTimes.delete(toolCallId);
5499
- const timeout = ctx.toolCallTimeouts.get(toolCallId);
5500
- if (timeout) {
5501
- clearTimeout(timeout);
5502
- ctx.toolCallTimeouts.delete(toolCallId);
5503
- }
5493
+ ctx.clearToolCallTimeout(toolCallId);
5504
5494
  const streamedOutput = renderToolOutput(ctx.toolCallOutputs.get(toolCallId));
5505
5495
  ctx.toolCallOutputs.delete(toolCallId);
5506
5496
  logger.debug(`[AcpBackend] \u2705 Tool call COMPLETED: ${toolCallId} (${toolKindStr}) - Duration: ${duration}. Active tool calls: ${ctx.activeToolCalls.size}`);
@@ -5539,10 +5529,8 @@ function failToolCall(toolCallId, status, toolKind, content, ctx) {
5539
5529
  }
5540
5530
  ctx.activeToolCalls.delete(toolCallId);
5541
5531
  ctx.toolCallStartTimes.delete(toolCallId);
5542
- const timeout = ctx.toolCallTimeouts.get(toolCallId);
5543
- if (timeout) {
5544
- clearTimeout(timeout);
5545
- ctx.toolCallTimeouts.delete(toolCallId);
5532
+ const clearedTimeout = ctx.clearToolCallTimeout(toolCallId);
5533
+ if (clearedTimeout) {
5546
5534
  logger.debug(`[AcpBackend] Cleared timeout for ${toolCallId} (tool call ${status})`);
5547
5535
  } else {
5548
5536
  logger.debug(`[AcpBackend] No timeout found for ${toolCallId} (tool call ${status}) - timeout may not have been set`);
@@ -5865,7 +5853,7 @@ const RETRY_CONFIG = {
5865
5853
  /** Maximum delay between retries in ms */
5866
5854
  maxDelayMs: 5e3
5867
5855
  };
5868
- const DEFAULT_POST_PROMPT_NO_UPDATES_TIMEOUT_MS = 3e4;
5856
+ const DEFAULT_POST_PROMPT_NO_UPDATES_TIMEOUT_MS = 2 * 6e4;
5869
5857
  function readPositiveIntegerEnv(name) {
5870
5858
  const raw = typeof process.env[name] === "string" ? process.env[name].trim() : "";
5871
5859
  if (!raw) {
@@ -6174,6 +6162,7 @@ class AcpBackend {
6174
6162
  /** Track active tool calls to prevent duplicate events */
6175
6163
  activeToolCalls = /* @__PURE__ */ new Set();
6176
6164
  toolCallTimeouts = /* @__PURE__ */ new Map();
6165
+ toolCallTimeoutSpecs = /* @__PURE__ */ new Map();
6177
6166
  /** Track tool call start times for performance monitoring */
6178
6167
  toolCallStartTimes = /* @__PURE__ */ new Map();
6179
6168
  /** Track streamed tool output between ACP updates and final completion */
@@ -6198,6 +6187,12 @@ class AcpBackend {
6198
6187
  waitingForResponse = false;
6199
6188
  /** First fatal prompt-level error observed for the current turn */
6200
6189
  responseCompletionError = null;
6190
+ /** Resettable no-progress timeout while waiting for a turn to finish */
6191
+ responseWaitTimeout = null;
6192
+ /** Current inactivity threshold used by waitForResponseComplete */
6193
+ responseWaitTimeoutMs = null;
6194
+ /** Timestamp of the last meaningful response progress for the current turn */
6195
+ responseLastProgressAt = null;
6201
6196
  /** Fallback completion when prompt returns but the agent emits no session updates */
6202
6197
  postPromptCompletionIdleTimeout = null;
6203
6198
  /** Whether at least one session/update arrived after the current prompt */
@@ -6231,12 +6226,110 @@ class AcpBackend {
6231
6226
  this.postPromptCompletionIdleTimeout = null;
6232
6227
  }
6233
6228
  }
6229
+ clearResponseWaitTimeout() {
6230
+ if (this.responseWaitTimeout) {
6231
+ clearTimeout(this.responseWaitTimeout);
6232
+ this.responseWaitTimeout = null;
6233
+ }
6234
+ }
6235
+ resetResponseWaitTracking() {
6236
+ this.clearResponseWaitTimeout();
6237
+ this.responseWaitTimeoutMs = null;
6238
+ this.responseLastProgressAt = null;
6239
+ }
6240
+ armResponseWaitTimeout(timeoutMs) {
6241
+ this.responseWaitTimeoutMs = timeoutMs;
6242
+ this.clearResponseWaitTimeout();
6243
+ const lastProgressAt = this.responseLastProgressAt ?? Date.now();
6244
+ const elapsedMs = Math.max(0, Date.now() - lastProgressAt);
6245
+ const remainingMs = Math.max(1, timeoutMs - elapsedMs);
6246
+ this.responseWaitTimeout = setTimeout(() => {
6247
+ this.responseWaitTimeout = null;
6248
+ this.responseWaitTimeoutMs = null;
6249
+ this.failPendingResponseWait(new Error("Timeout waiting for response to complete"));
6250
+ }, remainingMs);
6251
+ }
6252
+ scheduleToolCallTimeout(toolCallId) {
6253
+ const spec = this.toolCallTimeoutSpecs.get(toolCallId);
6254
+ if (!spec) {
6255
+ return;
6256
+ }
6257
+ const existing = this.toolCallTimeouts.get(toolCallId);
6258
+ if (existing) {
6259
+ clearTimeout(existing);
6260
+ }
6261
+ const timeout = setTimeout(() => {
6262
+ const duration = formatDuration(this.toolCallStartTimes.get(toolCallId));
6263
+ const timeoutLabel = formatToolCallTimeoutLimit(spec.timeoutMs);
6264
+ const timeoutDetail = `Tool call ${spec.toolName} timed out after ${timeoutLabel}`;
6265
+ logger.debug(`[AcpBackend] \u23F1\uFE0F Tool call TIMEOUT (from ${spec.source}): ${toolCallId} (${spec.toolKind}) after ${timeoutLabel} without progress - Duration: ${duration}, failing current turn`);
6266
+ this.activeToolCalls.delete(toolCallId);
6267
+ this.toolCallStartTimes.delete(toolCallId);
6268
+ this.clearToolCallTimeout(toolCallId);
6269
+ this.clearIdleTimeoutState();
6270
+ const streamedOutput = renderToolOutput(this.toolCallOutputs.get(toolCallId));
6271
+ this.toolCallOutputs.delete(toolCallId);
6272
+ this.emit({
6273
+ type: "tool-result",
6274
+ toolName: spec.toolName,
6275
+ result: streamedOutput ? {
6276
+ stdout: streamedOutput,
6277
+ error: timeoutDetail,
6278
+ status: "failed",
6279
+ timedOut: true
6280
+ } : {
6281
+ error: timeoutDetail,
6282
+ status: "failed",
6283
+ timedOut: true
6284
+ },
6285
+ callId: toolCallId
6286
+ });
6287
+ this.emit({
6288
+ type: "status",
6289
+ status: "error",
6290
+ detail: timeoutDetail
6291
+ });
6292
+ this.failPendingResponseWait(new Error(timeoutDetail));
6293
+ }, spec.timeoutMs);
6294
+ this.toolCallTimeouts.set(toolCallId, timeout);
6295
+ }
6296
+ armToolCallTimeout(spec) {
6297
+ this.toolCallTimeoutSpecs.set(spec.toolCallId, spec);
6298
+ this.scheduleToolCallTimeout(spec.toolCallId);
6299
+ }
6300
+ clearToolCallTimeout(toolCallId) {
6301
+ const timeout = this.toolCallTimeouts.get(toolCallId);
6302
+ const hadTimeout = Boolean(timeout);
6303
+ if (timeout) {
6304
+ clearTimeout(timeout);
6305
+ this.toolCallTimeouts.delete(toolCallId);
6306
+ }
6307
+ this.toolCallTimeoutSpecs.delete(toolCallId);
6308
+ return hadTimeout;
6309
+ }
6310
+ refreshActiveToolCallTimeouts() {
6311
+ for (const toolCallId of this.activeToolCalls) {
6312
+ if (this.toolCallTimeoutSpecs.has(toolCallId)) {
6313
+ this.scheduleToolCallTimeout(toolCallId);
6314
+ }
6315
+ }
6316
+ }
6317
+ markResponseProgress(opts = {}) {
6318
+ this.responseLastProgressAt = Date.now();
6319
+ if (opts.refreshToolTimeouts !== false) {
6320
+ this.refreshActiveToolCallTimeouts();
6321
+ }
6322
+ if (this.waitingForResponse && this.responseWaitTimeoutMs != null) {
6323
+ this.armResponseWaitTimeout(this.responseWaitTimeoutMs);
6324
+ }
6325
+ }
6234
6326
  clearToolCallTracking() {
6235
6327
  this.activeToolCalls.clear();
6236
6328
  for (const timeout of this.toolCallTimeouts.values()) {
6237
6329
  clearTimeout(timeout);
6238
6330
  }
6239
6331
  this.toolCallTimeouts.clear();
6332
+ this.toolCallTimeoutSpecs.clear();
6240
6333
  this.toolCallStartTimes.clear();
6241
6334
  this.toolCallIdToNameMap.clear();
6242
6335
  this.toolCallOutputs.clear();
@@ -6246,6 +6339,7 @@ class AcpBackend {
6246
6339
  this.responseCompletionOutcome = null;
6247
6340
  this.responseCompletionError = null;
6248
6341
  this.sawSessionUpdateSincePrompt = false;
6342
+ this.resetResponseWaitTracking();
6249
6343
  this.clearIdleTimeoutState();
6250
6344
  this.clearPostPromptCompletionIdleTimeout();
6251
6345
  this.clearToolCallTracking();
@@ -6257,6 +6351,7 @@ class AcpBackend {
6257
6351
  this.responseCompletionError = error;
6258
6352
  this.responseCompletionOutcome = null;
6259
6353
  this.waitingForResponse = false;
6354
+ this.resetResponseWaitTracking();
6260
6355
  this.clearPostPromptCompletionIdleTimeout();
6261
6356
  if (this.idleRejecter) {
6262
6357
  this.idleRejecter(error);
@@ -6266,6 +6361,7 @@ class AcpBackend {
6266
6361
  }
6267
6362
  settleResponseWaiter(outcome) {
6268
6363
  const hasActiveWaiter = Boolean(this.idleResolver || this.idleRejecter);
6364
+ this.resetResponseWaitTracking();
6269
6365
  if (!this.waitingForResponse && !hasActiveWaiter) {
6270
6366
  return;
6271
6367
  }
@@ -6737,6 +6833,8 @@ ${recentStderrExcerpt}`);
6737
6833
  emit: (msg) => this.emit(msg),
6738
6834
  emitIdleStatus: () => this.emitIdleStatus(),
6739
6835
  failPendingResponseWait: (error) => this.failPendingResponseWait(error),
6836
+ armToolCallTimeout: (spec) => this.armToolCallTimeout(spec),
6837
+ clearToolCallTimeout: (toolCallId) => this.clearToolCallTimeout(toolCallId),
6740
6838
  clearIdleTimeout: () => {
6741
6839
  if (this.idleTimeout) {
6742
6840
  clearTimeout(this.idleTimeout);
@@ -6777,6 +6875,7 @@ ${recentStderrExcerpt}`);
6777
6875
  this.clearPostPromptCompletionIdleTimeout();
6778
6876
  for (const update of updates) {
6779
6877
  const sessionUpdateType = update.sessionUpdate;
6878
+ this.markResponseProgress();
6780
6879
  if (sessionUpdateType !== "agent_message_chunk" && sessionUpdateType !== "tool_call_update") {
6781
6880
  logger.debug(`[AcpBackend] Received session update: ${sessionUpdateType}`, JSON.stringify({
6782
6881
  sessionUpdate: sessionUpdateType,
@@ -6840,6 +6939,7 @@ ${recentStderrExcerpt}`);
6840
6939
  this.resetResponseTrackingForNewPrompt();
6841
6940
  this.emit({ type: "status", status: "running" });
6842
6941
  this.waitingForResponse = true;
6942
+ this.markResponseProgress({ refreshToolTimeouts: false });
6843
6943
  try {
6844
6944
  logger.debug(`[AcpBackend] Sending prompt (length: ${prompt.length}): ${prompt.substring(0, 100)}...`);
6845
6945
  logger.debug(`[AcpBackend] Full prompt: ${prompt}`);
@@ -6900,7 +7000,7 @@ ${recentStderrExcerpt}`);
6900
7000
  * Wait for the response to complete (idle status after all chunks received)
6901
7001
  * Call this after sendPrompt to wait for Gemini to finish responding
6902
7002
  */
6903
- async waitForResponseComplete(timeoutMs = 12e4) {
7003
+ async waitForResponseComplete(timeoutMs = 10 * 6e4) {
6904
7004
  if (this.responseCompletionError) {
6905
7005
  throw this.responseCompletionError;
6906
7006
  }
@@ -6916,26 +7016,19 @@ ${recentStderrExcerpt}`);
6916
7016
  return;
6917
7017
  }
6918
7018
  return new Promise((resolve, reject) => {
6919
- const timeout = setTimeout(() => {
6920
- this.idleResolver = null;
6921
- this.idleRejecter = null;
6922
- this.waitingForResponse = false;
6923
- reject(new Error("Timeout waiting for response to complete"));
6924
- }, timeoutMs);
6925
7019
  this.idleResolver = () => {
6926
- clearTimeout(timeout);
6927
7020
  this.idleResolver = null;
6928
7021
  this.idleRejecter = null;
6929
7022
  this.waitingForResponse = false;
6930
7023
  resolve();
6931
7024
  };
6932
7025
  this.idleRejecter = (error) => {
6933
- clearTimeout(timeout);
6934
7026
  this.idleResolver = null;
6935
7027
  this.idleRejecter = null;
6936
7028
  this.waitingForResponse = false;
6937
7029
  reject(error);
6938
7030
  };
7031
+ this.armResponseWaitTimeout(timeoutMs);
6939
7032
  });
6940
7033
  }
6941
7034
  /**
@@ -8421,7 +8514,7 @@ class ClaudeCodeBackend {
8421
8514
  logger.debug("[ClaudeRuntimeBackend] Error interrupting Claude query:", error);
8422
8515
  }
8423
8516
  }
8424
- async waitForResponseComplete(timeoutMs = 12e4) {
8517
+ async waitForResponseComplete(timeoutMs = 10 * 6e4) {
8425
8518
  if (this.responseCompletionOutcome) {
8426
8519
  const outcome = this.responseCompletionOutcome;
8427
8520
  if (outcome.kind === "rejected") {
@@ -9001,11 +9094,11 @@ var launch = /*#__PURE__*/Object.freeze({
9001
9094
 
9002
9095
  const unifiedProviderExecutors = {
9003
9096
  claude: async (opts) => {
9004
- const { runClaude } = await import('./runClaude-B74dHAnQ.mjs');
9097
+ const { runClaude } = await import('./runClaude-CPV5Uap2.mjs');
9005
9098
  await runClaude(opts.credentials, opts.claudeOptions ?? {});
9006
9099
  },
9007
9100
  codex: async (opts) => {
9008
- const { runCodex } = await import('./runCodex-mLHjsgVj.mjs');
9101
+ const { runCodex } = await import('./runCodex-CwtLSTMJ.mjs');
9009
9102
  await runCodex({
9010
9103
  credentials: opts.credentials,
9011
9104
  startedBy: opts.startedBy,
@@ -9014,7 +9107,7 @@ const unifiedProviderExecutors = {
9014
9107
  });
9015
9108
  },
9016
9109
  gemini: async (opts) => {
9017
- const { runGemini } = await import('./runGemini-BMiho2ab.mjs');
9110
+ const { runGemini } = await import('./runGemini-Bmoxehlh.mjs');
9018
9111
  await runGemini({
9019
9112
  credentials: opts.credentials,
9020
9113
  startedBy: opts.startedBy
@@ -9090,7 +9183,7 @@ function shouldRunMainClaudeFlow(opts) {
9090
9183
  return;
9091
9184
  } else if (subcommand === "runtime") {
9092
9185
  if (args[1] === "providers") {
9093
- const { renderRuntimeProviders } = await import('./command-CeaBwYCW.mjs');
9186
+ const { renderRuntimeProviders } = await import('./command-B6LM3Nml.mjs');
9094
9187
  console.log(renderRuntimeProviders());
9095
9188
  return;
9096
9189
  }
@@ -9268,8 +9361,8 @@ function shouldRunMainClaudeFlow(opts) {
9268
9361
  const projectId = args[3];
9269
9362
  try {
9270
9363
  const { saveGoogleCloudProjectToConfig } = await Promise.resolve().then(function () { return config; });
9271
- const { readCredentials: readCredentials2 } = await import('./persistence-BOWh1NER.mjs');
9272
- const { ApiClient: ApiClient2 } = await import('./api-DBy5lPZw.mjs').then(function (n) { return n.v; });
9364
+ const { readCredentials: readCredentials2 } = await import('./persistence-6d4U4Sh8.mjs');
9365
+ const { ApiClient: ApiClient2 } = await import('./api-Cxifhw5r.mjs').then(function (n) { return n.v; });
9273
9366
  let userEmail = void 0;
9274
9367
  try {
9275
9368
  const credentials = await readCredentials2();
package/dist/index.cjs CHANGED
@@ -1,10 +1,10 @@
1
1
  'use strict';
2
2
 
3
3
  require('chalk');
4
- require('./api-DId_j3C2.cjs');
5
- require('./persistence-Dzr6sFwD.cjs');
4
+ require('./api-DZimmN4C.cjs');
5
+ require('./persistence-C8-MtdQK.cjs');
6
6
  require('zod');
7
- require('./index-CuuYSKiv.cjs');
7
+ require('./index-Cuvs0lFS.cjs');
8
8
  require('node:child_process');
9
9
  require('node:fs');
10
10
  require('cross-spawn');
package/dist/index.mjs CHANGED
@@ -1,8 +1,8 @@
1
1
  import 'chalk';
2
- import './api-DBy5lPZw.mjs';
3
- import './persistence-BOWh1NER.mjs';
2
+ import './api-Cxifhw5r.mjs';
3
+ import './persistence-6d4U4Sh8.mjs';
4
4
  import 'zod';
5
- import './index-66vjECEd.mjs';
5
+ import './index-Des7I5WX.mjs';
6
6
  import 'node:child_process';
7
7
  import 'node:fs';
8
8
  import 'cross-spawn';
package/dist/lib.cjs CHANGED
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var api = require('./api-DId_j3C2.cjs');
3
+ var api = require('./api-DZimmN4C.cjs');
4
4
  var types = require('./types-DVk3crez.cjs');
5
5
  require('axios');
6
6
  require('chalk');