happy-imou-cloud 2.1.34 → 2.1.36
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-kN8gq-t4.cjs → BaseReasoningProcessor-CwT7JhxJ.cjs} +2 -2
- package/dist/{BaseReasoningProcessor-CxLnyixP.mjs → BaseReasoningProcessor-fYtbWsiE.mjs} +2 -2
- package/dist/{ProviderSelectionHandler-DuJGNviz.mjs → ProviderSelectionHandler-B9vjBTyM.mjs} +2 -2
- package/dist/{ProviderSelectionHandler-oEEvSQ0O.cjs → ProviderSelectionHandler-CBX_NP1Q.cjs} +2 -2
- package/dist/{api-C94O6IB2.cjs → api-CcZmsHiN.cjs} +1 -1
- package/dist/{api-B3Zl8oHG.mjs → api-CwMg_lJj.mjs} +1 -1
- package/dist/{command-96cX402J.cjs → command-Ck_6hawr.cjs} +2 -2
- package/dist/{command-CMZlS6zf.mjs → command-DcqLvk6w.mjs} +2 -2
- package/dist/{index-D4TuE2VS.cjs → index-C2Iik0Ll.cjs} +45 -27
- package/dist/{index-sqm5plVs.mjs → index-DGHeJuUL.mjs} +42 -24
- package/dist/index.cjs +2 -2
- package/dist/index.mjs +2 -2
- package/dist/lib.cjs +1 -1
- package/dist/lib.mjs +1 -1
- package/dist/{registerKillSessionHandler-Dmm6gsoz.mjs → registerKillSessionHandler-CjK9IoDq.mjs} +63 -13
- package/dist/{registerKillSessionHandler-7bLVg5RG.cjs → registerKillSessionHandler-DMxV6Ke6.cjs} +63 -13
- package/dist/{runClaude-Dn1JJ8m9.cjs → runClaude-B8f7Ubkz.cjs} +4 -4
- package/dist/{runClaude-BrvxWJ9-.mjs → runClaude-C0QTsf0B.mjs} +4 -4
- package/dist/{runCodex-Dc2Rqb8W.cjs → runCodex-BJ4dyXhc.cjs} +5 -5
- package/dist/{runCodex-DfYO-7YG.mjs → runCodex-BOfihUE0.mjs} +5 -5
- package/dist/{runGemini-C1_AOBlU.mjs → runGemini-CBMJT1Fe.mjs} +4 -4
- package/dist/{runGemini-DQyuAba-.cjs → runGemini-CUL3MiIx.cjs} +4 -4
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
4
|
-
var persistence = require('./api-
|
|
3
|
+
var index = require('./index-C2Iik0Ll.cjs');
|
|
4
|
+
var persistence = require('./api-CcZmsHiN.cjs');
|
|
5
5
|
var node_events = require('node:events');
|
|
6
6
|
var node_crypto = require('node:crypto');
|
|
7
7
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a as createSessionMetadata, p as publishSessionRegistration } from './index-
|
|
2
|
-
import { s as startOfflineReconnection, c as configuration, i as isAuthenticationRequiredError, l as logger } from './api-
|
|
1
|
+
import { a as createSessionMetadata, p as publishSessionRegistration } from './index-DGHeJuUL.mjs';
|
|
2
|
+
import { s as startOfflineReconnection, c as configuration, i as isAuthenticationRequiredError, l as logger } from './api-CwMg_lJj.mjs';
|
|
3
3
|
import { EventEmitter } from 'node:events';
|
|
4
4
|
import { randomUUID } from 'node:crypto';
|
|
5
5
|
|
package/dist/{ProviderSelectionHandler-DuJGNviz.mjs → ProviderSelectionHandler-B9vjBTyM.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-CwMg_lJj.mjs';
|
|
2
|
+
import { g as getPendingInteractionTimeoutMs, I as INTERACTION_SUPERSEDED_ERROR, a as INTERACTION_TIMED_OUT_ERROR } from './registerKillSessionHandler-CjK9IoDq.mjs';
|
|
3
3
|
|
|
4
4
|
async function runModeLoop(opts) {
|
|
5
5
|
let currentMode = opts.startingMode;
|
package/dist/{ProviderSelectionHandler-oEEvSQ0O.cjs → ProviderSelectionHandler-CBX_NP1Q.cjs}
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var persistence = require('./api-
|
|
4
|
-
var registerKillSessionHandler = require('./registerKillSessionHandler-
|
|
3
|
+
var persistence = require('./api-CcZmsHiN.cjs');
|
|
4
|
+
var registerKillSessionHandler = require('./registerKillSessionHandler-DMxV6Ke6.cjs');
|
|
5
5
|
|
|
6
6
|
async function runModeLoop(opts) {
|
|
7
7
|
let currentMode = opts.startingMode;
|
|
@@ -38,7 +38,7 @@ function _interopNamespaceDefault(e) {
|
|
|
38
38
|
var z__namespace = /*#__PURE__*/_interopNamespaceDefault(z);
|
|
39
39
|
|
|
40
40
|
var name = "happy-imou-cloud";
|
|
41
|
-
var version = "2.1.
|
|
41
|
+
var version = "2.1.36";
|
|
42
42
|
var description = "hicloud - Imou 企业定制版。关键是 happy!移动端远程 AI 编程工具,支持 Claude Code、Codex 和 Gemini CLI";
|
|
43
43
|
var author = "long.zhu";
|
|
44
44
|
var license = "MIT";
|
|
@@ -18,7 +18,7 @@ import { spawn } from 'node:child_process';
|
|
|
18
18
|
import { Expo } from 'expo-server-sdk';
|
|
19
19
|
|
|
20
20
|
var name = "happy-imou-cloud";
|
|
21
|
-
var version = "2.1.
|
|
21
|
+
var version = "2.1.36";
|
|
22
22
|
var description = "hicloud - Imou 企业定制版。关键是 happy!移动端远程 AI 编程工具,支持 Claude Code、Codex 和 Gemini CLI";
|
|
23
23
|
var author = "long.zhu";
|
|
24
24
|
var license = "MIT";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { c as createDefaultRuntimeShell } from './index-
|
|
1
|
+
import { c as createDefaultRuntimeShell } from './index-DGHeJuUL.mjs';
|
|
2
2
|
import 'chalk';
|
|
3
|
-
import './api-
|
|
3
|
+
import './api-CwMg_lJj.mjs';
|
|
4
4
|
import 'axios';
|
|
5
5
|
import 'fs';
|
|
6
6
|
import 'node:fs';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var chalk = require('chalk');
|
|
4
|
-
var persistence = require('./api-
|
|
4
|
+
var persistence = require('./api-CcZmsHiN.cjs');
|
|
5
5
|
var z = require('zod');
|
|
6
6
|
var fs$2 = require('fs/promises');
|
|
7
7
|
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-C2Iik0Ll.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();
|
|
@@ -637,7 +637,7 @@ function setupCleanupHandlers() {
|
|
|
637
637
|
});
|
|
638
638
|
}
|
|
639
639
|
|
|
640
|
-
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-
|
|
640
|
+
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-C2Iik0Ll.cjs', document.baseURI).href))));
|
|
641
641
|
function projectPath() {
|
|
642
642
|
const path = path$1.resolve(__dirname$2, "..");
|
|
643
643
|
return path;
|
|
@@ -697,6 +697,18 @@ function classifyHappyProcess(proc) {
|
|
|
697
697
|
}
|
|
698
698
|
return { pid: proc.pid, command: cmd || name, type };
|
|
699
699
|
}
|
|
700
|
+
function collectProtectedProcessIds(processes, currentPid, fallbackParentPid) {
|
|
701
|
+
const pidToProcess = new Map(processes.map((proc) => [proc.pid, proc]));
|
|
702
|
+
const protectedPids = /* @__PURE__ */ new Set([currentPid]);
|
|
703
|
+
const visited = /* @__PURE__ */ new Set();
|
|
704
|
+
let parentPid = pidToProcess.get(currentPid)?.ppid ?? fallbackParentPid;
|
|
705
|
+
while (Number.isInteger(parentPid) && parentPid > 0 && !visited.has(parentPid)) {
|
|
706
|
+
protectedPids.add(parentPid);
|
|
707
|
+
visited.add(parentPid);
|
|
708
|
+
parentPid = pidToProcess.get(parentPid)?.ppid ?? 0;
|
|
709
|
+
}
|
|
710
|
+
return protectedPids;
|
|
711
|
+
}
|
|
700
712
|
function parseWindowsProcessSnapshots(rawOutput) {
|
|
701
713
|
if (!rawOutput) {
|
|
702
714
|
return [];
|
|
@@ -710,6 +722,7 @@ function parseWindowsProcessSnapshots(rawOutput) {
|
|
|
710
722
|
const rows = Array.isArray(parsed) ? parsed : [parsed];
|
|
711
723
|
return rows.filter((row) => typeof row?.ProcessId === "number" && typeof row?.Name === "string").map((row) => ({
|
|
712
724
|
pid: row.ProcessId,
|
|
725
|
+
ppid: typeof row.ParentProcessId === "number" ? row.ParentProcessId : 0,
|
|
713
726
|
name: row.Name,
|
|
714
727
|
cmd: typeof row.CommandLine === "string" ? row.CommandLine : ""
|
|
715
728
|
}));
|
|
@@ -738,7 +751,7 @@ function runWindowsProcessSnapshotQuery(command) {
|
|
|
738
751
|
}
|
|
739
752
|
function getWindowsProcessSnapshots() {
|
|
740
753
|
return runWindowsProcessSnapshotQuery(
|
|
741
|
-
"Get-CimInstance Win32_Process | Select-Object ProcessId, Name, CommandLine | ConvertTo-Json -Compress"
|
|
754
|
+
"Get-CimInstance Win32_Process | Select-Object ProcessId, ParentProcessId, Name, CommandLine | ConvertTo-Json -Compress"
|
|
742
755
|
);
|
|
743
756
|
}
|
|
744
757
|
function getWindowsProcessSnapshotByPid(pid) {
|
|
@@ -746,7 +759,7 @@ function getWindowsProcessSnapshotByPid(pid) {
|
|
|
746
759
|
return null;
|
|
747
760
|
}
|
|
748
761
|
const [proc] = runWindowsProcessSnapshotQuery(
|
|
749
|
-
`Get-CimInstance Win32_Process -Filter "ProcessId = ${pid}" | Select-Object ProcessId, Name, CommandLine | ConvertTo-Json -Compress`
|
|
762
|
+
`Get-CimInstance Win32_Process -Filter "ProcessId = ${pid}" | Select-Object ProcessId, ParentProcessId, Name, CommandLine | ConvertTo-Json -Compress`
|
|
750
763
|
);
|
|
751
764
|
return proc ?? null;
|
|
752
765
|
}
|
|
@@ -782,10 +795,20 @@ function findWindowsHappyProcesses(processes) {
|
|
|
782
795
|
function toProcessSnapshot(proc) {
|
|
783
796
|
return {
|
|
784
797
|
pid: proc.pid,
|
|
798
|
+
ppid: "ppid" in proc && typeof proc.ppid === "number" ? proc.ppid : 0,
|
|
785
799
|
name: proc.name || "",
|
|
786
800
|
cmd: proc.cmd || ""
|
|
787
801
|
};
|
|
788
802
|
}
|
|
803
|
+
async function listProcessSnapshots() {
|
|
804
|
+
if (process.platform === "win32") {
|
|
805
|
+
const windowsProcesses = getWindowsProcessSnapshots();
|
|
806
|
+
if (windowsProcesses.length > 0) {
|
|
807
|
+
return windowsProcesses;
|
|
808
|
+
}
|
|
809
|
+
}
|
|
810
|
+
return (await psList()).map(toProcessSnapshot);
|
|
811
|
+
}
|
|
789
812
|
async function findHappyProcessByPid(pid) {
|
|
790
813
|
try {
|
|
791
814
|
if (process.platform === "win32") {
|
|
@@ -819,22 +842,13 @@ async function findHappyProcessByPid(pid) {
|
|
|
819
842
|
}
|
|
820
843
|
async function findAllHappyProcesses() {
|
|
821
844
|
try {
|
|
845
|
+
const processSnapshots = await listProcessSnapshots();
|
|
822
846
|
if (process.platform === "win32") {
|
|
823
|
-
|
|
824
|
-
if (windowsProcesses.length > 0) {
|
|
825
|
-
return findWindowsHappyProcesses(windowsProcesses);
|
|
826
|
-
}
|
|
827
|
-
const fallbackProcesses = (await psList()).map(toProcessSnapshot);
|
|
828
|
-
return findWindowsHappyProcesses(fallbackProcesses);
|
|
847
|
+
return findWindowsHappyProcesses(processSnapshots);
|
|
829
848
|
}
|
|
830
|
-
const processes = await psList();
|
|
831
849
|
const allProcesses = [];
|
|
832
|
-
for (const proc of
|
|
833
|
-
const match = classifyHappyProcess(
|
|
834
|
-
pid: proc.pid,
|
|
835
|
-
name: proc.name || "",
|
|
836
|
-
cmd: proc.cmd || ""
|
|
837
|
-
});
|
|
850
|
+
for (const proc of processSnapshots) {
|
|
851
|
+
const match = classifyHappyProcess(proc);
|
|
838
852
|
if (match) {
|
|
839
853
|
allProcesses.push(match);
|
|
840
854
|
}
|
|
@@ -845,9 +859,11 @@ async function findAllHappyProcesses() {
|
|
|
845
859
|
}
|
|
846
860
|
}
|
|
847
861
|
async function findRunawayHappyProcesses() {
|
|
848
|
-
const
|
|
862
|
+
const processSnapshots = await listProcessSnapshots();
|
|
863
|
+
const protectedPids = collectProtectedProcessIds(processSnapshots, process.pid, process.ppid);
|
|
864
|
+
const allProcesses = process.platform === "win32" ? findWindowsHappyProcesses(processSnapshots) : processSnapshots.map(classifyHappyProcess).filter((proc) => proc !== null);
|
|
849
865
|
return allProcesses.filter(
|
|
850
|
-
(p) => p.pid
|
|
866
|
+
(p) => !protectedPids.has(p.pid) && (p.type === "daemon" || p.type === "dev-daemon" || p.type === "daemon-spawned-session" || p.type === "dev-daemon-spawned" || p.type === "daemon-version-check" || p.type === "dev-daemon-version-check")
|
|
851
867
|
).map((p) => ({ pid: p.pid, command: p.command }));
|
|
852
868
|
}
|
|
853
869
|
async function killRunawayHappyProcesses() {
|
|
@@ -10353,7 +10369,7 @@ class AbortError extends Error {
|
|
|
10353
10369
|
}
|
|
10354
10370
|
}
|
|
10355
10371
|
|
|
10356
|
-
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-
|
|
10372
|
+
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-C2Iik0Ll.cjs', document.baseURI).href)));
|
|
10357
10373
|
const __dirname$1 = path.join(__filename$1, "..");
|
|
10358
10374
|
function getGlobalClaudeVersion() {
|
|
10359
10375
|
try {
|
|
@@ -11605,6 +11621,8 @@ const RAW_TO_CANONICAL_TOOL_NAME_LOOKUP = {
|
|
|
11605
11621
|
bash: "Bash",
|
|
11606
11622
|
shell: "Bash",
|
|
11607
11623
|
execute: "Bash",
|
|
11624
|
+
fetch: "WebFetch",
|
|
11625
|
+
search: "WebSearch",
|
|
11608
11626
|
claudebash: "Bash",
|
|
11609
11627
|
codexbash: "Bash",
|
|
11610
11628
|
geminibash: "Bash",
|
|
@@ -11676,14 +11694,14 @@ var launch = /*#__PURE__*/Object.freeze({
|
|
|
11676
11694
|
const unifiedProviderExecutors = {
|
|
11677
11695
|
claude: async (opts) => {
|
|
11678
11696
|
const claudeOptions = opts.claudeOptions ?? {};
|
|
11679
|
-
const { runClaude } = await Promise.resolve().then(function () { return require('./runClaude-
|
|
11697
|
+
const { runClaude } = await Promise.resolve().then(function () { return require('./runClaude-B8f7Ubkz.cjs'); });
|
|
11680
11698
|
await runClaude(opts.credentials, {
|
|
11681
11699
|
...claudeOptions,
|
|
11682
11700
|
startingMode: claudeOptions.startingMode ?? (claudeOptions.startedBy === "daemon" ? "remote" : void 0)
|
|
11683
11701
|
});
|
|
11684
11702
|
},
|
|
11685
11703
|
codex: async (opts) => {
|
|
11686
|
-
const { runCodex } = await Promise.resolve().then(function () { return require('./runCodex-
|
|
11704
|
+
const { runCodex } = await Promise.resolve().then(function () { return require('./runCodex-BJ4dyXhc.cjs'); });
|
|
11687
11705
|
await runCodex({
|
|
11688
11706
|
credentials: opts.credentials,
|
|
11689
11707
|
startedBy: opts.startedBy,
|
|
@@ -11692,7 +11710,7 @@ const unifiedProviderExecutors = {
|
|
|
11692
11710
|
});
|
|
11693
11711
|
},
|
|
11694
11712
|
gemini: async (opts) => {
|
|
11695
|
-
const { runGemini } = await Promise.resolve().then(function () { return require('./runGemini-
|
|
11713
|
+
const { runGemini } = await Promise.resolve().then(function () { return require('./runGemini-CUL3MiIx.cjs'); });
|
|
11696
11714
|
await runGemini({
|
|
11697
11715
|
credentials: opts.credentials,
|
|
11698
11716
|
startedBy: opts.startedBy
|
|
@@ -11775,7 +11793,7 @@ function shouldRunMainClaudeFlow(opts) {
|
|
|
11775
11793
|
return;
|
|
11776
11794
|
} else if (subcommand === "runtime") {
|
|
11777
11795
|
if (args[1] === "providers") {
|
|
11778
|
-
const { renderRuntimeProviders } = await Promise.resolve().then(function () { return require('./command-
|
|
11796
|
+
const { renderRuntimeProviders } = await Promise.resolve().then(function () { return require('./command-Ck_6hawr.cjs'); });
|
|
11779
11797
|
console.log(renderRuntimeProviders());
|
|
11780
11798
|
return;
|
|
11781
11799
|
}
|
|
@@ -11981,8 +11999,8 @@ function shouldRunMainClaudeFlow(opts) {
|
|
|
11981
11999
|
const projectId = args[3];
|
|
11982
12000
|
try {
|
|
11983
12001
|
const { saveGoogleCloudProjectToConfig } = await Promise.resolve().then(function () { return config; });
|
|
11984
|
-
const { readCredentials: readCredentials2 } = await Promise.resolve().then(function () { return require('./api-
|
|
11985
|
-
const { ApiClient: ApiClient2 } = await Promise.resolve().then(function () { return require('./api-
|
|
12002
|
+
const { readCredentials: readCredentials2 } = await Promise.resolve().then(function () { return require('./api-CcZmsHiN.cjs'); }).then(function (n) { return n.persistence; });
|
|
12003
|
+
const { ApiClient: ApiClient2 } = await Promise.resolve().then(function () { return require('./api-CcZmsHiN.cjs'); }).then(function (n) { return n.api; });
|
|
11986
12004
|
let userEmail = void 0;
|
|
11987
12005
|
try {
|
|
11988
12006
|
const credentials = await readCredentials2();
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import{createRequire as _pkgrollCR}from"node:module";const require=_pkgrollCR(import.meta.url);import chalk from 'chalk';
|
|
2
|
-
import { l as logger, m as encodeBase64, c as configuration, n as readCredentials, o as ensureSigningCredentials, r as readSettings, u as updateSettings, q as encodeBase64Url, j as delay, t as buildClientHeaders, v as decodeBase64, w as writeCredentialsLegacy, x as writeCredentialsDataKey, y as readDaemonState, z as HAPPY_CLOUD_DAEMON_PORT, B as clearDaemonState, C as packageJson, i as isAuthenticationRequiredError, D as acquireDaemonLock, E as writeDaemonState, A as ApiClient, F as releaseDaemonLock, G as validateProfileForAgent, I as getProfileEnvironmentVariables, J as clearCredentials, K as clearMachineId, L as readHappyOrgDispatchTruthSnapshot, M as processHappyOrgRepoRequests, N as HappyOrgTurnReportSchema, O as recordHappyOrgTurnReport, P as MessageContentSchema, Q as buildSocketAuth, R as encrypt, H as HeadTailPreviewBuffer, S as getLatestDaemonLog } from './api-
|
|
2
|
+
import { l as logger, m as encodeBase64, c as configuration, n as readCredentials, o as ensureSigningCredentials, r as readSettings, u as updateSettings, q as encodeBase64Url, j as delay, t as buildClientHeaders, v as decodeBase64, w as writeCredentialsLegacy, x as writeCredentialsDataKey, y as readDaemonState, z as HAPPY_CLOUD_DAEMON_PORT, B as clearDaemonState, C as packageJson, i as isAuthenticationRequiredError, D as acquireDaemonLock, E as writeDaemonState, A as ApiClient, F as releaseDaemonLock, G as validateProfileForAgent, I as getProfileEnvironmentVariables, J as clearCredentials, K as clearMachineId, L as readHappyOrgDispatchTruthSnapshot, M as processHappyOrgRepoRequests, N as HappyOrgTurnReportSchema, O as recordHappyOrgTurnReport, P as MessageContentSchema, Q as buildSocketAuth, R as encrypt, H as HeadTailPreviewBuffer, S as getLatestDaemonLog } from './api-CwMg_lJj.mjs';
|
|
3
3
|
import { z } from 'zod';
|
|
4
4
|
import fs, { writeFile as writeFile$1, rename, unlink as unlink$1 } from 'fs/promises';
|
|
5
5
|
import os$1, { homedir } from 'os';
|
|
@@ -675,6 +675,18 @@ function classifyHappyProcess(proc) {
|
|
|
675
675
|
}
|
|
676
676
|
return { pid: proc.pid, command: cmd || name, type };
|
|
677
677
|
}
|
|
678
|
+
function collectProtectedProcessIds(processes, currentPid, fallbackParentPid) {
|
|
679
|
+
const pidToProcess = new Map(processes.map((proc) => [proc.pid, proc]));
|
|
680
|
+
const protectedPids = /* @__PURE__ */ new Set([currentPid]);
|
|
681
|
+
const visited = /* @__PURE__ */ new Set();
|
|
682
|
+
let parentPid = pidToProcess.get(currentPid)?.ppid ?? fallbackParentPid;
|
|
683
|
+
while (Number.isInteger(parentPid) && parentPid > 0 && !visited.has(parentPid)) {
|
|
684
|
+
protectedPids.add(parentPid);
|
|
685
|
+
visited.add(parentPid);
|
|
686
|
+
parentPid = pidToProcess.get(parentPid)?.ppid ?? 0;
|
|
687
|
+
}
|
|
688
|
+
return protectedPids;
|
|
689
|
+
}
|
|
678
690
|
function parseWindowsProcessSnapshots(rawOutput) {
|
|
679
691
|
if (!rawOutput) {
|
|
680
692
|
return [];
|
|
@@ -688,6 +700,7 @@ function parseWindowsProcessSnapshots(rawOutput) {
|
|
|
688
700
|
const rows = Array.isArray(parsed) ? parsed : [parsed];
|
|
689
701
|
return rows.filter((row) => typeof row?.ProcessId === "number" && typeof row?.Name === "string").map((row) => ({
|
|
690
702
|
pid: row.ProcessId,
|
|
703
|
+
ppid: typeof row.ParentProcessId === "number" ? row.ParentProcessId : 0,
|
|
691
704
|
name: row.Name,
|
|
692
705
|
cmd: typeof row.CommandLine === "string" ? row.CommandLine : ""
|
|
693
706
|
}));
|
|
@@ -716,7 +729,7 @@ function runWindowsProcessSnapshotQuery(command) {
|
|
|
716
729
|
}
|
|
717
730
|
function getWindowsProcessSnapshots() {
|
|
718
731
|
return runWindowsProcessSnapshotQuery(
|
|
719
|
-
"Get-CimInstance Win32_Process | Select-Object ProcessId, Name, CommandLine | ConvertTo-Json -Compress"
|
|
732
|
+
"Get-CimInstance Win32_Process | Select-Object ProcessId, ParentProcessId, Name, CommandLine | ConvertTo-Json -Compress"
|
|
720
733
|
);
|
|
721
734
|
}
|
|
722
735
|
function getWindowsProcessSnapshotByPid(pid) {
|
|
@@ -724,7 +737,7 @@ function getWindowsProcessSnapshotByPid(pid) {
|
|
|
724
737
|
return null;
|
|
725
738
|
}
|
|
726
739
|
const [proc] = runWindowsProcessSnapshotQuery(
|
|
727
|
-
`Get-CimInstance Win32_Process -Filter "ProcessId = ${pid}" | Select-Object ProcessId, Name, CommandLine | ConvertTo-Json -Compress`
|
|
740
|
+
`Get-CimInstance Win32_Process -Filter "ProcessId = ${pid}" | Select-Object ProcessId, ParentProcessId, Name, CommandLine | ConvertTo-Json -Compress`
|
|
728
741
|
);
|
|
729
742
|
return proc ?? null;
|
|
730
743
|
}
|
|
@@ -760,10 +773,20 @@ function findWindowsHappyProcesses(processes) {
|
|
|
760
773
|
function toProcessSnapshot(proc) {
|
|
761
774
|
return {
|
|
762
775
|
pid: proc.pid,
|
|
776
|
+
ppid: "ppid" in proc && typeof proc.ppid === "number" ? proc.ppid : 0,
|
|
763
777
|
name: proc.name || "",
|
|
764
778
|
cmd: proc.cmd || ""
|
|
765
779
|
};
|
|
766
780
|
}
|
|
781
|
+
async function listProcessSnapshots() {
|
|
782
|
+
if (process.platform === "win32") {
|
|
783
|
+
const windowsProcesses = getWindowsProcessSnapshots();
|
|
784
|
+
if (windowsProcesses.length > 0) {
|
|
785
|
+
return windowsProcesses;
|
|
786
|
+
}
|
|
787
|
+
}
|
|
788
|
+
return (await psList()).map(toProcessSnapshot);
|
|
789
|
+
}
|
|
767
790
|
async function findHappyProcessByPid(pid) {
|
|
768
791
|
try {
|
|
769
792
|
if (process.platform === "win32") {
|
|
@@ -797,22 +820,13 @@ async function findHappyProcessByPid(pid) {
|
|
|
797
820
|
}
|
|
798
821
|
async function findAllHappyProcesses() {
|
|
799
822
|
try {
|
|
823
|
+
const processSnapshots = await listProcessSnapshots();
|
|
800
824
|
if (process.platform === "win32") {
|
|
801
|
-
|
|
802
|
-
if (windowsProcesses.length > 0) {
|
|
803
|
-
return findWindowsHappyProcesses(windowsProcesses);
|
|
804
|
-
}
|
|
805
|
-
const fallbackProcesses = (await psList()).map(toProcessSnapshot);
|
|
806
|
-
return findWindowsHappyProcesses(fallbackProcesses);
|
|
825
|
+
return findWindowsHappyProcesses(processSnapshots);
|
|
807
826
|
}
|
|
808
|
-
const processes = await psList();
|
|
809
827
|
const allProcesses = [];
|
|
810
|
-
for (const proc of
|
|
811
|
-
const match = classifyHappyProcess(
|
|
812
|
-
pid: proc.pid,
|
|
813
|
-
name: proc.name || "",
|
|
814
|
-
cmd: proc.cmd || ""
|
|
815
|
-
});
|
|
828
|
+
for (const proc of processSnapshots) {
|
|
829
|
+
const match = classifyHappyProcess(proc);
|
|
816
830
|
if (match) {
|
|
817
831
|
allProcesses.push(match);
|
|
818
832
|
}
|
|
@@ -823,9 +837,11 @@ async function findAllHappyProcesses() {
|
|
|
823
837
|
}
|
|
824
838
|
}
|
|
825
839
|
async function findRunawayHappyProcesses() {
|
|
826
|
-
const
|
|
840
|
+
const processSnapshots = await listProcessSnapshots();
|
|
841
|
+
const protectedPids = collectProtectedProcessIds(processSnapshots, process.pid, process.ppid);
|
|
842
|
+
const allProcesses = process.platform === "win32" ? findWindowsHappyProcesses(processSnapshots) : processSnapshots.map(classifyHappyProcess).filter((proc) => proc !== null);
|
|
827
843
|
return allProcesses.filter(
|
|
828
|
-
(p) => p.pid
|
|
844
|
+
(p) => !protectedPids.has(p.pid) && (p.type === "daemon" || p.type === "dev-daemon" || p.type === "daemon-spawned-session" || p.type === "dev-daemon-spawned" || p.type === "daemon-version-check" || p.type === "dev-daemon-version-check")
|
|
829
845
|
).map((p) => ({ pid: p.pid, command: p.command }));
|
|
830
846
|
}
|
|
831
847
|
async function killRunawayHappyProcesses() {
|
|
@@ -11583,6 +11599,8 @@ const RAW_TO_CANONICAL_TOOL_NAME_LOOKUP = {
|
|
|
11583
11599
|
bash: "Bash",
|
|
11584
11600
|
shell: "Bash",
|
|
11585
11601
|
execute: "Bash",
|
|
11602
|
+
fetch: "WebFetch",
|
|
11603
|
+
search: "WebSearch",
|
|
11586
11604
|
claudebash: "Bash",
|
|
11587
11605
|
codexbash: "Bash",
|
|
11588
11606
|
geminibash: "Bash",
|
|
@@ -11654,14 +11672,14 @@ var launch = /*#__PURE__*/Object.freeze({
|
|
|
11654
11672
|
const unifiedProviderExecutors = {
|
|
11655
11673
|
claude: async (opts) => {
|
|
11656
11674
|
const claudeOptions = opts.claudeOptions ?? {};
|
|
11657
|
-
const { runClaude } = await import('./runClaude-
|
|
11675
|
+
const { runClaude } = await import('./runClaude-C0QTsf0B.mjs');
|
|
11658
11676
|
await runClaude(opts.credentials, {
|
|
11659
11677
|
...claudeOptions,
|
|
11660
11678
|
startingMode: claudeOptions.startingMode ?? (claudeOptions.startedBy === "daemon" ? "remote" : void 0)
|
|
11661
11679
|
});
|
|
11662
11680
|
},
|
|
11663
11681
|
codex: async (opts) => {
|
|
11664
|
-
const { runCodex } = await import('./runCodex-
|
|
11682
|
+
const { runCodex } = await import('./runCodex-BOfihUE0.mjs');
|
|
11665
11683
|
await runCodex({
|
|
11666
11684
|
credentials: opts.credentials,
|
|
11667
11685
|
startedBy: opts.startedBy,
|
|
@@ -11670,7 +11688,7 @@ const unifiedProviderExecutors = {
|
|
|
11670
11688
|
});
|
|
11671
11689
|
},
|
|
11672
11690
|
gemini: async (opts) => {
|
|
11673
|
-
const { runGemini } = await import('./runGemini-
|
|
11691
|
+
const { runGemini } = await import('./runGemini-CBMJT1Fe.mjs');
|
|
11674
11692
|
await runGemini({
|
|
11675
11693
|
credentials: opts.credentials,
|
|
11676
11694
|
startedBy: opts.startedBy
|
|
@@ -11753,7 +11771,7 @@ function shouldRunMainClaudeFlow(opts) {
|
|
|
11753
11771
|
return;
|
|
11754
11772
|
} else if (subcommand === "runtime") {
|
|
11755
11773
|
if (args[1] === "providers") {
|
|
11756
|
-
const { renderRuntimeProviders } = await import('./command-
|
|
11774
|
+
const { renderRuntimeProviders } = await import('./command-DcqLvk6w.mjs');
|
|
11757
11775
|
console.log(renderRuntimeProviders());
|
|
11758
11776
|
return;
|
|
11759
11777
|
}
|
|
@@ -11959,8 +11977,8 @@ function shouldRunMainClaudeFlow(opts) {
|
|
|
11959
11977
|
const projectId = args[3];
|
|
11960
11978
|
try {
|
|
11961
11979
|
const { saveGoogleCloudProjectToConfig } = await Promise.resolve().then(function () { return config; });
|
|
11962
|
-
const { readCredentials: readCredentials2 } = await import('./api-
|
|
11963
|
-
const { ApiClient: ApiClient2 } = await import('./api-
|
|
11980
|
+
const { readCredentials: readCredentials2 } = await import('./api-CwMg_lJj.mjs').then(function (n) { return n.T; });
|
|
11981
|
+
const { ApiClient: ApiClient2 } = await import('./api-CwMg_lJj.mjs').then(function (n) { return n.U; });
|
|
11964
11982
|
let userEmail = void 0;
|
|
11965
11983
|
try {
|
|
11966
11984
|
const credentials = await readCredentials2();
|
package/dist/index.cjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
require('chalk');
|
|
4
|
-
require('./api-
|
|
4
|
+
require('./api-CcZmsHiN.cjs');
|
|
5
5
|
require('zod');
|
|
6
|
-
require('./index-
|
|
6
|
+
require('./index-C2Iik0Ll.cjs');
|
|
7
7
|
require('node:child_process');
|
|
8
8
|
require('node:fs');
|
|
9
9
|
require('cross-spawn');
|
package/dist/index.mjs
CHANGED
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-CwMg_lJj.mjs';
|
|
2
2
|
export { R as RawJSONLinesSchema } from './types-CiliQpqS.mjs';
|
|
3
3
|
import 'axios';
|
|
4
4
|
import 'chalk';
|
package/dist/{registerKillSessionHandler-Dmm6gsoz.mjs → registerKillSessionHandler-CjK9IoDq.mjs}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { k as initialMachineMetadata, R as RuntimeShell, f as formatDisplayMessage, l as resolveCanonicalToolNameV2 } from './index-
|
|
2
|
-
import { r as readSettings, H as HeadTailPreviewBuffer, d as HAPPY_ORG_REPLY_ACK_VERSION, e as HAPPY_ORG_TURN_REPORT_TAG, f as HAPPY_ORG_SUMMARY_MAX_LENGTH, g as HAPPY_ORG_REPEAT_THRESHOLD, l as logger } from './api-
|
|
1
|
+
import { k as initialMachineMetadata, R as RuntimeShell, f as formatDisplayMessage, l as resolveCanonicalToolNameV2 } from './index-DGHeJuUL.mjs';
|
|
2
|
+
import { r as readSettings, H as HeadTailPreviewBuffer, d as HAPPY_ORG_REPLY_ACK_VERSION, e as HAPPY_ORG_TURN_REPORT_TAG, f as HAPPY_ORG_SUMMARY_MAX_LENGTH, g as HAPPY_ORG_REPEAT_THRESHOLD, l as logger } from './api-CwMg_lJj.mjs';
|
|
3
3
|
import { randomUUID } from 'node:crypto';
|
|
4
4
|
import { basename } from 'node:path';
|
|
5
5
|
import { createHash } from 'crypto';
|
|
@@ -134,23 +134,73 @@ function extractNestedTextContent(value) {
|
|
|
134
134
|
}
|
|
135
135
|
return null;
|
|
136
136
|
}
|
|
137
|
+
function humanizeToolLabel(rawToolName) {
|
|
138
|
+
const canonicalToolName = resolveCanonicalToolNameV2(rawToolName);
|
|
139
|
+
const spaced = canonicalToolName.replace(/_/g, " ").replace(/([a-z0-9])([A-Z])/g, "$1 $2").trim();
|
|
140
|
+
if (!spaced) {
|
|
141
|
+
return "Tool";
|
|
142
|
+
}
|
|
143
|
+
return spaced.charAt(0).toUpperCase() + spaced.slice(1).toLowerCase();
|
|
144
|
+
}
|
|
145
|
+
function isToolLifecycleResult(value) {
|
|
146
|
+
if (!isRecord(value)) {
|
|
147
|
+
return false;
|
|
148
|
+
}
|
|
149
|
+
return typeof value.state === "string" && ("messages" in value || "description" in value || "createdAt" in value || "startedAt" in value || "completedAt" in value);
|
|
150
|
+
}
|
|
151
|
+
function buildToolLifecycleText(rawToolName, value) {
|
|
152
|
+
const messagesText = extractNestedTextContent(value.messages);
|
|
153
|
+
if (messagesText) {
|
|
154
|
+
return messagesText;
|
|
155
|
+
}
|
|
156
|
+
if (typeof value.description === "string" && value.description.trim().length > 0) {
|
|
157
|
+
return value.description.trim();
|
|
158
|
+
}
|
|
159
|
+
const state = typeof value.state === "string" ? value.state.trim() : "";
|
|
160
|
+
if (!state) {
|
|
161
|
+
return null;
|
|
162
|
+
}
|
|
163
|
+
const normalizedState = state.replace(/[_-]+/g, " ").trim().toLowerCase();
|
|
164
|
+
if (!normalizedState) {
|
|
165
|
+
return null;
|
|
166
|
+
}
|
|
167
|
+
return `${humanizeToolLabel(rawToolName)} ${normalizedState}.`;
|
|
168
|
+
}
|
|
169
|
+
function normalizeCodexLifecyclePayload(rawToolName, value) {
|
|
170
|
+
if (!isToolLifecycleResult(value)) {
|
|
171
|
+
return value;
|
|
172
|
+
}
|
|
173
|
+
const hasDisplayFriendlyField = DISPLAY_FRIENDLY_TOOL_FIELDS.some((field) => field in value);
|
|
174
|
+
if (hasDisplayFriendlyField) {
|
|
175
|
+
return value;
|
|
176
|
+
}
|
|
177
|
+
const text = buildToolLifecycleText(rawToolName, value);
|
|
178
|
+
if (!text) {
|
|
179
|
+
return value;
|
|
180
|
+
}
|
|
181
|
+
return {
|
|
182
|
+
...value,
|
|
183
|
+
text
|
|
184
|
+
};
|
|
185
|
+
}
|
|
137
186
|
function normalizeCodexToolInput(value) {
|
|
138
187
|
return stripInternalToolMeta(value);
|
|
139
188
|
}
|
|
140
|
-
function normalizeCodexToolOutput(value) {
|
|
189
|
+
function normalizeCodexToolOutput(rawToolName, value) {
|
|
141
190
|
const sanitized = stripInternalToolMeta(value);
|
|
142
|
-
|
|
143
|
-
|
|
191
|
+
const normalizedLifecyclePayload = normalizeCodexLifecyclePayload(rawToolName, sanitized);
|
|
192
|
+
if (!isRecord(normalizedLifecyclePayload)) {
|
|
193
|
+
return normalizedLifecyclePayload;
|
|
144
194
|
}
|
|
145
|
-
const hasDisplayFriendlyField = DISPLAY_FRIENDLY_TOOL_FIELDS.some((field) => field in
|
|
146
|
-
if (hasDisplayFriendlyField || !("content" in
|
|
147
|
-
return
|
|
195
|
+
const hasDisplayFriendlyField = DISPLAY_FRIENDLY_TOOL_FIELDS.some((field) => field in normalizedLifecyclePayload);
|
|
196
|
+
if (hasDisplayFriendlyField || !("content" in normalizedLifecyclePayload)) {
|
|
197
|
+
return normalizedLifecyclePayload;
|
|
148
198
|
}
|
|
149
|
-
const flattenedText = extractNestedTextContent(
|
|
199
|
+
const flattenedText = extractNestedTextContent(normalizedLifecyclePayload.content);
|
|
150
200
|
if (!flattenedText) {
|
|
151
|
-
return
|
|
201
|
+
return normalizedLifecyclePayload;
|
|
152
202
|
}
|
|
153
|
-
const { content: _content, ...rest } =
|
|
203
|
+
const { content: _content, ...rest } = normalizedLifecyclePayload;
|
|
154
204
|
return {
|
|
155
205
|
...rest,
|
|
156
206
|
text: flattenedText
|
|
@@ -220,7 +270,7 @@ function prepareToolInput(provider, rawToolName, value) {
|
|
|
220
270
|
}
|
|
221
271
|
function prepareToolOutput(provider, rawToolName, value) {
|
|
222
272
|
const enriched = attachToolMeta(provider, rawToolName, value);
|
|
223
|
-
const normalized = provider === "codex" ? normalizeCodexToolOutput(enriched) : enriched;
|
|
273
|
+
const normalized = provider === "codex" ? normalizeCodexToolOutput(rawToolName, enriched) : enriched;
|
|
224
274
|
return truncateProviderOutputValue(normalized, "tool output");
|
|
225
275
|
}
|
|
226
276
|
function hasDisplayPayload(value) {
|
|
@@ -240,7 +290,7 @@ function hasDisplayPayload(value) {
|
|
|
240
290
|
return true;
|
|
241
291
|
}
|
|
242
292
|
function shouldDropContentlessFetchTrace(rawToolName, payload) {
|
|
243
|
-
return
|
|
293
|
+
return resolveCanonicalToolNameV2(rawToolName) === "WebFetch" && !hasDisplayPayload(payload);
|
|
244
294
|
}
|
|
245
295
|
function forwardAgentMessageToProviderSession(msg, options) {
|
|
246
296
|
const createId = options.createId ?? randomUUID;
|
package/dist/{registerKillSessionHandler-7bLVg5RG.cjs → registerKillSessionHandler-DMxV6Ke6.cjs}
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
4
|
-
var persistence = require('./api-
|
|
3
|
+
var index = require('./index-C2Iik0Ll.cjs');
|
|
4
|
+
var persistence = require('./api-CcZmsHiN.cjs');
|
|
5
5
|
var node_crypto = require('node:crypto');
|
|
6
6
|
var path = require('node:path');
|
|
7
7
|
var crypto = require('crypto');
|
|
@@ -136,23 +136,73 @@ function extractNestedTextContent(value) {
|
|
|
136
136
|
}
|
|
137
137
|
return null;
|
|
138
138
|
}
|
|
139
|
+
function humanizeToolLabel(rawToolName) {
|
|
140
|
+
const canonicalToolName = index.resolveCanonicalToolNameV2(rawToolName);
|
|
141
|
+
const spaced = canonicalToolName.replace(/_/g, " ").replace(/([a-z0-9])([A-Z])/g, "$1 $2").trim();
|
|
142
|
+
if (!spaced) {
|
|
143
|
+
return "Tool";
|
|
144
|
+
}
|
|
145
|
+
return spaced.charAt(0).toUpperCase() + spaced.slice(1).toLowerCase();
|
|
146
|
+
}
|
|
147
|
+
function isToolLifecycleResult(value) {
|
|
148
|
+
if (!isRecord(value)) {
|
|
149
|
+
return false;
|
|
150
|
+
}
|
|
151
|
+
return typeof value.state === "string" && ("messages" in value || "description" in value || "createdAt" in value || "startedAt" in value || "completedAt" in value);
|
|
152
|
+
}
|
|
153
|
+
function buildToolLifecycleText(rawToolName, value) {
|
|
154
|
+
const messagesText = extractNestedTextContent(value.messages);
|
|
155
|
+
if (messagesText) {
|
|
156
|
+
return messagesText;
|
|
157
|
+
}
|
|
158
|
+
if (typeof value.description === "string" && value.description.trim().length > 0) {
|
|
159
|
+
return value.description.trim();
|
|
160
|
+
}
|
|
161
|
+
const state = typeof value.state === "string" ? value.state.trim() : "";
|
|
162
|
+
if (!state) {
|
|
163
|
+
return null;
|
|
164
|
+
}
|
|
165
|
+
const normalizedState = state.replace(/[_-]+/g, " ").trim().toLowerCase();
|
|
166
|
+
if (!normalizedState) {
|
|
167
|
+
return null;
|
|
168
|
+
}
|
|
169
|
+
return `${humanizeToolLabel(rawToolName)} ${normalizedState}.`;
|
|
170
|
+
}
|
|
171
|
+
function normalizeCodexLifecyclePayload(rawToolName, value) {
|
|
172
|
+
if (!isToolLifecycleResult(value)) {
|
|
173
|
+
return value;
|
|
174
|
+
}
|
|
175
|
+
const hasDisplayFriendlyField = DISPLAY_FRIENDLY_TOOL_FIELDS.some((field) => field in value);
|
|
176
|
+
if (hasDisplayFriendlyField) {
|
|
177
|
+
return value;
|
|
178
|
+
}
|
|
179
|
+
const text = buildToolLifecycleText(rawToolName, value);
|
|
180
|
+
if (!text) {
|
|
181
|
+
return value;
|
|
182
|
+
}
|
|
183
|
+
return {
|
|
184
|
+
...value,
|
|
185
|
+
text
|
|
186
|
+
};
|
|
187
|
+
}
|
|
139
188
|
function normalizeCodexToolInput(value) {
|
|
140
189
|
return stripInternalToolMeta(value);
|
|
141
190
|
}
|
|
142
|
-
function normalizeCodexToolOutput(value) {
|
|
191
|
+
function normalizeCodexToolOutput(rawToolName, value) {
|
|
143
192
|
const sanitized = stripInternalToolMeta(value);
|
|
144
|
-
|
|
145
|
-
|
|
193
|
+
const normalizedLifecyclePayload = normalizeCodexLifecyclePayload(rawToolName, sanitized);
|
|
194
|
+
if (!isRecord(normalizedLifecyclePayload)) {
|
|
195
|
+
return normalizedLifecyclePayload;
|
|
146
196
|
}
|
|
147
|
-
const hasDisplayFriendlyField = DISPLAY_FRIENDLY_TOOL_FIELDS.some((field) => field in
|
|
148
|
-
if (hasDisplayFriendlyField || !("content" in
|
|
149
|
-
return
|
|
197
|
+
const hasDisplayFriendlyField = DISPLAY_FRIENDLY_TOOL_FIELDS.some((field) => field in normalizedLifecyclePayload);
|
|
198
|
+
if (hasDisplayFriendlyField || !("content" in normalizedLifecyclePayload)) {
|
|
199
|
+
return normalizedLifecyclePayload;
|
|
150
200
|
}
|
|
151
|
-
const flattenedText = extractNestedTextContent(
|
|
201
|
+
const flattenedText = extractNestedTextContent(normalizedLifecyclePayload.content);
|
|
152
202
|
if (!flattenedText) {
|
|
153
|
-
return
|
|
203
|
+
return normalizedLifecyclePayload;
|
|
154
204
|
}
|
|
155
|
-
const { content: _content, ...rest } =
|
|
205
|
+
const { content: _content, ...rest } = normalizedLifecyclePayload;
|
|
156
206
|
return {
|
|
157
207
|
...rest,
|
|
158
208
|
text: flattenedText
|
|
@@ -222,7 +272,7 @@ function prepareToolInput(provider, rawToolName, value) {
|
|
|
222
272
|
}
|
|
223
273
|
function prepareToolOutput(provider, rawToolName, value) {
|
|
224
274
|
const enriched = attachToolMeta(provider, rawToolName, value);
|
|
225
|
-
const normalized = provider === "codex" ? normalizeCodexToolOutput(enriched) : enriched;
|
|
275
|
+
const normalized = provider === "codex" ? normalizeCodexToolOutput(rawToolName, enriched) : enriched;
|
|
226
276
|
return truncateProviderOutputValue(normalized, "tool output");
|
|
227
277
|
}
|
|
228
278
|
function hasDisplayPayload(value) {
|
|
@@ -242,7 +292,7 @@ function hasDisplayPayload(value) {
|
|
|
242
292
|
return true;
|
|
243
293
|
}
|
|
244
294
|
function shouldDropContentlessFetchTrace(rawToolName, payload) {
|
|
245
|
-
return
|
|
295
|
+
return index.resolveCanonicalToolNameV2(rawToolName) === "WebFetch" && !hasDisplayPayload(payload);
|
|
246
296
|
}
|
|
247
297
|
function forwardAgentMessageToProviderSession(msg, options) {
|
|
248
298
|
const createId = options.createId ?? node_crypto.randomUUID;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var node_crypto = require('node:crypto');
|
|
4
|
-
var persistence = require('./api-
|
|
4
|
+
var persistence = require('./api-CcZmsHiN.cjs');
|
|
5
5
|
require('cross-spawn');
|
|
6
6
|
require('@agentclientprotocol/sdk');
|
|
7
|
-
var index = require('./index-
|
|
7
|
+
var index = require('./index-C2Iik0Ll.cjs');
|
|
8
8
|
require('ps-list');
|
|
9
9
|
require('fs');
|
|
10
10
|
require('path');
|
|
@@ -25,9 +25,9 @@ require('tweetnacl');
|
|
|
25
25
|
require('open');
|
|
26
26
|
var React = require('react');
|
|
27
27
|
var ink = require('ink');
|
|
28
|
-
var ProviderSelectionHandler = require('./ProviderSelectionHandler-
|
|
28
|
+
var ProviderSelectionHandler = require('./ProviderSelectionHandler-CBX_NP1Q.cjs');
|
|
29
29
|
var types = require('./types-DVk3crez.cjs');
|
|
30
|
-
var registerKillSessionHandler = require('./registerKillSessionHandler-
|
|
30
|
+
var registerKillSessionHandler = require('./registerKillSessionHandler-DMxV6Ke6.cjs');
|
|
31
31
|
require('socket.io-client');
|
|
32
32
|
require('expo-server-sdk');
|
|
33
33
|
var node_util = require('node:util');
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { randomUUID } from 'node:crypto';
|
|
2
|
-
import { l as logger, h as backoff, j as delay, k as AsyncLock, c as configuration, s as startOfflineReconnection, b as connectionState, A as ApiClient, i as isAuthenticationRequiredError } from './api-
|
|
2
|
+
import { l as logger, h as backoff, j as delay, k as AsyncLock, c as configuration, s as startOfflineReconnection, b as connectionState, A as ApiClient, i as isAuthenticationRequiredError } from './api-CwMg_lJj.mjs';
|
|
3
3
|
import 'cross-spawn';
|
|
4
4
|
import '@agentclientprotocol/sdk';
|
|
5
|
-
import { m as getProjectPath, F as Future, n as claudeLocal, E as ExitCodeError, o as trimIdent, q as createClaudeBackend, f as formatDisplayMessage, t as truncateDisplayMessage, u as claudeCheckSession, w as projectPath, x as mapToClaudeMode, P as PushableAsyncIterable, y as query, A as AbortError, e as stopCaffeinate, p as publishSessionRegistration, z as getEnvironmentInfo, a as createSessionMetadata, B as startCaffeinate, b as closeProviderSession } from './index-
|
|
5
|
+
import { m as getProjectPath, F as Future, n as claudeLocal, E as ExitCodeError, o as trimIdent, q as createClaudeBackend, f as formatDisplayMessage, t as truncateDisplayMessage, u as claudeCheckSession, w as projectPath, x as mapToClaudeMode, P as PushableAsyncIterable, y as query, A as AbortError, e as stopCaffeinate, p as publishSessionRegistration, z as getEnvironmentInfo, a as createSessionMetadata, B as startCaffeinate, b as closeProviderSession } from './index-DGHeJuUL.mjs';
|
|
6
6
|
import 'ps-list';
|
|
7
7
|
import 'fs';
|
|
8
8
|
import 'path';
|
|
@@ -23,9 +23,9 @@ import 'tweetnacl';
|
|
|
23
23
|
import 'open';
|
|
24
24
|
import React, { useState, useRef, useEffect, useCallback } from 'react';
|
|
25
25
|
import { useStdout, useInput, Box, Text, render } from 'ink';
|
|
26
|
-
import { c as createKeepAliveController, P as ProviderSelectionHandler, r as runModeLoop } from './ProviderSelectionHandler-
|
|
26
|
+
import { c as createKeepAliveController, P as ProviderSelectionHandler, r as runModeLoop } from './ProviderSelectionHandler-B9vjBTyM.mjs';
|
|
27
27
|
import { R as RawJSONLinesSchema } from './types-CiliQpqS.mjs';
|
|
28
|
-
import { B as BasePermissionHandler, d as MessageBuffer, C as ConversationHistory$1, f as buildHappyOrgTurnPrompt, w as waitForResponseCompleteWithAbort, i as finalizeHappyOrgTurnWithBusinessAck, l as launchRuntimeHandleWithFactoryResult, j as renderOutputPreview, m as forwardAgentMessageToProviderSession, s as syncControlledByUserState, r as resolveHappyOrgQueuedTurn, e as ensureManagedProviderMachine, M as MissingMachineIdError, b as MessageQueue2, h as hashObject, c as registerKillSessionHandler } from './registerKillSessionHandler-
|
|
28
|
+
import { B as BasePermissionHandler, d as MessageBuffer, C as ConversationHistory$1, f as buildHappyOrgTurnPrompt, w as waitForResponseCompleteWithAbort, i as finalizeHappyOrgTurnWithBusinessAck, l as launchRuntimeHandleWithFactoryResult, j as renderOutputPreview, m as forwardAgentMessageToProviderSession, s as syncControlledByUserState, r as resolveHappyOrgQueuedTurn, e as ensureManagedProviderMachine, M as MissingMachineIdError, b as MessageQueue2, h as hashObject, c as registerKillSessionHandler } from './registerKillSessionHandler-CjK9IoDq.mjs';
|
|
29
29
|
import 'socket.io-client';
|
|
30
30
|
import 'expo-server-sdk';
|
|
31
31
|
import { isDeepStrictEqual } from 'node:util';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var persistence = require('./api-
|
|
4
|
-
var registerKillSessionHandler = require('./registerKillSessionHandler-
|
|
5
|
-
var index = require('./index-
|
|
3
|
+
var persistence = require('./api-CcZmsHiN.cjs');
|
|
4
|
+
var registerKillSessionHandler = require('./registerKillSessionHandler-DMxV6Ke6.cjs');
|
|
5
|
+
var index = require('./index-C2Iik0Ll.cjs');
|
|
6
6
|
require('cross-spawn');
|
|
7
7
|
require('@agentclientprotocol/sdk');
|
|
8
8
|
var node_crypto = require('node:crypto');
|
|
@@ -26,8 +26,8 @@ require('tweetnacl');
|
|
|
26
26
|
require('open');
|
|
27
27
|
var React = require('react');
|
|
28
28
|
var ink = require('ink');
|
|
29
|
-
var ProviderSelectionHandler = require('./ProviderSelectionHandler-
|
|
30
|
-
var BaseReasoningProcessor = require('./BaseReasoningProcessor-
|
|
29
|
+
var ProviderSelectionHandler = require('./ProviderSelectionHandler-CBX_NP1Q.cjs');
|
|
30
|
+
var BaseReasoningProcessor = require('./BaseReasoningProcessor-CwT7JhxJ.cjs');
|
|
31
31
|
require('zod');
|
|
32
32
|
require('socket.io-client');
|
|
33
33
|
require('expo-server-sdk');
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { p as preserveSessionRuntimeMetadata, l as logger, b as connectionState, A as ApiClient } from './api-
|
|
2
|
-
import { B as BasePermissionHandler, h as hashObject, d as MessageBuffer, C as ConversationHistory$1, f as buildHappyOrgTurnPrompt, w as waitForResponseCompleteWithAbort, i as finalizeHappyOrgTurnWithBusinessAck, c as registerKillSessionHandler, l as launchRuntimeHandleWithFactoryResult, j as renderOutputPreview, k as inferToolResultError, m as forwardAgentMessageToProviderSession, e as ensureManagedProviderMachine, M as MissingMachineIdError, b as MessageQueue2, r as resolveHappyOrgQueuedTurn, s as syncControlledByUserState } from './registerKillSessionHandler-
|
|
3
|
-
import { f as formatDisplayMessage, v as validateCodexAcpSpawn, h as createCodexBackend, t as truncateDisplayMessage, b as closeProviderSession, e as stopCaffeinate, i as readManagedSessionTag, j as resolveManagedSessionTag } from './index-
|
|
1
|
+
import { p as preserveSessionRuntimeMetadata, l as logger, b as connectionState, A as ApiClient } from './api-CwMg_lJj.mjs';
|
|
2
|
+
import { B as BasePermissionHandler, h as hashObject, d as MessageBuffer, C as ConversationHistory$1, f as buildHappyOrgTurnPrompt, w as waitForResponseCompleteWithAbort, i as finalizeHappyOrgTurnWithBusinessAck, c as registerKillSessionHandler, l as launchRuntimeHandleWithFactoryResult, j as renderOutputPreview, k as inferToolResultError, m as forwardAgentMessageToProviderSession, e as ensureManagedProviderMachine, M as MissingMachineIdError, b as MessageQueue2, r as resolveHappyOrgQueuedTurn, s as syncControlledByUserState } from './registerKillSessionHandler-CjK9IoDq.mjs';
|
|
3
|
+
import { f as formatDisplayMessage, v as validateCodexAcpSpawn, h as createCodexBackend, t as truncateDisplayMessage, b as closeProviderSession, e as stopCaffeinate, i as readManagedSessionTag, j as resolveManagedSessionTag } from './index-DGHeJuUL.mjs';
|
|
4
4
|
import 'cross-spawn';
|
|
5
5
|
import '@agentclientprotocol/sdk';
|
|
6
6
|
import { randomUUID } from 'node:crypto';
|
|
@@ -24,8 +24,8 @@ 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-
|
|
28
|
-
import { B as BaseReasoningProcessor, b as bootstrapManagedProviderSession } from './BaseReasoningProcessor-
|
|
27
|
+
import { c as createKeepAliveController, P as ProviderSelectionHandler, r as runModeLoop } from './ProviderSelectionHandler-B9vjBTyM.mjs';
|
|
28
|
+
import { B as BaseReasoningProcessor, b as bootstrapManagedProviderSession } from './BaseReasoningProcessor-fYtbWsiE.mjs';
|
|
29
29
|
import 'zod';
|
|
30
30
|
import 'socket.io-client';
|
|
31
31
|
import 'expo-server-sdk';
|
|
@@ -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, r as resolveHappyOrgQueuedTurn, e as ensureManagedProviderMachine, M as MissingMachineIdError, s as syncControlledByUserState, b as MessageQueue2, h as hashObject, c as registerKillSessionHandler, d as MessageBuffer, f as buildHappyOrgTurnPrompt, w as waitForResponseCompleteWithAbort, i as finalizeHappyOrgTurnWithBusinessAck, l as launchRuntimeHandleWithFactoryResult, j as renderOutputPreview, k as inferToolResultError, m as forwardAgentMessageToProviderSession } from './registerKillSessionHandler-
|
|
6
|
-
import { g as getInitialGeminiModel, r as readGeminiLocalConfig, G as GEMINI_MODEL_ENV, b as closeProviderSession, s as saveGeminiModelToConfig, d as createGeminiBackend, e 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-CwMg_lJj.mjs';
|
|
5
|
+
import { B as BasePermissionHandler, C as ConversationHistory$1, r as resolveHappyOrgQueuedTurn, e as ensureManagedProviderMachine, M as MissingMachineIdError, s as syncControlledByUserState, b as MessageQueue2, h as hashObject, c as registerKillSessionHandler, d as MessageBuffer, f as buildHappyOrgTurnPrompt, w as waitForResponseCompleteWithAbort, i as finalizeHappyOrgTurnWithBusinessAck, l as launchRuntimeHandleWithFactoryResult, j as renderOutputPreview, k as inferToolResultError, m as forwardAgentMessageToProviderSession } from './registerKillSessionHandler-CjK9IoDq.mjs';
|
|
6
|
+
import { g as getInitialGeminiModel, r as readGeminiLocalConfig, G as GEMINI_MODEL_ENV, b as closeProviderSession, s as saveGeminiModelToConfig, d as createGeminiBackend, e as stopCaffeinate } from './index-DGHeJuUL.mjs';
|
|
7
|
+
import { B as BaseReasoningProcessor, b as bootstrapManagedProviderSession } from './BaseReasoningProcessor-fYtbWsiE.mjs';
|
|
8
8
|
import 'cross-spawn';
|
|
9
9
|
import '@agentclientprotocol/sdk';
|
|
10
10
|
import 'ps-list';
|
|
@@ -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 persistence = require('./api-
|
|
7
|
-
var registerKillSessionHandler = require('./registerKillSessionHandler-
|
|
8
|
-
var index = require('./index-
|
|
9
|
-
var BaseReasoningProcessor = require('./BaseReasoningProcessor-
|
|
6
|
+
var persistence = require('./api-CcZmsHiN.cjs');
|
|
7
|
+
var registerKillSessionHandler = require('./registerKillSessionHandler-DMxV6Ke6.cjs');
|
|
8
|
+
var index = require('./index-C2Iik0Ll.cjs');
|
|
9
|
+
var BaseReasoningProcessor = require('./BaseReasoningProcessor-CwT7JhxJ.cjs');
|
|
10
10
|
require('cross-spawn');
|
|
11
11
|
require('@agentclientprotocol/sdk');
|
|
12
12
|
require('ps-list');
|