very-happy-cli 0.2.183 → 0.2.185
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-B-aMuEzO.cjs → AcpBackend-CCqL9mP1.cjs} +3 -3
- package/dist/{AcpBackend-9c-Jeaxd.mjs → AcpBackend-DkoqWhTa.mjs} +3 -3
- package/dist/{AcpSessionManager-CS0FOSQk.mjs → AcpSessionManager-BNPex8tJ.mjs} +2 -2
- package/dist/{AcpSessionManager-BxXe24AV.cjs → AcpSessionManager-DrtAJQUH.cjs} +2 -2
- package/dist/{BasePermissionHandler-BREjppjP.cjs → BasePermissionHandler-DJZITwmL.cjs} +1 -1
- package/dist/{BasePermissionHandler-BJ1ID_Br.mjs → BasePermissionHandler-Dd4oGPDg.mjs} +1 -1
- package/dist/{acpSessionResume-BKtI9Jq_.mjs → acpSessionResume-_2NtETqb.mjs} +1 -1
- package/dist/{acpSessionResume-mVoJ75vI.cjs → acpSessionResume-umHzSMbQ.cjs} +1 -1
- package/dist/{agentHome-rzjm56o4.cjs → agentHome-CmIMqMWy.cjs} +4 -4
- package/dist/{agentHome-B8Ctr_Nu.mjs → agentHome-Dv_hRIt7.mjs} +4 -4
- package/dist/{api-xZiqVynF.cjs → api-BSz8MYte.cjs} +67 -17
- package/dist/{api-C29WLYkW.mjs → api-BTS8mqLy.mjs} +67 -17
- package/dist/{apiMachine-Dz6Yfk0m.mjs → apiMachine-BcjccOmd.mjs} +14 -14
- package/dist/{apiMachine-B-FNBIYG.cjs → apiMachine-utCDabnO.cjs} +14 -14
- package/dist/{attachmentContent-DwY0uIg6.mjs → attachmentContent-DpOzgDTw.mjs} +2 -2
- package/dist/{attachmentContent-COV4LF8k.cjs → attachmentContent-hkdGP2NV.cjs} +2 -2
- package/dist/{auth-CYtk9_ga.cjs → auth-B8nCUEiK.cjs} +5 -5
- package/dist/{auth-xT70IYMx.mjs → auth-BKD2U9S2.mjs} +5 -5
- package/dist/{auth-DvbSDalm.mjs → auth-CpbTj74y.mjs} +8 -8
- package/dist/{auth-D_qsnVr3.cjs → auth-DzXdF08E.cjs} +8 -8
- package/dist/{auto-IiPqvIsN.mjs → auto-C-NK2JS8.mjs} +17 -17
- package/dist/{auto-DT_PfpCx.cjs → auto-E3ouHO37.cjs} +17 -17
- package/dist/{bootstrap-C50NkfPx.cjs → bootstrap-DIMkxIbR.cjs} +2 -2
- package/dist/{bootstrap-DS8Acdhm.mjs → bootstrap-DV4dqeCe.mjs} +2 -2
- package/dist/{browser-1j9gdZoD.mjs → browser-C0xt1NE-.mjs} +1 -1
- package/dist/{browser-CxKZLd2T.cjs → browser-Ch50ZchJ.cjs} +1 -1
- package/dist/{claudeLocal-CgNWpepB.cjs → claudeLocal-Curd8-dn.cjs} +5 -5
- package/dist/{claudeLocal-U1Fa9sJo.mjs → claudeLocal-D-U3fIdS.mjs} +5 -5
- package/dist/{claudeLocalLauncher-IyFm0D6a.cjs → claudeLocalLauncher-BEJ9Wad_.cjs} +10 -10
- package/dist/{claudeLocalLauncher-BjCsfZUE.mjs → claudeLocalLauncher-BTNUVzRK.mjs} +10 -10
- package/dist/{claudeSessionFork-BUO1XdSm.cjs → claudeSessionFork-DMdeScGk.cjs} +1 -1
- package/dist/{claudeSessionFork-6-1vKISn.mjs → claudeSessionFork-JPEHVbfR.mjs} +1 -1
- package/dist/{client-DcKJ0ul_.cjs → client-C54hMWx6.cjs} +2 -2
- package/dist/{client-BgHvK7lo.mjs → client-Ct1rnpJw.mjs} +2 -2
- package/dist/{client-DfDyE322.mjs → client-D1rJt15-.mjs} +18 -5
- package/dist/{client-5_zDNdOh.mjs → client-D2lOnvzs.mjs} +2 -2
- package/dist/{client--vZueZYF.cjs → client-dpo5EbS9.cjs} +18 -5
- package/dist/{client-DYGDBD0M.cjs → client-qgKef7S6.cjs} +2 -2
- package/dist/codex/happyMcpStdioBridge.cjs +16 -16
- package/dist/codex/happyMcpStdioBridge.mjs +16 -16
- package/dist/{codexAppServerClient-DvBg4hGc.mjs → codexAppServerClient-CM3O0zHW.mjs} +3 -3
- package/dist/{codexAppServerClient-C3nrTfwY.cjs → codexAppServerClient-DGeqZViU.cjs} +3 -3
- package/dist/{codexCommand-Bqp2--g_.mjs → codexCommand-CkdopWS7.mjs} +42 -42
- package/dist/{codexCommand-DSiU6MNt.cjs → codexCommand-D_8fbJEk.cjs} +42 -42
- package/dist/{codexTermination-DsliWl_s.mjs → codexTermination-FO52Ahcx.mjs} +1 -1
- package/dist/{codexTermination-D9TRTglF.cjs → codexTermination-MG2j2DDX.cjs} +1 -1
- package/dist/{config-DeaqRn3o.mjs → config-CppOKnWe.mjs} +3 -3
- package/dist/{config-CRhWiOwi.cjs → config-IDbpY1Am.cjs} +3 -3
- package/dist/{configuration-K3I6yOjZ.cjs → configuration-CwfmwaLU.cjs} +1 -1
- package/dist/{configuration-elzht62L.mjs → configuration-HPdj5Til.mjs} +1 -1
- package/dist/{connect-CT5cOlnC.mjs → connect-1YK7vPbW.mjs} +13 -13
- package/dist/{connect-B5UbfmO3.cjs → connect-BNlBIAM8.cjs} +13 -13
- package/dist/{context-DNKNF8Yh.cjs → context-D3vDWjiI.cjs} +1 -1
- package/dist/{context-CLj1_RYF.mjs → context-DetK5c-x.mjs} +1 -1
- package/dist/{controlClient-CuYQs2aZ.mjs → controlClient-DBylxaEh.mjs} +14 -4
- package/dist/{controlClient-ChqmxgbB.cjs → controlClient-DTMI1aTp.cjs} +14 -3
- package/dist/{createSessionMetadata-QfiRx4Tf.cjs → createSessionMetadata-D2Ll7PlQ.cjs} +2 -2
- package/dist/{createSessionMetadata-C1MbLQnh.mjs → createSessionMetadata-D8pfpX4V.mjs} +2 -2
- package/dist/{defaultPermissionMode-U9LuUeQh.mjs → defaultPermissionMode-Bkhj_DwT.mjs} +2 -2
- package/dist/{defaultPermissionMode-DQmdZZIg.cjs → defaultPermissionMode-DVXkcryy.cjs} +2 -2
- package/dist/{deterministicJson-BBRUcB8i.cjs → deterministicJson-DUCYjhHe.cjs} +13 -13
- package/dist/{deterministicJson-BixlyPWV.mjs → deterministicJson-cEWItQun.mjs} +13 -13
- package/dist/{doctor-Dban2oE2.mjs → doctor-DpWtxNeT.mjs} +7 -7
- package/dist/{doctor-CKgHUV4W.cjs → doctor-tLRILlmz.cjs} +7 -7
- package/dist/{downloadTarget-VUTd9lEO.mjs → downloadTarget-B5b5BHb2.mjs} +6 -6
- package/dist/{downloadTarget-CmC11Y7E.cjs → downloadTarget-Ci5wcYC2.cjs} +6 -6
- package/dist/{ensureDaemonRunning-L0fl0cLE.cjs → ensureDaemonRunning-Dsv8UPwx.cjs} +5 -5
- package/dist/{ensureDaemonRunning-khb8Nr1n.mjs → ensureDaemonRunning-GDGwNDGF.mjs} +5 -5
- package/dist/{handleResumeCommand-D9myBN2N.cjs → handleResumeCommand-CncudrQd.cjs} +5 -5
- package/dist/{handleResumeCommand-CLDGWpTJ.mjs → handleResumeCommand-DW7Ml1u5.mjs} +5 -5
- package/dist/{index-DgA79dVw.cjs → index-BEHzEYP0.cjs} +39 -39
- package/dist/{index-BdJs0465.cjs → index-Bh806Q-1.cjs} +3 -3
- package/dist/{index-IRI8s8kz.mjs → index-C1qLnBOk.mjs} +40 -40
- package/dist/{index-CtwqBeH6.mjs → index-DRWlaLbe.mjs} +3 -3
- package/dist/{index-BptfFoXM.mjs → index-DisBaRvM.mjs} +10 -1
- package/dist/{index-y4JNyz9H.cjs → index-Dzb_Bsfu.cjs} +4 -4
- package/dist/{index-Fq-jxjsB.cjs → index-Ub-5xbcU.cjs} +10 -1
- package/dist/{index-COSjJPIv.cjs → index-Vx4EQ6wI.cjs} +4 -4
- package/dist/{index-GkkbUZX-.mjs → index-Wf6mKJq9.mjs} +4 -4
- package/dist/{index-BMZx-699.mjs → index-bT1X9Brv.mjs} +4 -4
- package/dist/index.cjs +2 -2
- package/dist/index.mjs +2 -2
- package/dist/{install-cn98bTCs.cjs → install-CRs4tGBa.cjs} +3 -3
- package/dist/{install-JvCk2PJV.mjs → install-DmF9wfwV.mjs} +3 -3
- package/dist/lib.cjs +12 -12
- package/dist/lib.d.cts +11 -0
- package/dist/lib.d.mts +11 -0
- package/dist/lib.mjs +12 -12
- package/dist/{lidState-DXeYTsrm.mjs → lidState-CG9jFcML.mjs} +1 -1
- package/dist/{lidState-Bcs5kRHi.cjs → lidState-wwiu6M3p.cjs} +1 -1
- package/dist/{localHappyAgentAuth-C1A4ChCR.mjs → localHappyAgentAuth-CWha8BiX.mjs} +1 -1
- package/dist/{localHappyAgentAuth-CypTSe42.cjs → localHappyAgentAuth-UoytSUX0.cjs} +1 -1
- package/dist/{logger-RMPh5aqe.mjs → logger-BjXkscIr.mjs} +2 -2
- package/dist/{logger-Cgwz30rK.cjs → logger-CIUMiSLo.cjs} +2 -2
- package/dist/{machineMetadata-BSOGMNRi.cjs → machineMetadata-BPlyxzxb.cjs} +3 -3
- package/dist/{machineMetadata-BTUtPRth.mjs → machineMetadata-Ca4Dpy6s.mjs} +3 -3
- package/dist/{main-DNDL6t8z.mjs → main-CS1U9i4s.mjs} +53 -45
- package/dist/{main-4iiwYpCR.cjs → main-FD8mmcsK.cjs} +53 -45
- package/dist/{mcp-DXYDPOpJ.mjs → mcp-BS6rdR8p.mjs} +15 -15
- package/dist/{mcp-C7eEoGhz.cjs → mcp-C7Rm1dTM.cjs} +15 -15
- package/dist/{mirrorProtocol-DQRy5PaT.mjs → mirrorProtocol-C3Anki4S.mjs} +3 -3
- package/dist/{mirrorProtocol-c5g5MgNc.cjs → mirrorProtocol-CMJ2HOZF.cjs} +3 -3
- package/dist/{package-3aPiSpZj.cjs → package-CRDjc5vK.cjs} +7 -7
- package/dist/{package-CTrz6U3C.mjs → package-Do0Y9bGA.mjs} +7 -7
- package/dist/{panels-B5sZ84vA.mjs → panels-C-jss7nF.mjs} +5 -5
- package/dist/{panels-BmsmKHbw.cjs → panels-DwTHrZuo.cjs} +5 -5
- package/dist/{peerTools-DIPOX033.mjs → peerTools-CL7zBxlC.mjs} +5 -5
- package/dist/{peerTools-Dxe7iCi_.cjs → peerTools-SLRntgX6.cjs} +5 -5
- package/dist/{persistence-DZRMUZZS.cjs → persistence-CNWBdUH2.cjs} +2 -2
- package/dist/{persistence-zJo4r7YI.mjs → persistence-CmVwM5uq.mjs} +2 -2
- package/dist/{piRunnerArgs-BSPiS6tZ.cjs → piRunnerArgs-CXJx3PPx.cjs} +1 -1
- package/dist/{piRunnerArgs-IVdoHUB6.mjs → piRunnerArgs-K0K9Y0Yq.mjs} +1 -1
- package/dist/{piRuntime-BvHO3vgO.mjs → piRuntime-BSoHy-QJ.mjs} +1 -1
- package/dist/{piRuntime-BJzjlMcN.cjs → piRuntime-Bv41vG05.cjs} +1 -1
- package/dist/{piTerminal-D7vBOpkE.mjs → piTerminal-B8acGxsm.mjs} +17 -17
- package/dist/{piTerminal-Cz4pW55d.cjs → piTerminal-DSs-fnps.cjs} +17 -17
- package/dist/providerBinding-B-Qbx9W2.cjs +140 -0
- package/dist/providerBinding-CYubGg-Z.mjs +132 -0
- package/dist/{pushNotifications-CgIrYml3.cjs → pushNotifications-C651e0ZZ.cjs} +3 -3
- package/dist/{pushNotifications-C4R9-1hU.mjs → pushNotifications-DnpJJ7VR.mjs} +3 -3
- package/dist/{query-CZQG1PdU.cjs → query-DXFx2VZY.cjs} +1 -1
- package/dist/{query-DKPmDsHS.mjs → query-rxLftxvh.mjs} +1 -1
- package/dist/{rateLimitWindows-CPV0nLeq.cjs → rateLimitWindows-1WoBs8ln.cjs} +1 -1
- package/dist/{rateLimitWindows-HlHATOQ0.mjs → rateLimitWindows-D9mQRGHv.mjs} +1 -1
- package/dist/{registerCommonHandlers-a9lHojSV.mjs → registerCommonHandlers-DpBxSCBi.mjs} +2 -2
- package/dist/{registerCommonHandlers-D1pC83Op.cjs → registerCommonHandlers-K-BTp2iR.cjs} +2 -2
- package/dist/{registerKillSessionHandler-Bp-fuH-w.mjs → registerKillSessionHandler-BDxd20fg.mjs} +6 -6
- package/dist/{registerKillSessionHandler-nTi2vVJy.cjs → registerKillSessionHandler-DwPEAS2G.cjs} +6 -6
- package/dist/{remoteSessionClient-Cwrddscy.mjs → remoteSessionClient-DHWfDMHA.mjs} +5 -5
- package/dist/{remoteSessionClient-HQAKAvVd.cjs → remoteSessionClient-DnFblfFz.cjs} +5 -5
- package/dist/{reportProgressTool-Be-8ADI4.cjs → reportProgressTool-CYgnezAO.cjs} +3 -3
- package/dist/{reportProgressTool-CcZ32nrd.mjs → reportProgressTool-DJXfK6rp.mjs} +3 -3
- package/dist/{run-CxRJk9qq.cjs → run-BChqUxs6.cjs} +77 -40
- package/dist/{run-BBU8GyxE.mjs → run-BkixRBWm.mjs} +77 -40
- package/dist/{runClaude-Dd5zJaUZ.cjs → runClaude-Bdw9vTgv.cjs} +39 -24
- package/dist/{runClaude-DR6pEQwd.mjs → runClaude-FWTCLnVq.mjs} +39 -24
- package/dist/{runClaudeDeps-COgZaUZm.mjs → runClaudeDeps-C6mCzhtO.mjs} +47 -43
- package/dist/{runClaudeDeps-CTtZ_1mC.cjs → runClaudeDeps-CN_moqup.cjs} +42 -38
- package/dist/{runGemini-DVoVUfPp.mjs → runGemini-CI7ut_ng.mjs} +33 -33
- package/dist/{runGemini-DX72qB92.cjs → runGemini-CzPwEltY.cjs} +33 -33
- package/dist/{runOpenClaw-BHjzmzeC.mjs → runOpenClaw-8V2K_-lg.mjs} +18 -18
- package/dist/{runOpenClaw-BSg4hFVt.cjs → runOpenClaw-CLw64Nmq.cjs} +18 -18
- package/dist/{sandbox-CWR9EqoN.mjs → sandbox-BMkBdvHW.mjs} +4 -4
- package/dist/{sandbox-D1T_hmgZ.cjs → sandbox-DD2oQTt3.cjs} +4 -4
- package/dist/{selfCheck-CE7vlnNS.cjs → selfCheck-0jELpLE9.cjs} +37 -36
- package/dist/selfCheck-DgWZfw5E.mjs +86 -0
- package/dist/{send-BDF0Zvxo.mjs → send-BNjwFaVp.mjs} +8 -8
- package/dist/{send-BxZqRCcG.cjs → send-BoLglO1t.cjs} +8 -8
- package/dist/{server-B4JtnDLF.mjs → server-C5wOp8jw.mjs} +4 -4
- package/dist/{server-DB7_70Mi.cjs → server-Uw82k7zD.cjs} +6 -6
- package/dist/{sessionLock-BXvFN6uw.cjs → sessionLock-BTo7Cdbi.cjs} +3 -3
- package/dist/{sessionLock-CXOOX-VD.mjs → sessionLock-YMRCi-Ec.mjs} +3 -3
- package/dist/{sessionOps-BWlDlFYP.cjs → sessionOps-BDHEzyAY.cjs} +4 -4
- package/dist/{sessionOps-ByVggB_q.mjs → sessionOps-BO6AesNJ.mjs} +4 -4
- package/dist/sessionProvider-CB9lGJdF.mjs +109 -0
- package/dist/sessionProvider-DLdJJV6A.cjs +114 -0
- package/dist/{sessionScanner-DkxPB5VA.cjs → sessionScanner-3TevonZd.cjs} +3 -3
- package/dist/{sessionScanner-r66RtF95.mjs → sessionScanner-BkukogZy.mjs} +3 -3
- package/dist/{sessions-BiJTxFy9.cjs → sessions-BkBcZSj7.cjs} +10 -10
- package/dist/{sessions-C1lLK_a9.mjs → sessions-Bx-6fXTL.mjs} +10 -10
- package/dist/{setupOfflineReconnection-CecTiFZ-.cjs → setupOfflineReconnection-DMfoVL-0.cjs} +2 -2
- package/dist/{setupOfflineReconnection-Bl3DuakT.mjs → setupOfflineReconnection-DYzysFFJ.mjs} +2 -2
- package/dist/{spawn-D-8MlEM6.mjs → spawn-CHC32rLr.mjs} +14 -14
- package/dist/{spawn-D79mVa3h.cjs → spawn-DvyBhowH.cjs} +14 -14
- package/dist/{spawnAgents-Sfnf-4pN.cjs → spawnAgents-D15n6tAj.cjs} +1 -1
- package/dist/{spawnAgents-DJHjq01u.mjs → spawnAgents-jXo9jIYo.mjs} +1 -1
- package/dist/{spawnHappyCLI-CQwQs9G5.cjs → spawnHappyCLI-WYJCvAWD.cjs} +1 -1
- package/dist/{spawnHappyCLI-v_bJwZ4Z.mjs → spawnHappyCLI-e9MaJWB0.mjs} +1 -1
- package/dist/{specialCommands-yMnFvS-W.mjs → specialCommands-D00VrQ09.mjs} +3 -3
- package/dist/{specialCommands-CWMVfT5s.cjs → specialCommands-DqrQnKHC.cjs} +3 -3
- package/dist/{startFileWatcher-BCDkT_tr.mjs → startFileWatcher-CvUUesns.mjs} +1 -1
- package/dist/{startFileWatcher-GW4_E7dV.cjs → startFileWatcher-VFZ-Bpwa.cjs} +1 -1
- package/dist/{startupSessionCreate-tBRa_ze8.cjs → startupSessionCreate-B25xTUJ4.cjs} +1 -1
- package/dist/{startupSessionCreate-BcAGYo51.mjs → startupSessionCreate-B6HNLg0g.mjs} +1 -1
- package/dist/{streamRelay-BZ8drtof.cjs → streamRelay-CtTpf-Li.cjs} +1 -1
- package/dist/{streamRelay-BEDiy6_b.mjs → streamRelay-GzHxvMem.mjs} +1 -1
- package/dist/{sync-BMDkyo75.cjs → sync-DliZ1zZh.cjs} +1 -1
- package/dist/{sync--QUIOuf8.mjs → sync-HPnxI4fz.mjs} +1 -1
- package/dist/{systemPrompt-DoHSXrH0.cjs → systemPrompt-CYvRvanR.cjs} +2 -2
- package/dist/{systemPrompt-O0Kd6vbA.mjs → systemPrompt-D9JJpzl_.mjs} +2 -2
- package/dist/{teams-CTF1gT48.mjs → teams-C0PJlIMz.mjs} +7 -7
- package/dist/{teams-BkZop-sP.cjs → teams-D7Ad6YSf.cjs} +7 -7
- package/dist/{template-CeC1dYe-.cjs → template-BLJxflCH.cjs} +1 -1
- package/dist/{template-D1fm22em.mjs → template-YlpbYGeQ.mjs} +1 -1
- package/dist/{time-CdCotzKU.cjs → time-BCGGrWp4.cjs} +1 -1
- package/dist/{time-B2KKdAym.mjs → time-BbJ-NWcl.mjs} +1 -1
- package/dist/{titleGenerator-BFDczskR.mjs → titleGenerator-03Y2uoZW.mjs} +1 -1
- package/dist/{titleGenerator-DZH1XqAf.cjs → titleGenerator-IrI84kqh.cjs} +2 -2
- package/dist/{todo-C2gyOUom.mjs → todo-DOh8KaxD.mjs} +6 -6
- package/dist/{todo-DnTFTHmV.cjs → todo-DdV9_uEu.cjs} +6 -6
- package/dist/{tools-C8rpwyIl.cjs → tools-DeoxWyQ0.cjs} +1 -1
- package/dist/{tools-DUjkqSQL.mjs → tools-WXF7ApAe.mjs} +1 -1
- package/dist/{uninstall-B5Ew50mZ.mjs → uninstall-BVYlC0jw.mjs} +3 -3
- package/dist/{uninstall-CKMPWTMv.cjs → uninstall-oGvAKOlN.cjs} +3 -3
- package/package.json +7 -7
- package/dist/selfCheck-ZGgBtxFQ.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-CIUMiSLo.cjs');
|
|
7
|
+
var time = require('./time-BCGGrWp4.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-CRDjc5vK.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-BjXkscIr.mjs';
|
|
5
|
+
import { d as delay } from './time-BbJ-NWcl.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-Do0Y9bGA.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,6 +1,6 @@
|
|
|
1
1
|
import { createId } from '@paralleldrive/cuid2';
|
|
2
|
-
import { s as streamKeyOf, g as createEnvelope } from './index-
|
|
3
|
-
import { t as textResultPayload, b as toolResultPayload } from './api-
|
|
2
|
+
import { s as streamKeyOf, g as createEnvelope } from './index-DisBaRvM.mjs';
|
|
3
|
+
import { t as textResultPayload, b as toolResultPayload } from './api-BTS8mqLy.mjs';
|
|
4
4
|
|
|
5
5
|
function turnOptions(turnId, time) {
|
|
6
6
|
return turnId ? { turn: turnId, time } : { time };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var cuid2 = require('@paralleldrive/cuid2');
|
|
4
|
-
var index = require('./index-
|
|
5
|
-
var api = require('./api-
|
|
4
|
+
var index = require('./index-Ub-5xbcU.cjs');
|
|
5
|
+
var api = require('./api-BSz8MYte.cjs');
|
|
6
6
|
|
|
7
7
|
function turnOptions(turnId, time) {
|
|
8
8
|
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-HPdj5Til.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-CwfmwaLU.cjs');
|
|
6
6
|
|
|
7
7
|
const SESSION_MODE_DIR = "session-modes";
|
|
8
8
|
const ACP_PERMISSION_MODES = ["default", "acceptEdits", "plan", "bypassPermissions"];
|
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
var chalk = require('chalk');
|
|
4
4
|
var os = require('node:os');
|
|
5
|
-
var persistence = require('./persistence-
|
|
5
|
+
var persistence = require('./persistence-CNWBdUH2.cjs');
|
|
6
6
|
require('node:fs');
|
|
7
|
-
require('./logger-
|
|
7
|
+
require('./logger-CIUMiSLo.cjs');
|
|
8
8
|
var loginShellEnv = require('./loginShellEnv-BkuYtExZ.cjs');
|
|
9
9
|
require('node:fs/promises');
|
|
10
|
-
require('./configuration-
|
|
10
|
+
require('./configuration-CwfmwaLU.cjs');
|
|
11
11
|
require('node:path');
|
|
12
|
-
require('./package-
|
|
12
|
+
require('./package-CRDjc5vK.cjs');
|
|
13
13
|
require('zod');
|
|
14
14
|
require('./authRelay-Dy1qU9td.cjs');
|
|
15
15
|
require('node:crypto');
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import chalk from 'chalk';
|
|
2
2
|
import { homedir } from 'node:os';
|
|
3
|
-
import { r as readSettings, u as updateSettings } from './persistence-
|
|
3
|
+
import { r as readSettings, u as updateSettings } from './persistence-CmVwM5uq.mjs';
|
|
4
4
|
import 'node:fs';
|
|
5
|
-
import './logger-
|
|
5
|
+
import './logger-BjXkscIr.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-HPdj5Til.mjs';
|
|
9
9
|
import 'node:path';
|
|
10
|
-
import './package-
|
|
10
|
+
import './package-Do0Y9bGA.mjs';
|
|
11
11
|
import 'zod';
|
|
12
12
|
import './authRelay-DhQhkBvX.mjs';
|
|
13
13
|
import 'node:crypto';
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var axios = require('axios');
|
|
4
|
-
var logger = require('./logger-
|
|
5
|
-
var lidState = require('./lidState-
|
|
4
|
+
var logger = require('./logger-CIUMiSLo.cjs');
|
|
5
|
+
var lidState = require('./lidState-wwiu6M3p.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-C651e0ZZ.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-BCGGrWp4.cjs');
|
|
12
|
+
var configuration = require('./configuration-CwfmwaLU.cjs');
|
|
13
13
|
var node_crypto = require('node:crypto');
|
|
14
|
-
var index = require('./index-
|
|
15
|
-
var registerCommonHandlers = require('./registerCommonHandlers-
|
|
14
|
+
var index = require('./index-Ub-5xbcU.cjs');
|
|
15
|
+
var registerCommonHandlers = require('./registerCommonHandlers-K-BTp2iR.cjs');
|
|
16
16
|
var cuid2 = require('@paralleldrive/cuid2');
|
|
17
|
-
var sync = require('./sync-
|
|
17
|
+
var sync = require('./sync-DliZ1zZh.cjs');
|
|
18
18
|
var backgroundTaskActivity = require('./backgroundTaskActivity-CBvUdj39.cjs');
|
|
19
|
-
var controlClient = require('./controlClient-
|
|
19
|
+
var controlClient = require('./controlClient-DTMI1aTp.cjs');
|
|
20
20
|
var chalk = require('chalk');
|
|
21
21
|
|
|
22
22
|
async function hmac_sha512(key, data) {
|
|
@@ -1200,6 +1200,17 @@ class PromptQueueDrain {
|
|
|
1200
1200
|
}
|
|
1201
1201
|
}
|
|
1202
1202
|
|
|
1203
|
+
function advanceInboundCursor(current, handled) {
|
|
1204
|
+
let next = current;
|
|
1205
|
+
while (handled.has(next + 1)) {
|
|
1206
|
+
next += 1;
|
|
1207
|
+
}
|
|
1208
|
+
for (const seq of handled) {
|
|
1209
|
+
if (seq <= next) handled.delete(seq);
|
|
1210
|
+
}
|
|
1211
|
+
return { next, gap: handled.size > 0 };
|
|
1212
|
+
}
|
|
1213
|
+
|
|
1203
1214
|
const guardOptions = { log: (message) => logger.logger.debug(message) };
|
|
1204
1215
|
class ApiSessionClient extends node_events.EventEmitter {
|
|
1205
1216
|
/**
|
|
@@ -1274,6 +1285,8 @@ class ApiSessionClient extends node_events.EventEmitter {
|
|
|
1274
1285
|
receiveSync;
|
|
1275
1286
|
directInboundLocalIds = /* @__PURE__ */ new Set();
|
|
1276
1287
|
routedInboundLocalIds = /* @__PURE__ */ new Set();
|
|
1288
|
+
/** B-806: seqs above `lastSeq` our own POSTs confirmed (see inboundCursor.ts). */
|
|
1289
|
+
handledSeqs = /* @__PURE__ */ new Set();
|
|
1277
1290
|
handoverInFlight = null;
|
|
1278
1291
|
/** B-265 reconnect: the message cursor was seeded from the server, so
|
|
1279
1292
|
* nothing before it is history to replay — but socket fast-path routing
|
|
@@ -1369,8 +1382,9 @@ class ApiSessionClient extends node_events.EventEmitter {
|
|
|
1369
1382
|
}
|
|
1370
1383
|
const localId = data.body.message.localId;
|
|
1371
1384
|
const relayAccepted = !!localId && this.directInboundLocalIds.delete(localId);
|
|
1372
|
-
if (localId && this.routedInboundLocalIds.has(localId)) {
|
|
1385
|
+
if (localId && this.routedInboundLocalIds.has(localId) || this.isOwnOutbound(messageSeq, localId)) {
|
|
1373
1386
|
this.lastSeq = messageSeq;
|
|
1387
|
+
this.advanceCursorThroughHandled();
|
|
1374
1388
|
return;
|
|
1375
1389
|
}
|
|
1376
1390
|
if (relayAccepted) {
|
|
@@ -1381,6 +1395,7 @@ class ApiSessionClient extends node_events.EventEmitter {
|
|
|
1381
1395
|
this.routeIncomingMessage(body, localId);
|
|
1382
1396
|
if (localId) this.rememberRoutedInbound(localId);
|
|
1383
1397
|
this.lastSeq = messageSeq;
|
|
1398
|
+
this.advanceCursorThroughHandled();
|
|
1384
1399
|
} else if (data.body.t === "update-session") {
|
|
1385
1400
|
if (data.body.metadata && data.body.metadata.version > this.metadataVersion) {
|
|
1386
1401
|
this.metadata = authRelay.decrypt(this.encryptionKey, this.encryptionVariant, authRelay.decodeBase64(data.body.metadata.value));
|
|
@@ -1722,6 +1737,7 @@ class ApiSessionClient extends node_events.EventEmitter {
|
|
|
1722
1737
|
maxSeq = message.seq;
|
|
1723
1738
|
}
|
|
1724
1739
|
if (skipRouting) continue;
|
|
1740
|
+
if (message.seq <= this.lastSeq || this.isOwnOutbound(message.seq, message.localId)) continue;
|
|
1725
1741
|
const relayAccepted = !!message.localId && this.directInboundLocalIds.delete(message.localId);
|
|
1726
1742
|
if (message.localId && this.routedInboundLocalIds.has(message.localId)) {
|
|
1727
1743
|
continue;
|
|
@@ -1744,7 +1760,7 @@ class ApiSessionClient extends node_events.EventEmitter {
|
|
|
1744
1760
|
});
|
|
1745
1761
|
}
|
|
1746
1762
|
}
|
|
1747
|
-
this.lastSeq = Math.max(this.lastSeq, maxSeq);
|
|
1763
|
+
this.lastSeq = advanceInboundCursor(Math.max(this.lastSeq, maxSeq), this.handledSeqs).next;
|
|
1748
1764
|
const hasMore = !!response.data.hasMore;
|
|
1749
1765
|
if (hasMore && maxSeq === afterSeq) {
|
|
1750
1766
|
logger.logger.debug("[API] fetchMessages pagination stalled, stopping to avoid infinite loop", {
|
|
@@ -1776,8 +1792,7 @@ class ApiSessionClient extends node_events.EventEmitter {
|
|
|
1776
1792
|
}
|
|
1777
1793
|
);
|
|
1778
1794
|
const messages = Array.isArray(response.data.messages) ? response.data.messages : [];
|
|
1779
|
-
|
|
1780
|
-
this.lastSeq = maxSeq;
|
|
1795
|
+
this.noteHandledSeqs(messages.map((message) => message.seq));
|
|
1781
1796
|
this.pushCommittedMessagesToRelay(batch, messages);
|
|
1782
1797
|
this.pendingOutbox.splice(0, batch.length);
|
|
1783
1798
|
}
|
|
@@ -1798,6 +1813,27 @@ class ApiSessionClient extends node_events.EventEmitter {
|
|
|
1798
1813
|
}
|
|
1799
1814
|
return true;
|
|
1800
1815
|
}
|
|
1816
|
+
/**
|
|
1817
|
+
* B-806: an ack proves only OUR messages exist. Hold them as handled and
|
|
1818
|
+
* move the cursor through a contiguous run; a gap below them (a Web
|
|
1819
|
+
* message whose update has not been applied) is filled by a fetch.
|
|
1820
|
+
*/
|
|
1821
|
+
noteHandledSeqs(seqs) {
|
|
1822
|
+
for (const seq of seqs) {
|
|
1823
|
+
if (typeof seq === "number" && seq > this.lastSeq) this.handledSeqs.add(seq);
|
|
1824
|
+
}
|
|
1825
|
+
this.advanceCursorThroughHandled();
|
|
1826
|
+
}
|
|
1827
|
+
advanceCursorThroughHandled() {
|
|
1828
|
+
const { next, gap } = advanceInboundCursor(this.lastSeq, this.handledSeqs);
|
|
1829
|
+
this.lastSeq = next;
|
|
1830
|
+
if (gap) this.receiveSync.invalidate();
|
|
1831
|
+
}
|
|
1832
|
+
/** Our own output (acked, or still in flight) seen on the inbound path: never routed. */
|
|
1833
|
+
isOwnOutbound(seq, localId) {
|
|
1834
|
+
if (this.handledSeqs.has(seq)) return true;
|
|
1835
|
+
return !!localId && this.pendingOutbox.some((item) => item.localId === localId);
|
|
1836
|
+
}
|
|
1801
1837
|
rememberRoutedInbound(localId) {
|
|
1802
1838
|
this.routedInboundLocalIds.add(localId);
|
|
1803
1839
|
if (this.routedInboundLocalIds.size > 2e3) {
|
|
@@ -1872,13 +1908,27 @@ class ApiSessionClient extends node_events.EventEmitter {
|
|
|
1872
1908
|
if (batch.some((item) => !storedLocalIds.has(item.localId))) {
|
|
1873
1909
|
throw new Error("Central persistence response omitted a session message");
|
|
1874
1910
|
}
|
|
1875
|
-
|
|
1876
|
-
|
|
1877
|
-
|
|
1911
|
+
const seqOf = new Map(stored.map((message) => [message.localId, message.seq]));
|
|
1912
|
+
let deferred = 0;
|
|
1913
|
+
for (const item of [...batch].sort((a, b) => seqOf.get(a.localId) - seqOf.get(b.localId))) {
|
|
1914
|
+
const seq = seqOf.get(item.localId);
|
|
1915
|
+
if (this.routedInboundLocalIds.has(item.localId)) {
|
|
1916
|
+
this.noteHandledSeqs([seq]);
|
|
1917
|
+
continue;
|
|
1918
|
+
}
|
|
1919
|
+
if (this.lastSeq > 0 && seq > this.lastSeq + 1) {
|
|
1920
|
+
deferred += 1;
|
|
1921
|
+
continue;
|
|
1922
|
+
}
|
|
1923
|
+
this.noteHandledSeqs([seq]);
|
|
1878
1924
|
const body = authRelay.decrypt(this.encryptionKey, this.encryptionVariant, authRelay.decodeBase64(item.content));
|
|
1879
1925
|
this.routeIncomingMessage(body, item.localId);
|
|
1880
1926
|
this.rememberRoutedInbound(item.localId);
|
|
1881
1927
|
}
|
|
1928
|
+
if (deferred > 0) {
|
|
1929
|
+
logger.logger.debug(`[API] Relay-delivered message(s) above a seq gap wait for catch-up: ${deferred}`);
|
|
1930
|
+
this.receiveSync.invalidate();
|
|
1931
|
+
}
|
|
1882
1932
|
callback({ ok: true, messages: stored });
|
|
1883
1933
|
} catch (error) {
|
|
1884
1934
|
const routed = batch.filter((item) => this.routedInboundLocalIds.has(item.localId)).length;
|
|
@@ -3016,7 +3066,7 @@ class ApiClient {
|
|
|
3016
3066
|
return new ApiSessionClient(this.credential.token, session, opts);
|
|
3017
3067
|
}
|
|
3018
3068
|
async machineSyncClient(machine) {
|
|
3019
|
-
const { ApiMachineClient } = await Promise.resolve().then(function () { return require('./apiMachine-
|
|
3069
|
+
const { ApiMachineClient } = await Promise.resolve().then(function () { return require('./apiMachine-utCDabnO.cjs'); });
|
|
3020
3070
|
return new ApiMachineClient(this.credential.token, machine);
|
|
3021
3071
|
}
|
|
3022
3072
|
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-BjXkscIr.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-CG9jFcML.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-DnpJJ7VR.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-BbJ-NWcl.mjs';
|
|
10
|
+
import { c as configuration } from './configuration-HPdj5Til.mjs';
|
|
11
11
|
import { createHmac, randomUUID } from 'node:crypto';
|
|
12
|
-
import { g as createEnvelope, s as streamKeyOf, R as ReleaseDrainNoticeSchema, H as RelayAssignmentResponseSchema } from './index-
|
|
13
|
-
import { r as registerCommonHandlers } from './registerCommonHandlers-
|
|
12
|
+
import { g as createEnvelope, s as streamKeyOf, R as ReleaseDrainNoticeSchema, H as RelayAssignmentResponseSchema } from './index-DisBaRvM.mjs';
|
|
13
|
+
import { r as registerCommonHandlers } from './registerCommonHandlers-DpBxSCBi.mjs';
|
|
14
14
|
import { createId } from '@paralleldrive/cuid2';
|
|
15
|
-
import { I as InvalidateSync } from './sync
|
|
15
|
+
import { I as InvalidateSync } from './sync-HPnxI4fz.mjs';
|
|
16
16
|
import { B as BackgroundTaskReporter } from './backgroundTaskActivity-8PdPxrvy.mjs';
|
|
17
|
-
import {
|
|
17
|
+
import { m as notifyDaemonTurnEvent, o as notifyDaemonBackgroundTasks } from './controlClient-DBylxaEh.mjs';
|
|
18
18
|
import chalk from 'chalk';
|
|
19
19
|
|
|
20
20
|
async function hmac_sha512(key, data) {
|
|
@@ -1198,6 +1198,17 @@ class PromptQueueDrain {
|
|
|
1198
1198
|
}
|
|
1199
1199
|
}
|
|
1200
1200
|
|
|
1201
|
+
function advanceInboundCursor(current, handled) {
|
|
1202
|
+
let next = current;
|
|
1203
|
+
while (handled.has(next + 1)) {
|
|
1204
|
+
next += 1;
|
|
1205
|
+
}
|
|
1206
|
+
for (const seq of handled) {
|
|
1207
|
+
if (seq <= next) handled.delete(seq);
|
|
1208
|
+
}
|
|
1209
|
+
return { next, gap: handled.size > 0 };
|
|
1210
|
+
}
|
|
1211
|
+
|
|
1201
1212
|
const guardOptions = { log: (message) => logger.debug(message) };
|
|
1202
1213
|
class ApiSessionClient extends EventEmitter {
|
|
1203
1214
|
/**
|
|
@@ -1272,6 +1283,8 @@ class ApiSessionClient extends EventEmitter {
|
|
|
1272
1283
|
receiveSync;
|
|
1273
1284
|
directInboundLocalIds = /* @__PURE__ */ new Set();
|
|
1274
1285
|
routedInboundLocalIds = /* @__PURE__ */ new Set();
|
|
1286
|
+
/** B-806: seqs above `lastSeq` our own POSTs confirmed (see inboundCursor.ts). */
|
|
1287
|
+
handledSeqs = /* @__PURE__ */ new Set();
|
|
1275
1288
|
handoverInFlight = null;
|
|
1276
1289
|
/** B-265 reconnect: the message cursor was seeded from the server, so
|
|
1277
1290
|
* nothing before it is history to replay — but socket fast-path routing
|
|
@@ -1367,8 +1380,9 @@ class ApiSessionClient extends EventEmitter {
|
|
|
1367
1380
|
}
|
|
1368
1381
|
const localId = data.body.message.localId;
|
|
1369
1382
|
const relayAccepted = !!localId && this.directInboundLocalIds.delete(localId);
|
|
1370
|
-
if (localId && this.routedInboundLocalIds.has(localId)) {
|
|
1383
|
+
if (localId && this.routedInboundLocalIds.has(localId) || this.isOwnOutbound(messageSeq, localId)) {
|
|
1371
1384
|
this.lastSeq = messageSeq;
|
|
1385
|
+
this.advanceCursorThroughHandled();
|
|
1372
1386
|
return;
|
|
1373
1387
|
}
|
|
1374
1388
|
if (relayAccepted) {
|
|
@@ -1379,6 +1393,7 @@ class ApiSessionClient extends EventEmitter {
|
|
|
1379
1393
|
this.routeIncomingMessage(body, localId);
|
|
1380
1394
|
if (localId) this.rememberRoutedInbound(localId);
|
|
1381
1395
|
this.lastSeq = messageSeq;
|
|
1396
|
+
this.advanceCursorThroughHandled();
|
|
1382
1397
|
} else if (data.body.t === "update-session") {
|
|
1383
1398
|
if (data.body.metadata && data.body.metadata.version > this.metadataVersion) {
|
|
1384
1399
|
this.metadata = decrypt(this.encryptionKey, this.encryptionVariant, decodeBase64(data.body.metadata.value));
|
|
@@ -1720,6 +1735,7 @@ class ApiSessionClient extends EventEmitter {
|
|
|
1720
1735
|
maxSeq = message.seq;
|
|
1721
1736
|
}
|
|
1722
1737
|
if (skipRouting) continue;
|
|
1738
|
+
if (message.seq <= this.lastSeq || this.isOwnOutbound(message.seq, message.localId)) continue;
|
|
1723
1739
|
const relayAccepted = !!message.localId && this.directInboundLocalIds.delete(message.localId);
|
|
1724
1740
|
if (message.localId && this.routedInboundLocalIds.has(message.localId)) {
|
|
1725
1741
|
continue;
|
|
@@ -1742,7 +1758,7 @@ class ApiSessionClient extends EventEmitter {
|
|
|
1742
1758
|
});
|
|
1743
1759
|
}
|
|
1744
1760
|
}
|
|
1745
|
-
this.lastSeq = Math.max(this.lastSeq, maxSeq);
|
|
1761
|
+
this.lastSeq = advanceInboundCursor(Math.max(this.lastSeq, maxSeq), this.handledSeqs).next;
|
|
1746
1762
|
const hasMore = !!response.data.hasMore;
|
|
1747
1763
|
if (hasMore && maxSeq === afterSeq) {
|
|
1748
1764
|
logger.debug("[API] fetchMessages pagination stalled, stopping to avoid infinite loop", {
|
|
@@ -1774,8 +1790,7 @@ class ApiSessionClient extends EventEmitter {
|
|
|
1774
1790
|
}
|
|
1775
1791
|
);
|
|
1776
1792
|
const messages = Array.isArray(response.data.messages) ? response.data.messages : [];
|
|
1777
|
-
|
|
1778
|
-
this.lastSeq = maxSeq;
|
|
1793
|
+
this.noteHandledSeqs(messages.map((message) => message.seq));
|
|
1779
1794
|
this.pushCommittedMessagesToRelay(batch, messages);
|
|
1780
1795
|
this.pendingOutbox.splice(0, batch.length);
|
|
1781
1796
|
}
|
|
@@ -1796,6 +1811,27 @@ class ApiSessionClient extends EventEmitter {
|
|
|
1796
1811
|
}
|
|
1797
1812
|
return true;
|
|
1798
1813
|
}
|
|
1814
|
+
/**
|
|
1815
|
+
* B-806: an ack proves only OUR messages exist. Hold them as handled and
|
|
1816
|
+
* move the cursor through a contiguous run; a gap below them (a Web
|
|
1817
|
+
* message whose update has not been applied) is filled by a fetch.
|
|
1818
|
+
*/
|
|
1819
|
+
noteHandledSeqs(seqs) {
|
|
1820
|
+
for (const seq of seqs) {
|
|
1821
|
+
if (typeof seq === "number" && seq > this.lastSeq) this.handledSeqs.add(seq);
|
|
1822
|
+
}
|
|
1823
|
+
this.advanceCursorThroughHandled();
|
|
1824
|
+
}
|
|
1825
|
+
advanceCursorThroughHandled() {
|
|
1826
|
+
const { next, gap } = advanceInboundCursor(this.lastSeq, this.handledSeqs);
|
|
1827
|
+
this.lastSeq = next;
|
|
1828
|
+
if (gap) this.receiveSync.invalidate();
|
|
1829
|
+
}
|
|
1830
|
+
/** Our own output (acked, or still in flight) seen on the inbound path: never routed. */
|
|
1831
|
+
isOwnOutbound(seq, localId) {
|
|
1832
|
+
if (this.handledSeqs.has(seq)) return true;
|
|
1833
|
+
return !!localId && this.pendingOutbox.some((item) => item.localId === localId);
|
|
1834
|
+
}
|
|
1799
1835
|
rememberRoutedInbound(localId) {
|
|
1800
1836
|
this.routedInboundLocalIds.add(localId);
|
|
1801
1837
|
if (this.routedInboundLocalIds.size > 2e3) {
|
|
@@ -1870,13 +1906,27 @@ class ApiSessionClient extends EventEmitter {
|
|
|
1870
1906
|
if (batch.some((item) => !storedLocalIds.has(item.localId))) {
|
|
1871
1907
|
throw new Error("Central persistence response omitted a session message");
|
|
1872
1908
|
}
|
|
1873
|
-
|
|
1874
|
-
|
|
1875
|
-
|
|
1909
|
+
const seqOf = new Map(stored.map((message) => [message.localId, message.seq]));
|
|
1910
|
+
let deferred = 0;
|
|
1911
|
+
for (const item of [...batch].sort((a, b) => seqOf.get(a.localId) - seqOf.get(b.localId))) {
|
|
1912
|
+
const seq = seqOf.get(item.localId);
|
|
1913
|
+
if (this.routedInboundLocalIds.has(item.localId)) {
|
|
1914
|
+
this.noteHandledSeqs([seq]);
|
|
1915
|
+
continue;
|
|
1916
|
+
}
|
|
1917
|
+
if (this.lastSeq > 0 && seq > this.lastSeq + 1) {
|
|
1918
|
+
deferred += 1;
|
|
1919
|
+
continue;
|
|
1920
|
+
}
|
|
1921
|
+
this.noteHandledSeqs([seq]);
|
|
1876
1922
|
const body = decrypt(this.encryptionKey, this.encryptionVariant, decodeBase64(item.content));
|
|
1877
1923
|
this.routeIncomingMessage(body, item.localId);
|
|
1878
1924
|
this.rememberRoutedInbound(item.localId);
|
|
1879
1925
|
}
|
|
1926
|
+
if (deferred > 0) {
|
|
1927
|
+
logger.debug(`[API] Relay-delivered message(s) above a seq gap wait for catch-up: ${deferred}`);
|
|
1928
|
+
this.receiveSync.invalidate();
|
|
1929
|
+
}
|
|
1880
1930
|
callback({ ok: true, messages: stored });
|
|
1881
1931
|
} catch (error) {
|
|
1882
1932
|
const routed = batch.filter((item) => this.routedInboundLocalIds.has(item.localId)).length;
|
|
@@ -3014,7 +3064,7 @@ class ApiClient {
|
|
|
3014
3064
|
return new ApiSessionClient(this.credential.token, session, opts);
|
|
3015
3065
|
}
|
|
3016
3066
|
async machineSyncClient(machine) {
|
|
3017
|
-
const { ApiMachineClient } = await import('./apiMachine-
|
|
3067
|
+
const { ApiMachineClient } = await import('./apiMachine-BcjccOmd.mjs');
|
|
3018
3068
|
return new ApiMachineClient(this.credential.token, machine);
|
|
3019
3069
|
}
|
|
3020
3070
|
push() {
|
|
@@ -1,44 +1,44 @@
|
|
|
1
1
|
import { io } from 'socket.io-client';
|
|
2
2
|
import { a as webPanelsSignature } from './webPanels-B2_C2-3g.mjs';
|
|
3
|
-
import { l as logger } from './logger-
|
|
4
|
-
import { R as RpcHandlerManager, i as isRateQuotaCode, p as pauseForRateQuota, s as socketConnectGuard, c as connectGuarded, a as answerSocketRequest, e as shouldReconnect, d as describeSocketAckDrop } from './lidState-
|
|
5
|
-
import { 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-BjXkscIr.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-CG9jFcML.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-C3Anki4S.mjs';
|
|
6
|
+
import { c as configuration } from './configuration-HPdj5Til.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-DpBxSCBi.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 { f as fsMkdir } from './fsMkdir-DumgLTzR.mjs';
|
|
13
13
|
import { spawn, execFile, spawnSync } from 'node:child_process';
|
|
14
|
-
import { r as readSettings, c as readPersistedSessions, o as readTrackedClaudeSessionIds, p as readTrackedCodexThreadIds } from './persistence-
|
|
14
|
+
import { r as readSettings, c as readPersistedSessions, o as readTrackedClaudeSessionIds, p as readTrackedCodexThreadIds } from './persistence-CmVwM5uq.mjs';
|
|
15
15
|
import { M as ModelConfigError } from './fileStore-5qpetZS0.mjs';
|
|
16
16
|
import { e as encodeBase64, g as encrypt, h as decrypt, d as decodeBase64 } from './authRelay-DhQhkBvX.mjs';
|
|
17
17
|
import { p as prepareClipboardText, d as prepareClipboardHistoryText } from './limits-DIo7rEBR.mjs';
|
|
18
|
-
import { b as backoff, d as delay } from './time-
|
|
18
|
+
import { b as backoff, d as delay } from './time-BbJ-NWcl.mjs';
|
|
19
19
|
import * as pty from 'node-pty';
|
|
20
20
|
import { a as attachStartupCommand, v as validateTerminalTags, d as deriveAutoTitle, T as TMUX_SESSION_ID_RE, i as isSafeTmuxSessionName, b as isVhSessionName, U as USER_SESSIONS_FORMAT, p as parseUserSessions, L as LIST_SESSIONS_FORMAT, c as parseSessionListLine, e as LIST_FIELD_SEP, s as sendToVhTerminal } from './terminals-Dlg0x3nY.mjs';
|
|
21
21
|
import { t as tmuxArgs, V as VH_TMUX_SOCKET_ENV, a as scrubTmuxClientEnv } from './tmuxSocket-B8Yx20sT.mjs';
|
|
22
|
-
import { locateClaudeConversation, refreshAgentHomes } from './index-
|
|
22
|
+
import { locateClaudeConversation, refreshAgentHomes } from './index-Wf6mKJq9.mjs';
|
|
23
23
|
import { randomBytes } from 'node:crypto';
|
|
24
24
|
import { readdirSync, unlinkSync, existsSync, mkdirSync, writeFileSync, readFileSync, statSync, chmodSync, renameSync, rmSync, accessSync, constants } from 'node:fs';
|
|
25
25
|
import axios from 'axios';
|
|
26
26
|
import { p as projectPath } from './projectPath-BTBIMB57.mjs';
|
|
27
27
|
import { a as isValidTerminalId } from './ids-DU6sLx4C.mjs';
|
|
28
28
|
import { d as detectCLIAvailability } from './detectCLI-CSGMlV51.mjs';
|
|
29
|
-
import { d as detectResumeSupport } from './localHappyAgentAuth-
|
|
29
|
+
import { d as detectResumeSupport } from './localHappyAgentAuth-CWha8BiX.mjs';
|
|
30
30
|
import { g as getProjectPath, a as getClaudeProjectsRoot } from './path-D2wdaNSk.mjs';
|
|
31
31
|
import { i as isVeryHappyOneShotPrompt } from './oneShotPrompts-DT4p6RNd.mjs';
|
|
32
|
-
import { f as forkSession, F as ForkSourceMissingError, d as discardForkedSession, l as listClaudeRewindPoints, a as forkAndTruncateSession, b as ForkTruncateUuidNotFoundError, c as forkBeforeUserMessage } from './claudeSessionFork-
|
|
33
|
-
import { C as CodexAppServerClient } from './codexAppServerClient-
|
|
34
|
-
import { J as RelayCandidatesResponseSchema, H as RelayAssignmentResponseSchema, R as ReleaseDrainNoticeSchema } from './index-
|
|
32
|
+
import { f as forkSession, F as ForkSourceMissingError, d as discardForkedSession, l as listClaudeRewindPoints, a as forkAndTruncateSession, b as ForkTruncateUuidNotFoundError, c as forkBeforeUserMessage } from './claudeSessionFork-JPEHVbfR.mjs';
|
|
33
|
+
import { C as CodexAppServerClient } from './codexAppServerClient-CM3O0zHW.mjs';
|
|
34
|
+
import { J as RelayCandidatesResponseSchema, H as RelayAssignmentResponseSchema, R as ReleaseDrainNoticeSchema } from './index-DisBaRvM.mjs';
|
|
35
35
|
import { f as forkCodexThread, C as CodexForkRewindPointNotFoundError, l as listCodexRewindPoints, a as forkCodexBeforeUserMessage } from './codexThreadFork-R76RU5H0.mjs';
|
|
36
|
-
import { p as planRateLimitWrite, m as mergeRateLimitReports } from './rateLimitWindows-
|
|
36
|
+
import { p as planRateLimitWrite, m as mergeRateLimitReports } from './rateLimitWindows-D9mQRGHv.mjs';
|
|
37
37
|
import 'chalk';
|
|
38
38
|
import 'node:util';
|
|
39
39
|
import 'os';
|
|
40
40
|
import 'child_process';
|
|
41
|
-
import './package-
|
|
41
|
+
import './package-Do0Y9bGA.mjs';
|
|
42
42
|
import 'util';
|
|
43
43
|
import 'fs/promises';
|
|
44
44
|
import 'crypto';
|
|
@@ -2,45 +2,45 @@
|
|
|
2
2
|
|
|
3
3
|
var socket_ioClient = require('socket.io-client');
|
|
4
4
|
var webPanels = require('./webPanels-FCgFKvVe.cjs');
|
|
5
|
-
var logger = require('./logger-
|
|
6
|
-
var lidState = require('./lidState-
|
|
7
|
-
var mirrorProtocol = require('./mirrorProtocol-
|
|
8
|
-
var configuration = require('./configuration-
|
|
5
|
+
var logger = require('./logger-CIUMiSLo.cjs');
|
|
6
|
+
var lidState = require('./lidState-wwiu6M3p.cjs');
|
|
7
|
+
var mirrorProtocol = require('./mirrorProtocol-CMJ2HOZF.cjs');
|
|
8
|
+
var configuration = require('./configuration-CwfmwaLU.cjs');
|
|
9
9
|
var cliUpdate = require('./cliUpdate-DsKXPFYp.cjs');
|
|
10
|
-
var registerCommonHandlers = require('./registerCommonHandlers-
|
|
10
|
+
var registerCommonHandlers = require('./registerCommonHandlers-K-BTp2iR.cjs');
|
|
11
11
|
var promises = require('node:fs/promises');
|
|
12
12
|
var path = require('node:path');
|
|
13
13
|
var os = require('node:os');
|
|
14
14
|
var fsMkdir = require('./fsMkdir-0K3yENml.cjs');
|
|
15
15
|
var node_child_process = require('node:child_process');
|
|
16
|
-
var persistence = require('./persistence-
|
|
16
|
+
var persistence = require('./persistence-CNWBdUH2.cjs');
|
|
17
17
|
var fileStore = require('./fileStore-7qhnbs6N.cjs');
|
|
18
18
|
var authRelay = require('./authRelay-Dy1qU9td.cjs');
|
|
19
19
|
var limits = require('./limits-C-a7gr04.cjs');
|
|
20
|
-
var time = require('./time-
|
|
20
|
+
var time = require('./time-BCGGrWp4.cjs');
|
|
21
21
|
var pty = require('node-pty');
|
|
22
22
|
var terminals = require('./terminals-B_bfC9c2.cjs');
|
|
23
23
|
var tmuxSocket = require('./tmuxSocket-D-Xt6Vn-.cjs');
|
|
24
|
-
var index = require('./index-
|
|
24
|
+
var index = require('./index-Dzb_Bsfu.cjs');
|
|
25
25
|
var node_crypto = require('node:crypto');
|
|
26
26
|
var node_fs = require('node:fs');
|
|
27
27
|
var axios = require('axios');
|
|
28
28
|
var projectPath = require('./projectPath-C3ioB4Bu.cjs');
|
|
29
29
|
var ids = require('./ids-B6ZC0HGt.cjs');
|
|
30
30
|
var detectCLI = require('./detectCLI-BuYR_Qxe.cjs');
|
|
31
|
-
var localHappyAgentAuth = require('./localHappyAgentAuth-
|
|
31
|
+
var localHappyAgentAuth = require('./localHappyAgentAuth-UoytSUX0.cjs');
|
|
32
32
|
var path$1 = require('./path-B7zW-WwE.cjs');
|
|
33
33
|
var oneShotPrompts = require('./oneShotPrompts-CL0dip9C.cjs');
|
|
34
|
-
var claudeSessionFork = require('./claudeSessionFork-
|
|
35
|
-
var codexAppServerClient = require('./codexAppServerClient-
|
|
36
|
-
var index$1 = require('./index-
|
|
34
|
+
var claudeSessionFork = require('./claudeSessionFork-DMdeScGk.cjs');
|
|
35
|
+
var codexAppServerClient = require('./codexAppServerClient-DGeqZViU.cjs');
|
|
36
|
+
var index$1 = require('./index-Ub-5xbcU.cjs');
|
|
37
37
|
var codexThreadFork = require('./codexThreadFork-DNekT4nQ.cjs');
|
|
38
|
-
var rateLimitWindows = require('./rateLimitWindows-
|
|
38
|
+
var rateLimitWindows = require('./rateLimitWindows-1WoBs8ln.cjs');
|
|
39
39
|
require('chalk');
|
|
40
40
|
require('node:util');
|
|
41
41
|
require('os');
|
|
42
42
|
require('child_process');
|
|
43
|
-
require('./package-
|
|
43
|
+
require('./package-CRDjc5vK.cjs');
|
|
44
44
|
require('util');
|
|
45
45
|
require('fs/promises');
|
|
46
46
|
require('crypto');
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { randomUUID } from 'node:crypto';
|
|
2
2
|
import { writeFile, rename, unlink } from 'node:fs/promises';
|
|
3
3
|
import { join, basename } from 'node:path';
|
|
4
|
-
import { M as MAX_CHAT_ATTACHMENT_SOURCE_BYTES } from './pushNotifications-
|
|
5
|
-
import { e as ensurePrivateDirectory, h as hardenPrivateFile } from './configuration-
|
|
4
|
+
import { M as MAX_CHAT_ATTACHMENT_SOURCE_BYTES } from './pushNotifications-DnpJJ7VR.mjs';
|
|
5
|
+
import { e as ensurePrivateDirectory, h as hardenPrivateFile } from './configuration-HPdj5Til.mjs';
|
|
6
6
|
|
|
7
7
|
const CLAUDE_ATTACHMENT_KINDS = [
|
|
8
8
|
"image/jpeg",
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
var node_crypto = require('node:crypto');
|
|
4
4
|
var promises = require('node:fs/promises');
|
|
5
5
|
var path = require('node:path');
|
|
6
|
-
var pushNotifications = require('./pushNotifications-
|
|
7
|
-
var configuration = require('./configuration-
|
|
6
|
+
var pushNotifications = require('./pushNotifications-C651e0ZZ.cjs');
|
|
7
|
+
var configuration = require('./configuration-CwfmwaLU.cjs');
|
|
8
8
|
|
|
9
9
|
const CLAUDE_ATTACHMENT_KINDS = [
|
|
10
10
|
"image/jpeg",
|
|
@@ -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-CwfmwaLU.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-BCGGrWp4.cjs');
|
|
9
|
+
var persistence = require('./persistence-CNWBdUH2.cjs');
|
|
10
|
+
var browser = require('./browser-Ch50ZchJ.cjs');
|
|
11
|
+
var logger = require('./logger-CIUMiSLo.cjs');
|
|
12
12
|
|
|
13
13
|
function generateWebAuthUrl(publicKey) {
|
|
14
14
|
const publicKeyBase64 = authRelay.encodeBase64(publicKey, "base64url");
|