very-happy-cli 0.2.192 → 0.2.193
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-B4PwjqHt.mjs} +3 -3
- package/dist/{AcpBackend-BQO4ShOy.cjs → AcpBackend-DtJCgftG.cjs} +3 -3
- package/dist/{AcpSessionManager-G0xD6Jbq.mjs → AcpSessionManager-BzKWgkdP.mjs} +2 -2
- package/dist/{AcpSessionManager-LlUMmcpB.cjs → AcpSessionManager-D4qshX_H.cjs} +2 -2
- package/dist/{BasePermissionHandler-N6Ip3tFt.cjs → BasePermissionHandler-5iG-cvA2.cjs} +1 -1
- package/dist/{BasePermissionHandler-BmTIg376.mjs → BasePermissionHandler-DV6UM6e9.mjs} +1 -1
- package/dist/{account-CCVT-HO_.mjs → account-Dco_nGT4.mjs} +84 -27
- package/dist/{account-DtaouikP.cjs → account-DvpA60oU.cjs} +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-BnHDk5eD.cjs → acpSessionResume-Bk9mjXZ9.cjs} +1 -1
- package/dist/{acpSessionResume-BWEUxNtC.mjs → acpSessionResume-TQwN9ZZE.mjs} +1 -1
- package/dist/{agentHome-B0VnjkZW.mjs → agentHome-Bep8semY.mjs} +4 -4
- package/dist/{agentHome-CqQ29YY7.cjs → agentHome-c2dlgcw1.cjs} +4 -4
- package/dist/{api-hMDsC6Wg.cjs → api-CBE_a88I.cjs} +10 -10
- package/dist/{api-_LeBScjg.mjs → api-DUfunY3x.mjs} +10 -10
- package/dist/{apiMachine-CqW2m6Zr.cjs → apiMachine-BqtG0IWm.cjs} +19 -18
- package/dist/{apiMachine-CgRldeJ6.mjs → apiMachine-CU_bw5nV.mjs} +19 -18
- package/dist/{attachmentContent-BEeT2J5n.cjs → attachmentContent-B3AzuYqk.cjs} +2 -2
- package/dist/{attachmentContent-CyptLIfq.mjs → attachmentContent-KNIZxwlu.mjs} +2 -2
- package/dist/{auth-CFQikywl.mjs → auth-CZ7pKS-j.mjs} +8 -8
- package/dist/{auth-C9NvNHhL.cjs → auth-DCjxpI6Z.cjs} +5 -5
- package/dist/{auth-CA1OClsW.cjs → auth-SJ_dPw7H.cjs} +8 -8
- package/dist/{auth-DL8_J9vu.mjs → auth-jN5dNqTO.mjs} +5 -5
- package/dist/{auto-uQOxlxLp.cjs → auto-B_59RYH1.cjs} +23 -21
- package/dist/{auto-CKI05w1D.mjs → auto-DC0Sq-qB.mjs} +23 -21
- package/dist/{bootstrap-DaZ0Np7X.mjs → bootstrap-B3gMpU9e.mjs} +2 -2
- package/dist/{bootstrap-DsZGc69k.cjs → bootstrap-CoJu9VnB.cjs} +2 -2
- package/dist/{browser-BUIaSHK2.mjs → browser-LHW2hBH8.mjs} +1 -1
- package/dist/{browser-Ft0ASDm7.cjs → browser-v1pdPP1E.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-BZUgA5G2.mjs} +5 -5
- package/dist/{claudeLocal-BMf9t4Fa.cjs → claudeLocal-BrzM2RBI.cjs} +5 -5
- package/dist/{claudeLocalLauncher-Bp8bqF4y.mjs → claudeLocalLauncher-A0AQyHFi.mjs} +10 -10
- package/dist/{claudeLocalLauncher-C8TeJcfF.cjs → claudeLocalLauncher-XAMpXUM7.cjs} +10 -10
- package/dist/{claudeSessionFork-YiktY55n.cjs → claudeSessionFork-Mhn2fYe_.cjs} +1 -1
- package/dist/{claudeSessionFork-8AA47z8Y.mjs → claudeSessionFork-_GwIlmMB.mjs} +1 -1
- package/dist/{client-Cxlp_D4I.mjs → client-7RnI9J0W.mjs} +2 -2
- package/dist/{client-Bm4oKvW7.mjs → client-Bde4QVIn.mjs} +4 -2
- package/dist/{client-D8XROyZc.cjs → client-CJr8Pjwm.cjs} +4 -2
- package/dist/{client-Crh8_cNx.cjs → client-D2GWkd-T.cjs} +2 -2
- package/dist/{client-CFHZfh9x.cjs → client-DLlnmAPL.cjs} +4 -4
- package/dist/{client-BmPaBnDK.mjs → client-DwbhrX6D.mjs} +4 -4
- 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-BWJbLCQn.mjs → codexAppServerClient-B3QJV6Ey.mjs} +18 -7
- package/dist/{codexAppServerClient-q8GHQhyC.cjs → codexAppServerClient-DWEsZUC4.cjs} +18 -7
- package/dist/{codexCommand-BgpGg-Zy.cjs → codexCommand-Bg8AmxVm.cjs} +187 -57
- package/dist/{codexCommand-BfXfRQr4.mjs → codexCommand-D1xlj4sT.mjs} +188 -58
- package/dist/{codexTermination-CVUF0X75.cjs → codexTermination-ByX9GcEJ.cjs} +1 -1
- package/dist/{codexTermination-s9fd1gkA.mjs → codexTermination-CaWAVQjZ.mjs} +1 -1
- package/dist/{config-BAjyTyYp.cjs → config-B2GGbiTv.cjs} +3 -3
- package/dist/{config-BF8XgLyc.mjs → config-C2XYEwXz.mjs} +3 -3
- package/dist/{configuration-CXEVKAyF.cjs → configuration-BBK0rmmj.cjs} +1 -1
- package/dist/{configuration-IhRiLDVe.mjs → configuration-ThKBP_zY.mjs} +1 -1
- package/dist/{connect-LZh1gr08.mjs → connect-BirnCl9q.mjs} +13 -13
- package/dist/{connect-rCS56arw.cjs → connect-C3tZs_NC.cjs} +13 -13
- package/dist/{context-DO6F5YwH.mjs → context-C0EFLnOg.mjs} +1 -1
- package/dist/{context-3_S_mWz9.cjs → context-wDp0aZBK.cjs} +1 -1
- package/dist/{controlClient-8ILulwjc.mjs → controlClient-Ckl8N1MS.mjs} +3 -3
- package/dist/{controlClient-j7p5p3_7.cjs → controlClient-DwWTns3A.cjs} +3 -3
- package/dist/{createSessionMetadata-DwdD_uVo.cjs → createSessionMetadata-DqZ6h02H.cjs} +2 -2
- package/dist/{createSessionMetadata-oyaTZm1b.mjs → createSessionMetadata-vug4Cv8z.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-BzX94gi3.mjs} +13 -13
- package/dist/{deterministicJson-DUN0v3St.cjs → deterministicJson-t33SsuRC.cjs} +13 -13
- package/dist/{doctor-FgUYTbAT.cjs → doctor-B9ug1LZb.cjs} +7 -7
- package/dist/{doctor-B_UwMcVT.mjs → doctor-C1zyOSXw.mjs} +7 -7
- package/dist/{downloadTarget-C0d6jRx-.mjs → downloadTarget-Baslc6jW.mjs} +6 -6
- package/dist/{downloadTarget-BrrQEDxg.cjs → downloadTarget-T1id2Gh6.cjs} +6 -6
- package/dist/{ensureDaemonRunning-KUMFfIil.mjs → ensureDaemonRunning-C6ERYK-O.mjs} +5 -5
- package/dist/{ensureDaemonRunning-Cq4FYI5Q.cjs → ensureDaemonRunning-CoAg11Zi.cjs} +5 -5
- package/dist/{handleResumeCommand-BGhVo3QH.mjs → handleResumeCommand-CrlqDuz7.mjs} +5 -5
- package/dist/{handleResumeCommand-Cl9GIL5F.cjs → handleResumeCommand-DPi-sPm7.cjs} +5 -5
- package/dist/{index-CZaLMmPC.cjs → index-B1swQJUS.cjs} +4 -4
- package/dist/{index-CQ_hLLCj.cjs → index-B2dJA8VG.cjs} +3 -3
- package/dist/{index-BzAYnYct.cjs → index-BUFrKZeQ.cjs} +198 -108
- package/dist/{index-JQDyJ3Li.mjs → index-BbdV2mzy.mjs} +3 -3
- package/dist/{index-BjXjMhGY.mjs → index-BcSPg3c5.mjs} +4 -4
- package/dist/{index-D8ODb0_U.cjs → index-Bkslzin5.cjs} +42 -42
- package/dist/{index-v5EmjT8l.mjs → index-Cn73rdtQ.mjs} +4 -4
- package/dist/{index-DYD3GM1m.mjs → index-D1YnIih6.mjs} +195 -109
- package/dist/{index-Ca1Tt96A.mjs → index-fZO4nF6e.mjs} +43 -43
- package/dist/{index-CRipkiqo.cjs → index-rocrvOYG.cjs} +4 -4
- package/dist/index.cjs +2 -2
- package/dist/index.mjs +2 -2
- package/dist/{install-ClUA9tbC.cjs → install-CArXjPfW.cjs} +3 -3
- package/dist/{install-D6EHRtAN.mjs → install-CChhyV2G.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-CZOXXdzv.mjs → lidState-B6yYKjNK.mjs} +1 -1
- package/dist/{lidState-DqoN7zH4.cjs → lidState-B_v6qgfE.cjs} +1 -1
- package/dist/{localHappyAgentAuth-YHxDZ4x4.mjs → localHappyAgentAuth-KRlg_aI0.mjs} +1 -1
- package/dist/{localHappyAgentAuth-BnGCpHRX.cjs → localHappyAgentAuth-jJH0n67S.cjs} +1 -1
- package/dist/{logger-8su64lqR.cjs → logger-CX3x2eI4.cjs} +2 -2
- package/dist/{logger-Fd_rNvgd.mjs → logger-JV7-4Q_6.mjs} +2 -2
- package/dist/{machineMetadata-1HIIC7Bc.mjs → machineMetadata-D5-SW9kv.mjs} +3 -3
- package/dist/{machineMetadata-DYXt3p6u.cjs → machineMetadata-DhZuM0iB.cjs} +3 -3
- package/dist/{main-C_GrcYkn.cjs → main-1x1HGQEy.cjs} +47 -47
- package/dist/{main-BI6GIzUL.mjs → main-CFOdXbPD.mjs} +47 -47
- package/dist/{mcp-BycIv9oQ.cjs → mcp-BnKBSEh7.cjs} +18 -18
- package/dist/{mcp-XGoxywno.mjs → mcp-R6lMcFLO.mjs} +18 -18
- package/dist/{mirrorProtocol-DXT3rv7T.mjs → mirrorProtocol-CD4ntuZJ.mjs} +3 -3
- package/dist/{mirrorProtocol-DVnB8EO8.cjs → mirrorProtocol-DO-KtvAL.cjs} +3 -3
- package/dist/{package-6KkRAops.mjs → package-Bw3H6VLn.mjs} +7 -7
- package/dist/{package-iuLlSiSF.cjs → package-uzlvxa5S.cjs} +7 -7
- package/dist/{panels-B5Di2zb2.mjs → panels-BamhZCoZ.mjs} +5 -5
- package/dist/{panels-0C89q0Tu.cjs → panels-C46FxjmH.cjs} +5 -5
- package/dist/{peerTools-CANTX_mG.cjs → peerTools-D-VNNFw-.cjs} +5 -5
- package/dist/{peerTools-CKJ-IDM4.mjs → peerTools-WtRgTSqG.mjs} +5 -5
- package/dist/{persistence-DWcHe035.mjs → persistence-Cg4sfjQV.mjs} +2 -2
- package/dist/{persistence-B4ttN-fR.cjs → persistence-CsmAgN-C.cjs} +2 -2
- package/dist/{piRunnerArgs-Bl5GpBoN.mjs → piRunnerArgs-BbaAQvb4.mjs} +1 -1
- package/dist/{piRunnerArgs-BOkfxyak.cjs → piRunnerArgs-vnFygygF.cjs} +1 -1
- package/dist/{piRuntime-BhwxzdQf.mjs → piRuntime-Bid7TBf5.mjs} +1 -1
- package/dist/{piRuntime-DzrIiZU8.cjs → piRuntime-C2uj5Ucx.cjs} +1 -1
- package/dist/{piTerminal-BdS7ol7v.cjs → piTerminal-Ckpjfoqa.cjs} +20 -20
- package/dist/{piTerminal-DnA2CbGr.mjs → piTerminal-CqxgrI13.mjs} +20 -20
- package/dist/{pushNotifications-BqFoLye2.cjs → pushNotifications-BCg7YAiu.cjs} +3 -3
- package/dist/{pushNotifications-DkQ0yvFs.mjs → pushNotifications-BbE-qV9I.mjs} +3 -3
- package/dist/{query-BRJYSkb1.mjs → query-Bfr9O_62.mjs} +1 -1
- package/dist/{query-BQ4br3yn.cjs → query-vQ-HG394.cjs} +1 -1
- package/dist/{rateLimitReporter-DK5SQuCc.cjs → rateLimitReporter-BZ8x0-6-.cjs} +3 -3
- package/dist/{rateLimitReporter-BRbYkmuP.mjs → rateLimitReporter-CAz7VMw4.mjs} +3 -3
- package/dist/{rateLimitWindows-DBfiuYeg.cjs → rateLimitWindows-BZl6GMwQ.cjs} +1 -1
- package/dist/{rateLimitWindows-Da5AR-4u.mjs → rateLimitWindows-CRARnKaI.mjs} +1 -1
- package/dist/{registerCommonHandlers-m6pxxf2J.cjs → registerCommonHandlers-CZGmrPbT.cjs} +2 -2
- package/dist/{registerCommonHandlers-yQ7Ru-l0.mjs → registerCommonHandlers-Cj3Nl9y-.mjs} +2 -2
- package/dist/{registerKillSessionHandler-BDNpi7YO.mjs → registerKillSessionHandler-Bg9t45Ub.mjs} +6 -6
- package/dist/{registerKillSessionHandler-BAOIa_Fs.cjs → registerKillSessionHandler-C3EDnW4F.cjs} +6 -6
- package/dist/{remoteSessionClient-CZ7aaNgj.mjs → remoteSessionClient--0vfA7I5.mjs} +5 -5
- package/dist/{remoteSessionClient-iJMXRN_D.cjs → remoteSessionClient-CcSP24Zq.cjs} +5 -5
- package/dist/{reportProgressTool-DfQhPu0s.mjs → reportProgressTool-DVru7jc_.mjs} +3 -3
- package/dist/{reportProgressTool-DpFs7pSe.cjs → reportProgressTool-Ddg1yVq2.cjs} +3 -3
- package/dist/{run-p-xp1_HY.cjs → run-BTrIT_jU.cjs} +178 -847
- package/dist/{run-CwN28mcj.mjs → run-HtvH6BLi.mjs} +176 -845
- package/dist/{runClaude-DRKtAGTm.mjs → runClaude-DsHTk5Bu.mjs} +25 -25
- package/dist/{runClaude-D6U1Z575.cjs → runClaude-ipjwAHPI.cjs} +25 -25
- package/dist/{runClaudeDeps-Dkofokgb.cjs → runClaudeDeps-BKpwL6ln.cjs} +41 -41
- package/dist/{runClaudeDeps-BheVcIlD.mjs → runClaudeDeps-BV3vpeyY.mjs} +46 -46
- package/dist/{runGemini-C8q3YCc0.cjs → runGemini-B-G0_7Ab.cjs} +33 -33
- package/dist/{runGemini-owbvhFbi.mjs → runGemini-DhjK6_Fp.mjs} +33 -33
- package/dist/{runOpenClaw-Dky3-mjO.mjs → runOpenClaw-B6lawk8n.mjs} +18 -18
- package/dist/{runOpenClaw-DGeN66-t.cjs → runOpenClaw-BHIo8tkn.cjs} +18 -18
- package/dist/{sandbox-D2CPyoCA.cjs → sandbox-BAsO0ILe.cjs} +4 -4
- package/dist/{sandbox-sq_wy9Gl.mjs → sandbox-CKb7pCXg.mjs} +4 -4
- package/dist/selfCheck-CZ-t1Xzq.mjs +88 -0
- package/dist/{selfCheck-BgLvQKSt.cjs → selfCheck-D4VvVZNi.cjs} +39 -39
- package/dist/{send-Cd10YhXh.cjs → send-Cz5m39QR.cjs} +8 -8
- package/dist/{send-K9vg-8t-.mjs → send-D8ipLKMY.mjs} +8 -8
- package/dist/{server-De4W1zuK.mjs → server-CjvgT3N9.mjs} +4 -4
- package/dist/{server-DRrV64r0.cjs → server-CySyJKPH.cjs} +6 -6
- package/dist/{sessionLock-Dl6i7IgA.mjs → sessionLock-B73fhgQN.mjs} +3 -3
- package/dist/{sessionLock-BDtSzzKS.cjs → sessionLock-DdDCuNUs.cjs} +3 -3
- package/dist/{sessionOps-gU88-W9F.mjs → sessionOps-C65Iej_C.mjs} +50 -8
- package/dist/{sessionOps-DvnEH4PL.cjs → sessionOps-XSEjIqNq.cjs} +50 -8
- package/dist/{sessionProvider-CKcIo7KO.mjs → sessionProvider-CLVNkfji.mjs} +11 -9
- package/dist/{sessionProvider-CbSZeZrl.cjs → sessionProvider-Dgsty8z_.cjs} +11 -9
- package/dist/{sessionScanner-7RtcCeyD.cjs → sessionScanner-D8IVXMMH.cjs} +3 -3
- package/dist/{sessionScanner-DR32uSby.mjs → sessionScanner-MW1P9Pm9.mjs} +3 -3
- package/dist/{sessions-BvuMjgvJ.cjs → sessions-BKz7gZqg.cjs} +10 -10
- package/dist/{sessions-DTt2Eguk.mjs → sessions-Dtk_agUL.mjs} +10 -10
- package/dist/{setupOfflineReconnection-BGnvhRfb.mjs → setupOfflineReconnection-Bvdy-2xd.mjs} +2 -2
- package/dist/{setupOfflineReconnection-DduOsw6p.cjs → setupOfflineReconnection-DxMiW7OV.cjs} +2 -2
- package/dist/{spawn-DMB6rRPA.cjs → spawn-DiPkJcrQ.cjs} +26 -16
- package/dist/{spawn-CL3cUc7b.mjs → spawn-Dm4xsZBX.mjs} +26 -16
- package/dist/{spawnAgents-CClb7buD.cjs → spawnAgents-B9olJ8xn.cjs} +1 -1
- package/dist/{spawnAgents-CRMfOJhh.mjs → spawnAgents-I29H9nO8.mjs} +1 -1
- package/dist/{spawnHappyCLI-DJdhX_Qx.cjs → spawnHappyCLI-BYGOUda1.cjs} +1 -1
- package/dist/{spawnHappyCLI-Cj_6IICe.mjs → spawnHappyCLI-CnMwzjWX.mjs} +1 -1
- package/dist/{startFileWatcher-LnOmVW6H.cjs → startFileWatcher-D14W6gn-.cjs} +1 -1
- package/dist/{startFileWatcher-DikVa8kg.mjs → startFileWatcher-DePAY1T5.mjs} +1 -1
- package/dist/{startupSessionCreate-CDdaLaMq.mjs → startupSessionCreate-DoK0IvJG.mjs} +3 -3
- package/dist/{startupSessionCreate-B3ND-917.cjs → startupSessionCreate-rBHd4tc1.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-JoEZKRo8.mjs → sync-BP6vnxVP.mjs} +1 -1
- package/dist/{sync-_2lsZ1U2.cjs → sync-WYBwkJvG.cjs} +1 -1
- package/dist/{systemPrompt-CJEvNCuW.cjs → systemPrompt-BkQlCk5_.cjs} +2 -2
- package/dist/{systemPrompt-Zq4HyrZ5.mjs → systemPrompt-aRqBmkpw.mjs} +2 -2
- package/dist/{teams-qz4LqKJ2.mjs → teams-CGmC4ygu.mjs} +7 -7
- package/dist/{teams-BNZafnrT.cjs → teams-phbpwAGD.cjs} +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-CaUlWSNJ.cjs → time-BTLcO8jp.cjs} +1 -1
- package/dist/{time-bzmet4s5.mjs → time-Cw0liIqB.mjs} +1 -1
- package/dist/{titleGenerator-BuIIu_JP.cjs → titleGenerator-Y1_7ceJC.cjs} +3 -3
- package/dist/{titleGenerator-CbTtJ_1D.mjs → titleGenerator-h6TmFe-c.mjs} +2 -2
- package/dist/{todo-CQ_BTf9C.cjs → todo-BxiPiCvB.cjs} +6 -6
- package/dist/{todo-DIrVF_Ak.mjs → todo-OKcTC_VC.mjs} +6 -6
- package/dist/{tools-cLOjBvPn.mjs → tools-BR-drXZ8.mjs} +3 -2
- package/dist/{tools-BnmmFZji.cjs → tools-CcebYtLj.cjs} +3 -2
- package/dist/{uninstall-uEEGKB84.cjs → uninstall-CnDeCC-M.cjs} +3 -3
- package/dist/{uninstall-C5OuW6dE.mjs → uninstall-D3stWKD2.mjs} +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,21 +1,21 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var spawnAgents = require('./spawnAgents-
|
|
4
|
-
var client = require('./client-
|
|
3
|
+
var spawnAgents = require('./spawnAgents-B9olJ8xn.cjs');
|
|
4
|
+
var client = require('./client-CJr8Pjwm.cjs');
|
|
5
5
|
var chalk = require('chalk');
|
|
6
6
|
var node_fs = require('node:fs');
|
|
7
7
|
var path$1 = require('node:path');
|
|
8
|
-
var controlClient = require('./controlClient-
|
|
9
|
-
var persistence = require('./persistence-
|
|
10
|
-
var index = require('./index-
|
|
11
|
-
var configuration = require('./configuration-
|
|
8
|
+
var controlClient = require('./controlClient-DwWTns3A.cjs');
|
|
9
|
+
var persistence = require('./persistence-CsmAgN-C.cjs');
|
|
10
|
+
var index = require('./index-BUFrKZeQ.cjs');
|
|
11
|
+
var configuration = require('./configuration-BBK0rmmj.cjs');
|
|
12
12
|
var path = require('./path-B7zW-WwE.cjs');
|
|
13
|
-
var claudeSessionFork = require('./claudeSessionFork-
|
|
14
|
-
var codexAppServerClient = require('./codexAppServerClient-
|
|
13
|
+
var claudeSessionFork = require('./claudeSessionFork-Mhn2fYe_.cjs');
|
|
14
|
+
var codexAppServerClient = require('./codexAppServerClient-DWEsZUC4.cjs');
|
|
15
15
|
var codexThreadFork = require('./codexThreadFork-5kwoKjMu.cjs');
|
|
16
|
-
var sessionOps = require('./sessionOps-
|
|
17
|
-
var createSessionMetadata = require('./createSessionMetadata-
|
|
18
|
-
var logger = require('./logger-
|
|
16
|
+
var sessionOps = require('./sessionOps-XSEjIqNq.cjs');
|
|
17
|
+
var createSessionMetadata = require('./createSessionMetadata-DqZ6h02H.cjs');
|
|
18
|
+
var logger = require('./logger-CX3x2eI4.cjs');
|
|
19
19
|
var forkBackfill = require('./forkBackfill-8eLDeS73.cjs');
|
|
20
20
|
require('node:fs/promises');
|
|
21
21
|
require('zod');
|
|
@@ -24,17 +24,17 @@ require('node:crypto');
|
|
|
24
24
|
require('tweetnacl');
|
|
25
25
|
require('@paralleldrive/cuid2');
|
|
26
26
|
require('node:os');
|
|
27
|
-
require('./package-
|
|
27
|
+
require('./package-uzlvxa5S.cjs');
|
|
28
28
|
require('node:readline');
|
|
29
29
|
require('node:child_process');
|
|
30
30
|
require('cross-spawn');
|
|
31
31
|
require('./contentLogMetadata-ZSFk_NjQ.cjs');
|
|
32
32
|
require('./manager-HrEj442o.cjs');
|
|
33
33
|
require('@anthropic-ai/sandbox-runtime');
|
|
34
|
-
require('./rateLimitWindows-
|
|
34
|
+
require('./rateLimitWindows-BZl6GMwQ.cjs');
|
|
35
35
|
require('./processTree-CMHWlVse.cjs');
|
|
36
36
|
require('axios');
|
|
37
|
-
require('./time-
|
|
37
|
+
require('./time-BTLcO8jp.cjs');
|
|
38
38
|
require('./specialCommands-J3JFOq0J.cjs');
|
|
39
39
|
require('socket.io-client');
|
|
40
40
|
require('./backgroundTaskActivity-CBvUdj39.cjs');
|
|
@@ -224,7 +224,7 @@ ${chalk.bold("Options:")}
|
|
|
224
224
|
machine runs (claude: newest Opus; codex: newest
|
|
225
225
|
sol its Codex lists; gemini: newest pro), else the
|
|
226
226
|
machine default. 'default' = the machine default.
|
|
227
|
-
--account <id> Claude account on this machine (\`very-happy account
|
|
227
|
+
--account <id> Claude / Codex account on this machine (\`very-happy account
|
|
228
228
|
list\`); 'machine' = the machine's own login.
|
|
229
229
|
Default = the machine's default account, if set. A
|
|
230
230
|
missing or expired account fails the spawn.
|
|
@@ -379,6 +379,16 @@ async function handleSpawnCommand(args) {
|
|
|
379
379
|
process.exit(1);
|
|
380
380
|
}
|
|
381
381
|
}
|
|
382
|
+
let accountChoice = options.account ? options.account === "machine" ? null : options.account : void 0;
|
|
383
|
+
if (accountChoice === void 0 && options.project && !forkSource) {
|
|
384
|
+
try {
|
|
385
|
+
const defaults = await client.sharedProjectsClient().defaults(options.project);
|
|
386
|
+
const machineId = (await persistence.readSettings()).machineId;
|
|
387
|
+
if (machineId) accountChoice = index.resolveLaunchAgentProfile({ project: defaults.agentProfiles, agent: agent ?? "claude", machineId }).agentProfileId;
|
|
388
|
+
} catch (error) {
|
|
389
|
+
console.error(chalk.dim(`(project ${options.project}: defaults unavailable \u2014 using the machine default account: ${error instanceof Error ? error.message : String(error)})`));
|
|
390
|
+
}
|
|
391
|
+
}
|
|
382
392
|
logger.logger.debug(`[SPAWN CMD] Spawning session in ${directory}${forkSource ? ` (fork of ${forkSource.parentSessionId})` : ""}`);
|
|
383
393
|
const result = await controlClient.spawnDaemonSession(directory, void 0, {
|
|
384
394
|
spawnedBy: options.spawnedBy,
|
|
@@ -391,7 +401,7 @@ async function handleSpawnCommand(args) {
|
|
|
391
401
|
environmentVariables: spawnEnvironmentVariables(options.env, prompt !== void 0),
|
|
392
402
|
...resumeIds,
|
|
393
403
|
...forkSource ? { parentSessionId: forkSource.parentSessionId } : {},
|
|
394
|
-
...
|
|
404
|
+
...accountChoice !== void 0 ? { agentProfileId: accountChoice } : {}
|
|
395
405
|
});
|
|
396
406
|
if (result?.error || !result?.success || !result?.sessionId) {
|
|
397
407
|
const message = result?.error || "Daemon returned no session ID";
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { r as resolveSpawnPermissionMode, c as chooseProject, j as joinProject, a as resolveFirstMessageMeta, w as waitsForModelCatalog, s as sanitizeSpawnPermissionMode, A as ALLOWED_SPAWN_PERMISSION_MODES, S as SPAWN_AGENTS } from './spawnAgents-
|
|
2
|
-
import { s as sharedProjectsClient } from './client-
|
|
1
|
+
import { r as resolveSpawnPermissionMode, c as chooseProject, j as joinProject, a as resolveFirstMessageMeta, w as waitsForModelCatalog, s as sanitizeSpawnPermissionMode, A as ALLOWED_SPAWN_PERMISSION_MODES, S as SPAWN_AGENTS } from './spawnAgents-I29H9nO8.mjs';
|
|
2
|
+
import { s as sharedProjectsClient } from './client-Bde4QVIn.mjs';
|
|
3
3
|
import chalk from 'chalk';
|
|
4
4
|
import { readFileSync, statSync } from 'node:fs';
|
|
5
5
|
import { resolve } from 'node:path';
|
|
6
|
-
import { b as checkIfDaemonRunningAndCleanupStaleState, f as spawnDaemonSession, h as stopDaemonSession } from './controlClient-
|
|
7
|
-
import { c as readPersistedSessions } from './persistence-
|
|
8
|
-
import {
|
|
9
|
-
import { c as configuration } from './configuration-
|
|
6
|
+
import { b as checkIfDaemonRunningAndCleanupStaleState, f as spawnDaemonSession, h as stopDaemonSession } from './controlClient-Ckl8N1MS.mjs';
|
|
7
|
+
import { c as readPersistedSessions, r as readSettings } from './persistence-Cg4sfjQV.mjs';
|
|
8
|
+
import { u as parseLatestModelTable, v as resolveLaunchAgentProfile } from './index-D1YnIih6.mjs';
|
|
9
|
+
import { c as configuration } from './configuration-ThKBP_zY.mjs';
|
|
10
10
|
import { g as getProjectPath } from './path-D2wdaNSk.mjs';
|
|
11
|
-
import { f as forkSession, F as ForkSourceMissingError } from './claudeSessionFork-
|
|
12
|
-
import { C as CodexAppServerClient } from './codexAppServerClient-
|
|
11
|
+
import { f as forkSession, F as ForkSourceMissingError } from './claudeSessionFork-_GwIlmMB.mjs';
|
|
12
|
+
import { C as CodexAppServerClient } from './codexAppServerClient-B3QJV6Ey.mjs';
|
|
13
13
|
import { f as forkCodexThread } from './codexThreadFork-DobPd19R.mjs';
|
|
14
|
-
import { e as sendUserMessage, f as readSessionMetadata, g as waitForSessionKey, s as sessionWebUrl } from './sessionOps-
|
|
15
|
-
import { i as isValidSpawnOrigin } from './createSessionMetadata-
|
|
16
|
-
import { l as logger } from './logger-
|
|
14
|
+
import { e as sendUserMessage, f as readSessionMetadata, g as waitForSessionKey, s as sessionWebUrl } from './sessionOps-C65Iej_C.mjs';
|
|
15
|
+
import { i as isValidSpawnOrigin } from './createSessionMetadata-vug4Cv8z.mjs';
|
|
16
|
+
import { l as logger } from './logger-JV7-4Q_6.mjs';
|
|
17
17
|
import { w as waitForForkBackfill } from './forkBackfill-DYIjlN1Z.mjs';
|
|
18
18
|
import 'node:fs/promises';
|
|
19
19
|
import 'zod';
|
|
@@ -22,17 +22,17 @@ import 'node:crypto';
|
|
|
22
22
|
import 'tweetnacl';
|
|
23
23
|
import '@paralleldrive/cuid2';
|
|
24
24
|
import 'node:os';
|
|
25
|
-
import './package-
|
|
25
|
+
import './package-Bw3H6VLn.mjs';
|
|
26
26
|
import 'node:readline';
|
|
27
27
|
import 'node:child_process';
|
|
28
28
|
import 'cross-spawn';
|
|
29
29
|
import './contentLogMetadata-BlWI0egu.mjs';
|
|
30
30
|
import './manager-BEsI4qt3.mjs';
|
|
31
31
|
import '@anthropic-ai/sandbox-runtime';
|
|
32
|
-
import './rateLimitWindows-
|
|
32
|
+
import './rateLimitWindows-CRARnKaI.mjs';
|
|
33
33
|
import './processTree-CP5IvQ2Z.mjs';
|
|
34
34
|
import 'axios';
|
|
35
|
-
import './time-
|
|
35
|
+
import './time-Cw0liIqB.mjs';
|
|
36
36
|
import './specialCommands-MXUN0wfI.mjs';
|
|
37
37
|
import 'socket.io-client';
|
|
38
38
|
import './backgroundTaskActivity-8PdPxrvy.mjs';
|
|
@@ -222,7 +222,7 @@ ${chalk.bold("Options:")}
|
|
|
222
222
|
machine runs (claude: newest Opus; codex: newest
|
|
223
223
|
sol its Codex lists; gemini: newest pro), else the
|
|
224
224
|
machine default. 'default' = the machine default.
|
|
225
|
-
--account <id> Claude account on this machine (\`very-happy account
|
|
225
|
+
--account <id> Claude / Codex account on this machine (\`very-happy account
|
|
226
226
|
list\`); 'machine' = the machine's own login.
|
|
227
227
|
Default = the machine's default account, if set. A
|
|
228
228
|
missing or expired account fails the spawn.
|
|
@@ -377,6 +377,16 @@ async function handleSpawnCommand(args) {
|
|
|
377
377
|
process.exit(1);
|
|
378
378
|
}
|
|
379
379
|
}
|
|
380
|
+
let accountChoice = options.account ? options.account === "machine" ? null : options.account : void 0;
|
|
381
|
+
if (accountChoice === void 0 && options.project && !forkSource) {
|
|
382
|
+
try {
|
|
383
|
+
const defaults = await sharedProjectsClient().defaults(options.project);
|
|
384
|
+
const machineId = (await readSettings()).machineId;
|
|
385
|
+
if (machineId) accountChoice = resolveLaunchAgentProfile({ project: defaults.agentProfiles, agent: agent ?? "claude", machineId }).agentProfileId;
|
|
386
|
+
} catch (error) {
|
|
387
|
+
console.error(chalk.dim(`(project ${options.project}: defaults unavailable \u2014 using the machine default account: ${error instanceof Error ? error.message : String(error)})`));
|
|
388
|
+
}
|
|
389
|
+
}
|
|
380
390
|
logger.debug(`[SPAWN CMD] Spawning session in ${directory}${forkSource ? ` (fork of ${forkSource.parentSessionId})` : ""}`);
|
|
381
391
|
const result = await spawnDaemonSession(directory, void 0, {
|
|
382
392
|
spawnedBy: options.spawnedBy,
|
|
@@ -389,7 +399,7 @@ async function handleSpawnCommand(args) {
|
|
|
389
399
|
environmentVariables: spawnEnvironmentVariables(options.env, prompt !== void 0),
|
|
390
400
|
...resumeIds,
|
|
391
401
|
...forkSource ? { parentSessionId: forkSource.parentSessionId } : {},
|
|
392
|
-
...
|
|
402
|
+
...accountChoice !== void 0 ? { agentProfileId: accountChoice } : {}
|
|
393
403
|
});
|
|
394
404
|
if (result?.error || !result?.success || !result?.sessionId) {
|
|
395
405
|
const message = result?.error || "Daemon returned no session ID";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { L as getAgentCodeDefaults, M as isLatestModelMode, N as resolveLatestModel, O as LATEST_MODEL_MODE, Q as EFFORT_INTENT_AUTO, T as normalizeAgentKey } from './index-D1YnIih6.mjs';
|
|
2
2
|
|
|
3
3
|
function chooseProject(opts) {
|
|
4
4
|
if (opts.project) return { kind: "explicit", projectId: opts.project };
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
var spawn = require('cross-spawn');
|
|
4
4
|
var path = require('node:path');
|
|
5
5
|
var projectPath = require('./projectPath-C3ioB4Bu.cjs');
|
|
6
|
-
var logger = require('./logger-
|
|
6
|
+
var logger = require('./logger-CX3x2eI4.cjs');
|
|
7
7
|
var node_fs = require('node:fs');
|
|
8
8
|
|
|
9
9
|
let cachedRuntime = null;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { spawn } from 'cross-spawn';
|
|
2
2
|
import { join } from 'node:path';
|
|
3
3
|
import { p as projectPath } from './projectPath-BTBIMB57.mjs';
|
|
4
|
-
import { l as logger } from './logger-
|
|
4
|
+
import { l as logger } from './logger-JV7-4Q_6.mjs';
|
|
5
5
|
import { existsSync } from 'node:fs';
|
|
6
6
|
|
|
7
7
|
let cachedRuntime = null;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { l as logger } from './logger-
|
|
2
|
-
import { e as evaluateWrapperIdle, j as isQuiescent, k as HIBERNATION_UNSUPPORTED_BACKOFF_MS } from './persistence-
|
|
3
|
-
import { c as connectionState } from './api-
|
|
1
|
+
import { l as logger } from './logger-JV7-4Q_6.mjs';
|
|
2
|
+
import { e as evaluateWrapperIdle, j as isQuiescent, k as HIBERNATION_UNSUPPORTED_BACKOFF_MS } from './persistence-Cg4sfjQV.mjs';
|
|
3
|
+
import { c as connectionState } from './api-DUfunY3x.mjs';
|
|
4
4
|
|
|
5
5
|
const PRESENCE_SETTLE_MS = 6e3;
|
|
6
6
|
async function commitHibernation(deps) {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var logger = require('./logger-
|
|
4
|
-
var persistence = require('./persistence-
|
|
5
|
-
var api = require('./api-
|
|
3
|
+
var logger = require('./logger-CX3x2eI4.cjs');
|
|
4
|
+
var persistence = require('./persistence-CsmAgN-C.cjs');
|
|
5
|
+
var api = require('./api-CBE_a88I.cjs');
|
|
6
6
|
|
|
7
7
|
const PRESENCE_SETTLE_MS = 6e3;
|
|
8
8
|
async function commitHibernation(deps) {
|
|
@@ -3,6 +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 index = require('./index-BUFrKZeQ.cjs');
|
|
6
7
|
|
|
7
8
|
function providersPath(happyHomeDir) {
|
|
8
9
|
return path.join(happyHomeDir, "providers.json");
|
|
@@ -50,6 +51,15 @@ function parseSessionProvidersFile(raw) {
|
|
|
50
51
|
return out;
|
|
51
52
|
}
|
|
52
53
|
|
|
54
|
+
const KIND_AGENT = {
|
|
55
|
+
"claude-subscription": "claude",
|
|
56
|
+
"claude-api": "claude",
|
|
57
|
+
"codex-chatgpt": "codex",
|
|
58
|
+
"codex-provider": "codex"
|
|
59
|
+
};
|
|
60
|
+
function isApiKind(kind) {
|
|
61
|
+
return kind === "claude-api" || kind === "codex-provider";
|
|
62
|
+
}
|
|
53
63
|
const SPAWN_ACCOUNT_ENV = "VH_AGENT_PROFILE_ID";
|
|
54
64
|
const SUBSCRIPTION_TOKEN_TTL_MS = 365 * 24 * 60 * 60 * 1e3;
|
|
55
65
|
const ACCOUNT_ID_PATTERN = /^[a-z0-9][a-z0-9-]{0,47}$/;
|
|
@@ -60,6 +70,10 @@ function accountSecretPath(home, id) {
|
|
|
60
70
|
if (!ACCOUNT_ID_PATTERN.test(id)) throw new Error(`invalid account id "${id}"`);
|
|
61
71
|
return path.join(home, "accounts", id, "secret");
|
|
62
72
|
}
|
|
73
|
+
function accountCodexHomePath(home, id) {
|
|
74
|
+
if (!ACCOUNT_ID_PATTERN.test(id)) throw new Error(`invalid account id "${id}"`);
|
|
75
|
+
return path.join(home, "accounts", id, "codex-home");
|
|
76
|
+
}
|
|
63
77
|
function sessionAccountsPath(home) {
|
|
64
78
|
return path.join(home, "session-accounts.json");
|
|
65
79
|
}
|
|
@@ -97,14 +111,26 @@ function parseAccountsFile(raw) {
|
|
|
97
111
|
for (const [id, value] of Object.entries(src)) {
|
|
98
112
|
if (!ACCOUNT_ID_PATTERN.test(id) || !value || typeof value !== "object") continue;
|
|
99
113
|
const a = value;
|
|
100
|
-
|
|
114
|
+
const kind = a.kind;
|
|
115
|
+
if (typeof a.kind !== "string" || !(a.kind in KIND_AGENT) || a.agent !== KIND_AGENT[kind]) continue;
|
|
101
116
|
const label = typeof a.label === "string" && a.label.trim() ? a.label.trim() : id;
|
|
102
|
-
const rec = { label, agent:
|
|
103
|
-
|
|
104
|
-
|
|
117
|
+
const rec = { label, agent: KIND_AGENT[kind], kind, createdAt: typeof a.createdAt === "number" ? a.createdAt : 0 };
|
|
118
|
+
const baseUrl = typeof a.baseUrl === "string" && /^https?:\/\//.test(a.baseUrl) ? a.baseUrl.replace(/\/+$/, "") : void 0;
|
|
119
|
+
if (kind === "codex-provider") {
|
|
120
|
+
const provider = typeof a.provider === "string" && /^[A-Za-z0-9_-]{1,64}$/.test(a.provider) ? a.provider : void 0;
|
|
121
|
+
if (!provider && !baseUrl) continue;
|
|
122
|
+
if (provider) rec.provider = provider;
|
|
123
|
+
if (a.wireApi === "responses" || a.wireApi === "chat") rec.wireApi = a.wireApi;
|
|
124
|
+
}
|
|
125
|
+
if (kind === "codex-chatgpt") {
|
|
126
|
+
if (typeof a.email === "string" && a.email) rec.email = a.email;
|
|
127
|
+
if (typeof a.planType === "string" && a.planType) rec.planType = a.planType;
|
|
128
|
+
}
|
|
129
|
+
if (isApiKind(kind)) {
|
|
130
|
+
if (kind === "claude-api" && !baseUrl) continue;
|
|
105
131
|
const key = parseKey(a.key);
|
|
106
132
|
if (!key) continue;
|
|
107
|
-
rec.baseUrl =
|
|
133
|
+
if (baseUrl) rec.baseUrl = baseUrl;
|
|
108
134
|
rec.key = key;
|
|
109
135
|
if (Array.isArray(a.models)) rec.models = a.models.filter((m) => typeof m === "string" && m.length > 0);
|
|
110
136
|
if (a.contextWindows && typeof a.contextWindows === "object") {
|
|
@@ -208,15 +234,22 @@ function writeAccountSecret(home, id, secret) {
|
|
|
208
234
|
function removeAccountSecret(home, id) {
|
|
209
235
|
node_fs.rmSync(path.dirname(accountSecretPath(home, id)), { recursive: true, force: true });
|
|
210
236
|
}
|
|
237
|
+
const KIND_ID_BASE = {
|
|
238
|
+
"claude-subscription": "claude-sub",
|
|
239
|
+
"claude-api": "claude-api",
|
|
240
|
+
"codex-chatgpt": "chatgpt",
|
|
241
|
+
"codex-provider": "codex-api"
|
|
242
|
+
};
|
|
211
243
|
function newAccountId(label, kind, taken) {
|
|
212
244
|
const used = new Set(taken);
|
|
213
245
|
const ascii = /^[\x20-\x7e]*$/.test(label);
|
|
214
246
|
const slug = ascii ? label.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "").slice(0, 40) : "";
|
|
215
|
-
const base = slug && /^[a-z0-9]/.test(slug) ? slug : kind
|
|
247
|
+
const base = slug && /^[a-z0-9]/.test(slug) ? slug : KIND_ID_BASE[kind];
|
|
216
248
|
if (!used.has(base)) return base;
|
|
217
249
|
for (let n = 2; ; n++) if (!used.has(`${base}-${n}`)) return `${base}-${n}`;
|
|
218
250
|
}
|
|
219
251
|
function secretPresent(home, id, a, probe) {
|
|
252
|
+
if (a.kind === "codex-chatgpt") return probe.fileReadable(path.join(accountCodexHomePath(home, id), "auth.json"));
|
|
220
253
|
if (a.kind === "claude-subscription" || a.key?.source === "stored") return probe.fileReadable(accountSecretPath(home, id));
|
|
221
254
|
if (a.key?.source === "file") return probe.fileReadable(expandHome(a.key.path));
|
|
222
255
|
if (a.key?.source === "env") return !!probe.env[a.key.name]?.trim();
|
|
@@ -230,7 +263,7 @@ function accountStatus(home, id, a, probe, now) {
|
|
|
230
263
|
}
|
|
231
264
|
function summarizeAccount(home, id, a, probe, now) {
|
|
232
265
|
const { status, detail } = accountStatus(home, id, a, probe, now);
|
|
233
|
-
const keySource = a.kind === "claude-subscription" ? "stored" : a.key?.source;
|
|
266
|
+
const keySource = a.kind === "claude-subscription" || a.kind === "codex-chatgpt" ? "stored" : a.key?.source;
|
|
234
267
|
const keyRef = a.key?.source === "file" ? a.key.path : a.key?.source === "env" ? a.key.name : void 0;
|
|
235
268
|
return {
|
|
236
269
|
id,
|
|
@@ -246,7 +279,10 @@ function summarizeAccount(home, id, a, probe, now) {
|
|
|
246
279
|
...a.models ? { models: a.models } : {},
|
|
247
280
|
...keySource ? { keySource } : {},
|
|
248
281
|
...keyRef ? { keyRef } : {},
|
|
249
|
-
...a.legacy ? { legacy: true } : {}
|
|
282
|
+
...a.legacy ? { legacy: true } : {},
|
|
283
|
+
...a.provider ? { provider: a.provider } : {},
|
|
284
|
+
...a.email ? { email: a.email } : {},
|
|
285
|
+
...a.planType ? { planType: a.planType } : {}
|
|
250
286
|
};
|
|
251
287
|
}
|
|
252
288
|
function defaultSecretProbe(env = process.env) {
|
|
@@ -265,11 +301,12 @@ function buildAgentProfilesState(home, file, probe, now, daemonPid) {
|
|
|
265
301
|
const accounts = Object.entries(file.accounts).map(([id, a]) => summarizeAccount(home, id, a, probe, now)).sort((x, y) => (x.createdAt ?? 0) - (y.createdAt ?? 0) || x.id.localeCompare(y.id));
|
|
266
302
|
const defaults = {};
|
|
267
303
|
for (const [agent, id] of Object.entries(file.defaults)) if (file.accounts[id]) defaults[agent] = id;
|
|
268
|
-
return { daemonPid, updatedAt: now, accounts, defaults };
|
|
304
|
+
return { daemonPid, updatedAt: now, accounts, defaults, kinds: [...index.AGENT_PROFILE_KINDS] };
|
|
269
305
|
}
|
|
270
306
|
|
|
271
307
|
exports.SPAWN_ACCOUNT_ENV = SPAWN_ACCOUNT_ENV;
|
|
272
308
|
exports.SUBSCRIPTION_TOKEN_TTL_MS = SUBSCRIPTION_TOKEN_TTL_MS;
|
|
309
|
+
exports.accountCodexHomePath = accountCodexHomePath;
|
|
273
310
|
exports.accountSecretPath = accountSecretPath;
|
|
274
311
|
exports.accountsPath = accountsPath;
|
|
275
312
|
exports.buildAgentProfilesState = buildAgentProfilesState;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { readFileSync, existsSync, mkdirSync, chmodSync, writeFileSync, renameSync, rmSync } from 'node:fs';
|
|
2
2
|
import { homedir } from 'node:os';
|
|
3
3
|
import { join, dirname } from 'node:path';
|
|
4
|
+
import { t as AGENT_PROFILE_KINDS } from './index-D1YnIih6.mjs';
|
|
4
5
|
|
|
5
6
|
function providersPath(happyHomeDir) {
|
|
6
7
|
return join(happyHomeDir, "providers.json");
|
|
@@ -48,6 +49,15 @@ function parseSessionProvidersFile(raw) {
|
|
|
48
49
|
return out;
|
|
49
50
|
}
|
|
50
51
|
|
|
52
|
+
const KIND_AGENT = {
|
|
53
|
+
"claude-subscription": "claude",
|
|
54
|
+
"claude-api": "claude",
|
|
55
|
+
"codex-chatgpt": "codex",
|
|
56
|
+
"codex-provider": "codex"
|
|
57
|
+
};
|
|
58
|
+
function isApiKind(kind) {
|
|
59
|
+
return kind === "claude-api" || kind === "codex-provider";
|
|
60
|
+
}
|
|
51
61
|
const SPAWN_ACCOUNT_ENV = "VH_AGENT_PROFILE_ID";
|
|
52
62
|
const SUBSCRIPTION_TOKEN_TTL_MS = 365 * 24 * 60 * 60 * 1e3;
|
|
53
63
|
const ACCOUNT_ID_PATTERN = /^[a-z0-9][a-z0-9-]{0,47}$/;
|
|
@@ -58,6 +68,10 @@ function accountSecretPath(home, id) {
|
|
|
58
68
|
if (!ACCOUNT_ID_PATTERN.test(id)) throw new Error(`invalid account id "${id}"`);
|
|
59
69
|
return join(home, "accounts", id, "secret");
|
|
60
70
|
}
|
|
71
|
+
function accountCodexHomePath(home, id) {
|
|
72
|
+
if (!ACCOUNT_ID_PATTERN.test(id)) throw new Error(`invalid account id "${id}"`);
|
|
73
|
+
return join(home, "accounts", id, "codex-home");
|
|
74
|
+
}
|
|
61
75
|
function sessionAccountsPath(home) {
|
|
62
76
|
return join(home, "session-accounts.json");
|
|
63
77
|
}
|
|
@@ -95,14 +109,26 @@ function parseAccountsFile(raw) {
|
|
|
95
109
|
for (const [id, value] of Object.entries(src)) {
|
|
96
110
|
if (!ACCOUNT_ID_PATTERN.test(id) || !value || typeof value !== "object") continue;
|
|
97
111
|
const a = value;
|
|
98
|
-
|
|
112
|
+
const kind = a.kind;
|
|
113
|
+
if (typeof a.kind !== "string" || !(a.kind in KIND_AGENT) || a.agent !== KIND_AGENT[kind]) continue;
|
|
99
114
|
const label = typeof a.label === "string" && a.label.trim() ? a.label.trim() : id;
|
|
100
|
-
const rec = { label, agent:
|
|
101
|
-
|
|
102
|
-
|
|
115
|
+
const rec = { label, agent: KIND_AGENT[kind], kind, createdAt: typeof a.createdAt === "number" ? a.createdAt : 0 };
|
|
116
|
+
const baseUrl = typeof a.baseUrl === "string" && /^https?:\/\//.test(a.baseUrl) ? a.baseUrl.replace(/\/+$/, "") : void 0;
|
|
117
|
+
if (kind === "codex-provider") {
|
|
118
|
+
const provider = typeof a.provider === "string" && /^[A-Za-z0-9_-]{1,64}$/.test(a.provider) ? a.provider : void 0;
|
|
119
|
+
if (!provider && !baseUrl) continue;
|
|
120
|
+
if (provider) rec.provider = provider;
|
|
121
|
+
if (a.wireApi === "responses" || a.wireApi === "chat") rec.wireApi = a.wireApi;
|
|
122
|
+
}
|
|
123
|
+
if (kind === "codex-chatgpt") {
|
|
124
|
+
if (typeof a.email === "string" && a.email) rec.email = a.email;
|
|
125
|
+
if (typeof a.planType === "string" && a.planType) rec.planType = a.planType;
|
|
126
|
+
}
|
|
127
|
+
if (isApiKind(kind)) {
|
|
128
|
+
if (kind === "claude-api" && !baseUrl) continue;
|
|
103
129
|
const key = parseKey(a.key);
|
|
104
130
|
if (!key) continue;
|
|
105
|
-
rec.baseUrl =
|
|
131
|
+
if (baseUrl) rec.baseUrl = baseUrl;
|
|
106
132
|
rec.key = key;
|
|
107
133
|
if (Array.isArray(a.models)) rec.models = a.models.filter((m) => typeof m === "string" && m.length > 0);
|
|
108
134
|
if (a.contextWindows && typeof a.contextWindows === "object") {
|
|
@@ -206,15 +232,22 @@ function writeAccountSecret(home, id, secret) {
|
|
|
206
232
|
function removeAccountSecret(home, id) {
|
|
207
233
|
rmSync(dirname(accountSecretPath(home, id)), { recursive: true, force: true });
|
|
208
234
|
}
|
|
235
|
+
const KIND_ID_BASE = {
|
|
236
|
+
"claude-subscription": "claude-sub",
|
|
237
|
+
"claude-api": "claude-api",
|
|
238
|
+
"codex-chatgpt": "chatgpt",
|
|
239
|
+
"codex-provider": "codex-api"
|
|
240
|
+
};
|
|
209
241
|
function newAccountId(label, kind, taken) {
|
|
210
242
|
const used = new Set(taken);
|
|
211
243
|
const ascii = /^[\x20-\x7e]*$/.test(label);
|
|
212
244
|
const slug = ascii ? label.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "").slice(0, 40) : "";
|
|
213
|
-
const base = slug && /^[a-z0-9]/.test(slug) ? slug : kind
|
|
245
|
+
const base = slug && /^[a-z0-9]/.test(slug) ? slug : KIND_ID_BASE[kind];
|
|
214
246
|
if (!used.has(base)) return base;
|
|
215
247
|
for (let n = 2; ; n++) if (!used.has(`${base}-${n}`)) return `${base}-${n}`;
|
|
216
248
|
}
|
|
217
249
|
function secretPresent(home, id, a, probe) {
|
|
250
|
+
if (a.kind === "codex-chatgpt") return probe.fileReadable(join(accountCodexHomePath(home, id), "auth.json"));
|
|
218
251
|
if (a.kind === "claude-subscription" || a.key?.source === "stored") return probe.fileReadable(accountSecretPath(home, id));
|
|
219
252
|
if (a.key?.source === "file") return probe.fileReadable(expandHome(a.key.path));
|
|
220
253
|
if (a.key?.source === "env") return !!probe.env[a.key.name]?.trim();
|
|
@@ -228,7 +261,7 @@ function accountStatus(home, id, a, probe, now) {
|
|
|
228
261
|
}
|
|
229
262
|
function summarizeAccount(home, id, a, probe, now) {
|
|
230
263
|
const { status, detail } = accountStatus(home, id, a, probe, now);
|
|
231
|
-
const keySource = a.kind === "claude-subscription" ? "stored" : a.key?.source;
|
|
264
|
+
const keySource = a.kind === "claude-subscription" || a.kind === "codex-chatgpt" ? "stored" : a.key?.source;
|
|
232
265
|
const keyRef = a.key?.source === "file" ? a.key.path : a.key?.source === "env" ? a.key.name : void 0;
|
|
233
266
|
return {
|
|
234
267
|
id,
|
|
@@ -244,7 +277,10 @@ function summarizeAccount(home, id, a, probe, now) {
|
|
|
244
277
|
...a.models ? { models: a.models } : {},
|
|
245
278
|
...keySource ? { keySource } : {},
|
|
246
279
|
...keyRef ? { keyRef } : {},
|
|
247
|
-
...a.legacy ? { legacy: true } : {}
|
|
280
|
+
...a.legacy ? { legacy: true } : {},
|
|
281
|
+
...a.provider ? { provider: a.provider } : {},
|
|
282
|
+
...a.email ? { email: a.email } : {},
|
|
283
|
+
...a.planType ? { planType: a.planType } : {}
|
|
248
284
|
};
|
|
249
285
|
}
|
|
250
286
|
function defaultSecretProbe(env = process.env) {
|
|
@@ -263,7 +299,7 @@ function buildAgentProfilesState(home, file, probe, now, daemonPid) {
|
|
|
263
299
|
const accounts = Object.entries(file.accounts).map(([id, a]) => summarizeAccount(home, id, a, probe, now)).sort((x, y) => (x.createdAt ?? 0) - (y.createdAt ?? 0) || x.id.localeCompare(y.id));
|
|
264
300
|
const defaults = {};
|
|
265
301
|
for (const [agent, id] of Object.entries(file.defaults)) if (file.accounts[id]) defaults[agent] = id;
|
|
266
|
-
return { daemonPid, updatedAt: now, accounts, defaults };
|
|
302
|
+
return { daemonPid, updatedAt: now, accounts, defaults, kinds: [...AGENT_PROFILE_KINDS] };
|
|
267
303
|
}
|
|
268
304
|
|
|
269
|
-
export { SPAWN_ACCOUNT_ENV as S, readAccounts as a, accountSecretPath as b, readAccountsFileV2 as c, defaultSecretProbe as d, expandHome as e, writeAccountsFile as f, accountsPath as g, buildAgentProfilesState as h, writeAccountSecret as i, sessionsBoundTo as j, removeAccountSecret as k,
|
|
305
|
+
export { SPAWN_ACCOUNT_ENV as S, readAccounts as a, accountSecretPath as b, readAccountsFileV2 as c, defaultSecretProbe as d, expandHome as e, writeAccountsFile as f, accountsPath as g, buildAgentProfilesState as h, writeAccountSecret as i, sessionsBoundTo as j, removeAccountSecret as k, accountCodexHomePath as l, SUBSCRIPTION_TOKEN_TTL_MS as m, newAccountId as n, readSessionBindingV2 as o, providersPath as p, readSessionBindings as r, summarizeAccount as s, writeSessionBinding as w };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var logger = require('./logger-
|
|
3
|
+
var logger = require('./logger-CX3x2eI4.cjs');
|
|
4
4
|
var node_fs = require('node:fs');
|
|
5
5
|
var path$1 = require('node:path');
|
|
6
6
|
var path = require('./path-B7zW-WwE.cjs');
|
|
7
|
-
var index = require('./index-
|
|
7
|
+
var index = require('./index-BUFrKZeQ.cjs');
|
|
8
8
|
var trimIdent = require('./trimIdent-4gvk9Wk6.cjs');
|
|
9
9
|
var os = require('node:os');
|
|
10
10
|
var agentGuidance = require('./agentGuidance-BtBx2xxE.cjs');
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { l as logger } from './logger-
|
|
1
|
+
import { l as logger } from './logger-JV7-4Q_6.mjs';
|
|
2
2
|
import { existsSync, readFileSync } from 'node:fs';
|
|
3
3
|
import { join } from 'node:path';
|
|
4
4
|
import { g as getProjectPath } from './path-D2wdaNSk.mjs';
|
|
5
|
-
import {
|
|
5
|
+
import { w as BUILTIN_TODO_DISCOVERY } from './index-D1YnIih6.mjs';
|
|
6
6
|
import { t as trimIdent } from './trimIdent-BAjmv_TG.mjs';
|
|
7
7
|
import { homedir } from 'node:os';
|
|
8
8
|
import { A as AGENT_GUIDANCE } from './agentGuidance-BDYt2Qy2.mjs';
|
|
@@ -2,21 +2,21 @@ import { homedir } from 'node:os';
|
|
|
2
2
|
import { readFile } from 'node:fs/promises';
|
|
3
3
|
import { z } from 'zod';
|
|
4
4
|
import { randomUUID } from 'node:crypto';
|
|
5
|
-
import { t as teamRequest, c as createTeamsClient } from './client-
|
|
6
|
-
import { b as readCredentialsForConfiguredRelay } from './persistence-
|
|
5
|
+
import { t as teamRequest, c as createTeamsClient } from './client-DwbhrX6D.mjs';
|
|
6
|
+
import { b as readCredentialsForConfiguredRelay } from './persistence-Cg4sfjQV.mjs';
|
|
7
7
|
import { a as installTeamSkill, i as installAutomationSkill } from './install-B8O1JpJH.mjs';
|
|
8
8
|
import 'node:child_process';
|
|
9
9
|
import 'node:util';
|
|
10
10
|
import 'node:path';
|
|
11
|
-
import './index-
|
|
11
|
+
import './index-D1YnIih6.mjs';
|
|
12
12
|
import '@paralleldrive/cuid2';
|
|
13
|
-
import './configuration-
|
|
13
|
+
import './configuration-ThKBP_zY.mjs';
|
|
14
14
|
import 'node:fs';
|
|
15
|
-
import './package-
|
|
16
|
-
import './context-
|
|
15
|
+
import './package-Bw3H6VLn.mjs';
|
|
16
|
+
import './context-C0EFLnOg.mjs';
|
|
17
17
|
import './authRelay-DhQhkBvX.mjs';
|
|
18
18
|
import 'tweetnacl';
|
|
19
|
-
import './logger-
|
|
19
|
+
import './logger-JV7-4Q_6.mjs';
|
|
20
20
|
import 'chalk';
|
|
21
21
|
import './resources-CLP_MpK4.mjs';
|
|
22
22
|
|
|
@@ -4,21 +4,21 @@ var os = require('node:os');
|
|
|
4
4
|
var promises = require('node:fs/promises');
|
|
5
5
|
var z = require('zod');
|
|
6
6
|
var node_crypto = require('node:crypto');
|
|
7
|
-
var client = require('./client-
|
|
8
|
-
var persistence = require('./persistence-
|
|
7
|
+
var client = require('./client-DLlnmAPL.cjs');
|
|
8
|
+
var persistence = require('./persistence-CsmAgN-C.cjs');
|
|
9
9
|
var install = require('./install-BOHlqewf.cjs');
|
|
10
10
|
require('node:child_process');
|
|
11
11
|
require('node:util');
|
|
12
12
|
require('node:path');
|
|
13
|
-
require('./index-
|
|
13
|
+
require('./index-BUFrKZeQ.cjs');
|
|
14
14
|
require('@paralleldrive/cuid2');
|
|
15
|
-
require('./configuration-
|
|
15
|
+
require('./configuration-BBK0rmmj.cjs');
|
|
16
16
|
require('node:fs');
|
|
17
|
-
require('./package-
|
|
18
|
-
require('./context-
|
|
17
|
+
require('./package-uzlvxa5S.cjs');
|
|
18
|
+
require('./context-wDp0aZBK.cjs');
|
|
19
19
|
require('./authRelay-Dy1qU9td.cjs');
|
|
20
20
|
require('tweetnacl');
|
|
21
|
-
require('./logger-
|
|
21
|
+
require('./logger-CX3x2eI4.cjs');
|
|
22
22
|
require('chalk');
|
|
23
23
|
require('./resources-BZ_Be0qM.cjs');
|
|
24
24
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
3
|
+
var index = require('./index-BUFrKZeQ.cjs');
|
|
4
4
|
|
|
5
5
|
function payloadJson(payload) {
|
|
6
6
|
if (!payload) return void 0;
|
|
@@ -143,7 +143,7 @@ function describeTrigger(trigger) {
|
|
|
143
143
|
}
|
|
144
144
|
}
|
|
145
145
|
function describeAction(action) {
|
|
146
|
-
if (action.kind === "spawn") return `spawn ${action.agent} in ${action.directory}${action.sticky ? ` (sticky ${action.sticky.key})` : ""}`;
|
|
146
|
+
if (action.kind === "spawn") return `spawn ${action.agent} in ${action.directory}${action.sticky ? ` (sticky ${action.sticky.key})` : ""}${action.agentProfile !== void 0 ? ` \xB7 account ${action.agentProfile === null ? "machine login" : action.agentProfile.label ?? action.agentProfile.id}` : ""}`;
|
|
147
147
|
if (action.kind === "send") return `send to session ${action.sessionId}`;
|
|
148
148
|
return `script ${action.command.join(" ")}`;
|
|
149
149
|
}
|