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
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;
|
|
@@ -675,6 +803,8 @@ declare const UserMessageSchema: z$1.ZodObject<{
|
|
|
675
803
|
allowedTools: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodArray<z$1.ZodString>>>;
|
|
676
804
|
disallowedTools: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodArray<z$1.ZodString>>>;
|
|
677
805
|
effort: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodString>>;
|
|
806
|
+
modelIntent: z$1.ZodOptional<z$1.ZodString>;
|
|
807
|
+
effortIntent: z$1.ZodOptional<z$1.ZodString>;
|
|
678
808
|
delivery: z$1.ZodOptional<z$1.ZodEnum<{
|
|
679
809
|
queue: "queue";
|
|
680
810
|
steer: "steer";
|
|
@@ -741,6 +871,19 @@ type Metadata = {
|
|
|
741
871
|
* machine config.
|
|
742
872
|
*/
|
|
743
873
|
stickyModel?: string | null;
|
|
874
|
+
/**
|
|
875
|
+
* B-849b: this session's model / thinking choice, recorded by the wrapper
|
|
876
|
+
* (sole writer) from message meta and the `session-run-intent` RPC; every
|
|
877
|
+
* device reads it. 'latest' | 'default' | model id; 'default' | level.
|
|
878
|
+
* null = nothing chosen yet; absent = older wrapper. See happy-wire runIntent.ts.
|
|
879
|
+
*/
|
|
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;
|
|
886
|
+
effortIntent?: string | null;
|
|
744
887
|
operatingModes?: Array<{
|
|
745
888
|
code: string;
|
|
746
889
|
value: string;
|
|
@@ -1635,6 +1778,11 @@ interface SpawnSessionOptions {
|
|
|
1635
1778
|
agent?: SpawnAgent;
|
|
1636
1779
|
environmentVariables?: Record<string, string>;
|
|
1637
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;
|
|
1638
1786
|
/**
|
|
1639
1787
|
* If set, the daemon spawns the agent with `--resume <id>` so the new
|
|
1640
1788
|
* Happy session continues from an existing Claude conversation file.
|
|
@@ -1853,6 +2001,139 @@ declare class ModelConfigService {
|
|
|
1853
2001
|
}): Promise<ModelConfigApplyResult>;
|
|
1854
2002
|
}
|
|
1855
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
|
+
|
|
1856
2137
|
/** Agent-specific visible-screen adapters. Unknown is deliberately not idle. */
|
|
1857
2138
|
type CodingAgentKind = 'claude' | 'codex' | 'pi';
|
|
1858
2139
|
|
|
@@ -1991,6 +2272,8 @@ declare class ApiMachineClient {
|
|
|
1991
2272
|
private cliUpdateState;
|
|
1992
2273
|
private cliUpdatePushChain;
|
|
1993
2274
|
private claudeAuthState;
|
|
2275
|
+
/** B-850a: source of `daemonState.agentProfiles` (null = capability off). */
|
|
2276
|
+
private agentProfileService;
|
|
1994
2277
|
/** B-587: the machine's hibernation threshold, published as a capability. */
|
|
1995
2278
|
private agentHibernationIdleMs;
|
|
1996
2279
|
/** B-852: auto-restart setting + per-session status (null until the daemon installs it). */
|
|
@@ -2108,6 +2391,15 @@ declare class ApiMachineClient {
|
|
|
2108
2391
|
}>;
|
|
2109
2392
|
setStore: (store: 'auto' | 'file') => Promise<ClaudeAuthState>;
|
|
2110
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>;
|
|
2111
2403
|
/** B-688 machine RPCs `model-config-*` (modules/modelConfig/modelConfigRpc.ts). */
|
|
2112
2404
|
setModelConfigService(service: ModelConfigService): void;
|
|
2113
2405
|
/**
|
package/dist/lib.d.mts
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;
|
|
@@ -675,6 +803,8 @@ declare const UserMessageSchema: z$1.ZodObject<{
|
|
|
675
803
|
allowedTools: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodArray<z$1.ZodString>>>;
|
|
676
804
|
disallowedTools: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodArray<z$1.ZodString>>>;
|
|
677
805
|
effort: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodString>>;
|
|
806
|
+
modelIntent: z$1.ZodOptional<z$1.ZodString>;
|
|
807
|
+
effortIntent: z$1.ZodOptional<z$1.ZodString>;
|
|
678
808
|
delivery: z$1.ZodOptional<z$1.ZodEnum<{
|
|
679
809
|
queue: "queue";
|
|
680
810
|
steer: "steer";
|
|
@@ -741,6 +871,19 @@ type Metadata = {
|
|
|
741
871
|
* machine config.
|
|
742
872
|
*/
|
|
743
873
|
stickyModel?: string | null;
|
|
874
|
+
/**
|
|
875
|
+
* B-849b: this session's model / thinking choice, recorded by the wrapper
|
|
876
|
+
* (sole writer) from message meta and the `session-run-intent` RPC; every
|
|
877
|
+
* device reads it. 'latest' | 'default' | model id; 'default' | level.
|
|
878
|
+
* null = nothing chosen yet; absent = older wrapper. See happy-wire runIntent.ts.
|
|
879
|
+
*/
|
|
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;
|
|
886
|
+
effortIntent?: string | null;
|
|
744
887
|
operatingModes?: Array<{
|
|
745
888
|
code: string;
|
|
746
889
|
value: string;
|
|
@@ -1635,6 +1778,11 @@ interface SpawnSessionOptions {
|
|
|
1635
1778
|
agent?: SpawnAgent;
|
|
1636
1779
|
environmentVariables?: Record<string, string>;
|
|
1637
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;
|
|
1638
1786
|
/**
|
|
1639
1787
|
* If set, the daemon spawns the agent with `--resume <id>` so the new
|
|
1640
1788
|
* Happy session continues from an existing Claude conversation file.
|
|
@@ -1853,6 +2001,139 @@ declare class ModelConfigService {
|
|
|
1853
2001
|
}): Promise<ModelConfigApplyResult>;
|
|
1854
2002
|
}
|
|
1855
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
|
+
|
|
1856
2137
|
/** Agent-specific visible-screen adapters. Unknown is deliberately not idle. */
|
|
1857
2138
|
type CodingAgentKind = 'claude' | 'codex' | 'pi';
|
|
1858
2139
|
|
|
@@ -1991,6 +2272,8 @@ declare class ApiMachineClient {
|
|
|
1991
2272
|
private cliUpdateState;
|
|
1992
2273
|
private cliUpdatePushChain;
|
|
1993
2274
|
private claudeAuthState;
|
|
2275
|
+
/** B-850a: source of `daemonState.agentProfiles` (null = capability off). */
|
|
2276
|
+
private agentProfileService;
|
|
1994
2277
|
/** B-587: the machine's hibernation threshold, published as a capability. */
|
|
1995
2278
|
private agentHibernationIdleMs;
|
|
1996
2279
|
/** B-852: auto-restart setting + per-session status (null until the daemon installs it). */
|
|
@@ -2108,6 +2391,15 @@ declare class ApiMachineClient {
|
|
|
2108
2391
|
}>;
|
|
2109
2392
|
setStore: (store: 'auto' | 'file') => Promise<ClaudeAuthState>;
|
|
2110
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>;
|
|
2111
2403
|
/** B-688 machine RPCs `model-config-*` (modules/modelConfig/modelConfigRpc.ts). */
|
|
2112
2404
|
setModelConfigService(service: ModelConfigService): void;
|
|
2113
2405
|
/**
|