very-happy-cli 0.2.178 → 0.2.179
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-DCQXHRzT.mjs → AcpBackend-CHp3y7cb.mjs} +135 -16
- package/dist/{AcpBackend-CDkAQXYf.cjs → AcpBackend-DFipFF7-.cjs} +135 -16
- package/dist/{AcpSessionManager-DckmUZza.cjs → AcpSessionManager-0zpvRJXc.cjs} +38 -4
- package/dist/{AcpSessionManager-BXrQcqwC.mjs → AcpSessionManager-d2-rKWWa.mjs} +38 -4
- package/dist/{BasePermissionHandler-DyLmKKtO.cjs → BasePermissionHandler-CH3zuEkA.cjs} +5 -2
- package/dist/{BasePermissionHandler-BVlrEhIi.mjs → BasePermissionHandler-DdZBYIR4.mjs} +5 -2
- package/dist/acpSessionResume-DTGmAPLt.mjs +67 -0
- package/dist/acpSessionResume-oiCBnAVA.cjs +74 -0
- package/dist/{agentHome-CEp9RMyK.cjs → agentHome-BWcz8mz0.cjs} +4 -4
- package/dist/{agentHome-C1xi37as.mjs → agentHome-CghLvL_1.mjs} +4 -4
- package/dist/{api-JANhFdZV.cjs → api-Cmjfr8Z7.cjs} +28 -260
- package/dist/{api-Dib0dmqC.mjs → api-CzwFpJQc.mjs} +21 -253
- package/dist/{apiMachine-DNTJidYH.mjs → apiMachine-DJkTEiqy.mjs} +43 -15
- package/dist/{apiMachine-QhK-sKcr.cjs → apiMachine-G6OogT08.cjs} +43 -15
- package/dist/{attachmentContent-DkkdpSSJ.mjs → attachmentContent-B2os4HbA.mjs} +2 -2
- package/dist/{attachmentContent-bpQTBJ0y.cjs → attachmentContent-Bo0UAsSu.cjs} +4 -4
- package/dist/{auth-BRjd2esb.mjs → auth-BS6PaOOG.mjs} +5 -5
- package/dist/{auth-DgIV0Cvt.cjs → auth-D6bBUwZa.cjs} +5 -5
- package/dist/{auth-DNct7VUi.mjs → auth-DMX0xPNK.mjs} +8 -8
- package/dist/{auth-omWDtgR8.cjs → auth-HEhRaNgL.cjs} +8 -8
- package/dist/{auto-CI16FZmX.cjs → auto-C6I55iOh.cjs} +18 -17
- package/dist/{auto-DKGFOJBo.mjs → auto-Cl1SEDcD.mjs} +18 -17
- package/dist/{bootstrap-DCQ87Aan.cjs → bootstrap-exVucYav.cjs} +2 -2
- package/dist/{bootstrap-BUagGC_-.mjs → bootstrap-iuyufnp3.mjs} +2 -2
- package/dist/{browser-CSKhc0Bl.cjs → browser-BohJK12g.cjs} +1 -1
- package/dist/{browser-Dj_DYQEh.mjs → browser-CSYum7xH.mjs} +1 -1
- package/dist/{claudeLocal-CCCvAeMd.mjs → claudeLocal-Dq_R3Ax_.mjs} +6 -5
- package/dist/{claudeLocal-CdIVnOZp.cjs → claudeLocal-re4yjSTx.cjs} +6 -5
- package/dist/{claudeLocalLauncher-21-xh5gc.cjs → claudeLocalLauncher-B4hJHpCA.cjs} +11 -10
- package/dist/{claudeLocalLauncher-BmrpaRYJ.mjs → claudeLocalLauncher-CN67lN7-.mjs} +11 -10
- package/dist/{claudeSessionFork-DvxMKAmY.mjs → claudeSessionFork-BihfD0Ik.mjs} +1 -1
- package/dist/{claudeSessionFork-kYCP1IJB.cjs → claudeSessionFork-DiSMYerV.cjs} +1 -1
- package/dist/{client-Dnza1hgN.cjs → client-BKcK1Bi-.cjs} +3 -3
- package/dist/client-BhoEBnuN.mjs +71 -0
- package/dist/{client-C4zKGjiJ.cjs → client-CuVdN6PP.cjs} +2 -2
- package/dist/{client-BTX9hsbr.mjs → client-DuTDwWSQ.mjs} +3 -3
- package/dist/client-ZjOsn6nZ.cjs +76 -0
- package/dist/{client-CnlkkrZO.mjs → client-wo9nbxuf.mjs} +2 -2
- package/dist/codex/happyMcpStdioBridge.cjs +24 -15
- package/dist/codex/happyMcpStdioBridge.mjs +24 -15
- package/dist/{codexAppServerClient-DvkpQgyv.mjs → codexAppServerClient-BK3zra_1.mjs} +3 -3
- package/dist/{codexAppServerClient-CRlBWGn3.cjs → codexAppServerClient-Dt5zxrun.cjs} +3 -3
- package/dist/{codexCommand-BxjogBzU.mjs → codexCommand-B6pY7CMh.mjs} +65 -60
- package/dist/{codexCommand-DzxIWXIT.cjs → codexCommand-CAZ1SLjg.cjs} +88 -83
- package/dist/{codexTermination-ySDNMEhd.mjs → codexTermination-Cd1Eon_4.mjs} +1 -1
- package/dist/{codexTermination-C28FzlLb.cjs → codexTermination-DmGbHxcD.cjs} +1 -1
- package/dist/{config-DwfEpFr3.mjs → config-2oMG_fEI.mjs} +3 -3
- package/dist/{config-BFB5uJ4t.cjs → config-B0uK6K7n.cjs} +3 -3
- package/dist/{configuration-4TGMrjul.cjs → configuration-CMHZnp6G.cjs} +1 -1
- package/dist/{configuration-DVrb61aY.mjs → configuration-WMi4idBB.mjs} +1 -1
- package/dist/{connect-C7FPY0PI.mjs → connect-BLVHhHzA.mjs} +14 -14
- package/dist/{connect-QH2VJGBG.cjs → connect-uaglGrde.cjs} +14 -14
- package/dist/{context-JoKu0V54.cjs → context-DXzU5bFM.cjs} +1 -1
- package/dist/{context-B3XPVJlj.mjs → context-DploEcoN.mjs} +1 -1
- package/dist/{controlClient-BYKyGyxj.mjs → controlClient-BWUJrj3t.mjs} +3 -3
- package/dist/{controlClient-BTaZlbC6.cjs → controlClient-C-5qCt8W.cjs} +3 -3
- package/dist/{createSessionMetadata-8Fuj2-IV.mjs → createSessionMetadata-3uXrJgOW.mjs} +2 -2
- package/dist/{createSessionMetadata-B2NynaWZ.cjs → createSessionMetadata-BkIzHALd.cjs} +2 -2
- package/dist/{defaultPermissionMode-B8kJG9uI.mjs → defaultPermissionMode-BzxLh20a.mjs} +2 -2
- package/dist/{defaultPermissionMode-BEWCqJU-.cjs → defaultPermissionMode-pS3vmiSg.cjs} +2 -2
- package/dist/{deterministicJson-BjNQsAjO.cjs → deterministicJson-B8z2GPi9.cjs} +220 -14
- package/dist/{deterministicJson-C5ZwZ7hu.mjs → deterministicJson-D_whDMFd.mjs} +217 -12
- package/dist/{doctor-BshRnjLi.cjs → doctor-Br1Kcy2J.cjs} +7 -7
- package/dist/{doctor-0BiGwJXk.mjs → doctor-CmtSsR2-.mjs} +7 -7
- package/dist/{downloadTarget-BN5vZt3K.cjs → downloadTarget-BQJK_6oH.cjs} +6 -6
- package/dist/{downloadTarget-DJPwAZlu.mjs → downloadTarget-BoNwTIH_.mjs} +6 -6
- package/dist/{ensureDaemonRunning-C5QfToCe.cjs → ensureDaemonRunning-BRUmsq6J.cjs} +5 -5
- package/dist/{ensureDaemonRunning-CSmb_mqt.mjs → ensureDaemonRunning-Czo9IHJQ.mjs} +5 -5
- package/dist/{handleResumeCommand-CgjpsdDe.mjs → handleResumeCommand-C8thKjqf.mjs} +21 -5
- package/dist/{handleResumeCommand-BwnUZmbo.cjs → handleResumeCommand-tKD_Hpxc.cjs} +21 -5
- package/dist/{index-BYOZ_8WZ.cjs → index-B0UjHlAe.cjs} +4 -4
- package/dist/{index-BehVbAsA.mjs → index-BTxHphpV.mjs} +254 -49
- package/dist/index-BiyC7cZ3.mjs +18 -0
- package/dist/{index-_l1Sdmbi.cjs → index-C6O2vVjm.cjs} +154 -33
- package/dist/index-CUuc6iCn.cjs +24 -0
- package/dist/{index-Bvldtdny.mjs → index-CdQI0C9p.mjs} +4 -4
- package/dist/{index-BRClDe07.cjs → index-D09T1m8Y.cjs} +3 -3
- package/dist/{index-BYgfern_.mjs → index-D3bidoG8.mjs} +3 -3
- package/dist/{index-piJPsTsm.cjs → index-DMqDMT1Q.cjs} +256 -51
- package/dist/{index-Clqlu17M.mjs → index-DPOa4NhL.mjs} +153 -34
- package/dist/index.cjs +2 -2
- package/dist/index.mjs +2 -2
- package/dist/{install-BdvKiOQw.mjs → install-BX3lv3NO.mjs} +1 -1
- package/dist/{install-Cf6AFSWC.cjs → install-BXvf2E3o.cjs} +1 -1
- package/dist/{install-TO4taKW7.cjs → install-CYRZxS87.cjs} +3 -3
- package/dist/{install-fYWHrPcC.mjs → install-hnve_9vq.mjs} +3 -3
- package/dist/lib.cjs +13 -13
- package/dist/lib.d.cts +62 -1
- package/dist/lib.d.mts +62 -1
- package/dist/lib.mjs +13 -13
- package/dist/{lidState-DNMlIhX0.mjs → lidState-Bb8fgXg3.mjs} +1 -1
- package/dist/{lidState-BeOwj6eW.cjs → lidState-Dv2wwFTj.cjs} +1 -1
- package/dist/{localHappyAgentAuth-Br-mgogg.cjs → localHappyAgentAuth-DjYvkXvV.cjs} +1 -1
- package/dist/{localHappyAgentAuth-BezKSFDi.mjs → localHappyAgentAuth-NEU7fax7.mjs} +1 -1
- package/dist/{logger--vAVtXB_.mjs → logger-BtVhHnD8.mjs} +2 -2
- package/dist/{logger-DXTWlPzP.cjs → logger-C1GWx3gi.cjs} +2 -2
- package/dist/{machineMetadata-DcUupMje.cjs → machineMetadata-CLHS9sv_.cjs} +3 -3
- package/dist/{machineMetadata-B1H9gNbN.mjs → machineMetadata-D-g--oU_.mjs} +3 -3
- package/dist/{main-CshDb5-1.mjs → main-B2LWV8DI.mjs} +58 -45
- package/dist/{main-DoMFJ2Cl.cjs → main-CWhSsbtU.cjs} +58 -45
- package/dist/{mcp-pNc1EbQf.cjs → mcp-CARUsXHV.cjs} +14 -14
- package/dist/{mcp-DKT_lrvQ.mjs → mcp-ext92q3Y.mjs} +14 -14
- package/dist/{mirrorProtocol-6IFGPpjJ.mjs → mirrorProtocol-BwYibqry.mjs} +3 -3
- package/dist/{mirrorProtocol-qKflWTX_.cjs → mirrorProtocol-DEy2g1CB.cjs} +3 -3
- package/dist/{package-B7B03ejW.mjs → package-BPPebGQF.mjs} +7 -7
- package/dist/{package-DY4zTbKS.cjs → package-SgqTYsjn.cjs} +7 -7
- package/dist/panels-BZ0_Tt7B.mjs +137 -0
- package/dist/panels-D1c7q2dD.cjs +142 -0
- package/dist/{peerTools-3R9RUARX.mjs → peerTools-CWKzcQ7u.mjs} +60 -10
- package/dist/{peerTools-iy3_6Yc5.cjs → peerTools-DRQETXaz.cjs} +60 -9
- package/dist/{persistence-BfX72dne.cjs → persistence-BegE7NPa.cjs} +2 -2
- package/dist/{persistence-DTk4sNpd.mjs → persistence-Cr-wutZ4.mjs} +3 -3
- package/dist/{piRunnerArgs-CRQVR9o-.cjs → piRunnerArgs-Cs-378Vz.cjs} +8 -2
- package/dist/{piRunnerArgs-AT8QJY7x.mjs → piRunnerArgs-DwvM_yWA.mjs} +7 -1
- package/dist/{piRuntime-BHRT5MKO.cjs → piRuntime-BG-1td_n.cjs} +2 -2
- package/dist/{piRuntime-E44qTVQ4.mjs → piRuntime-Bue5mnlc.mjs} +2 -2
- package/dist/{piTerminal-De8nbciM.mjs → piTerminal-B5x9X5yV.mjs} +17 -17
- package/dist/{piTerminal-hI4WFdWm.cjs → piTerminal-G4z-xVyy.cjs} +17 -17
- package/dist/processTreeSnapshot-CuLJDNC-.mjs +101 -0
- package/dist/processTreeSnapshot-mDbnuojn.cjs +105 -0
- package/dist/prompt-BOouDaTM.mjs +99 -0
- package/dist/prompt-lgF9IE82.cjs +105 -0
- package/dist/{attachmentLimits-UyFn8fkQ.mjs → pushNotifications-BdFjDjQe.mjs} +303 -3
- package/dist/{attachmentLimits-SqeAHrVC.cjs → pushNotifications-DaLQUyi0.cjs} +304 -2
- package/dist/{index-DFPT4HOO.cjs → query-Ctfg-5gy.cjs} +25 -5
- package/dist/{index-CEjJnq05.mjs → query-DYP_W1wp.mjs} +26 -3
- package/dist/{rateLimitWindows-XrJiiBpU.mjs → rateLimitWindows-CuEqk_0g.mjs} +1 -1
- package/dist/{rateLimitWindows-Czb7_7cK.cjs → rateLimitWindows-Dj_8voBK.cjs} +1 -1
- package/dist/{registerCommonHandlers-CvIedVRf.mjs → registerCommonHandlers-BAlP7SGc.mjs} +2 -2
- package/dist/{registerCommonHandlers-C0_fyBQ0.cjs → registerCommonHandlers-Cj084Sg7.cjs} +2 -2
- package/dist/{registerKillSessionHandler-gwJ5lTf0.mjs → registerKillSessionHandler-PD0jWtQo.mjs} +6 -6
- package/dist/{registerKillSessionHandler-DYl7l4Ts.cjs → registerKillSessionHandler-qMju0ZfF.cjs} +6 -6
- package/dist/{remoteSessionClient-BRTIOX5b.cjs → remoteSessionClient-B7i7MkYV.cjs} +5 -5
- package/dist/{remoteSessionClient-DRb2Jr5s.mjs → remoteSessionClient-Bn2qu5C5.mjs} +5 -5
- package/dist/{reportProgressTool-B9nCzbkL.cjs → reportProgressTool-CM1JFAHg.cjs} +84 -2
- package/dist/{reportProgressTool-D5tEoXMW.mjs → reportProgressTool-gHItlSzz.mjs} +82 -3
- package/dist/{resources-JDPugcDq.cjs → resources-CvIlkzpP.cjs} +30 -0
- package/dist/{resources-BdFBQi8r.mjs → resources-y9jfyO-_.mjs} +30 -0
- package/dist/{run-BQ_FGaOL.mjs → run-BM4TxiyN.mjs} +177 -41
- package/dist/{run-CKe_WeLW.cjs → run-CNXwIe0A.cjs} +191 -55
- package/dist/{runClaude-MHI5IKM-.cjs → runClaude-CWhj2V4Q.cjs} +36 -40
- package/dist/{runClaude-zrrNcQC_.mjs → runClaude-C_3I8hvR.mjs} +36 -40
- package/dist/{runClaudeDeps-RRw-Nusc.cjs → runClaudeDeps-B81cOKnH.cjs} +294 -156
- package/dist/{runClaudeDeps-CVBCokOS.mjs → runClaudeDeps-QGrOeDe2.mjs} +294 -159
- package/dist/{runGemini-kipag2ag.mjs → runGemini-BEdWEZLR.mjs} +60 -54
- package/dist/{runGemini-D7Lg9yCr.cjs → runGemini-CgRLYbt5.cjs} +60 -54
- package/dist/{runOpenClaw-DCcQ0L2N.cjs → runOpenClaw-C1NVmzOL.cjs} +18 -18
- package/dist/{runOpenClaw-C_lRY3Do.mjs → runOpenClaw-DdQZAYj1.mjs} +18 -18
- package/dist/{sandbox-BSyXFVFp.mjs → sandbox-DjQUdCMG.mjs} +4 -4
- package/dist/{sandbox-dMwPTmjm.cjs → sandbox-nocIjliq.cjs} +4 -4
- package/dist/selfCheck-CjCF4C3v.mjs +85 -0
- package/dist/{selfCheck-DkzDDUsE.cjs → selfCheck-DCt4Uzbq.cjs} +36 -35
- package/dist/{send-C-k9nsd3.mjs → send-Ct7X4pPU.mjs} +8 -8
- package/dist/{send-dxC0miIA.cjs → send-Dydf_hwZ.cjs} +8 -8
- package/dist/{server-B-W6P7Qr.cjs → server-CosABFbd.cjs} +6 -6
- package/dist/{server-DxoTYNlw.mjs → server-DTQGZMxh.mjs} +4 -4
- package/dist/{sessionLock-DWX6BbiU.cjs → sessionLock-DokGab2R.cjs} +16 -3
- package/dist/{sessionLock-DBdtZGOL.mjs → sessionLock-WYIyaVO4.mjs} +16 -4
- package/dist/{sessionOps-BVoXe12O.mjs → sessionOps-BIGgRube.mjs} +10 -5
- package/dist/{sessionOps-BAnr7n8t.cjs → sessionOps-S-qPBLFf.cjs} +10 -5
- package/dist/{sessionScanner-CDOYsEUD.cjs → sessionScanner-CIMM2hvZ.cjs} +3 -3
- package/dist/{sessionScanner-BtxoeluY.mjs → sessionScanner-o5hnMi5e.mjs} +3 -3
- package/dist/{sessions-C3sZJkzI.mjs → sessions-BJHEZpi2.mjs} +39 -17
- package/dist/{sessions-hAitoN-m.cjs → sessions-JchI1w3z.cjs} +39 -16
- package/dist/{setupOfflineReconnection-C2EeYTFH.cjs → setupOfflineReconnection-CNiAt5ZP.cjs} +2 -2
- package/dist/{setupOfflineReconnection-_eD4cuUT.mjs → setupOfflineReconnection-DMiBO2y9.mjs} +2 -2
- package/dist/{spawn-Bc9v7pIf.cjs → spawn-6PD7nnoC.cjs} +48 -17
- package/dist/{spawn-qNrB2CD_.mjs → spawn-DgvUNYEo.mjs} +48 -17
- package/dist/{spawnAgents-BVEaz35W.cjs → spawnAgents-DsXgegHM.cjs} +37 -1
- package/dist/spawnAgents-P006Hqio.mjs +79 -0
- package/dist/{spawnHappyCLI-C2stUioM.mjs → spawnHappyCLI-CCOrEtf9.mjs} +1 -1
- package/dist/{spawnHappyCLI-fzUagkKV.cjs → spawnHappyCLI-Dywezwk6.cjs} +1 -1
- package/dist/{specialCommands-C6W-rVyh.mjs → specialCommands-DPcd9edP.mjs} +3 -3
- package/dist/{specialCommands-BJ-nqY4s.cjs → specialCommands-QxPpkGKf.cjs} +3 -3
- package/dist/{startFileWatcher-CR09Snmz.mjs → startFileWatcher-DghDOCO4.mjs} +1 -1
- package/dist/{startFileWatcher-Bqlqjt93.cjs → startFileWatcher-RECH5qY8.cjs} +1 -1
- package/dist/{streamRelay-CJoMk_d2.mjs → streamRelay-DMV_TXfS.mjs} +1 -1
- package/dist/{streamRelay-9kBPpbvU.cjs → streamRelay-DlUWKUpo.cjs} +1 -1
- package/dist/{sync-DbW07iQS.mjs → sync-CSe0Rf45.mjs} +1 -1
- package/dist/{sync-Dhmtk66S.cjs → sync-D23jbqVa.cjs} +1 -1
- package/dist/{systemPrompt-3PYi3EUY.cjs → systemPrompt-BOy4kU4P.cjs} +4 -3
- package/dist/{systemPrompt-CQcuUmVp.mjs → systemPrompt-CFNKnh65.mjs} +4 -3
- package/dist/{teams-CwF4Z2fA.mjs → teams-DyY669f0.mjs} +8 -8
- package/dist/{teams-DpxLcUU_.cjs → teams-Ov2BDT-A.cjs} +8 -8
- package/dist/{time-BuGWTVP6.mjs → time-65DcU6Jx.mjs} +1 -1
- package/dist/{time-A6zR3Iy6.cjs → time-CrwIMHta.cjs} +1 -1
- package/dist/{titleGenerator-D26gvNaS.cjs → titleGenerator-CS_rh2_J.cjs} +9 -8
- package/dist/{titleGenerator-BGEzNWC9.mjs → titleGenerator-CiAMxf7s.mjs} +9 -8
- package/dist/{todo-DrZc76H5.mjs → todo-BDONw0sK.mjs} +6 -6
- package/dist/{todo-73g3NCIO.cjs → todo-KY-okGii.cjs} +6 -6
- package/dist/{tools-BtsrQnNS.mjs → tools-D8-PnZEG.mjs} +1 -1
- package/dist/{tools-CxJp4T1T.cjs → tools-_w52DZG6.cjs} +1 -1
- package/dist/{uninstall-DWNYvewQ.cjs → uninstall-8vnLN-IE.cjs} +3 -3
- package/dist/{uninstall-DOb2mTwV.mjs → uninstall-_fjGRP9b.mjs} +3 -3
- package/dist/webPanels-B2_C2-3g.mjs +49 -0
- package/dist/webPanels-FCgFKvVe.cjs +53 -0
- package/package.json +7 -7
- package/dist/selfCheck-CF7XGJPb.mjs +0 -84
- package/dist/sessionModeFile-ByLbXTbg.mjs +0 -32
- package/dist/sessionModeFile-CLLdidiJ.cjs +0 -36
- package/dist/spawnAgents-Bw6j4tqz.mjs +0 -45
|
@@ -1,21 +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-BtVhHnD8.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-Bb8fgXg3.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 } from './
|
|
6
|
+
import { A as AsyncLock, a as MAX_CHAT_ATTACHMENT_ENCRYPTED_BYTES, U as UserMessageSchema, F as FileEventMessageSchema, P as PushNotificationClient } from './pushNotifications-BdFjDjQe.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-65DcU6Jx.mjs';
|
|
10
|
+
import { c as configuration } from './configuration-WMi4idBB.mjs';
|
|
11
11
|
import { createHmac, randomUUID } from 'node:crypto';
|
|
12
|
-
import {
|
|
13
|
-
import { r as registerCommonHandlers } from './registerCommonHandlers-
|
|
12
|
+
import { d as createEnvelope, s as streamKeyOf, R as ReleaseDrainNoticeSchema, t as RelayAssignmentResponseSchema } from './index-DPOa4NhL.mjs';
|
|
13
|
+
import { r as registerCommonHandlers } from './registerCommonHandlers-BAlP7SGc.mjs';
|
|
14
14
|
import { createId } from '@paralleldrive/cuid2';
|
|
15
|
-
import { I as InvalidateSync } from './sync-
|
|
15
|
+
import { I as InvalidateSync } from './sync-CSe0Rf45.mjs';
|
|
16
16
|
import { B as BackgroundTaskReporter } from './backgroundTaskActivity-BVwJBl02.mjs';
|
|
17
|
-
import { k as notifyDaemonTurnEvent, m as notifyDaemonBackgroundTasks } from './controlClient-
|
|
18
|
-
import { c as contentLogMetadata } from './contentLogMetadata-BlWI0egu.mjs';
|
|
17
|
+
import { k as notifyDaemonTurnEvent, m as notifyDaemonBackgroundTasks } from './controlClient-BWUJrj3t.mjs';
|
|
19
18
|
import chalk from 'chalk';
|
|
20
19
|
|
|
21
20
|
async function hmac_sha512(key, data) {
|
|
@@ -1956,6 +1955,17 @@ class ApiSessionClient extends EventEmitter {
|
|
|
1956
1955
|
* own line, so a launcher sends the matching session event only when this
|
|
1957
1956
|
* says the turn-end did not carry it).
|
|
1958
1957
|
*/
|
|
1958
|
+
/**
|
|
1959
|
+
* B-495: close the turn a fork backfill left open. History, not a live
|
|
1960
|
+
* turn end — so no `turn-ended` tap (board analyzer, completion hooks).
|
|
1961
|
+
*/
|
|
1962
|
+
closeReplayedClaudeTurn() {
|
|
1963
|
+
const mapped = closeClaudeTurnWithStatus(this.claudeSessionProtocolState, "completed");
|
|
1964
|
+
this.claudeSessionProtocolState.currentTurnId = mapped.currentTurnId;
|
|
1965
|
+
for (const envelope of mapped.envelopes) {
|
|
1966
|
+
this.sendSessionProtocolMessage(envelope);
|
|
1967
|
+
}
|
|
1968
|
+
}
|
|
1959
1969
|
closeClaudeSessionTurn(status = "completed", meta) {
|
|
1960
1970
|
this.emit("turn-ended", status);
|
|
1961
1971
|
const mapped = closeClaudeTurnWithStatus(this.claudeSessionProtocolState, status, meta);
|
|
@@ -2435,248 +2445,6 @@ class ApiSessionClient extends EventEmitter {
|
|
|
2435
2445
|
}
|
|
2436
2446
|
}
|
|
2437
2447
|
|
|
2438
|
-
function getSessionTitle(metadata) {
|
|
2439
|
-
const summaryText = metadata?.summary?.text?.trim();
|
|
2440
|
-
if (summaryText) {
|
|
2441
|
-
return summaryText;
|
|
2442
|
-
}
|
|
2443
|
-
const path = metadata?.path?.trim();
|
|
2444
|
-
if (!path) {
|
|
2445
|
-
return "Session";
|
|
2446
|
-
}
|
|
2447
|
-
const segments = path.split(/[\\/]/).filter(Boolean);
|
|
2448
|
-
return segments[segments.length - 1] || "Session";
|
|
2449
|
-
}
|
|
2450
|
-
function getSessionNotificationUrl(data) {
|
|
2451
|
-
const sessionId = data?.sessionId;
|
|
2452
|
-
if (typeof sessionId !== "string") {
|
|
2453
|
-
return null;
|
|
2454
|
-
}
|
|
2455
|
-
const trimmedSessionId = sessionId.trim();
|
|
2456
|
-
if (!trimmedSessionId) {
|
|
2457
|
-
return null;
|
|
2458
|
-
}
|
|
2459
|
-
return `/session/${encodeURIComponent(trimmedSessionId)}`;
|
|
2460
|
-
}
|
|
2461
|
-
function getSessionNotificationTitle(kind) {
|
|
2462
|
-
switch (kind) {
|
|
2463
|
-
case "done":
|
|
2464
|
-
return "It's ready!";
|
|
2465
|
-
case "permission":
|
|
2466
|
-
return "Permission request";
|
|
2467
|
-
case "question":
|
|
2468
|
-
return "Clarification needed";
|
|
2469
|
-
}
|
|
2470
|
-
}
|
|
2471
|
-
function getSessionNotificationBody(metadata) {
|
|
2472
|
-
return getSessionTitle(metadata);
|
|
2473
|
-
}
|
|
2474
|
-
function getSessionNotificationCopy(kind, metadata) {
|
|
2475
|
-
return {
|
|
2476
|
-
title: getSessionNotificationTitle(kind),
|
|
2477
|
-
body: getSessionNotificationBody(metadata)
|
|
2478
|
-
};
|
|
2479
|
-
}
|
|
2480
|
-
class PushNotificationClient {
|
|
2481
|
-
token;
|
|
2482
|
-
baseUrl;
|
|
2483
|
-
expoLoad = null;
|
|
2484
|
-
constructor(token, baseUrl = "https://api.cluster-fluster.com") {
|
|
2485
|
-
this.token = token;
|
|
2486
|
-
this.baseUrl = baseUrl;
|
|
2487
|
-
}
|
|
2488
|
-
loadExpo() {
|
|
2489
|
-
if (!this.expoLoad) {
|
|
2490
|
-
const load = import('expo-server-sdk').then(({ Expo }) => ({ Expo, expo: new Expo() }));
|
|
2491
|
-
load.catch(() => {
|
|
2492
|
-
if (this.expoLoad === load) this.expoLoad = null;
|
|
2493
|
-
});
|
|
2494
|
-
this.expoLoad = load;
|
|
2495
|
-
}
|
|
2496
|
-
return this.expoLoad;
|
|
2497
|
-
}
|
|
2498
|
-
/**
|
|
2499
|
-
* Fetch all push tokens for the authenticated user.
|
|
2500
|
-
* Retries up to 3 times with exponential backoff on transient errors.
|
|
2501
|
-
*/
|
|
2502
|
-
async fetchPushTokens() {
|
|
2503
|
-
const maxAttempts = 3;
|
|
2504
|
-
for (let attempt = 1; attempt <= maxAttempts; attempt++) {
|
|
2505
|
-
try {
|
|
2506
|
-
const response = await axios.get(
|
|
2507
|
-
`${this.baseUrl}/v1/push-tokens`,
|
|
2508
|
-
{
|
|
2509
|
-
headers: {
|
|
2510
|
-
"Authorization": `Bearer ${this.token}`,
|
|
2511
|
-
"Content-Type": "application/json",
|
|
2512
|
-
"X-Happy-Client": `cli-daemon/${configuration.currentCliVersion}`
|
|
2513
|
-
}
|
|
2514
|
-
}
|
|
2515
|
-
);
|
|
2516
|
-
logger.debug(`Fetched ${response.data.tokens.length} push tokens`);
|
|
2517
|
-
response.data.tokens.forEach((token, index) => {
|
|
2518
|
-
logger.debug(`[PUSH] Token ${index + 1}: id=${token.id}, created=${new Date(token.createdAt).toISOString()}, updated=${new Date(token.updatedAt).toISOString()}`);
|
|
2519
|
-
});
|
|
2520
|
-
return response.data.tokens;
|
|
2521
|
-
} catch (error) {
|
|
2522
|
-
logger.debug(`[PUSH] [ERROR] Failed to fetch push tokens (attempt ${attempt}/${maxAttempts}):`, error);
|
|
2523
|
-
if (attempt < maxAttempts) {
|
|
2524
|
-
const delay = 1e3 * Math.pow(2, attempt - 1);
|
|
2525
|
-
await new Promise((resolve) => setTimeout(resolve, delay));
|
|
2526
|
-
}
|
|
2527
|
-
}
|
|
2528
|
-
}
|
|
2529
|
-
logger.debug("[PUSH] [ERROR] All push token fetch attempts failed");
|
|
2530
|
-
return [];
|
|
2531
|
-
}
|
|
2532
|
-
/**
|
|
2533
|
-
* Send push notification via Expo Push API with retry
|
|
2534
|
-
* @param messages - Array of push messages to send
|
|
2535
|
-
*/
|
|
2536
|
-
async sendPushNotifications(messages) {
|
|
2537
|
-
logger.debug(`Sending ${messages.length} push notifications`);
|
|
2538
|
-
const { Expo, expo } = await this.loadExpo();
|
|
2539
|
-
const validMessages = messages.filter((message) => {
|
|
2540
|
-
if (Array.isArray(message.to)) {
|
|
2541
|
-
return message.to.every((token) => Expo.isExpoPushToken(token));
|
|
2542
|
-
}
|
|
2543
|
-
return Expo.isExpoPushToken(message.to);
|
|
2544
|
-
});
|
|
2545
|
-
if (validMessages.length === 0) {
|
|
2546
|
-
logger.debug("No valid Expo push tokens found");
|
|
2547
|
-
return;
|
|
2548
|
-
}
|
|
2549
|
-
const chunks = expo.chunkPushNotifications(validMessages);
|
|
2550
|
-
for (const chunk of chunks) {
|
|
2551
|
-
const startTime = Date.now();
|
|
2552
|
-
const timeout = 3e5;
|
|
2553
|
-
let attempt = 0;
|
|
2554
|
-
while (true) {
|
|
2555
|
-
try {
|
|
2556
|
-
const ticketChunk = await expo.sendPushNotificationsAsync(chunk);
|
|
2557
|
-
const errors = ticketChunk.filter((ticket) => ticket.status === "error");
|
|
2558
|
-
if (errors.length > 0) {
|
|
2559
|
-
const errorDetails = errors.map((e) => ({ message: e.message, details: e.details }));
|
|
2560
|
-
logger.debug("[PUSH] Some notifications failed:", errorDetails);
|
|
2561
|
-
}
|
|
2562
|
-
if (errors.length === ticketChunk.length) {
|
|
2563
|
-
throw new Error("All push notifications in chunk failed");
|
|
2564
|
-
}
|
|
2565
|
-
break;
|
|
2566
|
-
} catch (error) {
|
|
2567
|
-
const elapsed = Date.now() - startTime;
|
|
2568
|
-
if (elapsed >= timeout) {
|
|
2569
|
-
logger.debug("[PUSH] Timeout reached after 5 minutes, giving up on chunk");
|
|
2570
|
-
break;
|
|
2571
|
-
}
|
|
2572
|
-
attempt++;
|
|
2573
|
-
const delay = Math.min(1e3 * Math.pow(2, attempt), 3e4);
|
|
2574
|
-
const remainingTime = timeout - elapsed;
|
|
2575
|
-
const waitTime = Math.min(delay, remainingTime);
|
|
2576
|
-
if (waitTime > 0) {
|
|
2577
|
-
logger.debug(`[PUSH] Retrying in ${waitTime}ms (attempt ${attempt})`);
|
|
2578
|
-
await new Promise((resolve) => setTimeout(resolve, waitTime));
|
|
2579
|
-
}
|
|
2580
|
-
}
|
|
2581
|
-
}
|
|
2582
|
-
}
|
|
2583
|
-
logger.debug(`Push notifications sent successfully`);
|
|
2584
|
-
}
|
|
2585
|
-
/**
|
|
2586
|
-
* Send a push notification to all registered devices for the user
|
|
2587
|
-
* @param title - Notification title
|
|
2588
|
-
* @param body - Notification body
|
|
2589
|
-
* @param data - Additional data to send with the notification
|
|
2590
|
-
*/
|
|
2591
|
-
sendToAllDevices(title, body, data) {
|
|
2592
|
-
logger.debug("[PUSH] sendToAllDevices called:", {
|
|
2593
|
-
title: contentLogMetadata(title),
|
|
2594
|
-
body: contentLogMetadata(body),
|
|
2595
|
-
dataKeyCount: data ? Object.keys(data).length : 0
|
|
2596
|
-
});
|
|
2597
|
-
(async () => {
|
|
2598
|
-
try {
|
|
2599
|
-
logger.debug("[PUSH] Fetching push tokens...");
|
|
2600
|
-
const tokens = await this.fetchPushTokens();
|
|
2601
|
-
logger.debug(`[PUSH] Fetched ${tokens.length} push tokens`);
|
|
2602
|
-
tokens.forEach((token, index) => {
|
|
2603
|
-
logger.debug(`[PUSH] Using token ${index + 1}: id=${token.id}`);
|
|
2604
|
-
});
|
|
2605
|
-
if (tokens.length === 0) {
|
|
2606
|
-
logger.debug("No push tokens found for user");
|
|
2607
|
-
return;
|
|
2608
|
-
}
|
|
2609
|
-
const messages = tokens.map((token, index) => {
|
|
2610
|
-
logger.debug(`[PUSH] Creating message ${index + 1} for token`);
|
|
2611
|
-
return {
|
|
2612
|
-
to: token.token,
|
|
2613
|
-
title,
|
|
2614
|
-
body: body && body.length > 0 ? body : void 0,
|
|
2615
|
-
data,
|
|
2616
|
-
// TODO: For brutalist session artwork, attach rich media via a public HTTPS image URL.
|
|
2617
|
-
// Bundled app asset paths / require(...) / local file paths will not work in push payloads.
|
|
2618
|
-
// iOS also needs a Notification Service Extension to render richContent.image reliably.
|
|
2619
|
-
sound: "default",
|
|
2620
|
-
priority: "high"
|
|
2621
|
-
};
|
|
2622
|
-
});
|
|
2623
|
-
logger.debug(`[PUSH] Sending ${messages.length} push notifications...`);
|
|
2624
|
-
await this.sendPushNotifications(messages);
|
|
2625
|
-
logger.debug("[PUSH] Push notifications sent successfully");
|
|
2626
|
-
} catch (error) {
|
|
2627
|
-
logger.debug("[PUSH] Error sending to all devices:", error);
|
|
2628
|
-
}
|
|
2629
|
-
})();
|
|
2630
|
-
}
|
|
2631
|
-
/**
|
|
2632
|
-
* Routes session-event pushes through the server so it can apply
|
|
2633
|
-
* presence-based suppression (active desktop/web, mobile foreground).
|
|
2634
|
-
* Falls back to direct Expo send only when sessionId is missing — that
|
|
2635
|
-
* shouldn't happen for session notifications but guards against regressions.
|
|
2636
|
-
*/
|
|
2637
|
-
sendSessionNotification(params) {
|
|
2638
|
-
const { title, body } = getSessionNotificationCopy(params.kind, params.metadata);
|
|
2639
|
-
const sessionTitle = getSessionNotificationBody(params.metadata);
|
|
2640
|
-
const url = getSessionNotificationUrl(params.data);
|
|
2641
|
-
const payloadData = {
|
|
2642
|
-
...params.data,
|
|
2643
|
-
kind: params.kind,
|
|
2644
|
-
sessionTitle,
|
|
2645
|
-
...url ? { url } : {}
|
|
2646
|
-
};
|
|
2647
|
-
const sessionId = typeof params.data?.sessionId === "string" ? params.data.sessionId : null;
|
|
2648
|
-
if (!sessionId) {
|
|
2649
|
-
logger.debug("[PUSH] sendSessionNotification: missing sessionId, falling back to direct send");
|
|
2650
|
-
this.sendToAllDevices(title, body, payloadData);
|
|
2651
|
-
return;
|
|
2652
|
-
}
|
|
2653
|
-
void (async () => {
|
|
2654
|
-
try {
|
|
2655
|
-
await axios.post(
|
|
2656
|
-
`${this.baseUrl}/v1/sessions/${encodeURIComponent(sessionId)}/push-event`,
|
|
2657
|
-
{
|
|
2658
|
-
kind: params.kind,
|
|
2659
|
-
title,
|
|
2660
|
-
body,
|
|
2661
|
-
data: payloadData
|
|
2662
|
-
},
|
|
2663
|
-
{
|
|
2664
|
-
headers: {
|
|
2665
|
-
"Authorization": `Bearer ${this.token}`,
|
|
2666
|
-
"Content-Type": "application/json",
|
|
2667
|
-
"X-Happy-Client": `cli-daemon/${configuration.currentCliVersion}`
|
|
2668
|
-
},
|
|
2669
|
-
timeout: 15e3
|
|
2670
|
-
}
|
|
2671
|
-
);
|
|
2672
|
-
logger.debug(`[PUSH] sendSessionNotification dispatched via server (kind=${params.kind})`);
|
|
2673
|
-
} catch (error) {
|
|
2674
|
-
logger.debug("[PUSH] sendSessionNotification failed:", error);
|
|
2675
|
-
}
|
|
2676
|
-
})();
|
|
2677
|
-
}
|
|
2678
|
-
}
|
|
2679
|
-
|
|
2680
2448
|
function startOfflineReconnection(config) {
|
|
2681
2449
|
let reconnected = false;
|
|
2682
2450
|
let session = null;
|
|
@@ -3171,7 +2939,7 @@ class ApiClient {
|
|
|
3171
2939
|
return new ApiSessionClient(this.credential.token, session, opts);
|
|
3172
2940
|
}
|
|
3173
2941
|
async machineSyncClient(machine) {
|
|
3174
|
-
const { ApiMachineClient } = await import('./apiMachine-
|
|
2942
|
+
const { ApiMachineClient } = await import('./apiMachine-DJkTEiqy.mjs');
|
|
3175
2943
|
return new ApiMachineClient(this.credential.token, machine);
|
|
3176
2944
|
}
|
|
3177
2945
|
push() {
|
|
@@ -1,41 +1,42 @@
|
|
|
1
1
|
import { io } from 'socket.io-client';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { c as
|
|
2
|
+
import { a as webPanelsSignature } from './webPanels-B2_C2-3g.mjs';
|
|
3
|
+
import { l as logger } from './logger-BtVhHnD8.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-Bb8fgXg3.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-BwYibqry.mjs';
|
|
6
|
+
import { c as configuration } from './configuration-WMi4idBB.mjs';
|
|
6
7
|
import { w as withCurrentCliUpdateState } from './cliUpdate-Y34VGe9Y.mjs';
|
|
7
|
-
import { r as registerCommonHandlers } from './registerCommonHandlers-
|
|
8
|
+
import { r as registerCommonHandlers } from './registerCommonHandlers-BAlP7SGc.mjs';
|
|
8
9
|
import { stat, readdir, lstat, open, readFile, rm, mkdir, chmod, writeFile, rename } from 'node:fs/promises';
|
|
9
10
|
import { join, isAbsolute, resolve } from 'node:path';
|
|
10
11
|
import os, { homedir } from 'node:os';
|
|
11
12
|
import { spawn, execFile, spawnSync } from 'node:child_process';
|
|
12
|
-
import { r as readSettings,
|
|
13
|
+
import { r as readSettings, c as readPersistedSessions, o as readTrackedClaudeSessionIds, p as readTrackedCodexThreadIds } from './persistence-Cr-wutZ4.mjs';
|
|
13
14
|
import { e as encodeBase64, g as encrypt, h as decrypt, d as decodeBase64 } from './authRelay-DhQhkBvX.mjs';
|
|
14
15
|
import { p as prepareClipboardText, d as prepareClipboardHistoryText } from './limits-DIo7rEBR.mjs';
|
|
15
|
-
import { b as backoff, d as delay } from './time-
|
|
16
|
+
import { b as backoff, d as delay } from './time-65DcU6Jx.mjs';
|
|
16
17
|
import * as pty from 'node-pty';
|
|
17
18
|
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';
|
|
18
19
|
import { t as tmuxArgs, V as VH_TMUX_SOCKET_ENV, a as scrubTmuxClientEnv } from './tmuxSocket-B8Yx20sT.mjs';
|
|
19
|
-
import { locateClaudeConversation, refreshAgentHomes } from './index-
|
|
20
|
+
import { locateClaudeConversation, refreshAgentHomes } from './index-CdQI0C9p.mjs';
|
|
20
21
|
import { randomBytes } from 'node:crypto';
|
|
21
22
|
import { readdirSync, unlinkSync, existsSync, mkdirSync, writeFileSync, readFileSync, statSync, chmodSync, renameSync, rmSync, accessSync, constants } from 'node:fs';
|
|
22
23
|
import axios from 'axios';
|
|
23
24
|
import { p as projectPath } from './projectPath-BTBIMB57.mjs';
|
|
24
25
|
import { a as isValidTerminalId } from './ids-DU6sLx4C.mjs';
|
|
25
26
|
import { d as detectCLIAvailability } from './detectCLI-CSGMlV51.mjs';
|
|
26
|
-
import { d as detectResumeSupport } from './localHappyAgentAuth-
|
|
27
|
+
import { d as detectResumeSupport } from './localHappyAgentAuth-NEU7fax7.mjs';
|
|
27
28
|
import { g as getProjectPath, a as getClaudeProjectsRoot } from './path-D2wdaNSk.mjs';
|
|
28
29
|
import { i as isVeryHappyOneShotPrompt } from './oneShotPrompts-DT4p6RNd.mjs';
|
|
29
|
-
import { f as forkSession, F as ForkSourceMissingError, d as discardForkedSession, l as listClaudeRewindPoints, a as forkAndTruncateSession, b as ForkTruncateUuidNotFoundError, c as forkBeforeUserMessage } from './claudeSessionFork-
|
|
30
|
-
import { C as CodexAppServerClient } from './codexAppServerClient-
|
|
31
|
-
import {
|
|
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-BihfD0Ik.mjs';
|
|
31
|
+
import { C as CodexAppServerClient } from './codexAppServerClient-BK3zra_1.mjs';
|
|
32
|
+
import { v as RelayCandidatesResponseSchema, t as RelayAssignmentResponseSchema, R as ReleaseDrainNoticeSchema } from './index-DPOa4NhL.mjs';
|
|
32
33
|
import { f as forkCodexThread, C as CodexForkRewindPointNotFoundError, l as listCodexRewindPoints, a as forkCodexBeforeUserMessage } from './codexThreadFork-R76RU5H0.mjs';
|
|
33
|
-
import { p as planRateLimitWrite, m as mergeRateLimitReports } from './rateLimitWindows-
|
|
34
|
+
import { p as planRateLimitWrite, m as mergeRateLimitReports } from './rateLimitWindows-CuEqk_0g.mjs';
|
|
34
35
|
import 'chalk';
|
|
35
36
|
import 'node:util';
|
|
36
37
|
import 'os';
|
|
37
38
|
import 'child_process';
|
|
38
|
-
import './package-
|
|
39
|
+
import './package-BPPebGQF.mjs';
|
|
39
40
|
import 'util';
|
|
40
41
|
import 'fs/promises';
|
|
41
42
|
import 'crypto';
|
|
@@ -10468,6 +10469,9 @@ class ApiMachineClient {
|
|
|
10468
10469
|
claudeAuthState = null;
|
|
10469
10470
|
/** B-587: the machine's hibernation threshold, published as a capability. */
|
|
10470
10471
|
agentHibernationIdleMs = null;
|
|
10472
|
+
/** B-510: last normalized `webPanels` (null = never set → field not written). */
|
|
10473
|
+
webPanels = null;
|
|
10474
|
+
webPanelsSignatureSent = null;
|
|
10471
10475
|
rateLimitPushChain = Promise.resolve();
|
|
10472
10476
|
rateLimitPublisher = new RateLimitPublisher({
|
|
10473
10477
|
getCurrent: () => this.machine.daemonState?.rateLimits,
|
|
@@ -10647,6 +10651,27 @@ class ApiMachineClient {
|
|
|
10647
10651
|
return { agentHibernation: { idleMs } };
|
|
10648
10652
|
});
|
|
10649
10653
|
}
|
|
10654
|
+
/**
|
|
10655
|
+
* B-510: mirror the local `webPanels` declaration into daemonState. Every
|
|
10656
|
+
* daemonState write is a CAS + DB write + broadcast, so an unchanged list
|
|
10657
|
+
* (same signature as the last one sent) writes nothing.
|
|
10658
|
+
*/
|
|
10659
|
+
setWebPanels(panels) {
|
|
10660
|
+
this.webPanels = panels;
|
|
10661
|
+
const signature = webPanelsSignature(panels);
|
|
10662
|
+
if (signature === this.webPanelsSignatureSent || !this.socket?.connected) return Promise.resolve();
|
|
10663
|
+
const attempt = this.cliUpdatePushChain.then(() => this.updateDaemonState((current) => ({
|
|
10664
|
+
...current ?? {},
|
|
10665
|
+
status: current?.status ?? "running",
|
|
10666
|
+
webPanels: { panels, updatedAt: Date.now() }
|
|
10667
|
+
}))).then(() => {
|
|
10668
|
+
this.webPanelsSignatureSent = signature;
|
|
10669
|
+
}).catch((error) => {
|
|
10670
|
+
logger.debug("[API MACHINE] Failed to publish web panels:", error);
|
|
10671
|
+
});
|
|
10672
|
+
this.cliUpdatePushChain = attempt.then(() => void 0);
|
|
10673
|
+
return attempt;
|
|
10674
|
+
}
|
|
10650
10675
|
publishAgentHibernation() {
|
|
10651
10676
|
const idleMs = this.agentHibernationIdleMs;
|
|
10652
10677
|
if (idleMs === null || !this.socket?.connected) return Promise.resolve();
|
|
@@ -11381,9 +11406,12 @@ class ApiMachineClient {
|
|
|
11381
11406
|
// leaves a stale-pid value visible longer than needed.
|
|
11382
11407
|
...this.claudeAuthState ? { claudeAuth: this.claudeAuthState } : {},
|
|
11383
11408
|
// B-587 capability + setting (same restamp discipline).
|
|
11384
|
-
...this.agentHibernationIdleMs !== null ? { agentHibernation: { idleMs: this.agentHibernationIdleMs, rpcAvailable: true, detectedAt: now } } : {}
|
|
11409
|
+
...this.agentHibernationIdleMs !== null ? { agentHibernation: { idleMs: this.agentHibernationIdleMs, rpcAvailable: true, detectedAt: now } } : {},
|
|
11410
|
+
// B-510: re-ship the declared panels (also clears a stale list).
|
|
11411
|
+
...Array.isArray(this.webPanels) ? { webPanels: { panels: this.webPanels, updatedAt: now } } : {}
|
|
11385
11412
|
};
|
|
11386
11413
|
});
|
|
11414
|
+
if (Array.isArray(this.webPanels)) this.webPanelsSignatureSent = webPanelsSignature(this.webPanels);
|
|
11387
11415
|
this.webTerminal.startListTracking((terminals) => this.pushTerminalList(terminals));
|
|
11388
11416
|
if (!rpcAlreadyRegistered) this.rpcHandlerManager.onSocketConnect(socket);
|
|
11389
11417
|
this.syncResumeSessionRpcRegistration();
|
|
@@ -1,43 +1,44 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var socket_ioClient = require('socket.io-client');
|
|
4
|
-
var
|
|
5
|
-
var
|
|
6
|
-
var
|
|
7
|
-
var
|
|
4
|
+
var webPanels = require('./webPanels-FCgFKvVe.cjs');
|
|
5
|
+
var logger = require('./logger-C1GWx3gi.cjs');
|
|
6
|
+
var lidState = require('./lidState-Dv2wwFTj.cjs');
|
|
7
|
+
var mirrorProtocol = require('./mirrorProtocol-DEy2g1CB.cjs');
|
|
8
|
+
var configuration = require('./configuration-CMHZnp6G.cjs');
|
|
8
9
|
var cliUpdate = require('./cliUpdate-DsKXPFYp.cjs');
|
|
9
|
-
var registerCommonHandlers = require('./registerCommonHandlers-
|
|
10
|
+
var registerCommonHandlers = require('./registerCommonHandlers-Cj084Sg7.cjs');
|
|
10
11
|
var promises = require('node:fs/promises');
|
|
11
12
|
var path = require('node:path');
|
|
12
13
|
var os = require('node:os');
|
|
13
14
|
var node_child_process = require('node:child_process');
|
|
14
|
-
var persistence = require('./persistence-
|
|
15
|
+
var persistence = require('./persistence-BegE7NPa.cjs');
|
|
15
16
|
var authRelay = require('./authRelay-Dy1qU9td.cjs');
|
|
16
17
|
var limits = require('./limits-C-a7gr04.cjs');
|
|
17
|
-
var time = require('./time-
|
|
18
|
+
var time = require('./time-CrwIMHta.cjs');
|
|
18
19
|
var pty = require('node-pty');
|
|
19
20
|
var terminals = require('./terminals-B_bfC9c2.cjs');
|
|
20
21
|
var tmuxSocket = require('./tmuxSocket-D-Xt6Vn-.cjs');
|
|
21
|
-
var index = require('./index-
|
|
22
|
+
var index = require('./index-B0UjHlAe.cjs');
|
|
22
23
|
var node_crypto = require('node:crypto');
|
|
23
24
|
var node_fs = require('node:fs');
|
|
24
25
|
var axios = require('axios');
|
|
25
26
|
var projectPath = require('./projectPath-ChLhdOyt.cjs');
|
|
26
27
|
var ids = require('./ids-B6ZC0HGt.cjs');
|
|
27
28
|
var detectCLI = require('./detectCLI-DR9ZaN6B.cjs');
|
|
28
|
-
var localHappyAgentAuth = require('./localHappyAgentAuth-
|
|
29
|
+
var localHappyAgentAuth = require('./localHappyAgentAuth-DjYvkXvV.cjs');
|
|
29
30
|
var path$1 = require('./path-B7zW-WwE.cjs');
|
|
30
31
|
var oneShotPrompts = require('./oneShotPrompts-CL0dip9C.cjs');
|
|
31
|
-
var claudeSessionFork = require('./claudeSessionFork-
|
|
32
|
-
var codexAppServerClient = require('./codexAppServerClient-
|
|
33
|
-
var index$1 = require('./index-
|
|
32
|
+
var claudeSessionFork = require('./claudeSessionFork-DiSMYerV.cjs');
|
|
33
|
+
var codexAppServerClient = require('./codexAppServerClient-Dt5zxrun.cjs');
|
|
34
|
+
var index$1 = require('./index-C6O2vVjm.cjs');
|
|
34
35
|
var codexThreadFork = require('./codexThreadFork-DNekT4nQ.cjs');
|
|
35
|
-
var rateLimitWindows = require('./rateLimitWindows-
|
|
36
|
+
var rateLimitWindows = require('./rateLimitWindows-Dj_8voBK.cjs');
|
|
36
37
|
require('chalk');
|
|
37
38
|
require('node:util');
|
|
38
39
|
require('os');
|
|
39
40
|
require('child_process');
|
|
40
|
-
require('./package-
|
|
41
|
+
require('./package-SgqTYsjn.cjs');
|
|
41
42
|
require('util');
|
|
42
43
|
require('fs/promises');
|
|
43
44
|
require('crypto');
|
|
@@ -10489,6 +10490,9 @@ class ApiMachineClient {
|
|
|
10489
10490
|
claudeAuthState = null;
|
|
10490
10491
|
/** B-587: the machine's hibernation threshold, published as a capability. */
|
|
10491
10492
|
agentHibernationIdleMs = null;
|
|
10493
|
+
/** B-510: last normalized `webPanels` (null = never set → field not written). */
|
|
10494
|
+
webPanels = null;
|
|
10495
|
+
webPanelsSignatureSent = null;
|
|
10492
10496
|
rateLimitPushChain = Promise.resolve();
|
|
10493
10497
|
rateLimitPublisher = new RateLimitPublisher({
|
|
10494
10498
|
getCurrent: () => this.machine.daemonState?.rateLimits,
|
|
@@ -10668,6 +10672,27 @@ class ApiMachineClient {
|
|
|
10668
10672
|
return { agentHibernation: { idleMs } };
|
|
10669
10673
|
});
|
|
10670
10674
|
}
|
|
10675
|
+
/**
|
|
10676
|
+
* B-510: mirror the local `webPanels` declaration into daemonState. Every
|
|
10677
|
+
* daemonState write is a CAS + DB write + broadcast, so an unchanged list
|
|
10678
|
+
* (same signature as the last one sent) writes nothing.
|
|
10679
|
+
*/
|
|
10680
|
+
setWebPanels(panels) {
|
|
10681
|
+
this.webPanels = panels;
|
|
10682
|
+
const signature = webPanels.webPanelsSignature(panels);
|
|
10683
|
+
if (signature === this.webPanelsSignatureSent || !this.socket?.connected) return Promise.resolve();
|
|
10684
|
+
const attempt = this.cliUpdatePushChain.then(() => this.updateDaemonState((current) => ({
|
|
10685
|
+
...current ?? {},
|
|
10686
|
+
status: current?.status ?? "running",
|
|
10687
|
+
webPanels: { panels, updatedAt: Date.now() }
|
|
10688
|
+
}))).then(() => {
|
|
10689
|
+
this.webPanelsSignatureSent = signature;
|
|
10690
|
+
}).catch((error) => {
|
|
10691
|
+
logger.logger.debug("[API MACHINE] Failed to publish web panels:", error);
|
|
10692
|
+
});
|
|
10693
|
+
this.cliUpdatePushChain = attempt.then(() => void 0);
|
|
10694
|
+
return attempt;
|
|
10695
|
+
}
|
|
10671
10696
|
publishAgentHibernation() {
|
|
10672
10697
|
const idleMs = this.agentHibernationIdleMs;
|
|
10673
10698
|
if (idleMs === null || !this.socket?.connected) return Promise.resolve();
|
|
@@ -11402,9 +11427,12 @@ class ApiMachineClient {
|
|
|
11402
11427
|
// leaves a stale-pid value visible longer than needed.
|
|
11403
11428
|
...this.claudeAuthState ? { claudeAuth: this.claudeAuthState } : {},
|
|
11404
11429
|
// B-587 capability + setting (same restamp discipline).
|
|
11405
|
-
...this.agentHibernationIdleMs !== null ? { agentHibernation: { idleMs: this.agentHibernationIdleMs, rpcAvailable: true, detectedAt: now } } : {}
|
|
11430
|
+
...this.agentHibernationIdleMs !== null ? { agentHibernation: { idleMs: this.agentHibernationIdleMs, rpcAvailable: true, detectedAt: now } } : {},
|
|
11431
|
+
// B-510: re-ship the declared panels (also clears a stale list).
|
|
11432
|
+
...Array.isArray(this.webPanels) ? { webPanels: { panels: this.webPanels, updatedAt: now } } : {}
|
|
11406
11433
|
};
|
|
11407
11434
|
});
|
|
11435
|
+
if (Array.isArray(this.webPanels)) this.webPanelsSignatureSent = webPanels.webPanelsSignature(this.webPanels);
|
|
11408
11436
|
this.webTerminal.startListTracking((terminals) => this.pushTerminalList(terminals));
|
|
11409
11437
|
if (!rpcAlreadyRegistered) this.rpcHandlerManager.onSocketConnect(socket);
|
|
11410
11438
|
this.syncResumeSessionRpcRegistration();
|
|
@@ -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 './
|
|
5
|
-
import { e as ensurePrivateDirectory, h as hardenPrivateFile } from './configuration-
|
|
4
|
+
import { M as MAX_CHAT_ATTACHMENT_SOURCE_BYTES } from './pushNotifications-BdFjDjQe.mjs';
|
|
5
|
+
import { e as ensurePrivateDirectory, h as hardenPrivateFile } from './configuration-WMi4idBB.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
|
|
7
|
-
var configuration = require('./configuration-
|
|
6
|
+
var pushNotifications = require('./pushNotifications-DaLQUyi0.cjs');
|
|
7
|
+
var configuration = require('./configuration-CMHZnp6G.cjs');
|
|
8
8
|
|
|
9
9
|
const CLAUDE_ATTACHMENT_KINDS = [
|
|
10
10
|
"image/jpeg",
|
|
@@ -34,8 +34,8 @@ async function stageClaudeAttachments(attachments, options) {
|
|
|
34
34
|
await configuration.ensurePrivateDirectory(sessionDir);
|
|
35
35
|
const staged = [];
|
|
36
36
|
for (const attachment of attachments) {
|
|
37
|
-
if (attachment.data.length >
|
|
38
|
-
throw new Error(`Attachment exceeds the ${
|
|
37
|
+
if (attachment.data.length > pushNotifications.MAX_CHAT_ATTACHMENT_SOURCE_BYTES) {
|
|
38
|
+
throw new Error(`Attachment exceeds the ${pushNotifications.MAX_CHAT_ATTACHMENT_SOURCE_BYTES / 1024 / 1024} MB limit`);
|
|
39
39
|
}
|
|
40
40
|
const name = safeFileName(attachment.name || "file");
|
|
41
41
|
const targetPath = path.join(sessionDir, uniqueFileName(name));
|
|
@@ -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-WMi4idBB.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,
|
|
8
|
-
import { o as openBrowser } from './browser-
|
|
9
|
-
import { l as logger } from './logger
|
|
6
|
+
import { d as delay } from './time-65DcU6Jx.mjs';
|
|
7
|
+
import { g as readCredentials, k as readSettingsOutcome, u as updateSettings, w as writeCredentialsLegacy, m as writeCredentialsDataKey } from './persistence-Cr-wutZ4.mjs';
|
|
8
|
+
import { o as openBrowser } from './browser-CSYum7xH.mjs';
|
|
9
|
+
import { l as logger } from './logger-BtVhHnD8.mjs';
|
|
10
10
|
|
|
11
11
|
function generateWebAuthUrl(publicKey) {
|
|
12
12
|
const publicKeyBase64 = encodeBase64(publicKey, "base64url");
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var authRelay = require('./authRelay-Dy1qU9td.cjs');
|
|
4
|
-
var configuration = require('./configuration-
|
|
4
|
+
var configuration = require('./configuration-CMHZnp6G.cjs');
|
|
5
5
|
var node_crypto = require('node:crypto');
|
|
6
6
|
var tweetnacl = require('tweetnacl');
|
|
7
7
|
var axios = require('axios');
|
|
8
|
-
var time = require('./time-
|
|
9
|
-
var persistence = require('./persistence-
|
|
10
|
-
var browser = require('./browser-
|
|
11
|
-
var logger = require('./logger-
|
|
8
|
+
var time = require('./time-CrwIMHta.cjs');
|
|
9
|
+
var persistence = require('./persistence-BegE7NPa.cjs');
|
|
10
|
+
var browser = require('./browser-BohJK12g.cjs');
|
|
11
|
+
var logger = require('./logger-C1GWx3gi.cjs');
|
|
12
12
|
|
|
13
13
|
function generateWebAuthUrl(publicKey) {
|
|
14
14
|
const publicKeyBase64 = authRelay.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-Cr-wutZ4.mjs';
|
|
3
|
+
import { a as authAndSetupMachineIfNeeded } from './auth-BS6PaOOG.mjs';
|
|
4
|
+
import { c as configuration } from './configuration-WMi4idBB.mjs';
|
|
5
5
|
import { existsSync, rmSync } from 'node:fs';
|
|
6
6
|
import { createInterface } from 'node:readline';
|
|
7
|
-
import { a as checkIfDaemonRunningAndCleanupStaleState, b as stopDaemon } from './controlClient-
|
|
8
|
-
import { l as logger } from './logger
|
|
7
|
+
import { a as checkIfDaemonRunningAndCleanupStaleState, b as stopDaemon } from './controlClient-BWUJrj3t.mjs';
|
|
8
|
+
import { l as logger } from './logger-BtVhHnD8.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-65DcU6Jx.mjs';
|
|
17
|
+
import './browser-CSYum7xH.mjs';
|
|
18
18
|
import 'open';
|
|
19
19
|
import 'node:path';
|
|
20
|
-
import './package-
|
|
20
|
+
import './package-BPPebGQF.mjs';
|
|
21
21
|
import 'node:util';
|
|
22
22
|
|
|
23
23
|
function localMachineIdentityStatus(machineId) {
|