happy-imou-cloud 2.0.23 → 2.1.0
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/{BaseReasoningProcessor-BzbDRBqp.cjs → BaseReasoningProcessor-C9mH8EVn.cjs} +3 -3
- package/dist/{BaseReasoningProcessor-DH3BCCTf.mjs → BaseReasoningProcessor-DQkzwRuf.mjs} +3 -3
- package/dist/ProviderSelectionHandler-5Dedbm8j.cjs +265 -0
- package/dist/ProviderSelectionHandler-BlrrLPlo.mjs +261 -0
- package/dist/{api-C4bF6GEA.cjs → api-Bd-MnOS4.cjs} +2 -2
- package/dist/{api-DX7Vg4Hz.mjs → api-w_CUxb9Q.mjs} +3 -3
- package/dist/{command-CF6Wi_v2.cjs → command-DoDmHNxR.cjs} +3 -3
- package/dist/{command-DicPZ-Up.mjs → command-mTWwCqTY.mjs} +3 -3
- package/dist/{index-BybqdOf2.cjs → index-BQmJ4NAa.cjs} +148 -76
- package/dist/{index-CEJmASSW.mjs → index-GuXV-pxB.mjs} +145 -73
- package/dist/index.cjs +3 -3
- package/dist/index.mjs +3 -3
- package/dist/lib.cjs +1 -1
- package/dist/lib.mjs +1 -1
- package/dist/{persistence-CdqBfAwo.cjs → persistence-BL06LLVz.cjs} +1 -1
- package/dist/{persistence-xypxp7ei.mjs → persistence-MSy70is3.mjs} +1 -1
- package/dist/{registerKillSessionHandler-BNN-_qNu.mjs → registerKillSessionHandler-CjWfUfc3.mjs} +417 -5
- package/dist/{registerKillSessionHandler-BK3fZIch.cjs → registerKillSessionHandler-D9kwxy6B.cjs} +419 -4
- package/dist/{runClaude-CT3jCZjH.cjs → runClaude-D2ZEXue8.cjs} +8 -8
- package/dist/{runClaude-B-ex_tr3.mjs → runClaude-DpZ95Twb.mjs} +5 -5
- package/dist/{runCodex-DhbvUtJC.mjs → runCodex-CJwaep2R.mjs} +6 -6
- package/dist/{runCodex-DodH9jhh.cjs → runCodex-Dz_1ho8d.cjs} +9 -9
- package/dist/{runGemini-BsFR5Pd3.mjs → runGemini-BehqjM73.mjs} +189 -70
- package/dist/{runGemini-CeHCZ1l4.cjs → runGemini-Dfu6LltX.cjs} +189 -70
- package/package.json +1 -1
- package/scripts/release-smoke.mjs +3 -0
- package/dist/ProviderSelectionHandler-CbkbtIRC.mjs +0 -673
- package/dist/ProviderSelectionHandler-meVvz9NZ.cjs +0 -680
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var chalk = require('chalk');
|
|
4
|
-
var api = require('./api-
|
|
5
|
-
var persistence = require('./persistence-
|
|
4
|
+
var api = require('./api-Bd-MnOS4.cjs');
|
|
5
|
+
var persistence = require('./persistence-BL06LLVz.cjs');
|
|
6
6
|
var z = require('zod');
|
|
7
7
|
var fs$2 = require('fs/promises');
|
|
8
8
|
var os$1 = require('os');
|
|
@@ -72,7 +72,7 @@ async function openBrowser(url) {
|
|
|
72
72
|
}
|
|
73
73
|
}
|
|
74
74
|
|
|
75
|
-
const require$1 = node_module.createRequire((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('index-
|
|
75
|
+
const require$1 = node_module.createRequire((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('index-BQmJ4NAa.cjs', document.baseURI).href)));
|
|
76
76
|
const QRCode = require$1("qrcode-terminal/vendor/QRCode");
|
|
77
77
|
const QRErrorCorrectLevel = require$1("qrcode-terminal/vendor/QRCode/QRErrorCorrectLevel");
|
|
78
78
|
const pendingTempFiles = /* @__PURE__ */ new Set();
|
|
@@ -695,7 +695,7 @@ function setupCleanupHandlers() {
|
|
|
695
695
|
});
|
|
696
696
|
}
|
|
697
697
|
|
|
698
|
-
const __dirname$2 = path$1.dirname(url.fileURLToPath((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('index-
|
|
698
|
+
const __dirname$2 = path$1.dirname(url.fileURLToPath((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('index-BQmJ4NAa.cjs', document.baseURI).href))));
|
|
699
699
|
function projectPath() {
|
|
700
700
|
const path = path$1.resolve(__dirname$2, "..");
|
|
701
701
|
return path;
|
|
@@ -4867,10 +4867,10 @@ function truncateDisplayMessage(value, maxLength) {
|
|
|
4867
4867
|
const DEFAULT_TIMEOUTS = {
|
|
4868
4868
|
/** Default initialization timeout: 60 seconds */
|
|
4869
4869
|
init: 6e4,
|
|
4870
|
-
/** Default tool call timeout:
|
|
4871
|
-
toolCall:
|
|
4872
|
-
/** Think tool timeout:
|
|
4873
|
-
think:
|
|
4870
|
+
/** Default tool call timeout: 10 minutes */
|
|
4871
|
+
toolCall: 10 * 6e4,
|
|
4872
|
+
/** Think tool timeout: 2 minutes */
|
|
4873
|
+
think: 2 * 6e4
|
|
4874
4874
|
};
|
|
4875
4875
|
class DefaultTransport {
|
|
4876
4876
|
agentName;
|
|
@@ -4947,7 +4947,7 @@ class DefaultTransport {
|
|
|
4947
4947
|
return toolName;
|
|
4948
4948
|
}
|
|
4949
4949
|
getPostPromptNoUpdatesTimeoutMs() {
|
|
4950
|
-
return
|
|
4950
|
+
return 2 * 6e4;
|
|
4951
4951
|
}
|
|
4952
4952
|
}
|
|
4953
4953
|
|
|
@@ -4957,11 +4957,11 @@ const GEMINI_TIMEOUTS = {
|
|
|
4957
4957
|
/** Gemini ACP can swallow an initialize request sent too early after spawn */
|
|
4958
4958
|
initDelay: 2500,
|
|
4959
4959
|
/** Standard tool call timeout */
|
|
4960
|
-
toolCall:
|
|
4960
|
+
toolCall: 10 * 6e4,
|
|
4961
4961
|
/** Investigation tools (codebase_investigator) can run for a long time */
|
|
4962
|
-
investigation:
|
|
4962
|
+
investigation: 30 * 6e4,
|
|
4963
4963
|
/** Think tools are usually quick */
|
|
4964
|
-
think:
|
|
4964
|
+
think: 2 * 6e4,
|
|
4965
4965
|
/** Idle detection after last message chunk */
|
|
4966
4966
|
idle: 500
|
|
4967
4967
|
};
|
|
@@ -5158,7 +5158,7 @@ class GeminiTransport {
|
|
|
5158
5158
|
}
|
|
5159
5159
|
const geminiTransport = new GeminiTransport();
|
|
5160
5160
|
|
|
5161
|
-
const DEFAULT_CODEX_EXECUTE_TIMEOUT_MS =
|
|
5161
|
+
const DEFAULT_CODEX_EXECUTE_TIMEOUT_MS = 30 * 6e4;
|
|
5162
5162
|
function readPositiveIntegerEnv$1(name) {
|
|
5163
5163
|
const raw = typeof process.env[name] === "string" ? process.env[name].trim() : "";
|
|
5164
5164
|
if (!raw) {
|
|
@@ -5219,7 +5219,7 @@ class CursorTransport extends DefaultTransport {
|
|
|
5219
5219
|
const cursorTransport = new CursorTransport();
|
|
5220
5220
|
|
|
5221
5221
|
const DEFAULT_IDLE_TIMEOUT_MS = 500;
|
|
5222
|
-
const DEFAULT_TOOL_CALL_TIMEOUT_MS =
|
|
5222
|
+
const DEFAULT_TOOL_CALL_TIMEOUT_MS = 10 * 6e4;
|
|
5223
5223
|
const DEFAULT_TOOL_CALL_OUTPUT_PREVIEW_HEAD_BYTES = 2e3;
|
|
5224
5224
|
const DEFAULT_TOOL_CALL_OUTPUT_PREVIEW_TAIL_BYTES = 4e3;
|
|
5225
5225
|
function parseArgsFromContent(content) {
|
|
@@ -5479,41 +5479,14 @@ function startToolCall(toolCallId, toolKind, update, ctx, source) {
|
|
|
5479
5479
|
}
|
|
5480
5480
|
const timeoutMs = ctx.transport.getToolCallTimeout?.(toolCallId, toolKindStr) ?? DEFAULT_TOOL_CALL_TIMEOUT_MS;
|
|
5481
5481
|
if (!ctx.toolCallTimeouts.has(toolCallId)) {
|
|
5482
|
-
|
|
5483
|
-
|
|
5484
|
-
|
|
5485
|
-
|
|
5486
|
-
|
|
5487
|
-
|
|
5488
|
-
|
|
5489
|
-
|
|
5490
|
-
ctx.clearIdleTimeout();
|
|
5491
|
-
const streamedOutput = renderToolOutput(ctx.toolCallOutputs.get(toolCallId));
|
|
5492
|
-
ctx.toolCallOutputs.delete(toolCallId);
|
|
5493
|
-
ctx.emit({
|
|
5494
|
-
type: "tool-result",
|
|
5495
|
-
toolName: realToolName,
|
|
5496
|
-
result: streamedOutput ? {
|
|
5497
|
-
stdout: streamedOutput,
|
|
5498
|
-
error: timeoutDetail,
|
|
5499
|
-
status: "failed",
|
|
5500
|
-
timedOut: true
|
|
5501
|
-
} : {
|
|
5502
|
-
error: timeoutDetail,
|
|
5503
|
-
status: "failed",
|
|
5504
|
-
timedOut: true
|
|
5505
|
-
},
|
|
5506
|
-
callId: toolCallId
|
|
5507
|
-
});
|
|
5508
|
-
ctx.emit({
|
|
5509
|
-
type: "status",
|
|
5510
|
-
status: "error",
|
|
5511
|
-
detail: timeoutDetail
|
|
5512
|
-
});
|
|
5513
|
-
ctx.failPendingResponseWait(new Error(timeoutDetail));
|
|
5514
|
-
}, timeoutMs);
|
|
5515
|
-
ctx.toolCallTimeouts.set(toolCallId, timeout);
|
|
5516
|
-
api.logger.debug(`[AcpBackend] \u23F1\uFE0F Set timeout for ${toolCallId}: ${(timeoutMs / 1e3).toFixed(0)}s${isInvestigation ? " (investigation tool)" : ""}`);
|
|
5482
|
+
ctx.armToolCallTimeout({
|
|
5483
|
+
toolCallId,
|
|
5484
|
+
toolKind,
|
|
5485
|
+
toolName: realToolName,
|
|
5486
|
+
timeoutMs,
|
|
5487
|
+
source
|
|
5488
|
+
});
|
|
5489
|
+
api.logger.debug(`[AcpBackend] \u23F1\uFE0F Set no-progress timeout for ${toolCallId}: ${(timeoutMs / 1e3).toFixed(0)}s${isInvestigation ? " (investigation tool)" : ""}`);
|
|
5517
5490
|
} else {
|
|
5518
5491
|
api.logger.debug(`[AcpBackend] Timeout already set for ${toolCallId}, skipping`);
|
|
5519
5492
|
}
|
|
@@ -5539,11 +5512,7 @@ function completeToolCall(toolCallId, toolKind, content, ctx) {
|
|
|
5539
5512
|
const toolKindStr = typeof toolKind === "string" ? toolKind : "unknown";
|
|
5540
5513
|
ctx.activeToolCalls.delete(toolCallId);
|
|
5541
5514
|
ctx.toolCallStartTimes.delete(toolCallId);
|
|
5542
|
-
|
|
5543
|
-
if (timeout) {
|
|
5544
|
-
clearTimeout(timeout);
|
|
5545
|
-
ctx.toolCallTimeouts.delete(toolCallId);
|
|
5546
|
-
}
|
|
5515
|
+
ctx.clearToolCallTimeout(toolCallId);
|
|
5547
5516
|
const streamedOutput = renderToolOutput(ctx.toolCallOutputs.get(toolCallId));
|
|
5548
5517
|
ctx.toolCallOutputs.delete(toolCallId);
|
|
5549
5518
|
api.logger.debug(`[AcpBackend] \u2705 Tool call COMPLETED: ${toolCallId} (${toolKindStr}) - Duration: ${duration}. Active tool calls: ${ctx.activeToolCalls.size}`);
|
|
@@ -5582,10 +5551,8 @@ function failToolCall(toolCallId, status, toolKind, content, ctx) {
|
|
|
5582
5551
|
}
|
|
5583
5552
|
ctx.activeToolCalls.delete(toolCallId);
|
|
5584
5553
|
ctx.toolCallStartTimes.delete(toolCallId);
|
|
5585
|
-
const
|
|
5586
|
-
if (
|
|
5587
|
-
clearTimeout(timeout);
|
|
5588
|
-
ctx.toolCallTimeouts.delete(toolCallId);
|
|
5554
|
+
const clearedTimeout = ctx.clearToolCallTimeout(toolCallId);
|
|
5555
|
+
if (clearedTimeout) {
|
|
5589
5556
|
api.logger.debug(`[AcpBackend] Cleared timeout for ${toolCallId} (tool call ${status})`);
|
|
5590
5557
|
} else {
|
|
5591
5558
|
api.logger.debug(`[AcpBackend] No timeout found for ${toolCallId} (tool call ${status}) - timeout may not have been set`);
|
|
@@ -5908,7 +5875,7 @@ const RETRY_CONFIG = {
|
|
|
5908
5875
|
/** Maximum delay between retries in ms */
|
|
5909
5876
|
maxDelayMs: 5e3
|
|
5910
5877
|
};
|
|
5911
|
-
const DEFAULT_POST_PROMPT_NO_UPDATES_TIMEOUT_MS =
|
|
5878
|
+
const DEFAULT_POST_PROMPT_NO_UPDATES_TIMEOUT_MS = 2 * 6e4;
|
|
5912
5879
|
function readPositiveIntegerEnv(name) {
|
|
5913
5880
|
const raw = typeof process.env[name] === "string" ? process.env[name].trim() : "";
|
|
5914
5881
|
if (!raw) {
|
|
@@ -6217,6 +6184,7 @@ class AcpBackend {
|
|
|
6217
6184
|
/** Track active tool calls to prevent duplicate events */
|
|
6218
6185
|
activeToolCalls = /* @__PURE__ */ new Set();
|
|
6219
6186
|
toolCallTimeouts = /* @__PURE__ */ new Map();
|
|
6187
|
+
toolCallTimeoutSpecs = /* @__PURE__ */ new Map();
|
|
6220
6188
|
/** Track tool call start times for performance monitoring */
|
|
6221
6189
|
toolCallStartTimes = /* @__PURE__ */ new Map();
|
|
6222
6190
|
/** Track streamed tool output between ACP updates and final completion */
|
|
@@ -6241,6 +6209,12 @@ class AcpBackend {
|
|
|
6241
6209
|
waitingForResponse = false;
|
|
6242
6210
|
/** First fatal prompt-level error observed for the current turn */
|
|
6243
6211
|
responseCompletionError = null;
|
|
6212
|
+
/** Resettable no-progress timeout while waiting for a turn to finish */
|
|
6213
|
+
responseWaitTimeout = null;
|
|
6214
|
+
/** Current inactivity threshold used by waitForResponseComplete */
|
|
6215
|
+
responseWaitTimeoutMs = null;
|
|
6216
|
+
/** Timestamp of the last meaningful response progress for the current turn */
|
|
6217
|
+
responseLastProgressAt = null;
|
|
6244
6218
|
/** Fallback completion when prompt returns but the agent emits no session updates */
|
|
6245
6219
|
postPromptCompletionIdleTimeout = null;
|
|
6246
6220
|
/** Whether at least one session/update arrived after the current prompt */
|
|
@@ -6274,12 +6248,110 @@ class AcpBackend {
|
|
|
6274
6248
|
this.postPromptCompletionIdleTimeout = null;
|
|
6275
6249
|
}
|
|
6276
6250
|
}
|
|
6251
|
+
clearResponseWaitTimeout() {
|
|
6252
|
+
if (this.responseWaitTimeout) {
|
|
6253
|
+
clearTimeout(this.responseWaitTimeout);
|
|
6254
|
+
this.responseWaitTimeout = null;
|
|
6255
|
+
}
|
|
6256
|
+
}
|
|
6257
|
+
resetResponseWaitTracking() {
|
|
6258
|
+
this.clearResponseWaitTimeout();
|
|
6259
|
+
this.responseWaitTimeoutMs = null;
|
|
6260
|
+
this.responseLastProgressAt = null;
|
|
6261
|
+
}
|
|
6262
|
+
armResponseWaitTimeout(timeoutMs) {
|
|
6263
|
+
this.responseWaitTimeoutMs = timeoutMs;
|
|
6264
|
+
this.clearResponseWaitTimeout();
|
|
6265
|
+
const lastProgressAt = this.responseLastProgressAt ?? Date.now();
|
|
6266
|
+
const elapsedMs = Math.max(0, Date.now() - lastProgressAt);
|
|
6267
|
+
const remainingMs = Math.max(1, timeoutMs - elapsedMs);
|
|
6268
|
+
this.responseWaitTimeout = setTimeout(() => {
|
|
6269
|
+
this.responseWaitTimeout = null;
|
|
6270
|
+
this.responseWaitTimeoutMs = null;
|
|
6271
|
+
this.failPendingResponseWait(new Error("Timeout waiting for response to complete"));
|
|
6272
|
+
}, remainingMs);
|
|
6273
|
+
}
|
|
6274
|
+
scheduleToolCallTimeout(toolCallId) {
|
|
6275
|
+
const spec = this.toolCallTimeoutSpecs.get(toolCallId);
|
|
6276
|
+
if (!spec) {
|
|
6277
|
+
return;
|
|
6278
|
+
}
|
|
6279
|
+
const existing = this.toolCallTimeouts.get(toolCallId);
|
|
6280
|
+
if (existing) {
|
|
6281
|
+
clearTimeout(existing);
|
|
6282
|
+
}
|
|
6283
|
+
const timeout = setTimeout(() => {
|
|
6284
|
+
const duration = formatDuration(this.toolCallStartTimes.get(toolCallId));
|
|
6285
|
+
const timeoutLabel = formatToolCallTimeoutLimit(spec.timeoutMs);
|
|
6286
|
+
const timeoutDetail = `Tool call ${spec.toolName} timed out after ${timeoutLabel}`;
|
|
6287
|
+
api.logger.debug(`[AcpBackend] \u23F1\uFE0F Tool call TIMEOUT (from ${spec.source}): ${toolCallId} (${spec.toolKind}) after ${timeoutLabel} without progress - Duration: ${duration}, failing current turn`);
|
|
6288
|
+
this.activeToolCalls.delete(toolCallId);
|
|
6289
|
+
this.toolCallStartTimes.delete(toolCallId);
|
|
6290
|
+
this.clearToolCallTimeout(toolCallId);
|
|
6291
|
+
this.clearIdleTimeoutState();
|
|
6292
|
+
const streamedOutput = renderToolOutput(this.toolCallOutputs.get(toolCallId));
|
|
6293
|
+
this.toolCallOutputs.delete(toolCallId);
|
|
6294
|
+
this.emit({
|
|
6295
|
+
type: "tool-result",
|
|
6296
|
+
toolName: spec.toolName,
|
|
6297
|
+
result: streamedOutput ? {
|
|
6298
|
+
stdout: streamedOutput,
|
|
6299
|
+
error: timeoutDetail,
|
|
6300
|
+
status: "failed",
|
|
6301
|
+
timedOut: true
|
|
6302
|
+
} : {
|
|
6303
|
+
error: timeoutDetail,
|
|
6304
|
+
status: "failed",
|
|
6305
|
+
timedOut: true
|
|
6306
|
+
},
|
|
6307
|
+
callId: toolCallId
|
|
6308
|
+
});
|
|
6309
|
+
this.emit({
|
|
6310
|
+
type: "status",
|
|
6311
|
+
status: "error",
|
|
6312
|
+
detail: timeoutDetail
|
|
6313
|
+
});
|
|
6314
|
+
this.failPendingResponseWait(new Error(timeoutDetail));
|
|
6315
|
+
}, spec.timeoutMs);
|
|
6316
|
+
this.toolCallTimeouts.set(toolCallId, timeout);
|
|
6317
|
+
}
|
|
6318
|
+
armToolCallTimeout(spec) {
|
|
6319
|
+
this.toolCallTimeoutSpecs.set(spec.toolCallId, spec);
|
|
6320
|
+
this.scheduleToolCallTimeout(spec.toolCallId);
|
|
6321
|
+
}
|
|
6322
|
+
clearToolCallTimeout(toolCallId) {
|
|
6323
|
+
const timeout = this.toolCallTimeouts.get(toolCallId);
|
|
6324
|
+
const hadTimeout = Boolean(timeout);
|
|
6325
|
+
if (timeout) {
|
|
6326
|
+
clearTimeout(timeout);
|
|
6327
|
+
this.toolCallTimeouts.delete(toolCallId);
|
|
6328
|
+
}
|
|
6329
|
+
this.toolCallTimeoutSpecs.delete(toolCallId);
|
|
6330
|
+
return hadTimeout;
|
|
6331
|
+
}
|
|
6332
|
+
refreshActiveToolCallTimeouts() {
|
|
6333
|
+
for (const toolCallId of this.activeToolCalls) {
|
|
6334
|
+
if (this.toolCallTimeoutSpecs.has(toolCallId)) {
|
|
6335
|
+
this.scheduleToolCallTimeout(toolCallId);
|
|
6336
|
+
}
|
|
6337
|
+
}
|
|
6338
|
+
}
|
|
6339
|
+
markResponseProgress(opts = {}) {
|
|
6340
|
+
this.responseLastProgressAt = Date.now();
|
|
6341
|
+
if (opts.refreshToolTimeouts !== false) {
|
|
6342
|
+
this.refreshActiveToolCallTimeouts();
|
|
6343
|
+
}
|
|
6344
|
+
if (this.waitingForResponse && this.responseWaitTimeoutMs != null) {
|
|
6345
|
+
this.armResponseWaitTimeout(this.responseWaitTimeoutMs);
|
|
6346
|
+
}
|
|
6347
|
+
}
|
|
6277
6348
|
clearToolCallTracking() {
|
|
6278
6349
|
this.activeToolCalls.clear();
|
|
6279
6350
|
for (const timeout of this.toolCallTimeouts.values()) {
|
|
6280
6351
|
clearTimeout(timeout);
|
|
6281
6352
|
}
|
|
6282
6353
|
this.toolCallTimeouts.clear();
|
|
6354
|
+
this.toolCallTimeoutSpecs.clear();
|
|
6283
6355
|
this.toolCallStartTimes.clear();
|
|
6284
6356
|
this.toolCallIdToNameMap.clear();
|
|
6285
6357
|
this.toolCallOutputs.clear();
|
|
@@ -6289,6 +6361,7 @@ class AcpBackend {
|
|
|
6289
6361
|
this.responseCompletionOutcome = null;
|
|
6290
6362
|
this.responseCompletionError = null;
|
|
6291
6363
|
this.sawSessionUpdateSincePrompt = false;
|
|
6364
|
+
this.resetResponseWaitTracking();
|
|
6292
6365
|
this.clearIdleTimeoutState();
|
|
6293
6366
|
this.clearPostPromptCompletionIdleTimeout();
|
|
6294
6367
|
this.clearToolCallTracking();
|
|
@@ -6300,6 +6373,7 @@ class AcpBackend {
|
|
|
6300
6373
|
this.responseCompletionError = error;
|
|
6301
6374
|
this.responseCompletionOutcome = null;
|
|
6302
6375
|
this.waitingForResponse = false;
|
|
6376
|
+
this.resetResponseWaitTracking();
|
|
6303
6377
|
this.clearPostPromptCompletionIdleTimeout();
|
|
6304
6378
|
if (this.idleRejecter) {
|
|
6305
6379
|
this.idleRejecter(error);
|
|
@@ -6309,6 +6383,7 @@ class AcpBackend {
|
|
|
6309
6383
|
}
|
|
6310
6384
|
settleResponseWaiter(outcome) {
|
|
6311
6385
|
const hasActiveWaiter = Boolean(this.idleResolver || this.idleRejecter);
|
|
6386
|
+
this.resetResponseWaitTracking();
|
|
6312
6387
|
if (!this.waitingForResponse && !hasActiveWaiter) {
|
|
6313
6388
|
return;
|
|
6314
6389
|
}
|
|
@@ -6780,6 +6855,8 @@ ${recentStderrExcerpt}`);
|
|
|
6780
6855
|
emit: (msg) => this.emit(msg),
|
|
6781
6856
|
emitIdleStatus: () => this.emitIdleStatus(),
|
|
6782
6857
|
failPendingResponseWait: (error) => this.failPendingResponseWait(error),
|
|
6858
|
+
armToolCallTimeout: (spec) => this.armToolCallTimeout(spec),
|
|
6859
|
+
clearToolCallTimeout: (toolCallId) => this.clearToolCallTimeout(toolCallId),
|
|
6783
6860
|
clearIdleTimeout: () => {
|
|
6784
6861
|
if (this.idleTimeout) {
|
|
6785
6862
|
clearTimeout(this.idleTimeout);
|
|
@@ -6820,6 +6897,7 @@ ${recentStderrExcerpt}`);
|
|
|
6820
6897
|
this.clearPostPromptCompletionIdleTimeout();
|
|
6821
6898
|
for (const update of updates) {
|
|
6822
6899
|
const sessionUpdateType = update.sessionUpdate;
|
|
6900
|
+
this.markResponseProgress();
|
|
6823
6901
|
if (sessionUpdateType !== "agent_message_chunk" && sessionUpdateType !== "tool_call_update") {
|
|
6824
6902
|
api.logger.debug(`[AcpBackend] Received session update: ${sessionUpdateType}`, JSON.stringify({
|
|
6825
6903
|
sessionUpdate: sessionUpdateType,
|
|
@@ -6883,6 +6961,7 @@ ${recentStderrExcerpt}`);
|
|
|
6883
6961
|
this.resetResponseTrackingForNewPrompt();
|
|
6884
6962
|
this.emit({ type: "status", status: "running" });
|
|
6885
6963
|
this.waitingForResponse = true;
|
|
6964
|
+
this.markResponseProgress({ refreshToolTimeouts: false });
|
|
6886
6965
|
try {
|
|
6887
6966
|
api.logger.debug(`[AcpBackend] Sending prompt (length: ${prompt.length}): ${prompt.substring(0, 100)}...`);
|
|
6888
6967
|
api.logger.debug(`[AcpBackend] Full prompt: ${prompt}`);
|
|
@@ -6943,7 +7022,7 @@ ${recentStderrExcerpt}`);
|
|
|
6943
7022
|
* Wait for the response to complete (idle status after all chunks received)
|
|
6944
7023
|
* Call this after sendPrompt to wait for Gemini to finish responding
|
|
6945
7024
|
*/
|
|
6946
|
-
async waitForResponseComplete(timeoutMs =
|
|
7025
|
+
async waitForResponseComplete(timeoutMs = 10 * 6e4) {
|
|
6947
7026
|
if (this.responseCompletionError) {
|
|
6948
7027
|
throw this.responseCompletionError;
|
|
6949
7028
|
}
|
|
@@ -6959,26 +7038,19 @@ ${recentStderrExcerpt}`);
|
|
|
6959
7038
|
return;
|
|
6960
7039
|
}
|
|
6961
7040
|
return new Promise((resolve, reject) => {
|
|
6962
|
-
const timeout = setTimeout(() => {
|
|
6963
|
-
this.idleResolver = null;
|
|
6964
|
-
this.idleRejecter = null;
|
|
6965
|
-
this.waitingForResponse = false;
|
|
6966
|
-
reject(new Error("Timeout waiting for response to complete"));
|
|
6967
|
-
}, timeoutMs);
|
|
6968
7041
|
this.idleResolver = () => {
|
|
6969
|
-
clearTimeout(timeout);
|
|
6970
7042
|
this.idleResolver = null;
|
|
6971
7043
|
this.idleRejecter = null;
|
|
6972
7044
|
this.waitingForResponse = false;
|
|
6973
7045
|
resolve();
|
|
6974
7046
|
};
|
|
6975
7047
|
this.idleRejecter = (error) => {
|
|
6976
|
-
clearTimeout(timeout);
|
|
6977
7048
|
this.idleResolver = null;
|
|
6978
7049
|
this.idleRejecter = null;
|
|
6979
7050
|
this.waitingForResponse = false;
|
|
6980
7051
|
reject(error);
|
|
6981
7052
|
};
|
|
7053
|
+
this.armResponseWaitTimeout(timeoutMs);
|
|
6982
7054
|
});
|
|
6983
7055
|
}
|
|
6984
7056
|
/**
|
|
@@ -7793,7 +7865,7 @@ class AbortError extends Error {
|
|
|
7793
7865
|
}
|
|
7794
7866
|
}
|
|
7795
7867
|
|
|
7796
|
-
const __filename$1 = node_url.fileURLToPath((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('index-
|
|
7868
|
+
const __filename$1 = node_url.fileURLToPath((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('index-BQmJ4NAa.cjs', document.baseURI).href)));
|
|
7797
7869
|
const __dirname$1 = path.join(__filename$1, "..");
|
|
7798
7870
|
function getGlobalClaudeVersion() {
|
|
7799
7871
|
try {
|
|
@@ -8464,7 +8536,7 @@ class ClaudeCodeBackend {
|
|
|
8464
8536
|
api.logger.debug("[ClaudeRuntimeBackend] Error interrupting Claude query:", error);
|
|
8465
8537
|
}
|
|
8466
8538
|
}
|
|
8467
|
-
async waitForResponseComplete(timeoutMs =
|
|
8539
|
+
async waitForResponseComplete(timeoutMs = 10 * 6e4) {
|
|
8468
8540
|
if (this.responseCompletionOutcome) {
|
|
8469
8541
|
const outcome = this.responseCompletionOutcome;
|
|
8470
8542
|
if (outcome.kind === "rejected") {
|
|
@@ -9044,11 +9116,11 @@ var launch = /*#__PURE__*/Object.freeze({
|
|
|
9044
9116
|
|
|
9045
9117
|
const unifiedProviderExecutors = {
|
|
9046
9118
|
claude: async (opts) => {
|
|
9047
|
-
const { runClaude } = await Promise.resolve().then(function () { return require('./runClaude-
|
|
9119
|
+
const { runClaude } = await Promise.resolve().then(function () { return require('./runClaude-D2ZEXue8.cjs'); });
|
|
9048
9120
|
await runClaude(opts.credentials, opts.claudeOptions ?? {});
|
|
9049
9121
|
},
|
|
9050
9122
|
codex: async (opts) => {
|
|
9051
|
-
const { runCodex } = await Promise.resolve().then(function () { return require('./runCodex-
|
|
9123
|
+
const { runCodex } = await Promise.resolve().then(function () { return require('./runCodex-Dz_1ho8d.cjs'); });
|
|
9052
9124
|
await runCodex({
|
|
9053
9125
|
credentials: opts.credentials,
|
|
9054
9126
|
startedBy: opts.startedBy,
|
|
@@ -9057,7 +9129,7 @@ const unifiedProviderExecutors = {
|
|
|
9057
9129
|
});
|
|
9058
9130
|
},
|
|
9059
9131
|
gemini: async (opts) => {
|
|
9060
|
-
const { runGemini } = await Promise.resolve().then(function () { return require('./runGemini-
|
|
9132
|
+
const { runGemini } = await Promise.resolve().then(function () { return require('./runGemini-Dfu6LltX.cjs'); });
|
|
9061
9133
|
await runGemini({
|
|
9062
9134
|
credentials: opts.credentials,
|
|
9063
9135
|
startedBy: opts.startedBy
|
|
@@ -9133,7 +9205,7 @@ function shouldRunMainClaudeFlow(opts) {
|
|
|
9133
9205
|
return;
|
|
9134
9206
|
} else if (subcommand === "runtime") {
|
|
9135
9207
|
if (args[1] === "providers") {
|
|
9136
|
-
const { renderRuntimeProviders } = await Promise.resolve().then(function () { return require('./command-
|
|
9208
|
+
const { renderRuntimeProviders } = await Promise.resolve().then(function () { return require('./command-DoDmHNxR.cjs'); });
|
|
9137
9209
|
console.log(renderRuntimeProviders());
|
|
9138
9210
|
return;
|
|
9139
9211
|
}
|
|
@@ -9311,8 +9383,8 @@ function shouldRunMainClaudeFlow(opts) {
|
|
|
9311
9383
|
const projectId = args[3];
|
|
9312
9384
|
try {
|
|
9313
9385
|
const { saveGoogleCloudProjectToConfig } = await Promise.resolve().then(function () { return config; });
|
|
9314
|
-
const { readCredentials: readCredentials2 } = await Promise.resolve().then(function () { return require('./persistence-
|
|
9315
|
-
const { ApiClient: ApiClient2 } = await Promise.resolve().then(function () { return require('./api-
|
|
9386
|
+
const { readCredentials: readCredentials2 } = await Promise.resolve().then(function () { return require('./persistence-BL06LLVz.cjs'); });
|
|
9387
|
+
const { ApiClient: ApiClient2 } = await Promise.resolve().then(function () { return require('./api-Bd-MnOS4.cjs'); }).then(function (n) { return n.api; });
|
|
9316
9388
|
let userEmail = void 0;
|
|
9317
9389
|
try {
|
|
9318
9390
|
const credentials = await readCredentials2();
|