very-happy-cli 0.2.191 → 0.2.192
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{AcpBackend-DgrIc1vH.cjs → AcpBackend-BQO4ShOy.cjs} +3 -3
- package/dist/{AcpBackend-CCy_9AfR.mjs → AcpBackend-CGHTDJd9.mjs} +3 -3
- package/dist/{AcpSessionManager-CQnxx7gD.mjs → AcpSessionManager-G0xD6Jbq.mjs} +2 -2
- package/dist/{AcpSessionManager-DVOzCD3P.cjs → AcpSessionManager-LlUMmcpB.cjs} +2 -2
- package/dist/{BasePermissionHandler-DYLN6Ec9.mjs → BasePermissionHandler-BmTIg376.mjs} +1 -1
- package/dist/{BasePermissionHandler-C9Ag7yvs.cjs → BasePermissionHandler-N6Ip3tFt.cjs} +1 -1
- package/dist/account-CCVT-HO_.mjs +240 -0
- package/dist/account-DtaouikP.cjs +245 -0
- package/dist/accountService-Bddy0zwL.cjs +571 -0
- package/dist/accountService-Dd9uqde2.mjs +566 -0
- package/dist/{acpSessionResume-Bi7pA1n_.mjs → acpSessionResume-BWEUxNtC.mjs} +1 -1
- package/dist/{acpSessionResume-TvP_4Zq2.cjs → acpSessionResume-BnHDk5eD.cjs} +1 -1
- package/dist/{agentHome-DGv105SR.mjs → agentHome-B0VnjkZW.mjs} +4 -4
- package/dist/{agentHome-DNUKJWOY.cjs → agentHome-CqQ29YY7.cjs} +4 -4
- package/dist/{api-jfeMRg5R.mjs → api-_LeBScjg.mjs} +10 -10
- package/dist/{api-BBxZ7y2z.cjs → api-hMDsC6Wg.cjs} +10 -10
- package/dist/{apiMachine-DRJ7y-BB.mjs → apiMachine-CgRldeJ6.mjs} +76 -21
- package/dist/{apiMachine-DqyjKBZG.cjs → apiMachine-CqW2m6Zr.cjs} +81 -26
- package/dist/{attachmentContent-BO2njyza.cjs → attachmentContent-BEeT2J5n.cjs} +2 -2
- package/dist/{attachmentContent-Dm_RIs5L.mjs → attachmentContent-CyptLIfq.mjs} +2 -2
- package/dist/{auth-DnxoVkkf.cjs → auth-C9NvNHhL.cjs} +5 -5
- package/dist/{auth-DLR3ksCF.cjs → auth-CA1OClsW.cjs} +8 -8
- package/dist/{auth-BYDtjVNb.mjs → auth-CFQikywl.mjs} +8 -8
- package/dist/{auth-DC6rg8lJ.mjs → auth-DL8_J9vu.mjs} +5 -5
- package/dist/{auto-D5Jhukq1.mjs → auto-CKI05w1D.mjs} +17 -17
- package/dist/{auto-CwO0u8hB.cjs → auto-uQOxlxLp.cjs} +17 -17
- package/dist/{bootstrap-rLaL3kTa.mjs → bootstrap-DaZ0Np7X.mjs} +2 -2
- package/dist/{bootstrap-sly4qPPY.cjs → bootstrap-DsZGc69k.cjs} +2 -2
- package/dist/{browser-CHpVgyni.mjs → browser-BUIaSHK2.mjs} +1 -1
- package/dist/{browser-BTgZ9d4i.cjs → browser-Ft0ASDm7.cjs} +1 -1
- package/dist/claudeAccountEnv-BOBpJ3k8.cjs +137 -0
- package/dist/claudeAccountEnv-ON24i0qv.mjs +132 -0
- package/dist/{claudeLocal-Bgb5GGsq.mjs → claudeLocal-B1ZVtryl.mjs} +5 -5
- package/dist/{claudeLocal-1vuTFcL8.cjs → claudeLocal-BMf9t4Fa.cjs} +5 -5
- package/dist/{claudeLocalLauncher-T7EfT68h.mjs → claudeLocalLauncher-Bp8bqF4y.mjs} +10 -10
- package/dist/{claudeLocalLauncher-DOsL6HFY.cjs → claudeLocalLauncher-C8TeJcfF.cjs} +10 -10
- package/dist/{claudeSessionFork-CPvi6yDX.mjs → claudeSessionFork-8AA47z8Y.mjs} +1 -1
- package/dist/{claudeSessionFork-Cko4SaVi.cjs → claudeSessionFork-YiktY55n.cjs} +1 -1
- package/dist/{client-Bi20Ka0h.mjs → client-Bm4oKvW7.mjs} +2 -2
- package/dist/{client-Bh1aUPh-.mjs → client-BmPaBnDK.mjs} +4 -4
- package/dist/{client-C-OdTbrU.cjs → client-CFHZfh9x.cjs} +4 -4
- package/dist/{client-BscskEBk.cjs → client-Crh8_cNx.cjs} +2 -2
- package/dist/{client-BXD66ZF5.mjs → client-Cxlp_D4I.mjs} +2 -2
- package/dist/{client-C5-C0t2a.cjs → client-D8XROyZc.cjs} +2 -2
- package/dist/codex/happyMcpStdioBridge.cjs +16 -16
- package/dist/codex/happyMcpStdioBridge.mjs +16 -16
- package/dist/{codexAppServerClient-DXhAf6i-.mjs → codexAppServerClient-BWJbLCQn.mjs} +3 -3
- package/dist/{codexAppServerClient-DKXeikEe.cjs → codexAppServerClient-q8GHQhyC.cjs} +3 -3
- package/dist/{codexCommand-CIaOiiOj.mjs → codexCommand-BfXfRQr4.mjs} +50 -48
- package/dist/{codexCommand-DvbbpYBS.cjs → codexCommand-BgpGg-Zy.cjs} +50 -48
- package/dist/{codexTermination-BszWfyk5.cjs → codexTermination-CVUF0X75.cjs} +1 -1
- package/dist/{codexTermination-BcQdEDaw.mjs → codexTermination-s9fd1gkA.mjs} +1 -1
- package/dist/{config-Di3Cf6js.cjs → config-BAjyTyYp.cjs} +3 -3
- package/dist/{config-OCEcVVK1.mjs → config-BF8XgLyc.mjs} +3 -3
- package/dist/{configuration-DfPBa-9d.cjs → configuration-CXEVKAyF.cjs} +1 -1
- package/dist/{configuration-ECqXu34R.mjs → configuration-IhRiLDVe.mjs} +1 -1
- package/dist/{connect-BTfAUhk8.mjs → connect-LZh1gr08.mjs} +13 -13
- package/dist/{connect-BPQRuOw5.cjs → connect-rCS56arw.cjs} +13 -13
- package/dist/{context-Co7hUaW-.cjs → context-3_S_mWz9.cjs} +1 -1
- package/dist/{context-CfgTFpCB.mjs → context-DO6F5YwH.mjs} +1 -1
- package/dist/{controlClient-ClI7A0qE.mjs → controlClient-8ILulwjc.mjs} +14 -5
- package/dist/{controlClient-C13_pSKG.cjs → controlClient-j7p5p3_7.cjs} +15 -4
- package/dist/{createSessionMetadata-Cf78KHtt.cjs → createSessionMetadata-DwdD_uVo.cjs} +2 -2
- package/dist/{createSessionMetadata-B0eT_Kfj.mjs → createSessionMetadata-oyaTZm1b.mjs} +2 -2
- package/dist/daemonAccounts-BCjDgoNt.cjs +51 -0
- package/dist/daemonAccounts-BJgt6IJe.mjs +27 -0
- package/dist/{defaultPermissionMode-oqTupStc.cjs → defaultPermissionMode-BFShzF55.cjs} +1 -1
- package/dist/{defaultPermissionMode-m6z2QVyP.mjs → defaultPermissionMode-Lt3PUCwY.mjs} +1 -1
- package/dist/{deterministicJson-CpFFgUL_.cjs → deterministicJson-DUN0v3St.cjs} +13 -13
- package/dist/{deterministicJson-BtSwbsok.mjs → deterministicJson-Dfp-7wUZ.mjs} +13 -13
- package/dist/{doctor-lsxmAK4o.mjs → doctor-B_UwMcVT.mjs} +7 -7
- package/dist/{doctor-BEU0_1Xv.cjs → doctor-FgUYTbAT.cjs} +7 -7
- package/dist/{downloadTarget-CikzJv1h.cjs → downloadTarget-BrrQEDxg.cjs} +6 -6
- package/dist/{downloadTarget-BXqXhNF7.mjs → downloadTarget-C0d6jRx-.mjs} +6 -6
- package/dist/{ensureDaemonRunning-BUuH-pbE.cjs → ensureDaemonRunning-Cq4FYI5Q.cjs} +5 -5
- package/dist/{ensureDaemonRunning-B_9WAlbU.mjs → ensureDaemonRunning-KUMFfIil.mjs} +5 -5
- package/dist/{handleResumeCommand-BK9XKH_l.mjs → handleResumeCommand-BGhVo3QH.mjs} +5 -5
- package/dist/{handleResumeCommand-Dj7oi2KO.cjs → handleResumeCommand-Cl9GIL5F.cjs} +5 -5
- package/dist/{index-BdOJOZ6J.mjs → index-BjXjMhGY.mjs} +4 -4
- package/dist/{index-CLUHaPU8.cjs → index-BzAYnYct.cjs} +110 -0
- package/dist/{index-CmZusg8Q.cjs → index-CQ_hLLCj.cjs} +3 -3
- package/dist/{index-Dg2NAF_-.cjs → index-CRipkiqo.cjs} +4 -4
- package/dist/{index-D3c7CLot.cjs → index-CZaLMmPC.cjs} +4 -4
- package/dist/{index-Cxso1rg4.mjs → index-Ca1Tt96A.mjs} +45 -41
- package/dist/{index-CauRYQKr.cjs → index-D8ODb0_U.cjs} +44 -40
- package/dist/{index-Bq8NKSCF.mjs → index-DYD3GM1m.mjs} +104 -1
- package/dist/{index-BjZnpGWX.mjs → index-JQDyJ3Li.mjs} +3 -3
- package/dist/{index-DuK9XYbZ.mjs → index-v5EmjT8l.mjs} +4 -4
- package/dist/index.cjs +2 -2
- package/dist/index.mjs +2 -2
- package/dist/{install-DXllkuy0.cjs → install-ClUA9tbC.cjs} +3 -3
- package/dist/{install-DTIveLOS.mjs → install-D6EHRtAN.mjs} +3 -3
- package/dist/lib.cjs +12 -12
- package/dist/lib.d.cts +282 -0
- package/dist/lib.d.mts +282 -0
- package/dist/lib.mjs +12 -12
- package/dist/{lidState-CD81ryTy.mjs → lidState-CZOXXdzv.mjs} +1 -1
- package/dist/{lidState-C9_DoF9i.cjs → lidState-DqoN7zH4.cjs} +1 -1
- package/dist/{localHappyAgentAuth-CCjUvOfi.cjs → localHappyAgentAuth-BnGCpHRX.cjs} +1 -1
- package/dist/{localHappyAgentAuth-Cg-m1lwm.mjs → localHappyAgentAuth-YHxDZ4x4.mjs} +1 -1
- package/dist/{logger-Ct2zvaq0.cjs → logger-8su64lqR.cjs} +2 -2
- package/dist/{logger-GcbI0eg2.mjs → logger-Fd_rNvgd.mjs} +2 -2
- package/dist/{machineMetadata-CXRmFNOV.mjs → machineMetadata-1HIIC7Bc.mjs} +3 -3
- package/dist/{machineMetadata-DDCVWb_x.cjs → machineMetadata-DYXt3p6u.cjs} +3 -3
- package/dist/{main-omGr_ONk.mjs → main-BI6GIzUL.mjs} +92 -48
- package/dist/{main-BHC-WIcM.cjs → main-C_GrcYkn.cjs} +92 -48
- package/dist/{mcp-xUzii0m8.cjs → mcp-BycIv9oQ.cjs} +18 -15
- package/dist/{mcp-D5hxmRAq.mjs → mcp-XGoxywno.mjs} +18 -15
- package/dist/{mirrorProtocol-Dfl8Ahyf.cjs → mirrorProtocol-DVnB8EO8.cjs} +3 -3
- package/dist/{mirrorProtocol-Lcx20Oby.mjs → mirrorProtocol-DXT3rv7T.mjs} +3 -3
- package/dist/{package-BsUHyqWe.mjs → package-6KkRAops.mjs} +7 -7
- package/dist/{package-9n7wd2dT.cjs → package-iuLlSiSF.cjs} +7 -7
- package/dist/{panels-BfknEmt7.cjs → panels-0C89q0Tu.cjs} +5 -5
- package/dist/{panels-CpEKWWbI.mjs → panels-B5Di2zb2.mjs} +5 -5
- package/dist/{peerTools-CElYh-5u.cjs → peerTools-CANTX_mG.cjs} +5 -5
- package/dist/{peerTools-CwCe6tmJ.mjs → peerTools-CKJ-IDM4.mjs} +5 -5
- package/dist/{persistence-A2NeERZJ.cjs → persistence-B4ttN-fR.cjs} +2 -2
- package/dist/{persistence-Cpw4yJs8.mjs → persistence-DWcHe035.mjs} +2 -2
- package/dist/{piRunnerArgs-BnFU0K73.cjs → piRunnerArgs-BOkfxyak.cjs} +1 -1
- package/dist/{piRunnerArgs-Bqmu16He.mjs → piRunnerArgs-Bl5GpBoN.mjs} +2 -2
- package/dist/{piRuntime-Cgn1b0OX.mjs → piRuntime-BhwxzdQf.mjs} +1 -1
- package/dist/{piRuntime-DpS9TAIs.cjs → piRuntime-DzrIiZU8.cjs} +1 -1
- package/dist/{piTerminal-rmve-VlI.cjs → piTerminal-BdS7ol7v.cjs} +20 -17
- package/dist/{piTerminal-BGdps8f3.mjs → piTerminal-DnA2CbGr.mjs} +20 -17
- package/dist/{pushNotifications-23YSd-0l.cjs → pushNotifications-BqFoLye2.cjs} +5 -3
- package/dist/{pushNotifications-XAM8__Pg.mjs → pushNotifications-DkQ0yvFs.mjs} +5 -3
- package/dist/{query-u2GX-I0C.cjs → query-BQ4br3yn.cjs} +1 -1
- package/dist/{query-SZcYnJoW.mjs → query-BRJYSkb1.mjs} +1 -1
- package/dist/{rateLimitReporter-COUkf446.mjs → rateLimitReporter-BRbYkmuP.mjs} +3 -3
- package/dist/{rateLimitReporter-CaTzBe3x.cjs → rateLimitReporter-DK5SQuCc.cjs} +3 -3
- package/dist/{rateLimitWindows-B2Kx6L0S.cjs → rateLimitWindows-DBfiuYeg.cjs} +1 -1
- package/dist/{rateLimitWindows-j_qQk0KY.mjs → rateLimitWindows-Da5AR-4u.mjs} +1 -1
- package/dist/reconnectEnv-B31lY4nR.cjs +27 -0
- package/dist/reconnectEnv-DeSvHl3q.mjs +24 -0
- package/dist/{registerCommonHandlers-D1MiSfcB.cjs → registerCommonHandlers-m6pxxf2J.cjs} +2 -2
- package/dist/{registerCommonHandlers-DRRfinzK.mjs → registerCommonHandlers-yQ7Ru-l0.mjs} +2 -2
- package/dist/{registerKillSessionHandler-hvCsEn7b.cjs → registerKillSessionHandler-BAOIa_Fs.cjs} +6 -6
- package/dist/{registerKillSessionHandler-Cpug_r5C.mjs → registerKillSessionHandler-BDNpi7YO.mjs} +6 -6
- package/dist/{remoteSessionClient-BdnJ_n8C.mjs → remoteSessionClient-CZ7aaNgj.mjs} +5 -5
- package/dist/{remoteSessionClient-6ymeMVa4.cjs → remoteSessionClient-iJMXRN_D.cjs} +5 -5
- package/dist/{reportProgressTool-XgQBzxoD.mjs → reportProgressTool-DfQhPu0s.mjs} +3 -3
- package/dist/{reportProgressTool-tzQLCLIw.cjs → reportProgressTool-DpFs7pSe.cjs} +3 -3
- package/dist/{run-Bt0AklUU.mjs → run-CwN28mcj.mjs} +211 -51
- package/dist/{run-DYL_wuj7.cjs → run-p-xp1_HY.cjs} +210 -50
- package/dist/{runClaude-CBEpYO4S.cjs → runClaude-D6U1Z575.cjs} +62 -44
- package/dist/{runClaude-C3rii_S6.mjs → runClaude-DRKtAGTm.mjs} +62 -44
- package/dist/{runClaudeDeps-DlVfMG4F.mjs → runClaudeDeps-BheVcIlD.mjs} +56 -47
- package/dist/{runClaudeDeps-CYuozSC6.cjs → runClaudeDeps-Dkofokgb.cjs} +51 -42
- package/dist/{runGemini-CEI3b90u.cjs → runGemini-C8q3YCc0.cjs} +33 -33
- package/dist/{runGemini-DkYhRk9S.mjs → runGemini-owbvhFbi.mjs} +33 -33
- package/dist/{runOpenClaw-BgjD6E4d.cjs → runOpenClaw-DGeN66-t.cjs} +18 -18
- package/dist/{runOpenClaw-DpprWCoz.mjs → runOpenClaw-Dky3-mjO.mjs} +18 -18
- package/dist/{sandbox-XCDUbH72.cjs → sandbox-D2CPyoCA.cjs} +4 -4
- package/dist/{sandbox-DJ7A7lsy.mjs → sandbox-sq_wy9Gl.mjs} +4 -4
- package/dist/{selfCheck-BYUDB1Uq.cjs → selfCheck-BgLvQKSt.cjs} +39 -37
- package/dist/selfCheck-vkfrgQ7X.mjs +88 -0
- package/dist/{send-CASDBCyJ.cjs → send-Cd10YhXh.cjs} +8 -8
- package/dist/{send-Ba63huxv.mjs → send-K9vg-8t-.mjs} +8 -8
- package/dist/{server-cZoV9XRt.cjs → server-DRrV64r0.cjs} +6 -6
- package/dist/{server-w3W0toNd.mjs → server-De4W1zuK.mjs} +4 -4
- package/dist/{sessionLock-BmLA2S8K.cjs → sessionLock-BDtSzzKS.cjs} +10 -3
- package/dist/{sessionLock-G2PMqvsh.mjs → sessionLock-Dl6i7IgA.mjs} +10 -4
- package/dist/{sessionOps-DXlTmS7J.cjs → sessionOps-DvnEH4PL.cjs} +4 -4
- package/dist/{sessionOps-DPw5k8vV.mjs → sessionOps-gU88-W9F.mjs} +4 -4
- package/dist/sessionProvider-CKcIo7KO.mjs +108 -0
- package/dist/sessionProvider-CbSZeZrl.cjs +113 -0
- package/dist/{sessionScanner-AHjnicxi.cjs → sessionScanner-7RtcCeyD.cjs} +3 -3
- package/dist/{sessionScanner-BCXpdZJN.mjs → sessionScanner-DR32uSby.mjs} +3 -3
- package/dist/{sessions-BiBXOBx0.cjs → sessions-BvuMjgvJ.cjs} +10 -10
- package/dist/{sessions-Clk8MR5Y.mjs → sessions-DTt2Eguk.mjs} +10 -10
- package/dist/{setupOfflineReconnection-DI-QZGYz.mjs → setupOfflineReconnection-BGnvhRfb.mjs} +2 -2
- package/dist/{setupOfflineReconnection-BKLfOd-i.cjs → setupOfflineReconnection-DduOsw6p.cjs} +2 -2
- package/dist/{spawn-4tsp1uhh.mjs → spawn-CL3cUc7b.mjs} +26 -17
- package/dist/{spawn-D5omsx1Q.cjs → spawn-DMB6rRPA.cjs} +26 -17
- package/dist/{spawnAgents-CtkkIFHd.cjs → spawnAgents-CClb7buD.cjs} +1 -1
- package/dist/{spawnAgents-CjoU6ZOS.mjs → spawnAgents-CRMfOJhh.mjs} +1 -1
- package/dist/{spawnHappyCLI-CIA9Sc_5.mjs → spawnHappyCLI-Cj_6IICe.mjs} +1 -1
- package/dist/{spawnHappyCLI-CF_gLi92.cjs → spawnHappyCLI-DJdhX_Qx.cjs} +1 -1
- package/dist/{startFileWatcher-CDO6fb2m.mjs → startFileWatcher-DikVa8kg.mjs} +1 -1
- package/dist/{startFileWatcher-9Stpxe7p.cjs → startFileWatcher-LnOmVW6H.cjs} +1 -1
- package/dist/{startupSessionCreate-CcF7rGGB.cjs → startupSessionCreate-B3ND-917.cjs} +3 -3
- package/dist/{startupSessionCreate-BtR4iYEC.mjs → startupSessionCreate-CDdaLaMq.mjs} +3 -3
- package/dist/store--XN-7MS0.mjs +269 -0
- package/dist/store-DV__wCvP.cjs +289 -0
- package/dist/{streamRelay-BhI6jqF-.cjs → streamRelay-DFdOaLOn.cjs} +1 -1
- package/dist/{streamRelay-DMwOMTKf.mjs → streamRelay-sABnxEXq.mjs} +1 -1
- package/dist/{sync-C0PRuTMj.mjs → sync-JoEZKRo8.mjs} +1 -1
- package/dist/{sync-Ba8N6xba.cjs → sync-_2lsZ1U2.cjs} +1 -1
- package/dist/{systemPrompt-DV5IReD4.cjs → systemPrompt-CJEvNCuW.cjs} +2 -2
- package/dist/{systemPrompt-D0q8eyjy.mjs → systemPrompt-Zq4HyrZ5.mjs} +2 -2
- package/dist/{teams-z3Gp-KlV.cjs → teams-BNZafnrT.cjs} +7 -7
- package/dist/{teams-BO3_arwM.mjs → teams-qz4LqKJ2.mjs} +7 -7
- package/dist/{template-DLR_0hfj.mjs → template-CJ8BWSsc.mjs} +1 -1
- package/dist/{template-B_5l6pkc.cjs → template-LgvBbOna.cjs} +1 -1
- package/dist/{time-Cy0a-7YX.cjs → time-CaUlWSNJ.cjs} +1 -1
- package/dist/{time-D0jvDRhn.mjs → time-bzmet4s5.mjs} +1 -1
- package/dist/{titleGenerator-RGHWP2YL.cjs → titleGenerator-BuIIu_JP.cjs} +17 -13
- package/dist/{titleGenerator-AGQsXskb.mjs → titleGenerator-CbTtJ_1D.mjs} +16 -12
- package/dist/{todo-CzIDPLFy.cjs → todo-CQ_BTf9C.cjs} +6 -6
- package/dist/{todo-BZ954vsz.mjs → todo-DIrVF_Ak.mjs} +6 -6
- package/dist/{tools-B1x1j6tz.cjs → tools-BnmmFZji.cjs} +1 -1
- package/dist/{tools-Bei5i03L.mjs → tools-cLOjBvPn.mjs} +1 -1
- package/dist/{uninstall-B4T_e3Mr.mjs → uninstall-C5OuW6dE.mjs} +3 -3
- package/dist/{uninstall-C3cnIvz1.cjs → uninstall-uEEGKB84.cjs} +3 -3
- package/dist/wrapperAccount-DXlD3bsO.mjs +106 -0
- package/dist/wrapperAccount-DzoGqS2b.cjs +110 -0
- package/package.json +7 -7
- package/dist/providerBinding-B-Qbx9W2.cjs +0 -140
- package/dist/providerBinding-CYubGg-Z.mjs +0 -132
- package/dist/selfCheck-C-rNljKV.mjs +0 -86
- package/dist/sessionProvider-DUn91LhJ.mjs +0 -109
- package/dist/sessionProvider-Dg691XQ4.cjs +0 -114
|
@@ -0,0 +1,289 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var node_fs = require('node:fs');
|
|
4
|
+
var os = require('node:os');
|
|
5
|
+
var path = require('node:path');
|
|
6
|
+
|
|
7
|
+
function providersPath(happyHomeDir) {
|
|
8
|
+
return path.join(happyHomeDir, "providers.json");
|
|
9
|
+
}
|
|
10
|
+
function sessionProvidersPath(happyHomeDir) {
|
|
11
|
+
return path.join(happyHomeDir, "session-providers.json");
|
|
12
|
+
}
|
|
13
|
+
function parseProvidersFile(raw) {
|
|
14
|
+
const profiles = {};
|
|
15
|
+
const src = raw && typeof raw === "object" ? raw.profiles : void 0;
|
|
16
|
+
if (src && typeof src === "object") {
|
|
17
|
+
for (const [id, p] of Object.entries(src)) {
|
|
18
|
+
if (!p || typeof p !== "object") continue;
|
|
19
|
+
const { name, baseUrl, apiKeyFile, models } = p;
|
|
20
|
+
if (typeof baseUrl !== "string" || !/^https?:\/\//.test(baseUrl) || typeof apiKeyFile !== "string" || !apiKeyFile) continue;
|
|
21
|
+
const ids = [];
|
|
22
|
+
const contextWindows = {};
|
|
23
|
+
for (const m of Array.isArray(models) ? models : []) {
|
|
24
|
+
if (typeof m === "string") ids.push(m);
|
|
25
|
+
else if (m && typeof m === "object" && typeof m.id === "string") {
|
|
26
|
+
const { id: modelId, contextWindow } = m;
|
|
27
|
+
ids.push(modelId);
|
|
28
|
+
if (typeof contextWindow === "number" && Number.isInteger(contextWindow) && contextWindow > 0) contextWindows[modelId] = contextWindow;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
profiles[id] = {
|
|
32
|
+
...typeof name === "string" ? { name } : {},
|
|
33
|
+
baseUrl: baseUrl.replace(/\/+$/, ""),
|
|
34
|
+
apiKeyFile,
|
|
35
|
+
...Array.isArray(models) ? { models: ids } : {},
|
|
36
|
+
...Object.keys(contextWindows).length > 0 ? { contextWindows } : {}
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
return { profiles };
|
|
41
|
+
}
|
|
42
|
+
function parseSessionProvidersFile(raw) {
|
|
43
|
+
const out = {};
|
|
44
|
+
if (!raw || typeof raw !== "object") return out;
|
|
45
|
+
for (const [sessionId, b] of Object.entries(raw)) {
|
|
46
|
+
if (!b || typeof b !== "object") continue;
|
|
47
|
+
const { profile, model } = b;
|
|
48
|
+
if (typeof profile === "string" && profile && typeof model === "string" && model) out[sessionId] = { profile, model };
|
|
49
|
+
}
|
|
50
|
+
return out;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
const SPAWN_ACCOUNT_ENV = "VH_AGENT_PROFILE_ID";
|
|
54
|
+
const SUBSCRIPTION_TOKEN_TTL_MS = 365 * 24 * 60 * 60 * 1e3;
|
|
55
|
+
const ACCOUNT_ID_PATTERN = /^[a-z0-9][a-z0-9-]{0,47}$/;
|
|
56
|
+
function accountsPath(home) {
|
|
57
|
+
return path.join(home, "accounts.json");
|
|
58
|
+
}
|
|
59
|
+
function accountSecretPath(home, id) {
|
|
60
|
+
if (!ACCOUNT_ID_PATTERN.test(id)) throw new Error(`invalid account id "${id}"`);
|
|
61
|
+
return path.join(home, "accounts", id, "secret");
|
|
62
|
+
}
|
|
63
|
+
function sessionAccountsPath(home) {
|
|
64
|
+
return path.join(home, "session-accounts.json");
|
|
65
|
+
}
|
|
66
|
+
function expandHome(path$1, home = os.homedir()) {
|
|
67
|
+
return path$1 === "~" ? home : path$1.startsWith("~/") ? path.join(home, path$1.slice(2)) : path$1;
|
|
68
|
+
}
|
|
69
|
+
function readJson(path) {
|
|
70
|
+
if (!node_fs.existsSync(path)) return void 0;
|
|
71
|
+
try {
|
|
72
|
+
return JSON.parse(node_fs.readFileSync(path, "utf8"));
|
|
73
|
+
} catch {
|
|
74
|
+
return void 0;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
function writeJson0600(path$1, value) {
|
|
78
|
+
node_fs.mkdirSync(path.dirname(path$1), { recursive: true });
|
|
79
|
+
const tmp = `${path$1}.${process.pid}.${Date.now()}.tmp`;
|
|
80
|
+
node_fs.writeFileSync(tmp, JSON.stringify(value, null, 2) + "\n", { mode: 384 });
|
|
81
|
+
node_fs.chmodSync(tmp, 384);
|
|
82
|
+
node_fs.renameSync(tmp, path$1);
|
|
83
|
+
}
|
|
84
|
+
function parseKey(raw) {
|
|
85
|
+
if (!raw || typeof raw !== "object") return void 0;
|
|
86
|
+
const k = raw;
|
|
87
|
+
if (k.source === "file" && typeof k.path === "string" && k.path) return { source: "file", path: k.path };
|
|
88
|
+
if (k.source === "env" && typeof k.name === "string" && /^[A-Za-z_][A-Za-z0-9_]*$/.test(k.name)) return { source: "env", name: k.name };
|
|
89
|
+
if (k.source === "stored") return { source: "stored" };
|
|
90
|
+
return void 0;
|
|
91
|
+
}
|
|
92
|
+
function parseAccountsFile(raw) {
|
|
93
|
+
const out = { version: 2, accounts: {}, defaults: {} };
|
|
94
|
+
if (!raw || typeof raw !== "object") return out;
|
|
95
|
+
const src = raw.accounts;
|
|
96
|
+
if (src && typeof src === "object") {
|
|
97
|
+
for (const [id, value] of Object.entries(src)) {
|
|
98
|
+
if (!ACCOUNT_ID_PATTERN.test(id) || !value || typeof value !== "object") continue;
|
|
99
|
+
const a = value;
|
|
100
|
+
if (a.agent !== "claude" || a.kind !== "claude-subscription" && a.kind !== "claude-api") continue;
|
|
101
|
+
const label = typeof a.label === "string" && a.label.trim() ? a.label.trim() : id;
|
|
102
|
+
const rec = { label, agent: "claude", kind: a.kind, createdAt: typeof a.createdAt === "number" ? a.createdAt : 0 };
|
|
103
|
+
if (a.kind === "claude-api") {
|
|
104
|
+
if (typeof a.baseUrl !== "string" || !/^https?:\/\//.test(a.baseUrl)) continue;
|
|
105
|
+
const key = parseKey(a.key);
|
|
106
|
+
if (!key) continue;
|
|
107
|
+
rec.baseUrl = a.baseUrl.replace(/\/+$/, "");
|
|
108
|
+
rec.key = key;
|
|
109
|
+
if (Array.isArray(a.models)) rec.models = a.models.filter((m) => typeof m === "string" && m.length > 0);
|
|
110
|
+
if (a.contextWindows && typeof a.contextWindows === "object") {
|
|
111
|
+
const cw = {};
|
|
112
|
+
for (const [m, n] of Object.entries(a.contextWindows)) {
|
|
113
|
+
if (typeof n === "number" && Number.isInteger(n) && n > 0) cw[m] = n;
|
|
114
|
+
}
|
|
115
|
+
if (Object.keys(cw).length > 0) rec.contextWindows = cw;
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
if (typeof a.expiresAt === "number") rec.expiresAt = a.expiresAt;
|
|
119
|
+
if (a.check && typeof a.check === "object") {
|
|
120
|
+
const c = a.check;
|
|
121
|
+
if (typeof c.status === "string" && typeof c.at === "number") {
|
|
122
|
+
rec.check = { status: c.status, at: c.at, ...typeof c.detail === "string" ? { detail: c.detail } : {} };
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
out.accounts[id] = rec;
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
const defaults = raw.defaults;
|
|
129
|
+
if (defaults && typeof defaults === "object") {
|
|
130
|
+
for (const [agent, id] of Object.entries(defaults)) {
|
|
131
|
+
if (typeof id === "string" && id) out.defaults[agent] = id;
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
return out;
|
|
135
|
+
}
|
|
136
|
+
function legacyAccountsFromProviders(raw) {
|
|
137
|
+
const out = {};
|
|
138
|
+
for (const [id, p] of Object.entries(parseProvidersFile(raw).profiles)) {
|
|
139
|
+
if (!ACCOUNT_ID_PATTERN.test(id)) continue;
|
|
140
|
+
out[id] = {
|
|
141
|
+
label: p.name ?? id,
|
|
142
|
+
agent: "claude",
|
|
143
|
+
kind: "claude-api",
|
|
144
|
+
createdAt: 0,
|
|
145
|
+
baseUrl: p.baseUrl,
|
|
146
|
+
key: { source: "file", path: p.apiKeyFile },
|
|
147
|
+
...p.models ? { models: p.models } : {},
|
|
148
|
+
...p.contextWindows ? { contextWindows: p.contextWindows } : {},
|
|
149
|
+
legacy: true
|
|
150
|
+
};
|
|
151
|
+
}
|
|
152
|
+
return out;
|
|
153
|
+
}
|
|
154
|
+
function mergeAccounts(v2, legacy) {
|
|
155
|
+
return { ...v2, accounts: { ...legacy, ...v2.accounts } };
|
|
156
|
+
}
|
|
157
|
+
function readAccountsFileV2(home) {
|
|
158
|
+
return parseAccountsFile(readJson(accountsPath(home)));
|
|
159
|
+
}
|
|
160
|
+
function readAccounts(home) {
|
|
161
|
+
return mergeAccounts(readAccountsFileV2(home), legacyAccountsFromProviders(readJson(providersPath(home))));
|
|
162
|
+
}
|
|
163
|
+
function writeAccountsFile(home, file) {
|
|
164
|
+
const accounts = {};
|
|
165
|
+
for (const [id, a] of Object.entries(file.accounts)) if (!a.legacy) accounts[id] = a;
|
|
166
|
+
writeJson0600(accountsPath(home), { version: 2, accounts, defaults: file.defaults });
|
|
167
|
+
}
|
|
168
|
+
function mergeSessionBindings(v2Raw, v1Raw) {
|
|
169
|
+
const out = {};
|
|
170
|
+
for (const [sessionId, b] of Object.entries(parseSessionProvidersFile(v1Raw))) out[sessionId] = { account: b.profile, model: b.model };
|
|
171
|
+
if (v2Raw && typeof v2Raw === "object") {
|
|
172
|
+
for (const [sessionId, b] of Object.entries(v2Raw)) {
|
|
173
|
+
if (!b || typeof b !== "object") continue;
|
|
174
|
+
const { account, model } = b;
|
|
175
|
+
if (account !== null && (typeof account !== "string" || !account)) continue;
|
|
176
|
+
out[sessionId] = { account, ...typeof model === "string" && model ? { model } : {} };
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
return out;
|
|
180
|
+
}
|
|
181
|
+
function readSessionBindings(home) {
|
|
182
|
+
return mergeSessionBindings(readJson(sessionAccountsPath(home)), readJson(sessionProvidersPath(home)));
|
|
183
|
+
}
|
|
184
|
+
function readSessionBindingV2(home, sessionId) {
|
|
185
|
+
const raw = readJson(sessionAccountsPath(home));
|
|
186
|
+
const entry = raw && typeof raw === "object" ? raw[sessionId] : void 0;
|
|
187
|
+
return entry && typeof entry === "object" ? entry : void 0;
|
|
188
|
+
}
|
|
189
|
+
function writeSessionBinding(home, sessionId, binding) {
|
|
190
|
+
const raw = readJson(sessionAccountsPath(home));
|
|
191
|
+
const current = raw && typeof raw === "object" ? { ...raw } : {};
|
|
192
|
+
if (binding === void 0) delete current[sessionId];
|
|
193
|
+
else current[sessionId] = binding;
|
|
194
|
+
writeJson0600(sessionAccountsPath(home), current);
|
|
195
|
+
}
|
|
196
|
+
function sessionsBoundTo(bindings, accountId) {
|
|
197
|
+
return Object.entries(bindings).filter(([, b]) => b.account === accountId).map(([id]) => id);
|
|
198
|
+
}
|
|
199
|
+
function writeAccountSecret(home, id, secret) {
|
|
200
|
+
const path$1 = accountSecretPath(home, id);
|
|
201
|
+
node_fs.mkdirSync(path.dirname(path$1), { recursive: true, mode: 448 });
|
|
202
|
+
node_fs.chmodSync(path.dirname(path$1), 448);
|
|
203
|
+
const tmp = `${path$1}.${process.pid}.tmp`;
|
|
204
|
+
node_fs.writeFileSync(tmp, secret.trim() + "\n", { mode: 384 });
|
|
205
|
+
node_fs.chmodSync(tmp, 384);
|
|
206
|
+
node_fs.renameSync(tmp, path$1);
|
|
207
|
+
}
|
|
208
|
+
function removeAccountSecret(home, id) {
|
|
209
|
+
node_fs.rmSync(path.dirname(accountSecretPath(home, id)), { recursive: true, force: true });
|
|
210
|
+
}
|
|
211
|
+
function newAccountId(label, kind, taken) {
|
|
212
|
+
const used = new Set(taken);
|
|
213
|
+
const ascii = /^[\x20-\x7e]*$/.test(label);
|
|
214
|
+
const slug = ascii ? label.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "").slice(0, 40) : "";
|
|
215
|
+
const base = slug && /^[a-z0-9]/.test(slug) ? slug : kind === "claude-subscription" ? "claude-sub" : "claude-api";
|
|
216
|
+
if (!used.has(base)) return base;
|
|
217
|
+
for (let n = 2; ; n++) if (!used.has(`${base}-${n}`)) return `${base}-${n}`;
|
|
218
|
+
}
|
|
219
|
+
function secretPresent(home, id, a, probe) {
|
|
220
|
+
if (a.kind === "claude-subscription" || a.key?.source === "stored") return probe.fileReadable(accountSecretPath(home, id));
|
|
221
|
+
if (a.key?.source === "file") return probe.fileReadable(expandHome(a.key.path));
|
|
222
|
+
if (a.key?.source === "env") return !!probe.env[a.key.name]?.trim();
|
|
223
|
+
return false;
|
|
224
|
+
}
|
|
225
|
+
function accountStatus(home, id, a, probe, now) {
|
|
226
|
+
if (!secretPresent(home, id, a, probe)) return { status: "missing-secret" };
|
|
227
|
+
if (a.expiresAt !== void 0 && a.expiresAt <= now) return { status: "expired" };
|
|
228
|
+
if (a.check) return { status: a.check.status, ...a.check.detail ? { detail: a.check.detail } : {} };
|
|
229
|
+
return { status: "unverified" };
|
|
230
|
+
}
|
|
231
|
+
function summarizeAccount(home, id, a, probe, now) {
|
|
232
|
+
const { status, detail } = accountStatus(home, id, a, probe, now);
|
|
233
|
+
const keySource = a.kind === "claude-subscription" ? "stored" : a.key?.source;
|
|
234
|
+
const keyRef = a.key?.source === "file" ? a.key.path : a.key?.source === "env" ? a.key.name : void 0;
|
|
235
|
+
return {
|
|
236
|
+
id,
|
|
237
|
+
label: a.label,
|
|
238
|
+
agent: a.agent,
|
|
239
|
+
kind: a.kind,
|
|
240
|
+
status,
|
|
241
|
+
...detail ? { statusDetail: detail } : {},
|
|
242
|
+
...a.check ? { checkedAt: a.check.at } : {},
|
|
243
|
+
...a.createdAt ? { createdAt: a.createdAt } : {},
|
|
244
|
+
...a.expiresAt !== void 0 ? { expiresAt: a.expiresAt } : {},
|
|
245
|
+
...a.baseUrl ? { baseUrl: a.baseUrl } : {},
|
|
246
|
+
...a.models ? { models: a.models } : {},
|
|
247
|
+
...keySource ? { keySource } : {},
|
|
248
|
+
...keyRef ? { keyRef } : {},
|
|
249
|
+
...a.legacy ? { legacy: true } : {}
|
|
250
|
+
};
|
|
251
|
+
}
|
|
252
|
+
function defaultSecretProbe(env = process.env) {
|
|
253
|
+
return {
|
|
254
|
+
fileReadable: (path) => {
|
|
255
|
+
try {
|
|
256
|
+
return node_fs.readFileSync(path, "utf8").trim().length > 0;
|
|
257
|
+
} catch {
|
|
258
|
+
return false;
|
|
259
|
+
}
|
|
260
|
+
},
|
|
261
|
+
env
|
|
262
|
+
};
|
|
263
|
+
}
|
|
264
|
+
function buildAgentProfilesState(home, file, probe, now, daemonPid) {
|
|
265
|
+
const accounts = Object.entries(file.accounts).map(([id, a]) => summarizeAccount(home, id, a, probe, now)).sort((x, y) => (x.createdAt ?? 0) - (y.createdAt ?? 0) || x.id.localeCompare(y.id));
|
|
266
|
+
const defaults = {};
|
|
267
|
+
for (const [agent, id] of Object.entries(file.defaults)) if (file.accounts[id]) defaults[agent] = id;
|
|
268
|
+
return { daemonPid, updatedAt: now, accounts, defaults };
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
exports.SPAWN_ACCOUNT_ENV = SPAWN_ACCOUNT_ENV;
|
|
272
|
+
exports.SUBSCRIPTION_TOKEN_TTL_MS = SUBSCRIPTION_TOKEN_TTL_MS;
|
|
273
|
+
exports.accountSecretPath = accountSecretPath;
|
|
274
|
+
exports.accountsPath = accountsPath;
|
|
275
|
+
exports.buildAgentProfilesState = buildAgentProfilesState;
|
|
276
|
+
exports.defaultSecretProbe = defaultSecretProbe;
|
|
277
|
+
exports.expandHome = expandHome;
|
|
278
|
+
exports.newAccountId = newAccountId;
|
|
279
|
+
exports.providersPath = providersPath;
|
|
280
|
+
exports.readAccounts = readAccounts;
|
|
281
|
+
exports.readAccountsFileV2 = readAccountsFileV2;
|
|
282
|
+
exports.readSessionBindingV2 = readSessionBindingV2;
|
|
283
|
+
exports.readSessionBindings = readSessionBindings;
|
|
284
|
+
exports.removeAccountSecret = removeAccountSecret;
|
|
285
|
+
exports.sessionsBoundTo = sessionsBoundTo;
|
|
286
|
+
exports.summarizeAccount = summarizeAccount;
|
|
287
|
+
exports.writeAccountSecret = writeAccountSecret;
|
|
288
|
+
exports.writeAccountsFile = writeAccountsFile;
|
|
289
|
+
exports.writeSessionBinding = writeSessionBinding;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var logger = require('./logger-
|
|
3
|
+
var logger = require('./logger-8su64lqR.cjs');
|
|
4
4
|
var node_fs = require('node:fs');
|
|
5
5
|
var path$1 = require('node:path');
|
|
6
6
|
var path = require('./path-B7zW-WwE.cjs');
|
|
7
|
-
var index = require('./index-
|
|
7
|
+
var index = require('./index-BzAYnYct.cjs');
|
|
8
8
|
var trimIdent = require('./trimIdent-4gvk9Wk6.cjs');
|
|
9
9
|
var os = require('node:os');
|
|
10
10
|
var agentGuidance = require('./agentGuidance-BtBx2xxE.cjs');
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { l as logger } from './logger-
|
|
1
|
+
import { l as logger } from './logger-Fd_rNvgd.mjs';
|
|
2
2
|
import { existsSync, readFileSync } from 'node:fs';
|
|
3
3
|
import { join } from 'node:path';
|
|
4
4
|
import { g as getProjectPath } from './path-D2wdaNSk.mjs';
|
|
5
|
-
import {
|
|
5
|
+
import { y as BUILTIN_TODO_DISCOVERY } from './index-DYD3GM1m.mjs';
|
|
6
6
|
import { t as trimIdent } from './trimIdent-BAjmv_TG.mjs';
|
|
7
7
|
import { homedir } from 'node:os';
|
|
8
8
|
import { A as AGENT_GUIDANCE } from './agentGuidance-BDYt2Qy2.mjs';
|
|
@@ -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";
|