very-happy-cli 0.2.194 → 0.2.196
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-C3Kx0QJb.mjs → AcpBackend-RqGkFeeY.mjs} +3 -3
- package/dist/{AcpBackend-DJzsue14.cjs → AcpBackend-tL_g_UJ5.cjs} +3 -3
- package/dist/{AcpSessionManager-SteuoqMY.mjs → AcpSessionManager-C-R6yHXc.mjs} +2 -2
- package/dist/{AcpSessionManager-Bc3iafB1.cjs → AcpSessionManager-CFB24qBh.cjs} +2 -2
- package/dist/{BasePermissionHandler-DKzNFVCh.cjs → BasePermissionHandler-C0JS37Jt.cjs} +1 -1
- package/dist/{BasePermissionHandler-D2pNcAXn.mjs → BasePermissionHandler-CgHLVNKT.mjs} +1 -1
- package/dist/{account-ByVjlvFj.cjs → account-DOil1Hn8.cjs} +11 -11
- package/dist/{account-DC2YyU24.mjs → account-EzL-zwwE.mjs} +11 -11
- package/dist/{accountService-CuUSJDhP.cjs → accountService-DL6xhVUa.cjs} +4 -4
- package/dist/{accountService-Cd7bnkfd.mjs → accountService-DQ21IlBs.mjs} +4 -4
- package/dist/{acpSessionResume-DHHgbNnk.cjs → acpSessionResume-B01oHWDS.cjs} +1 -1
- package/dist/{acpSessionResume-B6VClxKQ.mjs → acpSessionResume-DEOIZUuj.mjs} +1 -1
- package/dist/{agentHome-Bov1aHYS.cjs → agentHome-BulDO_1K.cjs} +4 -4
- package/dist/{agentHome-9caXwo7k.mjs → agentHome-DucTue1n.mjs} +4 -4
- package/dist/{api-aE60mNjs.mjs → api-CiNezCys.mjs} +46 -13
- package/dist/{api-wYwQCJml.cjs → api-fuwEEEkT.cjs} +46 -13
- package/dist/{apiMachine-DwaqfM9Q.cjs → apiMachine-CxmiSa2-.cjs} +18 -18
- package/dist/{apiMachine-CvNB38Xg.mjs → apiMachine-DCmKjms1.mjs} +18 -18
- package/dist/{attachmentContent-DB8ZsxGE.cjs → attachmentContent-Cehh7ClR.cjs} +2 -2
- package/dist/{attachmentContent-C2ymY_-w.mjs → attachmentContent-CiY3MvdO.mjs} +2 -2
- package/dist/{auth-boIcb7iq.cjs → auth-DHlbjtf7.cjs} +5 -5
- package/dist/{auth-BYtmGgE1.mjs → auth-DHqHrs5d.mjs} +8 -8
- package/dist/{auth-CWO6cQ4G.mjs → auth-DVsH_a8J.mjs} +5 -5
- package/dist/{auth-Bce0Zk3q.cjs → auth-tlMcvk2Y.cjs} +8 -8
- package/dist/{auto-B-kopWQx.mjs → auto-Cnn8luKk.mjs} +17 -17
- package/dist/{auto-AaggdihK.cjs → auto-DNAa8xDZ.cjs} +17 -17
- package/dist/{bootstrap-CiWwfHB2.mjs → bootstrap-C2XSEyOe.mjs} +2 -2
- package/dist/{bootstrap-kywZ0tvD.cjs → bootstrap-PeTZ2sAn.cjs} +2 -2
- package/dist/{browser-Do2MFdq6.cjs → browser-Bm24RiFU.cjs} +1 -1
- package/dist/{browser-CFfZM3yg.mjs → browser-CWWyaf8_.mjs} +1 -1
- package/dist/{claudeAccountEnv-BL1pR_37.mjs → claudeAccountEnv-CPO6CGNd.mjs} +1 -1
- package/dist/{claudeAccountEnv-CEX_EMZr.cjs → claudeAccountEnv-_O3x5AJ1.cjs} +1 -1
- package/dist/{claudeLocal-DLd8ogcH.cjs → claudeLocal-BDWy2pFt.cjs} +5 -5
- package/dist/{claudeLocal-B47NjZfB.mjs → claudeLocal-CRG-Q7kS.mjs} +5 -5
- package/dist/{claudeLocalLauncher-5DDuHpCD.mjs → claudeLocalLauncher-B5cOrszW.mjs} +10 -10
- package/dist/{claudeLocalLauncher-D_UTQ4o_.cjs → claudeLocalLauncher-DmSLoHlw.cjs} +10 -10
- package/dist/{claudeSessionFork-BrJTncNL.mjs → claudeSessionFork-BqV6E0ep.mjs} +1 -1
- package/dist/{claudeSessionFork-4g6-Sk3Q.cjs → claudeSessionFork-OffWLYgd.cjs} +1 -1
- package/dist/{client-DS5JEsHs.mjs → client-B3lOol4f.mjs} +4 -4
- package/dist/{client-BIg2LPVx.cjs → client-B9fcSMXP.cjs} +2 -2
- package/dist/{client-Cbxr9VUE.mjs → client-CfTeXnYS.mjs} +2 -2
- package/dist/{client-OjYRPhZs.mjs → client-Cg_cuQb1.mjs} +2 -2
- package/dist/{client-CsfPUxLy.cjs → client-Ckic3nxZ.cjs} +2 -2
- package/dist/{client-BfDga3xi.cjs → client-YFvImdwH.cjs} +4 -4
- package/dist/codex/happyMcpStdioBridge.cjs +16 -16
- package/dist/codex/happyMcpStdioBridge.mjs +16 -16
- package/dist/{codexAccount-BDQjRbtI.cjs → codexAccount-CYhQir50.cjs} +1 -1
- package/dist/{codexAccount-NOX5pmQf.mjs → codexAccount-iZwmpYti.mjs} +1 -1
- package/dist/{codexAppServerClient-Bj5vN7sb.cjs → codexAppServerClient-C-UwVMUN.cjs} +60 -3
- package/dist/{codexAppServerClient-HKAm8f_D.mjs → codexAppServerClient-aV5m-FpZ.mjs} +60 -3
- package/dist/{codexCommand-DtbDjHZp.cjs → codexCommand-5nWT7F8A.cjs} +145 -51
- package/dist/{codexCommand-655pR6CR.mjs → codexCommand-CI2NTyIF.mjs} +144 -50
- package/dist/{codexTermination-DxLR-bb5.mjs → codexTermination-CLjDP6Ja.mjs} +6 -2
- package/dist/{codexTermination-CX_FHKT5.cjs → codexTermination-D18IHgLP.cjs} +6 -2
- package/dist/{config-Cv-A-Bw0.cjs → config-B7YtrHi0.cjs} +3 -3
- package/dist/{config-CIvXVGlP.mjs → config-BfwjfFSC.mjs} +3 -3
- package/dist/{configuration-rTcdHkhE.mjs → configuration-C8r6uD9k.mjs} +1 -1
- package/dist/{configuration-2Pbg3a0H.cjs → configuration-CWRKSOyj.cjs} +1 -1
- package/dist/{connect-BAYNAE8A.cjs → connect-DALX1hGB.cjs} +15 -15
- package/dist/{connect-B9Bl68PF.mjs → connect-K5HBcM56.mjs} +15 -15
- package/dist/{context-CLTyu_tQ.cjs → context-BqhlGL3u.cjs} +1 -1
- package/dist/{context-C7QarZMk.mjs → context-CtMY-M8T.mjs} +1 -1
- package/dist/{controlClient-BIdGnYBo.mjs → controlClient-DYQ1g2ar.mjs} +20 -8
- package/dist/{controlClient-CIqHL07h.cjs → controlClient-DyNgxNl7.cjs} +19 -7
- package/dist/{createSessionMetadata-BHjzRzPc.cjs → createSessionMetadata-C4WN8pVK.cjs} +2 -2
- package/dist/{createSessionMetadata-PrN-dT7K.mjs → createSessionMetadata-CZuEDo2v.mjs} +2 -2
- package/dist/{daemonAccounts-DwPwKxvv.mjs → daemonAccounts-CnAEaJE_.mjs} +3 -3
- package/dist/{daemonAccounts-CpGDY_4k.cjs → daemonAccounts-CxMJw7x2.cjs} +2 -2
- package/dist/{defaultPermissionMode-BakXiqRr.cjs → defaultPermissionMode-BCWCMONI.cjs} +1 -1
- package/dist/{defaultPermissionMode-DF5AfeBb.mjs → defaultPermissionMode-CpEJ0wlb.mjs} +1 -1
- package/dist/{deterministicJson-DFwJ57jR.mjs → deterministicJson-Dg_0QJAR.mjs} +13 -13
- package/dist/{deterministicJson-ZBFn1jtS.cjs → deterministicJson-r4zhG546.cjs} +13 -13
- package/dist/{doctor-yyM-zii7.cjs → doctor-0gLGzwz6.cjs} +8 -8
- package/dist/{doctor-u46qYYKX.cjs → doctor-CJpFhHoK.cjs} +8 -9
- package/dist/{doctor-CFYpAXvt.mjs → doctor-COeFzPpz.mjs} +8 -8
- package/dist/{doctor-BPkYWSuq.mjs → doctor-GN5mPOn5.mjs} +8 -9
- package/dist/{downloadTarget-DlmqPQp9.cjs → downloadTarget-8ovVpDv1.cjs} +6 -6
- package/dist/{downloadTarget-CVPBZMnY.mjs → downloadTarget-CbuUiS5p.mjs} +6 -6
- package/dist/{ensureDaemonRunning-D2ny0yon.cjs → ensureDaemonRunning-Bq-n6xTt.cjs} +5 -5
- package/dist/{ensureDaemonRunning-B6Y-CMWe.mjs → ensureDaemonRunning-CwlujXmV.mjs} +5 -5
- package/dist/{handleResumeCommand-DlrDcV5B.mjs → handleResumeCommand-B5GgmPm_.mjs} +5 -5
- package/dist/{handleResumeCommand-D-mGugcu.cjs → handleResumeCommand-muSrYA5y.cjs} +5 -5
- package/dist/{index-DuDD9khO.mjs → index-BRH0XYSO.mjs} +53 -46
- package/dist/{index-5c33fqLQ.cjs → index-BUOd8bNd.cjs} +5 -5
- package/dist/{index-Bi3dVJ0S.mjs → index-BZCIkrFj.mjs} +4 -4
- package/dist/{index-D1YnIih6.mjs → index-C27JFCbe.mjs} +2 -1
- package/dist/{index-CPkSLWP_.cjs → index-CQZg9jKx.cjs} +4 -4
- package/dist/{index-2Fcq3AGX.cjs → index-CnY74Dae.cjs} +3 -3
- package/dist/{index-BJsenPFp.mjs → index-D0V-seiN.mjs} +3 -3
- package/dist/{index-BUFrKZeQ.cjs → index-D9Hidq-g.cjs} +2 -0
- package/dist/{index-DEN6vfEY.mjs → index-DKCmDned.mjs} +5 -5
- package/dist/{index-BWvmUCQF.cjs → index-Dt_YE-zw.cjs} +52 -45
- package/dist/index.cjs +2 -2
- package/dist/index.mjs +2 -2
- package/dist/{install-BOA4nEbm.cjs → install-BlW2kkPl.cjs} +3 -3
- package/dist/{install-BVYL-wSO.mjs → install-CooQf1oU.mjs} +3 -3
- package/dist/lib.cjs +16 -16
- package/dist/lib.d.cts +4 -0
- package/dist/lib.d.mts +4 -0
- package/dist/lib.mjs +16 -16
- package/dist/{lidState-zy20u7T3.mjs → lidState-BflRFw38.mjs} +1 -1
- package/dist/{lidState-DYeb7Wud.cjs → lidState-VZ1j_QYw.cjs} +1 -1
- package/dist/{localHappyAgentAuth-CBsX08VJ.mjs → localHappyAgentAuth-BAK_nqMG.mjs} +1 -1
- package/dist/{localHappyAgentAuth-CScN2McN.cjs → localHappyAgentAuth-oxhpgJOb.cjs} +1 -1
- package/dist/{logger-SGCwRIV5.mjs → logger-D1hb3CG8.mjs} +2 -2
- package/dist/{logger-CepF8C5Z.cjs → logger-HQ9yDb8R.cjs} +2 -2
- package/dist/{machineMetadata-ClJfd7ay.mjs → machineMetadata-Dxng45Uh.mjs} +3 -3
- package/dist/{machineMetadata-ObK4hjF0.cjs → machineMetadata-Dzwn-HjN.cjs} +3 -3
- package/dist/{main-C7ZcZVBY.mjs → main-BP0iY2vQ.mjs} +48 -48
- package/dist/{main-mhXOpUV7.cjs → main-D7qre-pa.cjs} +48 -48
- package/dist/{mcp-BuCpkYTY.mjs → mcp-BmDGyj7k.mjs} +18 -18
- package/dist/{mcp-Zz7m0j8A.cjs → mcp-D3yzLkh8.cjs} +18 -18
- package/dist/{mirrorProtocol-B0H9UTBM.mjs → mirrorProtocol-C9Zc6GFT.mjs} +3 -3
- package/dist/{mirrorProtocol-IhICxf0K.cjs → mirrorProtocol-Cv2otcvM.cjs} +3 -3
- package/dist/{package-Q_ELj5DL.mjs → package-CpmoMPuj.mjs} +7 -7
- package/dist/{package-C7WgesIw.cjs → package-Dn7zZkY1.cjs} +7 -7
- package/dist/{panels-Cm69UXgE.mjs → panels-CQobcX5w.mjs} +5 -5
- package/dist/{panels-yyxpwZnk.cjs → panels-D59PlNoD.cjs} +5 -5
- package/dist/{peerTools-DUg9RduG.mjs → peerTools-CNzlwuL7.mjs} +5 -5
- package/dist/{peerTools-BcZAbqBL.cjs → peerTools-D417O7d-.cjs} +5 -5
- package/dist/{persistence-D0gNvqXe.cjs → persistence-BiyvEYaR.cjs} +15 -5
- package/dist/{persistence-mr4Y484W.mjs → persistence-CagHeZ-f.mjs} +15 -5
- package/dist/{piRunnerArgs-CGjpl4iF.mjs → piRunnerArgs-DKU5LoWu.mjs} +1 -1
- package/dist/{piRunnerArgs-DK_DDkYW.cjs → piRunnerArgs-kTaNYd23.cjs} +1 -1
- package/dist/{piRuntime-CtZRNOEb.cjs → piRuntime-BI4KNAUY.cjs} +1 -1
- package/dist/{piRuntime-HUA19wG8.mjs → piRuntime-BV4fQyZD.mjs} +1 -1
- package/dist/{piTerminal-D9OPouek.cjs → piTerminal-WPUtDJAV.cjs} +20 -20
- package/dist/{piTerminal-Bgy1W9mA.mjs → piTerminal-oObkl3WJ.mjs} +20 -20
- package/dist/processTermination-ChJG5SLW.mjs +107 -0
- package/dist/processTermination-f17wxlMb.cjs +110 -0
- package/dist/{processTreeSnapshot-mDbnuojn.cjs → processTreeSnapshot-D5iNblp6.cjs} +26 -0
- package/dist/{processTreeSnapshot-CuLJDNC-.mjs → processTreeSnapshot-fuwxC0fr.mjs} +25 -1
- package/dist/{pushNotifications-DjEl8G0a.mjs → pushNotifications-4sNESDMv.mjs} +11 -4
- package/dist/{pushNotifications-CH0XVPQe.cjs → pushNotifications-DRDWUnP-.cjs} +12 -3
- package/dist/{query-DmIo5OXf.mjs → query-6OWHW1U1.mjs} +2 -2
- package/dist/{query-Df3WhSA0.cjs → query-qIbeJ2-r.cjs} +2 -2
- package/dist/{rateLimitWindows-a2yE3kCv.mjs → rateLimitWindows-4uhuwKnU.mjs} +1 -1
- package/dist/{rateLimitWindows-B9PERFm1.cjs → rateLimitWindows-U4fc1-_6.cjs} +1 -1
- package/dist/{registerCommonHandlers-D4uXC0he.cjs → registerCommonHandlers-CEV9KUsq.cjs} +2 -2
- package/dist/{registerCommonHandlers-CND00Dpj.mjs → registerCommonHandlers-PTJ8TBj9.mjs} +2 -2
- package/dist/{registerKillSessionHandler-DQKsD9CW.cjs → registerKillSessionHandler-C6F1sjoo.cjs} +6 -6
- package/dist/{registerKillSessionHandler-CwyHwm_n.mjs → registerKillSessionHandler-D4SSwQj8.mjs} +6 -6
- package/dist/registerSideQuestionHandler-4mRv0Msq.mjs +358 -0
- package/dist/registerSideQuestionHandler-ByUnjI3V.cjs +366 -0
- package/dist/{remoteSessionClient-DOWgca08.cjs → remoteSessionClient-CUk6haD7.cjs} +5 -5
- package/dist/{remoteSessionClient-mIr_9OL_.mjs → remoteSessionClient-CfYDFlKm.mjs} +5 -5
- package/dist/{reportProgressTool-DTKlUlHv.mjs → reportProgressTool-BCn5oG52.mjs} +3 -3
- package/dist/{reportProgressTool-BLw2_Ohi.cjs → reportProgressTool-C1JOvo6T.cjs} +3 -3
- package/dist/{run-1V6DLzTY.cjs → run-D2SlfZPP.cjs} +54 -74
- package/dist/{run-bfxXYL5N.mjs → run-DC8BIklA.mjs} +52 -72
- package/dist/{runClaude-DuFgZZwO.cjs → runClaude-BE-5GgIZ.cjs} +37 -31
- package/dist/{runClaude-BgvDhl2p.mjs → runClaude-D6fqN9PD.mjs} +37 -31
- package/dist/{runClaudeDeps-CX7GtH7O.mjs → runClaudeDeps-BmdwskeI.mjs} +52 -340
- package/dist/{runClaudeDeps-DeVinBmE.cjs → runClaudeDeps-W0nv2vHL.cjs} +48 -336
- package/dist/{runGemini-Cd27u-7R.mjs → runGemini-C3Ipeu1i.mjs} +37 -34
- package/dist/{runGemini-DiYSk3s1.cjs → runGemini-Da_d-2kV.cjs} +37 -34
- package/dist/{runOpenClaw-CWkkfRSo.mjs → runOpenClaw-BoI6nbKB.mjs} +30 -20
- package/dist/{runOpenClaw-DyQnBzpy.cjs → runOpenClaw-af5qDNU0.cjs} +30 -20
- package/dist/{sandbox-C35zDrkc.mjs → sandbox-CjoyUSGa.mjs} +4 -4
- package/dist/{sandbox-BAXXYewR.cjs → sandbox-UGF68GrE.cjs} +4 -4
- package/dist/selfCheck-CNrOZgBv.mjs +88 -0
- package/dist/{selfCheck-R71q-x7u.cjs → selfCheck-Cr8eAw4m.cjs} +40 -40
- package/dist/{send-3Wa9th3D.cjs → send-CVSht9s_.cjs} +8 -8
- package/dist/{send-DiSaR5Bk.mjs → send-gqX0-i4p.mjs} +8 -8
- package/dist/{server-BJu2bFBy.cjs → server-BPgVv-BG.cjs} +6 -6
- package/dist/{server-BxMJxaE6.mjs → server-DxlNqWJo.mjs} +4 -4
- package/dist/{sessionExitLifecycle-DFltxXU8.cjs → sessionExitLifecycle-DB2rjvVS.cjs} +5 -1
- package/dist/{sessionExitLifecycle-CzkLIgNZ.mjs → sessionExitLifecycle-iAtZN9sa.mjs} +5 -1
- package/dist/{sessionLock-dbi4JPhP.mjs → sessionLock-BfvR9BGB.mjs} +94 -78
- package/dist/{sessionLock-BJ1ngLgm.cjs → sessionLock-D2usWXAg.cjs} +92 -78
- package/dist/{sessionOps-BUlpeaUe.cjs → sessionOps-JRyQhF5s.cjs} +4 -4
- package/dist/{sessionOps-C9wRmCBg.mjs → sessionOps-OmRqUFm4.mjs} +4 -4
- package/dist/{sessionProvider-DYD6JepE.cjs → sessionProvider-BpscgwwC.cjs} +10 -10
- package/dist/{sessionProvider-BEHfI5gs.mjs → sessionProvider-DTEdidBc.mjs} +10 -10
- package/dist/{sessionScanner-CFITViIZ.mjs → sessionScanner-BlAOpqMh.mjs} +3 -3
- package/dist/{sessionScanner-BwbjEoSf.cjs → sessionScanner-C_qVc1ok.cjs} +3 -3
- package/dist/{sessions-C-wBd0fN.cjs → sessions-7iyjxti9.cjs} +10 -10
- package/dist/{sessions-wOcO2X-k.mjs → sessions-CnjHHllR.mjs} +10 -10
- package/dist/{setupOfflineReconnection-Bd6XsWhA.cjs → setupOfflineReconnection-BCbJa5mT.cjs} +2 -2
- package/dist/{setupOfflineReconnection-BrljmbqX.mjs → setupOfflineReconnection-IKEI7fLJ.mjs} +2 -2
- package/dist/{spawn-BPioepNz.mjs → spawn-CbfcClhj.mjs} +14 -14
- package/dist/{spawn-Crprnq9Z.cjs → spawn-CxEl0Dyz.cjs} +14 -14
- package/dist/{spawnAgents-B9olJ8xn.cjs → spawnAgents-Cm23BW-D.cjs} +1 -1
- package/dist/{spawnAgents-I29H9nO8.mjs → spawnAgents-N3jxdNJC.mjs} +1 -1
- package/dist/{spawnHappyCLI-BA1bTIiO.mjs → spawnHappyCLI-C8gMHJu5.mjs} +1 -1
- package/dist/{spawnHappyCLI-C0XAWy8V.cjs → spawnHappyCLI-CHSlXWUe.cjs} +1 -1
- package/dist/{startFileWatcher-COCEjNT8.mjs → startFileWatcher-6hslFu_B.mjs} +1 -1
- package/dist/{startFileWatcher-Ca5izs24.cjs → startFileWatcher-BGpYPz6L.cjs} +1 -1
- package/dist/{startupSessionCreate-BnEPBxsJ.mjs → startupSessionCreate-B7jrCZUD.mjs} +3 -3
- package/dist/{startupSessionCreate-Cmg1gkKS.cjs → startupSessionCreate-CltDtCEF.cjs} +3 -3
- package/dist/{store-Vej_738f.mjs → store-BlPvTr_Q.mjs} +1 -1
- package/dist/{store-CkNa6oj4.cjs → store-aa3CVNwS.cjs} +1 -1
- package/dist/{streamRelay-C0G1HOOd.cjs → streamRelay-C2Lb2z39.cjs} +1 -1
- package/dist/{streamRelay-C5U-C4GS.mjs → streamRelay-DFZyAPD_.mjs} +1 -1
- package/dist/{sync-BfrnSdL1.cjs → sync-DfI78smj.cjs} +1 -1
- package/dist/{sync-DVcNkv8e.mjs → sync-DtzoF9sw.mjs} +1 -1
- package/dist/{systemPrompt-BxZebU75.mjs → systemPrompt-B1Xd99hK.mjs} +2 -2
- package/dist/{systemPrompt-Os5ca7pu.cjs → systemPrompt-HZNR9rjt.cjs} +2 -2
- package/dist/{teams-CNB3DE_n.mjs → teams-Vk75H6BZ.mjs} +7 -7
- package/dist/{teams--pv0QFMA.cjs → teams-fFX-L_ms.cjs} +7 -7
- package/dist/{template-B9pLEP8v.cjs → template-B1AORlgU.cjs} +1 -1
- package/dist/{template-CL9EvQLQ.mjs → template-CJ8uLlD8.mjs} +1 -1
- package/dist/{time-Da5GIiCa.cjs → time-BqPZjTpo.cjs} +1 -1
- package/dist/{time-0Ru4clBD.mjs → time-CgAwVt5R.mjs} +1 -1
- package/dist/{titleGenerator-CaCzpYyA.mjs → titleGenerator-D2UB7Uyr.mjs} +2 -2
- package/dist/{titleGenerator-9xIXHA5K.cjs → titleGenerator-ijVOuv3J.cjs} +3 -3
- package/dist/{todo-CZXHl2Lg.mjs → todo-CCuqtD0O.mjs} +6 -6
- package/dist/{todo-DUY_J3l_.cjs → todo-vCzaIwNp.cjs} +6 -6
- package/dist/{tools-hPD2Hvei.cjs → tools-CL8h3fqh.cjs} +1 -1
- package/dist/{tools-DqA2Jt2R.mjs → tools-DthGQoo3.mjs} +1 -1
- package/dist/{uninstall-rTvdpRLt.cjs → uninstall-CIvThBvI.cjs} +3 -3
- package/dist/{uninstall-CjMzELYw.mjs → uninstall-DCJh4UoO.mjs} +3 -3
- package/dist/{wrapperAccount-D2A4DuZy.cjs → wrapperAccount-BubTurHU.cjs} +2 -2
- package/dist/{wrapperAccount-BkufO_9g.mjs → wrapperAccount-RPtq8BwD.mjs} +2 -2
- package/package.json +7 -7
- package/dist/rateLimitReporter-B_PZClib.mjs +0 -42
- package/dist/rateLimitReporter-M_IKRRS7.cjs +0 -44
- package/dist/selfCheck-DKMF0Dyu.mjs +0 -88
|
@@ -1,114 +1,115 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var auth = require('./auth-
|
|
4
|
-
var index = require('./index-
|
|
5
|
-
var defaultPermissionMode = require('./defaultPermissionMode-
|
|
6
|
-
var deterministicJson = require('./deterministicJson-
|
|
7
|
-
var client = require('./client-
|
|
3
|
+
var auth = require('./auth-DHlbjtf7.cjs');
|
|
4
|
+
var index = require('./index-D9Hidq-g.cjs');
|
|
5
|
+
var defaultPermissionMode = require('./defaultPermissionMode-BCWCMONI.cjs');
|
|
6
|
+
var deterministicJson = require('./deterministicJson-r4zhG546.cjs');
|
|
7
|
+
var client = require('./client-Ckic3nxZ.cjs');
|
|
8
8
|
var promises = require('node:fs/promises');
|
|
9
9
|
var forkBackfill = require('./forkBackfill-8eLDeS73.cjs');
|
|
10
10
|
var node_crypto = require('node:crypto');
|
|
11
11
|
var cuid2 = require('@paralleldrive/cuid2');
|
|
12
|
-
var api = require('./api-
|
|
12
|
+
var api = require('./api-fuwEEEkT.cjs');
|
|
13
13
|
var heldInput = require('./heldInput-BOtqFO2r.cjs');
|
|
14
|
-
var attachmentContent = require('./attachmentContent-
|
|
14
|
+
var attachmentContent = require('./attachmentContent-Cehh7ClR.cjs');
|
|
15
15
|
var ink = require('ink');
|
|
16
|
-
var sessionLock = require('./sessionLock-
|
|
16
|
+
var sessionLock = require('./sessionLock-D2usWXAg.cjs');
|
|
17
17
|
var React = require('react');
|
|
18
|
-
var codexAppServerClient = require('./codexAppServerClient-
|
|
19
|
-
var
|
|
20
|
-
var logger = require('./logger-
|
|
21
|
-
var BasePermissionHandler = require('./BasePermissionHandler-
|
|
22
|
-
var codexTermination = require('./codexTermination-
|
|
18
|
+
var codexAppServerClient = require('./codexAppServerClient-C-UwVMUN.cjs');
|
|
19
|
+
var registerSideQuestionHandler = require('./registerSideQuestionHandler-ByUnjI3V.cjs');
|
|
20
|
+
var logger = require('./logger-HQ9yDb8R.cjs');
|
|
21
|
+
var BasePermissionHandler = require('./BasePermissionHandler-C0JS37Jt.cjs');
|
|
22
|
+
var codexTermination = require('./codexTermination-D18IHgLP.cjs');
|
|
23
23
|
var node_child_process = require('node:child_process');
|
|
24
|
-
var persistence = require('./persistence-
|
|
25
|
-
var machineMetadata = require('./machineMetadata-
|
|
26
|
-
var configuration = require('./configuration-
|
|
27
|
-
var registerKillSessionHandler = require('./registerKillSessionHandler-
|
|
24
|
+
var persistence = require('./persistence-BiyvEYaR.cjs');
|
|
25
|
+
var machineMetadata = require('./machineMetadata-Dzwn-HjN.cjs');
|
|
26
|
+
var configuration = require('./configuration-CWRKSOyj.cjs');
|
|
27
|
+
var registerKillSessionHandler = require('./registerKillSessionHandler-C6F1sjoo.cjs');
|
|
28
28
|
var projectPath = require('./projectPath-C3ioB4Bu.cjs');
|
|
29
29
|
var path = require('node:path');
|
|
30
|
-
var createSessionMetadata = require('./createSessionMetadata-
|
|
31
|
-
var sessionExitLifecycle = require('./sessionExitLifecycle-
|
|
32
|
-
var controlClient = require('./controlClient-
|
|
33
|
-
var startupSessionCreate = require('./startupSessionCreate-
|
|
30
|
+
var createSessionMetadata = require('./createSessionMetadata-C4WN8pVK.cjs');
|
|
31
|
+
var sessionExitLifecycle = require('./sessionExitLifecycle-DB2rjvVS.cjs');
|
|
32
|
+
var controlClient = require('./controlClient-DyNgxNl7.cjs');
|
|
33
|
+
var startupSessionCreate = require('./startupSessionCreate-CltDtCEF.cjs');
|
|
34
34
|
var authRelay = require('./authRelay-Dy1qU9td.cjs');
|
|
35
|
-
var setupOfflineReconnection = require('./setupOfflineReconnection-
|
|
35
|
+
var setupOfflineReconnection = require('./setupOfflineReconnection-BCbJa5mT.cjs');
|
|
36
36
|
var trimIdent = require('./trimIdent-4gvk9Wk6.cjs');
|
|
37
37
|
var specialCommands = require('./specialCommands-J3JFOq0J.cjs');
|
|
38
38
|
var constants = require('./constants-VJ0N6WuG.cjs');
|
|
39
39
|
var editPaths = require('./editPaths-Bqp4OFPw.cjs');
|
|
40
40
|
var reconnectEnv = require('./reconnectEnv-B31lY4nR.cjs');
|
|
41
|
-
var store = require('./store-
|
|
41
|
+
var store = require('./store-aa3CVNwS.cjs');
|
|
42
42
|
var node_fs = require('node:fs');
|
|
43
|
-
var codexAccount = require('./codexAccount-
|
|
44
|
-
var wrapperAccount = require('./wrapperAccount-
|
|
45
|
-
var ensureDaemonRunning = require('./ensureDaemonRunning-
|
|
43
|
+
var codexAccount = require('./codexAccount-CYhQir50.cjs');
|
|
44
|
+
var wrapperAccount = require('./wrapperAccount-BubTurHU.cjs');
|
|
45
|
+
var ensureDaemonRunning = require('./ensureDaemonRunning-Bq-n6xTt.cjs');
|
|
46
46
|
require('tweetnacl');
|
|
47
47
|
require('axios');
|
|
48
|
-
require('./time-
|
|
49
|
-
require('./browser-
|
|
48
|
+
require('./time-BqPZjTpo.cjs');
|
|
49
|
+
require('./browser-Bm24RiFU.cjs');
|
|
50
50
|
require('open');
|
|
51
51
|
require('zod');
|
|
52
52
|
require('./prompt-Bof2aQkI.cjs');
|
|
53
|
-
require('./reportProgressTool-
|
|
54
|
-
require('./client-
|
|
53
|
+
require('./reportProgressTool-C1JOvo6T.cjs');
|
|
54
|
+
require('./client-B9fcSMXP.cjs');
|
|
55
55
|
require('./precheckCompat-CWOi5c9L.cjs');
|
|
56
56
|
require('./agentGuidance-BtBx2xxE.cjs');
|
|
57
57
|
require('node:os');
|
|
58
58
|
require('./pi-DlsrPCTa.cjs');
|
|
59
59
|
require('./fileStore-7qhnbs6N.cjs');
|
|
60
|
-
require('./client-
|
|
60
|
+
require('./client-YFvImdwH.cjs');
|
|
61
61
|
require('node:util');
|
|
62
|
-
require('./context-
|
|
63
|
-
require('./sessionOps-
|
|
62
|
+
require('./context-BqhlGL3u.cjs');
|
|
63
|
+
require('./sessionOps-JRyQhF5s.cjs');
|
|
64
64
|
require('socket.io-client');
|
|
65
65
|
require('./backgroundTaskActivity-CBvUdj39.cjs');
|
|
66
66
|
require('./resources-BZ_Be0qM.cjs');
|
|
67
|
-
require('./tools-
|
|
68
|
-
require('./peerTools-
|
|
67
|
+
require('./tools-CL8h3fqh.cjs');
|
|
68
|
+
require('./peerTools-D417O7d-.cjs');
|
|
69
69
|
require('./ids-B6ZC0HGt.cjs');
|
|
70
|
-
require('./remoteSessionClient-
|
|
70
|
+
require('./remoteSessionClient-CUk6haD7.cjs');
|
|
71
71
|
require('@modelcontextprotocol/sdk/server/mcp.js');
|
|
72
72
|
require('node:http');
|
|
73
73
|
require('@modelcontextprotocol/sdk/server/streamableHttp.js');
|
|
74
74
|
require('./limits-C-a7gr04.cjs');
|
|
75
|
-
require('./downloadTarget-
|
|
75
|
+
require('./downloadTarget-8ovVpDv1.cjs');
|
|
76
76
|
require('./terminals-B_bfC9c2.cjs');
|
|
77
77
|
require('./terminalTitleSuggest-DhvRFX3H.cjs');
|
|
78
78
|
require('./tmuxSocket-D-Xt6Vn-.cjs');
|
|
79
|
-
require('./bootstrap-
|
|
80
|
-
require('./package-
|
|
79
|
+
require('./bootstrap-PeTZ2sAn.cjs');
|
|
80
|
+
require('./package-Dn7zZkY1.cjs');
|
|
81
81
|
require('./webPanels-FCgFKvVe.cjs');
|
|
82
|
-
require('./pushNotifications-
|
|
82
|
+
require('./pushNotifications-DRDWUnP-.cjs');
|
|
83
83
|
require('./contentLogMetadata-ZSFk_NjQ.cjs');
|
|
84
84
|
require('./previewPath-B0rBdhy1.cjs');
|
|
85
85
|
require('crypto');
|
|
86
|
-
require('./lidState-
|
|
86
|
+
require('./lidState-VZ1j_QYw.cjs');
|
|
87
87
|
require('os');
|
|
88
88
|
require('child_process');
|
|
89
89
|
require('node:events');
|
|
90
|
-
require('./registerCommonHandlers-
|
|
90
|
+
require('./registerCommonHandlers-CEV9KUsq.cjs');
|
|
91
91
|
require('util');
|
|
92
92
|
require('fs/promises');
|
|
93
93
|
require('path');
|
|
94
94
|
require('cross-spawn');
|
|
95
|
-
require('./sync-
|
|
95
|
+
require('./sync-DfI78smj.cjs');
|
|
96
96
|
require('chalk');
|
|
97
97
|
require('./cliUpdate-DsKXPFYp.cjs');
|
|
98
|
-
require('./
|
|
98
|
+
require('./processTermination-f17wxlMb.cjs');
|
|
99
|
+
require('./processTreeSnapshot-D5iNblp6.cjs');
|
|
99
100
|
require('node:readline');
|
|
100
101
|
require('./manager-HrEj442o.cjs');
|
|
101
102
|
require('@anthropic-ai/sandbox-runtime');
|
|
102
|
-
require('./rateLimitWindows-
|
|
103
|
+
require('./rateLimitWindows-U4fc1-_6.cjs');
|
|
103
104
|
require('./processTree-CMHWlVse.cjs');
|
|
104
105
|
require('./detectCLI-BuYR_Qxe.cjs');
|
|
105
106
|
require('fs');
|
|
106
|
-
require('./localHappyAgentAuth-
|
|
107
|
+
require('./localHappyAgentAuth-oxhpgJOb.cjs');
|
|
107
108
|
require('./fsMkdir-0K3yENml.cjs');
|
|
108
109
|
require('./types-CRS-srZK.cjs');
|
|
109
110
|
require('url');
|
|
110
|
-
require('./claudeAccountEnv-
|
|
111
|
-
require('./spawnHappyCLI-
|
|
111
|
+
require('./claudeAccountEnv-_O3x5AJ1.cjs');
|
|
112
|
+
require('./spawnHappyCLI-CHSlXWUe.cjs');
|
|
112
113
|
require('./doctorReadiness-Dl6yRQCy.cjs');
|
|
113
114
|
|
|
114
115
|
function getStartedSubagents(state) {
|
|
@@ -1401,6 +1402,84 @@ async function steerIntoRunningTurn(deps, text, attachments, localKey) {
|
|
|
1401
1402
|
return false;
|
|
1402
1403
|
}
|
|
1403
1404
|
|
|
1405
|
+
const CODEX_SIDE_QUESTION_INSTRUCTIONS = `${registerSideQuestionHandler.SIDE_QUESTION_SYSTEM_PROMPT} Do not run commands or call tools.`;
|
|
1406
|
+
const ANSWER_ITEMS = /* @__PURE__ */ new Set(["userMessage", "agentMessage", "reasoning"]);
|
|
1407
|
+
function toolName(item) {
|
|
1408
|
+
if (item.type === "commandExecution") return "a shell command";
|
|
1409
|
+
if (item.type === "mcpToolCall" && typeof item.tool === "string") return typeof item.server === "string" ? `${item.server}.${item.tool}` : item.tool;
|
|
1410
|
+
return typeof item.type === "string" ? item.type : "a tool";
|
|
1411
|
+
}
|
|
1412
|
+
function turnError(turn) {
|
|
1413
|
+
if (!turn || turn.status === "completed") return null;
|
|
1414
|
+
const message = turn.error && typeof turn.error.message === "string" ? turn.error.message : "";
|
|
1415
|
+
return message || `Side question ended (${String(turn.status ?? "unknown")})`;
|
|
1416
|
+
}
|
|
1417
|
+
async function runCodexSideQuestion(createClient, input) {
|
|
1418
|
+
const client = createClient();
|
|
1419
|
+
const signal = input.signal;
|
|
1420
|
+
if (signal?.aborted) throw new Error("Side question cancelled");
|
|
1421
|
+
let threadId = null;
|
|
1422
|
+
let turnId = null;
|
|
1423
|
+
let streamed = "";
|
|
1424
|
+
const messages = /* @__PURE__ */ new Map();
|
|
1425
|
+
let toolAttempt = null;
|
|
1426
|
+
let settle;
|
|
1427
|
+
const done = new Promise((resolve) => {
|
|
1428
|
+
settle = resolve;
|
|
1429
|
+
});
|
|
1430
|
+
const interrupt = () => {
|
|
1431
|
+
if (threadId && turnId) void client.interruptSideTurn(threadId, turnId).catch(() => {
|
|
1432
|
+
});
|
|
1433
|
+
};
|
|
1434
|
+
const off = client.onRawNotification((method, params) => {
|
|
1435
|
+
if (!threadId || params?.threadId !== threadId) return;
|
|
1436
|
+
if (!turnId && typeof params.turnId === "string") turnId = params.turnId;
|
|
1437
|
+
if (method === "item/agentMessage/delta" && typeof params.delta === "string") {
|
|
1438
|
+
streamed += params.delta;
|
|
1439
|
+
input.onText?.(streamed);
|
|
1440
|
+
} else if (method === "item/started" && params.item && !ANSWER_ITEMS.has(params.item.type)) {
|
|
1441
|
+
toolAttempt ??= toolName(params.item);
|
|
1442
|
+
interrupt();
|
|
1443
|
+
} else if (method === "item/completed" && params.item?.type === "agentMessage" && typeof params.item.text === "string") {
|
|
1444
|
+
messages.set(params.item.id ?? String(messages.size), params.item.text);
|
|
1445
|
+
} else if (method === "turn/completed") {
|
|
1446
|
+
settle({ error: toolAttempt ? void 0 : turnError(params.turn) ?? void 0 });
|
|
1447
|
+
}
|
|
1448
|
+
});
|
|
1449
|
+
const onAbort = () => {
|
|
1450
|
+
interrupt();
|
|
1451
|
+
settle({ error: "Side question cancelled" });
|
|
1452
|
+
};
|
|
1453
|
+
signal?.addEventListener("abort", onAbort, { once: true });
|
|
1454
|
+
try {
|
|
1455
|
+
await client.connect();
|
|
1456
|
+
let hadContext = Boolean(input.resumeSessionId);
|
|
1457
|
+
try {
|
|
1458
|
+
({ threadId } = await client.openSideThread({ sourceThreadId: input.resumeSessionId, cwd: input.cwd, model: input.model, developerInstructions: CODEX_SIDE_QUESTION_INSTRUCTIONS }));
|
|
1459
|
+
} catch (error) {
|
|
1460
|
+
if (!input.resumeSessionId || signal?.aborted) throw error;
|
|
1461
|
+
hadContext = false;
|
|
1462
|
+
({ threadId } = await client.openSideThread({ sourceThreadId: null, cwd: input.cwd, model: input.model, developerInstructions: CODEX_SIDE_QUESTION_INSTRUCTIONS }));
|
|
1463
|
+
}
|
|
1464
|
+
if (signal?.aborted) throw new Error("Side question cancelled");
|
|
1465
|
+
turnId = await client.startSideTurn(threadId, registerSideQuestionHandler.buildSideQuestionPrompt(input.question, input.history, input.mainStatus)) ?? turnId;
|
|
1466
|
+
if (signal?.aborted || toolAttempt) interrupt();
|
|
1467
|
+
const outcome = await done;
|
|
1468
|
+
if (signal?.aborted) throw new Error("Side question cancelled");
|
|
1469
|
+
if (outcome.error) throw new Error(outcome.error);
|
|
1470
|
+
const final = [...messages.values()].filter((text) => text.trim()).join("\n\n") || streamed;
|
|
1471
|
+
const answer = toolAttempt ? [final.trim(), registerSideQuestionHandler.toolAttemptNotice(toolAttempt)].filter(Boolean).join("\n\n") : final;
|
|
1472
|
+
if (!answer.trim()) throw new Error("Side question ended without a result");
|
|
1473
|
+
input.onText?.(answer);
|
|
1474
|
+
return { answer, hadContext, mode: "fork" };
|
|
1475
|
+
} finally {
|
|
1476
|
+
off();
|
|
1477
|
+
signal?.removeEventListener("abort", onAbort);
|
|
1478
|
+
await client.disconnect().catch(() => {
|
|
1479
|
+
});
|
|
1480
|
+
}
|
|
1481
|
+
}
|
|
1482
|
+
|
|
1404
1483
|
function hashCodexEnhancedMode(mode) {
|
|
1405
1484
|
return deterministicJson.hashObject({
|
|
1406
1485
|
permissionMode: mode.permissionMode,
|
|
@@ -1579,7 +1658,7 @@ async function runCodex(opts) {
|
|
|
1579
1658
|
dangerouslySkipPermissions: initialPermissionMode === "yolo" || initialPermissionMode === "bypassPermissions",
|
|
1580
1659
|
...forkedFromSessionId ? { parentSessionId: forkedFromSessionId } : {},
|
|
1581
1660
|
...forkedFromMessageId ? { forkedFromMessageId } : {},
|
|
1582
|
-
capabilities: [index.PROMPT_QUEUE_CAPABILITY, forkBackfill.FORK_BACKFILL_CAPABILITY, persistence.HIBERNATION_CAPABILITY, sessionLock.AUTO_RESTART_CAPABILITY, index.CODEX_STEER_CAPABILITY, index.PROJECT_SESSION_CAPABILITY, index.CODEX_COMPACT_CAPABILITY, index.RUN_INTENT_CAPABILITY, index.AGENT_PROFILE_SESSION_CAPABILITY]
|
|
1661
|
+
capabilities: [index.PROMPT_QUEUE_CAPABILITY, forkBackfill.FORK_BACKFILL_CAPABILITY, persistence.HIBERNATION_CAPABILITY, sessionLock.AUTO_RESTART_CAPABILITY, index.CODEX_STEER_CAPABILITY, index.PROJECT_SESSION_CAPABILITY, index.CODEX_COMPACT_CAPABILITY, index.RUN_INTENT_CAPABILITY, index.AGENT_PROFILE_SESSION_CAPABILITY, index.CODEX_BTW_CAPABILITY]
|
|
1583
1662
|
});
|
|
1584
1663
|
metadata.attachmentKinds = [...attachmentContent.CLAUDE_ATTACHMENT_KINDS];
|
|
1585
1664
|
metadata.stickyModel = null;
|
|
@@ -1937,7 +2016,7 @@ async function runCodex(opts) {
|
|
|
1937
2016
|
let abortController = new AbortController();
|
|
1938
2017
|
let shouldExit = false;
|
|
1939
2018
|
let terminating = false;
|
|
1940
|
-
const hibernationExit = new startupSessionCreate.HibernationExitLatch((a, b) => a === "archive" && b !== "archive");
|
|
2019
|
+
const hibernationExit = new startupSessionCreate.HibernationExitLatch((a, b) => b !== "superseded" && (a === "superseded" || a === "archive" && b !== "archive"));
|
|
1941
2020
|
let hibernationStamp = null;
|
|
1942
2021
|
let hibernationProbe = null;
|
|
1943
2022
|
async function handleAbort(source) {
|
|
@@ -1991,6 +2070,7 @@ async function runCodex(opts) {
|
|
|
1991
2070
|
const exitCursor = intent === "offline" && session ? sessionLock.exitCursorStamp(session.messageCursor, Date.now()) : void 0;
|
|
1992
2071
|
if (exitCursor) session.freezeInbound();
|
|
1993
2072
|
const exitReason = intent === "archive" ? "aborted" : "restarted";
|
|
2073
|
+
if (intent === "superseded") logger.logger.debug("[Codex] Session superseded by a newer wrapper; leaving without lifecycle writes");
|
|
1994
2074
|
terminating = true;
|
|
1995
2075
|
heldInput$1.drop(exitReason);
|
|
1996
2076
|
messageQueue.discardAll(exitReason);
|
|
@@ -2038,6 +2118,9 @@ async function runCodex(opts) {
|
|
|
2038
2118
|
return { effortRefused };
|
|
2039
2119
|
});
|
|
2040
2120
|
const disposeTermination = registerKillSessionHandler.registerKillSessionHandler(session.rpcHandlerManager, () => handleKillSession("archive"), session, { processSignals: true, onSignal: () => handleKillSession("offline") });
|
|
2121
|
+
session.on("superseded", () => {
|
|
2122
|
+
void handleKillSession("superseded");
|
|
2123
|
+
});
|
|
2041
2124
|
const messageBuffer = new sessionExitLifecycle.MessageBuffer();
|
|
2042
2125
|
const hasTTY = process.stdout.isTTY && process.stdin.isTTY;
|
|
2043
2126
|
let inkInstance = null;
|
|
@@ -2065,6 +2148,17 @@ async function runCodex(opts) {
|
|
|
2065
2148
|
}
|
|
2066
2149
|
client$1 = new codexAppServerClient.CodexAppServerClient(sandboxConfig);
|
|
2067
2150
|
client$1.setAccountOverrides(codexAccount$1.overrides);
|
|
2151
|
+
registerSideQuestionHandler.registerSideQuestionHandler(session.rpcHandlerManager, {
|
|
2152
|
+
getClaudeSessionId: () => client$1?.threadId ?? null,
|
|
2153
|
+
getModel: () => currentModel ?? client$1?.threadModel ?? void 0,
|
|
2154
|
+
cwd: process.cwd(),
|
|
2155
|
+
getMainStatus: () => registerSideQuestionHandler.describePendingApprovals(session.getAgentState()?.requests),
|
|
2156
|
+
run: (input) => runCodexSideQuestion(() => {
|
|
2157
|
+
const side = new codexAppServerClient.CodexAppServerClient(sandboxConfig);
|
|
2158
|
+
side.setAccountOverrides(codexAccount$1.overrides);
|
|
2159
|
+
return side;
|
|
2160
|
+
}, input)
|
|
2161
|
+
});
|
|
2068
2162
|
const idleRelease = new CodexIdleReleaseTimer({
|
|
2069
2163
|
delayMs: resolveCodexIdleReleaseMs(process.env[CODEX_IDLE_RELEASE_ENV]),
|
|
2070
2164
|
isIdle: () => shouldReleaseIdleCodex({
|
|
@@ -2108,7 +2202,7 @@ async function runCodex(opts) {
|
|
|
2108
2202
|
}
|
|
2109
2203
|
});
|
|
2110
2204
|
const editThrottle = new editPaths.EditReportThrottle();
|
|
2111
|
-
client$1.setRateLimitHandler((snapshot) =>
|
|
2205
|
+
client$1.setRateLimitHandler((snapshot) => registerSideQuestionHandler.wrapperRateLimitReporter().observeCodex(snapshot));
|
|
2112
2206
|
client$1.setEventHandler((msg) => {
|
|
2113
2207
|
if (msg.type === "token_count") {
|
|
2114
2208
|
session.sendAgentUsageSnapshot("codex", msg);
|
|
@@ -1,112 +1,113 @@
|
|
|
1
|
-
import { a as authAndSetupMachineIfNeeded } from './auth-
|
|
2
|
-
import { k as createEnvelope, w as BUILTIN_TODO_DISCOVERY, r as restoredEffort, o as readEffortIntent,
|
|
3
|
-
import { a as recordRunIntents, w as withoutEffort, r as registerRunIntentRpc, b as DEFAULT_CODEX_PERMISSION_MODE } from './defaultPermissionMode-
|
|
4
|
-
import { h as hashObject, s as startHappyServer, c as createProjectInjector } from './deterministicJson-
|
|
5
|
-
import { s as sharedProjectsClient } from './client-
|
|
1
|
+
import { a as authAndSetupMachineIfNeeded } from './auth-DVsH_a8J.mjs';
|
|
2
|
+
import { k as createEnvelope, w as BUILTIN_TODO_DISCOVERY, r as restoredEffort, o as readEffortIntent, N as EFFORT_INTENT_AUTO, P as PROMPT_QUEUE_CAPABILITY, a5 as CODEX_STEER_CAPABILITY, a as PROJECT_SESSION_CAPABILITY, a6 as CODEX_COMPACT_CAPABILITY, R as RUN_INTENT_CAPABILITY, A as AGENT_PROFILE_SESSION_CAPABILITY, a7 as CODEX_BTW_CAPABILITY } from './index-C27JFCbe.mjs';
|
|
3
|
+
import { a as recordRunIntents, w as withoutEffort, r as registerRunIntentRpc, b as DEFAULT_CODEX_PERMISSION_MODE } from './defaultPermissionMode-CpEJ0wlb.mjs';
|
|
4
|
+
import { h as hashObject, s as startHappyServer, c as createProjectInjector } from './deterministicJson-Dg_0QJAR.mjs';
|
|
5
|
+
import { s as sharedProjectsClient } from './client-CfTeXnYS.mjs';
|
|
6
6
|
import { unlink } from 'node:fs/promises';
|
|
7
7
|
import { p as publishForkBackfillWhenCommitted, F as FORK_BACKFILL_CAPABILITY } from './forkBackfill-DYIjlN1Z.mjs';
|
|
8
8
|
import { randomUUID } from 'node:crypto';
|
|
9
9
|
import { createId } from '@paralleldrive/cuid2';
|
|
10
|
-
import { t as textResultPayload, d as toolResultContentText, c as connectionState, A as ApiClient } from './api-
|
|
10
|
+
import { t as textResultPayload, d as toolResultContentText, c as connectionState, A as ApiClient } from './api-CiNezCys.mjs';
|
|
11
11
|
import { r as registerAgentAttachmentDownloads, H as HeldInput } from './heldInput-C69lA2dH.mjs';
|
|
12
|
-
import { C as CLAUDE_ATTACHMENT_KINDS, a as stageClaudeAttachments, b as appendStagedAttachmentsToPrompt } from './attachmentContent-
|
|
12
|
+
import { C as CLAUDE_ATTACHMENT_KINDS, a as stageClaudeAttachments, b as appendStagedAttachmentsToPrompt } from './attachmentContent-CiY3MvdO.mjs';
|
|
13
13
|
import { useStdout, useInput, Box, Text, render } from 'ink';
|
|
14
|
-
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-
|
|
14
|
+
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-BfvR9BGB.mjs';
|
|
15
15
|
import React, { useState, useRef, useEffect, useCallback } from 'react';
|
|
16
|
-
import { C as CodexAppServerClient } from './codexAppServerClient-
|
|
17
|
-
import { w as wrapperRateLimitReporter } from './
|
|
18
|
-
import { l as logger } from './logger-
|
|
19
|
-
import { B as BasePermissionHandler } from './BasePermissionHandler-
|
|
20
|
-
import { B as BaseReasoningProcessor, s as settleCodexSession } from './codexTermination-
|
|
16
|
+
import { C as CodexAppServerClient } from './codexAppServerClient-aV5m-FpZ.mjs';
|
|
17
|
+
import { S as SIDE_QUESTION_SYSTEM_PROMPT, b as buildSideQuestionPrompt, t as toolAttemptNotice, r as registerSideQuestionHandler, d as describePendingApprovals, w as wrapperRateLimitReporter } from './registerSideQuestionHandler-4mRv0Msq.mjs';
|
|
18
|
+
import { l as logger } from './logger-D1hb3CG8.mjs';
|
|
19
|
+
import { B as BasePermissionHandler } from './BasePermissionHandler-CgHLVNKT.mjs';
|
|
20
|
+
import { B as BaseReasoningProcessor, s as settleCodexSession } from './codexTermination-CLjDP6Ja.mjs';
|
|
21
21
|
import { execSync } from 'node:child_process';
|
|
22
|
-
import { r as readSettings, l as latchKeepAwake, e as evaluateWrapperIdle, a as resolveCheckMs, H as HIBERNATION_CAPABILITY } from './persistence-
|
|
23
|
-
import { g as getInitialMachineMetadata } from './machineMetadata-
|
|
24
|
-
import { c as configuration } from './configuration-
|
|
25
|
-
import { M as MessageQueue2, r as registerKillSessionHandler } from './registerKillSessionHandler-
|
|
22
|
+
import { r as readSettings, l as latchKeepAwake, e as evaluateWrapperIdle, a as resolveCheckMs, H as HIBERNATION_CAPABILITY } from './persistence-CagHeZ-f.mjs';
|
|
23
|
+
import { g as getInitialMachineMetadata } from './machineMetadata-Dxng45Uh.mjs';
|
|
24
|
+
import { c as configuration } from './configuration-C8r6uD9k.mjs';
|
|
25
|
+
import { M as MessageQueue2, r as registerKillSessionHandler } from './registerKillSessionHandler-D4SSwQj8.mjs';
|
|
26
26
|
import { p as projectPath } from './projectPath-BTBIMB57.mjs';
|
|
27
27
|
import { dirname, join } from 'node:path';
|
|
28
|
-
import { c as createSessionMetadata } from './createSessionMetadata-
|
|
29
|
-
import { M as MessageBuffer } from './sessionExitLifecycle-
|
|
30
|
-
import { n as notifyDaemonSessionStarted, o as reportSessionEditToDaemon, c as checkDaemonHibernation } from './controlClient-
|
|
31
|
-
import { c as createSessionForStartup, b as HibernationExitLatch, H as HibernationProbe, a as commitHibernation } from './startupSessionCreate-
|
|
28
|
+
import { c as createSessionMetadata } from './createSessionMetadata-CZuEDo2v.mjs';
|
|
29
|
+
import { M as MessageBuffer } from './sessionExitLifecycle-iAtZN9sa.mjs';
|
|
30
|
+
import { n as notifyDaemonSessionStarted, o as reportSessionEditToDaemon, c as checkDaemonHibernation } from './controlClient-DYQ1g2ar.mjs';
|
|
31
|
+
import { c as createSessionForStartup, b as HibernationExitLatch, H as HibernationProbe, a as commitHibernation } from './startupSessionCreate-B7jrCZUD.mjs';
|
|
32
32
|
import { d as decodeBase64, e as encodeBase64 } from './authRelay-DhQhkBvX.mjs';
|
|
33
|
-
import { s as setupOfflineReconnection } from './setupOfflineReconnection-
|
|
33
|
+
import { s as setupOfflineReconnection } from './setupOfflineReconnection-IKEI7fLJ.mjs';
|
|
34
34
|
import { t as trimIdent } from './trimIdent-BAjmv_TG.mjs';
|
|
35
35
|
import { a as parseSpecialCommand, c as compactCommandText, b as parseCompact } from './specialCommands-MXUN0wfI.mjs';
|
|
36
36
|
import { C as CHANGE_TITLE_INSTRUCTION } from './constants-BC4St0xd.mjs';
|
|
37
37
|
import { E as EditReportThrottle, a as extractCodexPatchPaths } from './editPaths-BVfS_FFL.mjs';
|
|
38
38
|
import { t as takeReconnectEnv } from './reconnectEnv-DeSvHl3q.mjs';
|
|
39
|
-
import { r as readSessionBindings, w as writeSessionBinding, d as defaultSecretProbe, a as readAccounts, c as readAccountsFileV2, f as writeAccountsFile, S as SPAWN_ACCOUNT_ENV } from './store-
|
|
39
|
+
import { r as readSessionBindings, w as writeSessionBinding, d as defaultSecretProbe, a as readAccounts, c as readAccountsFileV2, f as writeAccountsFile, S as SPAWN_ACCOUNT_ENV } from './store-BlPvTr_Q.mjs';
|
|
40
40
|
import { mkdirSync, writeFileSync, chmodSync, rmSync } from 'node:fs';
|
|
41
|
-
import { a as resolveCodexAccount, r as readCodexProviders, s as syncCodexOverlay, b as baseCodexHome, c as codexAccountSwitched, d as readCodexDefaultProvider, e as codexAccountDefaultModel, f as accountModelsAsCatalog, i as isHistoryRejectedError, g as isCodexAuthRejection } from './codexAccount-
|
|
42
|
-
import { s as shouldRecordSpawnAccount, u as unavailableNotice } from './wrapperAccount-
|
|
43
|
-
import { a as extractNoSandboxFlag, e as ensureDaemonRunning } from './ensureDaemonRunning-
|
|
41
|
+
import { a as resolveCodexAccount, r as readCodexProviders, s as syncCodexOverlay, b as baseCodexHome, c as codexAccountSwitched, d as readCodexDefaultProvider, e as codexAccountDefaultModel, f as accountModelsAsCatalog, i as isHistoryRejectedError, g as isCodexAuthRejection } from './codexAccount-iZwmpYti.mjs';
|
|
42
|
+
import { s as shouldRecordSpawnAccount, u as unavailableNotice } from './wrapperAccount-RPtq8BwD.mjs';
|
|
43
|
+
import { a as extractNoSandboxFlag, e as ensureDaemonRunning } from './ensureDaemonRunning-CwlujXmV.mjs';
|
|
44
44
|
import 'tweetnacl';
|
|
45
45
|
import 'axios';
|
|
46
|
-
import './time-
|
|
47
|
-
import './browser-
|
|
46
|
+
import './time-CgAwVt5R.mjs';
|
|
47
|
+
import './browser-CWWyaf8_.mjs';
|
|
48
48
|
import 'open';
|
|
49
49
|
import 'zod';
|
|
50
50
|
import './prompt-QHuFx9j6.mjs';
|
|
51
|
-
import './reportProgressTool-
|
|
52
|
-
import './client-
|
|
51
|
+
import './reportProgressTool-BCn5oG52.mjs';
|
|
52
|
+
import './client-Cg_cuQb1.mjs';
|
|
53
53
|
import './precheckCompat-DeEbilbr.mjs';
|
|
54
54
|
import './agentGuidance-BDYt2Qy2.mjs';
|
|
55
55
|
import 'node:os';
|
|
56
56
|
import './pi-CqyoZMjI.mjs';
|
|
57
57
|
import './fileStore-5qpetZS0.mjs';
|
|
58
|
-
import './client-
|
|
58
|
+
import './client-B3lOol4f.mjs';
|
|
59
59
|
import 'node:util';
|
|
60
|
-
import './context-
|
|
61
|
-
import './sessionOps-
|
|
60
|
+
import './context-CtMY-M8T.mjs';
|
|
61
|
+
import './sessionOps-OmRqUFm4.mjs';
|
|
62
62
|
import 'socket.io-client';
|
|
63
63
|
import './backgroundTaskActivity-8PdPxrvy.mjs';
|
|
64
64
|
import './resources-CLP_MpK4.mjs';
|
|
65
|
-
import './tools-
|
|
66
|
-
import './peerTools-
|
|
65
|
+
import './tools-DthGQoo3.mjs';
|
|
66
|
+
import './peerTools-CNzlwuL7.mjs';
|
|
67
67
|
import './ids-DU6sLx4C.mjs';
|
|
68
|
-
import './remoteSessionClient-
|
|
68
|
+
import './remoteSessionClient-CfYDFlKm.mjs';
|
|
69
69
|
import '@modelcontextprotocol/sdk/server/mcp.js';
|
|
70
70
|
import 'node:http';
|
|
71
71
|
import '@modelcontextprotocol/sdk/server/streamableHttp.js';
|
|
72
72
|
import './limits-DIo7rEBR.mjs';
|
|
73
|
-
import './downloadTarget-
|
|
73
|
+
import './downloadTarget-CbuUiS5p.mjs';
|
|
74
74
|
import './terminals-Dlg0x3nY.mjs';
|
|
75
75
|
import './terminalTitleSuggest-CeKsX_V6.mjs';
|
|
76
76
|
import './tmuxSocket-B8Yx20sT.mjs';
|
|
77
|
-
import './bootstrap-
|
|
78
|
-
import './package-
|
|
77
|
+
import './bootstrap-C2XSEyOe.mjs';
|
|
78
|
+
import './package-CpmoMPuj.mjs';
|
|
79
79
|
import './webPanels-B2_C2-3g.mjs';
|
|
80
|
-
import './pushNotifications-
|
|
80
|
+
import './pushNotifications-4sNESDMv.mjs';
|
|
81
81
|
import './contentLogMetadata-BlWI0egu.mjs';
|
|
82
82
|
import './previewPath-CXN4Vag0.mjs';
|
|
83
83
|
import 'crypto';
|
|
84
|
-
import './lidState-
|
|
84
|
+
import './lidState-BflRFw38.mjs';
|
|
85
85
|
import 'os';
|
|
86
86
|
import 'child_process';
|
|
87
87
|
import 'node:events';
|
|
88
|
-
import './registerCommonHandlers-
|
|
88
|
+
import './registerCommonHandlers-PTJ8TBj9.mjs';
|
|
89
89
|
import 'util';
|
|
90
90
|
import 'fs/promises';
|
|
91
91
|
import 'path';
|
|
92
92
|
import 'cross-spawn';
|
|
93
|
-
import './sync-
|
|
93
|
+
import './sync-DtzoF9sw.mjs';
|
|
94
94
|
import 'chalk';
|
|
95
95
|
import './cliUpdate-Y34VGe9Y.mjs';
|
|
96
|
-
import './
|
|
96
|
+
import './processTermination-ChJG5SLW.mjs';
|
|
97
|
+
import './processTreeSnapshot-fuwxC0fr.mjs';
|
|
97
98
|
import 'node:readline';
|
|
98
99
|
import './manager-BEsI4qt3.mjs';
|
|
99
100
|
import '@anthropic-ai/sandbox-runtime';
|
|
100
|
-
import './rateLimitWindows-
|
|
101
|
+
import './rateLimitWindows-4uhuwKnU.mjs';
|
|
101
102
|
import './processTree-CP5IvQ2Z.mjs';
|
|
102
103
|
import './detectCLI-CSGMlV51.mjs';
|
|
103
104
|
import 'fs';
|
|
104
|
-
import './localHappyAgentAuth-
|
|
105
|
+
import './localHappyAgentAuth-BAK_nqMG.mjs';
|
|
105
106
|
import './fsMkdir-DumgLTzR.mjs';
|
|
106
107
|
import './types-CkqAACXx.mjs';
|
|
107
108
|
import 'url';
|
|
108
|
-
import './claudeAccountEnv-
|
|
109
|
-
import './spawnHappyCLI-
|
|
109
|
+
import './claudeAccountEnv-CPO6CGNd.mjs';
|
|
110
|
+
import './spawnHappyCLI-C8gMHJu5.mjs';
|
|
110
111
|
import './doctorReadiness-C208SMN9.mjs';
|
|
111
112
|
|
|
112
113
|
function getStartedSubagents(state) {
|
|
@@ -1399,6 +1400,84 @@ async function steerIntoRunningTurn(deps, text, attachments, localKey) {
|
|
|
1399
1400
|
return false;
|
|
1400
1401
|
}
|
|
1401
1402
|
|
|
1403
|
+
const CODEX_SIDE_QUESTION_INSTRUCTIONS = `${SIDE_QUESTION_SYSTEM_PROMPT} Do not run commands or call tools.`;
|
|
1404
|
+
const ANSWER_ITEMS = /* @__PURE__ */ new Set(["userMessage", "agentMessage", "reasoning"]);
|
|
1405
|
+
function toolName(item) {
|
|
1406
|
+
if (item.type === "commandExecution") return "a shell command";
|
|
1407
|
+
if (item.type === "mcpToolCall" && typeof item.tool === "string") return typeof item.server === "string" ? `${item.server}.${item.tool}` : item.tool;
|
|
1408
|
+
return typeof item.type === "string" ? item.type : "a tool";
|
|
1409
|
+
}
|
|
1410
|
+
function turnError(turn) {
|
|
1411
|
+
if (!turn || turn.status === "completed") return null;
|
|
1412
|
+
const message = turn.error && typeof turn.error.message === "string" ? turn.error.message : "";
|
|
1413
|
+
return message || `Side question ended (${String(turn.status ?? "unknown")})`;
|
|
1414
|
+
}
|
|
1415
|
+
async function runCodexSideQuestion(createClient, input) {
|
|
1416
|
+
const client = createClient();
|
|
1417
|
+
const signal = input.signal;
|
|
1418
|
+
if (signal?.aborted) throw new Error("Side question cancelled");
|
|
1419
|
+
let threadId = null;
|
|
1420
|
+
let turnId = null;
|
|
1421
|
+
let streamed = "";
|
|
1422
|
+
const messages = /* @__PURE__ */ new Map();
|
|
1423
|
+
let toolAttempt = null;
|
|
1424
|
+
let settle;
|
|
1425
|
+
const done = new Promise((resolve) => {
|
|
1426
|
+
settle = resolve;
|
|
1427
|
+
});
|
|
1428
|
+
const interrupt = () => {
|
|
1429
|
+
if (threadId && turnId) void client.interruptSideTurn(threadId, turnId).catch(() => {
|
|
1430
|
+
});
|
|
1431
|
+
};
|
|
1432
|
+
const off = client.onRawNotification((method, params) => {
|
|
1433
|
+
if (!threadId || params?.threadId !== threadId) return;
|
|
1434
|
+
if (!turnId && typeof params.turnId === "string") turnId = params.turnId;
|
|
1435
|
+
if (method === "item/agentMessage/delta" && typeof params.delta === "string") {
|
|
1436
|
+
streamed += params.delta;
|
|
1437
|
+
input.onText?.(streamed);
|
|
1438
|
+
} else if (method === "item/started" && params.item && !ANSWER_ITEMS.has(params.item.type)) {
|
|
1439
|
+
toolAttempt ??= toolName(params.item);
|
|
1440
|
+
interrupt();
|
|
1441
|
+
} else if (method === "item/completed" && params.item?.type === "agentMessage" && typeof params.item.text === "string") {
|
|
1442
|
+
messages.set(params.item.id ?? String(messages.size), params.item.text);
|
|
1443
|
+
} else if (method === "turn/completed") {
|
|
1444
|
+
settle({ error: toolAttempt ? void 0 : turnError(params.turn) ?? void 0 });
|
|
1445
|
+
}
|
|
1446
|
+
});
|
|
1447
|
+
const onAbort = () => {
|
|
1448
|
+
interrupt();
|
|
1449
|
+
settle({ error: "Side question cancelled" });
|
|
1450
|
+
};
|
|
1451
|
+
signal?.addEventListener("abort", onAbort, { once: true });
|
|
1452
|
+
try {
|
|
1453
|
+
await client.connect();
|
|
1454
|
+
let hadContext = Boolean(input.resumeSessionId);
|
|
1455
|
+
try {
|
|
1456
|
+
({ threadId } = await client.openSideThread({ sourceThreadId: input.resumeSessionId, cwd: input.cwd, model: input.model, developerInstructions: CODEX_SIDE_QUESTION_INSTRUCTIONS }));
|
|
1457
|
+
} catch (error) {
|
|
1458
|
+
if (!input.resumeSessionId || signal?.aborted) throw error;
|
|
1459
|
+
hadContext = false;
|
|
1460
|
+
({ threadId } = await client.openSideThread({ sourceThreadId: null, cwd: input.cwd, model: input.model, developerInstructions: CODEX_SIDE_QUESTION_INSTRUCTIONS }));
|
|
1461
|
+
}
|
|
1462
|
+
if (signal?.aborted) throw new Error("Side question cancelled");
|
|
1463
|
+
turnId = await client.startSideTurn(threadId, buildSideQuestionPrompt(input.question, input.history, input.mainStatus)) ?? turnId;
|
|
1464
|
+
if (signal?.aborted || toolAttempt) interrupt();
|
|
1465
|
+
const outcome = await done;
|
|
1466
|
+
if (signal?.aborted) throw new Error("Side question cancelled");
|
|
1467
|
+
if (outcome.error) throw new Error(outcome.error);
|
|
1468
|
+
const final = [...messages.values()].filter((text) => text.trim()).join("\n\n") || streamed;
|
|
1469
|
+
const answer = toolAttempt ? [final.trim(), toolAttemptNotice(toolAttempt)].filter(Boolean).join("\n\n") : final;
|
|
1470
|
+
if (!answer.trim()) throw new Error("Side question ended without a result");
|
|
1471
|
+
input.onText?.(answer);
|
|
1472
|
+
return { answer, hadContext, mode: "fork" };
|
|
1473
|
+
} finally {
|
|
1474
|
+
off();
|
|
1475
|
+
signal?.removeEventListener("abort", onAbort);
|
|
1476
|
+
await client.disconnect().catch(() => {
|
|
1477
|
+
});
|
|
1478
|
+
}
|
|
1479
|
+
}
|
|
1480
|
+
|
|
1402
1481
|
function hashCodexEnhancedMode(mode) {
|
|
1403
1482
|
return hashObject({
|
|
1404
1483
|
permissionMode: mode.permissionMode,
|
|
@@ -1577,7 +1656,7 @@ async function runCodex(opts) {
|
|
|
1577
1656
|
dangerouslySkipPermissions: initialPermissionMode === "yolo" || initialPermissionMode === "bypassPermissions",
|
|
1578
1657
|
...forkedFromSessionId ? { parentSessionId: forkedFromSessionId } : {},
|
|
1579
1658
|
...forkedFromMessageId ? { forkedFromMessageId } : {},
|
|
1580
|
-
capabilities: [PROMPT_QUEUE_CAPABILITY, FORK_BACKFILL_CAPABILITY, HIBERNATION_CAPABILITY, AUTO_RESTART_CAPABILITY, CODEX_STEER_CAPABILITY, PROJECT_SESSION_CAPABILITY, CODEX_COMPACT_CAPABILITY, RUN_INTENT_CAPABILITY, AGENT_PROFILE_SESSION_CAPABILITY]
|
|
1659
|
+
capabilities: [PROMPT_QUEUE_CAPABILITY, FORK_BACKFILL_CAPABILITY, HIBERNATION_CAPABILITY, AUTO_RESTART_CAPABILITY, CODEX_STEER_CAPABILITY, PROJECT_SESSION_CAPABILITY, CODEX_COMPACT_CAPABILITY, RUN_INTENT_CAPABILITY, AGENT_PROFILE_SESSION_CAPABILITY, CODEX_BTW_CAPABILITY]
|
|
1581
1660
|
});
|
|
1582
1661
|
metadata.attachmentKinds = [...CLAUDE_ATTACHMENT_KINDS];
|
|
1583
1662
|
metadata.stickyModel = null;
|
|
@@ -1935,7 +2014,7 @@ async function runCodex(opts) {
|
|
|
1935
2014
|
let abortController = new AbortController();
|
|
1936
2015
|
let shouldExit = false;
|
|
1937
2016
|
let terminating = false;
|
|
1938
|
-
const hibernationExit = new HibernationExitLatch((a, b) => a === "archive" && b !== "archive");
|
|
2017
|
+
const hibernationExit = new HibernationExitLatch((a, b) => b !== "superseded" && (a === "superseded" || a === "archive" && b !== "archive"));
|
|
1939
2018
|
let hibernationStamp = null;
|
|
1940
2019
|
let hibernationProbe = null;
|
|
1941
2020
|
async function handleAbort(source) {
|
|
@@ -1989,6 +2068,7 @@ async function runCodex(opts) {
|
|
|
1989
2068
|
const exitCursor = intent === "offline" && session ? exitCursorStamp(session.messageCursor, Date.now()) : void 0;
|
|
1990
2069
|
if (exitCursor) session.freezeInbound();
|
|
1991
2070
|
const exitReason = intent === "archive" ? "aborted" : "restarted";
|
|
2071
|
+
if (intent === "superseded") logger.debug("[Codex] Session superseded by a newer wrapper; leaving without lifecycle writes");
|
|
1992
2072
|
terminating = true;
|
|
1993
2073
|
heldInput.drop(exitReason);
|
|
1994
2074
|
messageQueue.discardAll(exitReason);
|
|
@@ -2036,6 +2116,9 @@ async function runCodex(opts) {
|
|
|
2036
2116
|
return { effortRefused };
|
|
2037
2117
|
});
|
|
2038
2118
|
const disposeTermination = registerKillSessionHandler(session.rpcHandlerManager, () => handleKillSession("archive"), session, { processSignals: true, onSignal: () => handleKillSession("offline") });
|
|
2119
|
+
session.on("superseded", () => {
|
|
2120
|
+
void handleKillSession("superseded");
|
|
2121
|
+
});
|
|
2039
2122
|
const messageBuffer = new MessageBuffer();
|
|
2040
2123
|
const hasTTY = process.stdout.isTTY && process.stdin.isTTY;
|
|
2041
2124
|
let inkInstance = null;
|
|
@@ -2063,6 +2146,17 @@ async function runCodex(opts) {
|
|
|
2063
2146
|
}
|
|
2064
2147
|
client = new CodexAppServerClient(sandboxConfig);
|
|
2065
2148
|
client.setAccountOverrides(codexAccount.overrides);
|
|
2149
|
+
registerSideQuestionHandler(session.rpcHandlerManager, {
|
|
2150
|
+
getClaudeSessionId: () => client?.threadId ?? null,
|
|
2151
|
+
getModel: () => currentModel ?? client?.threadModel ?? void 0,
|
|
2152
|
+
cwd: process.cwd(),
|
|
2153
|
+
getMainStatus: () => describePendingApprovals(session.getAgentState()?.requests),
|
|
2154
|
+
run: (input) => runCodexSideQuestion(() => {
|
|
2155
|
+
const side = new CodexAppServerClient(sandboxConfig);
|
|
2156
|
+
side.setAccountOverrides(codexAccount.overrides);
|
|
2157
|
+
return side;
|
|
2158
|
+
}, input)
|
|
2159
|
+
});
|
|
2066
2160
|
const idleRelease = new CodexIdleReleaseTimer({
|
|
2067
2161
|
delayMs: resolveCodexIdleReleaseMs(process.env[CODEX_IDLE_RELEASE_ENV]),
|
|
2068
2162
|
isIdle: () => shouldReleaseIdleCodex({
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { randomUUID } from 'node:crypto';
|
|
2
|
-
import { l as logger } from './logger-
|
|
3
|
-
import { O as OFFLINE_EXIT_STAMP_TIMEOUT_MS } from './sessionExitLifecycle-
|
|
2
|
+
import { l as logger } from './logger-D1hb3CG8.mjs';
|
|
3
|
+
import { O as OFFLINE_EXIT_STAMP_TIMEOUT_MS } from './sessionExitLifecycle-iAtZN9sa.mjs';
|
|
4
4
|
|
|
5
5
|
class BaseReasoningProcessor {
|
|
6
6
|
accumulator = "";
|
|
@@ -198,6 +198,10 @@ class BaseReasoningProcessor {
|
|
|
198
198
|
|
|
199
199
|
async function settleCodexSession(session, intent, deactivate, log = () => {
|
|
200
200
|
}, exitCursor) {
|
|
201
|
+
if (intent === "superseded") {
|
|
202
|
+
await session.close();
|
|
203
|
+
return;
|
|
204
|
+
}
|
|
201
205
|
if (intent === "offline" && exitCursor && session.updateMetadataAndWait) {
|
|
202
206
|
const landed = await session.updateMetadataAndWait((currentMetadata) => ({ ...currentMetadata, exitCursor }), OFFLINE_EXIT_STAMP_TIMEOUT_MS);
|
|
203
207
|
if (!landed) log("[Codex] offline exit cursor not confirmed before going offline");
|