very-happy-cli 0.2.191 → 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-CCy_9AfR.mjs → AcpBackend-B4PwjqHt.mjs} +3 -3
- package/dist/{AcpBackend-DgrIc1vH.cjs → AcpBackend-DtJCgftG.cjs} +3 -3
- package/dist/{AcpSessionManager-CQnxx7gD.mjs → AcpSessionManager-BzKWgkdP.mjs} +2 -2
- package/dist/{AcpSessionManager-DVOzCD3P.cjs → AcpSessionManager-D4qshX_H.cjs} +2 -2
- package/dist/{BasePermissionHandler-C9Ag7yvs.cjs → BasePermissionHandler-5iG-cvA2.cjs} +1 -1
- package/dist/{BasePermissionHandler-DYLN6Ec9.mjs → BasePermissionHandler-DV6UM6e9.mjs} +1 -1
- package/dist/account-Dco_nGT4.mjs +297 -0
- package/dist/account-DvpA60oU.cjs +302 -0
- package/dist/accountService-Cd7bnkfd.mjs +916 -0
- package/dist/accountService-CuUSJDhP.cjs +921 -0
- package/dist/{acpSessionResume-TvP_4Zq2.cjs → acpSessionResume-Bk9mjXZ9.cjs} +1 -1
- package/dist/{acpSessionResume-Bi7pA1n_.mjs → acpSessionResume-TQwN9ZZE.mjs} +1 -1
- package/dist/{agentHome-DGv105SR.mjs → agentHome-Bep8semY.mjs} +4 -4
- package/dist/{agentHome-DNUKJWOY.cjs → agentHome-c2dlgcw1.cjs} +4 -4
- package/dist/{api-BBxZ7y2z.cjs → api-CBE_a88I.cjs} +10 -10
- package/dist/{api-jfeMRg5R.mjs → api-DUfunY3x.mjs} +10 -10
- package/dist/{apiMachine-DqyjKBZG.cjs → apiMachine-BqtG0IWm.cjs} +83 -27
- package/dist/{apiMachine-DRJ7y-BB.mjs → apiMachine-CU_bw5nV.mjs} +78 -22
- package/dist/{attachmentContent-BO2njyza.cjs → attachmentContent-B3AzuYqk.cjs} +2 -2
- package/dist/{attachmentContent-Dm_RIs5L.mjs → attachmentContent-KNIZxwlu.mjs} +2 -2
- package/dist/{auth-BYDtjVNb.mjs → auth-CZ7pKS-j.mjs} +8 -8
- package/dist/{auth-DnxoVkkf.cjs → auth-DCjxpI6Z.cjs} +5 -5
- package/dist/{auth-DLR3ksCF.cjs → auth-SJ_dPw7H.cjs} +8 -8
- package/dist/{auth-DC6rg8lJ.mjs → auth-jN5dNqTO.mjs} +5 -5
- package/dist/{auto-CwO0u8hB.cjs → auto-B_59RYH1.cjs} +23 -21
- package/dist/{auto-D5Jhukq1.mjs → auto-DC0Sq-qB.mjs} +23 -21
- package/dist/{bootstrap-rLaL3kTa.mjs → bootstrap-B3gMpU9e.mjs} +2 -2
- package/dist/{bootstrap-sly4qPPY.cjs → bootstrap-CoJu9VnB.cjs} +2 -2
- package/dist/{browser-CHpVgyni.mjs → browser-LHW2hBH8.mjs} +1 -1
- package/dist/{browser-BTgZ9d4i.cjs → browser-v1pdPP1E.cjs} +1 -1
- package/dist/claudeAccountEnv-BL1pR_37.mjs +133 -0
- package/dist/claudeAccountEnv-CEX_EMZr.cjs +138 -0
- package/dist/{claudeLocal-Bgb5GGsq.mjs → claudeLocal-BZUgA5G2.mjs} +5 -5
- package/dist/{claudeLocal-1vuTFcL8.cjs → claudeLocal-BrzM2RBI.cjs} +5 -5
- package/dist/{claudeLocalLauncher-T7EfT68h.mjs → claudeLocalLauncher-A0AQyHFi.mjs} +10 -10
- package/dist/{claudeLocalLauncher-DOsL6HFY.cjs → claudeLocalLauncher-XAMpXUM7.cjs} +10 -10
- package/dist/{claudeSessionFork-Cko4SaVi.cjs → claudeSessionFork-Mhn2fYe_.cjs} +1 -1
- package/dist/{claudeSessionFork-CPvi6yDX.mjs → claudeSessionFork-_GwIlmMB.mjs} +1 -1
- package/dist/{client-BXD66ZF5.mjs → client-7RnI9J0W.mjs} +2 -2
- package/dist/{client-Bi20Ka0h.mjs → client-Bde4QVIn.mjs} +4 -2
- package/dist/{client-C5-C0t2a.cjs → client-CJr8Pjwm.cjs} +4 -2
- package/dist/{client-BscskEBk.cjs → client-D2GWkd-T.cjs} +2 -2
- package/dist/{client-C-OdTbrU.cjs → client-DLlnmAPL.cjs} +4 -4
- package/dist/{client-Bh1aUPh-.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-DXhAf6i-.mjs → codexAppServerClient-B3QJV6Ey.mjs} +18 -7
- package/dist/{codexAppServerClient-DKXeikEe.cjs → codexAppServerClient-DWEsZUC4.cjs} +18 -7
- package/dist/{codexCommand-DvbbpYBS.cjs → codexCommand-Bg8AmxVm.cjs} +195 -63
- package/dist/{codexCommand-CIaOiiOj.mjs → codexCommand-D1xlj4sT.mjs} +196 -64
- package/dist/{codexTermination-BszWfyk5.cjs → codexTermination-ByX9GcEJ.cjs} +1 -1
- package/dist/{codexTermination-BcQdEDaw.mjs → codexTermination-CaWAVQjZ.mjs} +1 -1
- package/dist/{config-Di3Cf6js.cjs → config-B2GGbiTv.cjs} +3 -3
- package/dist/{config-OCEcVVK1.mjs → config-C2XYEwXz.mjs} +3 -3
- package/dist/{configuration-DfPBa-9d.cjs → configuration-BBK0rmmj.cjs} +1 -1
- package/dist/{configuration-ECqXu34R.mjs → configuration-ThKBP_zY.mjs} +1 -1
- package/dist/{connect-BTfAUhk8.mjs → connect-BirnCl9q.mjs} +13 -13
- package/dist/{connect-BPQRuOw5.cjs → connect-C3tZs_NC.cjs} +13 -13
- package/dist/{context-CfgTFpCB.mjs → context-C0EFLnOg.mjs} +1 -1
- package/dist/{context-Co7hUaW-.cjs → context-wDp0aZBK.cjs} +1 -1
- package/dist/{controlClient-ClI7A0qE.mjs → controlClient-Ckl8N1MS.mjs} +14 -5
- package/dist/{controlClient-C13_pSKG.cjs → controlClient-DwWTns3A.cjs} +15 -4
- package/dist/{createSessionMetadata-Cf78KHtt.cjs → createSessionMetadata-DqZ6h02H.cjs} +2 -2
- package/dist/{createSessionMetadata-B0eT_Kfj.mjs → createSessionMetadata-vug4Cv8z.mjs} +2 -2
- package/dist/daemonAccounts-CpGDY_4k.cjs +54 -0
- package/dist/daemonAccounts-DwPwKxvv.mjs +30 -0
- package/dist/{defaultPermissionMode-oqTupStc.cjs → defaultPermissionMode-BakXiqRr.cjs} +1 -1
- package/dist/{defaultPermissionMode-m6z2QVyP.mjs → defaultPermissionMode-DF5AfeBb.mjs} +1 -1
- package/dist/{deterministicJson-BtSwbsok.mjs → deterministicJson-BzX94gi3.mjs} +13 -13
- package/dist/{deterministicJson-CpFFgUL_.cjs → deterministicJson-t33SsuRC.cjs} +13 -13
- package/dist/{doctor-BEU0_1Xv.cjs → doctor-B9ug1LZb.cjs} +7 -7
- package/dist/{doctor-lsxmAK4o.mjs → doctor-C1zyOSXw.mjs} +7 -7
- package/dist/{downloadTarget-BXqXhNF7.mjs → downloadTarget-Baslc6jW.mjs} +6 -6
- package/dist/{downloadTarget-CikzJv1h.cjs → downloadTarget-T1id2Gh6.cjs} +6 -6
- package/dist/{ensureDaemonRunning-B_9WAlbU.mjs → ensureDaemonRunning-C6ERYK-O.mjs} +5 -5
- package/dist/{ensureDaemonRunning-BUuH-pbE.cjs → ensureDaemonRunning-CoAg11Zi.cjs} +5 -5
- package/dist/{handleResumeCommand-BK9XKH_l.mjs → handleResumeCommand-CrlqDuz7.mjs} +5 -5
- package/dist/{handleResumeCommand-Dj7oi2KO.cjs → handleResumeCommand-DPi-sPm7.cjs} +5 -5
- package/dist/{index-D3c7CLot.cjs → index-B1swQJUS.cjs} +4 -4
- package/dist/{index-CmZusg8Q.cjs → index-B2dJA8VG.cjs} +3 -3
- package/dist/{index-CLUHaPU8.cjs → index-BUFrKZeQ.cjs} +205 -5
- package/dist/{index-BjZnpGWX.mjs → index-BbdV2mzy.mjs} +3 -3
- package/dist/{index-BdOJOZ6J.mjs → index-BcSPg3c5.mjs} +4 -4
- package/dist/{index-CauRYQKr.cjs → index-Bkslzin5.cjs} +44 -40
- package/dist/{index-DuK9XYbZ.mjs → index-Cn73rdtQ.mjs} +4 -4
- package/dist/{index-Bq8NKSCF.mjs → index-D1YnIih6.mjs} +195 -6
- package/dist/{index-Cxso1rg4.mjs → index-fZO4nF6e.mjs} +45 -41
- package/dist/{index-Dg2NAF_-.cjs → index-rocrvOYG.cjs} +4 -4
- package/dist/index.cjs +2 -2
- package/dist/index.mjs +2 -2
- package/dist/{install-DXllkuy0.cjs → install-CArXjPfW.cjs} +3 -3
- package/dist/{install-DTIveLOS.mjs → install-CChhyV2G.mjs} +3 -3
- package/dist/lib.cjs +12 -12
- package/dist/lib.d.cts +354 -0
- package/dist/lib.d.mts +354 -0
- package/dist/lib.mjs +12 -12
- package/dist/{lidState-CD81ryTy.mjs → lidState-B6yYKjNK.mjs} +1 -1
- package/dist/{lidState-C9_DoF9i.cjs → lidState-B_v6qgfE.cjs} +1 -1
- package/dist/{localHappyAgentAuth-Cg-m1lwm.mjs → localHappyAgentAuth-KRlg_aI0.mjs} +1 -1
- package/dist/{localHappyAgentAuth-CCjUvOfi.cjs → localHappyAgentAuth-jJH0n67S.cjs} +1 -1
- package/dist/{logger-Ct2zvaq0.cjs → logger-CX3x2eI4.cjs} +2 -2
- package/dist/{logger-GcbI0eg2.mjs → logger-JV7-4Q_6.mjs} +2 -2
- package/dist/{machineMetadata-CXRmFNOV.mjs → machineMetadata-D5-SW9kv.mjs} +3 -3
- package/dist/{machineMetadata-DDCVWb_x.cjs → machineMetadata-DhZuM0iB.cjs} +3 -3
- package/dist/{main-BHC-WIcM.cjs → main-1x1HGQEy.cjs} +92 -48
- package/dist/{main-omGr_ONk.mjs → main-CFOdXbPD.mjs} +92 -48
- package/dist/{mcp-xUzii0m8.cjs → mcp-BnKBSEh7.cjs} +18 -15
- package/dist/{mcp-D5hxmRAq.mjs → mcp-R6lMcFLO.mjs} +18 -15
- package/dist/{mirrorProtocol-Lcx20Oby.mjs → mirrorProtocol-CD4ntuZJ.mjs} +3 -3
- package/dist/{mirrorProtocol-Dfl8Ahyf.cjs → mirrorProtocol-DO-KtvAL.cjs} +3 -3
- package/dist/{package-BsUHyqWe.mjs → package-Bw3H6VLn.mjs} +7 -7
- package/dist/{package-9n7wd2dT.cjs → package-uzlvxa5S.cjs} +7 -7
- package/dist/{panels-CpEKWWbI.mjs → panels-BamhZCoZ.mjs} +5 -5
- package/dist/{panels-BfknEmt7.cjs → panels-C46FxjmH.cjs} +5 -5
- package/dist/{peerTools-CElYh-5u.cjs → peerTools-D-VNNFw-.cjs} +5 -5
- package/dist/{peerTools-CwCe6tmJ.mjs → peerTools-WtRgTSqG.mjs} +5 -5
- package/dist/{persistence-Cpw4yJs8.mjs → persistence-Cg4sfjQV.mjs} +2 -2
- package/dist/{persistence-A2NeERZJ.cjs → persistence-CsmAgN-C.cjs} +2 -2
- package/dist/{piRunnerArgs-Bqmu16He.mjs → piRunnerArgs-BbaAQvb4.mjs} +2 -2
- package/dist/{piRunnerArgs-BnFU0K73.cjs → piRunnerArgs-vnFygygF.cjs} +1 -1
- package/dist/{piRuntime-Cgn1b0OX.mjs → piRuntime-Bid7TBf5.mjs} +1 -1
- package/dist/{piRuntime-DpS9TAIs.cjs → piRuntime-C2uj5Ucx.cjs} +1 -1
- package/dist/{piTerminal-rmve-VlI.cjs → piTerminal-Ckpjfoqa.cjs} +20 -17
- package/dist/{piTerminal-BGdps8f3.mjs → piTerminal-CqxgrI13.mjs} +20 -17
- package/dist/{pushNotifications-23YSd-0l.cjs → pushNotifications-BCg7YAiu.cjs} +5 -3
- package/dist/{pushNotifications-XAM8__Pg.mjs → pushNotifications-BbE-qV9I.mjs} +5 -3
- package/dist/{query-SZcYnJoW.mjs → query-Bfr9O_62.mjs} +1 -1
- package/dist/{query-u2GX-I0C.cjs → query-vQ-HG394.cjs} +1 -1
- package/dist/{rateLimitReporter-CaTzBe3x.cjs → rateLimitReporter-BZ8x0-6-.cjs} +3 -3
- package/dist/{rateLimitReporter-COUkf446.mjs → rateLimitReporter-CAz7VMw4.mjs} +3 -3
- package/dist/{rateLimitWindows-B2Kx6L0S.cjs → rateLimitWindows-BZl6GMwQ.cjs} +1 -1
- package/dist/{rateLimitWindows-j_qQk0KY.mjs → rateLimitWindows-CRARnKaI.mjs} +1 -1
- package/dist/reconnectEnv-B31lY4nR.cjs +27 -0
- package/dist/reconnectEnv-DeSvHl3q.mjs +24 -0
- package/dist/{registerCommonHandlers-D1MiSfcB.cjs → registerCommonHandlers-CZGmrPbT.cjs} +2 -2
- package/dist/{registerCommonHandlers-DRRfinzK.mjs → registerCommonHandlers-Cj3Nl9y-.mjs} +2 -2
- package/dist/{registerKillSessionHandler-Cpug_r5C.mjs → registerKillSessionHandler-Bg9t45Ub.mjs} +6 -6
- package/dist/{registerKillSessionHandler-hvCsEn7b.cjs → registerKillSessionHandler-C3EDnW4F.cjs} +6 -6
- package/dist/{remoteSessionClient-BdnJ_n8C.mjs → remoteSessionClient--0vfA7I5.mjs} +5 -5
- package/dist/{remoteSessionClient-6ymeMVa4.cjs → remoteSessionClient-CcSP24Zq.cjs} +5 -5
- package/dist/{reportProgressTool-XgQBzxoD.mjs → reportProgressTool-DVru7jc_.mjs} +3 -3
- package/dist/{reportProgressTool-tzQLCLIw.cjs → reportProgressTool-Ddg1yVq2.cjs} +3 -3
- package/dist/{run-DYL_wuj7.cjs → run-BTrIT_jU.cjs} +347 -856
- package/dist/{run-Bt0AklUU.mjs → run-HtvH6BLi.mjs} +346 -855
- package/dist/{runClaude-C3rii_S6.mjs → runClaude-DsHTk5Bu.mjs} +62 -44
- package/dist/{runClaude-CBEpYO4S.cjs → runClaude-ipjwAHPI.cjs} +62 -44
- package/dist/{runClaudeDeps-CYuozSC6.cjs → runClaudeDeps-BKpwL6ln.cjs} +51 -42
- package/dist/{runClaudeDeps-DlVfMG4F.mjs → runClaudeDeps-BV3vpeyY.mjs} +56 -47
- package/dist/{runGemini-CEI3b90u.cjs → runGemini-B-G0_7Ab.cjs} +33 -33
- package/dist/{runGemini-DkYhRk9S.mjs → runGemini-DhjK6_Fp.mjs} +33 -33
- package/dist/{runOpenClaw-DpprWCoz.mjs → runOpenClaw-B6lawk8n.mjs} +18 -18
- package/dist/{runOpenClaw-BgjD6E4d.cjs → runOpenClaw-BHIo8tkn.cjs} +18 -18
- package/dist/{sandbox-XCDUbH72.cjs → sandbox-BAsO0ILe.cjs} +4 -4
- package/dist/{sandbox-DJ7A7lsy.mjs → sandbox-CKb7pCXg.mjs} +4 -4
- package/dist/selfCheck-CZ-t1Xzq.mjs +88 -0
- package/dist/{selfCheck-BYUDB1Uq.cjs → selfCheck-D4VvVZNi.cjs} +39 -37
- package/dist/{send-CASDBCyJ.cjs → send-Cz5m39QR.cjs} +8 -8
- package/dist/{send-Ba63huxv.mjs → send-D8ipLKMY.mjs} +8 -8
- package/dist/{server-w3W0toNd.mjs → server-CjvgT3N9.mjs} +4 -4
- package/dist/{server-cZoV9XRt.cjs → server-CySyJKPH.cjs} +6 -6
- package/dist/{sessionLock-G2PMqvsh.mjs → sessionLock-B73fhgQN.mjs} +10 -4
- package/dist/{sessionLock-BmLA2S8K.cjs → sessionLock-DdDCuNUs.cjs} +10 -3
- package/dist/{sessionOps-DPw5k8vV.mjs → sessionOps-C65Iej_C.mjs} +50 -8
- package/dist/{sessionOps-DXlTmS7J.cjs → sessionOps-XSEjIqNq.cjs} +50 -8
- package/dist/sessionProvider-CLVNkfji.mjs +110 -0
- package/dist/sessionProvider-Dgsty8z_.cjs +115 -0
- package/dist/{sessionScanner-AHjnicxi.cjs → sessionScanner-D8IVXMMH.cjs} +3 -3
- package/dist/{sessionScanner-BCXpdZJN.mjs → sessionScanner-MW1P9Pm9.mjs} +3 -3
- package/dist/{sessions-BiBXOBx0.cjs → sessions-BKz7gZqg.cjs} +10 -10
- package/dist/{sessions-Clk8MR5Y.mjs → sessions-Dtk_agUL.mjs} +10 -10
- package/dist/{setupOfflineReconnection-DI-QZGYz.mjs → setupOfflineReconnection-Bvdy-2xd.mjs} +2 -2
- package/dist/{setupOfflineReconnection-BKLfOd-i.cjs → setupOfflineReconnection-DxMiW7OV.cjs} +2 -2
- package/dist/{spawn-D5omsx1Q.cjs → spawn-DiPkJcrQ.cjs} +36 -17
- package/dist/{spawn-4tsp1uhh.mjs → spawn-Dm4xsZBX.mjs} +36 -17
- package/dist/{spawnAgents-CtkkIFHd.cjs → spawnAgents-B9olJ8xn.cjs} +1 -1
- package/dist/{spawnAgents-CjoU6ZOS.mjs → spawnAgents-I29H9nO8.mjs} +1 -1
- package/dist/{spawnHappyCLI-CF_gLi92.cjs → spawnHappyCLI-BYGOUda1.cjs} +1 -1
- package/dist/{spawnHappyCLI-CIA9Sc_5.mjs → spawnHappyCLI-CnMwzjWX.mjs} +1 -1
- package/dist/{startFileWatcher-9Stpxe7p.cjs → startFileWatcher-D14W6gn-.cjs} +1 -1
- package/dist/{startFileWatcher-CDO6fb2m.mjs → startFileWatcher-DePAY1T5.mjs} +1 -1
- package/dist/{startupSessionCreate-BtR4iYEC.mjs → startupSessionCreate-DoK0IvJG.mjs} +3 -3
- package/dist/{startupSessionCreate-CcF7rGGB.cjs → startupSessionCreate-rBHd4tc1.cjs} +3 -3
- package/dist/store-CkNa6oj4.cjs +326 -0
- package/dist/store-Vej_738f.mjs +305 -0
- package/dist/{streamRelay-BhI6jqF-.cjs → streamRelay-C0G1HOOd.cjs} +1 -1
- package/dist/{streamRelay-DMwOMTKf.mjs → streamRelay-C5U-C4GS.mjs} +1 -1
- package/dist/{sync-C0PRuTMj.mjs → sync-BP6vnxVP.mjs} +1 -1
- package/dist/{sync-Ba8N6xba.cjs → sync-WYBwkJvG.cjs} +1 -1
- package/dist/{systemPrompt-DV5IReD4.cjs → systemPrompt-BkQlCk5_.cjs} +2 -2
- package/dist/{systemPrompt-D0q8eyjy.mjs → systemPrompt-aRqBmkpw.mjs} +2 -2
- package/dist/{teams-BO3_arwM.mjs → teams-CGmC4ygu.mjs} +7 -7
- package/dist/{teams-z3Gp-KlV.cjs → teams-phbpwAGD.cjs} +7 -7
- package/dist/{template-B_5l6pkc.cjs → template-B9pLEP8v.cjs} +2 -2
- package/dist/{template-DLR_0hfj.mjs → template-CL9EvQLQ.mjs} +2 -2
- package/dist/{time-Cy0a-7YX.cjs → time-BTLcO8jp.cjs} +1 -1
- package/dist/{time-D0jvDRhn.mjs → time-Cw0liIqB.mjs} +1 -1
- package/dist/{titleGenerator-RGHWP2YL.cjs → titleGenerator-Y1_7ceJC.cjs} +17 -13
- package/dist/{titleGenerator-AGQsXskb.mjs → titleGenerator-h6TmFe-c.mjs} +16 -12
- package/dist/{todo-CzIDPLFy.cjs → todo-BxiPiCvB.cjs} +6 -6
- package/dist/{todo-BZ954vsz.mjs → todo-OKcTC_VC.mjs} +6 -6
- package/dist/{tools-Bei5i03L.mjs → tools-BR-drXZ8.mjs} +3 -2
- package/dist/{tools-B1x1j6tz.cjs → tools-CcebYtLj.cjs} +3 -2
- package/dist/{uninstall-C3cnIvz1.cjs → uninstall-CnDeCC-M.cjs} +3 -3
- package/dist/{uninstall-B4T_e3Mr.mjs → uninstall-D3stWKD2.mjs} +3 -3
- package/dist/wrapperAccount-BkufO_9g.mjs +107 -0
- package/dist/wrapperAccount-D2A4DuZy.cjs +113 -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,9 +1,9 @@
|
|
|
1
|
-
import { o as hibernationReplaySeq } from './persistence-
|
|
1
|
+
import { o as hibernationReplaySeq } from './persistence-Cg4sfjQV.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-ThKBP_zY.mjs';
|
|
6
|
+
import { l as logger } from './logger-JV7-4Q_6.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,11 +1,11 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var persistence = require('./persistence-
|
|
3
|
+
var persistence = require('./persistence-CsmAgN-C.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-BBK0rmmj.cjs');
|
|
8
|
+
var logger = require('./logger-CX3x2eI4.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,10 +1,10 @@
|
|
|
1
1
|
import axios from 'axios';
|
|
2
|
-
import { c as configuration } from './configuration-
|
|
2
|
+
import { c as configuration } from './configuration-ThKBP_zY.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-Ckl8N1MS.mjs';
|
|
5
|
+
import { b as readCredentialsForConfiguredRelay, c as readPersistedSessions } from './persistence-Cg4sfjQV.mjs';
|
|
6
6
|
import { randomUUID } from 'node:crypto';
|
|
7
|
-
import { d as delay } from './time-
|
|
7
|
+
import { d as delay } from './time-Cw0liIqB.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';
|
|
@@ -204,6 +204,19 @@ function isControlCommand(text) {
|
|
|
204
204
|
return compactCommandText(text) !== null || parseClear(text).isClear;
|
|
205
205
|
}
|
|
206
206
|
const COMPACTION_FAILED = "Compaction failed:";
|
|
207
|
+
function discardReason(body, localId) {
|
|
208
|
+
if (!localId) return null;
|
|
209
|
+
const env = sessionEnvelope(body);
|
|
210
|
+
if (env?.ev?.t !== "queue-cancel" || !Array.isArray(env.ev.targetLocalKeys)) return null;
|
|
211
|
+
if (!env.ev.targetLocalKeys.includes(localId)) return null;
|
|
212
|
+
return typeof env.ev.reason === "string" && env.ev.reason.length > 0 ? env.ev.reason : "canceled";
|
|
213
|
+
}
|
|
214
|
+
function accountNotice(body) {
|
|
215
|
+
const b = asRecord(body);
|
|
216
|
+
const data = b?.role === "agent" && b.content?.type === "event" ? asRecord(b.content.data) : null;
|
|
217
|
+
if (data?.type !== "message" || typeof data.message !== "string" || typeof data.kind !== "string") return null;
|
|
218
|
+
return data.kind.startsWith("agent-profile-") ? { kind: data.kind, message: data.message } : null;
|
|
219
|
+
}
|
|
207
220
|
function controlCommandVerdict(body) {
|
|
208
221
|
const b = asRecord(body);
|
|
209
222
|
const data = b?.role === "agent" && b.content?.type === "event" ? asRecord(b.content.data) : null;
|
|
@@ -235,6 +248,10 @@ function analyzeLatestTurn(entries, options = {}) {
|
|
|
235
248
|
const steerAnchor = userIndex >= 0 && isSteerPrompt(entries[userIndex].body);
|
|
236
249
|
const anchorText = userIndex >= 0 ? userPromptText(entries[userIndex].body) : null;
|
|
237
250
|
const commandAnchor = anchorText !== null && isControlCommand(anchorText);
|
|
251
|
+
const anchorLocalId = userIndex >= 0 ? entries[userIndex].localId : null;
|
|
252
|
+
let discarded = null;
|
|
253
|
+
let refused = false;
|
|
254
|
+
let historyRejected = null;
|
|
238
255
|
for (let i = userIndex + 1; i < entries.length; i++) {
|
|
239
256
|
const body = entries[i].body;
|
|
240
257
|
if (options.anchor && isUserPrompt(body)) {
|
|
@@ -249,8 +266,28 @@ function analyzeLatestTurn(entries, options = {}) {
|
|
|
249
266
|
status = null;
|
|
250
267
|
error = null;
|
|
251
268
|
texts = [];
|
|
269
|
+
discarded = null;
|
|
270
|
+
refused = false;
|
|
271
|
+
historyRejected = null;
|
|
252
272
|
continue;
|
|
253
273
|
}
|
|
274
|
+
const reason = !ended ? discardReason(body, anchorLocalId) : null;
|
|
275
|
+
if (reason) {
|
|
276
|
+
ended = true;
|
|
277
|
+
discarded = reason;
|
|
278
|
+
status = reason === "failed" ? "failed" : "cancelled";
|
|
279
|
+
error = "Not executed";
|
|
280
|
+
continue;
|
|
281
|
+
}
|
|
282
|
+
const notice = accountNotice(body);
|
|
283
|
+
if (notice?.kind === "agent-profile-history-rejected") historyRejected = notice.message;
|
|
284
|
+
if (discarded) {
|
|
285
|
+
if (notice?.kind === "agent-profile-unavailable" && !refused) {
|
|
286
|
+
refused = true;
|
|
287
|
+
error = `Not executed: ${notice.message}`;
|
|
288
|
+
}
|
|
289
|
+
if (env?.ev?.t === "turn-end") continue;
|
|
290
|
+
}
|
|
254
291
|
if (env?.ev?.t === "turn-end") {
|
|
255
292
|
lastMarker = "end";
|
|
256
293
|
if (userIndex >= 0 && emitsStarts && !startedAfterPrompt && !steerAnchor) continue;
|
|
@@ -272,13 +309,17 @@ function analyzeLatestTurn(entries, options = {}) {
|
|
|
272
309
|
else texts.push(piece.text);
|
|
273
310
|
}
|
|
274
311
|
if (userIndex < 0) ended = lastMarker === "end";
|
|
312
|
+
const rejectedHistory = ended && !discarded && status === "failed" && historyRejected !== null;
|
|
313
|
+
if (rejectedHistory) error = error ? `${historyRejected} (${error})` : historyRejected;
|
|
275
314
|
return {
|
|
276
315
|
userSeq: userIndex >= 0 ? entries[userIndex].seq : null,
|
|
277
316
|
ended,
|
|
278
317
|
status: ended ? status : null,
|
|
279
318
|
error: ended ? error : null,
|
|
280
319
|
answer: texts.join("\n\n").trim(),
|
|
281
|
-
lastSeq
|
|
320
|
+
lastSeq,
|
|
321
|
+
...ended && discarded ? { discarded, ...refused ? { refusal: "agent-profile-unavailable" } : {} } : {},
|
|
322
|
+
...rejectedHistory ? { refusal: "agent-profile-history-rejected" } : {}
|
|
282
323
|
};
|
|
283
324
|
}
|
|
284
325
|
|
|
@@ -679,11 +720,12 @@ async function readSessionLog(sessionId, persisted, limit) {
|
|
|
679
720
|
messages.reverse();
|
|
680
721
|
const key = decodeBase64(persisted.encryptionKey);
|
|
681
722
|
return messages.map((message) => {
|
|
682
|
-
|
|
723
|
+
const localId = typeof message.localId === "string" ? message.localId : null;
|
|
724
|
+
if (message.content?.t !== "encrypted") return { seq: message.seq, body: null, localId };
|
|
683
725
|
try {
|
|
684
|
-
return { seq: message.seq, body: decrypt(key, persisted.encryptionVariant, decodeBase64(message.content.c)) };
|
|
726
|
+
return { seq: message.seq, body: decrypt(key, persisted.encryptionVariant, decodeBase64(message.content.c)), localId };
|
|
685
727
|
} catch {
|
|
686
|
-
return { seq: message.seq, body: null };
|
|
728
|
+
return { seq: message.seq, body: null, localId };
|
|
687
729
|
}
|
|
688
730
|
});
|
|
689
731
|
}
|
|
@@ -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-BBK0rmmj.cjs');
|
|
5
5
|
var authRelay = require('./authRelay-Dy1qU9td.cjs');
|
|
6
|
-
var controlClient = require('./controlClient-
|
|
7
|
-
var persistence = require('./persistence-
|
|
6
|
+
var controlClient = require('./controlClient-DwWTns3A.cjs');
|
|
7
|
+
var persistence = require('./persistence-CsmAgN-C.cjs');
|
|
8
8
|
var node_crypto = require('node:crypto');
|
|
9
|
-
var time = require('./time-
|
|
9
|
+
var time = require('./time-BTLcO8jp.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');
|
|
@@ -206,6 +206,19 @@ function isControlCommand(text) {
|
|
|
206
206
|
return specialCommands.compactCommandText(text) !== null || specialCommands.parseClear(text).isClear;
|
|
207
207
|
}
|
|
208
208
|
const COMPACTION_FAILED = "Compaction failed:";
|
|
209
|
+
function discardReason(body, localId) {
|
|
210
|
+
if (!localId) return null;
|
|
211
|
+
const env = sessionEnvelope(body);
|
|
212
|
+
if (env?.ev?.t !== "queue-cancel" || !Array.isArray(env.ev.targetLocalKeys)) return null;
|
|
213
|
+
if (!env.ev.targetLocalKeys.includes(localId)) return null;
|
|
214
|
+
return typeof env.ev.reason === "string" && env.ev.reason.length > 0 ? env.ev.reason : "canceled";
|
|
215
|
+
}
|
|
216
|
+
function accountNotice(body) {
|
|
217
|
+
const b = asRecord(body);
|
|
218
|
+
const data = b?.role === "agent" && b.content?.type === "event" ? asRecord(b.content.data) : null;
|
|
219
|
+
if (data?.type !== "message" || typeof data.message !== "string" || typeof data.kind !== "string") return null;
|
|
220
|
+
return data.kind.startsWith("agent-profile-") ? { kind: data.kind, message: data.message } : null;
|
|
221
|
+
}
|
|
209
222
|
function controlCommandVerdict(body) {
|
|
210
223
|
const b = asRecord(body);
|
|
211
224
|
const data = b?.role === "agent" && b.content?.type === "event" ? asRecord(b.content.data) : null;
|
|
@@ -237,6 +250,10 @@ function analyzeLatestTurn(entries, options = {}) {
|
|
|
237
250
|
const steerAnchor = userIndex >= 0 && isSteerPrompt(entries[userIndex].body);
|
|
238
251
|
const anchorText = userIndex >= 0 ? userPromptText(entries[userIndex].body) : null;
|
|
239
252
|
const commandAnchor = anchorText !== null && isControlCommand(anchorText);
|
|
253
|
+
const anchorLocalId = userIndex >= 0 ? entries[userIndex].localId : null;
|
|
254
|
+
let discarded = null;
|
|
255
|
+
let refused = false;
|
|
256
|
+
let historyRejected = null;
|
|
240
257
|
for (let i = userIndex + 1; i < entries.length; i++) {
|
|
241
258
|
const body = entries[i].body;
|
|
242
259
|
if (options.anchor && isUserPrompt(body)) {
|
|
@@ -251,8 +268,28 @@ function analyzeLatestTurn(entries, options = {}) {
|
|
|
251
268
|
status = null;
|
|
252
269
|
error = null;
|
|
253
270
|
texts = [];
|
|
271
|
+
discarded = null;
|
|
272
|
+
refused = false;
|
|
273
|
+
historyRejected = null;
|
|
254
274
|
continue;
|
|
255
275
|
}
|
|
276
|
+
const reason = !ended ? discardReason(body, anchorLocalId) : null;
|
|
277
|
+
if (reason) {
|
|
278
|
+
ended = true;
|
|
279
|
+
discarded = reason;
|
|
280
|
+
status = reason === "failed" ? "failed" : "cancelled";
|
|
281
|
+
error = "Not executed";
|
|
282
|
+
continue;
|
|
283
|
+
}
|
|
284
|
+
const notice = accountNotice(body);
|
|
285
|
+
if (notice?.kind === "agent-profile-history-rejected") historyRejected = notice.message;
|
|
286
|
+
if (discarded) {
|
|
287
|
+
if (notice?.kind === "agent-profile-unavailable" && !refused) {
|
|
288
|
+
refused = true;
|
|
289
|
+
error = `Not executed: ${notice.message}`;
|
|
290
|
+
}
|
|
291
|
+
if (env?.ev?.t === "turn-end") continue;
|
|
292
|
+
}
|
|
256
293
|
if (env?.ev?.t === "turn-end") {
|
|
257
294
|
lastMarker = "end";
|
|
258
295
|
if (userIndex >= 0 && emitsStarts && !startedAfterPrompt && !steerAnchor) continue;
|
|
@@ -274,13 +311,17 @@ function analyzeLatestTurn(entries, options = {}) {
|
|
|
274
311
|
else texts.push(piece.text);
|
|
275
312
|
}
|
|
276
313
|
if (userIndex < 0) ended = lastMarker === "end";
|
|
314
|
+
const rejectedHistory = ended && !discarded && status === "failed" && historyRejected !== null;
|
|
315
|
+
if (rejectedHistory) error = error ? `${historyRejected} (${error})` : historyRejected;
|
|
277
316
|
return {
|
|
278
317
|
userSeq: userIndex >= 0 ? entries[userIndex].seq : null,
|
|
279
318
|
ended,
|
|
280
319
|
status: ended ? status : null,
|
|
281
320
|
error: ended ? error : null,
|
|
282
321
|
answer: texts.join("\n\n").trim(),
|
|
283
|
-
lastSeq
|
|
322
|
+
lastSeq,
|
|
323
|
+
...ended && discarded ? { discarded, ...refused ? { refusal: "agent-profile-unavailable" } : {} } : {},
|
|
324
|
+
...rejectedHistory ? { refusal: "agent-profile-history-rejected" } : {}
|
|
284
325
|
};
|
|
285
326
|
}
|
|
286
327
|
|
|
@@ -681,11 +722,12 @@ async function readSessionLog(sessionId, persisted, limit) {
|
|
|
681
722
|
messages.reverse();
|
|
682
723
|
const key = authRelay.decodeBase64(persisted.encryptionKey);
|
|
683
724
|
return messages.map((message) => {
|
|
684
|
-
|
|
725
|
+
const localId = typeof message.localId === "string" ? message.localId : null;
|
|
726
|
+
if (message.content?.t !== "encrypted") return { seq: message.seq, body: null, localId };
|
|
685
727
|
try {
|
|
686
|
-
return { seq: message.seq, body: authRelay.decrypt(key, persisted.encryptionVariant, authRelay.decodeBase64(message.content.c)) };
|
|
728
|
+
return { seq: message.seq, body: authRelay.decrypt(key, persisted.encryptionVariant, authRelay.decodeBase64(message.content.c)), localId };
|
|
687
729
|
} catch {
|
|
688
|
-
return { seq: message.seq, body: null };
|
|
730
|
+
return { seq: message.seq, body: null, localId };
|
|
689
731
|
}
|
|
690
732
|
});
|
|
691
733
|
}
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import chalk from 'chalk';
|
|
2
|
+
import { c as configuration } from './configuration-ThKBP_zY.mjs';
|
|
3
|
+
import { r as restartDaemonSession, l as listDaemonSessions } from './controlClient-Ckl8N1MS.mjs';
|
|
4
|
+
import { A as AccountService, l as localRestartFailure, b as bindResultMessages } from './accountService-Cd7bnkfd.mjs';
|
|
5
|
+
import { r as readSessionBindings, a as readAccounts } from './store-Vej_738f.mjs';
|
|
6
|
+
import 'node:fs';
|
|
7
|
+
import 'node:os';
|
|
8
|
+
import 'node:path';
|
|
9
|
+
import './package-Bw3H6VLn.mjs';
|
|
10
|
+
import 'node:fs/promises';
|
|
11
|
+
import './logger-JV7-4Q_6.mjs';
|
|
12
|
+
import 'node:util';
|
|
13
|
+
import './persistence-Cg4sfjQV.mjs';
|
|
14
|
+
import 'zod';
|
|
15
|
+
import './authRelay-DhQhkBvX.mjs';
|
|
16
|
+
import 'node:crypto';
|
|
17
|
+
import 'tweetnacl';
|
|
18
|
+
import './index-D1YnIih6.mjs';
|
|
19
|
+
import '@paralleldrive/cuid2';
|
|
20
|
+
import 'node:child_process';
|
|
21
|
+
import './claudeAccountEnv-BL1pR_37.mjs';
|
|
22
|
+
import './codexAccount-NOX5pmQf.mjs';
|
|
23
|
+
import 'node:readline';
|
|
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.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(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({
|
|
94
|
+
home,
|
|
95
|
+
restartSession: async (sessionId) => {
|
|
96
|
+
const result2 = await restartDaemonSession(sessionId);
|
|
97
|
+
if (result2.success) return { ok: true };
|
|
98
|
+
const stillRunning = await listDaemonSessions().then((children) => children.some((c) => c?.happySessionId === sessionId), () => false);
|
|
99
|
+
return localRestartFailure(result2.error ?? "restart failed", stillRunning);
|
|
100
|
+
}
|
|
101
|
+
});
|
|
102
|
+
const binding = parsed.action === "set" ? resolveBindingRequest(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 = 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
|
+
export { SESSION_PROVIDER_HELP, handleSessionProviderCommand, parseSessionProviderArgs, resolveBindingRequest };
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chalk = require('chalk');
|
|
4
|
+
var configuration = require('./configuration-BBK0rmmj.cjs');
|
|
5
|
+
var controlClient = require('./controlClient-DwWTns3A.cjs');
|
|
6
|
+
var accountService = require('./accountService-CuUSJDhP.cjs');
|
|
7
|
+
var store = require('./store-CkNa6oj4.cjs');
|
|
8
|
+
require('node:fs');
|
|
9
|
+
require('node:os');
|
|
10
|
+
require('node:path');
|
|
11
|
+
require('./package-uzlvxa5S.cjs');
|
|
12
|
+
require('node:fs/promises');
|
|
13
|
+
require('./logger-CX3x2eI4.cjs');
|
|
14
|
+
require('node:util');
|
|
15
|
+
require('./persistence-CsmAgN-C.cjs');
|
|
16
|
+
require('zod');
|
|
17
|
+
require('./authRelay-Dy1qU9td.cjs');
|
|
18
|
+
require('node:crypto');
|
|
19
|
+
require('tweetnacl');
|
|
20
|
+
require('./index-BUFrKZeQ.cjs');
|
|
21
|
+
require('@paralleldrive/cuid2');
|
|
22
|
+
require('node:child_process');
|
|
23
|
+
require('./claudeAccountEnv-CEX_EMZr.cjs');
|
|
24
|
+
require('./codexAccount-BDQjRbtI.cjs');
|
|
25
|
+
require('node:readline');
|
|
26
|
+
|
|
27
|
+
const SESSION_PROVIDER_HELP = `Usage:
|
|
28
|
+
very-happy session provider --list
|
|
29
|
+
very-happy session provider <sessionId> <profile> [--model <model>] [--no-restart]
|
|
30
|
+
very-happy session provider <sessionId> default [--no-restart]
|
|
31
|
+
|
|
32
|
+
Alias of \`very-happy account bind\`. Binds a Claude session on THIS machine to
|
|
33
|
+
an account (\`very-happy account list\`; providers.json profiles are included),
|
|
34
|
+
then restarts it in place (history kept). "default" = the machine login.
|
|
35
|
+
--model defaults to the account's first model.`;
|
|
36
|
+
function parseSessionProviderArgs(args) {
|
|
37
|
+
const positional = [];
|
|
38
|
+
let model;
|
|
39
|
+
let restart = true;
|
|
40
|
+
let list = false;
|
|
41
|
+
for (let i = 0; i < args.length; i++) {
|
|
42
|
+
const arg = args[i];
|
|
43
|
+
if (arg === "-h" || arg === "--help") return { action: "help" };
|
|
44
|
+
if (arg === "--list") list = true;
|
|
45
|
+
else if (arg === "--no-restart") restart = false;
|
|
46
|
+
else if (arg === "--model") {
|
|
47
|
+
model = args[++i];
|
|
48
|
+
if (!model) throw new Error("--model needs a value");
|
|
49
|
+
} else if (arg.startsWith("--model=")) model = arg.slice("--model=".length);
|
|
50
|
+
else if (arg.startsWith("-")) throw new Error(`unknown option ${arg}`);
|
|
51
|
+
else positional.push(arg);
|
|
52
|
+
}
|
|
53
|
+
if (list) {
|
|
54
|
+
if (positional.length > 0) throw new Error("--list takes no session id");
|
|
55
|
+
return { action: "list" };
|
|
56
|
+
}
|
|
57
|
+
if (positional.length === 0) return { action: "help" };
|
|
58
|
+
if (positional.length !== 2) throw new Error("expected <sessionId> <profile|default>");
|
|
59
|
+
const [sessionId, profile] = positional;
|
|
60
|
+
if (profile === "default") {
|
|
61
|
+
if (model) throw new Error("--model cannot be used with default");
|
|
62
|
+
return { action: "clear", sessionId, restart };
|
|
63
|
+
}
|
|
64
|
+
return { action: "set", sessionId, profile, model, restart };
|
|
65
|
+
}
|
|
66
|
+
function resolveBindingRequest(accounts, profile, model) {
|
|
67
|
+
const a = accounts.accounts[profile];
|
|
68
|
+
if (!a) {
|
|
69
|
+
const known = Object.keys(accounts.accounts);
|
|
70
|
+
throw new Error(`unknown account "${profile}"${known.length ? ` (known: ${known.join(", ")})` : " (no accounts; see `very-happy account`)"}`);
|
|
71
|
+
}
|
|
72
|
+
if (a.kind !== "claude-api") {
|
|
73
|
+
if (model) throw new Error(`--model applies to API accounts only`);
|
|
74
|
+
return { account: profile };
|
|
75
|
+
}
|
|
76
|
+
const chosen = model ?? a.models?.[0];
|
|
77
|
+
if (chosen && a.models && a.models.length > 0 && !a.models.includes(chosen)) {
|
|
78
|
+
throw new Error(`model "${chosen}" is not in account "${profile}" models (${a.models.join(", ")})`);
|
|
79
|
+
}
|
|
80
|
+
return { account: profile, ...chosen ? { model: chosen } : {} };
|
|
81
|
+
}
|
|
82
|
+
async function handleSessionProviderCommand(args) {
|
|
83
|
+
const parsed = parseSessionProviderArgs(args);
|
|
84
|
+
const home = configuration.configuration.happyHomeDir;
|
|
85
|
+
if (parsed.action === "help") {
|
|
86
|
+
console.log(SESSION_PROVIDER_HELP);
|
|
87
|
+
return;
|
|
88
|
+
}
|
|
89
|
+
if (parsed.action === "list") {
|
|
90
|
+
const entries = Object.entries(store.readSessionBindings(home));
|
|
91
|
+
if (entries.length === 0) console.log("No session account bindings.");
|
|
92
|
+
for (const [sessionId, b] of entries) console.log(`${sessionId} ${b.account ?? "machine"}${b.model ? ` ${b.model}` : ""}`);
|
|
93
|
+
return;
|
|
94
|
+
}
|
|
95
|
+
const service = new accountService.AccountService({
|
|
96
|
+
home,
|
|
97
|
+
restartSession: async (sessionId) => {
|
|
98
|
+
const result2 = await controlClient.restartDaemonSession(sessionId);
|
|
99
|
+
if (result2.success) return { ok: true };
|
|
100
|
+
const stillRunning = await controlClient.listDaemonSessions().then((children) => children.some((c) => c?.happySessionId === sessionId), () => false);
|
|
101
|
+
return accountService.localRestartFailure(result2.error ?? "restart failed", stillRunning);
|
|
102
|
+
}
|
|
103
|
+
});
|
|
104
|
+
const binding = parsed.action === "set" ? resolveBindingRequest(store.readAccounts(home), parsed.profile, parsed.model) : null;
|
|
105
|
+
const result = await service.bind({ sessionId: parsed.sessionId, accountId: binding?.account ?? null, ...binding?.model ? { model: binding.model } : {}, restart: parsed.restart });
|
|
106
|
+
const shown = accountService.bindResultMessages(result, parsed.sessionId, binding ? `${binding.account}${binding.model ? ` / ${binding.model}` : ""}` : "machine login", "provider");
|
|
107
|
+
for (const line of shown.out) console.log(line);
|
|
108
|
+
for (const line of shown.err) console.error(chalk.yellow(line));
|
|
109
|
+
if (shown.exitCode) process.exitCode = shown.exitCode;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
exports.SESSION_PROVIDER_HELP = SESSION_PROVIDER_HELP;
|
|
113
|
+
exports.handleSessionProviderCommand = handleSessionProviderCommand;
|
|
114
|
+
exports.parseSessionProviderArgs = parseSessionProviderArgs;
|
|
115
|
+
exports.resolveBindingRequest = resolveBindingRequest;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var sync = require('./sync-
|
|
3
|
+
var sync = require('./sync-WYBwkJvG.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-CX3x2eI4.cjs');
|
|
9
|
+
var startFileWatcher = require('./startFileWatcher-D14W6gn-.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-BP6vnxVP.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-JV7-4Q_6.mjs';
|
|
7
|
+
import { s as startFileWatcher } from './startFileWatcher-DePAY1T5.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-XSEjIqNq.cjs');
|
|
6
6
|
var ids = require('./ids-B6ZC0HGt.cjs');
|
|
7
|
-
var peerTools = require('./peerTools-
|
|
8
|
-
var persistence = require('./persistence-
|
|
7
|
+
var peerTools = require('./peerTools-D-VNNFw-.cjs');
|
|
8
|
+
var persistence = require('./persistence-CsmAgN-C.cjs');
|
|
9
9
|
var path = require('node:path');
|
|
10
|
-
var remoteSessionClient = require('./remoteSessionClient-
|
|
10
|
+
var remoteSessionClient = require('./remoteSessionClient-CcSP24Zq.cjs');
|
|
11
11
|
require('axios');
|
|
12
|
-
require('./configuration-
|
|
12
|
+
require('./configuration-BBK0rmmj.cjs');
|
|
13
13
|
require('node:fs');
|
|
14
14
|
require('node:os');
|
|
15
|
-
require('./package-
|
|
15
|
+
require('./package-uzlvxa5S.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-DwWTns3A.cjs');
|
|
21
|
+
require('./logger-CX3x2eI4.cjs');
|
|
22
22
|
require('node:util');
|
|
23
|
-
require('./time-
|
|
23
|
+
require('./time-BTLcO8jp.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-CJr8Pjwm.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-C65Iej_C.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-WtRgTSqG.mjs';
|
|
6
|
+
import { c as readPersistedSessions } from './persistence-Cg4sfjQV.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--0vfA7I5.mjs';
|
|
9
9
|
import 'axios';
|
|
10
|
-
import './configuration-
|
|
10
|
+
import './configuration-ThKBP_zY.mjs';
|
|
11
11
|
import 'node:fs';
|
|
12
12
|
import 'node:os';
|
|
13
|
-
import './package-
|
|
13
|
+
import './package-Bw3H6VLn.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-Ckl8N1MS.mjs';
|
|
19
|
+
import './logger-JV7-4Q_6.mjs';
|
|
20
20
|
import 'node:util';
|
|
21
|
-
import './time-
|
|
21
|
+
import './time-Cw0liIqB.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-Bde4QVIn.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-Bvdy-2xd.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-ThKBP_zY.mjs';
|
|
2
|
+
import { s as startOfflineReconnection } from './api-DUfunY3x.mjs';
|
|
3
3
|
|
|
4
4
|
function createOfflineSessionStub(sessionTag) {
|
|
5
5
|
return {
|