very-happy-cli 0.2.194 → 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-C3Kx0QJb.mjs → AcpBackend-RqGkFeeY.mjs} +3 -3
- package/dist/{AcpBackend-DJzsue14.cjs → AcpBackend-tL_g_UJ5.cjs} +3 -3
- package/dist/{AcpSessionManager-SteuoqMY.mjs → AcpSessionManager-C-R6yHXc.mjs} +2 -2
- package/dist/{AcpSessionManager-Bc3iafB1.cjs → AcpSessionManager-CFB24qBh.cjs} +2 -2
- package/dist/{BasePermissionHandler-DKzNFVCh.cjs → BasePermissionHandler-C0JS37Jt.cjs} +1 -1
- package/dist/{BasePermissionHandler-D2pNcAXn.mjs → BasePermissionHandler-CgHLVNKT.mjs} +1 -1
- package/dist/{account-ByVjlvFj.cjs → account-DOil1Hn8.cjs} +11 -11
- package/dist/{account-DC2YyU24.mjs → account-EzL-zwwE.mjs} +11 -11
- package/dist/{accountService-CuUSJDhP.cjs → accountService-DL6xhVUa.cjs} +4 -4
- package/dist/{accountService-Cd7bnkfd.mjs → accountService-DQ21IlBs.mjs} +4 -4
- package/dist/{acpSessionResume-DHHgbNnk.cjs → acpSessionResume-B01oHWDS.cjs} +1 -1
- package/dist/{acpSessionResume-B6VClxKQ.mjs → acpSessionResume-DEOIZUuj.mjs} +1 -1
- package/dist/{agentHome-Bov1aHYS.cjs → agentHome-BulDO_1K.cjs} +4 -4
- package/dist/{agentHome-9caXwo7k.mjs → agentHome-DucTue1n.mjs} +4 -4
- package/dist/{api-aE60mNjs.mjs → api-CiNezCys.mjs} +46 -13
- package/dist/{api-wYwQCJml.cjs → api-fuwEEEkT.cjs} +46 -13
- package/dist/{apiMachine-DwaqfM9Q.cjs → apiMachine-CxmiSa2-.cjs} +18 -18
- package/dist/{apiMachine-CvNB38Xg.mjs → apiMachine-DCmKjms1.mjs} +18 -18
- package/dist/{attachmentContent-DB8ZsxGE.cjs → attachmentContent-Cehh7ClR.cjs} +2 -2
- package/dist/{attachmentContent-C2ymY_-w.mjs → attachmentContent-CiY3MvdO.mjs} +2 -2
- package/dist/{auth-boIcb7iq.cjs → auth-DHlbjtf7.cjs} +5 -5
- package/dist/{auth-BYtmGgE1.mjs → auth-DHqHrs5d.mjs} +8 -8
- package/dist/{auth-CWO6cQ4G.mjs → auth-DVsH_a8J.mjs} +5 -5
- package/dist/{auth-Bce0Zk3q.cjs → auth-tlMcvk2Y.cjs} +8 -8
- package/dist/{auto-B-kopWQx.mjs → auto-Cnn8luKk.mjs} +17 -17
- package/dist/{auto-AaggdihK.cjs → auto-DNAa8xDZ.cjs} +17 -17
- package/dist/{bootstrap-CiWwfHB2.mjs → bootstrap-C2XSEyOe.mjs} +2 -2
- package/dist/{bootstrap-kywZ0tvD.cjs → bootstrap-PeTZ2sAn.cjs} +2 -2
- package/dist/{browser-Do2MFdq6.cjs → browser-Bm24RiFU.cjs} +1 -1
- package/dist/{browser-CFfZM3yg.mjs → browser-CWWyaf8_.mjs} +1 -1
- package/dist/{claudeAccountEnv-BL1pR_37.mjs → claudeAccountEnv-CPO6CGNd.mjs} +1 -1
- package/dist/{claudeAccountEnv-CEX_EMZr.cjs → claudeAccountEnv-_O3x5AJ1.cjs} +1 -1
- package/dist/{claudeLocal-DLd8ogcH.cjs → claudeLocal-BDWy2pFt.cjs} +5 -5
- package/dist/{claudeLocal-B47NjZfB.mjs → claudeLocal-CRG-Q7kS.mjs} +5 -5
- package/dist/{claudeLocalLauncher-5DDuHpCD.mjs → claudeLocalLauncher-B5cOrszW.mjs} +10 -10
- package/dist/{claudeLocalLauncher-D_UTQ4o_.cjs → claudeLocalLauncher-DmSLoHlw.cjs} +10 -10
- package/dist/{claudeSessionFork-BrJTncNL.mjs → claudeSessionFork-BqV6E0ep.mjs} +1 -1
- package/dist/{claudeSessionFork-4g6-Sk3Q.cjs → claudeSessionFork-OffWLYgd.cjs} +1 -1
- package/dist/{client-DS5JEsHs.mjs → client-B3lOol4f.mjs} +4 -4
- package/dist/{client-BIg2LPVx.cjs → client-B9fcSMXP.cjs} +2 -2
- package/dist/{client-Cbxr9VUE.mjs → client-CfTeXnYS.mjs} +2 -2
- package/dist/{client-OjYRPhZs.mjs → client-Cg_cuQb1.mjs} +2 -2
- package/dist/{client-CsfPUxLy.cjs → client-Ckic3nxZ.cjs} +2 -2
- package/dist/{client-BfDga3xi.cjs → client-YFvImdwH.cjs} +4 -4
- package/dist/codex/happyMcpStdioBridge.cjs +16 -16
- package/dist/codex/happyMcpStdioBridge.mjs +16 -16
- package/dist/{codexAccount-BDQjRbtI.cjs → codexAccount-CYhQir50.cjs} +1 -1
- package/dist/{codexAccount-NOX5pmQf.mjs → codexAccount-iZwmpYti.mjs} +1 -1
- package/dist/{codexAppServerClient-Bj5vN7sb.cjs → codexAppServerClient-C-UwVMUN.cjs} +60 -3
- package/dist/{codexAppServerClient-HKAm8f_D.mjs → codexAppServerClient-aV5m-FpZ.mjs} +60 -3
- package/dist/{codexCommand-DtbDjHZp.cjs → codexCommand-5nWT7F8A.cjs} +145 -51
- package/dist/{codexCommand-655pR6CR.mjs → codexCommand-CI2NTyIF.mjs} +144 -50
- package/dist/{codexTermination-DxLR-bb5.mjs → codexTermination-CLjDP6Ja.mjs} +6 -2
- package/dist/{codexTermination-CX_FHKT5.cjs → codexTermination-D18IHgLP.cjs} +6 -2
- package/dist/{config-Cv-A-Bw0.cjs → config-B7YtrHi0.cjs} +3 -3
- package/dist/{config-CIvXVGlP.mjs → config-BfwjfFSC.mjs} +3 -3
- package/dist/{configuration-rTcdHkhE.mjs → configuration-C8r6uD9k.mjs} +1 -1
- package/dist/{configuration-2Pbg3a0H.cjs → configuration-CWRKSOyj.cjs} +1 -1
- package/dist/{connect-BAYNAE8A.cjs → connect-DALX1hGB.cjs} +15 -15
- package/dist/{connect-B9Bl68PF.mjs → connect-K5HBcM56.mjs} +15 -15
- package/dist/{context-CLTyu_tQ.cjs → context-BqhlGL3u.cjs} +1 -1
- package/dist/{context-C7QarZMk.mjs → context-CtMY-M8T.mjs} +1 -1
- package/dist/{controlClient-BIdGnYBo.mjs → controlClient-DYQ1g2ar.mjs} +20 -8
- package/dist/{controlClient-CIqHL07h.cjs → controlClient-DyNgxNl7.cjs} +19 -7
- package/dist/{createSessionMetadata-BHjzRzPc.cjs → createSessionMetadata-C4WN8pVK.cjs} +2 -2
- package/dist/{createSessionMetadata-PrN-dT7K.mjs → createSessionMetadata-CZuEDo2v.mjs} +2 -2
- package/dist/{daemonAccounts-DwPwKxvv.mjs → daemonAccounts-CnAEaJE_.mjs} +3 -3
- package/dist/{daemonAccounts-CpGDY_4k.cjs → daemonAccounts-CxMJw7x2.cjs} +2 -2
- package/dist/{defaultPermissionMode-BakXiqRr.cjs → defaultPermissionMode-BCWCMONI.cjs} +1 -1
- package/dist/{defaultPermissionMode-DF5AfeBb.mjs → defaultPermissionMode-CpEJ0wlb.mjs} +1 -1
- package/dist/{deterministicJson-DFwJ57jR.mjs → deterministicJson-Dg_0QJAR.mjs} +13 -13
- package/dist/{deterministicJson-ZBFn1jtS.cjs → deterministicJson-r4zhG546.cjs} +13 -13
- package/dist/{doctor-yyM-zii7.cjs → doctor-0gLGzwz6.cjs} +8 -8
- package/dist/{doctor-u46qYYKX.cjs → doctor-CJpFhHoK.cjs} +8 -9
- package/dist/{doctor-CFYpAXvt.mjs → doctor-COeFzPpz.mjs} +8 -8
- package/dist/{doctor-BPkYWSuq.mjs → doctor-GN5mPOn5.mjs} +8 -9
- package/dist/{downloadTarget-DlmqPQp9.cjs → downloadTarget-8ovVpDv1.cjs} +6 -6
- package/dist/{downloadTarget-CVPBZMnY.mjs → downloadTarget-CbuUiS5p.mjs} +6 -6
- package/dist/{ensureDaemonRunning-D2ny0yon.cjs → ensureDaemonRunning-Bq-n6xTt.cjs} +5 -5
- package/dist/{ensureDaemonRunning-B6Y-CMWe.mjs → ensureDaemonRunning-CwlujXmV.mjs} +5 -5
- package/dist/{handleResumeCommand-DlrDcV5B.mjs → handleResumeCommand-B5GgmPm_.mjs} +5 -5
- package/dist/{handleResumeCommand-D-mGugcu.cjs → handleResumeCommand-muSrYA5y.cjs} +5 -5
- package/dist/{index-DuDD9khO.mjs → index-BRH0XYSO.mjs} +53 -46
- package/dist/{index-5c33fqLQ.cjs → index-BUOd8bNd.cjs} +5 -5
- package/dist/{index-Bi3dVJ0S.mjs → index-BZCIkrFj.mjs} +4 -4
- package/dist/{index-D1YnIih6.mjs → index-C27JFCbe.mjs} +2 -1
- package/dist/{index-CPkSLWP_.cjs → index-CQZg9jKx.cjs} +4 -4
- package/dist/{index-2Fcq3AGX.cjs → index-CnY74Dae.cjs} +3 -3
- package/dist/{index-BJsenPFp.mjs → index-D0V-seiN.mjs} +3 -3
- package/dist/{index-BUFrKZeQ.cjs → index-D9Hidq-g.cjs} +2 -0
- package/dist/{index-DEN6vfEY.mjs → index-DKCmDned.mjs} +5 -5
- package/dist/{index-BWvmUCQF.cjs → index-Dt_YE-zw.cjs} +52 -45
- package/dist/index.cjs +2 -2
- package/dist/index.mjs +2 -2
- package/dist/{install-BOA4nEbm.cjs → install-BlW2kkPl.cjs} +3 -3
- package/dist/{install-BVYL-wSO.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-zy20u7T3.mjs → lidState-BflRFw38.mjs} +1 -1
- package/dist/{lidState-DYeb7Wud.cjs → lidState-VZ1j_QYw.cjs} +1 -1
- package/dist/{localHappyAgentAuth-CBsX08VJ.mjs → localHappyAgentAuth-BAK_nqMG.mjs} +1 -1
- package/dist/{localHappyAgentAuth-CScN2McN.cjs → localHappyAgentAuth-oxhpgJOb.cjs} +1 -1
- package/dist/{logger-SGCwRIV5.mjs → logger-D1hb3CG8.mjs} +2 -2
- package/dist/{logger-CepF8C5Z.cjs → logger-HQ9yDb8R.cjs} +2 -2
- package/dist/{machineMetadata-ClJfd7ay.mjs → machineMetadata-Dxng45Uh.mjs} +3 -3
- package/dist/{machineMetadata-ObK4hjF0.cjs → machineMetadata-Dzwn-HjN.cjs} +3 -3
- package/dist/{main-C7ZcZVBY.mjs → main-BP0iY2vQ.mjs} +48 -48
- package/dist/{main-mhXOpUV7.cjs → main-D7qre-pa.cjs} +48 -48
- package/dist/{mcp-BuCpkYTY.mjs → mcp-BmDGyj7k.mjs} +18 -18
- package/dist/{mcp-Zz7m0j8A.cjs → mcp-D3yzLkh8.cjs} +18 -18
- package/dist/{mirrorProtocol-B0H9UTBM.mjs → mirrorProtocol-C9Zc6GFT.mjs} +3 -3
- package/dist/{mirrorProtocol-IhICxf0K.cjs → mirrorProtocol-Cv2otcvM.cjs} +3 -3
- package/dist/{package-Q_ELj5DL.mjs → package-CpmoMPuj.mjs} +7 -7
- package/dist/{package-C7WgesIw.cjs → package-Dn7zZkY1.cjs} +7 -7
- package/dist/{panels-Cm69UXgE.mjs → panels-CQobcX5w.mjs} +5 -5
- package/dist/{panels-yyxpwZnk.cjs → panels-D59PlNoD.cjs} +5 -5
- package/dist/{peerTools-DUg9RduG.mjs → peerTools-CNzlwuL7.mjs} +5 -5
- package/dist/{peerTools-BcZAbqBL.cjs → peerTools-D417O7d-.cjs} +5 -5
- package/dist/{persistence-D0gNvqXe.cjs → persistence-BiyvEYaR.cjs} +15 -5
- package/dist/{persistence-mr4Y484W.mjs → persistence-CagHeZ-f.mjs} +15 -5
- package/dist/{piRunnerArgs-CGjpl4iF.mjs → piRunnerArgs-DKU5LoWu.mjs} +1 -1
- package/dist/{piRunnerArgs-DK_DDkYW.cjs → piRunnerArgs-kTaNYd23.cjs} +1 -1
- package/dist/{piRuntime-CtZRNOEb.cjs → piRuntime-BI4KNAUY.cjs} +1 -1
- package/dist/{piRuntime-HUA19wG8.mjs → piRuntime-BV4fQyZD.mjs} +1 -1
- package/dist/{piTerminal-D9OPouek.cjs → piTerminal-WPUtDJAV.cjs} +20 -20
- package/dist/{piTerminal-Bgy1W9mA.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-DjEl8G0a.mjs → pushNotifications-4sNESDMv.mjs} +11 -4
- package/dist/{pushNotifications-CH0XVPQe.cjs → pushNotifications-DRDWUnP-.cjs} +12 -3
- package/dist/{query-DmIo5OXf.mjs → query-6OWHW1U1.mjs} +2 -2
- package/dist/{query-Df3WhSA0.cjs → query-qIbeJ2-r.cjs} +2 -2
- package/dist/{rateLimitWindows-a2yE3kCv.mjs → rateLimitWindows-4uhuwKnU.mjs} +1 -1
- package/dist/{rateLimitWindows-B9PERFm1.cjs → rateLimitWindows-U4fc1-_6.cjs} +1 -1
- package/dist/{registerCommonHandlers-D4uXC0he.cjs → registerCommonHandlers-CEV9KUsq.cjs} +2 -2
- package/dist/{registerCommonHandlers-CND00Dpj.mjs → registerCommonHandlers-PTJ8TBj9.mjs} +2 -2
- package/dist/{registerKillSessionHandler-DQKsD9CW.cjs → registerKillSessionHandler-C6F1sjoo.cjs} +6 -6
- package/dist/{registerKillSessionHandler-CwyHwm_n.mjs → registerKillSessionHandler-D4SSwQj8.mjs} +6 -6
- package/dist/registerSideQuestionHandler-4mRv0Msq.mjs +358 -0
- package/dist/registerSideQuestionHandler-ByUnjI3V.cjs +366 -0
- package/dist/{remoteSessionClient-DOWgca08.cjs → remoteSessionClient-CUk6haD7.cjs} +5 -5
- package/dist/{remoteSessionClient-mIr_9OL_.mjs → remoteSessionClient-CfYDFlKm.mjs} +5 -5
- package/dist/{reportProgressTool-DTKlUlHv.mjs → reportProgressTool-BCn5oG52.mjs} +3 -3
- package/dist/{reportProgressTool-BLw2_Ohi.cjs → reportProgressTool-C1JOvo6T.cjs} +3 -3
- package/dist/{run-1V6DLzTY.cjs → run-D2SlfZPP.cjs} +54 -74
- package/dist/{run-bfxXYL5N.mjs → run-DC8BIklA.mjs} +52 -72
- package/dist/{runClaude-DuFgZZwO.cjs → runClaude-BE-5GgIZ.cjs} +37 -31
- package/dist/{runClaude-BgvDhl2p.mjs → runClaude-D6fqN9PD.mjs} +37 -31
- package/dist/{runClaudeDeps-CX7GtH7O.mjs → runClaudeDeps-BmdwskeI.mjs} +52 -340
- package/dist/{runClaudeDeps-DeVinBmE.cjs → runClaudeDeps-W0nv2vHL.cjs} +48 -336
- package/dist/{runGemini-Cd27u-7R.mjs → runGemini-C3Ipeu1i.mjs} +37 -34
- package/dist/{runGemini-DiYSk3s1.cjs → runGemini-Da_d-2kV.cjs} +37 -34
- package/dist/{runOpenClaw-CWkkfRSo.mjs → runOpenClaw-BoI6nbKB.mjs} +30 -20
- package/dist/{runOpenClaw-DyQnBzpy.cjs → runOpenClaw-af5qDNU0.cjs} +30 -20
- package/dist/{sandbox-C35zDrkc.mjs → sandbox-CjoyUSGa.mjs} +4 -4
- package/dist/{sandbox-BAXXYewR.cjs → sandbox-UGF68GrE.cjs} +4 -4
- package/dist/selfCheck-CNrOZgBv.mjs +88 -0
- package/dist/{selfCheck-R71q-x7u.cjs → selfCheck-Cr8eAw4m.cjs} +40 -40
- package/dist/{send-3Wa9th3D.cjs → send-CVSht9s_.cjs} +8 -8
- package/dist/{send-DiSaR5Bk.mjs → send-gqX0-i4p.mjs} +8 -8
- package/dist/{server-BJu2bFBy.cjs → server-BPgVv-BG.cjs} +6 -6
- package/dist/{server-BxMJxaE6.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-dbi4JPhP.mjs → sessionLock-BfvR9BGB.mjs} +94 -78
- package/dist/{sessionLock-BJ1ngLgm.cjs → sessionLock-D2usWXAg.cjs} +92 -78
- package/dist/{sessionOps-BUlpeaUe.cjs → sessionOps-JRyQhF5s.cjs} +4 -4
- package/dist/{sessionOps-C9wRmCBg.mjs → sessionOps-OmRqUFm4.mjs} +4 -4
- package/dist/{sessionProvider-DYD6JepE.cjs → sessionProvider-BpscgwwC.cjs} +10 -10
- package/dist/{sessionProvider-BEHfI5gs.mjs → sessionProvider-DTEdidBc.mjs} +10 -10
- package/dist/{sessionScanner-CFITViIZ.mjs → sessionScanner-BlAOpqMh.mjs} +3 -3
- package/dist/{sessionScanner-BwbjEoSf.cjs → sessionScanner-C_qVc1ok.cjs} +3 -3
- package/dist/{sessions-C-wBd0fN.cjs → sessions-7iyjxti9.cjs} +10 -10
- package/dist/{sessions-wOcO2X-k.mjs → sessions-CnjHHllR.mjs} +10 -10
- package/dist/{setupOfflineReconnection-Bd6XsWhA.cjs → setupOfflineReconnection-BCbJa5mT.cjs} +2 -2
- package/dist/{setupOfflineReconnection-BrljmbqX.mjs → setupOfflineReconnection-IKEI7fLJ.mjs} +2 -2
- package/dist/{spawn-BPioepNz.mjs → spawn-CbfcClhj.mjs} +14 -14
- package/dist/{spawn-Crprnq9Z.cjs → spawn-CxEl0Dyz.cjs} +14 -14
- package/dist/{spawnAgents-B9olJ8xn.cjs → spawnAgents-Cm23BW-D.cjs} +1 -1
- package/dist/{spawnAgents-I29H9nO8.mjs → spawnAgents-N3jxdNJC.mjs} +1 -1
- package/dist/{spawnHappyCLI-BA1bTIiO.mjs → spawnHappyCLI-C8gMHJu5.mjs} +1 -1
- package/dist/{spawnHappyCLI-C0XAWy8V.cjs → spawnHappyCLI-CHSlXWUe.cjs} +1 -1
- package/dist/{startFileWatcher-COCEjNT8.mjs → startFileWatcher-6hslFu_B.mjs} +1 -1
- package/dist/{startFileWatcher-Ca5izs24.cjs → startFileWatcher-BGpYPz6L.cjs} +1 -1
- package/dist/{startupSessionCreate-BnEPBxsJ.mjs → startupSessionCreate-B7jrCZUD.mjs} +3 -3
- package/dist/{startupSessionCreate-Cmg1gkKS.cjs → startupSessionCreate-CltDtCEF.cjs} +3 -3
- package/dist/{store-Vej_738f.mjs → store-BlPvTr_Q.mjs} +1 -1
- package/dist/{store-CkNa6oj4.cjs → store-aa3CVNwS.cjs} +1 -1
- package/dist/{streamRelay-C0G1HOOd.cjs → streamRelay-C2Lb2z39.cjs} +1 -1
- package/dist/{streamRelay-C5U-C4GS.mjs → streamRelay-DFZyAPD_.mjs} +1 -1
- package/dist/{sync-BfrnSdL1.cjs → sync-DfI78smj.cjs} +1 -1
- package/dist/{sync-DVcNkv8e.mjs → sync-DtzoF9sw.mjs} +1 -1
- package/dist/{systemPrompt-BxZebU75.mjs → systemPrompt-B1Xd99hK.mjs} +2 -2
- package/dist/{systemPrompt-Os5ca7pu.cjs → systemPrompt-HZNR9rjt.cjs} +2 -2
- package/dist/{teams-CNB3DE_n.mjs → teams-Vk75H6BZ.mjs} +7 -7
- package/dist/{teams--pv0QFMA.cjs → teams-fFX-L_ms.cjs} +7 -7
- package/dist/{template-B9pLEP8v.cjs → template-B1AORlgU.cjs} +1 -1
- package/dist/{template-CL9EvQLQ.mjs → template-CJ8uLlD8.mjs} +1 -1
- package/dist/{time-Da5GIiCa.cjs → time-BqPZjTpo.cjs} +1 -1
- package/dist/{time-0Ru4clBD.mjs → time-CgAwVt5R.mjs} +1 -1
- package/dist/{titleGenerator-CaCzpYyA.mjs → titleGenerator-D2UB7Uyr.mjs} +2 -2
- package/dist/{titleGenerator-9xIXHA5K.cjs → titleGenerator-ijVOuv3J.cjs} +3 -3
- package/dist/{todo-CZXHl2Lg.mjs → todo-CCuqtD0O.mjs} +6 -6
- package/dist/{todo-DUY_J3l_.cjs → todo-vCzaIwNp.cjs} +6 -6
- package/dist/{tools-hPD2Hvei.cjs → tools-CL8h3fqh.cjs} +1 -1
- package/dist/{tools-DqA2Jt2R.mjs → tools-DthGQoo3.mjs} +1 -1
- package/dist/{uninstall-rTvdpRLt.cjs → uninstall-CIvThBvI.cjs} +3 -3
- package/dist/{uninstall-CjMzELYw.mjs → uninstall-DCJh4UoO.mjs} +3 -3
- package/dist/{wrapperAccount-D2A4DuZy.cjs → wrapperAccount-BubTurHU.cjs} +2 -2
- package/dist/{wrapperAccount-BkufO_9g.mjs → wrapperAccount-RPtq8BwD.mjs} +2 -2
- package/package.json +7 -7
- package/dist/rateLimitReporter-B_PZClib.mjs +0 -42
- package/dist/rateLimitReporter-M_IKRRS7.cjs +0 -44
- package/dist/selfCheck-DKMF0Dyu.mjs +0 -88
|
@@ -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 {
|
|
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-DYQ1g2ar.mjs';
|
|
6
|
+
import { c as readPersistedSessions } from './persistence-CagHeZ-f.mjs';
|
|
7
|
+
import { s as sessionWebUrl, e as sendUserMessage } from './sessionOps-OmRqUFm4.mjs';
|
|
8
|
+
import { a as listRemotePeers, b as sendRemotePeerMessage, d as deliverToSession } from './remoteSessionClient-CfYDFlKm.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-CfTeXnYS.mjs';
|
|
12
12
|
|
|
13
13
|
const SESSION_PEER_SENT_FROM = "session-peer";
|
|
14
14
|
const CLI_PEER_SENDER_ID = "cli";
|
|
@@ -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-DyNgxNl7.cjs');
|
|
8
|
+
var persistence = require('./persistence-BiyvEYaR.cjs');
|
|
9
|
+
var sessionOps = require('./sessionOps-JRyQhF5s.cjs');
|
|
10
|
+
var remoteSessionClient = require('./remoteSessionClient-CUk6haD7.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-Ckic3nxZ.cjs');
|
|
14
14
|
|
|
15
15
|
const SESSION_PEER_SENT_FROM = "session-peer";
|
|
16
16
|
const CLI_PEER_SENDER_ID = "cli";
|
|
@@ -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-CWRKSOyj.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-HQ9yDb8R.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,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-C8r6uD9k.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-D1hb3CG8.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 {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { s as sanitizeAgentSessionId, n as normalizeAcpPermissionMode } from './acpSessionResume-
|
|
1
|
+
import { s as sanitizeAgentSessionId, n as normalizeAcpPermissionMode } from './acpSessionResume-DEOIZUuj.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-CWRKSOyj.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-C8r6uD9k.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,15 +5,15 @@ 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-BI4KNAUY.cjs');
|
|
9
|
+
var mcp = require('./mcp-D3yzLkh8.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-HQ9yDb8R.cjs');
|
|
15
|
+
require('./persistence-BiyvEYaR.cjs');
|
|
16
|
+
require('./configuration-CWRKSOyj.cjs');
|
|
17
17
|
require('axios');
|
|
18
18
|
require('tweetnacl');
|
|
19
19
|
require('socket.io-client');
|
|
@@ -22,38 +22,38 @@ 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-CL8h3fqh.cjs');
|
|
26
|
+
require('./client-YFvImdwH.cjs');
|
|
27
27
|
require('node:util');
|
|
28
|
-
require('./index-
|
|
28
|
+
require('./index-D9Hidq-g.cjs');
|
|
29
29
|
require('@paralleldrive/cuid2');
|
|
30
|
-
require('./context-
|
|
30
|
+
require('./context-BqhlGL3u.cjs');
|
|
31
31
|
require('@modelcontextprotocol/sdk/server/stdio.js');
|
|
32
|
-
require('./controlClient-
|
|
32
|
+
require('./controlClient-DyNgxNl7.cjs');
|
|
33
33
|
require('./limits-C-a7gr04.cjs');
|
|
34
|
-
require('./downloadTarget-
|
|
35
|
-
require('./sessionOps-
|
|
34
|
+
require('./downloadTarget-8ovVpDv1.cjs');
|
|
35
|
+
require('./sessionOps-JRyQhF5s.cjs');
|
|
36
36
|
require('./authRelay-Dy1qU9td.cjs');
|
|
37
|
-
require('./time-
|
|
37
|
+
require('./time-BqPZjTpo.cjs');
|
|
38
38
|
require('./specialCommands-J3JFOq0J.cjs');
|
|
39
39
|
require('./backgroundTaskActivity-CBvUdj39.cjs');
|
|
40
|
-
require('./remoteSessionClient-
|
|
40
|
+
require('./remoteSessionClient-CUk6haD7.cjs');
|
|
41
41
|
require('./ids-B6ZC0HGt.cjs');
|
|
42
|
-
require('./bootstrap-
|
|
42
|
+
require('./bootstrap-PeTZ2sAn.cjs');
|
|
43
43
|
require('./previewPath-B0rBdhy1.cjs');
|
|
44
44
|
require('./terminalTitleSuggest-DhvRFX3H.cjs');
|
|
45
|
-
require('./titleGenerator-
|
|
45
|
+
require('./titleGenerator-ijVOuv3J.cjs');
|
|
46
46
|
require('node:module');
|
|
47
47
|
require('./oneShotPrompts-CL0dip9C.cjs');
|
|
48
48
|
require('./projectPath-C3ioB4Bu.cjs');
|
|
49
49
|
require('path');
|
|
50
50
|
require('url');
|
|
51
|
-
require('./wrapperAccount-
|
|
52
|
-
require('./claudeAccountEnv-
|
|
53
|
-
require('./store-
|
|
51
|
+
require('./wrapperAccount-BubTurHU.cjs');
|
|
52
|
+
require('./claudeAccountEnv-_O3x5AJ1.cjs');
|
|
53
|
+
require('./store-aa3CVNwS.cjs');
|
|
54
54
|
require('./trimIdent-4gvk9Wk6.cjs');
|
|
55
55
|
require('chalk');
|
|
56
|
-
require('./package-
|
|
56
|
+
require('./package-Dn7zZkY1.cjs');
|
|
57
57
|
require('./tmuxSocket-D-Xt6Vn-.cjs');
|
|
58
58
|
|
|
59
59
|
async function startPiTerminalTools(terminalId) {
|
|
@@ -3,15 +3,15 @@ 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-BV4fQyZD.mjs';
|
|
7
|
+
import { registerMcpTools, registerTerminalTitleSuggest } from './mcp-BmDGyj7k.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-D1hb3CG8.mjs';
|
|
13
|
+
import './persistence-CagHeZ-f.mjs';
|
|
14
|
+
import './configuration-C8r6uD9k.mjs';
|
|
15
15
|
import 'axios';
|
|
16
16
|
import 'tweetnacl';
|
|
17
17
|
import 'socket.io-client';
|
|
@@ -20,38 +20,38 @@ 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-DthGQoo3.mjs';
|
|
24
|
+
import './client-B3lOol4f.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-CtMY-M8T.mjs';
|
|
29
29
|
import '@modelcontextprotocol/sdk/server/stdio.js';
|
|
30
|
-
import './controlClient-
|
|
30
|
+
import './controlClient-DYQ1g2ar.mjs';
|
|
31
31
|
import './limits-DIo7rEBR.mjs';
|
|
32
|
-
import './downloadTarget-
|
|
33
|
-
import './sessionOps-
|
|
32
|
+
import './downloadTarget-CbuUiS5p.mjs';
|
|
33
|
+
import './sessionOps-OmRqUFm4.mjs';
|
|
34
34
|
import './authRelay-DhQhkBvX.mjs';
|
|
35
|
-
import './time-
|
|
35
|
+
import './time-CgAwVt5R.mjs';
|
|
36
36
|
import './specialCommands-MXUN0wfI.mjs';
|
|
37
37
|
import './backgroundTaskActivity-8PdPxrvy.mjs';
|
|
38
|
-
import './remoteSessionClient-
|
|
38
|
+
import './remoteSessionClient-CfYDFlKm.mjs';
|
|
39
39
|
import './ids-DU6sLx4C.mjs';
|
|
40
|
-
import './bootstrap-
|
|
40
|
+
import './bootstrap-C2XSEyOe.mjs';
|
|
41
41
|
import './previewPath-CXN4Vag0.mjs';
|
|
42
42
|
import './terminalTitleSuggest-CeKsX_V6.mjs';
|
|
43
|
-
import './titleGenerator-
|
|
43
|
+
import './titleGenerator-D2UB7Uyr.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-
|
|
54
|
+
import './package-CpmoMPuj.mjs';
|
|
55
55
|
import './tmuxSocket-B8Yx20sT.mjs';
|
|
56
56
|
|
|
57
57
|
async function startPiTerminalTools(terminalId) {
|
|
@@ -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;
|
|
@@ -25,6 +25,30 @@ const readProcessTable = () => {
|
|
|
25
25
|
return null;
|
|
26
26
|
}
|
|
27
27
|
};
|
|
28
|
+
function parseLiveProcessTable(stdout) {
|
|
29
|
+
const entries = [];
|
|
30
|
+
for (const line of stdout.split("\n")) {
|
|
31
|
+
const match = /^\s*(\d+)\s+(\d+)\s+(\S+)\s+(.+?)\s*$/.exec(line);
|
|
32
|
+
if (!match || match[3].startsWith("Z")) continue;
|
|
33
|
+
entries.push({ pid: Number(match[1]), ppid: Number(match[2]), start: match[4] });
|
|
34
|
+
}
|
|
35
|
+
return entries;
|
|
36
|
+
}
|
|
37
|
+
const readLiveProcessTable = () => {
|
|
38
|
+
if (process.platform === "win32") return null;
|
|
39
|
+
try {
|
|
40
|
+
const result = spawnSync("ps", ["-A", "-o", "pid=,ppid=,stat=,lstart="], {
|
|
41
|
+
encoding: "utf8",
|
|
42
|
+
timeout: 3e3,
|
|
43
|
+
maxBuffer: 16 * 1024 * 1024,
|
|
44
|
+
env: { ...process.env, LC_ALL: "C", LANG: "C" }
|
|
45
|
+
});
|
|
46
|
+
if (result.status !== 0 || typeof result.stdout !== "string") return null;
|
|
47
|
+
return parseLiveProcessTable(result.stdout);
|
|
48
|
+
} catch {
|
|
49
|
+
return null;
|
|
50
|
+
}
|
|
51
|
+
};
|
|
28
52
|
function descendantsOf(rootPid, table) {
|
|
29
53
|
const children = /* @__PURE__ */ new Map();
|
|
30
54
|
for (const entry of table) {
|
|
@@ -98,4 +122,4 @@ async function terminateSurvivors(snapshot, options = {}) {
|
|
|
98
122
|
if (alive.length > 0) killSurvivors(alive, { read, kill });
|
|
99
123
|
}
|
|
100
124
|
|
|
101
|
-
export { killSurvivors as k, snapshotTree as s, terminateSurvivors as t };
|
|
125
|
+
export { survivorsOf as a, killSurvivors as k, readLiveProcessTable as r, snapshotTree as s, terminateSurvivors as t };
|
|
@@ -1,10 +1,17 @@
|
|
|
1
|
+
import { randomUUID } from 'node:crypto';
|
|
1
2
|
import { z } from 'zod';
|
|
2
|
-
import {
|
|
3
|
+
import { Q as AgentProfilesStateSchema, T as AgentVersionsSchema } from './index-C27JFCbe.mjs';
|
|
3
4
|
import axios from 'axios';
|
|
4
|
-
import { l as logger } from './logger-
|
|
5
|
-
import { c as configuration } from './configuration-
|
|
5
|
+
import { l as logger } from './logger-D1hb3CG8.mjs';
|
|
6
|
+
import { c as configuration } from './configuration-C8r6uD9k.mjs';
|
|
6
7
|
import { c as contentLogMetadata } from './contentLogMetadata-BlWI0egu.mjs';
|
|
7
8
|
|
|
9
|
+
const agentInstanceAuth = Object.freeze({
|
|
10
|
+
agentInstance: randomUUID(),
|
|
11
|
+
agentStartedAt: Math.floor(performance.timeOrigin)
|
|
12
|
+
});
|
|
13
|
+
const SESSION_SUPERSEDED_ERROR = "Session superseded";
|
|
14
|
+
|
|
8
15
|
z.object({
|
|
9
16
|
teamsVersion: z.number().int().positive().optional(),
|
|
10
17
|
teamLaunchVersion: z.number().int().positive().optional(),
|
|
@@ -722,4 +729,4 @@ class PushNotificationClient {
|
|
|
722
729
|
}
|
|
723
730
|
}
|
|
724
731
|
|
|
725
|
-
export { AsyncLock as A, FileEventMessageSchema as F, MAX_CHAT_ATTACHMENT_SOURCE_BYTES as M, PushNotificationClient as P, UserMessageSchema as U,
|
|
732
|
+
export { AsyncLock as A, FileEventMessageSchema as F, MAX_CHAT_ATTACHMENT_SOURCE_BYTES as M, PushNotificationClient as P, SESSION_SUPERSEDED_ERROR as S, UserMessageSchema as U, agentInstanceAuth as a, MAX_CHAT_ATTACHMENT_ENCRYPTED_BYTES as b, getSessionNotificationBody as g };
|