very-happy-cli 0.2.176 → 0.2.178
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/{AcpBackend-9_ZI1Bv3.cjs → AcpBackend-CDkAQXYf.cjs} +188 -37
- package/dist/{AcpBackend-COp6D8gl.mjs → AcpBackend-DCQXHRzT.mjs} +187 -38
- package/dist/{AcpSessionManager-DykjzBM4.mjs → AcpSessionManager-BXrQcqwC.mjs} +1 -1
- package/dist/{AcpSessionManager-CjdJLofq.cjs → AcpSessionManager-DckmUZza.cjs} +1 -1
- package/dist/{BasePermissionHandler-ChMkmsGD.mjs → BasePermissionHandler-BVlrEhIi.mjs} +1 -1
- package/dist/{BasePermissionHandler-DPvLN7aR.cjs → BasePermissionHandler-DyLmKKtO.cjs} +1 -1
- package/dist/{agentHome-D61ZMLXM.mjs → agentHome-C1xi37as.mjs} +5 -5
- package/dist/{agentHome-BKi7tsE9.cjs → agentHome-CEp9RMyK.cjs} +5 -5
- package/dist/{api-CbwDDXJt.mjs → api-Dib0dmqC.mjs} +19 -12
- package/dist/{api-Buc_ejoA.cjs → api-JANhFdZV.cjs} +18 -11
- package/dist/{apiMachine-CS7t3Rg-.mjs → apiMachine-DNTJidYH.mjs} +26 -16
- package/dist/{apiMachine--PXoXwKq.cjs → apiMachine-QhK-sKcr.cjs} +25 -15
- package/dist/{attachmentContent-BQYc8KpE.mjs → attachmentContent-DkkdpSSJ.mjs} +2 -2
- package/dist/{attachmentContent-CFzzTeV9.cjs → attachmentContent-bpQTBJ0y.cjs} +2 -2
- package/dist/{attachmentLimits-DtFqqiwR.cjs → attachmentLimits-SqeAHrVC.cjs} +1 -1
- package/dist/{attachmentLimits-Di1Z93lN.mjs → attachmentLimits-UyFn8fkQ.mjs} +1 -1
- package/dist/{auth-B3xMoveE.mjs → auth-BRjd2esb.mjs} +6 -6
- package/dist/{auth-CBkmRIGw.mjs → auth-DNct7VUi.mjs} +9 -9
- package/dist/{auth-CpO3ZUMz.cjs → auth-DgIV0Cvt.cjs} +6 -6
- package/dist/{auth-LPvsVriN.cjs → auth-omWDtgR8.cjs} +9 -9
- package/dist/{authRelay-DSAvg1uv.mjs → authRelay-DhQhkBvX.mjs} +1 -1
- package/dist/{authRelay-BdYkC1Po.cjs → authRelay-Dy1qU9td.cjs} +1 -0
- package/dist/{auto-Dm3EIKT7.cjs → auto-CI16FZmX.cjs} +17 -16
- package/dist/{auto-DHGch_zK.mjs → auto-DKGFOJBo.mjs} +19 -18
- package/dist/{backgroundTaskActivity-8PdPxrvy.mjs → backgroundTaskActivity-BVwJBl02.mjs} +1 -1
- package/dist/{bootstrap-CxuBAkJU.mjs → bootstrap-BUagGC_-.mjs} +2 -2
- package/dist/{bootstrap-BboDz_w2.cjs → bootstrap-DCQ87Aan.cjs} +2 -2
- package/dist/{browser-GQZJxD2n.cjs → browser-CSKhc0Bl.cjs} +1 -1
- package/dist/{browser-BvARP-YR.mjs → browser-Dj_DYQEh.mjs} +1 -1
- package/dist/{claudeLocal-B9EhFmD7.mjs → claudeLocal-CCCvAeMd.mjs} +6 -6
- package/dist/{claudeLocal-D-mujSX1.cjs → claudeLocal-CdIVnOZp.cjs} +5 -5
- package/dist/{claudeLocalLauncher-Tbrx6TXF.cjs → claudeLocalLauncher-21-xh5gc.cjs} +15 -18
- package/dist/{claudeLocalLauncher-Bdl-9aU_.mjs → claudeLocalLauncher-BmrpaRYJ.mjs} +16 -19
- package/dist/{claudeSessionFork-D_DKvDKE.mjs → claudeSessionFork-DvxMKAmY.mjs} +1 -1
- package/dist/{claudeSessionFork-sOz97qqW.cjs → claudeSessionFork-kYCP1IJB.cjs} +1 -1
- package/dist/{client-Cg6ABRe-.mjs → client-BTX9hsbr.mjs} +3 -3
- package/dist/{client-D9pEOhn4.cjs → client-C4zKGjiJ.cjs} +2 -2
- package/dist/{client-Ryu9fllj.mjs → client-CnlkkrZO.mjs} +2 -2
- package/dist/{client-D7sSU04O.cjs → client-Dnza1hgN.cjs} +3 -3
- package/dist/codex/happyMcpStdioBridge.cjs +16 -16
- package/dist/codex/happyMcpStdioBridge.mjs +17 -17
- package/dist/{codexAppServerClient-DsIUkVnX.cjs → codexAppServerClient-CRlBWGn3.cjs} +6 -54
- package/dist/{codexAppServerClient-C70pJ-BB.mjs → codexAppServerClient-DvkpQgyv.mjs} +10 -58
- package/dist/{codexCommand-DWbA3pJN.mjs → codexCommand-BxjogBzU.mjs} +44 -66
- package/dist/{codexCommand-Aycux-B7.cjs → codexCommand-DzxIWXIT.cjs} +44 -66
- package/dist/{BaseReasoningProcessor-Dnf16mtJ.cjs → codexTermination-C28FzlLb.cjs} +25 -1
- package/dist/{BaseReasoningProcessor-pjvLSTQF.mjs → codexTermination-ySDNMEhd.mjs} +25 -2
- package/dist/{config-BcL0bxO5.cjs → config-BFB5uJ4t.cjs} +3 -3
- package/dist/{config-Bztmzu8z.mjs → config-DwfEpFr3.mjs} +3 -3
- package/dist/{configuration-CpBrilxV.cjs → configuration-4TGMrjul.cjs} +1 -1
- package/dist/{configuration-BAwOtWFY.mjs → configuration-DVrb61aY.mjs} +1 -1
- package/dist/{connect-BeWQ4MMA.mjs → connect-C7FPY0PI.mjs} +15 -15
- package/dist/{connect-BBNCMTi8.cjs → connect-QH2VJGBG.cjs} +14 -14
- package/dist/{context-j114QJre.mjs → context-B3XPVJlj.mjs} +1 -1
- package/dist/{context-Hk0j2Y9-.cjs → context-JoKu0V54.cjs} +1 -1
- package/dist/{controlClient-bs_YqwDl.cjs → controlClient-BTaZlbC6.cjs} +3 -3
- package/dist/{controlClient-00KYAjsI.mjs → controlClient-BYKyGyxj.mjs} +4 -4
- package/dist/{createSessionMetadata-xlycGog5.mjs → createSessionMetadata-8Fuj2-IV.mjs} +2 -2
- package/dist/{createSessionMetadata-D4Sj6H95.cjs → createSessionMetadata-B2NynaWZ.cjs} +2 -2
- package/dist/{defaultPermissionMode-B97ox9p1.mjs → defaultPermissionMode-B8kJG9uI.mjs} +2 -2
- package/dist/{defaultPermissionMode-CMsiaRzr.cjs → defaultPermissionMode-BEWCqJU-.cjs} +2 -2
- package/dist/{deterministicJson-aHxtYLha.cjs → deterministicJson-BjNQsAjO.cjs} +9 -9
- package/dist/{deterministicJson-ucyv8j6b.mjs → deterministicJson-C5ZwZ7hu.mjs} +9 -9
- package/dist/{doctor-D554c6Bg.mjs → doctor-0BiGwJXk.mjs} +9 -9
- package/dist/{doctor-BXkNXcok.cjs → doctor-BshRnjLi.cjs} +8 -8
- package/dist/{downloadTarget-CmdlljZW.cjs → downloadTarget-BN5vZt3K.cjs} +6 -6
- package/dist/{downloadTarget-2_zMvt2N.mjs → downloadTarget-DJPwAZlu.mjs} +6 -6
- package/dist/{ensureDaemonRunning-CY7iC--U.cjs → ensureDaemonRunning-C5QfToCe.cjs} +5 -5
- package/dist/{ensureDaemonRunning-DJlziY-m.mjs → ensureDaemonRunning-CSmb_mqt.mjs} +5 -5
- package/dist/{handleResumeCommand-lSVnvTNC.cjs → handleResumeCommand-BwnUZmbo.cjs} +6 -6
- package/dist/{handleResumeCommand-CNTnXBXA.mjs → handleResumeCommand-CgjpsdDe.mjs} +6 -6
- package/dist/{index-MwTVbeGW.cjs → index-BRClDe07.cjs} +3 -3
- package/dist/{index-DhARRePz.cjs → index-BYOZ_8WZ.cjs} +5 -5
- package/dist/{index-59hR7nVz.mjs → index-BYgfern_.mjs} +3 -3
- package/dist/{index-DY3I8j0W.mjs → index-BehVbAsA.mjs} +144 -90
- package/dist/{index-CxSLrTPA.mjs → index-Bvldtdny.mjs} +5 -5
- package/dist/{index-B6UGRQ7h.mjs → index-CEjJnq05.mjs} +3 -0
- package/dist/{index-DMy3OCBe.mjs → index-Clqlu17M.mjs} +2 -2
- package/dist/{index-D3kI0hDR.cjs → index-DFPT4HOO.cjs} +3 -0
- package/dist/{index-De8L5lFK.cjs → index-_l1Sdmbi.cjs} +2 -1
- package/dist/{index-jeD70GGH.cjs → index-piJPsTsm.cjs} +142 -88
- package/dist/index.cjs +2 -2
- package/dist/index.mjs +2 -2
- package/dist/{install-DXUEtGfU.cjs → install-TO4taKW7.cjs} +3 -3
- package/dist/{install-DytIJ_Ia.mjs → install-fYWHrPcC.mjs} +3 -3
- package/dist/lib.cjs +13 -13
- package/dist/lib.d.cts +10 -1
- package/dist/lib.d.mts +10 -1
- package/dist/lib.mjs +14 -14
- package/dist/{lidState-UasMvPzw.cjs → lidState-BeOwj6eW.cjs} +2 -2
- package/dist/{lidState-CduPmrM0.mjs → lidState-DNMlIhX0.mjs} +2 -2
- package/dist/{localHappyAgentAuth-DL8JjHTV.mjs → localHappyAgentAuth-BezKSFDi.mjs} +2 -2
- package/dist/{localHappyAgentAuth-CA02WOny.cjs → localHappyAgentAuth-Br-mgogg.cjs} +2 -2
- package/dist/{logger-CihCDWDw.mjs → logger--vAVtXB_.mjs} +2 -2
- package/dist/{logger-zoO54Zsy.cjs → logger-DXTWlPzP.cjs} +2 -2
- package/dist/{machineMetadata-DEZcQ_CQ.mjs → machineMetadata-B1H9gNbN.mjs} +3 -3
- package/dist/{machineMetadata-BAKVtr-k.cjs → machineMetadata-DcUupMje.cjs} +3 -3
- package/dist/{main-DyJfNlL_.mjs → main-CshDb5-1.mjs} +45 -45
- package/dist/{main-BIvxyX71.cjs → main-DoMFJ2Cl.cjs} +45 -45
- package/dist/{manager-2Il8XJVq.mjs → manager-BEsI4qt3.mjs} +1 -1
- package/dist/{mcp-yoIdGe6C.mjs → mcp-DKT_lrvQ.mjs} +16 -16
- package/dist/{mcp-Dd11vHij.cjs → mcp-pNc1EbQf.cjs} +15 -15
- package/dist/{mirrorProtocol-BukXB5s3.mjs → mirrorProtocol-6IFGPpjJ.mjs} +3 -3
- package/dist/{mirrorProtocol-D-hF_SE5.cjs → mirrorProtocol-qKflWTX_.cjs} +3 -3
- package/dist/{package-ayqGDKSp.mjs → package-B7B03ejW.mjs} +7 -7
- package/dist/{package-A7zOGx8B.cjs → package-DY4zTbKS.cjs} +7 -7
- package/dist/{peerTools-DDMSViPu.mjs → peerTools-3R9RUARX.mjs} +4 -4
- package/dist/{peerTools-dPc9hRC5.cjs → peerTools-iy3_6Yc5.cjs} +4 -4
- package/dist/{persistence-Cih2AWml.cjs → persistence-BfX72dne.cjs} +14 -3
- package/dist/{persistence-Dy3lmall.mjs → persistence-DTk4sNpd.mjs} +14 -4
- package/dist/{piRunnerArgs-D3z3-1VJ.mjs → piRunnerArgs-AT8QJY7x.mjs} +1 -1
- package/dist/{piRunnerArgs-BuJgnUI5.cjs → piRunnerArgs-CRQVR9o-.cjs} +1 -1
- package/dist/{piRuntime-B-SPcWIr.cjs → piRuntime-BHRT5MKO.cjs} +1 -1
- package/dist/{piRuntime-kVGue-_5.mjs → piRuntime-E44qTVQ4.mjs} +1 -1
- package/dist/{piTerminal-aEtVdCJ2.mjs → piTerminal-De8nbciM.mjs} +18 -18
- package/dist/{piTerminal-DSxK5aAm.cjs → piTerminal-hI4WFdWm.cjs} +17 -17
- package/dist/processTree-CMHWlVse.cjs +66 -0
- package/dist/processTree-CP5IvQ2Z.mjs +61 -0
- package/dist/{rateLimitWindows-82izLQy8.cjs → rateLimitWindows-Czb7_7cK.cjs} +1 -1
- package/dist/{rateLimitWindows-E5DRjfE6.mjs → rateLimitWindows-XrJiiBpU.mjs} +1 -1
- package/dist/{registerCommonHandlers-CqO075-X.cjs → registerCommonHandlers-C0_fyBQ0.cjs} +2 -2
- package/dist/{registerCommonHandlers-Bm7CMqMv.mjs → registerCommonHandlers-CvIedVRf.mjs} +2 -2
- package/dist/{registerKillSessionHandler-WQra3T9B.cjs → registerKillSessionHandler-DYl7l4Ts.cjs} +6 -6
- package/dist/{registerKillSessionHandler-D02OY4vi.mjs → registerKillSessionHandler-gwJ5lTf0.mjs} +6 -6
- package/dist/{remoteSessionClient-f3DYorl8.cjs → remoteSessionClient-BRTIOX5b.cjs} +5 -5
- package/dist/{remoteSessionClient-Buh6NejV.mjs → remoteSessionClient-DRb2Jr5s.mjs} +5 -5
- package/dist/{reportProgressTool-C2gn_HWD.cjs → reportProgressTool-B9nCzbkL.cjs} +2 -2
- package/dist/{reportProgressTool-C5aSoKYX.mjs → reportProgressTool-D5tEoXMW.mjs} +2 -2
- package/dist/{run-Drxogp0j.mjs → run-BQ_FGaOL.mjs} +106 -38
- package/dist/{run-CDEmq6Zs.cjs → run-CKe_WeLW.cjs} +106 -38
- package/dist/{runClaude-yEcZTCt_.cjs → runClaude-MHI5IKM-.cjs} +27 -23
- package/dist/{runClaude-BF6U2Js7.mjs → runClaude-zrrNcQC_.mjs} +28 -24
- package/dist/{runClaudeDeps-Bl4ndq7N.mjs → runClaudeDeps-CVBCokOS.mjs} +394 -96
- package/dist/{runClaudeDeps-CnNNFjlI.cjs → runClaudeDeps-RRw-Nusc.cjs} +388 -90
- package/dist/{runGemini-DDVDRNg4.cjs → runGemini-D7Lg9yCr.cjs} +209 -194
- package/dist/{runGemini-C3wt7iv7.mjs → runGemini-kipag2ag.mjs} +209 -194
- package/dist/{runOpenClaw-CY6YHAvj.mjs → runOpenClaw-C_lRY3Do.mjs} +20 -20
- package/dist/{runOpenClaw-BzlVA_9Q.cjs → runOpenClaw-DCcQ0L2N.cjs} +19 -19
- package/dist/{sandbox-CX_wLwpq.mjs → sandbox-BSyXFVFp.mjs} +5 -5
- package/dist/{sandbox-0UNHR3hP.cjs → sandbox-dMwPTmjm.cjs} +5 -5
- package/dist/selfCheck-CF7XGJPb.mjs +84 -0
- package/dist/{selfCheck-FNwMFY8p.cjs → selfCheck-DkzDDUsE.cjs} +35 -35
- package/dist/{send-CpEGYict.mjs → send-C-k9nsd3.mjs} +10 -10
- package/dist/{send-BQkl25g0.cjs → send-dxC0miIA.cjs} +9 -9
- package/dist/{server-BodFZ5sW.cjs → server-B-W6P7Qr.cjs} +7 -7
- package/dist/{server-DnINX_Lm.mjs → server-DxoTYNlw.mjs} +5 -5
- package/dist/{sessionLock-Ddn-fhZ0.mjs → sessionLock-DBdtZGOL.mjs} +3 -3
- package/dist/{sessionLock-DOj6mMXn.cjs → sessionLock-DWX6BbiU.cjs} +3 -3
- package/dist/{sessionModeFile-DDbonFR_.mjs → sessionModeFile-ByLbXTbg.mjs} +1 -1
- package/dist/{sessionModeFile-DVukoSp7.cjs → sessionModeFile-CLLdidiJ.cjs} +1 -1
- package/dist/{sessionOps-Nryt1DZt.cjs → sessionOps-BAnr7n8t.cjs} +5 -5
- package/dist/{sessionOps-B1vQ25GS.mjs → sessionOps-BVoXe12O.mjs} +6 -6
- package/dist/{sessionScanner-DCr3ofhR.mjs → sessionScanner-BtxoeluY.mjs} +34 -4
- package/dist/{sessionScanner-D1h-cdte.cjs → sessionScanner-CDOYsEUD.cjs} +34 -3
- package/dist/{sessions-DpAN6Ft9.mjs → sessions-C3sZJkzI.mjs} +11 -11
- package/dist/{sessions-D2HsTbLf.cjs → sessions-hAitoN-m.cjs} +10 -10
- package/dist/{setupOfflineReconnection-B9Tw1Ouj.cjs → setupOfflineReconnection-C2EeYTFH.cjs} +2 -2
- package/dist/{setupOfflineReconnection-DQHEp330.mjs → setupOfflineReconnection-_eD4cuUT.mjs} +2 -2
- package/dist/{spawn-CvDZ38hi.cjs → spawn-Bc9v7pIf.cjs} +15 -14
- package/dist/{spawn-CNjm1yOi.mjs → spawn-qNrB2CD_.mjs} +17 -16
- package/dist/{spawnAgents-CCjJifAW.cjs → spawnAgents-BVEaz35W.cjs} +1 -1
- package/dist/{spawnAgents-BjtmjBvP.mjs → spawnAgents-Bw6j4tqz.mjs} +1 -1
- package/dist/{spawnHappyCLI-C8Vl56wB.mjs → spawnHappyCLI-C2stUioM.mjs} +1 -1
- package/dist/{spawnHappyCLI-ahi4j6Mh.cjs → spawnHappyCLI-fzUagkKV.cjs} +1 -1
- package/dist/{specialCommands-BpqnGrOP.cjs → specialCommands-BJ-nqY4s.cjs} +3 -3
- package/dist/{specialCommands-DfVMGXTl.mjs → specialCommands-C6W-rVyh.mjs} +3 -3
- package/dist/{startFileWatcher-Ddn3L0u3.cjs → startFileWatcher-Bqlqjt93.cjs} +1 -1
- package/dist/{startFileWatcher-DXJXY4AE.mjs → startFileWatcher-CR09Snmz.mjs} +1 -1
- package/dist/{streamRelay-Cx01enfe.cjs → streamRelay-9kBPpbvU.cjs} +1 -1
- package/dist/{streamRelay-_qCd873P.mjs → streamRelay-CJoMk_d2.mjs} +1 -1
- package/dist/{sync-BKvgkhPs.mjs → sync-DbW07iQS.mjs} +1 -1
- package/dist/{sync-BgZuthoS.cjs → sync-Dhmtk66S.cjs} +1 -1
- package/dist/{systemPrompt-C6O1cHUg.cjs → systemPrompt-3PYi3EUY.cjs} +2 -2
- package/dist/{systemPrompt-DuPem6c9.mjs → systemPrompt-CQcuUmVp.mjs} +2 -2
- package/dist/{teams-CffMBBfU.mjs → teams-CwF4Z2fA.mjs} +7 -7
- package/dist/{teams-DifEhhmk.cjs → teams-DpxLcUU_.cjs} +7 -7
- package/dist/{time-s8CaneqW.cjs → time-A6zR3Iy6.cjs} +1 -1
- package/dist/{time-DxCTiteK.mjs → time-BuGWTVP6.mjs} +1 -1
- package/dist/{titleGenerator-B5T7QSzu.mjs → titleGenerator-BGEzNWC9.mjs} +1 -1
- package/dist/{titleGenerator-CXr7t6cf.cjs → titleGenerator-D26gvNaS.cjs} +2 -2
- package/dist/{todo-B41GKMcI.cjs → todo-73g3NCIO.cjs} +7 -7
- package/dist/{todo-DNO7s8td.mjs → todo-DrZc76H5.mjs} +7 -7
- package/dist/{tools-697R1uqn.mjs → tools-BtsrQnNS.mjs} +1 -1
- package/dist/{tools-lotMyxIE.cjs → tools-CxJp4T1T.cjs} +1 -1
- package/dist/{uninstall-CYO7EDjO.mjs → uninstall-DOb2mTwV.mjs} +3 -3
- package/dist/{uninstall-CRu96len.cjs → uninstall-DWNYvewQ.cjs} +3 -3
- package/package.json +7 -7
- package/dist/selfCheck-ClVv8NK3.mjs +0 -84
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var logger = require('./logger-
|
|
4
|
-
var claudeLocal = require('./claudeLocal-
|
|
5
|
-
var sessionScanner = require('./sessionScanner-
|
|
3
|
+
var logger = require('./logger-DXTWlPzP.cjs');
|
|
4
|
+
var claudeLocal = require('./claudeLocal-CdIVnOZp.cjs');
|
|
5
|
+
var sessionScanner = require('./sessionScanner-CDOYsEUD.cjs');
|
|
6
6
|
require('chalk');
|
|
7
7
|
require('node:util');
|
|
8
|
-
require('./configuration-
|
|
8
|
+
require('./configuration-4TGMrjul.cjs');
|
|
9
9
|
require('node:fs');
|
|
10
10
|
require('node:os');
|
|
11
11
|
require('node:path');
|
|
12
|
-
require('./package-
|
|
12
|
+
require('./package-DY4zTbKS.cjs');
|
|
13
13
|
require('node:fs/promises');
|
|
14
14
|
require('cross-spawn');
|
|
15
15
|
require('node:readline');
|
|
16
16
|
require('node:crypto');
|
|
17
17
|
require('./smallFastModel-D_uxGMo3.cjs');
|
|
18
18
|
require('./path-B7zW-WwE.cjs');
|
|
19
|
-
require('./systemPrompt-
|
|
20
|
-
require('./index-
|
|
19
|
+
require('./systemPrompt-3PYi3EUY.cjs');
|
|
20
|
+
require('./index-_l1Sdmbi.cjs');
|
|
21
21
|
require('zod');
|
|
22
22
|
require('@paralleldrive/cuid2');
|
|
23
23
|
require('./trimIdent-4gvk9Wk6.cjs');
|
|
@@ -29,11 +29,11 @@ require('./claudeCliPath-U4HHmV4r.cjs');
|
|
|
29
29
|
require('./projectPath-ChLhdOyt.cjs');
|
|
30
30
|
require('path');
|
|
31
31
|
require('url');
|
|
32
|
-
require('./sync-
|
|
33
|
-
require('./time-
|
|
32
|
+
require('./sync-Dhmtk66S.cjs');
|
|
33
|
+
require('./time-A6zR3Iy6.cjs');
|
|
34
34
|
require('./types-CRS-srZK.cjs');
|
|
35
35
|
require('./transcriptCursor-DcXGLeSc.cjs');
|
|
36
|
-
require('./startFileWatcher-
|
|
36
|
+
require('./startFileWatcher-Bqlqjt93.cjs');
|
|
37
37
|
require('fs/promises');
|
|
38
38
|
|
|
39
39
|
async function claudeLocalLauncher(session) {
|
|
@@ -123,17 +123,14 @@ async function claudeLocalLauncher(session) {
|
|
|
123
123
|
if (exitReason) {
|
|
124
124
|
break;
|
|
125
125
|
}
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
}
|
|
131
|
-
session.client.closeClaudeSessionTurn("failed");
|
|
132
|
-
exitReason = { type: "exit", code: e.exitCode };
|
|
126
|
+
const exit = sessionScanner.describeClaudeProcessExit(e);
|
|
127
|
+
const closed = session.client.closeClaudeSessionTurn("failed", { error: exit });
|
|
128
|
+
if (!closed) session.client.sendSessionEvent({ type: "message", message: exit, kind: "claude-process-exit" });
|
|
129
|
+
exitReason = switchRequested || session.queue.size() > 0 ? { type: "switch" } : { type: "exit", code: e.exitCode };
|
|
133
130
|
break;
|
|
134
131
|
}
|
|
135
132
|
if (!exitReason) {
|
|
136
|
-
session.client.sendSessionEvent({ type: "message", message:
|
|
133
|
+
session.client.sendSessionEvent({ type: "message", message: sessionScanner.describeClaudeProcessExit(e), kind: "claude-process-exit" });
|
|
137
134
|
continue;
|
|
138
135
|
} else {
|
|
139
136
|
break;
|
|
@@ -1,37 +1,37 @@
|
|
|
1
|
-
import { l as logger } from './logger
|
|
2
|
-
import { claudeLocal, ExitCodeError } from './claudeLocal-
|
|
3
|
-
import { c as createSessionScanner, F as Future } from './sessionScanner-
|
|
1
|
+
import { l as logger } from './logger--vAVtXB_.mjs';
|
|
2
|
+
import { claudeLocal, ExitCodeError } from './claudeLocal-CCCvAeMd.mjs';
|
|
3
|
+
import { c as createSessionScanner, F as Future, d as describeClaudeProcessExit } from './sessionScanner-BtxoeluY.mjs';
|
|
4
4
|
import 'chalk';
|
|
5
5
|
import 'node:util';
|
|
6
|
-
import './configuration-
|
|
6
|
+
import './configuration-DVrb61aY.mjs';
|
|
7
7
|
import 'node:fs';
|
|
8
8
|
import 'node:os';
|
|
9
9
|
import 'node:path';
|
|
10
|
-
import './package-
|
|
10
|
+
import './package-B7B03ejW.mjs';
|
|
11
11
|
import 'node:fs/promises';
|
|
12
12
|
import 'cross-spawn';
|
|
13
13
|
import 'node:readline';
|
|
14
14
|
import 'node:crypto';
|
|
15
15
|
import './smallFastModel-BLNgMrwR.mjs';
|
|
16
16
|
import './path-D2wdaNSk.mjs';
|
|
17
|
-
import './systemPrompt-
|
|
18
|
-
import './index-
|
|
17
|
+
import './systemPrompt-CQcuUmVp.mjs';
|
|
18
|
+
import './index-Clqlu17M.mjs';
|
|
19
19
|
import 'zod';
|
|
20
20
|
import '@paralleldrive/cuid2';
|
|
21
21
|
import './trimIdent-BAjmv_TG.mjs';
|
|
22
22
|
import './agentGuidance-BDYt2Qy2.mjs';
|
|
23
|
-
import './manager-
|
|
23
|
+
import './manager-BEsI4qt3.mjs';
|
|
24
24
|
import '@anthropic-ai/sandbox-runtime';
|
|
25
25
|
import './contentLogMetadata-BlWI0egu.mjs';
|
|
26
26
|
import './claudeCliPath-BqkaH2oR.mjs';
|
|
27
27
|
import './projectPath-BTBIMB57.mjs';
|
|
28
28
|
import 'path';
|
|
29
29
|
import 'url';
|
|
30
|
-
import './sync-
|
|
31
|
-
import './time-
|
|
30
|
+
import './sync-DbW07iQS.mjs';
|
|
31
|
+
import './time-BuGWTVP6.mjs';
|
|
32
32
|
import './types-CkqAACXx.mjs';
|
|
33
33
|
import './transcriptCursor-B7T_gkQ0.mjs';
|
|
34
|
-
import './startFileWatcher-
|
|
34
|
+
import './startFileWatcher-CR09Snmz.mjs';
|
|
35
35
|
import 'fs/promises';
|
|
36
36
|
|
|
37
37
|
async function claudeLocalLauncher(session) {
|
|
@@ -121,17 +121,14 @@ async function claudeLocalLauncher(session) {
|
|
|
121
121
|
if (exitReason) {
|
|
122
122
|
break;
|
|
123
123
|
}
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
}
|
|
129
|
-
session.client.closeClaudeSessionTurn("failed");
|
|
130
|
-
exitReason = { type: "exit", code: e.exitCode };
|
|
124
|
+
const exit = describeClaudeProcessExit(e);
|
|
125
|
+
const closed = session.client.closeClaudeSessionTurn("failed", { error: exit });
|
|
126
|
+
if (!closed) session.client.sendSessionEvent({ type: "message", message: exit, kind: "claude-process-exit" });
|
|
127
|
+
exitReason = switchRequested || session.queue.size() > 0 ? { type: "switch" } : { type: "exit", code: e.exitCode };
|
|
131
128
|
break;
|
|
132
129
|
}
|
|
133
130
|
if (!exitReason) {
|
|
134
|
-
session.client.sendSessionEvent({ type: "message", message:
|
|
131
|
+
session.client.sendSessionEvent({ type: "message", message: describeClaudeProcessExit(e), kind: "claude-process-exit" });
|
|
135
132
|
continue;
|
|
136
133
|
} else {
|
|
137
134
|
break;
|
|
@@ -3,7 +3,7 @@ import { copyFile, unlink, readFile, rename, writeFile } from 'node:fs/promises'
|
|
|
3
3
|
import { createReadStream, createWriteStream } from 'node:fs';
|
|
4
4
|
import { join } from 'node:path';
|
|
5
5
|
import { createInterface } from 'node:readline';
|
|
6
|
-
import { l as logger } from './logger
|
|
6
|
+
import { l as logger } from './logger--vAVtXB_.mjs';
|
|
7
7
|
|
|
8
8
|
class ForkTruncateUuidNotFoundError extends Error {
|
|
9
9
|
constructor(cutAfterUuid, sourcePath) {
|
|
@@ -5,7 +5,7 @@ var promises = require('node:fs/promises');
|
|
|
5
5
|
var node_fs = require('node:fs');
|
|
6
6
|
var path = require('node:path');
|
|
7
7
|
var node_readline = require('node:readline');
|
|
8
|
-
var logger = require('./logger-
|
|
8
|
+
var logger = require('./logger-DXTWlPzP.cjs');
|
|
9
9
|
|
|
10
10
|
class ForkTruncateUuidNotFoundError extends Error {
|
|
11
11
|
constructor(cutAfterUuid, sourcePath) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { randomUUID } from 'node:crypto';
|
|
2
|
-
import { c as configuration } from './configuration-
|
|
3
|
-
import { r as readSettings, b as readPersistedSessions, c as readCredentialsForConfiguredRelay } from './persistence-
|
|
4
|
-
import { r as readTeamScope, t as teamScopePath, w as writeTeamScope } from './context-
|
|
2
|
+
import { c as configuration } from './configuration-DVrb61aY.mjs';
|
|
3
|
+
import { r as readSettings, b as readPersistedSessions, c as readCredentialsForConfiguredRelay } from './persistence-DTk4sNpd.mjs';
|
|
4
|
+
import { r as readTeamScope, t as teamScopePath, w as writeTeamScope } from './context-B3XPVJlj.mjs';
|
|
5
5
|
|
|
6
6
|
async function teamRequest(path, method, token, scoped, body) {
|
|
7
7
|
const response = await fetch(`${configuration.serverUrl}${path}`, {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var configuration = require('./configuration-
|
|
4
|
-
var persistence = require('./persistence-
|
|
3
|
+
var configuration = require('./configuration-4TGMrjul.cjs');
|
|
4
|
+
var persistence = require('./persistence-BfX72dne.cjs');
|
|
5
5
|
|
|
6
6
|
class AutomationsRequestError extends Error {
|
|
7
7
|
constructor(status, code, runStatus) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { c as configuration } from './configuration-
|
|
2
|
-
import { c as readCredentialsForConfiguredRelay, r as readSettings } from './persistence-
|
|
1
|
+
import { c as configuration } from './configuration-DVrb61aY.mjs';
|
|
2
|
+
import { c as readCredentialsForConfiguredRelay, r as readSettings } from './persistence-DTk4sNpd.mjs';
|
|
3
3
|
|
|
4
4
|
class AutomationsRequestError extends Error {
|
|
5
5
|
constructor(status, code, runStatus) {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var node_crypto = require('node:crypto');
|
|
4
|
-
var configuration = require('./configuration-
|
|
5
|
-
var persistence = require('./persistence-
|
|
6
|
-
var context = require('./context-
|
|
4
|
+
var configuration = require('./configuration-4TGMrjul.cjs');
|
|
5
|
+
var persistence = require('./persistence-BfX72dne.cjs');
|
|
6
|
+
var context = require('./context-JoKu0V54.cjs');
|
|
7
7
|
|
|
8
8
|
async function teamRequest(path, method, token, scoped, body) {
|
|
9
9
|
const response = await fetch(`${configuration.configuration.serverUrl}${path}`, {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var tools = require('../tools-
|
|
4
|
-
var reportProgressTool = require('../reportProgressTool-
|
|
5
|
-
var peerTools = require('../peerTools-
|
|
3
|
+
var tools = require('../tools-CxJp4T1T.cjs');
|
|
4
|
+
var reportProgressTool = require('../reportProgressTool-B9nCzbkL.cjs');
|
|
5
|
+
var peerTools = require('../peerTools-iy3_6Yc5.cjs');
|
|
6
6
|
var agentGuidance = require('../agentGuidance-BtBx2xxE.cjs');
|
|
7
7
|
var mcp_js = require('@modelcontextprotocol/sdk/server/mcp.js');
|
|
8
8
|
var stdio_js = require('@modelcontextprotocol/sdk/server/stdio.js');
|
|
@@ -10,33 +10,33 @@ var index_js = require('@modelcontextprotocol/sdk/client/index.js');
|
|
|
10
10
|
var streamableHttp_js = require('@modelcontextprotocol/sdk/client/streamableHttp.js');
|
|
11
11
|
var z = require('zod');
|
|
12
12
|
var limits = require('../limits-C-a7gr04.cjs');
|
|
13
|
-
require('../client-
|
|
13
|
+
require('../client-Dnza1hgN.cjs');
|
|
14
14
|
require('node:crypto');
|
|
15
|
-
require('../configuration-
|
|
15
|
+
require('../configuration-4TGMrjul.cjs');
|
|
16
16
|
require('node:fs');
|
|
17
17
|
require('node:os');
|
|
18
18
|
require('node:path');
|
|
19
|
-
require('../package-
|
|
19
|
+
require('../package-DY4zTbKS.cjs');
|
|
20
20
|
require('node:fs/promises');
|
|
21
|
-
require('../persistence-
|
|
22
|
-
require('../authRelay-
|
|
21
|
+
require('../persistence-BfX72dne.cjs');
|
|
22
|
+
require('../authRelay-Dy1qU9td.cjs');
|
|
23
23
|
require('tweetnacl');
|
|
24
|
-
require('../logger-
|
|
24
|
+
require('../logger-DXTWlPzP.cjs');
|
|
25
25
|
require('chalk');
|
|
26
26
|
require('node:util');
|
|
27
|
-
require('../context-
|
|
28
|
-
require('../index-
|
|
27
|
+
require('../context-JoKu0V54.cjs');
|
|
28
|
+
require('../index-_l1Sdmbi.cjs');
|
|
29
29
|
require('@paralleldrive/cuid2');
|
|
30
|
-
require('../client-
|
|
30
|
+
require('../client-C4zKGjiJ.cjs');
|
|
31
31
|
require('../precheckCompat-CWOi5c9L.cjs');
|
|
32
32
|
require('../ids-B6ZC0HGt.cjs');
|
|
33
|
-
require('../controlClient-
|
|
34
|
-
require('../sessionOps-
|
|
33
|
+
require('../controlClient-BTaZlbC6.cjs');
|
|
34
|
+
require('../sessionOps-BAnr7n8t.cjs');
|
|
35
35
|
require('axios');
|
|
36
|
-
require('../time-
|
|
36
|
+
require('../time-A6zR3Iy6.cjs');
|
|
37
37
|
require('socket.io-client');
|
|
38
38
|
require('../backgroundTaskActivity-CBvUdj39.cjs');
|
|
39
|
-
require('../remoteSessionClient-
|
|
39
|
+
require('../remoteSessionClient-BRTIOX5b.cjs');
|
|
40
40
|
require('../trimIdent-4gvk9Wk6.cjs');
|
|
41
41
|
|
|
42
42
|
function parseArgs(argv) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { r as registerTeamsTools } from '../tools-
|
|
2
|
-
import { r as registerAutomationTools, a as registerReportProgressTool } from '../reportProgressTool-
|
|
3
|
-
import { r as registerSessionPeerTools } from '../peerTools-
|
|
1
|
+
import { r as registerTeamsTools } from '../tools-BtsrQnNS.mjs';
|
|
2
|
+
import { r as registerAutomationTools, a as registerReportProgressTool } from '../reportProgressTool-D5tEoXMW.mjs';
|
|
3
|
+
import { r as registerSessionPeerTools } from '../peerTools-3R9RUARX.mjs';
|
|
4
4
|
import { P as PREVIEW_TOOL_NAME, a as PREVIEW_TOOL_TITLE, b as PREVIEW_TOOL_DESCRIPTION, c as PREVIEW_DOWNLOAD_PARAM_DESCRIPTION, R as REPORT_PROGRESS_TOOL_NAME } from '../agentGuidance-BDYt2Qy2.mjs';
|
|
5
5
|
import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
6
6
|
import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
|
|
@@ -8,33 +8,33 @@ import { Client } from '@modelcontextprotocol/sdk/client/index.js';
|
|
|
8
8
|
import { StreamableHTTPClientTransport } from '@modelcontextprotocol/sdk/client/streamableHttp.js';
|
|
9
9
|
import { z } from 'zod';
|
|
10
10
|
import { C as CLIPBOARD_TOOL_NAME, a as CLIPBOARD_TOOL_TITLE, b as CLIPBOARD_TOOL_DESCRIPTION } from '../limits-DIo7rEBR.mjs';
|
|
11
|
-
import '../client-
|
|
11
|
+
import '../client-BTX9hsbr.mjs';
|
|
12
12
|
import 'node:crypto';
|
|
13
|
-
import '../configuration-
|
|
13
|
+
import '../configuration-DVrb61aY.mjs';
|
|
14
14
|
import 'node:fs';
|
|
15
15
|
import 'node:os';
|
|
16
16
|
import 'node:path';
|
|
17
|
-
import '../package-
|
|
17
|
+
import '../package-B7B03ejW.mjs';
|
|
18
18
|
import 'node:fs/promises';
|
|
19
|
-
import '../persistence-
|
|
20
|
-
import '../authRelay-
|
|
19
|
+
import '../persistence-DTk4sNpd.mjs';
|
|
20
|
+
import '../authRelay-DhQhkBvX.mjs';
|
|
21
21
|
import 'tweetnacl';
|
|
22
|
-
import '../logger
|
|
22
|
+
import '../logger--vAVtXB_.mjs';
|
|
23
23
|
import 'chalk';
|
|
24
24
|
import 'node:util';
|
|
25
|
-
import '../context-
|
|
26
|
-
import '../index-
|
|
25
|
+
import '../context-B3XPVJlj.mjs';
|
|
26
|
+
import '../index-Clqlu17M.mjs';
|
|
27
27
|
import '@paralleldrive/cuid2';
|
|
28
|
-
import '../client-
|
|
28
|
+
import '../client-CnlkkrZO.mjs';
|
|
29
29
|
import '../precheckCompat-DeEbilbr.mjs';
|
|
30
30
|
import '../ids-DU6sLx4C.mjs';
|
|
31
|
-
import '../controlClient-
|
|
32
|
-
import '../sessionOps-
|
|
31
|
+
import '../controlClient-BYKyGyxj.mjs';
|
|
32
|
+
import '../sessionOps-BVoXe12O.mjs';
|
|
33
33
|
import 'axios';
|
|
34
|
-
import '../time-
|
|
34
|
+
import '../time-BuGWTVP6.mjs';
|
|
35
35
|
import 'socket.io-client';
|
|
36
|
-
import '../backgroundTaskActivity-
|
|
37
|
-
import '../remoteSessionClient-
|
|
36
|
+
import '../backgroundTaskActivity-BVwJBl02.mjs';
|
|
37
|
+
import '../remoteSessionClient-DRb2Jr5s.mjs';
|
|
38
38
|
import '../trimIdent-BAjmv_TG.mjs';
|
|
39
39
|
|
|
40
40
|
function parseArgs(argv) {
|
|
@@ -3,11 +3,12 @@
|
|
|
3
3
|
var node_child_process = require('node:child_process');
|
|
4
4
|
var spawn = require('cross-spawn');
|
|
5
5
|
var node_readline = require('node:readline');
|
|
6
|
-
var logger = require('./logger-
|
|
6
|
+
var logger = require('./logger-DXTWlPzP.cjs');
|
|
7
7
|
var contentLogMetadata = require('./contentLogMetadata-ZSFk_NjQ.cjs');
|
|
8
8
|
var manager = require('./manager-HrEj442o.cjs');
|
|
9
|
-
var _package = require('./package-
|
|
10
|
-
var rateLimitWindows = require('./rateLimitWindows-
|
|
9
|
+
var _package = require('./package-DY4zTbKS.cjs');
|
|
10
|
+
var rateLimitWindows = require('./rateLimitWindows-Czb7_7cK.cjs');
|
|
11
|
+
var processTree = require('./processTree-CMHWlVse.cjs');
|
|
11
12
|
|
|
12
13
|
const CODEX_HELPER_LABEL_MAX_CHARS = 80;
|
|
13
14
|
function codexHelperLabel(prompt) {
|
|
@@ -44,55 +45,6 @@ function codexChildAnnouncements(item) {
|
|
|
44
45
|
return [];
|
|
45
46
|
}
|
|
46
47
|
|
|
47
|
-
function stopCodexProcess(proc, deps = {}) {
|
|
48
|
-
const platform = deps.platform ?? process.platform;
|
|
49
|
-
try {
|
|
50
|
-
proc.stdin?.end();
|
|
51
|
-
} catch {
|
|
52
|
-
}
|
|
53
|
-
if (platform === "win32") return;
|
|
54
|
-
try {
|
|
55
|
-
proc.kill("SIGTERM");
|
|
56
|
-
} catch {
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
function killCodexProcessTree(proc, deps = {}) {
|
|
60
|
-
if (proc.exitCode != null || proc.signalCode != null) return;
|
|
61
|
-
const killRoot = () => {
|
|
62
|
-
try {
|
|
63
|
-
proc.kill("SIGKILL");
|
|
64
|
-
} catch {
|
|
65
|
-
}
|
|
66
|
-
};
|
|
67
|
-
const pid = proc.pid;
|
|
68
|
-
if (!pid || !("exitCode" in proc)) {
|
|
69
|
-
killRoot();
|
|
70
|
-
return;
|
|
71
|
-
}
|
|
72
|
-
const platform = deps.platform ?? process.platform;
|
|
73
|
-
const spawn = deps.spawn ?? ((command, args, options) => node_child_process.spawn(command, args, options));
|
|
74
|
-
if (platform === "win32") {
|
|
75
|
-
try {
|
|
76
|
-
const killer = spawn("taskkill", ["/pid", String(pid), "/t", "/f"], { stdio: "ignore", windowsHide: true });
|
|
77
|
-
killer.on("error", killRoot);
|
|
78
|
-
killer.on("exit", (code) => {
|
|
79
|
-
if (code !== 0) killRoot();
|
|
80
|
-
});
|
|
81
|
-
killer.unref();
|
|
82
|
-
} catch {
|
|
83
|
-
killRoot();
|
|
84
|
-
}
|
|
85
|
-
return;
|
|
86
|
-
}
|
|
87
|
-
try {
|
|
88
|
-
const reaper = spawn("pkill", ["-KILL", "-P", String(pid)], { stdio: "ignore", windowsHide: true });
|
|
89
|
-
reaper.on("error", () => void 0);
|
|
90
|
-
reaper.unref();
|
|
91
|
-
} catch {
|
|
92
|
-
}
|
|
93
|
-
killRoot();
|
|
94
|
-
}
|
|
95
|
-
|
|
96
48
|
function jsonRpcErrorCodeOf(error) {
|
|
97
49
|
const code = error?.jsonRpcCode;
|
|
98
50
|
return typeof code === "number" ? code : null;
|
|
@@ -674,9 +626,9 @@ ${text}`.slice(-400);
|
|
|
674
626
|
this.readline?.close();
|
|
675
627
|
this.readline = null;
|
|
676
628
|
if (proc) {
|
|
677
|
-
|
|
629
|
+
processTree.stopProcessGracefully(proc);
|
|
678
630
|
if (pid) {
|
|
679
|
-
const killTimer = setTimeout(() =>
|
|
631
|
+
const killTimer = setTimeout(() => processTree.killProcessTree(proc), CodexAppServerClient.FORCE_KILL_AFTER_MS);
|
|
680
632
|
killTimer.unref();
|
|
681
633
|
}
|
|
682
634
|
}
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { spawn
|
|
1
|
+
import { execSync } from 'node:child_process';
|
|
2
|
+
import { spawn } from 'cross-spawn';
|
|
3
3
|
import { createInterface } from 'node:readline';
|
|
4
|
-
import { l as logger } from './logger
|
|
4
|
+
import { l as logger } from './logger--vAVtXB_.mjs';
|
|
5
5
|
import { e as errorLogMetadata, c as contentLogMetadata } from './contentLogMetadata-BlWI0egu.mjs';
|
|
6
|
-
import { i as initializeSandbox,
|
|
7
|
-
import { p as packageJson } from './package-
|
|
8
|
-
import { s as shouldReadCodexRateLimits, i as isUnsupportedCodexMethodError } from './rateLimitWindows-
|
|
6
|
+
import { i as initializeSandbox, w as wrapForMcpTransport } from './manager-BEsI4qt3.mjs';
|
|
7
|
+
import { p as packageJson } from './package-B7B03ejW.mjs';
|
|
8
|
+
import { s as shouldReadCodexRateLimits, i as isUnsupportedCodexMethodError } from './rateLimitWindows-XrJiiBpU.mjs';
|
|
9
|
+
import { s as stopProcessGracefully, k as killProcessTree } from './processTree-CP5IvQ2Z.mjs';
|
|
9
10
|
|
|
10
11
|
const CODEX_HELPER_LABEL_MAX_CHARS = 80;
|
|
11
12
|
function codexHelperLabel(prompt) {
|
|
@@ -42,55 +43,6 @@ function codexChildAnnouncements(item) {
|
|
|
42
43
|
return [];
|
|
43
44
|
}
|
|
44
45
|
|
|
45
|
-
function stopCodexProcess(proc, deps = {}) {
|
|
46
|
-
const platform = deps.platform ?? process.platform;
|
|
47
|
-
try {
|
|
48
|
-
proc.stdin?.end();
|
|
49
|
-
} catch {
|
|
50
|
-
}
|
|
51
|
-
if (platform === "win32") return;
|
|
52
|
-
try {
|
|
53
|
-
proc.kill("SIGTERM");
|
|
54
|
-
} catch {
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
function killCodexProcessTree(proc, deps = {}) {
|
|
58
|
-
if (proc.exitCode != null || proc.signalCode != null) return;
|
|
59
|
-
const killRoot = () => {
|
|
60
|
-
try {
|
|
61
|
-
proc.kill("SIGKILL");
|
|
62
|
-
} catch {
|
|
63
|
-
}
|
|
64
|
-
};
|
|
65
|
-
const pid = proc.pid;
|
|
66
|
-
if (!pid || !("exitCode" in proc)) {
|
|
67
|
-
killRoot();
|
|
68
|
-
return;
|
|
69
|
-
}
|
|
70
|
-
const platform = deps.platform ?? process.platform;
|
|
71
|
-
const spawn$1 = deps.spawn ?? ((command, args, options) => spawn(command, args, options));
|
|
72
|
-
if (platform === "win32") {
|
|
73
|
-
try {
|
|
74
|
-
const killer = spawn$1("taskkill", ["/pid", String(pid), "/t", "/f"], { stdio: "ignore", windowsHide: true });
|
|
75
|
-
killer.on("error", killRoot);
|
|
76
|
-
killer.on("exit", (code) => {
|
|
77
|
-
if (code !== 0) killRoot();
|
|
78
|
-
});
|
|
79
|
-
killer.unref();
|
|
80
|
-
} catch {
|
|
81
|
-
killRoot();
|
|
82
|
-
}
|
|
83
|
-
return;
|
|
84
|
-
}
|
|
85
|
-
try {
|
|
86
|
-
const reaper = spawn$1("pkill", ["-KILL", "-P", String(pid)], { stdio: "ignore", windowsHide: true });
|
|
87
|
-
reaper.on("error", () => void 0);
|
|
88
|
-
reaper.unref();
|
|
89
|
-
} catch {
|
|
90
|
-
}
|
|
91
|
-
killRoot();
|
|
92
|
-
}
|
|
93
|
-
|
|
94
46
|
function jsonRpcErrorCodeOf(error) {
|
|
95
47
|
const code = error?.jsonRpcCode;
|
|
96
48
|
return typeof code === "number" ? code : null;
|
|
@@ -592,7 +544,7 @@ class CodexAppServerClient {
|
|
|
592
544
|
}
|
|
593
545
|
logger.debug(`[CodexAppServer] Spawning: ${command} ${args.join(" ")}`);
|
|
594
546
|
const epoch = ++this.processEpoch;
|
|
595
|
-
const proc = spawn
|
|
547
|
+
const proc = spawn(command, args, {
|
|
596
548
|
stdio: ["pipe", "pipe", "pipe"],
|
|
597
549
|
env,
|
|
598
550
|
windowsHide: true
|
|
@@ -672,9 +624,9 @@ ${text}`.slice(-400);
|
|
|
672
624
|
this.readline?.close();
|
|
673
625
|
this.readline = null;
|
|
674
626
|
if (proc) {
|
|
675
|
-
|
|
627
|
+
stopProcessGracefully(proc);
|
|
676
628
|
if (pid) {
|
|
677
|
-
const killTimer = setTimeout(() =>
|
|
629
|
+
const killTimer = setTimeout(() => killProcessTree(proc), CodexAppServerClient.FORCE_KILL_AFTER_MS);
|
|
678
630
|
killTimer.unref();
|
|
679
631
|
}
|
|
680
632
|
}
|