very-happy-cli 0.2.179 → 0.2.181
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-DFipFF7-.cjs → AcpBackend-CgHb_ya5.cjs} +3 -3
- package/dist/{AcpBackend-CHp3y7cb.mjs → AcpBackend-DZGCSuXF.mjs} +3 -3
- package/dist/{AcpSessionManager-0zpvRJXc.cjs → AcpSessionManager-CacC2EVn.cjs} +1 -1
- package/dist/{AcpSessionManager-d2-rKWWa.mjs → AcpSessionManager-DwuPzWBh.mjs} +1 -1
- package/dist/{BasePermissionHandler-CH3zuEkA.cjs → BasePermissionHandler-DCP8ZEB4.cjs} +1 -1
- package/dist/{BasePermissionHandler-DdZBYIR4.mjs → BasePermissionHandler-Uo-GUjbb.mjs} +1 -1
- package/dist/{acpSessionResume-DTGmAPLt.mjs → acpSessionResume-9OLTD6kT.mjs} +1 -1
- package/dist/{acpSessionResume-oiCBnAVA.cjs → acpSessionResume-BaVMD80f.cjs} +1 -1
- package/dist/{agentHome-CghLvL_1.mjs → agentHome-B1BsKeqD.mjs} +4 -4
- package/dist/{agentHome-BWcz8mz0.cjs → agentHome-BtUmGcPX.cjs} +4 -4
- package/dist/{api-Cmjfr8Z7.cjs → api-COHFAkb_.cjs} +20 -12
- package/dist/{api-CzwFpJQc.mjs → api-Dr3wXL_7.mjs} +21 -13
- package/dist/{apiMachine-DJkTEiqy.mjs → apiMachine-CHEzPQdS.mjs} +73 -32
- package/dist/{apiMachine-G6OogT08.cjs → apiMachine-D8H7CXaz.cjs} +75 -34
- package/dist/{attachmentContent-B2os4HbA.mjs → attachmentContent-1YwtKgWl.mjs} +2 -2
- package/dist/{attachmentContent-Bo0UAsSu.cjs → attachmentContent-mIhbtRKl.cjs} +2 -2
- package/dist/{auth-DMX0xPNK.mjs → auth-CbZkcMAb.mjs} +8 -8
- package/dist/{auth-D6bBUwZa.cjs → auth-CgQP7d0q.cjs} +5 -5
- package/dist/{auth-BS6PaOOG.mjs → auth-DZsthtSk.mjs} +5 -5
- package/dist/{auth-HEhRaNgL.cjs → auth-Fg8fLadK.cjs} +8 -8
- package/dist/{auto-C6I55iOh.cjs → auto-BB7kqSh5.cjs} +19 -19
- package/dist/{auto-Cl1SEDcD.mjs → auto-_T-Ud-z5.mjs} +19 -19
- package/dist/{backgroundTaskActivity-BVwJBl02.mjs → backgroundTaskActivity-8PdPxrvy.mjs} +1 -1
- package/dist/{bootstrap-iuyufnp3.mjs → bootstrap-B6EkZh4u.mjs} +2 -2
- package/dist/{bootstrap-exVucYav.cjs → bootstrap-CYtOtbi7.cjs} +2 -2
- package/dist/{browser-CSYum7xH.mjs → browser-C2qhUHSE.mjs} +1 -1
- package/dist/{browser-BohJK12g.cjs → browser-DjNNQQk2.cjs} +1 -1
- package/dist/{claudeCliPath-U4HHmV4r.cjs → claudeCliPath-GaP3UUz1.cjs} +1 -1
- package/dist/{claudeLocal-Dq_R3Ax_.mjs → claudeLocal-BAFjWhZ8.mjs} +6 -6
- package/dist/{claudeLocal-re4yjSTx.cjs → claudeLocal-O_w7-fBh.cjs} +8 -8
- package/dist/{claudeLocalLauncher-CN67lN7-.mjs → claudeLocalLauncher-CWn30LZR.mjs} +11 -11
- package/dist/{claudeLocalLauncher-B4hJHpCA.cjs → claudeLocalLauncher-Df3zg1q0.cjs} +13 -13
- package/dist/{claudeSessionFork-BihfD0Ik.mjs → claudeSessionFork-2ZkSTOGn.mjs} +1 -1
- package/dist/{claudeSessionFork-DiSMYerV.cjs → claudeSessionFork-pwcKqB-e.cjs} +1 -1
- package/dist/{client-BhoEBnuN.mjs → client-BKyU66lg.mjs} +2 -2
- package/dist/{client-BKcK1Bi-.cjs → client-CUO3ItoB.cjs} +34 -8
- package/dist/{client-wo9nbxuf.mjs → client-CXOnzuOy.mjs} +2 -2
- package/dist/{client-ZjOsn6nZ.cjs → client-DWs6k041.cjs} +2 -2
- package/dist/{client-CuVdN6PP.cjs → client-D_U2VjO3.cjs} +2 -2
- package/dist/{client-DuTDwWSQ.mjs → client-DsQcxVUV.mjs} +34 -9
- package/dist/codex/happyMcpStdioBridge.cjs +17 -17
- package/dist/codex/happyMcpStdioBridge.mjs +18 -18
- package/dist/{codexAppServerClient-Dt5zxrun.cjs → codexAppServerClient-BRX3JZ_5.cjs} +3 -3
- package/dist/{codexAppServerClient-BK3zra_1.mjs → codexAppServerClient-C3JO3pwM.mjs} +3 -3
- package/dist/{codexCommand-B6pY7CMh.mjs → codexCommand-BZIAAqKS.mjs} +59 -51
- package/dist/{codexCommand-CAZ1SLjg.cjs → codexCommand-dKOc5iQl.cjs} +85 -77
- package/dist/{codexTermination-DmGbHxcD.cjs → codexTermination-BVR9HeVI.cjs} +7 -2
- package/dist/{codexTermination-Cd1Eon_4.mjs → codexTermination-ztFkwHrG.mjs} +7 -2
- package/dist/{config-2oMG_fEI.mjs → config-NbHjx8ge.mjs} +3 -3
- package/dist/{config-B0uK6K7n.cjs → config-cftYxLC7.cjs} +26 -26
- package/dist/{configuration-WMi4idBB.mjs → configuration-BPrfb17M.mjs} +1 -1
- package/dist/{configuration-CMHZnp6G.cjs → configuration-C8JgseHy.cjs} +1 -1
- package/dist/{connect-uaglGrde.cjs → connect-Br8VMrK1.cjs} +27 -27
- package/dist/{connect-BLVHhHzA.mjs → connect-CLD1ai0k.mjs} +14 -14
- package/dist/{context-DXzU5bFM.cjs → context-D1lgQTJC.cjs} +1 -1
- package/dist/{context-DploEcoN.mjs → context-_YGq8xdH.mjs} +1 -1
- package/dist/{controlClient-BWUJrj3t.mjs → controlClient-CkNpT5zS.mjs} +4 -4
- package/dist/{controlClient-C-5qCt8W.cjs → controlClient-D68Zj7Q-.cjs} +3 -3
- package/dist/{createSessionMetadata-3uXrJgOW.mjs → createSessionMetadata-3WAj3_xl.mjs} +2 -2
- package/dist/{createSessionMetadata-BkIzHALd.cjs → createSessionMetadata-DNIbKLHg.cjs} +3 -3
- package/dist/{defaultPermissionMode-pS3vmiSg.cjs → defaultPermissionMode-BmvjP32v.cjs} +2 -2
- package/dist/{defaultPermissionMode-BzxLh20a.mjs → defaultPermissionMode-DXMznl8v.mjs} +2 -2
- package/dist/{detectCLI-DR9ZaN6B.cjs → detectCLI-BuYR_Qxe.cjs} +4 -4
- package/dist/{deterministicJson-B8z2GPi9.cjs → deterministicJson-BS7D7URE.cjs} +89 -24
- package/dist/{deterministicJson-D_whDMFd.mjs → deterministicJson-BcBIKKf1.mjs} +87 -24
- package/dist/{doctor-Br1Kcy2J.cjs → doctor-Be7zC0AF.cjs} +10 -9
- package/dist/{doctor-CmtSsR2-.mjs → doctor-CoOaPq6w.mjs} +8 -8
- package/dist/{doctorReadiness-BCZGcN0a.cjs → doctorReadiness-Dl6yRQCy.cjs} +1 -1
- package/dist/{downloadTarget-BoNwTIH_.mjs → downloadTarget-CeaAXdJj.mjs} +6 -6
- package/dist/{downloadTarget-BQJK_6oH.cjs → downloadTarget-LyOiucn_.cjs} +6 -6
- package/dist/{ensureDaemonRunning-Czo9IHJQ.mjs → ensureDaemonRunning--98j7-17.mjs} +5 -5
- package/dist/{ensureDaemonRunning-BRUmsq6J.cjs → ensureDaemonRunning-B8z37VKD.cjs} +6 -6
- package/dist/fileStore-5qpetZS0.mjs +146 -0
- package/dist/fileStore-7qhnbs6N.cjs +152 -0
- package/dist/{handleResumeCommand-tKD_Hpxc.cjs → handleResumeCommand-BFZlrFVH.cjs} +7 -7
- package/dist/{handleResumeCommand-C8thKjqf.mjs → handleResumeCommand-gO8I4keP.mjs} +6 -6
- package/dist/{index-DMqDMT1Q.cjs → index-B5PXbZjW.cjs} +80 -62
- package/dist/{index-D09T1m8Y.cjs → index-BRMq9gOe.cjs} +3 -3
- package/dist/{index-B0UjHlAe.cjs → index-BkluinoS.cjs} +4 -4
- package/dist/{index-CdQI0C9p.mjs → index-CO0n9ue6.mjs} +4 -4
- package/dist/{index-DPOa4NhL.mjs → index-CeRXrGnH.mjs} +41 -6
- package/dist/{index-C6O2vVjm.cjs → index-Df2eHm3O.cjs} +42 -6
- package/dist/{index-BTxHphpV.mjs → index-DneHoQXf.mjs} +80 -62
- package/dist/{index-BiyC7cZ3.mjs → index-WUj3954m.mjs} +4 -4
- package/dist/{index-D3bidoG8.mjs → index-hQ8LP1C2.mjs} +3 -3
- package/dist/{index-CUuc6iCn.cjs → index-jF2t3ACW.cjs} +4 -4
- package/dist/index.cjs +2 -2
- package/dist/index.mjs +2 -2
- package/dist/{install-BX3lv3NO.mjs → install-D0inLCv-.mjs} +1 -1
- package/dist/{install-BXvf2E3o.cjs → install-D2NCbeJ-.cjs} +1 -1
- package/dist/{install-hnve_9vq.mjs → install-DkYFiVK4.mjs} +3 -3
- package/dist/{install-CYRZxS87.cjs → install-FqkSUjPC.cjs} +7 -7
- package/dist/{installPiTools-BKnXjrVu.cjs → installPiTools-CL_axh_6.cjs} +1 -1
- package/dist/{installTerminalHooks-BQZbvxsZ.cjs → installTerminalHooks-BETLKAtd.cjs} +3 -3
- package/dist/lib.cjs +13 -13
- package/dist/lib.d.cts +216 -2
- package/dist/lib.d.mts +216 -2
- package/dist/lib.mjs +13 -13
- package/dist/{lidState-Bb8fgXg3.mjs → lidState-DghbfRbr.mjs} +1 -1
- package/dist/{lidState-Dv2wwFTj.cjs → lidState-x8cJ8J_9.cjs} +1 -1
- package/dist/{localHappyAgentAuth-DjYvkXvV.cjs → localHappyAgentAuth-DZ2kb9uq.cjs} +1 -1
- package/dist/{localHappyAgentAuth-NEU7fax7.mjs → localHappyAgentAuth-IKmeRpuQ.mjs} +1 -1
- package/dist/{logger-C1GWx3gi.cjs → logger-DgBwUSgS.cjs} +2 -2
- package/dist/{logger-BtVhHnD8.mjs → logger-LFr8iPgl.mjs} +2 -2
- package/dist/machineMetadata-BglCsfvf.mjs +75 -0
- package/dist/machineMetadata-DB03ez4K.cjs +87 -0
- package/dist/{main-CWhSsbtU.cjs → main-YQ-Vkakw.cjs} +99 -132
- package/dist/{main-B2LWV8DI.mjs → main-_1LSzlLv.mjs} +93 -126
- package/dist/{mcp-CARUsXHV.cjs → mcp-BIY80jSc.cjs} +15 -15
- package/dist/{mcp-ext92q3Y.mjs → mcp-Csj-mT5Y.mjs} +15 -15
- package/dist/{mirrorProtocol-DEy2g1CB.cjs → mirrorProtocol-BphKIAK9.cjs} +15 -6
- package/dist/{mirrorProtocol-BwYibqry.mjs → mirrorProtocol-CAxOMBkb.mjs} +15 -6
- package/dist/{package-BPPebGQF.mjs → package-DYGwlmXl.mjs} +9 -8
- package/dist/{package-SgqTYsjn.cjs → package-NoD8QOOM.cjs} +9 -8
- package/dist/{panels-BZ0_Tt7B.mjs → panels-B8zRm7_d.mjs} +5 -5
- package/dist/{panels-D1c7q2dD.cjs → panels-DYEc1NyQ.cjs} +5 -5
- package/dist/{peerTools-CWKzcQ7u.mjs → peerTools-CK3JYu1k.mjs} +5 -5
- package/dist/{peerTools-DRQETXaz.cjs → peerTools-CP-x-Peu.cjs} +5 -5
- package/dist/{persistence-BegE7NPa.cjs → persistence-BY-D00wT.cjs} +2 -2
- package/dist/{persistence-Cr-wutZ4.mjs → persistence-D2Djrf7t.mjs} +2 -2
- package/dist/pi-CqyoZMjI.mjs +380 -0
- package/dist/pi-DlsrPCTa.cjs +400 -0
- package/dist/{piRunnerArgs-DwvM_yWA.mjs → piRunnerArgs-IZLoL7TG.mjs} +1 -1
- package/dist/{piRunnerArgs-Cs-378Vz.cjs → piRunnerArgs-gxLYIZH4.cjs} +1 -1
- package/dist/{piRuntime-Bue5mnlc.mjs → piRuntime-D7Y4oHVL.mjs} +2 -2
- package/dist/{piRuntime-BG-1td_n.cjs → piRuntime-o5L8uX-W.cjs} +2 -2
- package/dist/{piTerminal-G4z-xVyy.cjs → piTerminal-C_-JDkLN.cjs} +18 -18
- package/dist/{piTerminal-B5x9X5yV.mjs → piTerminal-Kphx8Uhw.mjs} +18 -18
- package/dist/projectPath-C3ioB4Bu.cjs +13 -0
- package/dist/{prompt-lgF9IE82.cjs → prompt-Bof2aQkI.cjs} +7 -2
- package/dist/{prompt-BOouDaTM.mjs → prompt-QHuFx9j6.mjs} +7 -2
- package/dist/{pushNotifications-DaLQUyi0.cjs → pushNotifications-BXoOSq_G.cjs} +14 -4
- package/dist/{pushNotifications-BdFjDjQe.mjs → pushNotifications-DXGIhE-A.mjs} +14 -4
- package/dist/{query-DYP_W1wp.mjs → query-CcA6DVZK.mjs} +1 -1
- package/dist/{query-Ctfg-5gy.cjs → query-CdCxzuaB.cjs} +1 -1
- package/dist/{rateLimitWindows-Dj_8voBK.cjs → rateLimitWindows-OpAmdOtC.cjs} +1 -1
- package/dist/{rateLimitWindows-CuEqk_0g.mjs → rateLimitWindows-ZtHZHe-l.mjs} +1 -1
- package/dist/{registerCommonHandlers-Cj084Sg7.cjs → registerCommonHandlers-CRjBoJLK.cjs} +30 -30
- package/dist/{registerCommonHandlers-BAlP7SGc.mjs → registerCommonHandlers-DF6bdDtd.mjs} +2 -2
- package/dist/{registerKillSessionHandler-qMju0ZfF.cjs → registerKillSessionHandler-7fOm6ooh.cjs} +6 -6
- package/dist/{registerKillSessionHandler-PD0jWtQo.mjs → registerKillSessionHandler-DDCKL3wf.mjs} +6 -6
- package/dist/{remoteSessionClient-Bn2qu5C5.mjs → remoteSessionClient-B2POSKFT.mjs} +5 -5
- package/dist/{remoteSessionClient-B7i7MkYV.cjs → remoteSessionClient-CFCn42bs.cjs} +5 -5
- package/dist/{reportProgressTool-gHItlSzz.mjs → reportProgressTool-tPxEvh6x.mjs} +4 -4
- package/dist/{reportProgressTool-CM1JFAHg.cjs → reportProgressTool-th4trcET.cjs} +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-CNXwIe0A.cjs → run-C_FumCQk.cjs} +2767 -183
- package/dist/{run-BM4TxiyN.mjs → run-cKQBbVi4.mjs} +2762 -178
- package/dist/{runClaude-C_3I8hvR.mjs → runClaude-CYnM6krL.mjs} +34 -28
- package/dist/{runClaude-CWhj2V4Q.cjs → runClaude-z_2YC_aa.cjs} +35 -29
- package/dist/{runClaudeDeps-B81cOKnH.cjs → runClaudeDeps-CLubzWnA.cjs} +59 -122
- package/dist/{runClaudeDeps-QGrOeDe2.mjs → runClaudeDeps-duS06Pb4.mjs} +52 -114
- package/dist/{runGemini-BEdWEZLR.mjs → runGemini-C_Pc2EhH.mjs} +39 -37
- package/dist/{runGemini-CgRLYbt5.cjs → runGemini-vEoXV6qT.cjs} +67 -65
- package/dist/{runOpenClaw-C1NVmzOL.cjs → runOpenClaw-CXJCtMgB.cjs} +20 -20
- package/dist/{runOpenClaw-DdQZAYj1.mjs → runOpenClaw-Cxun1qLC.mjs} +19 -19
- package/dist/{sandbox-nocIjliq.cjs → sandbox-CO46H2tK.cjs} +4 -4
- package/dist/{sandbox-DjQUdCMG.mjs → sandbox-CsvPnTmz.mjs} +4 -4
- package/dist/{selfCheck-DCt4Uzbq.cjs → selfCheck-DIr7Gc0i.cjs} +39 -39
- package/dist/selfCheck-NamtBHVB.mjs +85 -0
- package/dist/{send-Ct7X4pPU.mjs → send-DMoFg6F1.mjs} +9 -9
- package/dist/{send-Dydf_hwZ.cjs → send-X2mfVEyr.cjs} +8 -8
- package/dist/{server-CosABFbd.cjs → server-BwTEdbkr.cjs} +6 -6
- package/dist/{server-DTQGZMxh.mjs → server-CkqQ0sRH.mjs} +4 -4
- package/dist/sessionExitLifecycle-CzkLIgNZ.mjs +142 -0
- package/dist/sessionExitLifecycle-DFltxXU8.cjs +148 -0
- package/dist/{sessionLock-DokGab2R.cjs → sessionLock-CdIRJlHH.cjs} +25 -5
- package/dist/{sessionLock-WYIyaVO4.mjs → sessionLock-JIfwCqMk.mjs} +24 -5
- package/dist/{sessionOps-S-qPBLFf.cjs → sessionOps-DVA-00nR.cjs} +4 -4
- package/dist/{sessionOps-BIGgRube.mjs → sessionOps-DqlftXxe.mjs} +5 -5
- package/dist/{sessionScanner-o5hnMi5e.mjs → sessionScanner-BI0Vo1xT.mjs} +3 -3
- package/dist/{sessionScanner-CIMM2hvZ.cjs → sessionScanner-BMwgGAhY.cjs} +3 -3
- package/dist/{sessions-BJHEZpi2.mjs → sessions-D6IimX7b.mjs} +11 -11
- package/dist/{sessions-JchI1w3z.cjs → sessions-DjgEcHaT.cjs} +10 -10
- package/dist/{setupOfflineReconnection-CNiAt5ZP.cjs → setupOfflineReconnection-CjuCiKY3.cjs} +2 -2
- package/dist/{setupOfflineReconnection-DMiBO2y9.mjs → setupOfflineReconnection-DgJK_4m1.mjs} +2 -2
- package/dist/{spawn-DgvUNYEo.mjs → spawn-Dvzy-tzc.mjs} +15 -15
- package/dist/{spawn-6PD7nnoC.cjs → spawn-rhF28shY.cjs} +15 -15
- package/dist/{spawnAgents-P006Hqio.mjs → spawnAgents-CCnlq-FI.mjs} +1 -1
- package/dist/{spawnAgents-DsXgegHM.cjs → spawnAgents-iwuqrgR9.cjs} +1 -1
- package/dist/{spawnHappyCLI-Dywezwk6.cjs → spawnHappyCLI-DnKmIsEt.cjs} +2 -2
- package/dist/{spawnHappyCLI-CCOrEtf9.mjs → spawnHappyCLI-Dq3LLXLb.mjs} +1 -1
- package/dist/{specialCommands-DPcd9edP.mjs → specialCommands-CcyZ1hGA.mjs} +3 -3
- package/dist/{specialCommands-QxPpkGKf.cjs → specialCommands-Zwr2C6A2.cjs} +3 -3
- package/dist/{startFileWatcher-DghDOCO4.mjs → startFileWatcher-4thXDK9d.mjs} +1 -1
- package/dist/{startFileWatcher-RECH5qY8.cjs → startFileWatcher-K6hJSyiR.cjs} +1 -1
- package/dist/startupSessionCreate-BfByJ16A.mjs +24 -0
- package/dist/startupSessionCreate-CKEbq0tL.cjs +26 -0
- package/dist/{streamRelay-DlUWKUpo.cjs → streamRelay-Gy8Xfnon.cjs} +1 -1
- package/dist/{streamRelay-DMV_TXfS.mjs → streamRelay-LcDvyEjK.mjs} +1 -1
- package/dist/{sync-D23jbqVa.cjs → sync-1hQ5KHpL.cjs} +1 -1
- package/dist/{sync-CSe0Rf45.mjs → sync-DO-2PU45.mjs} +1 -1
- package/dist/{systemPrompt-CFNKnh65.mjs → systemPrompt-BctLfMZs.mjs} +3 -3
- package/dist/{systemPrompt-BOy4kU4P.cjs → systemPrompt-Dj7pgkMK.cjs} +3 -3
- package/dist/{teams-DyY669f0.mjs → teams-Bu8YeOoF.mjs} +8 -8
- package/dist/{teams-Ov2BDT-A.cjs → teams-uQxUlyyz.cjs} +8 -8
- package/dist/{time-65DcU6Jx.mjs → time-BcoJaG8E.mjs} +1 -1
- package/dist/{time-CrwIMHta.cjs → time-nqa9shu8.cjs} +1 -1
- package/dist/{titleGenerator-CS_rh2_J.cjs → titleGenerator-D09XyYYG.cjs} +3 -3
- package/dist/{titleGenerator-CiAMxf7s.mjs → titleGenerator-D5r06bhf.mjs} +1 -1
- package/dist/{todo-KY-okGii.cjs → todo-CCOnL7pT.cjs} +6 -6
- package/dist/{todo-BDONw0sK.mjs → todo-D1q8146q.mjs} +6 -6
- package/dist/{tools-D8-PnZEG.mjs → tools-D2E--n1x.mjs} +3 -3
- package/dist/{tools-_w52DZG6.cjs → tools-DiCXnAC5.cjs} +3 -3
- package/dist/{uninstall-8vnLN-IE.cjs → uninstall-BrNwwwSD.cjs} +6 -6
- package/dist/{uninstall-_fjGRP9b.mjs → uninstall-CtwXi1Rt.mjs} +3 -3
- package/package.json +9 -8
- package/dist/machineMetadata-CLHS9sv_.cjs +0 -42
- package/dist/machineMetadata-D-g--oU_.mjs +0 -39
- package/dist/messageBuffer-BWlGgR3A.mjs +0 -71
- package/dist/messageBuffer-fJMH6uY8.cjs +0 -73
- package/dist/projectPath-ChLhdOyt.cjs +0 -13
- package/dist/selfCheck-CjCF4C3v.mjs +0 -85
|
@@ -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-DgBwUSgS.cjs');
|
|
7
|
+
var time = require('./time-nqa9shu8.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-NoD8QOOM.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,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-LFr8iPgl.mjs';
|
|
5
|
+
import { d as delay } from './time-BcoJaG8E.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-DYGwlmXl.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) => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createId } from '@paralleldrive/cuid2';
|
|
2
|
-
import { s as streamKeyOf, d as createEnvelope } from './index-
|
|
2
|
+
import { s as streamKeyOf, d as createEnvelope } from './index-CeRXrGnH.mjs';
|
|
3
3
|
|
|
4
4
|
function turnOptions(turnId, time) {
|
|
5
5
|
return turnId ? { turn: turnId, time } : { time };
|
|
@@ -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-BPrfb17M.mjs';
|
|
4
4
|
|
|
5
5
|
const SESSION_MODE_DIR = "session-modes";
|
|
6
6
|
const ACP_PERMISSION_MODES = ["default", "acceptEdits", "plan", "bypassPermissions"];
|
|
@@ -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-C8JgseHy.cjs');
|
|
6
6
|
|
|
7
7
|
const SESSION_MODE_DIR = "session-modes";
|
|
8
8
|
const ACP_PERMISSION_MODES = ["default", "acceptEdits", "plan", "bypassPermissions"];
|
|
@@ -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-D2Djrf7t.mjs';
|
|
4
4
|
import 'node:fs';
|
|
5
|
-
import './logger-
|
|
5
|
+
import './logger-LFr8iPgl.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-BPrfb17M.mjs';
|
|
9
9
|
import 'node:path';
|
|
10
|
-
import './package-
|
|
10
|
+
import './package-DYGwlmXl.mjs';
|
|
11
11
|
import 'zod';
|
|
12
12
|
import './authRelay-DhQhkBvX.mjs';
|
|
13
13
|
import 'node:crypto';
|
|
@@ -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-BY-D00wT.cjs');
|
|
6
6
|
require('node:fs');
|
|
7
|
-
require('./logger-
|
|
7
|
+
require('./logger-DgBwUSgS.cjs');
|
|
8
8
|
var loginShellEnv = require('./loginShellEnv-BkuYtExZ.cjs');
|
|
9
9
|
require('node:fs/promises');
|
|
10
|
-
require('./configuration-
|
|
10
|
+
require('./configuration-C8JgseHy.cjs');
|
|
11
11
|
require('node:path');
|
|
12
|
-
require('./package-
|
|
12
|
+
require('./package-NoD8QOOM.cjs');
|
|
13
13
|
require('zod');
|
|
14
14
|
require('./authRelay-Dy1qU9td.cjs');
|
|
15
15
|
require('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-DgBwUSgS.cjs');
|
|
5
|
+
var lidState = require('./lidState-x8cJ8J_9.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-BXoOSq_G.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-nqa9shu8.cjs');
|
|
12
|
+
var configuration = require('./configuration-C8JgseHy.cjs');
|
|
13
13
|
var node_crypto = require('node:crypto');
|
|
14
|
-
var index = require('./index-
|
|
15
|
-
var registerCommonHandlers = require('./registerCommonHandlers-
|
|
14
|
+
var index = require('./index-Df2eHm3O.cjs');
|
|
15
|
+
var registerCommonHandlers = require('./registerCommonHandlers-CRjBoJLK.cjs');
|
|
16
16
|
var cuid2 = require('@paralleldrive/cuid2');
|
|
17
|
-
var sync = require('./sync-
|
|
17
|
+
var sync = require('./sync-1hQ5KHpL.cjs');
|
|
18
18
|
var backgroundTaskActivity = require('./backgroundTaskActivity-CBvUdj39.cjs');
|
|
19
|
-
var controlClient = require('./controlClient-
|
|
19
|
+
var controlClient = require('./controlClient-D68Zj7Q-.cjs');
|
|
20
20
|
var chalk = require('chalk');
|
|
21
21
|
|
|
22
22
|
async function hmac_sha512(key, data) {
|
|
@@ -882,6 +882,7 @@ function isQueuedUserText(body) {
|
|
|
882
882
|
return record.role === "user" && record.content?.type === "text" && typeof record.meta?.queuedAt === "number";
|
|
883
883
|
}
|
|
884
884
|
function scanUndeliveredQueuedInputs(records, prior) {
|
|
885
|
+
const replayAboveSeq = prior?.replayAboveSeq;
|
|
885
886
|
const canceled = prior?.canceled ?? /* @__PURE__ */ new Set();
|
|
886
887
|
const undelivered = [];
|
|
887
888
|
let reachedBoundary = false;
|
|
@@ -900,6 +901,7 @@ function scanUndeliveredQueuedInputs(records, prior) {
|
|
|
900
901
|
}
|
|
901
902
|
continue;
|
|
902
903
|
}
|
|
904
|
+
if (replayAboveSeq !== void 0 && record.seq > replayAboveSeq) continue;
|
|
903
905
|
if (isQueuedUserText(record.body) && record.localId && !canceled.has(record.localId)) {
|
|
904
906
|
undelivered.push(record.localId);
|
|
905
907
|
}
|
|
@@ -1874,7 +1876,7 @@ class ApiSessionClient extends node_events.EventEmitter {
|
|
|
1874
1876
|
* session down. Needs no socket; POSTs through the same session-message
|
|
1875
1877
|
* channel so the web receives it identically to a cancel-button tombstone.
|
|
1876
1878
|
*/
|
|
1877
|
-
async cancelUndeliveredQueuedInputs() {
|
|
1879
|
+
async cancelUndeliveredQueuedInputs(opts) {
|
|
1878
1880
|
const MAX_SCAN_PAGES = 10;
|
|
1879
1881
|
const canceled = /* @__PURE__ */ new Set();
|
|
1880
1882
|
const undelivered = [];
|
|
@@ -1903,7 +1905,7 @@ class ApiSessionClient extends node_events.EventEmitter {
|
|
|
1903
1905
|
}
|
|
1904
1906
|
return { seq: message.seq, localId: message.localId, body };
|
|
1905
1907
|
});
|
|
1906
|
-
const scan = scanUndeliveredQueuedInputs(records, { canceled });
|
|
1908
|
+
const scan = scanUndeliveredQueuedInputs(records, { canceled, replayAboveSeq: opts?.maxSeq });
|
|
1907
1909
|
for (const key of scan.canceled) canceled.add(key);
|
|
1908
1910
|
undelivered.push(...scan.undeliveredLocalKeys);
|
|
1909
1911
|
reachedBoundary = scan.reachedBoundary;
|
|
@@ -2557,6 +2559,12 @@ class OfflineState {
|
|
|
2557
2559
|
isOffline() {
|
|
2558
2560
|
return this.state === "offline";
|
|
2559
2561
|
}
|
|
2562
|
+
/** B-689: one-line cause of the last failure of `operation` (for exit reasons). */
|
|
2563
|
+
describe(operation) {
|
|
2564
|
+
const f = this.failures.get(operation);
|
|
2565
|
+
if (!f) return void 0;
|
|
2566
|
+
return f.errorCode ? `${f.errorCode} - ${ERROR_DESCRIPTIONS[f.errorCode] || "unknown error"}` : "unknown error";
|
|
2567
|
+
}
|
|
2560
2568
|
/** Reset for testing - clears all state */
|
|
2561
2569
|
reset() {
|
|
2562
2570
|
this.state = "online";
|
|
@@ -2941,7 +2949,7 @@ class ApiClient {
|
|
|
2941
2949
|
return new ApiSessionClient(this.credential.token, session, opts);
|
|
2942
2950
|
}
|
|
2943
2951
|
async machineSyncClient(machine) {
|
|
2944
|
-
const { ApiMachineClient } = await Promise.resolve().then(function () { return require('./apiMachine-
|
|
2952
|
+
const { ApiMachineClient } = await Promise.resolve().then(function () { return require('./apiMachine-D8H7CXaz.cjs'); });
|
|
2945
2953
|
return new ApiMachineClient(this.credential.token, machine);
|
|
2946
2954
|
}
|
|
2947
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-LFr8iPgl.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-DghbfRbr.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-DXGIhE-A.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-BcoJaG8E.mjs';
|
|
10
|
+
import { c as configuration } from './configuration-BPrfb17M.mjs';
|
|
11
11
|
import { createHmac, randomUUID } from 'node:crypto';
|
|
12
|
-
import { d as createEnvelope, s as streamKeyOf, R as ReleaseDrainNoticeSchema, t as RelayAssignmentResponseSchema } from './index-
|
|
13
|
-
import { r as registerCommonHandlers } from './registerCommonHandlers-
|
|
12
|
+
import { d as createEnvelope, s as streamKeyOf, R as ReleaseDrainNoticeSchema, t as RelayAssignmentResponseSchema } from './index-CeRXrGnH.mjs';
|
|
13
|
+
import { r as registerCommonHandlers } from './registerCommonHandlers-DF6bdDtd.mjs';
|
|
14
14
|
import { createId } from '@paralleldrive/cuid2';
|
|
15
|
-
import { I as InvalidateSync } from './sync-
|
|
16
|
-
import { B as BackgroundTaskReporter } from './backgroundTaskActivity-
|
|
17
|
-
import { k as notifyDaemonTurnEvent, m as notifyDaemonBackgroundTasks } from './controlClient-
|
|
15
|
+
import { I as InvalidateSync } from './sync-DO-2PU45.mjs';
|
|
16
|
+
import { B as BackgroundTaskReporter } from './backgroundTaskActivity-8PdPxrvy.mjs';
|
|
17
|
+
import { k as notifyDaemonTurnEvent, m as notifyDaemonBackgroundTasks } from './controlClient-CkNpT5zS.mjs';
|
|
18
18
|
import chalk from 'chalk';
|
|
19
19
|
|
|
20
20
|
async function hmac_sha512(key, data) {
|
|
@@ -880,6 +880,7 @@ function isQueuedUserText(body) {
|
|
|
880
880
|
return record.role === "user" && record.content?.type === "text" && typeof record.meta?.queuedAt === "number";
|
|
881
881
|
}
|
|
882
882
|
function scanUndeliveredQueuedInputs(records, prior) {
|
|
883
|
+
const replayAboveSeq = prior?.replayAboveSeq;
|
|
883
884
|
const canceled = prior?.canceled ?? /* @__PURE__ */ new Set();
|
|
884
885
|
const undelivered = [];
|
|
885
886
|
let reachedBoundary = false;
|
|
@@ -898,6 +899,7 @@ function scanUndeliveredQueuedInputs(records, prior) {
|
|
|
898
899
|
}
|
|
899
900
|
continue;
|
|
900
901
|
}
|
|
902
|
+
if (replayAboveSeq !== void 0 && record.seq > replayAboveSeq) continue;
|
|
901
903
|
if (isQueuedUserText(record.body) && record.localId && !canceled.has(record.localId)) {
|
|
902
904
|
undelivered.push(record.localId);
|
|
903
905
|
}
|
|
@@ -1872,7 +1874,7 @@ class ApiSessionClient extends EventEmitter {
|
|
|
1872
1874
|
* session down. Needs no socket; POSTs through the same session-message
|
|
1873
1875
|
* channel so the web receives it identically to a cancel-button tombstone.
|
|
1874
1876
|
*/
|
|
1875
|
-
async cancelUndeliveredQueuedInputs() {
|
|
1877
|
+
async cancelUndeliveredQueuedInputs(opts) {
|
|
1876
1878
|
const MAX_SCAN_PAGES = 10;
|
|
1877
1879
|
const canceled = /* @__PURE__ */ new Set();
|
|
1878
1880
|
const undelivered = [];
|
|
@@ -1901,7 +1903,7 @@ class ApiSessionClient extends EventEmitter {
|
|
|
1901
1903
|
}
|
|
1902
1904
|
return { seq: message.seq, localId: message.localId, body };
|
|
1903
1905
|
});
|
|
1904
|
-
const scan = scanUndeliveredQueuedInputs(records, { canceled });
|
|
1906
|
+
const scan = scanUndeliveredQueuedInputs(records, { canceled, replayAboveSeq: opts?.maxSeq });
|
|
1905
1907
|
for (const key of scan.canceled) canceled.add(key);
|
|
1906
1908
|
undelivered.push(...scan.undeliveredLocalKeys);
|
|
1907
1909
|
reachedBoundary = scan.reachedBoundary;
|
|
@@ -2555,6 +2557,12 @@ class OfflineState {
|
|
|
2555
2557
|
isOffline() {
|
|
2556
2558
|
return this.state === "offline";
|
|
2557
2559
|
}
|
|
2560
|
+
/** B-689: one-line cause of the last failure of `operation` (for exit reasons). */
|
|
2561
|
+
describe(operation) {
|
|
2562
|
+
const f = this.failures.get(operation);
|
|
2563
|
+
if (!f) return void 0;
|
|
2564
|
+
return f.errorCode ? `${f.errorCode} - ${ERROR_DESCRIPTIONS[f.errorCode] || "unknown error"}` : "unknown error";
|
|
2565
|
+
}
|
|
2558
2566
|
/** Reset for testing - clears all state */
|
|
2559
2567
|
reset() {
|
|
2560
2568
|
this.state = "online";
|
|
@@ -2939,7 +2947,7 @@ class ApiClient {
|
|
|
2939
2947
|
return new ApiSessionClient(this.credential.token, session, opts);
|
|
2940
2948
|
}
|
|
2941
2949
|
async machineSyncClient(machine) {
|
|
2942
|
-
const { ApiMachineClient } = await import('./apiMachine-
|
|
2950
|
+
const { ApiMachineClient } = await import('./apiMachine-CHEzPQdS.mjs');
|
|
2943
2951
|
return new ApiMachineClient(this.credential.token, machine);
|
|
2944
2952
|
}
|
|
2945
2953
|
push() {
|
|
@@ -1,42 +1,43 @@
|
|
|
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 { 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-
|
|
6
|
-
import { c as configuration } from './configuration-
|
|
3
|
+
import { l as logger } from './logger-LFr8iPgl.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-DghbfRbr.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-CAxOMBkb.mjs';
|
|
6
|
+
import { c as configuration } from './configuration-BPrfb17M.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-DF6bdDtd.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
12
|
import { spawn, execFile, spawnSync } from 'node:child_process';
|
|
13
|
-
import { r as readSettings, c as readPersistedSessions, o as readTrackedClaudeSessionIds, p as readTrackedCodexThreadIds } from './persistence-
|
|
13
|
+
import { r as readSettings, c as readPersistedSessions, o as readTrackedClaudeSessionIds, p as readTrackedCodexThreadIds } from './persistence-D2Djrf7t.mjs';
|
|
14
|
+
import { M as ModelConfigError } from './fileStore-5qpetZS0.mjs';
|
|
14
15
|
import { e as encodeBase64, g as encrypt, h as decrypt, d as decodeBase64 } from './authRelay-DhQhkBvX.mjs';
|
|
15
16
|
import { p as prepareClipboardText, d as prepareClipboardHistoryText } from './limits-DIo7rEBR.mjs';
|
|
16
|
-
import { b as backoff, d as delay } from './time-
|
|
17
|
+
import { b as backoff, d as delay } from './time-BcoJaG8E.mjs';
|
|
17
18
|
import * as pty from 'node-pty';
|
|
18
19
|
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
20
|
import { t as tmuxArgs, V as VH_TMUX_SOCKET_ENV, a as scrubTmuxClientEnv } from './tmuxSocket-B8Yx20sT.mjs';
|
|
20
|
-
import { locateClaudeConversation, refreshAgentHomes } from './index-
|
|
21
|
+
import { locateClaudeConversation, refreshAgentHomes } from './index-CO0n9ue6.mjs';
|
|
21
22
|
import { randomBytes } from 'node:crypto';
|
|
22
23
|
import { readdirSync, unlinkSync, existsSync, mkdirSync, writeFileSync, readFileSync, statSync, chmodSync, renameSync, rmSync, accessSync, constants } from 'node:fs';
|
|
23
24
|
import axios from 'axios';
|
|
24
25
|
import { p as projectPath } from './projectPath-BTBIMB57.mjs';
|
|
25
26
|
import { a as isValidTerminalId } from './ids-DU6sLx4C.mjs';
|
|
26
27
|
import { d as detectCLIAvailability } from './detectCLI-CSGMlV51.mjs';
|
|
27
|
-
import { d as detectResumeSupport } from './localHappyAgentAuth-
|
|
28
|
+
import { d as detectResumeSupport } from './localHappyAgentAuth-IKmeRpuQ.mjs';
|
|
28
29
|
import { g as getProjectPath, a as getClaudeProjectsRoot } from './path-D2wdaNSk.mjs';
|
|
29
30
|
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 {
|
|
31
|
+
import { f as forkSession, F as ForkSourceMissingError, d as discardForkedSession, l as listClaudeRewindPoints, a as forkAndTruncateSession, b as ForkTruncateUuidNotFoundError, c as forkBeforeUserMessage } from './claudeSessionFork-2ZkSTOGn.mjs';
|
|
32
|
+
import { C as CodexAppServerClient } from './codexAppServerClient-C3JO3pwM.mjs';
|
|
33
|
+
import { u as RelayCandidatesResponseSchema, t as RelayAssignmentResponseSchema, R as ReleaseDrainNoticeSchema } from './index-CeRXrGnH.mjs';
|
|
33
34
|
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-
|
|
35
|
+
import { p as planRateLimitWrite, m as mergeRateLimitReports } from './rateLimitWindows-ZtHZHe-l.mjs';
|
|
35
36
|
import 'chalk';
|
|
36
37
|
import 'node:util';
|
|
37
38
|
import 'os';
|
|
38
39
|
import 'child_process';
|
|
39
|
-
import './package-
|
|
40
|
+
import './package-DYGwlmXl.mjs';
|
|
40
41
|
import 'util';
|
|
41
42
|
import 'fs/promises';
|
|
42
43
|
import 'crypto';
|
|
@@ -346,6 +347,21 @@ function registerTodoHandlers(manager) {
|
|
|
346
347
|
});
|
|
347
348
|
}
|
|
348
349
|
|
|
350
|
+
const obj = (value) => value && typeof value === "object" ? value : {};
|
|
351
|
+
async function guarded(fn) {
|
|
352
|
+
try {
|
|
353
|
+
return await fn();
|
|
354
|
+
} catch (error) {
|
|
355
|
+
if (error instanceof ModelConfigError) return { error: error.message, code: error.code };
|
|
356
|
+
return { error: error instanceof Error ? error.message : "Unknown error", code: "internal" };
|
|
357
|
+
}
|
|
358
|
+
}
|
|
359
|
+
function registerModelConfigHandlers(rpc, service) {
|
|
360
|
+
rpc.registerHandler("model-config-read", (params) => guarded(() => service.read(obj(params))));
|
|
361
|
+
rpc.registerHandler("model-config-apply", (params) => guarded(() => service.apply(obj(params))));
|
|
362
|
+
rpc.registerHandler("model-config-restore", (params) => guarded(() => service.restore(obj(params))));
|
|
363
|
+
}
|
|
364
|
+
|
|
349
365
|
function codingAgentFromProcessTree(panePid, snapshot) {
|
|
350
366
|
const rows = snapshot.split("\n").flatMap((line) => {
|
|
351
367
|
const m = line.trim().match(/^(\d+)\s+(\d+)\s+(.+)$/);
|
|
@@ -10585,6 +10601,10 @@ class ApiMachineClient {
|
|
|
10585
10601
|
setCliUpdateRequestHandler(handler) {
|
|
10586
10602
|
this.rpcHandlerManager.registerHandler("cli-update-request", (params) => handler(params && typeof params === "object" ? params.version : void 0));
|
|
10587
10603
|
}
|
|
10604
|
+
/** B-719: `harness-install` — the owner asked this machine to install one harness id. */
|
|
10605
|
+
setHarnessInstallHandler(handler) {
|
|
10606
|
+
this.rpcHandlerManager.registerHandler("harness-install", (params) => handler(params));
|
|
10607
|
+
}
|
|
10588
10608
|
setCliUpdateRetryHandler(handler) {
|
|
10589
10609
|
this.rpcHandlerManager.registerHandler("cli-update-retry", (params) => handler(params && typeof params === "object" ? params.version : void 0));
|
|
10590
10610
|
}
|
|
@@ -10702,6 +10722,10 @@ class ApiMachineClient {
|
|
|
10702
10722
|
return { claudeAuth };
|
|
10703
10723
|
});
|
|
10704
10724
|
}
|
|
10725
|
+
/** B-688 machine RPCs `model-config-*` (modules/modelConfig/modelConfigRpc.ts). */
|
|
10726
|
+
setModelConfigService(service) {
|
|
10727
|
+
registerModelConfigHandlers(this.rpcHandlerManager, service);
|
|
10728
|
+
}
|
|
10705
10729
|
/**
|
|
10706
10730
|
* B-506: the five `sessions.*` methods a CLI on ANOTHER machine of this
|
|
10707
10731
|
* account calls to read / message sessions this daemon spawned. Plaintext
|
|
@@ -11455,6 +11479,15 @@ class ApiMachineClient {
|
|
|
11455
11479
|
if (this.socket !== socket) return;
|
|
11456
11480
|
this.serverMigrateHandler?.(data);
|
|
11457
11481
|
});
|
|
11482
|
+
socket.on("cli-update-policy", (data) => {
|
|
11483
|
+
if (this.socket !== socket) return;
|
|
11484
|
+
this.cliUpdatePolicyHandler?.(data);
|
|
11485
|
+
});
|
|
11486
|
+
}
|
|
11487
|
+
cliUpdatePolicyHandler = null;
|
|
11488
|
+
/** B-718: the daemon decides what a policy announcement means (update/policyAnnouncement.ts). */
|
|
11489
|
+
setCliUpdatePolicyHandler(handler) {
|
|
11490
|
+
this.cliUpdatePolicyHandler = handler;
|
|
11458
11491
|
}
|
|
11459
11492
|
serverMigrateHandler = null;
|
|
11460
11493
|
/** B-635: the daemon decides what to do with a relay-migration notice (daemon/serverMigration.ts). */
|
|
@@ -11540,27 +11573,35 @@ class ApiMachineClient {
|
|
|
11540
11573
|
if (Date.now() - this.lastCliProbeAt < CLI_AVAILABILITY_RECHECK_MS) {
|
|
11541
11574
|
return;
|
|
11542
11575
|
}
|
|
11543
|
-
this.
|
|
11544
|
-
const newAvailability = detectCLIAvailability();
|
|
11545
|
-
const prev = this.lastKnownCLIAvailability;
|
|
11546
|
-
const newResumeSupport = detectResumeSupport();
|
|
11547
|
-
const prevResume = this.lastKnownResumeSupport;
|
|
11548
|
-
const cliAvailabilityChanged = !prev || prev.claude !== newAvailability.claude || prev.codex !== newAvailability.codex || prev.gemini !== newAvailability.gemini || prev.openclaw !== newAvailability.openclaw || prev.pi !== newAvailability.pi;
|
|
11549
|
-
const resumeSupportChanged = !prevResume || prevResume.rpcAvailable !== newResumeSupport.rpcAvailable || prevResume.happyAgentAuthenticated !== newResumeSupport.happyAgentAuthenticated;
|
|
11550
|
-
if (cliAvailabilityChanged || resumeSupportChanged) {
|
|
11551
|
-
this.lastKnownCLIAvailability = newAvailability;
|
|
11552
|
-
this.lastKnownResumeSupport = newResumeSupport;
|
|
11553
|
-
this.updateMachineMetadata((metadata) => ({
|
|
11554
|
-
...metadata || {},
|
|
11555
|
-
cliAvailability: newAvailability,
|
|
11556
|
-
resumeSupport: { ...newResumeSupport, rpcAvailable: !!this.resumeSessionHandler }
|
|
11557
|
-
})).catch((err) => {
|
|
11558
|
-
logger.debug("[API MACHINE] Failed to update machine capabilities:", err);
|
|
11559
|
-
});
|
|
11560
|
-
}
|
|
11576
|
+
this.recheckCliAvailability();
|
|
11561
11577
|
}, 2e4);
|
|
11562
11578
|
logger.debug("[API MACHINE] Keep-alive started (20s interval)");
|
|
11563
11579
|
}
|
|
11580
|
+
/**
|
|
11581
|
+
* Re-detect CLI availability and publish it when it changed. Called on the
|
|
11582
|
+
* throttled keep-alive and, B-719, right after the owner installed a
|
|
11583
|
+
* harness so the launcher enables it without waiting up to five minutes.
|
|
11584
|
+
*/
|
|
11585
|
+
recheckCliAvailability() {
|
|
11586
|
+
this.lastCliProbeAt = Date.now();
|
|
11587
|
+
const newAvailability = detectCLIAvailability();
|
|
11588
|
+
const prev = this.lastKnownCLIAvailability;
|
|
11589
|
+
const newResumeSupport = detectResumeSupport();
|
|
11590
|
+
const prevResume = this.lastKnownResumeSupport;
|
|
11591
|
+
const cliAvailabilityChanged = !prev || prev.claude !== newAvailability.claude || prev.codex !== newAvailability.codex || prev.gemini !== newAvailability.gemini || prev.openclaw !== newAvailability.openclaw || prev.pi !== newAvailability.pi;
|
|
11592
|
+
const resumeSupportChanged = !prevResume || prevResume.rpcAvailable !== newResumeSupport.rpcAvailable || prevResume.happyAgentAuthenticated !== newResumeSupport.happyAgentAuthenticated;
|
|
11593
|
+
if (cliAvailabilityChanged || resumeSupportChanged) {
|
|
11594
|
+
this.lastKnownCLIAvailability = newAvailability;
|
|
11595
|
+
this.lastKnownResumeSupport = newResumeSupport;
|
|
11596
|
+
this.updateMachineMetadata((metadata) => ({
|
|
11597
|
+
...metadata || {},
|
|
11598
|
+
cliAvailability: newAvailability,
|
|
11599
|
+
resumeSupport: { ...newResumeSupport, rpcAvailable: !!this.resumeSessionHandler }
|
|
11600
|
+
})).catch((err) => {
|
|
11601
|
+
logger.debug("[API MACHINE] Failed to update machine capabilities:", err);
|
|
11602
|
+
});
|
|
11603
|
+
}
|
|
11604
|
+
}
|
|
11564
11605
|
bindRpcRequestHandler(socket, transport) {
|
|
11565
11606
|
socket.on("rpc-request", async (data, callback) => {
|
|
11566
11607
|
if (typeof data?.method === "string" && this.rpcHandlerManager.isPlainMethod(data.method)) {
|