very-happy-cli 0.2.166 → 0.2.167
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-20VHOXwb.cjs → AcpBackend-D1IKJGz_.cjs} +3 -3
- package/dist/{AcpBackend-tRWk7yi7.mjs → AcpBackend-kFZlee5E.mjs} +3 -3
- package/dist/{BasePermissionHandler-COKc4pmt.cjs → BasePermissionHandler-DHxYAK5L.cjs} +1 -1
- package/dist/{BasePermissionHandler-CDCLIrZJ.mjs → BasePermissionHandler-DS0kRTNI.mjs} +1 -1
- package/dist/{BaseReasoningProcessor-BDVKvooR.mjs → BaseReasoningProcessor-BRtCCt7q.mjs} +1 -1
- package/dist/{BaseReasoningProcessor-DAGQdkNp.cjs → BaseReasoningProcessor-CsjVdt_H.cjs} +1 -1
- package/dist/{agentHome-2IbIjKCa.mjs → agentHome-Ct-VXFeG.mjs} +4 -4
- package/dist/{agentHome-KVWj6nCl.cjs → agentHome-DeAWzhSe.cjs} +4 -4
- package/dist/{api-DnNL5fLw.cjs → api-BZYLRDM9.cjs} +88 -10
- package/dist/{api-Cmz3XS4P.mjs → api-CReZazeT.mjs} +88 -10
- package/dist/{apiMachine-DeoQ8QbZ.cjs → apiMachine-BgMxGPsR.cjs} +50 -15
- package/dist/{apiMachine-B6ySCFe0.mjs → apiMachine-CWndf1Vn.mjs} +50 -15
- package/dist/{attachmentContent-DPWxHgX4.cjs → attachmentContent-HcJqFQW8.cjs} +2 -2
- package/dist/{attachmentContent-CTXapi-_.mjs → attachmentContent-j875mwU7.mjs} +2 -2
- package/dist/{attachmentLimits-BfgKV5iE.cjs → attachmentLimits-BEYEEBm8.cjs} +13 -1
- package/dist/{attachmentLimits-C1PCCM79.mjs → attachmentLimits-CxG3T18E.mjs} +13 -1
- package/dist/{auth-BMaBjRAj.mjs → auth-BIHuc7vY.mjs} +10 -10
- package/dist/{auth-pzWIFdOD.mjs → auth-CFS9Lfgv.mjs} +5 -5
- package/dist/{auth-D4-eQz85.cjs → auth-Myr2Q42x.cjs} +10 -10
- package/dist/{auth-ietHtvwu.cjs → auth-VzWpbo5P.cjs} +5 -5
- package/dist/{auto-DOWTQDPa.cjs → auto-Bf6Dr7_o.cjs} +14 -14
- package/dist/{auto-DL75Dx3I.mjs → auto-Df9-zmuN.mjs} +14 -14
- package/dist/{bootstrap-XE8A7Ut2.mjs → bootstrap-BSOxYpaP.mjs} +2 -2
- package/dist/{bootstrap-BpXIc2wn.cjs → bootstrap-Dj8WBiR2.cjs} +2 -2
- package/dist/{browser-DDFi1T8C.mjs → browser-BCFIHOvo.mjs} +1 -1
- package/dist/{browser-CcG8GLRV.cjs → browser-BoCV40yC.cjs} +1 -1
- package/dist/{claudeLocal-DXBXwIOG.cjs → claudeLocal-CGsq7Kul.cjs} +5 -5
- package/dist/{claudeLocal-DmM5Oyhv.mjs → claudeLocal-D5-eA9SC.mjs} +5 -5
- package/dist/{claudeLocalLauncher-Cs4eUC3P.mjs → claudeLocalLauncher-C9Cc438l.mjs} +10 -10
- package/dist/{claudeLocalLauncher-C41Y6Kp4.cjs → claudeLocalLauncher-Cf9QeYDT.cjs} +10 -10
- package/dist/{claudeSessionFork-Cs0I3eGI.cjs → claudeSessionFork-Byd8zD1U.cjs} +1 -1
- package/dist/{claudeSessionFork-BdLnc2Hv.mjs → claudeSessionFork-CMzAva8G.mjs} +1 -1
- package/dist/{client-JISJx2f-.cjs → client-BKnKRLSt.cjs} +3 -3
- package/dist/{client-GjTnsq6F.mjs → client-C7FYMer0.mjs} +2 -2
- package/dist/{client-DJ0kX_8M.cjs → client-D0T5-6Ds.cjs} +2 -2
- package/dist/{client-CbK33y_s.mjs → client-Dsfy_SAb.mjs} +3 -3
- package/dist/codex/happyMcpStdioBridge.cjs +14 -14
- package/dist/codex/happyMcpStdioBridge.mjs +14 -14
- package/dist/{codexAppServerClient-CldXEojt.mjs → codexAppServerClient-Dd_4TxHv.mjs} +4 -4
- package/dist/{codexAppServerClient-BTjn2ZCZ.cjs → codexAppServerClient-TiW9OBk4.cjs} +4 -4
- package/dist/{codexCommand-DjMU-Ijf.mjs → codexCommand-BZSr4MKI.mjs} +137 -56
- package/dist/{codexCommand-BpD0N1F7.cjs → codexCommand-Bxryqh90.cjs} +137 -56
- package/dist/{config-DjSJKatx.mjs → config-C_Pj7yxV.mjs} +3 -3
- package/dist/{config-DuLL0Ppe.cjs → config-DXPash-r.cjs} +3 -3
- package/dist/{configuration-B0cb3xA3.cjs → configuration-C3piBtxY.cjs} +1 -1
- package/dist/{configuration-D2v3puap.mjs → configuration-WspKd2C2.mjs} +2 -2
- package/dist/{connect-B7JWEzyg.cjs → connect-BN-IBElA.cjs} +13 -13
- package/dist/{connect-CnNNyM9I.mjs → connect-DGPZs5px.mjs} +13 -13
- package/dist/{context-DjfqLWzE.mjs → context-Cr6a3NTg.mjs} +1 -1
- package/dist/{context-BFUpYT39.cjs → context-Jrq4-eCZ.cjs} +1 -1
- package/dist/{controlClient-CmnHGcyl.cjs → controlClient-BI6Fw3fQ.cjs} +18 -3
- package/dist/{controlClient-BMUJfUeF.mjs → controlClient-DTheOlvC.mjs} +18 -4
- package/dist/{createSessionMetadata-DU0bCg2m.mjs → createSessionMetadata-BEZ4DIDA.mjs} +57 -5
- package/dist/{createSessionMetadata-DbfRBhRu.cjs → createSessionMetadata-zQSz3hgk.cjs} +56 -3
- package/dist/defaultPermissionMode-Cif_RHGb.mjs +191 -0
- package/dist/defaultPermissionMode-DNKNzk7l.cjs +197 -0
- package/dist/{deterministicJson-D-WPUrZb.mjs → deterministicJson-BMMifViN.mjs} +8 -8
- package/dist/{deterministicJson-Dp3TVyap.cjs → deterministicJson-C7O2ulKY.cjs} +8 -8
- package/dist/{doctor-CkJmdPbi.cjs → doctor-BykBaMTr.cjs} +6 -6
- package/dist/{doctor-BlXXyQ1L.mjs → doctor-D1KKyPzB.mjs} +6 -6
- package/dist/{downloadTarget-CiQqRIc-.cjs → downloadTarget-CWTb2-EM.cjs} +6 -6
- package/dist/{downloadTarget-DjSwMHun.mjs → downloadTarget-Cp48jrIP.mjs} +6 -6
- package/dist/{ensureDaemonRunning-CAQag1zE.mjs → ensureDaemonRunning-Ba5fYoxb.mjs} +5 -5
- package/dist/{ensureDaemonRunning-C_aIOhgG.cjs → ensureDaemonRunning-CCxX7MoP.cjs} +5 -5
- package/dist/{handleResumeCommand-Ci7wacT-.mjs → handleResumeCommand-BTUGlNjB.mjs} +5 -5
- package/dist/{handleResumeCommand-6KzBGDnl.cjs → handleResumeCommand-yPdDQHqz.cjs} +5 -5
- package/dist/{index-CaFCAlX8.cjs → index-BjhKqDa0.cjs} +3 -3
- package/dist/{index-HQsigW_J.mjs → index-C3_83bqS.mjs} +3 -3
- package/dist/{index-WGCT6SSV.mjs → index-CE2GgPbr.mjs} +34 -34
- package/dist/{index-DQplgo0W.mjs → index-D8m8Ripb.mjs} +4 -4
- package/dist/{index-DBmNwMX9.cjs → index-DifM62wX.cjs} +33 -33
- package/dist/{index-DEKIgZUo.cjs → index-PNMQPKhz.cjs} +4 -4
- package/dist/index.cjs +2 -2
- package/dist/index.mjs +2 -2
- package/dist/{install-oJUvsFu9.mjs → install-C0-QFn9s.mjs} +3 -3
- package/dist/{install-CejEiRGW.cjs → install-CqZVeze8.cjs} +3 -3
- package/dist/lib.cjs +11 -11
- package/dist/lib.d.cts +61 -0
- package/dist/lib.d.mts +61 -0
- package/dist/lib.mjs +11 -11
- package/dist/{lidState-BfximpjX.mjs → lidState-B2ZxdREe.mjs} +1 -1
- package/dist/{lidState-D8BmnJV1.cjs → lidState-Bc2K9H9l.cjs} +1 -1
- package/dist/{localHappyAgentAuth-Ct1aXwqd.mjs → localHappyAgentAuth-B5XPEMwk.mjs} +1 -1
- package/dist/{localHappyAgentAuth-d7B6S_o7.cjs → localHappyAgentAuth-T5GOvRha.cjs} +1 -1
- package/dist/{logger-JTcJU-uL.cjs → logger-B_MWPbZz.cjs} +2 -2
- package/dist/{logger-BpQcwNnt.mjs → logger-CbBv3q_b.mjs} +2 -2
- package/dist/{machineMetadata-BBg_Njw3.cjs → machineMetadata-BafS4JY8.cjs} +4 -3
- package/dist/{machineMetadata-CBdxABeI.mjs → machineMetadata-DHg238U4.mjs} +4 -3
- package/dist/{main-C16fOGgn.cjs → main-DNrA0qBy.cjs} +45 -45
- package/dist/{main-B5b1gA3K.mjs → main-DXAK0n7x.mjs} +45 -45
- package/dist/{manager-BQ4flvQZ.mjs → manager-BEsI4qt3.mjs} +9 -3
- package/dist/{manager-Cly8xVIR.cjs → manager-HrEj442o.cjs} +8 -2
- package/dist/{mcp-BnNiBBax.cjs → mcp-AvPOhDXy.cjs} +14 -14
- package/dist/{mcp-DGNWgVdv.mjs → mcp-BotAjCdD.mjs} +14 -14
- package/dist/mirrorProtocol-BdcN6QlN.cjs +1270 -0
- package/dist/mirrorProtocol-BwHm8odn.mjs +1247 -0
- package/dist/{package-C1XvUQFy.cjs → package-C9ZP9bpX.cjs} +7 -7
- package/dist/{package-BqwrPxL0.mjs → package-DU1DxhH9.mjs} +7 -7
- package/dist/{peerTools-DPvbcs8V.cjs → peerTools-Dkbu7gag.cjs} +4 -4
- package/dist/{peerTools-CeCe-3lk.mjs → peerTools-os2DVjA0.mjs} +4 -4
- package/dist/{persistence-2Xp_o6x6.cjs → persistence-BYGl0QYw.cjs} +147 -25
- package/dist/{persistence-B9LmhAE2.mjs → persistence-ON0zpHfb.mjs} +123 -12
- package/dist/{piRunnerArgs-7FaTyNOq.mjs → piRunnerArgs-CYsnT9sV.mjs} +1 -1
- package/dist/{piRunnerArgs-DI29dDNo.cjs → piRunnerArgs-DpbvstUX.cjs} +1 -1
- package/dist/{piRuntime-R8XVChxK.cjs → piRuntime-CDnILlCd.cjs} +1 -1
- package/dist/{piRuntime-0qEK5AqE.mjs → piRuntime-CmEid-wu.mjs} +1 -1
- package/dist/{piTerminal-zcQKc8Sp.mjs → piTerminal-0eNlXSlL.mjs} +16 -16
- package/dist/{piTerminal-Ccj0KNPr.cjs → piTerminal-B57TgMON.cjs} +16 -16
- package/dist/{rateLimitWindows-C2Jk3Ih7.cjs → rateLimitWindows-CusGIqlq.cjs} +1 -1
- package/dist/{rateLimitWindows-Dhfhbtqu.mjs → rateLimitWindows-vZ9Bo7aT.mjs} +1 -1
- package/dist/{registerCommonHandlers-DdfGsFbM.mjs → registerCommonHandlers-B0PVff2U.mjs} +2 -2
- package/dist/{registerCommonHandlers-Aha_KfM3.cjs → registerCommonHandlers-DVYB3iVn.cjs} +2 -2
- package/dist/{registerKillSessionHandler-DboQlGcH.mjs → registerKillSessionHandler-BJMHJHXe.mjs} +14 -9
- package/dist/{registerKillSessionHandler-CjitOpUA.cjs → registerKillSessionHandler-BwXGKtg_.cjs} +14 -9
- package/dist/{remoteSessionClient-B2DtWuNP.mjs → remoteSessionClient-BzPXSC21.mjs} +5 -5
- package/dist/{remoteSessionClient-BwI8rpQw.cjs → remoteSessionClient-PyUAIhwK.cjs} +5 -5
- package/dist/{reportProgressTool-DnAD8wOa.mjs → reportProgressTool-BvB13EwC.mjs} +1 -1
- package/dist/{reportProgressTool-B-Rcy0s3.cjs → reportProgressTool-D4KB_4cP.cjs} +1 -1
- package/dist/{run-Bh66Xs40.cjs → run-BC8jzq_h.cjs} +323 -37
- package/dist/{run-DPEwJpQR.mjs → run-O2M8LsWf.mjs} +322 -36
- package/dist/{runClaude-C-lJdAKD.cjs → runClaude-C7jPa8VP.cjs} +87 -25
- package/dist/{runClaude-DLr_nBzw.mjs → runClaude-DGkr5E7s.mjs} +87 -25
- package/dist/{runClaudeDeps-vWWLod7J.cjs → runClaudeDeps-5kzncqME.cjs} +100 -31
- package/dist/{runClaudeDeps-C7JV7nXG.mjs → runClaudeDeps-CX_TxS78.mjs} +105 -36
- package/dist/{runGemini-o-CUSayc.cjs → runGemini-BfYA4Uqc.cjs} +32 -32
- package/dist/{runGemini-tH6sLw-G.mjs → runGemini-CwmGBH3L.mjs} +32 -32
- package/dist/{runOpenClaw-C5DZvVhn.mjs → runOpenClaw-BYAPYFyL.mjs} +16 -16
- package/dist/{runOpenClaw-D24f35l0.cjs → runOpenClaw-C72jut7v.cjs} +16 -16
- package/dist/{sandbox-TJZJ6ngw.cjs → sandbox-Bqkp8IT7.cjs} +4 -4
- package/dist/{sandbox-BaL1aslA.mjs → sandbox-DlVnK1Vi.mjs} +4 -4
- package/dist/{selfCheck-Dugi0Nk_.cjs → selfCheck-B4lLZplk.cjs} +34 -34
- package/dist/selfCheck-DYTGBdIO.mjs +84 -0
- package/dist/{send-DDcJ3ayi.mjs → send-B5bWW9Tl.mjs} +8 -8
- package/dist/{send-CkWOSYmU.cjs → send-BCwS6n_s.cjs} +8 -8
- package/dist/{server-CUjRvQSd.mjs → server-CEJfRQfj.mjs} +4 -4
- package/dist/{server-7qFQ8J2u.cjs → server-CFWZehnC.cjs} +6 -6
- package/dist/{sessionLock-DqVyHFAQ.mjs → sessionLock-AwOYsKT7.mjs} +12 -4
- package/dist/{sessionLock-DfhNICyS.cjs → sessionLock-LBWNjpHf.cjs} +12 -3
- package/dist/{sessionModeFile-CIznKD7O.cjs → sessionModeFile-CyPuZRIU.cjs} +1 -1
- package/dist/{sessionModeFile-M4OpiyrF.mjs → sessionModeFile-fvFn1JVG.mjs} +1 -1
- package/dist/{sessionOps-BnaEaOKs.mjs → sessionOps-DZRH4-hV.mjs} +4 -4
- package/dist/{sessionOps-DOyy4gkY.cjs → sessionOps-DzbZI3Eq.cjs} +4 -4
- package/dist/{sessionScanner-CcuOn9uU.mjs → sessionScanner-Q_Ei2flB.mjs} +3 -3
- package/dist/{sessionScanner-Cu1yKlj4.cjs → sessionScanner-i-cgwFVw.cjs} +3 -3
- package/dist/{sessions-C9O91rL1.mjs → sessions-DAmjMAZN.mjs} +9 -9
- package/dist/{sessions-BQgk5Kw8.cjs → sessions-DYK5hD4T.cjs} +9 -9
- package/dist/{setupOfflineReconnection-Byy8aeKT.mjs → setupOfflineReconnection-BfDBxNdo.mjs} +2 -2
- package/dist/{setupOfflineReconnection-DFmQ8s6I.cjs → setupOfflineReconnection-C2LO3hSP.cjs} +2 -2
- package/dist/{spawn-EZ2yrtWd.mjs → spawn-BmjG5j5Y.mjs} +13 -13
- package/dist/{spawn-BS7LPmSm.cjs → spawn-GK_sXE8h.cjs} +13 -13
- package/dist/{spawnHappyCLI-BAa49m0q.mjs → spawnHappyCLI-B2h0P4b5.mjs} +1 -1
- package/dist/{spawnHappyCLI-DyaldIe5.cjs → spawnHappyCLI-J4iEhfyZ.cjs} +1 -1
- package/dist/{specialCommands-CCWtwIGZ.mjs → specialCommands-DisVxagO.mjs} +3 -3
- package/dist/{specialCommands-DouFaJ_0.cjs → specialCommands-DmJMKspE.cjs} +3 -3
- package/dist/{startFileWatcher-Dfs4whzr.mjs → startFileWatcher-CeK1k5gt.mjs} +1 -1
- package/dist/{startFileWatcher-DQbbypJv.cjs → startFileWatcher-xKo8AoYl.cjs} +1 -1
- package/dist/{sync-x_lI_3j_.cjs → sync-Bvc-vh6C.cjs} +1 -1
- package/dist/{sync-BLpH13Kb.mjs → sync-CCwYpJMS.mjs} +1 -1
- package/dist/{systemPrompt-BanyDihy.mjs → systemPrompt-BNIkP3tR.mjs} +1 -1
- package/dist/{systemPrompt-4erwILTB.cjs → systemPrompt-DwOddbuG.cjs} +1 -1
- package/dist/{teams-D6BOT3lR.mjs → teams-DRrLBcys.mjs} +6 -6
- package/dist/{teams-DzetlGWC.cjs → teams-GHMCRZOw.cjs} +6 -6
- package/dist/{time-T0YmeOhS.cjs → time-BXvtjhe9.cjs} +1 -1
- package/dist/{time-CfDKj6Bx.mjs → time-PG5Dfwdv.mjs} +1 -1
- package/dist/{titleGenerator-CoMxqKfP.cjs → titleGenerator-B07bZA0V.cjs} +2 -2
- package/dist/{titleGenerator-ChImQ4q-.mjs → titleGenerator-CIzfpfZW.mjs} +1 -1
- package/dist/{todo-CZZebKZg.cjs → todo-B0aeoNu3.cjs} +5 -5
- package/dist/{todo-SVtYxGON.mjs → todo-CfL7SBFc.mjs} +5 -5
- package/dist/{tools-3X2z3YDe.mjs → tools-D91mq5Ib.mjs} +1 -1
- package/dist/{tools-IJ0TAcJs.cjs → tools-DJIANHSh.cjs} +1 -1
- package/dist/{uninstall-CypD-kr1.mjs → uninstall-5xz3Xvhf.mjs} +3 -3
- package/dist/{uninstall-CqqCWj7w.cjs → uninstall-AtzOfdrj.cjs} +3 -3
- package/package.json +7 -7
- package/dist/defaultPermissionMode-BnxJPVHT.mjs +0 -4
- package/dist/defaultPermissionMode-CxmTXUQR.cjs +0 -7
- package/dist/mirrorProtocol-BEGk2--0.cjs +0 -266
- package/dist/mirrorProtocol-h5WHpdhh.mjs +0 -248
- package/dist/selfCheck-DPi4lqme.mjs +0 -84
|
@@ -1,39 +1,39 @@
|
|
|
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-B_MWPbZz.cjs');
|
|
4
|
+
var claudeLocal = require('./claudeLocal-CGsq7Kul.cjs');
|
|
5
|
+
var sessionScanner = require('./sessionScanner-i-cgwFVw.cjs');
|
|
6
6
|
require('chalk');
|
|
7
7
|
require('node:util');
|
|
8
|
-
require('./configuration-
|
|
8
|
+
require('./configuration-C3piBtxY.cjs');
|
|
9
9
|
require('node:fs');
|
|
10
10
|
require('node:os');
|
|
11
11
|
require('node:path');
|
|
12
|
-
require('./package-
|
|
12
|
+
require('./package-C9ZP9bpX.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-
|
|
19
|
+
require('./systemPrompt-DwOddbuG.cjs');
|
|
20
20
|
require('./index-C9hI8a10.cjs');
|
|
21
21
|
require('zod');
|
|
22
22
|
require('@paralleldrive/cuid2');
|
|
23
23
|
require('./trimIdent-4gvk9Wk6.cjs');
|
|
24
24
|
require('./agentGuidance-BtBx2xxE.cjs');
|
|
25
|
-
require('./manager-
|
|
25
|
+
require('./manager-HrEj442o.cjs');
|
|
26
26
|
require('@anthropic-ai/sandbox-runtime');
|
|
27
27
|
require('./contentLogMetadata-ZSFk_NjQ.cjs');
|
|
28
28
|
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-Bvc-vh6C.cjs');
|
|
33
|
+
require('./time-BXvtjhe9.cjs');
|
|
34
34
|
require('./types-CRS-srZK.cjs');
|
|
35
35
|
require('./transcriptCursor-DcXGLeSc.cjs');
|
|
36
|
-
require('./startFileWatcher-
|
|
36
|
+
require('./startFileWatcher-xKo8AoYl.cjs');
|
|
37
37
|
require('fs/promises');
|
|
38
38
|
|
|
39
39
|
async function claudeLocalLauncher(session) {
|
|
@@ -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-B_MWPbZz.cjs');
|
|
9
9
|
|
|
10
10
|
class ForkTruncateUuidNotFoundError extends Error {
|
|
11
11
|
constructor(cutAfterUuid, sourcePath) {
|
|
@@ -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-CbBv3q_b.mjs';
|
|
7
7
|
|
|
8
8
|
class ForkTruncateUuidNotFoundError extends Error {
|
|
9
9
|
constructor(cutAfterUuid, sourcePath) {
|
|
@@ -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-C3piBtxY.cjs');
|
|
5
|
+
var persistence = require('./persistence-BYGl0QYw.cjs');
|
|
6
|
+
var context = require('./context-Jrq4-eCZ.cjs');
|
|
7
7
|
|
|
8
8
|
async function teamRequest(path, method, token, scoped, body) {
|
|
9
9
|
const response = await fetch(`${configuration.configuration.serverUrl}${path}`, {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { c as configuration } from './configuration-
|
|
2
|
-
import { readCredentialsForConfiguredRelay, readSettings } from './persistence-
|
|
1
|
+
import { c as configuration } from './configuration-WspKd2C2.mjs';
|
|
2
|
+
import { c as readCredentialsForConfiguredRelay, r as readSettings } from './persistence-ON0zpHfb.mjs';
|
|
3
3
|
|
|
4
4
|
class AutomationsRequestError extends Error {
|
|
5
5
|
constructor(status, code, runStatus) {
|
|
@@ -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-C3piBtxY.cjs');
|
|
4
|
+
var persistence = require('./persistence-BYGl0QYw.cjs');
|
|
5
5
|
|
|
6
6
|
class AutomationsRequestError extends Error {
|
|
7
7
|
constructor(status, code, runStatus) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { randomUUID } from 'node:crypto';
|
|
2
|
-
import { c as configuration } from './configuration-
|
|
3
|
-
import { readSettings, readPersistedSessions, readCredentialsForConfiguredRelay } from './persistence-
|
|
4
|
-
import { r as readTeamScope, t as teamScopePath, w as writeTeamScope } from './context-
|
|
2
|
+
import { c as configuration } from './configuration-WspKd2C2.mjs';
|
|
3
|
+
import { r as readSettings, b as readPersistedSessions, c as readCredentialsForConfiguredRelay } from './persistence-ON0zpHfb.mjs';
|
|
4
|
+
import { r as readTeamScope, t as teamScopePath, w as writeTeamScope } from './context-Cr6a3NTg.mjs';
|
|
5
5
|
|
|
6
6
|
async function teamRequest(path, method, token, scoped, body) {
|
|
7
7
|
const response = await fetch(`${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-DJIANHSh.cjs');
|
|
4
|
+
var reportProgressTool = require('../reportProgressTool-D4KB_4cP.cjs');
|
|
5
|
+
var peerTools = require('../peerTools-Dkbu7gag.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-BKnKRLSt.cjs');
|
|
14
14
|
require('node:crypto');
|
|
15
|
-
require('../configuration-
|
|
15
|
+
require('../configuration-C3piBtxY.cjs');
|
|
16
16
|
require('node:fs');
|
|
17
17
|
require('node:os');
|
|
18
18
|
require('node:path');
|
|
19
|
-
require('../package-
|
|
19
|
+
require('../package-C9ZP9bpX.cjs');
|
|
20
20
|
require('node:fs/promises');
|
|
21
|
-
require('../persistence-
|
|
21
|
+
require('../persistence-BYGl0QYw.cjs');
|
|
22
22
|
require('../authRelay-BdYkC1Po.cjs');
|
|
23
23
|
require('tweetnacl');
|
|
24
|
-
require('../logger-
|
|
24
|
+
require('../logger-B_MWPbZz.cjs');
|
|
25
25
|
require('chalk');
|
|
26
26
|
require('node:util');
|
|
27
|
-
require('../context-
|
|
27
|
+
require('../context-Jrq4-eCZ.cjs');
|
|
28
28
|
require('../index-C9hI8a10.cjs');
|
|
29
29
|
require('@paralleldrive/cuid2');
|
|
30
|
-
require('../client-
|
|
30
|
+
require('../client-D0T5-6Ds.cjs');
|
|
31
31
|
require('../precheckCompat-CWOi5c9L.cjs');
|
|
32
32
|
require('../ids-B6ZC0HGt.cjs');
|
|
33
|
-
require('../controlClient-
|
|
34
|
-
require('../sessionOps-
|
|
33
|
+
require('../controlClient-BI6Fw3fQ.cjs');
|
|
34
|
+
require('../sessionOps-DzbZI3Eq.cjs');
|
|
35
35
|
require('axios');
|
|
36
|
-
require('../time-
|
|
36
|
+
require('../time-BXvtjhe9.cjs');
|
|
37
37
|
require('socket.io-client');
|
|
38
38
|
require('../backgroundTaskActivity-CBvUdj39.cjs');
|
|
39
|
-
require('../remoteSessionClient-
|
|
39
|
+
require('../remoteSessionClient-PyUAIhwK.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-D91mq5Ib.mjs';
|
|
2
|
+
import { r as registerAutomationTools, a as registerReportProgressTool } from '../reportProgressTool-BvB13EwC.mjs';
|
|
3
|
+
import { r as registerSessionPeerTools } from '../peerTools-os2DVjA0.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-Dsfy_SAb.mjs';
|
|
12
12
|
import 'node:crypto';
|
|
13
|
-
import '../configuration-
|
|
13
|
+
import '../configuration-WspKd2C2.mjs';
|
|
14
14
|
import 'node:fs';
|
|
15
15
|
import 'node:os';
|
|
16
16
|
import 'node:path';
|
|
17
|
-
import '../package-
|
|
17
|
+
import '../package-DU1DxhH9.mjs';
|
|
18
18
|
import 'node:fs/promises';
|
|
19
|
-
import '../persistence-
|
|
19
|
+
import '../persistence-ON0zpHfb.mjs';
|
|
20
20
|
import '../authRelay-DSAvg1uv.mjs';
|
|
21
21
|
import 'tweetnacl';
|
|
22
|
-
import '../logger-
|
|
22
|
+
import '../logger-CbBv3q_b.mjs';
|
|
23
23
|
import 'chalk';
|
|
24
24
|
import 'node:util';
|
|
25
|
-
import '../context-
|
|
25
|
+
import '../context-Cr6a3NTg.mjs';
|
|
26
26
|
import '../index-B0HEEYGh.mjs';
|
|
27
27
|
import '@paralleldrive/cuid2';
|
|
28
|
-
import '../client-
|
|
28
|
+
import '../client-C7FYMer0.mjs';
|
|
29
29
|
import '../precheckCompat-DeEbilbr.mjs';
|
|
30
30
|
import '../ids-DU6sLx4C.mjs';
|
|
31
|
-
import '../controlClient-
|
|
32
|
-
import '../sessionOps-
|
|
31
|
+
import '../controlClient-DTheOlvC.mjs';
|
|
32
|
+
import '../sessionOps-DZRH4-hV.mjs';
|
|
33
33
|
import 'axios';
|
|
34
|
-
import '../time-
|
|
34
|
+
import '../time-PG5Dfwdv.mjs';
|
|
35
35
|
import 'socket.io-client';
|
|
36
36
|
import '../backgroundTaskActivity-8PdPxrvy.mjs';
|
|
37
|
-
import '../remoteSessionClient-
|
|
37
|
+
import '../remoteSessionClient-BzPXSC21.mjs';
|
|
38
38
|
import '../trimIdent-BAjmv_TG.mjs';
|
|
39
39
|
|
|
40
40
|
function parseArgs(argv) {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { execSync } from 'node:child_process';
|
|
2
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-CbBv3q_b.mjs';
|
|
5
5
|
import { e as errorLogMetadata, c as contentLogMetadata } from './contentLogMetadata-BlWI0egu.mjs';
|
|
6
|
-
import { i as initializeSandbox, w as wrapForMcpTransport } from './manager-
|
|
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-DU1DxhH9.mjs';
|
|
8
|
+
import { s as shouldReadCodexRateLimits, i as isUnsupportedCodexMethodError } from './rateLimitWindows-vZ9Bo7aT.mjs';
|
|
9
9
|
|
|
10
10
|
function isAppServerAvailable() {
|
|
11
11
|
try {
|
|
@@ -3,11 +3,11 @@
|
|
|
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-B_MWPbZz.cjs');
|
|
7
7
|
var contentLogMetadata = require('./contentLogMetadata-ZSFk_NjQ.cjs');
|
|
8
|
-
var manager = require('./manager-
|
|
9
|
-
var _package = require('./package-
|
|
10
|
-
var rateLimitWindows = require('./rateLimitWindows-
|
|
8
|
+
var manager = require('./manager-HrEj442o.cjs');
|
|
9
|
+
var _package = require('./package-C9ZP9bpX.cjs');
|
|
10
|
+
var rateLimitWindows = require('./rateLimitWindows-CusGIqlq.cjs');
|
|
11
11
|
|
|
12
12
|
function isAppServerAvailable() {
|
|
13
13
|
try {
|
|
@@ -1,96 +1,96 @@
|
|
|
1
|
-
import { a as authAndSetupMachineIfNeeded } from './auth-
|
|
1
|
+
import { a as authAndSetupMachineIfNeeded } from './auth-CFS9Lfgv.mjs';
|
|
2
2
|
import { c as createEnvelope, o as BUILTIN_TODO_DISCOVERY, P as PROMPT_QUEUE_CAPABILITY } from './index-B0HEEYGh.mjs';
|
|
3
3
|
import { p as publishForkBackfillWhenCommitted, F as FORK_BACKFILL_CAPABILITY } from './forkBackfill-DYIjlN1Z.mjs';
|
|
4
4
|
import { randomUUID } from 'node:crypto';
|
|
5
5
|
import { createId } from '@paralleldrive/cuid2';
|
|
6
6
|
import { r as registerAgentAttachmentDownloads } from './agentAttachments-M_B5qEF2.mjs';
|
|
7
|
-
import { C as CLAUDE_ATTACHMENT_KINDS, a as stageClaudeAttachments, b as appendStagedAttachmentsToPrompt } from './attachmentContent-
|
|
7
|
+
import { C as CLAUDE_ATTACHMENT_KINDS, a as stageClaudeAttachments, b as appendStagedAttachmentsToPrompt } from './attachmentContent-j875mwU7.mjs';
|
|
8
8
|
import { useStdout, useInput, Box, Text, render } from 'ink';
|
|
9
|
-
import { c as claimSessionOrExit, a as applyServerSnapshot, w as withoutServerSnapshot, m as mergeReconnectMetadata } from './sessionLock-
|
|
9
|
+
import { c as claimSessionOrExit, a as applyServerSnapshot, b as applyHibernationReplay, w as withoutServerSnapshot, m as mergeReconnectMetadata } from './sessionLock-AwOYsKT7.mjs';
|
|
10
10
|
import React, { useState, useRef, useEffect, useCallback } from 'react';
|
|
11
|
-
import { c as connectionState, A as ApiClient } from './api-
|
|
12
|
-
import { C as CodexAppServerClient } from './codexAppServerClient-
|
|
13
|
-
import { p as parseSpecialCommand, w as wrapperRateLimitReporter } from './specialCommands-
|
|
14
|
-
import { l as logger } from './logger-
|
|
15
|
-
import { B as BasePermissionHandler } from './BasePermissionHandler-
|
|
16
|
-
import { B as BaseReasoningProcessor } from './BaseReasoningProcessor-
|
|
11
|
+
import { c as connectionState, A as ApiClient } from './api-CReZazeT.mjs';
|
|
12
|
+
import { C as CodexAppServerClient } from './codexAppServerClient-Dd_4TxHv.mjs';
|
|
13
|
+
import { p as parseSpecialCommand, w as wrapperRateLimitReporter } from './specialCommands-DisVxagO.mjs';
|
|
14
|
+
import { l as logger } from './logger-CbBv3q_b.mjs';
|
|
15
|
+
import { B as BasePermissionHandler } from './BasePermissionHandler-DS0kRTNI.mjs';
|
|
16
|
+
import { B as BaseReasoningProcessor } from './BaseReasoningProcessor-BRtCCt7q.mjs';
|
|
17
17
|
import { execSync } from 'node:child_process';
|
|
18
|
-
import { readSettings } from './persistence-
|
|
19
|
-
import { g as getInitialMachineMetadata } from './machineMetadata-
|
|
20
|
-
import { c as configuration } from './configuration-
|
|
21
|
-
import { M as MessageQueue2, r as registerKillSessionHandler } from './registerKillSessionHandler-
|
|
18
|
+
import { r as readSettings, l as latchKeepAwake, e as evaluateWrapperIdle, a as resolveCheckMs, H as HIBERNATION_CAPABILITY } from './persistence-ON0zpHfb.mjs';
|
|
19
|
+
import { g as getInitialMachineMetadata } from './machineMetadata-DHg238U4.mjs';
|
|
20
|
+
import { c as configuration } from './configuration-WspKd2C2.mjs';
|
|
21
|
+
import { M as MessageQueue2, r as registerKillSessionHandler } from './registerKillSessionHandler-BJMHJHXe.mjs';
|
|
22
22
|
import { p as projectPath } from './projectPath-BTBIMB57.mjs';
|
|
23
23
|
import { join } from 'node:path';
|
|
24
|
-
import { c as createSessionMetadata } from './createSessionMetadata-
|
|
25
|
-
import { h as hashObject, s as startHappyServer } from './deterministicJson-
|
|
24
|
+
import { c as createSessionMetadata } from './createSessionMetadata-BEZ4DIDA.mjs';
|
|
25
|
+
import { h as hashObject, s as startHappyServer } from './deterministicJson-BMMifViN.mjs';
|
|
26
26
|
import { M as MessageBuffer } from './messageBuffer-BWlGgR3A.mjs';
|
|
27
|
-
import { n as notifyDaemonSessionStarted,
|
|
27
|
+
import { n as notifyDaemonSessionStarted, j as reportSessionEditToDaemon, c as checkDaemonHibernation } from './controlClient-DTheOlvC.mjs';
|
|
28
|
+
import { a as HibernationExitLatch, H as HibernationProbe, c as commitHibernation, b as DEFAULT_CODEX_PERMISSION_MODE } from './defaultPermissionMode-Cif_RHGb.mjs';
|
|
28
29
|
import { d as decodeBase64, e as encodeBase64 } from './authRelay-DSAvg1uv.mjs';
|
|
29
|
-
import { s as setupOfflineReconnection } from './setupOfflineReconnection-
|
|
30
|
+
import { s as setupOfflineReconnection } from './setupOfflineReconnection-BfDBxNdo.mjs';
|
|
30
31
|
import { t as trimIdent } from './trimIdent-BAjmv_TG.mjs';
|
|
31
32
|
import { C as CHANGE_TITLE_INSTRUCTION } from './constants-BC4St0xd.mjs';
|
|
32
|
-
import { a as DEFAULT_CODEX_PERMISSION_MODE } from './defaultPermissionMode-BnxJPVHT.mjs';
|
|
33
33
|
import { E as EditReportThrottle, a as extractCodexPatchPaths } from './editPaths-BVfS_FFL.mjs';
|
|
34
|
-
import { a as extractNoSandboxFlag, e as ensureDaemonRunning } from './ensureDaemonRunning-
|
|
34
|
+
import { a as extractNoSandboxFlag, e as ensureDaemonRunning } from './ensureDaemonRunning-Ba5fYoxb.mjs';
|
|
35
35
|
import 'tweetnacl';
|
|
36
36
|
import 'axios';
|
|
37
|
-
import './time-
|
|
38
|
-
import './browser-
|
|
37
|
+
import './time-PG5Dfwdv.mjs';
|
|
38
|
+
import './browser-BCFIHOvo.mjs';
|
|
39
39
|
import 'open';
|
|
40
40
|
import 'zod';
|
|
41
41
|
import 'node:fs/promises';
|
|
42
|
-
import './attachmentLimits-
|
|
42
|
+
import './attachmentLimits-CxG3T18E.mjs';
|
|
43
43
|
import 'node:fs';
|
|
44
|
-
import './lidState-
|
|
44
|
+
import './lidState-B2ZxdREe.mjs';
|
|
45
45
|
import 'os';
|
|
46
46
|
import 'child_process';
|
|
47
47
|
import 'node:events';
|
|
48
48
|
import 'socket.io-client';
|
|
49
49
|
import './limits-DIo7rEBR.mjs';
|
|
50
|
-
import './registerCommonHandlers-
|
|
50
|
+
import './registerCommonHandlers-B0PVff2U.mjs';
|
|
51
51
|
import 'util';
|
|
52
52
|
import 'fs/promises';
|
|
53
53
|
import 'crypto';
|
|
54
54
|
import 'path';
|
|
55
55
|
import 'cross-spawn';
|
|
56
|
-
import './sync-
|
|
56
|
+
import './sync-CCwYpJMS.mjs';
|
|
57
57
|
import './backgroundTaskActivity-8PdPxrvy.mjs';
|
|
58
58
|
import './contentLogMetadata-BlWI0egu.mjs';
|
|
59
59
|
import 'chalk';
|
|
60
60
|
import 'node:readline';
|
|
61
|
-
import './manager-
|
|
61
|
+
import './manager-BEsI4qt3.mjs';
|
|
62
62
|
import '@anthropic-ai/sandbox-runtime';
|
|
63
63
|
import 'node:os';
|
|
64
|
-
import './package-
|
|
65
|
-
import './rateLimitWindows-
|
|
64
|
+
import './package-DU1DxhH9.mjs';
|
|
65
|
+
import './rateLimitWindows-vZ9Bo7aT.mjs';
|
|
66
66
|
import 'node:util';
|
|
67
67
|
import './detectCLI-CSGMlV51.mjs';
|
|
68
68
|
import 'fs';
|
|
69
|
-
import './localHappyAgentAuth-
|
|
69
|
+
import './localHappyAgentAuth-B5XPEMwk.mjs';
|
|
70
70
|
import './types-CkqAACXx.mjs';
|
|
71
71
|
import 'url';
|
|
72
|
-
import './client-
|
|
73
|
-
import './context-
|
|
74
|
-
import './sessionOps-
|
|
72
|
+
import './client-Dsfy_SAb.mjs';
|
|
73
|
+
import './context-Cr6a3NTg.mjs';
|
|
74
|
+
import './sessionOps-DZRH4-hV.mjs';
|
|
75
75
|
import './resources-BdFBQi8r.mjs';
|
|
76
|
-
import './tools-
|
|
77
|
-
import './reportProgressTool-
|
|
78
|
-
import './client-
|
|
76
|
+
import './tools-D91mq5Ib.mjs';
|
|
77
|
+
import './reportProgressTool-BvB13EwC.mjs';
|
|
78
|
+
import './client-C7FYMer0.mjs';
|
|
79
79
|
import './precheckCompat-DeEbilbr.mjs';
|
|
80
80
|
import './agentGuidance-BDYt2Qy2.mjs';
|
|
81
|
-
import './peerTools-
|
|
81
|
+
import './peerTools-os2DVjA0.mjs';
|
|
82
82
|
import './ids-DU6sLx4C.mjs';
|
|
83
|
-
import './remoteSessionClient-
|
|
83
|
+
import './remoteSessionClient-BzPXSC21.mjs';
|
|
84
84
|
import '@modelcontextprotocol/sdk/server/mcp.js';
|
|
85
85
|
import 'node:http';
|
|
86
86
|
import '@modelcontextprotocol/sdk/server/streamableHttp.js';
|
|
87
|
-
import './downloadTarget-
|
|
87
|
+
import './downloadTarget-Cp48jrIP.mjs';
|
|
88
88
|
import './terminals-Dlg0x3nY.mjs';
|
|
89
89
|
import './terminalTitleSuggest-CeKsX_V6.mjs';
|
|
90
90
|
import './tmuxSocket-B8Yx20sT.mjs';
|
|
91
|
-
import './bootstrap-
|
|
91
|
+
import './bootstrap-BSOxYpaP.mjs';
|
|
92
92
|
import './previewPath-CXN4Vag0.mjs';
|
|
93
|
-
import './spawnHappyCLI-
|
|
93
|
+
import './spawnHappyCLI-B2h0P4b5.mjs';
|
|
94
94
|
import './doctorReadiness-C208SMN9.mjs';
|
|
95
95
|
|
|
96
96
|
function getStartedSubagents(state) {
|
|
@@ -929,6 +929,29 @@ const CodexDisplay = ({ messageBuffer, logPath, onExit }) => {
|
|
|
929
929
|
));
|
|
930
930
|
};
|
|
931
931
|
|
|
932
|
+
async function settleCodexSession(session, intent, deactivate, log = () => {
|
|
933
|
+
}) {
|
|
934
|
+
if (intent === "archive") {
|
|
935
|
+
session.updateMetadata((currentMetadata) => ({
|
|
936
|
+
...currentMetadata,
|
|
937
|
+
lifecycleState: "archived",
|
|
938
|
+
lifecycleStateSince: Date.now(),
|
|
939
|
+
archivedBy: "cli",
|
|
940
|
+
archiveReason: "User terminated"
|
|
941
|
+
}));
|
|
942
|
+
}
|
|
943
|
+
session.sendSessionDeath();
|
|
944
|
+
await session.flush();
|
|
945
|
+
if (intent === "offline") {
|
|
946
|
+
try {
|
|
947
|
+
await deactivate(session.sessionId);
|
|
948
|
+
} catch (error) {
|
|
949
|
+
log("[Codex] deactivate on signal failed", error);
|
|
950
|
+
}
|
|
951
|
+
}
|
|
952
|
+
await session.close();
|
|
953
|
+
}
|
|
954
|
+
|
|
932
955
|
function resolveCodexExecutionPolicy(permissionMode, sandboxManagedByHappy) {
|
|
933
956
|
if (sandboxManagedByHappy) {
|
|
934
957
|
return {
|
|
@@ -1293,7 +1316,7 @@ async function runCodex(opts) {
|
|
|
1293
1316
|
dangerouslySkipPermissions: initialPermissionMode === "yolo" || initialPermissionMode === "bypassPermissions",
|
|
1294
1317
|
...forkedFromSessionId ? { parentSessionId: forkedFromSessionId } : {},
|
|
1295
1318
|
...forkedFromMessageId ? { forkedFromMessageId } : {},
|
|
1296
|
-
capabilities: [PROMPT_QUEUE_CAPABILITY, FORK_BACKFILL_CAPABILITY]
|
|
1319
|
+
capabilities: [PROMPT_QUEUE_CAPABILITY, FORK_BACKFILL_CAPABILITY, HIBERNATION_CAPABILITY]
|
|
1297
1320
|
});
|
|
1298
1321
|
metadata.attachmentKinds = [...CLAUDE_ATTACHMENT_KINDS];
|
|
1299
1322
|
const importCodexThreadId = process.env[IMPORT_CODEX_THREAD_ENV];
|
|
@@ -1331,12 +1354,16 @@ async function runCodex(opts) {
|
|
|
1331
1354
|
throw new Error(`Failed to reactivate archived session ${response.id}`);
|
|
1332
1355
|
}
|
|
1333
1356
|
let reconnectSeeded = false;
|
|
1357
|
+
let wakingFromHibernation = false;
|
|
1334
1358
|
if (reconnectSessionId && response) {
|
|
1335
1359
|
const snapshot = await api.getSession(response.id, response.encryptionKey, response.encryptionVariant);
|
|
1336
1360
|
if (snapshot.ok) {
|
|
1337
1361
|
response = applyServerSnapshot(response, snapshot.session);
|
|
1338
1362
|
reconnectSeeded = true;
|
|
1339
1363
|
logger.debug(`[START] Reconnect seeded from server: seq=${snapshot.session.seq} metadataVersion=${snapshot.session.metadataVersion}`);
|
|
1364
|
+
const wake = applyHibernationReplay(response);
|
|
1365
|
+
response = wake.response;
|
|
1366
|
+
wakingFromHibernation = wake.replaying;
|
|
1340
1367
|
} else {
|
|
1341
1368
|
response = withoutServerSnapshot(response);
|
|
1342
1369
|
logger.debug(`[START] Reconnect without server snapshot (${snapshot.reason}); skipping existing messages`);
|
|
@@ -1367,7 +1394,7 @@ async function runCodex(opts) {
|
|
|
1367
1394
|
if (reconnectSessionId) {
|
|
1368
1395
|
session.suppressNextArchiveSignal();
|
|
1369
1396
|
if (!reconnectSeeded) session.skipExistingMessages();
|
|
1370
|
-
void session.cancelUndeliveredQueuedInputs();
|
|
1397
|
+
if (!wakingFromHibernation) void session.cancelUndeliveredQueuedInputs();
|
|
1371
1398
|
session.updateMetadata((meta) => mergeReconnectMetadata(meta, metadata, Date.now()));
|
|
1372
1399
|
}
|
|
1373
1400
|
if (response) {
|
|
@@ -1531,6 +1558,9 @@ async function runCodex(opts) {
|
|
|
1531
1558
|
}
|
|
1532
1559
|
let abortController = new AbortController();
|
|
1533
1560
|
let shouldExit = false;
|
|
1561
|
+
const hibernationExit = new HibernationExitLatch((a, b) => a === "archive" && b !== "archive");
|
|
1562
|
+
let hibernationStamp = null;
|
|
1563
|
+
let hibernationProbe = null;
|
|
1534
1564
|
async function handleAbort(source) {
|
|
1535
1565
|
if (abortInProgress) {
|
|
1536
1566
|
await abortInProgress;
|
|
@@ -1573,23 +1603,16 @@ async function runCodex(opts) {
|
|
|
1573
1603
|
await abortInProgress;
|
|
1574
1604
|
abortInProgress = null;
|
|
1575
1605
|
}
|
|
1576
|
-
const handleKillSession = async () => {
|
|
1606
|
+
const handleKillSession = async (intent = "archive") => {
|
|
1607
|
+
if (hibernationExit.intercept(intent)) {
|
|
1608
|
+
logger.debug(`[Codex] ${intent} exit deferred: hibernation in progress`);
|
|
1609
|
+
return;
|
|
1610
|
+
}
|
|
1577
1611
|
logger.debug("[Codex] Kill session requested - terminating process");
|
|
1578
1612
|
await handleAbort("kill");
|
|
1579
1613
|
logger.debug("[Codex] Abort completed, proceeding with termination");
|
|
1580
1614
|
try {
|
|
1581
|
-
if (session)
|
|
1582
|
-
session.updateMetadata((currentMetadata) => ({
|
|
1583
|
-
...currentMetadata,
|
|
1584
|
-
lifecycleState: "archived",
|
|
1585
|
-
lifecycleStateSince: Date.now(),
|
|
1586
|
-
archivedBy: "cli",
|
|
1587
|
-
archiveReason: "User terminated"
|
|
1588
|
-
}));
|
|
1589
|
-
session.sendSessionDeath();
|
|
1590
|
-
await session.flush();
|
|
1591
|
-
await session.close();
|
|
1592
|
-
}
|
|
1615
|
+
if (session) await settleCodexSession(session, intent, (id) => api.deactivateSession(id), (m, e) => logger.debug(m, safeCodexErrorMetadata(e)));
|
|
1593
1616
|
try {
|
|
1594
1617
|
await client.disconnect();
|
|
1595
1618
|
} catch (e) {
|
|
@@ -1611,7 +1634,7 @@ async function runCodex(opts) {
|
|
|
1611
1634
|
}
|
|
1612
1635
|
});
|
|
1613
1636
|
session.rpcHandlerManager.registerHandler("abort", () => handleAbort("user"));
|
|
1614
|
-
const disposeTermination = registerKillSessionHandler(session.rpcHandlerManager, handleKillSession, session, { processSignals: true });
|
|
1637
|
+
const disposeTermination = registerKillSessionHandler(session.rpcHandlerManager, () => handleKillSession("archive"), session, { processSignals: true, onSignal: () => handleKillSession("offline") });
|
|
1615
1638
|
const messageBuffer = new MessageBuffer();
|
|
1616
1639
|
const hasTTY = process.stdout.isTTY && process.stdin.isTTY;
|
|
1617
1640
|
let inkInstance = null;
|
|
@@ -1863,6 +1886,54 @@ async function runCodex(opts) {
|
|
|
1863
1886
|
}
|
|
1864
1887
|
}
|
|
1865
1888
|
let pending = null;
|
|
1889
|
+
if (opts.startedBy === "daemon" && !hasTTY && process.env.HAPPY_SESSION_VARIANT !== "assistant") {
|
|
1890
|
+
let keepAwakeLatch = false;
|
|
1891
|
+
const hibernationSnapshot = () => {
|
|
1892
|
+
const meta = session.getMetadata();
|
|
1893
|
+
return {
|
|
1894
|
+
flavor: "codex",
|
|
1895
|
+
resumable: typeof meta?.codexThreadId === "string" && meta.codexThreadId.length > 0,
|
|
1896
|
+
uiSession: true,
|
|
1897
|
+
...process.env.HAPPY_SPAWNED_BY ? { spawnedBy: process.env.HAPPY_SPAWNED_BY } : {},
|
|
1898
|
+
...meta?.tags ? { tags: meta.tags } : {},
|
|
1899
|
+
keepAwake: keepAwakeLatch = latchKeepAwake(meta?.keepAwake, keepAwakeLatch),
|
|
1900
|
+
...typeof meta?.keepAwake === "boolean" ? { keepAwakeSetting: meta.keepAwake } : {},
|
|
1901
|
+
thinking: thinking || turnActive,
|
|
1902
|
+
queuedInputs: messageQueue.size() + (session.promptQueueHasPending() ? 1 : 0),
|
|
1903
|
+
waitingForInput: messageQueue.isWaiting(),
|
|
1904
|
+
pendingRequests: Object.keys(session.getAgentState()?.requests ?? {}).length,
|
|
1905
|
+
backgroundTasks: codexActiveSubagents.size,
|
|
1906
|
+
lastActivityAt: session.lastActivityAt,
|
|
1907
|
+
...shouldExit && !hibernationExit.hibernating ? { exiting: true } : {}
|
|
1908
|
+
};
|
|
1909
|
+
};
|
|
1910
|
+
hibernationProbe = new HibernationProbe({
|
|
1911
|
+
onKeepAwakeLatched: () => {
|
|
1912
|
+
if (session.getMetadata()?.keepAwake === void 0) session.updateMetadata((m) => m.keepAwake === void 0 ? { ...m, keepAwake: true } : m);
|
|
1913
|
+
},
|
|
1914
|
+
checkMs: resolveCheckMs(),
|
|
1915
|
+
snapshot: hibernationSnapshot,
|
|
1916
|
+
ask: (report) => checkDaemonHibernation({ sessionId: session.sessionId, pid: process.pid, report }),
|
|
1917
|
+
commit: (idleMs) => commitHibernation({
|
|
1918
|
+
client: session,
|
|
1919
|
+
claimExit: () => !shouldExit && hibernationExit.begin(),
|
|
1920
|
+
exitRequested: () => hibernationExit.exitRequested,
|
|
1921
|
+
markCommitted: () => hibernationExit.commit(),
|
|
1922
|
+
releaseExit: () => {
|
|
1923
|
+
const deferred = hibernationExit.release();
|
|
1924
|
+
if (deferred) void handleKillSession(deferred);
|
|
1925
|
+
},
|
|
1926
|
+
recheck: () => evaluateWrapperIdle(hibernationSnapshot(), idleMs, Date.now()),
|
|
1927
|
+
idleMs,
|
|
1928
|
+
finish: async (stamp) => {
|
|
1929
|
+
hibernationStamp = stamp;
|
|
1930
|
+
shouldExit = true;
|
|
1931
|
+
abortController.abort();
|
|
1932
|
+
}
|
|
1933
|
+
})
|
|
1934
|
+
});
|
|
1935
|
+
hibernationProbe.start();
|
|
1936
|
+
}
|
|
1866
1937
|
idleRelease.arm();
|
|
1867
1938
|
while (!shouldExit) {
|
|
1868
1939
|
logActiveHandles("loop-top");
|
|
@@ -1999,6 +2070,7 @@ async function runCodex(opts) {
|
|
|
1999
2070
|
}
|
|
2000
2071
|
} finally {
|
|
2001
2072
|
disposeTermination?.();
|
|
2073
|
+
hibernationProbe?.stop();
|
|
2002
2074
|
session.closePromptQueueDrain();
|
|
2003
2075
|
logger.debug("[codex]: Final cleanup start");
|
|
2004
2076
|
logActiveHandles("cleanup-start");
|
|
@@ -2047,6 +2119,15 @@ async function runCodex(opts) {
|
|
|
2047
2119
|
messageBuffer.clear();
|
|
2048
2120
|
logActiveHandles("cleanup-end");
|
|
2049
2121
|
logger.debug("[codex]: Final cleanup completed");
|
|
2122
|
+
if (hibernationExit.hibernating && hibernationStamp) {
|
|
2123
|
+
try {
|
|
2124
|
+
await api.deactivateSession(session.sessionId);
|
|
2125
|
+
} catch (error) {
|
|
2126
|
+
logger.debug("[codex]: deactivate after hibernation failed", safeCodexErrorMetadata(error));
|
|
2127
|
+
}
|
|
2128
|
+
logger.debug("[codex]: hibernated; exiting");
|
|
2129
|
+
process.exit(0);
|
|
2130
|
+
}
|
|
2050
2131
|
}
|
|
2051
2132
|
}
|
|
2052
2133
|
|