very-happy-cli 0.2.180 → 0.2.182
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-B8Zi30Zh.mjs → AcpBackend-DLk3gMYH.mjs} +3 -3
- package/dist/{AcpBackend-DfRDtMcG.cjs → AcpBackend-JA5eu8Y0.cjs} +3 -3
- package/dist/{AcpSessionManager-CASKOnOj.cjs → AcpSessionManager-DjYidq4C.cjs} +1 -1
- package/dist/{AcpSessionManager-i8Rab0xT.mjs → AcpSessionManager-OrCww-Qv.mjs} +1 -1
- package/dist/{BasePermissionHandler-BlM_tfej.cjs → BasePermissionHandler-D3PMKLBS.cjs} +1 -1
- package/dist/{BasePermissionHandler-26fKbRCm.mjs → BasePermissionHandler-u-neo-iN.mjs} +1 -1
- package/dist/{acpSessionResume-CR5pmgVo.cjs → acpSessionResume-Dxo8222T.cjs} +1 -1
- package/dist/{acpSessionResume-B9l54P-X.mjs → acpSessionResume-u2TwX5Jd.mjs} +1 -1
- package/dist/{agentHome-C7Sb7-Tz.cjs → agentHome-CP1tCBXz.cjs} +4 -4
- package/dist/{agentHome-CmGy0NWv.mjs → agentHome-D3hNrnoA.mjs} +4 -4
- package/dist/{api-DM7b1OKj.cjs → api-CZWcG7uh.cjs} +10 -10
- package/dist/{api-Hov8p7CA.mjs → api-C_YSQnsi.mjs} +10 -10
- package/dist/{apiMachine-CwGEhQDT.mjs → apiMachine-C_GA5Bm-.mjs} +59 -32
- package/dist/{apiMachine-DkGRj-Ai.cjs → apiMachine-DPGrED5C.cjs} +60 -33
- package/dist/{attachmentContent-CIn4iPEk.mjs → attachmentContent-Ckzyb1Uy.mjs} +2 -2
- package/dist/{attachmentContent-CEm13_gF.cjs → attachmentContent-I_dJIevE.cjs} +2 -2
- package/dist/{auth-Dawj7pP5.cjs → auth-BKnE7uv7.cjs} +8 -8
- package/dist/{auth-BG1DY0gj.mjs → auth-CGgpiJ5-.mjs} +5 -5
- package/dist/{auth-rggxMpEE.mjs → auth-DOXMI-xp.mjs} +8 -8
- package/dist/{auth-CBXnm-Mj.cjs → auth-Lw_utSMV.cjs} +5 -5
- package/dist/{auto-CbYOfoPS.cjs → auto-CIgFHIyQ.cjs} +18 -18
- package/dist/{auto-CXXLXGeL.mjs → auto-Z56mMZnH.mjs} +18 -18
- package/dist/{bootstrap-Dt5I1SOl.mjs → bootstrap-D3vlOROj.mjs} +2 -2
- package/dist/{bootstrap-DoA7okld.cjs → bootstrap-DsXp74wv.cjs} +2 -2
- package/dist/{browser-DUNetFT4.mjs → browser-CUxGoATV.mjs} +1 -1
- package/dist/{browser-DZ6qRtfH.cjs → browser-CZlA9AkO.cjs} +1 -1
- package/dist/{claudeLocal-OHWQigCl.mjs → claudeLocal-FnTUgwCi.mjs} +6 -6
- package/dist/{claudeLocal--DNyMOSv.cjs → claudeLocal-oELvwiZL.cjs} +6 -6
- package/dist/{claudeLocalLauncher-BStvfa7M.mjs → claudeLocalLauncher-CO5YHCzi.mjs} +11 -11
- package/dist/{claudeLocalLauncher-BhvPbcyH.cjs → claudeLocalLauncher-QsVXEVdE.cjs} +11 -11
- package/dist/{claudeSessionFork-Be16vzGc.cjs → claudeSessionFork-BA4GE5AL.cjs} +1 -1
- package/dist/{claudeSessionFork-GAVWhiKG.mjs → claudeSessionFork-Cspr6QW0.mjs} +1 -1
- package/dist/{client-D4uPb1uu.mjs → client-BGfmSbWc.mjs} +44 -9
- package/dist/{client-BWjaHKtj.cjs → client-CDuW4MS9.cjs} +2 -2
- package/dist/{client-CnB7kRCT.mjs → client-Ctbw05Xj.mjs} +2 -2
- package/dist/{client-DJplzPjD.cjs → client-DK8CzUry.cjs} +2 -2
- package/dist/{client-Ca5Pcgy_.mjs → client-o-meK7-a.mjs} +2 -2
- package/dist/{client-D_loZ9IK.cjs → client-xnWiHqdb.cjs} +44 -8
- package/dist/codex/happyMcpStdioBridge.cjs +21 -20
- package/dist/codex/happyMcpStdioBridge.mjs +21 -20
- package/dist/{codexAppServerClient-CO4G6OS4.mjs → codexAppServerClient-BlsOZLul.mjs} +3 -3
- package/dist/{codexAppServerClient-PE-12AsW.cjs → codexAppServerClient-DhNDTU_i.cjs} +3 -3
- package/dist/{codexCommand-B_xUH79E.mjs → codexCommand-BGx5NMQR.mjs} +49 -46
- package/dist/{codexCommand-BNoD1t1C.cjs → codexCommand-DJDPfpIs.cjs} +49 -46
- package/dist/{codexTermination-Dx48ma6e.mjs → codexTermination-CVhhwHZU.mjs} +1 -1
- package/dist/{codexTermination-BmBbizFK.cjs → codexTermination-CqPMuokw.cjs} +1 -1
- package/dist/{config-CtwEUxUP.cjs → config-CHpxzXBL.cjs} +3 -3
- package/dist/{config-DSu0Blos.mjs → config-CWAe08-Q.mjs} +3 -3
- package/dist/{configuration-CYO-kPOS.cjs → configuration-B-CugKJ3.cjs} +1 -1
- package/dist/{configuration-PxzEJumr.mjs → configuration-YXw_Dcsb.mjs} +1 -1
- package/dist/{connect-Dq7wndzR.cjs → connect-BmHvMXH2.cjs} +13 -13
- package/dist/{connect-BQrg3TB6.mjs → connect-CPeJXHha.mjs} +13 -13
- package/dist/{context-6TP-iz_c.cjs → context-BtIVqHI5.cjs} +1 -1
- package/dist/{context-CJGRRGWW.mjs → context-Drzs_Z38.mjs} +1 -1
- package/dist/{controlClient-DoeYovwP.mjs → controlClient-BL4hb4l3.mjs} +3 -3
- package/dist/{controlClient-Bqv5v5OM.cjs → controlClient-D0kGwKYx.cjs} +3 -3
- package/dist/{createSessionMetadata-DDIChCx8.mjs → createSessionMetadata-DvGDsnsn.mjs} +2 -2
- package/dist/{createSessionMetadata-xz767pcG.cjs → createSessionMetadata-L499emJn.cjs} +2 -2
- package/dist/{defaultPermissionMode-i5KzdK09.mjs → defaultPermissionMode-BLfxu-Yz.mjs} +2 -2
- package/dist/{defaultPermissionMode-PkZGsQDk.cjs → defaultPermissionMode-MXpZlXud.cjs} +2 -2
- package/dist/{deterministicJson-CTEJDqtS.mjs → deterministicJson-B_UAbmQ4.mjs} +87 -24
- package/dist/{deterministicJson-xqA6DaOm.cjs → deterministicJson-CfLkBRvU.cjs} +87 -22
- package/dist/{doctor-BrgSlfXn.cjs → doctor-DMvlzmnE.cjs} +8 -7
- package/dist/{doctor-IctjVh9T.mjs → doctor-bKScPtZu.mjs} +8 -8
- package/dist/{downloadTarget-CEb9che-.cjs → downloadTarget-D33BFvew.cjs} +6 -6
- package/dist/{downloadTarget-jbOz1egC.mjs → downloadTarget-J9j37eFG.mjs} +6 -6
- package/dist/{ensureDaemonRunning-D-HyjGIX.cjs → ensureDaemonRunning-2IqWROJp.cjs} +5 -5
- package/dist/{ensureDaemonRunning-b1e8LCSM.mjs → ensureDaemonRunning-DLvwhpNg.mjs} +5 -5
- package/dist/fileStore-5qpetZS0.mjs +146 -0
- package/dist/fileStore-7qhnbs6N.cjs +152 -0
- package/dist/fsMkdir-0K3yENml.cjs +56 -0
- package/dist/fsMkdir-DumgLTzR.mjs +53 -0
- package/dist/{handleResumeCommand-DpaZvm2c.mjs → handleResumeCommand-CjtjQ_I7.mjs} +5 -5
- package/dist/{handleResumeCommand-BvWVuRwH.cjs → handleResumeCommand-Dp2Y-p6V.cjs} +5 -5
- package/dist/{index-C6Vn5Eac.mjs → index-BI0h2Zks.mjs} +54 -6
- package/dist/{index-CMf5VbzG.mjs → index-BOT0Tg5E.mjs} +4 -4
- package/dist/{index-C64Ufj4D.cjs → index-B_aNaW9w.cjs} +4 -4
- package/dist/{index-F2UejqYs.cjs → index-CZC7egJA.cjs} +3 -3
- package/dist/{index-Bsvbgh9e.mjs → index-Cllzqoes.mjs} +4 -4
- package/dist/{index-B2p2Mut7.cjs → index-DYVIbhAJ.cjs} +78 -60
- package/dist/{index-wCbtF4BK.mjs → index-D_LvOWUN.mjs} +3 -3
- package/dist/{index-DmTlDRSL.cjs → index-DymOv3kK.cjs} +4 -4
- package/dist/{index-BUNnpGFF.mjs → index-kA46KMxN.mjs} +79 -61
- package/dist/{index-Dv0Q48P3.cjs → index-oh8XEozJ.cjs} +57 -6
- package/dist/index.cjs +2 -2
- package/dist/index.mjs +2 -2
- package/dist/{install-C0ANcEAW.cjs → install-BAa_Xmof.cjs} +3 -3
- package/dist/{install-CdzSV7qO.mjs → install-C46mkr9a.mjs} +3 -3
- package/dist/{install-BX3lv3NO.mjs → install-D0inLCv-.mjs} +1 -1
- package/dist/{install-BXvf2E3o.cjs → install-D2NCbeJ-.cjs} +1 -1
- package/dist/lib.cjs +12 -12
- package/dist/lib.d.cts +40 -1
- package/dist/lib.d.mts +40 -1
- package/dist/lib.mjs +12 -12
- package/dist/{lidState-bBrmaQd2.mjs → lidState-D8Iuvjgl.mjs} +1 -1
- package/dist/{lidState-DWGnm2H4.cjs → lidState-DcPvwniz.cjs} +1 -1
- package/dist/{localHappyAgentAuth-Dn1jYDpt.mjs → localHappyAgentAuth-D3rQDRd9.mjs} +1 -1
- package/dist/{localHappyAgentAuth-DZHQnIW9.cjs → localHappyAgentAuth-SD6GM97y.cjs} +1 -1
- package/dist/{logger-CphW5nUE.cjs → logger-DK1ytCz6.cjs} +2 -2
- package/dist/{logger-BUngm5Xg.mjs → logger-DpqihN1f.mjs} +2 -2
- package/dist/{machineMetadata-BXN_bKU3.mjs → machineMetadata-D4E3qoIG.mjs} +13 -4
- package/dist/{machineMetadata-BQm9YTcI.cjs → machineMetadata-IJc6_iyx.cjs} +13 -3
- package/dist/{main-DGkdYfEq.mjs → main-CpUmw7hm.mjs} +45 -45
- package/dist/{main-B2UV51nK.cjs → main-DUXh2rgW.cjs} +45 -45
- package/dist/{mcp-CbTtbs0f.mjs → mcp-66g1TJ8P.mjs} +17 -15
- package/dist/{mcp-BFvAEIRz.cjs → mcp-D5f3Vd-z.cjs} +17 -15
- package/dist/{mirrorProtocol-HKPivs5o.cjs → mirrorProtocol-DkWOcZh9.cjs} +16 -153
- package/dist/{mirrorProtocol-BR4luBC0.mjs → mirrorProtocol-bsCUcaCY.mjs} +19 -151
- package/dist/{package-KhLqBDX9.cjs → package-BfeqAzyJ.cjs} +8 -8
- package/dist/{package-7Ld1YMhh.mjs → package-CKj8zndE.mjs} +8 -8
- package/dist/{panels-Njf6GelF.cjs → panels-2PXsw9-d.cjs} +5 -5
- package/dist/{panels-C7IVqpJk.mjs → panels-r8LmaBs6.mjs} +5 -5
- package/dist/{peerTools-DQNlrcqM.cjs → peerTools-BVp1z0T_.cjs} +5 -5
- package/dist/{peerTools-BOlDRyhi.mjs → peerTools-D_id4d41.mjs} +5 -5
- package/dist/{persistence-9BMYspxG.cjs → persistence-BdpwWXKh.cjs} +2 -2
- package/dist/{persistence-BFUOHW5h.mjs → persistence-jOEuAFTS.mjs} +2 -2
- package/dist/pi-CqyoZMjI.mjs +380 -0
- package/dist/pi-DlsrPCTa.cjs +400 -0
- package/dist/{piRunnerArgs-H2pgpA5z.mjs → piRunnerArgs-68I5F_M1.mjs} +1 -1
- package/dist/{piRunnerArgs-DGaq6VYM.cjs → piRunnerArgs-vxCHKnSA.cjs} +1 -1
- package/dist/{piRuntime-CT5xv_3h.cjs → piRuntime-C3Dg5uni.cjs} +2 -2
- package/dist/{piRuntime-CdN0JAsa.mjs → piRuntime-DgLIard1.mjs} +2 -2
- package/dist/{piTerminal-0FBtXTHK.cjs → piTerminal-C135BcLP.cjs} +20 -18
- package/dist/{piTerminal-C4m9YXAV.mjs → piTerminal-DJL0w-uA.mjs} +20 -18
- package/dist/{prompt-lgF9IE82.cjs → prompt-Bof2aQkI.cjs} +7 -2
- package/dist/{prompt-BOouDaTM.mjs → prompt-QHuFx9j6.mjs} +7 -2
- package/dist/{pushNotifications-DCiBEVeC.mjs → pushNotifications-CMmRsbKv.mjs} +12 -4
- package/dist/{pushNotifications-DI92havG.cjs → pushNotifications-CyQVDThC.cjs} +12 -4
- package/dist/{query-BETKBrnz.cjs → query-CK--1fbL.cjs} +1 -1
- package/dist/{query-ywZbQUzR.mjs → query-CPXnDURZ.mjs} +1 -1
- package/dist/{rateLimitWindows-BkfuUB1a.mjs → rateLimitWindows-Cqa4AGaB.mjs} +1 -1
- package/dist/{rateLimitWindows-YRIYVdo4.cjs → rateLimitWindows-DJxnNw-X.cjs} +1 -1
- package/dist/{registerCommonHandlers-C7a_dUWs.cjs → registerCommonHandlers-DbNoM39q.cjs} +2 -2
- package/dist/{registerCommonHandlers-CTkCvjxt.mjs → registerCommonHandlers-K8dICQO2.mjs} +2 -2
- package/dist/{registerKillSessionHandler-CIsvBrVe.cjs → registerKillSessionHandler-DiS_go8d.cjs} +6 -6
- package/dist/{registerKillSessionHandler-CaqqRYq6.mjs → registerKillSessionHandler-O1iriOMO.mjs} +6 -6
- package/dist/{remoteSessionClient-PP-mOKmw.mjs → remoteSessionClient-BlURPulk.mjs} +5 -5
- package/dist/{remoteSessionClient-D843fkzL.cjs → remoteSessionClient-CtV9mDko.cjs} +5 -5
- package/dist/{reportProgressTool-14AXr959.cjs → reportProgressTool-DlD_xjzU.cjs} +4 -4
- package/dist/{reportProgressTool-ZOCNjWHr.mjs → reportProgressTool-nCExrHZH.mjs} +4 -4
- package/dist/{resources-CvIlkzpP.cjs → resources-BPyN59Iv.cjs} +23 -2
- package/dist/{resources-y9jfyO-_.mjs → resources-CH1iP6Cv.mjs} +22 -3
- package/dist/{run-CAOCYYfT.cjs → run-BBNrcCfI.cjs} +621 -594
- package/dist/{run-Dajw2E5j.mjs → run-drtwHYkO.mjs} +557 -530
- package/dist/{runClaude-CRRKt-tm.cjs → runClaude-B3KSeby4.cjs} +23 -22
- package/dist/{runClaude-C6oxWYbp.mjs → runClaude-CFp27Tyi.mjs} +23 -22
- package/dist/{runClaudeDeps-B1ysqTvx.cjs → runClaudeDeps-C_C9TCI0.cjs} +43 -41
- package/dist/{runClaudeDeps-BcZ68cX3.mjs → runClaudeDeps-DMcv93lA.mjs} +48 -46
- package/dist/{runGemini-D7yKc4wD.mjs → runGemini-Bc6SY-hd.mjs} +40 -37
- package/dist/{runGemini-DtKFXqf-.cjs → runGemini-DzdSBAr9.cjs} +40 -37
- package/dist/{runOpenClaw-C8ilyLP9.mjs → runOpenClaw-DI0qMlgF.mjs} +19 -18
- package/dist/{runOpenClaw-Cq29mryb.cjs → runOpenClaw-DN6rEVqC.cjs} +19 -18
- package/dist/{sandbox-gIj-EuF4.cjs → sandbox-DtttPBMA.cjs} +4 -4
- package/dist/{sandbox-CbCutma4.mjs → sandbox-v-ffe8LR.mjs} +4 -4
- package/dist/{selfCheck-BTGBVthv.cjs → selfCheck-B-yy6bW3.cjs} +36 -36
- package/dist/selfCheck-BDfTwxqB.mjs +85 -0
- package/dist/{send-YZRMQvMJ.mjs → send-DpBwSZuj.mjs} +8 -8
- package/dist/{send-CZf5lLw_.cjs → send-ShzXYPRu.cjs} +8 -8
- package/dist/{server-CknFq6xG.cjs → server-CEzKrfKj.cjs} +6 -6
- package/dist/{server-BqwXRzFZ.mjs → server-DScgJXxa.mjs} +4 -4
- package/dist/{sessionLock-nBXdJxJm.mjs → sessionLock-B6K4SBZD.mjs} +3 -3
- package/dist/{sessionLock-DRZUcKHT.cjs → sessionLock-Dc0fadGG.cjs} +3 -3
- package/dist/{sessionOps-C58iDeD5.mjs → sessionOps-D0BPWPoh.mjs} +4 -4
- package/dist/{sessionOps-BrGiU9-s.cjs → sessionOps-Dx7wARjI.cjs} +4 -4
- package/dist/{sessionScanner-Bm57LEXe.mjs → sessionScanner-9Fpgaxtf.mjs} +3 -3
- package/dist/{sessionScanner-CaO8bLaG.cjs → sessionScanner-BJ35TVG6.cjs} +3 -3
- package/dist/{sessions-BXyBHo8n.mjs → sessions-CFtDlyZd.mjs} +10 -10
- package/dist/{sessions-uzqPCc37.cjs → sessions-TZGGAry1.cjs} +10 -10
- package/dist/{setupOfflineReconnection-DvvVX3TB.cjs → setupOfflineReconnection-B1GsVA8P.cjs} +2 -2
- package/dist/{setupOfflineReconnection-1Qlek3wl.mjs → setupOfflineReconnection-Biaus-0T.mjs} +2 -2
- package/dist/{spawn-DBkodJEO.cjs → spawn-BRTuypQ2.cjs} +14 -14
- package/dist/{spawn-vn93PhYL.mjs → spawn-CsoQ-Ecz.mjs} +14 -14
- package/dist/{spawnAgents-DLNMlhWJ.cjs → spawnAgents-CG211IW7.cjs} +1 -1
- package/dist/{spawnAgents-CgPMWexP.mjs → spawnAgents-Co-SLcx-.mjs} +1 -1
- package/dist/{spawnHappyCLI-BjFZc_7V.mjs → spawnHappyCLI-D1doCjkZ.mjs} +1 -1
- package/dist/{spawnHappyCLI-DnUZv0X2.cjs → spawnHappyCLI-D47kX6jg.cjs} +1 -1
- package/dist/{specialCommands-BRufxlqe.cjs → specialCommands-Ch-Gvy-i.cjs} +3 -3
- package/dist/{specialCommands-D3ND9bdg.mjs → specialCommands-xSmqT_Fu.mjs} +3 -3
- package/dist/{startFileWatcher-DXJ7yB5v.mjs → startFileWatcher-CCl2fFxT.mjs} +1 -1
- package/dist/{startFileWatcher-D9cYzZOq.cjs → startFileWatcher-gKQTstR6.cjs} +1 -1
- package/dist/{startupSessionCreate-kdr3m1uX.cjs → startupSessionCreate-BXqoUX30.cjs} +1 -1
- package/dist/{startupSessionCreate-uZ6BM0ty.mjs → startupSessionCreate-DlZc8yPl.mjs} +1 -1
- package/dist/{streamRelay-Dy6amlzx.cjs → streamRelay-B-J-4St1.cjs} +1 -1
- package/dist/{streamRelay-DnMCMMfV.mjs → streamRelay-DnJXsi36.mjs} +1 -1
- package/dist/{sync-BvVhDO40.mjs → sync-BbjMC3sR.mjs} +1 -1
- package/dist/{sync-Bn-idAoy.cjs → sync-BxMdnZzz.cjs} +1 -1
- package/dist/{systemPrompt-DlyEk35T.cjs → systemPrompt-C2KojRmK.cjs} +3 -3
- package/dist/{systemPrompt-CIZcJuJF.mjs → systemPrompt-CmSDAoIx.mjs} +3 -3
- package/dist/{teams-BLeRpDxv.cjs → teams-DESdalox.cjs} +13 -10
- package/dist/{teams-DLY3B5yi.mjs → teams-lRy1MS0Z.mjs} +13 -10
- package/dist/{time-D3ETL7Jb.mjs → time-Cfknl7xG.mjs} +1 -1
- package/dist/{time-Cjv0zxQO.cjs → time-DNLeIRgR.cjs} +1 -1
- package/dist/{titleGenerator-Uzbd4utr.mjs → titleGenerator-ClnMSzwC.mjs} +1 -1
- package/dist/{titleGenerator-Cgp5ihFb.cjs → titleGenerator-YNutaU88.cjs} +2 -2
- package/dist/{todo-pOMcEECE.cjs → todo-DS75Mboz.cjs} +6 -6
- package/dist/{todo-C9Ga-oEM.mjs → todo-DZbK5POc.mjs} +6 -6
- package/dist/{tools-Cho7iIWf.mjs → tools-BgdU0dWp.mjs} +3 -3
- package/dist/{tools-BL7Byl_x.cjs → tools-ClYcb1YQ.cjs} +3 -3
- package/dist/{uninstall-CbayEVoV.cjs → uninstall-Di1vPBLV.cjs} +3 -3
- package/dist/{uninstall-CvZHVY9C.mjs → uninstall-bXenFevR.mjs} +3 -3
- package/package.json +8 -8
- package/dist/selfCheck-Smt-5Xiq.mjs +0 -85
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { spawn } from 'node:child_process';
|
|
2
2
|
import { ndJsonStream, ClientSideConnection } from '@agentclientprotocol/sdk';
|
|
3
3
|
import { randomUUID } from 'node:crypto';
|
|
4
|
-
import { l as logger } from './logger-
|
|
5
|
-
import { d as delay } from './time-
|
|
4
|
+
import { l as logger } from './logger-DpqihN1f.mjs';
|
|
5
|
+
import { d as delay } from './time-Cfknl7xG.mjs';
|
|
6
6
|
import { c as contentLogMetadata, e as errorLogMetadata } from './contentLogMetadata-BlWI0egu.mjs';
|
|
7
7
|
import { r as readableStderrTail, a as appendStderrRing, s as stopProcessGracefully, k as killProcessTree } from './processTree-CP5IvQ2Z.mjs';
|
|
8
|
-
import { p as packageJson } from './package-
|
|
8
|
+
import { p as packageJson } from './package-CKj8zndE.mjs';
|
|
9
9
|
|
|
10
10
|
function acpImageBlocks(attachments, supportsImages) {
|
|
11
11
|
return attachments.filter((file) => ["image/jpeg", "image/png", "image/gif", "image/webp"].includes(file.mimeType)).map((file) => {
|
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
var node_child_process = require('node:child_process');
|
|
4
4
|
var sdk = require('@agentclientprotocol/sdk');
|
|
5
5
|
var node_crypto = require('node:crypto');
|
|
6
|
-
var logger = require('./logger-
|
|
7
|
-
var time = require('./time-
|
|
6
|
+
var logger = require('./logger-DK1ytCz6.cjs');
|
|
7
|
+
var time = require('./time-DNLeIRgR.cjs');
|
|
8
8
|
var contentLogMetadata = require('./contentLogMetadata-ZSFk_NjQ.cjs');
|
|
9
9
|
var processTree = require('./processTree-CMHWlVse.cjs');
|
|
10
|
-
var _package = require('./package-
|
|
10
|
+
var _package = require('./package-BfeqAzyJ.cjs');
|
|
11
11
|
|
|
12
12
|
function acpImageBlocks(attachments, supportsImages) {
|
|
13
13
|
return attachments.filter((file) => ["image/jpeg", "image/png", "image/gif", "image/webp"].includes(file.mimeType)).map((file) => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createId } from '@paralleldrive/cuid2';
|
|
2
|
-
import { s as streamKeyOf,
|
|
2
|
+
import { s as streamKeyOf, e as createEnvelope } from './index-BI0h2Zks.mjs';
|
|
3
3
|
|
|
4
4
|
function turnOptions(turnId, time) {
|
|
5
5
|
return turnId ? { turn: turnId, time } : { time };
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
var node_fs = require('node:fs');
|
|
4
4
|
var path = require('node:path');
|
|
5
|
-
var configuration = require('./configuration-
|
|
5
|
+
var configuration = require('./configuration-B-CugKJ3.cjs');
|
|
6
6
|
|
|
7
7
|
const SESSION_MODE_DIR = "session-modes";
|
|
8
8
|
const ACP_PERMISSION_MODES = ["default", "acceptEdits", "plan", "bypassPermissions"];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { mkdirSync, renameSync, existsSync, unlinkSync } from 'node:fs';
|
|
2
2
|
import { join } from 'node:path';
|
|
3
|
-
import { w as writePrivateFileSync, c as configuration } from './configuration-
|
|
3
|
+
import { w as writePrivateFileSync, c as configuration } from './configuration-YXw_Dcsb.mjs';
|
|
4
4
|
|
|
5
5
|
const SESSION_MODE_DIR = "session-modes";
|
|
6
6
|
const ACP_PERMISSION_MODES = ["default", "acceptEdits", "plan", "bypassPermissions"];
|
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
var chalk = require('chalk');
|
|
4
4
|
var os = require('node:os');
|
|
5
|
-
var persistence = require('./persistence-
|
|
5
|
+
var persistence = require('./persistence-BdpwWXKh.cjs');
|
|
6
6
|
require('node:fs');
|
|
7
|
-
require('./logger-
|
|
7
|
+
require('./logger-DK1ytCz6.cjs');
|
|
8
8
|
var loginShellEnv = require('./loginShellEnv-BkuYtExZ.cjs');
|
|
9
9
|
require('node:fs/promises');
|
|
10
|
-
require('./configuration-
|
|
10
|
+
require('./configuration-B-CugKJ3.cjs');
|
|
11
11
|
require('node:path');
|
|
12
|
-
require('./package-
|
|
12
|
+
require('./package-BfeqAzyJ.cjs');
|
|
13
13
|
require('zod');
|
|
14
14
|
require('./authRelay-Dy1qU9td.cjs');
|
|
15
15
|
require('node:crypto');
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import chalk from 'chalk';
|
|
2
2
|
import { homedir } from 'node:os';
|
|
3
|
-
import { r as readSettings, u as updateSettings } from './persistence-
|
|
3
|
+
import { r as readSettings, u as updateSettings } from './persistence-jOEuAFTS.mjs';
|
|
4
4
|
import 'node:fs';
|
|
5
|
-
import './logger-
|
|
5
|
+
import './logger-DpqihN1f.mjs';
|
|
6
6
|
import { d as describeAgentHome, p as probeLoginShellEnv, r as resolveAgentHomes, e as expandHomePath, A as AGENT_HOME_ENV_NAMES } from './loginShellEnv-Dw8M7tkI.mjs';
|
|
7
7
|
import 'node:fs/promises';
|
|
8
|
-
import './configuration-
|
|
8
|
+
import './configuration-YXw_Dcsb.mjs';
|
|
9
9
|
import 'node:path';
|
|
10
|
-
import './package-
|
|
10
|
+
import './package-CKj8zndE.mjs';
|
|
11
11
|
import 'zod';
|
|
12
12
|
import './authRelay-DhQhkBvX.mjs';
|
|
13
13
|
import 'node:crypto';
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var axios = require('axios');
|
|
4
|
-
var logger = require('./logger-
|
|
5
|
-
var lidState = require('./lidState-
|
|
4
|
+
var logger = require('./logger-DK1ytCz6.cjs');
|
|
5
|
+
var lidState = require('./lidState-DcPvwniz.cjs');
|
|
6
6
|
var node_events = require('node:events');
|
|
7
7
|
var socket_ioClient = require('socket.io-client');
|
|
8
|
-
var pushNotifications = require('./pushNotifications-
|
|
8
|
+
var pushNotifications = require('./pushNotifications-CyQVDThC.cjs');
|
|
9
9
|
var authRelay = require('./authRelay-Dy1qU9td.cjs');
|
|
10
10
|
var limits = require('./limits-C-a7gr04.cjs');
|
|
11
|
-
var time = require('./time-
|
|
12
|
-
var configuration = require('./configuration-
|
|
11
|
+
var time = require('./time-DNLeIRgR.cjs');
|
|
12
|
+
var configuration = require('./configuration-B-CugKJ3.cjs');
|
|
13
13
|
var node_crypto = require('node:crypto');
|
|
14
|
-
var index = require('./index-
|
|
15
|
-
var registerCommonHandlers = require('./registerCommonHandlers-
|
|
14
|
+
var index = require('./index-oh8XEozJ.cjs');
|
|
15
|
+
var registerCommonHandlers = require('./registerCommonHandlers-DbNoM39q.cjs');
|
|
16
16
|
var cuid2 = require('@paralleldrive/cuid2');
|
|
17
|
-
var sync = require('./sync-
|
|
17
|
+
var sync = require('./sync-BxMdnZzz.cjs');
|
|
18
18
|
var backgroundTaskActivity = require('./backgroundTaskActivity-CBvUdj39.cjs');
|
|
19
|
-
var controlClient = require('./controlClient-
|
|
19
|
+
var controlClient = require('./controlClient-D0kGwKYx.cjs');
|
|
20
20
|
var chalk = require('chalk');
|
|
21
21
|
|
|
22
22
|
async function hmac_sha512(key, data) {
|
|
@@ -2949,7 +2949,7 @@ class ApiClient {
|
|
|
2949
2949
|
return new ApiSessionClient(this.credential.token, session, opts);
|
|
2950
2950
|
}
|
|
2951
2951
|
async machineSyncClient(machine) {
|
|
2952
|
-
const { ApiMachineClient } = await Promise.resolve().then(function () { return require('./apiMachine-
|
|
2952
|
+
const { ApiMachineClient } = await Promise.resolve().then(function () { return require('./apiMachine-DPGrED5C.cjs'); });
|
|
2953
2953
|
return new ApiMachineClient(this.credential.token, machine);
|
|
2954
2954
|
}
|
|
2955
2955
|
push() {
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import axios from 'axios';
|
|
2
|
-
import { l as logger, r as redactLogValue } from './logger-
|
|
3
|
-
import { R as RpcHandlerManager, a as answerSocketRequest, c as connectGuarded, s as socketConnectGuard, d as describeSocketAckDrop, b as safeAck, i as isRateQuotaCode, p as pauseForRateQuota, e as shouldReconnect } from './lidState-
|
|
2
|
+
import { l as logger, r as redactLogValue } from './logger-DpqihN1f.mjs';
|
|
3
|
+
import { R as RpcHandlerManager, a as answerSocketRequest, c as connectGuarded, s as socketConnectGuard, d as describeSocketAckDrop, b as safeAck, i as isRateQuotaCode, p as pauseForRateQuota, e as shouldReconnect } from './lidState-D8Iuvjgl.mjs';
|
|
4
4
|
import { EventEmitter } from 'node:events';
|
|
5
5
|
import { io } from 'socket.io-client';
|
|
6
|
-
import { A as AsyncLock, a as MAX_CHAT_ATTACHMENT_ENCRYPTED_BYTES, U as UserMessageSchema, F as FileEventMessageSchema, P as PushNotificationClient } from './pushNotifications-
|
|
6
|
+
import { A as AsyncLock, a as MAX_CHAT_ATTACHMENT_ENCRYPTED_BYTES, U as UserMessageSchema, F as FileEventMessageSchema, P as PushNotificationClient } from './pushNotifications-CMmRsbKv.mjs';
|
|
7
7
|
import { h as decrypt, d as decodeBase64, i as decryptBlob, e as encodeBase64, g as encrypt, l as libsodiumEncryptForPublicKey, j as libsodiumPublicKeyFromSecretKey, k as getRandomBytes } from './authRelay-DhQhkBvX.mjs';
|
|
8
8
|
import { p as prepareClipboardText, d as prepareClipboardHistoryText } from './limits-DIo7rEBR.mjs';
|
|
9
|
-
import { b as backoff, d as delay, e as exponentialBackoffDelay } from './time-
|
|
10
|
-
import { c as configuration } from './configuration-
|
|
9
|
+
import { b as backoff, d as delay, e as exponentialBackoffDelay } from './time-Cfknl7xG.mjs';
|
|
10
|
+
import { c as configuration } from './configuration-YXw_Dcsb.mjs';
|
|
11
11
|
import { createHmac, randomUUID } from 'node:crypto';
|
|
12
|
-
import {
|
|
13
|
-
import { r as registerCommonHandlers } from './registerCommonHandlers-
|
|
12
|
+
import { e as createEnvelope, s as streamKeyOf, R as ReleaseDrainNoticeSchema, v as RelayAssignmentResponseSchema } from './index-BI0h2Zks.mjs';
|
|
13
|
+
import { r as registerCommonHandlers } from './registerCommonHandlers-K8dICQO2.mjs';
|
|
14
14
|
import { createId } from '@paralleldrive/cuid2';
|
|
15
|
-
import { I as InvalidateSync } from './sync-
|
|
15
|
+
import { I as InvalidateSync } from './sync-BbjMC3sR.mjs';
|
|
16
16
|
import { B as BackgroundTaskReporter } from './backgroundTaskActivity-8PdPxrvy.mjs';
|
|
17
|
-
import { k as notifyDaemonTurnEvent, m as notifyDaemonBackgroundTasks } from './controlClient-
|
|
17
|
+
import { k as notifyDaemonTurnEvent, m as notifyDaemonBackgroundTasks } from './controlClient-BL4hb4l3.mjs';
|
|
18
18
|
import chalk from 'chalk';
|
|
19
19
|
|
|
20
20
|
async function hmac_sha512(key, data) {
|
|
@@ -2947,7 +2947,7 @@ class ApiClient {
|
|
|
2947
2947
|
return new ApiSessionClient(this.credential.token, session, opts);
|
|
2948
2948
|
}
|
|
2949
2949
|
async machineSyncClient(machine) {
|
|
2950
|
-
const { ApiMachineClient } = await import('./apiMachine-
|
|
2950
|
+
const { ApiMachineClient } = await import('./apiMachine-C_GA5Bm-.mjs');
|
|
2951
2951
|
return new ApiMachineClient(this.credential.token, machine);
|
|
2952
2952
|
}
|
|
2953
2953
|
push() {
|
|
@@ -1,42 +1,44 @@
|
|
|
1
1
|
import { io } from 'socket.io-client';
|
|
2
2
|
import { a as webPanelsSignature } from './webPanels-B2_C2-3g.mjs';
|
|
3
|
-
import { l as logger } from './logger-
|
|
4
|
-
import { R as RpcHandlerManager, i as isRateQuotaCode, p as pauseForRateQuota, s as socketConnectGuard, c as connectGuarded, a as answerSocketRequest, e as shouldReconnect, d as describeSocketAckDrop } from './lidState-
|
|
5
|
-
import {
|
|
6
|
-
import { c as configuration } from './configuration-
|
|
3
|
+
import { l as logger } from './logger-DpqihN1f.mjs';
|
|
4
|
+
import { R as RpcHandlerManager, i as isRateQuotaCode, p as pauseForRateQuota, s as socketConnectGuard, c as connectGuarded, a as answerSocketRequest, e as shouldReconnect, d as describeSocketAckDrop } from './lidState-D8Iuvjgl.mjs';
|
|
5
|
+
import { i as isClaudeSessionId, s as stableVersion, a as sanitizeTagList, p as pickMirrorForTerminal, l as liveSnapshotChanged, b as sanitizeLiveSnapshot, c as serializeLiveSnapshot, r as registerWorktreeHandlers, d as configureWorktreeService, e as summarizeSpawnSessionForLog, f as parseMirrorSendParams } from './mirrorProtocol-bsCUcaCY.mjs';
|
|
6
|
+
import { c as configuration } from './configuration-YXw_Dcsb.mjs';
|
|
7
7
|
import { w as withCurrentCliUpdateState } from './cliUpdate-Y34VGe9Y.mjs';
|
|
8
|
-
import { r as registerCommonHandlers } from './registerCommonHandlers-
|
|
8
|
+
import { r as registerCommonHandlers } from './registerCommonHandlers-K8dICQO2.mjs';
|
|
9
9
|
import { stat, readdir, lstat, open, readFile, rm, mkdir, chmod, writeFile, rename } from 'node:fs/promises';
|
|
10
10
|
import { join, isAbsolute, resolve } from 'node:path';
|
|
11
11
|
import os, { homedir } from 'node:os';
|
|
12
|
+
import { f as fsMkdir } from './fsMkdir-DumgLTzR.mjs';
|
|
12
13
|
import { spawn, execFile, spawnSync } from 'node:child_process';
|
|
13
|
-
import { r as readSettings, c as readPersistedSessions, o as readTrackedClaudeSessionIds, p as readTrackedCodexThreadIds } from './persistence-
|
|
14
|
+
import { r as readSettings, c as readPersistedSessions, o as readTrackedClaudeSessionIds, p as readTrackedCodexThreadIds } from './persistence-jOEuAFTS.mjs';
|
|
15
|
+
import { M as ModelConfigError } from './fileStore-5qpetZS0.mjs';
|
|
14
16
|
import { e as encodeBase64, g as encrypt, h as decrypt, d as decodeBase64 } from './authRelay-DhQhkBvX.mjs';
|
|
15
17
|
import { p as prepareClipboardText, d as prepareClipboardHistoryText } from './limits-DIo7rEBR.mjs';
|
|
16
|
-
import { b as backoff, d as delay } from './time-
|
|
18
|
+
import { b as backoff, d as delay } from './time-Cfknl7xG.mjs';
|
|
17
19
|
import * as pty from 'node-pty';
|
|
18
20
|
import { a as attachStartupCommand, v as validateTerminalTags, d as deriveAutoTitle, T as TMUX_SESSION_ID_RE, i as isSafeTmuxSessionName, b as isVhSessionName, U as USER_SESSIONS_FORMAT, p as parseUserSessions, L as LIST_SESSIONS_FORMAT, c as parseSessionListLine, e as LIST_FIELD_SEP, s as sendToVhTerminal } from './terminals-Dlg0x3nY.mjs';
|
|
19
21
|
import { t as tmuxArgs, V as VH_TMUX_SOCKET_ENV, a as scrubTmuxClientEnv } from './tmuxSocket-B8Yx20sT.mjs';
|
|
20
|
-
import { locateClaudeConversation, refreshAgentHomes } from './index-
|
|
22
|
+
import { locateClaudeConversation, refreshAgentHomes } from './index-Cllzqoes.mjs';
|
|
21
23
|
import { randomBytes } from 'node:crypto';
|
|
22
24
|
import { readdirSync, unlinkSync, existsSync, mkdirSync, writeFileSync, readFileSync, statSync, chmodSync, renameSync, rmSync, accessSync, constants } from 'node:fs';
|
|
23
25
|
import axios from 'axios';
|
|
24
26
|
import { p as projectPath } from './projectPath-BTBIMB57.mjs';
|
|
25
27
|
import { a as isValidTerminalId } from './ids-DU6sLx4C.mjs';
|
|
26
28
|
import { d as detectCLIAvailability } from './detectCLI-CSGMlV51.mjs';
|
|
27
|
-
import { d as detectResumeSupport } from './localHappyAgentAuth-
|
|
29
|
+
import { d as detectResumeSupport } from './localHappyAgentAuth-D3rQDRd9.mjs';
|
|
28
30
|
import { g as getProjectPath, a as getClaudeProjectsRoot } from './path-D2wdaNSk.mjs';
|
|
29
31
|
import { i as isVeryHappyOneShotPrompt } from './oneShotPrompts-DT4p6RNd.mjs';
|
|
30
|
-
import { f as forkSession, F as ForkSourceMissingError, d as discardForkedSession, l as listClaudeRewindPoints, a as forkAndTruncateSession, b as ForkTruncateUuidNotFoundError, c as forkBeforeUserMessage } from './claudeSessionFork-
|
|
31
|
-
import { C as CodexAppServerClient } from './codexAppServerClient-
|
|
32
|
-
import {
|
|
32
|
+
import { f as forkSession, F as ForkSourceMissingError, d as discardForkedSession, l as listClaudeRewindPoints, a as forkAndTruncateSession, b as ForkTruncateUuidNotFoundError, c as forkBeforeUserMessage } from './claudeSessionFork-Cspr6QW0.mjs';
|
|
33
|
+
import { C as CodexAppServerClient } from './codexAppServerClient-BlsOZLul.mjs';
|
|
34
|
+
import { w as RelayCandidatesResponseSchema, v as RelayAssignmentResponseSchema, R as ReleaseDrainNoticeSchema } from './index-BI0h2Zks.mjs';
|
|
33
35
|
import { f as forkCodexThread, C as CodexForkRewindPointNotFoundError, l as listCodexRewindPoints, a as forkCodexBeforeUserMessage } from './codexThreadFork-R76RU5H0.mjs';
|
|
34
|
-
import { p as planRateLimitWrite, m as mergeRateLimitReports } from './rateLimitWindows-
|
|
36
|
+
import { p as planRateLimitWrite, m as mergeRateLimitReports } from './rateLimitWindows-Cqa4AGaB.mjs';
|
|
35
37
|
import 'chalk';
|
|
36
38
|
import 'node:util';
|
|
37
39
|
import 'os';
|
|
38
40
|
import 'child_process';
|
|
39
|
-
import './package-
|
|
41
|
+
import './package-CKj8zndE.mjs';
|
|
40
42
|
import 'util';
|
|
41
43
|
import 'fs/promises';
|
|
42
44
|
import 'crypto';
|
|
@@ -183,6 +185,10 @@ function registerFsHandlers(rpcHandlerManager) {
|
|
|
183
185
|
logger.debug("[FS RPC] fs-read", params?.path);
|
|
184
186
|
return fsRead(params?.path, { maxBytes: params?.maxBytes, allowBinary: params?.allowBinary === true, offset: params?.offset });
|
|
185
187
|
});
|
|
188
|
+
rpcHandlerManager.registerHandler("fs-mkdir", async (params) => {
|
|
189
|
+
logger.debug("[FS RPC] fs-mkdir", params?.path);
|
|
190
|
+
return fsMkdir(params?.path, { gitInit: params?.gitInit === true });
|
|
191
|
+
});
|
|
186
192
|
}
|
|
187
193
|
|
|
188
194
|
const TODO_LIST_MAX_ITEMS = 500;
|
|
@@ -10600,6 +10606,10 @@ class ApiMachineClient {
|
|
|
10600
10606
|
setCliUpdateRequestHandler(handler) {
|
|
10601
10607
|
this.rpcHandlerManager.registerHandler("cli-update-request", (params) => handler(params && typeof params === "object" ? params.version : void 0));
|
|
10602
10608
|
}
|
|
10609
|
+
/** B-719: `harness-install` — the owner asked this machine to install one harness id. */
|
|
10610
|
+
setHarnessInstallHandler(handler) {
|
|
10611
|
+
this.rpcHandlerManager.registerHandler("harness-install", (params) => handler(params));
|
|
10612
|
+
}
|
|
10603
10613
|
setCliUpdateRetryHandler(handler) {
|
|
10604
10614
|
this.rpcHandlerManager.registerHandler("cli-update-retry", (params) => handler(params && typeof params === "object" ? params.version : void 0));
|
|
10605
10615
|
}
|
|
@@ -11474,6 +11484,15 @@ class ApiMachineClient {
|
|
|
11474
11484
|
if (this.socket !== socket) return;
|
|
11475
11485
|
this.serverMigrateHandler?.(data);
|
|
11476
11486
|
});
|
|
11487
|
+
socket.on("cli-update-policy", (data) => {
|
|
11488
|
+
if (this.socket !== socket) return;
|
|
11489
|
+
this.cliUpdatePolicyHandler?.(data);
|
|
11490
|
+
});
|
|
11491
|
+
}
|
|
11492
|
+
cliUpdatePolicyHandler = null;
|
|
11493
|
+
/** B-718: the daemon decides what a policy announcement means (update/policyAnnouncement.ts). */
|
|
11494
|
+
setCliUpdatePolicyHandler(handler) {
|
|
11495
|
+
this.cliUpdatePolicyHandler = handler;
|
|
11477
11496
|
}
|
|
11478
11497
|
serverMigrateHandler = null;
|
|
11479
11498
|
/** B-635: the daemon decides what to do with a relay-migration notice (daemon/serverMigration.ts). */
|
|
@@ -11559,27 +11578,35 @@ class ApiMachineClient {
|
|
|
11559
11578
|
if (Date.now() - this.lastCliProbeAt < CLI_AVAILABILITY_RECHECK_MS) {
|
|
11560
11579
|
return;
|
|
11561
11580
|
}
|
|
11562
|
-
this.
|
|
11563
|
-
const newAvailability = detectCLIAvailability();
|
|
11564
|
-
const prev = this.lastKnownCLIAvailability;
|
|
11565
|
-
const newResumeSupport = detectResumeSupport();
|
|
11566
|
-
const prevResume = this.lastKnownResumeSupport;
|
|
11567
|
-
const cliAvailabilityChanged = !prev || prev.claude !== newAvailability.claude || prev.codex !== newAvailability.codex || prev.gemini !== newAvailability.gemini || prev.openclaw !== newAvailability.openclaw || prev.pi !== newAvailability.pi;
|
|
11568
|
-
const resumeSupportChanged = !prevResume || prevResume.rpcAvailable !== newResumeSupport.rpcAvailable || prevResume.happyAgentAuthenticated !== newResumeSupport.happyAgentAuthenticated;
|
|
11569
|
-
if (cliAvailabilityChanged || resumeSupportChanged) {
|
|
11570
|
-
this.lastKnownCLIAvailability = newAvailability;
|
|
11571
|
-
this.lastKnownResumeSupport = newResumeSupport;
|
|
11572
|
-
this.updateMachineMetadata((metadata) => ({
|
|
11573
|
-
...metadata || {},
|
|
11574
|
-
cliAvailability: newAvailability,
|
|
11575
|
-
resumeSupport: { ...newResumeSupport, rpcAvailable: !!this.resumeSessionHandler }
|
|
11576
|
-
})).catch((err) => {
|
|
11577
|
-
logger.debug("[API MACHINE] Failed to update machine capabilities:", err);
|
|
11578
|
-
});
|
|
11579
|
-
}
|
|
11581
|
+
this.recheckCliAvailability();
|
|
11580
11582
|
}, 2e4);
|
|
11581
11583
|
logger.debug("[API MACHINE] Keep-alive started (20s interval)");
|
|
11582
11584
|
}
|
|
11585
|
+
/**
|
|
11586
|
+
* Re-detect CLI availability and publish it when it changed. Called on the
|
|
11587
|
+
* throttled keep-alive and, B-719, right after the owner installed a
|
|
11588
|
+
* harness so the launcher enables it without waiting up to five minutes.
|
|
11589
|
+
*/
|
|
11590
|
+
recheckCliAvailability() {
|
|
11591
|
+
this.lastCliProbeAt = Date.now();
|
|
11592
|
+
const newAvailability = detectCLIAvailability();
|
|
11593
|
+
const prev = this.lastKnownCLIAvailability;
|
|
11594
|
+
const newResumeSupport = detectResumeSupport();
|
|
11595
|
+
const prevResume = this.lastKnownResumeSupport;
|
|
11596
|
+
const cliAvailabilityChanged = !prev || prev.claude !== newAvailability.claude || prev.codex !== newAvailability.codex || prev.gemini !== newAvailability.gemini || prev.openclaw !== newAvailability.openclaw || prev.pi !== newAvailability.pi;
|
|
11597
|
+
const resumeSupportChanged = !prevResume || prevResume.rpcAvailable !== newResumeSupport.rpcAvailable || prevResume.happyAgentAuthenticated !== newResumeSupport.happyAgentAuthenticated;
|
|
11598
|
+
if (cliAvailabilityChanged || resumeSupportChanged) {
|
|
11599
|
+
this.lastKnownCLIAvailability = newAvailability;
|
|
11600
|
+
this.lastKnownResumeSupport = newResumeSupport;
|
|
11601
|
+
this.updateMachineMetadata((metadata) => ({
|
|
11602
|
+
...metadata || {},
|
|
11603
|
+
cliAvailability: newAvailability,
|
|
11604
|
+
resumeSupport: { ...newResumeSupport, rpcAvailable: !!this.resumeSessionHandler }
|
|
11605
|
+
})).catch((err) => {
|
|
11606
|
+
logger.debug("[API MACHINE] Failed to update machine capabilities:", err);
|
|
11607
|
+
});
|
|
11608
|
+
}
|
|
11609
|
+
}
|
|
11583
11610
|
bindRpcRequestHandler(socket, transport) {
|
|
11584
11611
|
socket.on("rpc-request", async (data, callback) => {
|
|
11585
11612
|
if (typeof data?.method === "string" && this.rpcHandlerManager.isPlainMethod(data.method)) {
|
|
@@ -2,43 +2,45 @@
|
|
|
2
2
|
|
|
3
3
|
var socket_ioClient = require('socket.io-client');
|
|
4
4
|
var webPanels = require('./webPanels-FCgFKvVe.cjs');
|
|
5
|
-
var logger = require('./logger-
|
|
6
|
-
var lidState = require('./lidState-
|
|
7
|
-
var mirrorProtocol = require('./mirrorProtocol-
|
|
8
|
-
var configuration = require('./configuration-
|
|
5
|
+
var logger = require('./logger-DK1ytCz6.cjs');
|
|
6
|
+
var lidState = require('./lidState-DcPvwniz.cjs');
|
|
7
|
+
var mirrorProtocol = require('./mirrorProtocol-DkWOcZh9.cjs');
|
|
8
|
+
var configuration = require('./configuration-B-CugKJ3.cjs');
|
|
9
9
|
var cliUpdate = require('./cliUpdate-DsKXPFYp.cjs');
|
|
10
|
-
var registerCommonHandlers = require('./registerCommonHandlers-
|
|
10
|
+
var registerCommonHandlers = require('./registerCommonHandlers-DbNoM39q.cjs');
|
|
11
11
|
var promises = require('node:fs/promises');
|
|
12
12
|
var path = require('node:path');
|
|
13
13
|
var os = require('node:os');
|
|
14
|
+
var fsMkdir = require('./fsMkdir-0K3yENml.cjs');
|
|
14
15
|
var node_child_process = require('node:child_process');
|
|
15
|
-
var persistence = require('./persistence-
|
|
16
|
+
var persistence = require('./persistence-BdpwWXKh.cjs');
|
|
17
|
+
var fileStore = require('./fileStore-7qhnbs6N.cjs');
|
|
16
18
|
var authRelay = require('./authRelay-Dy1qU9td.cjs');
|
|
17
19
|
var limits = require('./limits-C-a7gr04.cjs');
|
|
18
|
-
var time = require('./time-
|
|
20
|
+
var time = require('./time-DNLeIRgR.cjs');
|
|
19
21
|
var pty = require('node-pty');
|
|
20
22
|
var terminals = require('./terminals-B_bfC9c2.cjs');
|
|
21
23
|
var tmuxSocket = require('./tmuxSocket-D-Xt6Vn-.cjs');
|
|
22
|
-
var index = require('./index-
|
|
24
|
+
var index = require('./index-B_aNaW9w.cjs');
|
|
23
25
|
var node_crypto = require('node:crypto');
|
|
24
26
|
var node_fs = require('node:fs');
|
|
25
27
|
var axios = require('axios');
|
|
26
28
|
var projectPath = require('./projectPath-C3ioB4Bu.cjs');
|
|
27
29
|
var ids = require('./ids-B6ZC0HGt.cjs');
|
|
28
30
|
var detectCLI = require('./detectCLI-BuYR_Qxe.cjs');
|
|
29
|
-
var localHappyAgentAuth = require('./localHappyAgentAuth-
|
|
31
|
+
var localHappyAgentAuth = require('./localHappyAgentAuth-SD6GM97y.cjs');
|
|
30
32
|
var path$1 = require('./path-B7zW-WwE.cjs');
|
|
31
33
|
var oneShotPrompts = require('./oneShotPrompts-CL0dip9C.cjs');
|
|
32
|
-
var claudeSessionFork = require('./claudeSessionFork-
|
|
33
|
-
var codexAppServerClient = require('./codexAppServerClient-
|
|
34
|
-
var index$1 = require('./index-
|
|
34
|
+
var claudeSessionFork = require('./claudeSessionFork-BA4GE5AL.cjs');
|
|
35
|
+
var codexAppServerClient = require('./codexAppServerClient-DhNDTU_i.cjs');
|
|
36
|
+
var index$1 = require('./index-oh8XEozJ.cjs');
|
|
35
37
|
var codexThreadFork = require('./codexThreadFork-DNekT4nQ.cjs');
|
|
36
|
-
var rateLimitWindows = require('./rateLimitWindows-
|
|
38
|
+
var rateLimitWindows = require('./rateLimitWindows-DJxnNw-X.cjs');
|
|
37
39
|
require('chalk');
|
|
38
40
|
require('node:util');
|
|
39
41
|
require('os');
|
|
40
42
|
require('child_process');
|
|
41
|
-
require('./package-
|
|
43
|
+
require('./package-BfeqAzyJ.cjs');
|
|
42
44
|
require('util');
|
|
43
45
|
require('fs/promises');
|
|
44
46
|
require('crypto');
|
|
@@ -204,6 +206,10 @@ function registerFsHandlers(rpcHandlerManager) {
|
|
|
204
206
|
logger.logger.debug("[FS RPC] fs-read", params?.path);
|
|
205
207
|
return fsRead(params?.path, { maxBytes: params?.maxBytes, allowBinary: params?.allowBinary === true, offset: params?.offset });
|
|
206
208
|
});
|
|
209
|
+
rpcHandlerManager.registerHandler("fs-mkdir", async (params) => {
|
|
210
|
+
logger.logger.debug("[FS RPC] fs-mkdir", params?.path);
|
|
211
|
+
return fsMkdir.fsMkdir(params?.path, { gitInit: params?.gitInit === true });
|
|
212
|
+
});
|
|
207
213
|
}
|
|
208
214
|
|
|
209
215
|
const TODO_LIST_MAX_ITEMS = 500;
|
|
@@ -372,7 +378,7 @@ async function guarded(fn) {
|
|
|
372
378
|
try {
|
|
373
379
|
return await fn();
|
|
374
380
|
} catch (error) {
|
|
375
|
-
if (error instanceof
|
|
381
|
+
if (error instanceof fileStore.ModelConfigError) return { error: error.message, code: error.code };
|
|
376
382
|
return { error: error instanceof Error ? error.message : "Unknown error", code: "internal" };
|
|
377
383
|
}
|
|
378
384
|
}
|
|
@@ -10621,6 +10627,10 @@ class ApiMachineClient {
|
|
|
10621
10627
|
setCliUpdateRequestHandler(handler) {
|
|
10622
10628
|
this.rpcHandlerManager.registerHandler("cli-update-request", (params) => handler(params && typeof params === "object" ? params.version : void 0));
|
|
10623
10629
|
}
|
|
10630
|
+
/** B-719: `harness-install` — the owner asked this machine to install one harness id. */
|
|
10631
|
+
setHarnessInstallHandler(handler) {
|
|
10632
|
+
this.rpcHandlerManager.registerHandler("harness-install", (params) => handler(params));
|
|
10633
|
+
}
|
|
10624
10634
|
setCliUpdateRetryHandler(handler) {
|
|
10625
10635
|
this.rpcHandlerManager.registerHandler("cli-update-retry", (params) => handler(params && typeof params === "object" ? params.version : void 0));
|
|
10626
10636
|
}
|
|
@@ -11495,6 +11505,15 @@ class ApiMachineClient {
|
|
|
11495
11505
|
if (this.socket !== socket) return;
|
|
11496
11506
|
this.serverMigrateHandler?.(data);
|
|
11497
11507
|
});
|
|
11508
|
+
socket.on("cli-update-policy", (data) => {
|
|
11509
|
+
if (this.socket !== socket) return;
|
|
11510
|
+
this.cliUpdatePolicyHandler?.(data);
|
|
11511
|
+
});
|
|
11512
|
+
}
|
|
11513
|
+
cliUpdatePolicyHandler = null;
|
|
11514
|
+
/** B-718: the daemon decides what a policy announcement means (update/policyAnnouncement.ts). */
|
|
11515
|
+
setCliUpdatePolicyHandler(handler) {
|
|
11516
|
+
this.cliUpdatePolicyHandler = handler;
|
|
11498
11517
|
}
|
|
11499
11518
|
serverMigrateHandler = null;
|
|
11500
11519
|
/** B-635: the daemon decides what to do with a relay-migration notice (daemon/serverMigration.ts). */
|
|
@@ -11580,27 +11599,35 @@ class ApiMachineClient {
|
|
|
11580
11599
|
if (Date.now() - this.lastCliProbeAt < CLI_AVAILABILITY_RECHECK_MS) {
|
|
11581
11600
|
return;
|
|
11582
11601
|
}
|
|
11583
|
-
this.
|
|
11584
|
-
const newAvailability = detectCLI.detectCLIAvailability();
|
|
11585
|
-
const prev = this.lastKnownCLIAvailability;
|
|
11586
|
-
const newResumeSupport = localHappyAgentAuth.detectResumeSupport();
|
|
11587
|
-
const prevResume = this.lastKnownResumeSupport;
|
|
11588
|
-
const cliAvailabilityChanged = !prev || prev.claude !== newAvailability.claude || prev.codex !== newAvailability.codex || prev.gemini !== newAvailability.gemini || prev.openclaw !== newAvailability.openclaw || prev.pi !== newAvailability.pi;
|
|
11589
|
-
const resumeSupportChanged = !prevResume || prevResume.rpcAvailable !== newResumeSupport.rpcAvailable || prevResume.happyAgentAuthenticated !== newResumeSupport.happyAgentAuthenticated;
|
|
11590
|
-
if (cliAvailabilityChanged || resumeSupportChanged) {
|
|
11591
|
-
this.lastKnownCLIAvailability = newAvailability;
|
|
11592
|
-
this.lastKnownResumeSupport = newResumeSupport;
|
|
11593
|
-
this.updateMachineMetadata((metadata) => ({
|
|
11594
|
-
...metadata || {},
|
|
11595
|
-
cliAvailability: newAvailability,
|
|
11596
|
-
resumeSupport: { ...newResumeSupport, rpcAvailable: !!this.resumeSessionHandler }
|
|
11597
|
-
})).catch((err) => {
|
|
11598
|
-
logger.logger.debug("[API MACHINE] Failed to update machine capabilities:", err);
|
|
11599
|
-
});
|
|
11600
|
-
}
|
|
11602
|
+
this.recheckCliAvailability();
|
|
11601
11603
|
}, 2e4);
|
|
11602
11604
|
logger.logger.debug("[API MACHINE] Keep-alive started (20s interval)");
|
|
11603
11605
|
}
|
|
11606
|
+
/**
|
|
11607
|
+
* Re-detect CLI availability and publish it when it changed. Called on the
|
|
11608
|
+
* throttled keep-alive and, B-719, right after the owner installed a
|
|
11609
|
+
* harness so the launcher enables it without waiting up to five minutes.
|
|
11610
|
+
*/
|
|
11611
|
+
recheckCliAvailability() {
|
|
11612
|
+
this.lastCliProbeAt = Date.now();
|
|
11613
|
+
const newAvailability = detectCLI.detectCLIAvailability();
|
|
11614
|
+
const prev = this.lastKnownCLIAvailability;
|
|
11615
|
+
const newResumeSupport = localHappyAgentAuth.detectResumeSupport();
|
|
11616
|
+
const prevResume = this.lastKnownResumeSupport;
|
|
11617
|
+
const cliAvailabilityChanged = !prev || prev.claude !== newAvailability.claude || prev.codex !== newAvailability.codex || prev.gemini !== newAvailability.gemini || prev.openclaw !== newAvailability.openclaw || prev.pi !== newAvailability.pi;
|
|
11618
|
+
const resumeSupportChanged = !prevResume || prevResume.rpcAvailable !== newResumeSupport.rpcAvailable || prevResume.happyAgentAuthenticated !== newResumeSupport.happyAgentAuthenticated;
|
|
11619
|
+
if (cliAvailabilityChanged || resumeSupportChanged) {
|
|
11620
|
+
this.lastKnownCLIAvailability = newAvailability;
|
|
11621
|
+
this.lastKnownResumeSupport = newResumeSupport;
|
|
11622
|
+
this.updateMachineMetadata((metadata) => ({
|
|
11623
|
+
...metadata || {},
|
|
11624
|
+
cliAvailability: newAvailability,
|
|
11625
|
+
resumeSupport: { ...newResumeSupport, rpcAvailable: !!this.resumeSessionHandler }
|
|
11626
|
+
})).catch((err) => {
|
|
11627
|
+
logger.logger.debug("[API MACHINE] Failed to update machine capabilities:", err);
|
|
11628
|
+
});
|
|
11629
|
+
}
|
|
11630
|
+
}
|
|
11604
11631
|
bindRpcRequestHandler(socket, transport) {
|
|
11605
11632
|
socket.on("rpc-request", async (data, callback) => {
|
|
11606
11633
|
if (typeof data?.method === "string" && this.rpcHandlerManager.isPlainMethod(data.method)) {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { randomUUID } from 'node:crypto';
|
|
2
2
|
import { writeFile, rename, unlink } from 'node:fs/promises';
|
|
3
3
|
import { join, basename } from 'node:path';
|
|
4
|
-
import { M as MAX_CHAT_ATTACHMENT_SOURCE_BYTES } from './pushNotifications-
|
|
5
|
-
import { e as ensurePrivateDirectory, h as hardenPrivateFile } from './configuration-
|
|
4
|
+
import { M as MAX_CHAT_ATTACHMENT_SOURCE_BYTES } from './pushNotifications-CMmRsbKv.mjs';
|
|
5
|
+
import { e as ensurePrivateDirectory, h as hardenPrivateFile } from './configuration-YXw_Dcsb.mjs';
|
|
6
6
|
|
|
7
7
|
const CLAUDE_ATTACHMENT_KINDS = [
|
|
8
8
|
"image/jpeg",
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
var node_crypto = require('node:crypto');
|
|
4
4
|
var promises = require('node:fs/promises');
|
|
5
5
|
var path = require('node:path');
|
|
6
|
-
var pushNotifications = require('./pushNotifications-
|
|
7
|
-
var configuration = require('./configuration-
|
|
6
|
+
var pushNotifications = require('./pushNotifications-CyQVDThC.cjs');
|
|
7
|
+
var configuration = require('./configuration-B-CugKJ3.cjs');
|
|
8
8
|
|
|
9
9
|
const CLAUDE_ATTACHMENT_KINDS = [
|
|
10
10
|
"image/jpeg",
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var chalk = require('chalk');
|
|
4
|
-
var persistence = require('./persistence-
|
|
5
|
-
var auth = require('./auth-
|
|
6
|
-
var configuration = require('./configuration-
|
|
4
|
+
var persistence = require('./persistence-BdpwWXKh.cjs');
|
|
5
|
+
var auth = require('./auth-Lw_utSMV.cjs');
|
|
6
|
+
var configuration = require('./configuration-B-CugKJ3.cjs');
|
|
7
7
|
var node_fs = require('node:fs');
|
|
8
8
|
var node_readline = require('node:readline');
|
|
9
|
-
var controlClient = require('./controlClient-
|
|
10
|
-
var logger = require('./logger-
|
|
9
|
+
var controlClient = require('./controlClient-D0kGwKYx.cjs');
|
|
10
|
+
var logger = require('./logger-DK1ytCz6.cjs');
|
|
11
11
|
var os = require('node:os');
|
|
12
12
|
var authRelay = require('./authRelay-Dy1qU9td.cjs');
|
|
13
13
|
require('node:fs/promises');
|
|
@@ -15,11 +15,11 @@ require('zod');
|
|
|
15
15
|
require('node:crypto');
|
|
16
16
|
require('tweetnacl');
|
|
17
17
|
require('axios');
|
|
18
|
-
require('./time-
|
|
19
|
-
require('./browser-
|
|
18
|
+
require('./time-DNLeIRgR.cjs');
|
|
19
|
+
require('./browser-CZlA9AkO.cjs');
|
|
20
20
|
require('open');
|
|
21
21
|
require('node:path');
|
|
22
|
-
require('./package-
|
|
22
|
+
require('./package-BfeqAzyJ.cjs');
|
|
23
23
|
require('node:util');
|
|
24
24
|
|
|
25
25
|
function localMachineIdentityStatus(machineId) {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { e as encodeBase64, c as credentialRelayProblem, f as encodeBase64Url, d as decodeBase64 } from './authRelay-DhQhkBvX.mjs';
|
|
2
|
-
import { c as configuration } from './configuration-
|
|
2
|
+
import { c as configuration } from './configuration-YXw_Dcsb.mjs';
|
|
3
3
|
import { randomUUID, randomBytes } from 'node:crypto';
|
|
4
4
|
import tweetnacl from 'tweetnacl';
|
|
5
5
|
import axios from 'axios';
|
|
6
|
-
import { d as delay } from './time-
|
|
7
|
-
import { g as readCredentials, k as readSettingsOutcome, u as updateSettings, w as writeCredentialsLegacy, m as writeCredentialsDataKey } from './persistence-
|
|
8
|
-
import { o as openBrowser } from './browser-
|
|
9
|
-
import { l as logger } from './logger-
|
|
6
|
+
import { d as delay } from './time-Cfknl7xG.mjs';
|
|
7
|
+
import { g as readCredentials, k as readSettingsOutcome, u as updateSettings, w as writeCredentialsLegacy, m as writeCredentialsDataKey } from './persistence-jOEuAFTS.mjs';
|
|
8
|
+
import { o as openBrowser } from './browser-CUxGoATV.mjs';
|
|
9
|
+
import { l as logger } from './logger-DpqihN1f.mjs';
|
|
10
10
|
|
|
11
11
|
function generateWebAuthUrl(publicKey) {
|
|
12
12
|
const publicKeyBase64 = encodeBase64(publicKey, "base64url");
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import chalk from 'chalk';
|
|
2
|
-
import { g as readCredentials, r as readSettings, h as clearCredentials, i as clearMachineId } from './persistence-
|
|
3
|
-
import { a as authAndSetupMachineIfNeeded } from './auth-
|
|
4
|
-
import { c as configuration } from './configuration-
|
|
2
|
+
import { g as readCredentials, r as readSettings, h as clearCredentials, i as clearMachineId } from './persistence-jOEuAFTS.mjs';
|
|
3
|
+
import { a as authAndSetupMachineIfNeeded } from './auth-CGgpiJ5-.mjs';
|
|
4
|
+
import { c as configuration } from './configuration-YXw_Dcsb.mjs';
|
|
5
5
|
import { existsSync, rmSync } from 'node:fs';
|
|
6
6
|
import { createInterface } from 'node:readline';
|
|
7
|
-
import { a as checkIfDaemonRunningAndCleanupStaleState, s as stopDaemon } from './controlClient-
|
|
8
|
-
import { l as logger } from './logger-
|
|
7
|
+
import { a as checkIfDaemonRunningAndCleanupStaleState, s as stopDaemon } from './controlClient-BL4hb4l3.mjs';
|
|
8
|
+
import { l as logger } from './logger-DpqihN1f.mjs';
|
|
9
9
|
import os from 'node:os';
|
|
10
10
|
import { c as credentialRelayProblem } from './authRelay-DhQhkBvX.mjs';
|
|
11
11
|
import 'node:fs/promises';
|
|
@@ -13,11 +13,11 @@ import 'zod';
|
|
|
13
13
|
import 'node:crypto';
|
|
14
14
|
import 'tweetnacl';
|
|
15
15
|
import 'axios';
|
|
16
|
-
import './time-
|
|
17
|
-
import './browser-
|
|
16
|
+
import './time-Cfknl7xG.mjs';
|
|
17
|
+
import './browser-CUxGoATV.mjs';
|
|
18
18
|
import 'open';
|
|
19
19
|
import 'node:path';
|
|
20
|
-
import './package-
|
|
20
|
+
import './package-CKj8zndE.mjs';
|
|
21
21
|
import 'node:util';
|
|
22
22
|
|
|
23
23
|
function localMachineIdentityStatus(machineId) {
|