happy-imou-cloud 2.0.16 → 2.0.17
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/bin/happy-cloud.mjs +1 -1
- package/dist/{BaseReasoningProcessor-BqMAZlIw.cjs → BaseReasoningProcessor-BdbyUAZR.cjs} +3 -3
- package/dist/{BaseReasoningProcessor-C04_LHjN.mjs → BaseReasoningProcessor-wqWUBiEJ.mjs} +3 -3
- package/dist/{ProviderSelectionHandler-CO9NkAt6.cjs → ProviderSelectionHandler-GuW6S0tQ.cjs} +2 -2
- package/dist/{ProviderSelectionHandler-DDWyn9Lo.mjs → ProviderSelectionHandler-oz9NjR_r.mjs} +2 -2
- package/dist/{api-Db1SQcP_.cjs → api-BZ2U3k-r.cjs} +90 -37
- package/dist/{api-sRF6xXi-.mjs → api-D7DleJYY.mjs} +90 -38
- package/dist/{command-eRjSBm2C.cjs → command-D-GEzmAl.cjs} +3 -3
- package/dist/{command-WcgGTRnG.mjs → command-DsMlcxQd.mjs} +3 -3
- package/dist/{index-DpWeKfvS.mjs → index-Cdi5KxhK.mjs} +77 -25
- package/dist/{index-B6ID1zDR.cjs → index-sJfKgN1y.cjs} +80 -28
- 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-B89V4xY5.mjs → persistence-C0nC4mEU.mjs} +1 -1
- package/dist/{persistence-Btu2VPXI.cjs → persistence-JEXs_kBA.cjs} +1 -1
- package/dist/{registerKillSessionHandler-CwmYlUfS.mjs → registerKillSessionHandler-BRfDcq3x.mjs} +3 -3
- package/dist/{registerKillSessionHandler-eZ2TsHqx.cjs → registerKillSessionHandler-Qw8jZB2x.cjs} +3 -3
- package/dist/{runClaude-kRPXCaBj.mjs → runClaude-B6fsu9Sl.mjs} +5 -5
- package/dist/{runClaude-C9-ylbQh.cjs → runClaude-pSj5zGWV.cjs} +5 -5
- package/dist/{runCodex-CRNBxY5f.cjs → runCodex-ClpKXo66.cjs} +27 -8
- package/dist/{runCodex-B1xN0wAU.mjs → runCodex-DJrzw9x8.mjs} +27 -8
- package/dist/{runGemini-Xn2VwS88.mjs → runGemini-C7xlDIfO.mjs} +5 -5
- package/dist/{runGemini-BZ5hqJyl.cjs → runGemini-DA5v_0X_.cjs} +5 -5
- package/package.json +1 -1
- package/scripts/build.mjs +66 -66
- package/scripts/devtools/README.md +9 -9
- package/scripts/e2e/fake-codex-acp-agent.mjs +139 -139
- package/scripts/e2e/local-server-session-roundtrip.mjs +1063 -1063
- package/scripts/release-smoke.mjs +20 -17
|
@@ -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-BZ2U3k-r.cjs');
|
|
5
|
+
var persistence = require('./persistence-JEXs_kBA.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-sJfKgN1y.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-sJfKgN1y.cjs', document.baseURI).href))));
|
|
699
699
|
function projectPath() {
|
|
700
700
|
const path = path$1.resolve(__dirname$2, "..");
|
|
701
701
|
return path;
|
|
@@ -4986,6 +4986,8 @@ const cursorTransport = new CursorTransport();
|
|
|
4986
4986
|
|
|
4987
4987
|
const DEFAULT_IDLE_TIMEOUT_MS = 500;
|
|
4988
4988
|
const DEFAULT_TOOL_CALL_TIMEOUT_MS = 12e4;
|
|
4989
|
+
const DEFAULT_TOOL_CALL_OUTPUT_PREVIEW_HEAD_BYTES = 2e3;
|
|
4990
|
+
const DEFAULT_TOOL_CALL_OUTPUT_PREVIEW_TAIL_BYTES = 4e3;
|
|
4989
4991
|
function parseArgsFromContent(content) {
|
|
4990
4992
|
if (Array.isArray(content)) {
|
|
4991
4993
|
return { items: content };
|
|
@@ -4995,17 +4997,54 @@ function parseArgsFromContent(content) {
|
|
|
4995
4997
|
}
|
|
4996
4998
|
return {};
|
|
4997
4999
|
}
|
|
4998
|
-
|
|
4999
|
-
|
|
5000
|
-
|
|
5000
|
+
const MAX_TOOL_OUTPUT_OVERLAP_CHARS = 4096;
|
|
5001
|
+
function findToolOutputOverlap(previous, next) {
|
|
5002
|
+
const maxOverlap = Math.min(previous.length, next.length, MAX_TOOL_OUTPUT_OVERLAP_CHARS);
|
|
5003
|
+
if (maxOverlap === 0) {
|
|
5004
|
+
return 0;
|
|
5001
5005
|
}
|
|
5002
|
-
|
|
5003
|
-
|
|
5006
|
+
const previousSuffix = previous.slice(-maxOverlap);
|
|
5007
|
+
const nextPrefix = next.slice(0, maxOverlap);
|
|
5008
|
+
for (let overlap = maxOverlap; overlap > 0; overlap--) {
|
|
5009
|
+
if (previousSuffix.endsWith(nextPrefix.slice(0, overlap))) {
|
|
5010
|
+
return overlap;
|
|
5011
|
+
}
|
|
5004
5012
|
}
|
|
5005
|
-
|
|
5013
|
+
return 0;
|
|
5014
|
+
}
|
|
5015
|
+
function getToolOutputDelta(previous, next) {
|
|
5016
|
+
if (!previous || previous.length === 0) {
|
|
5006
5017
|
return next;
|
|
5007
5018
|
}
|
|
5008
|
-
|
|
5019
|
+
if (next === previous || previous.endsWith(next)) {
|
|
5020
|
+
return "";
|
|
5021
|
+
}
|
|
5022
|
+
if (next.startsWith(previous)) {
|
|
5023
|
+
return next.slice(previous.length);
|
|
5024
|
+
}
|
|
5025
|
+
const overlap = findToolOutputOverlap(previous, next);
|
|
5026
|
+
return overlap > 0 ? next.slice(overlap) : next;
|
|
5027
|
+
}
|
|
5028
|
+
function appendToolOutput(existing, next) {
|
|
5029
|
+
const preview = existing?.preview ?? new api.HeadTailPreviewBuffer(
|
|
5030
|
+
DEFAULT_TOOL_CALL_OUTPUT_PREVIEW_HEAD_BYTES,
|
|
5031
|
+
DEFAULT_TOOL_CALL_OUTPUT_PREVIEW_TAIL_BYTES
|
|
5032
|
+
);
|
|
5033
|
+
const textToAppend = getToolOutputDelta(existing?.lastRawText, next);
|
|
5034
|
+
if (textToAppend.length > 0) {
|
|
5035
|
+
preview.append(textToAppend);
|
|
5036
|
+
}
|
|
5037
|
+
return {
|
|
5038
|
+
preview,
|
|
5039
|
+
lastRawText: next,
|
|
5040
|
+
updateCount: (existing?.updateCount ?? 0) + 1
|
|
5041
|
+
};
|
|
5042
|
+
}
|
|
5043
|
+
function renderToolOutput(accumulator) {
|
|
5044
|
+
if (!accumulator) {
|
|
5045
|
+
return void 0;
|
|
5046
|
+
}
|
|
5047
|
+
return accumulator.preview.render("tool output");
|
|
5009
5048
|
}
|
|
5010
5049
|
function isRecord$1(value) {
|
|
5011
5050
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
@@ -5243,7 +5282,7 @@ function completeToolCall(toolCallId, toolKind, content, ctx) {
|
|
|
5243
5282
|
clearTimeout(timeout);
|
|
5244
5283
|
ctx.toolCallTimeouts.delete(toolCallId);
|
|
5245
5284
|
}
|
|
5246
|
-
const streamedOutput = ctx.toolCallOutputs.get(toolCallId);
|
|
5285
|
+
const streamedOutput = renderToolOutput(ctx.toolCallOutputs.get(toolCallId));
|
|
5247
5286
|
ctx.toolCallOutputs.delete(toolCallId);
|
|
5248
5287
|
api.logger.debug(`[AcpBackend] \u2705 Tool call COMPLETED: ${toolCallId} (${toolKindStr}) - Duration: ${duration}. Active tool calls: ${ctx.activeToolCalls.size}`);
|
|
5249
5288
|
ctx.emit({
|
|
@@ -5291,7 +5330,7 @@ function failToolCall(toolCallId, status, toolKind, content, ctx) {
|
|
|
5291
5330
|
}
|
|
5292
5331
|
const durationStr = formatDuration(startTime);
|
|
5293
5332
|
api.logger.debug(`[AcpBackend] \u274C Tool call ${status.toUpperCase()}: ${toolCallId} (${toolKindStr}) - Duration: ${durationStr}. Active tool calls: ${ctx.activeToolCalls.size}`);
|
|
5294
|
-
const streamedOutput = ctx.toolCallOutputs.get(toolCallId);
|
|
5333
|
+
const streamedOutput = renderToolOutput(ctx.toolCallOutputs.get(toolCallId));
|
|
5295
5334
|
ctx.toolCallOutputs.delete(toolCallId);
|
|
5296
5335
|
const errorDetail = extractErrorDetail(content);
|
|
5297
5336
|
if (errorDetail) {
|
|
@@ -6127,14 +6166,27 @@ class AcpBackend {
|
|
|
6127
6166
|
this.emit({ type: "status", status: "error", detail: err.message });
|
|
6128
6167
|
});
|
|
6129
6168
|
this.process.on("exit", (code, signal) => {
|
|
6130
|
-
|
|
6131
|
-
|
|
6132
|
-
|
|
6133
|
-
|
|
6134
|
-
|
|
6135
|
-
|
|
6136
|
-
|
|
6169
|
+
api.logger.debug(
|
|
6170
|
+
`[AcpBackend] Process exited with code ${code}, signal ${signal}, disposed=${this.disposed}, waitingForResponse=${this.waitingForResponse}`
|
|
6171
|
+
);
|
|
6172
|
+
const recentStderrExcerpt = this.getRecentStderrExcerpt();
|
|
6173
|
+
if (recentStderrExcerpt) {
|
|
6174
|
+
api.logger.debug(`[AcpBackend] Recent stderr before exit:
|
|
6175
|
+
${recentStderrExcerpt}`);
|
|
6176
|
+
}
|
|
6177
|
+
if (this.disposed) {
|
|
6178
|
+
return;
|
|
6179
|
+
}
|
|
6180
|
+
if (this.waitingForResponse) {
|
|
6181
|
+
const detail = code !== null ? `ACP process exited with code ${code}${signal ? ` (${signal})` : ""}` : signal ? `ACP process exited with signal ${signal}` : "ACP process exited unexpectedly";
|
|
6182
|
+
this.failPendingResponseWait(new Error(detail));
|
|
6183
|
+
}
|
|
6184
|
+
if (code !== 0 && code !== null) {
|
|
6137
6185
|
this.emit({ type: "status", status: "stopped", detail: `Exit code: ${code}` });
|
|
6186
|
+
return;
|
|
6187
|
+
}
|
|
6188
|
+
if (signal) {
|
|
6189
|
+
this.emit({ type: "status", status: "stopped", detail: `Signal: ${signal}` });
|
|
6138
6190
|
}
|
|
6139
6191
|
});
|
|
6140
6192
|
const streams = nodeToWebStreams(
|
|
@@ -6505,7 +6557,7 @@ class AcpBackend {
|
|
|
6505
6557
|
this.clearPostPromptCompletionIdleTimeout();
|
|
6506
6558
|
for (const update of updates) {
|
|
6507
6559
|
const sessionUpdateType = update.sessionUpdate;
|
|
6508
|
-
if (sessionUpdateType !== "agent_message_chunk") {
|
|
6560
|
+
if (sessionUpdateType !== "agent_message_chunk" && sessionUpdateType !== "tool_call_update") {
|
|
6509
6561
|
api.logger.debug(`[AcpBackend] Received session update: ${sessionUpdateType}`, JSON.stringify({
|
|
6510
6562
|
sessionUpdate: sessionUpdateType,
|
|
6511
6563
|
toolCallId: update.toolCallId,
|
|
@@ -7474,7 +7526,7 @@ class AbortError extends Error {
|
|
|
7474
7526
|
}
|
|
7475
7527
|
}
|
|
7476
7528
|
|
|
7477
|
-
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-
|
|
7529
|
+
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-sJfKgN1y.cjs', document.baseURI).href)));
|
|
7478
7530
|
const __dirname$1 = path.join(__filename$1, "..");
|
|
7479
7531
|
function getGlobalClaudeVersion() {
|
|
7480
7532
|
try {
|
|
@@ -8725,11 +8777,11 @@ var launch = /*#__PURE__*/Object.freeze({
|
|
|
8725
8777
|
|
|
8726
8778
|
const unifiedProviderExecutors = {
|
|
8727
8779
|
claude: async (opts) => {
|
|
8728
|
-
const { runClaude } = await Promise.resolve().then(function () { return require('./runClaude-
|
|
8780
|
+
const { runClaude } = await Promise.resolve().then(function () { return require('./runClaude-pSj5zGWV.cjs'); });
|
|
8729
8781
|
await runClaude(opts.credentials, opts.claudeOptions ?? {});
|
|
8730
8782
|
},
|
|
8731
8783
|
codex: async (opts) => {
|
|
8732
|
-
const { runCodex } = await Promise.resolve().then(function () { return require('./runCodex-
|
|
8784
|
+
const { runCodex } = await Promise.resolve().then(function () { return require('./runCodex-ClpKXo66.cjs'); });
|
|
8733
8785
|
await runCodex({
|
|
8734
8786
|
credentials: opts.credentials,
|
|
8735
8787
|
startedBy: opts.startedBy,
|
|
@@ -8738,7 +8790,7 @@ const unifiedProviderExecutors = {
|
|
|
8738
8790
|
});
|
|
8739
8791
|
},
|
|
8740
8792
|
gemini: async (opts) => {
|
|
8741
|
-
const { runGemini } = await Promise.resolve().then(function () { return require('./runGemini-
|
|
8793
|
+
const { runGemini } = await Promise.resolve().then(function () { return require('./runGemini-DA5v_0X_.cjs'); });
|
|
8742
8794
|
await runGemini({
|
|
8743
8795
|
credentials: opts.credentials,
|
|
8744
8796
|
startedBy: opts.startedBy
|
|
@@ -8814,7 +8866,7 @@ function shouldRunMainClaudeFlow(opts) {
|
|
|
8814
8866
|
return;
|
|
8815
8867
|
} else if (subcommand === "runtime") {
|
|
8816
8868
|
if (args[1] === "providers") {
|
|
8817
|
-
const { renderRuntimeProviders } = await Promise.resolve().then(function () { return require('./command-
|
|
8869
|
+
const { renderRuntimeProviders } = await Promise.resolve().then(function () { return require('./command-D-GEzmAl.cjs'); });
|
|
8818
8870
|
console.log(renderRuntimeProviders());
|
|
8819
8871
|
return;
|
|
8820
8872
|
}
|
|
@@ -8992,8 +9044,8 @@ function shouldRunMainClaudeFlow(opts) {
|
|
|
8992
9044
|
const projectId = args[3];
|
|
8993
9045
|
try {
|
|
8994
9046
|
const { saveGoogleCloudProjectToConfig } = await Promise.resolve().then(function () { return config; });
|
|
8995
|
-
const { readCredentials: readCredentials2 } = await Promise.resolve().then(function () { return require('./persistence-
|
|
8996
|
-
const { ApiClient: ApiClient2 } = await Promise.resolve().then(function () { return require('./api-
|
|
9047
|
+
const { readCredentials: readCredentials2 } = await Promise.resolve().then(function () { return require('./persistence-JEXs_kBA.cjs'); });
|
|
9048
|
+
const { ApiClient: ApiClient2 } = await Promise.resolve().then(function () { return require('./api-BZ2U3k-r.cjs'); }).then(function (n) { return n.api; });
|
|
8997
9049
|
let userEmail = void 0;
|
|
8998
9050
|
try {
|
|
8999
9051
|
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-
|
|
5
|
-
require('./persistence-
|
|
4
|
+
require('./api-BZ2U3k-r.cjs');
|
|
5
|
+
require('./persistence-JEXs_kBA.cjs');
|
|
6
6
|
require('zod');
|
|
7
|
-
require('./index-
|
|
7
|
+
require('./index-sJfKgN1y.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-
|
|
3
|
-
import './persistence-
|
|
2
|
+
import './api-D7DleJYY.mjs';
|
|
3
|
+
import './persistence-C0nC4mEU.mjs';
|
|
4
4
|
import 'zod';
|
|
5
|
-
import './index-
|
|
5
|
+
import './index-Cdi5KxhK.mjs';
|
|
6
6
|
import 'node:child_process';
|
|
7
7
|
import 'node:fs';
|
|
8
8
|
import 'cross-spawn';
|
package/dist/lib.cjs
CHANGED
package/dist/lib.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { A as ApiClient, a as ApiSessionClient, c as configuration, l as logger } from './api-
|
|
1
|
+
export { A as ApiClient, a as ApiSessionClient, c as configuration, l as logger } from './api-D7DleJYY.mjs';
|
|
2
2
|
export { R as RawJSONLinesSchema } from './types-CiliQpqS.mjs';
|
|
3
3
|
import 'axios';
|
|
4
4
|
import 'chalk';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { unlink, readFile, mkdir, open, stat, writeFile, rename } from 'node:fs/promises';
|
|
2
2
|
import { existsSync, unlinkSync, readdirSync, constants, writeFileSync, readFileSync } from 'node:fs';
|
|
3
3
|
import { join, dirname } from 'node:path';
|
|
4
|
-
import { c as configuration, l as logger, e as encodeBase64 } from './api-
|
|
4
|
+
import { c as configuration, l as logger, e as encodeBase64 } from './api-D7DleJYY.mjs';
|
|
5
5
|
import * as z from 'zod';
|
|
6
6
|
import 'axios';
|
|
7
7
|
import 'chalk';
|
package/dist/{registerKillSessionHandler-CwmYlUfS.mjs → registerKillSessionHandler-BRfDcq3x.mjs}
RENAMED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { i as initialMachineMetadata, e as projectPath, R as RuntimeShell, h as resolveCanonicalToolNameV2, f as formatDisplayMessage } from './index-
|
|
2
|
-
import { readSettings } from './persistence-
|
|
1
|
+
import { i as initialMachineMetadata, e as projectPath, R as RuntimeShell, h as resolveCanonicalToolNameV2, f as formatDisplayMessage } from './index-Cdi5KxhK.mjs';
|
|
2
|
+
import { readSettings } from './persistence-C0nC4mEU.mjs';
|
|
3
3
|
import os from 'node:os';
|
|
4
4
|
import { resolve } from 'node:path';
|
|
5
|
-
import { c as configuration, p as packageJson, l as logger } from './api-
|
|
5
|
+
import { c as configuration, p as packageJson, l as logger } from './api-D7DleJYY.mjs';
|
|
6
6
|
import { randomUUID } from 'node:crypto';
|
|
7
7
|
import { createHash } from 'crypto';
|
|
8
8
|
import 'axios';
|
package/dist/{registerKillSessionHandler-eZ2TsHqx.cjs → registerKillSessionHandler-Qw8jZB2x.cjs}
RENAMED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
4
|
-
var persistence = require('./persistence-
|
|
3
|
+
var index = require('./index-sJfKgN1y.cjs');
|
|
4
|
+
var persistence = require('./persistence-JEXs_kBA.cjs');
|
|
5
5
|
var os = require('node:os');
|
|
6
6
|
var path = require('node:path');
|
|
7
|
-
var api = require('./api-
|
|
7
|
+
var api = require('./api-BZ2U3k-r.cjs');
|
|
8
8
|
var node_crypto = require('node:crypto');
|
|
9
9
|
var crypto = require('crypto');
|
|
10
10
|
require('axios');
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { randomUUID } from 'node:crypto';
|
|
2
|
-
import { l as logger, d as backoff, f as delay, g as AsyncLock, c as configuration, s as startOfflineReconnection, b as connectionState, A as ApiClient, i as isAuthenticationRequiredError } from './api-
|
|
2
|
+
import { l as logger, d as backoff, f as delay, g as AsyncLock, c as configuration, s as startOfflineReconnection, b as connectionState, A as ApiClient, i as isAuthenticationRequiredError } from './api-D7DleJYY.mjs';
|
|
3
3
|
import 'cross-spawn';
|
|
4
4
|
import '@agentclientprotocol/sdk';
|
|
5
|
-
import { j as getProjectPath, F as Future, k as claudeLocal, E as ExitCodeError, l as trimIdent, m as createClaudeBackend, f as formatDisplayMessage, t as truncateDisplayMessage, n as claudeCheckSession, e as projectPath, o as mapToClaudeMode, P as PushableAsyncIterable, q as query, A as AbortError, b as stopCaffeinate, p as publishSessionRegistration, u as getEnvironmentInfo, w as startCaffeinate } from './index-
|
|
5
|
+
import { j as getProjectPath, F as Future, k as claudeLocal, E as ExitCodeError, l as trimIdent, m as createClaudeBackend, f as formatDisplayMessage, t as truncateDisplayMessage, n as claudeCheckSession, e as projectPath, o as mapToClaudeMode, P as PushableAsyncIterable, q as query, A as AbortError, b as stopCaffeinate, p as publishSessionRegistration, u as getEnvironmentInfo, w as startCaffeinate } from './index-Cdi5KxhK.mjs';
|
|
6
6
|
import 'ps-list';
|
|
7
7
|
import 'fs';
|
|
8
8
|
import 'path';
|
|
@@ -13,7 +13,7 @@ import { dirname, basename, join, resolve } from 'node:path';
|
|
|
13
13
|
import { homedir } from 'node:os';
|
|
14
14
|
import { execSync } from 'node:child_process';
|
|
15
15
|
import 'node:readline';
|
|
16
|
-
import './persistence-
|
|
16
|
+
import './persistence-C0nC4mEU.mjs';
|
|
17
17
|
import { readFile } from 'node:fs/promises';
|
|
18
18
|
import { stat, watch, access } from 'fs/promises';
|
|
19
19
|
import 'crypto';
|
|
@@ -24,9 +24,9 @@ import 'tweetnacl';
|
|
|
24
24
|
import 'open';
|
|
25
25
|
import React, { useState, useRef, useEffect, useCallback } from 'react';
|
|
26
26
|
import { useStdout, useInput, Box, Text, render } from 'ink';
|
|
27
|
-
import { c as createKeepAliveController, P as ProviderSelectionHandler, r as runModeLoop } from './ProviderSelectionHandler-
|
|
27
|
+
import { c as createKeepAliveController, P as ProviderSelectionHandler, r as runModeLoop } from './ProviderSelectionHandler-oz9NjR_r.mjs';
|
|
28
28
|
import { R as RawJSONLinesSchema } from './types-CiliQpqS.mjs';
|
|
29
|
-
import { B as BasePermissionHandler, d as MessageBuffer, C as ConversationHistory$1, w as waitForResponseCompleteWithAbort, l as launchRuntimeHandleWithFactoryResult, j as forwardAgentMessageToProviderSession, s as syncControlledByUserState, e as ensureManagedProviderMachine, M as MissingMachineIdError, c as createSessionMetadata, b as MessageQueue2, h as hashObject, r as registerKillSessionHandler, f as closeProviderSession } from './registerKillSessionHandler-
|
|
29
|
+
import { B as BasePermissionHandler, d as MessageBuffer, C as ConversationHistory$1, w as waitForResponseCompleteWithAbort, l as launchRuntimeHandleWithFactoryResult, j as forwardAgentMessageToProviderSession, s as syncControlledByUserState, e as ensureManagedProviderMachine, M as MissingMachineIdError, c as createSessionMetadata, b as MessageQueue2, h as hashObject, r as registerKillSessionHandler, f as closeProviderSession } from './registerKillSessionHandler-BRfDcq3x.mjs';
|
|
30
30
|
import 'socket.io-client';
|
|
31
31
|
import 'expo-server-sdk';
|
|
32
32
|
import { isDeepStrictEqual } from 'node:util';
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var node_crypto = require('node:crypto');
|
|
4
|
-
var api = require('./api-
|
|
4
|
+
var api = require('./api-BZ2U3k-r.cjs');
|
|
5
5
|
require('cross-spawn');
|
|
6
6
|
require('@agentclientprotocol/sdk');
|
|
7
|
-
var index = require('./index-
|
|
7
|
+
var index = require('./index-sJfKgN1y.cjs');
|
|
8
8
|
require('ps-list');
|
|
9
9
|
require('fs');
|
|
10
10
|
require('path');
|
|
@@ -15,7 +15,7 @@ var path = require('node:path');
|
|
|
15
15
|
var os = require('node:os');
|
|
16
16
|
var node_child_process = require('node:child_process');
|
|
17
17
|
require('node:readline');
|
|
18
|
-
require('./persistence-
|
|
18
|
+
require('./persistence-JEXs_kBA.cjs');
|
|
19
19
|
var promises = require('node:fs/promises');
|
|
20
20
|
var fs = require('fs/promises');
|
|
21
21
|
require('crypto');
|
|
@@ -26,9 +26,9 @@ require('tweetnacl');
|
|
|
26
26
|
require('open');
|
|
27
27
|
var React = require('react');
|
|
28
28
|
var ink = require('ink');
|
|
29
|
-
var ProviderSelectionHandler = require('./ProviderSelectionHandler-
|
|
29
|
+
var ProviderSelectionHandler = require('./ProviderSelectionHandler-GuW6S0tQ.cjs');
|
|
30
30
|
var types = require('./types-DVk3crez.cjs');
|
|
31
|
-
var registerKillSessionHandler = require('./registerKillSessionHandler-
|
|
31
|
+
var registerKillSessionHandler = require('./registerKillSessionHandler-Qw8jZB2x.cjs');
|
|
32
32
|
require('socket.io-client');
|
|
33
33
|
require('expo-server-sdk');
|
|
34
34
|
var node_util = require('node:util');
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var node_crypto = require('node:crypto');
|
|
4
|
-
var api = require('./api-
|
|
5
|
-
var registerKillSessionHandler = require('./registerKillSessionHandler-
|
|
6
|
-
var index = require('./index-
|
|
4
|
+
var api = require('./api-BZ2U3k-r.cjs');
|
|
5
|
+
var registerKillSessionHandler = require('./registerKillSessionHandler-Qw8jZB2x.cjs');
|
|
6
|
+
var index = require('./index-sJfKgN1y.cjs');
|
|
7
7
|
require('cross-spawn');
|
|
8
8
|
require('@agentclientprotocol/sdk');
|
|
9
9
|
require('ps-list');
|
|
@@ -16,7 +16,7 @@ require('node:path');
|
|
|
16
16
|
require('node:os');
|
|
17
17
|
require('node:child_process');
|
|
18
18
|
require('node:readline');
|
|
19
|
-
require('./persistence-
|
|
19
|
+
require('./persistence-JEXs_kBA.cjs');
|
|
20
20
|
require('node:fs/promises');
|
|
21
21
|
require('fs/promises');
|
|
22
22
|
require('crypto');
|
|
@@ -27,8 +27,8 @@ require('tweetnacl');
|
|
|
27
27
|
require('open');
|
|
28
28
|
var React = require('react');
|
|
29
29
|
var ink = require('ink');
|
|
30
|
-
var ProviderSelectionHandler = require('./ProviderSelectionHandler-
|
|
31
|
-
var BaseReasoningProcessor = require('./BaseReasoningProcessor-
|
|
30
|
+
var ProviderSelectionHandler = require('./ProviderSelectionHandler-GuW6S0tQ.cjs');
|
|
31
|
+
var BaseReasoningProcessor = require('./BaseReasoningProcessor-BdbyUAZR.cjs');
|
|
32
32
|
require('socket.io-client');
|
|
33
33
|
require('zod');
|
|
34
34
|
require('expo-server-sdk');
|
|
@@ -834,6 +834,13 @@ async function codexRemoteLauncher(session) {
|
|
|
834
834
|
const waitSignal = abortController.signal;
|
|
835
835
|
const batch = await session.queue.waitForMessagesAndGetAsString(waitSignal);
|
|
836
836
|
if (!batch) {
|
|
837
|
+
api.logger.debug("[Codex] Message wait returned no batch", {
|
|
838
|
+
shouldExit,
|
|
839
|
+
waitSignalAborted: waitSignal.aborted,
|
|
840
|
+
queueClosed: session.queue.isClosed(),
|
|
841
|
+
queueSize: session.queue.size(),
|
|
842
|
+
pending: Boolean(pending)
|
|
843
|
+
});
|
|
837
844
|
if (waitSignal.aborted && !shouldExit) {
|
|
838
845
|
continue;
|
|
839
846
|
}
|
|
@@ -949,7 +956,14 @@ async function codexRemoteLauncher(session) {
|
|
|
949
956
|
}
|
|
950
957
|
messageBuffer.clear();
|
|
951
958
|
}
|
|
952
|
-
api.logger.debug("[Codex] ACP remote launcher returning: exit"
|
|
959
|
+
api.logger.debug("[Codex] ACP remote launcher returning: exit", {
|
|
960
|
+
shouldExit,
|
|
961
|
+
queueClosed: session.queue.isClosed(),
|
|
962
|
+
queueSize: session.queue.size(),
|
|
963
|
+
pending: pending ? pending.hash : null,
|
|
964
|
+
turnInFlight,
|
|
965
|
+
runtimeHandleActive: Boolean(runtimeHandle)
|
|
966
|
+
});
|
|
953
967
|
return "exit";
|
|
954
968
|
}
|
|
955
969
|
|
|
@@ -1090,6 +1104,7 @@ async function runCodex(opts) {
|
|
|
1090
1104
|
session: codexSession,
|
|
1091
1105
|
startingMode: requestedStartingMode
|
|
1092
1106
|
});
|
|
1107
|
+
api.logger.debug(`[codex] codexLoop resolved with exit code ${exitCode}`);
|
|
1093
1108
|
} catch (error) {
|
|
1094
1109
|
loopError = error;
|
|
1095
1110
|
} finally {
|
|
@@ -1103,12 +1118,16 @@ async function runCodex(opts) {
|
|
|
1103
1118
|
codexSession.cleanup();
|
|
1104
1119
|
}
|
|
1105
1120
|
if (loopError !== void 0) {
|
|
1121
|
+
api.logger.debug("[codex] runCodex exiting after loop error", loopError);
|
|
1106
1122
|
throw loopError;
|
|
1107
1123
|
}
|
|
1108
1124
|
if (closeError !== void 0) {
|
|
1125
|
+
api.logger.debug("[codex] runCodex exiting after close error", closeError);
|
|
1109
1126
|
throw closeError;
|
|
1110
1127
|
}
|
|
1111
|
-
|
|
1128
|
+
const resolvedExitCode = exitCode ?? 1;
|
|
1129
|
+
api.logger.debug(`[codex] Exiting process with code ${resolvedExitCode}`);
|
|
1130
|
+
process.exit(resolvedExitCode);
|
|
1112
1131
|
}
|
|
1113
1132
|
|
|
1114
1133
|
exports.resolveIncomingCodexPermissionMode = resolveIncomingCodexPermissionMode;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { randomUUID } from 'node:crypto';
|
|
2
|
-
import { l as logger, b as connectionState, A as ApiClient } from './api-
|
|
3
|
-
import { B as BasePermissionHandler, h as hashObject, d as MessageBuffer, C as ConversationHistory$1, w as waitForResponseCompleteWithAbort, r as registerKillSessionHandler, l as launchRuntimeHandleWithFactoryResult, i as inferToolResultError, j as forwardAgentMessageToProviderSession, f as closeProviderSession, e as ensureManagedProviderMachine, M as MissingMachineIdError, b as MessageQueue2, s as syncControlledByUserState } from './registerKillSessionHandler-
|
|
4
|
-
import { f as formatDisplayMessage, v as validateCodexAcpSpawn, d as createCodexBackend, t as truncateDisplayMessage, b as stopCaffeinate } from './index-
|
|
2
|
+
import { l as logger, b as connectionState, A as ApiClient } from './api-D7DleJYY.mjs';
|
|
3
|
+
import { B as BasePermissionHandler, h as hashObject, d as MessageBuffer, C as ConversationHistory$1, w as waitForResponseCompleteWithAbort, r as registerKillSessionHandler, l as launchRuntimeHandleWithFactoryResult, i as inferToolResultError, j as forwardAgentMessageToProviderSession, f as closeProviderSession, e as ensureManagedProviderMachine, M as MissingMachineIdError, b as MessageQueue2, s as syncControlledByUserState } from './registerKillSessionHandler-BRfDcq3x.mjs';
|
|
4
|
+
import { f as formatDisplayMessage, v as validateCodexAcpSpawn, d as createCodexBackend, t as truncateDisplayMessage, b as stopCaffeinate } from './index-Cdi5KxhK.mjs';
|
|
5
5
|
import 'cross-spawn';
|
|
6
6
|
import '@agentclientprotocol/sdk';
|
|
7
7
|
import 'ps-list';
|
|
@@ -14,7 +14,7 @@ import 'node:path';
|
|
|
14
14
|
import 'node:os';
|
|
15
15
|
import 'node:child_process';
|
|
16
16
|
import 'node:readline';
|
|
17
|
-
import './persistence-
|
|
17
|
+
import './persistence-C0nC4mEU.mjs';
|
|
18
18
|
import 'node:fs/promises';
|
|
19
19
|
import 'fs/promises';
|
|
20
20
|
import 'crypto';
|
|
@@ -25,8 +25,8 @@ import 'tweetnacl';
|
|
|
25
25
|
import 'open';
|
|
26
26
|
import React, { useState, useRef, useEffect, useCallback } from 'react';
|
|
27
27
|
import { useStdout, useInput, Box, Text, render } from 'ink';
|
|
28
|
-
import { c as createKeepAliveController, P as ProviderSelectionHandler, r as runModeLoop } from './ProviderSelectionHandler-
|
|
29
|
-
import { B as BaseReasoningProcessor, b as bootstrapManagedProviderSession } from './BaseReasoningProcessor-
|
|
28
|
+
import { c as createKeepAliveController, P as ProviderSelectionHandler, r as runModeLoop } from './ProviderSelectionHandler-oz9NjR_r.mjs';
|
|
29
|
+
import { B as BaseReasoningProcessor, b as bootstrapManagedProviderSession } from './BaseReasoningProcessor-wqWUBiEJ.mjs';
|
|
30
30
|
import 'socket.io-client';
|
|
31
31
|
import 'zod';
|
|
32
32
|
import 'expo-server-sdk';
|
|
@@ -832,6 +832,13 @@ async function codexRemoteLauncher(session) {
|
|
|
832
832
|
const waitSignal = abortController.signal;
|
|
833
833
|
const batch = await session.queue.waitForMessagesAndGetAsString(waitSignal);
|
|
834
834
|
if (!batch) {
|
|
835
|
+
logger.debug("[Codex] Message wait returned no batch", {
|
|
836
|
+
shouldExit,
|
|
837
|
+
waitSignalAborted: waitSignal.aborted,
|
|
838
|
+
queueClosed: session.queue.isClosed(),
|
|
839
|
+
queueSize: session.queue.size(),
|
|
840
|
+
pending: Boolean(pending)
|
|
841
|
+
});
|
|
835
842
|
if (waitSignal.aborted && !shouldExit) {
|
|
836
843
|
continue;
|
|
837
844
|
}
|
|
@@ -947,7 +954,14 @@ async function codexRemoteLauncher(session) {
|
|
|
947
954
|
}
|
|
948
955
|
messageBuffer.clear();
|
|
949
956
|
}
|
|
950
|
-
logger.debug("[Codex] ACP remote launcher returning: exit"
|
|
957
|
+
logger.debug("[Codex] ACP remote launcher returning: exit", {
|
|
958
|
+
shouldExit,
|
|
959
|
+
queueClosed: session.queue.isClosed(),
|
|
960
|
+
queueSize: session.queue.size(),
|
|
961
|
+
pending: pending ? pending.hash : null,
|
|
962
|
+
turnInFlight,
|
|
963
|
+
runtimeHandleActive: Boolean(runtimeHandle)
|
|
964
|
+
});
|
|
951
965
|
return "exit";
|
|
952
966
|
}
|
|
953
967
|
|
|
@@ -1088,6 +1102,7 @@ async function runCodex(opts) {
|
|
|
1088
1102
|
session: codexSession,
|
|
1089
1103
|
startingMode: requestedStartingMode
|
|
1090
1104
|
});
|
|
1105
|
+
logger.debug(`[codex] codexLoop resolved with exit code ${exitCode}`);
|
|
1091
1106
|
} catch (error) {
|
|
1092
1107
|
loopError = error;
|
|
1093
1108
|
} finally {
|
|
@@ -1101,12 +1116,16 @@ async function runCodex(opts) {
|
|
|
1101
1116
|
codexSession.cleanup();
|
|
1102
1117
|
}
|
|
1103
1118
|
if (loopError !== void 0) {
|
|
1119
|
+
logger.debug("[codex] runCodex exiting after loop error", loopError);
|
|
1104
1120
|
throw loopError;
|
|
1105
1121
|
}
|
|
1106
1122
|
if (closeError !== void 0) {
|
|
1123
|
+
logger.debug("[codex] runCodex exiting after close error", closeError);
|
|
1107
1124
|
throw closeError;
|
|
1108
1125
|
}
|
|
1109
|
-
|
|
1126
|
+
const resolvedExitCode = exitCode ?? 1;
|
|
1127
|
+
logger.debug(`[codex] Exiting process with code ${resolvedExitCode}`);
|
|
1128
|
+
process.exit(resolvedExitCode);
|
|
1110
1129
|
}
|
|
1111
1130
|
|
|
1112
1131
|
export { resolveIncomingCodexPermissionMode, resolveInitialCodexPermissionMode, resolveQueuedCodexPermissionMode, runCodex };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { useStdout, useInput, Box, Text, render } from 'ink';
|
|
2
2
|
import React, { useState, useRef, useEffect, useCallback } from 'react';
|
|
3
3
|
import { randomUUID } from 'node:crypto';
|
|
4
|
-
import { l as logger, b as connectionState, A as ApiClient } from './api-
|
|
5
|
-
import { B as BasePermissionHandler, C as ConversationHistory$1, e as ensureManagedProviderMachine, M as MissingMachineIdError, s as syncControlledByUserState, b as MessageQueue2, h as hashObject, d as MessageBuffer, r as registerKillSessionHandler, w as waitForResponseCompleteWithAbort, f as closeProviderSession, l as launchRuntimeHandleWithFactoryResult, i as inferToolResultError, j as forwardAgentMessageToProviderSession } from './registerKillSessionHandler-
|
|
6
|
-
import { g as getInitialGeminiModel, r as readGeminiLocalConfig, G as GEMINI_MODEL_ENV, s as saveGeminiModelToConfig, a as createGeminiBackend, b as stopCaffeinate } from './index-
|
|
7
|
-
import { B as BaseReasoningProcessor, b as bootstrapManagedProviderSession } from './BaseReasoningProcessor-
|
|
4
|
+
import { l as logger, b as connectionState, A as ApiClient } from './api-D7DleJYY.mjs';
|
|
5
|
+
import { B as BasePermissionHandler, C as ConversationHistory$1, e as ensureManagedProviderMachine, M as MissingMachineIdError, s as syncControlledByUserState, b as MessageQueue2, h as hashObject, d as MessageBuffer, r as registerKillSessionHandler, w as waitForResponseCompleteWithAbort, f as closeProviderSession, l as launchRuntimeHandleWithFactoryResult, i as inferToolResultError, j as forwardAgentMessageToProviderSession } from './registerKillSessionHandler-BRfDcq3x.mjs';
|
|
6
|
+
import { g as getInitialGeminiModel, r as readGeminiLocalConfig, G as GEMINI_MODEL_ENV, s as saveGeminiModelToConfig, a as createGeminiBackend, b as stopCaffeinate } from './index-Cdi5KxhK.mjs';
|
|
7
|
+
import { B as BaseReasoningProcessor, b as bootstrapManagedProviderSession } from './BaseReasoningProcessor-wqWUBiEJ.mjs';
|
|
8
8
|
import 'cross-spawn';
|
|
9
9
|
import '@agentclientprotocol/sdk';
|
|
10
10
|
import 'ps-list';
|
|
@@ -15,7 +15,7 @@ import 'node:child_process';
|
|
|
15
15
|
import 'node:readline';
|
|
16
16
|
import 'tweetnacl';
|
|
17
17
|
import 'axios';
|
|
18
|
-
import './persistence-
|
|
18
|
+
import './persistence-C0nC4mEU.mjs';
|
|
19
19
|
import 'open';
|
|
20
20
|
import 'chalk';
|
|
21
21
|
import 'fs';
|
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
var ink = require('ink');
|
|
4
4
|
var React = require('react');
|
|
5
5
|
var node_crypto = require('node:crypto');
|
|
6
|
-
var api = require('./api-
|
|
7
|
-
var registerKillSessionHandler = require('./registerKillSessionHandler-
|
|
8
|
-
var index = require('./index-
|
|
9
|
-
var BaseReasoningProcessor = require('./BaseReasoningProcessor-
|
|
6
|
+
var api = require('./api-BZ2U3k-r.cjs');
|
|
7
|
+
var registerKillSessionHandler = require('./registerKillSessionHandler-Qw8jZB2x.cjs');
|
|
8
|
+
var index = require('./index-sJfKgN1y.cjs');
|
|
9
|
+
var BaseReasoningProcessor = require('./BaseReasoningProcessor-BdbyUAZR.cjs');
|
|
10
10
|
require('cross-spawn');
|
|
11
11
|
require('@agentclientprotocol/sdk');
|
|
12
12
|
require('ps-list');
|
|
@@ -17,7 +17,7 @@ require('node:child_process');
|
|
|
17
17
|
require('node:readline');
|
|
18
18
|
require('tweetnacl');
|
|
19
19
|
require('axios');
|
|
20
|
-
require('./persistence-
|
|
20
|
+
require('./persistence-JEXs_kBA.cjs');
|
|
21
21
|
require('open');
|
|
22
22
|
require('chalk');
|
|
23
23
|
require('fs');
|