very-happy-cli 0.2.192 → 0.2.194
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-CGHTDJd9.mjs → AcpBackend-C3Kx0QJb.mjs} +3 -3
- package/dist/{AcpBackend-BQO4ShOy.cjs → AcpBackend-DJzsue14.cjs} +3 -3
- package/dist/{AcpSessionManager-LlUMmcpB.cjs → AcpSessionManager-Bc3iafB1.cjs} +2 -2
- package/dist/{AcpSessionManager-G0xD6Jbq.mjs → AcpSessionManager-SteuoqMY.mjs} +2 -2
- package/dist/{BasePermissionHandler-BmTIg376.mjs → BasePermissionHandler-D2pNcAXn.mjs} +1 -1
- package/dist/{BasePermissionHandler-N6Ip3tFt.cjs → BasePermissionHandler-DKzNFVCh.cjs} +1 -1
- package/dist/{account-DtaouikP.cjs → account-ByVjlvFj.cjs} +84 -27
- package/dist/{account-CCVT-HO_.mjs → account-DC2YyU24.mjs} +84 -27
- package/dist/{accountService-Dd9uqde2.mjs → accountService-Cd7bnkfd.mjs} +369 -19
- package/dist/{accountService-Bddy0zwL.cjs → accountService-CuUSJDhP.cjs} +369 -19
- package/dist/{acpSessionResume-BWEUxNtC.mjs → acpSessionResume-B6VClxKQ.mjs} +1 -1
- package/dist/{acpSessionResume-BnHDk5eD.cjs → acpSessionResume-DHHgbNnk.cjs} +1 -1
- package/dist/{agentHome-B0VnjkZW.mjs → agentHome-9caXwo7k.mjs} +4 -4
- package/dist/{agentHome-CqQ29YY7.cjs → agentHome-Bov1aHYS.cjs} +4 -4
- package/dist/{api-_LeBScjg.mjs → api-aE60mNjs.mjs} +10 -10
- package/dist/{api-hMDsC6Wg.cjs → api-wYwQCJml.cjs} +10 -10
- package/dist/{apiMachine-CgRldeJ6.mjs → apiMachine-CvNB38Xg.mjs} +36 -19
- package/dist/{apiMachine-CqW2m6Zr.cjs → apiMachine-DwaqfM9Q.cjs} +36 -19
- package/dist/{attachmentContent-CyptLIfq.mjs → attachmentContent-C2ymY_-w.mjs} +2 -2
- package/dist/{attachmentContent-BEeT2J5n.cjs → attachmentContent-DB8ZsxGE.cjs} +2 -2
- package/dist/{auth-CFQikywl.mjs → auth-BYtmGgE1.mjs} +8 -8
- package/dist/{auth-CA1OClsW.cjs → auth-Bce0Zk3q.cjs} +8 -8
- package/dist/{auth-DL8_J9vu.mjs → auth-CWO6cQ4G.mjs} +5 -5
- package/dist/{auth-C9NvNHhL.cjs → auth-boIcb7iq.cjs} +5 -5
- package/dist/{auto-uQOxlxLp.cjs → auto-AaggdihK.cjs} +24 -22
- package/dist/{auto-CKI05w1D.mjs → auto-B-kopWQx.mjs} +24 -22
- package/dist/{bootstrap-DaZ0Np7X.mjs → bootstrap-CiWwfHB2.mjs} +2 -2
- package/dist/{bootstrap-DsZGc69k.cjs → bootstrap-kywZ0tvD.cjs} +2 -2
- package/dist/{browser-BUIaSHK2.mjs → browser-CFfZM3yg.mjs} +1 -1
- package/dist/{browser-Ft0ASDm7.cjs → browser-Do2MFdq6.cjs} +1 -1
- package/dist/{claudeAccountEnv-ON24i0qv.mjs → claudeAccountEnv-BL1pR_37.mjs} +2 -1
- package/dist/{claudeAccountEnv-BOBpJ3k8.cjs → claudeAccountEnv-CEX_EMZr.cjs} +2 -1
- package/dist/{claudeLocal-B1ZVtryl.mjs → claudeLocal-B47NjZfB.mjs} +5 -5
- package/dist/{claudeLocal-BMf9t4Fa.cjs → claudeLocal-DLd8ogcH.cjs} +5 -5
- package/dist/{claudeLocalLauncher-Bp8bqF4y.mjs → claudeLocalLauncher-5DDuHpCD.mjs} +10 -10
- package/dist/{claudeLocalLauncher-C8TeJcfF.cjs → claudeLocalLauncher-D_UTQ4o_.cjs} +10 -10
- package/dist/{claudeSessionFork-YiktY55n.cjs → claudeSessionFork-4g6-Sk3Q.cjs} +104 -38
- package/dist/{claudeSessionFork-8AA47z8Y.mjs → claudeSessionFork-BrJTncNL.mjs} +105 -40
- package/dist/{client-Crh8_cNx.cjs → client-BIg2LPVx.cjs} +2 -2
- package/dist/{client-CFHZfh9x.cjs → client-BfDga3xi.cjs} +4 -4
- package/dist/{client-Bm4oKvW7.mjs → client-Cbxr9VUE.mjs} +4 -2
- package/dist/{client-D8XROyZc.cjs → client-CsfPUxLy.cjs} +4 -2
- package/dist/{client-BmPaBnDK.mjs → client-DS5JEsHs.mjs} +4 -4
- package/dist/{client-Cxlp_D4I.mjs → client-OjYRPhZs.mjs} +2 -2
- package/dist/codex/happyMcpStdioBridge.cjs +16 -16
- package/dist/codex/happyMcpStdioBridge.mjs +16 -16
- package/dist/codexAccount-BDQjRbtI.cjs +1028 -0
- package/dist/codexAccount-NOX5pmQf.mjs +1015 -0
- package/dist/{codexAppServerClient-q8GHQhyC.cjs → codexAppServerClient-Bj5vN7sb.cjs} +18 -7
- package/dist/{codexAppServerClient-BWJbLCQn.mjs → codexAppServerClient-HKAm8f_D.mjs} +18 -7
- package/dist/{codexCommand-BfXfRQr4.mjs → codexCommand-655pR6CR.mjs} +188 -58
- package/dist/{codexCommand-BgpGg-Zy.cjs → codexCommand-DtbDjHZp.cjs} +187 -57
- package/dist/{codexTermination-CVUF0X75.cjs → codexTermination-CX_FHKT5.cjs} +1 -1
- package/dist/{codexTermination-s9fd1gkA.mjs → codexTermination-DxLR-bb5.mjs} +1 -1
- package/dist/{codexThreadFork-5kwoKjMu.cjs → codexThreadFork-C6ZmcT2z.cjs} +22 -1
- package/dist/{codexThreadFork-DobPd19R.mjs → codexThreadFork-CVzAqELg.mjs} +22 -2
- package/dist/{config-BF8XgLyc.mjs → config-CIvXVGlP.mjs} +3 -3
- package/dist/{config-BAjyTyYp.cjs → config-Cv-A-Bw0.cjs} +3 -3
- package/dist/{configuration-CXEVKAyF.cjs → configuration-2Pbg3a0H.cjs} +1 -1
- package/dist/{configuration-IhRiLDVe.mjs → configuration-rTcdHkhE.mjs} +1 -1
- package/dist/{connect-LZh1gr08.mjs → connect-B9Bl68PF.mjs} +13 -13
- package/dist/{connect-rCS56arw.cjs → connect-BAYNAE8A.cjs} +13 -13
- package/dist/{context-DO6F5YwH.mjs → context-C7QarZMk.mjs} +1 -1
- package/dist/{context-3_S_mWz9.cjs → context-CLTyu_tQ.cjs} +1 -1
- package/dist/{controlClient-8ILulwjc.mjs → controlClient-BIdGnYBo.mjs} +3 -3
- package/dist/{controlClient-j7p5p3_7.cjs → controlClient-CIqHL07h.cjs} +3 -3
- package/dist/{createSessionMetadata-DwdD_uVo.cjs → createSessionMetadata-BHjzRzPc.cjs} +2 -2
- package/dist/{createSessionMetadata-oyaTZm1b.mjs → createSessionMetadata-PrN-dT7K.mjs} +2 -2
- package/dist/{daemonAccounts-BCjDgoNt.cjs → daemonAccounts-CpGDY_4k.cjs} +4 -1
- package/dist/{daemonAccounts-BJgt6IJe.mjs → daemonAccounts-DwPwKxvv.mjs} +5 -2
- package/dist/{defaultPermissionMode-BFShzF55.cjs → defaultPermissionMode-BakXiqRr.cjs} +1 -1
- package/dist/{defaultPermissionMode-Lt3PUCwY.mjs → defaultPermissionMode-DF5AfeBb.mjs} +1 -1
- package/dist/{deterministicJson-Dfp-7wUZ.mjs → deterministicJson-DFwJ57jR.mjs} +13 -13
- package/dist/{deterministicJson-DUN0v3St.cjs → deterministicJson-ZBFn1jtS.cjs} +13 -13
- package/dist/{doctor-B_UwMcVT.mjs → doctor-CFYpAXvt.mjs} +7 -7
- package/dist/{doctor-FgUYTbAT.cjs → doctor-yyM-zii7.cjs} +7 -7
- package/dist/{downloadTarget-C0d6jRx-.mjs → downloadTarget-CVPBZMnY.mjs} +6 -6
- package/dist/{downloadTarget-BrrQEDxg.cjs → downloadTarget-DlmqPQp9.cjs} +6 -6
- package/dist/{ensureDaemonRunning-KUMFfIil.mjs → ensureDaemonRunning-B6Y-CMWe.mjs} +5 -5
- package/dist/{ensureDaemonRunning-Cq4FYI5Q.cjs → ensureDaemonRunning-D2ny0yon.cjs} +5 -5
- package/dist/{handleResumeCommand-Cl9GIL5F.cjs → handleResumeCommand-D-mGugcu.cjs} +5 -5
- package/dist/{handleResumeCommand-BGhVo3QH.mjs → handleResumeCommand-DlrDcV5B.mjs} +5 -5
- package/dist/{index-CQ_hLLCj.cjs → index-2Fcq3AGX.cjs} +3 -3
- package/dist/{index-CRipkiqo.cjs → index-5c33fqLQ.cjs} +4 -4
- package/dist/{index-JQDyJ3Li.mjs → index-BJsenPFp.mjs} +3 -3
- package/dist/{index-BzAYnYct.cjs → index-BUFrKZeQ.cjs} +198 -108
- package/dist/{index-D8ODb0_U.cjs → index-BWvmUCQF.cjs} +42 -42
- package/dist/{index-v5EmjT8l.mjs → index-Bi3dVJ0S.mjs} +4 -4
- package/dist/{index-CZaLMmPC.cjs → index-CPkSLWP_.cjs} +4 -4
- package/dist/{index-DYD3GM1m.mjs → index-D1YnIih6.mjs} +195 -109
- package/dist/{index-BjXjMhGY.mjs → index-DEN6vfEY.mjs} +4 -4
- package/dist/{index-Ca1Tt96A.mjs → index-DuDD9khO.mjs} +43 -43
- package/dist/index.cjs +2 -2
- package/dist/index.mjs +2 -2
- package/dist/{install-ClUA9tbC.cjs → install-BOA4nEbm.cjs} +3 -3
- package/dist/{install-D6EHRtAN.mjs → install-BVYL-wSO.mjs} +3 -3
- package/dist/lib.cjs +12 -12
- package/dist/lib.d.cts +97 -25
- package/dist/lib.d.mts +97 -25
- package/dist/lib.mjs +12 -12
- package/dist/{lidState-DqoN7zH4.cjs → lidState-DYeb7Wud.cjs} +1 -1
- package/dist/{lidState-CZOXXdzv.mjs → lidState-zy20u7T3.mjs} +1 -1
- package/dist/{localHappyAgentAuth-YHxDZ4x4.mjs → localHappyAgentAuth-CBsX08VJ.mjs} +1 -1
- package/dist/{localHappyAgentAuth-BnGCpHRX.cjs → localHappyAgentAuth-CScN2McN.cjs} +1 -1
- package/dist/{logger-8su64lqR.cjs → logger-CepF8C5Z.cjs} +2 -2
- package/dist/{logger-Fd_rNvgd.mjs → logger-SGCwRIV5.mjs} +2 -2
- package/dist/{machineMetadata-1HIIC7Bc.mjs → machineMetadata-ClJfd7ay.mjs} +3 -3
- package/dist/{machineMetadata-DYXt3p6u.cjs → machineMetadata-ObK4hjF0.cjs} +3 -3
- package/dist/{main-BI6GIzUL.mjs → main-C7ZcZVBY.mjs} +47 -47
- package/dist/{main-C_GrcYkn.cjs → main-mhXOpUV7.cjs} +47 -47
- package/dist/{mcp-XGoxywno.mjs → mcp-BuCpkYTY.mjs} +18 -18
- package/dist/{mcp-BycIv9oQ.cjs → mcp-Zz7m0j8A.cjs} +18 -18
- package/dist/{mirrorProtocol-DXT3rv7T.mjs → mirrorProtocol-B0H9UTBM.mjs} +3 -3
- package/dist/{mirrorProtocol-DVnB8EO8.cjs → mirrorProtocol-IhICxf0K.cjs} +3 -3
- package/dist/{package-iuLlSiSF.cjs → package-C7WgesIw.cjs} +7 -7
- package/dist/{package-6KkRAops.mjs → package-Q_ELj5DL.mjs} +7 -7
- package/dist/{panels-B5Di2zb2.mjs → panels-Cm69UXgE.mjs} +5 -5
- package/dist/{panels-0C89q0Tu.cjs → panels-yyxpwZnk.cjs} +5 -5
- package/dist/{peerTools-CANTX_mG.cjs → peerTools-BcZAbqBL.cjs} +5 -5
- package/dist/{peerTools-CKJ-IDM4.mjs → peerTools-DUg9RduG.mjs} +5 -5
- package/dist/{persistence-B4ttN-fR.cjs → persistence-D0gNvqXe.cjs} +2 -2
- package/dist/{persistence-DWcHe035.mjs → persistence-mr4Y484W.mjs} +2 -2
- package/dist/{piRunnerArgs-Bl5GpBoN.mjs → piRunnerArgs-CGjpl4iF.mjs} +1 -1
- package/dist/{piRunnerArgs-BOkfxyak.cjs → piRunnerArgs-DK_DDkYW.cjs} +1 -1
- package/dist/{piRuntime-DzrIiZU8.cjs → piRuntime-CtZRNOEb.cjs} +1 -1
- package/dist/{piRuntime-BhwxzdQf.mjs → piRuntime-HUA19wG8.mjs} +1 -1
- package/dist/{piTerminal-DnA2CbGr.mjs → piTerminal-Bgy1W9mA.mjs} +20 -20
- package/dist/{piTerminal-BdS7ol7v.cjs → piTerminal-D9OPouek.cjs} +20 -20
- package/dist/{pushNotifications-BqFoLye2.cjs → pushNotifications-CH0XVPQe.cjs} +3 -3
- package/dist/{pushNotifications-DkQ0yvFs.mjs → pushNotifications-DjEl8G0a.mjs} +3 -3
- package/dist/{query-BQ4br3yn.cjs → query-Df3WhSA0.cjs} +1 -1
- package/dist/{query-BRJYSkb1.mjs → query-DmIo5OXf.mjs} +1 -1
- package/dist/{rateLimitReporter-BRbYkmuP.mjs → rateLimitReporter-B_PZClib.mjs} +3 -3
- package/dist/{rateLimitReporter-DK5SQuCc.cjs → rateLimitReporter-M_IKRRS7.cjs} +3 -3
- package/dist/{rateLimitWindows-DBfiuYeg.cjs → rateLimitWindows-B9PERFm1.cjs} +1 -1
- package/dist/{rateLimitWindows-Da5AR-4u.mjs → rateLimitWindows-a2yE3kCv.mjs} +1 -1
- package/dist/{registerCommonHandlers-yQ7Ru-l0.mjs → registerCommonHandlers-CND00Dpj.mjs} +2 -2
- package/dist/{registerCommonHandlers-m6pxxf2J.cjs → registerCommonHandlers-D4uXC0he.cjs} +2 -2
- package/dist/{registerKillSessionHandler-BDNpi7YO.mjs → registerKillSessionHandler-CwyHwm_n.mjs} +6 -6
- package/dist/{registerKillSessionHandler-BAOIa_Fs.cjs → registerKillSessionHandler-DQKsD9CW.cjs} +6 -6
- package/dist/{remoteSessionClient-iJMXRN_D.cjs → remoteSessionClient-DOWgca08.cjs} +5 -5
- package/dist/{remoteSessionClient-CZ7aaNgj.mjs → remoteSessionClient-mIr_9OL_.mjs} +5 -5
- package/dist/{reportProgressTool-DpFs7pSe.cjs → reportProgressTool-BLw2_Ohi.cjs} +3 -3
- package/dist/{reportProgressTool-DfQhPu0s.mjs → reportProgressTool-DTKlUlHv.mjs} +3 -3
- package/dist/{run-p-xp1_HY.cjs → run-1V6DLzTY.cjs} +178 -847
- package/dist/{run-CwN28mcj.mjs → run-bfxXYL5N.mjs} +176 -845
- package/dist/{runClaude-DRKtAGTm.mjs → runClaude-BgvDhl2p.mjs} +25 -25
- package/dist/{runClaude-D6U1Z575.cjs → runClaude-DuFgZZwO.cjs} +25 -25
- package/dist/{runClaudeDeps-BheVcIlD.mjs → runClaudeDeps-CX7GtH7O.mjs} +46 -46
- package/dist/{runClaudeDeps-Dkofokgb.cjs → runClaudeDeps-DeVinBmE.cjs} +41 -41
- package/dist/{runGemini-owbvhFbi.mjs → runGemini-Cd27u-7R.mjs} +33 -33
- package/dist/{runGemini-C8q3YCc0.cjs → runGemini-DiYSk3s1.cjs} +33 -33
- package/dist/{runOpenClaw-Dky3-mjO.mjs → runOpenClaw-CWkkfRSo.mjs} +18 -18
- package/dist/{runOpenClaw-DGeN66-t.cjs → runOpenClaw-DyQnBzpy.cjs} +18 -18
- package/dist/{sandbox-D2CPyoCA.cjs → sandbox-BAXXYewR.cjs} +4 -4
- package/dist/{sandbox-sq_wy9Gl.mjs → sandbox-C35zDrkc.mjs} +4 -4
- package/dist/selfCheck-DKMF0Dyu.mjs +88 -0
- package/dist/{selfCheck-BgLvQKSt.cjs → selfCheck-R71q-x7u.cjs} +39 -39
- package/dist/{send-Cd10YhXh.cjs → send-3Wa9th3D.cjs} +8 -8
- package/dist/{send-K9vg-8t-.mjs → send-DiSaR5Bk.mjs} +8 -8
- package/dist/{server-DRrV64r0.cjs → server-BJu2bFBy.cjs} +6 -6
- package/dist/{server-De4W1zuK.mjs → server-BxMJxaE6.mjs} +4 -4
- package/dist/{sessionLock-BDtSzzKS.cjs → sessionLock-BJ1ngLgm.cjs} +3 -3
- package/dist/{sessionLock-Dl6i7IgA.mjs → sessionLock-dbi4JPhP.mjs} +3 -3
- package/dist/{sessionOps-DvnEH4PL.cjs → sessionOps-BUlpeaUe.cjs} +50 -8
- package/dist/{sessionOps-gU88-W9F.mjs → sessionOps-C9wRmCBg.mjs} +51 -9
- package/dist/{sessionProvider-CKcIo7KO.mjs → sessionProvider-BEHfI5gs.mjs} +11 -9
- package/dist/{sessionProvider-CbSZeZrl.cjs → sessionProvider-DYD6JepE.cjs} +11 -9
- package/dist/{sessionScanner-7RtcCeyD.cjs → sessionScanner-BwbjEoSf.cjs} +3 -3
- package/dist/{sessionScanner-DR32uSby.mjs → sessionScanner-CFITViIZ.mjs} +3 -3
- package/dist/{sessions-BvuMjgvJ.cjs → sessions-C-wBd0fN.cjs} +10 -10
- package/dist/{sessions-DTt2Eguk.mjs → sessions-wOcO2X-k.mjs} +10 -10
- package/dist/{setupOfflineReconnection-DduOsw6p.cjs → setupOfflineReconnection-Bd6XsWhA.cjs} +2 -2
- package/dist/{setupOfflineReconnection-BGnvhRfb.mjs → setupOfflineReconnection-BrljmbqX.mjs} +2 -2
- package/dist/{spawn-CL3cUc7b.mjs → spawn-BPioepNz.mjs} +66 -22
- package/dist/{spawn-DMB6rRPA.cjs → spawn-Crprnq9Z.cjs} +66 -22
- package/dist/{spawnAgents-CClb7buD.cjs → spawnAgents-B9olJ8xn.cjs} +1 -1
- package/dist/{spawnAgents-CRMfOJhh.mjs → spawnAgents-I29H9nO8.mjs} +1 -1
- package/dist/{spawnHappyCLI-Cj_6IICe.mjs → spawnHappyCLI-BA1bTIiO.mjs} +1 -1
- package/dist/{spawnHappyCLI-DJdhX_Qx.cjs → spawnHappyCLI-C0XAWy8V.cjs} +1 -1
- package/dist/{startFileWatcher-DikVa8kg.mjs → startFileWatcher-COCEjNT8.mjs} +1 -1
- package/dist/{startFileWatcher-LnOmVW6H.cjs → startFileWatcher-Ca5izs24.cjs} +1 -1
- package/dist/{startupSessionCreate-CDdaLaMq.mjs → startupSessionCreate-BnEPBxsJ.mjs} +3 -3
- package/dist/{startupSessionCreate-B3ND-917.cjs → startupSessionCreate-Cmg1gkKS.cjs} +3 -3
- package/dist/{store-DV__wCvP.cjs → store-CkNa6oj4.cjs} +46 -9
- package/dist/{store--XN-7MS0.mjs → store-Vej_738f.mjs} +46 -10
- package/dist/{streamRelay-DFdOaLOn.cjs → streamRelay-C0G1HOOd.cjs} +1 -1
- package/dist/{streamRelay-sABnxEXq.mjs → streamRelay-C5U-C4GS.mjs} +1 -1
- package/dist/{sync-_2lsZ1U2.cjs → sync-BfrnSdL1.cjs} +1 -1
- package/dist/{sync-JoEZKRo8.mjs → sync-DVcNkv8e.mjs} +1 -1
- package/dist/{systemPrompt-Zq4HyrZ5.mjs → systemPrompt-BxZebU75.mjs} +2 -2
- package/dist/{systemPrompt-CJEvNCuW.cjs → systemPrompt-Os5ca7pu.cjs} +2 -2
- package/dist/{teams-BNZafnrT.cjs → teams--pv0QFMA.cjs} +7 -7
- package/dist/{teams-qz4LqKJ2.mjs → teams-CNB3DE_n.mjs} +7 -7
- package/dist/{template-LgvBbOna.cjs → template-B9pLEP8v.cjs} +2 -2
- package/dist/{template-CJ8BWSsc.mjs → template-CL9EvQLQ.mjs} +2 -2
- package/dist/{time-bzmet4s5.mjs → time-0Ru4clBD.mjs} +1 -1
- package/dist/{time-CaUlWSNJ.cjs → time-Da5GIiCa.cjs} +1 -1
- package/dist/{titleGenerator-BuIIu_JP.cjs → titleGenerator-9xIXHA5K.cjs} +3 -3
- package/dist/{titleGenerator-CbTtJ_1D.mjs → titleGenerator-CaCzpYyA.mjs} +2 -2
- package/dist/{todo-DIrVF_Ak.mjs → todo-CZXHl2Lg.mjs} +6 -6
- package/dist/{todo-CQ_BTf9C.cjs → todo-DUY_J3l_.cjs} +6 -6
- package/dist/{tools-cLOjBvPn.mjs → tools-DqA2Jt2R.mjs} +3 -2
- package/dist/{tools-BnmmFZji.cjs → tools-hPD2Hvei.cjs} +3 -2
- package/dist/{uninstall-C5OuW6dE.mjs → uninstall-CjMzELYw.mjs} +3 -3
- package/dist/{uninstall-uEEGKB84.cjs → uninstall-rTvdpRLt.cjs} +3 -3
- package/dist/{wrapperAccount-DXlD3bsO.mjs → wrapperAccount-BkufO_9g.mjs} +5 -4
- package/dist/{wrapperAccount-DzoGqS2b.cjs → wrapperAccount-D2A4DuZy.cjs} +6 -3
- package/package.json +7 -7
- package/dist/selfCheck-vkfrgQ7X.mjs +0 -88
|
@@ -1,110 +1,114 @@
|
|
|
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-boIcb7iq.cjs');
|
|
4
|
+
var index = require('./index-BUFrKZeQ.cjs');
|
|
5
|
+
var defaultPermissionMode = require('./defaultPermissionMode-BakXiqRr.cjs');
|
|
6
|
+
var deterministicJson = require('./deterministicJson-ZBFn1jtS.cjs');
|
|
7
|
+
var client = require('./client-CsfPUxLy.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-wYwQCJml.cjs');
|
|
13
13
|
var heldInput = require('./heldInput-BOtqFO2r.cjs');
|
|
14
|
-
var attachmentContent = require('./attachmentContent-
|
|
14
|
+
var attachmentContent = require('./attachmentContent-DB8ZsxGE.cjs');
|
|
15
15
|
var ink = require('ink');
|
|
16
|
-
var sessionLock = require('./sessionLock-
|
|
16
|
+
var sessionLock = require('./sessionLock-BJ1ngLgm.cjs');
|
|
17
17
|
var React = require('react');
|
|
18
|
-
var codexAppServerClient = require('./codexAppServerClient-
|
|
19
|
-
var rateLimitReporter = require('./rateLimitReporter-
|
|
20
|
-
var logger = require('./logger-
|
|
21
|
-
var BasePermissionHandler = require('./BasePermissionHandler-
|
|
22
|
-
var codexTermination = require('./codexTermination-
|
|
18
|
+
var codexAppServerClient = require('./codexAppServerClient-Bj5vN7sb.cjs');
|
|
19
|
+
var rateLimitReporter = require('./rateLimitReporter-M_IKRRS7.cjs');
|
|
20
|
+
var logger = require('./logger-CepF8C5Z.cjs');
|
|
21
|
+
var BasePermissionHandler = require('./BasePermissionHandler-DKzNFVCh.cjs');
|
|
22
|
+
var codexTermination = require('./codexTermination-CX_FHKT5.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-D0gNvqXe.cjs');
|
|
25
|
+
var machineMetadata = require('./machineMetadata-ObK4hjF0.cjs');
|
|
26
|
+
var configuration = require('./configuration-2Pbg3a0H.cjs');
|
|
27
|
+
var registerKillSessionHandler = require('./registerKillSessionHandler-DQKsD9CW.cjs');
|
|
28
28
|
var projectPath = require('./projectPath-C3ioB4Bu.cjs');
|
|
29
29
|
var path = require('node:path');
|
|
30
|
-
var createSessionMetadata = require('./createSessionMetadata-
|
|
30
|
+
var createSessionMetadata = require('./createSessionMetadata-BHjzRzPc.cjs');
|
|
31
31
|
var sessionExitLifecycle = require('./sessionExitLifecycle-DFltxXU8.cjs');
|
|
32
|
-
var controlClient = require('./controlClient-
|
|
33
|
-
var startupSessionCreate = require('./startupSessionCreate-
|
|
32
|
+
var controlClient = require('./controlClient-CIqHL07h.cjs');
|
|
33
|
+
var startupSessionCreate = require('./startupSessionCreate-Cmg1gkKS.cjs');
|
|
34
34
|
var authRelay = require('./authRelay-Dy1qU9td.cjs');
|
|
35
|
-
var setupOfflineReconnection = require('./setupOfflineReconnection-
|
|
35
|
+
var setupOfflineReconnection = require('./setupOfflineReconnection-Bd6XsWhA.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
|
|
41
|
+
var store = require('./store-CkNa6oj4.cjs');
|
|
42
|
+
var node_fs = require('node:fs');
|
|
43
|
+
var codexAccount = require('./codexAccount-BDQjRbtI.cjs');
|
|
44
|
+
var wrapperAccount = require('./wrapperAccount-D2A4DuZy.cjs');
|
|
45
|
+
var ensureDaemonRunning = require('./ensureDaemonRunning-D2ny0yon.cjs');
|
|
42
46
|
require('tweetnacl');
|
|
43
47
|
require('axios');
|
|
44
|
-
require('./time-
|
|
45
|
-
require('./browser-
|
|
48
|
+
require('./time-Da5GIiCa.cjs');
|
|
49
|
+
require('./browser-Do2MFdq6.cjs');
|
|
46
50
|
require('open');
|
|
47
51
|
require('zod');
|
|
48
52
|
require('./prompt-Bof2aQkI.cjs');
|
|
49
|
-
require('./reportProgressTool-
|
|
50
|
-
require('./client-
|
|
53
|
+
require('./reportProgressTool-BLw2_Ohi.cjs');
|
|
54
|
+
require('./client-BIg2LPVx.cjs');
|
|
51
55
|
require('./precheckCompat-CWOi5c9L.cjs');
|
|
52
56
|
require('./agentGuidance-BtBx2xxE.cjs');
|
|
53
|
-
require('node:fs');
|
|
54
57
|
require('node:os');
|
|
55
58
|
require('./pi-DlsrPCTa.cjs');
|
|
56
59
|
require('./fileStore-7qhnbs6N.cjs');
|
|
57
|
-
require('./client-
|
|
60
|
+
require('./client-BfDga3xi.cjs');
|
|
58
61
|
require('node:util');
|
|
59
|
-
require('./context-
|
|
60
|
-
require('./sessionOps-
|
|
62
|
+
require('./context-CLTyu_tQ.cjs');
|
|
63
|
+
require('./sessionOps-BUlpeaUe.cjs');
|
|
61
64
|
require('socket.io-client');
|
|
62
65
|
require('./backgroundTaskActivity-CBvUdj39.cjs');
|
|
63
66
|
require('./resources-BZ_Be0qM.cjs');
|
|
64
|
-
require('./tools-
|
|
65
|
-
require('./peerTools-
|
|
67
|
+
require('./tools-hPD2Hvei.cjs');
|
|
68
|
+
require('./peerTools-BcZAbqBL.cjs');
|
|
66
69
|
require('./ids-B6ZC0HGt.cjs');
|
|
67
|
-
require('./remoteSessionClient-
|
|
70
|
+
require('./remoteSessionClient-DOWgca08.cjs');
|
|
68
71
|
require('@modelcontextprotocol/sdk/server/mcp.js');
|
|
69
72
|
require('node:http');
|
|
70
73
|
require('@modelcontextprotocol/sdk/server/streamableHttp.js');
|
|
71
74
|
require('./limits-C-a7gr04.cjs');
|
|
72
|
-
require('./downloadTarget-
|
|
75
|
+
require('./downloadTarget-DlmqPQp9.cjs');
|
|
73
76
|
require('./terminals-B_bfC9c2.cjs');
|
|
74
77
|
require('./terminalTitleSuggest-DhvRFX3H.cjs');
|
|
75
78
|
require('./tmuxSocket-D-Xt6Vn-.cjs');
|
|
76
|
-
require('./bootstrap-
|
|
77
|
-
require('./package-
|
|
79
|
+
require('./bootstrap-kywZ0tvD.cjs');
|
|
80
|
+
require('./package-C7WgesIw.cjs');
|
|
78
81
|
require('./webPanels-FCgFKvVe.cjs');
|
|
79
|
-
require('./pushNotifications-
|
|
82
|
+
require('./pushNotifications-CH0XVPQe.cjs');
|
|
80
83
|
require('./contentLogMetadata-ZSFk_NjQ.cjs');
|
|
81
84
|
require('./previewPath-B0rBdhy1.cjs');
|
|
82
85
|
require('crypto');
|
|
83
|
-
require('./lidState-
|
|
86
|
+
require('./lidState-DYeb7Wud.cjs');
|
|
84
87
|
require('os');
|
|
85
88
|
require('child_process');
|
|
86
89
|
require('node:events');
|
|
87
|
-
require('./registerCommonHandlers-
|
|
90
|
+
require('./registerCommonHandlers-D4uXC0he.cjs');
|
|
88
91
|
require('util');
|
|
89
92
|
require('fs/promises');
|
|
90
93
|
require('path');
|
|
91
94
|
require('cross-spawn');
|
|
92
|
-
require('./sync-
|
|
95
|
+
require('./sync-BfrnSdL1.cjs');
|
|
93
96
|
require('chalk');
|
|
94
97
|
require('./cliUpdate-DsKXPFYp.cjs');
|
|
95
98
|
require('./processTreeSnapshot-mDbnuojn.cjs');
|
|
96
99
|
require('node:readline');
|
|
97
100
|
require('./manager-HrEj442o.cjs');
|
|
98
101
|
require('@anthropic-ai/sandbox-runtime');
|
|
99
|
-
require('./rateLimitWindows-
|
|
102
|
+
require('./rateLimitWindows-B9PERFm1.cjs');
|
|
100
103
|
require('./processTree-CMHWlVse.cjs');
|
|
101
104
|
require('./detectCLI-BuYR_Qxe.cjs');
|
|
102
105
|
require('fs');
|
|
103
|
-
require('./localHappyAgentAuth-
|
|
106
|
+
require('./localHappyAgentAuth-CScN2McN.cjs');
|
|
104
107
|
require('./fsMkdir-0K3yENml.cjs');
|
|
105
108
|
require('./types-CRS-srZK.cjs');
|
|
106
109
|
require('url');
|
|
107
|
-
require('./
|
|
110
|
+
require('./claudeAccountEnv-CEX_EMZr.cjs');
|
|
111
|
+
require('./spawnHappyCLI-C0XAWy8V.cjs');
|
|
108
112
|
require('./doctorReadiness-Dl6yRQCy.cjs');
|
|
109
113
|
|
|
110
114
|
function getStartedSubagents(state) {
|
|
@@ -1186,7 +1190,8 @@ async function resumeExistingThread(opts) {
|
|
|
1186
1190
|
const resumedThread = await opts.client.resumeThread({
|
|
1187
1191
|
threadId: opts.threadId,
|
|
1188
1192
|
cwd: opts.cwd,
|
|
1189
|
-
mcpServers: opts.mcpServers
|
|
1193
|
+
mcpServers: opts.mcpServers,
|
|
1194
|
+
...opts.model ? { model: opts.model } : {}
|
|
1190
1195
|
});
|
|
1191
1196
|
opts.session.updateMetadata((currentMetadata) => ({
|
|
1192
1197
|
...currentMetadata,
|
|
@@ -1464,6 +1469,70 @@ function codexPublishablePermissionMode(mode) {
|
|
|
1464
1469
|
return typeof mode === "string" && CODEX_REMOTE_PERMISSION_MODES.includes(mode) ? mode : null;
|
|
1465
1470
|
}
|
|
1466
1471
|
|
|
1472
|
+
const MACHINE_CODEX_ACCOUNT = { profile: null, overrides: { env: {} }, unavailable: false, notices: [], cleanup: () => {
|
|
1473
|
+
} };
|
|
1474
|
+
function loadCodexWrapperAccount(happyHome, sessionId, spawnAccountId, env = process.env, now = Date.now()) {
|
|
1475
|
+
let bindings = store.readSessionBindings(happyHome);
|
|
1476
|
+
if (wrapperAccount.shouldRecordSpawnAccount(spawnAccountId, sessionId in bindings)) {
|
|
1477
|
+
store.writeSessionBinding(happyHome, sessionId, { account: spawnAccountId });
|
|
1478
|
+
bindings = { ...bindings, [sessionId]: { account: spawnAccountId } };
|
|
1479
|
+
}
|
|
1480
|
+
const probe = store.defaultSecretProbe(env);
|
|
1481
|
+
const resolution = codexAccount.resolveCodexAccount(sessionId, {
|
|
1482
|
+
home: happyHome,
|
|
1483
|
+
accounts: store.readAccounts(happyHome),
|
|
1484
|
+
bindings,
|
|
1485
|
+
providers: codexAccount.readCodexProviders(env),
|
|
1486
|
+
fileReadable: probe.fileReadable,
|
|
1487
|
+
env,
|
|
1488
|
+
nodePath: process.execPath,
|
|
1489
|
+
envKeyCopyPath: (id) => path.join(happyHome, "tmp", "accounts", `key-${process.pid}-${id}`)
|
|
1490
|
+
});
|
|
1491
|
+
if (resolution.kind === "machine") return MACHINE_CODEX_ACCOUNT;
|
|
1492
|
+
let cleanup = () => {
|
|
1493
|
+
};
|
|
1494
|
+
if (resolution.kind === "active" && resolution.envKeyCopy) {
|
|
1495
|
+
const { name, path: path$1 } = resolution.envKeyCopy;
|
|
1496
|
+
node_fs.mkdirSync(path.dirname(path$1), { recursive: true, mode: 448 });
|
|
1497
|
+
node_fs.writeFileSync(path$1, (env[name] ?? "").trim() + "\n", { mode: 384 });
|
|
1498
|
+
node_fs.chmodSync(path$1, 384);
|
|
1499
|
+
cleanup = () => node_fs.rmSync(path$1, { force: true });
|
|
1500
|
+
}
|
|
1501
|
+
for (const key of resolution.unset) delete env[key];
|
|
1502
|
+
if (resolution.kind === "active" && resolution.envKeyCopy) delete env[resolution.envKeyCopy.name];
|
|
1503
|
+
if (resolution.kind === "unavailable") {
|
|
1504
|
+
return { profile: resolution.profile, overrides: { env: {} }, unavailable: true, notices: [wrapperAccount.unavailableNotice(resolution.profile)], cleanup };
|
|
1505
|
+
}
|
|
1506
|
+
const overrides = { env: {}, modelProvider: resolution.modelProvider, ...resolution.config ? { config: resolution.config } : {} };
|
|
1507
|
+
if (resolution.codexHome) {
|
|
1508
|
+
codexAccount.syncCodexOverlay(resolution.codexHome, codexAccount.baseCodexHome(env), now);
|
|
1509
|
+
overrides.env.CODEX_HOME = resolution.codexHome;
|
|
1510
|
+
}
|
|
1511
|
+
return {
|
|
1512
|
+
profile: resolution.profile,
|
|
1513
|
+
overrides,
|
|
1514
|
+
...resolution.pinnedModel ? { pinnedModel: resolution.pinnedModel } : {},
|
|
1515
|
+
...resolution.models ? { models: resolution.models } : {},
|
|
1516
|
+
unavailable: false,
|
|
1517
|
+
notices: [],
|
|
1518
|
+
cleanup
|
|
1519
|
+
};
|
|
1520
|
+
}
|
|
1521
|
+
function markCodexAccountRejected(happyHome, accountId, now = Date.now()) {
|
|
1522
|
+
try {
|
|
1523
|
+
const file = store.readAccountsFileV2(happyHome);
|
|
1524
|
+
const record = file.accounts[accountId];
|
|
1525
|
+
if (!record || record.agent !== "codex") return null;
|
|
1526
|
+
const status = record.kind === "codex-chatgpt" ? "expired" : "invalid";
|
|
1527
|
+
if (record.check?.status === status) return status;
|
|
1528
|
+
record.check = { status, at: now, detail: "rejected during a session" };
|
|
1529
|
+
store.writeAccountsFile(happyHome, file);
|
|
1530
|
+
return status;
|
|
1531
|
+
} catch {
|
|
1532
|
+
return null;
|
|
1533
|
+
}
|
|
1534
|
+
}
|
|
1535
|
+
|
|
1467
1536
|
const DEFAULT_CODEX_MODEL = void 0;
|
|
1468
1537
|
const DEFAULT_CODEX_EFFORT = "medium";
|
|
1469
1538
|
async function runCodex(opts) {
|
|
@@ -1480,6 +1549,8 @@ async function runCodex(opts) {
|
|
|
1480
1549
|
console.error(" \x1B[36mvery-happy claude\x1B[0m\n");
|
|
1481
1550
|
process.exit(1);
|
|
1482
1551
|
}
|
|
1552
|
+
const spawnAccountId = process.env[store.SPAWN_ACCOUNT_ENV] || void 0;
|
|
1553
|
+
delete process.env[store.SPAWN_ACCOUNT_ENV];
|
|
1483
1554
|
const sessionTag = node_crypto.randomUUID();
|
|
1484
1555
|
api.connectionState.setBackend("Codex");
|
|
1485
1556
|
const api$1 = await api.ApiClient.create(opts.credentials);
|
|
@@ -1508,7 +1579,7 @@ async function runCodex(opts) {
|
|
|
1508
1579
|
dangerouslySkipPermissions: initialPermissionMode === "yolo" || initialPermissionMode === "bypassPermissions",
|
|
1509
1580
|
...forkedFromSessionId ? { parentSessionId: forkedFromSessionId } : {},
|
|
1510
1581
|
...forkedFromMessageId ? { forkedFromMessageId } : {},
|
|
1511
|
-
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]
|
|
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]
|
|
1512
1583
|
});
|
|
1513
1584
|
metadata.attachmentKinds = [...attachmentContent.CLAUDE_ATTACHMENT_KINDS];
|
|
1514
1585
|
metadata.stickyModel = null;
|
|
@@ -1570,6 +1641,21 @@ async function runCodex(opts) {
|
|
|
1570
1641
|
}
|
|
1571
1642
|
}
|
|
1572
1643
|
const resumedEffort = reconnectSeeded && response ? index.restoredEffort(response.metadata, { useReportedLevel: true }) : void 0;
|
|
1644
|
+
let codexAccount$1 = MACHINE_CODEX_ACCOUNT;
|
|
1645
|
+
if (response) {
|
|
1646
|
+
try {
|
|
1647
|
+
codexAccount$1 = loadCodexWrapperAccount(configuration.configuration.happyHomeDir, response.id, spawnAccountId);
|
|
1648
|
+
} catch (error) {
|
|
1649
|
+
const reason = error instanceof Error ? error.message : String(error);
|
|
1650
|
+
logger.logger.debug(`[START] B-850b account resolution failed: ${reason}`);
|
|
1651
|
+
if (spawnAccountId) {
|
|
1652
|
+
codexAccount$1 = { ...MACHINE_CODEX_ACCOUNT, profile: { id: spawnAccountId, label: spawnAccountId, kind: "unknown", status: "unavailable", reason: "error" }, unavailable: true, notices: [`Account "${spawnAccountId}" could not be loaded: ${reason}`] };
|
|
1653
|
+
}
|
|
1654
|
+
}
|
|
1655
|
+
}
|
|
1656
|
+
const accountSwitched = !!reconnectSessionId && reconnectSeeded && !!response && codexAccount.codexAccountSwitched(response.metadata?.agentProfile, codexAccount$1.profile);
|
|
1657
|
+
if (accountSwitched && !codexAccount$1.profile) codexAccount$1 = { ...codexAccount$1, overrides: { env: {}, modelProvider: codexAccount.readCodexDefaultProvider() } };
|
|
1658
|
+
logger.logger.debug(`[START] B-850b account: ${codexAccount$1.profile ? `${codexAccount$1.profile.id} ${codexAccount$1.profile.kind} ${codexAccount$1.profile.status}` : "machine login"}${accountSwitched ? " (switched)" : ""}`);
|
|
1573
1659
|
let session;
|
|
1574
1660
|
let permissionHandler;
|
|
1575
1661
|
let client$1;
|
|
@@ -1598,6 +1684,25 @@ async function runCodex(opts) {
|
|
|
1598
1684
|
if (!wakingFromHibernation) void session.cancelUndeliveredQueuedInputs(reconnectReplay ? { maxSeq: reconnectReplay.seq } : void 0);
|
|
1599
1685
|
session.updateMetadata((meta) => sessionLock.mergeReconnectMetadata(meta, metadata, Date.now()));
|
|
1600
1686
|
}
|
|
1687
|
+
session.updateMetadata((current) => ({
|
|
1688
|
+
...current,
|
|
1689
|
+
agentProfile: codexAccount$1.profile,
|
|
1690
|
+
...accountSwitched ? { stickyModel: null, modelIntent: null } : {}
|
|
1691
|
+
}));
|
|
1692
|
+
for (const notice of codexAccount$1.notices) {
|
|
1693
|
+
session.sendSessionEvent({ type: "message", message: notice, kind: codexAccount$1.unavailable ? "agent-profile-unavailable" : "agent-profile-warning" });
|
|
1694
|
+
}
|
|
1695
|
+
let historyRejectionReported = false;
|
|
1696
|
+
const noteAccountFailure = (text) => {
|
|
1697
|
+
if (!codexAccount$1.profile || codexAccount$1.unavailable) return;
|
|
1698
|
+
if (accountSwitched && !historyRejectionReported && codexAccount.isHistoryRejectedError(text)) {
|
|
1699
|
+
historyRejectionReported = true;
|
|
1700
|
+
session.sendSessionEvent({ type: "message", message: `This conversation's history cannot continue on account "${codexAccount$1.profile.label}". Start a new session on it, or switch back to the previous account.`, kind: "agent-profile-history-rejected" });
|
|
1701
|
+
} else if (codexAccount.isCodexAuthRejection(text)) {
|
|
1702
|
+
const marked = markCodexAccountRejected(configuration.configuration.happyHomeDir, codexAccount$1.profile.id);
|
|
1703
|
+
if (marked) session.sendSessionEvent({ type: "message", message: `Account "${codexAccount$1.profile.label}" was rejected (${marked}). Sign in again or switch accounts.`, kind: "agent-profile-auth-failed" });
|
|
1704
|
+
}
|
|
1705
|
+
};
|
|
1601
1706
|
if (response) {
|
|
1602
1707
|
try {
|
|
1603
1708
|
logger.logger.debug(`[START] Reporting session ${response.id} to daemon`);
|
|
@@ -1690,6 +1795,11 @@ async function runCodex(opts) {
|
|
|
1690
1795
|
};
|
|
1691
1796
|
let userMessageDelivery = Promise.resolve();
|
|
1692
1797
|
session.onUserMessage((message) => {
|
|
1798
|
+
if (codexAccount$1.unavailable && codexAccount$1.profile) {
|
|
1799
|
+
if (message.localKey) session.sendQueueCancelReason([message.localKey], "failed");
|
|
1800
|
+
session.sendSessionEvent({ type: "message", message: codexAccount$1.notices[0] ?? `Account "${codexAccount$1.profile.label}" is unavailable.`, kind: "agent-profile-unavailable" });
|
|
1801
|
+
return;
|
|
1802
|
+
}
|
|
1693
1803
|
const downloads = session.drainAttachmentsForUserMessage();
|
|
1694
1804
|
userMessageDelivery = userMessageDelivery.then(async () => {
|
|
1695
1805
|
const attachments = await downloads;
|
|
@@ -1954,6 +2064,7 @@ async function runCodex(opts) {
|
|
|
1954
2064
|
process.stdin.setEncoding("utf8");
|
|
1955
2065
|
}
|
|
1956
2066
|
client$1 = new codexAppServerClient.CodexAppServerClient(sandboxConfig);
|
|
2067
|
+
client$1.setAccountOverrides(codexAccount$1.overrides);
|
|
1957
2068
|
const idleRelease = new CodexIdleReleaseTimer({
|
|
1958
2069
|
delayMs: resolveCodexIdleReleaseMs(process.env[CODEX_IDLE_RELEASE_ENV]),
|
|
1959
2070
|
isIdle: () => shouldReleaseIdleCodex({
|
|
@@ -2023,6 +2134,7 @@ async function runCodex(opts) {
|
|
|
2023
2134
|
if (failure) {
|
|
2024
2135
|
messageBuffer.addMessage(`Task failed: ${failure}`, "status");
|
|
2025
2136
|
session.sendSessionEvent({ type: "message", message: `Codex error: ${failure}` });
|
|
2137
|
+
noteAccountFailure(failure);
|
|
2026
2138
|
} else {
|
|
2027
2139
|
messageBuffer.addMessage("Task completed", "status");
|
|
2028
2140
|
}
|
|
@@ -2031,6 +2143,7 @@ async function runCodex(opts) {
|
|
|
2031
2143
|
if (failure) {
|
|
2032
2144
|
messageBuffer.addMessage(`Turn aborted: ${failure}`, "status");
|
|
2033
2145
|
session.sendSessionEvent({ type: "message", message: `Codex error: ${failure}` });
|
|
2146
|
+
noteAccountFailure(failure);
|
|
2034
2147
|
} else {
|
|
2035
2148
|
messageBuffer.addMessage("Turn aborted", "status");
|
|
2036
2149
|
}
|
|
@@ -2137,6 +2250,11 @@ async function runCodex(opts) {
|
|
|
2137
2250
|
logger.logger.debug("[Codex] config/read unavailable", safeCodexErrorMetadata(error));
|
|
2138
2251
|
}
|
|
2139
2252
|
machineDefaultModel = configured?.model ?? discoveredModels.find((model) => model.isDefault)?.model;
|
|
2253
|
+
const accountDefault = codexAccount.codexAccountDefaultModel(codexAccount$1, configured?.model ?? null, discoveredModels);
|
|
2254
|
+
if (codexAccount$1.profile && !codexAccount$1.unavailable) {
|
|
2255
|
+
machineDefaultModel = accountDefault;
|
|
2256
|
+
if (codexAccount$1.models?.length) discoveredModels = codexAccount.accountModelsAsCatalog(codexAccount$1.models, discoveredModels);
|
|
2257
|
+
}
|
|
2140
2258
|
if (discoveredModels.length > 0 || configured) {
|
|
2141
2259
|
session.updateMetadata((metadata2) => ({
|
|
2142
2260
|
...metadata2,
|
|
@@ -2149,22 +2267,30 @@ async function runCodex(opts) {
|
|
|
2149
2267
|
defaultReasoningEffort: model.defaultReasoningEffort
|
|
2150
2268
|
}))
|
|
2151
2269
|
} : {},
|
|
2152
|
-
defaultModelCode: configured?.model ?? discoveredModels.find((model) => model.isDefault)?.model,
|
|
2153
|
-
...configured ? { configuredModel: configured.model } : {}
|
|
2270
|
+
defaultModelCode: codexAccount$1.profile && !codexAccount$1.unavailable ? accountDefault : configured?.model ?? discoveredModels.find((model) => model.isDefault)?.model,
|
|
2271
|
+
...configured ? { configuredModel: codexAccount$1.profile && !codexAccount$1.unavailable ? accountDefault ?? null : configured.model } : {}
|
|
2154
2272
|
}));
|
|
2155
2273
|
}
|
|
2156
2274
|
} catch (error) {
|
|
2157
2275
|
logger.logger.debug("[Codex] Model discovery unavailable; using compatibility fallback", safeCodexErrorMetadata(error));
|
|
2158
2276
|
}
|
|
2159
|
-
if (opts.resumeThreadId) {
|
|
2160
|
-
|
|
2161
|
-
|
|
2162
|
-
|
|
2163
|
-
|
|
2164
|
-
|
|
2165
|
-
|
|
2166
|
-
|
|
2167
|
-
|
|
2277
|
+
if (opts.resumeThreadId && !codexAccount$1.unavailable) {
|
|
2278
|
+
try {
|
|
2279
|
+
await resumeExistingThread({
|
|
2280
|
+
client: client$1,
|
|
2281
|
+
session,
|
|
2282
|
+
messageBuffer,
|
|
2283
|
+
threadId: opts.resumeThreadId,
|
|
2284
|
+
cwd: process.cwd(),
|
|
2285
|
+
mcpServers,
|
|
2286
|
+
// B-850b: after an account switch the thread moves to the
|
|
2287
|
+
// new account's model (its old one is sticky otherwise).
|
|
2288
|
+
...accountSwitched && machineDefaultModel ? { model: machineDefaultModel } : {}
|
|
2289
|
+
});
|
|
2290
|
+
} catch (error) {
|
|
2291
|
+
noteAccountFailure(error instanceof Error ? error.message : String(error));
|
|
2292
|
+
throw error;
|
|
2293
|
+
}
|
|
2168
2294
|
first = false;
|
|
2169
2295
|
appendSystemPromptInjected = true;
|
|
2170
2296
|
}
|
|
@@ -2360,7 +2486,10 @@ async function runCodex(opts) {
|
|
|
2360
2486
|
}
|
|
2361
2487
|
if (!client$1.hasActiveThread()) {
|
|
2362
2488
|
const startedThread = await client$1.startThread({
|
|
2363
|
-
|
|
2489
|
+
// B-850b: a new thread on an account starts on the account's
|
|
2490
|
+
// model — Codex would otherwise pick config.toml's, which
|
|
2491
|
+
// belongs to the machine's own provider.
|
|
2492
|
+
model: turnModel ?? (codexAccount$1.profile && !codexAccount$1.unavailable ? machineDefaultModel : void 0),
|
|
2364
2493
|
cwd: process.cwd(),
|
|
2365
2494
|
approvalPolicy: executionPolicy.approvalPolicy,
|
|
2366
2495
|
sandbox: executionPolicy.sandbox,
|
|
@@ -2415,6 +2544,7 @@ async function runCodex(opts) {
|
|
|
2415
2544
|
if (reason) {
|
|
2416
2545
|
messageBuffer.addMessage(`Task failed: ${reason}`, "status");
|
|
2417
2546
|
session.sendSessionEvent({ type: "message", message: `Codex error: ${reason}` });
|
|
2547
|
+
noteAccountFailure(reason);
|
|
2418
2548
|
} else {
|
|
2419
2549
|
const tail = codexStderrTailOf(error);
|
|
2420
2550
|
messageBuffer.addMessage("Process exited unexpectedly", "status");
|
|
@@ -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-CepF8C5Z.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-SGCwRIV5.mjs';
|
|
3
3
|
import { O as OFFLINE_EXIT_STAMP_TIMEOUT_MS } from './sessionExitLifecycle-CzkLIgNZ.mjs';
|
|
4
4
|
|
|
5
5
|
class BaseReasoningProcessor {
|
|
@@ -112,7 +112,9 @@ async function forkCodexBeforeUserMessage(client, opts) {
|
|
|
112
112
|
throw new Error("Cannot safely rewind a user message inside an existing turn");
|
|
113
113
|
}
|
|
114
114
|
if (sourceCut.index === 0) return { type: "success", startFresh: true };
|
|
115
|
-
|
|
115
|
+
return forkThroughTurns(client, opts, (source.turns ?? []).slice(0, sourceCut.index));
|
|
116
|
+
}
|
|
117
|
+
async function forkThroughTurns(client, opts, kept) {
|
|
116
118
|
const expected = kept.map(firstItemId);
|
|
117
119
|
const forked = await client.forkThread({ threadId: opts.threadId, cwd: opts.cwd, lastTurnId: kept[kept.length - 1].id });
|
|
118
120
|
if (forked.threadId === opts.threadId) throw new Error("Codex did not create an independent fork");
|
|
@@ -125,8 +127,27 @@ async function forkCodexBeforeUserMessage(client, opts) {
|
|
|
125
127
|
}
|
|
126
128
|
return { type: "success", newCodexThreadId: forked.threadId };
|
|
127
129
|
}
|
|
130
|
+
function isUnfinishedTurn(turn) {
|
|
131
|
+
return turn?.status === "inProgress" || turn?.status === "interrupted";
|
|
132
|
+
}
|
|
133
|
+
async function forkCodexCompletedTurns(client, opts) {
|
|
134
|
+
const { thread: source } = await client.readThread({ threadId: opts.threadId, includeTurns: true });
|
|
135
|
+
const turns = source.turns ?? [];
|
|
136
|
+
const last = turns[turns.length - 1];
|
|
137
|
+
if (!isUnfinishedTurn(last)) {
|
|
138
|
+
return { ...await forkCodexThread(client, opts), excludedPrompts: [] };
|
|
139
|
+
}
|
|
140
|
+
const excludedPrompts = (last.items ?? []).flatMap((item) => {
|
|
141
|
+
const text = textFromUserItem(item);
|
|
142
|
+
return text ? [text] : [];
|
|
143
|
+
});
|
|
144
|
+
const kept = turns.slice(0, -1);
|
|
145
|
+
if (kept.length === 0) return { type: "success", startFresh: true, excludedPrompts };
|
|
146
|
+
return { ...await forkThroughTurns(client, opts, kept), excludedPrompts };
|
|
147
|
+
}
|
|
128
148
|
|
|
129
149
|
exports.CodexForkRewindPointNotFoundError = CodexForkRewindPointNotFoundError;
|
|
130
150
|
exports.forkCodexBeforeUserMessage = forkCodexBeforeUserMessage;
|
|
151
|
+
exports.forkCodexCompletedTurns = forkCodexCompletedTurns;
|
|
131
152
|
exports.forkCodexThread = forkCodexThread;
|
|
132
153
|
exports.listCodexRewindPoints = listCodexRewindPoints;
|
|
@@ -110,7 +110,9 @@ async function forkCodexBeforeUserMessage(client, opts) {
|
|
|
110
110
|
throw new Error("Cannot safely rewind a user message inside an existing turn");
|
|
111
111
|
}
|
|
112
112
|
if (sourceCut.index === 0) return { type: "success", startFresh: true };
|
|
113
|
-
|
|
113
|
+
return forkThroughTurns(client, opts, (source.turns ?? []).slice(0, sourceCut.index));
|
|
114
|
+
}
|
|
115
|
+
async function forkThroughTurns(client, opts, kept) {
|
|
114
116
|
const expected = kept.map(firstItemId);
|
|
115
117
|
const forked = await client.forkThread({ threadId: opts.threadId, cwd: opts.cwd, lastTurnId: kept[kept.length - 1].id });
|
|
116
118
|
if (forked.threadId === opts.threadId) throw new Error("Codex did not create an independent fork");
|
|
@@ -123,5 +125,23 @@ async function forkCodexBeforeUserMessage(client, opts) {
|
|
|
123
125
|
}
|
|
124
126
|
return { type: "success", newCodexThreadId: forked.threadId };
|
|
125
127
|
}
|
|
128
|
+
function isUnfinishedTurn(turn) {
|
|
129
|
+
return turn?.status === "inProgress" || turn?.status === "interrupted";
|
|
130
|
+
}
|
|
131
|
+
async function forkCodexCompletedTurns(client, opts) {
|
|
132
|
+
const { thread: source } = await client.readThread({ threadId: opts.threadId, includeTurns: true });
|
|
133
|
+
const turns = source.turns ?? [];
|
|
134
|
+
const last = turns[turns.length - 1];
|
|
135
|
+
if (!isUnfinishedTurn(last)) {
|
|
136
|
+
return { ...await forkCodexThread(client, opts), excludedPrompts: [] };
|
|
137
|
+
}
|
|
138
|
+
const excludedPrompts = (last.items ?? []).flatMap((item) => {
|
|
139
|
+
const text = textFromUserItem(item);
|
|
140
|
+
return text ? [text] : [];
|
|
141
|
+
});
|
|
142
|
+
const kept = turns.slice(0, -1);
|
|
143
|
+
if (kept.length === 0) return { type: "success", startFresh: true, excludedPrompts };
|
|
144
|
+
return { ...await forkThroughTurns(client, opts, kept), excludedPrompts };
|
|
145
|
+
}
|
|
126
146
|
|
|
127
|
-
export { CodexForkRewindPointNotFoundError as C,
|
|
147
|
+
export { CodexForkRewindPointNotFoundError as C, forkCodexCompletedTurns as a, forkCodexBeforeUserMessage as b, forkCodexThread as f, listCodexRewindPoints as l };
|
|
@@ -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-SGCwRIV5.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-rTcdHkhE.mjs';
|
|
10
10
|
import 'node:fs';
|
|
11
11
|
import 'node:os';
|
|
12
12
|
import 'node:path';
|
|
13
|
-
import './package-
|
|
13
|
+
import './package-Q_ELj5DL.mjs';
|
|
14
14
|
import 'node:fs/promises';
|
|
15
15
|
import './trimIdent-BAjmv_TG.mjs';
|
|
16
16
|
|
|
@@ -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-CepF8C5Z.cjs');
|
|
8
8
|
var constants = require('./constants-VJ0N6WuG.cjs');
|
|
9
9
|
require('chalk');
|
|
10
10
|
require('node:util');
|
|
11
|
-
require('./configuration-
|
|
11
|
+
require('./configuration-2Pbg3a0H.cjs');
|
|
12
12
|
require('node:fs');
|
|
13
13
|
require('node:os');
|
|
14
14
|
require('node:path');
|
|
15
|
-
require('./package-
|
|
15
|
+
require('./package-C7WgesIw.cjs');
|
|
16
16
|
require('node:fs/promises');
|
|
17
17
|
require('./trimIdent-4gvk9Wk6.cjs');
|
|
18
18
|
|
|
@@ -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-C7WgesIw.cjs');
|
|
7
7
|
var promises = require('node:fs/promises');
|
|
8
8
|
|
|
9
9
|
const PRIVATE_DIRECTORY_MODE = 448;
|
|
@@ -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-Q_ELj5DL.mjs';
|
|
5
5
|
import { mkdir, chmod, writeFile } from 'node:fs/promises';
|
|
6
6
|
|
|
7
7
|
const PRIVATE_DIRECTORY_MODE = 448;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import chalk from 'chalk';
|
|
2
2
|
import { homedir } from 'os';
|
|
3
3
|
import { join } from 'path';
|
|
4
|
-
import { b as readCredentialsForConfiguredRelay } from './persistence-
|
|
5
|
-
import { A as ApiClient } from './api-
|
|
6
|
-
import { f as ensurePrivateDirectorySync, w as writePrivateFileSync } from './configuration-
|
|
4
|
+
import { b as readCredentialsForConfiguredRelay } from './persistence-mr4Y484W.mjs';
|
|
5
|
+
import { A as ApiClient } from './api-aE60mNjs.mjs';
|
|
6
|
+
import { f as ensurePrivateDirectorySync, w as writePrivateFileSync } from './configuration-rTcdHkhE.mjs';
|
|
7
7
|
import { createServer } from 'http';
|
|
8
8
|
import { randomBytes, createHash } from 'crypto';
|
|
9
|
-
import { o as openBrowser } from './browser-
|
|
9
|
+
import { o as openBrowser } from './browser-CFfZM3yg.mjs';
|
|
10
10
|
import { exec } from 'child_process';
|
|
11
11
|
import { promisify } from 'util';
|
|
12
12
|
import 'node:fs/promises';
|
|
@@ -15,29 +15,29 @@ import 'zod';
|
|
|
15
15
|
import './authRelay-DhQhkBvX.mjs';
|
|
16
16
|
import 'node:crypto';
|
|
17
17
|
import 'tweetnacl';
|
|
18
|
-
import './logger-
|
|
18
|
+
import './logger-SGCwRIV5.mjs';
|
|
19
19
|
import 'node:util';
|
|
20
20
|
import 'node:path';
|
|
21
21
|
import 'axios';
|
|
22
|
-
import './lidState-
|
|
22
|
+
import './lidState-zy20u7T3.mjs';
|
|
23
23
|
import 'node:events';
|
|
24
24
|
import 'socket.io-client';
|
|
25
|
-
import './pushNotifications-
|
|
26
|
-
import './index-
|
|
25
|
+
import './pushNotifications-DjEl8G0a.mjs';
|
|
26
|
+
import './index-D1YnIih6.mjs';
|
|
27
27
|
import '@paralleldrive/cuid2';
|
|
28
28
|
import './contentLogMetadata-BlWI0egu.mjs';
|
|
29
29
|
import './limits-DIo7rEBR.mjs';
|
|
30
|
-
import './time-
|
|
31
|
-
import './registerCommonHandlers-
|
|
30
|
+
import './time-0Ru4clBD.mjs';
|
|
31
|
+
import './registerCommonHandlers-CND00Dpj.mjs';
|
|
32
32
|
import 'fs/promises';
|
|
33
33
|
import 'cross-spawn';
|
|
34
34
|
import './projectPath-BTBIMB57.mjs';
|
|
35
35
|
import 'url';
|
|
36
|
-
import './sync-
|
|
36
|
+
import './sync-DVcNkv8e.mjs';
|
|
37
37
|
import './backgroundTaskActivity-8PdPxrvy.mjs';
|
|
38
|
-
import './controlClient-
|
|
38
|
+
import './controlClient-BIdGnYBo.mjs';
|
|
39
39
|
import 'node:os';
|
|
40
|
-
import './package-
|
|
40
|
+
import './package-Q_ELj5DL.mjs';
|
|
41
41
|
import 'open';
|
|
42
42
|
|
|
43
43
|
const CLIENT_ID$2 = "app_EMoamEEZ73f0CkXaXp7hrann";
|