very-happy-cli 0.2.190 → 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-dkRv9QHm.cjs → AcpBackend-BQO4ShOy.cjs} +3 -3
- package/dist/{AcpBackend-Dd1h-Rgt.mjs → AcpBackend-CGHTDJd9.mjs} +3 -3
- package/dist/{AcpSessionManager-QBZ-CIf7.mjs → AcpSessionManager-G0xD6Jbq.mjs} +2 -2
- package/dist/{AcpSessionManager-AqWAqahm.cjs → AcpSessionManager-LlUMmcpB.cjs} +2 -2
- package/dist/{BasePermissionHandler-CLp1ge-4.mjs → BasePermissionHandler-BmTIg376.mjs} +1 -1
- package/dist/{BasePermissionHandler-CpSugp7Z.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-CcpDuIO5.mjs → acpSessionResume-BWEUxNtC.mjs} +1 -1
- package/dist/{acpSessionResume-CZao6QEd.cjs → acpSessionResume-BnHDk5eD.cjs} +1 -1
- package/dist/{agentHome-BJGRA2Kx.mjs → agentHome-B0VnjkZW.mjs} +4 -4
- package/dist/{agentHome-fIUqT-pn.cjs → agentHome-CqQ29YY7.cjs} +4 -4
- package/dist/{api-Dw8gFsQi.mjs → api-_LeBScjg.mjs} +10 -10
- package/dist/{api-CXL6jp-p.cjs → api-hMDsC6Wg.cjs} +10 -10
- package/dist/{apiMachine-BBNEtjf7.mjs → apiMachine-CgRldeJ6.mjs} +76 -21
- package/dist/{apiMachine-C6UqHoPF.cjs → apiMachine-CqW2m6Zr.cjs} +81 -26
- package/dist/{attachmentContent-NmVfKp-B.cjs → attachmentContent-BEeT2J5n.cjs} +2 -2
- package/dist/{attachmentContent-CC4yIrSm.mjs → attachmentContent-CyptLIfq.mjs} +2 -2
- package/dist/{auth-Bb_SL2os.cjs → auth-C9NvNHhL.cjs} +5 -5
- package/dist/{auth-DKa4MsAi.cjs → auth-CA1OClsW.cjs} +8 -8
- package/dist/{auth-Bh6SUoGi.mjs → auth-CFQikywl.mjs} +8 -8
- package/dist/{auth-Bj0psrD2.mjs → auth-DL8_J9vu.mjs} +5 -5
- package/dist/{auto-DK7pbCnV.mjs → auto-CKI05w1D.mjs} +17 -17
- package/dist/{auto-C9Qohh0P.cjs → auto-uQOxlxLp.cjs} +17 -17
- package/dist/{bootstrap-Ct9Nb4sv.mjs → bootstrap-DaZ0Np7X.mjs} +2 -2
- package/dist/{bootstrap-DBJB0y-H.cjs → bootstrap-DsZGc69k.cjs} +2 -2
- package/dist/{browser-BGxDRhHy.mjs → browser-BUIaSHK2.mjs} +1 -1
- package/dist/{browser-CLJWcodR.cjs → browser-Ft0ASDm7.cjs} +1 -1
- package/dist/claudeAccountEnv-BOBpJ3k8.cjs +137 -0
- package/dist/claudeAccountEnv-ON24i0qv.mjs +132 -0
- package/dist/{claudeLocal-Ux31hZyC.mjs → claudeLocal-B1ZVtryl.mjs} +5 -5
- package/dist/{claudeLocal-B6YDYlnY.cjs → claudeLocal-BMf9t4Fa.cjs} +5 -5
- package/dist/{claudeLocalLauncher-D06QijMw.mjs → claudeLocalLauncher-Bp8bqF4y.mjs} +10 -10
- package/dist/{claudeLocalLauncher-DFvmF8rC.cjs → claudeLocalLauncher-C8TeJcfF.cjs} +10 -10
- package/dist/{claudeSessionFork-D2GI7P59.mjs → claudeSessionFork-8AA47z8Y.mjs} +1 -1
- package/dist/{claudeSessionFork-DTLZ2rek.cjs → claudeSessionFork-YiktY55n.cjs} +1 -1
- package/dist/{client-CnGNYidN.mjs → client-Bm4oKvW7.mjs} +2 -2
- package/dist/{client-CtL0Vtww.mjs → client-BmPaBnDK.mjs} +4 -4
- package/dist/{client-CARZ_lNS.cjs → client-CFHZfh9x.cjs} +4 -4
- package/dist/{client-Bffkrs5p.cjs → client-Crh8_cNx.cjs} +2 -2
- package/dist/{client-DZkBUoh9.mjs → client-Cxlp_D4I.mjs} +2 -2
- package/dist/{client-CMKGrnmT.cjs → client-D8XROyZc.cjs} +2 -2
- package/dist/codex/happyMcpStdioBridge.cjs +16 -16
- package/dist/codex/happyMcpStdioBridge.mjs +16 -16
- package/dist/{codexAppServerClient-CLc5nhLT.mjs → codexAppServerClient-BWJbLCQn.mjs} +3 -3
- package/dist/{codexAppServerClient-CpT9F6EM.cjs → codexAppServerClient-q8GHQhyC.cjs} +3 -3
- package/dist/{codexCommand-Dliq3EBv.mjs → codexCommand-BfXfRQr4.mjs} +121 -61
- package/dist/{codexCommand-39kH99SJ.cjs → codexCommand-BgpGg-Zy.cjs} +121 -61
- package/dist/{codexTermination-ByW7tRjr.cjs → codexTermination-CVUF0X75.cjs} +1 -1
- package/dist/{codexTermination-ORIw0gpU.mjs → codexTermination-s9fd1gkA.mjs} +1 -1
- package/dist/{config-CeIzCsfj.cjs → config-BAjyTyYp.cjs} +3 -3
- package/dist/{config-CxSsGO1Z.mjs → config-BF8XgLyc.mjs} +3 -3
- package/dist/{configuration-Dt5lKW3P.cjs → configuration-CXEVKAyF.cjs} +1 -1
- package/dist/{configuration-Dechcvd-.mjs → configuration-IhRiLDVe.mjs} +1 -1
- package/dist/{connect-UwQHvCpR.mjs → connect-LZh1gr08.mjs} +13 -13
- package/dist/{connect-NPDzIVC6.cjs → connect-rCS56arw.cjs} +13 -13
- package/dist/{context-BdZssgF0.cjs → context-3_S_mWz9.cjs} +1 -1
- package/dist/{context-C9JbJoNe.mjs → context-DO6F5YwH.mjs} +1 -1
- package/dist/{controlClient-D7NGfmtq.mjs → controlClient-8ILulwjc.mjs} +14 -5
- package/dist/{controlClient-BRk65BRO.cjs → controlClient-j7p5p3_7.cjs} +15 -4
- package/dist/{createSessionMetadata-B_HZCDj_.cjs → createSessionMetadata-DwdD_uVo.cjs} +2 -2
- package/dist/{createSessionMetadata-DyhFKAby.mjs → createSessionMetadata-oyaTZm1b.mjs} +2 -2
- package/dist/daemonAccounts-BCjDgoNt.cjs +51 -0
- package/dist/daemonAccounts-BJgt6IJe.mjs +27 -0
- package/dist/defaultPermissionMode-BFShzF55.cjs +49 -0
- package/dist/defaultPermissionMode-Lt3PUCwY.mjs +43 -0
- package/dist/{deterministicJson-BEygolBQ.cjs → deterministicJson-DUN0v3St.cjs} +13 -13
- package/dist/{deterministicJson-DNmMVhFu.mjs → deterministicJson-Dfp-7wUZ.mjs} +13 -13
- package/dist/{doctor-BdBi7TFZ.mjs → doctor-B_UwMcVT.mjs} +7 -7
- package/dist/{doctor-B9lW1WlG.cjs → doctor-FgUYTbAT.cjs} +7 -7
- package/dist/{downloadTarget-DS0zT2AU.cjs → downloadTarget-BrrQEDxg.cjs} +6 -6
- package/dist/{downloadTarget-CGojGjaN.mjs → downloadTarget-C0d6jRx-.mjs} +6 -6
- package/dist/{ensureDaemonRunning-Bibp6vhe.cjs → ensureDaemonRunning-Cq4FYI5Q.cjs} +5 -5
- package/dist/{ensureDaemonRunning-BOdbryDM.mjs → ensureDaemonRunning-KUMFfIil.mjs} +5 -5
- package/dist/{handleResumeCommand-CgLzBYne.mjs → handleResumeCommand-BGhVo3QH.mjs} +5 -5
- package/dist/{handleResumeCommand-DXOuWr4p.cjs → handleResumeCommand-Cl9GIL5F.cjs} +5 -5
- package/dist/{index-Db0HIC-k.mjs → index-BjXjMhGY.mjs} +4 -4
- package/dist/{index-BOe6dKnL.cjs → index-BzAYnYct.cjs} +186 -0
- package/dist/{index-CwRW11hT.cjs → index-CQ_hLLCj.cjs} +3 -3
- package/dist/{index-DXSIi6j_.cjs → index-CRipkiqo.cjs} +4 -4
- package/dist/{index-Bs5FD8JF.cjs → index-CZaLMmPC.cjs} +4 -4
- package/dist/{index-CBHfkQNY.mjs → index-Ca1Tt96A.mjs} +45 -41
- package/dist/{index-f8oDidjV.cjs → index-D8ODb0_U.cjs} +44 -40
- package/dist/{index-DmqsRnV7.mjs → index-DYD3GM1m.mjs} +168 -1
- package/dist/{index-rNTX33in.mjs → index-JQDyJ3Li.mjs} +3 -3
- package/dist/{index-DUByZsKe.mjs → index-v5EmjT8l.mjs} +4 -4
- package/dist/index.cjs +2 -2
- package/dist/index.mjs +2 -2
- package/dist/{install-CXIL_FYx.cjs → install-ClUA9tbC.cjs} +3 -3
- package/dist/{install-DfPrEWGG.mjs → install-D6EHRtAN.mjs} +3 -3
- package/dist/lib.cjs +12 -12
- package/dist/lib.d.cts +292 -0
- package/dist/lib.d.mts +292 -0
- package/dist/lib.mjs +12 -12
- package/dist/{lidState-D0DF20oG.mjs → lidState-CZOXXdzv.mjs} +1 -1
- package/dist/{lidState-q_XFYg33.cjs → lidState-DqoN7zH4.cjs} +1 -1
- package/dist/{localHappyAgentAuth-CKNW-MXw.cjs → localHappyAgentAuth-BnGCpHRX.cjs} +1 -1
- package/dist/{localHappyAgentAuth-BBhM4Qk1.mjs → localHappyAgentAuth-YHxDZ4x4.mjs} +1 -1
- package/dist/{logger-BBRTTVsQ.cjs → logger-8su64lqR.cjs} +2 -2
- package/dist/{logger-CL7pin9b.mjs → logger-Fd_rNvgd.mjs} +2 -2
- package/dist/{machineMetadata-DP06qdBk.mjs → machineMetadata-1HIIC7Bc.mjs} +3 -3
- package/dist/{machineMetadata-DnFNlrVK.cjs → machineMetadata-DYXt3p6u.cjs} +3 -3
- package/dist/{main-DO7nRvhf.mjs → main-BI6GIzUL.mjs} +92 -48
- package/dist/{main-DLOXykOR.cjs → main-C_GrcYkn.cjs} +92 -48
- package/dist/{mcp-Du0MgR7e.cjs → mcp-BycIv9oQ.cjs} +18 -15
- package/dist/{mcp-C-4sPTae.mjs → mcp-XGoxywno.mjs} +18 -15
- package/dist/{mirrorProtocol-GuWMxLkh.cjs → mirrorProtocol-DVnB8EO8.cjs} +3 -3
- package/dist/{mirrorProtocol-dkq2ZENA.mjs → mirrorProtocol-DXT3rv7T.mjs} +3 -3
- package/dist/{package-C6uiXULx.mjs → package-6KkRAops.mjs} +7 -7
- package/dist/{package-DrY090nZ.cjs → package-iuLlSiSF.cjs} +7 -7
- package/dist/{panels-4DRBKHZP.cjs → panels-0C89q0Tu.cjs} +5 -5
- package/dist/{panels-DXYdJA6n.mjs → panels-B5Di2zb2.mjs} +5 -5
- package/dist/{peerTools-5ZM4spcZ.cjs → peerTools-CANTX_mG.cjs} +5 -5
- package/dist/{peerTools-dY1aJez4.mjs → peerTools-CKJ-IDM4.mjs} +5 -5
- package/dist/{persistence-Bl5S3TLB.cjs → persistence-B4ttN-fR.cjs} +2 -2
- package/dist/{persistence-Dogj7JIp.mjs → persistence-DWcHe035.mjs} +2 -2
- package/dist/{piRunnerArgs-C3jZ1M6b.cjs → piRunnerArgs-BOkfxyak.cjs} +1 -1
- package/dist/{piRunnerArgs-D8nN_Iit.mjs → piRunnerArgs-Bl5GpBoN.mjs} +2 -2
- package/dist/{piRuntime-BoeMsAXK.mjs → piRuntime-BhwxzdQf.mjs} +1 -1
- package/dist/{piRuntime-Bd9-eq6M.cjs → piRuntime-DzrIiZU8.cjs} +1 -1
- package/dist/{piTerminal-C3j1ca3x.cjs → piTerminal-BdS7ol7v.cjs} +20 -17
- package/dist/{piTerminal-GEPkIGD4.mjs → piTerminal-DnA2CbGr.mjs} +20 -17
- package/dist/{pushNotifications-CfspRcl-.cjs → pushNotifications-BqFoLye2.cjs} +12 -3
- package/dist/{pushNotifications-dUceOIni.mjs → pushNotifications-DkQ0yvFs.mjs} +12 -3
- package/dist/{query-DjsVgG3E.cjs → query-BQ4br3yn.cjs} +1 -1
- package/dist/{query-iYH-tm7L.mjs → query-BRJYSkb1.mjs} +1 -1
- package/dist/{rateLimitReporter-jeVi-fym.mjs → rateLimitReporter-BRbYkmuP.mjs} +3 -3
- package/dist/{rateLimitReporter-DUu2KydZ.cjs → rateLimitReporter-DK5SQuCc.cjs} +3 -3
- package/dist/{rateLimitWindows-Bx3ROBP5.cjs → rateLimitWindows-DBfiuYeg.cjs} +1 -1
- package/dist/{rateLimitWindows-CEn0DXaX.mjs → rateLimitWindows-Da5AR-4u.mjs} +1 -1
- package/dist/reconnectEnv-B31lY4nR.cjs +27 -0
- package/dist/reconnectEnv-DeSvHl3q.mjs +24 -0
- package/dist/{registerCommonHandlers-Beun-cQv.cjs → registerCommonHandlers-m6pxxf2J.cjs} +2 -2
- package/dist/{registerCommonHandlers-DWZ7mfdt.mjs → registerCommonHandlers-yQ7Ru-l0.mjs} +2 -2
- package/dist/{registerKillSessionHandler-CA1FFr_F.cjs → registerKillSessionHandler-BAOIa_Fs.cjs} +6 -6
- package/dist/{registerKillSessionHandler-CzgklwLG.mjs → registerKillSessionHandler-BDNpi7YO.mjs} +6 -6
- package/dist/{remoteSessionClient-BiC2KDew.mjs → remoteSessionClient-CZ7aaNgj.mjs} +5 -5
- package/dist/{remoteSessionClient-DGFI__5Z.cjs → remoteSessionClient-iJMXRN_D.cjs} +5 -5
- package/dist/{reportProgressTool-CgPy6n_7.mjs → reportProgressTool-DfQhPu0s.mjs} +3 -3
- package/dist/{reportProgressTool-CvPGov1F.cjs → reportProgressTool-DpFs7pSe.cjs} +3 -3
- package/dist/{run-B_gFgJVB.mjs → run-CwN28mcj.mjs} +215 -52
- package/dist/{run-rPqQwDi_.cjs → run-p-xp1_HY.cjs} +214 -51
- package/dist/{runClaude-DM8gm8iu.cjs → runClaude-D6U1Z575.cjs} +83 -48
- package/dist/{runClaude-CykqeXK7.mjs → runClaude-DRKtAGTm.mjs} +83 -48
- package/dist/{runClaudeDeps-D2phXGut.mjs → runClaudeDeps-BheVcIlD.mjs} +147 -69
- package/dist/{runClaudeDeps-DGAomimZ.cjs → runClaudeDeps-Dkofokgb.cjs} +142 -64
- package/dist/{runGemini-CXTeSOZp.cjs → runGemini-C8q3YCc0.cjs} +33 -33
- package/dist/{runGemini-CtWCVkj5.mjs → runGemini-owbvhFbi.mjs} +33 -33
- package/dist/{runOpenClaw-CH_9_RyZ.cjs → runOpenClaw-DGeN66-t.cjs} +18 -18
- package/dist/{runOpenClaw-BBdjlViJ.mjs → runOpenClaw-Dky3-mjO.mjs} +18 -18
- package/dist/{sandbox-Bb5IMun3.cjs → sandbox-D2CPyoCA.cjs} +4 -4
- package/dist/{sandbox-DGmXZ6Zz.mjs → sandbox-sq_wy9Gl.mjs} +4 -4
- package/dist/{selfCheck-CccwNTTK.cjs → selfCheck-BgLvQKSt.cjs} +39 -37
- package/dist/selfCheck-vkfrgQ7X.mjs +88 -0
- package/dist/{send-BpiXPkDo.cjs → send-Cd10YhXh.cjs} +8 -8
- package/dist/{send-B6rHg8GT.mjs → send-K9vg-8t-.mjs} +8 -8
- package/dist/{server-DHUzjApC.cjs → server-DRrV64r0.cjs} +6 -6
- package/dist/{server-BkdAyHhC.mjs → server-De4W1zuK.mjs} +4 -4
- package/dist/{sessionLock-BFBReiKq.cjs → sessionLock-BDtSzzKS.cjs} +10 -3
- package/dist/{sessionLock-Ca_bIo50.mjs → sessionLock-Dl6i7IgA.mjs} +10 -4
- package/dist/{sessionOps-DeWVqpe4.cjs → sessionOps-DvnEH4PL.cjs} +6 -4
- package/dist/{sessionOps-CA2kpm66.mjs → sessionOps-gU88-W9F.mjs} +6 -4
- package/dist/sessionProvider-CKcIo7KO.mjs +108 -0
- package/dist/sessionProvider-CbSZeZrl.cjs +113 -0
- package/dist/{sessionScanner-CGzsN8V6.cjs → sessionScanner-7RtcCeyD.cjs} +3 -3
- package/dist/{sessionScanner-DDDud5re.mjs → sessionScanner-DR32uSby.mjs} +3 -3
- package/dist/{sessions-CKJPWFgu.cjs → sessions-BvuMjgvJ.cjs} +10 -10
- package/dist/{sessions-B4d50sCI.mjs → sessions-DTt2Eguk.mjs} +10 -10
- package/dist/{setupOfflineReconnection-CyPNgyCe.mjs → setupOfflineReconnection-BGnvhRfb.mjs} +2 -2
- package/dist/{setupOfflineReconnection-DPXRo_zf.cjs → setupOfflineReconnection-DduOsw6p.cjs} +2 -2
- package/dist/{spawn-CrYN_OOT.mjs → spawn-CL3cUc7b.mjs} +26 -17
- package/dist/{spawn-CgSJzzWS.cjs → spawn-DMB6rRPA.cjs} +26 -17
- package/dist/{spawnAgents-C1-4m7aN.cjs → spawnAgents-CClb7buD.cjs} +8 -2
- package/dist/{spawnAgents-DWCDYCQ1.mjs → spawnAgents-CRMfOJhh.mjs} +8 -2
- package/dist/{spawnHappyCLI-DjbkiSH1.mjs → spawnHappyCLI-Cj_6IICe.mjs} +1 -1
- package/dist/{spawnHappyCLI-CTy3p6V_.cjs → spawnHappyCLI-DJdhX_Qx.cjs} +1 -1
- package/dist/{startFileWatcher-Dedtu1vq.mjs → startFileWatcher-DikVa8kg.mjs} +1 -1
- package/dist/{startFileWatcher-BQs0cJA-.cjs → startFileWatcher-LnOmVW6H.cjs} +1 -1
- package/dist/{startupSessionCreate-Dxy3X4DG.cjs → startupSessionCreate-B3ND-917.cjs} +3 -3
- package/dist/{startupSessionCreate-BKFU4v_h.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-D9a4cBEa.cjs → streamRelay-DFdOaLOn.cjs} +1 -1
- package/dist/{streamRelay-P9e7Sohm.mjs → streamRelay-sABnxEXq.mjs} +1 -1
- package/dist/{sync-eZkXnsW_.mjs → sync-JoEZKRo8.mjs} +1 -1
- package/dist/{sync-DtWB7RzA.cjs → sync-_2lsZ1U2.cjs} +1 -1
- package/dist/{systemPrompt-2XOpZ1j6.cjs → systemPrompt-CJEvNCuW.cjs} +2 -2
- package/dist/{systemPrompt-Bn6g6aCH.mjs → systemPrompt-Zq4HyrZ5.mjs} +2 -2
- package/dist/{teams-ecFay4Gn.cjs → teams-BNZafnrT.cjs} +7 -7
- package/dist/{teams-nadkqrbW.mjs → teams-qz4LqKJ2.mjs} +7 -7
- package/dist/{template-BiTD-jI9.mjs → template-CJ8BWSsc.mjs} +1 -1
- package/dist/{template-17HATY_Y.cjs → template-LgvBbOna.cjs} +1 -1
- package/dist/{time-gPD_EmA-.cjs → time-CaUlWSNJ.cjs} +1 -1
- package/dist/{time-CN3TuSVG.mjs → time-bzmet4s5.mjs} +1 -1
- package/dist/{titleGenerator-lT5ldPuN.cjs → titleGenerator-BuIIu_JP.cjs} +17 -13
- package/dist/{titleGenerator-DgzTQdn2.mjs → titleGenerator-CbTtJ_1D.mjs} +16 -12
- package/dist/{todo-B1VeMk5A.cjs → todo-CQ_BTf9C.cjs} +6 -6
- package/dist/{todo-BIxd7l2Q.mjs → todo-DIrVF_Ak.mjs} +6 -6
- package/dist/{tools-DvqbLsCF.cjs → tools-BnmmFZji.cjs} +1 -1
- package/dist/{tools-zXJpxiG_.mjs → tools-cLOjBvPn.mjs} +1 -1
- package/dist/{uninstall-9htK6mb7.mjs → uninstall-C5OuW6dE.mjs} +3 -3
- package/dist/{uninstall-CvIOpwB5.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/defaultPermissionMode-BnxJPVHT.mjs +0 -4
- package/dist/defaultPermissionMode-CxmTXUQR.cjs +0 -7
- package/dist/providerBinding-B-Qbx9W2.cjs +0 -140
- package/dist/providerBinding-CYubGg-Z.mjs +0 -132
- package/dist/selfCheck-BfK945YQ.mjs +0 -86
- package/dist/sessionProvider-VFbtUmMR.cjs +0 -114
- package/dist/sessionProvider-g18IiK74.mjs +0 -109
|
@@ -4,21 +4,21 @@ var os = require('node:os');
|
|
|
4
4
|
var promises = require('node:fs/promises');
|
|
5
5
|
var z = require('zod');
|
|
6
6
|
var node_crypto = require('node:crypto');
|
|
7
|
-
var client = require('./client-
|
|
8
|
-
var persistence = require('./persistence-
|
|
7
|
+
var client = require('./client-CFHZfh9x.cjs');
|
|
8
|
+
var persistence = require('./persistence-B4ttN-fR.cjs');
|
|
9
9
|
var install = require('./install-BOHlqewf.cjs');
|
|
10
10
|
require('node:child_process');
|
|
11
11
|
require('node:util');
|
|
12
12
|
require('node:path');
|
|
13
|
-
require('./index-
|
|
13
|
+
require('./index-BzAYnYct.cjs');
|
|
14
14
|
require('@paralleldrive/cuid2');
|
|
15
|
-
require('./configuration-
|
|
15
|
+
require('./configuration-CXEVKAyF.cjs');
|
|
16
16
|
require('node:fs');
|
|
17
|
-
require('./package-
|
|
18
|
-
require('./context-
|
|
17
|
+
require('./package-iuLlSiSF.cjs');
|
|
18
|
+
require('./context-3_S_mWz9.cjs');
|
|
19
19
|
require('./authRelay-Dy1qU9td.cjs');
|
|
20
20
|
require('tweetnacl');
|
|
21
|
-
require('./logger-
|
|
21
|
+
require('./logger-8su64lqR.cjs');
|
|
22
22
|
require('chalk');
|
|
23
23
|
require('./resources-BZ_Be0qM.cjs');
|
|
24
24
|
|
|
@@ -2,21 +2,21 @@ import { homedir } from 'node:os';
|
|
|
2
2
|
import { readFile } from 'node:fs/promises';
|
|
3
3
|
import { z } from 'zod';
|
|
4
4
|
import { randomUUID } from 'node:crypto';
|
|
5
|
-
import { t as teamRequest, c as createTeamsClient } from './client-
|
|
6
|
-
import { b as readCredentialsForConfiguredRelay } from './persistence-
|
|
5
|
+
import { t as teamRequest, c as createTeamsClient } from './client-BmPaBnDK.mjs';
|
|
6
|
+
import { b as readCredentialsForConfiguredRelay } from './persistence-DWcHe035.mjs';
|
|
7
7
|
import { a as installTeamSkill, i as installAutomationSkill } from './install-B8O1JpJH.mjs';
|
|
8
8
|
import 'node:child_process';
|
|
9
9
|
import 'node:util';
|
|
10
10
|
import 'node:path';
|
|
11
|
-
import './index-
|
|
11
|
+
import './index-DYD3GM1m.mjs';
|
|
12
12
|
import '@paralleldrive/cuid2';
|
|
13
|
-
import './configuration-
|
|
13
|
+
import './configuration-IhRiLDVe.mjs';
|
|
14
14
|
import 'node:fs';
|
|
15
|
-
import './package-
|
|
16
|
-
import './context-
|
|
15
|
+
import './package-6KkRAops.mjs';
|
|
16
|
+
import './context-DO6F5YwH.mjs';
|
|
17
17
|
import './authRelay-DhQhkBvX.mjs';
|
|
18
18
|
import 'tweetnacl';
|
|
19
|
-
import './logger-
|
|
19
|
+
import './logger-Fd_rNvgd.mjs';
|
|
20
20
|
import 'chalk';
|
|
21
21
|
import './resources-CLP_MpK4.mjs';
|
|
22
22
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { h as AUTOMATION_ATTENTION_REASON_MAX_CHARS, j as AUTOMATION_SUMMARY_MAX_CHARS } from './index-DYD3GM1m.mjs';
|
|
2
2
|
|
|
3
3
|
function payloadJson(payload) {
|
|
4
4
|
if (!payload) return void 0;
|
|
@@ -5,15 +5,16 @@ var module$1 = require('node:module');
|
|
|
5
5
|
var oneShotPrompts = require('./oneShotPrompts-CL0dip9C.cjs');
|
|
6
6
|
var node_crypto = require('node:crypto');
|
|
7
7
|
var path = require('node:path');
|
|
8
|
-
var logger = require('./logger-
|
|
8
|
+
var logger = require('./logger-8su64lqR.cjs');
|
|
9
9
|
var projectPath = require('./projectPath-C3ioB4Bu.cjs');
|
|
10
|
+
var wrapperAccount = require('./wrapperAccount-DzoGqS2b.cjs');
|
|
10
11
|
|
|
11
12
|
var _documentCurrentScript = typeof document !== 'undefined' ? document.currentScript : null;
|
|
12
13
|
const MAX_PROMPT_SAMPLE_CHARS = 500;
|
|
13
14
|
const MAX_TITLE_CHARS = 60;
|
|
14
15
|
const GENERATION_TIMEOUT_MS = 3e4;
|
|
15
16
|
function loadClaudeVersionUtils() {
|
|
16
|
-
const require$1 = module$1.createRequire((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('titleGenerator-
|
|
17
|
+
const require$1 = module$1.createRequire((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('titleGenerator-BuIIu_JP.cjs', document.baseURI).href)));
|
|
17
18
|
return require$1(path.resolve(path.join(projectPath.projectPath(), "scripts", "claude_version_utils.cjs")));
|
|
18
19
|
}
|
|
19
20
|
function resolveClaudeBinary(loadUtils = loadClaudeVersionUtils) {
|
|
@@ -61,16 +62,19 @@ function sanitizeTitle(raw) {
|
|
|
61
62
|
if (GENERIC_TITLES.has(title.toLowerCase().replace(/\s+/g, " ").trim())) return null;
|
|
62
63
|
return title;
|
|
63
64
|
}
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
65
|
+
function oneShotArgs(accountSettings = {}) {
|
|
66
|
+
return [
|
|
67
|
+
"-p",
|
|
68
|
+
"--model",
|
|
69
|
+
"haiku",
|
|
70
|
+
"--strict-mcp-config",
|
|
71
|
+
"--settings",
|
|
72
|
+
JSON.stringify({ ...accountSettings, disableAllHooks: true }),
|
|
73
|
+
"--no-session-persistence",
|
|
74
|
+
"--disable-slash-commands"
|
|
75
|
+
];
|
|
76
|
+
}
|
|
77
|
+
oneShotArgs();
|
|
74
78
|
function runClaudeOneShot(binary, prompt) {
|
|
75
79
|
return new Promise((resolve2) => {
|
|
76
80
|
let settled = false;
|
|
@@ -81,7 +85,7 @@ function runClaudeOneShot(binary, prompt) {
|
|
|
81
85
|
};
|
|
82
86
|
let child;
|
|
83
87
|
try {
|
|
84
|
-
child = node_child_process.spawn(binary, [...
|
|
88
|
+
child = node_child_process.spawn(binary, [...oneShotArgs(wrapperAccount.accountClaudeSettings()), prompt], {
|
|
85
89
|
stdio: ["ignore", "pipe", "ignore"],
|
|
86
90
|
// HAPPY_MANAGED=1: this claude is run BY happy. The user-wide
|
|
87
91
|
// terminal-mirror SessionStart hook exits on it, so a one-shot
|
|
@@ -3,8 +3,9 @@ import { createRequire } from 'node:module';
|
|
|
3
3
|
import { T as TITLE_PROMPT_PREFIX } from './oneShotPrompts-DT4p6RNd.mjs';
|
|
4
4
|
import { randomUUID } from 'node:crypto';
|
|
5
5
|
import { resolve, join } from 'node:path';
|
|
6
|
-
import { l as logger } from './logger-
|
|
6
|
+
import { l as logger } from './logger-Fd_rNvgd.mjs';
|
|
7
7
|
import { p as projectPath } from './projectPath-BTBIMB57.mjs';
|
|
8
|
+
import { a as accountClaudeSettings } from './wrapperAccount-DXlD3bsO.mjs';
|
|
8
9
|
|
|
9
10
|
const MAX_PROMPT_SAMPLE_CHARS = 500;
|
|
10
11
|
const MAX_TITLE_CHARS = 60;
|
|
@@ -58,16 +59,19 @@ function sanitizeTitle(raw) {
|
|
|
58
59
|
if (GENERIC_TITLES.has(title.toLowerCase().replace(/\s+/g, " ").trim())) return null;
|
|
59
60
|
return title;
|
|
60
61
|
}
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
62
|
+
function oneShotArgs(accountSettings = {}) {
|
|
63
|
+
return [
|
|
64
|
+
"-p",
|
|
65
|
+
"--model",
|
|
66
|
+
"haiku",
|
|
67
|
+
"--strict-mcp-config",
|
|
68
|
+
"--settings",
|
|
69
|
+
JSON.stringify({ ...accountSettings, disableAllHooks: true }),
|
|
70
|
+
"--no-session-persistence",
|
|
71
|
+
"--disable-slash-commands"
|
|
72
|
+
];
|
|
73
|
+
}
|
|
74
|
+
oneShotArgs();
|
|
71
75
|
function runClaudeOneShot(binary, prompt) {
|
|
72
76
|
return new Promise((resolve2) => {
|
|
73
77
|
let settled = false;
|
|
@@ -78,7 +82,7 @@ function runClaudeOneShot(binary, prompt) {
|
|
|
78
82
|
};
|
|
79
83
|
let child;
|
|
80
84
|
try {
|
|
81
|
-
child = spawn(binary, [...
|
|
85
|
+
child = spawn(binary, [...oneShotArgs(accountClaudeSettings()), prompt], {
|
|
82
86
|
stdio: ["ignore", "pipe", "ignore"],
|
|
83
87
|
// HAPPY_MANAGED=1: this claude is run BY happy. The user-wide
|
|
84
88
|
// terminal-mirror SessionStart hook exits on it, so a one-shot
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var configuration = require('./configuration-
|
|
4
|
-
var index = require('./index-
|
|
5
|
-
var persistence = require('./persistence-
|
|
6
|
-
var context = require('./context-
|
|
3
|
+
var configuration = require('./configuration-CXEVKAyF.cjs');
|
|
4
|
+
var index = require('./index-BzAYnYct.cjs');
|
|
5
|
+
var persistence = require('./persistence-B4ttN-fR.cjs');
|
|
6
|
+
var context = require('./context-3_S_mWz9.cjs');
|
|
7
7
|
require('node:fs');
|
|
8
8
|
require('node:os');
|
|
9
9
|
require('node:path');
|
|
10
|
-
require('./package-
|
|
10
|
+
require('./package-iuLlSiSF.cjs');
|
|
11
11
|
require('node:fs/promises');
|
|
12
12
|
require('zod');
|
|
13
13
|
require('@paralleldrive/cuid2');
|
|
14
14
|
require('./authRelay-Dy1qU9td.cjs');
|
|
15
15
|
require('node:crypto');
|
|
16
16
|
require('tweetnacl');
|
|
17
|
-
require('./logger-
|
|
17
|
+
require('./logger-8su64lqR.cjs');
|
|
18
18
|
require('chalk');
|
|
19
19
|
require('node:util');
|
|
20
20
|
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { c as configuration } from './configuration-
|
|
2
|
-
import {
|
|
3
|
-
import { b as readCredentialsForConfiguredRelay } from './persistence-
|
|
4
|
-
import { r as readTeamScope, t as teamScopePath } from './context-
|
|
1
|
+
import { c as configuration } from './configuration-IhRiLDVe.mjs';
|
|
2
|
+
import { q as createBuiltinTodoClient, B as BUILTIN_TODO_SKILL } from './index-DYD3GM1m.mjs';
|
|
3
|
+
import { b as readCredentialsForConfiguredRelay } from './persistence-DWcHe035.mjs';
|
|
4
|
+
import { r as readTeamScope, t as teamScopePath } from './context-DO6F5YwH.mjs';
|
|
5
5
|
import 'node:fs';
|
|
6
6
|
import 'node:os';
|
|
7
7
|
import 'node:path';
|
|
8
|
-
import './package-
|
|
8
|
+
import './package-6KkRAops.mjs';
|
|
9
9
|
import 'node:fs/promises';
|
|
10
10
|
import 'zod';
|
|
11
11
|
import '@paralleldrive/cuid2';
|
|
12
12
|
import './authRelay-DhQhkBvX.mjs';
|
|
13
13
|
import 'node:crypto';
|
|
14
14
|
import 'tweetnacl';
|
|
15
|
-
import './logger-
|
|
15
|
+
import './logger-Fd_rNvgd.mjs';
|
|
16
16
|
import 'chalk';
|
|
17
17
|
import 'node:util';
|
|
18
18
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { c as createTeamsClient } from './client-
|
|
2
|
+
import { c as createTeamsClient } from './client-BmPaBnDK.mjs';
|
|
3
3
|
|
|
4
4
|
const CLOSED_GOAL_CHARS = 200;
|
|
5
5
|
const closed = (task) => task.status === "done" || task.status === "cancelled";
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { l as logger } from './logger-
|
|
1
|
+
import { l as logger } from './logger-Fd_rNvgd.mjs';
|
|
2
2
|
import { existsSync, unlinkSync } from 'fs';
|
|
3
3
|
import { execSync } from 'child_process';
|
|
4
4
|
import 'chalk';
|
|
5
5
|
import 'node:util';
|
|
6
|
-
import './configuration-
|
|
6
|
+
import './configuration-IhRiLDVe.mjs';
|
|
7
7
|
import 'node:fs';
|
|
8
8
|
import 'node:os';
|
|
9
9
|
import 'node:path';
|
|
10
|
-
import './package-
|
|
10
|
+
import './package-6KkRAops.mjs';
|
|
11
11
|
import 'node:fs/promises';
|
|
12
12
|
|
|
13
13
|
const PLIST_LABEL = "com.happy-cli.daemon";
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var logger = require('./logger-
|
|
3
|
+
var logger = require('./logger-8su64lqR.cjs');
|
|
4
4
|
var require$$0 = require('fs');
|
|
5
5
|
var child_process = require('child_process');
|
|
6
6
|
require('chalk');
|
|
7
7
|
require('node:util');
|
|
8
|
-
require('./configuration-
|
|
8
|
+
require('./configuration-CXEVKAyF.cjs');
|
|
9
9
|
require('node:fs');
|
|
10
10
|
require('node:os');
|
|
11
11
|
require('node:path');
|
|
12
|
-
require('./package-
|
|
12
|
+
require('./package-iuLlSiSF.cjs');
|
|
13
13
|
require('node:fs/promises');
|
|
14
14
|
|
|
15
15
|
const PLIST_LABEL = "com.happy-cli.daemon";
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import { mkdirSync, writeFileSync, chmodSync, readFileSync, rmSync } from 'node:fs';
|
|
2
|
+
import { homedir } from 'node:os';
|
|
3
|
+
import { dirname, join } from 'node:path';
|
|
4
|
+
import { r as resolveClaudeAccount, a as applyAccountEnv, o as overridingUserSettings } from './claudeAccountEnv-ON24i0qv.mjs';
|
|
5
|
+
import { r as readSessionBindings, w as writeSessionBinding, d as defaultSecretProbe, a as readAccounts, c as readAccountsFileV2, f as writeAccountsFile } from './store--XN-7MS0.mjs';
|
|
6
|
+
|
|
7
|
+
let current = null;
|
|
8
|
+
let home = null;
|
|
9
|
+
let currentSettings = {};
|
|
10
|
+
function accountClaudeSettings() {
|
|
11
|
+
return currentSettings;
|
|
12
|
+
}
|
|
13
|
+
function unavailableNotice(profile) {
|
|
14
|
+
const why = {
|
|
15
|
+
missing: "it no longer exists on this machine",
|
|
16
|
+
"missing-secret": "its key / token is missing on this machine",
|
|
17
|
+
expired: "its sign-in has expired \u2014 sign in again",
|
|
18
|
+
invalid: "its key was rejected \u2014 fix the key"
|
|
19
|
+
};
|
|
20
|
+
return `Account "${profile.label}" is unavailable: ${why[profile.reason ?? ""] ?? profile.reason ?? "unknown reason"}. This session will not fall back to the machine login; switch accounts or fix it, and the session restarts in place.`;
|
|
21
|
+
}
|
|
22
|
+
function shouldRecordSpawnAccount(spawnAccountId, hasBinding) {
|
|
23
|
+
return !!spawnAccountId && !hasBinding;
|
|
24
|
+
}
|
|
25
|
+
function loadWrapperAccount(happyHome, sessionId, spawnAccountId, env = process.env) {
|
|
26
|
+
home = happyHome;
|
|
27
|
+
currentSettings = {};
|
|
28
|
+
let bindings = readSessionBindings(happyHome);
|
|
29
|
+
if (shouldRecordSpawnAccount(spawnAccountId, sessionId in bindings)) {
|
|
30
|
+
writeSessionBinding(happyHome, sessionId, { account: spawnAccountId });
|
|
31
|
+
bindings = { ...bindings, [sessionId]: { account: spawnAccountId } };
|
|
32
|
+
}
|
|
33
|
+
const probe = defaultSecretProbe(env);
|
|
34
|
+
const resolution = resolveClaudeAccount(sessionId, {
|
|
35
|
+
home: happyHome,
|
|
36
|
+
accounts: readAccounts(happyHome),
|
|
37
|
+
bindings,
|
|
38
|
+
fileReadable: probe.fileReadable,
|
|
39
|
+
env,
|
|
40
|
+
nodePath: process.execPath,
|
|
41
|
+
envKeyCopyPath: (id) => join(happyHome, "tmp", "accounts", `key-${process.pid}-${id}`),
|
|
42
|
+
readSecret: (path) => readFileSync(path, "utf8"),
|
|
43
|
+
now: Date.now()
|
|
44
|
+
});
|
|
45
|
+
if (resolution.kind === "machine") {
|
|
46
|
+
current = null;
|
|
47
|
+
return { profile: null, settings: {}, unavailable: false, notices: [], cleanup: () => {
|
|
48
|
+
} };
|
|
49
|
+
}
|
|
50
|
+
let cleanup = () => {
|
|
51
|
+
};
|
|
52
|
+
if (resolution.kind === "active" && resolution.envKeyCopy) {
|
|
53
|
+
const { name, path } = resolution.envKeyCopy;
|
|
54
|
+
mkdirSync(dirname(path), { recursive: true, mode: 448 });
|
|
55
|
+
writeFileSync(path, (env[name] ?? "").trim() + "\n", { mode: 384 });
|
|
56
|
+
chmodSync(path, 384);
|
|
57
|
+
delete env[name];
|
|
58
|
+
cleanup = () => rmSync(path, { force: true });
|
|
59
|
+
}
|
|
60
|
+
applyAccountEnv(env, resolution);
|
|
61
|
+
const notices = [];
|
|
62
|
+
if (resolution.kind === "unavailable") {
|
|
63
|
+
current = null;
|
|
64
|
+
notices.push(unavailableNotice(resolution.profile));
|
|
65
|
+
return { profile: resolution.profile, settings: {}, unavailable: true, notices, cleanup };
|
|
66
|
+
}
|
|
67
|
+
current = { id: resolution.id, kind: resolution.profile.kind };
|
|
68
|
+
currentSettings = resolution.settings;
|
|
69
|
+
const overrides = overridingUserSettings(readUserClaudeSettings(env), resolution.profile.kind);
|
|
70
|
+
if (overrides.length > 0) {
|
|
71
|
+
notices.push(`Your Claude settings.json sets ${overrides.join(", ")}, which takes precedence over account "${resolution.profile.label}". Remove it there for the account to apply.`);
|
|
72
|
+
}
|
|
73
|
+
return {
|
|
74
|
+
profile: resolution.profile,
|
|
75
|
+
settings: resolution.settings,
|
|
76
|
+
...resolution.pinnedModel ? { pinnedModel: resolution.pinnedModel } : {},
|
|
77
|
+
unavailable: false,
|
|
78
|
+
notices,
|
|
79
|
+
cleanup
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
function readUserClaudeSettings(env) {
|
|
83
|
+
const dir = env.CLAUDE_CONFIG_DIR || join(homedir(), ".claude");
|
|
84
|
+
try {
|
|
85
|
+
return JSON.parse(readFileSync(join(dir, "settings.json"), "utf8"));
|
|
86
|
+
} catch {
|
|
87
|
+
return void 0;
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
function noteAccountAuthFailure(now = Date.now()) {
|
|
91
|
+
if (!current || !home) return false;
|
|
92
|
+
const status = current.kind === "claude-subscription" ? "expired" : "invalid";
|
|
93
|
+
try {
|
|
94
|
+
const file = readAccountsFileV2(home);
|
|
95
|
+
const record = file.accounts[current.id];
|
|
96
|
+
if (record) {
|
|
97
|
+
record.check = { status, at: now, detail: "rejected during a session" };
|
|
98
|
+
writeAccountsFile(home, file);
|
|
99
|
+
return { label: record.label, status };
|
|
100
|
+
}
|
|
101
|
+
} catch {
|
|
102
|
+
}
|
|
103
|
+
return { label: current.id, status };
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
export { accountClaudeSettings as a, loadWrapperAccount as l, noteAccountAuthFailure as n };
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var node_fs = require('node:fs');
|
|
4
|
+
var os = require('node:os');
|
|
5
|
+
var path = require('node:path');
|
|
6
|
+
var claudeAccountEnv = require('./claudeAccountEnv-BOBpJ3k8.cjs');
|
|
7
|
+
var store = require('./store-DV__wCvP.cjs');
|
|
8
|
+
|
|
9
|
+
let current = null;
|
|
10
|
+
let home = null;
|
|
11
|
+
let currentSettings = {};
|
|
12
|
+
function accountClaudeSettings() {
|
|
13
|
+
return currentSettings;
|
|
14
|
+
}
|
|
15
|
+
function unavailableNotice(profile) {
|
|
16
|
+
const why = {
|
|
17
|
+
missing: "it no longer exists on this machine",
|
|
18
|
+
"missing-secret": "its key / token is missing on this machine",
|
|
19
|
+
expired: "its sign-in has expired \u2014 sign in again",
|
|
20
|
+
invalid: "its key was rejected \u2014 fix the key"
|
|
21
|
+
};
|
|
22
|
+
return `Account "${profile.label}" is unavailable: ${why[profile.reason ?? ""] ?? profile.reason ?? "unknown reason"}. This session will not fall back to the machine login; switch accounts or fix it, and the session restarts in place.`;
|
|
23
|
+
}
|
|
24
|
+
function shouldRecordSpawnAccount(spawnAccountId, hasBinding) {
|
|
25
|
+
return !!spawnAccountId && !hasBinding;
|
|
26
|
+
}
|
|
27
|
+
function loadWrapperAccount(happyHome, sessionId, spawnAccountId, env = process.env) {
|
|
28
|
+
home = happyHome;
|
|
29
|
+
currentSettings = {};
|
|
30
|
+
let bindings = store.readSessionBindings(happyHome);
|
|
31
|
+
if (shouldRecordSpawnAccount(spawnAccountId, sessionId in bindings)) {
|
|
32
|
+
store.writeSessionBinding(happyHome, sessionId, { account: spawnAccountId });
|
|
33
|
+
bindings = { ...bindings, [sessionId]: { account: spawnAccountId } };
|
|
34
|
+
}
|
|
35
|
+
const probe = store.defaultSecretProbe(env);
|
|
36
|
+
const resolution = claudeAccountEnv.resolveClaudeAccount(sessionId, {
|
|
37
|
+
home: happyHome,
|
|
38
|
+
accounts: store.readAccounts(happyHome),
|
|
39
|
+
bindings,
|
|
40
|
+
fileReadable: probe.fileReadable,
|
|
41
|
+
env,
|
|
42
|
+
nodePath: process.execPath,
|
|
43
|
+
envKeyCopyPath: (id) => path.join(happyHome, "tmp", "accounts", `key-${process.pid}-${id}`),
|
|
44
|
+
readSecret: (path) => node_fs.readFileSync(path, "utf8"),
|
|
45
|
+
now: Date.now()
|
|
46
|
+
});
|
|
47
|
+
if (resolution.kind === "machine") {
|
|
48
|
+
current = null;
|
|
49
|
+
return { profile: null, settings: {}, unavailable: false, notices: [], cleanup: () => {
|
|
50
|
+
} };
|
|
51
|
+
}
|
|
52
|
+
let cleanup = () => {
|
|
53
|
+
};
|
|
54
|
+
if (resolution.kind === "active" && resolution.envKeyCopy) {
|
|
55
|
+
const { name, path: path$1 } = resolution.envKeyCopy;
|
|
56
|
+
node_fs.mkdirSync(path.dirname(path$1), { recursive: true, mode: 448 });
|
|
57
|
+
node_fs.writeFileSync(path$1, (env[name] ?? "").trim() + "\n", { mode: 384 });
|
|
58
|
+
node_fs.chmodSync(path$1, 384);
|
|
59
|
+
delete env[name];
|
|
60
|
+
cleanup = () => node_fs.rmSync(path$1, { force: true });
|
|
61
|
+
}
|
|
62
|
+
claudeAccountEnv.applyAccountEnv(env, resolution);
|
|
63
|
+
const notices = [];
|
|
64
|
+
if (resolution.kind === "unavailable") {
|
|
65
|
+
current = null;
|
|
66
|
+
notices.push(unavailableNotice(resolution.profile));
|
|
67
|
+
return { profile: resolution.profile, settings: {}, unavailable: true, notices, cleanup };
|
|
68
|
+
}
|
|
69
|
+
current = { id: resolution.id, kind: resolution.profile.kind };
|
|
70
|
+
currentSettings = resolution.settings;
|
|
71
|
+
const overrides = claudeAccountEnv.overridingUserSettings(readUserClaudeSettings(env), resolution.profile.kind);
|
|
72
|
+
if (overrides.length > 0) {
|
|
73
|
+
notices.push(`Your Claude settings.json sets ${overrides.join(", ")}, which takes precedence over account "${resolution.profile.label}". Remove it there for the account to apply.`);
|
|
74
|
+
}
|
|
75
|
+
return {
|
|
76
|
+
profile: resolution.profile,
|
|
77
|
+
settings: resolution.settings,
|
|
78
|
+
...resolution.pinnedModel ? { pinnedModel: resolution.pinnedModel } : {},
|
|
79
|
+
unavailable: false,
|
|
80
|
+
notices,
|
|
81
|
+
cleanup
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
function readUserClaudeSettings(env) {
|
|
85
|
+
const dir = env.CLAUDE_CONFIG_DIR || path.join(os.homedir(), ".claude");
|
|
86
|
+
try {
|
|
87
|
+
return JSON.parse(node_fs.readFileSync(path.join(dir, "settings.json"), "utf8"));
|
|
88
|
+
} catch {
|
|
89
|
+
return void 0;
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
function noteAccountAuthFailure(now = Date.now()) {
|
|
93
|
+
if (!current || !home) return false;
|
|
94
|
+
const status = current.kind === "claude-subscription" ? "expired" : "invalid";
|
|
95
|
+
try {
|
|
96
|
+
const file = store.readAccountsFileV2(home);
|
|
97
|
+
const record = file.accounts[current.id];
|
|
98
|
+
if (record) {
|
|
99
|
+
record.check = { status, at: now, detail: "rejected during a session" };
|
|
100
|
+
store.writeAccountsFile(home, file);
|
|
101
|
+
return { label: record.label, status };
|
|
102
|
+
}
|
|
103
|
+
} catch {
|
|
104
|
+
}
|
|
105
|
+
return { label: current.id, status };
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
exports.accountClaudeSettings = accountClaudeSettings;
|
|
109
|
+
exports.loadWrapperAccount = loadWrapperAccount;
|
|
110
|
+
exports.noteAccountAuthFailure = noteAccountAuthFailure;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "very-happy-cli",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.192",
|
|
4
4
|
"description": "Remote multi-agent workspace CLI with deep Claude integration, native terminal streaming, and self-hosting.",
|
|
5
5
|
"author": "Kirill Dubovitskiy",
|
|
6
6
|
"contributors": [
|
|
@@ -117,12 +117,12 @@
|
|
|
117
117
|
"zod": "^4.6.7"
|
|
118
118
|
},
|
|
119
119
|
"optionalDependencies": {
|
|
120
|
-
"very-happy-tools-arm64-darwin": "0.2.
|
|
121
|
-
"very-happy-tools-x64-darwin": "0.2.
|
|
122
|
-
"very-happy-tools-arm64-linux": "0.2.
|
|
123
|
-
"very-happy-tools-x64-linux": "0.2.
|
|
124
|
-
"very-happy-tools-arm64-win32": "0.2.
|
|
125
|
-
"very-happy-tools-x64-win32": "0.2.
|
|
120
|
+
"very-happy-tools-arm64-darwin": "0.2.192",
|
|
121
|
+
"very-happy-tools-x64-darwin": "0.2.192",
|
|
122
|
+
"very-happy-tools-arm64-linux": "0.2.192",
|
|
123
|
+
"very-happy-tools-x64-linux": "0.2.192",
|
|
124
|
+
"very-happy-tools-arm64-win32": "0.2.192",
|
|
125
|
+
"very-happy-tools-x64-win32": "0.2.192"
|
|
126
126
|
},
|
|
127
127
|
"devDependencies": {
|
|
128
128
|
"@slopus/happy-wire": "workspace:*",
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
const DEFAULT_CLAUDE_PERMISSION_MODE = "default";
|
|
4
|
-
const DEFAULT_CODEX_PERMISSION_MODE = "default";
|
|
5
|
-
|
|
6
|
-
exports.DEFAULT_CLAUDE_PERMISSION_MODE = DEFAULT_CLAUDE_PERMISSION_MODE;
|
|
7
|
-
exports.DEFAULT_CODEX_PERMISSION_MODE = DEFAULT_CODEX_PERMISSION_MODE;
|