very-happy-cli 0.2.195 → 0.2.197
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-B-CD1MrV.mjs} +3 -3
- package/dist/{AcpBackend-CXSV6FF5.cjs → AcpBackend-CqDg1GgF.cjs} +3 -3
- package/dist/{AcpSessionManager-CEpU_GVk.mjs → AcpSessionManager-CgomFAjk.mjs} +2 -2
- package/dist/{AcpSessionManager-BbWODxSp.cjs → AcpSessionManager-Cv1KTldV.cjs} +1 -1
- package/dist/{BasePermissionHandler-C6iF28Ct.cjs → BasePermissionHandler-BxUjjHiI.cjs} +1 -1
- package/dist/{BasePermissionHandler-B5ka7Aaf.mjs → BasePermissionHandler-D6-fZvtx.mjs} +1 -1
- package/dist/{account-Bvcdk9CH.cjs → account-Bexqa-vj.cjs} +5 -5
- package/dist/{account-WSJcdMGl.mjs → account-CnN-iHFd.mjs} +11 -11
- package/dist/{accountService-BtEgv0fC.mjs → accountService-DQ21IlBs.mjs} +4 -4
- package/dist/{acpSessionResume-B2hd1Wub.cjs → acpSessionResume-CfEw8L26.cjs} +1 -1
- package/dist/{acpSessionResume-BYMm4w8Q.mjs → acpSessionResume-DzFELzTU.mjs} +1 -1
- package/dist/{agentHome-CVM15_3U.cjs → agentHome-CBYL4J4Q.cjs} +4 -4
- package/dist/{agentHome-Jl8yWAjF.mjs → agentHome-CmSA7hBC.mjs} +4 -4
- package/dist/{api-TpjZJXV-.cjs → api-CB3tLbbj.cjs} +45 -12
- package/dist/{api-DOzNOoVJ.mjs → api-Do7MUIrP.mjs} +46 -13
- package/dist/{apiMachine-M-Fs9g5Y.mjs → apiMachine-CytFlPdl.mjs} +101 -30
- package/dist/{apiMachine-COkvJAmd.cjs → apiMachine-guUGAifI.cjs} +96 -25
- package/dist/{attachmentContent-D6PjMVDq.mjs → attachmentContent-B8Lg7kgp.mjs} +2 -2
- package/dist/{attachmentContent-BiBOjTXX.cjs → attachmentContent-errR84kh.cjs} +2 -2
- package/dist/{auth-BfHLe1gU.mjs → auth-B-1T6w1U.mjs} +8 -8
- package/dist/{auth-BOceB8cL.cjs → auth-BhM0lHLA.cjs} +8 -8
- package/dist/{auth-Bfe3Ue_B.mjs → auth-Dnu0Mocz.mjs} +5 -5
- package/dist/{auth-DfcdjMUp.cjs → auth-ZKJNs8AK.cjs} +5 -5
- package/dist/{auto-CDeivd5V.mjs → auto-CFSmWudH.mjs} +17 -17
- package/dist/{auto-CnTitokD.cjs → auto-eimPZ4gm.cjs} +14 -14
- package/dist/{bootstrap-DpyP22Wx.cjs → bootstrap-B7mwfud6.cjs} +2 -2
- package/dist/{bootstrap-BxcKrgR9.mjs → bootstrap-C2JyiPax.mjs} +2 -2
- package/dist/{browser-ac0aPrVE.cjs → browser-B3VVAWcC.cjs} +1 -1
- package/dist/{browser-Bb0Gqffc.mjs → browser-Cnk2N81e.mjs} +1 -1
- package/dist/{claudeAccountEnv-NyoxjLuJ.mjs → claudeAccountEnv-CPO6CGNd.mjs} +1 -1
- package/dist/{claudeLocal-RGWhplSr.cjs → claudeLocal-CvZ5Sfq_.cjs} +4 -4
- package/dist/{claudeLocal-otwxWF6e.mjs → claudeLocal-gDpGeteK.mjs} +5 -5
- package/dist/{claudeLocalLauncher-yG-MBhY7.cjs → claudeLocalLauncher-CFSxFln_.cjs} +9 -9
- package/dist/{claudeLocalLauncher-CTibA4cU.mjs → claudeLocalLauncher-e_DkguJW.mjs} +10 -10
- package/dist/{claudeSessionFork-DH_Su4uO.cjs → claudeSessionFork--_RtwhC2.cjs} +1 -1
- package/dist/{claudeSessionFork-HFFwivGY.mjs → claudeSessionFork-BMMJmfxX.mjs} +1 -1
- package/dist/{client-BhAjEv8Z.mjs → client-Bav5WI8p.mjs} +4 -4
- package/dist/{client-DpTk1S7C.mjs → client-BeEAF2yn.mjs} +2 -2
- package/dist/{client-CydHzidF.mjs → client-CkiWUkm6.mjs} +2 -2
- package/dist/{client-BlV73Gbw.cjs → client-DH_mgm2T.cjs} +2 -2
- package/dist/{client-DcXLNaF2.cjs → client-DmO89_dS.cjs} +2 -2
- package/dist/{client-DxjYsJ8d.cjs → client-TZ1BY7kn.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-mln0W8vT.mjs → codexAppServerClient-AcMiUjlK.mjs} +3 -3
- package/dist/{codexAppServerClient-C1xBSuVk.cjs → codexAppServerClient-C4FYS9D9.cjs} +3 -3
- package/dist/{codexCommand-Plm-_aRy.cjs → codexCommand-BkF16_aL.cjs} +50 -45
- package/dist/{codexCommand-CmWhYduF.mjs → codexCommand-CuteJvKE.mjs} +56 -51
- package/dist/{codexTermination-QltAvFpq.mjs → codexTermination-CjHWp1C_.mjs} +6 -2
- package/dist/{codexTermination-C9c80lIF.cjs → codexTermination-DGgKsMxj.cjs} +6 -2
- package/dist/{config-BH75enfT.cjs → config-BklFo_Cs.cjs} +3 -3
- package/dist/{config-DK27kWTT.mjs → config-CUvb7oaW.mjs} +3 -3
- package/dist/{configuration-CwfgJZKs.mjs → configuration-BIh6P6kB.mjs} +1 -1
- package/dist/{configuration-CKaq0tNe.cjs → configuration-BL_fxboH.cjs} +1 -1
- package/dist/{connect-_QkCFMxO.cjs → connect-Bi7cRXtj.cjs} +14 -14
- package/dist/{connect-h3_VMJst.mjs → connect-KIJsx0iT.mjs} +15 -15
- package/dist/{context-DbENnaVc.cjs → context-BYcZIvKn.cjs} +1 -1
- package/dist/{context-DcOpvIiR.mjs → context-Ct__7RAS.mjs} +1 -1
- package/dist/{controlClient-Dv6IvvUq.mjs → controlClient-CPZkMKsH.mjs} +19 -7
- package/dist/{controlClient-D_HIbnnS.cjs → controlClient-DMtkGpc3.cjs} +19 -7
- package/dist/{createSessionMetadata-CusO22Am.cjs → createSessionMetadata-BWr0XT-Y.cjs} +2 -2
- package/dist/{createSessionMetadata-DimBsfVG.mjs → createSessionMetadata-DkkddlJa.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-BYqRKTmL.cjs → deterministicJson-BO6ZUUiV.cjs} +12 -12
- package/dist/{deterministicJson-CMApF2Rl.mjs → deterministicJson-Dm3yDrwj.mjs} +13 -13
- package/dist/{doctor-u46qYYKX.cjs → doctor-CJpFhHoK.cjs} +8 -9
- package/dist/{doctor-Czbl7gk2.cjs → doctor-DHK-5Hxm.cjs} +8 -8
- package/dist/{doctor-BPkYWSuq.mjs → doctor-GN5mPOn5.mjs} +8 -9
- package/dist/{doctor-BkyoZ0Uw.mjs → doctor-TK49jR60.mjs} +8 -8
- package/dist/{downloadTarget-CM0BZNSY.mjs → downloadTarget-C2XcfMXb.mjs} +7 -7
- package/dist/{downloadTarget-C5BzZ_bz.cjs → downloadTarget-QP5nnKsW.cjs} +7 -7
- package/dist/{ensureDaemonRunning-P399ot_C.mjs → ensureDaemonRunning-Bi-PF5LL.mjs} +5 -5
- package/dist/{ensureDaemonRunning-D508DmcP.cjs → ensureDaemonRunning-pg-EYmG0.cjs} +5 -5
- package/dist/{handleResumeCommand-BK_2ShBf.mjs → handleResumeCommand-B69L6W80.mjs} +5 -5
- package/dist/{handleResumeCommand-CCgK7-0v.cjs → handleResumeCommand-CMLpVjkl.cjs} +5 -5
- package/dist/{index-DR3NJLVk.mjs → index-BM14YD9K.mjs} +5 -5
- package/dist/{index-BENDk1i9.mjs → index-BSSAKD4Q.mjs} +4 -4
- package/dist/{index-BlWyEpMw.mjs → index-C27JFCbe.mjs} +1 -1
- package/dist/{index-_DRVKtSd.mjs → index-CwwDV02T.mjs} +55 -48
- package/dist/{index-BalJgriQ.cjs → index-DC_XlLAD.cjs} +5 -5
- package/dist/{index-Bz9Bj7l1.cjs → index-DgnbOqH_.cjs} +3 -3
- package/dist/{index-QSAckvNv.mjs → index-P6modcWo.mjs} +3 -3
- package/dist/{index-CGKn-GTK.cjs → index-XeWmi_Wt.cjs} +4 -4
- package/dist/{index-CSO1-mZ9.cjs → index-sXThJ-ic.cjs} +49 -42
- package/dist/index.cjs +2 -2
- package/dist/index.mjs +2 -2
- package/dist/{install-DMTvEPrB.mjs → install-B6vD9h4Z.mjs} +3 -3
- package/dist/{install-CqXaN7_C.cjs → install-Cyb1ZsOO.cjs} +3 -3
- package/dist/lib.cjs +16 -16
- package/dist/lib.d.cts +13 -0
- package/dist/lib.d.mts +13 -0
- package/dist/lib.mjs +16 -16
- package/dist/{lidState-Btv4N_B8.cjs → lidState-DXy1ymL0.cjs} +1 -1
- package/dist/{lidState-Cb3TbhPb.mjs → lidState-nbXgabCS.mjs} +1 -1
- package/dist/{localHappyAgentAuth-CAAIUJyY.mjs → localHappyAgentAuth-BupJnMMB.mjs} +1 -1
- package/dist/{localHappyAgentAuth-B3Q5DNLR.cjs → localHappyAgentAuth-Dxl6itKW.cjs} +1 -1
- package/dist/{logger-UgDpJA2u.mjs → logger-CahcyjlK.mjs} +2 -2
- package/dist/{logger-BZ5TcbEh.cjs → logger-CtweAuKq.cjs} +2 -2
- package/dist/{machineMetadata-BYHC-3Vx.mjs → machineMetadata-jOqz4fn8.mjs} +3 -3
- package/dist/{machineMetadata-DLb-m4fL.cjs → machineMetadata-thOCcaSv.cjs} +3 -3
- package/dist/{main-LavPb80B.cjs → main-CTIbEEsd.cjs} +48 -48
- package/dist/{main-CwW6lHIw.mjs → main-bCGlXj7y.mjs} +48 -48
- package/dist/{mcp-BQbWhqUh.cjs → mcp-BOS5msHd.cjs} +16 -16
- package/dist/{mcp-BjYz5Ymf.mjs → mcp-dtmpWc-Y.mjs} +20 -20
- package/dist/{mirrorProtocol-Ci9YmCEV.cjs → mirrorProtocol-CFDn3zfT.cjs} +11 -3
- package/dist/{mirrorProtocol-BH5eT99U.mjs → mirrorProtocol-OJPFNpbq.mjs} +12 -5
- package/dist/{package-C4OfB2YF.mjs → package-DUKnh8UF.mjs} +7 -7
- package/dist/{package-B61-BBlh.cjs → package-DdYN77UN.cjs} +7 -7
- package/dist/{panels-cBJT5Up1.mjs → panels-DQs5x77X.mjs} +5 -5
- package/dist/{panels-ByprLJag.cjs → panels-DZZTavkP.cjs} +5 -5
- package/dist/{peerTools-BXSjS8lB.cjs → peerTools-03MimWe-.cjs} +5 -5
- package/dist/{peerTools-DS6GqJcn.mjs → peerTools-ByJiL-w1.mjs} +5 -5
- package/dist/{persistence-CQhmtobL.mjs → persistence-CPIj3Iha.mjs} +15 -5
- package/dist/{persistence-DBmeYlwT.cjs → persistence-CWEaFv6R.cjs} +15 -5
- package/dist/{piRunnerArgs-CmEE058l.cjs → piRunnerArgs-Aqs-zKLm.cjs} +1 -1
- package/dist/{piRunnerArgs-Dy-3vN_Q.mjs → piRunnerArgs-DxbuKnFC.mjs} +1 -1
- package/dist/{piRuntime-BCXjC4__.cjs → piRuntime-BFMV2Hlg.cjs} +1 -1
- package/dist/{piRuntime-Rq9v4M4e.mjs → piRuntime-KJn9G3Ax.mjs} +1 -1
- package/dist/{piTerminal-ehNQOvLL.cjs → piTerminal-DFzQb38E.cjs} +18 -18
- package/dist/{piTerminal-CRhDUqX7.mjs → piTerminal-DhVFk2Hc.mjs} +22 -22
- 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-qCS7_tDF.cjs → pushNotifications-BhnrQa32.cjs} +24 -2
- package/dist/{pushNotifications-67GmbVfE.mjs → pushNotifications-CD5-W90c.mjs} +24 -4
- package/dist/{query-CIDBGnv6.mjs → query-BRTHwQ1m.mjs} +2 -2
- package/dist/{query-B4QIiI7e.cjs → query-BRvDJTUF.cjs} +2 -2
- package/dist/{rateLimitWindows-8-khalzj.mjs → rateLimitWindows-BAfkXSck.mjs} +1 -1
- package/dist/{rateLimitWindows-BIfLMxOk.cjs → rateLimitWindows-_KfSDJdB.cjs} +1 -1
- package/dist/{registerCommonHandlers-C7hlztAO.mjs → registerCommonHandlers-Anq6Ma1d.mjs} +2 -2
- package/dist/{registerCommonHandlers-G2p0MJu4.cjs → registerCommonHandlers-CsMpXP1_.cjs} +2 -2
- package/dist/{registerKillSessionHandler-BWvl6wro.cjs → registerKillSessionHandler-DnES0UnY.cjs} +5 -5
- package/dist/{registerKillSessionHandler-rwXdO0t0.mjs → registerKillSessionHandler-DvA-f_D4.mjs} +6 -6
- package/dist/{registerSideQuestionHandler-Xg46gSVh.mjs → registerSideQuestionHandler-B6EgCzBZ.mjs} +4 -4
- package/dist/{registerSideQuestionHandler-CsyPnjce.cjs → registerSideQuestionHandler-GIzcFczo.cjs} +4 -4
- package/dist/{remoteSessionClient-D6_7vNKc.cjs → remoteSessionClient-BsXgrMSP.cjs} +5 -5
- package/dist/{remoteSessionClient-DQSnC7ox.mjs → remoteSessionClient-DYTwJSZR.mjs} +5 -5
- package/dist/{reportProgressTool-CIHGKraF.cjs → reportProgressTool-DhTM7qvk.cjs} +2 -2
- package/dist/{reportProgressTool-HjzV5y_2.mjs → reportProgressTool-DzmnFItq.mjs} +3 -3
- package/dist/{run-M06F1958.mjs → run-Cuz34V0P.mjs} +53 -73
- package/dist/{run-tQ4bFkHu.cjs → run-D0nDSvGo.cjs} +47 -67
- package/dist/{runClaude-Ct0_mShC.cjs → runClaude-DHHDBtKG.cjs} +29 -25
- package/dist/{runClaude-Dm9kQZ-w.mjs → runClaude-ySgHmPJg.mjs} +34 -30
- package/dist/{runClaudeDeps-BT2kWCrQ.cjs → runClaudeDeps-Cfeci4al.cjs} +41 -40
- package/dist/{runClaudeDeps-DNOzXjc3.mjs → runClaudeDeps-k-QAN7Em.mjs} +53 -52
- package/dist/{runGemini-BvN-yeQR.mjs → runGemini-BpiHwTGj.mjs} +39 -36
- package/dist/{runGemini-cua7_iuR.cjs → runGemini-Dob7MFa2.cjs} +38 -35
- package/dist/{runOpenClaw-NpYFRhKm.cjs → runOpenClaw-B-BGCcbD.cjs} +30 -20
- package/dist/{runOpenClaw-C9E2XzmX.mjs → runOpenClaw-B_7LblMr.mjs} +30 -20
- package/dist/{sandbox-C-BXZbt9.mjs → sandbox-D4UmUYIM.mjs} +4 -4
- package/dist/{sandbox-hImfD0-T.cjs → sandbox-D9xs3oeT.cjs} +4 -4
- package/dist/{selfCheck-B3ulijQM.cjs → selfCheck-B1ueapb2.cjs} +39 -39
- package/dist/selfCheck-BrC9vuGH.mjs +88 -0
- package/dist/{send-Dv2L8IRW.mjs → send-BZoS0m6-.mjs} +8 -8
- package/dist/{send-BCVQkTOl.cjs → send-CgIeqwqq.cjs} +8 -8
- package/dist/{server-BBBfuSB-.mjs → server-C5zdUyIu.mjs} +4 -4
- package/dist/{server-DYxyCyYF.cjs → server-XgEG5D8c.cjs} +6 -6
- 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-C4zRSYwt.mjs} +94 -78
- package/dist/{sessionLock-B8fsnpZD.cjs → sessionLock-CbIB9WAp.cjs} +92 -78
- package/dist/{sessionOps-74pSDXoS.cjs → sessionOps-flaRRzdo.cjs} +4 -4
- package/dist/{sessionOps-BkEgNA2O.mjs → sessionOps-fuLJNyOT.mjs} +4 -4
- package/dist/{sessionProvider-DXkhlJE6.mjs → sessionProvider-DPwRzcbT.mjs} +10 -10
- package/dist/{sessionProvider-CWgHsZUA.cjs → sessionProvider-DlWrak_l.cjs} +5 -5
- package/dist/{sessionScanner-Dhh1wREW.mjs → sessionScanner-BX7ZBVzX.mjs} +3 -3
- package/dist/{sessionScanner-D56EkcIj.cjs → sessionScanner-I6fGycPd.cjs} +3 -3
- package/dist/{sessions-C1zRTjUe.cjs → sessions-Cr0jIQ9r.cjs} +10 -10
- package/dist/{sessions-dJR6k3JY.mjs → sessions-Csz0_dnz.mjs} +10 -10
- package/dist/{setupOfflineReconnection-CMUdHtFT.cjs → setupOfflineReconnection-BawiOCUA.cjs} +2 -2
- package/dist/{setupOfflineReconnection-Dp1rC-eP.mjs → setupOfflineReconnection-Pxsr7M_B.mjs} +2 -2
- package/dist/{spawn-kMKI09Kh.cjs → spawn-Bfw10V7R.cjs} +12 -12
- package/dist/{spawn-D3-Weoiq.mjs → spawn-C3wiREei.mjs} +14 -14
- package/dist/{spawnAgents-hKFGQaSJ.mjs → spawnAgents-N3jxdNJC.mjs} +1 -1
- package/dist/{spawnHappyCLI-CgjpjSTT.mjs → spawnHappyCLI-C9dzdAh0.mjs} +1 -1
- package/dist/{spawnHappyCLI-Du1IgJGA.cjs → spawnHappyCLI-D4_Ij_BB.cjs} +1 -1
- package/dist/{startFileWatcher-DGOnF95-.cjs → startFileWatcher-905w_JCn.cjs} +1 -1
- package/dist/{startFileWatcher-DapvIGxp.mjs → startFileWatcher-FjvRihwq.mjs} +1 -1
- package/dist/{startupSessionCreate-CSi60oo_.mjs → startupSessionCreate-B-QHA-nQ.mjs} +3 -3
- package/dist/{startupSessionCreate-rkIMVGJW.cjs → startupSessionCreate-WY7c74aG.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-GJkf-HGu.mjs → sync-CHU9HM9N.mjs} +1 -1
- package/dist/{sync-Cj8Vhltg.cjs → sync-Dz_U1UHu.cjs} +1 -1
- package/dist/{systemPrompt-Cne9i1SE.cjs → systemPrompt-NTIxM2Ss.cjs} +1 -1
- package/dist/{systemPrompt-BEagRbDZ.mjs → systemPrompt-PHD2Va2G.mjs} +2 -2
- package/dist/{teams-C_18IMNM.mjs → teams-CgT1c65s.mjs} +7 -7
- package/dist/{teams-ClTg6hQ1.cjs → teams-CqoSWbrQ.cjs} +6 -6
- package/dist/{template-Ci-cyigF.mjs → template-CJ8uLlD8.mjs} +1 -1
- package/dist/{terminals-Dlg0x3nY.mjs → terminals-Dc38XmZv.mjs} +9 -5
- package/dist/{terminals-B_bfC9c2.cjs → terminals-dK3Lrjfp.cjs} +9 -5
- package/dist/{time-BPPTQ_sE.cjs → time-BTXLicT9.cjs} +1 -1
- package/dist/{time-CIkdLyza.mjs → time-DZ7wPlsL.mjs} +1 -1
- package/dist/{titleGenerator-DnwTdTB_.mjs → titleGenerator-BOcHO0fW.mjs} +2 -2
- package/dist/{titleGenerator-B_OgL9Pd.cjs → titleGenerator-DxSLdXjL.cjs} +2 -2
- package/dist/tmuxSocket-BmZyixRM.mjs +29 -0
- package/dist/{tmuxSocket-D-Xt6Vn-.cjs → tmuxSocket-Dg11Olx0.cjs} +12 -0
- package/dist/{todo-DPQHtZVM.cjs → todo-CqD6H2Bt.cjs} +5 -5
- package/dist/{todo-DmHolFRy.mjs → todo-kBweG4H9.mjs} +6 -6
- package/dist/{tools-B3KGMSU5.cjs → tools-C7SRJVwy.cjs} +1 -1
- package/dist/{tools-DqjPHq9I.mjs → tools-DuXYIUTD.mjs} +1 -1
- package/dist/{uninstall-CrK5dgx8.cjs → uninstall-DHdOrwHT.cjs} +3 -3
- package/dist/{uninstall-Cm97eybp.mjs → uninstall-WJYYM27v.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
- package/dist/tmuxSocket-B8Yx20sT.mjs +0 -19
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import axios from 'axios';
|
|
2
2
|
import chalk from 'chalk';
|
|
3
|
-
import { c as configuration } from './configuration-
|
|
4
|
-
import { b as readCredentialsForConfiguredRelay, r as readSettings } from './persistence-
|
|
3
|
+
import { c as configuration } from './configuration-BIh6P6kB.mjs';
|
|
4
|
+
import { b as readCredentialsForConfiguredRelay, r as readSettings } from './persistence-CPIj3Iha.mjs';
|
|
5
5
|
import { n as normalizeWebPanels, w as webPanelPath } from './webPanels-B2_C2-3g.mjs';
|
|
6
6
|
import 'node:fs';
|
|
7
7
|
import 'node:os';
|
|
8
8
|
import 'node:path';
|
|
9
|
-
import './package-
|
|
9
|
+
import './package-DUKnh8UF.mjs';
|
|
10
10
|
import 'node:fs/promises';
|
|
11
11
|
import 'zod';
|
|
12
12
|
import './authRelay-DhQhkBvX.mjs';
|
|
13
13
|
import 'node:crypto';
|
|
14
14
|
import 'tweetnacl';
|
|
15
|
-
import './logger-
|
|
15
|
+
import './logger-CahcyjlK.mjs';
|
|
16
16
|
import 'node:util';
|
|
17
17
|
|
|
18
18
|
function frameVerdict(headers) {
|
|
@@ -106,7 +106,7 @@ async function handleAttentionCommand(args) {
|
|
|
106
106
|
else console.error(chalk.yellow(`panel "${parsed.panel}" is not declared in ${configuration.settingsFile}; the notification will not deep-link`));
|
|
107
107
|
}
|
|
108
108
|
if (parsed.session) {
|
|
109
|
-
const { ApiClient } = await import('./api-
|
|
109
|
+
const { ApiClient } = await import('./api-Do7MUIrP.mjs').then(function (n) { return n.e; });
|
|
110
110
|
const api = await ApiClient.create(credentials);
|
|
111
111
|
const r = await api.push().sendAttention({ sessionId: parsed.session, reason: parsed.reason, url: link ?? `/session/${encodeURIComponent(parsed.session)}` });
|
|
112
112
|
if (!r.sent) {
|
|
@@ -2,19 +2,19 @@
|
|
|
2
2
|
|
|
3
3
|
var axios = require('axios');
|
|
4
4
|
var chalk = require('chalk');
|
|
5
|
-
var configuration = require('./configuration-
|
|
6
|
-
var persistence = require('./persistence-
|
|
5
|
+
var configuration = require('./configuration-BL_fxboH.cjs');
|
|
6
|
+
var persistence = require('./persistence-CWEaFv6R.cjs');
|
|
7
7
|
var webPanels = require('./webPanels-FCgFKvVe.cjs');
|
|
8
8
|
require('node:fs');
|
|
9
9
|
require('node:os');
|
|
10
10
|
require('node:path');
|
|
11
|
-
require('./package-
|
|
11
|
+
require('./package-DdYN77UN.cjs');
|
|
12
12
|
require('node:fs/promises');
|
|
13
13
|
require('zod');
|
|
14
14
|
require('./authRelay-Dy1qU9td.cjs');
|
|
15
15
|
require('node:crypto');
|
|
16
16
|
require('tweetnacl');
|
|
17
|
-
require('./logger-
|
|
17
|
+
require('./logger-CtweAuKq.cjs');
|
|
18
18
|
require('node:util');
|
|
19
19
|
|
|
20
20
|
function frameVerdict(headers) {
|
|
@@ -108,7 +108,7 @@ async function handleAttentionCommand(args) {
|
|
|
108
108
|
else console.error(chalk.yellow(`panel "${parsed.panel}" is not declared in ${configuration.configuration.settingsFile}; the notification will not deep-link`));
|
|
109
109
|
}
|
|
110
110
|
if (parsed.session) {
|
|
111
|
-
const { ApiClient } = await Promise.resolve().then(function () { return require('./api-
|
|
111
|
+
const { ApiClient } = await Promise.resolve().then(function () { return require('./api-CB3tLbbj.cjs'); }).then(function (n) { return n.api; });
|
|
112
112
|
const api = await ApiClient.create(credentials);
|
|
113
113
|
const r = await api.push().sendAttention({ sessionId: parsed.session, reason: parsed.reason, url: link ?? `/session/${encodeURIComponent(parsed.session)}` });
|
|
114
114
|
if (!r.sent) {
|
|
@@ -4,13 +4,13 @@ var node_crypto = require('node:crypto');
|
|
|
4
4
|
var os = require('node:os');
|
|
5
5
|
var z = require('zod');
|
|
6
6
|
var ids = require('./ids-B6ZC0HGt.cjs');
|
|
7
|
-
var controlClient = require('./controlClient-
|
|
8
|
-
var persistence = require('./persistence-
|
|
9
|
-
var sessionOps = require('./sessionOps-
|
|
10
|
-
var remoteSessionClient = require('./remoteSessionClient-
|
|
7
|
+
var controlClient = require('./controlClient-DMtkGpc3.cjs');
|
|
8
|
+
var persistence = require('./persistence-CWEaFv6R.cjs');
|
|
9
|
+
var sessionOps = require('./sessionOps-flaRRzdo.cjs');
|
|
10
|
+
var remoteSessionClient = require('./remoteSessionClient-BsXgrMSP.cjs');
|
|
11
11
|
var node_fs = require('node:fs');
|
|
12
12
|
var path = require('node:path');
|
|
13
|
-
var client = require('./client-
|
|
13
|
+
var client = require('./client-DmO89_dS.cjs');
|
|
14
14
|
|
|
15
15
|
const SESSION_PEER_SENT_FROM = "session-peer";
|
|
16
16
|
const CLI_PEER_SENDER_ID = "cli";
|
|
@@ -2,13 +2,13 @@ import { randomUUID } from 'node:crypto';
|
|
|
2
2
|
import { userInfo, hostname } from 'node:os';
|
|
3
3
|
import { z } from 'zod';
|
|
4
4
|
import { i as isValidSessionId } from './ids-DU6sLx4C.mjs';
|
|
5
|
-
import { h as listDaemonPeers } from './controlClient-
|
|
6
|
-
import { c as readPersistedSessions } from './persistence-
|
|
7
|
-
import { s as sessionWebUrl, e as sendUserMessage } from './sessionOps-
|
|
8
|
-
import { a as listRemotePeers, b as sendRemotePeerMessage, d as deliverToSession } from './remoteSessionClient-
|
|
5
|
+
import { h as listDaemonPeers } from './controlClient-CPZkMKsH.mjs';
|
|
6
|
+
import { c as readPersistedSessions } from './persistence-CPIj3Iha.mjs';
|
|
7
|
+
import { s as sessionWebUrl, e as sendUserMessage } from './sessionOps-fuLJNyOT.mjs';
|
|
8
|
+
import { a as listRemotePeers, b as sendRemotePeerMessage, d as deliverToSession } from './remoteSessionClient-DYTwJSZR.mjs';
|
|
9
9
|
import { existsSync, readFileSync, statSync } from 'node:fs';
|
|
10
10
|
import { resolve, isAbsolute, dirname } from 'node:path';
|
|
11
|
-
import { P as ProjectsUnsupportedError, s as sharedProjectsClient } from './client-
|
|
11
|
+
import { P as ProjectsUnsupportedError, s as sharedProjectsClient } from './client-CkiWUkm6.mjs';
|
|
12
12
|
|
|
13
13
|
const SESSION_PEER_SENT_FROM = "session-peer";
|
|
14
14
|
const CLI_PEER_SENDER_ID = "cli";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { readFile, open, unlink, stat, rename } from 'node:fs/promises';
|
|
2
2
|
import { existsSync, constants, readFileSync, unlinkSync, renameSync } from 'node:fs';
|
|
3
|
-
import { c as configuration, P as PRIVATE_FILE_MODE, w as writePrivateFileSync, a as hardenPrivateFileSync, e as ensurePrivateDirectory, b as writePrivateFile, h as hardenPrivateFile } from './configuration-
|
|
3
|
+
import { c as configuration, P as PRIVATE_FILE_MODE, w as writePrivateFileSync, a as hardenPrivateFileSync, e as ensurePrivateDirectory, b as writePrivateFile, h as hardenPrivateFile } from './configuration-BIh6P6kB.mjs';
|
|
4
4
|
import * as z from 'zod';
|
|
5
5
|
import { c as credentialRelayProblem, e as encodeBase64 } from './authRelay-DhQhkBvX.mjs';
|
|
6
|
-
import { l as logger } from './logger-
|
|
6
|
+
import { l as logger } from './logger-CahcyjlK.mjs';
|
|
7
7
|
|
|
8
8
|
const HIBERNATION_CAPABILITY = "agent-hibernation-v1";
|
|
9
9
|
const HOUR_MS = 60 * 60 * 1e3;
|
|
@@ -323,11 +323,21 @@ async function readDaemonState() {
|
|
|
323
323
|
function writeDaemonState(state) {
|
|
324
324
|
writePrivateFileSync(configuration.daemonStateFile, JSON.stringify(state, null, 2));
|
|
325
325
|
}
|
|
326
|
-
|
|
326
|
+
function daemonLockPid() {
|
|
327
|
+
try {
|
|
328
|
+
const pid = Number.parseInt(readFileSync(configuration.daemonLockFile, "utf-8").trim(), 10);
|
|
329
|
+
return Number.isInteger(pid) && pid > 0 ? pid : null;
|
|
330
|
+
} catch {
|
|
331
|
+
return null;
|
|
332
|
+
}
|
|
333
|
+
}
|
|
334
|
+
async function clearDaemonState(ownerPid) {
|
|
327
335
|
if (existsSync(configuration.daemonStateFile)) {
|
|
328
|
-
await
|
|
336
|
+
const owner = ownerPid === void 0 ? null : (await readDaemonState())?.pid ?? null;
|
|
337
|
+
if (ownerPid === void 0 || owner === null || owner === ownerPid) await unlink(configuration.daemonStateFile);
|
|
329
338
|
}
|
|
330
339
|
if (existsSync(configuration.daemonLockFile)) {
|
|
340
|
+
if (ownerPid !== void 0 && daemonLockPid() !== ownerPid) return;
|
|
331
341
|
try {
|
|
332
342
|
await unlink(configuration.daemonLockFile);
|
|
333
343
|
} catch {
|
|
@@ -374,7 +384,7 @@ async function releaseDaemonLock(lockHandle) {
|
|
|
374
384
|
} catch {
|
|
375
385
|
}
|
|
376
386
|
try {
|
|
377
|
-
if (existsSync(configuration.daemonLockFile)) {
|
|
387
|
+
if (existsSync(configuration.daemonLockFile) && daemonLockPid() === process.pid) {
|
|
378
388
|
unlinkSync(configuration.daemonLockFile);
|
|
379
389
|
}
|
|
380
390
|
} catch {
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
var promises = require('node:fs/promises');
|
|
4
4
|
var node_fs = require('node:fs');
|
|
5
|
-
var configuration = require('./configuration-
|
|
5
|
+
var configuration = require('./configuration-BL_fxboH.cjs');
|
|
6
6
|
var z = require('zod');
|
|
7
7
|
var authRelay = require('./authRelay-Dy1qU9td.cjs');
|
|
8
|
-
var logger = require('./logger-
|
|
8
|
+
var logger = require('./logger-CtweAuKq.cjs');
|
|
9
9
|
|
|
10
10
|
function _interopNamespaceDefault(e) {
|
|
11
11
|
var n = Object.create(null);
|
|
@@ -344,11 +344,21 @@ async function readDaemonState() {
|
|
|
344
344
|
function writeDaemonState(state) {
|
|
345
345
|
configuration.writePrivateFileSync(configuration.configuration.daemonStateFile, JSON.stringify(state, null, 2));
|
|
346
346
|
}
|
|
347
|
-
|
|
347
|
+
function daemonLockPid() {
|
|
348
|
+
try {
|
|
349
|
+
const pid = Number.parseInt(node_fs.readFileSync(configuration.configuration.daemonLockFile, "utf-8").trim(), 10);
|
|
350
|
+
return Number.isInteger(pid) && pid > 0 ? pid : null;
|
|
351
|
+
} catch {
|
|
352
|
+
return null;
|
|
353
|
+
}
|
|
354
|
+
}
|
|
355
|
+
async function clearDaemonState(ownerPid) {
|
|
348
356
|
if (node_fs.existsSync(configuration.configuration.daemonStateFile)) {
|
|
349
|
-
await
|
|
357
|
+
const owner = ownerPid === void 0 ? null : (await readDaemonState())?.pid ?? null;
|
|
358
|
+
if (ownerPid === void 0 || owner === null || owner === ownerPid) await promises.unlink(configuration.configuration.daemonStateFile);
|
|
350
359
|
}
|
|
351
360
|
if (node_fs.existsSync(configuration.configuration.daemonLockFile)) {
|
|
361
|
+
if (ownerPid !== void 0 && daemonLockPid() !== ownerPid) return;
|
|
352
362
|
try {
|
|
353
363
|
await promises.unlink(configuration.configuration.daemonLockFile);
|
|
354
364
|
} catch {
|
|
@@ -395,7 +405,7 @@ async function releaseDaemonLock(lockHandle) {
|
|
|
395
405
|
} catch {
|
|
396
406
|
}
|
|
397
407
|
try {
|
|
398
|
-
if (node_fs.existsSync(configuration.configuration.daemonLockFile)) {
|
|
408
|
+
if (node_fs.existsSync(configuration.configuration.daemonLockFile) && daemonLockPid() === process.pid) {
|
|
399
409
|
node_fs.unlinkSync(configuration.configuration.daemonLockFile);
|
|
400
410
|
}
|
|
401
411
|
} catch {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { s as sanitizeAgentSessionId, n as normalizeAcpPermissionMode } from './acpSessionResume-
|
|
1
|
+
import { s as sanitizeAgentSessionId, n as normalizeAcpPermissionMode } from './acpSessionResume-DzFELzTU.mjs';
|
|
2
2
|
|
|
3
3
|
function sanitizeSpawnModel(value) {
|
|
4
4
|
if (typeof value !== "string") return null;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
var promises = require('node:fs/promises');
|
|
4
4
|
var node_crypto = require('node:crypto');
|
|
5
5
|
var path = require('node:path');
|
|
6
|
-
var configuration = require('./configuration-
|
|
6
|
+
var configuration = require('./configuration-BL_fxboH.cjs');
|
|
7
7
|
var resources = require('./resources-BZ_Be0qM.cjs');
|
|
8
8
|
|
|
9
9
|
async function publish(path, content, mode) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { mkdir, chmod, writeFile, rename } from 'node:fs/promises';
|
|
2
2
|
import { randomUUID } from 'node:crypto';
|
|
3
3
|
import { join } from 'node:path';
|
|
4
|
-
import { c as configuration } from './configuration-
|
|
4
|
+
import { c as configuration } from './configuration-BIh6P6kB.mjs';
|
|
5
5
|
import { P as PI_TEAMS_EXTENSION } from './resources-CLP_MpK4.mjs';
|
|
6
6
|
|
|
7
7
|
async function publish(path, content, mode) {
|
|
@@ -5,44 +5,44 @@ var node_crypto = require('node:crypto');
|
|
|
5
5
|
var node_http = require('node:http');
|
|
6
6
|
var mcp_js = require('@modelcontextprotocol/sdk/server/mcp.js');
|
|
7
7
|
var streamableHttp_js = require('@modelcontextprotocol/sdk/server/streamableHttp.js');
|
|
8
|
-
var piRuntime = require('./piRuntime-
|
|
9
|
-
var mcp = require('./mcp-
|
|
8
|
+
var piRuntime = require('./piRuntime-BFMV2Hlg.cjs');
|
|
9
|
+
var mcp = require('./mcp-BOS5msHd.cjs');
|
|
10
10
|
require('./agentGuidance-BtBx2xxE.cjs');
|
|
11
11
|
require('node:fs/promises');
|
|
12
12
|
require('node:os');
|
|
13
13
|
require('zod');
|
|
14
|
-
require('./logger-
|
|
15
|
-
require('./persistence-
|
|
16
|
-
require('./configuration-
|
|
14
|
+
require('./logger-CtweAuKq.cjs');
|
|
15
|
+
require('./persistence-CWEaFv6R.cjs');
|
|
16
|
+
require('./configuration-BL_fxboH.cjs');
|
|
17
17
|
require('axios');
|
|
18
18
|
require('tweetnacl');
|
|
19
19
|
require('socket.io-client');
|
|
20
|
-
require('./terminals-
|
|
20
|
+
require('./terminals-dK3Lrjfp.cjs');
|
|
21
21
|
require('node:fs');
|
|
22
22
|
require('node:path');
|
|
23
23
|
var terminalToolContext = require('./terminalToolContext-DoV9Gs7K.cjs');
|
|
24
24
|
require('./resources-BZ_Be0qM.cjs');
|
|
25
|
-
require('./tools-
|
|
26
|
-
require('./client-
|
|
25
|
+
require('./tools-C7SRJVwy.cjs');
|
|
26
|
+
require('./client-TZ1BY7kn.cjs');
|
|
27
27
|
require('node:util');
|
|
28
28
|
require('./index-D9Hidq-g.cjs');
|
|
29
29
|
require('@paralleldrive/cuid2');
|
|
30
|
-
require('./context-
|
|
30
|
+
require('./context-BYcZIvKn.cjs');
|
|
31
31
|
require('@modelcontextprotocol/sdk/server/stdio.js');
|
|
32
|
-
require('./controlClient-
|
|
32
|
+
require('./controlClient-DMtkGpc3.cjs');
|
|
33
33
|
require('./limits-C-a7gr04.cjs');
|
|
34
|
-
require('./downloadTarget-
|
|
35
|
-
require('./sessionOps-
|
|
34
|
+
require('./downloadTarget-QP5nnKsW.cjs');
|
|
35
|
+
require('./sessionOps-flaRRzdo.cjs');
|
|
36
36
|
require('./authRelay-Dy1qU9td.cjs');
|
|
37
|
-
require('./time-
|
|
37
|
+
require('./time-BTXLicT9.cjs');
|
|
38
38
|
require('./specialCommands-J3JFOq0J.cjs');
|
|
39
39
|
require('./backgroundTaskActivity-CBvUdj39.cjs');
|
|
40
|
-
require('./remoteSessionClient-
|
|
40
|
+
require('./remoteSessionClient-BsXgrMSP.cjs');
|
|
41
41
|
require('./ids-B6ZC0HGt.cjs');
|
|
42
|
-
require('./bootstrap-
|
|
42
|
+
require('./bootstrap-B7mwfud6.cjs');
|
|
43
43
|
require('./previewPath-B0rBdhy1.cjs');
|
|
44
44
|
require('./terminalTitleSuggest-DhvRFX3H.cjs');
|
|
45
|
-
require('./titleGenerator-
|
|
45
|
+
require('./titleGenerator-DxSLdXjL.cjs');
|
|
46
46
|
require('node:module');
|
|
47
47
|
require('./oneShotPrompts-CL0dip9C.cjs');
|
|
48
48
|
require('./projectPath-C3ioB4Bu.cjs');
|
|
@@ -53,8 +53,8 @@ require('./claudeAccountEnv-_O3x5AJ1.cjs');
|
|
|
53
53
|
require('./store-aa3CVNwS.cjs');
|
|
54
54
|
require('./trimIdent-4gvk9Wk6.cjs');
|
|
55
55
|
require('chalk');
|
|
56
|
-
require('./package-
|
|
57
|
-
require('./tmuxSocket-
|
|
56
|
+
require('./package-DdYN77UN.cjs');
|
|
57
|
+
require('./tmuxSocket-Dg11Olx0.cjs');
|
|
58
58
|
|
|
59
59
|
async function startPiTerminalTools(terminalId) {
|
|
60
60
|
const path = `/terminal-tools/${node_crypto.randomUUID()}`;
|
|
@@ -3,56 +3,56 @@ import { randomUUID } from 'node:crypto';
|
|
|
3
3
|
import { createServer } from 'node:http';
|
|
4
4
|
import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
5
5
|
import { StreamableHTTPServerTransport } from '@modelcontextprotocol/sdk/server/streamableHttp.js';
|
|
6
|
-
import { p as preparePiTeamsRuntime } from './piRuntime-
|
|
7
|
-
import { registerMcpTools, registerTerminalTitleSuggest } from './mcp-
|
|
6
|
+
import { p as preparePiTeamsRuntime } from './piRuntime-KJn9G3Ax.mjs';
|
|
7
|
+
import { registerMcpTools, registerTerminalTitleSuggest } from './mcp-dtmpWc-Y.mjs';
|
|
8
8
|
import './agentGuidance-BDYt2Qy2.mjs';
|
|
9
9
|
import 'node:fs/promises';
|
|
10
10
|
import 'node:os';
|
|
11
11
|
import 'zod';
|
|
12
|
-
import './logger-
|
|
13
|
-
import './persistence-
|
|
14
|
-
import './configuration-
|
|
12
|
+
import './logger-CahcyjlK.mjs';
|
|
13
|
+
import './persistence-CPIj3Iha.mjs';
|
|
14
|
+
import './configuration-BIh6P6kB.mjs';
|
|
15
15
|
import 'axios';
|
|
16
16
|
import 'tweetnacl';
|
|
17
17
|
import 'socket.io-client';
|
|
18
|
-
import './terminals-
|
|
18
|
+
import './terminals-Dc38XmZv.mjs';
|
|
19
19
|
import 'node:fs';
|
|
20
20
|
import 'node:path';
|
|
21
21
|
import { r as resolveMcpTerminalId } from './terminalToolContext-CFeGeaNm.mjs';
|
|
22
22
|
import './resources-CLP_MpK4.mjs';
|
|
23
|
-
import './tools-
|
|
24
|
-
import './client-
|
|
23
|
+
import './tools-DuXYIUTD.mjs';
|
|
24
|
+
import './client-Bav5WI8p.mjs';
|
|
25
25
|
import 'node:util';
|
|
26
|
-
import './index-
|
|
26
|
+
import './index-C27JFCbe.mjs';
|
|
27
27
|
import '@paralleldrive/cuid2';
|
|
28
|
-
import './context-
|
|
28
|
+
import './context-Ct__7RAS.mjs';
|
|
29
29
|
import '@modelcontextprotocol/sdk/server/stdio.js';
|
|
30
|
-
import './controlClient-
|
|
30
|
+
import './controlClient-CPZkMKsH.mjs';
|
|
31
31
|
import './limits-DIo7rEBR.mjs';
|
|
32
|
-
import './downloadTarget-
|
|
33
|
-
import './sessionOps-
|
|
32
|
+
import './downloadTarget-C2XcfMXb.mjs';
|
|
33
|
+
import './sessionOps-fuLJNyOT.mjs';
|
|
34
34
|
import './authRelay-DhQhkBvX.mjs';
|
|
35
|
-
import './time-
|
|
35
|
+
import './time-DZ7wPlsL.mjs';
|
|
36
36
|
import './specialCommands-MXUN0wfI.mjs';
|
|
37
37
|
import './backgroundTaskActivity-8PdPxrvy.mjs';
|
|
38
|
-
import './remoteSessionClient-
|
|
38
|
+
import './remoteSessionClient-DYTwJSZR.mjs';
|
|
39
39
|
import './ids-DU6sLx4C.mjs';
|
|
40
|
-
import './bootstrap-
|
|
40
|
+
import './bootstrap-C2JyiPax.mjs';
|
|
41
41
|
import './previewPath-CXN4Vag0.mjs';
|
|
42
42
|
import './terminalTitleSuggest-CeKsX_V6.mjs';
|
|
43
|
-
import './titleGenerator-
|
|
43
|
+
import './titleGenerator-BOcHO0fW.mjs';
|
|
44
44
|
import 'node:module';
|
|
45
45
|
import './oneShotPrompts-DT4p6RNd.mjs';
|
|
46
46
|
import './projectPath-BTBIMB57.mjs';
|
|
47
47
|
import 'path';
|
|
48
48
|
import 'url';
|
|
49
|
-
import './wrapperAccount-
|
|
50
|
-
import './claudeAccountEnv-
|
|
51
|
-
import './store-
|
|
49
|
+
import './wrapperAccount-RPtq8BwD.mjs';
|
|
50
|
+
import './claudeAccountEnv-CPO6CGNd.mjs';
|
|
51
|
+
import './store-BlPvTr_Q.mjs';
|
|
52
52
|
import './trimIdent-BAjmv_TG.mjs';
|
|
53
53
|
import 'chalk';
|
|
54
|
-
import './package-
|
|
55
|
-
import './tmuxSocket-
|
|
54
|
+
import './package-DUKnh8UF.mjs';
|
|
55
|
+
import './tmuxSocket-BmZyixRM.mjs';
|
|
56
56
|
|
|
57
57
|
async function startPiTerminalTools(terminalId) {
|
|
58
58
|
const path = `/terminal-tools/${randomUUID()}`;
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import { spawnSync } from 'node:child_process';
|
|
2
|
+
import { s as snapshotTree, k as killSurvivors, r as readLiveProcessTable, a as survivorsOf } from './processTreeSnapshot-fuwxC0fr.mjs';
|
|
3
|
+
|
|
4
|
+
function isProcessAlive(pid, kill = (p, s) => {
|
|
5
|
+
process.kill(p, s);
|
|
6
|
+
}) {
|
|
7
|
+
if (!Number.isInteger(pid) || pid <= 0) return false;
|
|
8
|
+
try {
|
|
9
|
+
kill(pid, 0);
|
|
10
|
+
return true;
|
|
11
|
+
} catch (error) {
|
|
12
|
+
return error?.code === "EPERM";
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
const runtime = {
|
|
16
|
+
signal: (pid, signal) => process.kill(pid, signal),
|
|
17
|
+
isAlive: (pid) => isProcessAlive(pid),
|
|
18
|
+
schedule: (callback, delayMs) => {
|
|
19
|
+
setTimeout(callback, delayMs);
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
function terminateProcess(pid, onSettled, impl = runtime, graceMs = 2e3, hooks = {}) {
|
|
23
|
+
if (!impl.isAlive(pid)) {
|
|
24
|
+
onSettled(true);
|
|
25
|
+
return true;
|
|
26
|
+
}
|
|
27
|
+
try {
|
|
28
|
+
impl.signal(pid, "SIGTERM");
|
|
29
|
+
} catch {
|
|
30
|
+
return false;
|
|
31
|
+
}
|
|
32
|
+
impl.schedule(() => {
|
|
33
|
+
if (impl.isAlive(pid)) {
|
|
34
|
+
try {
|
|
35
|
+
hooks.beforeKill?.();
|
|
36
|
+
} catch {
|
|
37
|
+
}
|
|
38
|
+
try {
|
|
39
|
+
impl.signal(pid, "SIGKILL");
|
|
40
|
+
} catch {
|
|
41
|
+
onSettled(!impl.isAlive(pid));
|
|
42
|
+
return;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
impl.schedule(() => onSettled(!impl.isAlive(pid)), 100);
|
|
46
|
+
}, graceMs);
|
|
47
|
+
return true;
|
|
48
|
+
}
|
|
49
|
+
const TREE_VERIFY_ATTEMPTS = 20;
|
|
50
|
+
const TREE_VERIFY_INTERVAL_MS = 100;
|
|
51
|
+
const windowsTreeRuntime = (base) => ({
|
|
52
|
+
...base,
|
|
53
|
+
signal: (pid, signal) => {
|
|
54
|
+
const result = spawnSync("taskkill", ["/pid", String(pid), "/t", "/f"], { stdio: "ignore", windowsHide: true, timeout: 5e3 });
|
|
55
|
+
if (result.status !== 0 && base.isAlive(pid)) base.signal(pid, signal);
|
|
56
|
+
}
|
|
57
|
+
});
|
|
58
|
+
function terminateProcessTree(pid, onSettled, deps = {}) {
|
|
59
|
+
const snapshot = deps.snapshot ?? ((root) => snapshotTree(root));
|
|
60
|
+
const reap = deps.reap ?? ((entries) => killSurvivors(entries));
|
|
61
|
+
const readLive = deps.readLive ?? readLiveProcessTable;
|
|
62
|
+
const base = deps.runtime ?? runtime;
|
|
63
|
+
const impl = (deps.platform ?? process.platform) === "win32" ? windowsTreeRuntime(base) : base;
|
|
64
|
+
const members = /* @__PURE__ */ new Map();
|
|
65
|
+
const remember = () => {
|
|
66
|
+
try {
|
|
67
|
+
for (const entry of snapshot(pid)) members.set(`${entry.pid}@${entry.start}`, entry);
|
|
68
|
+
} catch {
|
|
69
|
+
}
|
|
70
|
+
};
|
|
71
|
+
remember();
|
|
72
|
+
return (deps.terminate ?? terminateProcess)(pid, (stopped) => {
|
|
73
|
+
const tree = [...members.values()];
|
|
74
|
+
let attempt = 0;
|
|
75
|
+
const verify = () => {
|
|
76
|
+
try {
|
|
77
|
+
reap(tree);
|
|
78
|
+
} catch {
|
|
79
|
+
}
|
|
80
|
+
if (tree.length === 0) {
|
|
81
|
+
onSettled(stopped);
|
|
82
|
+
return;
|
|
83
|
+
}
|
|
84
|
+
let table = null;
|
|
85
|
+
try {
|
|
86
|
+
table = readLive();
|
|
87
|
+
} catch {
|
|
88
|
+
table = null;
|
|
89
|
+
}
|
|
90
|
+
const left = table ? survivorsOf(tree, table).filter((entry) => entry.pid !== process.pid) : [];
|
|
91
|
+
if (left.length === 0) {
|
|
92
|
+
onSettled(stopped);
|
|
93
|
+
return;
|
|
94
|
+
}
|
|
95
|
+
attempt += 1;
|
|
96
|
+
if (attempt >= TREE_VERIFY_ATTEMPTS) {
|
|
97
|
+
deps.onLeftovers?.(left.map((entry) => entry.pid));
|
|
98
|
+
onSettled(false);
|
|
99
|
+
return;
|
|
100
|
+
}
|
|
101
|
+
impl.schedule(verify, TREE_VERIFY_INTERVAL_MS);
|
|
102
|
+
};
|
|
103
|
+
verify();
|
|
104
|
+
}, impl, deps.graceMs ?? 2e3, { beforeKill: remember });
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
export { isProcessAlive as i, terminateProcessTree as t };
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var node_child_process = require('node:child_process');
|
|
4
|
+
var processTreeSnapshot = require('./processTreeSnapshot-D5iNblp6.cjs');
|
|
5
|
+
|
|
6
|
+
function isProcessAlive(pid, kill = (p, s) => {
|
|
7
|
+
process.kill(p, s);
|
|
8
|
+
}) {
|
|
9
|
+
if (!Number.isInteger(pid) || pid <= 0) return false;
|
|
10
|
+
try {
|
|
11
|
+
kill(pid, 0);
|
|
12
|
+
return true;
|
|
13
|
+
} catch (error) {
|
|
14
|
+
return error?.code === "EPERM";
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
const runtime = {
|
|
18
|
+
signal: (pid, signal) => process.kill(pid, signal),
|
|
19
|
+
isAlive: (pid) => isProcessAlive(pid),
|
|
20
|
+
schedule: (callback, delayMs) => {
|
|
21
|
+
setTimeout(callback, delayMs);
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
function terminateProcess(pid, onSettled, impl = runtime, graceMs = 2e3, hooks = {}) {
|
|
25
|
+
if (!impl.isAlive(pid)) {
|
|
26
|
+
onSettled(true);
|
|
27
|
+
return true;
|
|
28
|
+
}
|
|
29
|
+
try {
|
|
30
|
+
impl.signal(pid, "SIGTERM");
|
|
31
|
+
} catch {
|
|
32
|
+
return false;
|
|
33
|
+
}
|
|
34
|
+
impl.schedule(() => {
|
|
35
|
+
if (impl.isAlive(pid)) {
|
|
36
|
+
try {
|
|
37
|
+
hooks.beforeKill?.();
|
|
38
|
+
} catch {
|
|
39
|
+
}
|
|
40
|
+
try {
|
|
41
|
+
impl.signal(pid, "SIGKILL");
|
|
42
|
+
} catch {
|
|
43
|
+
onSettled(!impl.isAlive(pid));
|
|
44
|
+
return;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
impl.schedule(() => onSettled(!impl.isAlive(pid)), 100);
|
|
48
|
+
}, graceMs);
|
|
49
|
+
return true;
|
|
50
|
+
}
|
|
51
|
+
const TREE_VERIFY_ATTEMPTS = 20;
|
|
52
|
+
const TREE_VERIFY_INTERVAL_MS = 100;
|
|
53
|
+
const windowsTreeRuntime = (base) => ({
|
|
54
|
+
...base,
|
|
55
|
+
signal: (pid, signal) => {
|
|
56
|
+
const result = node_child_process.spawnSync("taskkill", ["/pid", String(pid), "/t", "/f"], { stdio: "ignore", windowsHide: true, timeout: 5e3 });
|
|
57
|
+
if (result.status !== 0 && base.isAlive(pid)) base.signal(pid, signal);
|
|
58
|
+
}
|
|
59
|
+
});
|
|
60
|
+
function terminateProcessTree(pid, onSettled, deps = {}) {
|
|
61
|
+
const snapshot = deps.snapshot ?? ((root) => processTreeSnapshot.snapshotTree(root));
|
|
62
|
+
const reap = deps.reap ?? ((entries) => processTreeSnapshot.killSurvivors(entries));
|
|
63
|
+
const readLive = deps.readLive ?? processTreeSnapshot.readLiveProcessTable;
|
|
64
|
+
const base = deps.runtime ?? runtime;
|
|
65
|
+
const impl = (deps.platform ?? process.platform) === "win32" ? windowsTreeRuntime(base) : base;
|
|
66
|
+
const members = /* @__PURE__ */ new Map();
|
|
67
|
+
const remember = () => {
|
|
68
|
+
try {
|
|
69
|
+
for (const entry of snapshot(pid)) members.set(`${entry.pid}@${entry.start}`, entry);
|
|
70
|
+
} catch {
|
|
71
|
+
}
|
|
72
|
+
};
|
|
73
|
+
remember();
|
|
74
|
+
return (deps.terminate ?? terminateProcess)(pid, (stopped) => {
|
|
75
|
+
const tree = [...members.values()];
|
|
76
|
+
let attempt = 0;
|
|
77
|
+
const verify = () => {
|
|
78
|
+
try {
|
|
79
|
+
reap(tree);
|
|
80
|
+
} catch {
|
|
81
|
+
}
|
|
82
|
+
if (tree.length === 0) {
|
|
83
|
+
onSettled(stopped);
|
|
84
|
+
return;
|
|
85
|
+
}
|
|
86
|
+
let table = null;
|
|
87
|
+
try {
|
|
88
|
+
table = readLive();
|
|
89
|
+
} catch {
|
|
90
|
+
table = null;
|
|
91
|
+
}
|
|
92
|
+
const left = table ? processTreeSnapshot.survivorsOf(tree, table).filter((entry) => entry.pid !== process.pid) : [];
|
|
93
|
+
if (left.length === 0) {
|
|
94
|
+
onSettled(stopped);
|
|
95
|
+
return;
|
|
96
|
+
}
|
|
97
|
+
attempt += 1;
|
|
98
|
+
if (attempt >= TREE_VERIFY_ATTEMPTS) {
|
|
99
|
+
deps.onLeftovers?.(left.map((entry) => entry.pid));
|
|
100
|
+
onSettled(false);
|
|
101
|
+
return;
|
|
102
|
+
}
|
|
103
|
+
impl.schedule(verify, TREE_VERIFY_INTERVAL_MS);
|
|
104
|
+
};
|
|
105
|
+
verify();
|
|
106
|
+
}, impl, deps.graceMs ?? 2e3, { beforeKill: remember });
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
exports.isProcessAlive = isProcessAlive;
|
|
110
|
+
exports.terminateProcessTree = terminateProcessTree;
|
|
@@ -27,6 +27,30 @@ const readProcessTable = () => {
|
|
|
27
27
|
return null;
|
|
28
28
|
}
|
|
29
29
|
};
|
|
30
|
+
function parseLiveProcessTable(stdout) {
|
|
31
|
+
const entries = [];
|
|
32
|
+
for (const line of stdout.split("\n")) {
|
|
33
|
+
const match = /^\s*(\d+)\s+(\d+)\s+(\S+)\s+(.+?)\s*$/.exec(line);
|
|
34
|
+
if (!match || match[3].startsWith("Z")) continue;
|
|
35
|
+
entries.push({ pid: Number(match[1]), ppid: Number(match[2]), start: match[4] });
|
|
36
|
+
}
|
|
37
|
+
return entries;
|
|
38
|
+
}
|
|
39
|
+
const readLiveProcessTable = () => {
|
|
40
|
+
if (process.platform === "win32") return null;
|
|
41
|
+
try {
|
|
42
|
+
const result = node_child_process.spawnSync("ps", ["-A", "-o", "pid=,ppid=,stat=,lstart="], {
|
|
43
|
+
encoding: "utf8",
|
|
44
|
+
timeout: 3e3,
|
|
45
|
+
maxBuffer: 16 * 1024 * 1024,
|
|
46
|
+
env: { ...process.env, LC_ALL: "C", LANG: "C" }
|
|
47
|
+
});
|
|
48
|
+
if (result.status !== 0 || typeof result.stdout !== "string") return null;
|
|
49
|
+
return parseLiveProcessTable(result.stdout);
|
|
50
|
+
} catch {
|
|
51
|
+
return null;
|
|
52
|
+
}
|
|
53
|
+
};
|
|
30
54
|
function descendantsOf(rootPid, table) {
|
|
31
55
|
const children = /* @__PURE__ */ new Map();
|
|
32
56
|
for (const entry of table) {
|
|
@@ -101,5 +125,7 @@ async function terminateSurvivors(snapshot, options = {}) {
|
|
|
101
125
|
}
|
|
102
126
|
|
|
103
127
|
exports.killSurvivors = killSurvivors;
|
|
128
|
+
exports.readLiveProcessTable = readLiveProcessTable;
|
|
104
129
|
exports.snapshotTree = snapshotTree;
|
|
130
|
+
exports.survivorsOf = survivorsOf;
|
|
105
131
|
exports.terminateSurvivors = terminateSurvivors;
|