happy-imou-cloud 2.1.4 → 2.1.5
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 +38 -38
- package/dist/{BaseReasoningProcessor-lTsZVuAU.mjs → BaseReasoningProcessor-CTWoJTb8.mjs} +3 -3
- package/dist/{BaseReasoningProcessor-DgdsExMH.cjs → BaseReasoningProcessor-DsunYoSL.cjs} +3 -3
- package/dist/{ProviderSelectionHandler-Bavm9TDG.cjs → ProviderSelectionHandler-BxcgZ5df.cjs} +2 -2
- package/dist/{ProviderSelectionHandler-CGTnB7ba.mjs → ProviderSelectionHandler-LiWZjziD.mjs} +2 -2
- package/dist/{api-B6ESNpGB.cjs → api-DOn5w7Lv.cjs} +2 -2
- package/dist/{api-l8X03rs-.mjs → api-RxQ4bfJm.mjs} +2 -2
- package/dist/{command-BVCkEMtp.mjs → command-BZ8G4IiN.mjs} +3 -3
- package/dist/{command-DPLKOzMr.cjs → command-C3XGNSfh.cjs} +3 -3
- package/dist/{index-D1BP-fEm.cjs → index-C06zeR85.cjs} +11 -11
- package/dist/{index-D72RMo5Z.mjs → index-CQEVJsPp.mjs} +8 -8
- 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-CyFjFOlN.mjs → persistence-Bf5FdmEK.mjs} +1 -1
- package/dist/{persistence-EDmI-c8T.cjs → persistence-DuakVvfB.cjs} +1 -1
- package/dist/{registerKillSessionHandler-71xCO8e_.cjs → registerKillSessionHandler-BRC1HO05.cjs} +72 -8
- package/dist/{registerKillSessionHandler-DAVhkb-l.mjs → registerKillSessionHandler-BuzsaxI2.mjs} +72 -8
- package/dist/{runClaude-DjnTGJGC.cjs → runClaude-C8Lx-Xij.cjs} +5 -5
- package/dist/{runClaude-BRhQLKjh.mjs → runClaude-Cg8x5JOI.mjs} +5 -5
- package/dist/{runCodex-DUs_jBE-.mjs → runCodex-e4wK1OuI.mjs} +6 -6
- package/dist/{runCodex-BHq7Rnq7.cjs → runCodex-rYroXLgt.cjs} +6 -6
- package/dist/{runGemini-hkZeOnA_.cjs → runGemini-Bjw2PSMh.cjs} +5 -5
- package/dist/{runGemini-pmvBZ6qU.mjs → runGemini-Cd1FWJJ_.mjs} +5 -5
- package/package.json +2 -2
- 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/ensureAcpSdkCompat.mjs +1 -1
package/bin/happy-cloud.mjs
CHANGED
|
@@ -1,39 +1,39 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
import { execFileSync } from 'child_process';
|
|
4
|
-
import { fileURLToPath } from 'url';
|
|
5
|
-
import { join, dirname } from 'path';
|
|
6
|
-
import { ensureAcpSdkCompat } from '../scripts/ensureAcpSdkCompat.mjs';
|
|
7
|
-
|
|
8
|
-
// Check if we're already running with the flags
|
|
9
|
-
const hasNoWarnings = process.execArgv.includes('--no-warnings');
|
|
10
|
-
const hasNoDeprecation = process.execArgv.includes('--no-deprecation');
|
|
11
|
-
|
|
12
|
-
if (!hasNoWarnings || !hasNoDeprecation) {
|
|
13
|
-
// Get path to the actual CLI entrypoint
|
|
14
|
-
const projectRoot = dirname(dirname(fileURLToPath(import.meta.url)));
|
|
15
|
-
const entrypoint = join(projectRoot, 'dist', 'index.mjs');
|
|
16
|
-
|
|
17
|
-
ensureAcpSdkCompat();
|
|
18
|
-
|
|
19
|
-
// Execute the actual CLI directly with the correct flags
|
|
20
|
-
try {
|
|
21
|
-
execFileSync(process.execPath, [
|
|
22
|
-
'--no-warnings',
|
|
23
|
-
'--no-deprecation',
|
|
24
|
-
entrypoint,
|
|
25
|
-
...process.argv.slice(2)
|
|
26
|
-
], {
|
|
27
|
-
stdio: 'inherit',
|
|
28
|
-
env: process.env
|
|
29
|
-
});
|
|
30
|
-
} catch (error) {
|
|
31
|
-
// execFileSync throws if the process exits with non-zero
|
|
32
|
-
process.exit(error.status || 1);
|
|
33
|
-
}
|
|
34
|
-
} else {
|
|
35
|
-
// We're running Node with the flags we wanted, import the CLI entrypoint
|
|
36
|
-
// module to avoid creating a new process.
|
|
37
|
-
ensureAcpSdkCompat();
|
|
38
|
-
import("../dist/index.mjs");
|
|
39
|
-
}
|
|
2
|
+
|
|
3
|
+
import { execFileSync } from 'child_process';
|
|
4
|
+
import { fileURLToPath } from 'url';
|
|
5
|
+
import { join, dirname } from 'path';
|
|
6
|
+
import { ensureAcpSdkCompat } from '../scripts/ensureAcpSdkCompat.mjs';
|
|
7
|
+
|
|
8
|
+
// Check if we're already running with the flags
|
|
9
|
+
const hasNoWarnings = process.execArgv.includes('--no-warnings');
|
|
10
|
+
const hasNoDeprecation = process.execArgv.includes('--no-deprecation');
|
|
11
|
+
|
|
12
|
+
if (!hasNoWarnings || !hasNoDeprecation) {
|
|
13
|
+
// Get path to the actual CLI entrypoint
|
|
14
|
+
const projectRoot = dirname(dirname(fileURLToPath(import.meta.url)));
|
|
15
|
+
const entrypoint = join(projectRoot, 'dist', 'index.mjs');
|
|
16
|
+
|
|
17
|
+
ensureAcpSdkCompat();
|
|
18
|
+
|
|
19
|
+
// Execute the actual CLI directly with the correct flags
|
|
20
|
+
try {
|
|
21
|
+
execFileSync(process.execPath, [
|
|
22
|
+
'--no-warnings',
|
|
23
|
+
'--no-deprecation',
|
|
24
|
+
entrypoint,
|
|
25
|
+
...process.argv.slice(2)
|
|
26
|
+
], {
|
|
27
|
+
stdio: 'inherit',
|
|
28
|
+
env: process.env
|
|
29
|
+
});
|
|
30
|
+
} catch (error) {
|
|
31
|
+
// execFileSync throws if the process exits with non-zero
|
|
32
|
+
process.exit(error.status || 1);
|
|
33
|
+
}
|
|
34
|
+
} else {
|
|
35
|
+
// We're running Node with the flags we wanted, import the CLI entrypoint
|
|
36
|
+
// module to avoid creating a new process.
|
|
37
|
+
ensureAcpSdkCompat();
|
|
38
|
+
import("../dist/index.mjs");
|
|
39
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { p as publishSessionRegistration } from './index-
|
|
2
|
-
import { s as startOfflineReconnection, c as configuration, i as isAuthenticationRequiredError, l as logger } from './api-
|
|
3
|
-
import { c as createSessionMetadata } from './registerKillSessionHandler-
|
|
1
|
+
import { p as publishSessionRegistration } from './index-CQEVJsPp.mjs';
|
|
2
|
+
import { s as startOfflineReconnection, c as configuration, i as isAuthenticationRequiredError, l as logger } from './api-RxQ4bfJm.mjs';
|
|
3
|
+
import { c as createSessionMetadata } from './registerKillSessionHandler-BuzsaxI2.mjs';
|
|
4
4
|
import { EventEmitter } from 'node:events';
|
|
5
5
|
import { randomUUID } from 'node:crypto';
|
|
6
6
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
4
|
-
var api = require('./api-
|
|
5
|
-
var registerKillSessionHandler = require('./registerKillSessionHandler-
|
|
3
|
+
var index = require('./index-C06zeR85.cjs');
|
|
4
|
+
var api = require('./api-DOn5w7Lv.cjs');
|
|
5
|
+
var registerKillSessionHandler = require('./registerKillSessionHandler-BRC1HO05.cjs');
|
|
6
6
|
var node_events = require('node:events');
|
|
7
7
|
var node_crypto = require('node:crypto');
|
|
8
8
|
|
package/dist/{ProviderSelectionHandler-Bavm9TDG.cjs → ProviderSelectionHandler-BxcgZ5df.cjs}
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var api = require('./api-
|
|
4
|
-
var registerKillSessionHandler = require('./registerKillSessionHandler-
|
|
3
|
+
var api = require('./api-DOn5w7Lv.cjs');
|
|
4
|
+
var registerKillSessionHandler = require('./registerKillSessionHandler-BRC1HO05.cjs');
|
|
5
5
|
|
|
6
6
|
async function runModeLoop(opts) {
|
|
7
7
|
let currentMode = opts.startingMode;
|
package/dist/{ProviderSelectionHandler-CGTnB7ba.mjs → ProviderSelectionHandler-LiWZjziD.mjs}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { l as logger } from './api-
|
|
2
|
-
import { g as getPendingInteractionTimeoutMs, I as INTERACTION_SUPERSEDED_ERROR, a as INTERACTION_TIMED_OUT_ERROR } from './registerKillSessionHandler-
|
|
1
|
+
import { l as logger } from './api-RxQ4bfJm.mjs';
|
|
2
|
+
import { g as getPendingInteractionTimeoutMs, I as INTERACTION_SUPERSEDED_ERROR, a as INTERACTION_TIMED_OUT_ERROR } from './registerKillSessionHandler-BuzsaxI2.mjs';
|
|
3
3
|
|
|
4
4
|
async function runModeLoop(opts) {
|
|
5
5
|
let currentMode = opts.startingMode;
|
|
@@ -18,7 +18,7 @@ var node_child_process = require('node:child_process');
|
|
|
18
18
|
var expoServerSdk = require('expo-server-sdk');
|
|
19
19
|
|
|
20
20
|
var name = "happy-imou-cloud";
|
|
21
|
-
var version = "2.1.
|
|
21
|
+
var version = "2.1.5";
|
|
22
22
|
var description = "hicloud - Imou 企业定制版。关键是 happy!移动端远程 AI 编程工具,支持 Claude Code、Codex 和 Gemini CLI";
|
|
23
23
|
var author = "long.zhu";
|
|
24
24
|
var license = "MIT";
|
|
@@ -433,7 +433,7 @@ async function listDaemonLogFiles(limit = 50) {
|
|
|
433
433
|
return { file, path: fullPath, modified: stats.mtime };
|
|
434
434
|
}).sort((a, b) => b.modified.getTime() - a.modified.getTime());
|
|
435
435
|
try {
|
|
436
|
-
const { readDaemonState } = await Promise.resolve().then(function () { return require('./persistence-
|
|
436
|
+
const { readDaemonState } = await Promise.resolve().then(function () { return require('./persistence-DuakVvfB.cjs'); });
|
|
437
437
|
const state = await readDaemonState();
|
|
438
438
|
if (!state) {
|
|
439
439
|
return logs;
|
|
@@ -16,7 +16,7 @@ import { spawn } from 'node:child_process';
|
|
|
16
16
|
import { Expo } from 'expo-server-sdk';
|
|
17
17
|
|
|
18
18
|
var name = "happy-imou-cloud";
|
|
19
|
-
var version = "2.1.
|
|
19
|
+
var version = "2.1.5";
|
|
20
20
|
var description = "hicloud - Imou 企业定制版。关键是 happy!移动端远程 AI 编程工具,支持 Claude Code、Codex 和 Gemini CLI";
|
|
21
21
|
var author = "long.zhu";
|
|
22
22
|
var license = "MIT";
|
|
@@ -431,7 +431,7 @@ async function listDaemonLogFiles(limit = 50) {
|
|
|
431
431
|
return { file, path: fullPath, modified: stats.mtime };
|
|
432
432
|
}).sort((a, b) => b.modified.getTime() - a.modified.getTime());
|
|
433
433
|
try {
|
|
434
|
-
const { readDaemonState } = await import('./persistence-
|
|
434
|
+
const { readDaemonState } = await import('./persistence-Bf5FdmEK.mjs');
|
|
435
435
|
const state = await readDaemonState();
|
|
436
436
|
if (!state) {
|
|
437
437
|
return logs;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { c as createDefaultRuntimeShell } from './index-
|
|
1
|
+
import { c as createDefaultRuntimeShell } from './index-CQEVJsPp.mjs';
|
|
2
2
|
import 'chalk';
|
|
3
|
-
import './api-
|
|
3
|
+
import './api-RxQ4bfJm.mjs';
|
|
4
4
|
import 'axios';
|
|
5
5
|
import 'fs';
|
|
6
6
|
import 'node:fs';
|
|
@@ -16,7 +16,7 @@ import 'crypto';
|
|
|
16
16
|
import 'path';
|
|
17
17
|
import 'node:child_process';
|
|
18
18
|
import 'expo-server-sdk';
|
|
19
|
-
import './persistence-
|
|
19
|
+
import './persistence-Bf5FdmEK.mjs';
|
|
20
20
|
import 'node:fs/promises';
|
|
21
21
|
import 'os';
|
|
22
22
|
import 'tmp';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
3
|
+
var index = require('./index-C06zeR85.cjs');
|
|
4
4
|
require('chalk');
|
|
5
|
-
require('./api-
|
|
5
|
+
require('./api-DOn5w7Lv.cjs');
|
|
6
6
|
require('axios');
|
|
7
7
|
require('fs');
|
|
8
8
|
require('node:fs');
|
|
@@ -18,7 +18,7 @@ require('crypto');
|
|
|
18
18
|
require('path');
|
|
19
19
|
require('node:child_process');
|
|
20
20
|
require('expo-server-sdk');
|
|
21
|
-
require('./persistence-
|
|
21
|
+
require('./persistence-DuakVvfB.cjs');
|
|
22
22
|
require('node:fs/promises');
|
|
23
23
|
require('os');
|
|
24
24
|
require('tmp');
|
|
@@ -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-DOn5w7Lv.cjs');
|
|
5
|
+
var persistence = require('./persistence-DuakVvfB.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-C06zeR85.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-C06zeR85.cjs', document.baseURI).href))));
|
|
699
699
|
function projectPath() {
|
|
700
700
|
const path = path$1.resolve(__dirname$2, "..");
|
|
701
701
|
return path;
|
|
@@ -8265,7 +8265,7 @@ class AbortError extends Error {
|
|
|
8265
8265
|
}
|
|
8266
8266
|
}
|
|
8267
8267
|
|
|
8268
|
-
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-
|
|
8268
|
+
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-C06zeR85.cjs', document.baseURI).href)));
|
|
8269
8269
|
const __dirname$1 = path.join(__filename$1, "..");
|
|
8270
8270
|
function getGlobalClaudeVersion() {
|
|
8271
8271
|
try {
|
|
@@ -9516,11 +9516,11 @@ var launch = /*#__PURE__*/Object.freeze({
|
|
|
9516
9516
|
|
|
9517
9517
|
const unifiedProviderExecutors = {
|
|
9518
9518
|
claude: async (opts) => {
|
|
9519
|
-
const { runClaude } = await Promise.resolve().then(function () { return require('./runClaude-
|
|
9519
|
+
const { runClaude } = await Promise.resolve().then(function () { return require('./runClaude-C8Lx-Xij.cjs'); });
|
|
9520
9520
|
await runClaude(opts.credentials, opts.claudeOptions ?? {});
|
|
9521
9521
|
},
|
|
9522
9522
|
codex: async (opts) => {
|
|
9523
|
-
const { runCodex } = await Promise.resolve().then(function () { return require('./runCodex-
|
|
9523
|
+
const { runCodex } = await Promise.resolve().then(function () { return require('./runCodex-rYroXLgt.cjs'); });
|
|
9524
9524
|
await runCodex({
|
|
9525
9525
|
credentials: opts.credentials,
|
|
9526
9526
|
startedBy: opts.startedBy,
|
|
@@ -9529,7 +9529,7 @@ const unifiedProviderExecutors = {
|
|
|
9529
9529
|
});
|
|
9530
9530
|
},
|
|
9531
9531
|
gemini: async (opts) => {
|
|
9532
|
-
const { runGemini } = await Promise.resolve().then(function () { return require('./runGemini-
|
|
9532
|
+
const { runGemini } = await Promise.resolve().then(function () { return require('./runGemini-Bjw2PSMh.cjs'); });
|
|
9533
9533
|
await runGemini({
|
|
9534
9534
|
credentials: opts.credentials,
|
|
9535
9535
|
startedBy: opts.startedBy
|
|
@@ -9605,7 +9605,7 @@ function shouldRunMainClaudeFlow(opts) {
|
|
|
9605
9605
|
return;
|
|
9606
9606
|
} else if (subcommand === "runtime") {
|
|
9607
9607
|
if (args[1] === "providers") {
|
|
9608
|
-
const { renderRuntimeProviders } = await Promise.resolve().then(function () { return require('./command-
|
|
9608
|
+
const { renderRuntimeProviders } = await Promise.resolve().then(function () { return require('./command-C3XGNSfh.cjs'); });
|
|
9609
9609
|
console.log(renderRuntimeProviders());
|
|
9610
9610
|
return;
|
|
9611
9611
|
}
|
|
@@ -9783,8 +9783,8 @@ function shouldRunMainClaudeFlow(opts) {
|
|
|
9783
9783
|
const projectId = args[3];
|
|
9784
9784
|
try {
|
|
9785
9785
|
const { saveGoogleCloudProjectToConfig } = await Promise.resolve().then(function () { return config; });
|
|
9786
|
-
const { readCredentials: readCredentials2 } = await Promise.resolve().then(function () { return require('./persistence-
|
|
9787
|
-
const { ApiClient: ApiClient2 } = await Promise.resolve().then(function () { return require('./api-
|
|
9786
|
+
const { readCredentials: readCredentials2 } = await Promise.resolve().then(function () { return require('./persistence-DuakVvfB.cjs'); });
|
|
9787
|
+
const { ApiClient: ApiClient2 } = await Promise.resolve().then(function () { return require('./api-DOn5w7Lv.cjs'); }).then(function (n) { return n.api; });
|
|
9788
9788
|
let userEmail = void 0;
|
|
9789
9789
|
try {
|
|
9790
9790
|
const credentials = await readCredentials2();
|
|
@@ -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-
|
|
3
|
-
import { writeCredentialsLegacy, writeCredentialsDataKey, readCredentials, readSettings, updateSettings, readDaemonState, clearDaemonState, acquireDaemonLock, writeDaemonState, releaseDaemonLock, validateProfileForAgent, getProfileEnvironmentVariables, clearCredentials, clearMachineId } from './persistence-
|
|
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-RxQ4bfJm.mjs';
|
|
3
|
+
import { writeCredentialsLegacy, writeCredentialsDataKey, readCredentials, readSettings, updateSettings, readDaemonState, clearDaemonState, acquireDaemonLock, writeDaemonState, releaseDaemonLock, validateProfileForAgent, getProfileEnvironmentVariables, clearCredentials, clearMachineId } from './persistence-Bf5FdmEK.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';
|
|
@@ -9494,11 +9494,11 @@ var launch = /*#__PURE__*/Object.freeze({
|
|
|
9494
9494
|
|
|
9495
9495
|
const unifiedProviderExecutors = {
|
|
9496
9496
|
claude: async (opts) => {
|
|
9497
|
-
const { runClaude } = await import('./runClaude-
|
|
9497
|
+
const { runClaude } = await import('./runClaude-Cg8x5JOI.mjs');
|
|
9498
9498
|
await runClaude(opts.credentials, opts.claudeOptions ?? {});
|
|
9499
9499
|
},
|
|
9500
9500
|
codex: async (opts) => {
|
|
9501
|
-
const { runCodex } = await import('./runCodex-
|
|
9501
|
+
const { runCodex } = await import('./runCodex-e4wK1OuI.mjs');
|
|
9502
9502
|
await runCodex({
|
|
9503
9503
|
credentials: opts.credentials,
|
|
9504
9504
|
startedBy: opts.startedBy,
|
|
@@ -9507,7 +9507,7 @@ const unifiedProviderExecutors = {
|
|
|
9507
9507
|
});
|
|
9508
9508
|
},
|
|
9509
9509
|
gemini: async (opts) => {
|
|
9510
|
-
const { runGemini } = await import('./runGemini-
|
|
9510
|
+
const { runGemini } = await import('./runGemini-Cd1FWJJ_.mjs');
|
|
9511
9511
|
await runGemini({
|
|
9512
9512
|
credentials: opts.credentials,
|
|
9513
9513
|
startedBy: opts.startedBy
|
|
@@ -9583,7 +9583,7 @@ function shouldRunMainClaudeFlow(opts) {
|
|
|
9583
9583
|
return;
|
|
9584
9584
|
} else if (subcommand === "runtime") {
|
|
9585
9585
|
if (args[1] === "providers") {
|
|
9586
|
-
const { renderRuntimeProviders } = await import('./command-
|
|
9586
|
+
const { renderRuntimeProviders } = await import('./command-BZ8G4IiN.mjs');
|
|
9587
9587
|
console.log(renderRuntimeProviders());
|
|
9588
9588
|
return;
|
|
9589
9589
|
}
|
|
@@ -9761,8 +9761,8 @@ function shouldRunMainClaudeFlow(opts) {
|
|
|
9761
9761
|
const projectId = args[3];
|
|
9762
9762
|
try {
|
|
9763
9763
|
const { saveGoogleCloudProjectToConfig } = await Promise.resolve().then(function () { return config; });
|
|
9764
|
-
const { readCredentials: readCredentials2 } = await import('./persistence-
|
|
9765
|
-
const { ApiClient: ApiClient2 } = await import('./api-
|
|
9764
|
+
const { readCredentials: readCredentials2 } = await import('./persistence-Bf5FdmEK.mjs');
|
|
9765
|
+
const { ApiClient: ApiClient2 } = await import('./api-RxQ4bfJm.mjs').then(function (n) { return n.v; });
|
|
9766
9766
|
let userEmail = void 0;
|
|
9767
9767
|
try {
|
|
9768
9768
|
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-DOn5w7Lv.cjs');
|
|
5
|
+
require('./persistence-DuakVvfB.cjs');
|
|
6
6
|
require('zod');
|
|
7
|
-
require('./index-
|
|
7
|
+
require('./index-C06zeR85.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-RxQ4bfJm.mjs';
|
|
3
|
+
import './persistence-Bf5FdmEK.mjs';
|
|
4
4
|
import 'zod';
|
|
5
|
-
import './index-
|
|
5
|
+
import './index-CQEVJsPp.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-RxQ4bfJm.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-RxQ4bfJm.mjs';
|
|
5
5
|
import * as z from 'zod';
|
|
6
6
|
import 'axios';
|
|
7
7
|
import 'chalk';
|
package/dist/{registerKillSessionHandler-71xCO8e_.cjs → registerKillSessionHandler-BRC1HO05.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-C06zeR85.cjs');
|
|
4
|
+
var persistence = require('./persistence-DuakVvfB.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-DOn5w7Lv.cjs');
|
|
8
8
|
var node_crypto = require('node:crypto');
|
|
9
9
|
var crypto = require('crypto');
|
|
10
10
|
require('axios');
|
|
@@ -116,6 +116,62 @@ function attachToolHappierMetaV2(value, meta) {
|
|
|
116
116
|
};
|
|
117
117
|
}
|
|
118
118
|
|
|
119
|
+
const DISPLAY_FRIENDLY_TOOL_FIELDS = ["stdout", "stderr", "output", "text", "message", "detail", "reason", "data"];
|
|
120
|
+
function isRecord(value) {
|
|
121
|
+
return !!value && typeof value === "object" && !Array.isArray(value);
|
|
122
|
+
}
|
|
123
|
+
function stripInternalToolMeta(value) {
|
|
124
|
+
if (!isRecord(value)) {
|
|
125
|
+
return value;
|
|
126
|
+
}
|
|
127
|
+
const {
|
|
128
|
+
_happier: _ignoredHappier,
|
|
129
|
+
_happy: _ignoredHappy,
|
|
130
|
+
...rest
|
|
131
|
+
} = value;
|
|
132
|
+
return rest;
|
|
133
|
+
}
|
|
134
|
+
function extractNestedTextContent(value) {
|
|
135
|
+
if (typeof value === "string") {
|
|
136
|
+
return value.trim().length > 0 ? value : null;
|
|
137
|
+
}
|
|
138
|
+
if (Array.isArray(value)) {
|
|
139
|
+
const parts = value.map((item) => extractNestedTextContent(item)).filter((item) => typeof item === "string" && item.length > 0);
|
|
140
|
+
return parts.length > 0 ? parts.join("\n") : null;
|
|
141
|
+
}
|
|
142
|
+
if (!isRecord(value)) {
|
|
143
|
+
return null;
|
|
144
|
+
}
|
|
145
|
+
if (typeof value.text === "string" && value.text.trim().length > 0) {
|
|
146
|
+
return value.text;
|
|
147
|
+
}
|
|
148
|
+
if ("content" in value) {
|
|
149
|
+
return extractNestedTextContent(value.content);
|
|
150
|
+
}
|
|
151
|
+
return null;
|
|
152
|
+
}
|
|
153
|
+
function normalizeCodexToolInput(value) {
|
|
154
|
+
return stripInternalToolMeta(value);
|
|
155
|
+
}
|
|
156
|
+
function normalizeCodexToolOutput(value) {
|
|
157
|
+
const sanitized = stripInternalToolMeta(value);
|
|
158
|
+
if (!isRecord(sanitized)) {
|
|
159
|
+
return sanitized;
|
|
160
|
+
}
|
|
161
|
+
const hasDisplayFriendlyField = DISPLAY_FRIENDLY_TOOL_FIELDS.some((field) => field in sanitized);
|
|
162
|
+
if (hasDisplayFriendlyField || !("content" in sanitized)) {
|
|
163
|
+
return sanitized;
|
|
164
|
+
}
|
|
165
|
+
const flattenedText = extractNestedTextContent(sanitized.content);
|
|
166
|
+
if (!flattenedText) {
|
|
167
|
+
return sanitized;
|
|
168
|
+
}
|
|
169
|
+
const { content: _content, ...rest } = sanitized;
|
|
170
|
+
return {
|
|
171
|
+
...rest,
|
|
172
|
+
text: flattenedText
|
|
173
|
+
};
|
|
174
|
+
}
|
|
119
175
|
function getDefaultExecToolName(provider) {
|
|
120
176
|
switch (provider) {
|
|
121
177
|
case "claude":
|
|
@@ -146,6 +202,14 @@ function attachToolMeta(provider, rawToolName, value) {
|
|
|
146
202
|
canonicalToolName
|
|
147
203
|
});
|
|
148
204
|
}
|
|
205
|
+
function prepareToolInput(provider, rawToolName, value) {
|
|
206
|
+
const enriched = attachToolMeta(provider, rawToolName, value);
|
|
207
|
+
return provider === "codex" ? normalizeCodexToolInput(enriched) : enriched;
|
|
208
|
+
}
|
|
209
|
+
function prepareToolOutput(provider, rawToolName, value) {
|
|
210
|
+
const enriched = attachToolMeta(provider, rawToolName, value);
|
|
211
|
+
return provider === "codex" ? normalizeCodexToolOutput(enriched) : enriched;
|
|
212
|
+
}
|
|
149
213
|
function forwardAgentMessageToProviderSession(msg, options) {
|
|
150
214
|
const createId = options.createId ?? node_crypto.randomUUID;
|
|
151
215
|
const toolResultType = options.toolResultType ?? "tool-result";
|
|
@@ -155,7 +219,7 @@ function forwardAgentMessageToProviderSession(msg, options) {
|
|
|
155
219
|
type: "tool-call",
|
|
156
220
|
name: index.resolveCanonicalToolNameV2(msg.toolName),
|
|
157
221
|
callId: msg.callId,
|
|
158
|
-
input:
|
|
222
|
+
input: prepareToolInput(options.provider, msg.toolName, msg.args),
|
|
159
223
|
id: createId()
|
|
160
224
|
});
|
|
161
225
|
return true;
|
|
@@ -164,7 +228,7 @@ function forwardAgentMessageToProviderSession(msg, options) {
|
|
|
164
228
|
options.send({
|
|
165
229
|
type: toolResultType,
|
|
166
230
|
callId: msg.callId,
|
|
167
|
-
output:
|
|
231
|
+
output: prepareToolOutput(options.provider, msg.toolName, msg.result),
|
|
168
232
|
id: createId(),
|
|
169
233
|
isError: inferToolResultError(msg.result)
|
|
170
234
|
});
|
|
@@ -206,7 +270,7 @@ function forwardAgentMessageToProviderSession(msg, options) {
|
|
|
206
270
|
type: "tool-call",
|
|
207
271
|
name: index.resolveCanonicalToolNameV2(rawToolName),
|
|
208
272
|
callId: call_id,
|
|
209
|
-
input:
|
|
273
|
+
input: prepareToolInput(options.provider, rawToolName, inputs),
|
|
210
274
|
id: createId()
|
|
211
275
|
});
|
|
212
276
|
return true;
|
|
@@ -217,7 +281,7 @@ function forwardAgentMessageToProviderSession(msg, options) {
|
|
|
217
281
|
type: "tool-call",
|
|
218
282
|
name: index.resolveCanonicalToolNameV2(rawToolName),
|
|
219
283
|
callId: msg.call_id,
|
|
220
|
-
input:
|
|
284
|
+
input: prepareToolInput(options.provider, rawToolName, {
|
|
221
285
|
auto_approved: msg.auto_approved,
|
|
222
286
|
changes: msg.changes
|
|
223
287
|
}),
|
|
@@ -230,7 +294,7 @@ function forwardAgentMessageToProviderSession(msg, options) {
|
|
|
230
294
|
options.send({
|
|
231
295
|
type: toolResultType,
|
|
232
296
|
callId: msg.call_id,
|
|
233
|
-
output:
|
|
297
|
+
output: prepareToolOutput(options.provider, rawToolName, {
|
|
234
298
|
stdout: msg.stdout,
|
|
235
299
|
stderr: msg.stderr,
|
|
236
300
|
success: msg.success
|