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
|
@@ -1385,6 +1385,109 @@ function restoredModel(metadata) {
|
|
|
1385
1385
|
if (metadata?.stickyModel === null && typeof intent === "string") return null;
|
|
1386
1386
|
return void 0;
|
|
1387
1387
|
}
|
|
1388
|
+
const AGENT_PROFILE_SESSION_CAPABILITY = "agent-profile-v1";
|
|
1389
|
+
const AGENT_PROFILE_RPC = {
|
|
1390
|
+
list: "agent-profile-list",
|
|
1391
|
+
add: "agent-profile-add",
|
|
1392
|
+
loginStart: "agent-profile-login-start",
|
|
1393
|
+
loginSubmit: "agent-profile-login-submit",
|
|
1394
|
+
loginStatus: "agent-profile-login-status",
|
|
1395
|
+
loginCancel: "agent-profile-login-cancel",
|
|
1396
|
+
test: "agent-profile-test",
|
|
1397
|
+
rename: "agent-profile-rename",
|
|
1398
|
+
remove: "agent-profile-remove",
|
|
1399
|
+
setDefault: "agent-profile-set-default",
|
|
1400
|
+
bind: "agent-profile-bind"
|
|
1401
|
+
};
|
|
1402
|
+
const AGENT_PROFILE_STATUSES = ["ok", "unverified", "expired", "invalid", "missing-secret"];
|
|
1403
|
+
const AgentProfileSummarySchema = z$1.object({
|
|
1404
|
+
id: z$1.string(),
|
|
1405
|
+
label: z$1.string(),
|
|
1406
|
+
agent: z$1.string(),
|
|
1407
|
+
// 'claude' (codex/pi/gemini later)
|
|
1408
|
+
kind: z$1.string(),
|
|
1409
|
+
// AgentProfileKind (open)
|
|
1410
|
+
status: z$1.string(),
|
|
1411
|
+
// AgentProfileStatus (open; unknown → 'unverified')
|
|
1412
|
+
statusDetail: z$1.string().optional(),
|
|
1413
|
+
// short human reason for the last failed check
|
|
1414
|
+
checkedAt: z$1.number().optional(),
|
|
1415
|
+
createdAt: z$1.number().optional(),
|
|
1416
|
+
/** Subscription token expiry (ms). The UI derives 「即将过期」 from it. */
|
|
1417
|
+
expiresAt: z$1.number().optional(),
|
|
1418
|
+
/** API kinds: endpoint (not a secret). */
|
|
1419
|
+
baseUrl: z$1.string().optional(),
|
|
1420
|
+
/** API kinds: models the endpoint serves; first = default for a new binding. */
|
|
1421
|
+
models: z$1.array(z$1.string()).optional(),
|
|
1422
|
+
/** Where the key comes from: 'file' | 'env' | 'stored' (pasted / login-created, kept 0600 on the machine). */
|
|
1423
|
+
keySource: z$1.string().optional(),
|
|
1424
|
+
/** 'file' → the path, 'env' → the variable name. Never the key. */
|
|
1425
|
+
keyRef: z$1.string().optional(),
|
|
1426
|
+
/** Read from the B-794 `providers.json` (v1): listed and usable, but edit/remove it in that file. */
|
|
1427
|
+
legacy: z$1.boolean().optional()
|
|
1428
|
+
});
|
|
1429
|
+
const AgentProfilesStateSchema = z$1.object({
|
|
1430
|
+
daemonPid: z$1.number(),
|
|
1431
|
+
updatedAt: z$1.number(),
|
|
1432
|
+
accounts: z$1.array(AgentProfileSummarySchema),
|
|
1433
|
+
/** agent → account id new sessions on this machine use when the spawn names none. Absent = machine login. */
|
|
1434
|
+
defaults: z$1.record(z$1.string(), z$1.string())
|
|
1435
|
+
});
|
|
1436
|
+
z$1.object({
|
|
1437
|
+
id: z$1.string(),
|
|
1438
|
+
label: z$1.string(),
|
|
1439
|
+
kind: z$1.string(),
|
|
1440
|
+
status: z$1.string(),
|
|
1441
|
+
reason: z$1.string().optional(),
|
|
1442
|
+
/** API kinds: the model every slot is pinned to. */
|
|
1443
|
+
model: z$1.string().optional()
|
|
1444
|
+
});
|
|
1445
|
+
const AgentProfileKeyInputSchema = z$1.discriminatedUnion("source", [
|
|
1446
|
+
z$1.object({ source: z$1.literal("file"), path: z$1.string().min(1).max(1024) }),
|
|
1447
|
+
z$1.object({ source: z$1.literal("env"), name: z$1.string().regex(/^[A-Za-z_][A-Za-z0-9_]{0,127}$/) }),
|
|
1448
|
+
/** Q2: allowed, never the default. Relayed through the server (not stored there); kept 0600 on the machine. */
|
|
1449
|
+
z$1.object({ source: z$1.literal("paste"), value: z$1.string().min(1).max(4096) })
|
|
1450
|
+
]);
|
|
1451
|
+
const AgentProfileModelInputSchema = z$1.union([
|
|
1452
|
+
z$1.string().min(1).max(160),
|
|
1453
|
+
z$1.object({ id: z$1.string().min(1).max(160), contextWindow: z$1.number().int().positive().optional() })
|
|
1454
|
+
]);
|
|
1455
|
+
const AgentProfileAddRequestSchema = z$1.object({
|
|
1456
|
+
agent: z$1.literal("claude"),
|
|
1457
|
+
kind: z$1.literal("claude-api"),
|
|
1458
|
+
label: z$1.string().trim().min(1).max(60),
|
|
1459
|
+
baseUrl: z$1.string().regex(/^https?:\/\/\S+$/).max(512),
|
|
1460
|
+
models: z$1.array(AgentProfileModelInputSchema).max(50).optional(),
|
|
1461
|
+
key: AgentProfileKeyInputSchema
|
|
1462
|
+
});
|
|
1463
|
+
const AgentProfileLoginStartRequestSchema = z$1.object({
|
|
1464
|
+
agent: z$1.literal("claude"),
|
|
1465
|
+
kind: z$1.literal("claude-subscription"),
|
|
1466
|
+
label: z$1.string().trim().min(1).max(60).optional(),
|
|
1467
|
+
accountId: z$1.string().optional()
|
|
1468
|
+
});
|
|
1469
|
+
const AgentProfileLoginSubmitRequestSchema = z$1.object({
|
|
1470
|
+
loginId: z$1.string(),
|
|
1471
|
+
code: z$1.string().trim().min(1).max(2048)
|
|
1472
|
+
});
|
|
1473
|
+
z$1.object({
|
|
1474
|
+
loginId: z$1.string(),
|
|
1475
|
+
state: z$1.string(),
|
|
1476
|
+
url: z$1.string().optional(),
|
|
1477
|
+
expiresAt: z$1.number().optional(),
|
|
1478
|
+
account: AgentProfileSummarySchema.optional(),
|
|
1479
|
+
error: z$1.string().optional()
|
|
1480
|
+
});
|
|
1481
|
+
const AgentProfileBindRequestSchema = z$1.object({
|
|
1482
|
+
sessionId: z$1.string().min(1),
|
|
1483
|
+
/** null = back to the machine login. */
|
|
1484
|
+
accountId: z$1.string().nullable(),
|
|
1485
|
+
/** API kinds only; default = the account's first model. */
|
|
1486
|
+
model: z$1.string().max(160).optional(),
|
|
1487
|
+
/** Default true: restart the session in place now. */
|
|
1488
|
+
restart: z$1.boolean().optional()
|
|
1489
|
+
});
|
|
1490
|
+
new Set(AGENT_PROFILE_STATUSES);
|
|
1388
1491
|
const PROMPT_QUEUE_CAPABILITY = "prompt-queue-v1";
|
|
1389
1492
|
const PROMPT_QUEUE_MAX_ITEMS = 50;
|
|
1390
1493
|
const PROMPT_QUEUE_LOCAL_ID_MAX_BYTES = 256;
|
|
@@ -1708,4 +1811,4 @@ z.object({
|
|
|
1708
1811
|
reason: z.string()
|
|
1709
1812
|
});
|
|
1710
1813
|
|
|
1711
|
-
export {
|
|
1814
|
+
export { PI_STEER_CAPABILITY as $, AGENT_PROFILE_SESSION_CAPABILITY as A, BUILTIN_TODO_SKILL as B, CLAUDE_CONFIG_MODEL_CAPABILITY as C, AutomationConcurrencySchema as D, AutomationActionSchema as E, AutomationTriggerSchema as F, AgentProfilesStateSchema as G, AgentVersionsSchema as H, getAgentCodeDefaults as I, isLatestModelMode as J, resolveLatestModel as K, LATEST_MODEL_MODE as L, EFFORT_INTENT_AUTO as M, normalizeAgentKey as N, AGENT_VERSION_SOURCES as O, PROMPT_QUEUE_CAPABILITY as P, ATTENTION_DISABLED_ERROR as Q, RUN_INTENT_CAPABILITY as R, STREAM_DELTA_MAX_CHARS as S, ATTENTION_LIMITS as T, ownerBoardPostToRest as U, isAttentionBoardLocalId as V, OwnerBoardPostInputSchema as W, OwnerBoardUpdateInputSchema as X, OwnerBoardResolveInputSchema as Y, OwnerBoardListInputSchema as Z, ATTENTION_SESSION_CAPABILITY as _, PROJECT_SESSION_CAPABILITY as a, ReleaseDrainNoticeSchema as a0, RelayAssignmentResponseSchema as a1, CODEX_STEER_CAPABILITY as a2, CODEX_COMPACT_CAPABILITY as a3, AGENT_PROFILE_RPC as a4, RelayCandidatesResponseSchema as a5, ServerMigrateNoticeSchema as a6, isHarnessInstallId as a7, MODEL_INTENT_CONFIG as a8, AUTOMATION_PRECHECK_OUTPUT_MAX_CHARS as a9, AUTOMATION_PRECHECK_DEFAULT_TIMEOUT_MS as aa, AUTOMATION_CLAIM_MAX_RUNS as ab, AUTOMATION_DAEMON_CAPABILITY_PRECHECK as ac, AUTOMATION_DEFAULT_LEASE_MS as ad, HARNESS_INSTALL_CAPABILITY_VERSION as ae, restoredModel as b, AUTOMATION_NAME_PATTERN as c, AUTOMATION_PRECHECK_MAX_TIMEOUT_MS as d, AutomationPrecheckSchema as e, isInsideTeamWorktree as f, rebaseTeamWorktreePath as g, AUTOMATION_ATTENTION_REASON_MAX_CHARS as h, isAutomationRunTerminal as i, AUTOMATION_SUMMARY_MAX_CHARS as j, createEnvelope as k, RUN_INTENT_RPC as l, RunIntentRequestSchema as m, nextRunIntents as n, readEffortIntent as o, readModelIntent as p, createBuiltinTodoClient as q, restoredEffort as r, streamKeyOf as s, parseLatestModelTable as t, AgentProfileAddRequestSchema as u, AgentProfileLoginStartRequestSchema as v, AgentProfileLoginSubmitRequestSchema as w, AgentProfileBindRequestSchema as x, BUILTIN_TODO_DISCOVERY as y, AutomationNameSchema as z };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { p as packageJson } from './package-
|
|
1
|
+
import { p as packageJson } from './package-6KkRAops.mjs';
|
|
2
2
|
import module$1 from 'node:module';
|
|
3
3
|
import { existsSync } from 'node:fs';
|
|
4
4
|
import { readdir, rm } from 'node:fs/promises';
|
|
@@ -57,10 +57,10 @@ async function pruneStaleCompileCaches(happyHomeDir, cliVersion) {
|
|
|
57
57
|
async function run(args) {
|
|
58
58
|
enableCompileCacheIfPossible(packageJson.version);
|
|
59
59
|
if (isStandaloneVersionRequest(args) || isSelfCheckRequest(args)) {
|
|
60
|
-
const { selfCheckMain } = await import('./selfCheck-
|
|
60
|
+
const { selfCheckMain } = await import('./selfCheck-vkfrgQ7X.mjs');
|
|
61
61
|
process.exit(await selfCheckMain({ verbose: isSelfCheckRequest(args) }));
|
|
62
62
|
}
|
|
63
|
-
const { main } = await import('./main-
|
|
63
|
+
const { main } = await import('./main-BI6GIzUL.mjs');
|
|
64
64
|
await main();
|
|
65
65
|
}
|
|
66
66
|
void run(process.argv.slice(2));
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { statSync, readdirSync } from 'node:fs';
|
|
2
2
|
import { homedir } from 'node:os';
|
|
3
|
-
import { l as logger } from './logger-
|
|
4
|
-
import { r as readSettings } from './persistence-
|
|
3
|
+
import { l as logger } from './logger-Fd_rNvgd.mjs';
|
|
4
|
+
import { r as readSettings } from './persistence-DWcHe035.mjs';
|
|
5
5
|
import { d as describeAgentHome, C as CLAUDE_CONFIG_DIR_ENV, a as CODEX_HOME_ENV, f as findClaudeConversation, b as agentHomeCandidates, c as findCodexThread, r as resolveAgentHomes, A as AGENT_HOME_ENV_NAMES, g as agentHomeEnv, p as probeLoginShellEnv } from './loginShellEnv-Dw8M7tkI.mjs';
|
|
6
6
|
export { h as claudeConversationPath, i as claudeProjectDirName, j as codexRolloutFileMatches, e as expandHomePath } from './loginShellEnv-Dw8M7tkI.mjs';
|
|
7
7
|
import 'chalk';
|
|
8
8
|
import 'node:util';
|
|
9
|
-
import './configuration-
|
|
9
|
+
import './configuration-IhRiLDVe.mjs';
|
|
10
10
|
import 'node:path';
|
|
11
|
-
import './package-
|
|
11
|
+
import './package-6KkRAops.mjs';
|
|
12
12
|
import 'node:fs/promises';
|
|
13
13
|
import 'zod';
|
|
14
14
|
import './authRelay-DhQhkBvX.mjs';
|
package/dist/index.cjs
CHANGED
package/dist/index.mjs
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
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
|
var trimIdent = require('./trimIdent-4gvk9Wk6.cjs');
|
|
7
7
|
var os = require('os');
|
|
8
8
|
require('chalk');
|
|
9
9
|
require('node:util');
|
|
10
|
-
require('./configuration-
|
|
10
|
+
require('./configuration-CXEVKAyF.cjs');
|
|
11
11
|
require('node:fs');
|
|
12
12
|
require('node:os');
|
|
13
13
|
require('node:path');
|
|
14
|
-
require('./package-
|
|
14
|
+
require('./package-iuLlSiSF.cjs');
|
|
15
15
|
require('node:fs/promises');
|
|
16
16
|
|
|
17
17
|
const PLIST_LABEL = "com.happy-cli.daemon";
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { l as logger } from './logger-
|
|
1
|
+
import { l as logger } from './logger-Fd_rNvgd.mjs';
|
|
2
2
|
import { existsSync, writeFileSync, chmodSync } from 'fs';
|
|
3
3
|
import { execSync } from 'child_process';
|
|
4
4
|
import { t as trimIdent } from './trimIdent-BAjmv_TG.mjs';
|
|
5
5
|
import os from 'os';
|
|
6
6
|
import 'chalk';
|
|
7
7
|
import 'node:util';
|
|
8
|
-
import './configuration-
|
|
8
|
+
import './configuration-IhRiLDVe.mjs';
|
|
9
9
|
import 'node:fs';
|
|
10
10
|
import 'node:os';
|
|
11
11
|
import 'node:path';
|
|
12
|
-
import './package-
|
|
12
|
+
import './package-6KkRAops.mjs';
|
|
13
13
|
import 'node:fs/promises';
|
|
14
14
|
|
|
15
15
|
const PLIST_LABEL = "com.happy-cli.daemon";
|
package/dist/lib.cjs
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var api = require('./api-
|
|
4
|
-
var logger = require('./logger-
|
|
5
|
-
var configuration = require('./configuration-
|
|
3
|
+
var api = require('./api-hMDsC6Wg.cjs');
|
|
4
|
+
var logger = require('./logger-8su64lqR.cjs');
|
|
5
|
+
var configuration = require('./configuration-CXEVKAyF.cjs');
|
|
6
6
|
var types = require('./types-CRS-srZK.cjs');
|
|
7
7
|
require('axios');
|
|
8
|
-
require('./lidState-
|
|
8
|
+
require('./lidState-DqoN7zH4.cjs');
|
|
9
9
|
require('./authRelay-Dy1qU9td.cjs');
|
|
10
10
|
require('node:crypto');
|
|
11
11
|
require('tweetnacl');
|
|
@@ -13,14 +13,14 @@ require('os');
|
|
|
13
13
|
require('child_process');
|
|
14
14
|
require('node:events');
|
|
15
15
|
require('socket.io-client');
|
|
16
|
-
require('./pushNotifications-
|
|
16
|
+
require('./pushNotifications-BqFoLye2.cjs');
|
|
17
17
|
require('zod');
|
|
18
|
-
require('./index-
|
|
18
|
+
require('./index-BzAYnYct.cjs');
|
|
19
19
|
require('@paralleldrive/cuid2');
|
|
20
20
|
require('./contentLogMetadata-ZSFk_NjQ.cjs');
|
|
21
21
|
require('./limits-C-a7gr04.cjs');
|
|
22
|
-
require('./time-
|
|
23
|
-
require('./registerCommonHandlers-
|
|
22
|
+
require('./time-CaUlWSNJ.cjs');
|
|
23
|
+
require('./registerCommonHandlers-m6pxxf2J.cjs');
|
|
24
24
|
require('util');
|
|
25
25
|
require('fs/promises');
|
|
26
26
|
require('crypto');
|
|
@@ -28,17 +28,17 @@ require('path');
|
|
|
28
28
|
require('cross-spawn');
|
|
29
29
|
require('./projectPath-C3ioB4Bu.cjs');
|
|
30
30
|
require('url');
|
|
31
|
-
require('./sync-
|
|
31
|
+
require('./sync-_2lsZ1U2.cjs');
|
|
32
32
|
require('./backgroundTaskActivity-CBvUdj39.cjs');
|
|
33
|
-
require('./controlClient-
|
|
34
|
-
require('./persistence-
|
|
33
|
+
require('./controlClient-j7p5p3_7.cjs');
|
|
34
|
+
require('./persistence-B4ttN-fR.cjs');
|
|
35
35
|
require('node:fs/promises');
|
|
36
36
|
require('node:fs');
|
|
37
37
|
require('chalk');
|
|
38
38
|
require('node:util');
|
|
39
39
|
require('node:path');
|
|
40
40
|
require('node:os');
|
|
41
|
-
require('./package-
|
|
41
|
+
require('./package-iuLlSiSF.cjs');
|
|
42
42
|
|
|
43
43
|
|
|
44
44
|
|
package/dist/lib.d.cts
CHANGED
|
@@ -218,6 +218,113 @@ declare const ContextUsageSchema: z$1.ZodObject<{
|
|
|
218
218
|
compactedAt: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodNumber>>;
|
|
219
219
|
}, z$1.core.$strip>;
|
|
220
220
|
type ContextUsage = z$1.infer<typeof ContextUsageSchema>;
|
|
221
|
+
declare const AgentProfileSummarySchema: z$1.ZodObject<{
|
|
222
|
+
id: z$1.ZodString;
|
|
223
|
+
label: z$1.ZodString;
|
|
224
|
+
agent: z$1.ZodString;
|
|
225
|
+
kind: z$1.ZodString;
|
|
226
|
+
status: z$1.ZodString;
|
|
227
|
+
statusDetail: z$1.ZodOptional<z$1.ZodString>;
|
|
228
|
+
checkedAt: z$1.ZodOptional<z$1.ZodNumber>;
|
|
229
|
+
createdAt: z$1.ZodOptional<z$1.ZodNumber>;
|
|
230
|
+
expiresAt: z$1.ZodOptional<z$1.ZodNumber>;
|
|
231
|
+
baseUrl: z$1.ZodOptional<z$1.ZodString>;
|
|
232
|
+
models: z$1.ZodOptional<z$1.ZodArray<z$1.ZodString>>;
|
|
233
|
+
keySource: z$1.ZodOptional<z$1.ZodString>;
|
|
234
|
+
keyRef: z$1.ZodOptional<z$1.ZodString>;
|
|
235
|
+
legacy: z$1.ZodOptional<z$1.ZodBoolean>;
|
|
236
|
+
}, z$1.core.$strip>;
|
|
237
|
+
type AgentProfileSummary = z$1.infer<typeof AgentProfileSummarySchema>;
|
|
238
|
+
/** `daemonState.agentProfiles` — also the result of `agent-profile-list`. */
|
|
239
|
+
declare const AgentProfilesStateSchema: z$1.ZodObject<{
|
|
240
|
+
daemonPid: z$1.ZodNumber;
|
|
241
|
+
updatedAt: z$1.ZodNumber;
|
|
242
|
+
accounts: z$1.ZodArray<z$1.ZodObject<{
|
|
243
|
+
id: z$1.ZodString;
|
|
244
|
+
label: z$1.ZodString;
|
|
245
|
+
agent: z$1.ZodString;
|
|
246
|
+
kind: z$1.ZodString;
|
|
247
|
+
status: z$1.ZodString;
|
|
248
|
+
statusDetail: z$1.ZodOptional<z$1.ZodString>;
|
|
249
|
+
checkedAt: z$1.ZodOptional<z$1.ZodNumber>;
|
|
250
|
+
createdAt: z$1.ZodOptional<z$1.ZodNumber>;
|
|
251
|
+
expiresAt: z$1.ZodOptional<z$1.ZodNumber>;
|
|
252
|
+
baseUrl: z$1.ZodOptional<z$1.ZodString>;
|
|
253
|
+
models: z$1.ZodOptional<z$1.ZodArray<z$1.ZodString>>;
|
|
254
|
+
keySource: z$1.ZodOptional<z$1.ZodString>;
|
|
255
|
+
keyRef: z$1.ZodOptional<z$1.ZodString>;
|
|
256
|
+
legacy: z$1.ZodOptional<z$1.ZodBoolean>;
|
|
257
|
+
}, z$1.core.$strip>>;
|
|
258
|
+
defaults: z$1.ZodRecord<z$1.ZodString, z$1.ZodString>;
|
|
259
|
+
}, z$1.core.$strip>;
|
|
260
|
+
type AgentProfilesState = z$1.infer<typeof AgentProfilesStateSchema>;
|
|
261
|
+
/**
|
|
262
|
+
* `metadata.agentProfile`, written by the wrapper with what it ACTUALLY runs on:
|
|
263
|
+
* absent — older wrapper (no capability): show nothing / 「本机登录」 guess
|
|
264
|
+
* null — machine login (本机登录)
|
|
265
|
+
* { status: 'active' } — running on this account
|
|
266
|
+
* { status: 'unavailable' } — bound, but the account cannot be used
|
|
267
|
+
* (reason: 'missing' | 'missing-secret' | 'expired' | 'invalid');
|
|
268
|
+
* the wrapper refuses turns until the user re-logs in or switches
|
|
269
|
+
*/
|
|
270
|
+
declare const SessionAgentProfileSchema: z$1.ZodObject<{
|
|
271
|
+
id: z$1.ZodString;
|
|
272
|
+
label: z$1.ZodString;
|
|
273
|
+
kind: z$1.ZodString;
|
|
274
|
+
status: z$1.ZodString;
|
|
275
|
+
reason: z$1.ZodOptional<z$1.ZodString>;
|
|
276
|
+
model: z$1.ZodOptional<z$1.ZodString>;
|
|
277
|
+
}, z$1.core.$strip>;
|
|
278
|
+
type SessionAgentProfile = z$1.infer<typeof SessionAgentProfileSchema>;
|
|
279
|
+
/**
|
|
280
|
+
* waiting-code → (submit) → exchanging → succeeded | failed.
|
|
281
|
+
* canceled / expired (10 min without a code) are terminal too.
|
|
282
|
+
*/
|
|
283
|
+
declare const AgentProfileLoginStatusSchema: z$1.ZodObject<{
|
|
284
|
+
loginId: z$1.ZodString;
|
|
285
|
+
state: z$1.ZodString;
|
|
286
|
+
url: z$1.ZodOptional<z$1.ZodString>;
|
|
287
|
+
expiresAt: z$1.ZodOptional<z$1.ZodNumber>;
|
|
288
|
+
account: z$1.ZodOptional<z$1.ZodObject<{
|
|
289
|
+
id: z$1.ZodString;
|
|
290
|
+
label: z$1.ZodString;
|
|
291
|
+
agent: z$1.ZodString;
|
|
292
|
+
kind: z$1.ZodString;
|
|
293
|
+
status: z$1.ZodString;
|
|
294
|
+
statusDetail: z$1.ZodOptional<z$1.ZodString>;
|
|
295
|
+
checkedAt: z$1.ZodOptional<z$1.ZodNumber>;
|
|
296
|
+
createdAt: z$1.ZodOptional<z$1.ZodNumber>;
|
|
297
|
+
expiresAt: z$1.ZodOptional<z$1.ZodNumber>;
|
|
298
|
+
baseUrl: z$1.ZodOptional<z$1.ZodString>;
|
|
299
|
+
models: z$1.ZodOptional<z$1.ZodArray<z$1.ZodString>>;
|
|
300
|
+
keySource: z$1.ZodOptional<z$1.ZodString>;
|
|
301
|
+
keyRef: z$1.ZodOptional<z$1.ZodString>;
|
|
302
|
+
legacy: z$1.ZodOptional<z$1.ZodBoolean>;
|
|
303
|
+
}, z$1.core.$strip>>;
|
|
304
|
+
error: z$1.ZodOptional<z$1.ZodString>;
|
|
305
|
+
}, z$1.core.$strip>;
|
|
306
|
+
type AgentProfileLoginStatus = z$1.infer<typeof AgentProfileLoginStatusSchema>;
|
|
307
|
+
type AgentProfileBindResult = {
|
|
308
|
+
/**
|
|
309
|
+
* false only with `rolledBack` — the restart failed while the session's
|
|
310
|
+
* wrapper kept running on the previous credential, so the previous binding
|
|
311
|
+
* was restored (never "bound to the new account, running the old one").
|
|
312
|
+
*/
|
|
313
|
+
bound: boolean;
|
|
314
|
+
/** The new binding was undone (see `bound`); the session runs on its previous account. */
|
|
315
|
+
rolledBack?: true;
|
|
316
|
+
/**
|
|
317
|
+
* 'done' — restarted in place on the new account
|
|
318
|
+
* 'skipped' — restart:false, or the session is not running here (applies on next start)
|
|
319
|
+
* 'pending' — still restarting after the 22 s budget (relay RPCs cap at 30 s); the Web
|
|
320
|
+
* shows 「重启中」 and treats `metadata.agentProfile` turning into the new
|
|
321
|
+
* account as done
|
|
322
|
+
* 'failed' — the session is not running any more: binding kept, applies on next
|
|
323
|
+
* start; or (`rolledBack`) it still runs: the previous binding is restored
|
|
324
|
+
*/
|
|
325
|
+
restart: string;
|
|
326
|
+
error?: string;
|
|
327
|
+
};
|
|
221
328
|
|
|
222
329
|
declare const CLAUDE_AUTH_PROBE_VERSION: 1;
|
|
223
330
|
type ClaudeAuthStatus = 'ok' | 'not-logged-in' | 'unknown' | 'error' | 'claude-missing';
|
|
@@ -596,6 +703,27 @@ declare const DaemonStateSchema: z$1.ZodObject<{
|
|
|
596
703
|
}, z$1.core.$strip>;
|
|
597
704
|
checkedAt: z$1.ZodNumber;
|
|
598
705
|
}, z$1.core.$strip>>;
|
|
706
|
+
agentProfiles: z$1.ZodOptional<z$1.ZodObject<{
|
|
707
|
+
daemonPid: z$1.ZodNumber;
|
|
708
|
+
updatedAt: z$1.ZodNumber;
|
|
709
|
+
accounts: z$1.ZodArray<z$1.ZodObject<{
|
|
710
|
+
id: z$1.ZodString;
|
|
711
|
+
label: z$1.ZodString;
|
|
712
|
+
agent: z$1.ZodString;
|
|
713
|
+
kind: z$1.ZodString;
|
|
714
|
+
status: z$1.ZodString;
|
|
715
|
+
statusDetail: z$1.ZodOptional<z$1.ZodString>;
|
|
716
|
+
checkedAt: z$1.ZodOptional<z$1.ZodNumber>;
|
|
717
|
+
createdAt: z$1.ZodOptional<z$1.ZodNumber>;
|
|
718
|
+
expiresAt: z$1.ZodOptional<z$1.ZodNumber>;
|
|
719
|
+
baseUrl: z$1.ZodOptional<z$1.ZodString>;
|
|
720
|
+
models: z$1.ZodOptional<z$1.ZodArray<z$1.ZodString>>;
|
|
721
|
+
keySource: z$1.ZodOptional<z$1.ZodString>;
|
|
722
|
+
keyRef: z$1.ZodOptional<z$1.ZodString>;
|
|
723
|
+
legacy: z$1.ZodOptional<z$1.ZodBoolean>;
|
|
724
|
+
}, z$1.core.$strip>>;
|
|
725
|
+
defaults: z$1.ZodRecord<z$1.ZodString, z$1.ZodString>;
|
|
726
|
+
}, z$1.core.$strip>>;
|
|
599
727
|
rateLimits: z$1.ZodOptional<z$1.ZodObject<{
|
|
600
728
|
v: z$1.ZodLiteral<1>;
|
|
601
729
|
updatedAt: z$1.ZodNumber;
|
|
@@ -750,6 +878,11 @@ type Metadata = {
|
|
|
750
878
|
* null = nothing chosen yet; absent = older wrapper. See happy-wire runIntent.ts.
|
|
751
879
|
*/
|
|
752
880
|
modelIntent?: string | null;
|
|
881
|
+
/**
|
|
882
|
+
* B-850a: the account this wrapper actually runs on (agentProfiles.ts).
|
|
883
|
+
* null = machine login; absent = wrapper without `agent-profile-v1`.
|
|
884
|
+
*/
|
|
885
|
+
agentProfile?: SessionAgentProfile | null;
|
|
753
886
|
effortIntent?: string | null;
|
|
754
887
|
operatingModes?: Array<{
|
|
755
888
|
code: string;
|
|
@@ -1645,6 +1778,11 @@ interface SpawnSessionOptions {
|
|
|
1645
1778
|
agent?: SpawnAgent;
|
|
1646
1779
|
environmentVariables?: Record<string, string>;
|
|
1647
1780
|
token?: string;
|
|
1781
|
+
/**
|
|
1782
|
+
* B-850a: account for a new Claude session. undefined = the machine's
|
|
1783
|
+
* default account (none = machine login); null = machine login.
|
|
1784
|
+
*/
|
|
1785
|
+
agentProfileId?: string | null;
|
|
1648
1786
|
/**
|
|
1649
1787
|
* If set, the daemon spawns the agent with `--resume <id>` so the new
|
|
1650
1788
|
* Happy session continues from an existing Claude conversation file.
|
|
@@ -1863,6 +2001,139 @@ declare class ModelConfigService {
|
|
|
1863
2001
|
}): Promise<ModelConfigApplyResult>;
|
|
1864
2002
|
}
|
|
1865
2003
|
|
|
2004
|
+
/**
|
|
2005
|
+
* B-850a: remote Claude subscription login = `claude setup-token` in a pty on
|
|
2006
|
+
* the machine. Its Ink UI only renders in a TTY (FEASIBILITY L2).
|
|
2007
|
+
*
|
|
2008
|
+
* start → spawn, wait for the authorize URL (the user picks the org there)
|
|
2009
|
+
* submit → write the pasted code + Enter; the PKCE verifier never leaves
|
|
2010
|
+
* this process, so the code alone cannot be redeemed elsewhere
|
|
2011
|
+
* done → `sk-ant-oat01-…` appears in the output → caller stores it 0600
|
|
2012
|
+
*
|
|
2013
|
+
* The token is matched in the pty output and handed to `onToken`; it is never
|
|
2014
|
+
* logged and never part of a status object.
|
|
2015
|
+
*/
|
|
2016
|
+
|
|
2017
|
+
type PtyLike = {
|
|
2018
|
+
onData: (cb: (data: string) => void) => void;
|
|
2019
|
+
onExit: (cb: (e: {
|
|
2020
|
+
exitCode: number;
|
|
2021
|
+
}) => void) => void;
|
|
2022
|
+
write: (data: string) => void;
|
|
2023
|
+
kill: () => void;
|
|
2024
|
+
};
|
|
2025
|
+
type SpawnPty = (env: Record<string, string>) => PtyLike;
|
|
2026
|
+
|
|
2027
|
+
type AccountKey = {
|
|
2028
|
+
source: 'file';
|
|
2029
|
+
path: string;
|
|
2030
|
+
} | {
|
|
2031
|
+
source: 'env';
|
|
2032
|
+
name: string;
|
|
2033
|
+
} | {
|
|
2034
|
+
source: 'stored';
|
|
2035
|
+
};
|
|
2036
|
+
type AccountCheck = {
|
|
2037
|
+
status: string;
|
|
2038
|
+
at: number;
|
|
2039
|
+
detail?: string;
|
|
2040
|
+
};
|
|
2041
|
+
type AccountRecord = {
|
|
2042
|
+
label: string;
|
|
2043
|
+
agent: 'claude';
|
|
2044
|
+
kind: 'claude-subscription' | 'claude-api';
|
|
2045
|
+
createdAt: number;
|
|
2046
|
+
/** claude-api */
|
|
2047
|
+
baseUrl?: string;
|
|
2048
|
+
models?: string[];
|
|
2049
|
+
/** B-794b: model id → real context window. */
|
|
2050
|
+
contextWindows?: Record<string, number>;
|
|
2051
|
+
/** claude-api: where the key lives. claude-subscription always uses the stored secret. */
|
|
2052
|
+
key?: AccountKey;
|
|
2053
|
+
/** claude-subscription: setup-token expiry (1 year after login). */
|
|
2054
|
+
expiresAt?: number;
|
|
2055
|
+
check?: AccountCheck;
|
|
2056
|
+
/** Set on entries synthesized from providers.json — never written to accounts.json. */
|
|
2057
|
+
legacy?: true;
|
|
2058
|
+
};
|
|
2059
|
+
|
|
2060
|
+
/** `stillRunning`: the restart failed and the session's old wrapper is alive (on the old credential). */
|
|
2061
|
+
type RestartOutcome = {
|
|
2062
|
+
ok: true;
|
|
2063
|
+
} | {
|
|
2064
|
+
ok: false;
|
|
2065
|
+
notRunning?: boolean;
|
|
2066
|
+
stillRunning?: boolean;
|
|
2067
|
+
error: string;
|
|
2068
|
+
};
|
|
2069
|
+
type AccountServiceDeps = {
|
|
2070
|
+
home: string;
|
|
2071
|
+
env?: Record<string, string | undefined>;
|
|
2072
|
+
now?: () => number;
|
|
2073
|
+
daemonPid?: number;
|
|
2074
|
+
spawnPty?: SpawnPty;
|
|
2075
|
+
restartSession?: (sessionId: string) => Promise<RestartOutcome>;
|
|
2076
|
+
/** Called after every write so the daemon can republish its state. */
|
|
2077
|
+
onChanged?: () => void;
|
|
2078
|
+
/** Test seam for the 1-token checks. */
|
|
2079
|
+
check?: (record: AccountRecord, secret: string) => Promise<AccountCheck>;
|
|
2080
|
+
};
|
|
2081
|
+
declare class AccountService {
|
|
2082
|
+
private readonly deps;
|
|
2083
|
+
private readonly home;
|
|
2084
|
+
private readonly env;
|
|
2085
|
+
private readonly now;
|
|
2086
|
+
private logins;
|
|
2087
|
+
/** loginId → account to (re)write when its token arrives. */
|
|
2088
|
+
private readonly loginTargets;
|
|
2089
|
+
constructor(deps: AccountServiceDeps);
|
|
2090
|
+
state(): AgentProfilesState;
|
|
2091
|
+
private summary;
|
|
2092
|
+
private changed;
|
|
2093
|
+
private editable;
|
|
2094
|
+
add(params: unknown): Promise<AgentProfileSummary>;
|
|
2095
|
+
rename(accountId: unknown, label: unknown): AgentProfileSummary;
|
|
2096
|
+
/**
|
|
2097
|
+
* `force` with bound sessions: the credential is gone, so each of those
|
|
2098
|
+
* sessions restarts in place right away and comes back `unavailable`
|
|
2099
|
+
* (refusing turns, Q3) instead of running on the deleted credential until
|
|
2100
|
+
* its next start. Restarts run in parallel within the bind budget; one
|
|
2101
|
+
* still going reports 'pending'.
|
|
2102
|
+
*/
|
|
2103
|
+
remove(accountId: unknown, force: unknown): Promise<{
|
|
2104
|
+
removed: true;
|
|
2105
|
+
sessions: string[];
|
|
2106
|
+
restarts?: Record<string, string>;
|
|
2107
|
+
}>;
|
|
2108
|
+
/** 'done' | 'skipped' (not running here) | 'pending' (still going after the budget) | 'failed' */
|
|
2109
|
+
private restartWithinBudget;
|
|
2110
|
+
setDefault(agent: unknown, accountId: unknown): AgentProfilesState;
|
|
2111
|
+
private readSecretFor;
|
|
2112
|
+
test(accountId: unknown): Promise<AgentProfileSummary>;
|
|
2113
|
+
private loginManager;
|
|
2114
|
+
/** Also the terminal path (`very-happy account login`). */
|
|
2115
|
+
storeSubscriptionToken(token: string, target: {
|
|
2116
|
+
accountId?: string;
|
|
2117
|
+
label?: string;
|
|
2118
|
+
}): AgentProfileSummary;
|
|
2119
|
+
loginStart(params: unknown): Promise<AgentProfileLoginStatus>;
|
|
2120
|
+
private loginOp;
|
|
2121
|
+
loginSubmit(params: unknown): AgentProfileLoginStatus;
|
|
2122
|
+
loginStatus(loginId: unknown): AgentProfileLoginStatus;
|
|
2123
|
+
loginCancel(loginId: unknown): AgentProfileLoginStatus;
|
|
2124
|
+
dispose(): void;
|
|
2125
|
+
/** Validates and writes a session binding (no restart). */
|
|
2126
|
+
writeBinding(sessionId: string, accountId: string | null, model?: string): void;
|
|
2127
|
+
bind(params: unknown): Promise<AgentProfileBindResult>;
|
|
2128
|
+
/**
|
|
2129
|
+
* Spawn-time choice → the account a NEW session starts on.
|
|
2130
|
+
* undefined → the machine default for this agent (none = machine login)
|
|
2131
|
+
* null → machine login
|
|
2132
|
+
* id → that account; must exist and be usable (Q3: never fall back)
|
|
2133
|
+
*/
|
|
2134
|
+
resolveSpawnAccount(agent: string, requested: unknown): string | null;
|
|
2135
|
+
}
|
|
2136
|
+
|
|
1866
2137
|
/** Agent-specific visible-screen adapters. Unknown is deliberately not idle. */
|
|
1867
2138
|
type CodingAgentKind = 'claude' | 'codex' | 'pi';
|
|
1868
2139
|
|
|
@@ -2001,6 +2272,8 @@ declare class ApiMachineClient {
|
|
|
2001
2272
|
private cliUpdateState;
|
|
2002
2273
|
private cliUpdatePushChain;
|
|
2003
2274
|
private claudeAuthState;
|
|
2275
|
+
/** B-850a: source of `daemonState.agentProfiles` (null = capability off). */
|
|
2276
|
+
private agentProfileService;
|
|
2004
2277
|
/** B-587: the machine's hibernation threshold, published as a capability. */
|
|
2005
2278
|
private agentHibernationIdleMs;
|
|
2006
2279
|
/** B-852: auto-restart setting + per-session status (null until the daemon installs it). */
|
|
@@ -2118,6 +2391,15 @@ declare class ApiMachineClient {
|
|
|
2118
2391
|
}>;
|
|
2119
2392
|
setStore: (store: 'auto' | 'file') => Promise<ClaudeAuthState>;
|
|
2120
2393
|
}): void;
|
|
2394
|
+
/**
|
|
2395
|
+
* B-850a: `agent-profile-*` RPCs + `daemonState.agentProfiles` (spec
|
|
2396
|
+
* 2026-11-session-accounts). Call before connect(): the connect snapshot
|
|
2397
|
+
* carries the list, so its presence with `daemonPid === pid` IS the
|
|
2398
|
+
* capability.
|
|
2399
|
+
*/
|
|
2400
|
+
setAgentProfileService(service: AccountService): void;
|
|
2401
|
+
/** B-850a: republish the account list (after an RPC / CLI edit / expiry tick). */
|
|
2402
|
+
publishAgentProfiles(): Promise<void>;
|
|
2121
2403
|
/** B-688 machine RPCs `model-config-*` (modules/modelConfig/modelConfigRpc.ts). */
|
|
2122
2404
|
setModelConfigService(service: ModelConfigService): void;
|
|
2123
2405
|
/**
|