very-happy-cli 0.2.194 → 0.2.195
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-BTIF87yb.mjs} +3 -3
- package/dist/{AcpBackend-DJzsue14.cjs → AcpBackend-CXSV6FF5.cjs} +3 -3
- package/dist/{AcpSessionManager-Bc3iafB1.cjs → AcpSessionManager-BbWODxSp.cjs} +2 -2
- package/dist/{AcpSessionManager-SteuoqMY.mjs → AcpSessionManager-CEpU_GVk.mjs} +2 -2
- package/dist/{BasePermissionHandler-D2pNcAXn.mjs → BasePermissionHandler-B5ka7Aaf.mjs} +1 -1
- package/dist/{BasePermissionHandler-DKzNFVCh.cjs → BasePermissionHandler-C6iF28Ct.cjs} +1 -1
- package/dist/{account-ByVjlvFj.cjs → account-Bvcdk9CH.cjs} +11 -11
- package/dist/{account-DC2YyU24.mjs → account-WSJcdMGl.mjs} +11 -11
- package/dist/{accountService-Cd7bnkfd.mjs → accountService-BtEgv0fC.mjs} +4 -4
- package/dist/{accountService-CuUSJDhP.cjs → accountService-DL6xhVUa.cjs} +4 -4
- package/dist/{acpSessionResume-DHHgbNnk.cjs → acpSessionResume-B2hd1Wub.cjs} +1 -1
- package/dist/{acpSessionResume-B6VClxKQ.mjs → acpSessionResume-BYMm4w8Q.mjs} +1 -1
- package/dist/{agentHome-Bov1aHYS.cjs → agentHome-CVM15_3U.cjs} +4 -4
- package/dist/{agentHome-9caXwo7k.mjs → agentHome-Jl8yWAjF.mjs} +4 -4
- package/dist/{api-aE60mNjs.mjs → api-DOzNOoVJ.mjs} +10 -10
- package/dist/{api-wYwQCJml.cjs → api-TpjZJXV-.cjs} +10 -10
- package/dist/{apiMachine-DwaqfM9Q.cjs → apiMachine-COkvJAmd.cjs} +18 -18
- package/dist/{apiMachine-CvNB38Xg.mjs → apiMachine-M-Fs9g5Y.mjs} +18 -18
- package/dist/{attachmentContent-DB8ZsxGE.cjs → attachmentContent-BiBOjTXX.cjs} +2 -2
- package/dist/{attachmentContent-C2ymY_-w.mjs → attachmentContent-D6PjMVDq.mjs} +2 -2
- package/dist/{auth-Bce0Zk3q.cjs → auth-BOceB8cL.cjs} +8 -8
- package/dist/{auth-BYtmGgE1.mjs → auth-BfHLe1gU.mjs} +8 -8
- package/dist/{auth-CWO6cQ4G.mjs → auth-Bfe3Ue_B.mjs} +5 -5
- package/dist/{auth-boIcb7iq.cjs → auth-DfcdjMUp.cjs} +5 -5
- package/dist/{auto-B-kopWQx.mjs → auto-CDeivd5V.mjs} +17 -17
- package/dist/{auto-AaggdihK.cjs → auto-CnTitokD.cjs} +17 -17
- package/dist/{bootstrap-CiWwfHB2.mjs → bootstrap-BxcKrgR9.mjs} +2 -2
- package/dist/{bootstrap-kywZ0tvD.cjs → bootstrap-DpyP22Wx.cjs} +2 -2
- package/dist/{browser-CFfZM3yg.mjs → browser-Bb0Gqffc.mjs} +1 -1
- package/dist/{browser-Do2MFdq6.cjs → browser-ac0aPrVE.cjs} +1 -1
- package/dist/{claudeAccountEnv-BL1pR_37.mjs → claudeAccountEnv-NyoxjLuJ.mjs} +1 -1
- package/dist/{claudeAccountEnv-CEX_EMZr.cjs → claudeAccountEnv-_O3x5AJ1.cjs} +1 -1
- package/dist/{claudeLocal-DLd8ogcH.cjs → claudeLocal-RGWhplSr.cjs} +5 -5
- package/dist/{claudeLocal-B47NjZfB.mjs → claudeLocal-otwxWF6e.mjs} +5 -5
- package/dist/{claudeLocalLauncher-5DDuHpCD.mjs → claudeLocalLauncher-CTibA4cU.mjs} +10 -10
- package/dist/{claudeLocalLauncher-D_UTQ4o_.cjs → claudeLocalLauncher-yG-MBhY7.cjs} +10 -10
- package/dist/{claudeSessionFork-4g6-Sk3Q.cjs → claudeSessionFork-DH_Su4uO.cjs} +1 -1
- package/dist/{claudeSessionFork-BrJTncNL.mjs → claudeSessionFork-HFFwivGY.mjs} +1 -1
- package/dist/{client-DS5JEsHs.mjs → client-BhAjEv8Z.mjs} +4 -4
- package/dist/{client-BIg2LPVx.cjs → client-BlV73Gbw.cjs} +2 -2
- package/dist/{client-Cbxr9VUE.mjs → client-CydHzidF.mjs} +2 -2
- package/dist/{client-CsfPUxLy.cjs → client-DcXLNaF2.cjs} +2 -2
- package/dist/{client-OjYRPhZs.mjs → client-DpTk1S7C.mjs} +2 -2
- package/dist/{client-BfDga3xi.cjs → client-DxjYsJ8d.cjs} +4 -4
- package/dist/codex/happyMcpStdioBridge.cjs +16 -16
- package/dist/codex/happyMcpStdioBridge.mjs +16 -16
- package/dist/{codexAccount-NOX5pmQf.mjs → codexAccount-CKXpXq0B.mjs} +1 -1
- package/dist/{codexAccount-BDQjRbtI.cjs → codexAccount-CYhQir50.cjs} +1 -1
- package/dist/{codexAppServerClient-Bj5vN7sb.cjs → codexAppServerClient-C1xBSuVk.cjs} +60 -3
- package/dist/{codexAppServerClient-HKAm8f_D.mjs → codexAppServerClient-mln0W8vT.mjs} +60 -3
- package/dist/{codexCommand-655pR6CR.mjs → codexCommand-CmWhYduF.mjs} +136 -47
- package/dist/{codexCommand-DtbDjHZp.cjs → codexCommand-Plm-_aRy.cjs} +137 -48
- package/dist/{codexTermination-CX_FHKT5.cjs → codexTermination-C9c80lIF.cjs} +1 -1
- package/dist/{codexTermination-DxLR-bb5.mjs → codexTermination-QltAvFpq.mjs} +1 -1
- package/dist/{config-Cv-A-Bw0.cjs → config-BH75enfT.cjs} +3 -3
- package/dist/{config-CIvXVGlP.mjs → config-DK27kWTT.mjs} +3 -3
- package/dist/{configuration-2Pbg3a0H.cjs → configuration-CKaq0tNe.cjs} +1 -1
- package/dist/{configuration-rTcdHkhE.mjs → configuration-CwfgJZKs.mjs} +1 -1
- package/dist/{connect-BAYNAE8A.cjs → connect-_QkCFMxO.cjs} +13 -13
- package/dist/{connect-B9Bl68PF.mjs → connect-h3_VMJst.mjs} +13 -13
- package/dist/{context-CLTyu_tQ.cjs → context-DbENnaVc.cjs} +1 -1
- package/dist/{context-C7QarZMk.mjs → context-DcOpvIiR.mjs} +1 -1
- package/dist/{controlClient-CIqHL07h.cjs → controlClient-D_HIbnnS.cjs} +3 -3
- package/dist/{controlClient-BIdGnYBo.mjs → controlClient-Dv6IvvUq.mjs} +4 -4
- package/dist/{createSessionMetadata-BHjzRzPc.cjs → createSessionMetadata-CusO22Am.cjs} +2 -2
- package/dist/{createSessionMetadata-PrN-dT7K.mjs → createSessionMetadata-DimBsfVG.mjs} +2 -2
- package/dist/{daemonAccounts-CpGDY_4k.cjs → daemonAccounts-CxMJw7x2.cjs} +2 -2
- package/dist/{daemonAccounts-DwPwKxvv.mjs → daemonAccounts-QT-RDDEp.mjs} +3 -3
- package/dist/{defaultPermissionMode-DF5AfeBb.mjs → defaultPermissionMode-B-Vt8ECY.mjs} +1 -1
- package/dist/{defaultPermissionMode-BakXiqRr.cjs → defaultPermissionMode-BCWCMONI.cjs} +1 -1
- package/dist/{deterministicJson-ZBFn1jtS.cjs → deterministicJson-BYqRKTmL.cjs} +13 -13
- package/dist/{deterministicJson-DFwJ57jR.mjs → deterministicJson-CMApF2Rl.mjs} +13 -13
- package/dist/{doctor-CFYpAXvt.mjs → doctor-BkyoZ0Uw.mjs} +7 -7
- package/dist/{doctor-yyM-zii7.cjs → doctor-Czbl7gk2.cjs} +7 -7
- package/dist/{downloadTarget-DlmqPQp9.cjs → downloadTarget-C5BzZ_bz.cjs} +6 -6
- package/dist/{downloadTarget-CVPBZMnY.mjs → downloadTarget-CM0BZNSY.mjs} +6 -6
- package/dist/{ensureDaemonRunning-D2ny0yon.cjs → ensureDaemonRunning-D508DmcP.cjs} +5 -5
- package/dist/{ensureDaemonRunning-B6Y-CMWe.mjs → ensureDaemonRunning-P399ot_C.mjs} +5 -5
- package/dist/{handleResumeCommand-DlrDcV5B.mjs → handleResumeCommand-BK_2ShBf.mjs} +5 -5
- package/dist/{handleResumeCommand-D-mGugcu.cjs → handleResumeCommand-CCgK7-0v.cjs} +5 -5
- package/dist/{index-Bi3dVJ0S.mjs → index-BENDk1i9.mjs} +4 -4
- package/dist/{index-5c33fqLQ.cjs → index-BalJgriQ.cjs} +4 -4
- package/dist/{index-D1YnIih6.mjs → index-BlWyEpMw.mjs} +2 -1
- package/dist/{index-2Fcq3AGX.cjs → index-Bz9Bj7l1.cjs} +3 -3
- package/dist/{index-CPkSLWP_.cjs → index-CGKn-GTK.cjs} +4 -4
- package/dist/{index-BWvmUCQF.cjs → index-CSO1-mZ9.cjs} +42 -42
- package/dist/{index-BUFrKZeQ.cjs → index-D9Hidq-g.cjs} +2 -0
- package/dist/{index-DEN6vfEY.mjs → index-DR3NJLVk.mjs} +4 -4
- package/dist/{index-BJsenPFp.mjs → index-QSAckvNv.mjs} +3 -3
- package/dist/{index-DuDD9khO.mjs → index-_DRVKtSd.mjs} +43 -43
- package/dist/index.cjs +2 -2
- package/dist/index.mjs +2 -2
- package/dist/{install-BOA4nEbm.cjs → install-CqXaN7_C.cjs} +3 -3
- package/dist/{install-BVYL-wSO.mjs → install-DMTvEPrB.mjs} +3 -3
- package/dist/lib.cjs +12 -12
- package/dist/lib.mjs +12 -12
- package/dist/{lidState-DYeb7Wud.cjs → lidState-Btv4N_B8.cjs} +1 -1
- package/dist/{lidState-zy20u7T3.mjs → lidState-Cb3TbhPb.mjs} +1 -1
- package/dist/{localHappyAgentAuth-CScN2McN.cjs → localHappyAgentAuth-B3Q5DNLR.cjs} +1 -1
- package/dist/{localHappyAgentAuth-CBsX08VJ.mjs → localHappyAgentAuth-CAAIUJyY.mjs} +1 -1
- package/dist/{logger-CepF8C5Z.cjs → logger-BZ5TcbEh.cjs} +2 -2
- package/dist/{logger-SGCwRIV5.mjs → logger-UgDpJA2u.mjs} +2 -2
- package/dist/{machineMetadata-ClJfd7ay.mjs → machineMetadata-BYHC-3Vx.mjs} +3 -3
- package/dist/{machineMetadata-ObK4hjF0.cjs → machineMetadata-DLb-m4fL.cjs} +3 -3
- package/dist/{main-C7ZcZVBY.mjs → main-CwW6lHIw.mjs} +47 -47
- package/dist/{main-mhXOpUV7.cjs → main-LavPb80B.cjs} +47 -47
- package/dist/{mcp-Zz7m0j8A.cjs → mcp-BQbWhqUh.cjs} +18 -18
- package/dist/{mcp-BuCpkYTY.mjs → mcp-BjYz5Ymf.mjs} +18 -18
- package/dist/{mirrorProtocol-B0H9UTBM.mjs → mirrorProtocol-BH5eT99U.mjs} +3 -3
- package/dist/{mirrorProtocol-IhICxf0K.cjs → mirrorProtocol-Ci9YmCEV.cjs} +3 -3
- package/dist/{package-C7WgesIw.cjs → package-B61-BBlh.cjs} +7 -7
- package/dist/{package-Q_ELj5DL.mjs → package-C4OfB2YF.mjs} +7 -7
- package/dist/{panels-yyxpwZnk.cjs → panels-ByprLJag.cjs} +5 -5
- package/dist/{panels-Cm69UXgE.mjs → panels-cBJT5Up1.mjs} +5 -5
- package/dist/{peerTools-BcZAbqBL.cjs → peerTools-BXSjS8lB.cjs} +5 -5
- package/dist/{peerTools-DUg9RduG.mjs → peerTools-DS6GqJcn.mjs} +5 -5
- package/dist/{persistence-mr4Y484W.mjs → persistence-CQhmtobL.mjs} +2 -2
- package/dist/{persistence-D0gNvqXe.cjs → persistence-DBmeYlwT.cjs} +2 -2
- package/dist/{piRunnerArgs-DK_DDkYW.cjs → piRunnerArgs-CmEE058l.cjs} +1 -1
- package/dist/{piRunnerArgs-CGjpl4iF.mjs → piRunnerArgs-Dy-3vN_Q.mjs} +1 -1
- package/dist/{piRuntime-CtZRNOEb.cjs → piRuntime-BCXjC4__.cjs} +1 -1
- package/dist/{piRuntime-HUA19wG8.mjs → piRuntime-Rq9v4M4e.mjs} +1 -1
- package/dist/{piTerminal-Bgy1W9mA.mjs → piTerminal-CRhDUqX7.mjs} +20 -20
- package/dist/{piTerminal-D9OPouek.cjs → piTerminal-ehNQOvLL.cjs} +20 -20
- package/dist/{pushNotifications-DjEl8G0a.mjs → pushNotifications-67GmbVfE.mjs} +3 -3
- package/dist/{pushNotifications-CH0XVPQe.cjs → pushNotifications-qCS7_tDF.cjs} +3 -3
- package/dist/{query-Df3WhSA0.cjs → query-B4QIiI7e.cjs} +1 -1
- package/dist/{query-DmIo5OXf.mjs → query-CIDBGnv6.mjs} +1 -1
- package/dist/{rateLimitWindows-a2yE3kCv.mjs → rateLimitWindows-8-khalzj.mjs} +1 -1
- package/dist/{rateLimitWindows-B9PERFm1.cjs → rateLimitWindows-BIfLMxOk.cjs} +1 -1
- package/dist/{registerCommonHandlers-CND00Dpj.mjs → registerCommonHandlers-C7hlztAO.mjs} +2 -2
- package/dist/{registerCommonHandlers-D4uXC0he.cjs → registerCommonHandlers-G2p0MJu4.cjs} +2 -2
- package/dist/{registerKillSessionHandler-DQKsD9CW.cjs → registerKillSessionHandler-BWvl6wro.cjs} +6 -6
- package/dist/{registerKillSessionHandler-CwyHwm_n.mjs → registerKillSessionHandler-rwXdO0t0.mjs} +6 -6
- package/dist/registerSideQuestionHandler-CsyPnjce.cjs +366 -0
- package/dist/registerSideQuestionHandler-Xg46gSVh.mjs +358 -0
- package/dist/{remoteSessionClient-DOWgca08.cjs → remoteSessionClient-D6_7vNKc.cjs} +5 -5
- package/dist/{remoteSessionClient-mIr_9OL_.mjs → remoteSessionClient-DQSnC7ox.mjs} +5 -5
- package/dist/{reportProgressTool-BLw2_Ohi.cjs → reportProgressTool-CIHGKraF.cjs} +3 -3
- package/dist/{reportProgressTool-DTKlUlHv.mjs → reportProgressTool-HjzV5y_2.mjs} +3 -3
- package/dist/{run-bfxXYL5N.mjs → run-M06F1958.mjs} +40 -40
- package/dist/{run-1V6DLzTY.cjs → run-tQ4bFkHu.cjs} +40 -40
- package/dist/{runClaude-DuFgZZwO.cjs → runClaude-Ct0_mShC.cjs} +28 -26
- package/dist/{runClaude-BgvDhl2p.mjs → runClaude-Dm9kQZ-w.mjs} +28 -26
- package/dist/{runClaudeDeps-DeVinBmE.cjs → runClaudeDeps-BT2kWCrQ.cjs} +44 -333
- package/dist/{runClaudeDeps-CX7GtH7O.mjs → runClaudeDeps-DNOzXjc3.mjs} +47 -336
- package/dist/{runGemini-Cd27u-7R.mjs → runGemini-BvN-yeQR.mjs} +33 -33
- package/dist/{runGemini-DiYSk3s1.cjs → runGemini-cua7_iuR.cjs} +33 -33
- package/dist/{runOpenClaw-CWkkfRSo.mjs → runOpenClaw-C9E2XzmX.mjs} +18 -18
- package/dist/{runOpenClaw-DyQnBzpy.cjs → runOpenClaw-NpYFRhKm.cjs} +18 -18
- package/dist/{sandbox-C35zDrkc.mjs → sandbox-C-BXZbt9.mjs} +4 -4
- package/dist/{sandbox-BAXXYewR.cjs → sandbox-hImfD0-T.cjs} +4 -4
- package/dist/{selfCheck-R71q-x7u.cjs → selfCheck-B3ulijQM.cjs} +39 -39
- package/dist/selfCheck-D-e9kVhc.mjs +88 -0
- package/dist/{send-3Wa9th3D.cjs → send-BCVQkTOl.cjs} +8 -8
- package/dist/{send-DiSaR5Bk.mjs → send-Dv2L8IRW.mjs} +8 -8
- package/dist/{server-BxMJxaE6.mjs → server-BBBfuSB-.mjs} +4 -4
- package/dist/{server-BJu2bFBy.cjs → server-DYxyCyYF.cjs} +6 -6
- package/dist/{sessionLock-BJ1ngLgm.cjs → sessionLock-B8fsnpZD.cjs} +3 -3
- package/dist/{sessionLock-dbi4JPhP.mjs → sessionLock-BexUoWhZ.mjs} +3 -3
- package/dist/{sessionOps-BUlpeaUe.cjs → sessionOps-74pSDXoS.cjs} +4 -4
- package/dist/{sessionOps-C9wRmCBg.mjs → sessionOps-BkEgNA2O.mjs} +4 -4
- package/dist/{sessionProvider-DYD6JepE.cjs → sessionProvider-CWgHsZUA.cjs} +10 -10
- package/dist/{sessionProvider-BEHfI5gs.mjs → sessionProvider-DXkhlJE6.mjs} +10 -10
- package/dist/{sessionScanner-BwbjEoSf.cjs → sessionScanner-D56EkcIj.cjs} +3 -3
- package/dist/{sessionScanner-CFITViIZ.mjs → sessionScanner-Dhh1wREW.mjs} +3 -3
- package/dist/{sessions-C-wBd0fN.cjs → sessions-C1zRTjUe.cjs} +10 -10
- package/dist/{sessions-wOcO2X-k.mjs → sessions-dJR6k3JY.mjs} +10 -10
- package/dist/{setupOfflineReconnection-Bd6XsWhA.cjs → setupOfflineReconnection-CMUdHtFT.cjs} +2 -2
- package/dist/{setupOfflineReconnection-BrljmbqX.mjs → setupOfflineReconnection-Dp1rC-eP.mjs} +2 -2
- package/dist/{spawn-BPioepNz.mjs → spawn-D3-Weoiq.mjs} +14 -14
- package/dist/{spawn-Crprnq9Z.cjs → spawn-kMKI09Kh.cjs} +14 -14
- package/dist/{spawnAgents-B9olJ8xn.cjs → spawnAgents-Cm23BW-D.cjs} +1 -1
- package/dist/{spawnAgents-I29H9nO8.mjs → spawnAgents-hKFGQaSJ.mjs} +1 -1
- package/dist/{spawnHappyCLI-BA1bTIiO.mjs → spawnHappyCLI-CgjpjSTT.mjs} +1 -1
- package/dist/{spawnHappyCLI-C0XAWy8V.cjs → spawnHappyCLI-Du1IgJGA.cjs} +1 -1
- package/dist/{startFileWatcher-Ca5izs24.cjs → startFileWatcher-DGOnF95-.cjs} +1 -1
- package/dist/{startFileWatcher-COCEjNT8.mjs → startFileWatcher-DapvIGxp.mjs} +1 -1
- package/dist/{startupSessionCreate-BnEPBxsJ.mjs → startupSessionCreate-CSi60oo_.mjs} +3 -3
- package/dist/{startupSessionCreate-Cmg1gkKS.cjs → startupSessionCreate-rkIMVGJW.cjs} +3 -3
- package/dist/{store-Vej_738f.mjs → store-Tf-r1ouq.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-C9lzMo0V.mjs} +1 -1
- package/dist/{sync-BfrnSdL1.cjs → sync-Cj8Vhltg.cjs} +1 -1
- package/dist/{sync-DVcNkv8e.mjs → sync-GJkf-HGu.mjs} +1 -1
- package/dist/{systemPrompt-BxZebU75.mjs → systemPrompt-BEagRbDZ.mjs} +2 -2
- package/dist/{systemPrompt-Os5ca7pu.cjs → systemPrompt-Cne9i1SE.cjs} +2 -2
- package/dist/{teams-CNB3DE_n.mjs → teams-C_18IMNM.mjs} +7 -7
- package/dist/{teams--pv0QFMA.cjs → teams-ClTg6hQ1.cjs} +7 -7
- package/dist/{template-B9pLEP8v.cjs → template-B1AORlgU.cjs} +1 -1
- package/dist/{template-CL9EvQLQ.mjs → template-Ci-cyigF.mjs} +1 -1
- package/dist/{time-Da5GIiCa.cjs → time-BPPTQ_sE.cjs} +1 -1
- package/dist/{time-0Ru4clBD.mjs → time-CIkdLyza.mjs} +1 -1
- package/dist/{titleGenerator-9xIXHA5K.cjs → titleGenerator-B_OgL9Pd.cjs} +3 -3
- package/dist/{titleGenerator-CaCzpYyA.mjs → titleGenerator-DnwTdTB_.mjs} +2 -2
- package/dist/{todo-DUY_J3l_.cjs → todo-DPQHtZVM.cjs} +6 -6
- package/dist/{todo-CZXHl2Lg.mjs → todo-DmHolFRy.mjs} +6 -6
- package/dist/{tools-hPD2Hvei.cjs → tools-B3KGMSU5.cjs} +1 -1
- package/dist/{tools-DqA2Jt2R.mjs → tools-DqjPHq9I.mjs} +1 -1
- package/dist/{uninstall-CjMzELYw.mjs → uninstall-Cm97eybp.mjs} +3 -3
- package/dist/{uninstall-rTvdpRLt.cjs → uninstall-CrK5dgx8.cjs} +3 -3
- package/dist/{wrapperAccount-D2A4DuZy.cjs → wrapperAccount-BubTurHU.cjs} +2 -2
- package/dist/{wrapperAccount-BkufO_9g.mjs → wrapperAccount-Cq7eZRMx.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
|
@@ -0,0 +1,358 @@
|
|
|
1
|
+
import { l as logger } from './logger-UgDpJA2u.mjs';
|
|
2
|
+
import { k as reportRateLimitsToDaemon } from './controlClient-Dv6IvvUq.mjs';
|
|
3
|
+
import { f as fromCodexRateLimits, a as fromClaudeRateLimitInfo, r as rateLimitReportSignature, R as RATE_LIMIT_OBSERVED_REFRESH_MS } from './rateLimitWindows-8-khalzj.mjs';
|
|
4
|
+
import { randomUUID } from 'node:crypto';
|
|
5
|
+
import { mkdirSync, writeFileSync } from 'node:fs';
|
|
6
|
+
import { join } from 'node:path';
|
|
7
|
+
|
|
8
|
+
function createRateLimitReporter(send, now = Date.now) {
|
|
9
|
+
const last = /* @__PURE__ */ new Map();
|
|
10
|
+
const forward = (report) => {
|
|
11
|
+
if (!report) return;
|
|
12
|
+
const signature = rateLimitReportSignature(report);
|
|
13
|
+
const prior = last.get(report.provider);
|
|
14
|
+
if (prior && prior.signature === signature && report.observedAt - prior.at < RATE_LIMIT_OBSERVED_REFRESH_MS) return;
|
|
15
|
+
last.set(report.provider, { signature, at: report.observedAt });
|
|
16
|
+
try {
|
|
17
|
+
send(report);
|
|
18
|
+
} catch (error) {
|
|
19
|
+
logger.debug("[rate-limits] forward failed:", error);
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
return {
|
|
23
|
+
observeClaude(rateLimitInfo) {
|
|
24
|
+
try {
|
|
25
|
+
forward(fromClaudeRateLimitInfo(rateLimitInfo, now()));
|
|
26
|
+
} catch (error) {
|
|
27
|
+
logger.debug("[rate-limits] claude frame ignored:", error);
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
observeCodex(snapshot) {
|
|
31
|
+
try {
|
|
32
|
+
forward(fromCodexRateLimits(snapshot, now()));
|
|
33
|
+
} catch (error) {
|
|
34
|
+
logger.debug("[rate-limits] codex snapshot ignored:", error);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
let processReporter = null;
|
|
40
|
+
function wrapperRateLimitReporter() {
|
|
41
|
+
processReporter ??= createRateLimitReporter(reportRateLimitsToDaemon);
|
|
42
|
+
return processReporter;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
function isUnsupportedSideQuestionError(error) {
|
|
46
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
47
|
+
return /unknown|unsupported|not supported|unrecognized|invalid.*subtype/i.test(message);
|
|
48
|
+
}
|
|
49
|
+
async function runSideQuestionLive(ask, input) {
|
|
50
|
+
const history = (input.history ?? []).filter((h) => h.question.trim() && h.answer.trim()).slice(-12).map((h) => ({ question: clip(h.question.trim(), MAX_HISTORY_CHARS), response: clip(h.answer.trim(), MAX_HISTORY_CHARS) }));
|
|
51
|
+
const result = await ask({ question: input.question.trim(), ...history.length ? { history } : {} }, input.signal);
|
|
52
|
+
if (input.signal?.aborted) throw new Error("Side question cancelled");
|
|
53
|
+
const text = typeof result?.response === "string" ? result.response : "";
|
|
54
|
+
if (!text.trim()) throw new Error("Side question ended without a result");
|
|
55
|
+
const fallback = result.refusal_fallback?.content;
|
|
56
|
+
const answer = fallback ? `\u26A0 ${fallback}
|
|
57
|
+
|
|
58
|
+
${text}` : text;
|
|
59
|
+
input.onText?.(answer);
|
|
60
|
+
return { answer, hadContext: true, mode: "live" };
|
|
61
|
+
}
|
|
62
|
+
const SIDE_QUESTION_SYSTEM_PROMPT = [
|
|
63
|
+
"A user message wrapped in a side-question system-reminder is a SIDE QUESTION: answer it",
|
|
64
|
+
"directly in one response from the conversation context, with no tools and no action on the main task.",
|
|
65
|
+
// B-861: a fork taken mid-turn shows the running step without its result;
|
|
66
|
+
// models read that as "interrupted" / "aborted" (Claude and Codex probes,
|
|
67
|
+
// vh-team-B-861/edge-perm-*.log). It is still running or awaiting approval.
|
|
68
|
+
"In your copy of the conversation the latest step may have no result yet: the main agent is still running it,",
|
|
69
|
+
"or it is waiting for the user to approve it. Describe it that way, never as interrupted, aborted or stopped."
|
|
70
|
+
].join(" ");
|
|
71
|
+
const SIDE_QUESTION_REMINDER = [
|
|
72
|
+
"<system-reminder>This is a side question from the user. You must answer this question directly in a single response.",
|
|
73
|
+
"",
|
|
74
|
+
"IMPORTANT CONTEXT:",
|
|
75
|
+
"- You are a separate, lightweight agent spawned to answer this one question",
|
|
76
|
+
"- The main agent is NOT interrupted - it continues working independently in the background",
|
|
77
|
+
"- You share the conversation context but are a completely separate instance",
|
|
78
|
+
'- Do NOT reference being interrupted or what you were "previously doing" - that framing is incorrect',
|
|
79
|
+
"",
|
|
80
|
+
"CRITICAL CONSTRAINTS:",
|
|
81
|
+
"- You have NO tools available - you cannot read files, run commands, search, or take any actions",
|
|
82
|
+
"- This is a one-off response - there will be no follow-up turns",
|
|
83
|
+
"- You can ONLY provide information based on what you already know from the conversation context",
|
|
84
|
+
`- NEVER say things like "Let me try...", "I'll now...", "Let me check...", or promise to take any action`,
|
|
85
|
+
"- If you don't know the answer, say so - do not offer to look it up or investigate",
|
|
86
|
+
"",
|
|
87
|
+
"Simply answer the question with the information you have.</system-reminder>"
|
|
88
|
+
].join("\n");
|
|
89
|
+
const MAX_HISTORY_CHARS = 2e3;
|
|
90
|
+
function clip(text, max) {
|
|
91
|
+
return text.length > max ? `${text.slice(0, max)}\u2026` : text;
|
|
92
|
+
}
|
|
93
|
+
function buildSideQuestionPrompt(question, history = [], mainStatus) {
|
|
94
|
+
const trimmed = question.trim();
|
|
95
|
+
const prior = history.filter((h) => h.question.trim() && h.answer.trim()).slice(-12);
|
|
96
|
+
const status = mainStatus ? `<main-session-status>${mainStatus}</main-session-status>
|
|
97
|
+
|
|
98
|
+
` : "";
|
|
99
|
+
const body = `${status}${SIDE_QUESTION_REMINDER}
|
|
100
|
+
|
|
101
|
+
${trimmed}`;
|
|
102
|
+
if (prior.length === 0) return body;
|
|
103
|
+
const lines = prior.map((h) => `Q: ${clip(h.question.trim(), MAX_HISTORY_CHARS)}
|
|
104
|
+
A: ${clip(h.answer.trim(), MAX_HISTORY_CHARS)}`);
|
|
105
|
+
return `<earlier-side-questions>
|
|
106
|
+
${lines.join("\n\n")}
|
|
107
|
+
</earlier-side-questions>
|
|
108
|
+
|
|
109
|
+
${body}`;
|
|
110
|
+
}
|
|
111
|
+
function describePendingApprovals(requests) {
|
|
112
|
+
const pending = Object.values(requests ?? {});
|
|
113
|
+
if (pending.length === 0) return null;
|
|
114
|
+
const items = pending.slice(0, 3).map((request) => {
|
|
115
|
+
const tool = typeof request.tool === "string" ? request.tool : "a tool";
|
|
116
|
+
const args = request.arguments;
|
|
117
|
+
const command = Array.isArray(args?.command) ? args.command.join(" ") : typeof args?.command === "string" ? args.command : "";
|
|
118
|
+
return command ? `${tool} (${clip(command, 160)})` : tool;
|
|
119
|
+
});
|
|
120
|
+
return `The main agent is waiting for the user to approve: ${items.join("; ")}. It has not run yet and was not aborted.`;
|
|
121
|
+
}
|
|
122
|
+
function sideQuestionQueryOptions(input) {
|
|
123
|
+
return {
|
|
124
|
+
cwd: input.cwd,
|
|
125
|
+
...input.resumeSessionId ? { resume: input.resumeSessionId, forkSession: true } : {},
|
|
126
|
+
persistSession: false,
|
|
127
|
+
tools: [],
|
|
128
|
+
mcpServers: {},
|
|
129
|
+
strictMcpConfig: true,
|
|
130
|
+
maxTurns: 1,
|
|
131
|
+
includePartialMessages: true,
|
|
132
|
+
permissionMode: "default",
|
|
133
|
+
model: input.model,
|
|
134
|
+
env: input.env,
|
|
135
|
+
settingsPath: input.settingsPath,
|
|
136
|
+
appendSystemPrompt: SIDE_QUESTION_SYSTEM_PROMPT,
|
|
137
|
+
canCallTool: async () => ({ behavior: "deny", message: "Side questions cannot use tools" }),
|
|
138
|
+
abort: input.signal
|
|
139
|
+
};
|
|
140
|
+
}
|
|
141
|
+
function assistantBlocks(message) {
|
|
142
|
+
if (message.type !== "assistant") return [];
|
|
143
|
+
const content = message.message?.content;
|
|
144
|
+
return Array.isArray(content) ? content.filter((b) => Boolean(b) && typeof b === "object") : [];
|
|
145
|
+
}
|
|
146
|
+
function textFromAssistant(message) {
|
|
147
|
+
return assistantBlocks(message).map((block) => block.type === "text" ? String(block.text ?? "") : "").join("");
|
|
148
|
+
}
|
|
149
|
+
function toolUseFromAssistant(message) {
|
|
150
|
+
const block = assistantBlocks(message).find((b) => b.type === "tool_use");
|
|
151
|
+
return block ? String(block.name ?? "a tool") : null;
|
|
152
|
+
}
|
|
153
|
+
function toolAttemptNotice(toolName) {
|
|
154
|
+
return `(The model tried to call ${toolName} instead of answering directly. Try rephrasing or ask in the main conversation.)`;
|
|
155
|
+
}
|
|
156
|
+
function apiErrorFromSystem(message) {
|
|
157
|
+
if (message.type !== "system") return null;
|
|
158
|
+
const m = message;
|
|
159
|
+
if (m.subtype !== "api_error") return null;
|
|
160
|
+
if (typeof m.error === "string") return m.error;
|
|
161
|
+
const detail = m.error?.formatted ?? m.error?.message;
|
|
162
|
+
return typeof detail === "string" && detail ? detail : "API error";
|
|
163
|
+
}
|
|
164
|
+
async function runSideQuestion(query, input) {
|
|
165
|
+
const options = sideQuestionQueryOptions(input);
|
|
166
|
+
const stream = query({ prompt: buildSideQuestionPrompt(input.question, input.history, input.mainStatus), options });
|
|
167
|
+
let streamed = "";
|
|
168
|
+
let final = "";
|
|
169
|
+
let toolAttempt = null;
|
|
170
|
+
let lastApiError = null;
|
|
171
|
+
let resultSeen = false;
|
|
172
|
+
for await (const message of stream) {
|
|
173
|
+
if (message.type === "stream_event") {
|
|
174
|
+
const event = message.event;
|
|
175
|
+
if (event?.type === "content_block_delta" && event.delta?.type === "text_delta" && event.delta.text) {
|
|
176
|
+
streamed += event.delta.text;
|
|
177
|
+
input.onText?.(streamed);
|
|
178
|
+
}
|
|
179
|
+
continue;
|
|
180
|
+
}
|
|
181
|
+
if (message.type === "assistant") {
|
|
182
|
+
const text = textFromAssistant(message);
|
|
183
|
+
if (text) {
|
|
184
|
+
final = final ? `${final}
|
|
185
|
+
|
|
186
|
+
${text}` : text;
|
|
187
|
+
input.onText?.(final);
|
|
188
|
+
}
|
|
189
|
+
toolAttempt ??= toolUseFromAssistant(message);
|
|
190
|
+
continue;
|
|
191
|
+
}
|
|
192
|
+
if (message.type === "system") {
|
|
193
|
+
lastApiError = apiErrorFromSystem(message) ?? lastApiError;
|
|
194
|
+
continue;
|
|
195
|
+
}
|
|
196
|
+
if (message.type === "result") {
|
|
197
|
+
resultSeen = true;
|
|
198
|
+
const result = message;
|
|
199
|
+
if (result.subtype !== "success") {
|
|
200
|
+
if (toolAttempt && result.subtype === "error_max_turns") break;
|
|
201
|
+
const detail = Array.isArray(result.errors) && result.errors.length > 0 ? String(result.errors[0]) : typeof result.result === "string" && result.result ? result.result : lastApiError ?? result.subtype ?? "unknown";
|
|
202
|
+
throw new Error(`Side question failed: ${detail}`);
|
|
203
|
+
}
|
|
204
|
+
if (!final && typeof result.result === "string") final = result.result;
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
if (input.signal?.aborted) throw new Error("Side question cancelled");
|
|
208
|
+
if (toolAttempt && !final.trim() && !streamed.trim()) {
|
|
209
|
+
const notice = toolAttemptNotice(toolAttempt);
|
|
210
|
+
input.onText?.(notice);
|
|
211
|
+
return { answer: notice, hadContext: Boolean(input.resumeSessionId), mode: "fork" };
|
|
212
|
+
}
|
|
213
|
+
if (!resultSeen && !final && !streamed) throw new Error(`Side question ended without a result${lastApiError ? `: ${lastApiError}` : ""}`);
|
|
214
|
+
return { answer: final || streamed, hadContext: Boolean(input.resumeSessionId), mode: "fork" };
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
const SIDE_QUESTION_RETAIN_MS = 5 * 6e4;
|
|
218
|
+
const SIDE_QUESTION_MAX_CHARS = 8e3;
|
|
219
|
+
const SIDE_QUESTION_MAX_RUN_MS = 10 * 6e4;
|
|
220
|
+
function writeSideQuestionSettingsFile(homeDir, extra = {}) {
|
|
221
|
+
const dir = join(homeDir, "tmp", "hooks");
|
|
222
|
+
mkdirSync(dir, { recursive: true });
|
|
223
|
+
const file = join(dir, `side-question-${process.pid}.json`);
|
|
224
|
+
writeFileSync(file, JSON.stringify({ ...extra, disableAllHooks: true }));
|
|
225
|
+
return file;
|
|
226
|
+
}
|
|
227
|
+
function parseHistory(raw) {
|
|
228
|
+
if (!Array.isArray(raw)) return [];
|
|
229
|
+
return raw.flatMap((item) => {
|
|
230
|
+
if (!item || typeof item !== "object") return [];
|
|
231
|
+
const { question, answer } = item;
|
|
232
|
+
return typeof question === "string" && typeof answer === "string" ? [{ question, answer }] : [];
|
|
233
|
+
});
|
|
234
|
+
}
|
|
235
|
+
function registerSideQuestionHandler(rpc, deps) {
|
|
236
|
+
const now = deps.now ?? (() => Date.now());
|
|
237
|
+
const retainMs = deps.retainMs ?? SIDE_QUESTION_RETAIN_MS;
|
|
238
|
+
const maxRunMs = deps.maxRunMs ?? SIDE_QUESTION_MAX_RUN_MS;
|
|
239
|
+
const fork = deps.run ?? (async (input) => {
|
|
240
|
+
const { query } = await import('./index-DR3NJLVk.mjs');
|
|
241
|
+
return runSideQuestion(query, input);
|
|
242
|
+
});
|
|
243
|
+
const run = async (input, live) => {
|
|
244
|
+
if (!live) return fork(input);
|
|
245
|
+
try {
|
|
246
|
+
return await runSideQuestionLive(live.ask, input);
|
|
247
|
+
} catch (error) {
|
|
248
|
+
if (input.signal?.aborted || !isUnsupportedSideQuestionError(error)) throw error;
|
|
249
|
+
logger.debug(`[btw] live side question unsupported by this CLI, forking instead: ${error instanceof Error ? error.message : String(error)}`);
|
|
250
|
+
return fork(input);
|
|
251
|
+
}
|
|
252
|
+
};
|
|
253
|
+
const slots = /* @__PURE__ */ new Map();
|
|
254
|
+
let active = null;
|
|
255
|
+
const prune = () => {
|
|
256
|
+
const t = now();
|
|
257
|
+
for (const [id, slot] of slots) {
|
|
258
|
+
if (slot.status !== "running" && slot.finishedAt !== void 0 && t - slot.finishedAt > retainMs) slots.delete(id);
|
|
259
|
+
}
|
|
260
|
+
};
|
|
261
|
+
const finish = (slot, status, error) => {
|
|
262
|
+
if (slot.status !== "running") return;
|
|
263
|
+
slot.status = status;
|
|
264
|
+
slot.error = error;
|
|
265
|
+
slot.finishedAt = now();
|
|
266
|
+
if (active === slot) active = null;
|
|
267
|
+
};
|
|
268
|
+
rpc.registerHandler("btw-ask", async (request) => {
|
|
269
|
+
const question = typeof request?.question === "string" ? request.question.trim() : "";
|
|
270
|
+
if (!question) throw new Error("Side question is empty");
|
|
271
|
+
if (question.length > SIDE_QUESTION_MAX_CHARS) throw new Error("Side question is too long");
|
|
272
|
+
prune();
|
|
273
|
+
if (active) {
|
|
274
|
+
const stale = active;
|
|
275
|
+
stale.abort.abort("superseded");
|
|
276
|
+
finish(stale, "cancelled");
|
|
277
|
+
logger.debug(`[btw] side question ${stale.requestId} superseded by a new ask`);
|
|
278
|
+
}
|
|
279
|
+
const candidate = deps.getLiveQuery?.() ?? null;
|
|
280
|
+
const live = candidate && candidate.canControl() ? candidate : null;
|
|
281
|
+
const resumeSessionId = deps.getClaudeSessionId() ?? null;
|
|
282
|
+
const slot = {
|
|
283
|
+
requestId: randomUUID(),
|
|
284
|
+
status: "running",
|
|
285
|
+
text: "",
|
|
286
|
+
startedAt: now(),
|
|
287
|
+
hadContext: live ? true : Boolean(resumeSessionId),
|
|
288
|
+
abort: new AbortController()
|
|
289
|
+
};
|
|
290
|
+
slots.set(slot.requestId, slot);
|
|
291
|
+
active = slot;
|
|
292
|
+
logger.debug(`[btw] side question ${slot.requestId} start (${live ? "live" : resumeSessionId ? "fork" : "no-context"})`);
|
|
293
|
+
const deadline = setTimeout(() => {
|
|
294
|
+
if (slot.status !== "running") return;
|
|
295
|
+
slot.abort.abort("timeout");
|
|
296
|
+
finish(slot, "error", "Side question timed out");
|
|
297
|
+
logger.debug(`[btw] side question ${slot.requestId} timed out after ${maxRunMs}ms`);
|
|
298
|
+
}, maxRunMs);
|
|
299
|
+
deadline.unref?.();
|
|
300
|
+
void run({
|
|
301
|
+
question,
|
|
302
|
+
history: parseHistory(request.history),
|
|
303
|
+
mainStatus: deps.getMainStatus?.() ?? null,
|
|
304
|
+
resumeSessionId,
|
|
305
|
+
cwd: deps.cwd,
|
|
306
|
+
model: deps.getModel(),
|
|
307
|
+
env: deps.getEnv?.(),
|
|
308
|
+
settingsPath: deps.settingsPath,
|
|
309
|
+
signal: slot.abort.signal,
|
|
310
|
+
onText: (text) => {
|
|
311
|
+
if (slot.status === "running") slot.text = text;
|
|
312
|
+
}
|
|
313
|
+
}, live).then((result) => {
|
|
314
|
+
slot.text = result.answer;
|
|
315
|
+
slot.hadContext = result.hadContext;
|
|
316
|
+
finish(slot, "done");
|
|
317
|
+
logger.debug(`[btw] side question ${slot.requestId} done (${result.mode ?? "fork"}, ${result.answer.length} chars)`);
|
|
318
|
+
}).catch((error) => {
|
|
319
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
320
|
+
if (slot.abort.signal.aborted) {
|
|
321
|
+
finish(slot, "cancelled");
|
|
322
|
+
} else {
|
|
323
|
+
finish(slot, "error", message);
|
|
324
|
+
logger.debug(`[btw] side question ${slot.requestId} failed: ${message}`);
|
|
325
|
+
}
|
|
326
|
+
}).finally(() => clearTimeout(deadline));
|
|
327
|
+
return { requestId: slot.requestId, hadContext: slot.hadContext, mode: live ? "live" : "fork" };
|
|
328
|
+
});
|
|
329
|
+
rpc.registerHandler("btw-poll", async (request) => {
|
|
330
|
+
prune();
|
|
331
|
+
const id = typeof request?.requestId === "string" ? request.requestId : "";
|
|
332
|
+
const slot = slots.get(id);
|
|
333
|
+
if (!slot) throw new Error("Unknown side question");
|
|
334
|
+
return {
|
|
335
|
+
requestId: slot.requestId,
|
|
336
|
+
status: slot.status,
|
|
337
|
+
text: slot.text,
|
|
338
|
+
error: slot.error,
|
|
339
|
+
startedAt: slot.startedAt,
|
|
340
|
+
finishedAt: slot.finishedAt,
|
|
341
|
+
hadContext: slot.hadContext
|
|
342
|
+
};
|
|
343
|
+
});
|
|
344
|
+
rpc.registerHandler("btw-cancel", async (request) => {
|
|
345
|
+
const id = typeof request?.requestId === "string" ? request.requestId : "";
|
|
346
|
+
const slot = slots.get(id);
|
|
347
|
+
if (!slot || slot.status !== "running") return { cancelled: false };
|
|
348
|
+
slot.abort.abort("cancelled by user");
|
|
349
|
+
finish(slot, "cancelled");
|
|
350
|
+
return { cancelled: true };
|
|
351
|
+
});
|
|
352
|
+
return {
|
|
353
|
+
/** Test/introspection hook. */
|
|
354
|
+
_slots: slots
|
|
355
|
+
};
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
export { SIDE_QUESTION_SYSTEM_PROMPT as S, writeSideQuestionSettingsFile as a, buildSideQuestionPrompt as b, describePendingApprovals as d, registerSideQuestionHandler as r, toolAttemptNotice as t, wrapperRateLimitReporter as w };
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var controlClient = require('./controlClient-
|
|
4
|
-
var sessionOps = require('./sessionOps-
|
|
5
|
-
var time = require('./time-
|
|
3
|
+
var controlClient = require('./controlClient-D_HIbnnS.cjs');
|
|
4
|
+
var sessionOps = require('./sessionOps-74pSDXoS.cjs');
|
|
5
|
+
var time = require('./time-BPPTQ_sE.cjs');
|
|
6
6
|
var axios = require('axios');
|
|
7
7
|
var os = require('node:os');
|
|
8
|
-
var configuration = require('./configuration-
|
|
9
|
-
var persistence = require('./persistence-
|
|
8
|
+
var configuration = require('./configuration-CKaq0tNe.cjs');
|
|
9
|
+
var persistence = require('./persistence-DBmeYlwT.cjs');
|
|
10
10
|
var node_crypto = require('node:crypto');
|
|
11
11
|
|
|
12
12
|
const ACTIVE_FRESH_WINDOW_MS = 15 * 60 * 1e3;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { d as archiveSession, u as unarchiveSession, k as sessionLiveness, e as sendUserMessage, m as readSessionState, o as openUserScopedSocket } from './sessionOps-
|
|
3
|
-
import { d as delay } from './time-
|
|
1
|
+
import { j as resumeDaemonSession, l as listDaemonSessions } from './controlClient-Dv6IvvUq.mjs';
|
|
2
|
+
import { d as archiveSession, u as unarchiveSession, k as sessionLiveness, e as sendUserMessage, m as readSessionState, o as openUserScopedSocket } from './sessionOps-BkEgNA2O.mjs';
|
|
3
|
+
import { d as delay } from './time-CIkdLyza.mjs';
|
|
4
4
|
import axios from 'axios';
|
|
5
5
|
import { hostname } from 'node:os';
|
|
6
|
-
import { c as configuration } from './configuration-
|
|
7
|
-
import { r as readSettings, b as readCredentialsForConfiguredRelay } from './persistence-
|
|
6
|
+
import { c as configuration } from './configuration-CwfgJZKs.mjs';
|
|
7
|
+
import { r as readSettings, b as readCredentialsForConfiguredRelay } from './persistence-CQhmtobL.mjs';
|
|
8
8
|
import { randomUUID } from 'node:crypto';
|
|
9
9
|
|
|
10
10
|
const ACTIVE_FRESH_WINDOW_MS = 15 * 60 * 1e3;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var z = require('zod');
|
|
4
|
-
var index = require('./index-
|
|
5
|
-
var client = require('./client-
|
|
4
|
+
var index = require('./index-D9Hidq-g.cjs');
|
|
5
|
+
var client = require('./client-BlV73Gbw.cjs');
|
|
6
6
|
var precheckCompat = require('./precheckCompat-CWOi5c9L.cjs');
|
|
7
|
-
var client$1 = require('./client-
|
|
7
|
+
var client$1 = require('./client-DcXLNaF2.cjs');
|
|
8
8
|
var prompt = require('./prompt-Bof2aQkI.cjs');
|
|
9
9
|
var agentGuidance = require('./agentGuidance-BtBx2xxE.cjs');
|
|
10
10
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { x as AutomationNameSchema, h as AUTOMATION_ATTENTION_REASON_MAX_CHARS, j as AUTOMATION_SUMMARY_MAX_CHARS, e as AutomationPrecheckSchema, y as AutomationConcurrencySchema, z as AutomationActionSchema, D as AutomationTriggerSchema } from './index-
|
|
3
|
-
import { a as authenticatedAutomationsClient, b as automationRunIdFromEnv } from './client-
|
|
2
|
+
import { x as AutomationNameSchema, h as AUTOMATION_ATTENTION_REASON_MAX_CHARS, j as AUTOMATION_SUMMARY_MAX_CHARS, e as AutomationPrecheckSchema, y as AutomationConcurrencySchema, z as AutomationActionSchema, D as AutomationTriggerSchema } from './index-BlWyEpMw.mjs';
|
|
3
|
+
import { a as authenticatedAutomationsClient, b as automationRunIdFromEnv } from './client-DpTk1S7C.mjs';
|
|
4
4
|
import { u as updateAutomationChecked, c as createAutomationChecked } from './precheckCompat-DeEbilbr.mjs';
|
|
5
|
-
import { P as ProjectsUnsupportedError, a as ProjectRequestError, s as sharedProjectsClient } from './client-
|
|
5
|
+
import { P as ProjectsUnsupportedError, a as ProjectRequestError, s as sharedProjectsClient } from './client-CydHzidF.mjs';
|
|
6
6
|
import { f as formatContextForTool } from './prompt-QHuFx9j6.mjs';
|
|
7
7
|
import { R as REPORT_PROGRESS_TOOL_NAME, d as REPORT_PROGRESS_TOOL_TITLE, e as REPORT_PROGRESS_TOOL_DESCRIPTION } from './agentGuidance-BDYt2Qy2.mjs';
|
|
8
8
|
|
|
@@ -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-BH5eT99U.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-Dy-3vN_Q.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-CwfgJZKs.mjs';
|
|
11
|
+
import { T as TurnActivityTracker, A as ApiClient } from './api-DOzNOoVJ.mjs';
|
|
12
|
+
import { S as SPAWN_AGENTS, i as isSpawnAgent, s as sanitizeSpawnPermissionMode, r as resolveSpawnPermissionMode, a as resolveFirstMessageMeta, j as joinProject } from './spawnAgents-hKFGQaSJ.mjs';
|
|
13
|
+
import { l as logger } from './logger-UgDpJA2u.mjs';
|
|
14
|
+
import { p as pruneStaleCompileCaches } from './index-QSAckvNv.mjs';
|
|
15
|
+
import { a as authAndSetupMachineIfNeeded } from './auth-Bfe3Ue_B.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 { E as AgentProfilesStateSchema,
|
|
17
|
+
import { p as packageJson } from './package-C4OfB2YF.mjs';
|
|
18
|
+
import { a as globalPrefixForPackage, N as NPM_SAFE_ARG, g as getEnvironmentInfo } from './doctor-BkyoZ0Uw.mjs';
|
|
19
|
+
import { s as spawnHappyCLI } from './spawnHappyCLI-CgjpjSTT.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-CQhmtobL.mjs';
|
|
21
|
+
import { i as isDaemonRunningCurrentlyInstalledHappyVersion, s as stopDaemon, w as cleanupDaemonState } from './controlClient-Dv6IvvUq.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-BkEgNA2O.mjs';
|
|
23
|
+
import { E 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-BlWyEpMw.mjs';
|
|
24
24
|
import fastify from 'fastify';
|
|
25
25
|
import { z } from 'zod';
|
|
26
26
|
import { validatorCompiler, serializerCompiler } from 'fastify-type-provider-zod';
|
|
@@ -28,68 +28,68 @@ 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-8-khalzj.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-DS6GqJcn.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-DQSnC7ox.mjs';
|
|
35
|
+
import { assistantHome, bootstrapAssistantHome } from './bootstrap-BxcKrgR9.mjs';
|
|
36
|
+
import { refreshAgentHomes, locateClaudeConversation, agentHomeSpawnEnv } from './index-BENDk1i9.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-BYHC-3Vx.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-CKXpXq0B.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-BK_2ShBf.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 terminateProcess, n as terminateProcessTree, o as AUTO_RESTARTED_ENV, q as encodeAutoRestarted, u as pendingUpgradeVersion, v as resolveQuietMs, x as AUTO_RESTART_RECHECK_CAP_MS } from './sessionLock-
|
|
54
|
-
import { c as createAutomationsClient, i as isAutomationsUnavailable, d as AutomationsRequestError } from './client-
|
|
52
|
+
import { P as ProjectsUnsupportedError, c as createProjectsClient } from './client-CydHzidF.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 terminateProcess, n as terminateProcessTree, o as AUTO_RESTARTED_ENV, q as encodeAutoRestarted, u as pendingUpgradeVersion, v as resolveQuietMs, x as AUTO_RESTART_RECHECK_CAP_MS } from './sessionLock-BexUoWhZ.mjs';
|
|
54
|
+
import { c as createAutomationsClient, i as isAutomationsUnavailable, d as AutomationsRequestError } from './client-DpTk1S7C.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-BtEgv0fC.mjs';
|
|
57
|
+
import { spawnSetupTokenPty, watchAccountFiles } from './daemonAccounts-QT-RDDEp.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-DapvIGxp.mjs';
|
|
61
|
+
import { I as InvalidateSync } from './sync-GJkf-HGu.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
64
|
import { findAllHappyProcesses } from './doctor-BPkYWSuq.mjs';
|
|
65
65
|
import { T as TEAM_SKILL, a as TEAM_LEAD_PLAYBOOK, b as TEAM_MEMBER_RULES } from './resources-CLP_MpK4.mjs';
|
|
66
66
|
import { promisify } from 'node:util';
|
|
67
|
-
import { b as clipText, r as renderAction, c as clipAutomationReport, e as renderTemplate } from './template-
|
|
67
|
+
import { b as clipText, r as renderAction, c as clipAutomationReport, e as renderTemplate } from './template-Ci-cyigF.mjs';
|
|
68
68
|
import { d as describeAgentHome } from './loginShellEnv-Dw8M7tkI.mjs';
|
|
69
|
-
import { S as SPAWN_ACCOUNT_ENV } from './store-
|
|
70
|
-
import './acpSessionResume-
|
|
71
|
-
import './lidState-
|
|
69
|
+
import { S as SPAWN_ACCOUNT_ENV } from './store-Tf-r1ouq.mjs';
|
|
70
|
+
import './acpSessionResume-BYMm4w8Q.mjs';
|
|
71
|
+
import './lidState-Cb3TbhPb.mjs';
|
|
72
72
|
import 'node:events';
|
|
73
73
|
import 'socket.io-client';
|
|
74
|
-
import './pushNotifications-
|
|
74
|
+
import './pushNotifications-67GmbVfE.mjs';
|
|
75
75
|
import './contentLogMetadata-BlWI0egu.mjs';
|
|
76
76
|
import './limits-DIo7rEBR.mjs';
|
|
77
|
-
import './time-
|
|
78
|
-
import './registerCommonHandlers-
|
|
77
|
+
import './time-CIkdLyza.mjs';
|
|
78
|
+
import './registerCommonHandlers-C7hlztAO.mjs';
|
|
79
79
|
import 'util';
|
|
80
80
|
import 'cross-spawn';
|
|
81
81
|
import '@paralleldrive/cuid2';
|
|
82
82
|
import 'chalk';
|
|
83
83
|
import 'node:module';
|
|
84
84
|
import 'tweetnacl';
|
|
85
|
-
import './browser-
|
|
85
|
+
import './browser-Bb0Gqffc.mjs';
|
|
86
86
|
import 'open';
|
|
87
87
|
import './specialCommands-MXUN0wfI.mjs';
|
|
88
88
|
import './ids-DU6sLx4C.mjs';
|
|
89
89
|
import 'url';
|
|
90
|
-
import './localHappyAgentAuth-
|
|
90
|
+
import './localHappyAgentAuth-CAAIUJyY.mjs';
|
|
91
91
|
import './processTreeSnapshot-CuLJDNC-.mjs';
|
|
92
|
-
import './claudeAccountEnv-
|
|
92
|
+
import './claudeAccountEnv-NyoxjLuJ.mjs';
|
|
93
93
|
import 'node:readline';
|
|
94
94
|
import 'node-pty';
|
|
95
95
|
import 'ps-list';
|