very-happy-cli 0.2.203 → 0.2.205
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-CAMuhS0Z.mjs → AcpBackend-BqkDMgcN.mjs} +3 -3
- package/dist/{AcpBackend-DReFgpYD.cjs → AcpBackend-Do37yiZg.cjs} +3 -3
- package/dist/{AcpSessionManager-BZKM-sCt.cjs → AcpSessionManager-BpQKu2_m.cjs} +2 -2
- package/dist/{AcpSessionManager-CJOxMFCF.mjs → AcpSessionManager-CvEO7Yex.mjs} +2 -2
- package/dist/{BasePermissionHandler-BgX73mQ5.mjs → BasePermissionHandler-BpaIn9ko.mjs} +1 -1
- package/dist/{BasePermissionHandler-BBR9Gkob.cjs → BasePermissionHandler-CUXi-tq4.cjs} +1 -1
- package/dist/{account-hy0rztXY.mjs → account-C1nsl3ij.mjs} +11 -11
- package/dist/{account-41PkJ9nx.cjs → account-SwG5Yefp.cjs} +11 -11
- package/dist/{accountService-DEpIq6CF.mjs → accountService-CqrWNH8K.mjs} +4 -4
- package/dist/{accountService-Cns8UYGI.cjs → accountService-SOeB_21A.cjs} +4 -4
- package/dist/{acpSessionResume-DmOPXKpC.cjs → acpSessionResume-BCEol11N.cjs} +1 -1
- package/dist/{acpSessionResume-5El4xksf.mjs → acpSessionResume-DvDKsJTV.mjs} +1 -1
- package/dist/{agentHome-BXaVMqHX.cjs → agentHome-8wzmbm0H.cjs} +4 -4
- package/dist/{agentHome-DUxArmak.mjs → agentHome-BuFxooEg.mjs} +4 -4
- package/dist/{api-D8ZDxBWw.mjs → api-20GbdpxY.mjs} +107 -18
- package/dist/{api-ChhFBuB0.cjs → api-BnTF8fkj.cjs} +107 -18
- package/dist/{apiMachine-qav2pnk5.mjs → apiMachine-C8NGJHHd.mjs} +105 -21
- package/dist/{apiMachine-MPwddFXq.cjs → apiMachine-cyDRM_S-.cjs} +105 -21
- package/dist/{attachmentContent-f5gwnv9J.cjs → attachmentContent-B7zz_LPF.cjs} +2 -2
- package/dist/{attachmentContent-BfSQxccA.mjs → attachmentContent-Coo9lUxK.mjs} +2 -2
- package/dist/{auth-BxNuFv_0.mjs → auth-75rP3vc0.mjs} +8 -8
- package/dist/{auth-xW7SDE_7.mjs → auth-BX6xrdHv.mjs} +5 -5
- package/dist/{auth-thi2T_T8.cjs → auth-By6u_iKB.cjs} +5 -5
- package/dist/{auth-DkPAHXLj.cjs → auth-w4UTRbIf.cjs} +8 -8
- package/dist/{auto-DmXTwayU.mjs → auto-BhmWtRvv.mjs} +18 -18
- package/dist/{auto-BiRlQ4tm.cjs → auto-xr_gqUoy.cjs} +18 -18
- package/dist/{bootstrap-EGhaCmXy.cjs → bootstrap-3ti7LXMz.cjs} +2 -2
- package/dist/{bootstrap-pGaFGbWO.mjs → bootstrap-Dn_VvHSt.mjs} +2 -2
- package/dist/{browser-DSxpOnPb.cjs → browser-C4PVyjGe.cjs} +1 -1
- package/dist/{browser-BYSYzXvP.mjs → browser-C4wWGXH7.mjs} +1 -1
- package/dist/{claudeAccountEnv-Btp39mfa.cjs → claudeAccountEnv-BTZjHTpF.cjs} +1 -1
- package/dist/{claudeAccountEnv-DowsOlDB.mjs → claudeAccountEnv-C6Wl-ZbT.mjs} +1 -1
- package/dist/{claudeLocal-bDarWqaU.mjs → claudeLocal-B8rOA-EB.mjs} +5 -5
- package/dist/{claudeLocal-ClqHmkk6.cjs → claudeLocal-DZALKVVc.cjs} +5 -5
- package/dist/{claudeLocalLauncher-Bxi0_eW9.cjs → claudeLocalLauncher-Bf5uj0EA.cjs} +10 -10
- package/dist/{claudeLocalLauncher-Ccpj2KgW.mjs → claudeLocalLauncher-CJPRSv3z.mjs} +10 -10
- package/dist/claudeLongContext-BR_zdjUp.cjs +239 -0
- package/dist/claudeLongContext-CZ60xo5p.mjs +219 -0
- package/dist/{claudeSessionFork-Cize0Y2T.mjs → claudeSessionFork-BK4U655i.mjs} +1 -1
- package/dist/{claudeSessionFork-nyNFjgaf.cjs → claudeSessionFork-unEBLW0t.cjs} +1 -1
- package/dist/{client-Cddb1dhi.cjs → client-BKjBr6pc.cjs} +2 -2
- package/dist/{client-Wr_BiOon.mjs → client-BbYds4AV.mjs} +16 -7
- package/dist/{client-CMKgB-76.cjs → client-Bh-y6cVc.cjs} +16 -7
- package/dist/{client-DO8DNDC3.mjs → client-BxtaglBR.mjs} +2 -2
- package/dist/{client-CgMVIP7v.mjs → client-CvLm25Wq.mjs} +2 -2
- package/dist/{client-6Y6O72Uq.cjs → client-DGsdLx8L.cjs} +2 -2
- package/dist/{client-CX8kRedW.mjs → client-m-K1b6Qa.mjs} +3 -3
- package/dist/{client-DP8FabOE.cjs → client-wMlUPnrV.cjs} +3 -3
- package/dist/codex/happyMcpStdioBridge.cjs +20 -19
- package/dist/codex/happyMcpStdioBridge.mjs +20 -19
- package/dist/{codexAccount-CieIQLOX.mjs → codexAccount-BPQ-lPhH.mjs} +1 -1
- package/dist/{codexAccount-D-OBY29W.cjs → codexAccount-BjaHvmKH.cjs} +1 -1
- package/dist/{codexAppServerClient-EzrHWYhX.cjs → codexAppServerClient-6aQelpRl.cjs} +3 -3
- package/dist/{codexAppServerClient-D-cD2Dfj.mjs → codexAppServerClient-BeRimnu9.mjs} +3 -3
- package/dist/{codexCommand-BMcXtvU3.cjs → codexCommand-CYVaGmhh.cjs} +67 -56
- package/dist/{codexCommand-D79GnRhB.mjs → codexCommand-CmGNDs45.mjs} +67 -56
- package/dist/{codexTermination-CF6xiFbb.cjs → codexTermination-B09HyYIB.cjs} +1 -1
- package/dist/{codexTermination-CK1MYJT7.mjs → codexTermination-Z18pGkkl.mjs} +1 -1
- package/dist/{config-Crn1mNgr.mjs → config-4b-sF37g.mjs} +3 -3
- package/dist/{config-F6zSRyk2.cjs → config-Dq_N615Z.cjs} +3 -3
- package/dist/{configuration-Cl9kOv09.cjs → configuration-Fx61b4MJ.cjs} +1 -1
- package/dist/{configuration-i9MVy0a5.mjs → configuration-H8q1sMwk.mjs} +1 -1
- package/dist/{connect-CiA13Xm4.mjs → connect-BwSwKPzI.mjs} +13 -13
- package/dist/{connect-ClklWmnI.cjs → connect-D54AnDIT.cjs} +13 -13
- package/dist/{context-DvdZsGgl.mjs → context-CM1Xd_HO.mjs} +1 -1
- package/dist/{context-BxODP3mG.cjs → context-D-QOcYuX.cjs} +1 -1
- package/dist/{controlClient-DxCQKfqe.cjs → controlClient-D04wXKoQ.cjs} +12 -3
- package/dist/{controlClient-D6vqMUfi.mjs → controlClient-D9DYqW02.mjs} +12 -4
- package/dist/{createSessionMetadata-BuAVB-xI.mjs → createSessionMetadata-CHa4pufa.mjs} +2 -2
- package/dist/{createSessionMetadata-B_NZvmhm.cjs → createSessionMetadata-Ce539QXK.cjs} +2 -2
- package/dist/{daemonAccounts-ciidbU2h.cjs → daemonAccounts-BOoI7-sw.cjs} +2 -2
- package/dist/{daemonAccounts-D5shoCLt.mjs → daemonAccounts-BtkmoJmC.mjs} +3 -3
- package/dist/{defaultPermissionMode-DgeiMMqy.mjs → defaultPermissionMode-CYQi7vqJ.mjs} +1 -1
- package/dist/{defaultPermissionMode-Cs_Tv83b.cjs → defaultPermissionMode-DmLYaaL8.cjs} +1 -1
- package/dist/{deterministicJson-B9XrEawW.mjs → deterministicJson-BEeXnWCF.mjs} +62 -20
- package/dist/{deterministicJson-kM2OdGZu.cjs → deterministicJson-D34CnNHO.cjs} +61 -19
- package/dist/{doctor-HHS4YegX.mjs → doctor-BI0Iywt_.mjs} +7 -7
- package/dist/{doctor-DiPRqsqg.cjs → doctor-BX8oWKZq.cjs} +7 -7
- package/dist/{downloadTarget-Cd8hx54t.mjs → downloadTarget-DX3m00OE.mjs} +6 -6
- package/dist/{downloadTarget-osB-mGh0.cjs → downloadTarget-TzXJEh6W.cjs} +6 -6
- package/dist/{ensureDaemonRunning-C0iDtuL7.mjs → ensureDaemonRunning-BBBqZ6vQ.mjs} +5 -5
- package/dist/{ensureDaemonRunning-CtBvPHVB.cjs → ensureDaemonRunning-Bvu-yyFn.cjs} +5 -5
- package/dist/exitNotice-M4UjtWkr.cjs +95 -0
- package/dist/exitNotice-gOAdDcL3.mjs +84 -0
- package/dist/{forkBackfill-DYIjlN1Z.mjs → forkBackfill-C9EfJ64O.mjs} +28 -2
- package/dist/{forkBackfill-8eLDeS73.cjs → forkBackfill-D2WW91fz.cjs} +28 -1
- package/dist/{format-B5V7ie8N.cjs → format-BEktLc45.cjs} +1 -1
- package/dist/{format-Dc5zMslz.mjs → format-BPAREVhi.mjs} +1 -1
- package/dist/{handleResumeCommand-vcD2qcAM.cjs → handleResumeCommand-6dYW_WOi.cjs} +5 -5
- package/dist/{handleResumeCommand-xrOAA1qI.mjs → handleResumeCommand-DziiqogX.mjs} +5 -5
- package/dist/{index-iFVMrlPo.mjs → index-BRq5iitn.mjs} +4 -4
- package/dist/{index-44o_qMvE.cjs → index-BYL_X3gP.cjs} +27 -6
- package/dist/{index-AyDwQ6FG.cjs → index-BmacwzcK.cjs} +45 -44
- package/dist/{index-D0rCXp-e.cjs → index-Cawt-fgZ.cjs} +4 -4
- package/dist/{index-C_ePuQwB.cjs → index-CoW4RNEb.cjs} +3 -3
- package/dist/{index-B7pKBIcn.mjs → index-CzBvl9py.mjs} +3 -3
- package/dist/{index-DIKJMfs2.mjs → index-DCvq8Cfw.mjs} +4 -4
- package/dist/{index-CiRMvS73.mjs → index-DWk-WTU-.mjs} +24 -7
- package/dist/{index-B7CXMlrz.mjs → index-UuWDafdi.mjs} +46 -45
- package/dist/{index-Cl-WkB_6.cjs → index-bVMcFi7v.cjs} +4 -4
- package/dist/index.cjs +2 -2
- package/dist/index.mjs +2 -2
- package/dist/{install-yqS4y1cm.mjs → install-B4OVUIw5.mjs} +3 -3
- package/dist/{install-BgBgsOlS.cjs → install-BQc4Hwuo.cjs} +3 -3
- package/dist/{issue-D7liK6bR.cjs → issue-WpLZYxUQ.cjs} +8 -8
- package/dist/{issue-aKZd7J55.mjs → issue-h_BIrzLs.mjs} +8 -8
- package/dist/lib.cjs +12 -12
- package/dist/lib.d.cts +42 -1
- package/dist/lib.d.mts +42 -1
- package/dist/lib.mjs +12 -12
- package/dist/{localHappyAgentAuth-Dm9obisi.cjs → localHappyAgentAuth-DQRWBUxQ.cjs} +1 -1
- package/dist/{localHappyAgentAuth-B2JJxlE9.mjs → localHappyAgentAuth-DgLh3xzW.mjs} +1 -1
- package/dist/{logger-BiKmiREe.mjs → logger-BKAKIZdy.mjs} +2 -2
- package/dist/{logger-BtWBoP60.cjs → logger-DP35yx-C.cjs} +2 -2
- package/dist/{machineMetadata-C0-LyMsb.cjs → machineMetadata-CZj0XwM_.cjs} +3 -3
- package/dist/{machineMetadata-CiyO9wm-.mjs → machineMetadata-DTlMMhj_.mjs} +3 -3
- package/dist/{main-BP2TBnp5.mjs → main-BIE1zeaH.mjs} +48 -48
- package/dist/{main-C7hKf5hG.cjs → main-l_nP9IQq.cjs} +48 -48
- package/dist/{mcp-Cn4k-PXb.mjs → mcp-B5F6-_7o.mjs} +20 -18
- package/dist/{mcp-DO00rr9n.cjs → mcp-KQHODyR3.cjs} +20 -18
- package/dist/{mirrorProtocol-DDtEN49F.mjs → mirrorProtocol-DDOUSWqL.mjs} +3 -3
- package/dist/{mirrorProtocol-DwO8QgLM.cjs → mirrorProtocol-duXHJeBW.cjs} +3 -3
- package/dist/{package-Djdgx8nb.cjs → package-BCJfNMlt.cjs} +7 -7
- package/dist/{package-CIW5lwaN.mjs → package-CMmhJwSf.mjs} +7 -7
- package/dist/{panels-BpfVEvwF.mjs → panels-BWxZMb_x.mjs} +5 -5
- package/dist/{panels-DMLtEOtJ.cjs → panels-CBlIJIu8.cjs} +5 -5
- package/dist/{peerTools-fYuKq3ev.cjs → peerTools-C6Y28jqG.cjs} +5 -5
- package/dist/{peerTools-CQ60fUPp.mjs → peerTools-ZJzoM48N.mjs} +5 -5
- package/dist/{persistence-D_zVC4Xz.mjs → persistence-dLgWDclq.mjs} +2 -2
- package/dist/{persistence-BOEZtiKb.cjs → persistence-iiVFxhbt.cjs} +2 -2
- package/dist/{piRunnerArgs-DE_YXvS1.mjs → piRunnerArgs-DuWYye4f.mjs} +1 -1
- package/dist/{piRunnerArgs-Dz9P62db.cjs → piRunnerArgs-DxWxgOSZ.cjs} +1 -1
- package/dist/{piRuntime-Du62fjeU.cjs → piRuntime-6UnkPaS1.cjs} +1 -1
- package/dist/{piRuntime-8SbpRmNA.mjs → piRuntime-Cbwk6bN0.mjs} +1 -1
- package/dist/{piTerminal-CGAw7WDW.cjs → piTerminal-BaoUqlM0.cjs} +22 -20
- package/dist/{piTerminal-Cl45kac0.mjs → piTerminal-Dn0qN9nb.mjs} +22 -20
- package/dist/{pushNotifications-RVpbqrxR.mjs → pushNotifications-DD9Z0CoN.mjs} +17 -3
- package/dist/{pushNotifications-B19lT5mY.cjs → pushNotifications-gcQv61e6.cjs} +17 -3
- package/dist/{query-CNWdX2r5.cjs → query-12momZSq.cjs} +1 -1
- package/dist/{query-DBRR3TOO.mjs → query-CFdlRD7b.mjs} +1 -1
- package/dist/{rateLimitWindows-DX5y23x_.mjs → rateLimitWindows-CVS-btq-.mjs} +1 -1
- package/dist/{rateLimitWindows-mfdokrkQ.cjs → rateLimitWindows-D2Gmg7jU.cjs} +1 -1
- package/dist/{reconnectGate-B8ltzSJD.cjs → reconnectGate-BkSaZdIx.cjs} +1 -1
- package/dist/{reconnectGate-DSxYUCWy.mjs → reconnectGate-m81ySKhh.mjs} +1 -1
- package/dist/{registerCommonHandlers-Y2siJGwL.cjs → registerCommonHandlers-B5p3ZZmp.cjs} +2 -2
- package/dist/{registerCommonHandlers-CQDRKlkG.mjs → registerCommonHandlers-CqLHkmG2.mjs} +2 -2
- package/dist/{registerKillSessionHandler-B0pMZOdH.cjs → registerKillSessionHandler-Bf_Q9yii.cjs} +6 -6
- package/dist/{registerKillSessionHandler-U4Dxtohy.mjs → registerKillSessionHandler-jYSuGIP1.mjs} +6 -6
- package/dist/{registerSideQuestionHandler-DM1QqTxf.mjs → registerSideQuestionHandler-CPR29B9d.mjs} +4 -4
- package/dist/{registerSideQuestionHandler--ruKhCdY.cjs → registerSideQuestionHandler-DSIw3xPW.cjs} +4 -4
- package/dist/{remoteSessionClient-T-Raoiy6.mjs → remoteSessionClient-CLuxs0_y.mjs} +5 -5
- package/dist/{remoteSessionClient-CjINaEs_.cjs → remoteSessionClient-DX-60nto.cjs} +5 -5
- package/dist/{reportProgressTool-DDfL1OY7.cjs → reportProgressTool-D1XAxeY1.cjs} +5 -5
- package/dist/{reportProgressTool-Stg0xrjF.mjs → reportProgressTool-k3g3D6cX.mjs} +5 -5
- package/dist/{run-Dq48xBtw.mjs → run-BBJqaIoY.mjs} +200 -55
- package/dist/{run-BoSVfVCZ.cjs → run-DOb_agpA.cjs} +200 -55
- package/dist/{runClaude-D8ScJdJU.cjs → runClaude-BU3Lrd5o.cjs} +53 -38
- package/dist/{runClaude-CJe5atrS.mjs → runClaude-NTvReMNp.mjs} +44 -29
- package/dist/{runClaudeDeps-4RFRR4cY.cjs → runClaudeDeps-DQV-QdDi.cjs} +129 -61
- package/dist/{runClaudeDeps-CL3goCXG.mjs → runClaudeDeps-Dh2LVY2w.mjs} +125 -57
- package/dist/{runGemini-DZv6jPxV.mjs → runGemini-CGD4bqQ3.mjs} +36 -35
- package/dist/{runGemini-BcbNxgsA.cjs → runGemini-dk877ztP.cjs} +36 -35
- package/dist/{runOpenClaw-CRqCoj-_.mjs → runOpenClaw-6MAJ_tHi.mjs} +18 -18
- package/dist/{runOpenClaw-BeSivE0X.cjs → runOpenClaw-CQakHPPq.cjs} +18 -18
- package/dist/{sandbox-xflHChws.cjs → sandbox-8DeDre0R.cjs} +4 -4
- package/dist/{sandbox-DAvJJZcV.mjs → sandbox-B3YMD9I6.mjs} +4 -4
- package/dist/selfCheck-BCKIF6ST.mjs +89 -0
- package/dist/{selfCheck-DZwdgBg0.cjs → selfCheck-BpvUNBmv.cjs} +40 -40
- package/dist/{send-ConAuYqL.cjs → send-Bym_IU4n.cjs} +8 -8
- package/dist/{send-Co_l_Nmg.mjs → send-DgrbVZzC.mjs} +8 -8
- package/dist/{server-by6kezmM.cjs → server-BY-FubRe.cjs} +6 -6
- package/dist/{server-D1Qrmxl7.mjs → server-CmAgeEhS.mjs} +4 -4
- package/dist/{sessionLock-DFrwAnwR.mjs → sessionLock-BMtAQ4bW.mjs} +21 -4
- package/dist/{sessionLock-Db_uQcUP.cjs → sessionLock-WXtjQC9q.cjs} +22 -3
- package/dist/{sessionOps-CptDjoZi.cjs → sessionOps-BEVzE38e.cjs} +4 -4
- package/dist/{sessionOps-C7nps7qG.mjs → sessionOps-BxLhHEhM.mjs} +4 -4
- package/dist/{sessionProvider-BaJq1AnY.mjs → sessionProvider-B1tL5K5f.mjs} +10 -10
- package/dist/{sessionProvider-D9nsAE14.cjs → sessionProvider-DCnZFxwe.cjs} +10 -10
- package/dist/{sessionScanner-BOb33NVJ.mjs → sessionScanner-Ctm9w-AJ.mjs} +3 -3
- package/dist/{sessionScanner-C6OVO0Ne.cjs → sessionScanner-eX2f-j0u.cjs} +3 -3
- package/dist/{sessions-qVHDXJa6.cjs → sessions-BG8r7uht.cjs} +10 -10
- package/dist/{sessions-GCql_3Dl.mjs → sessions-BuxOqRcc.mjs} +10 -10
- package/dist/{setupOfflineReconnection-B8QKqc9a.cjs → setupOfflineReconnection-65k1yEFn.cjs} +2 -2
- package/dist/{setupOfflineReconnection-lu0YbS7m.mjs → setupOfflineReconnection-Dd4NCN9i.mjs} +2 -2
- package/dist/{spawn-tL-724RS.cjs → spawn-0YaC-DQg.cjs} +15 -15
- package/dist/{spawn-C9NSlg99.mjs → spawn-wys_MPgK.mjs} +15 -15
- package/dist/{spawnAgents-BclZYkov.mjs → spawnAgents-CcFKtKdX.mjs} +2 -1
- package/dist/{spawnAgents-DvbEDCIq.cjs → spawnAgents-D4lR468W.cjs} +2 -1
- package/dist/{spawnHappyCLI-D7EO8s4E.cjs → spawnHappyCLI-Bf_N42fi.cjs} +1 -1
- package/dist/{spawnHappyCLI-jXUKLUT5.mjs → spawnHappyCLI-EvPb0jB3.mjs} +1 -1
- package/dist/{startFileWatcher-C7eFs4hA.mjs → startFileWatcher-GF4BNFA1.mjs} +1 -1
- package/dist/{startFileWatcher-6NpLGxg5.cjs → startFileWatcher-ikipjpDk.cjs} +1 -1
- package/dist/{startupSessionCreate-C5wdvraY.cjs → startupSessionCreate-CHU23k6u.cjs} +3 -3
- package/dist/{startupSessionCreate-D3ph1DtL.mjs → startupSessionCreate-Dp3_kvi_.mjs} +3 -3
- package/dist/{store-Cpb1LMNW.cjs → store-DGMILdMn.cjs} +1 -1
- package/dist/{store-DWmjM4Ex.mjs → store-Fge1h9wy.mjs} +1 -1
- package/dist/{streamRelay-DdGOsW8v.mjs → streamRelay-MaaYNNuh.mjs} +1 -1
- package/dist/{streamRelay-4XiiNB3N.cjs → streamRelay-keuifCPQ.cjs} +1 -1
- package/dist/{sync-BIXH8ijr.mjs → sync-Co0wRhGu.mjs} +1 -1
- package/dist/{sync-ni64k2OI.cjs → sync-Dm6GaS8P.cjs} +1 -1
- package/dist/{systemPrompt-B_vnlIr1.mjs → systemPrompt-5cZbY0sf.mjs} +2 -2
- package/dist/{systemPrompt-DuoULaqr.cjs → systemPrompt-Ds7HcfDZ.cjs} +2 -2
- package/dist/{teams-CsR_8p3Q.mjs → teams-DBWFUOC3.mjs} +20 -9
- package/dist/{teams-DLfcbOMh.cjs → teams-nrcZL-1X.cjs} +20 -9
- package/dist/{template-3fV9bi0X.cjs → template-ChUotPTL.cjs} +1 -1
- package/dist/{template-CtRLg2PG.mjs → template-D8fzlO58.mjs} +1 -1
- package/dist/{time-Che8GhII.mjs → time-Cn0mV-di.mjs} +1 -1
- package/dist/{time-BMCY7zJL.cjs → time-NSglRbyr.cjs} +1 -1
- package/dist/{titleGenerator-HVEN1e7o.cjs → titleGenerator-CMIUB04_.cjs} +3 -3
- package/dist/{titleGenerator-B9LckLDq.mjs → titleGenerator-hmxUR3rU.mjs} +2 -2
- package/dist/{todo-bc7db5NN.mjs → todo-CDdBityL.mjs} +8 -8
- package/dist/{todo-B8byb_cy.cjs → todo-D5BoNMb7.cjs} +8 -8
- package/dist/{tools-BAMaBbbP.mjs → tools-BmQbzAfY.mjs} +1 -1
- package/dist/{tools--RN1SFkD.cjs → tools-CLkNfafW.cjs} +1 -1
- package/dist/{uninstall-UC0Q8YTj.cjs → uninstall-DCx_qNMZ.cjs} +3 -3
- package/dist/{uninstall-Dv4C-W9z.mjs → uninstall-DE0SH2qs.mjs} +3 -3
- package/dist/{wrapperAccount-nGGMJDBF.cjs → wrapperAccount-BHMM9I6g.cjs} +2 -2
- package/dist/{wrapperAccount-z8Swrd08.mjs → wrapperAccount-CwaA-n1S.mjs} +2 -2
- package/package.json +7 -7
- package/dist/permissionMode-CH4FoZfU.mjs +0 -80
- package/dist/permissionMode-CrV-XuMs.cjs +0 -87
- package/dist/selfCheck-BKOIROoJ.mjs +0 -89
|
@@ -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-BKAKIZdy.mjs';
|
|
5
|
+
import { d as delay } from './time-Cn0mV-di.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-CMmhJwSf.mjs';
|
|
9
9
|
|
|
10
10
|
function acpImageBlocks(attachments, supportsImages) {
|
|
11
11
|
return attachments.filter((file) => ["image/jpeg", "image/png", "image/gif", "image/webp"].includes(file.mimeType)).map((file) => {
|
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
var node_child_process = require('node:child_process');
|
|
4
4
|
var sdk = require('@agentclientprotocol/sdk');
|
|
5
5
|
var node_crypto = require('node:crypto');
|
|
6
|
-
var logger = require('./logger-
|
|
7
|
-
var time = require('./time-
|
|
6
|
+
var logger = require('./logger-DP35yx-C.cjs');
|
|
7
|
+
var time = require('./time-NSglRbyr.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-BCJfNMlt.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,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-BYL_X3gP.cjs');
|
|
5
|
+
var api = require('./api-BnTF8fkj.cjs');
|
|
6
6
|
|
|
7
7
|
function turnOptions(turnId, time) {
|
|
8
8
|
return turnId ? { turn: turnId, time } : { time };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createId } from '@paralleldrive/cuid2';
|
|
2
|
-
import { s as streamKeyOf, t as createEnvelope } from './index-
|
|
3
|
-
import { t as textResultPayload, b as toolResultPayload } from './api-
|
|
2
|
+
import { s as streamKeyOf, t as createEnvelope } from './index-DWk-WTU-.mjs';
|
|
3
|
+
import { t as textResultPayload, b as toolResultPayload } from './api-20GbdpxY.mjs';
|
|
4
4
|
|
|
5
5
|
function turnOptions(turnId, time) {
|
|
6
6
|
return turnId ? { turn: turnId, time } : { time };
|
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
import chalk from 'chalk';
|
|
2
2
|
import { createInterface } from 'node:readline/promises';
|
|
3
|
-
import { c as configuration } from './configuration-
|
|
4
|
-
import { g as getDaemonAgentProfiles, r as restartDaemonSession, l as listDaemonSessions } from './controlClient-
|
|
5
|
-
import { A as AccountService, b as bindResultMessages, a as AccountError, l as localRestartFailure } from './accountService-
|
|
3
|
+
import { c as configuration } from './configuration-H8q1sMwk.mjs';
|
|
4
|
+
import { g as getDaemonAgentProfiles, r as restartDaemonSession, l as listDaemonSessions } from './controlClient-D9DYqW02.mjs';
|
|
5
|
+
import { A as AccountService, b as bindResultMessages, a as AccountError, l as localRestartFailure } from './accountService-CqrWNH8K.mjs';
|
|
6
6
|
import 'node:fs';
|
|
7
7
|
import 'node:os';
|
|
8
8
|
import 'node:path';
|
|
9
|
-
import './package-
|
|
9
|
+
import './package-CMmhJwSf.mjs';
|
|
10
10
|
import 'node:fs/promises';
|
|
11
|
-
import './logger-
|
|
11
|
+
import './logger-BKAKIZdy.mjs';
|
|
12
12
|
import 'node:util';
|
|
13
|
-
import './persistence-
|
|
13
|
+
import './persistence-dLgWDclq.mjs';
|
|
14
14
|
import 'zod';
|
|
15
15
|
import './authRelay-DhQhkBvX.mjs';
|
|
16
16
|
import 'node:crypto';
|
|
17
17
|
import 'tweetnacl';
|
|
18
|
-
import './index-
|
|
18
|
+
import './index-DWk-WTU-.mjs';
|
|
19
19
|
import '@paralleldrive/cuid2';
|
|
20
20
|
import 'node:child_process';
|
|
21
|
-
import './claudeAccountEnv-
|
|
22
|
-
import './store-
|
|
23
|
-
import './codexAccount-
|
|
21
|
+
import './claudeAccountEnv-C6Wl-ZbT.mjs';
|
|
22
|
+
import './store-Fge1h9wy.mjs';
|
|
23
|
+
import './codexAccount-BPQ-lPhH.mjs';
|
|
24
24
|
import 'node:readline';
|
|
25
25
|
|
|
26
26
|
const ACCOUNT_HELP = `Usage:
|
|
@@ -183,7 +183,7 @@ Waiting (expires in 15 minutes; Ctrl-C to cancel)\u2026`);
|
|
|
183
183
|
}
|
|
184
184
|
}
|
|
185
185
|
async function loginInteractive(target) {
|
|
186
|
-
const { spawnSetupTokenPty } = await import('./daemonAccounts-
|
|
186
|
+
const { spawnSetupTokenPty } = await import('./daemonAccounts-BtkmoJmC.mjs');
|
|
187
187
|
const { homedir } = await import('node:os');
|
|
188
188
|
const svc = new AccountService({ home: configuration.happyHomeDir, spawnPty: (env) => spawnSetupTokenPty(homedir(), env) });
|
|
189
189
|
const started = await svc.loginStart({ agent: "claude", kind: "claude-subscription", ...target });
|
|
@@ -2,27 +2,27 @@
|
|
|
2
2
|
|
|
3
3
|
var chalk = require('chalk');
|
|
4
4
|
var promises = require('node:readline/promises');
|
|
5
|
-
var configuration = require('./configuration-
|
|
6
|
-
var controlClient = require('./controlClient-
|
|
7
|
-
var accountService = require('./accountService-
|
|
5
|
+
var configuration = require('./configuration-Fx61b4MJ.cjs');
|
|
6
|
+
var controlClient = require('./controlClient-D04wXKoQ.cjs');
|
|
7
|
+
var accountService = require('./accountService-SOeB_21A.cjs');
|
|
8
8
|
require('node:fs');
|
|
9
9
|
require('node:os');
|
|
10
10
|
require('node:path');
|
|
11
|
-
require('./package-
|
|
11
|
+
require('./package-BCJfNMlt.cjs');
|
|
12
12
|
require('node:fs/promises');
|
|
13
|
-
require('./logger-
|
|
13
|
+
require('./logger-DP35yx-C.cjs');
|
|
14
14
|
require('node:util');
|
|
15
|
-
require('./persistence-
|
|
15
|
+
require('./persistence-iiVFxhbt.cjs');
|
|
16
16
|
require('zod');
|
|
17
17
|
require('./authRelay-Dy1qU9td.cjs');
|
|
18
18
|
require('node:crypto');
|
|
19
19
|
require('tweetnacl');
|
|
20
|
-
require('./index-
|
|
20
|
+
require('./index-BYL_X3gP.cjs');
|
|
21
21
|
require('@paralleldrive/cuid2');
|
|
22
22
|
require('node:child_process');
|
|
23
|
-
require('./claudeAccountEnv-
|
|
24
|
-
require('./store-
|
|
25
|
-
require('./codexAccount-
|
|
23
|
+
require('./claudeAccountEnv-BTZjHTpF.cjs');
|
|
24
|
+
require('./store-DGMILdMn.cjs');
|
|
25
|
+
require('./codexAccount-BjaHvmKH.cjs');
|
|
26
26
|
require('node:readline');
|
|
27
27
|
|
|
28
28
|
const ACCOUNT_HELP = `Usage:
|
|
@@ -185,7 +185,7 @@ Waiting (expires in 15 minutes; Ctrl-C to cancel)\u2026`);
|
|
|
185
185
|
}
|
|
186
186
|
}
|
|
187
187
|
async function loginInteractive(target) {
|
|
188
|
-
const { spawnSetupTokenPty } = await Promise.resolve().then(function () { return require('./daemonAccounts-
|
|
188
|
+
const { spawnSetupTokenPty } = await Promise.resolve().then(function () { return require('./daemonAccounts-BOoI7-sw.cjs'); });
|
|
189
189
|
const { homedir } = await import('node:os');
|
|
190
190
|
const svc = new accountService.AccountService({ home: configuration.configuration.happyHomeDir, spawnPty: (env) => spawnSetupTokenPty(homedir(), env) });
|
|
191
191
|
const started = await svc.loginStart({ agent: "claude", kind: "claude-subscription", ...target });
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { randomUUID } from 'node:crypto';
|
|
2
2
|
import { mkdirSync, writeFileSync, readFileSync } from 'node:fs';
|
|
3
3
|
import { join } from 'node:path';
|
|
4
|
-
import {
|
|
4
|
+
import { N as AGENT_PROFILE_FEATURE_LAUNCH, O as AgentProfileAddRequestSchema, Q as AgentProfileLoginStartRequestSchema, T as AgentProfileLoginSubmitRequestSchema, U as AgentProfileBindRequestSchema } from './index-DWk-WTU-.mjs';
|
|
5
5
|
import { spawn } from 'node:child_process';
|
|
6
|
-
import { A as ACCOUNT_STRIPPED_ENV_KEYS } from './claudeAccountEnv-
|
|
7
|
-
import { C as CODEX_ALWAYS_STRIPPED_ENV_KEYS, r as readCodexProviders, s as syncCodexOverlay, b as baseCodexHome } from './codexAccount-
|
|
6
|
+
import { A as ACCOUNT_STRIPPED_ENV_KEYS } from './claudeAccountEnv-C6Wl-ZbT.mjs';
|
|
7
|
+
import { C as CODEX_ALWAYS_STRIPPED_ENV_KEYS, r as readCodexProviders, s as syncCodexOverlay, b as baseCodexHome } from './codexAccount-BPQ-lPhH.mjs';
|
|
8
8
|
import { createInterface } from 'node:readline';
|
|
9
|
-
import { h as buildAgentProfilesState, d as defaultSecretProbe, a as readAccounts, s as summarizeAccount, c as readAccountsFileV2, n as newAccountId, i as writeAccountSecret, f as writeAccountsFile, j as sessionsBoundTo, r as readSessionBindings, k as removeAccountSecret, b as accountSecretPath, e as expandHome, l as accountCodexHomePath, m as SUBSCRIPTION_TOKEN_TTL_MS, w as writeSessionBinding, o as readSessionBindingV2 } from './store-
|
|
9
|
+
import { h as buildAgentProfilesState, d as defaultSecretProbe, a as readAccounts, s as summarizeAccount, c as readAccountsFileV2, n as newAccountId, i as writeAccountSecret, f as writeAccountsFile, j as sessionsBoundTo, r as readSessionBindings, k as removeAccountSecret, b as accountSecretPath, e as expandHome, l as accountCodexHomePath, m as SUBSCRIPTION_TOKEN_TTL_MS, w as writeSessionBinding, o as readSessionBindingV2 } from './store-Fge1h9wy.mjs';
|
|
10
10
|
|
|
11
11
|
const CHECK_TIMEOUT_MS = 2e4;
|
|
12
12
|
const DEFAULT_CHECK_MODEL = "claude-haiku-4-5";
|
|
@@ -3,12 +3,12 @@
|
|
|
3
3
|
var node_crypto = require('node:crypto');
|
|
4
4
|
var node_fs = require('node:fs');
|
|
5
5
|
var path = require('node:path');
|
|
6
|
-
var index = require('./index-
|
|
6
|
+
var index = require('./index-BYL_X3gP.cjs');
|
|
7
7
|
var node_child_process = require('node:child_process');
|
|
8
|
-
var claudeAccountEnv = require('./claudeAccountEnv-
|
|
9
|
-
var codexAccount = require('./codexAccount-
|
|
8
|
+
var claudeAccountEnv = require('./claudeAccountEnv-BTZjHTpF.cjs');
|
|
9
|
+
var codexAccount = require('./codexAccount-BjaHvmKH.cjs');
|
|
10
10
|
var node_readline = require('node:readline');
|
|
11
|
-
var store = require('./store-
|
|
11
|
+
var store = require('./store-DGMILdMn.cjs');
|
|
12
12
|
|
|
13
13
|
const CHECK_TIMEOUT_MS = 2e4;
|
|
14
14
|
const DEFAULT_CHECK_MODEL = "claude-haiku-4-5";
|
|
@@ -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-Fx61b4MJ.cjs');
|
|
6
6
|
|
|
7
7
|
const SESSION_MODE_DIR = "session-modes";
|
|
8
8
|
const ACP_PERMISSION_MODES = ["default", "acceptEdits", "plan", "bypassPermissions"];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { mkdirSync, renameSync, existsSync, unlinkSync } from 'node:fs';
|
|
2
2
|
import { join } from 'node:path';
|
|
3
|
-
import { w as writePrivateFileSync, c as configuration } from './configuration-
|
|
3
|
+
import { w as writePrivateFileSync, c as configuration } from './configuration-H8q1sMwk.mjs';
|
|
4
4
|
|
|
5
5
|
const SESSION_MODE_DIR = "session-modes";
|
|
6
6
|
const ACP_PERMISSION_MODES = ["default", "acceptEdits", "plan", "bypassPermissions"];
|
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
var chalk = require('chalk');
|
|
4
4
|
var os = require('node:os');
|
|
5
|
-
var persistence = require('./persistence-
|
|
5
|
+
var persistence = require('./persistence-iiVFxhbt.cjs');
|
|
6
6
|
require('node:fs');
|
|
7
|
-
require('./logger-
|
|
7
|
+
require('./logger-DP35yx-C.cjs');
|
|
8
8
|
var loginShellEnv = require('./loginShellEnv-BkuYtExZ.cjs');
|
|
9
9
|
require('node:fs/promises');
|
|
10
|
-
require('./configuration-
|
|
10
|
+
require('./configuration-Fx61b4MJ.cjs');
|
|
11
11
|
require('node:path');
|
|
12
|
-
require('./package-
|
|
12
|
+
require('./package-BCJfNMlt.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-dLgWDclq.mjs';
|
|
4
4
|
import 'node:fs';
|
|
5
|
-
import './logger-
|
|
5
|
+
import './logger-BKAKIZdy.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-H8q1sMwk.mjs';
|
|
9
9
|
import 'node:path';
|
|
10
|
-
import './package-
|
|
10
|
+
import './package-CMmhJwSf.mjs';
|
|
11
11
|
import 'zod';
|
|
12
12
|
import './authRelay-DhQhkBvX.mjs';
|
|
13
13
|
import 'node:crypto';
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import axios from 'axios';
|
|
2
|
-
import { l as logger, a as redactLogValue } from './logger-
|
|
3
|
-
import { A as AsyncLock, S as SESSION_SUPERSEDED_ERROR, a as agentInstanceAuth, b as MAX_CHAT_ATTACHMENT_ENCRYPTED_BYTES, U as UserMessageSchema, F as FileEventMessageSchema, P as PushNotificationClient } from './pushNotifications-
|
|
4
|
-
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, f as createReconnectGate } from './reconnectGate-
|
|
2
|
+
import { l as logger, a as redactLogValue } from './logger-BKAKIZdy.mjs';
|
|
3
|
+
import { A as AsyncLock, S as SESSION_SUPERSEDED_ERROR, a as agentInstanceAuth, b as MAX_CHAT_ATTACHMENT_ENCRYPTED_BYTES, U as UserMessageSchema, F as FileEventMessageSchema, P as PushNotificationClient } from './pushNotifications-DD9Z0CoN.mjs';
|
|
4
|
+
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, f as createReconnectGate } from './reconnectGate-m81ySKhh.mjs';
|
|
5
5
|
import { EventEmitter } from 'node:events';
|
|
6
6
|
import { io } from 'socket.io-client';
|
|
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-Cn0mV-di.mjs';
|
|
10
|
+
import { c as configuration } from './configuration-H8q1sMwk.mjs';
|
|
11
11
|
import { createHmac, randomUUID } from 'node:crypto';
|
|
12
|
-
import { t as createEnvelope, s as streamKeyOf,
|
|
13
|
-
import { r as registerCommonHandlers } from './registerCommonHandlers-
|
|
12
|
+
import { t as createEnvelope, s as streamKeyOf, ag as ReleaseDrainNoticeSchema, ah as RelayAssignmentResponseSchema } from './index-DWk-WTU-.mjs';
|
|
13
|
+
import { r as registerCommonHandlers } from './registerCommonHandlers-CqLHkmG2.mjs';
|
|
14
14
|
import { createId } from '@paralleldrive/cuid2';
|
|
15
|
-
import { I as InvalidateSync } from './sync-
|
|
15
|
+
import { I as InvalidateSync } from './sync-Co0wRhGu.mjs';
|
|
16
16
|
import { B as BackgroundTaskReporter } from './backgroundTaskActivity-8PdPxrvy.mjs';
|
|
17
|
-
import {
|
|
17
|
+
import { t as notifyDaemonTurnEvent, u as notifyDaemonBackgroundTasks } from './controlClient-D9DYqW02.mjs';
|
|
18
18
|
import chalk from 'chalk';
|
|
19
19
|
|
|
20
20
|
async function hmac_sha512(key, data) {
|
|
@@ -1204,6 +1204,33 @@ class PromptQueueDrain {
|
|
|
1204
1204
|
}
|
|
1205
1205
|
}
|
|
1206
1206
|
|
|
1207
|
+
const OUTBOX_BATCH_LIMITS = {
|
|
1208
|
+
maxCount: 100,
|
|
1209
|
+
maxBytes: 768 * 1024,
|
|
1210
|
+
maxItemBytes: 1024 * 1024 - 4 * 1024
|
|
1211
|
+
};
|
|
1212
|
+
function outboxItemBytes(item) {
|
|
1213
|
+
return item.content.length + item.localId.length + 32;
|
|
1214
|
+
}
|
|
1215
|
+
function planOutboxBatch(items, limits = OUTBOX_BATCH_LIMITS) {
|
|
1216
|
+
const first = items[0];
|
|
1217
|
+
if (!first) return null;
|
|
1218
|
+
const firstBytes = outboxItemBytes(first);
|
|
1219
|
+
if (firstBytes > limits.maxItemBytes) return { kind: "oversize", bytes: firstBytes };
|
|
1220
|
+
const backfill = first.backfill === true;
|
|
1221
|
+
let count = 1;
|
|
1222
|
+
let bytes = firstBytes;
|
|
1223
|
+
while (count < items.length && count < limits.maxCount) {
|
|
1224
|
+
const next = items[count];
|
|
1225
|
+
if (next.backfill === true !== backfill) break;
|
|
1226
|
+
const nextBytes = outboxItemBytes(next);
|
|
1227
|
+
if (nextBytes > limits.maxItemBytes || bytes + nextBytes > limits.maxBytes) break;
|
|
1228
|
+
bytes += nextBytes;
|
|
1229
|
+
count += 1;
|
|
1230
|
+
}
|
|
1231
|
+
return { kind: "send", count, backfill };
|
|
1232
|
+
}
|
|
1233
|
+
|
|
1207
1234
|
function advanceInboundCursor(current, handled) {
|
|
1208
1235
|
let next = current;
|
|
1209
1236
|
while (handled.has(next + 1)) {
|
|
@@ -1286,6 +1313,10 @@ class ApiSessionClient extends EventEmitter {
|
|
|
1286
1313
|
};
|
|
1287
1314
|
lastSeq = 0;
|
|
1288
1315
|
pendingOutbox = [];
|
|
1316
|
+
/** B-880: set while a transcript replay enqueues (see `replayHistory`). */
|
|
1317
|
+
replayingHistory = false;
|
|
1318
|
+
/** B-880 PR-2: the server-side backfill quota — declared before the first replay batch, closed after the last. */
|
|
1319
|
+
backfillDeclaration = null;
|
|
1289
1320
|
sendSync;
|
|
1290
1321
|
receiveSync;
|
|
1291
1322
|
directInboundLocalIds = /* @__PURE__ */ new Set();
|
|
@@ -1794,18 +1825,23 @@ class ApiSessionClient extends EventEmitter {
|
|
|
1794
1825
|
}
|
|
1795
1826
|
this.awaitingInitialFetch = false;
|
|
1796
1827
|
}
|
|
1797
|
-
static MAX_OUTBOX_BATCH_SIZE = 50;
|
|
1798
1828
|
async flushOutbox() {
|
|
1799
|
-
|
|
1800
|
-
|
|
1801
|
-
|
|
1829
|
+
for (let plan = planOutboxBatch(this.pendingOutbox); plan; plan = planOutboxBatch(this.pendingOutbox)) {
|
|
1830
|
+
if (plan.kind === "oversize") {
|
|
1831
|
+
const [dropped] = this.pendingOutbox.splice(0, 1);
|
|
1832
|
+
logger.debug(`[API] Dropped an outbound message of ${plan.bytes} bytes (over the server's request limit), localId ${dropped.localId}`);
|
|
1833
|
+
continue;
|
|
1834
|
+
}
|
|
1835
|
+
const batch = this.pendingOutbox.slice(0, plan.count);
|
|
1836
|
+
if (plan.backfill && this.backfillDeclaration === "pending") await this.declareBackfill(this.pendingBackfillCount());
|
|
1802
1837
|
const response = await axios.post(
|
|
1803
1838
|
`${configuration.serverUrl}/v3/sessions/${encodeURIComponent(this.sessionId)}/messages`,
|
|
1804
1839
|
{
|
|
1805
|
-
messages: batch
|
|
1840
|
+
messages: batch.map(({ content, localId }) => ({ content, localId }))
|
|
1806
1841
|
},
|
|
1807
1842
|
{
|
|
1808
|
-
|
|
1843
|
+
// B-880: marks a replayed transcript; the server honours it only for a declared backfill (spec PR-2).
|
|
1844
|
+
headers: plan.backfill ? { ...this.authHeaders(), "X-Happy-Message-Origin": "backfill" } : this.authHeaders(),
|
|
1809
1845
|
timeout: 6e4
|
|
1810
1846
|
}
|
|
1811
1847
|
);
|
|
@@ -1813,6 +1849,36 @@ class ApiSessionClient extends EventEmitter {
|
|
|
1813
1849
|
this.noteHandledSeqs(messages.map((message) => message.seq));
|
|
1814
1850
|
this.pushCommittedMessagesToRelay(batch, messages);
|
|
1815
1851
|
this.pendingOutbox.splice(0, batch.length);
|
|
1852
|
+
if (plan.backfill && this.backfillDeclaration === "declared" && this.pendingBackfillCount() === 0) await this.closeBackfill();
|
|
1853
|
+
}
|
|
1854
|
+
}
|
|
1855
|
+
/**
|
|
1856
|
+
* B-880 PR-2: the server lets a replay use its backfill write budget only up
|
|
1857
|
+
* to what the session declared before its first message. Any answer
|
|
1858
|
+
* (accepted, refused, 404 from an older server) settles it: the replay then
|
|
1859
|
+
* uploads either way, on whichever budget the server picks. A network error
|
|
1860
|
+
* throws, so the outbox retries it with the batch.
|
|
1861
|
+
*/
|
|
1862
|
+
async declareBackfill(total) {
|
|
1863
|
+
const response = await axios.post(
|
|
1864
|
+
`${configuration.serverUrl}/v3/sessions/${encodeURIComponent(this.sessionId)}/backfill`,
|
|
1865
|
+
{ total },
|
|
1866
|
+
{ headers: this.authHeaders(), timeout: 15e3, validateStatus: () => true }
|
|
1867
|
+
);
|
|
1868
|
+
this.backfillDeclaration = response.status === 200 ? "declared" : "closed";
|
|
1869
|
+
logger.debug(`[API] Backfill of ${total} messages declared: HTTP ${response.status}`);
|
|
1870
|
+
}
|
|
1871
|
+
/** B-880 PR-2: the replay is uploaded; later backfill-tagged writes go to the live budget. Best effort. */
|
|
1872
|
+
async closeBackfill() {
|
|
1873
|
+
this.backfillDeclaration = "closed";
|
|
1874
|
+
try {
|
|
1875
|
+
await axios.post(
|
|
1876
|
+
`${configuration.serverUrl}/v3/sessions/${encodeURIComponent(this.sessionId)}/backfill`,
|
|
1877
|
+
{ done: true },
|
|
1878
|
+
{ headers: this.authHeaders(), timeout: 15e3, validateStatus: () => true }
|
|
1879
|
+
);
|
|
1880
|
+
} catch (error) {
|
|
1881
|
+
logger.debug("[API] Closing the backfill failed (the quota stays as declared):", error);
|
|
1816
1882
|
}
|
|
1817
1883
|
}
|
|
1818
1884
|
/**
|
|
@@ -1823,6 +1889,28 @@ class ApiSessionClient extends EventEmitter {
|
|
|
1823
1889
|
* the outbox's own (InvalidateSync backoff), so a server that keeps failing
|
|
1824
1890
|
* keeps this pending rather than resolving early.
|
|
1825
1891
|
*/
|
|
1892
|
+
/**
|
|
1893
|
+
* B-880: enqueue a replayed transcript (import / fork). Everything `replay`
|
|
1894
|
+
* sends is uploaded as a history backfill: its own batches, its own server
|
|
1895
|
+
* rate budget, and counted by `pendingBackfillCount` for the progress the
|
|
1896
|
+
* Web shows. `replay` must be synchronous.
|
|
1897
|
+
*/
|
|
1898
|
+
replayHistory(replay) {
|
|
1899
|
+
this.replayingHistory = true;
|
|
1900
|
+
try {
|
|
1901
|
+
return replay();
|
|
1902
|
+
} finally {
|
|
1903
|
+
this.replayingHistory = false;
|
|
1904
|
+
if (this.backfillDeclaration === null && this.pendingBackfillCount() > 0) this.backfillDeclaration = "pending";
|
|
1905
|
+
if (this.pendingOutbox.length > 0) this.sendSync.invalidate();
|
|
1906
|
+
}
|
|
1907
|
+
}
|
|
1908
|
+
/** B-880: replayed messages the server has not accepted yet. */
|
|
1909
|
+
pendingBackfillCount() {
|
|
1910
|
+
let count = 0;
|
|
1911
|
+
for (const item of this.pendingOutbox) if (item.backfill) count += 1;
|
|
1912
|
+
return count;
|
|
1913
|
+
}
|
|
1826
1914
|
async drainOutbox() {
|
|
1827
1915
|
const target = new Set(this.pendingOutbox);
|
|
1828
1916
|
while (this.pendingOutbox.some((item) => target.has(item))) {
|
|
@@ -1989,9 +2077,10 @@ class ApiSessionClient extends EventEmitter {
|
|
|
1989
2077
|
// Deterministic localIds (terminal mirror, B-105) ride the server's
|
|
1990
2078
|
// @@unique([sessionId, localId]) for replay idempotency; everything
|
|
1991
2079
|
// else keeps the fire-once random id.
|
|
1992
|
-
localId: localId ?? randomUUID()
|
|
2080
|
+
localId: localId ?? randomUUID(),
|
|
2081
|
+
...this.replayingHistory ? { backfill: true } : {}
|
|
1993
2082
|
});
|
|
1994
|
-
if (invalidate) {
|
|
2083
|
+
if (invalidate && !this.replayingHistory) {
|
|
1995
2084
|
this.sendSync.invalidate();
|
|
1996
2085
|
}
|
|
1997
2086
|
}
|
|
@@ -3114,7 +3203,7 @@ class ApiClient {
|
|
|
3114
3203
|
return new ApiSessionClient(this.credential.token, session, opts);
|
|
3115
3204
|
}
|
|
3116
3205
|
async machineSyncClient(machine) {
|
|
3117
|
-
const { ApiMachineClient } = await import('./apiMachine-
|
|
3206
|
+
const { ApiMachineClient } = await import('./apiMachine-C8NGJHHd.mjs');
|
|
3118
3207
|
return new ApiMachineClient(this.credential.token, machine);
|
|
3119
3208
|
}
|
|
3120
3209
|
push() {
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var axios = require('axios');
|
|
4
|
-
var logger = require('./logger-
|
|
5
|
-
var pushNotifications = require('./pushNotifications-
|
|
6
|
-
var reconnectGate = require('./reconnectGate-
|
|
4
|
+
var logger = require('./logger-DP35yx-C.cjs');
|
|
5
|
+
var pushNotifications = require('./pushNotifications-gcQv61e6.cjs');
|
|
6
|
+
var reconnectGate = require('./reconnectGate-BkSaZdIx.cjs');
|
|
7
7
|
var node_events = require('node:events');
|
|
8
8
|
var socket_ioClient = require('socket.io-client');
|
|
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-NSglRbyr.cjs');
|
|
12
|
+
var configuration = require('./configuration-Fx61b4MJ.cjs');
|
|
13
13
|
var node_crypto = require('node:crypto');
|
|
14
|
-
var index = require('./index-
|
|
15
|
-
var registerCommonHandlers = require('./registerCommonHandlers-
|
|
14
|
+
var index = require('./index-BYL_X3gP.cjs');
|
|
15
|
+
var registerCommonHandlers = require('./registerCommonHandlers-B5p3ZZmp.cjs');
|
|
16
16
|
var cuid2 = require('@paralleldrive/cuid2');
|
|
17
|
-
var sync = require('./sync-
|
|
17
|
+
var sync = require('./sync-Dm6GaS8P.cjs');
|
|
18
18
|
var backgroundTaskActivity = require('./backgroundTaskActivity-CBvUdj39.cjs');
|
|
19
|
-
var controlClient = require('./controlClient-
|
|
19
|
+
var controlClient = require('./controlClient-D04wXKoQ.cjs');
|
|
20
20
|
var chalk = require('chalk');
|
|
21
21
|
|
|
22
22
|
async function hmac_sha512(key, data) {
|
|
@@ -1206,6 +1206,33 @@ class PromptQueueDrain {
|
|
|
1206
1206
|
}
|
|
1207
1207
|
}
|
|
1208
1208
|
|
|
1209
|
+
const OUTBOX_BATCH_LIMITS = {
|
|
1210
|
+
maxCount: 100,
|
|
1211
|
+
maxBytes: 768 * 1024,
|
|
1212
|
+
maxItemBytes: 1024 * 1024 - 4 * 1024
|
|
1213
|
+
};
|
|
1214
|
+
function outboxItemBytes(item) {
|
|
1215
|
+
return item.content.length + item.localId.length + 32;
|
|
1216
|
+
}
|
|
1217
|
+
function planOutboxBatch(items, limits = OUTBOX_BATCH_LIMITS) {
|
|
1218
|
+
const first = items[0];
|
|
1219
|
+
if (!first) return null;
|
|
1220
|
+
const firstBytes = outboxItemBytes(first);
|
|
1221
|
+
if (firstBytes > limits.maxItemBytes) return { kind: "oversize", bytes: firstBytes };
|
|
1222
|
+
const backfill = first.backfill === true;
|
|
1223
|
+
let count = 1;
|
|
1224
|
+
let bytes = firstBytes;
|
|
1225
|
+
while (count < items.length && count < limits.maxCount) {
|
|
1226
|
+
const next = items[count];
|
|
1227
|
+
if (next.backfill === true !== backfill) break;
|
|
1228
|
+
const nextBytes = outboxItemBytes(next);
|
|
1229
|
+
if (nextBytes > limits.maxItemBytes || bytes + nextBytes > limits.maxBytes) break;
|
|
1230
|
+
bytes += nextBytes;
|
|
1231
|
+
count += 1;
|
|
1232
|
+
}
|
|
1233
|
+
return { kind: "send", count, backfill };
|
|
1234
|
+
}
|
|
1235
|
+
|
|
1209
1236
|
function advanceInboundCursor(current, handled) {
|
|
1210
1237
|
let next = current;
|
|
1211
1238
|
while (handled.has(next + 1)) {
|
|
@@ -1288,6 +1315,10 @@ class ApiSessionClient extends node_events.EventEmitter {
|
|
|
1288
1315
|
};
|
|
1289
1316
|
lastSeq = 0;
|
|
1290
1317
|
pendingOutbox = [];
|
|
1318
|
+
/** B-880: set while a transcript replay enqueues (see `replayHistory`). */
|
|
1319
|
+
replayingHistory = false;
|
|
1320
|
+
/** B-880 PR-2: the server-side backfill quota — declared before the first replay batch, closed after the last. */
|
|
1321
|
+
backfillDeclaration = null;
|
|
1291
1322
|
sendSync;
|
|
1292
1323
|
receiveSync;
|
|
1293
1324
|
directInboundLocalIds = /* @__PURE__ */ new Set();
|
|
@@ -1796,18 +1827,23 @@ class ApiSessionClient extends node_events.EventEmitter {
|
|
|
1796
1827
|
}
|
|
1797
1828
|
this.awaitingInitialFetch = false;
|
|
1798
1829
|
}
|
|
1799
|
-
static MAX_OUTBOX_BATCH_SIZE = 50;
|
|
1800
1830
|
async flushOutbox() {
|
|
1801
|
-
|
|
1802
|
-
|
|
1803
|
-
|
|
1831
|
+
for (let plan = planOutboxBatch(this.pendingOutbox); plan; plan = planOutboxBatch(this.pendingOutbox)) {
|
|
1832
|
+
if (plan.kind === "oversize") {
|
|
1833
|
+
const [dropped] = this.pendingOutbox.splice(0, 1);
|
|
1834
|
+
logger.logger.debug(`[API] Dropped an outbound message of ${plan.bytes} bytes (over the server's request limit), localId ${dropped.localId}`);
|
|
1835
|
+
continue;
|
|
1836
|
+
}
|
|
1837
|
+
const batch = this.pendingOutbox.slice(0, plan.count);
|
|
1838
|
+
if (plan.backfill && this.backfillDeclaration === "pending") await this.declareBackfill(this.pendingBackfillCount());
|
|
1804
1839
|
const response = await axios.post(
|
|
1805
1840
|
`${configuration.configuration.serverUrl}/v3/sessions/${encodeURIComponent(this.sessionId)}/messages`,
|
|
1806
1841
|
{
|
|
1807
|
-
messages: batch
|
|
1842
|
+
messages: batch.map(({ content, localId }) => ({ content, localId }))
|
|
1808
1843
|
},
|
|
1809
1844
|
{
|
|
1810
|
-
|
|
1845
|
+
// B-880: marks a replayed transcript; the server honours it only for a declared backfill (spec PR-2).
|
|
1846
|
+
headers: plan.backfill ? { ...this.authHeaders(), "X-Happy-Message-Origin": "backfill" } : this.authHeaders(),
|
|
1811
1847
|
timeout: 6e4
|
|
1812
1848
|
}
|
|
1813
1849
|
);
|
|
@@ -1815,6 +1851,36 @@ class ApiSessionClient extends node_events.EventEmitter {
|
|
|
1815
1851
|
this.noteHandledSeqs(messages.map((message) => message.seq));
|
|
1816
1852
|
this.pushCommittedMessagesToRelay(batch, messages);
|
|
1817
1853
|
this.pendingOutbox.splice(0, batch.length);
|
|
1854
|
+
if (plan.backfill && this.backfillDeclaration === "declared" && this.pendingBackfillCount() === 0) await this.closeBackfill();
|
|
1855
|
+
}
|
|
1856
|
+
}
|
|
1857
|
+
/**
|
|
1858
|
+
* B-880 PR-2: the server lets a replay use its backfill write budget only up
|
|
1859
|
+
* to what the session declared before its first message. Any answer
|
|
1860
|
+
* (accepted, refused, 404 from an older server) settles it: the replay then
|
|
1861
|
+
* uploads either way, on whichever budget the server picks. A network error
|
|
1862
|
+
* throws, so the outbox retries it with the batch.
|
|
1863
|
+
*/
|
|
1864
|
+
async declareBackfill(total) {
|
|
1865
|
+
const response = await axios.post(
|
|
1866
|
+
`${configuration.configuration.serverUrl}/v3/sessions/${encodeURIComponent(this.sessionId)}/backfill`,
|
|
1867
|
+
{ total },
|
|
1868
|
+
{ headers: this.authHeaders(), timeout: 15e3, validateStatus: () => true }
|
|
1869
|
+
);
|
|
1870
|
+
this.backfillDeclaration = response.status === 200 ? "declared" : "closed";
|
|
1871
|
+
logger.logger.debug(`[API] Backfill of ${total} messages declared: HTTP ${response.status}`);
|
|
1872
|
+
}
|
|
1873
|
+
/** B-880 PR-2: the replay is uploaded; later backfill-tagged writes go to the live budget. Best effort. */
|
|
1874
|
+
async closeBackfill() {
|
|
1875
|
+
this.backfillDeclaration = "closed";
|
|
1876
|
+
try {
|
|
1877
|
+
await axios.post(
|
|
1878
|
+
`${configuration.configuration.serverUrl}/v3/sessions/${encodeURIComponent(this.sessionId)}/backfill`,
|
|
1879
|
+
{ done: true },
|
|
1880
|
+
{ headers: this.authHeaders(), timeout: 15e3, validateStatus: () => true }
|
|
1881
|
+
);
|
|
1882
|
+
} catch (error) {
|
|
1883
|
+
logger.logger.debug("[API] Closing the backfill failed (the quota stays as declared):", error);
|
|
1818
1884
|
}
|
|
1819
1885
|
}
|
|
1820
1886
|
/**
|
|
@@ -1825,6 +1891,28 @@ class ApiSessionClient extends node_events.EventEmitter {
|
|
|
1825
1891
|
* the outbox's own (InvalidateSync backoff), so a server that keeps failing
|
|
1826
1892
|
* keeps this pending rather than resolving early.
|
|
1827
1893
|
*/
|
|
1894
|
+
/**
|
|
1895
|
+
* B-880: enqueue a replayed transcript (import / fork). Everything `replay`
|
|
1896
|
+
* sends is uploaded as a history backfill: its own batches, its own server
|
|
1897
|
+
* rate budget, and counted by `pendingBackfillCount` for the progress the
|
|
1898
|
+
* Web shows. `replay` must be synchronous.
|
|
1899
|
+
*/
|
|
1900
|
+
replayHistory(replay) {
|
|
1901
|
+
this.replayingHistory = true;
|
|
1902
|
+
try {
|
|
1903
|
+
return replay();
|
|
1904
|
+
} finally {
|
|
1905
|
+
this.replayingHistory = false;
|
|
1906
|
+
if (this.backfillDeclaration === null && this.pendingBackfillCount() > 0) this.backfillDeclaration = "pending";
|
|
1907
|
+
if (this.pendingOutbox.length > 0) this.sendSync.invalidate();
|
|
1908
|
+
}
|
|
1909
|
+
}
|
|
1910
|
+
/** B-880: replayed messages the server has not accepted yet. */
|
|
1911
|
+
pendingBackfillCount() {
|
|
1912
|
+
let count = 0;
|
|
1913
|
+
for (const item of this.pendingOutbox) if (item.backfill) count += 1;
|
|
1914
|
+
return count;
|
|
1915
|
+
}
|
|
1828
1916
|
async drainOutbox() {
|
|
1829
1917
|
const target = new Set(this.pendingOutbox);
|
|
1830
1918
|
while (this.pendingOutbox.some((item) => target.has(item))) {
|
|
@@ -1991,9 +2079,10 @@ class ApiSessionClient extends node_events.EventEmitter {
|
|
|
1991
2079
|
// Deterministic localIds (terminal mirror, B-105) ride the server's
|
|
1992
2080
|
// @@unique([sessionId, localId]) for replay idempotency; everything
|
|
1993
2081
|
// else keeps the fire-once random id.
|
|
1994
|
-
localId: localId ?? node_crypto.randomUUID()
|
|
2082
|
+
localId: localId ?? node_crypto.randomUUID(),
|
|
2083
|
+
...this.replayingHistory ? { backfill: true } : {}
|
|
1995
2084
|
});
|
|
1996
|
-
if (invalidate) {
|
|
2085
|
+
if (invalidate && !this.replayingHistory) {
|
|
1997
2086
|
this.sendSync.invalidate();
|
|
1998
2087
|
}
|
|
1999
2088
|
}
|
|
@@ -3116,7 +3205,7 @@ class ApiClient {
|
|
|
3116
3205
|
return new ApiSessionClient(this.credential.token, session, opts);
|
|
3117
3206
|
}
|
|
3118
3207
|
async machineSyncClient(machine) {
|
|
3119
|
-
const { ApiMachineClient } = await Promise.resolve().then(function () { return require('./apiMachine-
|
|
3208
|
+
const { ApiMachineClient } = await Promise.resolve().then(function () { return require('./apiMachine-cyDRM_S-.cjs'); });
|
|
3120
3209
|
return new ApiMachineClient(this.credential.token, machine);
|
|
3121
3210
|
}
|
|
3122
3211
|
push() {
|