very-happy-cli 0.2.195 → 0.2.196
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-BTIF87yb.mjs → AcpBackend-RqGkFeeY.mjs} +3 -3
- package/dist/{AcpBackend-CXSV6FF5.cjs → AcpBackend-tL_g_UJ5.cjs} +3 -3
- package/dist/{AcpSessionManager-CEpU_GVk.mjs → AcpSessionManager-C-R6yHXc.mjs} +2 -2
- package/dist/{AcpSessionManager-BbWODxSp.cjs → AcpSessionManager-CFB24qBh.cjs} +1 -1
- package/dist/{BasePermissionHandler-C6iF28Ct.cjs → BasePermissionHandler-C0JS37Jt.cjs} +1 -1
- package/dist/{BasePermissionHandler-B5ka7Aaf.mjs → BasePermissionHandler-CgHLVNKT.mjs} +1 -1
- package/dist/{account-Bvcdk9CH.cjs → account-DOil1Hn8.cjs} +5 -5
- package/dist/{account-WSJcdMGl.mjs → account-EzL-zwwE.mjs} +11 -11
- package/dist/{accountService-BtEgv0fC.mjs → accountService-DQ21IlBs.mjs} +4 -4
- package/dist/{acpSessionResume-B2hd1Wub.cjs → acpSessionResume-B01oHWDS.cjs} +1 -1
- package/dist/{acpSessionResume-BYMm4w8Q.mjs → acpSessionResume-DEOIZUuj.mjs} +1 -1
- package/dist/{agentHome-CVM15_3U.cjs → agentHome-BulDO_1K.cjs} +4 -4
- package/dist/{agentHome-Jl8yWAjF.mjs → agentHome-DucTue1n.mjs} +4 -4
- package/dist/{api-DOzNOoVJ.mjs → api-CiNezCys.mjs} +46 -13
- package/dist/{api-TpjZJXV-.cjs → api-fuwEEEkT.cjs} +45 -12
- package/dist/{apiMachine-COkvJAmd.cjs → apiMachine-CxmiSa2-.cjs} +13 -13
- package/dist/{apiMachine-M-Fs9g5Y.mjs → apiMachine-DCmKjms1.mjs} +18 -18
- package/dist/{attachmentContent-BiBOjTXX.cjs → attachmentContent-Cehh7ClR.cjs} +2 -2
- package/dist/{attachmentContent-D6PjMVDq.mjs → attachmentContent-CiY3MvdO.mjs} +2 -2
- package/dist/{auth-DfcdjMUp.cjs → auth-DHlbjtf7.cjs} +5 -5
- package/dist/{auth-BfHLe1gU.mjs → auth-DHqHrs5d.mjs} +8 -8
- package/dist/{auth-Bfe3Ue_B.mjs → auth-DVsH_a8J.mjs} +5 -5
- package/dist/{auth-BOceB8cL.cjs → auth-tlMcvk2Y.cjs} +8 -8
- package/dist/{auto-CDeivd5V.mjs → auto-Cnn8luKk.mjs} +17 -17
- package/dist/{auto-CnTitokD.cjs → auto-DNAa8xDZ.cjs} +14 -14
- package/dist/{bootstrap-BxcKrgR9.mjs → bootstrap-C2XSEyOe.mjs} +2 -2
- package/dist/{bootstrap-DpyP22Wx.cjs → bootstrap-PeTZ2sAn.cjs} +2 -2
- package/dist/{browser-ac0aPrVE.cjs → browser-Bm24RiFU.cjs} +1 -1
- package/dist/{browser-Bb0Gqffc.mjs → browser-CWWyaf8_.mjs} +1 -1
- package/dist/{claudeAccountEnv-NyoxjLuJ.mjs → claudeAccountEnv-CPO6CGNd.mjs} +1 -1
- package/dist/{claudeLocal-RGWhplSr.cjs → claudeLocal-BDWy2pFt.cjs} +4 -4
- package/dist/{claudeLocal-otwxWF6e.mjs → claudeLocal-CRG-Q7kS.mjs} +5 -5
- package/dist/{claudeLocalLauncher-CTibA4cU.mjs → claudeLocalLauncher-B5cOrszW.mjs} +10 -10
- package/dist/{claudeLocalLauncher-yG-MBhY7.cjs → claudeLocalLauncher-DmSLoHlw.cjs} +9 -9
- package/dist/{claudeSessionFork-HFFwivGY.mjs → claudeSessionFork-BqV6E0ep.mjs} +1 -1
- package/dist/{claudeSessionFork-DH_Su4uO.cjs → claudeSessionFork-OffWLYgd.cjs} +1 -1
- package/dist/{client-BhAjEv8Z.mjs → client-B3lOol4f.mjs} +4 -4
- package/dist/{client-BlV73Gbw.cjs → client-B9fcSMXP.cjs} +2 -2
- package/dist/{client-CydHzidF.mjs → client-CfTeXnYS.mjs} +2 -2
- package/dist/{client-DpTk1S7C.mjs → client-Cg_cuQb1.mjs} +2 -2
- package/dist/{client-DcXLNaF2.cjs → client-Ckic3nxZ.cjs} +2 -2
- package/dist/{client-DxjYsJ8d.cjs → client-YFvImdwH.cjs} +3 -3
- package/dist/codex/happyMcpStdioBridge.cjs +15 -15
- package/dist/codex/happyMcpStdioBridge.mjs +16 -16
- package/dist/{codexAccount-CKXpXq0B.mjs → codexAccount-iZwmpYti.mjs} +1 -1
- package/dist/{codexAppServerClient-C1xBSuVk.cjs → codexAppServerClient-C-UwVMUN.cjs} +3 -3
- package/dist/{codexAppServerClient-mln0W8vT.mjs → codexAppServerClient-aV5m-FpZ.mjs} +3 -3
- package/dist/{codexCommand-Plm-_aRy.cjs → codexCommand-5nWT7F8A.cjs} +48 -43
- package/dist/{codexCommand-CmWhYduF.mjs → codexCommand-CI2NTyIF.mjs} +54 -49
- package/dist/{codexTermination-QltAvFpq.mjs → codexTermination-CLjDP6Ja.mjs} +6 -2
- package/dist/{codexTermination-C9c80lIF.cjs → codexTermination-D18IHgLP.cjs} +6 -2
- package/dist/{config-BH75enfT.cjs → config-B7YtrHi0.cjs} +3 -3
- package/dist/{config-DK27kWTT.mjs → config-BfwjfFSC.mjs} +3 -3
- package/dist/{configuration-CwfgJZKs.mjs → configuration-C8r6uD9k.mjs} +1 -1
- package/dist/{configuration-CKaq0tNe.cjs → configuration-CWRKSOyj.cjs} +1 -1
- package/dist/{connect-_QkCFMxO.cjs → connect-DALX1hGB.cjs} +14 -14
- package/dist/{connect-h3_VMJst.mjs → connect-K5HBcM56.mjs} +15 -15
- package/dist/{context-DbENnaVc.cjs → context-BqhlGL3u.cjs} +1 -1
- package/dist/{context-DcOpvIiR.mjs → context-CtMY-M8T.mjs} +1 -1
- package/dist/{controlClient-Dv6IvvUq.mjs → controlClient-DYQ1g2ar.mjs} +19 -7
- package/dist/{controlClient-D_HIbnnS.cjs → controlClient-DyNgxNl7.cjs} +19 -7
- package/dist/{createSessionMetadata-CusO22Am.cjs → createSessionMetadata-C4WN8pVK.cjs} +2 -2
- package/dist/{createSessionMetadata-DimBsfVG.mjs → createSessionMetadata-CZuEDo2v.mjs} +2 -2
- package/dist/{daemonAccounts-QT-RDDEp.mjs → daemonAccounts-CnAEaJE_.mjs} +3 -3
- package/dist/{defaultPermissionMode-B-Vt8ECY.mjs → defaultPermissionMode-CpEJ0wlb.mjs} +1 -1
- package/dist/{deterministicJson-CMApF2Rl.mjs → deterministicJson-Dg_0QJAR.mjs} +13 -13
- package/dist/{deterministicJson-BYqRKTmL.cjs → deterministicJson-r4zhG546.cjs} +12 -12
- package/dist/{doctor-Czbl7gk2.cjs → doctor-0gLGzwz6.cjs} +8 -8
- package/dist/{doctor-u46qYYKX.cjs → doctor-CJpFhHoK.cjs} +8 -9
- package/dist/{doctor-BkyoZ0Uw.mjs → doctor-COeFzPpz.mjs} +8 -8
- package/dist/{doctor-BPkYWSuq.mjs → doctor-GN5mPOn5.mjs} +8 -9
- package/dist/{downloadTarget-C5BzZ_bz.cjs → downloadTarget-8ovVpDv1.cjs} +6 -6
- package/dist/{downloadTarget-CM0BZNSY.mjs → downloadTarget-CbuUiS5p.mjs} +6 -6
- package/dist/{ensureDaemonRunning-D508DmcP.cjs → ensureDaemonRunning-Bq-n6xTt.cjs} +5 -5
- package/dist/{ensureDaemonRunning-P399ot_C.mjs → ensureDaemonRunning-CwlujXmV.mjs} +5 -5
- package/dist/{handleResumeCommand-BK_2ShBf.mjs → handleResumeCommand-B5GgmPm_.mjs} +5 -5
- package/dist/{handleResumeCommand-CCgK7-0v.cjs → handleResumeCommand-muSrYA5y.cjs} +5 -5
- package/dist/{index-_DRVKtSd.mjs → index-BRH0XYSO.mjs} +53 -46
- package/dist/{index-BalJgriQ.cjs → index-BUOd8bNd.cjs} +5 -5
- package/dist/{index-BENDk1i9.mjs → index-BZCIkrFj.mjs} +4 -4
- package/dist/{index-BlWyEpMw.mjs → index-C27JFCbe.mjs} +1 -1
- package/dist/{index-CGKn-GTK.cjs → index-CQZg9jKx.cjs} +4 -4
- package/dist/{index-Bz9Bj7l1.cjs → index-CnY74Dae.cjs} +3 -3
- package/dist/{index-QSAckvNv.mjs → index-D0V-seiN.mjs} +3 -3
- package/dist/{index-DR3NJLVk.mjs → index-DKCmDned.mjs} +5 -5
- package/dist/{index-CSO1-mZ9.cjs → index-Dt_YE-zw.cjs} +47 -40
- package/dist/index.cjs +2 -2
- package/dist/index.mjs +2 -2
- package/dist/{install-CqXaN7_C.cjs → install-BlW2kkPl.cjs} +3 -3
- package/dist/{install-DMTvEPrB.mjs → install-CooQf1oU.mjs} +3 -3
- package/dist/lib.cjs +16 -16
- package/dist/lib.d.cts +4 -0
- package/dist/lib.d.mts +4 -0
- package/dist/lib.mjs +16 -16
- package/dist/{lidState-Cb3TbhPb.mjs → lidState-BflRFw38.mjs} +1 -1
- package/dist/{lidState-Btv4N_B8.cjs → lidState-VZ1j_QYw.cjs} +1 -1
- package/dist/{localHappyAgentAuth-CAAIUJyY.mjs → localHappyAgentAuth-BAK_nqMG.mjs} +1 -1
- package/dist/{localHappyAgentAuth-B3Q5DNLR.cjs → localHappyAgentAuth-oxhpgJOb.cjs} +1 -1
- package/dist/{logger-UgDpJA2u.mjs → logger-D1hb3CG8.mjs} +2 -2
- package/dist/{logger-BZ5TcbEh.cjs → logger-HQ9yDb8R.cjs} +2 -2
- package/dist/{machineMetadata-BYHC-3Vx.mjs → machineMetadata-Dxng45Uh.mjs} +3 -3
- package/dist/{machineMetadata-DLb-m4fL.cjs → machineMetadata-Dzwn-HjN.cjs} +3 -3
- package/dist/{main-CwW6lHIw.mjs → main-BP0iY2vQ.mjs} +48 -48
- package/dist/{main-LavPb80B.cjs → main-D7qre-pa.cjs} +48 -48
- package/dist/{mcp-BjYz5Ymf.mjs → mcp-BmDGyj7k.mjs} +18 -18
- package/dist/{mcp-BQbWhqUh.cjs → mcp-D3yzLkh8.cjs} +14 -14
- package/dist/{mirrorProtocol-BH5eT99U.mjs → mirrorProtocol-C9Zc6GFT.mjs} +3 -3
- package/dist/{mirrorProtocol-Ci9YmCEV.cjs → mirrorProtocol-Cv2otcvM.cjs} +2 -2
- package/dist/{package-C4OfB2YF.mjs → package-CpmoMPuj.mjs} +7 -7
- package/dist/{package-B61-BBlh.cjs → package-Dn7zZkY1.cjs} +7 -7
- package/dist/{panels-cBJT5Up1.mjs → panels-CQobcX5w.mjs} +5 -5
- package/dist/{panels-ByprLJag.cjs → panels-D59PlNoD.cjs} +5 -5
- package/dist/{peerTools-DS6GqJcn.mjs → peerTools-CNzlwuL7.mjs} +5 -5
- package/dist/{peerTools-BXSjS8lB.cjs → peerTools-D417O7d-.cjs} +5 -5
- package/dist/{persistence-DBmeYlwT.cjs → persistence-BiyvEYaR.cjs} +15 -5
- package/dist/{persistence-CQhmtobL.mjs → persistence-CagHeZ-f.mjs} +15 -5
- package/dist/{piRunnerArgs-Dy-3vN_Q.mjs → piRunnerArgs-DKU5LoWu.mjs} +1 -1
- package/dist/{piRunnerArgs-CmEE058l.cjs → piRunnerArgs-kTaNYd23.cjs} +1 -1
- package/dist/{piRuntime-BCXjC4__.cjs → piRuntime-BI4KNAUY.cjs} +1 -1
- package/dist/{piRuntime-Rq9v4M4e.mjs → piRuntime-BV4fQyZD.mjs} +1 -1
- package/dist/{piTerminal-ehNQOvLL.cjs → piTerminal-WPUtDJAV.cjs} +16 -16
- package/dist/{piTerminal-CRhDUqX7.mjs → piTerminal-oObkl3WJ.mjs} +20 -20
- package/dist/processTermination-ChJG5SLW.mjs +107 -0
- package/dist/processTermination-f17wxlMb.cjs +110 -0
- package/dist/{processTreeSnapshot-mDbnuojn.cjs → processTreeSnapshot-D5iNblp6.cjs} +26 -0
- package/dist/{processTreeSnapshot-CuLJDNC-.mjs → processTreeSnapshot-fuwxC0fr.mjs} +25 -1
- package/dist/{pushNotifications-67GmbVfE.mjs → pushNotifications-4sNESDMv.mjs} +11 -4
- package/dist/{pushNotifications-qCS7_tDF.cjs → pushNotifications-DRDWUnP-.cjs} +11 -2
- package/dist/{query-CIDBGnv6.mjs → query-6OWHW1U1.mjs} +2 -2
- package/dist/{query-B4QIiI7e.cjs → query-qIbeJ2-r.cjs} +2 -2
- package/dist/{rateLimitWindows-8-khalzj.mjs → rateLimitWindows-4uhuwKnU.mjs} +1 -1
- package/dist/{rateLimitWindows-BIfLMxOk.cjs → rateLimitWindows-U4fc1-_6.cjs} +1 -1
- package/dist/{registerCommonHandlers-G2p0MJu4.cjs → registerCommonHandlers-CEV9KUsq.cjs} +2 -2
- package/dist/{registerCommonHandlers-C7hlztAO.mjs → registerCommonHandlers-PTJ8TBj9.mjs} +2 -2
- package/dist/{registerKillSessionHandler-BWvl6wro.cjs → registerKillSessionHandler-C6F1sjoo.cjs} +5 -5
- package/dist/{registerKillSessionHandler-rwXdO0t0.mjs → registerKillSessionHandler-D4SSwQj8.mjs} +6 -6
- package/dist/{registerSideQuestionHandler-Xg46gSVh.mjs → registerSideQuestionHandler-4mRv0Msq.mjs} +4 -4
- package/dist/{registerSideQuestionHandler-CsyPnjce.cjs → registerSideQuestionHandler-ByUnjI3V.cjs} +4 -4
- package/dist/{remoteSessionClient-D6_7vNKc.cjs → remoteSessionClient-CUk6haD7.cjs} +5 -5
- package/dist/{remoteSessionClient-DQSnC7ox.mjs → remoteSessionClient-CfYDFlKm.mjs} +5 -5
- package/dist/{reportProgressTool-HjzV5y_2.mjs → reportProgressTool-BCn5oG52.mjs} +3 -3
- package/dist/{reportProgressTool-CIHGKraF.cjs → reportProgressTool-C1JOvo6T.cjs} +2 -2
- package/dist/{run-tQ4bFkHu.cjs → run-D2SlfZPP.cjs} +46 -66
- package/dist/{run-M06F1958.mjs → run-DC8BIklA.mjs} +52 -72
- package/dist/{runClaude-Ct0_mShC.cjs → runClaude-BE-5GgIZ.cjs} +29 -25
- package/dist/{runClaude-Dm9kQZ-w.mjs → runClaude-D6fqN9PD.mjs} +34 -30
- package/dist/{runClaudeDeps-DNOzXjc3.mjs → runClaudeDeps-BmdwskeI.mjs} +51 -50
- package/dist/{runClaudeDeps-BT2kWCrQ.cjs → runClaudeDeps-W0nv2vHL.cjs} +39 -38
- package/dist/{runGemini-BvN-yeQR.mjs → runGemini-C3Ipeu1i.mjs} +37 -34
- package/dist/{runGemini-cua7_iuR.cjs → runGemini-Da_d-2kV.cjs} +36 -33
- package/dist/{runOpenClaw-C9E2XzmX.mjs → runOpenClaw-BoI6nbKB.mjs} +30 -20
- package/dist/{runOpenClaw-NpYFRhKm.cjs → runOpenClaw-af5qDNU0.cjs} +30 -20
- package/dist/{sandbox-C-BXZbt9.mjs → sandbox-CjoyUSGa.mjs} +4 -4
- package/dist/{sandbox-hImfD0-T.cjs → sandbox-UGF68GrE.cjs} +4 -4
- package/dist/selfCheck-CNrOZgBv.mjs +88 -0
- package/dist/{selfCheck-B3ulijQM.cjs → selfCheck-Cr8eAw4m.cjs} +39 -39
- package/dist/{send-BCVQkTOl.cjs → send-CVSht9s_.cjs} +8 -8
- package/dist/{send-Dv2L8IRW.mjs → send-gqX0-i4p.mjs} +8 -8
- package/dist/{server-DYxyCyYF.cjs → server-BPgVv-BG.cjs} +6 -6
- package/dist/{server-BBBfuSB-.mjs → server-DxlNqWJo.mjs} +4 -4
- package/dist/{sessionExitLifecycle-DFltxXU8.cjs → sessionExitLifecycle-DB2rjvVS.cjs} +5 -1
- package/dist/{sessionExitLifecycle-CzkLIgNZ.mjs → sessionExitLifecycle-iAtZN9sa.mjs} +5 -1
- package/dist/{sessionLock-BexUoWhZ.mjs → sessionLock-BfvR9BGB.mjs} +94 -78
- package/dist/{sessionLock-B8fsnpZD.cjs → sessionLock-D2usWXAg.cjs} +92 -78
- package/dist/{sessionOps-74pSDXoS.cjs → sessionOps-JRyQhF5s.cjs} +4 -4
- package/dist/{sessionOps-BkEgNA2O.mjs → sessionOps-OmRqUFm4.mjs} +4 -4
- package/dist/{sessionProvider-CWgHsZUA.cjs → sessionProvider-BpscgwwC.cjs} +5 -5
- package/dist/{sessionProvider-DXkhlJE6.mjs → sessionProvider-DTEdidBc.mjs} +10 -10
- package/dist/{sessionScanner-Dhh1wREW.mjs → sessionScanner-BlAOpqMh.mjs} +3 -3
- package/dist/{sessionScanner-D56EkcIj.cjs → sessionScanner-C_qVc1ok.cjs} +3 -3
- package/dist/{sessions-C1zRTjUe.cjs → sessions-7iyjxti9.cjs} +10 -10
- package/dist/{sessions-dJR6k3JY.mjs → sessions-CnjHHllR.mjs} +10 -10
- package/dist/{setupOfflineReconnection-CMUdHtFT.cjs → setupOfflineReconnection-BCbJa5mT.cjs} +2 -2
- package/dist/{setupOfflineReconnection-Dp1rC-eP.mjs → setupOfflineReconnection-IKEI7fLJ.mjs} +2 -2
- package/dist/{spawn-D3-Weoiq.mjs → spawn-CbfcClhj.mjs} +14 -14
- package/dist/{spawn-kMKI09Kh.cjs → spawn-CxEl0Dyz.cjs} +12 -12
- package/dist/{spawnAgents-hKFGQaSJ.mjs → spawnAgents-N3jxdNJC.mjs} +1 -1
- package/dist/{spawnHappyCLI-CgjpjSTT.mjs → spawnHappyCLI-C8gMHJu5.mjs} +1 -1
- package/dist/{spawnHappyCLI-Du1IgJGA.cjs → spawnHappyCLI-CHSlXWUe.cjs} +1 -1
- package/dist/{startFileWatcher-DapvIGxp.mjs → startFileWatcher-6hslFu_B.mjs} +1 -1
- package/dist/{startFileWatcher-DGOnF95-.cjs → startFileWatcher-BGpYPz6L.cjs} +1 -1
- package/dist/{startupSessionCreate-CSi60oo_.mjs → startupSessionCreate-B7jrCZUD.mjs} +3 -3
- package/dist/{startupSessionCreate-rkIMVGJW.cjs → startupSessionCreate-CltDtCEF.cjs} +3 -3
- package/dist/{store-Tf-r1ouq.mjs → store-BlPvTr_Q.mjs} +1 -1
- package/dist/{streamRelay-C9lzMo0V.mjs → streamRelay-DFZyAPD_.mjs} +1 -1
- package/dist/{sync-Cj8Vhltg.cjs → sync-DfI78smj.cjs} +1 -1
- package/dist/{sync-GJkf-HGu.mjs → sync-DtzoF9sw.mjs} +1 -1
- package/dist/{systemPrompt-BEagRbDZ.mjs → systemPrompt-B1Xd99hK.mjs} +2 -2
- package/dist/{systemPrompt-Cne9i1SE.cjs → systemPrompt-HZNR9rjt.cjs} +1 -1
- package/dist/{teams-C_18IMNM.mjs → teams-Vk75H6BZ.mjs} +7 -7
- package/dist/{teams-ClTg6hQ1.cjs → teams-fFX-L_ms.cjs} +6 -6
- package/dist/{template-Ci-cyigF.mjs → template-CJ8uLlD8.mjs} +1 -1
- package/dist/{time-BPPTQ_sE.cjs → time-BqPZjTpo.cjs} +1 -1
- package/dist/{time-CIkdLyza.mjs → time-CgAwVt5R.mjs} +1 -1
- package/dist/{titleGenerator-DnwTdTB_.mjs → titleGenerator-D2UB7Uyr.mjs} +2 -2
- package/dist/{titleGenerator-B_OgL9Pd.cjs → titleGenerator-ijVOuv3J.cjs} +2 -2
- package/dist/{todo-DmHolFRy.mjs → todo-CCuqtD0O.mjs} +6 -6
- package/dist/{todo-DPQHtZVM.cjs → todo-vCzaIwNp.cjs} +5 -5
- package/dist/{tools-B3KGMSU5.cjs → tools-CL8h3fqh.cjs} +1 -1
- package/dist/{tools-DqjPHq9I.mjs → tools-DthGQoo3.mjs} +1 -1
- package/dist/{uninstall-CrK5dgx8.cjs → uninstall-CIvThBvI.cjs} +3 -3
- package/dist/{uninstall-Cm97eybp.mjs → uninstall-DCJh4UoO.mjs} +3 -3
- package/dist/{wrapperAccount-Cq7eZRMx.mjs → wrapperAccount-RPtq8BwD.mjs} +2 -2
- package/package.json +7 -7
- package/dist/selfCheck-D-e9kVhc.mjs +0 -88
|
@@ -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-D1hb3CG8.mjs';
|
|
5
|
+
import { d as delay } from './time-CgAwVt5R.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-CpmoMPuj.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-HQ9yDb8R.cjs');
|
|
7
|
+
var time = require('./time-BqPZjTpo.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-Dn7zZkY1.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,6 +1,6 @@
|
|
|
1
1
|
import { createId } from '@paralleldrive/cuid2';
|
|
2
|
-
import { s as streamKeyOf, k as createEnvelope } from './index-
|
|
3
|
-
import { t as textResultPayload, b as toolResultPayload } from './api-
|
|
2
|
+
import { s as streamKeyOf, k as createEnvelope } from './index-C27JFCbe.mjs';
|
|
3
|
+
import { t as textResultPayload, b as toolResultPayload } from './api-CiNezCys.mjs';
|
|
4
4
|
|
|
5
5
|
function turnOptions(turnId, time) {
|
|
6
6
|
return turnId ? { turn: turnId, time } : { time };
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
var cuid2 = require('@paralleldrive/cuid2');
|
|
4
4
|
var index = require('./index-D9Hidq-g.cjs');
|
|
5
|
-
var api = require('./api-
|
|
5
|
+
var api = require('./api-fuwEEEkT.cjs');
|
|
6
6
|
|
|
7
7
|
function turnOptions(turnId, time) {
|
|
8
8
|
return turnId ? { turn: turnId, time } : { time };
|
|
@@ -2,17 +2,17 @@
|
|
|
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-
|
|
5
|
+
var configuration = require('./configuration-CWRKSOyj.cjs');
|
|
6
|
+
var controlClient = require('./controlClient-DyNgxNl7.cjs');
|
|
7
7
|
var accountService = require('./accountService-DL6xhVUa.cjs');
|
|
8
8
|
require('node:fs');
|
|
9
9
|
require('node:os');
|
|
10
10
|
require('node:path');
|
|
11
|
-
require('./package-
|
|
11
|
+
require('./package-Dn7zZkY1.cjs');
|
|
12
12
|
require('node:fs/promises');
|
|
13
|
-
require('./logger-
|
|
13
|
+
require('./logger-HQ9yDb8R.cjs');
|
|
14
14
|
require('node:util');
|
|
15
|
-
require('./persistence-
|
|
15
|
+
require('./persistence-BiyvEYaR.cjs');
|
|
16
16
|
require('zod');
|
|
17
17
|
require('./authRelay-Dy1qU9td.cjs');
|
|
18
18
|
require('node:crypto');
|
|
@@ -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-C8r6uD9k.mjs';
|
|
4
|
+
import { g as getDaemonAgentProfiles, r as restartDaemonSession, l as listDaemonSessions } from './controlClient-DYQ1g2ar.mjs';
|
|
5
|
+
import { A as AccountService, b as bindResultMessages, a as AccountError, l as localRestartFailure } from './accountService-DQ21IlBs.mjs';
|
|
6
6
|
import 'node:fs';
|
|
7
7
|
import 'node:os';
|
|
8
8
|
import 'node:path';
|
|
9
|
-
import './package-
|
|
9
|
+
import './package-CpmoMPuj.mjs';
|
|
10
10
|
import 'node:fs/promises';
|
|
11
|
-
import './logger-
|
|
11
|
+
import './logger-D1hb3CG8.mjs';
|
|
12
12
|
import 'node:util';
|
|
13
|
-
import './persistence-
|
|
13
|
+
import './persistence-CagHeZ-f.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-C27JFCbe.mjs';
|
|
19
19
|
import '@paralleldrive/cuid2';
|
|
20
20
|
import 'node:child_process';
|
|
21
|
-
import './claudeAccountEnv-
|
|
22
|
-
import './store-
|
|
23
|
-
import './codexAccount-
|
|
21
|
+
import './claudeAccountEnv-CPO6CGNd.mjs';
|
|
22
|
+
import './store-BlPvTr_Q.mjs';
|
|
23
|
+
import './codexAccount-iZwmpYti.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-CnAEaJE_.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 });
|
|
@@ -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 { E as AGENT_PROFILE_FEATURE_LAUNCH, F as AgentProfileAddRequestSchema, G as AgentProfileLoginStartRequestSchema, H as AgentProfileLoginSubmitRequestSchema, I as AgentProfileBindRequestSchema } from './index-C27JFCbe.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-CPO6CGNd.mjs';
|
|
7
|
+
import { C as CODEX_ALWAYS_STRIPPED_ENV_KEYS, r as readCodexProviders, s as syncCodexOverlay, b as baseCodexHome } from './codexAccount-iZwmpYti.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-BlPvTr_Q.mjs';
|
|
10
10
|
|
|
11
11
|
const CHECK_TIMEOUT_MS = 2e4;
|
|
12
12
|
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-CWRKSOyj.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-C8r6uD9k.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-BiyvEYaR.cjs');
|
|
6
6
|
require('node:fs');
|
|
7
|
-
require('./logger-
|
|
7
|
+
require('./logger-HQ9yDb8R.cjs');
|
|
8
8
|
var loginShellEnv = require('./loginShellEnv-BkuYtExZ.cjs');
|
|
9
9
|
require('node:fs/promises');
|
|
10
|
-
require('./configuration-
|
|
10
|
+
require('./configuration-CWRKSOyj.cjs');
|
|
11
11
|
require('node:path');
|
|
12
|
-
require('./package-
|
|
12
|
+
require('./package-Dn7zZkY1.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-CagHeZ-f.mjs';
|
|
4
4
|
import 'node:fs';
|
|
5
|
-
import './logger-
|
|
5
|
+
import './logger-D1hb3CG8.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-C8r6uD9k.mjs';
|
|
9
9
|
import 'node:path';
|
|
10
|
-
import './package-
|
|
10
|
+
import './package-CpmoMPuj.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, r as redactLogValue } from './logger-
|
|
3
|
-
import {
|
|
2
|
+
import { l as logger, r as redactLogValue } from './logger-D1hb3CG8.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-4sNESDMv.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 } from './lidState-BflRFw38.mjs';
|
|
4
5
|
import { EventEmitter } from 'node:events';
|
|
5
6
|
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-67GmbVfE.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-CgAwVt5R.mjs';
|
|
10
|
+
import { c as configuration } from './configuration-C8r6uD9k.mjs';
|
|
11
11
|
import { createHmac, randomUUID } from 'node:crypto';
|
|
12
|
-
import { k as createEnvelope, s as streamKeyOf, a3 as ReleaseDrainNoticeSchema, a4 as RelayAssignmentResponseSchema } from './index-
|
|
13
|
-
import { r as registerCommonHandlers } from './registerCommonHandlers-
|
|
12
|
+
import { k as createEnvelope, s as streamKeyOf, a3 as ReleaseDrainNoticeSchema, a4 as RelayAssignmentResponseSchema } from './index-C27JFCbe.mjs';
|
|
13
|
+
import { r as registerCommonHandlers } from './registerCommonHandlers-PTJ8TBj9.mjs';
|
|
14
14
|
import { createId } from '@paralleldrive/cuid2';
|
|
15
|
-
import { I as InvalidateSync } from './sync-
|
|
15
|
+
import { I as InvalidateSync } from './sync-DtzoF9sw.mjs';
|
|
16
16
|
import { B as BackgroundTaskReporter } from './backgroundTaskActivity-8PdPxrvy.mjs';
|
|
17
|
-
import { q as notifyDaemonTurnEvent, t as notifyDaemonBackgroundTasks } from './controlClient-
|
|
17
|
+
import { q as notifyDaemonTurnEvent, t as notifyDaemonBackgroundTasks } from './controlClient-DYQ1g2ar.mjs';
|
|
18
18
|
import chalk from 'chalk';
|
|
19
19
|
|
|
20
20
|
async function hmac_sha512(key, data) {
|
|
@@ -1225,6 +1225,7 @@ class ApiSessionClient extends EventEmitter {
|
|
|
1225
1225
|
on(event, listener) {
|
|
1226
1226
|
super.on(event, listener);
|
|
1227
1227
|
if (event === "archived" && this.archiveSignalled) queueMicrotask(() => listener());
|
|
1228
|
+
if (event === "superseded" && this.supersededAt !== null) queueMicrotask(() => listener());
|
|
1228
1229
|
return this;
|
|
1229
1230
|
}
|
|
1230
1231
|
token;
|
|
@@ -1349,8 +1350,16 @@ class ApiSessionClient extends EventEmitter {
|
|
|
1349
1350
|
this.emit("archived");
|
|
1350
1351
|
return;
|
|
1351
1352
|
}
|
|
1353
|
+
if (error.message === SESSION_SUPERSEDED_ERROR) {
|
|
1354
|
+
this.markSuperseded(null);
|
|
1355
|
+
return;
|
|
1356
|
+
}
|
|
1352
1357
|
this.startSmartReconnect();
|
|
1353
1358
|
});
|
|
1359
|
+
this.socket.on("session-superseded", (notice) => {
|
|
1360
|
+
if (notice?.sessionId !== this.sessionId) return;
|
|
1361
|
+
this.markSuperseded(notice);
|
|
1362
|
+
});
|
|
1354
1363
|
this.socket.on("session-archive", ({ sessionId }) => {
|
|
1355
1364
|
if (sessionId !== this.sessionId) return;
|
|
1356
1365
|
logger.debug("[SOCKET] Server archived this session; exiting...");
|
|
@@ -1439,6 +1448,7 @@ class ApiSessionClient extends EventEmitter {
|
|
|
1439
1448
|
clientType: "session-scoped",
|
|
1440
1449
|
sessionId: this.sessionId,
|
|
1441
1450
|
happyClient: `cli-coding-session/${configuration.currentCliVersion}`,
|
|
1451
|
+
...agentInstanceAuth,
|
|
1442
1452
|
...handover ? { handoverEpoch: handover.epoch } : {}
|
|
1443
1453
|
},
|
|
1444
1454
|
...handover ? { query: { vh_slot: handover.candidateSlot }, forceNew: true } : {},
|
|
@@ -1484,7 +1494,7 @@ class ApiSessionClient extends EventEmitter {
|
|
|
1484
1494
|
candidate.close();
|
|
1485
1495
|
return;
|
|
1486
1496
|
}
|
|
1487
|
-
for (const event of ["session-archive", "update", "error", "server-draining"]) {
|
|
1497
|
+
for (const event of ["session-archive", "session-superseded", "update", "error", "server-draining"]) {
|
|
1488
1498
|
const listeners = previous.listeners(event);
|
|
1489
1499
|
previous.removeAllListeners(event);
|
|
1490
1500
|
for (const listener of listeners) candidate.on(event, listener);
|
|
@@ -1503,8 +1513,12 @@ class ApiSessionClient extends EventEmitter {
|
|
|
1503
1513
|
this.rpcHandlerManager.onSocketDisconnect(candidate);
|
|
1504
1514
|
this.startSmartReconnect();
|
|
1505
1515
|
});
|
|
1506
|
-
candidate.on("connect_error", () => {
|
|
1516
|
+
candidate.on("connect_error", (error) => {
|
|
1507
1517
|
this.rpcHandlerManager.onSocketDisconnect(candidate);
|
|
1518
|
+
if (error?.message === SESSION_SUPERSEDED_ERROR) {
|
|
1519
|
+
this.markSuperseded(null);
|
|
1520
|
+
return;
|
|
1521
|
+
}
|
|
1508
1522
|
this.startSmartReconnect();
|
|
1509
1523
|
});
|
|
1510
1524
|
this.receiveSync.invalidate();
|
|
@@ -1859,7 +1873,7 @@ class ApiSessionClient extends EventEmitter {
|
|
|
1859
1873
|
if (!assignment) return;
|
|
1860
1874
|
const relaySocket = io(assignment.url, {
|
|
1861
1875
|
path: "/v1/relay",
|
|
1862
|
-
auth: { token: assignment.token },
|
|
1876
|
+
auth: { token: assignment.token, ...agentInstanceAuth },
|
|
1863
1877
|
transports: ["websocket"],
|
|
1864
1878
|
reconnection: true,
|
|
1865
1879
|
reconnectionDelay: 500,
|
|
@@ -1867,6 +1881,9 @@ class ApiSessionClient extends EventEmitter {
|
|
|
1867
1881
|
});
|
|
1868
1882
|
this.relaySocket?.close();
|
|
1869
1883
|
this.relaySocket = relaySocket;
|
|
1884
|
+
relaySocket.on("session-superseded", (notice) => {
|
|
1885
|
+
if (notice?.sessionId === this.sessionId) this.markSuperseded(notice);
|
|
1886
|
+
});
|
|
1870
1887
|
relaySocket.on("connect", () => {
|
|
1871
1888
|
if (this.relaySocket !== relaySocket) return;
|
|
1872
1889
|
this.rpcHandlerManager.onSocketConnect(relaySocket);
|
|
@@ -2527,6 +2544,22 @@ class ApiSessionClient extends EventEmitter {
|
|
|
2527
2544
|
}, 1e4);
|
|
2528
2545
|
});
|
|
2529
2546
|
}
|
|
2547
|
+
/** B-864: set once the server handed this session to a newer wrapper process. */
|
|
2548
|
+
supersededAt = null;
|
|
2549
|
+
get superseded() {
|
|
2550
|
+
return this.supersededAt !== null;
|
|
2551
|
+
}
|
|
2552
|
+
markSuperseded(notice) {
|
|
2553
|
+
if (this.supersededAt !== null) return;
|
|
2554
|
+
this.supersededAt = Date.now();
|
|
2555
|
+
const by = notice?.by ? ` by a wrapper started at ${new Date(notice.by.startedAt).toISOString()}${notice.by.happyClient ? ` (${notice.by.happyClient})` : ""}` : " by a newer wrapper";
|
|
2556
|
+
const message = `Session ${this.sessionId} was taken over${by}; this process (pid ${process.pid}) stops driving it.`;
|
|
2557
|
+
logger.debug(`[API] [SUPERSEDED] ${message}`);
|
|
2558
|
+
console.error(message);
|
|
2559
|
+
this.inboundFrozen = true;
|
|
2560
|
+
void this.close();
|
|
2561
|
+
this.emit("superseded", notice);
|
|
2562
|
+
}
|
|
2530
2563
|
async close() {
|
|
2531
2564
|
logger.debug("[API] socket.close() called");
|
|
2532
2565
|
this.closedByClient = true;
|
|
@@ -3073,7 +3106,7 @@ class ApiClient {
|
|
|
3073
3106
|
return new ApiSessionClient(this.credential.token, session, opts);
|
|
3074
3107
|
}
|
|
3075
3108
|
async machineSyncClient(machine) {
|
|
3076
|
-
const { ApiMachineClient } = await import('./apiMachine-
|
|
3109
|
+
const { ApiMachineClient } = await import('./apiMachine-DCmKjms1.mjs');
|
|
3077
3110
|
return new ApiMachineClient(this.credential.token, machine);
|
|
3078
3111
|
}
|
|
3079
3112
|
push() {
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var axios = require('axios');
|
|
4
|
-
var logger = require('./logger-
|
|
5
|
-
var
|
|
4
|
+
var logger = require('./logger-HQ9yDb8R.cjs');
|
|
5
|
+
var pushNotifications = require('./pushNotifications-DRDWUnP-.cjs');
|
|
6
|
+
var lidState = require('./lidState-VZ1j_QYw.cjs');
|
|
6
7
|
var node_events = require('node:events');
|
|
7
8
|
var socket_ioClient = require('socket.io-client');
|
|
8
|
-
var pushNotifications = require('./pushNotifications-qCS7_tDF.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-BqPZjTpo.cjs');
|
|
12
|
+
var configuration = require('./configuration-CWRKSOyj.cjs');
|
|
13
13
|
var node_crypto = require('node:crypto');
|
|
14
14
|
var index = require('./index-D9Hidq-g.cjs');
|
|
15
|
-
var registerCommonHandlers = require('./registerCommonHandlers-
|
|
15
|
+
var registerCommonHandlers = require('./registerCommonHandlers-CEV9KUsq.cjs');
|
|
16
16
|
var cuid2 = require('@paralleldrive/cuid2');
|
|
17
|
-
var sync = require('./sync-
|
|
17
|
+
var sync = require('./sync-DfI78smj.cjs');
|
|
18
18
|
var backgroundTaskActivity = require('./backgroundTaskActivity-CBvUdj39.cjs');
|
|
19
|
-
var controlClient = require('./controlClient-
|
|
19
|
+
var controlClient = require('./controlClient-DyNgxNl7.cjs');
|
|
20
20
|
var chalk = require('chalk');
|
|
21
21
|
|
|
22
22
|
async function hmac_sha512(key, data) {
|
|
@@ -1227,6 +1227,7 @@ class ApiSessionClient extends node_events.EventEmitter {
|
|
|
1227
1227
|
on(event, listener) {
|
|
1228
1228
|
super.on(event, listener);
|
|
1229
1229
|
if (event === "archived" && this.archiveSignalled) queueMicrotask(() => listener());
|
|
1230
|
+
if (event === "superseded" && this.supersededAt !== null) queueMicrotask(() => listener());
|
|
1230
1231
|
return this;
|
|
1231
1232
|
}
|
|
1232
1233
|
token;
|
|
@@ -1351,8 +1352,16 @@ class ApiSessionClient extends node_events.EventEmitter {
|
|
|
1351
1352
|
this.emit("archived");
|
|
1352
1353
|
return;
|
|
1353
1354
|
}
|
|
1355
|
+
if (error.message === pushNotifications.SESSION_SUPERSEDED_ERROR) {
|
|
1356
|
+
this.markSuperseded(null);
|
|
1357
|
+
return;
|
|
1358
|
+
}
|
|
1354
1359
|
this.startSmartReconnect();
|
|
1355
1360
|
});
|
|
1361
|
+
this.socket.on("session-superseded", (notice) => {
|
|
1362
|
+
if (notice?.sessionId !== this.sessionId) return;
|
|
1363
|
+
this.markSuperseded(notice);
|
|
1364
|
+
});
|
|
1356
1365
|
this.socket.on("session-archive", ({ sessionId }) => {
|
|
1357
1366
|
if (sessionId !== this.sessionId) return;
|
|
1358
1367
|
logger.logger.debug("[SOCKET] Server archived this session; exiting...");
|
|
@@ -1441,6 +1450,7 @@ class ApiSessionClient extends node_events.EventEmitter {
|
|
|
1441
1450
|
clientType: "session-scoped",
|
|
1442
1451
|
sessionId: this.sessionId,
|
|
1443
1452
|
happyClient: `cli-coding-session/${configuration.configuration.currentCliVersion}`,
|
|
1453
|
+
...pushNotifications.agentInstanceAuth,
|
|
1444
1454
|
...handover ? { handoverEpoch: handover.epoch } : {}
|
|
1445
1455
|
},
|
|
1446
1456
|
...handover ? { query: { vh_slot: handover.candidateSlot }, forceNew: true } : {},
|
|
@@ -1486,7 +1496,7 @@ class ApiSessionClient extends node_events.EventEmitter {
|
|
|
1486
1496
|
candidate.close();
|
|
1487
1497
|
return;
|
|
1488
1498
|
}
|
|
1489
|
-
for (const event of ["session-archive", "update", "error", "server-draining"]) {
|
|
1499
|
+
for (const event of ["session-archive", "session-superseded", "update", "error", "server-draining"]) {
|
|
1490
1500
|
const listeners = previous.listeners(event);
|
|
1491
1501
|
previous.removeAllListeners(event);
|
|
1492
1502
|
for (const listener of listeners) candidate.on(event, listener);
|
|
@@ -1505,8 +1515,12 @@ class ApiSessionClient extends node_events.EventEmitter {
|
|
|
1505
1515
|
this.rpcHandlerManager.onSocketDisconnect(candidate);
|
|
1506
1516
|
this.startSmartReconnect();
|
|
1507
1517
|
});
|
|
1508
|
-
candidate.on("connect_error", () => {
|
|
1518
|
+
candidate.on("connect_error", (error) => {
|
|
1509
1519
|
this.rpcHandlerManager.onSocketDisconnect(candidate);
|
|
1520
|
+
if (error?.message === pushNotifications.SESSION_SUPERSEDED_ERROR) {
|
|
1521
|
+
this.markSuperseded(null);
|
|
1522
|
+
return;
|
|
1523
|
+
}
|
|
1510
1524
|
this.startSmartReconnect();
|
|
1511
1525
|
});
|
|
1512
1526
|
this.receiveSync.invalidate();
|
|
@@ -1861,7 +1875,7 @@ class ApiSessionClient extends node_events.EventEmitter {
|
|
|
1861
1875
|
if (!assignment) return;
|
|
1862
1876
|
const relaySocket = socket_ioClient.io(assignment.url, {
|
|
1863
1877
|
path: "/v1/relay",
|
|
1864
|
-
auth: { token: assignment.token },
|
|
1878
|
+
auth: { token: assignment.token, ...pushNotifications.agentInstanceAuth },
|
|
1865
1879
|
transports: ["websocket"],
|
|
1866
1880
|
reconnection: true,
|
|
1867
1881
|
reconnectionDelay: 500,
|
|
@@ -1869,6 +1883,9 @@ class ApiSessionClient extends node_events.EventEmitter {
|
|
|
1869
1883
|
});
|
|
1870
1884
|
this.relaySocket?.close();
|
|
1871
1885
|
this.relaySocket = relaySocket;
|
|
1886
|
+
relaySocket.on("session-superseded", (notice) => {
|
|
1887
|
+
if (notice?.sessionId === this.sessionId) this.markSuperseded(notice);
|
|
1888
|
+
});
|
|
1872
1889
|
relaySocket.on("connect", () => {
|
|
1873
1890
|
if (this.relaySocket !== relaySocket) return;
|
|
1874
1891
|
this.rpcHandlerManager.onSocketConnect(relaySocket);
|
|
@@ -2529,6 +2546,22 @@ class ApiSessionClient extends node_events.EventEmitter {
|
|
|
2529
2546
|
}, 1e4);
|
|
2530
2547
|
});
|
|
2531
2548
|
}
|
|
2549
|
+
/** B-864: set once the server handed this session to a newer wrapper process. */
|
|
2550
|
+
supersededAt = null;
|
|
2551
|
+
get superseded() {
|
|
2552
|
+
return this.supersededAt !== null;
|
|
2553
|
+
}
|
|
2554
|
+
markSuperseded(notice) {
|
|
2555
|
+
if (this.supersededAt !== null) return;
|
|
2556
|
+
this.supersededAt = Date.now();
|
|
2557
|
+
const by = notice?.by ? ` by a wrapper started at ${new Date(notice.by.startedAt).toISOString()}${notice.by.happyClient ? ` (${notice.by.happyClient})` : ""}` : " by a newer wrapper";
|
|
2558
|
+
const message = `Session ${this.sessionId} was taken over${by}; this process (pid ${process.pid}) stops driving it.`;
|
|
2559
|
+
logger.logger.debug(`[API] [SUPERSEDED] ${message}`);
|
|
2560
|
+
console.error(message);
|
|
2561
|
+
this.inboundFrozen = true;
|
|
2562
|
+
void this.close();
|
|
2563
|
+
this.emit("superseded", notice);
|
|
2564
|
+
}
|
|
2532
2565
|
async close() {
|
|
2533
2566
|
logger.logger.debug("[API] socket.close() called");
|
|
2534
2567
|
this.closedByClient = true;
|
|
@@ -3075,7 +3108,7 @@ class ApiClient {
|
|
|
3075
3108
|
return new ApiSessionClient(this.credential.token, session, opts);
|
|
3076
3109
|
}
|
|
3077
3110
|
async machineSyncClient(machine) {
|
|
3078
|
-
const { ApiMachineClient } = await Promise.resolve().then(function () { return require('./apiMachine-
|
|
3111
|
+
const { ApiMachineClient } = await Promise.resolve().then(function () { return require('./apiMachine-CxmiSa2-.cjs'); });
|
|
3079
3112
|
return new ApiMachineClient(this.credential.token, machine);
|
|
3080
3113
|
}
|
|
3081
3114
|
push() {
|
|
@@ -2,46 +2,46 @@
|
|
|
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-HQ9yDb8R.cjs');
|
|
6
|
+
var lidState = require('./lidState-VZ1j_QYw.cjs');
|
|
7
|
+
var mirrorProtocol = require('./mirrorProtocol-Cv2otcvM.cjs');
|
|
8
|
+
var configuration = require('./configuration-CWRKSOyj.cjs');
|
|
9
9
|
var cliUpdate = require('./cliUpdate-DsKXPFYp.cjs');
|
|
10
|
-
var registerCommonHandlers = require('./registerCommonHandlers-
|
|
10
|
+
var registerCommonHandlers = require('./registerCommonHandlers-CEV9KUsq.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-BiyvEYaR.cjs');
|
|
17
17
|
var fileStore = require('./fileStore-7qhnbs6N.cjs');
|
|
18
18
|
var index = require('./index-D9Hidq-g.cjs');
|
|
19
19
|
var accountService = require('./accountService-DL6xhVUa.cjs');
|
|
20
20
|
var authRelay = require('./authRelay-Dy1qU9td.cjs');
|
|
21
21
|
var limits = require('./limits-C-a7gr04.cjs');
|
|
22
|
-
var time = require('./time-
|
|
22
|
+
var time = require('./time-BqPZjTpo.cjs');
|
|
23
23
|
var pty = require('node-pty');
|
|
24
24
|
var terminals = require('./terminals-B_bfC9c2.cjs');
|
|
25
25
|
var tmuxSocket = require('./tmuxSocket-D-Xt6Vn-.cjs');
|
|
26
|
-
var index$1 = require('./index-
|
|
26
|
+
var index$1 = require('./index-CQZg9jKx.cjs');
|
|
27
27
|
var node_crypto = require('node:crypto');
|
|
28
28
|
var node_fs = require('node:fs');
|
|
29
29
|
var axios = require('axios');
|
|
30
30
|
var projectPath = require('./projectPath-C3ioB4Bu.cjs');
|
|
31
31
|
var ids = require('./ids-B6ZC0HGt.cjs');
|
|
32
32
|
var detectCLI = require('./detectCLI-BuYR_Qxe.cjs');
|
|
33
|
-
var localHappyAgentAuth = require('./localHappyAgentAuth-
|
|
33
|
+
var localHappyAgentAuth = require('./localHappyAgentAuth-oxhpgJOb.cjs');
|
|
34
34
|
var path$1 = require('./path-B7zW-WwE.cjs');
|
|
35
35
|
var oneShotPrompts = require('./oneShotPrompts-CL0dip9C.cjs');
|
|
36
|
-
var claudeSessionFork = require('./claudeSessionFork-
|
|
37
|
-
var codexAppServerClient = require('./codexAppServerClient-
|
|
36
|
+
var claudeSessionFork = require('./claudeSessionFork-OffWLYgd.cjs');
|
|
37
|
+
var codexAppServerClient = require('./codexAppServerClient-C-UwVMUN.cjs');
|
|
38
38
|
var codexThreadFork = require('./codexThreadFork-C6ZmcT2z.cjs');
|
|
39
|
-
var rateLimitWindows = require('./rateLimitWindows-
|
|
39
|
+
var rateLimitWindows = require('./rateLimitWindows-U4fc1-_6.cjs');
|
|
40
40
|
require('chalk');
|
|
41
41
|
require('node:util');
|
|
42
42
|
require('os');
|
|
43
43
|
require('child_process');
|
|
44
|
-
require('./package-
|
|
44
|
+
require('./package-Dn7zZkY1.cjs');
|
|
45
45
|
require('util');
|
|
46
46
|
require('fs/promises');
|
|
47
47
|
require('crypto');
|
|
@@ -1,45 +1,45 @@
|
|
|
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-D1hb3CG8.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-BflRFw38.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-C9Zc6GFT.mjs';
|
|
6
|
+
import { c as configuration } from './configuration-C8r6uD9k.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-PTJ8TBj9.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, p as readTrackedClaudeSessionIds, q as readTrackedCodexThreadIds } from './persistence-
|
|
14
|
+
import { r as readSettings, c as readPersistedSessions, p as readTrackedClaudeSessionIds, q as readTrackedCodexThreadIds } from './persistence-CagHeZ-f.mjs';
|
|
15
15
|
import { M as ModelConfigError } from './fileStore-5qpetZS0.mjs';
|
|
16
|
-
import { a8 as AGENT_PROFILE_RPC, a9 as RelayCandidatesResponseSchema, a4 as RelayAssignmentResponseSchema, a3 as ReleaseDrainNoticeSchema } from './index-
|
|
17
|
-
import { a as AccountError } from './accountService-
|
|
16
|
+
import { a8 as AGENT_PROFILE_RPC, a9 as RelayCandidatesResponseSchema, a4 as RelayAssignmentResponseSchema, a3 as ReleaseDrainNoticeSchema } from './index-C27JFCbe.mjs';
|
|
17
|
+
import { a as AccountError } from './accountService-DQ21IlBs.mjs';
|
|
18
18
|
import { e as encodeBase64, g as encrypt, h as decrypt, d as decodeBase64 } from './authRelay-DhQhkBvX.mjs';
|
|
19
19
|
import { p as prepareClipboardText, d as prepareClipboardHistoryText } from './limits-DIo7rEBR.mjs';
|
|
20
|
-
import { b as backoff, d as delay } from './time-
|
|
20
|
+
import { b as backoff, d as delay } from './time-CgAwVt5R.mjs';
|
|
21
21
|
import * as pty from 'node-pty';
|
|
22
22
|
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';
|
|
23
23
|
import { t as tmuxArgs, V as VH_TMUX_SOCKET_ENV, a as scrubTmuxClientEnv } from './tmuxSocket-B8Yx20sT.mjs';
|
|
24
|
-
import { locateClaudeConversation, refreshAgentHomes } from './index-
|
|
24
|
+
import { locateClaudeConversation, refreshAgentHomes } from './index-BZCIkrFj.mjs';
|
|
25
25
|
import { randomBytes } from 'node:crypto';
|
|
26
26
|
import { readdirSync, unlinkSync, existsSync, mkdirSync, writeFileSync, readFileSync, statSync, chmodSync, renameSync, rmSync, accessSync, constants } from 'node:fs';
|
|
27
27
|
import axios from 'axios';
|
|
28
28
|
import { p as projectPath } from './projectPath-BTBIMB57.mjs';
|
|
29
29
|
import { a as isValidTerminalId } from './ids-DU6sLx4C.mjs';
|
|
30
30
|
import { d as detectCLIAvailability } from './detectCLI-CSGMlV51.mjs';
|
|
31
|
-
import { d as detectResumeSupport } from './localHappyAgentAuth-
|
|
31
|
+
import { d as detectResumeSupport } from './localHappyAgentAuth-BAK_nqMG.mjs';
|
|
32
32
|
import { g as getProjectPath, a as getClaudeProjectsRoot } from './path-D2wdaNSk.mjs';
|
|
33
33
|
import { i as isVeryHappyOneShotPrompt } from './oneShotPrompts-DT4p6RNd.mjs';
|
|
34
|
-
import { f as forkSession, F as ForkSourceMissingError, d as discardForkedSession, l as listClaudeRewindPoints, b as forkAndTruncateSession, c as ForkTruncateUuidNotFoundError, e as forkBeforeUserMessage, a as forkCompletedTurns } from './claudeSessionFork-
|
|
35
|
-
import { C as CodexAppServerClient } from './codexAppServerClient-
|
|
34
|
+
import { f as forkSession, F as ForkSourceMissingError, d as discardForkedSession, l as listClaudeRewindPoints, b as forkAndTruncateSession, c as ForkTruncateUuidNotFoundError, e as forkBeforeUserMessage, a as forkCompletedTurns } from './claudeSessionFork-BqV6E0ep.mjs';
|
|
35
|
+
import { C as CodexAppServerClient } from './codexAppServerClient-aV5m-FpZ.mjs';
|
|
36
36
|
import { f as forkCodexThread, C as CodexForkRewindPointNotFoundError, l as listCodexRewindPoints, b as forkCodexBeforeUserMessage, a as forkCodexCompletedTurns } from './codexThreadFork-CVzAqELg.mjs';
|
|
37
|
-
import { p as planRateLimitWrite, m as mergeRateLimitReports } from './rateLimitWindows-
|
|
37
|
+
import { p as planRateLimitWrite, m as mergeRateLimitReports } from './rateLimitWindows-4uhuwKnU.mjs';
|
|
38
38
|
import 'chalk';
|
|
39
39
|
import 'node:util';
|
|
40
40
|
import 'os';
|
|
41
41
|
import 'child_process';
|
|
42
|
-
import './package-
|
|
42
|
+
import './package-CpmoMPuj.mjs';
|
|
43
43
|
import 'util';
|
|
44
44
|
import 'fs/promises';
|
|
45
45
|
import 'crypto';
|
|
@@ -47,9 +47,9 @@ import 'path';
|
|
|
47
47
|
import 'cross-spawn';
|
|
48
48
|
import 'zod';
|
|
49
49
|
import '@paralleldrive/cuid2';
|
|
50
|
-
import './claudeAccountEnv-
|
|
51
|
-
import './store-
|
|
52
|
-
import './codexAccount-
|
|
50
|
+
import './claudeAccountEnv-CPO6CGNd.mjs';
|
|
51
|
+
import './store-BlPvTr_Q.mjs';
|
|
52
|
+
import './codexAccount-iZwmpYti.mjs';
|
|
53
53
|
import 'node:readline';
|
|
54
54
|
import 'tweetnacl';
|
|
55
55
|
import './terminalTitleSuggest-CeKsX_V6.mjs';
|