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,26 +1,26 @@
|
|
|
1
|
-
import { i as isClaudeSessionId, g as extractCompleteLines, h as decideBackfill, j as parseTerminalHookPayload, k as decideMirrorBinding, M as MIRROR_BACKFILL_LINES_DEFAULT, m as mirrorLineKey, n as mirrorLocalId, o as initializeOwnedWorktree, e as summarizeSpawnSessionForLog, q as startAgentVersionChecks, W as WORKTREE_CAPABILITY_VERSION, t as currentWorktreeService } from './mirrorProtocol-
|
|
1
|
+
import { i as isClaudeSessionId, g as extractCompleteLines, h as decideBackfill, j as parseTerminalHookPayload, k as decideMirrorBinding, M as MIRROR_BACKFILL_LINES_DEFAULT, m as mirrorLineKey, n as mirrorLocalId, o as initializeOwnedWorktree, e as summarizeSpawnSessionForLog, q as startAgentVersionChecks, W as WORKTREE_CAPABILITY_VERSION, t as currentWorktreeService } from './mirrorProtocol-C9Zc6GFT.mjs';
|
|
2
2
|
import { F as FS_MKDIR_CAPABILITY_VERSION } from './fsMkdir-DumgLTzR.mjs';
|
|
3
|
-
import { P as PI_ADAPTER_INSTALL_HINT, s as sanitizeSpawnModel } from './piRunnerArgs-
|
|
3
|
+
import { P as PI_ADAPTER_INSTALL_HINT, s as sanitizeSpawnModel } from './piRunnerArgs-DKU5LoWu.mjs';
|
|
4
4
|
import fs from 'fs/promises';
|
|
5
5
|
import os from 'os';
|
|
6
6
|
import * as tmp from 'tmp';
|
|
7
7
|
import axios from 'axios';
|
|
8
8
|
import { readFileSync, openSync, fsyncSync, closeSync, renameSync, existsSync, readdirSync, statSync, unlinkSync, readSync, writeSync, ftruncateSync, utimesSync, realpathSync, promises, constants as constants$1, writeFileSync, mkdirSync, accessSync, rmdirSync } from 'node:fs';
|
|
9
9
|
import { join, isAbsolute, resolve, dirname, sep, basename, relative } from 'node:path';
|
|
10
|
-
import { f as ensurePrivateDirectorySync, w as writePrivateFileSync, c as configuration } from './configuration-
|
|
11
|
-
import { T as TurnActivityTracker, A as ApiClient } from './api-
|
|
12
|
-
import { S as SPAWN_AGENTS, i as isSpawnAgent, s as sanitizeSpawnPermissionMode, r as resolveSpawnPermissionMode, a as resolveFirstMessageMeta, j as joinProject } from './spawnAgents-
|
|
13
|
-
import { l as logger } from './logger-
|
|
14
|
-
import { p as pruneStaleCompileCaches } from './index-
|
|
15
|
-
import { a as authAndSetupMachineIfNeeded } from './auth-
|
|
10
|
+
import { f as ensurePrivateDirectorySync, w as writePrivateFileSync, c as configuration } from './configuration-C8r6uD9k.mjs';
|
|
11
|
+
import { T as TurnActivityTracker, A as ApiClient } from './api-CiNezCys.mjs';
|
|
12
|
+
import { S as SPAWN_AGENTS, i as isSpawnAgent, s as sanitizeSpawnPermissionMode, r as resolveSpawnPermissionMode, a as resolveFirstMessageMeta, j as joinProject } from './spawnAgents-N3jxdNJC.mjs';
|
|
13
|
+
import { l as logger } from './logger-D1hb3CG8.mjs';
|
|
14
|
+
import { p as pruneStaleCompileCaches } from './index-D0V-seiN.mjs';
|
|
15
|
+
import { a as authAndSetupMachineIfNeeded } from './auth-DVsH_a8J.mjs';
|
|
16
16
|
import { spawn, execSync } from 'child_process';
|
|
17
|
-
import { p as packageJson } from './package-
|
|
18
|
-
import { a as globalPrefixForPackage, N as NPM_SAFE_ARG, g as getEnvironmentInfo } from './doctor-
|
|
19
|
-
import { s as spawnHappyCLI } from './spawnHappyCLI-
|
|
20
|
-
import { c as readPersistedSessions, r as readSettings, l as latchKeepAwake, s as reportSignature, t as decideDaemonHibernation, v as nextCheckDelay, x as persistSession, d as readDaemonState, y as acquireDaemonLock, a as resolveCheckMs, z as resolveIdleMs, A as deletePersistedSessions, B as writeDaemonState, C as writeSettings, D as settingIdleMs, u as updateSettings, E as rewriteCredentialsForRelay, g as readCredentials, F as releaseDaemonLock } from './persistence-
|
|
21
|
-
import { i as isDaemonRunningCurrentlyInstalledHappyVersion, s as stopDaemon, w as cleanupDaemonState } from './controlClient-
|
|
22
|
-
import { e as sendUserMessage, f as readSessionMetadata, r as readSessionTranscript, l as listAccountSessions, a as listSessions, M as MAX_READ_LIMIT, s as sessionWebUrl, n as lineageOf, g as waitForSessionKey, d as archiveSession, h as analyzeLatestTurn, i as readSessionLog, j as TURN_WINDOW, p as userPromptText } from './sessionOps-
|
|
23
|
-
import {
|
|
17
|
+
import { p as packageJson } from './package-CpmoMPuj.mjs';
|
|
18
|
+
import { a as globalPrefixForPackage, N as NPM_SAFE_ARG, g as getEnvironmentInfo } from './doctor-COeFzPpz.mjs';
|
|
19
|
+
import { s as spawnHappyCLI } from './spawnHappyCLI-C8gMHJu5.mjs';
|
|
20
|
+
import { c as readPersistedSessions, r as readSettings, l as latchKeepAwake, s as reportSignature, t as decideDaemonHibernation, v as nextCheckDelay, x as persistSession, d as readDaemonState, y as acquireDaemonLock, a as resolveCheckMs, z as resolveIdleMs, A as deletePersistedSessions, B as writeDaemonState, C as writeSettings, D as settingIdleMs, u as updateSettings, E as rewriteCredentialsForRelay, g as readCredentials, F as releaseDaemonLock } from './persistence-CagHeZ-f.mjs';
|
|
21
|
+
import { i as isDaemonRunningCurrentlyInstalledHappyVersion, s as stopDaemon, w as cleanupDaemonState } from './controlClient-DYQ1g2ar.mjs';
|
|
22
|
+
import { e as sendUserMessage, f as readSessionMetadata, r as readSessionTranscript, l as listAccountSessions, a as listSessions, M as MAX_READ_LIMIT, s as sessionWebUrl, n as lineageOf, g as waitForSessionKey, d as archiveSession, h as analyzeLatestTurn, i as readSessionLog, j as TURN_WINDOW, p as userPromptText } from './sessionOps-OmRqUFm4.mjs';
|
|
23
|
+
import { Q as AgentProfilesStateSchema, aa as ServerMigrateNoticeSchema, ab as isHarnessInstallId, ac as agentProfileUnavailableReason, ad as MODEL_INTENT_CONFIG, j as AUTOMATION_SUMMARY_MAX_CHARS, ae as AUTOMATION_PRECHECK_OUTPUT_MAX_CHARS, af as AUTOMATION_PRECHECK_DEFAULT_TIMEOUT_MS, d as AUTOMATION_PRECHECK_MAX_TIMEOUT_MS, ag as AUTOMATION_CLAIM_MAX_RUNS, ah as AUTOMATION_DAEMON_CAPABILITY_PRECHECK, ai as AUTOMATION_DEFAULT_LEASE_MS, i as isAutomationRunTerminal, v as resolveLaunchAgentProfile, aj as HARNESS_INSTALL_CAPABILITY_VERSION } from './index-C27JFCbe.mjs';
|
|
24
24
|
import fastify from 'fastify';
|
|
25
25
|
import { z } from 'zod';
|
|
26
26
|
import { validatorCompiler, serializerCompiler } from 'fastify-type-provider-zod';
|
|
@@ -28,70 +28,71 @@ import { d as decodeBase64, s as sameRelay, e as encodeBase64, h as decrypt } fr
|
|
|
28
28
|
import { randomBytes, createHash, timingSafeEqual, randomUUID } from 'node:crypto';
|
|
29
29
|
import { c as checkPreviewPath } from './previewPath-CXN4Vag0.mjs';
|
|
30
30
|
import { a as BACKGROUND_TASKS_MAX, d as BACKGROUND_TASK_DESCRIPTION_MAX, e as BackgroundTaskTracker } from './backgroundTaskActivity-8PdPxrvy.mjs';
|
|
31
|
-
import { b as sanitizeRateLimitReport } from './rateLimitWindows-
|
|
32
|
-
import { f as formatEditConflictNotice, b as SESSION_PEER_SENT_FROM, s as sendPeerMessage, l as listPeerSessions, C as CLI_PEER_SENDER_ID } from './peerTools-
|
|
31
|
+
import { b as sanitizeRateLimitReport } from './rateLimitWindows-4uhuwKnU.mjs';
|
|
32
|
+
import { f as formatEditConflictNotice, b as SESSION_PEER_SENT_FROM, s as sendPeerMessage, l as listPeerSessions, C as CLI_PEER_SENDER_ID } from './peerTools-CNzlwuL7.mjs';
|
|
33
33
|
import os$1, { hostname, homedir, tmpdir } from 'node:os';
|
|
34
|
-
import { c as RemoteCallBudget, e as REMOTE_WRITE_CALLS_PER_MINUTE, d as deliverToSession, g as guardRemoteSessionOpsRequest, h as remoteError, i as REMOTE_OP_DEADLINE_MS, j as formatRemoteAuditLine, k as REMOTE_SEND_COMMIT_DEADLINE_MS, m as REMOTE_RESUME_WAIT_MS, n as capRemoteTranscript, o as capRemoteText, p as REMOTE_ANSWER_MAX_BYTES, q as REMOTE_TITLE_MAX_BYTES } from './remoteSessionClient-
|
|
35
|
-
import { assistantHome, bootstrapAssistantHome } from './bootstrap-
|
|
36
|
-
import { refreshAgentHomes, locateClaudeConversation, agentHomeSpawnEnv } from './index-
|
|
34
|
+
import { c as RemoteCallBudget, e as REMOTE_WRITE_CALLS_PER_MINUTE, d as deliverToSession, g as guardRemoteSessionOpsRequest, h as remoteError, i as REMOTE_OP_DEADLINE_MS, j as formatRemoteAuditLine, k as REMOTE_SEND_COMMIT_DEADLINE_MS, m as REMOTE_RESUME_WAIT_MS, n as capRemoteTranscript, o as capRemoteText, p as REMOTE_ANSWER_MAX_BYTES, q as REMOTE_TITLE_MAX_BYTES } from './remoteSessionClient-CfYDFlKm.mjs';
|
|
35
|
+
import { assistantHome, bootstrapAssistantHome } from './bootstrap-C2XSEyOe.mjs';
|
|
36
|
+
import { refreshAgentHomes, locateClaudeConversation, agentHomeSpawnEnv } from './index-BZCIkrFj.mjs';
|
|
37
37
|
import require$$0, { existsSync as existsSync$1, statSync as statSync$1, mkdtempSync, rmSync } from 'fs';
|
|
38
38
|
import require$$1, { join as join$1 } from 'path';
|
|
39
39
|
import { spawn as spawn$1, execFile, spawnSync } from 'node:child_process';
|
|
40
40
|
import { p as projectPath } from './projectPath-BTBIMB57.mjs';
|
|
41
41
|
import { d as daemonEndpointsMatch, r as resolveClaudeCredentialReadiness } from './doctorReadiness-C208SMN9.mjs';
|
|
42
|
-
import { o as ownerRetryPending, c as consumeOwnerRetry, s as spawnGate, a as afterStartupFailure, b as startupFailureMessage, T as TEAM_SPAWN_MAX_ATTEMPTS, d as TEAM_CLEANUP_RETRY_MS, g as getInitialMachineMetadata, e as getStartupCliAvailability, f as TEAM_RETRY_CAPABILITY_VERSION, w as withRunningCliFacts } from './machineMetadata-
|
|
42
|
+
import { o as ownerRetryPending, c as consumeOwnerRetry, s as spawnGate, a as afterStartupFailure, b as startupFailureMessage, T as TEAM_SPAWN_MAX_ATTEMPTS, d as TEAM_CLEANUP_RETRY_MS, g as getInitialMachineMetadata, e as getStartupCliAvailability, f as TEAM_RETRY_CAPABILITY_VERSION, w as withRunningCliFacts } from './machineMetadata-Dxng45Uh.mjs';
|
|
43
43
|
import { M as ModelConfigError, B as BackupStore, r as readConfigFile, s as sha256, a as atomicWriteFile } from './fileStore-5qpetZS0.mjs';
|
|
44
44
|
import { c as collectSecretValues, a as parseJsonObject, b as childObject, s as setOrDelete, d as changedPaths, e as stringifyLike, f as fail, n as normalizeModelList, g as normalizeModelId, h as normalizeSecret, i as normalizeBaseUrl, u as uniq, j as baseUrlWarnings, m as maskSecret, k as getPath$1, l as normalizeProviderId, o as piAdapter, r as redactText } from './pi-CqyoZMjI.mjs';
|
|
45
|
-
import { p as parse } from './codexAccount-
|
|
45
|
+
import { p as parse } from './codexAccount-iZwmpYti.mjs';
|
|
46
46
|
import require$$3 from 'crypto';
|
|
47
47
|
import { c as commandOnPath } from './detectCLI-CSGMlV51.mjs';
|
|
48
|
-
import { buildResumeLaunch } from './handleResumeCommand-
|
|
48
|
+
import { buildResumeLaunch } from './handleResumeCommand-B5GgmPm_.mjs';
|
|
49
49
|
import { n as normalizeWebPanels } from './webPanels-B2_C2-3g.mjs';
|
|
50
50
|
import { access, symlink, readFile, rm, unlink, readlink, lstat, constants, rename, mkdir, copyFile, readdir, stat, open } from 'node:fs/promises';
|
|
51
51
|
import { p as parseExactVersion, c as compareExactVersions, f as fetchCliUpdateState, r as resolveCliUpdateCheckInterval, D as DEFAULT_CLI_UPDATE_CHECK_INTERVAL_MS } from './cliUpdate-Y34VGe9Y.mjs';
|
|
52
|
-
import { P as ProjectsUnsupportedError, c as createProjectsClient } from './client-
|
|
53
|
-
import { d as wrapperReportsIdle, f as decideAutoRestart, s as statusFromVerdict, g as autoRestartNextCheck, h as wrapperStaleness, r as recordAttempt, i as AUTO_RESTART_MAX_ATTEMPTS, j as AUTO_RESTART_MIN_GAP_MS, p as processIdentityFields, k as readSessionLock, l as
|
|
54
|
-
import { c as createAutomationsClient, i as isAutomationsUnavailable, d as AutomationsRequestError } from './client-
|
|
52
|
+
import { P as ProjectsUnsupportedError, c as createProjectsClient } from './client-CfTeXnYS.mjs';
|
|
53
|
+
import { d as wrapperReportsIdle, f as decideAutoRestart, s as statusFromVerdict, g as autoRestartNextCheck, h as wrapperStaleness, r as recordAttempt, i as AUTO_RESTART_MAX_ATTEMPTS, j as AUTO_RESTART_MIN_GAP_MS, p as processIdentityFields, k as readSessionLock, l as AUTO_RESTARTED_ENV, n as encodeAutoRestarted, o as pendingUpgradeVersion, q as resolveQuietMs, u as AUTO_RESTART_RECHECK_CAP_MS } from './sessionLock-BfvR9BGB.mjs';
|
|
54
|
+
import { c as createAutomationsClient, i as isAutomationsUnavailable, d as AutomationsRequestError } from './client-Cg_cuQb1.mjs';
|
|
55
55
|
import { w as withKeychainOffPath, a as keychainIdentityFor, i as interpretSecurityRead, s as securityReadArgs, b as securityDeleteArgs, c as keychainOffShimDir, d as interpretCredentialsFile, C as CREDENTIALS_REJECTED_DETAIL, e as buildClaudeAuthState, f as claudeAuthStateChanged, r as resolveSdkClaudeBinary, g as classifyAuthStatus, h as diagnoseStores, p as parseLaunchctlPid, H as HAPPY_DAEMON_LAUNCHD_LABEL, j as classifyLineage, l as probeLaunchdJob, m as detectDaemonSupervisor, n as daemonLineage, o as probeSystemdKillMode, q as wrappersSurviveHandover, t as handoverWaitsForSessions } from './daemonSupervisor-BxohggqN.mjs';
|
|
56
|
-
import { A as AccountService } from './accountService-
|
|
57
|
-
import { spawnSetupTokenPty, watchAccountFiles } from './daemonAccounts-
|
|
56
|
+
import { A as AccountService } from './accountService-DQ21IlBs.mjs';
|
|
57
|
+
import { spawnSetupTokenPty, watchAccountFiles } from './daemonAccounts-CnAEaJE_.mjs';
|
|
58
58
|
import { g as getProjectPath } from './path-D2wdaNSk.mjs';
|
|
59
59
|
import { b as extractClaudeEditPaths } from './editPaths-BVfS_FFL.mjs';
|
|
60
|
-
import { s as startFileWatcher } from './startFileWatcher-
|
|
61
|
-
import { I as InvalidateSync } from './sync-
|
|
60
|
+
import { s as startFileWatcher } from './startFileWatcher-6hslFu_B.mjs';
|
|
61
|
+
import { I as InvalidateSync } from './sync-DtzoF9sw.mjs';
|
|
62
62
|
import { R as RawJSONLinesSchema } from './types-CkqAACXx.mjs';
|
|
63
63
|
import { t as tmuxArgs, a as scrubTmuxClientEnv, s as shellescape } from './tmuxSocket-B8Yx20sT.mjs';
|
|
64
|
-
import {
|
|
64
|
+
import { i as isProcessAlive, t as terminateProcessTree } from './processTermination-ChJG5SLW.mjs';
|
|
65
|
+
import { findAllHappyProcesses } from './doctor-GN5mPOn5.mjs';
|
|
65
66
|
import { T as TEAM_SKILL, a as TEAM_LEAD_PLAYBOOK, b as TEAM_MEMBER_RULES } from './resources-CLP_MpK4.mjs';
|
|
66
67
|
import { promisify } from 'node:util';
|
|
67
|
-
import { b as clipText, r as renderAction, c as clipAutomationReport, e as renderTemplate } from './template-
|
|
68
|
+
import { b as clipText, r as renderAction, c as clipAutomationReport, e as renderTemplate } from './template-CJ8uLlD8.mjs';
|
|
68
69
|
import { d as describeAgentHome } from './loginShellEnv-Dw8M7tkI.mjs';
|
|
69
|
-
import { S as SPAWN_ACCOUNT_ENV } from './store-
|
|
70
|
-
import './acpSessionResume-
|
|
71
|
-
import './
|
|
70
|
+
import { S as SPAWN_ACCOUNT_ENV } from './store-BlPvTr_Q.mjs';
|
|
71
|
+
import './acpSessionResume-DEOIZUuj.mjs';
|
|
72
|
+
import './pushNotifications-4sNESDMv.mjs';
|
|
73
|
+
import './contentLogMetadata-BlWI0egu.mjs';
|
|
74
|
+
import './lidState-BflRFw38.mjs';
|
|
72
75
|
import 'node:events';
|
|
73
76
|
import 'socket.io-client';
|
|
74
|
-
import './pushNotifications-67GmbVfE.mjs';
|
|
75
|
-
import './contentLogMetadata-BlWI0egu.mjs';
|
|
76
77
|
import './limits-DIo7rEBR.mjs';
|
|
77
|
-
import './time-
|
|
78
|
-
import './registerCommonHandlers-
|
|
78
|
+
import './time-CgAwVt5R.mjs';
|
|
79
|
+
import './registerCommonHandlers-PTJ8TBj9.mjs';
|
|
79
80
|
import 'util';
|
|
80
81
|
import 'cross-spawn';
|
|
81
82
|
import '@paralleldrive/cuid2';
|
|
82
83
|
import 'chalk';
|
|
83
84
|
import 'node:module';
|
|
84
85
|
import 'tweetnacl';
|
|
85
|
-
import './browser-
|
|
86
|
+
import './browser-CWWyaf8_.mjs';
|
|
86
87
|
import 'open';
|
|
87
88
|
import './specialCommands-MXUN0wfI.mjs';
|
|
88
89
|
import './ids-DU6sLx4C.mjs';
|
|
89
90
|
import 'url';
|
|
90
|
-
import './localHappyAgentAuth-
|
|
91
|
-
import './
|
|
92
|
-
import './claudeAccountEnv-NyoxjLuJ.mjs';
|
|
91
|
+
import './localHappyAgentAuth-BAK_nqMG.mjs';
|
|
92
|
+
import './claudeAccountEnv-CPO6CGNd.mjs';
|
|
93
93
|
import 'node:readline';
|
|
94
94
|
import 'node-pty';
|
|
95
|
+
import './processTreeSnapshot-fuwxC0fr.mjs';
|
|
95
96
|
import 'ps-list';
|
|
96
97
|
|
|
97
98
|
async function resolveRelaunchMetadata(snapshot, fetchServer) {
|
|
@@ -7170,13 +7171,7 @@ async function startDaemon() {
|
|
|
7170
7171
|
tracked: (sessionId, pid) => {
|
|
7171
7172
|
const tracked = pidToTrackedSession.get(pid);
|
|
7172
7173
|
if (!tracked || tracked.happySessionId !== sessionId) return null;
|
|
7173
|
-
|
|
7174
|
-
try {
|
|
7175
|
-
process.kill(pid, 0);
|
|
7176
|
-
live = true;
|
|
7177
|
-
} catch {
|
|
7178
|
-
live = false;
|
|
7179
|
-
}
|
|
7174
|
+
const live = isProcessAlive(pid);
|
|
7180
7175
|
return { live, ...tracked.spawnedBy ? { spawnedBy: tracked.spawnedBy } : {} };
|
|
7181
7176
|
},
|
|
7182
7177
|
teamsMember: (sessionId) => teamWorker?.hasSession(sessionId) === true,
|
|
@@ -7342,14 +7337,7 @@ async function startDaemon() {
|
|
|
7342
7337
|
logger.debug(`[DAEMON RUN] forceNew: purged persisted assistant session(s): ${assistantIds.join(", ")}`);
|
|
7343
7338
|
}
|
|
7344
7339
|
} else {
|
|
7345
|
-
const live = findLiveAssistant(pidToTrackedSession.values(), (pid) =>
|
|
7346
|
-
try {
|
|
7347
|
-
process.kill(pid, 0);
|
|
7348
|
-
return true;
|
|
7349
|
-
} catch {
|
|
7350
|
-
return false;
|
|
7351
|
-
}
|
|
7352
|
-
});
|
|
7340
|
+
const live = findLiveAssistant(pidToTrackedSession.values(), (pid) => isProcessAlive(pid));
|
|
7353
7341
|
if (live?.happySessionId) {
|
|
7354
7342
|
logger.debug(`[DAEMON RUN] Assistant already running (session ${live.happySessionId}, pid ${live.pid})`);
|
|
7355
7343
|
return { type: "success", sessionId: live.happySessionId };
|
|
@@ -7759,7 +7747,7 @@ async function startDaemon() {
|
|
|
7759
7747
|
pidToAwaiter.delete(pid);
|
|
7760
7748
|
logger.debug(`[DAEMON RUN] Session webhook timeout for PID ${pid}`);
|
|
7761
7749
|
try {
|
|
7762
|
-
const started =
|
|
7750
|
+
const started = terminateProcessTree(pid, (stopped) => fail({ exited: stopped, code: null, signal: null, timedOut: true }));
|
|
7763
7751
|
if (!started) fail({ exited: false, code: null, signal: null, timedOut: true });
|
|
7764
7752
|
} catch {
|
|
7765
7753
|
fail({ exited: false, code: null, signal: null, timedOut: true });
|
|
@@ -8146,14 +8134,7 @@ async function startDaemon() {
|
|
|
8146
8134
|
pidToTrackedSession.delete(pid);
|
|
8147
8135
|
};
|
|
8148
8136
|
const assistantReportLastSentAt = /* @__PURE__ */ new Map();
|
|
8149
|
-
const isPidAlive = (pid) =>
|
|
8150
|
-
try {
|
|
8151
|
-
process.kill(pid, 0);
|
|
8152
|
-
return true;
|
|
8153
|
-
} catch {
|
|
8154
|
-
return false;
|
|
8155
|
-
}
|
|
8156
|
-
};
|
|
8137
|
+
const isPidAlive = (pid) => isProcessAlive(pid);
|
|
8157
8138
|
const onSessionStateEvent = (sessionId, event, spawnedByFromSession) => {
|
|
8158
8139
|
if (automationRunner?.hasSession(sessionId)) automationRunner.report(sessionId, event === "completed" ? "idle" : "blocked");
|
|
8159
8140
|
if (spawnedByFromSession === "teams" || teamWorker?.hasSession(sessionId) || [...pidToTrackedSession.values()].some((s) => s.happySessionId === sessionId && s.spawnedBy === "teams")) {
|
|
@@ -8637,9 +8618,7 @@ async function startDaemon() {
|
|
|
8637
8618
|
logger.debug(`[DAEMON RUN] Health check started at ${(/* @__PURE__ */ new Date()).toLocaleString()}`);
|
|
8638
8619
|
}
|
|
8639
8620
|
for (const [pid, _] of pidToTrackedSession.entries()) {
|
|
8640
|
-
|
|
8641
|
-
process.kill(pid, 0);
|
|
8642
|
-
} catch (error) {
|
|
8621
|
+
if (!isProcessAlive(pid)) {
|
|
8643
8622
|
logger.debug(`[DAEMON RUN] Finalizing stale session with PID ${pid} (process no longer exists)`);
|
|
8644
8623
|
onChildExited(pid);
|
|
8645
8624
|
}
|
|
@@ -8684,7 +8663,7 @@ async function startDaemon() {
|
|
|
8684
8663
|
accountService.dispose();
|
|
8685
8664
|
apiMachine.shutdown();
|
|
8686
8665
|
await stopControlServer();
|
|
8687
|
-
await cleanupDaemonState();
|
|
8666
|
+
await cleanupDaemonState(process.pid);
|
|
8688
8667
|
await releaseDaemonLock(daemonLockHandle);
|
|
8689
8668
|
await stopCaffeinate();
|
|
8690
8669
|
if (daemonSupervisor !== "none") {
|
|
@@ -8709,6 +8688,7 @@ async function startDaemon() {
|
|
|
8709
8688
|
if (daemonState && daemonState.pid !== process.pid) {
|
|
8710
8689
|
logger.debug("[DAEMON RUN] Somehow a different daemon was started without killing us. We should kill ourselves.");
|
|
8711
8690
|
requestShutdown("exception", "A different daemon was started without killing us. We should kill ourselves.");
|
|
8691
|
+
return;
|
|
8712
8692
|
}
|
|
8713
8693
|
try {
|
|
8714
8694
|
fileState = withDaemonHeartbeat(fileState, (/* @__PURE__ */ new Date()).toLocaleString());
|
|
@@ -8829,7 +8809,7 @@ async function startDaemon() {
|
|
|
8829
8809
|
accountService.dispose();
|
|
8830
8810
|
apiMachine.shutdown();
|
|
8831
8811
|
await stopControlServer();
|
|
8832
|
-
await cleanupDaemonState();
|
|
8812
|
+
await cleanupDaemonState(process.pid);
|
|
8833
8813
|
await stopCaffeinate();
|
|
8834
8814
|
await releaseDaemonLock(daemonLockHandle);
|
|
8835
8815
|
logger.debug(`[DAEMON RUN] Cleanup completed, exiting process with code ${daemonExitCode(source)}`);
|
|
@@ -1,61 +1,62 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var os = require('node:os');
|
|
4
|
-
var sessionLock = require('./sessionLock-
|
|
5
|
-
var persistence = require('./persistence-
|
|
6
|
-
var startupSessionCreate = require('./startupSessionCreate-
|
|
4
|
+
var sessionLock = require('./sessionLock-D2usWXAg.cjs');
|
|
5
|
+
var persistence = require('./persistence-BiyvEYaR.cjs');
|
|
6
|
+
var startupSessionCreate = require('./startupSessionCreate-CltDtCEF.cjs');
|
|
7
7
|
var node_crypto = require('node:crypto');
|
|
8
|
-
var api = require('./api-
|
|
9
|
-
var logger = require('./logger-
|
|
10
|
-
var createSessionMetadata = require('./createSessionMetadata-
|
|
11
|
-
var _package = require('./package-
|
|
8
|
+
var api = require('./api-fuwEEEkT.cjs');
|
|
9
|
+
var logger = require('./logger-HQ9yDb8R.cjs');
|
|
10
|
+
var createSessionMetadata = require('./createSessionMetadata-C4WN8pVK.cjs');
|
|
11
|
+
var _package = require('./package-Dn7zZkY1.cjs');
|
|
12
12
|
var index = require('./index-D9Hidq-g.cjs');
|
|
13
13
|
var defaultPermissionMode = require('./defaultPermissionMode-BCWCMONI.cjs');
|
|
14
14
|
var forkBackfill = require('./forkBackfill-8eLDeS73.cjs');
|
|
15
|
-
var configuration = require('./configuration-
|
|
15
|
+
var configuration = require('./configuration-CWRKSOyj.cjs');
|
|
16
16
|
var wrapperAccount = require('./wrapperAccount-BubTurHU.cjs');
|
|
17
17
|
var store = require('./store-aa3CVNwS.cjs');
|
|
18
|
-
var controlClient = require('./controlClient-
|
|
19
|
-
var machineMetadata = require('./machineMetadata-
|
|
18
|
+
var controlClient = require('./controlClient-DyNgxNl7.cjs');
|
|
19
|
+
var machineMetadata = require('./machineMetadata-Dzwn-HjN.cjs');
|
|
20
20
|
var projectPath = require('./projectPath-C3ioB4Bu.cjs');
|
|
21
21
|
var path = require('node:path');
|
|
22
22
|
var permissionMode = require('./permissionMode-CrV-XuMs.cjs');
|
|
23
23
|
var authRelay = require('./authRelay-Dy1qU9td.cjs');
|
|
24
24
|
var promises = require('node:fs/promises');
|
|
25
|
-
var attachmentContent = require('./attachmentContent-
|
|
25
|
+
var attachmentContent = require('./attachmentContent-Cehh7ClR.cjs');
|
|
26
26
|
var transcriptCursor = require('./transcriptCursor-DcXGLeSc.cjs');
|
|
27
27
|
var startupPlan = require('./startupPlan-BLMbfQIH.cjs');
|
|
28
28
|
var reconnectEnv = require('./reconnectEnv-B31lY4nR.cjs');
|
|
29
29
|
require('./cliUpdate-DsKXPFYp.cjs');
|
|
30
30
|
require('node:fs');
|
|
31
|
-
require('./
|
|
31
|
+
require('./processTermination-f17wxlMb.cjs');
|
|
32
32
|
require('node:child_process');
|
|
33
|
+
require('./processTreeSnapshot-D5iNblp6.cjs');
|
|
33
34
|
require('zod');
|
|
34
35
|
require('axios');
|
|
35
|
-
require('./
|
|
36
|
+
require('./pushNotifications-DRDWUnP-.cjs');
|
|
37
|
+
require('./contentLogMetadata-ZSFk_NjQ.cjs');
|
|
38
|
+
require('./lidState-VZ1j_QYw.cjs');
|
|
36
39
|
require('os');
|
|
37
40
|
require('child_process');
|
|
38
41
|
require('node:events');
|
|
39
42
|
require('socket.io-client');
|
|
40
|
-
require('./pushNotifications-qCS7_tDF.cjs');
|
|
41
|
-
require('./contentLogMetadata-ZSFk_NjQ.cjs');
|
|
42
43
|
require('./limits-C-a7gr04.cjs');
|
|
43
|
-
require('./time-
|
|
44
|
-
require('./registerCommonHandlers-
|
|
44
|
+
require('./time-BqPZjTpo.cjs');
|
|
45
|
+
require('./registerCommonHandlers-CEV9KUsq.cjs');
|
|
45
46
|
require('util');
|
|
46
47
|
require('fs/promises');
|
|
47
48
|
require('crypto');
|
|
48
49
|
require('path');
|
|
49
50
|
require('cross-spawn');
|
|
50
51
|
require('@paralleldrive/cuid2');
|
|
51
|
-
require('./sync-
|
|
52
|
+
require('./sync-DfI78smj.cjs');
|
|
52
53
|
require('./backgroundTaskActivity-CBvUdj39.cjs');
|
|
53
54
|
require('chalk');
|
|
54
55
|
require('node:util');
|
|
55
56
|
require('./claudeAccountEnv-_O3x5AJ1.cjs');
|
|
56
57
|
require('./detectCLI-BuYR_Qxe.cjs');
|
|
57
58
|
require('fs');
|
|
58
|
-
require('./localHappyAgentAuth-
|
|
59
|
+
require('./localHappyAgentAuth-oxhpgJOb.cjs');
|
|
59
60
|
require('tweetnacl');
|
|
60
61
|
require('./fsMkdir-0K3yENml.cjs');
|
|
61
62
|
require('url');
|
|
@@ -66,7 +67,7 @@ const CLAUDE_EFFORTS = ["low", "medium", "high", "xhigh", "max"];
|
|
|
66
67
|
function restoredClaudeEffort(effort) {
|
|
67
68
|
return CLAUDE_EFFORTS.includes(effort ?? "") ? effort : void 0;
|
|
68
69
|
}
|
|
69
|
-
const importRunClaudeDeps = () => Promise.resolve().then(function () { return require('./runClaudeDeps-
|
|
70
|
+
const importRunClaudeDeps = () => Promise.resolve().then(function () { return require('./runClaudeDeps-W0nv2vHL.cjs'); });
|
|
70
71
|
async function runClaude(credentials, options = {}) {
|
|
71
72
|
logger.logger.debug(`[CLAUDE] ===== CLAUDE MODE STARTING =====`);
|
|
72
73
|
logger.logger.debug(`[CLAUDE] This is the Claude agent, NOT Gemini`);
|
|
@@ -82,7 +83,7 @@ async function runClaude(credentials, options = {}) {
|
|
|
82
83
|
const isAssistantVariant = process.env.HAPPY_SESSION_VARIANT === "assistant";
|
|
83
84
|
if (isAssistantVariant) {
|
|
84
85
|
try {
|
|
85
|
-
const { bootstrapAssistantHome } = await Promise.resolve().then(function () { return require('./bootstrap-
|
|
86
|
+
const { bootstrapAssistantHome } = await Promise.resolve().then(function () { return require('./bootstrap-PeTZ2sAn.cjs'); });
|
|
86
87
|
await bootstrapAssistantHome();
|
|
87
88
|
} catch (error) {
|
|
88
89
|
logger.logger.debug("[START] Assistant home bootstrap failed:", error);
|
|
@@ -208,7 +209,7 @@ async function runClaude(credentials, options = {}) {
|
|
|
208
209
|
}
|
|
209
210
|
if (!response) {
|
|
210
211
|
let offlineSessionId = null;
|
|
211
|
-
const { claudeLocal } = await Promise.resolve().then(function () { return require('./claudeLocal-
|
|
212
|
+
const { claudeLocal } = await Promise.resolve().then(function () { return require('./claudeLocal-BDWy2pFt.cjs'); });
|
|
212
213
|
const { createSessionScanner: createSessionScanner2 } = await loadDeps();
|
|
213
214
|
const reconnection = api.startOfflineReconnection({
|
|
214
215
|
serverUrl: configuration.configuration.serverUrl,
|
|
@@ -842,7 +843,7 @@ async function runClaude(credentials, options = {}) {
|
|
|
842
843
|
const exitGate = new SessionExitGate();
|
|
843
844
|
let hibernationProbe = null;
|
|
844
845
|
const cleanup = async (opts = { archive: true }) => {
|
|
845
|
-
const intent = opts.hibernation ? "hibernate" : exitGate.claim(exitIntentFromArchiveFlag(opts.archive));
|
|
846
|
+
const intent = opts.hibernation ? "hibernate" : exitGate.claim(opts.superseded ? "superseded" : exitIntentFromArchiveFlag(opts.archive));
|
|
846
847
|
if (intent === null) {
|
|
847
848
|
logger.logger.debug(`[START] Termination (archive=${opts.archive ?? true}) ignored: cleanup already running as ${exitGate.current}`);
|
|
848
849
|
return;
|
|
@@ -866,7 +867,7 @@ async function runClaude(credentials, options = {}) {
|
|
|
866
867
|
deactivateSession: (id) => api$1.deactivateSession(id),
|
|
867
868
|
log: (message, ...args) => logger.logger.debug(message, ...args)
|
|
868
869
|
});
|
|
869
|
-
await session.flush();
|
|
870
|
+
if (intent !== "superseded") await session.flush();
|
|
870
871
|
await session.close();
|
|
871
872
|
}
|
|
872
873
|
happyServer.stop();
|
|
@@ -906,6 +907,9 @@ async function runClaude(credentials, options = {}) {
|
|
|
906
907
|
void cleanup({ archive: true });
|
|
907
908
|
});
|
|
908
909
|
registerKillSessionHandler(session.rpcHandlerManager, () => cleanup({ archive: true }), session);
|
|
910
|
+
session.on("superseded", () => {
|
|
911
|
+
void cleanup({ superseded: true });
|
|
912
|
+
});
|
|
909
913
|
let keepAwakeLatch = false;
|
|
910
914
|
const hibernationSnapshot = () => {
|
|
911
915
|
const agentState = session.getAgentState();
|
|
@@ -944,7 +948,7 @@ async function runClaude(credentials, options = {}) {
|
|
|
944
948
|
// commit window runs now instead of being lost.
|
|
945
949
|
releaseExit: () => {
|
|
946
950
|
const deferred = exitGate.release("hibernate");
|
|
947
|
-
if (deferred) void cleanup({ archive: deferred === "archive" });
|
|
951
|
+
if (deferred) void cleanup(deferred === "superseded" ? { superseded: true } : { archive: deferred === "archive" });
|
|
948
952
|
},
|
|
949
953
|
recheck: () => persistence.evaluateWrapperIdle(hibernationSnapshot(), idleMs, Date.now()),
|
|
950
954
|
idleMs,
|
|
@@ -1,59 +1,60 @@
|
|
|
1
1
|
import os from 'node:os';
|
|
2
|
-
import { A as AUTO_RESTART_CAPABILITY, c as claimSessionOrExit, a as applyServerSnapshot, b as applyReconnectReplay, w as withoutServerSnapshot, m as mergeReconnectMetadata, t as takeAutoRestartedEvent, e as exitCursorStamp } from './sessionLock-
|
|
3
|
-
import { r as readSettings, H as HIBERNATION_CAPABILITY, a as resolveCheckMs, l as latchKeepAwake, e as evaluateWrapperIdle } from './persistence-
|
|
4
|
-
import { c as createSessionForStartup, H as HibernationProbe, a as commitHibernation } from './startupSessionCreate-
|
|
2
|
+
import { A as AUTO_RESTART_CAPABILITY, c as claimSessionOrExit, a as applyServerSnapshot, b as applyReconnectReplay, w as withoutServerSnapshot, m as mergeReconnectMetadata, t as takeAutoRestartedEvent, e as exitCursorStamp } from './sessionLock-BfvR9BGB.mjs';
|
|
3
|
+
import { r as readSettings, H as HIBERNATION_CAPABILITY, a as resolveCheckMs, l as latchKeepAwake, e as evaluateWrapperIdle } from './persistence-CagHeZ-f.mjs';
|
|
4
|
+
import { c as createSessionForStartup, H as HibernationProbe, a as commitHibernation } from './startupSessionCreate-B7jrCZUD.mjs';
|
|
5
5
|
import { randomUUID } from 'node:crypto';
|
|
6
|
-
import { c as connectionState, A as ApiClient, s as startOfflineReconnection } from './api-
|
|
7
|
-
import { l as logger } from './logger-
|
|
8
|
-
import { s as spawnOriginTags, a as sessionWorktreeMetadata } from './createSessionMetadata-
|
|
9
|
-
import { p as packageJson } from './package-
|
|
10
|
-
import { P as PROMPT_QUEUE_CAPABILITY, a as PROJECT_SESSION_CAPABILITY, R as RUN_INTENT_CAPABILITY, C as CLAUDE_CONFIG_MODEL_CAPABILITY, A as AGENT_PROFILE_SESSION_CAPABILITY, r as restoredEffort, b as restoredModel } from './index-
|
|
11
|
-
import { D as DEFAULT_CLAUDE_PERMISSION_MODE, r as registerRunIntentRpc, a as recordRunIntents, w as withoutEffort } from './defaultPermissionMode-
|
|
6
|
+
import { c as connectionState, A as ApiClient, s as startOfflineReconnection } from './api-CiNezCys.mjs';
|
|
7
|
+
import { l as logger } from './logger-D1hb3CG8.mjs';
|
|
8
|
+
import { s as spawnOriginTags, a as sessionWorktreeMetadata } from './createSessionMetadata-CZuEDo2v.mjs';
|
|
9
|
+
import { p as packageJson } from './package-CpmoMPuj.mjs';
|
|
10
|
+
import { P as PROMPT_QUEUE_CAPABILITY, a as PROJECT_SESSION_CAPABILITY, R as RUN_INTENT_CAPABILITY, C as CLAUDE_CONFIG_MODEL_CAPABILITY, A as AGENT_PROFILE_SESSION_CAPABILITY, r as restoredEffort, b as restoredModel } from './index-C27JFCbe.mjs';
|
|
11
|
+
import { D as DEFAULT_CLAUDE_PERMISSION_MODE, r as registerRunIntentRpc, a as recordRunIntents, w as withoutEffort } from './defaultPermissionMode-CpEJ0wlb.mjs';
|
|
12
12
|
import { F as FORK_BACKFILL_CAPABILITY, p as publishForkBackfillWhenCommitted } from './forkBackfill-DYIjlN1Z.mjs';
|
|
13
|
-
import { c as configuration } from './configuration-
|
|
14
|
-
import { l as loadWrapperAccount } from './wrapperAccount-
|
|
15
|
-
import { S as SPAWN_ACCOUNT_ENV } from './store-
|
|
16
|
-
import { n as notifyDaemonSessionStarted, c as checkDaemonHibernation } from './controlClient-
|
|
17
|
-
import { g as getInitialMachineMetadata } from './machineMetadata-
|
|
13
|
+
import { c as configuration } from './configuration-C8r6uD9k.mjs';
|
|
14
|
+
import { l as loadWrapperAccount } from './wrapperAccount-RPtq8BwD.mjs';
|
|
15
|
+
import { S as SPAWN_ACCOUNT_ENV } from './store-BlPvTr_Q.mjs';
|
|
16
|
+
import { n as notifyDaemonSessionStarted, c as checkDaemonHibernation } from './controlClient-DYQ1g2ar.mjs';
|
|
17
|
+
import { g as getInitialMachineMetadata } from './machineMetadata-Dxng45Uh.mjs';
|
|
18
18
|
import { p as projectPath } from './projectPath-BTBIMB57.mjs';
|
|
19
19
|
import { resolve, join } from 'node:path';
|
|
20
20
|
import { a as applySandboxPermissionPolicy, r as resolveInitialClaudePermissionMode, m as mapToClaudeMode, b as reconcilePublishedPermissionMode } from './permissionMode-CH4FoZfU.mjs';
|
|
21
21
|
import { d as decodeBase64, e as encodeBase64 } from './authRelay-DhQhkBvX.mjs';
|
|
22
22
|
import { readFile } from 'node:fs/promises';
|
|
23
|
-
import { C as CLAUDE_ATTACHMENT_KINDS, s as stripAttachmentManifest } from './attachmentContent-
|
|
23
|
+
import { C as CLAUDE_ATTACHMENT_KINDS, s as stripAttachmentManifest } from './attachmentContent-CiY3MvdO.mjs';
|
|
24
24
|
import { T as TranscriptPathHints } from './transcriptCursor-B7T_gkQ0.mjs';
|
|
25
25
|
import { p as planClaudeStartup } from './startupPlan-DFMyNgAs.mjs';
|
|
26
26
|
import { t as takeReconnectEnv } from './reconnectEnv-DeSvHl3q.mjs';
|
|
27
27
|
import './cliUpdate-Y34VGe9Y.mjs';
|
|
28
28
|
import 'node:fs';
|
|
29
|
-
import './
|
|
29
|
+
import './processTermination-ChJG5SLW.mjs';
|
|
30
30
|
import 'node:child_process';
|
|
31
|
+
import './processTreeSnapshot-fuwxC0fr.mjs';
|
|
31
32
|
import 'zod';
|
|
32
33
|
import 'axios';
|
|
33
|
-
import './
|
|
34
|
+
import './pushNotifications-4sNESDMv.mjs';
|
|
35
|
+
import './contentLogMetadata-BlWI0egu.mjs';
|
|
36
|
+
import './lidState-BflRFw38.mjs';
|
|
34
37
|
import 'os';
|
|
35
38
|
import 'child_process';
|
|
36
39
|
import 'node:events';
|
|
37
40
|
import 'socket.io-client';
|
|
38
|
-
import './pushNotifications-67GmbVfE.mjs';
|
|
39
|
-
import './contentLogMetadata-BlWI0egu.mjs';
|
|
40
41
|
import './limits-DIo7rEBR.mjs';
|
|
41
|
-
import './time-
|
|
42
|
-
import './registerCommonHandlers-
|
|
42
|
+
import './time-CgAwVt5R.mjs';
|
|
43
|
+
import './registerCommonHandlers-PTJ8TBj9.mjs';
|
|
43
44
|
import 'util';
|
|
44
45
|
import 'fs/promises';
|
|
45
46
|
import 'crypto';
|
|
46
47
|
import 'path';
|
|
47
48
|
import 'cross-spawn';
|
|
48
49
|
import '@paralleldrive/cuid2';
|
|
49
|
-
import './sync-
|
|
50
|
+
import './sync-DtzoF9sw.mjs';
|
|
50
51
|
import './backgroundTaskActivity-8PdPxrvy.mjs';
|
|
51
52
|
import 'chalk';
|
|
52
53
|
import 'node:util';
|
|
53
|
-
import './claudeAccountEnv-
|
|
54
|
+
import './claudeAccountEnv-CPO6CGNd.mjs';
|
|
54
55
|
import './detectCLI-CSGMlV51.mjs';
|
|
55
56
|
import 'fs';
|
|
56
|
-
import './localHappyAgentAuth-
|
|
57
|
+
import './localHappyAgentAuth-BAK_nqMG.mjs';
|
|
57
58
|
import 'tweetnacl';
|
|
58
59
|
import './fsMkdir-DumgLTzR.mjs';
|
|
59
60
|
import 'url';
|
|
@@ -64,7 +65,7 @@ const CLAUDE_EFFORTS = ["low", "medium", "high", "xhigh", "max"];
|
|
|
64
65
|
function restoredClaudeEffort(effort) {
|
|
65
66
|
return CLAUDE_EFFORTS.includes(effort ?? "") ? effort : void 0;
|
|
66
67
|
}
|
|
67
|
-
const importRunClaudeDeps = () => import('./runClaudeDeps-
|
|
68
|
+
const importRunClaudeDeps = () => import('./runClaudeDeps-BmdwskeI.mjs');
|
|
68
69
|
async function runClaude(credentials, options = {}) {
|
|
69
70
|
logger.debug(`[CLAUDE] ===== CLAUDE MODE STARTING =====`);
|
|
70
71
|
logger.debug(`[CLAUDE] This is the Claude agent, NOT Gemini`);
|
|
@@ -80,7 +81,7 @@ async function runClaude(credentials, options = {}) {
|
|
|
80
81
|
const isAssistantVariant = process.env.HAPPY_SESSION_VARIANT === "assistant";
|
|
81
82
|
if (isAssistantVariant) {
|
|
82
83
|
try {
|
|
83
|
-
const { bootstrapAssistantHome } = await import('./bootstrap-
|
|
84
|
+
const { bootstrapAssistantHome } = await import('./bootstrap-C2XSEyOe.mjs');
|
|
84
85
|
await bootstrapAssistantHome();
|
|
85
86
|
} catch (error) {
|
|
86
87
|
logger.debug("[START] Assistant home bootstrap failed:", error);
|
|
@@ -206,7 +207,7 @@ async function runClaude(credentials, options = {}) {
|
|
|
206
207
|
}
|
|
207
208
|
if (!response) {
|
|
208
209
|
let offlineSessionId = null;
|
|
209
|
-
const { claudeLocal } = await import('./claudeLocal-
|
|
210
|
+
const { claudeLocal } = await import('./claudeLocal-CRG-Q7kS.mjs');
|
|
210
211
|
const { createSessionScanner: createSessionScanner2 } = await loadDeps();
|
|
211
212
|
const reconnection = startOfflineReconnection({
|
|
212
213
|
serverUrl: configuration.serverUrl,
|
|
@@ -840,7 +841,7 @@ async function runClaude(credentials, options = {}) {
|
|
|
840
841
|
const exitGate = new SessionExitGate();
|
|
841
842
|
let hibernationProbe = null;
|
|
842
843
|
const cleanup = async (opts = { archive: true }) => {
|
|
843
|
-
const intent = opts.hibernation ? "hibernate" : exitGate.claim(exitIntentFromArchiveFlag(opts.archive));
|
|
844
|
+
const intent = opts.hibernation ? "hibernate" : exitGate.claim(opts.superseded ? "superseded" : exitIntentFromArchiveFlag(opts.archive));
|
|
844
845
|
if (intent === null) {
|
|
845
846
|
logger.debug(`[START] Termination (archive=${opts.archive ?? true}) ignored: cleanup already running as ${exitGate.current}`);
|
|
846
847
|
return;
|
|
@@ -864,7 +865,7 @@ async function runClaude(credentials, options = {}) {
|
|
|
864
865
|
deactivateSession: (id) => api.deactivateSession(id),
|
|
865
866
|
log: (message, ...args) => logger.debug(message, ...args)
|
|
866
867
|
});
|
|
867
|
-
await session.flush();
|
|
868
|
+
if (intent !== "superseded") await session.flush();
|
|
868
869
|
await session.close();
|
|
869
870
|
}
|
|
870
871
|
happyServer.stop();
|
|
@@ -904,6 +905,9 @@ async function runClaude(credentials, options = {}) {
|
|
|
904
905
|
void cleanup({ archive: true });
|
|
905
906
|
});
|
|
906
907
|
registerKillSessionHandler(session.rpcHandlerManager, () => cleanup({ archive: true }), session);
|
|
908
|
+
session.on("superseded", () => {
|
|
909
|
+
void cleanup({ superseded: true });
|
|
910
|
+
});
|
|
907
911
|
let keepAwakeLatch = false;
|
|
908
912
|
const hibernationSnapshot = () => {
|
|
909
913
|
const agentState = session.getAgentState();
|
|
@@ -942,7 +946,7 @@ async function runClaude(credentials, options = {}) {
|
|
|
942
946
|
// commit window runs now instead of being lost.
|
|
943
947
|
releaseExit: () => {
|
|
944
948
|
const deferred = exitGate.release("hibernate");
|
|
945
|
-
if (deferred) void cleanup({ archive: deferred === "archive" });
|
|
949
|
+
if (deferred) void cleanup(deferred === "superseded" ? { superseded: true } : { archive: deferred === "archive" });
|
|
946
950
|
},
|
|
947
951
|
recheck: () => evaluateWrapperIdle(hibernationSnapshot(), idleMs, Date.now()),
|
|
948
952
|
idleMs,
|