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
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
var node_child_process = require('node:child_process');
|
|
4
4
|
var spawn = require('cross-spawn');
|
|
5
5
|
var node_readline = require('node:readline');
|
|
6
|
-
var logger = require('./logger-
|
|
6
|
+
var logger = require('./logger-CepF8C5Z.cjs');
|
|
7
7
|
var contentLogMetadata = require('./contentLogMetadata-ZSFk_NjQ.cjs');
|
|
8
8
|
var manager = require('./manager-HrEj442o.cjs');
|
|
9
|
-
var _package = require('./package-
|
|
10
|
-
var rateLimitWindows = require('./rateLimitWindows-
|
|
9
|
+
var _package = require('./package-C7WgesIw.cjs');
|
|
10
|
+
var rateLimitWindows = require('./rateLimitWindows-B9PERFm1.cjs');
|
|
11
11
|
var processTree = require('./processTree-CMHWlVse.cjs');
|
|
12
12
|
|
|
13
13
|
const CODEX_HELPER_LABEL_MAX_CHARS = 80;
|
|
@@ -197,6 +197,15 @@ class CodexAppServerClient {
|
|
|
197
197
|
rateLimitReadAt = 0;
|
|
198
198
|
rateLimitReadInFlight = false;
|
|
199
199
|
rateLimitReadUnsupported = false;
|
|
200
|
+
/**
|
|
201
|
+
* B-850b: the session's account (agentProfiles/codexWrapperAccount.ts) —
|
|
202
|
+
* env for the app-server (a ChatGPT account's CODEX_HOME overlay) and the
|
|
203
|
+
* provider every thread runs on. Kept across idle-release respawns.
|
|
204
|
+
*/
|
|
205
|
+
accountOverrides = { env: {} };
|
|
206
|
+
setAccountOverrides(overrides) {
|
|
207
|
+
this.accountOverrides = overrides;
|
|
208
|
+
}
|
|
200
209
|
constructor(sandboxConfig) {
|
|
201
210
|
this.sandboxConfig = sandboxConfig;
|
|
202
211
|
}
|
|
@@ -562,6 +571,7 @@ class CodexAppServerClient {
|
|
|
562
571
|
if (this.sandboxEnabled) {
|
|
563
572
|
env.CODEX_SANDBOX = "seatbelt";
|
|
564
573
|
}
|
|
574
|
+
Object.assign(env, this.accountOverrides.env);
|
|
565
575
|
logger.logger.debug(`[CodexAppServer] Spawning: ${command} ${args.join(" ")}`);
|
|
566
576
|
const epoch = ++this.processEpoch;
|
|
567
577
|
const proc = spawn.spawn(command, args, {
|
|
@@ -732,7 +742,8 @@ ${text}`.slice(-400);
|
|
|
732
742
|
}
|
|
733
743
|
}
|
|
734
744
|
buildThreadConfig(mcpServers) {
|
|
735
|
-
|
|
745
|
+
const config = { ...mcpServers ? { mcp_servers: mcpServers } : {}, ...this.accountOverrides.config };
|
|
746
|
+
return Object.keys(config).length > 0 ? config : null;
|
|
736
747
|
}
|
|
737
748
|
rememberThreadDefaults(opts) {
|
|
738
749
|
this.threadDefaults = {
|
|
@@ -748,7 +759,7 @@ ${text}`.slice(-400);
|
|
|
748
759
|
await this.ensureConnected();
|
|
749
760
|
const params = {
|
|
750
761
|
model: opts.model ?? null,
|
|
751
|
-
modelProvider: null,
|
|
762
|
+
modelProvider: this.accountOverrides.modelProvider ?? null,
|
|
752
763
|
profile: null,
|
|
753
764
|
cwd: opts.cwd ?? process.cwd(),
|
|
754
765
|
approvalPolicy: opts.approvalPolicy ?? null,
|
|
@@ -779,7 +790,7 @@ ${text}`.slice(-400);
|
|
|
779
790
|
const params = {
|
|
780
791
|
threadId,
|
|
781
792
|
model: opts?.model ?? defaults.model ?? null,
|
|
782
|
-
modelProvider: null,
|
|
793
|
+
modelProvider: this.accountOverrides.modelProvider ?? null,
|
|
783
794
|
cwd: opts?.cwd ?? defaults.cwd ?? process.cwd(),
|
|
784
795
|
approvalPolicy: opts?.approvalPolicy ?? defaults.approvalPolicy ?? null,
|
|
785
796
|
sandbox: opts?.sandbox ?? defaults.sandbox ?? null,
|
|
@@ -808,7 +819,7 @@ ${text}`.slice(-400);
|
|
|
808
819
|
const params = {
|
|
809
820
|
threadId: opts.threadId,
|
|
810
821
|
model: opts.model ?? defaults.model ?? null,
|
|
811
|
-
modelProvider: null,
|
|
822
|
+
modelProvider: this.accountOverrides.modelProvider ?? null,
|
|
812
823
|
cwd: opts.cwd ?? defaults.cwd ?? process.cwd(),
|
|
813
824
|
approvalPolicy: opts.approvalPolicy ?? defaults.approvalPolicy ?? null,
|
|
814
825
|
sandbox: opts.sandbox ?? defaults.sandbox ?? null,
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { execSync } from 'node:child_process';
|
|
2
2
|
import { spawn } from 'cross-spawn';
|
|
3
3
|
import { createInterface } from 'node:readline';
|
|
4
|
-
import { l as logger } from './logger-
|
|
4
|
+
import { l as logger } from './logger-SGCwRIV5.mjs';
|
|
5
5
|
import { e as errorLogMetadata, c as contentLogMetadata } from './contentLogMetadata-BlWI0egu.mjs';
|
|
6
6
|
import { i as initializeSandbox, w as wrapForMcpTransport } from './manager-BEsI4qt3.mjs';
|
|
7
|
-
import { p as packageJson } from './package-
|
|
8
|
-
import { s as shouldReadCodexRateLimits, i as isUnsupportedCodexMethodError } from './rateLimitWindows-
|
|
7
|
+
import { p as packageJson } from './package-Q_ELj5DL.mjs';
|
|
8
|
+
import { s as shouldReadCodexRateLimits, i as isUnsupportedCodexMethodError } from './rateLimitWindows-a2yE3kCv.mjs';
|
|
9
9
|
import { s as stopProcessGracefully, k as killProcessTree } from './processTree-CP5IvQ2Z.mjs';
|
|
10
10
|
|
|
11
11
|
const CODEX_HELPER_LABEL_MAX_CHARS = 80;
|
|
@@ -195,6 +195,15 @@ class CodexAppServerClient {
|
|
|
195
195
|
rateLimitReadAt = 0;
|
|
196
196
|
rateLimitReadInFlight = false;
|
|
197
197
|
rateLimitReadUnsupported = false;
|
|
198
|
+
/**
|
|
199
|
+
* B-850b: the session's account (agentProfiles/codexWrapperAccount.ts) —
|
|
200
|
+
* env for the app-server (a ChatGPT account's CODEX_HOME overlay) and the
|
|
201
|
+
* provider every thread runs on. Kept across idle-release respawns.
|
|
202
|
+
*/
|
|
203
|
+
accountOverrides = { env: {} };
|
|
204
|
+
setAccountOverrides(overrides) {
|
|
205
|
+
this.accountOverrides = overrides;
|
|
206
|
+
}
|
|
198
207
|
constructor(sandboxConfig) {
|
|
199
208
|
this.sandboxConfig = sandboxConfig;
|
|
200
209
|
}
|
|
@@ -560,6 +569,7 @@ class CodexAppServerClient {
|
|
|
560
569
|
if (this.sandboxEnabled) {
|
|
561
570
|
env.CODEX_SANDBOX = "seatbelt";
|
|
562
571
|
}
|
|
572
|
+
Object.assign(env, this.accountOverrides.env);
|
|
563
573
|
logger.debug(`[CodexAppServer] Spawning: ${command} ${args.join(" ")}`);
|
|
564
574
|
const epoch = ++this.processEpoch;
|
|
565
575
|
const proc = spawn(command, args, {
|
|
@@ -730,7 +740,8 @@ ${text}`.slice(-400);
|
|
|
730
740
|
}
|
|
731
741
|
}
|
|
732
742
|
buildThreadConfig(mcpServers) {
|
|
733
|
-
|
|
743
|
+
const config = { ...mcpServers ? { mcp_servers: mcpServers } : {}, ...this.accountOverrides.config };
|
|
744
|
+
return Object.keys(config).length > 0 ? config : null;
|
|
734
745
|
}
|
|
735
746
|
rememberThreadDefaults(opts) {
|
|
736
747
|
this.threadDefaults = {
|
|
@@ -746,7 +757,7 @@ ${text}`.slice(-400);
|
|
|
746
757
|
await this.ensureConnected();
|
|
747
758
|
const params = {
|
|
748
759
|
model: opts.model ?? null,
|
|
749
|
-
modelProvider: null,
|
|
760
|
+
modelProvider: this.accountOverrides.modelProvider ?? null,
|
|
750
761
|
profile: null,
|
|
751
762
|
cwd: opts.cwd ?? process.cwd(),
|
|
752
763
|
approvalPolicy: opts.approvalPolicy ?? null,
|
|
@@ -777,7 +788,7 @@ ${text}`.slice(-400);
|
|
|
777
788
|
const params = {
|
|
778
789
|
threadId,
|
|
779
790
|
model: opts?.model ?? defaults.model ?? null,
|
|
780
|
-
modelProvider: null,
|
|
791
|
+
modelProvider: this.accountOverrides.modelProvider ?? null,
|
|
781
792
|
cwd: opts?.cwd ?? defaults.cwd ?? process.cwd(),
|
|
782
793
|
approvalPolicy: opts?.approvalPolicy ?? defaults.approvalPolicy ?? null,
|
|
783
794
|
sandbox: opts?.sandbox ?? defaults.sandbox ?? null,
|
|
@@ -806,7 +817,7 @@ ${text}`.slice(-400);
|
|
|
806
817
|
const params = {
|
|
807
818
|
threadId: opts.threadId,
|
|
808
819
|
model: opts.model ?? defaults.model ?? null,
|
|
809
|
-
modelProvider: null,
|
|
820
|
+
modelProvider: this.accountOverrides.modelProvider ?? null,
|
|
810
821
|
cwd: opts.cwd ?? defaults.cwd ?? process.cwd(),
|
|
811
822
|
approvalPolicy: opts.approvalPolicy ?? defaults.approvalPolicy ?? null,
|
|
812
823
|
sandbox: opts.sandbox ?? defaults.sandbox ?? null,
|
|
@@ -1,108 +1,112 @@
|
|
|
1
|
-
import { a as authAndSetupMachineIfNeeded } from './auth-
|
|
2
|
-
import { k as createEnvelope,
|
|
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-CWO6cQ4G.mjs';
|
|
2
|
+
import { k as createEnvelope, w as BUILTIN_TODO_DISCOVERY, r as restoredEffort, o as readEffortIntent, Q 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 } from './index-D1YnIih6.mjs';
|
|
3
|
+
import { a as recordRunIntents, w as withoutEffort, r as registerRunIntentRpc, b as DEFAULT_CODEX_PERMISSION_MODE } from './defaultPermissionMode-DF5AfeBb.mjs';
|
|
4
|
+
import { h as hashObject, s as startHappyServer, c as createProjectInjector } from './deterministicJson-DFwJ57jR.mjs';
|
|
5
|
+
import { s as sharedProjectsClient } from './client-Cbxr9VUE.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-aE60mNjs.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-C2ymY_-w.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-dbi4JPhP.mjs';
|
|
15
15
|
import React, { useState, useRef, useEffect, useCallback } from 'react';
|
|
16
|
-
import { C as CodexAppServerClient } from './codexAppServerClient-
|
|
17
|
-
import { w as wrapperRateLimitReporter } from './rateLimitReporter-
|
|
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-HKAm8f_D.mjs';
|
|
17
|
+
import { w as wrapperRateLimitReporter } from './rateLimitReporter-B_PZClib.mjs';
|
|
18
|
+
import { l as logger } from './logger-SGCwRIV5.mjs';
|
|
19
|
+
import { B as BasePermissionHandler } from './BasePermissionHandler-D2pNcAXn.mjs';
|
|
20
|
+
import { B as BaseReasoningProcessor, s as settleCodexSession } from './codexTermination-DxLR-bb5.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-mr4Y484W.mjs';
|
|
23
|
+
import { g as getInitialMachineMetadata } from './machineMetadata-ClJfd7ay.mjs';
|
|
24
|
+
import { c as configuration } from './configuration-rTcdHkhE.mjs';
|
|
25
|
+
import { M as MessageQueue2, r as registerKillSessionHandler } from './registerKillSessionHandler-CwyHwm_n.mjs';
|
|
26
26
|
import { p as projectPath } from './projectPath-BTBIMB57.mjs';
|
|
27
|
-
import { join } from 'node:path';
|
|
28
|
-
import { c as createSessionMetadata } from './createSessionMetadata-
|
|
27
|
+
import { dirname, join } from 'node:path';
|
|
28
|
+
import { c as createSessionMetadata } from './createSessionMetadata-PrN-dT7K.mjs';
|
|
29
29
|
import { M as MessageBuffer } from './sessionExitLifecycle-CzkLIgNZ.mjs';
|
|
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-
|
|
30
|
+
import { n as notifyDaemonSessionStarted, o as reportSessionEditToDaemon, c as checkDaemonHibernation } from './controlClient-BIdGnYBo.mjs';
|
|
31
|
+
import { c as createSessionForStartup, b as HibernationExitLatch, H as HibernationProbe, a as commitHibernation } from './startupSessionCreate-BnEPBxsJ.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-BrljmbqX.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 { a as
|
|
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-Vej_738f.mjs';
|
|
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-NOX5pmQf.mjs';
|
|
42
|
+
import { s as shouldRecordSpawnAccount, u as unavailableNotice } from './wrapperAccount-BkufO_9g.mjs';
|
|
43
|
+
import { a as extractNoSandboxFlag, e as ensureDaemonRunning } from './ensureDaemonRunning-B6Y-CMWe.mjs';
|
|
40
44
|
import 'tweetnacl';
|
|
41
45
|
import 'axios';
|
|
42
|
-
import './time-
|
|
43
|
-
import './browser-
|
|
46
|
+
import './time-0Ru4clBD.mjs';
|
|
47
|
+
import './browser-CFfZM3yg.mjs';
|
|
44
48
|
import 'open';
|
|
45
49
|
import 'zod';
|
|
46
50
|
import './prompt-QHuFx9j6.mjs';
|
|
47
|
-
import './reportProgressTool-
|
|
48
|
-
import './client-
|
|
51
|
+
import './reportProgressTool-DTKlUlHv.mjs';
|
|
52
|
+
import './client-OjYRPhZs.mjs';
|
|
49
53
|
import './precheckCompat-DeEbilbr.mjs';
|
|
50
54
|
import './agentGuidance-BDYt2Qy2.mjs';
|
|
51
|
-
import 'node:fs';
|
|
52
55
|
import 'node:os';
|
|
53
56
|
import './pi-CqyoZMjI.mjs';
|
|
54
57
|
import './fileStore-5qpetZS0.mjs';
|
|
55
|
-
import './client-
|
|
58
|
+
import './client-DS5JEsHs.mjs';
|
|
56
59
|
import 'node:util';
|
|
57
|
-
import './context-
|
|
58
|
-
import './sessionOps-
|
|
60
|
+
import './context-C7QarZMk.mjs';
|
|
61
|
+
import './sessionOps-C9wRmCBg.mjs';
|
|
59
62
|
import 'socket.io-client';
|
|
60
63
|
import './backgroundTaskActivity-8PdPxrvy.mjs';
|
|
61
64
|
import './resources-CLP_MpK4.mjs';
|
|
62
|
-
import './tools-
|
|
63
|
-
import './peerTools-
|
|
65
|
+
import './tools-DqA2Jt2R.mjs';
|
|
66
|
+
import './peerTools-DUg9RduG.mjs';
|
|
64
67
|
import './ids-DU6sLx4C.mjs';
|
|
65
|
-
import './remoteSessionClient-
|
|
68
|
+
import './remoteSessionClient-mIr_9OL_.mjs';
|
|
66
69
|
import '@modelcontextprotocol/sdk/server/mcp.js';
|
|
67
70
|
import 'node:http';
|
|
68
71
|
import '@modelcontextprotocol/sdk/server/streamableHttp.js';
|
|
69
72
|
import './limits-DIo7rEBR.mjs';
|
|
70
|
-
import './downloadTarget-
|
|
73
|
+
import './downloadTarget-CVPBZMnY.mjs';
|
|
71
74
|
import './terminals-Dlg0x3nY.mjs';
|
|
72
75
|
import './terminalTitleSuggest-CeKsX_V6.mjs';
|
|
73
76
|
import './tmuxSocket-B8Yx20sT.mjs';
|
|
74
|
-
import './bootstrap-
|
|
75
|
-
import './package-
|
|
77
|
+
import './bootstrap-CiWwfHB2.mjs';
|
|
78
|
+
import './package-Q_ELj5DL.mjs';
|
|
76
79
|
import './webPanels-B2_C2-3g.mjs';
|
|
77
|
-
import './pushNotifications-
|
|
80
|
+
import './pushNotifications-DjEl8G0a.mjs';
|
|
78
81
|
import './contentLogMetadata-BlWI0egu.mjs';
|
|
79
82
|
import './previewPath-CXN4Vag0.mjs';
|
|
80
83
|
import 'crypto';
|
|
81
|
-
import './lidState-
|
|
84
|
+
import './lidState-zy20u7T3.mjs';
|
|
82
85
|
import 'os';
|
|
83
86
|
import 'child_process';
|
|
84
87
|
import 'node:events';
|
|
85
|
-
import './registerCommonHandlers-
|
|
88
|
+
import './registerCommonHandlers-CND00Dpj.mjs';
|
|
86
89
|
import 'util';
|
|
87
90
|
import 'fs/promises';
|
|
88
91
|
import 'path';
|
|
89
92
|
import 'cross-spawn';
|
|
90
|
-
import './sync-
|
|
93
|
+
import './sync-DVcNkv8e.mjs';
|
|
91
94
|
import 'chalk';
|
|
92
95
|
import './cliUpdate-Y34VGe9Y.mjs';
|
|
93
96
|
import './processTreeSnapshot-CuLJDNC-.mjs';
|
|
94
97
|
import 'node:readline';
|
|
95
98
|
import './manager-BEsI4qt3.mjs';
|
|
96
99
|
import '@anthropic-ai/sandbox-runtime';
|
|
97
|
-
import './rateLimitWindows-
|
|
100
|
+
import './rateLimitWindows-a2yE3kCv.mjs';
|
|
98
101
|
import './processTree-CP5IvQ2Z.mjs';
|
|
99
102
|
import './detectCLI-CSGMlV51.mjs';
|
|
100
103
|
import 'fs';
|
|
101
|
-
import './localHappyAgentAuth-
|
|
104
|
+
import './localHappyAgentAuth-CBsX08VJ.mjs';
|
|
102
105
|
import './fsMkdir-DumgLTzR.mjs';
|
|
103
106
|
import './types-CkqAACXx.mjs';
|
|
104
107
|
import 'url';
|
|
105
|
-
import './
|
|
108
|
+
import './claudeAccountEnv-BL1pR_37.mjs';
|
|
109
|
+
import './spawnHappyCLI-BA1bTIiO.mjs';
|
|
106
110
|
import './doctorReadiness-C208SMN9.mjs';
|
|
107
111
|
|
|
108
112
|
function getStartedSubagents(state) {
|
|
@@ -1184,7 +1188,8 @@ async function resumeExistingThread(opts) {
|
|
|
1184
1188
|
const resumedThread = await opts.client.resumeThread({
|
|
1185
1189
|
threadId: opts.threadId,
|
|
1186
1190
|
cwd: opts.cwd,
|
|
1187
|
-
mcpServers: opts.mcpServers
|
|
1191
|
+
mcpServers: opts.mcpServers,
|
|
1192
|
+
...opts.model ? { model: opts.model } : {}
|
|
1188
1193
|
});
|
|
1189
1194
|
opts.session.updateMetadata((currentMetadata) => ({
|
|
1190
1195
|
...currentMetadata,
|
|
@@ -1462,6 +1467,70 @@ function codexPublishablePermissionMode(mode) {
|
|
|
1462
1467
|
return typeof mode === "string" && CODEX_REMOTE_PERMISSION_MODES.includes(mode) ? mode : null;
|
|
1463
1468
|
}
|
|
1464
1469
|
|
|
1470
|
+
const MACHINE_CODEX_ACCOUNT = { profile: null, overrides: { env: {} }, unavailable: false, notices: [], cleanup: () => {
|
|
1471
|
+
} };
|
|
1472
|
+
function loadCodexWrapperAccount(happyHome, sessionId, spawnAccountId, env = process.env, now = Date.now()) {
|
|
1473
|
+
let bindings = readSessionBindings(happyHome);
|
|
1474
|
+
if (shouldRecordSpawnAccount(spawnAccountId, sessionId in bindings)) {
|
|
1475
|
+
writeSessionBinding(happyHome, sessionId, { account: spawnAccountId });
|
|
1476
|
+
bindings = { ...bindings, [sessionId]: { account: spawnAccountId } };
|
|
1477
|
+
}
|
|
1478
|
+
const probe = defaultSecretProbe(env);
|
|
1479
|
+
const resolution = resolveCodexAccount(sessionId, {
|
|
1480
|
+
home: happyHome,
|
|
1481
|
+
accounts: readAccounts(happyHome),
|
|
1482
|
+
bindings,
|
|
1483
|
+
providers: readCodexProviders(env),
|
|
1484
|
+
fileReadable: probe.fileReadable,
|
|
1485
|
+
env,
|
|
1486
|
+
nodePath: process.execPath,
|
|
1487
|
+
envKeyCopyPath: (id) => join(happyHome, "tmp", "accounts", `key-${process.pid}-${id}`)
|
|
1488
|
+
});
|
|
1489
|
+
if (resolution.kind === "machine") return MACHINE_CODEX_ACCOUNT;
|
|
1490
|
+
let cleanup = () => {
|
|
1491
|
+
};
|
|
1492
|
+
if (resolution.kind === "active" && resolution.envKeyCopy) {
|
|
1493
|
+
const { name, path } = resolution.envKeyCopy;
|
|
1494
|
+
mkdirSync(dirname(path), { recursive: true, mode: 448 });
|
|
1495
|
+
writeFileSync(path, (env[name] ?? "").trim() + "\n", { mode: 384 });
|
|
1496
|
+
chmodSync(path, 384);
|
|
1497
|
+
cleanup = () => rmSync(path, { force: true });
|
|
1498
|
+
}
|
|
1499
|
+
for (const key of resolution.unset) delete env[key];
|
|
1500
|
+
if (resolution.kind === "active" && resolution.envKeyCopy) delete env[resolution.envKeyCopy.name];
|
|
1501
|
+
if (resolution.kind === "unavailable") {
|
|
1502
|
+
return { profile: resolution.profile, overrides: { env: {} }, unavailable: true, notices: [unavailableNotice(resolution.profile)], cleanup };
|
|
1503
|
+
}
|
|
1504
|
+
const overrides = { env: {}, modelProvider: resolution.modelProvider, ...resolution.config ? { config: resolution.config } : {} };
|
|
1505
|
+
if (resolution.codexHome) {
|
|
1506
|
+
syncCodexOverlay(resolution.codexHome, baseCodexHome(env), now);
|
|
1507
|
+
overrides.env.CODEX_HOME = resolution.codexHome;
|
|
1508
|
+
}
|
|
1509
|
+
return {
|
|
1510
|
+
profile: resolution.profile,
|
|
1511
|
+
overrides,
|
|
1512
|
+
...resolution.pinnedModel ? { pinnedModel: resolution.pinnedModel } : {},
|
|
1513
|
+
...resolution.models ? { models: resolution.models } : {},
|
|
1514
|
+
unavailable: false,
|
|
1515
|
+
notices: [],
|
|
1516
|
+
cleanup
|
|
1517
|
+
};
|
|
1518
|
+
}
|
|
1519
|
+
function markCodexAccountRejected(happyHome, accountId, now = Date.now()) {
|
|
1520
|
+
try {
|
|
1521
|
+
const file = readAccountsFileV2(happyHome);
|
|
1522
|
+
const record = file.accounts[accountId];
|
|
1523
|
+
if (!record || record.agent !== "codex") return null;
|
|
1524
|
+
const status = record.kind === "codex-chatgpt" ? "expired" : "invalid";
|
|
1525
|
+
if (record.check?.status === status) return status;
|
|
1526
|
+
record.check = { status, at: now, detail: "rejected during a session" };
|
|
1527
|
+
writeAccountsFile(happyHome, file);
|
|
1528
|
+
return status;
|
|
1529
|
+
} catch {
|
|
1530
|
+
return null;
|
|
1531
|
+
}
|
|
1532
|
+
}
|
|
1533
|
+
|
|
1465
1534
|
const DEFAULT_CODEX_MODEL = void 0;
|
|
1466
1535
|
const DEFAULT_CODEX_EFFORT = "medium";
|
|
1467
1536
|
async function runCodex(opts) {
|
|
@@ -1478,6 +1547,8 @@ async function runCodex(opts) {
|
|
|
1478
1547
|
console.error(" \x1B[36mvery-happy claude\x1B[0m\n");
|
|
1479
1548
|
process.exit(1);
|
|
1480
1549
|
}
|
|
1550
|
+
const spawnAccountId = process.env[SPAWN_ACCOUNT_ENV] || void 0;
|
|
1551
|
+
delete process.env[SPAWN_ACCOUNT_ENV];
|
|
1481
1552
|
const sessionTag = randomUUID();
|
|
1482
1553
|
connectionState.setBackend("Codex");
|
|
1483
1554
|
const api = await ApiClient.create(opts.credentials);
|
|
@@ -1506,7 +1577,7 @@ async function runCodex(opts) {
|
|
|
1506
1577
|
dangerouslySkipPermissions: initialPermissionMode === "yolo" || initialPermissionMode === "bypassPermissions",
|
|
1507
1578
|
...forkedFromSessionId ? { parentSessionId: forkedFromSessionId } : {},
|
|
1508
1579
|
...forkedFromMessageId ? { forkedFromMessageId } : {},
|
|
1509
|
-
capabilities: [PROMPT_QUEUE_CAPABILITY, FORK_BACKFILL_CAPABILITY, HIBERNATION_CAPABILITY, AUTO_RESTART_CAPABILITY, CODEX_STEER_CAPABILITY, PROJECT_SESSION_CAPABILITY, CODEX_COMPACT_CAPABILITY, RUN_INTENT_CAPABILITY]
|
|
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]
|
|
1510
1581
|
});
|
|
1511
1582
|
metadata.attachmentKinds = [...CLAUDE_ATTACHMENT_KINDS];
|
|
1512
1583
|
metadata.stickyModel = null;
|
|
@@ -1568,6 +1639,21 @@ async function runCodex(opts) {
|
|
|
1568
1639
|
}
|
|
1569
1640
|
}
|
|
1570
1641
|
const resumedEffort = reconnectSeeded && response ? restoredEffort(response.metadata, { useReportedLevel: true }) : void 0;
|
|
1642
|
+
let codexAccount = MACHINE_CODEX_ACCOUNT;
|
|
1643
|
+
if (response) {
|
|
1644
|
+
try {
|
|
1645
|
+
codexAccount = loadCodexWrapperAccount(configuration.happyHomeDir, response.id, spawnAccountId);
|
|
1646
|
+
} catch (error) {
|
|
1647
|
+
const reason = error instanceof Error ? error.message : String(error);
|
|
1648
|
+
logger.debug(`[START] B-850b account resolution failed: ${reason}`);
|
|
1649
|
+
if (spawnAccountId) {
|
|
1650
|
+
codexAccount = { ...MACHINE_CODEX_ACCOUNT, profile: { id: spawnAccountId, label: spawnAccountId, kind: "unknown", status: "unavailable", reason: "error" }, unavailable: true, notices: [`Account "${spawnAccountId}" could not be loaded: ${reason}`] };
|
|
1651
|
+
}
|
|
1652
|
+
}
|
|
1653
|
+
}
|
|
1654
|
+
const accountSwitched = !!reconnectSessionId && reconnectSeeded && !!response && codexAccountSwitched(response.metadata?.agentProfile, codexAccount.profile);
|
|
1655
|
+
if (accountSwitched && !codexAccount.profile) codexAccount = { ...codexAccount, overrides: { env: {}, modelProvider: readCodexDefaultProvider() } };
|
|
1656
|
+
logger.debug(`[START] B-850b account: ${codexAccount.profile ? `${codexAccount.profile.id} ${codexAccount.profile.kind} ${codexAccount.profile.status}` : "machine login"}${accountSwitched ? " (switched)" : ""}`);
|
|
1571
1657
|
let session;
|
|
1572
1658
|
let permissionHandler;
|
|
1573
1659
|
let client;
|
|
@@ -1596,6 +1682,25 @@ async function runCodex(opts) {
|
|
|
1596
1682
|
if (!wakingFromHibernation) void session.cancelUndeliveredQueuedInputs(reconnectReplay ? { maxSeq: reconnectReplay.seq } : void 0);
|
|
1597
1683
|
session.updateMetadata((meta) => mergeReconnectMetadata(meta, metadata, Date.now()));
|
|
1598
1684
|
}
|
|
1685
|
+
session.updateMetadata((current) => ({
|
|
1686
|
+
...current,
|
|
1687
|
+
agentProfile: codexAccount.profile,
|
|
1688
|
+
...accountSwitched ? { stickyModel: null, modelIntent: null } : {}
|
|
1689
|
+
}));
|
|
1690
|
+
for (const notice of codexAccount.notices) {
|
|
1691
|
+
session.sendSessionEvent({ type: "message", message: notice, kind: codexAccount.unavailable ? "agent-profile-unavailable" : "agent-profile-warning" });
|
|
1692
|
+
}
|
|
1693
|
+
let historyRejectionReported = false;
|
|
1694
|
+
const noteAccountFailure = (text) => {
|
|
1695
|
+
if (!codexAccount.profile || codexAccount.unavailable) return;
|
|
1696
|
+
if (accountSwitched && !historyRejectionReported && isHistoryRejectedError(text)) {
|
|
1697
|
+
historyRejectionReported = true;
|
|
1698
|
+
session.sendSessionEvent({ type: "message", message: `This conversation's history cannot continue on account "${codexAccount.profile.label}". Start a new session on it, or switch back to the previous account.`, kind: "agent-profile-history-rejected" });
|
|
1699
|
+
} else if (isCodexAuthRejection(text)) {
|
|
1700
|
+
const marked = markCodexAccountRejected(configuration.happyHomeDir, codexAccount.profile.id);
|
|
1701
|
+
if (marked) session.sendSessionEvent({ type: "message", message: `Account "${codexAccount.profile.label}" was rejected (${marked}). Sign in again or switch accounts.`, kind: "agent-profile-auth-failed" });
|
|
1702
|
+
}
|
|
1703
|
+
};
|
|
1599
1704
|
if (response) {
|
|
1600
1705
|
try {
|
|
1601
1706
|
logger.debug(`[START] Reporting session ${response.id} to daemon`);
|
|
@@ -1688,6 +1793,11 @@ async function runCodex(opts) {
|
|
|
1688
1793
|
};
|
|
1689
1794
|
let userMessageDelivery = Promise.resolve();
|
|
1690
1795
|
session.onUserMessage((message) => {
|
|
1796
|
+
if (codexAccount.unavailable && codexAccount.profile) {
|
|
1797
|
+
if (message.localKey) session.sendQueueCancelReason([message.localKey], "failed");
|
|
1798
|
+
session.sendSessionEvent({ type: "message", message: codexAccount.notices[0] ?? `Account "${codexAccount.profile.label}" is unavailable.`, kind: "agent-profile-unavailable" });
|
|
1799
|
+
return;
|
|
1800
|
+
}
|
|
1691
1801
|
const downloads = session.drainAttachmentsForUserMessage();
|
|
1692
1802
|
userMessageDelivery = userMessageDelivery.then(async () => {
|
|
1693
1803
|
const attachments = await downloads;
|
|
@@ -1952,6 +2062,7 @@ async function runCodex(opts) {
|
|
|
1952
2062
|
process.stdin.setEncoding("utf8");
|
|
1953
2063
|
}
|
|
1954
2064
|
client = new CodexAppServerClient(sandboxConfig);
|
|
2065
|
+
client.setAccountOverrides(codexAccount.overrides);
|
|
1955
2066
|
const idleRelease = new CodexIdleReleaseTimer({
|
|
1956
2067
|
delayMs: resolveCodexIdleReleaseMs(process.env[CODEX_IDLE_RELEASE_ENV]),
|
|
1957
2068
|
isIdle: () => shouldReleaseIdleCodex({
|
|
@@ -2021,6 +2132,7 @@ async function runCodex(opts) {
|
|
|
2021
2132
|
if (failure) {
|
|
2022
2133
|
messageBuffer.addMessage(`Task failed: ${failure}`, "status");
|
|
2023
2134
|
session.sendSessionEvent({ type: "message", message: `Codex error: ${failure}` });
|
|
2135
|
+
noteAccountFailure(failure);
|
|
2024
2136
|
} else {
|
|
2025
2137
|
messageBuffer.addMessage("Task completed", "status");
|
|
2026
2138
|
}
|
|
@@ -2029,6 +2141,7 @@ async function runCodex(opts) {
|
|
|
2029
2141
|
if (failure) {
|
|
2030
2142
|
messageBuffer.addMessage(`Turn aborted: ${failure}`, "status");
|
|
2031
2143
|
session.sendSessionEvent({ type: "message", message: `Codex error: ${failure}` });
|
|
2144
|
+
noteAccountFailure(failure);
|
|
2032
2145
|
} else {
|
|
2033
2146
|
messageBuffer.addMessage("Turn aborted", "status");
|
|
2034
2147
|
}
|
|
@@ -2135,6 +2248,11 @@ async function runCodex(opts) {
|
|
|
2135
2248
|
logger.debug("[Codex] config/read unavailable", safeCodexErrorMetadata(error));
|
|
2136
2249
|
}
|
|
2137
2250
|
machineDefaultModel = configured?.model ?? discoveredModels.find((model) => model.isDefault)?.model;
|
|
2251
|
+
const accountDefault = codexAccountDefaultModel(codexAccount, configured?.model ?? null, discoveredModels);
|
|
2252
|
+
if (codexAccount.profile && !codexAccount.unavailable) {
|
|
2253
|
+
machineDefaultModel = accountDefault;
|
|
2254
|
+
if (codexAccount.models?.length) discoveredModels = accountModelsAsCatalog(codexAccount.models, discoveredModels);
|
|
2255
|
+
}
|
|
2138
2256
|
if (discoveredModels.length > 0 || configured) {
|
|
2139
2257
|
session.updateMetadata((metadata2) => ({
|
|
2140
2258
|
...metadata2,
|
|
@@ -2147,22 +2265,30 @@ async function runCodex(opts) {
|
|
|
2147
2265
|
defaultReasoningEffort: model.defaultReasoningEffort
|
|
2148
2266
|
}))
|
|
2149
2267
|
} : {},
|
|
2150
|
-
defaultModelCode: configured?.model ?? discoveredModels.find((model) => model.isDefault)?.model,
|
|
2151
|
-
...configured ? { configuredModel: configured.model } : {}
|
|
2268
|
+
defaultModelCode: codexAccount.profile && !codexAccount.unavailable ? accountDefault : configured?.model ?? discoveredModels.find((model) => model.isDefault)?.model,
|
|
2269
|
+
...configured ? { configuredModel: codexAccount.profile && !codexAccount.unavailable ? accountDefault ?? null : configured.model } : {}
|
|
2152
2270
|
}));
|
|
2153
2271
|
}
|
|
2154
2272
|
} catch (error) {
|
|
2155
2273
|
logger.debug("[Codex] Model discovery unavailable; using compatibility fallback", safeCodexErrorMetadata(error));
|
|
2156
2274
|
}
|
|
2157
|
-
if (opts.resumeThreadId) {
|
|
2158
|
-
|
|
2159
|
-
|
|
2160
|
-
|
|
2161
|
-
|
|
2162
|
-
|
|
2163
|
-
|
|
2164
|
-
|
|
2165
|
-
|
|
2275
|
+
if (opts.resumeThreadId && !codexAccount.unavailable) {
|
|
2276
|
+
try {
|
|
2277
|
+
await resumeExistingThread({
|
|
2278
|
+
client,
|
|
2279
|
+
session,
|
|
2280
|
+
messageBuffer,
|
|
2281
|
+
threadId: opts.resumeThreadId,
|
|
2282
|
+
cwd: process.cwd(),
|
|
2283
|
+
mcpServers,
|
|
2284
|
+
// B-850b: after an account switch the thread moves to the
|
|
2285
|
+
// new account's model (its old one is sticky otherwise).
|
|
2286
|
+
...accountSwitched && machineDefaultModel ? { model: machineDefaultModel } : {}
|
|
2287
|
+
});
|
|
2288
|
+
} catch (error) {
|
|
2289
|
+
noteAccountFailure(error instanceof Error ? error.message : String(error));
|
|
2290
|
+
throw error;
|
|
2291
|
+
}
|
|
2166
2292
|
first = false;
|
|
2167
2293
|
appendSystemPromptInjected = true;
|
|
2168
2294
|
}
|
|
@@ -2358,7 +2484,10 @@ async function runCodex(opts) {
|
|
|
2358
2484
|
}
|
|
2359
2485
|
if (!client.hasActiveThread()) {
|
|
2360
2486
|
const startedThread = await client.startThread({
|
|
2361
|
-
|
|
2487
|
+
// B-850b: a new thread on an account starts on the account's
|
|
2488
|
+
// model — Codex would otherwise pick config.toml's, which
|
|
2489
|
+
// belongs to the machine's own provider.
|
|
2490
|
+
model: turnModel ?? (codexAccount.profile && !codexAccount.unavailable ? machineDefaultModel : void 0),
|
|
2362
2491
|
cwd: process.cwd(),
|
|
2363
2492
|
approvalPolicy: executionPolicy.approvalPolicy,
|
|
2364
2493
|
sandbox: executionPolicy.sandbox,
|
|
@@ -2413,6 +2542,7 @@ async function runCodex(opts) {
|
|
|
2413
2542
|
if (reason) {
|
|
2414
2543
|
messageBuffer.addMessage(`Task failed: ${reason}`, "status");
|
|
2415
2544
|
session.sendSessionEvent({ type: "message", message: `Codex error: ${reason}` });
|
|
2545
|
+
noteAccountFailure(reason);
|
|
2416
2546
|
} else {
|
|
2417
2547
|
const tail = codexStderrTailOf(error);
|
|
2418
2548
|
messageBuffer.addMessage("Process exited unexpectedly", "status");
|