very-happy-cli 0.2.188 → 0.2.190
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-2loP7MpF.mjs → AcpBackend-Dd1h-Rgt.mjs} +3 -3
- package/dist/{AcpBackend-B8AYkp5n.cjs → AcpBackend-dkRv9QHm.cjs} +3 -3
- package/dist/{AcpSessionManager-CLqo9R9Y.cjs → AcpSessionManager-AqWAqahm.cjs} +3 -3
- package/dist/{AcpSessionManager-C17doAoR.mjs → AcpSessionManager-QBZ-CIf7.mjs} +4 -4
- package/dist/{BasePermissionHandler-CrfyUmqO.mjs → BasePermissionHandler-CLp1ge-4.mjs} +1 -1
- package/dist/{BasePermissionHandler-C8UEcFz0.cjs → BasePermissionHandler-CpSugp7Z.cjs} +1 -1
- package/dist/{acpSessionResume-OuYlLGxL.cjs → acpSessionResume-CZao6QEd.cjs} +1 -1
- package/dist/{acpSessionResume-F705a1cF.mjs → acpSessionResume-CcpDuIO5.mjs} +1 -1
- package/dist/{agentHome-Dc7LYF3d.mjs → agentHome-BJGRA2Kx.mjs} +4 -4
- package/dist/{agentHome-DsKHJ_Sf.cjs → agentHome-fIUqT-pn.cjs} +4 -4
- package/dist/{api-BOqjYd5r.cjs → api-CXL6jp-p.cjs} +18 -9
- package/dist/{api-DNKa7kVy.mjs → api-Dw8gFsQi.mjs} +19 -10
- package/dist/{apiMachine-Di1G9ECW.mjs → apiMachine-BBNEtjf7.mjs} +56 -15
- package/dist/{apiMachine--rcPpMmt.cjs → apiMachine-C6UqHoPF.cjs} +55 -14
- package/dist/{attachmentContent-C9S4ekAz.mjs → attachmentContent-CC4yIrSm.mjs} +2 -2
- package/dist/{attachmentContent-BFRMLong.cjs → attachmentContent-NmVfKp-B.cjs} +2 -2
- package/dist/{auth-CXmI92aj.cjs → auth-Bb_SL2os.cjs} +5 -5
- package/dist/{auth-Bzwo_vOM.mjs → auth-Bh6SUoGi.mjs} +8 -8
- package/dist/{auth-BNhhk2Fr.mjs → auth-Bj0psrD2.mjs} +5 -5
- package/dist/{auth-CQtfznF0.cjs → auth-DKa4MsAi.cjs} +8 -8
- package/dist/{auto-DXLdaX5O.cjs → auto-C9Qohh0P.cjs} +17 -16
- package/dist/{auto-DHYOLnXB.mjs → auto-DK7pbCnV.mjs} +19 -18
- package/dist/{bootstrap-Di38SnpN.mjs → bootstrap-Ct9Nb4sv.mjs} +2 -2
- package/dist/{bootstrap-eJ1l7VYl.cjs → bootstrap-DBJB0y-H.cjs} +2 -2
- package/dist/{browser-6Cg7G6bb.mjs → browser-BGxDRhHy.mjs} +1 -1
- package/dist/{browser-D3uBFRQu.cjs → browser-CLJWcodR.cjs} +1 -1
- package/dist/{claudeLocal-BBaE4QF_.cjs → claudeLocal-B6YDYlnY.cjs} +4 -4
- package/dist/{claudeLocal-CqaEs-81.mjs → claudeLocal-Ux31hZyC.mjs} +5 -5
- package/dist/{claudeLocalLauncher-BDUPxtsI.mjs → claudeLocalLauncher-D06QijMw.mjs} +10 -10
- package/dist/{claudeLocalLauncher-wPxKtH_P.cjs → claudeLocalLauncher-DFvmF8rC.cjs} +9 -9
- package/dist/{claudeSessionFork-DzWFzj9m.mjs → claudeSessionFork-D2GI7P59.mjs} +1 -1
- package/dist/{claudeSessionFork-CmY25Fl3.cjs → claudeSessionFork-DTLZ2rek.cjs} +1 -1
- package/dist/{client-DmY03OZZ.cjs → client-Bffkrs5p.cjs} +2 -2
- package/dist/{client-C2HcMqRF.cjs → client-CARZ_lNS.cjs} +3 -3
- package/dist/{client-agH03Irm.cjs → client-CMKGrnmT.cjs} +2 -2
- package/dist/{client-DWws_aQK.mjs → client-CnGNYidN.mjs} +2 -2
- package/dist/{client-qJ0y8fus.mjs → client-CtL0Vtww.mjs} +4 -4
- package/dist/{client-DcDE6Ifk.mjs → client-DZkBUoh9.mjs} +2 -2
- package/dist/codex/happyMcpStdioBridge.cjs +16 -15
- package/dist/codex/happyMcpStdioBridge.mjs +17 -16
- package/dist/{codexAppServerClient-DgE99i7X.mjs → codexAppServerClient-CLc5nhLT.mjs} +37 -6
- package/dist/{codexAppServerClient-DwzC8LR0.cjs → codexAppServerClient-CpT9F6EM.cjs} +37 -6
- package/dist/{codexCommand-1vFEA1KT.cjs → codexCommand-39kH99SJ.cjs} +148 -61
- package/dist/{codexCommand-DUSVzbKh.mjs → codexCommand-Dliq3EBv.mjs} +143 -56
- package/dist/{codexTermination-DuDPyBRR.cjs → codexTermination-ByW7tRjr.cjs} +1 -1
- package/dist/{codexTermination-Bybovr2z.mjs → codexTermination-ORIw0gpU.mjs} +1 -1
- package/dist/{codexThreadFork-DNekT4nQ.cjs → codexThreadFork-5kwoKjMu.cjs} +11 -17
- package/dist/{codexThreadFork-R76RU5H0.mjs → codexThreadFork-DobPd19R.mjs} +11 -17
- package/dist/{config-C4xOL5bH.cjs → config-CeIzCsfj.cjs} +3 -3
- package/dist/{config-BrzZ0O-6.mjs → config-CxSsGO1Z.mjs} +3 -3
- package/dist/{configuration-BZHpFD7K.mjs → configuration-Dechcvd-.mjs} +1 -1
- package/dist/{configuration-DyPW9mVa.cjs → configuration-Dt5lKW3P.cjs} +1 -1
- package/dist/{connect-DurKwMEo.cjs → connect-NPDzIVC6.cjs} +12 -12
- package/dist/{connect-Cw_INlj8.mjs → connect-UwQHvCpR.mjs} +13 -13
- package/dist/{context-2xDvjkQp.cjs → context-BdZssgF0.cjs} +1 -1
- package/dist/{context-t7YV0aZc.mjs → context-C9JbJoNe.mjs} +1 -1
- package/dist/{controlClient-DvFaPsg6.cjs → controlClient-BRk65BRO.cjs} +3 -3
- package/dist/{controlClient-Bw56NIrj.mjs → controlClient-D7NGfmtq.mjs} +3 -3
- package/dist/{createSessionMetadata-Dpg6bV6f.cjs → createSessionMetadata-B_HZCDj_.cjs} +2 -2
- package/dist/{createSessionMetadata-Dn5BkLfU.mjs → createSessionMetadata-DyhFKAby.mjs} +2 -2
- package/dist/defaultPermissionMode-BnxJPVHT.mjs +4 -0
- package/dist/defaultPermissionMode-CxmTXUQR.cjs +7 -0
- package/dist/{deterministicJson-D0BrV1FD.cjs → deterministicJson-BEygolBQ.cjs} +12 -12
- package/dist/{deterministicJson-CsRckxVq.mjs → deterministicJson-DNmMVhFu.mjs} +13 -13
- package/dist/{doctor-CYe4d9kU.cjs → doctor-B9lW1WlG.cjs} +7 -7
- package/dist/{doctor-B4HQiW6j.mjs → doctor-BdBi7TFZ.mjs} +7 -7
- package/dist/{downloadTarget-tYMV_VHo.mjs → downloadTarget-CGojGjaN.mjs} +6 -6
- package/dist/{downloadTarget-CuhBVvuC.cjs → downloadTarget-DS0zT2AU.cjs} +6 -6
- package/dist/{ensureDaemonRunning-DVtIG9z7.mjs → ensureDaemonRunning-BOdbryDM.mjs} +5 -5
- package/dist/{ensureDaemonRunning-Ce3BlWiR.cjs → ensureDaemonRunning-Bibp6vhe.cjs} +5 -5
- package/dist/exitAfterFlush-AbKNZM0N.mjs +23 -0
- package/dist/exitAfterFlush-DIT_sIxR.cjs +25 -0
- package/dist/{handleResumeCommand-BU1uMNyv.mjs → handleResumeCommand-CgLzBYne.mjs} +5 -5
- package/dist/{handleResumeCommand-CLxsmAW0.cjs → handleResumeCommand-DXOuWr4p.cjs} +5 -5
- package/dist/{agentAttachments-Dbw8iMCZ.cjs → heldInput-BOtqFO2r.cjs} +27 -0
- package/dist/heldInput-C69lA2dH.mjs +44 -0
- package/dist/{index-KwuXqLwe.cjs → index-Bs5FD8JF.cjs} +4 -4
- package/dist/{index-ChX0eVXw.mjs → index-CBHfkQNY.mjs} +142 -60
- package/dist/{index-DoXbGEAi.cjs → index-CwRW11hT.cjs} +3 -3
- package/dist/{index-CVHRt3SS.mjs → index-DUByZsKe.mjs} +4 -4
- package/dist/{index-wWJJAQRk.cjs → index-DXSIi6j_.cjs} +4 -4
- package/dist/{index-DDz0Ftoy.mjs → index-Db0HIC-k.mjs} +4 -4
- package/dist/{index-WKyN-bNy.mjs → index-DmqsRnV7.mjs} +1 -1
- package/dist/{index-DG1kGjkF.cjs → index-f8oDidjV.cjs} +142 -60
- package/dist/{index-B1OxWiNG.mjs → index-rNTX33in.mjs} +3 -3
- package/dist/index.cjs +2 -2
- package/dist/index.mjs +2 -2
- package/dist/{install-cAYvHxXR.cjs → install-CXIL_FYx.cjs} +3 -3
- package/dist/{install-CMa_FOWu.mjs → install-DfPrEWGG.mjs} +3 -3
- package/dist/lib.cjs +11 -11
- package/dist/lib.d.cts +61 -1
- package/dist/lib.d.mts +61 -1
- package/dist/lib.mjs +12 -12
- package/dist/{lidState-D-lsD1FS.mjs → lidState-D0DF20oG.mjs} +1 -1
- package/dist/{lidState-d1vgQ3n7.cjs → lidState-q_XFYg33.cjs} +1 -1
- package/dist/{localHappyAgentAuth-wvDp-nGj.mjs → localHappyAgentAuth-BBhM4Qk1.mjs} +1 -1
- package/dist/{localHappyAgentAuth-DucSnCg3.cjs → localHappyAgentAuth-CKNW-MXw.cjs} +1 -1
- package/dist/{logger-C3vZG6Q0.cjs → logger-BBRTTVsQ.cjs} +2 -2
- package/dist/{logger-RpzJ4d8V.mjs → logger-CL7pin9b.mjs} +2 -2
- package/dist/{machineMetadata-CiQ2_1Mq.mjs → machineMetadata-DP06qdBk.mjs} +3 -3
- package/dist/{machineMetadata-CAvFq1Jg.cjs → machineMetadata-DnFNlrVK.cjs} +3 -3
- package/dist/{main-ChpYcFZi.cjs → main-DLOXykOR.cjs} +49 -48
- package/dist/{main-IPhaImjm.mjs → main-DO7nRvhf.mjs} +49 -48
- package/dist/{mcp-CWnMvju6.mjs → mcp-C-4sPTae.mjs} +16 -15
- package/dist/{mcp-2xF232hL.cjs → mcp-Du0MgR7e.cjs} +15 -14
- package/dist/{mirrorProtocol-CVzPObON.cjs → mirrorProtocol-GuWMxLkh.cjs} +2 -2
- package/dist/{mirrorProtocol-Dr7fNq8V.mjs → mirrorProtocol-dkq2ZENA.mjs} +3 -3
- package/dist/{package-CwB8rFJt.mjs → package-C6uiXULx.mjs} +7 -7
- package/dist/{package-Gnf_935w.cjs → package-DrY090nZ.cjs} +7 -7
- package/dist/{panels-DTlTsndU.cjs → panels-4DRBKHZP.cjs} +5 -5
- package/dist/{panels-L1mSkC-y.mjs → panels-DXYdJA6n.mjs} +5 -5
- package/dist/{peerTools-C1E5cQ86.cjs → peerTools-5ZM4spcZ.cjs} +5 -5
- package/dist/{peerTools-2_8Bw9PU.mjs → peerTools-dY1aJez4.mjs} +5 -5
- package/dist/{persistence-CqtjFiD1.cjs → persistence-Bl5S3TLB.cjs} +6 -2
- package/dist/{persistence-Bn4qEbDg.mjs → persistence-Dogj7JIp.mjs} +6 -3
- package/dist/{piRunnerArgs-BI8yQRBZ.cjs → piRunnerArgs-C3jZ1M6b.cjs} +1 -1
- package/dist/{piRunnerArgs-DWBb63W9.mjs → piRunnerArgs-D8nN_Iit.mjs} +1 -1
- package/dist/{piRuntime--mQ43MSM.cjs → piRuntime-Bd9-eq6M.cjs} +1 -1
- package/dist/{piRuntime-Do8oqbm3.mjs → piRuntime-BoeMsAXK.mjs} +1 -1
- package/dist/{piTerminal-BzcvLFsP.cjs → piTerminal-C3j1ca3x.cjs} +17 -16
- package/dist/{piTerminal-GC1KHTYQ.mjs → piTerminal-GEPkIGD4.mjs} +18 -17
- package/dist/{pushNotifications-Bb-QSqXw.cjs → pushNotifications-CfspRcl-.cjs} +20 -2
- package/dist/{pushNotifications-BThg4nVd.mjs → pushNotifications-dUceOIni.mjs} +21 -3
- package/dist/{query-Bz3pocKH.cjs → query-DjsVgG3E.cjs} +1 -1
- package/dist/{query-CkgIJ_Dy.mjs → query-iYH-tm7L.mjs} +1 -1
- package/dist/{rateLimitReporter-BkHyvLru.cjs → rateLimitReporter-DUu2KydZ.cjs} +3 -3
- package/dist/{rateLimitReporter-Iw4k3Bbr.mjs → rateLimitReporter-jeVi-fym.mjs} +3 -3
- package/dist/{rateLimitWindows-Bm_dcQGW.cjs → rateLimitWindows-Bx3ROBP5.cjs} +1 -1
- package/dist/{rateLimitWindows-CQ4tIQnx.mjs → rateLimitWindows-CEn0DXaX.mjs} +1 -1
- package/dist/{registerCommonHandlers-CIs6H2DV.cjs → registerCommonHandlers-Beun-cQv.cjs} +2 -2
- package/dist/{registerCommonHandlers-CaWl9ll1.mjs → registerCommonHandlers-DWZ7mfdt.mjs} +2 -2
- package/dist/{specialCommands-BsvSoDhC.cjs → registerKillSessionHandler-CA1FFr_F.cjs} +15 -62
- package/dist/{specialCommands-DHU7TNeK.mjs → registerKillSessionHandler-CzgklwLG.mjs} +17 -60
- package/dist/{remoteSessionClient-uPj7omsw.mjs → remoteSessionClient-BiC2KDew.mjs} +5 -5
- package/dist/{remoteSessionClient-DgUMfPW4.cjs → remoteSessionClient-DGFI__5Z.cjs} +5 -5
- package/dist/{reportProgressTool-DUEq3xAL.mjs → reportProgressTool-CgPy6n_7.mjs} +3 -3
- package/dist/{reportProgressTool-CaJ8EwLq.cjs → reportProgressTool-CvPGov1F.cjs} +2 -2
- package/dist/{run-DTUJBD6p.mjs → run-B_gFgJVB.mjs} +393 -42
- package/dist/{run-DyyGMqND.cjs → run-rPqQwDi_.cjs} +391 -40
- package/dist/{runClaude-DTNvIz2J.mjs → runClaude-CykqeXK7.mjs} +26 -23
- package/dist/{runClaude-8JDaPoGQ.cjs → runClaude-DM8gm8iu.cjs} +27 -24
- package/dist/{runClaudeDeps-CgGkgg7e.mjs → runClaudeDeps-D2phXGut.mjs} +106 -46
- package/dist/{runClaudeDeps-BeLo5zss.cjs → runClaudeDeps-DGAomimZ.cjs} +101 -40
- package/dist/{runGemini-BSOdU563.cjs → runGemini-CXTeSOZp.cjs} +50 -49
- package/dist/{runGemini-eU8UOzfc.mjs → runGemini-CtWCVkj5.mjs} +49 -48
- package/dist/{runOpenClaw-D8RZiA1e.mjs → runOpenClaw-BBdjlViJ.mjs} +25 -24
- package/dist/{runOpenClaw-CYyFoGRZ.cjs → runOpenClaw-CH_9_RyZ.cjs} +26 -25
- package/dist/{sandbox-C8zfNX-4.cjs → sandbox-Bb5IMun3.cjs} +4 -4
- package/dist/{sandbox-DlPahdhl.mjs → sandbox-DGmXZ6Zz.mjs} +4 -4
- package/dist/selfCheck-BfK945YQ.mjs +86 -0
- package/dist/{selfCheck-D28nvuPJ.cjs → selfCheck-CccwNTTK.cjs} +37 -37
- package/dist/{send-DBpv-1eh.mjs → send-B6rHg8GT.mjs} +9 -8
- package/dist/{send-C58kX4qz.cjs → send-BpiXPkDo.cjs} +9 -8
- package/dist/{server-J5K6pOox.mjs → server-BkdAyHhC.mjs} +4 -4
- package/dist/{server-I_CETZzn.cjs → server-DHUzjApC.cjs} +6 -6
- package/dist/{sessionLock-DjE7O0LS.cjs → sessionLock-BFBReiKq.cjs} +134 -3
- package/dist/{sessionLock-C7Wg1RVd.mjs → sessionLock-Ca_bIo50.mjs} +121 -4
- package/dist/{sessionOps-CYjMT7Ad.mjs → sessionOps-CA2kpm66.mjs} +36 -5
- package/dist/{sessionOps-DGMpl9NB.cjs → sessionOps-DeWVqpe4.cjs} +36 -4
- package/dist/{sessionProvider-DVtxrOuM.cjs → sessionProvider-VFbtUmMR.cjs} +5 -5
- package/dist/{sessionProvider-TLiFn9kD.mjs → sessionProvider-g18IiK74.mjs} +5 -5
- package/dist/{sessionScanner-BZ1ZSn6I.cjs → sessionScanner-CGzsN8V6.cjs} +3 -3
- package/dist/{sessionScanner-CknV1IlN.mjs → sessionScanner-DDDud5re.mjs} +3 -3
- package/dist/{sessions-DU4bxkap.mjs → sessions-B4d50sCI.mjs} +36 -26
- package/dist/{sessions-CTkBKs5U.cjs → sessions-CKJPWFgu.cjs} +37 -25
- package/dist/{setupOfflineReconnection-DaOXnGuH.mjs → setupOfflineReconnection-CyPNgyCe.mjs} +2 -2
- package/dist/{setupOfflineReconnection-CQHNuP_0.cjs → setupOfflineReconnection-DPXRo_zf.cjs} +2 -2
- package/dist/{spawn-C0wZc03S.cjs → spawn-CgSJzzWS.cjs} +17 -16
- package/dist/{spawn-DdnYTtQe.mjs → spawn-CrYN_OOT.mjs} +18 -17
- package/dist/{spawnAgents-BjyU78Ue.cjs → spawnAgents-C1-4m7aN.cjs} +3 -1
- package/dist/{spawnAgents-D-7wMw-a.mjs → spawnAgents-DWCDYCQ1.mjs} +4 -2
- package/dist/{spawnHappyCLI-BJUd974I.cjs → spawnHappyCLI-CTy3p6V_.cjs} +1 -1
- package/dist/{spawnHappyCLI-CnyyJk74.mjs → spawnHappyCLI-DjbkiSH1.mjs} +1 -1
- package/dist/specialCommands-J3JFOq0J.cjs +60 -0
- package/dist/specialCommands-MXUN0wfI.mjs +54 -0
- package/dist/{startFileWatcher-DBboREco.cjs → startFileWatcher-BQs0cJA-.cjs} +1 -1
- package/dist/{startFileWatcher-CpO5Mwbr.mjs → startFileWatcher-Dedtu1vq.mjs} +1 -1
- package/dist/{defaultPermissionMode-DMTnlccv.mjs → startupSessionCreate-BKFU4v_h.mjs} +25 -6
- package/dist/{defaultPermissionMode-Dlm0q1m0.cjs → startupSessionCreate-Dxy3X4DG.cjs} +25 -7
- package/dist/{streamRelay-CqBynIon.mjs → streamRelay-P9e7Sohm.mjs} +1 -1
- package/dist/{sync-6HFRJP1h.cjs → sync-DtWB7RzA.cjs} +1 -1
- package/dist/{sync-I8NYmycF.mjs → sync-eZkXnsW_.mjs} +1 -1
- package/dist/{systemPrompt-BDWj5QSL.cjs → systemPrompt-2XOpZ1j6.cjs} +1 -1
- package/dist/{systemPrompt-C1RSY_60.mjs → systemPrompt-Bn6g6aCH.mjs} +2 -2
- package/dist/{teams-eUD7ymif.cjs → teams-ecFay4Gn.cjs} +6 -6
- package/dist/{teams-GpLFbXXE.mjs → teams-nadkqrbW.mjs} +7 -7
- package/dist/{template-CEK8MEjo.mjs → template-BiTD-jI9.mjs} +1 -1
- package/dist/{time-umG7yHkb.mjs → time-CN3TuSVG.mjs} +1 -1
- package/dist/{time-BAJRbB6U.cjs → time-gPD_EmA-.cjs} +1 -1
- package/dist/{titleGenerator-dmFlxkRs.mjs → titleGenerator-DgzTQdn2.mjs} +1 -1
- package/dist/{titleGenerator-iqb2jOF1.cjs → titleGenerator-lT5ldPuN.cjs} +2 -2
- package/dist/{todo-DsR7WnQS.cjs → todo-B1VeMk5A.cjs} +5 -5
- package/dist/{todo-CT4AJ3sH.mjs → todo-BIxd7l2Q.mjs} +6 -6
- package/dist/{tools-30E66QL_.cjs → tools-DvqbLsCF.cjs} +1 -1
- package/dist/{tools-BOWazSD6.mjs → tools-zXJpxiG_.mjs} +1 -1
- package/dist/{uninstall-DImXs6VZ.mjs → uninstall-9htK6mb7.mjs} +3 -3
- package/dist/{uninstall-BtTc9hHa.cjs → uninstall-CvIOpwB5.cjs} +3 -3
- package/package.json +7 -7
- package/dist/agentAttachments-M_B5qEF2.mjs +0 -18
- package/dist/selfCheck-4bcdHPFQ.mjs +0 -86
- package/dist/startupSessionCreate-BgaVuvQp.mjs +0 -24
- package/dist/startupSessionCreate-C1u2dtz8.cjs +0 -26
|
@@ -1,105 +1,107 @@
|
|
|
1
|
-
import { a as authAndSetupMachineIfNeeded } from './auth-
|
|
2
|
-
import { g as createEnvelope, j as BUILTIN_TODO_DISCOVERY, P as PROMPT_QUEUE_CAPABILITY, J as CODEX_STEER_CAPABILITY, a as PROJECT_SESSION_CAPABILITY, K as CODEX_COMPACT_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-Bj0psrD2.mjs';
|
|
2
|
+
import { g as createEnvelope, j as BUILTIN_TODO_DISCOVERY, P as PROMPT_QUEUE_CAPABILITY, J as CODEX_STEER_CAPABILITY, a as PROJECT_SESSION_CAPABILITY, K as CODEX_COMPACT_CAPABILITY } from './index-DmqsRnV7.mjs';
|
|
3
|
+
import { h as hashObject, s as startHappyServer, c as createProjectInjector } from './deterministicJson-DNmMVhFu.mjs';
|
|
4
|
+
import { s as sharedProjectsClient } from './client-CnGNYidN.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
|
-
import { t as textResultPayload, d as toolResultContentText, c as connectionState, A as ApiClient } from './api-
|
|
10
|
-
import { r as registerAgentAttachmentDownloads } from './
|
|
11
|
-
import { C as CLAUDE_ATTACHMENT_KINDS, a as stageClaudeAttachments, b as appendStagedAttachmentsToPrompt } from './attachmentContent-
|
|
9
|
+
import { t as textResultPayload, d as toolResultContentText, c as connectionState, A as ApiClient } from './api-Dw8gFsQi.mjs';
|
|
10
|
+
import { r as registerAgentAttachmentDownloads, H as HeldInput } from './heldInput-C69lA2dH.mjs';
|
|
11
|
+
import { C as CLAUDE_ATTACHMENT_KINDS, a as stageClaudeAttachments, b as appendStagedAttachmentsToPrompt } from './attachmentContent-CC4yIrSm.mjs';
|
|
12
12
|
import { useStdout, useInput, Box, Text, render } from 'ink';
|
|
13
|
-
import { c as claimSessionOrExit, a as applyServerSnapshot, b as applyReconnectReplay, w as withoutServerSnapshot, m as mergeReconnectMetadata, e as exitCursorStamp } from './sessionLock-
|
|
13
|
+
import { c as claimSessionOrExit, a as applyServerSnapshot, b as applyReconnectReplay, w as withoutServerSnapshot, m as mergeReconnectMetadata, t as takeAutoRestartedEvent, A as AUTO_RESTART_CAPABILITY, e as exitCursorStamp } from './sessionLock-Ca_bIo50.mjs';
|
|
14
14
|
import React, { useState, useRef, useEffect, useCallback } from 'react';
|
|
15
|
-
import { C as CodexAppServerClient } from './codexAppServerClient-
|
|
16
|
-
import { w as wrapperRateLimitReporter } from './rateLimitReporter-
|
|
17
|
-
import { l as logger } from './logger-
|
|
18
|
-
import { B as BasePermissionHandler } from './BasePermissionHandler-
|
|
19
|
-
import { B as BaseReasoningProcessor, s as settleCodexSession } from './codexTermination-
|
|
15
|
+
import { C as CodexAppServerClient } from './codexAppServerClient-CLc5nhLT.mjs';
|
|
16
|
+
import { w as wrapperRateLimitReporter } from './rateLimitReporter-jeVi-fym.mjs';
|
|
17
|
+
import { l as logger } from './logger-CL7pin9b.mjs';
|
|
18
|
+
import { B as BasePermissionHandler } from './BasePermissionHandler-CLp1ge-4.mjs';
|
|
19
|
+
import { B as BaseReasoningProcessor, s as settleCodexSession } from './codexTermination-ORIw0gpU.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 {
|
|
21
|
+
import { r as readSettings, l as latchKeepAwake, e as evaluateWrapperIdle, a as resolveCheckMs, H as HIBERNATION_CAPABILITY } from './persistence-Dogj7JIp.mjs';
|
|
22
|
+
import { g as getInitialMachineMetadata } from './machineMetadata-DP06qdBk.mjs';
|
|
23
|
+
import { c as configuration } from './configuration-Dechcvd-.mjs';
|
|
24
|
+
import { M as MessageQueue2, r as registerKillSessionHandler } from './registerKillSessionHandler-CzgklwLG.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-
|
|
27
|
+
import { c as createSessionMetadata } from './createSessionMetadata-DyhFKAby.mjs';
|
|
28
28
|
import { M as MessageBuffer } from './sessionExitLifecycle-CzkLIgNZ.mjs';
|
|
29
|
-
import { n as notifyDaemonSessionStarted, k as reportSessionEditToDaemon, c as checkDaemonHibernation } from './controlClient-
|
|
30
|
-
import {
|
|
29
|
+
import { n as notifyDaemonSessionStarted, k as reportSessionEditToDaemon, c as checkDaemonHibernation } from './controlClient-D7NGfmtq.mjs';
|
|
30
|
+
import { c as createSessionForStartup, b as HibernationExitLatch, H as HibernationProbe, a as commitHibernation } from './startupSessionCreate-BKFU4v_h.mjs';
|
|
31
31
|
import { d as decodeBase64, e as encodeBase64 } from './authRelay-DhQhkBvX.mjs';
|
|
32
|
-
import { s as setupOfflineReconnection } from './setupOfflineReconnection-
|
|
33
|
-
import { c as createSessionForStartup } from './startupSessionCreate-BgaVuvQp.mjs';
|
|
32
|
+
import { s as setupOfflineReconnection } from './setupOfflineReconnection-CyPNgyCe.mjs';
|
|
34
33
|
import { t as trimIdent } from './trimIdent-BAjmv_TG.mjs';
|
|
34
|
+
import { a as parseSpecialCommand, c as compactCommandText, b as parseCompact } from './specialCommands-MXUN0wfI.mjs';
|
|
35
35
|
import { C as CHANGE_TITLE_INSTRUCTION } from './constants-BC4St0xd.mjs';
|
|
36
|
+
import { a as DEFAULT_CODEX_PERMISSION_MODE } from './defaultPermissionMode-BnxJPVHT.mjs';
|
|
36
37
|
import { E as EditReportThrottle, a as extractCodexPatchPaths } from './editPaths-BVfS_FFL.mjs';
|
|
37
|
-
import { a as extractNoSandboxFlag, e as ensureDaemonRunning } from './ensureDaemonRunning-
|
|
38
|
+
import { a as extractNoSandboxFlag, e as ensureDaemonRunning } from './ensureDaemonRunning-BOdbryDM.mjs';
|
|
38
39
|
import 'tweetnacl';
|
|
39
40
|
import 'axios';
|
|
40
|
-
import './time-
|
|
41
|
-
import './browser-
|
|
41
|
+
import './time-CN3TuSVG.mjs';
|
|
42
|
+
import './browser-BGxDRhHy.mjs';
|
|
42
43
|
import 'open';
|
|
43
44
|
import 'zod';
|
|
44
45
|
import './prompt-QHuFx9j6.mjs';
|
|
45
|
-
import './reportProgressTool-
|
|
46
|
-
import './client-
|
|
46
|
+
import './reportProgressTool-CgPy6n_7.mjs';
|
|
47
|
+
import './client-DZkBUoh9.mjs';
|
|
47
48
|
import './precheckCompat-DeEbilbr.mjs';
|
|
48
49
|
import './agentGuidance-BDYt2Qy2.mjs';
|
|
49
50
|
import 'node:fs';
|
|
50
51
|
import 'node:os';
|
|
51
52
|
import './pi-CqyoZMjI.mjs';
|
|
52
53
|
import './fileStore-5qpetZS0.mjs';
|
|
53
|
-
import './client-
|
|
54
|
+
import './client-CtL0Vtww.mjs';
|
|
54
55
|
import 'node:util';
|
|
55
|
-
import './context-
|
|
56
|
-
import './sessionOps-
|
|
56
|
+
import './context-C9JbJoNe.mjs';
|
|
57
|
+
import './sessionOps-CA2kpm66.mjs';
|
|
57
58
|
import 'socket.io-client';
|
|
58
59
|
import './backgroundTaskActivity-8PdPxrvy.mjs';
|
|
59
60
|
import './resources-CLP_MpK4.mjs';
|
|
60
|
-
import './tools-
|
|
61
|
-
import './peerTools-
|
|
61
|
+
import './tools-zXJpxiG_.mjs';
|
|
62
|
+
import './peerTools-dY1aJez4.mjs';
|
|
62
63
|
import './ids-DU6sLx4C.mjs';
|
|
63
|
-
import './remoteSessionClient-
|
|
64
|
+
import './remoteSessionClient-BiC2KDew.mjs';
|
|
64
65
|
import '@modelcontextprotocol/sdk/server/mcp.js';
|
|
65
66
|
import 'node:http';
|
|
66
67
|
import '@modelcontextprotocol/sdk/server/streamableHttp.js';
|
|
67
68
|
import './limits-DIo7rEBR.mjs';
|
|
68
|
-
import './downloadTarget-
|
|
69
|
+
import './downloadTarget-CGojGjaN.mjs';
|
|
69
70
|
import './terminals-Dlg0x3nY.mjs';
|
|
70
71
|
import './terminalTitleSuggest-CeKsX_V6.mjs';
|
|
71
72
|
import './tmuxSocket-B8Yx20sT.mjs';
|
|
72
|
-
import './bootstrap-
|
|
73
|
-
import './package-
|
|
73
|
+
import './bootstrap-Ct9Nb4sv.mjs';
|
|
74
|
+
import './package-C6uiXULx.mjs';
|
|
74
75
|
import './webPanels-B2_C2-3g.mjs';
|
|
75
|
-
import './pushNotifications-
|
|
76
|
+
import './pushNotifications-dUceOIni.mjs';
|
|
76
77
|
import './contentLogMetadata-BlWI0egu.mjs';
|
|
77
78
|
import './previewPath-CXN4Vag0.mjs';
|
|
78
79
|
import 'crypto';
|
|
79
|
-
import './lidState-
|
|
80
|
+
import './lidState-D0DF20oG.mjs';
|
|
80
81
|
import 'os';
|
|
81
82
|
import 'child_process';
|
|
82
83
|
import 'node:events';
|
|
83
|
-
import './registerCommonHandlers-
|
|
84
|
+
import './registerCommonHandlers-DWZ7mfdt.mjs';
|
|
84
85
|
import 'util';
|
|
85
86
|
import 'fs/promises';
|
|
86
87
|
import 'path';
|
|
87
88
|
import 'cross-spawn';
|
|
88
|
-
import './sync-
|
|
89
|
+
import './sync-eZkXnsW_.mjs';
|
|
89
90
|
import 'chalk';
|
|
91
|
+
import './cliUpdate-Y34VGe9Y.mjs';
|
|
90
92
|
import './processTreeSnapshot-CuLJDNC-.mjs';
|
|
91
93
|
import 'node:readline';
|
|
92
94
|
import './manager-BEsI4qt3.mjs';
|
|
93
95
|
import '@anthropic-ai/sandbox-runtime';
|
|
94
|
-
import './rateLimitWindows-
|
|
96
|
+
import './rateLimitWindows-CEn0DXaX.mjs';
|
|
95
97
|
import './processTree-CP5IvQ2Z.mjs';
|
|
96
98
|
import './detectCLI-CSGMlV51.mjs';
|
|
97
99
|
import 'fs';
|
|
98
|
-
import './localHappyAgentAuth-
|
|
100
|
+
import './localHappyAgentAuth-BBhM4Qk1.mjs';
|
|
99
101
|
import './fsMkdir-DumgLTzR.mjs';
|
|
100
102
|
import './types-CkqAACXx.mjs';
|
|
101
103
|
import 'url';
|
|
102
|
-
import './spawnHappyCLI-
|
|
104
|
+
import './spawnHappyCLI-DjbkiSH1.mjs';
|
|
103
105
|
import './doctorReadiness-C208SMN9.mjs';
|
|
104
106
|
|
|
105
107
|
function getStartedSubagents(state) {
|
|
@@ -1094,6 +1096,19 @@ function unsupportedEffortReason(catalog, model, effort) {
|
|
|
1094
1096
|
return `Reasoning effort "${effort}" is not supported by ${model ?? "the default model"}. Choose a supported level.`;
|
|
1095
1097
|
}
|
|
1096
1098
|
|
|
1099
|
+
function resolveCodexTurnModel(mode, machineDefault) {
|
|
1100
|
+
if (mode.model) return mode.model;
|
|
1101
|
+
return mode.modelReset ? machineDefault || void 0 : void 0;
|
|
1102
|
+
}
|
|
1103
|
+
function codexModelFacts(input) {
|
|
1104
|
+
const { threadModel, pendingModel, machineDefault } = input;
|
|
1105
|
+
if (!threadModel) return { stickyModel: pendingModel ?? null };
|
|
1106
|
+
return {
|
|
1107
|
+
stickyModel: threadModel !== machineDefault ? threadModel : null,
|
|
1108
|
+
currentModelCode: threadModel
|
|
1109
|
+
};
|
|
1110
|
+
}
|
|
1111
|
+
|
|
1097
1112
|
const UNEXPECTED_STATUS = /^unexpected status (\d{3}) ([^:]*?):\s*([\s\S]*?)(?:,\s*url:\s*(\S+))?$/;
|
|
1098
1113
|
function readableCodexErrorText(text) {
|
|
1099
1114
|
const trimmed = text.trim();
|
|
@@ -1375,6 +1390,7 @@ function hashCodexEnhancedMode(mode) {
|
|
|
1375
1390
|
return hashObject({
|
|
1376
1391
|
permissionMode: mode.permissionMode,
|
|
1377
1392
|
model: mode.model,
|
|
1393
|
+
modelReset: mode.modelReset,
|
|
1378
1394
|
appendSystemPrompt: mode.appendSystemPrompt,
|
|
1379
1395
|
effort: mode.effort
|
|
1380
1396
|
});
|
|
@@ -1428,6 +1444,16 @@ function safeCodexErrorMetadata(value) {
|
|
|
1428
1444
|
};
|
|
1429
1445
|
}
|
|
1430
1446
|
|
|
1447
|
+
const CODEX_REMOTE_PERMISSION_MODES = [
|
|
1448
|
+
"default",
|
|
1449
|
+
"read-only",
|
|
1450
|
+
"safe-yolo",
|
|
1451
|
+
"yolo"
|
|
1452
|
+
];
|
|
1453
|
+
function codexPublishablePermissionMode(mode) {
|
|
1454
|
+
return typeof mode === "string" && CODEX_REMOTE_PERMISSION_MODES.includes(mode) ? mode : null;
|
|
1455
|
+
}
|
|
1456
|
+
|
|
1431
1457
|
const DEFAULT_CODEX_MODEL = void 0;
|
|
1432
1458
|
const DEFAULT_CODEX_EFFORT = "medium";
|
|
1433
1459
|
async function runCodex(opts) {
|
|
@@ -1472,9 +1498,11 @@ async function runCodex(opts) {
|
|
|
1472
1498
|
dangerouslySkipPermissions: initialPermissionMode === "yolo" || initialPermissionMode === "bypassPermissions",
|
|
1473
1499
|
...forkedFromSessionId ? { parentSessionId: forkedFromSessionId } : {},
|
|
1474
1500
|
...forkedFromMessageId ? { forkedFromMessageId } : {},
|
|
1475
|
-
capabilities: [PROMPT_QUEUE_CAPABILITY, FORK_BACKFILL_CAPABILITY, HIBERNATION_CAPABILITY, CODEX_STEER_CAPABILITY, PROJECT_SESSION_CAPABILITY, CODEX_COMPACT_CAPABILITY]
|
|
1501
|
+
capabilities: [PROMPT_QUEUE_CAPABILITY, FORK_BACKFILL_CAPABILITY, HIBERNATION_CAPABILITY, AUTO_RESTART_CAPABILITY, CODEX_STEER_CAPABILITY, PROJECT_SESSION_CAPABILITY, CODEX_COMPACT_CAPABILITY]
|
|
1476
1502
|
});
|
|
1477
1503
|
metadata.attachmentKinds = [...CLAUDE_ATTACHMENT_KINDS];
|
|
1504
|
+
metadata.stickyModel = null;
|
|
1505
|
+
metadata.currentThoughtLevelCode = DEFAULT_CODEX_EFFORT;
|
|
1478
1506
|
const importCodexThreadId = process.env[IMPORT_CODEX_THREAD_ENV];
|
|
1479
1507
|
if (importCodexThreadId) {
|
|
1480
1508
|
metadata.importedFromCodexThreadId = importCodexThreadId;
|
|
@@ -1587,24 +1615,49 @@ async function runCodex(opts) {
|
|
|
1587
1615
|
const keys = entries.map((entry) => entry.sourceId).filter((key) => typeof key === "string");
|
|
1588
1616
|
if (keys.length > 0) session.sendQueueCancelReason(keys, entries[0].reason);
|
|
1589
1617
|
});
|
|
1618
|
+
const heldInput = new HeldInput((keys, reason) => session.sendQueueCancelReason(keys, reason));
|
|
1590
1619
|
let currentPermissionMode = initialPermissionMode;
|
|
1591
1620
|
let currentModel = DEFAULT_CODEX_MODEL;
|
|
1592
1621
|
let currentEffort = DEFAULT_CODEX_EFFORT;
|
|
1593
1622
|
let currentAppendSystemPrompt = void 0;
|
|
1623
|
+
let reportedStickyModel = null;
|
|
1624
|
+
let reportedCurrentModel;
|
|
1625
|
+
let reportedEffort = DEFAULT_CODEX_EFFORT;
|
|
1626
|
+
const reportModeFacts = () => {
|
|
1627
|
+
const facts = codexModelFacts({ threadModel: client.threadModel, pendingModel: currentModel, machineDefault: machineDefaultModel });
|
|
1628
|
+
const effort = currentEffort;
|
|
1629
|
+
if (facts.stickyModel === reportedStickyModel && facts.currentModelCode === reportedCurrentModel && effort === reportedEffort) return;
|
|
1630
|
+
reportedStickyModel = facts.stickyModel;
|
|
1631
|
+
reportedCurrentModel = facts.currentModelCode;
|
|
1632
|
+
reportedEffort = effort;
|
|
1633
|
+
session.updateMetadata((metadata2) => {
|
|
1634
|
+
const { currentThoughtLevelCode: _previous, currentModelCode: _model, ...rest } = metadata2;
|
|
1635
|
+
return {
|
|
1636
|
+
...rest,
|
|
1637
|
+
stickyModel: facts.stickyModel,
|
|
1638
|
+
...facts.currentModelCode ? { currentModelCode: facts.currentModelCode } : {},
|
|
1639
|
+
...effort ? { currentThoughtLevelCode: effort } : {}
|
|
1640
|
+
};
|
|
1641
|
+
});
|
|
1642
|
+
};
|
|
1594
1643
|
const resetCurrentModeDefaults = () => {
|
|
1595
|
-
currentPermissionMode = DEFAULT_CODEX_PERMISSION_MODE;
|
|
1596
|
-
currentModel = DEFAULT_CODEX_MODEL;
|
|
1597
1644
|
currentEffort = DEFAULT_CODEX_EFFORT;
|
|
1645
|
+
reportModeFacts();
|
|
1598
1646
|
currentAppendSystemPrompt = void 0;
|
|
1599
1647
|
logger.debug("[Codex] Reset current mode defaults after abort");
|
|
1600
1648
|
};
|
|
1601
|
-
const VALID_REMOTE_PERMISSION_MODES =
|
|
1602
|
-
|
|
1603
|
-
|
|
1604
|
-
|
|
1605
|
-
|
|
1606
|
-
|
|
1649
|
+
const VALID_REMOTE_PERMISSION_MODES = CODEX_REMOTE_PERMISSION_MODES;
|
|
1650
|
+
let publishedPermissionMode = null;
|
|
1651
|
+
const publishPermissionMode = (mode) => {
|
|
1652
|
+
const publishable = codexPublishablePermissionMode(mode);
|
|
1653
|
+
if (!publishable || publishable === publishedPermissionMode) return;
|
|
1654
|
+
publishedPermissionMode = publishable;
|
|
1655
|
+
session.updateMetadata((currentMetadata) => ({ ...currentMetadata, permissionMode: publishable }));
|
|
1656
|
+
};
|
|
1657
|
+
publishPermissionMode(opts.permissionMode);
|
|
1607
1658
|
let discoveredModels = [];
|
|
1659
|
+
let codexAgentVersion = null;
|
|
1660
|
+
let machineDefaultModel;
|
|
1608
1661
|
registerAgentAttachmentDownloads(session);
|
|
1609
1662
|
const CODEX_IMAGE_MIME_TYPES = ["image/jpeg", "image/png", "image/gif", "image/webp"];
|
|
1610
1663
|
const steerDeps = {
|
|
@@ -1631,6 +1684,7 @@ async function runCodex(opts) {
|
|
|
1631
1684
|
if (VALID_REMOTE_PERMISSION_MODES.includes(incoming)) {
|
|
1632
1685
|
messagePermissionMode = incoming;
|
|
1633
1686
|
currentPermissionMode = messagePermissionMode;
|
|
1687
|
+
publishPermissionMode(incoming);
|
|
1634
1688
|
logger.debug("[Codex] Valid permission mode override applied");
|
|
1635
1689
|
} else {
|
|
1636
1690
|
logger.debug("[Codex] Ignoring invalid permission mode override", logValueMetadata(message.meta.permissionMode));
|
|
@@ -1639,9 +1693,12 @@ async function runCodex(opts) {
|
|
|
1639
1693
|
logger.debug("[Codex] User message received without a permission mode override");
|
|
1640
1694
|
}
|
|
1641
1695
|
let messageModel = currentModel;
|
|
1696
|
+
let messageModelReset = false;
|
|
1642
1697
|
if (message.meta?.hasOwnProperty("model")) {
|
|
1643
1698
|
messageModel = message.meta.model || void 0;
|
|
1699
|
+
messageModelReset = !messageModel;
|
|
1644
1700
|
currentModel = messageModel;
|
|
1701
|
+
reportModeFacts();
|
|
1645
1702
|
logger.debug("[Codex] Model override updated", logValueMetadata(message.meta.model));
|
|
1646
1703
|
} else {
|
|
1647
1704
|
logger.debug("[Codex] User message received without a model override");
|
|
@@ -1652,10 +1709,12 @@ async function runCodex(opts) {
|
|
|
1652
1709
|
if (incoming === null || incoming === void 0) {
|
|
1653
1710
|
messageEffort = void 0;
|
|
1654
1711
|
currentEffort = void 0;
|
|
1712
|
+
reportModeFacts();
|
|
1655
1713
|
logger.debug(`[Codex] Effort reset to default`);
|
|
1656
1714
|
} else if (typeof incoming === "string") {
|
|
1657
1715
|
messageEffort = incoming;
|
|
1658
1716
|
currentEffort = messageEffort;
|
|
1717
|
+
reportModeFacts();
|
|
1659
1718
|
logger.debug("[Codex] Valid effort override applied");
|
|
1660
1719
|
} else {
|
|
1661
1720
|
logger.debug("[Codex] Ignoring invalid effort override", logValueMetadata(incoming));
|
|
@@ -1674,6 +1733,7 @@ async function runCodex(opts) {
|
|
|
1674
1733
|
const enhancedMode = {
|
|
1675
1734
|
permissionMode: messagePermissionMode || "default",
|
|
1676
1735
|
model: messageModel,
|
|
1736
|
+
...messageModelReset ? { modelReset: true } : {},
|
|
1677
1737
|
appendSystemPrompt: messageAppendSystemPrompt,
|
|
1678
1738
|
effort: messageEffort
|
|
1679
1739
|
};
|
|
@@ -1696,6 +1756,7 @@ async function runCodex(opts) {
|
|
|
1696
1756
|
}).catch((error) => {
|
|
1697
1757
|
logger.warn("[Codex] Failed to prepare user attachments", safeCodexErrorMetadata(error));
|
|
1698
1758
|
session.sendSessionEvent({ type: "message", message: "Could not prepare this message. Please send it again." });
|
|
1759
|
+
if (message.localKey) session.sendQueueCancelReason([message.localKey], "failed");
|
|
1699
1760
|
});
|
|
1700
1761
|
});
|
|
1701
1762
|
let thinking = false;
|
|
@@ -1738,6 +1799,7 @@ async function runCodex(opts) {
|
|
|
1738
1799
|
}
|
|
1739
1800
|
let abortController = new AbortController();
|
|
1740
1801
|
let shouldExit = false;
|
|
1802
|
+
let terminating = false;
|
|
1741
1803
|
const hibernationExit = new HibernationExitLatch((a, b) => a === "archive" && b !== "archive");
|
|
1742
1804
|
let hibernationStamp = null;
|
|
1743
1805
|
let hibernationProbe = null;
|
|
@@ -1791,6 +1853,10 @@ async function runCodex(opts) {
|
|
|
1791
1853
|
logger.debug("[Codex] Kill session requested - terminating process");
|
|
1792
1854
|
const exitCursor = intent === "offline" && session ? exitCursorStamp(session.messageCursor, Date.now()) : void 0;
|
|
1793
1855
|
if (exitCursor) session.freezeInbound();
|
|
1856
|
+
const exitReason = intent === "archive" ? "aborted" : "restarted";
|
|
1857
|
+
terminating = true;
|
|
1858
|
+
heldInput.drop(exitReason);
|
|
1859
|
+
messageQueue.discardAll(exitReason);
|
|
1794
1860
|
await handleAbort("kill");
|
|
1795
1861
|
logger.debug("[Codex] Abort completed, proceeding with termination");
|
|
1796
1862
|
try {
|
|
@@ -2016,6 +2082,7 @@ async function runCodex(opts) {
|
|
|
2016
2082
|
logger.debug("[codex]: client.connect begin");
|
|
2017
2083
|
await client.connect();
|
|
2018
2084
|
logger.debug("[codex]: client.connect done");
|
|
2085
|
+
codexAgentVersion = client.serverVersion;
|
|
2019
2086
|
try {
|
|
2020
2087
|
discoveredModels = await client.listModels();
|
|
2021
2088
|
let configured = null;
|
|
@@ -2024,6 +2091,7 @@ async function runCodex(opts) {
|
|
|
2024
2091
|
} catch (error) {
|
|
2025
2092
|
logger.debug("[Codex] config/read unavailable", safeCodexErrorMetadata(error));
|
|
2026
2093
|
}
|
|
2094
|
+
machineDefaultModel = configured?.model ?? discoveredModels.find((model) => model.isDefault)?.model;
|
|
2027
2095
|
if (discoveredModels.length > 0 || configured) {
|
|
2028
2096
|
session.updateMetadata((metadata2) => ({
|
|
2029
2097
|
...metadata2,
|
|
@@ -2067,6 +2135,7 @@ async function runCodex(opts) {
|
|
|
2067
2135
|
first = false;
|
|
2068
2136
|
appendSystemPromptInjected = true;
|
|
2069
2137
|
}
|
|
2138
|
+
reportModeFacts();
|
|
2070
2139
|
const forkCodexThreadId = process.env.HAPPY_FORK_CODEX_THREAD_ID;
|
|
2071
2140
|
if (!reconnectSessionId && forkCodexThreadId) {
|
|
2072
2141
|
try {
|
|
@@ -2108,6 +2177,7 @@ async function runCodex(opts) {
|
|
|
2108
2177
|
pendingRequests: Object.keys(session.getAgentState()?.requests ?? {}).length,
|
|
2109
2178
|
backgroundTasks: codexActiveSubagents.size,
|
|
2110
2179
|
lastActivityAt: session.lastActivityAt,
|
|
2180
|
+
...codexAgentVersion ? { agentVersion: codexAgentVersion } : {},
|
|
2111
2181
|
...shouldExit && !hibernationExit.hibernating ? { exiting: true } : {}
|
|
2112
2182
|
};
|
|
2113
2183
|
};
|
|
@@ -2138,6 +2208,8 @@ async function runCodex(opts) {
|
|
|
2138
2208
|
});
|
|
2139
2209
|
hibernationProbe.start();
|
|
2140
2210
|
}
|
|
2211
|
+
const autoUpdated = takeAutoRestartedEvent(process.env, "Codex");
|
|
2212
|
+
if (autoUpdated) session.sendSessionEvent(autoUpdated);
|
|
2141
2213
|
idleRelease.arm();
|
|
2142
2214
|
while (!shouldExit) {
|
|
2143
2215
|
logActiveHandles("loop-top");
|
|
@@ -2155,6 +2227,7 @@ async function runCodex(opts) {
|
|
|
2155
2227
|
break;
|
|
2156
2228
|
}
|
|
2157
2229
|
message = batch;
|
|
2230
|
+
heldInput.hold(batch.sourceIds);
|
|
2158
2231
|
}
|
|
2159
2232
|
if (!message) {
|
|
2160
2233
|
break;
|
|
@@ -2167,6 +2240,7 @@ async function runCodex(opts) {
|
|
|
2167
2240
|
turnActive = true;
|
|
2168
2241
|
if (isCodexClearText(message.message)) {
|
|
2169
2242
|
logger.debug("[Codex] Handling /clear command - resetting Codex thread state");
|
|
2243
|
+
heldInput.delivered();
|
|
2170
2244
|
client.clearThreadState();
|
|
2171
2245
|
currentTurnId = null;
|
|
2172
2246
|
codexStartedSubagents = /* @__PURE__ */ new Set();
|
|
@@ -2177,6 +2251,7 @@ async function runCodex(opts) {
|
|
|
2177
2251
|
reasoningProcessor.abort();
|
|
2178
2252
|
diffProcessor.reset();
|
|
2179
2253
|
appendSystemPromptInjected = false;
|
|
2254
|
+
projectInjector.reset();
|
|
2180
2255
|
thinking = false;
|
|
2181
2256
|
session.keepAlive(thinking, "remote");
|
|
2182
2257
|
messageBuffer.addMessage("Context was reset", "status");
|
|
@@ -2202,6 +2277,7 @@ async function runCodex(opts) {
|
|
|
2202
2277
|
try {
|
|
2203
2278
|
if (compactCommand !== null) {
|
|
2204
2279
|
await client.ensureConnected();
|
|
2280
|
+
heldInput.delivered();
|
|
2205
2281
|
const outcome = await runCodexCompact(compactCommand, {
|
|
2206
2282
|
client,
|
|
2207
2283
|
notify: (text) => {
|
|
@@ -2218,13 +2294,14 @@ async function runCodex(opts) {
|
|
|
2218
2294
|
message.mode.permissionMode,
|
|
2219
2295
|
sandboxManagedByHappy
|
|
2220
2296
|
);
|
|
2221
|
-
const
|
|
2297
|
+
const turnModel = resolveCodexTurnModel(message.mode, machineDefaultModel);
|
|
2298
|
+
const effortRefusal = unsupportedEffortReason(discoveredModels, turnModel ?? client.threadModel ?? machineDefaultModel, message.mode.effort);
|
|
2222
2299
|
if (effortRefusal) {
|
|
2223
2300
|
throw new Error(effortRefusal);
|
|
2224
2301
|
}
|
|
2225
2302
|
if (!client.hasActiveThread()) {
|
|
2226
2303
|
const startedThread = await client.startThread({
|
|
2227
|
-
model:
|
|
2304
|
+
model: turnModel,
|
|
2228
2305
|
cwd: process.cwd(),
|
|
2229
2306
|
approvalPolicy: executionPolicy.approvalPolicy,
|
|
2230
2307
|
sandbox: executionPolicy.sandbox,
|
|
@@ -2234,6 +2311,7 @@ async function runCodex(opts) {
|
|
|
2234
2311
|
...currentMetadata,
|
|
2235
2312
|
codexThreadId: startedThread.threadId
|
|
2236
2313
|
}));
|
|
2314
|
+
reportModeFacts();
|
|
2237
2315
|
}
|
|
2238
2316
|
const includeAppendSystemPrompt = Boolean(
|
|
2239
2317
|
message.mode.appendSystemPrompt && !appendSystemPromptInjected
|
|
@@ -2248,13 +2326,19 @@ async function runCodex(opts) {
|
|
|
2248
2326
|
happyHomeDir: configuration.happyHomeDir,
|
|
2249
2327
|
sessionId: session.sessionId
|
|
2250
2328
|
}) : [];
|
|
2329
|
+
if (terminating) {
|
|
2330
|
+
logger.debug("[Codex] Session is ending; not starting the turn");
|
|
2331
|
+
continue;
|
|
2332
|
+
}
|
|
2251
2333
|
const result = await client.sendTurnAndWait(appendStagedAttachmentsToPrompt(turnPrompt, staged), {
|
|
2252
2334
|
images: staged.filter((file) => ["image/jpeg", "image/png", "image/gif", "image/webp"].includes(file.mimeType)).map((file) => file.path),
|
|
2253
|
-
model:
|
|
2335
|
+
model: turnModel,
|
|
2254
2336
|
approvalPolicy: executionPolicy.approvalPolicy,
|
|
2255
2337
|
sandbox: executionPolicy.sandbox,
|
|
2256
|
-
effort: message.mode.effort
|
|
2338
|
+
effort: message.mode.effort,
|
|
2339
|
+
onTurnStarted: () => heldInput.delivered()
|
|
2257
2340
|
});
|
|
2341
|
+
reportModeFacts();
|
|
2258
2342
|
first = false;
|
|
2259
2343
|
if (includeAppendSystemPrompt) {
|
|
2260
2344
|
appendSystemPromptInjected = true;
|
|
@@ -2264,6 +2348,7 @@ async function runCodex(opts) {
|
|
|
2264
2348
|
}
|
|
2265
2349
|
} catch (error) {
|
|
2266
2350
|
logger.warn("Error in codex session", safeCodexErrorMetadata(error));
|
|
2351
|
+
if (heldInput.drop("failed")) logger.debug("[Codex] Message failed before its turn started; tombstoned");
|
|
2267
2352
|
const reason = describeThrownTurnError(error);
|
|
2268
2353
|
if (reason) {
|
|
2269
2354
|
messageBuffer.addMessage(`Task failed: ${reason}`, "status");
|
|
@@ -2295,6 +2380,8 @@ async function runCodex(opts) {
|
|
|
2295
2380
|
disposeTermination?.();
|
|
2296
2381
|
hibernationProbe?.stop();
|
|
2297
2382
|
session.closePromptQueueDrain();
|
|
2383
|
+
heldInput.drop("aborted");
|
|
2384
|
+
messageQueue.discardAll("aborted");
|
|
2298
2385
|
logger.debug("[codex]: Final cleanup start");
|
|
2299
2386
|
logActiveHandles("cleanup-start");
|
|
2300
2387
|
if (reconnectionHandle) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var node_crypto = require('node:crypto');
|
|
4
|
-
var logger = require('./logger-
|
|
4
|
+
var logger = require('./logger-BBRTTVsQ.cjs');
|
|
5
5
|
var sessionExitLifecycle = require('./sessionExitLifecycle-DFltxXU8.cjs');
|
|
6
6
|
|
|
7
7
|
class BaseReasoningProcessor {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { randomUUID } from 'node:crypto';
|
|
2
|
-
import { l as logger } from './logger-
|
|
2
|
+
import { l as logger } from './logger-CL7pin9b.mjs';
|
|
3
3
|
import { O as OFFLINE_EXIT_STAMP_TIMEOUT_MS } from './sessionExitLifecycle-CzkLIgNZ.mjs';
|
|
4
4
|
|
|
5
5
|
class BaseReasoningProcessor {
|
|
@@ -100,6 +100,9 @@ async function forkCodexThread(client, opts) {
|
|
|
100
100
|
newCodexThreadId: forked.threadId
|
|
101
101
|
};
|
|
102
102
|
}
|
|
103
|
+
function firstItemId(turn) {
|
|
104
|
+
return turn.items?.[0]?.id;
|
|
105
|
+
}
|
|
103
106
|
async function forkCodexBeforeUserMessage(client, opts) {
|
|
104
107
|
const { thread: source } = await client.readThread({ threadId: opts.threadId, includeTurns: true });
|
|
105
108
|
rejectAttachedTarget(source, opts.cutBeforeItemId);
|
|
@@ -109,24 +112,15 @@ async function forkCodexBeforeUserMessage(client, opts) {
|
|
|
109
112
|
throw new Error("Cannot safely rewind a user message inside an existing turn");
|
|
110
113
|
}
|
|
111
114
|
if (sourceCut.index === 0) return { type: "success", startFresh: true };
|
|
112
|
-
const
|
|
115
|
+
const kept = (source.turns ?? []).slice(0, sourceCut.index);
|
|
116
|
+
const expected = kept.map(firstItemId);
|
|
117
|
+
const forked = await client.forkThread({ threadId: opts.threadId, cwd: opts.cwd, lastTurnId: kept[kept.length - 1].id });
|
|
113
118
|
if (forked.threadId === opts.threadId) throw new Error("Codex did not create an independent fork");
|
|
114
|
-
|
|
115
|
-
const
|
|
116
|
-
if (
|
|
117
|
-
const
|
|
118
|
-
|
|
119
|
-
if (items.findIndex((item) => item.id === opts.cutBeforeItemId) !== 0) {
|
|
120
|
-
throw new Error("Cannot safely rewind a user message inside an existing turn");
|
|
121
|
-
}
|
|
122
|
-
if (cut.index === 0) return { type: "success", startFresh: true };
|
|
123
|
-
const expectedTurnIds = turns.slice(0, cut.index).map((turn) => turn.id);
|
|
124
|
-
const { thread } = await client.rollbackThread({
|
|
125
|
-
threadId: forked.threadId,
|
|
126
|
-
numTurns: turns.length - cut.index
|
|
127
|
-
});
|
|
128
|
-
const remaining = thread.turns ?? [];
|
|
129
|
-
if (remaining.length !== cut.index || remaining.some((turn, index) => turn.id !== expectedTurnIds[index])) {
|
|
119
|
+
let { thread } = await client.readThread({ threadId: forked.threadId, includeTurns: true });
|
|
120
|
+
const extra = (thread.turns ?? []).length - expected.length;
|
|
121
|
+
if (extra > 0) ({ thread } = await client.rollbackThread({ threadId: forked.threadId, numTurns: extra }));
|
|
122
|
+
const remaining = (thread.turns ?? []).map(firstItemId);
|
|
123
|
+
if (remaining.length !== expected.length || remaining.some((id, index) => id !== expected[index])) {
|
|
130
124
|
throw new Error("Codex rollback did not preserve the expected history");
|
|
131
125
|
}
|
|
132
126
|
return { type: "success", newCodexThreadId: forked.threadId };
|
|
@@ -98,6 +98,9 @@ async function forkCodexThread(client, opts) {
|
|
|
98
98
|
newCodexThreadId: forked.threadId
|
|
99
99
|
};
|
|
100
100
|
}
|
|
101
|
+
function firstItemId(turn) {
|
|
102
|
+
return turn.items?.[0]?.id;
|
|
103
|
+
}
|
|
101
104
|
async function forkCodexBeforeUserMessage(client, opts) {
|
|
102
105
|
const { thread: source } = await client.readThread({ threadId: opts.threadId, includeTurns: true });
|
|
103
106
|
rejectAttachedTarget(source, opts.cutBeforeItemId);
|
|
@@ -107,24 +110,15 @@ async function forkCodexBeforeUserMessage(client, opts) {
|
|
|
107
110
|
throw new Error("Cannot safely rewind a user message inside an existing turn");
|
|
108
111
|
}
|
|
109
112
|
if (sourceCut.index === 0) return { type: "success", startFresh: true };
|
|
110
|
-
const
|
|
113
|
+
const kept = (source.turns ?? []).slice(0, sourceCut.index);
|
|
114
|
+
const expected = kept.map(firstItemId);
|
|
115
|
+
const forked = await client.forkThread({ threadId: opts.threadId, cwd: opts.cwd, lastTurnId: kept[kept.length - 1].id });
|
|
111
116
|
if (forked.threadId === opts.threadId) throw new Error("Codex did not create an independent fork");
|
|
112
|
-
|
|
113
|
-
const
|
|
114
|
-
if (
|
|
115
|
-
const
|
|
116
|
-
|
|
117
|
-
if (items.findIndex((item) => item.id === opts.cutBeforeItemId) !== 0) {
|
|
118
|
-
throw new Error("Cannot safely rewind a user message inside an existing turn");
|
|
119
|
-
}
|
|
120
|
-
if (cut.index === 0) return { type: "success", startFresh: true };
|
|
121
|
-
const expectedTurnIds = turns.slice(0, cut.index).map((turn) => turn.id);
|
|
122
|
-
const { thread } = await client.rollbackThread({
|
|
123
|
-
threadId: forked.threadId,
|
|
124
|
-
numTurns: turns.length - cut.index
|
|
125
|
-
});
|
|
126
|
-
const remaining = thread.turns ?? [];
|
|
127
|
-
if (remaining.length !== cut.index || remaining.some((turn, index) => turn.id !== expectedTurnIds[index])) {
|
|
117
|
+
let { thread } = await client.readThread({ threadId: forked.threadId, includeTurns: true });
|
|
118
|
+
const extra = (thread.turns ?? []).length - expected.length;
|
|
119
|
+
if (extra > 0) ({ thread } = await client.rollbackThread({ threadId: forked.threadId, numTurns: extra }));
|
|
120
|
+
const remaining = (thread.turns ?? []).map(firstItemId);
|
|
121
|
+
if (remaining.length !== expected.length || remaining.some((id, index) => id !== expected[index])) {
|
|
128
122
|
throw new Error("Codex rollback did not preserve the expected history");
|
|
129
123
|
}
|
|
130
124
|
return { type: "success", newCodexThreadId: forked.threadId };
|
|
@@ -4,15 +4,15 @@ var require$$0 = require('fs');
|
|
|
4
4
|
var require$$1 = require('path');
|
|
5
5
|
var os = require('os');
|
|
6
6
|
var child_process = require('child_process');
|
|
7
|
-
var logger = require('./logger-
|
|
7
|
+
var logger = require('./logger-BBRTTVsQ.cjs');
|
|
8
8
|
var constants = require('./constants-VJ0N6WuG.cjs');
|
|
9
9
|
require('chalk');
|
|
10
10
|
require('node:util');
|
|
11
|
-
require('./configuration-
|
|
11
|
+
require('./configuration-Dt5lKW3P.cjs');
|
|
12
12
|
require('node:fs');
|
|
13
13
|
require('node:os');
|
|
14
14
|
require('node:path');
|
|
15
|
-
require('./package-
|
|
15
|
+
require('./package-DrY090nZ.cjs');
|
|
16
16
|
require('node:fs/promises');
|
|
17
17
|
require('./trimIdent-4gvk9Wk6.cjs');
|
|
18
18
|
|
|
@@ -2,15 +2,15 @@ import { existsSync, readFileSync, mkdirSync, writeFileSync } from 'fs';
|
|
|
2
2
|
import { join } from 'path';
|
|
3
3
|
import { homedir } from 'os';
|
|
4
4
|
import { execSync } from 'child_process';
|
|
5
|
-
import { l as logger } from './logger-
|
|
5
|
+
import { l as logger } from './logger-CL7pin9b.mjs';
|
|
6
6
|
import { D as DEFAULT_GEMINI_MODEL, G as GEMINI_MODEL_ENV } from './constants-BC4St0xd.mjs';
|
|
7
7
|
import 'chalk';
|
|
8
8
|
import 'node:util';
|
|
9
|
-
import './configuration-
|
|
9
|
+
import './configuration-Dechcvd-.mjs';
|
|
10
10
|
import 'node:fs';
|
|
11
11
|
import 'node:os';
|
|
12
12
|
import 'node:path';
|
|
13
|
-
import './package-
|
|
13
|
+
import './package-C6uiXULx.mjs';
|
|
14
14
|
import 'node:fs/promises';
|
|
15
15
|
import './trimIdent-BAjmv_TG.mjs';
|
|
16
16
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { mkdirSync, chmodSync, readdirSync, statSync, appendFileSync, writeFileSync, existsSync, readFileSync } from 'node:fs';
|
|
2
2
|
import { homedir } from 'node:os';
|
|
3
3
|
import { join } from 'node:path';
|
|
4
|
-
import { p as packageJson } from './package-
|
|
4
|
+
import { p as packageJson } from './package-C6uiXULx.mjs';
|
|
5
5
|
import { mkdir, chmod, writeFile } from 'node:fs/promises';
|
|
6
6
|
|
|
7
7
|
const PRIVATE_DIRECTORY_MODE = 448;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
var node_fs = require('node:fs');
|
|
4
4
|
var os = require('node:os');
|
|
5
5
|
var path = require('node:path');
|
|
6
|
-
var _package = require('./package-
|
|
6
|
+
var _package = require('./package-DrY090nZ.cjs');
|
|
7
7
|
var promises = require('node:fs/promises');
|
|
8
8
|
|
|
9
9
|
const PRIVATE_DIRECTORY_MODE = 448;
|