very-happy-cli 0.2.179 → 0.2.180
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-CHp3y7cb.mjs → AcpBackend-B8Zi30Zh.mjs} +3 -3
- package/dist/{AcpBackend-DFipFF7-.cjs → AcpBackend-DfRDtMcG.cjs} +3 -3
- package/dist/{AcpSessionManager-0zpvRJXc.cjs → AcpSessionManager-CASKOnOj.cjs} +1 -1
- package/dist/{AcpSessionManager-d2-rKWWa.mjs → AcpSessionManager-i8Rab0xT.mjs} +1 -1
- package/dist/{BasePermissionHandler-DdZBYIR4.mjs → BasePermissionHandler-26fKbRCm.mjs} +1 -1
- package/dist/{BasePermissionHandler-CH3zuEkA.cjs → BasePermissionHandler-BlM_tfej.cjs} +1 -1
- package/dist/{acpSessionResume-DTGmAPLt.mjs → acpSessionResume-B9l54P-X.mjs} +1 -1
- package/dist/{acpSessionResume-oiCBnAVA.cjs → acpSessionResume-CR5pmgVo.cjs} +1 -1
- package/dist/{agentHome-BWcz8mz0.cjs → agentHome-C7Sb7-Tz.cjs} +4 -4
- package/dist/{agentHome-CghLvL_1.mjs → agentHome-CmGy0NWv.mjs} +4 -4
- package/dist/{api-Cmjfr8Z7.cjs → api-DM7b1OKj.cjs} +20 -12
- package/dist/{api-CzwFpJQc.mjs → api-Hov8p7CA.mjs} +21 -13
- package/dist/{apiMachine-DJkTEiqy.mjs → apiMachine-CwGEhQDT.mjs} +33 -14
- package/dist/{apiMachine-G6OogT08.cjs → apiMachine-DkGRj-Ai.cjs} +35 -16
- package/dist/{attachmentContent-Bo0UAsSu.cjs → attachmentContent-CEm13_gF.cjs} +2 -2
- package/dist/{attachmentContent-B2os4HbA.mjs → attachmentContent-CIn4iPEk.mjs} +2 -2
- package/dist/{auth-BS6PaOOG.mjs → auth-BG1DY0gj.mjs} +5 -5
- package/dist/{auth-D6bBUwZa.cjs → auth-CBXnm-Mj.cjs} +5 -5
- package/dist/{auth-HEhRaNgL.cjs → auth-Dawj7pP5.cjs} +8 -8
- package/dist/{auth-DMX0xPNK.mjs → auth-rggxMpEE.mjs} +8 -8
- package/dist/{auto-Cl1SEDcD.mjs → auto-CXXLXGeL.mjs} +17 -17
- package/dist/{auto-C6I55iOh.cjs → auto-CbYOfoPS.cjs} +17 -17
- package/dist/{backgroundTaskActivity-BVwJBl02.mjs → backgroundTaskActivity-8PdPxrvy.mjs} +1 -1
- package/dist/{bootstrap-exVucYav.cjs → bootstrap-DoA7okld.cjs} +2 -2
- package/dist/{bootstrap-iuyufnp3.mjs → bootstrap-Dt5I1SOl.mjs} +2 -2
- package/dist/{browser-CSYum7xH.mjs → browser-DUNetFT4.mjs} +1 -1
- package/dist/{browser-BohJK12g.cjs → browser-DZ6qRtfH.cjs} +1 -1
- package/dist/{claudeCliPath-U4HHmV4r.cjs → claudeCliPath-GaP3UUz1.cjs} +1 -1
- package/dist/{claudeLocal-re4yjSTx.cjs → claudeLocal--DNyMOSv.cjs} +7 -7
- package/dist/{claudeLocal-Dq_R3Ax_.mjs → claudeLocal-OHWQigCl.mjs} +5 -5
- package/dist/{claudeLocalLauncher-CN67lN7-.mjs → claudeLocalLauncher-BStvfa7M.mjs} +10 -10
- package/dist/{claudeLocalLauncher-B4hJHpCA.cjs → claudeLocalLauncher-BhvPbcyH.cjs} +12 -12
- package/dist/{claudeSessionFork-DiSMYerV.cjs → claudeSessionFork-Be16vzGc.cjs} +1 -1
- package/dist/{claudeSessionFork-BihfD0Ik.mjs → claudeSessionFork-GAVWhiKG.mjs} +1 -1
- package/dist/{client-CuVdN6PP.cjs → client-BWjaHKtj.cjs} +2 -2
- package/dist/{client-BhoEBnuN.mjs → client-Ca5Pcgy_.mjs} +2 -2
- package/dist/{client-wo9nbxuf.mjs → client-CnB7kRCT.mjs} +2 -2
- package/dist/{client-DuTDwWSQ.mjs → client-D4uPb1uu.mjs} +3 -3
- package/dist/{client-ZjOsn6nZ.cjs → client-DJplzPjD.cjs} +2 -2
- package/dist/{client-BKcK1Bi-.cjs → client-D_loZ9IK.cjs} +3 -3
- package/dist/codex/happyMcpStdioBridge.cjs +16 -16
- package/dist/codex/happyMcpStdioBridge.mjs +17 -17
- package/dist/{codexAppServerClient-BK3zra_1.mjs → codexAppServerClient-CO4G6OS4.mjs} +3 -3
- package/dist/{codexAppServerClient-Dt5zxrun.cjs → codexAppServerClient-PE-12AsW.cjs} +3 -3
- package/dist/{codexCommand-CAZ1SLjg.cjs → codexCommand-BNoD1t1C.cjs} +80 -74
- package/dist/{codexCommand-B6pY7CMh.mjs → codexCommand-B_xUH79E.mjs} +54 -48
- package/dist/{codexTermination-DmGbHxcD.cjs → codexTermination-BmBbizFK.cjs} +7 -2
- package/dist/{codexTermination-Cd1Eon_4.mjs → codexTermination-Dx48ma6e.mjs} +7 -2
- package/dist/{config-B0uK6K7n.cjs → config-CtwEUxUP.cjs} +26 -26
- package/dist/{config-2oMG_fEI.mjs → config-DSu0Blos.mjs} +3 -3
- package/dist/{configuration-CMHZnp6G.cjs → configuration-CYO-kPOS.cjs} +1 -1
- package/dist/{configuration-WMi4idBB.mjs → configuration-PxzEJumr.mjs} +1 -1
- package/dist/{connect-BLVHhHzA.mjs → connect-BQrg3TB6.mjs} +14 -14
- package/dist/{connect-uaglGrde.cjs → connect-Dq7wndzR.cjs} +27 -27
- package/dist/{context-DXzU5bFM.cjs → context-6TP-iz_c.cjs} +1 -1
- package/dist/{context-DploEcoN.mjs → context-CJGRRGWW.mjs} +1 -1
- package/dist/{controlClient-C-5qCt8W.cjs → controlClient-Bqv5v5OM.cjs} +3 -3
- package/dist/{controlClient-BWUJrj3t.mjs → controlClient-DoeYovwP.mjs} +4 -4
- package/dist/{createSessionMetadata-3uXrJgOW.mjs → createSessionMetadata-DDIChCx8.mjs} +2 -2
- package/dist/{createSessionMetadata-BkIzHALd.cjs → createSessionMetadata-xz767pcG.cjs} +3 -3
- package/dist/{defaultPermissionMode-pS3vmiSg.cjs → defaultPermissionMode-PkZGsQDk.cjs} +2 -2
- package/dist/{defaultPermissionMode-BzxLh20a.mjs → defaultPermissionMode-i5KzdK09.mjs} +2 -2
- package/dist/{detectCLI-DR9ZaN6B.cjs → detectCLI-BuYR_Qxe.cjs} +4 -4
- package/dist/{deterministicJson-D_whDMFd.mjs → deterministicJson-CTEJDqtS.mjs} +12 -12
- package/dist/{deterministicJson-B8z2GPi9.cjs → deterministicJson-xqA6DaOm.cjs} +14 -14
- package/dist/{doctor-Br1Kcy2J.cjs → doctor-BrgSlfXn.cjs} +9 -9
- package/dist/{doctor-CmtSsR2-.mjs → doctor-IctjVh9T.mjs} +8 -8
- package/dist/{doctorReadiness-BCZGcN0a.cjs → doctorReadiness-Dl6yRQCy.cjs} +1 -1
- package/dist/{downloadTarget-BQJK_6oH.cjs → downloadTarget-CEb9che-.cjs} +6 -6
- package/dist/{downloadTarget-BoNwTIH_.mjs → downloadTarget-jbOz1egC.mjs} +6 -6
- package/dist/{ensureDaemonRunning-BRUmsq6J.cjs → ensureDaemonRunning-D-HyjGIX.cjs} +6 -6
- package/dist/{ensureDaemonRunning-Czo9IHJQ.mjs → ensureDaemonRunning-b1e8LCSM.mjs} +5 -5
- package/dist/{handleResumeCommand-tKD_Hpxc.cjs → handleResumeCommand-BvWVuRwH.cjs} +7 -7
- package/dist/{handleResumeCommand-C8thKjqf.mjs → handleResumeCommand-DpaZvm2c.mjs} +6 -6
- package/dist/{index-DMqDMT1Q.cjs → index-B2p2Mut7.cjs} +42 -41
- package/dist/{index-BTxHphpV.mjs → index-BUNnpGFF.mjs} +42 -41
- package/dist/{index-CdQI0C9p.mjs → index-Bsvbgh9e.mjs} +4 -4
- package/dist/{index-B0UjHlAe.cjs → index-C64Ufj4D.cjs} +4 -4
- package/dist/{index-DPOa4NhL.mjs → index-C6Vn5Eac.mjs} +2 -0
- package/dist/{index-BiyC7cZ3.mjs → index-CMf5VbzG.mjs} +4 -4
- package/dist/{index-CUuc6iCn.cjs → index-DmTlDRSL.cjs} +4 -4
- package/dist/{index-C6O2vVjm.cjs → index-Dv0Q48P3.cjs} +2 -0
- package/dist/{index-D09T1m8Y.cjs → index-F2UejqYs.cjs} +3 -3
- package/dist/{index-D3bidoG8.mjs → index-wCbtF4BK.mjs} +3 -3
- package/dist/index.cjs +2 -2
- package/dist/index.mjs +2 -2
- package/dist/{install-CYRZxS87.cjs → install-C0ANcEAW.cjs} +7 -7
- package/dist/{install-hnve_9vq.mjs → install-CdzSV7qO.mjs} +3 -3
- package/dist/{installPiTools-BKnXjrVu.cjs → installPiTools-CL_axh_6.cjs} +1 -1
- package/dist/{installTerminalHooks-BQZbvxsZ.cjs → installTerminalHooks-BETLKAtd.cjs} +3 -3
- package/dist/lib.cjs +13 -13
- package/dist/lib.d.cts +177 -1
- package/dist/lib.d.mts +177 -1
- package/dist/lib.mjs +13 -13
- package/dist/{lidState-Dv2wwFTj.cjs → lidState-DWGnm2H4.cjs} +1 -1
- package/dist/{lidState-Bb8fgXg3.mjs → lidState-bBrmaQd2.mjs} +1 -1
- package/dist/{localHappyAgentAuth-DjYvkXvV.cjs → localHappyAgentAuth-DZHQnIW9.cjs} +1 -1
- package/dist/{localHappyAgentAuth-NEU7fax7.mjs → localHappyAgentAuth-Dn1jYDpt.mjs} +1 -1
- package/dist/{logger-BtVhHnD8.mjs → logger-BUngm5Xg.mjs} +2 -2
- package/dist/{logger-C1GWx3gi.cjs → logger-CphW5nUE.cjs} +2 -2
- package/dist/machineMetadata-BQm9YTcI.cjs +79 -0
- package/dist/machineMetadata-BXN_bKU3.mjs +68 -0
- package/dist/{main-CWhSsbtU.cjs → main-B2UV51nK.cjs} +99 -132
- package/dist/{main-B2LWV8DI.mjs → main-DGkdYfEq.mjs} +93 -126
- package/dist/{mcp-CARUsXHV.cjs → mcp-BFvAEIRz.cjs} +15 -15
- package/dist/{mcp-ext92q3Y.mjs → mcp-CbTtbs0f.mjs} +15 -15
- package/dist/{mirrorProtocol-BwYibqry.mjs → mirrorProtocol-BR4luBC0.mjs} +148 -7
- package/dist/{mirrorProtocol-DEy2g1CB.cjs → mirrorProtocol-HKPivs5o.cjs} +150 -4
- package/dist/{package-BPPebGQF.mjs → package-7Ld1YMhh.mjs} +8 -7
- package/dist/{package-SgqTYsjn.cjs → package-KhLqBDX9.cjs} +8 -7
- package/dist/{panels-BZ0_Tt7B.mjs → panels-C7IVqpJk.mjs} +5 -5
- package/dist/{panels-D1c7q2dD.cjs → panels-Njf6GelF.cjs} +5 -5
- package/dist/{peerTools-CWKzcQ7u.mjs → peerTools-BOlDRyhi.mjs} +5 -5
- package/dist/{peerTools-DRQETXaz.cjs → peerTools-DQNlrcqM.cjs} +5 -5
- package/dist/{persistence-BegE7NPa.cjs → persistence-9BMYspxG.cjs} +2 -2
- package/dist/{persistence-Cr-wutZ4.mjs → persistence-BFUOHW5h.mjs} +2 -2
- package/dist/{piRunnerArgs-Cs-378Vz.cjs → piRunnerArgs-DGaq6VYM.cjs} +1 -1
- package/dist/{piRunnerArgs-DwvM_yWA.mjs → piRunnerArgs-H2pgpA5z.mjs} +1 -1
- package/dist/{piRuntime-BG-1td_n.cjs → piRuntime-CT5xv_3h.cjs} +1 -1
- package/dist/{piRuntime-Bue5mnlc.mjs → piRuntime-CdN0JAsa.mjs} +1 -1
- package/dist/{piTerminal-G4z-xVyy.cjs → piTerminal-0FBtXTHK.cjs} +17 -17
- package/dist/{piTerminal-B5x9X5yV.mjs → piTerminal-C4m9YXAV.mjs} +17 -17
- package/dist/projectPath-C3ioB4Bu.cjs +13 -0
- package/dist/{pushNotifications-BdFjDjQe.mjs → pushNotifications-DCiBEVeC.mjs} +7 -3
- package/dist/{pushNotifications-DaLQUyi0.cjs → pushNotifications-DI92havG.cjs} +7 -3
- package/dist/{query-Ctfg-5gy.cjs → query-BETKBrnz.cjs} +1 -1
- package/dist/{query-DYP_W1wp.mjs → query-ywZbQUzR.mjs} +1 -1
- package/dist/{rateLimitWindows-CuEqk_0g.mjs → rateLimitWindows-BkfuUB1a.mjs} +1 -1
- package/dist/{rateLimitWindows-Dj_8voBK.cjs → rateLimitWindows-YRIYVdo4.cjs} +1 -1
- package/dist/{registerCommonHandlers-Cj084Sg7.cjs → registerCommonHandlers-C7a_dUWs.cjs} +30 -30
- package/dist/{registerCommonHandlers-BAlP7SGc.mjs → registerCommonHandlers-CTkCvjxt.mjs} +2 -2
- package/dist/{registerKillSessionHandler-qMju0ZfF.cjs → registerKillSessionHandler-CIsvBrVe.cjs} +6 -6
- package/dist/{registerKillSessionHandler-PD0jWtQo.mjs → registerKillSessionHandler-CaqqRYq6.mjs} +6 -6
- package/dist/{remoteSessionClient-B7i7MkYV.cjs → remoteSessionClient-D843fkzL.cjs} +5 -5
- package/dist/{remoteSessionClient-Bn2qu5C5.mjs → remoteSessionClient-PP-mOKmw.mjs} +5 -5
- package/dist/{reportProgressTool-CM1JFAHg.cjs → reportProgressTool-14AXr959.cjs} +3 -3
- package/dist/{reportProgressTool-gHItlSzz.mjs → reportProgressTool-ZOCNjWHr.mjs} +3 -3
- package/dist/{run-CNXwIe0A.cjs → run-CAOCYYfT.cjs} +2650 -90
- package/dist/{run-BM4TxiyN.mjs → run-Dajw2E5j.mjs} +2644 -84
- package/dist/{runClaude-C_3I8hvR.mjs → runClaude-C6oxWYbp.mjs} +34 -28
- package/dist/{runClaude-CWhj2V4Q.cjs → runClaude-CRRKt-tm.cjs} +35 -29
- package/dist/{runClaudeDeps-B81cOKnH.cjs → runClaudeDeps-B1ysqTvx.cjs} +54 -119
- package/dist/{runClaudeDeps-QGrOeDe2.mjs → runClaudeDeps-BcZ68cX3.mjs} +47 -111
- package/dist/{runGemini-BEdWEZLR.mjs → runGemini-D7yKc4wD.mjs} +35 -35
- package/dist/{runGemini-CgRLYbt5.cjs → runGemini-DtKFXqf-.cjs} +63 -63
- package/dist/{runOpenClaw-DdQZAYj1.mjs → runOpenClaw-C8ilyLP9.mjs} +19 -19
- package/dist/{runOpenClaw-C1NVmzOL.cjs → runOpenClaw-Cq29mryb.cjs} +20 -20
- package/dist/{sandbox-DjQUdCMG.mjs → sandbox-CbCutma4.mjs} +4 -4
- package/dist/{sandbox-nocIjliq.cjs → sandbox-gIj-EuF4.cjs} +4 -4
- package/dist/{selfCheck-DCt4Uzbq.cjs → selfCheck-BTGBVthv.cjs} +39 -39
- package/dist/selfCheck-Smt-5Xiq.mjs +85 -0
- package/dist/{send-Dydf_hwZ.cjs → send-CZf5lLw_.cjs} +8 -8
- package/dist/{send-Ct7X4pPU.mjs → send-YZRMQvMJ.mjs} +9 -9
- package/dist/{server-DTQGZMxh.mjs → server-BqwXRzFZ.mjs} +4 -4
- package/dist/{server-CosABFbd.cjs → server-CknFq6xG.cjs} +6 -6
- package/dist/sessionExitLifecycle-CzkLIgNZ.mjs +142 -0
- package/dist/sessionExitLifecycle-DFltxXU8.cjs +148 -0
- package/dist/{sessionLock-DokGab2R.cjs → sessionLock-DRZUcKHT.cjs} +25 -5
- package/dist/{sessionLock-WYIyaVO4.mjs → sessionLock-nBXdJxJm.mjs} +24 -5
- package/dist/{sessionOps-S-qPBLFf.cjs → sessionOps-BrGiU9-s.cjs} +4 -4
- package/dist/{sessionOps-BIGgRube.mjs → sessionOps-C58iDeD5.mjs} +5 -5
- package/dist/{sessionScanner-o5hnMi5e.mjs → sessionScanner-Bm57LEXe.mjs} +3 -3
- package/dist/{sessionScanner-CIMM2hvZ.cjs → sessionScanner-CaO8bLaG.cjs} +3 -3
- package/dist/{sessions-BJHEZpi2.mjs → sessions-BXyBHo8n.mjs} +11 -11
- package/dist/{sessions-JchI1w3z.cjs → sessions-uzqPCc37.cjs} +10 -10
- package/dist/{setupOfflineReconnection-DMiBO2y9.mjs → setupOfflineReconnection-1Qlek3wl.mjs} +2 -2
- package/dist/{setupOfflineReconnection-CNiAt5ZP.cjs → setupOfflineReconnection-DvvVX3TB.cjs} +2 -2
- package/dist/{spawn-6PD7nnoC.cjs → spawn-DBkodJEO.cjs} +15 -15
- package/dist/{spawn-DgvUNYEo.mjs → spawn-vn93PhYL.mjs} +15 -15
- package/dist/{spawnAgents-P006Hqio.mjs → spawnAgents-CgPMWexP.mjs} +1 -1
- package/dist/{spawnAgents-DsXgegHM.cjs → spawnAgents-DLNMlhWJ.cjs} +1 -1
- package/dist/{spawnHappyCLI-CCOrEtf9.mjs → spawnHappyCLI-BjFZc_7V.mjs} +1 -1
- package/dist/{spawnHappyCLI-Dywezwk6.cjs → spawnHappyCLI-DnUZv0X2.cjs} +2 -2
- package/dist/{specialCommands-QxPpkGKf.cjs → specialCommands-BRufxlqe.cjs} +3 -3
- package/dist/{specialCommands-DPcd9edP.mjs → specialCommands-D3ND9bdg.mjs} +3 -3
- package/dist/{startFileWatcher-RECH5qY8.cjs → startFileWatcher-D9cYzZOq.cjs} +1 -1
- package/dist/{startFileWatcher-DghDOCO4.mjs → startFileWatcher-DXJ7yB5v.mjs} +1 -1
- package/dist/startupSessionCreate-kdr3m1uX.cjs +26 -0
- package/dist/startupSessionCreate-uZ6BM0ty.mjs +24 -0
- package/dist/{streamRelay-DMV_TXfS.mjs → streamRelay-DnMCMMfV.mjs} +1 -1
- package/dist/{streamRelay-DlUWKUpo.cjs → streamRelay-Dy6amlzx.cjs} +1 -1
- package/dist/{sync-D23jbqVa.cjs → sync-Bn-idAoy.cjs} +1 -1
- package/dist/{sync-CSe0Rf45.mjs → sync-BvVhDO40.mjs} +1 -1
- package/dist/{systemPrompt-CFNKnh65.mjs → systemPrompt-CIZcJuJF.mjs} +2 -2
- package/dist/{systemPrompt-BOy4kU4P.cjs → systemPrompt-DlyEk35T.cjs} +2 -2
- package/dist/{teams-Ov2BDT-A.cjs → teams-BLeRpDxv.cjs} +6 -6
- package/dist/{teams-DyY669f0.mjs → teams-DLY3B5yi.mjs} +6 -6
- package/dist/{time-CrwIMHta.cjs → time-Cjv0zxQO.cjs} +1 -1
- package/dist/{time-65DcU6Jx.mjs → time-D3ETL7Jb.mjs} +1 -1
- package/dist/{titleGenerator-CS_rh2_J.cjs → titleGenerator-Cgp5ihFb.cjs} +3 -3
- package/dist/{titleGenerator-CiAMxf7s.mjs → titleGenerator-Uzbd4utr.mjs} +1 -1
- package/dist/{todo-BDONw0sK.mjs → todo-C9Ga-oEM.mjs} +6 -6
- package/dist/{todo-KY-okGii.cjs → todo-pOMcEECE.cjs} +6 -6
- package/dist/{tools-_w52DZG6.cjs → tools-BL7Byl_x.cjs} +1 -1
- package/dist/{tools-D8-PnZEG.mjs → tools-Cho7iIWf.mjs} +1 -1
- package/dist/{uninstall-8vnLN-IE.cjs → uninstall-CbayEVoV.cjs} +6 -6
- package/dist/{uninstall-_fjGRP9b.mjs → uninstall-CvZHVY9C.mjs} +3 -3
- package/package.json +8 -7
- package/dist/machineMetadata-CLHS9sv_.cjs +0 -42
- package/dist/machineMetadata-D-g--oU_.mjs +0 -39
- package/dist/messageBuffer-BWlGgR3A.mjs +0 -71
- package/dist/messageBuffer-fJMH6uY8.cjs +0 -73
- package/dist/projectPath-ChLhdOyt.cjs +0 -13
- package/dist/selfCheck-CjCF4C3v.mjs +0 -85
|
@@ -1,104 +1,105 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var auth = require('./auth-
|
|
4
|
-
var index = require('./index-
|
|
5
|
-
var deterministicJson = require('./deterministicJson-
|
|
6
|
-
var client = require('./client-
|
|
3
|
+
var auth = require('./auth-CBXnm-Mj.cjs');
|
|
4
|
+
var index = require('./index-Dv0Q48P3.cjs');
|
|
5
|
+
var deterministicJson = require('./deterministicJson-xqA6DaOm.cjs');
|
|
6
|
+
var client = require('./client-DJplzPjD.cjs');
|
|
7
7
|
var promises = require('node:fs/promises');
|
|
8
8
|
var forkBackfill = require('./forkBackfill-8eLDeS73.cjs');
|
|
9
9
|
var node_crypto = require('node:crypto');
|
|
10
10
|
var cuid2 = require('@paralleldrive/cuid2');
|
|
11
11
|
var agentAttachments = require('./agentAttachments-Dbw8iMCZ.cjs');
|
|
12
|
-
var attachmentContent = require('./attachmentContent-
|
|
12
|
+
var attachmentContent = require('./attachmentContent-CEm13_gF.cjs');
|
|
13
13
|
var ink = require('ink');
|
|
14
|
-
var sessionLock = require('./sessionLock-
|
|
14
|
+
var sessionLock = require('./sessionLock-DRZUcKHT.cjs');
|
|
15
15
|
var React = require('react');
|
|
16
|
-
var api = require('./api-
|
|
17
|
-
var codexAppServerClient = require('./codexAppServerClient-
|
|
18
|
-
var specialCommands = require('./specialCommands-
|
|
19
|
-
var logger = require('./logger-
|
|
20
|
-
var BasePermissionHandler = require('./BasePermissionHandler-
|
|
21
|
-
var codexTermination = require('./codexTermination-
|
|
16
|
+
var api = require('./api-DM7b1OKj.cjs');
|
|
17
|
+
var codexAppServerClient = require('./codexAppServerClient-PE-12AsW.cjs');
|
|
18
|
+
var specialCommands = require('./specialCommands-BRufxlqe.cjs');
|
|
19
|
+
var logger = require('./logger-CphW5nUE.cjs');
|
|
20
|
+
var BasePermissionHandler = require('./BasePermissionHandler-BlM_tfej.cjs');
|
|
21
|
+
var codexTermination = require('./codexTermination-BmBbizFK.cjs');
|
|
22
22
|
var node_child_process = require('node:child_process');
|
|
23
|
-
var persistence = require('./persistence-
|
|
24
|
-
var machineMetadata = require('./machineMetadata-
|
|
25
|
-
var configuration = require('./configuration-
|
|
26
|
-
var registerKillSessionHandler = require('./registerKillSessionHandler-
|
|
27
|
-
var projectPath = require('./projectPath-
|
|
23
|
+
var persistence = require('./persistence-9BMYspxG.cjs');
|
|
24
|
+
var machineMetadata = require('./machineMetadata-BQm9YTcI.cjs');
|
|
25
|
+
var configuration = require('./configuration-CYO-kPOS.cjs');
|
|
26
|
+
var registerKillSessionHandler = require('./registerKillSessionHandler-CIsvBrVe.cjs');
|
|
27
|
+
var projectPath = require('./projectPath-C3ioB4Bu.cjs');
|
|
28
28
|
var path = require('node:path');
|
|
29
|
-
var createSessionMetadata = require('./createSessionMetadata-
|
|
30
|
-
var
|
|
31
|
-
var controlClient = require('./controlClient-
|
|
32
|
-
var defaultPermissionMode = require('./defaultPermissionMode-
|
|
29
|
+
var createSessionMetadata = require('./createSessionMetadata-xz767pcG.cjs');
|
|
30
|
+
var sessionExitLifecycle = require('./sessionExitLifecycle-DFltxXU8.cjs');
|
|
31
|
+
var controlClient = require('./controlClient-Bqv5v5OM.cjs');
|
|
32
|
+
var defaultPermissionMode = require('./defaultPermissionMode-PkZGsQDk.cjs');
|
|
33
33
|
var authRelay = require('./authRelay-Dy1qU9td.cjs');
|
|
34
|
-
var setupOfflineReconnection = require('./setupOfflineReconnection-
|
|
34
|
+
var setupOfflineReconnection = require('./setupOfflineReconnection-DvvVX3TB.cjs');
|
|
35
|
+
var startupSessionCreate = require('./startupSessionCreate-kdr3m1uX.cjs');
|
|
35
36
|
var trimIdent = require('./trimIdent-4gvk9Wk6.cjs');
|
|
36
37
|
var constants = require('./constants-VJ0N6WuG.cjs');
|
|
37
38
|
var editPaths = require('./editPaths-Bqp4OFPw.cjs');
|
|
38
|
-
var ensureDaemonRunning = require('./ensureDaemonRunning-
|
|
39
|
+
var ensureDaemonRunning = require('./ensureDaemonRunning-D-HyjGIX.cjs');
|
|
39
40
|
require('tweetnacl');
|
|
40
41
|
require('axios');
|
|
41
|
-
require('./time-
|
|
42
|
-
require('./browser-
|
|
42
|
+
require('./time-Cjv0zxQO.cjs');
|
|
43
|
+
require('./browser-DZ6qRtfH.cjs');
|
|
43
44
|
require('open');
|
|
44
45
|
require('zod');
|
|
45
46
|
require('./prompt-lgF9IE82.cjs');
|
|
46
|
-
require('./reportProgressTool-
|
|
47
|
-
require('./client-
|
|
47
|
+
require('./reportProgressTool-14AXr959.cjs');
|
|
48
|
+
require('./client-BWjaHKtj.cjs');
|
|
48
49
|
require('./precheckCompat-CWOi5c9L.cjs');
|
|
49
50
|
require('./agentGuidance-BtBx2xxE.cjs');
|
|
50
51
|
require('node:fs');
|
|
51
|
-
require('./client-
|
|
52
|
-
require('./context-
|
|
53
|
-
require('./sessionOps-
|
|
52
|
+
require('./client-D_loZ9IK.cjs');
|
|
53
|
+
require('./context-6TP-iz_c.cjs');
|
|
54
|
+
require('./sessionOps-BrGiU9-s.cjs');
|
|
54
55
|
require('socket.io-client');
|
|
55
56
|
require('./backgroundTaskActivity-CBvUdj39.cjs');
|
|
56
57
|
require('./resources-CvIlkzpP.cjs');
|
|
57
|
-
require('./tools-
|
|
58
|
-
require('./peerTools-
|
|
58
|
+
require('./tools-BL7Byl_x.cjs');
|
|
59
|
+
require('./peerTools-DQNlrcqM.cjs');
|
|
59
60
|
require('node:os');
|
|
60
61
|
require('./ids-B6ZC0HGt.cjs');
|
|
61
|
-
require('./remoteSessionClient-
|
|
62
|
+
require('./remoteSessionClient-D843fkzL.cjs');
|
|
62
63
|
require('@modelcontextprotocol/sdk/server/mcp.js');
|
|
63
64
|
require('node:http');
|
|
64
65
|
require('@modelcontextprotocol/sdk/server/streamableHttp.js');
|
|
65
66
|
require('./limits-C-a7gr04.cjs');
|
|
66
|
-
require('./downloadTarget-
|
|
67
|
+
require('./downloadTarget-CEb9che-.cjs');
|
|
67
68
|
require('./terminals-B_bfC9c2.cjs');
|
|
68
69
|
require('./terminalTitleSuggest-DhvRFX3H.cjs');
|
|
69
70
|
require('./tmuxSocket-D-Xt6Vn-.cjs');
|
|
70
|
-
require('./bootstrap-
|
|
71
|
-
require('./package-
|
|
71
|
+
require('./bootstrap-DoA7okld.cjs');
|
|
72
|
+
require('./package-KhLqBDX9.cjs');
|
|
72
73
|
require('./webPanels-FCgFKvVe.cjs');
|
|
73
|
-
require('./pushNotifications-
|
|
74
|
+
require('./pushNotifications-DI92havG.cjs');
|
|
74
75
|
require('./contentLogMetadata-ZSFk_NjQ.cjs');
|
|
75
76
|
require('./previewPath-B0rBdhy1.cjs');
|
|
76
77
|
require('crypto');
|
|
77
78
|
require('./processTreeSnapshot-mDbnuojn.cjs');
|
|
78
|
-
require('./lidState-
|
|
79
|
+
require('./lidState-DWGnm2H4.cjs');
|
|
79
80
|
require('os');
|
|
80
81
|
require('child_process');
|
|
81
82
|
require('node:events');
|
|
82
|
-
require('./registerCommonHandlers-
|
|
83
|
+
require('./registerCommonHandlers-C7a_dUWs.cjs');
|
|
83
84
|
require('util');
|
|
84
85
|
require('fs/promises');
|
|
85
86
|
require('path');
|
|
86
87
|
require('cross-spawn');
|
|
87
|
-
require('./sync-
|
|
88
|
+
require('./sync-Bn-idAoy.cjs');
|
|
88
89
|
require('chalk');
|
|
89
90
|
require('node:readline');
|
|
90
91
|
require('./manager-HrEj442o.cjs');
|
|
91
92
|
require('@anthropic-ai/sandbox-runtime');
|
|
92
|
-
require('./rateLimitWindows-
|
|
93
|
+
require('./rateLimitWindows-YRIYVdo4.cjs');
|
|
93
94
|
require('./processTree-CMHWlVse.cjs');
|
|
94
95
|
require('node:util');
|
|
95
|
-
require('./detectCLI-
|
|
96
|
+
require('./detectCLI-BuYR_Qxe.cjs');
|
|
96
97
|
require('fs');
|
|
97
|
-
require('./localHappyAgentAuth-
|
|
98
|
+
require('./localHappyAgentAuth-DZHQnIW9.cjs');
|
|
98
99
|
require('./types-CRS-srZK.cjs');
|
|
99
100
|
require('url');
|
|
100
|
-
require('./spawnHappyCLI-
|
|
101
|
-
require('./doctorReadiness-
|
|
101
|
+
require('./spawnHappyCLI-DnUZv0X2.cjs');
|
|
102
|
+
require('./doctorReadiness-Dl6yRQCy.cjs');
|
|
102
103
|
|
|
103
104
|
function getStartedSubagents(state) {
|
|
104
105
|
return state.startedSubagents ?? /* @__PURE__ */ new Set();
|
|
@@ -1429,7 +1430,7 @@ async function runCodex(opts) {
|
|
|
1429
1430
|
agentStateVersion: parseInt(reconnectAgentStateVersion || "0", 10)
|
|
1430
1431
|
};
|
|
1431
1432
|
} else {
|
|
1432
|
-
response = await api$1.getOrCreateSession({ tag: sessionTag, metadata, state });
|
|
1433
|
+
response = await startupSessionCreate.createSessionForStartup(() => api$1.getOrCreateSession({ tag: sessionTag, metadata, state }), { startedBy: opts.startedBy, log: (m) => logger.logger.debug(m) });
|
|
1433
1434
|
}
|
|
1434
1435
|
if (response) {
|
|
1435
1436
|
await sessionLock.claimSessionOrExit(response.id, { takeover: !!reconnectSessionId, flavor: "codex" });
|
|
@@ -1439,15 +1440,18 @@ async function runCodex(opts) {
|
|
|
1439
1440
|
}
|
|
1440
1441
|
let reconnectSeeded = false;
|
|
1441
1442
|
let wakingFromHibernation = false;
|
|
1443
|
+
let reconnectReplay = null;
|
|
1442
1444
|
if (reconnectSessionId && response) {
|
|
1443
1445
|
const snapshot = await api$1.getSession(response.id, response.encryptionKey, response.encryptionVariant);
|
|
1444
1446
|
if (snapshot.ok) {
|
|
1445
1447
|
response = sessionLock.applyServerSnapshot(response, snapshot.session);
|
|
1446
1448
|
reconnectSeeded = true;
|
|
1447
1449
|
logger.logger.debug(`[START] Reconnect seeded from server: seq=${snapshot.session.seq} metadataVersion=${snapshot.session.metadataVersion}`);
|
|
1448
|
-
const wake = sessionLock.
|
|
1450
|
+
const wake = sessionLock.applyReconnectReplay(response);
|
|
1449
1451
|
response = wake.response;
|
|
1450
|
-
|
|
1452
|
+
reconnectReplay = wake.replay;
|
|
1453
|
+
wakingFromHibernation = wake.replay?.source === "hibernation";
|
|
1454
|
+
if (wake.replay) logger.logger.debug(`[START] Resuming (${wake.replay.source}): replaying records after seq=${response.seq}`);
|
|
1451
1455
|
} else {
|
|
1452
1456
|
response = sessionLock.withoutServerSnapshot(response);
|
|
1453
1457
|
logger.logger.debug(`[START] Reconnect without server snapshot (${snapshot.reason}); skipping existing messages`);
|
|
@@ -1478,7 +1482,7 @@ async function runCodex(opts) {
|
|
|
1478
1482
|
if (reconnectSessionId) {
|
|
1479
1483
|
session.suppressNextArchiveSignal();
|
|
1480
1484
|
if (!reconnectSeeded) session.skipExistingMessages();
|
|
1481
|
-
if (!wakingFromHibernation) void session.cancelUndeliveredQueuedInputs();
|
|
1485
|
+
if (!wakingFromHibernation) void session.cancelUndeliveredQueuedInputs(reconnectReplay ? { maxSeq: reconnectReplay.seq } : void 0);
|
|
1482
1486
|
session.updateMetadata((meta) => sessionLock.mergeReconnectMetadata(meta, metadata, Date.now()));
|
|
1483
1487
|
}
|
|
1484
1488
|
if (response) {
|
|
@@ -1542,7 +1546,7 @@ async function runCodex(opts) {
|
|
|
1542
1546
|
withAttachments: attachmentContent.appendStagedAttachmentsToPrompt,
|
|
1543
1547
|
unlink: (path) => promises.unlink(path),
|
|
1544
1548
|
isImage: (file) => CODEX_IMAGE_MIME_TYPES.includes(file.mimeType),
|
|
1545
|
-
onSteered: (text) => messageBuffer
|
|
1549
|
+
onSteered: (text) => messageBuffer.addMessage(text, "user"),
|
|
1546
1550
|
log: (message) => logger.logger.debug(message)
|
|
1547
1551
|
};
|
|
1548
1552
|
let userMessageDelivery = Promise.resolve();
|
|
@@ -1714,10 +1718,12 @@ async function runCodex(opts) {
|
|
|
1714
1718
|
return;
|
|
1715
1719
|
}
|
|
1716
1720
|
logger.logger.debug("[Codex] Kill session requested - terminating process");
|
|
1721
|
+
const exitCursor = intent === "offline" && session ? sessionLock.exitCursorStamp(session.messageCursor, Date.now()) : void 0;
|
|
1722
|
+
if (exitCursor) session.freezeInbound();
|
|
1717
1723
|
await handleAbort("kill");
|
|
1718
1724
|
logger.logger.debug("[Codex] Abort completed, proceeding with termination");
|
|
1719
1725
|
try {
|
|
1720
|
-
if (session) await codexTermination.settleCodexSession(session, intent, (id) => api$1.deactivateSession(id), (m, e) => logger.logger.debug(m, safeCodexErrorMetadata(e)));
|
|
1726
|
+
if (session) await codexTermination.settleCodexSession(session, intent, (id) => api$1.deactivateSession(id), (m, e) => logger.logger.debug(m, safeCodexErrorMetadata(e)), exitCursor);
|
|
1721
1727
|
try {
|
|
1722
1728
|
await client$1.disconnect();
|
|
1723
1729
|
} catch (e) {
|
|
@@ -1740,13 +1746,13 @@ async function runCodex(opts) {
|
|
|
1740
1746
|
});
|
|
1741
1747
|
session.rpcHandlerManager.registerHandler("abort", () => handleAbort("user"));
|
|
1742
1748
|
const disposeTermination = registerKillSessionHandler.registerKillSessionHandler(session.rpcHandlerManager, () => handleKillSession("archive"), session, { processSignals: true, onSignal: () => handleKillSession("offline") });
|
|
1743
|
-
const messageBuffer
|
|
1749
|
+
const messageBuffer = new sessionExitLifecycle.MessageBuffer();
|
|
1744
1750
|
const hasTTY = process.stdout.isTTY && process.stdin.isTTY;
|
|
1745
1751
|
let inkInstance = null;
|
|
1746
1752
|
if (hasTTY) {
|
|
1747
1753
|
console.clear();
|
|
1748
1754
|
inkInstance = ink.render(React.createElement(CodexDisplay, {
|
|
1749
|
-
messageBuffer
|
|
1755
|
+
messageBuffer,
|
|
1750
1756
|
logPath: process.env.DEBUG ? logger.logger.getLogPath() : void 0,
|
|
1751
1757
|
onExit: async () => {
|
|
1752
1758
|
logger.logger.debug("[codex]: Exiting agent via Ctrl-C");
|
|
@@ -1816,45 +1822,45 @@ async function runCodex(opts) {
|
|
|
1816
1822
|
}
|
|
1817
1823
|
logger.logger.debug("[Codex] Event metadata", codexEventLogMetadata(msg));
|
|
1818
1824
|
if (msg.type === "agent_message") {
|
|
1819
|
-
messageBuffer
|
|
1825
|
+
messageBuffer.addMessage(msg.message, "assistant");
|
|
1820
1826
|
} else if (msg.type === "agent_reasoning_delta") ; else if (msg.type === "agent_reasoning") {
|
|
1821
|
-
messageBuffer
|
|
1827
|
+
messageBuffer.addMessage(`[Thinking] ${msg.text.substring(0, 100)}...`, "system");
|
|
1822
1828
|
} else if (msg.type === "exec_command_begin") {
|
|
1823
|
-
messageBuffer
|
|
1829
|
+
messageBuffer.addMessage(`Executing: ${msg.command}`, "tool");
|
|
1824
1830
|
} else if (msg.type === "exec_command_end") {
|
|
1825
1831
|
const output = msg.output || msg.error || "Command completed";
|
|
1826
1832
|
const truncatedOutput = output.substring(0, 200);
|
|
1827
|
-
messageBuffer
|
|
1833
|
+
messageBuffer.addMessage(
|
|
1828
1834
|
`Result: ${truncatedOutput}${output.length > 200 ? "..." : ""}`,
|
|
1829
1835
|
"result"
|
|
1830
1836
|
);
|
|
1831
1837
|
} else if (msg.type === "task_started") {
|
|
1832
|
-
messageBuffer
|
|
1838
|
+
messageBuffer.addMessage("Starting task...", "status");
|
|
1833
1839
|
} else if (msg.type === "task_complete") {
|
|
1834
1840
|
const failure = describeCodexFailure(msg);
|
|
1835
1841
|
if (failure) {
|
|
1836
|
-
messageBuffer
|
|
1842
|
+
messageBuffer.addMessage(`Task failed: ${failure}`, "status");
|
|
1837
1843
|
session.sendSessionEvent({ type: "message", message: `Codex error: ${failure}` });
|
|
1838
1844
|
} else {
|
|
1839
|
-
messageBuffer
|
|
1845
|
+
messageBuffer.addMessage("Task completed", "status");
|
|
1840
1846
|
}
|
|
1841
1847
|
} else if (msg.type === "turn_aborted") {
|
|
1842
1848
|
const failure = describeCodexFailure(msg);
|
|
1843
1849
|
if (failure) {
|
|
1844
|
-
messageBuffer
|
|
1850
|
+
messageBuffer.addMessage(`Turn aborted: ${failure}`, "status");
|
|
1845
1851
|
session.sendSessionEvent({ type: "message", message: `Codex error: ${failure}` });
|
|
1846
1852
|
} else {
|
|
1847
|
-
messageBuffer
|
|
1853
|
+
messageBuffer.addMessage("Turn aborted", "status");
|
|
1848
1854
|
}
|
|
1849
1855
|
} else if (msg.type === "turn_retry") {
|
|
1850
1856
|
const notice = describeCodexRetry(msg);
|
|
1851
|
-
messageBuffer
|
|
1857
|
+
messageBuffer.addMessage(notice, "status");
|
|
1852
1858
|
session.sendSessionEvent({ type: "message", message: notice });
|
|
1853
1859
|
} else if (msg.type === "steer_dropped") {
|
|
1854
1860
|
const clientIds = Array.isArray(msg.client_ids) ? msg.client_ids.filter((id) => typeof id === "string" && id.length > 0) : [];
|
|
1855
1861
|
if (clientIds.length > 0) {
|
|
1856
1862
|
session.sendQueueCancelReason(clientIds, "aborted");
|
|
1857
|
-
messageBuffer
|
|
1863
|
+
messageBuffer.addMessage("A steered message was not read before the turn ended", "status");
|
|
1858
1864
|
}
|
|
1859
1865
|
}
|
|
1860
1866
|
if (msg.type === "task_started") {
|
|
@@ -1888,16 +1894,16 @@ async function runCodex(opts) {
|
|
|
1888
1894
|
}
|
|
1889
1895
|
const changeCount = Object.keys(changes).length;
|
|
1890
1896
|
const filesMsg = changeCount === 1 ? "1 file" : `${changeCount} files`;
|
|
1891
|
-
messageBuffer
|
|
1897
|
+
messageBuffer.addMessage(`Modifying ${filesMsg}...`, "tool");
|
|
1892
1898
|
}
|
|
1893
1899
|
if (msg.type === "patch_apply_end") {
|
|
1894
1900
|
const { stdout, stderr, success } = msg;
|
|
1895
1901
|
if (success) {
|
|
1896
1902
|
const message = stdout || "Files modified successfully";
|
|
1897
|
-
messageBuffer
|
|
1903
|
+
messageBuffer.addMessage(message.substring(0, 200), "result");
|
|
1898
1904
|
} else {
|
|
1899
1905
|
const errorMsg = stderr || "Failed to modify files";
|
|
1900
|
-
messageBuffer
|
|
1906
|
+
messageBuffer.addMessage(`Error: ${errorMsg.substring(0, 200)}`, "result");
|
|
1901
1907
|
}
|
|
1902
1908
|
}
|
|
1903
1909
|
if (msg.type === "turn_diff") {
|
|
@@ -1961,7 +1967,7 @@ async function runCodex(opts) {
|
|
|
1961
1967
|
await resumeExistingThread({
|
|
1962
1968
|
client: client$1,
|
|
1963
1969
|
session,
|
|
1964
|
-
messageBuffer
|
|
1970
|
+
messageBuffer,
|
|
1965
1971
|
threadId: opts.resumeThreadId,
|
|
1966
1972
|
cwd: process.cwd(),
|
|
1967
1973
|
mcpServers
|
|
@@ -1973,7 +1979,7 @@ async function runCodex(opts) {
|
|
|
1973
1979
|
await importCodexThread({
|
|
1974
1980
|
client: client$1,
|
|
1975
1981
|
session,
|
|
1976
|
-
messageBuffer
|
|
1982
|
+
messageBuffer,
|
|
1977
1983
|
threadId: importCodexThreadId,
|
|
1978
1984
|
cwd: process.cwd(),
|
|
1979
1985
|
mcpServers
|
|
@@ -2093,7 +2099,7 @@ async function runCodex(opts) {
|
|
|
2093
2099
|
appendSystemPromptInjected = false;
|
|
2094
2100
|
thinking = false;
|
|
2095
2101
|
session.keepAlive(thinking, "remote");
|
|
2096
|
-
messageBuffer
|
|
2102
|
+
messageBuffer.addMessage("Context was reset", "status");
|
|
2097
2103
|
session.sendSessionEvent({ type: "message", message: "Context was reset" });
|
|
2098
2104
|
session.updateMetadata((currentMetadata) => {
|
|
2099
2105
|
const nextMetadata = { ...currentMetadata };
|
|
@@ -2111,7 +2117,7 @@ async function runCodex(opts) {
|
|
|
2111
2117
|
idleRelease.arm();
|
|
2112
2118
|
continue;
|
|
2113
2119
|
}
|
|
2114
|
-
messageBuffer
|
|
2120
|
+
messageBuffer.addMessage(message.message, "user");
|
|
2115
2121
|
try {
|
|
2116
2122
|
await client$1.ensureConnected();
|
|
2117
2123
|
const sandboxManagedByHappy = client$1.sandboxEnabled;
|
|
@@ -2167,11 +2173,11 @@ async function runCodex(opts) {
|
|
|
2167
2173
|
logger.logger.warn("Error in codex session", safeCodexErrorMetadata(error));
|
|
2168
2174
|
const reason = describeThrownTurnError(error);
|
|
2169
2175
|
if (reason) {
|
|
2170
|
-
messageBuffer
|
|
2176
|
+
messageBuffer.addMessage(`Task failed: ${reason}`, "status");
|
|
2171
2177
|
session.sendSessionEvent({ type: "message", message: `Codex error: ${reason}` });
|
|
2172
2178
|
} else {
|
|
2173
2179
|
const tail = codexStderrTailOf(error);
|
|
2174
|
-
messageBuffer
|
|
2180
|
+
messageBuffer.addMessage("Process exited unexpectedly", "status");
|
|
2175
2181
|
session.sendSessionEvent({ type: "message", message: tail ? `Process exited unexpectedly: ${tail}` : "Process exited unexpectedly" });
|
|
2176
2182
|
}
|
|
2177
2183
|
} finally {
|
|
@@ -2240,7 +2246,7 @@ async function runCodex(opts) {
|
|
|
2240
2246
|
logger.logger.debug("[codex]: inkInstance.unmount()");
|
|
2241
2247
|
inkInstance.unmount();
|
|
2242
2248
|
}
|
|
2243
|
-
messageBuffer
|
|
2249
|
+
messageBuffer.clear();
|
|
2244
2250
|
logActiveHandles("cleanup-end");
|
|
2245
2251
|
logger.logger.debug("[codex]: Final cleanup completed");
|
|
2246
2252
|
if (hibernationExit.hibernating && hibernationStamp) {
|
|
@@ -1,101 +1,102 @@
|
|
|
1
|
-
import { a as authAndSetupMachineIfNeeded } from './auth-
|
|
2
|
-
import { d as createEnvelope, f as BUILTIN_TODO_DISCOVERY, P as PROMPT_QUEUE_CAPABILITY, u as CODEX_STEER_CAPABILITY, a as PROJECT_SESSION_CAPABILITY } from './index-
|
|
3
|
-
import { h as hashObject, s as startHappyServer, c as createProjectInjector } from './deterministicJson-
|
|
4
|
-
import { s as sharedProjectsClient } from './client-
|
|
1
|
+
import { a as authAndSetupMachineIfNeeded } from './auth-BG1DY0gj.mjs';
|
|
2
|
+
import { d as createEnvelope, f as BUILTIN_TODO_DISCOVERY, P as PROMPT_QUEUE_CAPABILITY, u as CODEX_STEER_CAPABILITY, a as PROJECT_SESSION_CAPABILITY } from './index-C6Vn5Eac.mjs';
|
|
3
|
+
import { h as hashObject, s as startHappyServer, c as createProjectInjector } from './deterministicJson-CTEJDqtS.mjs';
|
|
4
|
+
import { s as sharedProjectsClient } from './client-Ca5Pcgy_.mjs';
|
|
5
5
|
import { unlink } from 'node:fs/promises';
|
|
6
6
|
import { p as publishForkBackfillWhenCommitted, F as FORK_BACKFILL_CAPABILITY } from './forkBackfill-DYIjlN1Z.mjs';
|
|
7
7
|
import { randomUUID } from 'node:crypto';
|
|
8
8
|
import { createId } from '@paralleldrive/cuid2';
|
|
9
9
|
import { r as registerAgentAttachmentDownloads } from './agentAttachments-M_B5qEF2.mjs';
|
|
10
|
-
import { C as CLAUDE_ATTACHMENT_KINDS, a as stageClaudeAttachments, b as appendStagedAttachmentsToPrompt } from './attachmentContent-
|
|
10
|
+
import { C as CLAUDE_ATTACHMENT_KINDS, a as stageClaudeAttachments, b as appendStagedAttachmentsToPrompt } from './attachmentContent-CIn4iPEk.mjs';
|
|
11
11
|
import { useStdout, useInput, Box, Text, render } from 'ink';
|
|
12
|
-
import { c as claimSessionOrExit, a as applyServerSnapshot, b as
|
|
12
|
+
import { c as claimSessionOrExit, a as applyServerSnapshot, b as applyReconnectReplay, w as withoutServerSnapshot, m as mergeReconnectMetadata, e as exitCursorStamp } from './sessionLock-nBXdJxJm.mjs';
|
|
13
13
|
import React, { useState, useRef, useEffect, useCallback } from 'react';
|
|
14
|
-
import { c as connectionState, A as ApiClient } from './api-
|
|
15
|
-
import { C as CodexAppServerClient } from './codexAppServerClient-
|
|
16
|
-
import { p as parseSpecialCommand, w as wrapperRateLimitReporter } from './specialCommands-
|
|
17
|
-
import { l as logger } from './logger-
|
|
18
|
-
import { B as BasePermissionHandler } from './BasePermissionHandler-
|
|
19
|
-
import { B as BaseReasoningProcessor, s as settleCodexSession } from './codexTermination-
|
|
14
|
+
import { c as connectionState, A as ApiClient } from './api-Hov8p7CA.mjs';
|
|
15
|
+
import { C as CodexAppServerClient } from './codexAppServerClient-CO4G6OS4.mjs';
|
|
16
|
+
import { p as parseSpecialCommand, w as wrapperRateLimitReporter } from './specialCommands-D3ND9bdg.mjs';
|
|
17
|
+
import { l as logger } from './logger-BUngm5Xg.mjs';
|
|
18
|
+
import { B as BasePermissionHandler } from './BasePermissionHandler-26fKbRCm.mjs';
|
|
19
|
+
import { B as BaseReasoningProcessor, s as settleCodexSession } from './codexTermination-Dx48ma6e.mjs';
|
|
20
20
|
import { execSync } from 'node:child_process';
|
|
21
|
-
import { r as readSettings, l as latchKeepAwake, e as evaluateWrapperIdle, a as resolveCheckMs, H as HIBERNATION_CAPABILITY } from './persistence-
|
|
22
|
-
import { g as getInitialMachineMetadata } from './machineMetadata-
|
|
23
|
-
import { c as configuration } from './configuration-
|
|
24
|
-
import { M as MessageQueue2, r as registerKillSessionHandler } from './registerKillSessionHandler-
|
|
21
|
+
import { r as readSettings, l as latchKeepAwake, e as evaluateWrapperIdle, a as resolveCheckMs, H as HIBERNATION_CAPABILITY } from './persistence-BFUOHW5h.mjs';
|
|
22
|
+
import { g as getInitialMachineMetadata } from './machineMetadata-BXN_bKU3.mjs';
|
|
23
|
+
import { c as configuration } from './configuration-PxzEJumr.mjs';
|
|
24
|
+
import { M as MessageQueue2, r as registerKillSessionHandler } from './registerKillSessionHandler-CaqqRYq6.mjs';
|
|
25
25
|
import { p as projectPath } from './projectPath-BTBIMB57.mjs';
|
|
26
26
|
import { join } from 'node:path';
|
|
27
|
-
import { c as createSessionMetadata } from './createSessionMetadata-
|
|
28
|
-
import { M as MessageBuffer } from './
|
|
29
|
-
import { n as notifyDaemonSessionStarted, j as reportSessionEditToDaemon, c as checkDaemonHibernation } from './controlClient-
|
|
30
|
-
import { a as HibernationExitLatch, H as HibernationProbe, c as commitHibernation, b as DEFAULT_CODEX_PERMISSION_MODE } from './defaultPermissionMode-
|
|
27
|
+
import { c as createSessionMetadata } from './createSessionMetadata-DDIChCx8.mjs';
|
|
28
|
+
import { M as MessageBuffer } from './sessionExitLifecycle-CzkLIgNZ.mjs';
|
|
29
|
+
import { n as notifyDaemonSessionStarted, j as reportSessionEditToDaemon, c as checkDaemonHibernation } from './controlClient-DoeYovwP.mjs';
|
|
30
|
+
import { a as HibernationExitLatch, H as HibernationProbe, c as commitHibernation, b as DEFAULT_CODEX_PERMISSION_MODE } from './defaultPermissionMode-i5KzdK09.mjs';
|
|
31
31
|
import { d as decodeBase64, e as encodeBase64 } from './authRelay-DhQhkBvX.mjs';
|
|
32
|
-
import { s as setupOfflineReconnection } from './setupOfflineReconnection-
|
|
32
|
+
import { s as setupOfflineReconnection } from './setupOfflineReconnection-1Qlek3wl.mjs';
|
|
33
|
+
import { c as createSessionForStartup } from './startupSessionCreate-uZ6BM0ty.mjs';
|
|
33
34
|
import { t as trimIdent } from './trimIdent-BAjmv_TG.mjs';
|
|
34
35
|
import { C as CHANGE_TITLE_INSTRUCTION } from './constants-BC4St0xd.mjs';
|
|
35
36
|
import { E as EditReportThrottle, a as extractCodexPatchPaths } from './editPaths-BVfS_FFL.mjs';
|
|
36
|
-
import { a as extractNoSandboxFlag, e as ensureDaemonRunning } from './ensureDaemonRunning-
|
|
37
|
+
import { a as extractNoSandboxFlag, e as ensureDaemonRunning } from './ensureDaemonRunning-b1e8LCSM.mjs';
|
|
37
38
|
import 'tweetnacl';
|
|
38
39
|
import 'axios';
|
|
39
|
-
import './time-
|
|
40
|
-
import './browser-
|
|
40
|
+
import './time-D3ETL7Jb.mjs';
|
|
41
|
+
import './browser-DUNetFT4.mjs';
|
|
41
42
|
import 'open';
|
|
42
43
|
import 'zod';
|
|
43
44
|
import './prompt-BOouDaTM.mjs';
|
|
44
|
-
import './reportProgressTool-
|
|
45
|
-
import './client-
|
|
45
|
+
import './reportProgressTool-ZOCNjWHr.mjs';
|
|
46
|
+
import './client-CnB7kRCT.mjs';
|
|
46
47
|
import './precheckCompat-DeEbilbr.mjs';
|
|
47
48
|
import './agentGuidance-BDYt2Qy2.mjs';
|
|
48
49
|
import 'node:fs';
|
|
49
|
-
import './client-
|
|
50
|
-
import './context-
|
|
51
|
-
import './sessionOps-
|
|
50
|
+
import './client-D4uPb1uu.mjs';
|
|
51
|
+
import './context-CJGRRGWW.mjs';
|
|
52
|
+
import './sessionOps-C58iDeD5.mjs';
|
|
52
53
|
import 'socket.io-client';
|
|
53
|
-
import './backgroundTaskActivity-
|
|
54
|
+
import './backgroundTaskActivity-8PdPxrvy.mjs';
|
|
54
55
|
import './resources-y9jfyO-_.mjs';
|
|
55
|
-
import './tools-
|
|
56
|
-
import './peerTools-
|
|
56
|
+
import './tools-Cho7iIWf.mjs';
|
|
57
|
+
import './peerTools-BOlDRyhi.mjs';
|
|
57
58
|
import 'node:os';
|
|
58
59
|
import './ids-DU6sLx4C.mjs';
|
|
59
|
-
import './remoteSessionClient-
|
|
60
|
+
import './remoteSessionClient-PP-mOKmw.mjs';
|
|
60
61
|
import '@modelcontextprotocol/sdk/server/mcp.js';
|
|
61
62
|
import 'node:http';
|
|
62
63
|
import '@modelcontextprotocol/sdk/server/streamableHttp.js';
|
|
63
64
|
import './limits-DIo7rEBR.mjs';
|
|
64
|
-
import './downloadTarget-
|
|
65
|
+
import './downloadTarget-jbOz1egC.mjs';
|
|
65
66
|
import './terminals-Dlg0x3nY.mjs';
|
|
66
67
|
import './terminalTitleSuggest-CeKsX_V6.mjs';
|
|
67
68
|
import './tmuxSocket-B8Yx20sT.mjs';
|
|
68
|
-
import './bootstrap-
|
|
69
|
-
import './package-
|
|
69
|
+
import './bootstrap-Dt5I1SOl.mjs';
|
|
70
|
+
import './package-7Ld1YMhh.mjs';
|
|
70
71
|
import './webPanels-B2_C2-3g.mjs';
|
|
71
|
-
import './pushNotifications-
|
|
72
|
+
import './pushNotifications-DCiBEVeC.mjs';
|
|
72
73
|
import './contentLogMetadata-BlWI0egu.mjs';
|
|
73
74
|
import './previewPath-CXN4Vag0.mjs';
|
|
74
75
|
import 'crypto';
|
|
75
76
|
import './processTreeSnapshot-CuLJDNC-.mjs';
|
|
76
|
-
import './lidState-
|
|
77
|
+
import './lidState-bBrmaQd2.mjs';
|
|
77
78
|
import 'os';
|
|
78
79
|
import 'child_process';
|
|
79
80
|
import 'node:events';
|
|
80
|
-
import './registerCommonHandlers-
|
|
81
|
+
import './registerCommonHandlers-CTkCvjxt.mjs';
|
|
81
82
|
import 'util';
|
|
82
83
|
import 'fs/promises';
|
|
83
84
|
import 'path';
|
|
84
85
|
import 'cross-spawn';
|
|
85
|
-
import './sync-
|
|
86
|
+
import './sync-BvVhDO40.mjs';
|
|
86
87
|
import 'chalk';
|
|
87
88
|
import 'node:readline';
|
|
88
89
|
import './manager-BEsI4qt3.mjs';
|
|
89
90
|
import '@anthropic-ai/sandbox-runtime';
|
|
90
|
-
import './rateLimitWindows-
|
|
91
|
+
import './rateLimitWindows-BkfuUB1a.mjs';
|
|
91
92
|
import './processTree-CP5IvQ2Z.mjs';
|
|
92
93
|
import 'node:util';
|
|
93
94
|
import './detectCLI-CSGMlV51.mjs';
|
|
94
95
|
import 'fs';
|
|
95
|
-
import './localHappyAgentAuth-
|
|
96
|
+
import './localHappyAgentAuth-Dn1jYDpt.mjs';
|
|
96
97
|
import './types-CkqAACXx.mjs';
|
|
97
98
|
import 'url';
|
|
98
|
-
import './spawnHappyCLI-
|
|
99
|
+
import './spawnHappyCLI-BjFZc_7V.mjs';
|
|
99
100
|
import './doctorReadiness-C208SMN9.mjs';
|
|
100
101
|
|
|
101
102
|
function getStartedSubagents(state) {
|
|
@@ -1427,7 +1428,7 @@ async function runCodex(opts) {
|
|
|
1427
1428
|
agentStateVersion: parseInt(reconnectAgentStateVersion || "0", 10)
|
|
1428
1429
|
};
|
|
1429
1430
|
} else {
|
|
1430
|
-
response = await api.getOrCreateSession({ tag: sessionTag, metadata, state });
|
|
1431
|
+
response = await createSessionForStartup(() => api.getOrCreateSession({ tag: sessionTag, metadata, state }), { startedBy: opts.startedBy, log: (m) => logger.debug(m) });
|
|
1431
1432
|
}
|
|
1432
1433
|
if (response) {
|
|
1433
1434
|
await claimSessionOrExit(response.id, { takeover: !!reconnectSessionId, flavor: "codex" });
|
|
@@ -1437,15 +1438,18 @@ async function runCodex(opts) {
|
|
|
1437
1438
|
}
|
|
1438
1439
|
let reconnectSeeded = false;
|
|
1439
1440
|
let wakingFromHibernation = false;
|
|
1441
|
+
let reconnectReplay = null;
|
|
1440
1442
|
if (reconnectSessionId && response) {
|
|
1441
1443
|
const snapshot = await api.getSession(response.id, response.encryptionKey, response.encryptionVariant);
|
|
1442
1444
|
if (snapshot.ok) {
|
|
1443
1445
|
response = applyServerSnapshot(response, snapshot.session);
|
|
1444
1446
|
reconnectSeeded = true;
|
|
1445
1447
|
logger.debug(`[START] Reconnect seeded from server: seq=${snapshot.session.seq} metadataVersion=${snapshot.session.metadataVersion}`);
|
|
1446
|
-
const wake =
|
|
1448
|
+
const wake = applyReconnectReplay(response);
|
|
1447
1449
|
response = wake.response;
|
|
1448
|
-
|
|
1450
|
+
reconnectReplay = wake.replay;
|
|
1451
|
+
wakingFromHibernation = wake.replay?.source === "hibernation";
|
|
1452
|
+
if (wake.replay) logger.debug(`[START] Resuming (${wake.replay.source}): replaying records after seq=${response.seq}`);
|
|
1449
1453
|
} else {
|
|
1450
1454
|
response = withoutServerSnapshot(response);
|
|
1451
1455
|
logger.debug(`[START] Reconnect without server snapshot (${snapshot.reason}); skipping existing messages`);
|
|
@@ -1476,7 +1480,7 @@ async function runCodex(opts) {
|
|
|
1476
1480
|
if (reconnectSessionId) {
|
|
1477
1481
|
session.suppressNextArchiveSignal();
|
|
1478
1482
|
if (!reconnectSeeded) session.skipExistingMessages();
|
|
1479
|
-
if (!wakingFromHibernation) void session.cancelUndeliveredQueuedInputs();
|
|
1483
|
+
if (!wakingFromHibernation) void session.cancelUndeliveredQueuedInputs(reconnectReplay ? { maxSeq: reconnectReplay.seq } : void 0);
|
|
1480
1484
|
session.updateMetadata((meta) => mergeReconnectMetadata(meta, metadata, Date.now()));
|
|
1481
1485
|
}
|
|
1482
1486
|
if (response) {
|
|
@@ -1712,10 +1716,12 @@ async function runCodex(opts) {
|
|
|
1712
1716
|
return;
|
|
1713
1717
|
}
|
|
1714
1718
|
logger.debug("[Codex] Kill session requested - terminating process");
|
|
1719
|
+
const exitCursor = intent === "offline" && session ? exitCursorStamp(session.messageCursor, Date.now()) : void 0;
|
|
1720
|
+
if (exitCursor) session.freezeInbound();
|
|
1715
1721
|
await handleAbort("kill");
|
|
1716
1722
|
logger.debug("[Codex] Abort completed, proceeding with termination");
|
|
1717
1723
|
try {
|
|
1718
|
-
if (session) await settleCodexSession(session, intent, (id) => api.deactivateSession(id), (m, e) => logger.debug(m, safeCodexErrorMetadata(e)));
|
|
1724
|
+
if (session) await settleCodexSession(session, intent, (id) => api.deactivateSession(id), (m, e) => logger.debug(m, safeCodexErrorMetadata(e)), exitCursor);
|
|
1719
1725
|
try {
|
|
1720
1726
|
await client.disconnect();
|
|
1721
1727
|
} catch (e) {
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var node_crypto = require('node:crypto');
|
|
4
|
-
var logger = require('./logger-
|
|
4
|
+
var logger = require('./logger-CphW5nUE.cjs');
|
|
5
|
+
var sessionExitLifecycle = require('./sessionExitLifecycle-DFltxXU8.cjs');
|
|
5
6
|
|
|
6
7
|
class BaseReasoningProcessor {
|
|
7
8
|
accumulator = "";
|
|
@@ -198,7 +199,11 @@ class BaseReasoningProcessor {
|
|
|
198
199
|
}
|
|
199
200
|
|
|
200
201
|
async function settleCodexSession(session, intent, deactivate, log = () => {
|
|
201
|
-
}) {
|
|
202
|
+
}, exitCursor) {
|
|
203
|
+
if (intent === "offline" && exitCursor && session.updateMetadataAndWait) {
|
|
204
|
+
const landed = await session.updateMetadataAndWait((currentMetadata) => ({ ...currentMetadata, exitCursor }), sessionExitLifecycle.OFFLINE_EXIT_STAMP_TIMEOUT_MS);
|
|
205
|
+
if (!landed) log("[Codex] offline exit cursor not confirmed before going offline");
|
|
206
|
+
}
|
|
202
207
|
if (intent === "archive") {
|
|
203
208
|
session.updateMetadata((currentMetadata) => ({
|
|
204
209
|
...currentMetadata,
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { randomUUID } from 'node:crypto';
|
|
2
|
-
import { l as logger } from './logger-
|
|
2
|
+
import { l as logger } from './logger-BUngm5Xg.mjs';
|
|
3
|
+
import { O as OFFLINE_EXIT_STAMP_TIMEOUT_MS } from './sessionExitLifecycle-CzkLIgNZ.mjs';
|
|
3
4
|
|
|
4
5
|
class BaseReasoningProcessor {
|
|
5
6
|
accumulator = "";
|
|
@@ -196,7 +197,11 @@ class BaseReasoningProcessor {
|
|
|
196
197
|
}
|
|
197
198
|
|
|
198
199
|
async function settleCodexSession(session, intent, deactivate, log = () => {
|
|
199
|
-
}) {
|
|
200
|
+
}, exitCursor) {
|
|
201
|
+
if (intent === "offline" && exitCursor && session.updateMetadataAndWait) {
|
|
202
|
+
const landed = await session.updateMetadataAndWait((currentMetadata) => ({ ...currentMetadata, exitCursor }), OFFLINE_EXIT_STAMP_TIMEOUT_MS);
|
|
203
|
+
if (!landed) log("[Codex] offline exit cursor not confirmed before going offline");
|
|
204
|
+
}
|
|
200
205
|
if (intent === "archive") {
|
|
201
206
|
session.updateMetadata((currentMetadata) => ({
|
|
202
207
|
...currentMetadata,
|