very-happy-cli 0.2.191 → 0.2.192
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-DgrIc1vH.cjs → AcpBackend-BQO4ShOy.cjs} +3 -3
- package/dist/{AcpBackend-CCy_9AfR.mjs → AcpBackend-CGHTDJd9.mjs} +3 -3
- package/dist/{AcpSessionManager-CQnxx7gD.mjs → AcpSessionManager-G0xD6Jbq.mjs} +2 -2
- package/dist/{AcpSessionManager-DVOzCD3P.cjs → AcpSessionManager-LlUMmcpB.cjs} +2 -2
- package/dist/{BasePermissionHandler-DYLN6Ec9.mjs → BasePermissionHandler-BmTIg376.mjs} +1 -1
- package/dist/{BasePermissionHandler-C9Ag7yvs.cjs → BasePermissionHandler-N6Ip3tFt.cjs} +1 -1
- package/dist/account-CCVT-HO_.mjs +240 -0
- package/dist/account-DtaouikP.cjs +245 -0
- package/dist/accountService-Bddy0zwL.cjs +571 -0
- package/dist/accountService-Dd9uqde2.mjs +566 -0
- package/dist/{acpSessionResume-Bi7pA1n_.mjs → acpSessionResume-BWEUxNtC.mjs} +1 -1
- package/dist/{acpSessionResume-TvP_4Zq2.cjs → acpSessionResume-BnHDk5eD.cjs} +1 -1
- package/dist/{agentHome-DGv105SR.mjs → agentHome-B0VnjkZW.mjs} +4 -4
- package/dist/{agentHome-DNUKJWOY.cjs → agentHome-CqQ29YY7.cjs} +4 -4
- package/dist/{api-jfeMRg5R.mjs → api-_LeBScjg.mjs} +10 -10
- package/dist/{api-BBxZ7y2z.cjs → api-hMDsC6Wg.cjs} +10 -10
- package/dist/{apiMachine-DRJ7y-BB.mjs → apiMachine-CgRldeJ6.mjs} +76 -21
- package/dist/{apiMachine-DqyjKBZG.cjs → apiMachine-CqW2m6Zr.cjs} +81 -26
- package/dist/{attachmentContent-BO2njyza.cjs → attachmentContent-BEeT2J5n.cjs} +2 -2
- package/dist/{attachmentContent-Dm_RIs5L.mjs → attachmentContent-CyptLIfq.mjs} +2 -2
- package/dist/{auth-DnxoVkkf.cjs → auth-C9NvNHhL.cjs} +5 -5
- package/dist/{auth-DLR3ksCF.cjs → auth-CA1OClsW.cjs} +8 -8
- package/dist/{auth-BYDtjVNb.mjs → auth-CFQikywl.mjs} +8 -8
- package/dist/{auth-DC6rg8lJ.mjs → auth-DL8_J9vu.mjs} +5 -5
- package/dist/{auto-D5Jhukq1.mjs → auto-CKI05w1D.mjs} +17 -17
- package/dist/{auto-CwO0u8hB.cjs → auto-uQOxlxLp.cjs} +17 -17
- package/dist/{bootstrap-rLaL3kTa.mjs → bootstrap-DaZ0Np7X.mjs} +2 -2
- package/dist/{bootstrap-sly4qPPY.cjs → bootstrap-DsZGc69k.cjs} +2 -2
- package/dist/{browser-CHpVgyni.mjs → browser-BUIaSHK2.mjs} +1 -1
- package/dist/{browser-BTgZ9d4i.cjs → browser-Ft0ASDm7.cjs} +1 -1
- package/dist/claudeAccountEnv-BOBpJ3k8.cjs +137 -0
- package/dist/claudeAccountEnv-ON24i0qv.mjs +132 -0
- package/dist/{claudeLocal-Bgb5GGsq.mjs → claudeLocal-B1ZVtryl.mjs} +5 -5
- package/dist/{claudeLocal-1vuTFcL8.cjs → claudeLocal-BMf9t4Fa.cjs} +5 -5
- package/dist/{claudeLocalLauncher-T7EfT68h.mjs → claudeLocalLauncher-Bp8bqF4y.mjs} +10 -10
- package/dist/{claudeLocalLauncher-DOsL6HFY.cjs → claudeLocalLauncher-C8TeJcfF.cjs} +10 -10
- package/dist/{claudeSessionFork-CPvi6yDX.mjs → claudeSessionFork-8AA47z8Y.mjs} +1 -1
- package/dist/{claudeSessionFork-Cko4SaVi.cjs → claudeSessionFork-YiktY55n.cjs} +1 -1
- package/dist/{client-Bi20Ka0h.mjs → client-Bm4oKvW7.mjs} +2 -2
- package/dist/{client-Bh1aUPh-.mjs → client-BmPaBnDK.mjs} +4 -4
- package/dist/{client-C-OdTbrU.cjs → client-CFHZfh9x.cjs} +4 -4
- package/dist/{client-BscskEBk.cjs → client-Crh8_cNx.cjs} +2 -2
- package/dist/{client-BXD66ZF5.mjs → client-Cxlp_D4I.mjs} +2 -2
- package/dist/{client-C5-C0t2a.cjs → client-D8XROyZc.cjs} +2 -2
- package/dist/codex/happyMcpStdioBridge.cjs +16 -16
- package/dist/codex/happyMcpStdioBridge.mjs +16 -16
- package/dist/{codexAppServerClient-DXhAf6i-.mjs → codexAppServerClient-BWJbLCQn.mjs} +3 -3
- package/dist/{codexAppServerClient-DKXeikEe.cjs → codexAppServerClient-q8GHQhyC.cjs} +3 -3
- package/dist/{codexCommand-CIaOiiOj.mjs → codexCommand-BfXfRQr4.mjs} +50 -48
- package/dist/{codexCommand-DvbbpYBS.cjs → codexCommand-BgpGg-Zy.cjs} +50 -48
- package/dist/{codexTermination-BszWfyk5.cjs → codexTermination-CVUF0X75.cjs} +1 -1
- package/dist/{codexTermination-BcQdEDaw.mjs → codexTermination-s9fd1gkA.mjs} +1 -1
- package/dist/{config-Di3Cf6js.cjs → config-BAjyTyYp.cjs} +3 -3
- package/dist/{config-OCEcVVK1.mjs → config-BF8XgLyc.mjs} +3 -3
- package/dist/{configuration-DfPBa-9d.cjs → configuration-CXEVKAyF.cjs} +1 -1
- package/dist/{configuration-ECqXu34R.mjs → configuration-IhRiLDVe.mjs} +1 -1
- package/dist/{connect-BTfAUhk8.mjs → connect-LZh1gr08.mjs} +13 -13
- package/dist/{connect-BPQRuOw5.cjs → connect-rCS56arw.cjs} +13 -13
- package/dist/{context-Co7hUaW-.cjs → context-3_S_mWz9.cjs} +1 -1
- package/dist/{context-CfgTFpCB.mjs → context-DO6F5YwH.mjs} +1 -1
- package/dist/{controlClient-ClI7A0qE.mjs → controlClient-8ILulwjc.mjs} +14 -5
- package/dist/{controlClient-C13_pSKG.cjs → controlClient-j7p5p3_7.cjs} +15 -4
- package/dist/{createSessionMetadata-Cf78KHtt.cjs → createSessionMetadata-DwdD_uVo.cjs} +2 -2
- package/dist/{createSessionMetadata-B0eT_Kfj.mjs → createSessionMetadata-oyaTZm1b.mjs} +2 -2
- package/dist/daemonAccounts-BCjDgoNt.cjs +51 -0
- package/dist/daemonAccounts-BJgt6IJe.mjs +27 -0
- package/dist/{defaultPermissionMode-oqTupStc.cjs → defaultPermissionMode-BFShzF55.cjs} +1 -1
- package/dist/{defaultPermissionMode-m6z2QVyP.mjs → defaultPermissionMode-Lt3PUCwY.mjs} +1 -1
- package/dist/{deterministicJson-CpFFgUL_.cjs → deterministicJson-DUN0v3St.cjs} +13 -13
- package/dist/{deterministicJson-BtSwbsok.mjs → deterministicJson-Dfp-7wUZ.mjs} +13 -13
- package/dist/{doctor-lsxmAK4o.mjs → doctor-B_UwMcVT.mjs} +7 -7
- package/dist/{doctor-BEU0_1Xv.cjs → doctor-FgUYTbAT.cjs} +7 -7
- package/dist/{downloadTarget-CikzJv1h.cjs → downloadTarget-BrrQEDxg.cjs} +6 -6
- package/dist/{downloadTarget-BXqXhNF7.mjs → downloadTarget-C0d6jRx-.mjs} +6 -6
- package/dist/{ensureDaemonRunning-BUuH-pbE.cjs → ensureDaemonRunning-Cq4FYI5Q.cjs} +5 -5
- package/dist/{ensureDaemonRunning-B_9WAlbU.mjs → ensureDaemonRunning-KUMFfIil.mjs} +5 -5
- package/dist/{handleResumeCommand-BK9XKH_l.mjs → handleResumeCommand-BGhVo3QH.mjs} +5 -5
- package/dist/{handleResumeCommand-Dj7oi2KO.cjs → handleResumeCommand-Cl9GIL5F.cjs} +5 -5
- package/dist/{index-BdOJOZ6J.mjs → index-BjXjMhGY.mjs} +4 -4
- package/dist/{index-CLUHaPU8.cjs → index-BzAYnYct.cjs} +110 -0
- package/dist/{index-CmZusg8Q.cjs → index-CQ_hLLCj.cjs} +3 -3
- package/dist/{index-Dg2NAF_-.cjs → index-CRipkiqo.cjs} +4 -4
- package/dist/{index-D3c7CLot.cjs → index-CZaLMmPC.cjs} +4 -4
- package/dist/{index-Cxso1rg4.mjs → index-Ca1Tt96A.mjs} +45 -41
- package/dist/{index-CauRYQKr.cjs → index-D8ODb0_U.cjs} +44 -40
- package/dist/{index-Bq8NKSCF.mjs → index-DYD3GM1m.mjs} +104 -1
- package/dist/{index-BjZnpGWX.mjs → index-JQDyJ3Li.mjs} +3 -3
- package/dist/{index-DuK9XYbZ.mjs → index-v5EmjT8l.mjs} +4 -4
- package/dist/index.cjs +2 -2
- package/dist/index.mjs +2 -2
- package/dist/{install-DXllkuy0.cjs → install-ClUA9tbC.cjs} +3 -3
- package/dist/{install-DTIveLOS.mjs → install-D6EHRtAN.mjs} +3 -3
- package/dist/lib.cjs +12 -12
- package/dist/lib.d.cts +282 -0
- package/dist/lib.d.mts +282 -0
- package/dist/lib.mjs +12 -12
- package/dist/{lidState-CD81ryTy.mjs → lidState-CZOXXdzv.mjs} +1 -1
- package/dist/{lidState-C9_DoF9i.cjs → lidState-DqoN7zH4.cjs} +1 -1
- package/dist/{localHappyAgentAuth-CCjUvOfi.cjs → localHappyAgentAuth-BnGCpHRX.cjs} +1 -1
- package/dist/{localHappyAgentAuth-Cg-m1lwm.mjs → localHappyAgentAuth-YHxDZ4x4.mjs} +1 -1
- package/dist/{logger-Ct2zvaq0.cjs → logger-8su64lqR.cjs} +2 -2
- package/dist/{logger-GcbI0eg2.mjs → logger-Fd_rNvgd.mjs} +2 -2
- package/dist/{machineMetadata-CXRmFNOV.mjs → machineMetadata-1HIIC7Bc.mjs} +3 -3
- package/dist/{machineMetadata-DDCVWb_x.cjs → machineMetadata-DYXt3p6u.cjs} +3 -3
- package/dist/{main-omGr_ONk.mjs → main-BI6GIzUL.mjs} +92 -48
- package/dist/{main-BHC-WIcM.cjs → main-C_GrcYkn.cjs} +92 -48
- package/dist/{mcp-xUzii0m8.cjs → mcp-BycIv9oQ.cjs} +18 -15
- package/dist/{mcp-D5hxmRAq.mjs → mcp-XGoxywno.mjs} +18 -15
- package/dist/{mirrorProtocol-Dfl8Ahyf.cjs → mirrorProtocol-DVnB8EO8.cjs} +3 -3
- package/dist/{mirrorProtocol-Lcx20Oby.mjs → mirrorProtocol-DXT3rv7T.mjs} +3 -3
- package/dist/{package-BsUHyqWe.mjs → package-6KkRAops.mjs} +7 -7
- package/dist/{package-9n7wd2dT.cjs → package-iuLlSiSF.cjs} +7 -7
- package/dist/{panels-BfknEmt7.cjs → panels-0C89q0Tu.cjs} +5 -5
- package/dist/{panels-CpEKWWbI.mjs → panels-B5Di2zb2.mjs} +5 -5
- package/dist/{peerTools-CElYh-5u.cjs → peerTools-CANTX_mG.cjs} +5 -5
- package/dist/{peerTools-CwCe6tmJ.mjs → peerTools-CKJ-IDM4.mjs} +5 -5
- package/dist/{persistence-A2NeERZJ.cjs → persistence-B4ttN-fR.cjs} +2 -2
- package/dist/{persistence-Cpw4yJs8.mjs → persistence-DWcHe035.mjs} +2 -2
- package/dist/{piRunnerArgs-BnFU0K73.cjs → piRunnerArgs-BOkfxyak.cjs} +1 -1
- package/dist/{piRunnerArgs-Bqmu16He.mjs → piRunnerArgs-Bl5GpBoN.mjs} +2 -2
- package/dist/{piRuntime-Cgn1b0OX.mjs → piRuntime-BhwxzdQf.mjs} +1 -1
- package/dist/{piRuntime-DpS9TAIs.cjs → piRuntime-DzrIiZU8.cjs} +1 -1
- package/dist/{piTerminal-rmve-VlI.cjs → piTerminal-BdS7ol7v.cjs} +20 -17
- package/dist/{piTerminal-BGdps8f3.mjs → piTerminal-DnA2CbGr.mjs} +20 -17
- package/dist/{pushNotifications-23YSd-0l.cjs → pushNotifications-BqFoLye2.cjs} +5 -3
- package/dist/{pushNotifications-XAM8__Pg.mjs → pushNotifications-DkQ0yvFs.mjs} +5 -3
- package/dist/{query-u2GX-I0C.cjs → query-BQ4br3yn.cjs} +1 -1
- package/dist/{query-SZcYnJoW.mjs → query-BRJYSkb1.mjs} +1 -1
- package/dist/{rateLimitReporter-COUkf446.mjs → rateLimitReporter-BRbYkmuP.mjs} +3 -3
- package/dist/{rateLimitReporter-CaTzBe3x.cjs → rateLimitReporter-DK5SQuCc.cjs} +3 -3
- package/dist/{rateLimitWindows-B2Kx6L0S.cjs → rateLimitWindows-DBfiuYeg.cjs} +1 -1
- package/dist/{rateLimitWindows-j_qQk0KY.mjs → rateLimitWindows-Da5AR-4u.mjs} +1 -1
- package/dist/reconnectEnv-B31lY4nR.cjs +27 -0
- package/dist/reconnectEnv-DeSvHl3q.mjs +24 -0
- package/dist/{registerCommonHandlers-D1MiSfcB.cjs → registerCommonHandlers-m6pxxf2J.cjs} +2 -2
- package/dist/{registerCommonHandlers-DRRfinzK.mjs → registerCommonHandlers-yQ7Ru-l0.mjs} +2 -2
- package/dist/{registerKillSessionHandler-hvCsEn7b.cjs → registerKillSessionHandler-BAOIa_Fs.cjs} +6 -6
- package/dist/{registerKillSessionHandler-Cpug_r5C.mjs → registerKillSessionHandler-BDNpi7YO.mjs} +6 -6
- package/dist/{remoteSessionClient-BdnJ_n8C.mjs → remoteSessionClient-CZ7aaNgj.mjs} +5 -5
- package/dist/{remoteSessionClient-6ymeMVa4.cjs → remoteSessionClient-iJMXRN_D.cjs} +5 -5
- package/dist/{reportProgressTool-XgQBzxoD.mjs → reportProgressTool-DfQhPu0s.mjs} +3 -3
- package/dist/{reportProgressTool-tzQLCLIw.cjs → reportProgressTool-DpFs7pSe.cjs} +3 -3
- package/dist/{run-Bt0AklUU.mjs → run-CwN28mcj.mjs} +211 -51
- package/dist/{run-DYL_wuj7.cjs → run-p-xp1_HY.cjs} +210 -50
- package/dist/{runClaude-CBEpYO4S.cjs → runClaude-D6U1Z575.cjs} +62 -44
- package/dist/{runClaude-C3rii_S6.mjs → runClaude-DRKtAGTm.mjs} +62 -44
- package/dist/{runClaudeDeps-DlVfMG4F.mjs → runClaudeDeps-BheVcIlD.mjs} +56 -47
- package/dist/{runClaudeDeps-CYuozSC6.cjs → runClaudeDeps-Dkofokgb.cjs} +51 -42
- package/dist/{runGemini-CEI3b90u.cjs → runGemini-C8q3YCc0.cjs} +33 -33
- package/dist/{runGemini-DkYhRk9S.mjs → runGemini-owbvhFbi.mjs} +33 -33
- package/dist/{runOpenClaw-BgjD6E4d.cjs → runOpenClaw-DGeN66-t.cjs} +18 -18
- package/dist/{runOpenClaw-DpprWCoz.mjs → runOpenClaw-Dky3-mjO.mjs} +18 -18
- package/dist/{sandbox-XCDUbH72.cjs → sandbox-D2CPyoCA.cjs} +4 -4
- package/dist/{sandbox-DJ7A7lsy.mjs → sandbox-sq_wy9Gl.mjs} +4 -4
- package/dist/{selfCheck-BYUDB1Uq.cjs → selfCheck-BgLvQKSt.cjs} +39 -37
- package/dist/selfCheck-vkfrgQ7X.mjs +88 -0
- package/dist/{send-CASDBCyJ.cjs → send-Cd10YhXh.cjs} +8 -8
- package/dist/{send-Ba63huxv.mjs → send-K9vg-8t-.mjs} +8 -8
- package/dist/{server-cZoV9XRt.cjs → server-DRrV64r0.cjs} +6 -6
- package/dist/{server-w3W0toNd.mjs → server-De4W1zuK.mjs} +4 -4
- package/dist/{sessionLock-BmLA2S8K.cjs → sessionLock-BDtSzzKS.cjs} +10 -3
- package/dist/{sessionLock-G2PMqvsh.mjs → sessionLock-Dl6i7IgA.mjs} +10 -4
- package/dist/{sessionOps-DXlTmS7J.cjs → sessionOps-DvnEH4PL.cjs} +4 -4
- package/dist/{sessionOps-DPw5k8vV.mjs → sessionOps-gU88-W9F.mjs} +4 -4
- package/dist/sessionProvider-CKcIo7KO.mjs +108 -0
- package/dist/sessionProvider-CbSZeZrl.cjs +113 -0
- package/dist/{sessionScanner-AHjnicxi.cjs → sessionScanner-7RtcCeyD.cjs} +3 -3
- package/dist/{sessionScanner-BCXpdZJN.mjs → sessionScanner-DR32uSby.mjs} +3 -3
- package/dist/{sessions-BiBXOBx0.cjs → sessions-BvuMjgvJ.cjs} +10 -10
- package/dist/{sessions-Clk8MR5Y.mjs → sessions-DTt2Eguk.mjs} +10 -10
- package/dist/{setupOfflineReconnection-DI-QZGYz.mjs → setupOfflineReconnection-BGnvhRfb.mjs} +2 -2
- package/dist/{setupOfflineReconnection-BKLfOd-i.cjs → setupOfflineReconnection-DduOsw6p.cjs} +2 -2
- package/dist/{spawn-4tsp1uhh.mjs → spawn-CL3cUc7b.mjs} +26 -17
- package/dist/{spawn-D5omsx1Q.cjs → spawn-DMB6rRPA.cjs} +26 -17
- package/dist/{spawnAgents-CtkkIFHd.cjs → spawnAgents-CClb7buD.cjs} +1 -1
- package/dist/{spawnAgents-CjoU6ZOS.mjs → spawnAgents-CRMfOJhh.mjs} +1 -1
- package/dist/{spawnHappyCLI-CIA9Sc_5.mjs → spawnHappyCLI-Cj_6IICe.mjs} +1 -1
- package/dist/{spawnHappyCLI-CF_gLi92.cjs → spawnHappyCLI-DJdhX_Qx.cjs} +1 -1
- package/dist/{startFileWatcher-CDO6fb2m.mjs → startFileWatcher-DikVa8kg.mjs} +1 -1
- package/dist/{startFileWatcher-9Stpxe7p.cjs → startFileWatcher-LnOmVW6H.cjs} +1 -1
- package/dist/{startupSessionCreate-CcF7rGGB.cjs → startupSessionCreate-B3ND-917.cjs} +3 -3
- package/dist/{startupSessionCreate-BtR4iYEC.mjs → startupSessionCreate-CDdaLaMq.mjs} +3 -3
- package/dist/store--XN-7MS0.mjs +269 -0
- package/dist/store-DV__wCvP.cjs +289 -0
- package/dist/{streamRelay-BhI6jqF-.cjs → streamRelay-DFdOaLOn.cjs} +1 -1
- package/dist/{streamRelay-DMwOMTKf.mjs → streamRelay-sABnxEXq.mjs} +1 -1
- package/dist/{sync-C0PRuTMj.mjs → sync-JoEZKRo8.mjs} +1 -1
- package/dist/{sync-Ba8N6xba.cjs → sync-_2lsZ1U2.cjs} +1 -1
- package/dist/{systemPrompt-DV5IReD4.cjs → systemPrompt-CJEvNCuW.cjs} +2 -2
- package/dist/{systemPrompt-D0q8eyjy.mjs → systemPrompt-Zq4HyrZ5.mjs} +2 -2
- package/dist/{teams-z3Gp-KlV.cjs → teams-BNZafnrT.cjs} +7 -7
- package/dist/{teams-BO3_arwM.mjs → teams-qz4LqKJ2.mjs} +7 -7
- package/dist/{template-DLR_0hfj.mjs → template-CJ8BWSsc.mjs} +1 -1
- package/dist/{template-B_5l6pkc.cjs → template-LgvBbOna.cjs} +1 -1
- package/dist/{time-Cy0a-7YX.cjs → time-CaUlWSNJ.cjs} +1 -1
- package/dist/{time-D0jvDRhn.mjs → time-bzmet4s5.mjs} +1 -1
- package/dist/{titleGenerator-RGHWP2YL.cjs → titleGenerator-BuIIu_JP.cjs} +17 -13
- package/dist/{titleGenerator-AGQsXskb.mjs → titleGenerator-CbTtJ_1D.mjs} +16 -12
- package/dist/{todo-CzIDPLFy.cjs → todo-CQ_BTf9C.cjs} +6 -6
- package/dist/{todo-BZ954vsz.mjs → todo-DIrVF_Ak.mjs} +6 -6
- package/dist/{tools-B1x1j6tz.cjs → tools-BnmmFZji.cjs} +1 -1
- package/dist/{tools-Bei5i03L.mjs → tools-cLOjBvPn.mjs} +1 -1
- package/dist/{uninstall-B4T_e3Mr.mjs → uninstall-C5OuW6dE.mjs} +3 -3
- package/dist/{uninstall-C3cnIvz1.cjs → uninstall-uEEGKB84.cjs} +3 -3
- package/dist/wrapperAccount-DXlD3bsO.mjs +106 -0
- package/dist/wrapperAccount-DzoGqS2b.cjs +110 -0
- package/package.json +7 -7
- package/dist/providerBinding-B-Qbx9W2.cjs +0 -140
- package/dist/providerBinding-CYubGg-Z.mjs +0 -132
- package/dist/selfCheck-C-rNljKV.mjs +0 -86
- package/dist/sessionProvider-DUn91LhJ.mjs +0 -109
- package/dist/sessionProvider-Dg691XQ4.cjs +0 -114
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var persistence = require('./persistence-
|
|
3
|
+
var persistence = require('./persistence-B4ttN-fR.cjs');
|
|
4
4
|
var cliUpdate = require('./cliUpdate-DsKXPFYp.cjs');
|
|
5
5
|
var node_fs = require('node:fs');
|
|
6
6
|
var path = require('node:path');
|
|
7
|
-
var configuration = require('./configuration-
|
|
8
|
-
var logger = require('./logger-
|
|
7
|
+
var configuration = require('./configuration-CXEVKAyF.cjs');
|
|
8
|
+
var logger = require('./logger-8su64lqR.cjs');
|
|
9
9
|
var processTreeSnapshot = require('./processTreeSnapshot-mDbnuojn.cjs');
|
|
10
10
|
|
|
11
11
|
const PROCESS_IDENTITY_FIELDS = [
|
|
@@ -125,6 +125,7 @@ function decideAutoRestart(input) {
|
|
|
125
125
|
if (report.variant) return { ok: false, reason: "assistant" };
|
|
126
126
|
if (!AUTO_RESTART_FLAVORS.includes(report.flavor)) return { ok: false, reason: "unsupported-flavor" };
|
|
127
127
|
if (!input.resumable) return { ok: false, reason: "not-resumable" };
|
|
128
|
+
if (input.upgradePending) return { ok: false, reason: "upgrade-pending" };
|
|
128
129
|
if (report.thinking || input.turnActive) return { ok: false, reason: "turn-active" };
|
|
129
130
|
if (report.pendingRequests > 0) return { ok: false, reason: "pending-request" };
|
|
130
131
|
if (report.queuedInputs > 0 || !report.waitingForInput) return { ok: false, reason: "queued-input" };
|
|
@@ -157,6 +158,11 @@ function recordAttempt(previous, target, ok, now, error) {
|
|
|
157
158
|
const attempts = (previous && previous.target === target ? previous.attempts : 0) + 1;
|
|
158
159
|
return { target, attempts, notBefore: now + AUTO_RESTART_BACKOFF_MS * attempts, ...error ? { lastError: error } : {} };
|
|
159
160
|
}
|
|
161
|
+
function pendingUpgradeVersion(input) {
|
|
162
|
+
const update = input.autoUpdate;
|
|
163
|
+
if (update?.version && ["waiting_idle", "installing", "installed"].includes(update.state) && cliUpdate.compareExactVersions(update.version, input.daemonVersion) === 1) return update.version;
|
|
164
|
+
return input.bundleReplaced ? "on-disk" : null;
|
|
165
|
+
}
|
|
160
166
|
const MANUAL_REASONS = /* @__PURE__ */ new Set(["local-terminal", "assistant", "unsupported-flavor", "not-resumable"]);
|
|
161
167
|
function statusFromVerdict(verdict, previous, staleness, now, attempt) {
|
|
162
168
|
if (verdict.ok) return null;
|
|
@@ -365,6 +371,7 @@ exports.decideAutoRestart = decideAutoRestart;
|
|
|
365
371
|
exports.encodeAutoRestarted = encodeAutoRestarted;
|
|
366
372
|
exports.exitCursorStamp = exitCursorStamp;
|
|
367
373
|
exports.mergeReconnectMetadata = mergeReconnectMetadata;
|
|
374
|
+
exports.pendingUpgradeVersion = pendingUpgradeVersion;
|
|
368
375
|
exports.processIdentityFields = processIdentityFields;
|
|
369
376
|
exports.readSessionLock = readSessionLock;
|
|
370
377
|
exports.recordAttempt = recordAttempt;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { o as hibernationReplaySeq } from './persistence-
|
|
1
|
+
import { o as hibernationReplaySeq } from './persistence-DWcHe035.mjs';
|
|
2
2
|
import { c as compareExactVersions } from './cliUpdate-Y34VGe9Y.mjs';
|
|
3
3
|
import { existsSync, readFileSync, unlinkSync, mkdirSync, renameSync } from 'node:fs';
|
|
4
4
|
import { join } from 'node:path';
|
|
5
|
-
import { c as configuration, w as writePrivateFileSync } from './configuration-
|
|
6
|
-
import { l as logger } from './logger-
|
|
5
|
+
import { c as configuration, w as writePrivateFileSync } from './configuration-IhRiLDVe.mjs';
|
|
6
|
+
import { l as logger } from './logger-Fd_rNvgd.mjs';
|
|
7
7
|
import { s as snapshotTree, k as killSurvivors } from './processTreeSnapshot-CuLJDNC-.mjs';
|
|
8
8
|
|
|
9
9
|
const PROCESS_IDENTITY_FIELDS = [
|
|
@@ -123,6 +123,7 @@ function decideAutoRestart(input) {
|
|
|
123
123
|
if (report.variant) return { ok: false, reason: "assistant" };
|
|
124
124
|
if (!AUTO_RESTART_FLAVORS.includes(report.flavor)) return { ok: false, reason: "unsupported-flavor" };
|
|
125
125
|
if (!input.resumable) return { ok: false, reason: "not-resumable" };
|
|
126
|
+
if (input.upgradePending) return { ok: false, reason: "upgrade-pending" };
|
|
126
127
|
if (report.thinking || input.turnActive) return { ok: false, reason: "turn-active" };
|
|
127
128
|
if (report.pendingRequests > 0) return { ok: false, reason: "pending-request" };
|
|
128
129
|
if (report.queuedInputs > 0 || !report.waitingForInput) return { ok: false, reason: "queued-input" };
|
|
@@ -155,6 +156,11 @@ function recordAttempt(previous, target, ok, now, error) {
|
|
|
155
156
|
const attempts = (previous && previous.target === target ? previous.attempts : 0) + 1;
|
|
156
157
|
return { target, attempts, notBefore: now + AUTO_RESTART_BACKOFF_MS * attempts, ...error ? { lastError: error } : {} };
|
|
157
158
|
}
|
|
159
|
+
function pendingUpgradeVersion(input) {
|
|
160
|
+
const update = input.autoUpdate;
|
|
161
|
+
if (update?.version && ["waiting_idle", "installing", "installed"].includes(update.state) && compareExactVersions(update.version, input.daemonVersion) === 1) return update.version;
|
|
162
|
+
return input.bundleReplaced ? "on-disk" : null;
|
|
163
|
+
}
|
|
158
164
|
const MANUAL_REASONS = /* @__PURE__ */ new Set(["local-terminal", "assistant", "unsupported-flavor", "not-resumable"]);
|
|
159
165
|
function statusFromVerdict(verdict, previous, staleness, now, attempt) {
|
|
160
166
|
if (verdict.ok) return null;
|
|
@@ -350,4 +356,4 @@ async function claimSessionOrExit(happySessionId, options) {
|
|
|
350
356
|
process.on("exit", () => releaseSessionLock(happySessionId));
|
|
351
357
|
}
|
|
352
358
|
|
|
353
|
-
export { AUTO_RESTART_CAPABILITY as A, applyServerSnapshot as a, applyReconnectReplay as b, claimSessionOrExit as c, wrapperReportsIdle as d, exitCursorStamp as e, decideAutoRestart as f, autoRestartNextCheck as g, wrapperStaleness as h, AUTO_RESTART_MAX_ATTEMPTS as i, AUTO_RESTART_MIN_GAP_MS as j, readSessionLock as k, terminateProcess as l, mergeReconnectMetadata as m, terminateProcessTree as n, AUTO_RESTARTED_ENV as o, processIdentityFields as p, encodeAutoRestarted as q, recordAttempt as r, statusFromVerdict as s, takeAutoRestartedEvent as t,
|
|
359
|
+
export { AUTO_RESTART_CAPABILITY as A, applyServerSnapshot as a, applyReconnectReplay as b, claimSessionOrExit as c, wrapperReportsIdle as d, exitCursorStamp as e, decideAutoRestart as f, autoRestartNextCheck as g, wrapperStaleness as h, AUTO_RESTART_MAX_ATTEMPTS as i, AUTO_RESTART_MIN_GAP_MS as j, readSessionLock as k, terminateProcess as l, mergeReconnectMetadata as m, terminateProcessTree as n, AUTO_RESTARTED_ENV as o, processIdentityFields as p, encodeAutoRestarted as q, recordAttempt as r, statusFromVerdict as s, takeAutoRestartedEvent as t, pendingUpgradeVersion as u, resolveQuietMs as v, withoutServerSnapshot as w, AUTO_RESTART_RECHECK_CAP_MS as x };
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var axios = require('axios');
|
|
4
|
-
var configuration = require('./configuration-
|
|
4
|
+
var configuration = require('./configuration-CXEVKAyF.cjs');
|
|
5
5
|
var authRelay = require('./authRelay-Dy1qU9td.cjs');
|
|
6
|
-
var controlClient = require('./controlClient-
|
|
7
|
-
var persistence = require('./persistence-
|
|
6
|
+
var controlClient = require('./controlClient-j7p5p3_7.cjs');
|
|
7
|
+
var persistence = require('./persistence-B4ttN-fR.cjs');
|
|
8
8
|
var node_crypto = require('node:crypto');
|
|
9
|
-
var time = require('./time-
|
|
9
|
+
var time = require('./time-CaUlWSNJ.cjs');
|
|
10
10
|
var specialCommands = require('./specialCommands-J3JFOq0J.cjs');
|
|
11
11
|
var socket_ioClient = require('socket.io-client');
|
|
12
12
|
var backgroundTaskActivity = require('./backgroundTaskActivity-CBvUdj39.cjs');
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import axios from 'axios';
|
|
2
|
-
import { c as configuration } from './configuration-
|
|
2
|
+
import { c as configuration } from './configuration-IhRiLDVe.mjs';
|
|
3
3
|
import { e as encodeBase64, g as encrypt, d as decodeBase64, h as decrypt } from './authRelay-DhQhkBvX.mjs';
|
|
4
|
-
import { l as listDaemonSessions,
|
|
5
|
-
import { b as readCredentialsForConfiguredRelay, c as readPersistedSessions } from './persistence-
|
|
4
|
+
import { l as listDaemonSessions, h as stopDaemonSession } from './controlClient-8ILulwjc.mjs';
|
|
5
|
+
import { b as readCredentialsForConfiguredRelay, c as readPersistedSessions } from './persistence-DWcHe035.mjs';
|
|
6
6
|
import { randomUUID } from 'node:crypto';
|
|
7
|
-
import { d as delay } from './time-
|
|
7
|
+
import { d as delay } from './time-bzmet4s5.mjs';
|
|
8
8
|
import { c as compactCommandText, p as parseClear } from './specialCommands-MXUN0wfI.mjs';
|
|
9
9
|
import { io } from 'socket.io-client';
|
|
10
10
|
import { b as backgroundTasksReport } from './backgroundTaskActivity-8PdPxrvy.mjs';
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import chalk from 'chalk';
|
|
2
|
+
import { c as configuration } from './configuration-IhRiLDVe.mjs';
|
|
3
|
+
import { r as restartDaemonSession, l as listDaemonSessions } from './controlClient-8ILulwjc.mjs';
|
|
4
|
+
import { A as AccountService, l as localRestartFailure, b as bindResultMessages } from './accountService-Dd9uqde2.mjs';
|
|
5
|
+
import { r as readSessionBindings, a as readAccounts } from './store--XN-7MS0.mjs';
|
|
6
|
+
import 'node:fs';
|
|
7
|
+
import 'node:os';
|
|
8
|
+
import 'node:path';
|
|
9
|
+
import './package-6KkRAops.mjs';
|
|
10
|
+
import 'node:fs/promises';
|
|
11
|
+
import './logger-Fd_rNvgd.mjs';
|
|
12
|
+
import 'node:util';
|
|
13
|
+
import './persistence-DWcHe035.mjs';
|
|
14
|
+
import 'zod';
|
|
15
|
+
import './authRelay-DhQhkBvX.mjs';
|
|
16
|
+
import 'node:crypto';
|
|
17
|
+
import 'tweetnacl';
|
|
18
|
+
import './index-DYD3GM1m.mjs';
|
|
19
|
+
import '@paralleldrive/cuid2';
|
|
20
|
+
import 'node:child_process';
|
|
21
|
+
import './claudeAccountEnv-ON24i0qv.mjs';
|
|
22
|
+
|
|
23
|
+
const SESSION_PROVIDER_HELP = `Usage:
|
|
24
|
+
very-happy session provider --list
|
|
25
|
+
very-happy session provider <sessionId> <profile> [--model <model>] [--no-restart]
|
|
26
|
+
very-happy session provider <sessionId> default [--no-restart]
|
|
27
|
+
|
|
28
|
+
Alias of \`very-happy account bind\`. Binds a Claude session on THIS machine to
|
|
29
|
+
an account (\`very-happy account list\`; providers.json profiles are included),
|
|
30
|
+
then restarts it in place (history kept). "default" = the machine login.
|
|
31
|
+
--model defaults to the account's first model.`;
|
|
32
|
+
function parseSessionProviderArgs(args) {
|
|
33
|
+
const positional = [];
|
|
34
|
+
let model;
|
|
35
|
+
let restart = true;
|
|
36
|
+
let list = false;
|
|
37
|
+
for (let i = 0; i < args.length; i++) {
|
|
38
|
+
const arg = args[i];
|
|
39
|
+
if (arg === "-h" || arg === "--help") return { action: "help" };
|
|
40
|
+
if (arg === "--list") list = true;
|
|
41
|
+
else if (arg === "--no-restart") restart = false;
|
|
42
|
+
else if (arg === "--model") {
|
|
43
|
+
model = args[++i];
|
|
44
|
+
if (!model) throw new Error("--model needs a value");
|
|
45
|
+
} else if (arg.startsWith("--model=")) model = arg.slice("--model=".length);
|
|
46
|
+
else if (arg.startsWith("-")) throw new Error(`unknown option ${arg}`);
|
|
47
|
+
else positional.push(arg);
|
|
48
|
+
}
|
|
49
|
+
if (list) {
|
|
50
|
+
if (positional.length > 0) throw new Error("--list takes no session id");
|
|
51
|
+
return { action: "list" };
|
|
52
|
+
}
|
|
53
|
+
if (positional.length === 0) return { action: "help" };
|
|
54
|
+
if (positional.length !== 2) throw new Error("expected <sessionId> <profile|default>");
|
|
55
|
+
const [sessionId, profile] = positional;
|
|
56
|
+
if (profile === "default") {
|
|
57
|
+
if (model) throw new Error("--model cannot be used with default");
|
|
58
|
+
return { action: "clear", sessionId, restart };
|
|
59
|
+
}
|
|
60
|
+
return { action: "set", sessionId, profile, model, restart };
|
|
61
|
+
}
|
|
62
|
+
function resolveBindingRequest(accounts, profile, model) {
|
|
63
|
+
const a = accounts.accounts[profile];
|
|
64
|
+
if (!a) {
|
|
65
|
+
const known = Object.keys(accounts.accounts);
|
|
66
|
+
throw new Error(`unknown account "${profile}"${known.length ? ` (known: ${known.join(", ")})` : " (no accounts; see `very-happy account`)"}`);
|
|
67
|
+
}
|
|
68
|
+
if (a.kind !== "claude-api") {
|
|
69
|
+
if (model) throw new Error(`--model applies to API accounts only`);
|
|
70
|
+
return { account: profile };
|
|
71
|
+
}
|
|
72
|
+
const chosen = model ?? a.models?.[0];
|
|
73
|
+
if (chosen && a.models && a.models.length > 0 && !a.models.includes(chosen)) {
|
|
74
|
+
throw new Error(`model "${chosen}" is not in account "${profile}" models (${a.models.join(", ")})`);
|
|
75
|
+
}
|
|
76
|
+
return { account: profile, ...chosen ? { model: chosen } : {} };
|
|
77
|
+
}
|
|
78
|
+
async function handleSessionProviderCommand(args) {
|
|
79
|
+
const parsed = parseSessionProviderArgs(args);
|
|
80
|
+
const home = configuration.happyHomeDir;
|
|
81
|
+
if (parsed.action === "help") {
|
|
82
|
+
console.log(SESSION_PROVIDER_HELP);
|
|
83
|
+
return;
|
|
84
|
+
}
|
|
85
|
+
if (parsed.action === "list") {
|
|
86
|
+
const entries = Object.entries(readSessionBindings(home));
|
|
87
|
+
if (entries.length === 0) console.log("No session account bindings.");
|
|
88
|
+
for (const [sessionId, b] of entries) console.log(`${sessionId} ${b.account ?? "machine"}${b.model ? ` ${b.model}` : ""}`);
|
|
89
|
+
return;
|
|
90
|
+
}
|
|
91
|
+
const service = new AccountService({
|
|
92
|
+
home,
|
|
93
|
+
restartSession: async (sessionId) => {
|
|
94
|
+
const result2 = await restartDaemonSession(sessionId);
|
|
95
|
+
if (result2.success) return { ok: true };
|
|
96
|
+
const stillRunning = await listDaemonSessions().then((children) => children.some((c) => c?.happySessionId === sessionId), () => false);
|
|
97
|
+
return localRestartFailure(result2.error ?? "restart failed", stillRunning);
|
|
98
|
+
}
|
|
99
|
+
});
|
|
100
|
+
const binding = parsed.action === "set" ? resolveBindingRequest(readAccounts(home), parsed.profile, parsed.model) : null;
|
|
101
|
+
const result = await service.bind({ sessionId: parsed.sessionId, accountId: binding?.account ?? null, ...binding?.model ? { model: binding.model } : {}, restart: parsed.restart });
|
|
102
|
+
const shown = bindResultMessages(result, parsed.sessionId, binding ? `${binding.account}${binding.model ? ` / ${binding.model}` : ""}` : "machine login", "provider");
|
|
103
|
+
for (const line of shown.out) console.log(line);
|
|
104
|
+
for (const line of shown.err) console.error(chalk.yellow(line));
|
|
105
|
+
if (shown.exitCode) process.exitCode = shown.exitCode;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
export { SESSION_PROVIDER_HELP, handleSessionProviderCommand, parseSessionProviderArgs, resolveBindingRequest };
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chalk = require('chalk');
|
|
4
|
+
var configuration = require('./configuration-CXEVKAyF.cjs');
|
|
5
|
+
var controlClient = require('./controlClient-j7p5p3_7.cjs');
|
|
6
|
+
var accountService = require('./accountService-Bddy0zwL.cjs');
|
|
7
|
+
var store = require('./store-DV__wCvP.cjs');
|
|
8
|
+
require('node:fs');
|
|
9
|
+
require('node:os');
|
|
10
|
+
require('node:path');
|
|
11
|
+
require('./package-iuLlSiSF.cjs');
|
|
12
|
+
require('node:fs/promises');
|
|
13
|
+
require('./logger-8su64lqR.cjs');
|
|
14
|
+
require('node:util');
|
|
15
|
+
require('./persistence-B4ttN-fR.cjs');
|
|
16
|
+
require('zod');
|
|
17
|
+
require('./authRelay-Dy1qU9td.cjs');
|
|
18
|
+
require('node:crypto');
|
|
19
|
+
require('tweetnacl');
|
|
20
|
+
require('./index-BzAYnYct.cjs');
|
|
21
|
+
require('@paralleldrive/cuid2');
|
|
22
|
+
require('node:child_process');
|
|
23
|
+
require('./claudeAccountEnv-BOBpJ3k8.cjs');
|
|
24
|
+
|
|
25
|
+
const SESSION_PROVIDER_HELP = `Usage:
|
|
26
|
+
very-happy session provider --list
|
|
27
|
+
very-happy session provider <sessionId> <profile> [--model <model>] [--no-restart]
|
|
28
|
+
very-happy session provider <sessionId> default [--no-restart]
|
|
29
|
+
|
|
30
|
+
Alias of \`very-happy account bind\`. Binds a Claude session on THIS machine to
|
|
31
|
+
an account (\`very-happy account list\`; providers.json profiles are included),
|
|
32
|
+
then restarts it in place (history kept). "default" = the machine login.
|
|
33
|
+
--model defaults to the account's first model.`;
|
|
34
|
+
function parseSessionProviderArgs(args) {
|
|
35
|
+
const positional = [];
|
|
36
|
+
let model;
|
|
37
|
+
let restart = true;
|
|
38
|
+
let list = false;
|
|
39
|
+
for (let i = 0; i < args.length; i++) {
|
|
40
|
+
const arg = args[i];
|
|
41
|
+
if (arg === "-h" || arg === "--help") return { action: "help" };
|
|
42
|
+
if (arg === "--list") list = true;
|
|
43
|
+
else if (arg === "--no-restart") restart = false;
|
|
44
|
+
else if (arg === "--model") {
|
|
45
|
+
model = args[++i];
|
|
46
|
+
if (!model) throw new Error("--model needs a value");
|
|
47
|
+
} else if (arg.startsWith("--model=")) model = arg.slice("--model=".length);
|
|
48
|
+
else if (arg.startsWith("-")) throw new Error(`unknown option ${arg}`);
|
|
49
|
+
else positional.push(arg);
|
|
50
|
+
}
|
|
51
|
+
if (list) {
|
|
52
|
+
if (positional.length > 0) throw new Error("--list takes no session id");
|
|
53
|
+
return { action: "list" };
|
|
54
|
+
}
|
|
55
|
+
if (positional.length === 0) return { action: "help" };
|
|
56
|
+
if (positional.length !== 2) throw new Error("expected <sessionId> <profile|default>");
|
|
57
|
+
const [sessionId, profile] = positional;
|
|
58
|
+
if (profile === "default") {
|
|
59
|
+
if (model) throw new Error("--model cannot be used with default");
|
|
60
|
+
return { action: "clear", sessionId, restart };
|
|
61
|
+
}
|
|
62
|
+
return { action: "set", sessionId, profile, model, restart };
|
|
63
|
+
}
|
|
64
|
+
function resolveBindingRequest(accounts, profile, model) {
|
|
65
|
+
const a = accounts.accounts[profile];
|
|
66
|
+
if (!a) {
|
|
67
|
+
const known = Object.keys(accounts.accounts);
|
|
68
|
+
throw new Error(`unknown account "${profile}"${known.length ? ` (known: ${known.join(", ")})` : " (no accounts; see `very-happy account`)"}`);
|
|
69
|
+
}
|
|
70
|
+
if (a.kind !== "claude-api") {
|
|
71
|
+
if (model) throw new Error(`--model applies to API accounts only`);
|
|
72
|
+
return { account: profile };
|
|
73
|
+
}
|
|
74
|
+
const chosen = model ?? a.models?.[0];
|
|
75
|
+
if (chosen && a.models && a.models.length > 0 && !a.models.includes(chosen)) {
|
|
76
|
+
throw new Error(`model "${chosen}" is not in account "${profile}" models (${a.models.join(", ")})`);
|
|
77
|
+
}
|
|
78
|
+
return { account: profile, ...chosen ? { model: chosen } : {} };
|
|
79
|
+
}
|
|
80
|
+
async function handleSessionProviderCommand(args) {
|
|
81
|
+
const parsed = parseSessionProviderArgs(args);
|
|
82
|
+
const home = configuration.configuration.happyHomeDir;
|
|
83
|
+
if (parsed.action === "help") {
|
|
84
|
+
console.log(SESSION_PROVIDER_HELP);
|
|
85
|
+
return;
|
|
86
|
+
}
|
|
87
|
+
if (parsed.action === "list") {
|
|
88
|
+
const entries = Object.entries(store.readSessionBindings(home));
|
|
89
|
+
if (entries.length === 0) console.log("No session account bindings.");
|
|
90
|
+
for (const [sessionId, b] of entries) console.log(`${sessionId} ${b.account ?? "machine"}${b.model ? ` ${b.model}` : ""}`);
|
|
91
|
+
return;
|
|
92
|
+
}
|
|
93
|
+
const service = new accountService.AccountService({
|
|
94
|
+
home,
|
|
95
|
+
restartSession: async (sessionId) => {
|
|
96
|
+
const result2 = await controlClient.restartDaemonSession(sessionId);
|
|
97
|
+
if (result2.success) return { ok: true };
|
|
98
|
+
const stillRunning = await controlClient.listDaemonSessions().then((children) => children.some((c) => c?.happySessionId === sessionId), () => false);
|
|
99
|
+
return accountService.localRestartFailure(result2.error ?? "restart failed", stillRunning);
|
|
100
|
+
}
|
|
101
|
+
});
|
|
102
|
+
const binding = parsed.action === "set" ? resolveBindingRequest(store.readAccounts(home), parsed.profile, parsed.model) : null;
|
|
103
|
+
const result = await service.bind({ sessionId: parsed.sessionId, accountId: binding?.account ?? null, ...binding?.model ? { model: binding.model } : {}, restart: parsed.restart });
|
|
104
|
+
const shown = accountService.bindResultMessages(result, parsed.sessionId, binding ? `${binding.account}${binding.model ? ` / ${binding.model}` : ""}` : "machine login", "provider");
|
|
105
|
+
for (const line of shown.out) console.log(line);
|
|
106
|
+
for (const line of shown.err) console.error(chalk.yellow(line));
|
|
107
|
+
if (shown.exitCode) process.exitCode = shown.exitCode;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
exports.SESSION_PROVIDER_HELP = SESSION_PROVIDER_HELP;
|
|
111
|
+
exports.handleSessionProviderCommand = handleSessionProviderCommand;
|
|
112
|
+
exports.parseSessionProviderArgs = parseSessionProviderArgs;
|
|
113
|
+
exports.resolveBindingRequest = resolveBindingRequest;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var sync = require('./sync-
|
|
3
|
+
var sync = require('./sync-_2lsZ1U2.cjs');
|
|
4
4
|
var types = require('./types-CRS-srZK.cjs');
|
|
5
5
|
var path$1 = require('node:path');
|
|
6
6
|
var node_fs = require('node:fs');
|
|
7
7
|
var transcriptCursor = require('./transcriptCursor-DcXGLeSc.cjs');
|
|
8
|
-
var logger = require('./logger-
|
|
9
|
-
var startFileWatcher = require('./startFileWatcher-
|
|
8
|
+
var logger = require('./logger-8su64lqR.cjs');
|
|
9
|
+
var startFileWatcher = require('./startFileWatcher-LnOmVW6H.cjs');
|
|
10
10
|
var path = require('./path-B7zW-WwE.cjs');
|
|
11
11
|
|
|
12
12
|
class Future {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { I as InvalidateSync } from './sync-
|
|
1
|
+
import { I as InvalidateSync } from './sync-JoEZKRo8.mjs';
|
|
2
2
|
import { R as RawJSONLinesSchema } from './types-CkqAACXx.mjs';
|
|
3
3
|
import { join } from 'node:path';
|
|
4
4
|
import { statSync } from 'node:fs';
|
|
5
5
|
import { r as readTranscriptIncrement, i as isValidTranscriptHint } from './transcriptCursor-B7T_gkQ0.mjs';
|
|
6
|
-
import { l as logger } from './logger-
|
|
7
|
-
import { s as startFileWatcher } from './startFileWatcher-
|
|
6
|
+
import { l as logger } from './logger-Fd_rNvgd.mjs';
|
|
7
|
+
import { s as startFileWatcher } from './startFileWatcher-DikVa8kg.mjs';
|
|
8
8
|
import { g as getProjectPath } from './path-D2wdaNSk.mjs';
|
|
9
9
|
|
|
10
10
|
class Future {
|
|
@@ -2,30 +2,30 @@
|
|
|
2
2
|
|
|
3
3
|
var chalk = require('chalk');
|
|
4
4
|
var exitAfterFlush = require('./exitAfterFlush-DIT_sIxR.cjs');
|
|
5
|
-
var sessionOps = require('./sessionOps-
|
|
5
|
+
var sessionOps = require('./sessionOps-DvnEH4PL.cjs');
|
|
6
6
|
var ids = require('./ids-B6ZC0HGt.cjs');
|
|
7
|
-
var peerTools = require('./peerTools-
|
|
8
|
-
var persistence = require('./persistence-
|
|
7
|
+
var peerTools = require('./peerTools-CANTX_mG.cjs');
|
|
8
|
+
var persistence = require('./persistence-B4ttN-fR.cjs');
|
|
9
9
|
var path = require('node:path');
|
|
10
|
-
var remoteSessionClient = require('./remoteSessionClient-
|
|
10
|
+
var remoteSessionClient = require('./remoteSessionClient-iJMXRN_D.cjs');
|
|
11
11
|
require('axios');
|
|
12
|
-
require('./configuration-
|
|
12
|
+
require('./configuration-CXEVKAyF.cjs');
|
|
13
13
|
require('node:fs');
|
|
14
14
|
require('node:os');
|
|
15
|
-
require('./package-
|
|
15
|
+
require('./package-iuLlSiSF.cjs');
|
|
16
16
|
require('node:fs/promises');
|
|
17
17
|
require('./authRelay-Dy1qU9td.cjs');
|
|
18
18
|
require('node:crypto');
|
|
19
19
|
require('tweetnacl');
|
|
20
|
-
require('./controlClient-
|
|
21
|
-
require('./logger-
|
|
20
|
+
require('./controlClient-j7p5p3_7.cjs');
|
|
21
|
+
require('./logger-8su64lqR.cjs');
|
|
22
22
|
require('node:util');
|
|
23
|
-
require('./time-
|
|
23
|
+
require('./time-CaUlWSNJ.cjs');
|
|
24
24
|
require('./specialCommands-J3JFOq0J.cjs');
|
|
25
25
|
require('socket.io-client');
|
|
26
26
|
require('./backgroundTaskActivity-CBvUdj39.cjs');
|
|
27
27
|
require('zod');
|
|
28
|
-
require('./client-
|
|
28
|
+
require('./client-D8XROyZc.cjs');
|
|
29
29
|
|
|
30
30
|
const MACHINE_ID_RE = /^[a-zA-Z0-9_-]{1,128}$/;
|
|
31
31
|
const ACTIONS = ["list", "read", "stop", "archive", "approve", "deny", "peers", "message"];
|
|
@@ -1,29 +1,29 @@
|
|
|
1
1
|
import chalk from 'chalk';
|
|
2
2
|
import { e as exitAfterFlush } from './exitAfterFlush-AbKNZM0N.mjs';
|
|
3
|
-
import { D as DEFAULT_RECENT_LIMIT, M as MAX_READ_LIMIT, l as listAccountSessions, a as listSessions, w as waitForTurnEnd, T as TurnWaitTimeoutError, r as readSessionTranscript, b as stopSession, c as resolvePermissionRequest, d as archiveSession } from './sessionOps-
|
|
3
|
+
import { D as DEFAULT_RECENT_LIMIT, M as MAX_READ_LIMIT, l as listAccountSessions, a as listSessions, w as waitForTurnEnd, T as TurnWaitTimeoutError, r as readSessionTranscript, b as stopSession, c as resolvePermissionRequest, d as archiveSession } from './sessionOps-gU88-W9F.mjs';
|
|
4
4
|
import { i as isValidSessionId } from './ids-DU6sLx4C.mjs';
|
|
5
|
-
import { P as PEER_SCOPES, c as cliPeerSelf, e as executeSessionPeerTool, l as listPeerSessions, s as sendPeerMessage } from './peerTools-
|
|
6
|
-
import { c as readPersistedSessions } from './persistence-
|
|
5
|
+
import { P as PEER_SCOPES, c as cliPeerSelf, e as executeSessionPeerTool, l as listPeerSessions, s as sendPeerMessage } from './peerTools-CKJ-IDM4.mjs';
|
|
6
|
+
import { c as readPersistedSessions } from './persistence-DWcHe035.mjs';
|
|
7
7
|
import { resolve } from 'node:path';
|
|
8
|
-
import { f as fillForeignAccountRows, l as listRemoteSessions, a as listRemotePeers, w as waitForRemoteTurnEnd, r as readRemoteTranscript } from './remoteSessionClient-
|
|
8
|
+
import { f as fillForeignAccountRows, l as listRemoteSessions, a as listRemotePeers, w as waitForRemoteTurnEnd, r as readRemoteTranscript } from './remoteSessionClient-CZ7aaNgj.mjs';
|
|
9
9
|
import 'axios';
|
|
10
|
-
import './configuration-
|
|
10
|
+
import './configuration-IhRiLDVe.mjs';
|
|
11
11
|
import 'node:fs';
|
|
12
12
|
import 'node:os';
|
|
13
|
-
import './package-
|
|
13
|
+
import './package-6KkRAops.mjs';
|
|
14
14
|
import 'node:fs/promises';
|
|
15
15
|
import './authRelay-DhQhkBvX.mjs';
|
|
16
16
|
import 'node:crypto';
|
|
17
17
|
import 'tweetnacl';
|
|
18
|
-
import './controlClient-
|
|
19
|
-
import './logger-
|
|
18
|
+
import './controlClient-8ILulwjc.mjs';
|
|
19
|
+
import './logger-Fd_rNvgd.mjs';
|
|
20
20
|
import 'node:util';
|
|
21
|
-
import './time-
|
|
21
|
+
import './time-bzmet4s5.mjs';
|
|
22
22
|
import './specialCommands-MXUN0wfI.mjs';
|
|
23
23
|
import 'socket.io-client';
|
|
24
24
|
import './backgroundTaskActivity-8PdPxrvy.mjs';
|
|
25
25
|
import 'zod';
|
|
26
|
-
import './client-
|
|
26
|
+
import './client-Bm4oKvW7.mjs';
|
|
27
27
|
|
|
28
28
|
const MACHINE_ID_RE = /^[a-zA-Z0-9_-]{1,128}$/;
|
|
29
29
|
const ACTIONS = ["list", "read", "stop", "archive", "approve", "deny", "peers", "message"];
|
package/dist/{setupOfflineReconnection-DI-QZGYz.mjs → setupOfflineReconnection-BGnvhRfb.mjs}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { c as configuration } from './configuration-
|
|
2
|
-
import { s as startOfflineReconnection } from './api-
|
|
1
|
+
import { c as configuration } from './configuration-IhRiLDVe.mjs';
|
|
2
|
+
import { s as startOfflineReconnection } from './api-_LeBScjg.mjs';
|
|
3
3
|
|
|
4
4
|
function createOfflineSessionStub(sessionTag) {
|
|
5
5
|
return {
|
package/dist/{setupOfflineReconnection-BKLfOd-i.cjs → setupOfflineReconnection-DduOsw6p.cjs}
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var configuration = require('./configuration-
|
|
4
|
-
var api = require('./api-
|
|
3
|
+
var configuration = require('./configuration-CXEVKAyF.cjs');
|
|
4
|
+
var api = require('./api-hMDsC6Wg.cjs');
|
|
5
5
|
|
|
6
6
|
function createOfflineSessionStub(sessionTag) {
|
|
7
7
|
return {
|
|
@@ -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-CRMfOJhh.mjs';
|
|
2
|
+
import { s as sharedProjectsClient } from './client-Bm4oKvW7.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,
|
|
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-8ILulwjc.mjs';
|
|
7
|
+
import { c as readPersistedSessions } from './persistence-DWcHe035.mjs';
|
|
8
|
+
import { t as parseLatestModelTable } from './index-DYD3GM1m.mjs';
|
|
9
|
+
import { c as configuration } from './configuration-IhRiLDVe.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-8AA47z8Y.mjs';
|
|
12
|
+
import { C as CodexAppServerClient } from './codexAppServerClient-BWJbLCQn.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-gU88-W9F.mjs';
|
|
15
|
+
import { i as isValidSpawnOrigin } from './createSessionMetadata-oyaTZm1b.mjs';
|
|
16
|
+
import { l as logger } from './logger-Fd_rNvgd.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-6KkRAops.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-Da5AR-4u.mjs';
|
|
33
33
|
import './processTree-CP5IvQ2Z.mjs';
|
|
34
34
|
import 'axios';
|
|
35
|
-
import './time-
|
|
35
|
+
import './time-bzmet4s5.mjs';
|
|
36
36
|
import './specialCommands-MXUN0wfI.mjs';
|
|
37
37
|
import 'socket.io-client';
|
|
38
38
|
import './backgroundTaskActivity-8PdPxrvy.mjs';
|
|
@@ -155,6 +155,10 @@ function parseSpawnArgs(args) {
|
|
|
155
155
|
const value = args[++i];
|
|
156
156
|
if (value === void 0 || value.trim().length === 0) throw new Error("--model requires a value");
|
|
157
157
|
options.model = value;
|
|
158
|
+
} else if (arg === "--account") {
|
|
159
|
+
const value = args[++i];
|
|
160
|
+
if (value === void 0 || !/^[a-z0-9][a-z0-9-]{0,47}$/.test(value)) throw new Error('--account requires an account id (see `very-happy account list`) or "machine"');
|
|
161
|
+
options.account = value;
|
|
158
162
|
} else if (arg === "--fork") {
|
|
159
163
|
const value = args[++i];
|
|
160
164
|
if (value === void 0) throw new Error("--fork requires a session id");
|
|
@@ -190,8 +194,8 @@ ${chalk.bold("very-happy spawn")} - Spawn a remote session via the local daemon
|
|
|
190
194
|
${chalk.bold("Usage:")}
|
|
191
195
|
very-happy spawn --dir <path> [--prompt <text> | --prompt-file <file>]
|
|
192
196
|
[--spawned-by <name>] [--permission-mode <mode>]
|
|
193
|
-
[--agent <name>] [--model <id>] [--
|
|
194
|
-
[--project <id> | --no-project] [--json]
|
|
197
|
+
[--agent <name>] [--model <id>] [--account <id>]
|
|
198
|
+
[--env KEY=VALUE]... [--project <id> | --no-project] [--json]
|
|
195
199
|
very-happy spawn --fork <sessionId> [--prompt \u2026] [--permission-mode <mode>]
|
|
196
200
|
[--model <id>] [--spawned-by <name>] [--project <id>]
|
|
197
201
|
[--json]
|
|
@@ -218,6 +222,10 @@ ${chalk.bold("Options:")}
|
|
|
218
222
|
machine runs (claude: newest Opus; codex: newest
|
|
219
223
|
sol its Codex lists; gemini: newest pro), else the
|
|
220
224
|
machine default. 'default' = the machine default.
|
|
225
|
+
--account <id> Claude account on this machine (\`very-happy account
|
|
226
|
+
list\`); 'machine' = the machine's own login.
|
|
227
|
+
Default = the machine's default account, if set. A
|
|
228
|
+
missing or expired account fails the spawn.
|
|
221
229
|
--fork <sessionId> Fork an existing session of THIS machine (same as the
|
|
222
230
|
web's fork): copies its conversation and continues
|
|
223
231
|
it in a new session, in the same directory and with
|
|
@@ -380,7 +388,8 @@ async function handleSpawnCommand(args) {
|
|
|
380
388
|
// through, an old wrapper ignores it).
|
|
381
389
|
environmentVariables: spawnEnvironmentVariables(options.env, prompt !== void 0),
|
|
382
390
|
...resumeIds,
|
|
383
|
-
...forkSource ? { parentSessionId: forkSource.parentSessionId } : {}
|
|
391
|
+
...forkSource ? { parentSessionId: forkSource.parentSessionId } : {},
|
|
392
|
+
...options.account ? { agentProfileId: options.account === "machine" ? null : options.account } : {}
|
|
384
393
|
});
|
|
385
394
|
if (result?.error || !result?.success || !result?.sessionId) {
|
|
386
395
|
const message = result?.error || "Daemon returned no session ID";
|