very-happy-cli 0.2.194 → 0.2.196
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{AcpBackend-C3Kx0QJb.mjs → AcpBackend-RqGkFeeY.mjs} +3 -3
- package/dist/{AcpBackend-DJzsue14.cjs → AcpBackend-tL_g_UJ5.cjs} +3 -3
- package/dist/{AcpSessionManager-SteuoqMY.mjs → AcpSessionManager-C-R6yHXc.mjs} +2 -2
- package/dist/{AcpSessionManager-Bc3iafB1.cjs → AcpSessionManager-CFB24qBh.cjs} +2 -2
- package/dist/{BasePermissionHandler-DKzNFVCh.cjs → BasePermissionHandler-C0JS37Jt.cjs} +1 -1
- package/dist/{BasePermissionHandler-D2pNcAXn.mjs → BasePermissionHandler-CgHLVNKT.mjs} +1 -1
- package/dist/{account-ByVjlvFj.cjs → account-DOil1Hn8.cjs} +11 -11
- package/dist/{account-DC2YyU24.mjs → account-EzL-zwwE.mjs} +11 -11
- package/dist/{accountService-CuUSJDhP.cjs → accountService-DL6xhVUa.cjs} +4 -4
- package/dist/{accountService-Cd7bnkfd.mjs → accountService-DQ21IlBs.mjs} +4 -4
- package/dist/{acpSessionResume-DHHgbNnk.cjs → acpSessionResume-B01oHWDS.cjs} +1 -1
- package/dist/{acpSessionResume-B6VClxKQ.mjs → acpSessionResume-DEOIZUuj.mjs} +1 -1
- package/dist/{agentHome-Bov1aHYS.cjs → agentHome-BulDO_1K.cjs} +4 -4
- package/dist/{agentHome-9caXwo7k.mjs → agentHome-DucTue1n.mjs} +4 -4
- package/dist/{api-aE60mNjs.mjs → api-CiNezCys.mjs} +46 -13
- package/dist/{api-wYwQCJml.cjs → api-fuwEEEkT.cjs} +46 -13
- package/dist/{apiMachine-DwaqfM9Q.cjs → apiMachine-CxmiSa2-.cjs} +18 -18
- package/dist/{apiMachine-CvNB38Xg.mjs → apiMachine-DCmKjms1.mjs} +18 -18
- package/dist/{attachmentContent-DB8ZsxGE.cjs → attachmentContent-Cehh7ClR.cjs} +2 -2
- package/dist/{attachmentContent-C2ymY_-w.mjs → attachmentContent-CiY3MvdO.mjs} +2 -2
- package/dist/{auth-boIcb7iq.cjs → auth-DHlbjtf7.cjs} +5 -5
- package/dist/{auth-BYtmGgE1.mjs → auth-DHqHrs5d.mjs} +8 -8
- package/dist/{auth-CWO6cQ4G.mjs → auth-DVsH_a8J.mjs} +5 -5
- package/dist/{auth-Bce0Zk3q.cjs → auth-tlMcvk2Y.cjs} +8 -8
- package/dist/{auto-B-kopWQx.mjs → auto-Cnn8luKk.mjs} +17 -17
- package/dist/{auto-AaggdihK.cjs → auto-DNAa8xDZ.cjs} +17 -17
- package/dist/{bootstrap-CiWwfHB2.mjs → bootstrap-C2XSEyOe.mjs} +2 -2
- package/dist/{bootstrap-kywZ0tvD.cjs → bootstrap-PeTZ2sAn.cjs} +2 -2
- package/dist/{browser-Do2MFdq6.cjs → browser-Bm24RiFU.cjs} +1 -1
- package/dist/{browser-CFfZM3yg.mjs → browser-CWWyaf8_.mjs} +1 -1
- package/dist/{claudeAccountEnv-BL1pR_37.mjs → claudeAccountEnv-CPO6CGNd.mjs} +1 -1
- package/dist/{claudeAccountEnv-CEX_EMZr.cjs → claudeAccountEnv-_O3x5AJ1.cjs} +1 -1
- package/dist/{claudeLocal-DLd8ogcH.cjs → claudeLocal-BDWy2pFt.cjs} +5 -5
- package/dist/{claudeLocal-B47NjZfB.mjs → claudeLocal-CRG-Q7kS.mjs} +5 -5
- package/dist/{claudeLocalLauncher-5DDuHpCD.mjs → claudeLocalLauncher-B5cOrszW.mjs} +10 -10
- package/dist/{claudeLocalLauncher-D_UTQ4o_.cjs → claudeLocalLauncher-DmSLoHlw.cjs} +10 -10
- package/dist/{claudeSessionFork-BrJTncNL.mjs → claudeSessionFork-BqV6E0ep.mjs} +1 -1
- package/dist/{claudeSessionFork-4g6-Sk3Q.cjs → claudeSessionFork-OffWLYgd.cjs} +1 -1
- package/dist/{client-DS5JEsHs.mjs → client-B3lOol4f.mjs} +4 -4
- package/dist/{client-BIg2LPVx.cjs → client-B9fcSMXP.cjs} +2 -2
- package/dist/{client-Cbxr9VUE.mjs → client-CfTeXnYS.mjs} +2 -2
- package/dist/{client-OjYRPhZs.mjs → client-Cg_cuQb1.mjs} +2 -2
- package/dist/{client-CsfPUxLy.cjs → client-Ckic3nxZ.cjs} +2 -2
- package/dist/{client-BfDga3xi.cjs → client-YFvImdwH.cjs} +4 -4
- package/dist/codex/happyMcpStdioBridge.cjs +16 -16
- package/dist/codex/happyMcpStdioBridge.mjs +16 -16
- package/dist/{codexAccount-BDQjRbtI.cjs → codexAccount-CYhQir50.cjs} +1 -1
- package/dist/{codexAccount-NOX5pmQf.mjs → codexAccount-iZwmpYti.mjs} +1 -1
- package/dist/{codexAppServerClient-Bj5vN7sb.cjs → codexAppServerClient-C-UwVMUN.cjs} +60 -3
- package/dist/{codexAppServerClient-HKAm8f_D.mjs → codexAppServerClient-aV5m-FpZ.mjs} +60 -3
- package/dist/{codexCommand-DtbDjHZp.cjs → codexCommand-5nWT7F8A.cjs} +145 -51
- package/dist/{codexCommand-655pR6CR.mjs → codexCommand-CI2NTyIF.mjs} +144 -50
- package/dist/{codexTermination-DxLR-bb5.mjs → codexTermination-CLjDP6Ja.mjs} +6 -2
- package/dist/{codexTermination-CX_FHKT5.cjs → codexTermination-D18IHgLP.cjs} +6 -2
- package/dist/{config-Cv-A-Bw0.cjs → config-B7YtrHi0.cjs} +3 -3
- package/dist/{config-CIvXVGlP.mjs → config-BfwjfFSC.mjs} +3 -3
- package/dist/{configuration-rTcdHkhE.mjs → configuration-C8r6uD9k.mjs} +1 -1
- package/dist/{configuration-2Pbg3a0H.cjs → configuration-CWRKSOyj.cjs} +1 -1
- package/dist/{connect-BAYNAE8A.cjs → connect-DALX1hGB.cjs} +15 -15
- package/dist/{connect-B9Bl68PF.mjs → connect-K5HBcM56.mjs} +15 -15
- package/dist/{context-CLTyu_tQ.cjs → context-BqhlGL3u.cjs} +1 -1
- package/dist/{context-C7QarZMk.mjs → context-CtMY-M8T.mjs} +1 -1
- package/dist/{controlClient-BIdGnYBo.mjs → controlClient-DYQ1g2ar.mjs} +20 -8
- package/dist/{controlClient-CIqHL07h.cjs → controlClient-DyNgxNl7.cjs} +19 -7
- package/dist/{createSessionMetadata-BHjzRzPc.cjs → createSessionMetadata-C4WN8pVK.cjs} +2 -2
- package/dist/{createSessionMetadata-PrN-dT7K.mjs → createSessionMetadata-CZuEDo2v.mjs} +2 -2
- package/dist/{daemonAccounts-DwPwKxvv.mjs → daemonAccounts-CnAEaJE_.mjs} +3 -3
- package/dist/{daemonAccounts-CpGDY_4k.cjs → daemonAccounts-CxMJw7x2.cjs} +2 -2
- package/dist/{defaultPermissionMode-BakXiqRr.cjs → defaultPermissionMode-BCWCMONI.cjs} +1 -1
- package/dist/{defaultPermissionMode-DF5AfeBb.mjs → defaultPermissionMode-CpEJ0wlb.mjs} +1 -1
- package/dist/{deterministicJson-DFwJ57jR.mjs → deterministicJson-Dg_0QJAR.mjs} +13 -13
- package/dist/{deterministicJson-ZBFn1jtS.cjs → deterministicJson-r4zhG546.cjs} +13 -13
- package/dist/{doctor-yyM-zii7.cjs → doctor-0gLGzwz6.cjs} +8 -8
- package/dist/{doctor-u46qYYKX.cjs → doctor-CJpFhHoK.cjs} +8 -9
- package/dist/{doctor-CFYpAXvt.mjs → doctor-COeFzPpz.mjs} +8 -8
- package/dist/{doctor-BPkYWSuq.mjs → doctor-GN5mPOn5.mjs} +8 -9
- package/dist/{downloadTarget-DlmqPQp9.cjs → downloadTarget-8ovVpDv1.cjs} +6 -6
- package/dist/{downloadTarget-CVPBZMnY.mjs → downloadTarget-CbuUiS5p.mjs} +6 -6
- package/dist/{ensureDaemonRunning-D2ny0yon.cjs → ensureDaemonRunning-Bq-n6xTt.cjs} +5 -5
- package/dist/{ensureDaemonRunning-B6Y-CMWe.mjs → ensureDaemonRunning-CwlujXmV.mjs} +5 -5
- package/dist/{handleResumeCommand-DlrDcV5B.mjs → handleResumeCommand-B5GgmPm_.mjs} +5 -5
- package/dist/{handleResumeCommand-D-mGugcu.cjs → handleResumeCommand-muSrYA5y.cjs} +5 -5
- package/dist/{index-DuDD9khO.mjs → index-BRH0XYSO.mjs} +53 -46
- package/dist/{index-5c33fqLQ.cjs → index-BUOd8bNd.cjs} +5 -5
- package/dist/{index-Bi3dVJ0S.mjs → index-BZCIkrFj.mjs} +4 -4
- package/dist/{index-D1YnIih6.mjs → index-C27JFCbe.mjs} +2 -1
- package/dist/{index-CPkSLWP_.cjs → index-CQZg9jKx.cjs} +4 -4
- package/dist/{index-2Fcq3AGX.cjs → index-CnY74Dae.cjs} +3 -3
- package/dist/{index-BJsenPFp.mjs → index-D0V-seiN.mjs} +3 -3
- package/dist/{index-BUFrKZeQ.cjs → index-D9Hidq-g.cjs} +2 -0
- package/dist/{index-DEN6vfEY.mjs → index-DKCmDned.mjs} +5 -5
- package/dist/{index-BWvmUCQF.cjs → index-Dt_YE-zw.cjs} +52 -45
- package/dist/index.cjs +2 -2
- package/dist/index.mjs +2 -2
- package/dist/{install-BOA4nEbm.cjs → install-BlW2kkPl.cjs} +3 -3
- package/dist/{install-BVYL-wSO.mjs → install-CooQf1oU.mjs} +3 -3
- package/dist/lib.cjs +16 -16
- package/dist/lib.d.cts +4 -0
- package/dist/lib.d.mts +4 -0
- package/dist/lib.mjs +16 -16
- package/dist/{lidState-zy20u7T3.mjs → lidState-BflRFw38.mjs} +1 -1
- package/dist/{lidState-DYeb7Wud.cjs → lidState-VZ1j_QYw.cjs} +1 -1
- package/dist/{localHappyAgentAuth-CBsX08VJ.mjs → localHappyAgentAuth-BAK_nqMG.mjs} +1 -1
- package/dist/{localHappyAgentAuth-CScN2McN.cjs → localHappyAgentAuth-oxhpgJOb.cjs} +1 -1
- package/dist/{logger-SGCwRIV5.mjs → logger-D1hb3CG8.mjs} +2 -2
- package/dist/{logger-CepF8C5Z.cjs → logger-HQ9yDb8R.cjs} +2 -2
- package/dist/{machineMetadata-ClJfd7ay.mjs → machineMetadata-Dxng45Uh.mjs} +3 -3
- package/dist/{machineMetadata-ObK4hjF0.cjs → machineMetadata-Dzwn-HjN.cjs} +3 -3
- package/dist/{main-C7ZcZVBY.mjs → main-BP0iY2vQ.mjs} +48 -48
- package/dist/{main-mhXOpUV7.cjs → main-D7qre-pa.cjs} +48 -48
- package/dist/{mcp-BuCpkYTY.mjs → mcp-BmDGyj7k.mjs} +18 -18
- package/dist/{mcp-Zz7m0j8A.cjs → mcp-D3yzLkh8.cjs} +18 -18
- package/dist/{mirrorProtocol-B0H9UTBM.mjs → mirrorProtocol-C9Zc6GFT.mjs} +3 -3
- package/dist/{mirrorProtocol-IhICxf0K.cjs → mirrorProtocol-Cv2otcvM.cjs} +3 -3
- package/dist/{package-Q_ELj5DL.mjs → package-CpmoMPuj.mjs} +7 -7
- package/dist/{package-C7WgesIw.cjs → package-Dn7zZkY1.cjs} +7 -7
- package/dist/{panels-Cm69UXgE.mjs → panels-CQobcX5w.mjs} +5 -5
- package/dist/{panels-yyxpwZnk.cjs → panels-D59PlNoD.cjs} +5 -5
- package/dist/{peerTools-DUg9RduG.mjs → peerTools-CNzlwuL7.mjs} +5 -5
- package/dist/{peerTools-BcZAbqBL.cjs → peerTools-D417O7d-.cjs} +5 -5
- package/dist/{persistence-D0gNvqXe.cjs → persistence-BiyvEYaR.cjs} +15 -5
- package/dist/{persistence-mr4Y484W.mjs → persistence-CagHeZ-f.mjs} +15 -5
- package/dist/{piRunnerArgs-CGjpl4iF.mjs → piRunnerArgs-DKU5LoWu.mjs} +1 -1
- package/dist/{piRunnerArgs-DK_DDkYW.cjs → piRunnerArgs-kTaNYd23.cjs} +1 -1
- package/dist/{piRuntime-CtZRNOEb.cjs → piRuntime-BI4KNAUY.cjs} +1 -1
- package/dist/{piRuntime-HUA19wG8.mjs → piRuntime-BV4fQyZD.mjs} +1 -1
- package/dist/{piTerminal-D9OPouek.cjs → piTerminal-WPUtDJAV.cjs} +20 -20
- package/dist/{piTerminal-Bgy1W9mA.mjs → piTerminal-oObkl3WJ.mjs} +20 -20
- package/dist/processTermination-ChJG5SLW.mjs +107 -0
- package/dist/processTermination-f17wxlMb.cjs +110 -0
- package/dist/{processTreeSnapshot-mDbnuojn.cjs → processTreeSnapshot-D5iNblp6.cjs} +26 -0
- package/dist/{processTreeSnapshot-CuLJDNC-.mjs → processTreeSnapshot-fuwxC0fr.mjs} +25 -1
- package/dist/{pushNotifications-DjEl8G0a.mjs → pushNotifications-4sNESDMv.mjs} +11 -4
- package/dist/{pushNotifications-CH0XVPQe.cjs → pushNotifications-DRDWUnP-.cjs} +12 -3
- package/dist/{query-DmIo5OXf.mjs → query-6OWHW1U1.mjs} +2 -2
- package/dist/{query-Df3WhSA0.cjs → query-qIbeJ2-r.cjs} +2 -2
- package/dist/{rateLimitWindows-a2yE3kCv.mjs → rateLimitWindows-4uhuwKnU.mjs} +1 -1
- package/dist/{rateLimitWindows-B9PERFm1.cjs → rateLimitWindows-U4fc1-_6.cjs} +1 -1
- package/dist/{registerCommonHandlers-D4uXC0he.cjs → registerCommonHandlers-CEV9KUsq.cjs} +2 -2
- package/dist/{registerCommonHandlers-CND00Dpj.mjs → registerCommonHandlers-PTJ8TBj9.mjs} +2 -2
- package/dist/{registerKillSessionHandler-DQKsD9CW.cjs → registerKillSessionHandler-C6F1sjoo.cjs} +6 -6
- package/dist/{registerKillSessionHandler-CwyHwm_n.mjs → registerKillSessionHandler-D4SSwQj8.mjs} +6 -6
- package/dist/registerSideQuestionHandler-4mRv0Msq.mjs +358 -0
- package/dist/registerSideQuestionHandler-ByUnjI3V.cjs +366 -0
- package/dist/{remoteSessionClient-DOWgca08.cjs → remoteSessionClient-CUk6haD7.cjs} +5 -5
- package/dist/{remoteSessionClient-mIr_9OL_.mjs → remoteSessionClient-CfYDFlKm.mjs} +5 -5
- package/dist/{reportProgressTool-DTKlUlHv.mjs → reportProgressTool-BCn5oG52.mjs} +3 -3
- package/dist/{reportProgressTool-BLw2_Ohi.cjs → reportProgressTool-C1JOvo6T.cjs} +3 -3
- package/dist/{run-1V6DLzTY.cjs → run-D2SlfZPP.cjs} +54 -74
- package/dist/{run-bfxXYL5N.mjs → run-DC8BIklA.mjs} +52 -72
- package/dist/{runClaude-DuFgZZwO.cjs → runClaude-BE-5GgIZ.cjs} +37 -31
- package/dist/{runClaude-BgvDhl2p.mjs → runClaude-D6fqN9PD.mjs} +37 -31
- package/dist/{runClaudeDeps-CX7GtH7O.mjs → runClaudeDeps-BmdwskeI.mjs} +52 -340
- package/dist/{runClaudeDeps-DeVinBmE.cjs → runClaudeDeps-W0nv2vHL.cjs} +48 -336
- package/dist/{runGemini-Cd27u-7R.mjs → runGemini-C3Ipeu1i.mjs} +37 -34
- package/dist/{runGemini-DiYSk3s1.cjs → runGemini-Da_d-2kV.cjs} +37 -34
- package/dist/{runOpenClaw-CWkkfRSo.mjs → runOpenClaw-BoI6nbKB.mjs} +30 -20
- package/dist/{runOpenClaw-DyQnBzpy.cjs → runOpenClaw-af5qDNU0.cjs} +30 -20
- package/dist/{sandbox-C35zDrkc.mjs → sandbox-CjoyUSGa.mjs} +4 -4
- package/dist/{sandbox-BAXXYewR.cjs → sandbox-UGF68GrE.cjs} +4 -4
- package/dist/selfCheck-CNrOZgBv.mjs +88 -0
- package/dist/{selfCheck-R71q-x7u.cjs → selfCheck-Cr8eAw4m.cjs} +40 -40
- package/dist/{send-3Wa9th3D.cjs → send-CVSht9s_.cjs} +8 -8
- package/dist/{send-DiSaR5Bk.mjs → send-gqX0-i4p.mjs} +8 -8
- package/dist/{server-BJu2bFBy.cjs → server-BPgVv-BG.cjs} +6 -6
- package/dist/{server-BxMJxaE6.mjs → server-DxlNqWJo.mjs} +4 -4
- package/dist/{sessionExitLifecycle-DFltxXU8.cjs → sessionExitLifecycle-DB2rjvVS.cjs} +5 -1
- package/dist/{sessionExitLifecycle-CzkLIgNZ.mjs → sessionExitLifecycle-iAtZN9sa.mjs} +5 -1
- package/dist/{sessionLock-dbi4JPhP.mjs → sessionLock-BfvR9BGB.mjs} +94 -78
- package/dist/{sessionLock-BJ1ngLgm.cjs → sessionLock-D2usWXAg.cjs} +92 -78
- package/dist/{sessionOps-BUlpeaUe.cjs → sessionOps-JRyQhF5s.cjs} +4 -4
- package/dist/{sessionOps-C9wRmCBg.mjs → sessionOps-OmRqUFm4.mjs} +4 -4
- package/dist/{sessionProvider-DYD6JepE.cjs → sessionProvider-BpscgwwC.cjs} +10 -10
- package/dist/{sessionProvider-BEHfI5gs.mjs → sessionProvider-DTEdidBc.mjs} +10 -10
- package/dist/{sessionScanner-CFITViIZ.mjs → sessionScanner-BlAOpqMh.mjs} +3 -3
- package/dist/{sessionScanner-BwbjEoSf.cjs → sessionScanner-C_qVc1ok.cjs} +3 -3
- package/dist/{sessions-C-wBd0fN.cjs → sessions-7iyjxti9.cjs} +10 -10
- package/dist/{sessions-wOcO2X-k.mjs → sessions-CnjHHllR.mjs} +10 -10
- package/dist/{setupOfflineReconnection-Bd6XsWhA.cjs → setupOfflineReconnection-BCbJa5mT.cjs} +2 -2
- package/dist/{setupOfflineReconnection-BrljmbqX.mjs → setupOfflineReconnection-IKEI7fLJ.mjs} +2 -2
- package/dist/{spawn-BPioepNz.mjs → spawn-CbfcClhj.mjs} +14 -14
- package/dist/{spawn-Crprnq9Z.cjs → spawn-CxEl0Dyz.cjs} +14 -14
- package/dist/{spawnAgents-B9olJ8xn.cjs → spawnAgents-Cm23BW-D.cjs} +1 -1
- package/dist/{spawnAgents-I29H9nO8.mjs → spawnAgents-N3jxdNJC.mjs} +1 -1
- package/dist/{spawnHappyCLI-BA1bTIiO.mjs → spawnHappyCLI-C8gMHJu5.mjs} +1 -1
- package/dist/{spawnHappyCLI-C0XAWy8V.cjs → spawnHappyCLI-CHSlXWUe.cjs} +1 -1
- package/dist/{startFileWatcher-COCEjNT8.mjs → startFileWatcher-6hslFu_B.mjs} +1 -1
- package/dist/{startFileWatcher-Ca5izs24.cjs → startFileWatcher-BGpYPz6L.cjs} +1 -1
- package/dist/{startupSessionCreate-BnEPBxsJ.mjs → startupSessionCreate-B7jrCZUD.mjs} +3 -3
- package/dist/{startupSessionCreate-Cmg1gkKS.cjs → startupSessionCreate-CltDtCEF.cjs} +3 -3
- package/dist/{store-Vej_738f.mjs → store-BlPvTr_Q.mjs} +1 -1
- package/dist/{store-CkNa6oj4.cjs → store-aa3CVNwS.cjs} +1 -1
- package/dist/{streamRelay-C0G1HOOd.cjs → streamRelay-C2Lb2z39.cjs} +1 -1
- package/dist/{streamRelay-C5U-C4GS.mjs → streamRelay-DFZyAPD_.mjs} +1 -1
- package/dist/{sync-BfrnSdL1.cjs → sync-DfI78smj.cjs} +1 -1
- package/dist/{sync-DVcNkv8e.mjs → sync-DtzoF9sw.mjs} +1 -1
- package/dist/{systemPrompt-BxZebU75.mjs → systemPrompt-B1Xd99hK.mjs} +2 -2
- package/dist/{systemPrompt-Os5ca7pu.cjs → systemPrompt-HZNR9rjt.cjs} +2 -2
- package/dist/{teams-CNB3DE_n.mjs → teams-Vk75H6BZ.mjs} +7 -7
- package/dist/{teams--pv0QFMA.cjs → teams-fFX-L_ms.cjs} +7 -7
- package/dist/{template-B9pLEP8v.cjs → template-B1AORlgU.cjs} +1 -1
- package/dist/{template-CL9EvQLQ.mjs → template-CJ8uLlD8.mjs} +1 -1
- package/dist/{time-Da5GIiCa.cjs → time-BqPZjTpo.cjs} +1 -1
- package/dist/{time-0Ru4clBD.mjs → time-CgAwVt5R.mjs} +1 -1
- package/dist/{titleGenerator-CaCzpYyA.mjs → titleGenerator-D2UB7Uyr.mjs} +2 -2
- package/dist/{titleGenerator-9xIXHA5K.cjs → titleGenerator-ijVOuv3J.cjs} +3 -3
- package/dist/{todo-CZXHl2Lg.mjs → todo-CCuqtD0O.mjs} +6 -6
- package/dist/{todo-DUY_J3l_.cjs → todo-vCzaIwNp.cjs} +6 -6
- package/dist/{tools-hPD2Hvei.cjs → tools-CL8h3fqh.cjs} +1 -1
- package/dist/{tools-DqA2Jt2R.mjs → tools-DthGQoo3.mjs} +1 -1
- package/dist/{uninstall-rTvdpRLt.cjs → uninstall-CIvThBvI.cjs} +3 -3
- package/dist/{uninstall-CjMzELYw.mjs → uninstall-DCJh4UoO.mjs} +3 -3
- package/dist/{wrapperAccount-D2A4DuZy.cjs → wrapperAccount-BubTurHU.cjs} +2 -2
- package/dist/{wrapperAccount-BkufO_9g.mjs → wrapperAccount-RPtq8BwD.mjs} +2 -2
- package/package.json +7 -7
- package/dist/rateLimitReporter-B_PZClib.mjs +0 -42
- package/dist/rateLimitReporter-M_IKRRS7.cjs +0 -44
- package/dist/selfCheck-DKMF0Dyu.mjs +0 -88
|
@@ -1,78 +1,78 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var logger = require('./logger-
|
|
4
|
-
var controlClient = require('./controlClient-
|
|
3
|
+
var logger = require('./logger-HQ9yDb8R.cjs');
|
|
4
|
+
var controlClient = require('./controlClient-DyNgxNl7.cjs');
|
|
5
5
|
var backgroundTaskActivity = require('./backgroundTaskActivity-CBvUdj39.cjs');
|
|
6
|
-
var deterministicJson = require('./deterministicJson-
|
|
7
|
-
var client = require('./client-
|
|
6
|
+
var deterministicJson = require('./deterministicJson-r4zhG546.cjs');
|
|
7
|
+
var client = require('./client-Ckic3nxZ.cjs');
|
|
8
8
|
var node_crypto = require('node:crypto');
|
|
9
9
|
var specialCommands = require('./specialCommands-J3JFOq0J.cjs');
|
|
10
|
-
var sessionExitLifecycle = require('./sessionExitLifecycle-
|
|
11
|
-
var query = require('./query-
|
|
10
|
+
var sessionExitLifecycle = require('./sessionExitLifecycle-DB2rjvVS.cjs');
|
|
11
|
+
var query = require('./query-qIbeJ2-r.cjs');
|
|
12
12
|
var claudeAgentSdk = require('@anthropic-ai/claude-agent-sdk');
|
|
13
13
|
var permissionMode = require('./permissionMode-CrV-XuMs.cjs');
|
|
14
|
-
var systemPrompt = require('./systemPrompt-
|
|
14
|
+
var systemPrompt = require('./systemPrompt-HZNR9rjt.cjs');
|
|
15
15
|
var path$1 = require('node:path');
|
|
16
16
|
require('axios');
|
|
17
|
+
var pushNotifications = require('./pushNotifications-DRDWUnP-.cjs');
|
|
17
18
|
require('node:events');
|
|
18
19
|
require('socket.io-client');
|
|
19
|
-
var pushNotifications = require('./pushNotifications-CH0XVPQe.cjs');
|
|
20
20
|
require('tweetnacl');
|
|
21
|
-
var configuration = require('./configuration-
|
|
22
|
-
require('./index-
|
|
23
|
-
require('./registerCommonHandlers-
|
|
21
|
+
var configuration = require('./configuration-CWRKSOyj.cjs');
|
|
22
|
+
require('./index-D9Hidq-g.cjs');
|
|
23
|
+
require('./registerCommonHandlers-CEV9KUsq.cjs');
|
|
24
24
|
require('os');
|
|
25
25
|
require('child_process');
|
|
26
26
|
require('@paralleldrive/cuid2');
|
|
27
|
-
require('./persistence-
|
|
27
|
+
require('./persistence-BiyvEYaR.cjs');
|
|
28
28
|
var contentLogMetadata = require('./contentLogMetadata-ZSFk_NjQ.cjs');
|
|
29
29
|
require('chalk');
|
|
30
30
|
var types = require('./types-CRS-srZK.cjs');
|
|
31
31
|
var path = require('./path-B7zW-WwE.cjs');
|
|
32
32
|
var fs = require('fs/promises');
|
|
33
|
-
var time = require('./time-
|
|
33
|
+
var time = require('./time-BqPZjTpo.cjs');
|
|
34
34
|
var node_fs = require('node:fs');
|
|
35
|
-
var sessionScanner = require('./sessionScanner-
|
|
35
|
+
var sessionScanner = require('./sessionScanner-C_qVc1ok.cjs');
|
|
36
36
|
var node_child_process = require('node:child_process');
|
|
37
|
-
var streamRelay = require('./streamRelay-
|
|
38
|
-
var attachmentContent = require('./attachmentContent-
|
|
37
|
+
var streamRelay = require('./streamRelay-C2Lb2z39.cjs');
|
|
38
|
+
var attachmentContent = require('./attachmentContent-Cehh7ClR.cjs');
|
|
39
39
|
var promises = require('node:fs/promises');
|
|
40
|
-
var claudeSessionFork = require('./claudeSessionFork-
|
|
41
|
-
var
|
|
42
|
-
var wrapperAccount = require('./wrapperAccount-
|
|
43
|
-
var registerKillSessionHandler = require('./registerKillSessionHandler-
|
|
44
|
-
var doctor = require('./doctor-
|
|
40
|
+
var claudeSessionFork = require('./claudeSessionFork-OffWLYgd.cjs');
|
|
41
|
+
var registerSideQuestionHandler = require('./registerSideQuestionHandler-ByUnjI3V.cjs');
|
|
42
|
+
var wrapperAccount = require('./wrapperAccount-BubTurHU.cjs');
|
|
43
|
+
var registerKillSessionHandler = require('./registerKillSessionHandler-C6F1sjoo.cjs');
|
|
44
|
+
var doctor = require('./doctor-0gLGzwz6.cjs');
|
|
45
45
|
var node_http = require('node:http');
|
|
46
46
|
var editPaths = require('./editPaths-Bqp4OFPw.cjs');
|
|
47
47
|
var projectPath = require('./projectPath-C3ioB4Bu.cjs');
|
|
48
|
-
var processTreeSnapshot = require('./processTreeSnapshot-
|
|
49
|
-
var titleGenerator = require('./titleGenerator-
|
|
48
|
+
var processTreeSnapshot = require('./processTreeSnapshot-D5iNblp6.cjs');
|
|
49
|
+
var titleGenerator = require('./titleGenerator-ijVOuv3J.cjs');
|
|
50
50
|
var oneShotPrompts = require('./oneShotPrompts-CL0dip9C.cjs');
|
|
51
|
-
var reportProgressTool = require('./reportProgressTool-
|
|
51
|
+
var reportProgressTool = require('./reportProgressTool-C1JOvo6T.cjs');
|
|
52
52
|
require('node:util');
|
|
53
53
|
require('./prompt-Bof2aQkI.cjs');
|
|
54
54
|
require('node:os');
|
|
55
55
|
require('zod');
|
|
56
56
|
require('./pi-DlsrPCTa.cjs');
|
|
57
57
|
require('./fileStore-7qhnbs6N.cjs');
|
|
58
|
-
require('./client-
|
|
59
|
-
require('./context-
|
|
60
|
-
require('./sessionOps-
|
|
58
|
+
require('./client-YFvImdwH.cjs');
|
|
59
|
+
require('./context-BqhlGL3u.cjs');
|
|
60
|
+
require('./sessionOps-JRyQhF5s.cjs');
|
|
61
61
|
require('./authRelay-Dy1qU9td.cjs');
|
|
62
62
|
require('./resources-BZ_Be0qM.cjs');
|
|
63
|
-
require('./tools-
|
|
64
|
-
require('./peerTools-
|
|
63
|
+
require('./tools-CL8h3fqh.cjs');
|
|
64
|
+
require('./peerTools-D417O7d-.cjs');
|
|
65
65
|
require('./ids-B6ZC0HGt.cjs');
|
|
66
|
-
require('./remoteSessionClient-
|
|
66
|
+
require('./remoteSessionClient-CUk6haD7.cjs');
|
|
67
67
|
require('@modelcontextprotocol/sdk/server/mcp.js');
|
|
68
68
|
require('@modelcontextprotocol/sdk/server/streamableHttp.js');
|
|
69
69
|
require('./limits-C-a7gr04.cjs');
|
|
70
|
-
require('./downloadTarget-
|
|
70
|
+
require('./downloadTarget-8ovVpDv1.cjs');
|
|
71
71
|
require('./terminals-B_bfC9c2.cjs');
|
|
72
72
|
require('./terminalTitleSuggest-DhvRFX3H.cjs');
|
|
73
73
|
require('./tmuxSocket-D-Xt6Vn-.cjs');
|
|
74
|
-
require('./bootstrap-
|
|
75
|
-
require('./package-
|
|
74
|
+
require('./bootstrap-PeTZ2sAn.cjs');
|
|
75
|
+
require('./package-Dn7zZkY1.cjs');
|
|
76
76
|
require('./agentGuidance-BtBx2xxE.cjs');
|
|
77
77
|
require('./trimIdent-4gvk9Wk6.cjs');
|
|
78
78
|
require('./webPanels-FCgFKvVe.cjs');
|
|
@@ -82,24 +82,25 @@ require('./promptCacheTtl-B8PCzE6k.cjs');
|
|
|
82
82
|
require('util');
|
|
83
83
|
require('path');
|
|
84
84
|
require('cross-spawn');
|
|
85
|
-
require('./sync-
|
|
85
|
+
require('./sync-DfI78smj.cjs');
|
|
86
86
|
require('./transcriptCursor-DcXGLeSc.cjs');
|
|
87
|
-
require('./startFileWatcher-
|
|
87
|
+
require('./startFileWatcher-BGpYPz6L.cjs');
|
|
88
88
|
require('node:readline');
|
|
89
|
-
require('./rateLimitWindows-
|
|
90
|
-
require('./claudeAccountEnv-
|
|
91
|
-
require('./store-
|
|
92
|
-
require('./doctor-
|
|
89
|
+
require('./rateLimitWindows-U4fc1-_6.cjs');
|
|
90
|
+
require('./claudeAccountEnv-_O3x5AJ1.cjs');
|
|
91
|
+
require('./store-aa3CVNwS.cjs');
|
|
92
|
+
require('./doctor-CJpFhHoK.cjs');
|
|
93
93
|
require('ps-list');
|
|
94
|
+
require('./processTermination-f17wxlMb.cjs');
|
|
94
95
|
require('./doctorReadiness-Dl6yRQCy.cjs');
|
|
95
96
|
require('./detectCLI-BuYR_Qxe.cjs');
|
|
96
97
|
require('fs');
|
|
97
98
|
require('./cliUpdate-DsKXPFYp.cjs');
|
|
98
|
-
require('./piRunnerArgs-
|
|
99
|
-
require('./acpSessionResume-
|
|
99
|
+
require('./piRunnerArgs-kTaNYd23.cjs');
|
|
100
|
+
require('./acpSessionResume-B01oHWDS.cjs');
|
|
100
101
|
require('url');
|
|
101
102
|
require('node:module');
|
|
102
|
-
require('./client-
|
|
103
|
+
require('./client-B9fcSMXP.cjs');
|
|
103
104
|
require('./precheckCompat-CWOi5c9L.cjs');
|
|
104
105
|
|
|
105
106
|
const SCHEDULE_WAKEUP_GRACE_MS = 6e4;
|
|
@@ -4031,7 +4032,7 @@ async function claudeRemoteLauncher(session, onPermissionModeChange, onEffective
|
|
|
4031
4032
|
let notifiedQuestionToolCalls = /* @__PURE__ */ new Set();
|
|
4032
4033
|
function onMessage(message) {
|
|
4033
4034
|
if (message.type === "rate_limit_event") {
|
|
4034
|
-
|
|
4035
|
+
registerSideQuestionHandler.wrapperRateLimitReporter().observeClaude(message.rate_limit_info);
|
|
4035
4036
|
}
|
|
4036
4037
|
runtimeControls.observe(message);
|
|
4037
4038
|
backgroundTasks.observe(message);
|
|
@@ -4553,7 +4554,7 @@ async function loop(opts) {
|
|
|
4553
4554
|
logger.logger.debug(`[loop] Iteration with mode: ${mode}`);
|
|
4554
4555
|
switch (mode) {
|
|
4555
4556
|
case "local": {
|
|
4556
|
-
const { claudeLocalLauncher } = await Promise.resolve().then(function () { return require('./claudeLocalLauncher-
|
|
4557
|
+
const { claudeLocalLauncher } = await Promise.resolve().then(function () { return require('./claudeLocalLauncher-DmSLoHlw.cjs'); });
|
|
4557
4558
|
const result = await claudeLocalLauncher(session);
|
|
4558
4559
|
switch (result.type) {
|
|
4559
4560
|
case "switch":
|
|
@@ -4719,296 +4720,6 @@ function cleanupHookSettingsFile(filepath) {
|
|
|
4719
4720
|
}
|
|
4720
4721
|
}
|
|
4721
4722
|
|
|
4722
|
-
function isUnsupportedSideQuestionError(error) {
|
|
4723
|
-
const message = error instanceof Error ? error.message : String(error);
|
|
4724
|
-
return /unknown|unsupported|not supported|unrecognized|invalid.*subtype/i.test(message);
|
|
4725
|
-
}
|
|
4726
|
-
async function runSideQuestionLive(ask, input) {
|
|
4727
|
-
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) }));
|
|
4728
|
-
const result = await ask({ question: input.question.trim(), ...history.length ? { history } : {} }, input.signal);
|
|
4729
|
-
if (input.signal?.aborted) throw new Error("Side question cancelled");
|
|
4730
|
-
const text = typeof result?.response === "string" ? result.response : "";
|
|
4731
|
-
if (!text.trim()) throw new Error("Side question ended without a result");
|
|
4732
|
-
const fallback = result.refusal_fallback?.content;
|
|
4733
|
-
const answer = fallback ? `\u26A0 ${fallback}
|
|
4734
|
-
|
|
4735
|
-
${text}` : text;
|
|
4736
|
-
input.onText?.(answer);
|
|
4737
|
-
return { answer, hadContext: true, mode: "live" };
|
|
4738
|
-
}
|
|
4739
|
-
const SIDE_QUESTION_SYSTEM_PROMPT = [
|
|
4740
|
-
"A user message wrapped in a side-question system-reminder is a SIDE QUESTION: answer it",
|
|
4741
|
-
"directly in one response from the conversation context, with no tools and no action on the main task."
|
|
4742
|
-
].join(" ");
|
|
4743
|
-
const SIDE_QUESTION_REMINDER = [
|
|
4744
|
-
"<system-reminder>This is a side question from the user. You must answer this question directly in a single response.",
|
|
4745
|
-
"",
|
|
4746
|
-
"IMPORTANT CONTEXT:",
|
|
4747
|
-
"- You are a separate, lightweight agent spawned to answer this one question",
|
|
4748
|
-
"- The main agent is NOT interrupted - it continues working independently in the background",
|
|
4749
|
-
"- You share the conversation context but are a completely separate instance",
|
|
4750
|
-
'- Do NOT reference being interrupted or what you were "previously doing" - that framing is incorrect',
|
|
4751
|
-
"",
|
|
4752
|
-
"CRITICAL CONSTRAINTS:",
|
|
4753
|
-
"- You have NO tools available - you cannot read files, run commands, search, or take any actions",
|
|
4754
|
-
"- This is a one-off response - there will be no follow-up turns",
|
|
4755
|
-
"- You can ONLY provide information based on what you already know from the conversation context",
|
|
4756
|
-
`- NEVER say things like "Let me try...", "I'll now...", "Let me check...", or promise to take any action`,
|
|
4757
|
-
"- If you don't know the answer, say so - do not offer to look it up or investigate",
|
|
4758
|
-
"",
|
|
4759
|
-
"Simply answer the question with the information you have.</system-reminder>"
|
|
4760
|
-
].join("\n");
|
|
4761
|
-
const MAX_HISTORY_CHARS = 2e3;
|
|
4762
|
-
function clip(text, max) {
|
|
4763
|
-
return text.length > max ? `${text.slice(0, max)}\u2026` : text;
|
|
4764
|
-
}
|
|
4765
|
-
function buildSideQuestionPrompt(question, history = []) {
|
|
4766
|
-
const trimmed = question.trim();
|
|
4767
|
-
const prior = history.filter((h) => h.question.trim() && h.answer.trim()).slice(-12);
|
|
4768
|
-
const body = `${SIDE_QUESTION_REMINDER}
|
|
4769
|
-
|
|
4770
|
-
${trimmed}`;
|
|
4771
|
-
if (prior.length === 0) return body;
|
|
4772
|
-
const lines = prior.map((h) => `Q: ${clip(h.question.trim(), MAX_HISTORY_CHARS)}
|
|
4773
|
-
A: ${clip(h.answer.trim(), MAX_HISTORY_CHARS)}`);
|
|
4774
|
-
return `<earlier-side-questions>
|
|
4775
|
-
${lines.join("\n\n")}
|
|
4776
|
-
</earlier-side-questions>
|
|
4777
|
-
|
|
4778
|
-
${body}`;
|
|
4779
|
-
}
|
|
4780
|
-
function sideQuestionQueryOptions(input) {
|
|
4781
|
-
return {
|
|
4782
|
-
cwd: input.cwd,
|
|
4783
|
-
...input.resumeSessionId ? { resume: input.resumeSessionId, forkSession: true } : {},
|
|
4784
|
-
persistSession: false,
|
|
4785
|
-
tools: [],
|
|
4786
|
-
mcpServers: {},
|
|
4787
|
-
strictMcpConfig: true,
|
|
4788
|
-
maxTurns: 1,
|
|
4789
|
-
includePartialMessages: true,
|
|
4790
|
-
permissionMode: "default",
|
|
4791
|
-
model: input.model,
|
|
4792
|
-
env: input.env,
|
|
4793
|
-
settingsPath: input.settingsPath,
|
|
4794
|
-
appendSystemPrompt: SIDE_QUESTION_SYSTEM_PROMPT,
|
|
4795
|
-
canCallTool: async () => ({ behavior: "deny", message: "Side questions cannot use tools" }),
|
|
4796
|
-
abort: input.signal
|
|
4797
|
-
};
|
|
4798
|
-
}
|
|
4799
|
-
function assistantBlocks(message) {
|
|
4800
|
-
if (message.type !== "assistant") return [];
|
|
4801
|
-
const content = message.message?.content;
|
|
4802
|
-
return Array.isArray(content) ? content.filter((b) => Boolean(b) && typeof b === "object") : [];
|
|
4803
|
-
}
|
|
4804
|
-
function textFromAssistant(message) {
|
|
4805
|
-
return assistantBlocks(message).map((block) => block.type === "text" ? String(block.text ?? "") : "").join("");
|
|
4806
|
-
}
|
|
4807
|
-
function toolUseFromAssistant(message) {
|
|
4808
|
-
const block = assistantBlocks(message).find((b) => b.type === "tool_use");
|
|
4809
|
-
return block ? String(block.name ?? "a tool") : null;
|
|
4810
|
-
}
|
|
4811
|
-
function toolAttemptNotice(toolName) {
|
|
4812
|
-
return `(The model tried to call ${toolName} instead of answering directly. Try rephrasing or ask in the main conversation.)`;
|
|
4813
|
-
}
|
|
4814
|
-
function apiErrorFromSystem(message) {
|
|
4815
|
-
if (message.type !== "system") return null;
|
|
4816
|
-
const m = message;
|
|
4817
|
-
if (m.subtype !== "api_error") return null;
|
|
4818
|
-
if (typeof m.error === "string") return m.error;
|
|
4819
|
-
const detail = m.error?.formatted ?? m.error?.message;
|
|
4820
|
-
return typeof detail === "string" && detail ? detail : "API error";
|
|
4821
|
-
}
|
|
4822
|
-
async function runSideQuestion(query, input) {
|
|
4823
|
-
const options = sideQuestionQueryOptions(input);
|
|
4824
|
-
const stream = query({ prompt: buildSideQuestionPrompt(input.question, input.history), options });
|
|
4825
|
-
let streamed = "";
|
|
4826
|
-
let final = "";
|
|
4827
|
-
let toolAttempt = null;
|
|
4828
|
-
let lastApiError = null;
|
|
4829
|
-
let resultSeen = false;
|
|
4830
|
-
for await (const message of stream) {
|
|
4831
|
-
if (message.type === "stream_event") {
|
|
4832
|
-
const event = message.event;
|
|
4833
|
-
if (event?.type === "content_block_delta" && event.delta?.type === "text_delta" && event.delta.text) {
|
|
4834
|
-
streamed += event.delta.text;
|
|
4835
|
-
input.onText?.(streamed);
|
|
4836
|
-
}
|
|
4837
|
-
continue;
|
|
4838
|
-
}
|
|
4839
|
-
if (message.type === "assistant") {
|
|
4840
|
-
const text = textFromAssistant(message);
|
|
4841
|
-
if (text) {
|
|
4842
|
-
final = final ? `${final}
|
|
4843
|
-
|
|
4844
|
-
${text}` : text;
|
|
4845
|
-
input.onText?.(final);
|
|
4846
|
-
}
|
|
4847
|
-
toolAttempt ??= toolUseFromAssistant(message);
|
|
4848
|
-
continue;
|
|
4849
|
-
}
|
|
4850
|
-
if (message.type === "system") {
|
|
4851
|
-
lastApiError = apiErrorFromSystem(message) ?? lastApiError;
|
|
4852
|
-
continue;
|
|
4853
|
-
}
|
|
4854
|
-
if (message.type === "result") {
|
|
4855
|
-
resultSeen = true;
|
|
4856
|
-
const result = message;
|
|
4857
|
-
if (result.subtype !== "success") {
|
|
4858
|
-
if (toolAttempt && result.subtype === "error_max_turns") break;
|
|
4859
|
-
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";
|
|
4860
|
-
throw new Error(`Side question failed: ${detail}`);
|
|
4861
|
-
}
|
|
4862
|
-
if (!final && typeof result.result === "string") final = result.result;
|
|
4863
|
-
}
|
|
4864
|
-
}
|
|
4865
|
-
if (input.signal?.aborted) throw new Error("Side question cancelled");
|
|
4866
|
-
if (toolAttempt && !final.trim() && !streamed.trim()) {
|
|
4867
|
-
const notice = toolAttemptNotice(toolAttempt);
|
|
4868
|
-
input.onText?.(notice);
|
|
4869
|
-
return { answer: notice, hadContext: Boolean(input.resumeSessionId), mode: "fork" };
|
|
4870
|
-
}
|
|
4871
|
-
if (!resultSeen && !final && !streamed) throw new Error(`Side question ended without a result${lastApiError ? `: ${lastApiError}` : ""}`);
|
|
4872
|
-
return { answer: final || streamed, hadContext: Boolean(input.resumeSessionId), mode: "fork" };
|
|
4873
|
-
}
|
|
4874
|
-
|
|
4875
|
-
const SIDE_QUESTION_RETAIN_MS = 5 * 6e4;
|
|
4876
|
-
const SIDE_QUESTION_MAX_CHARS = 8e3;
|
|
4877
|
-
const SIDE_QUESTION_MAX_RUN_MS = 10 * 6e4;
|
|
4878
|
-
function writeSideQuestionSettingsFile(homeDir, extra = {}) {
|
|
4879
|
-
const dir = path$1.join(homeDir, "tmp", "hooks");
|
|
4880
|
-
node_fs.mkdirSync(dir, { recursive: true });
|
|
4881
|
-
const file = path$1.join(dir, `side-question-${process.pid}.json`);
|
|
4882
|
-
node_fs.writeFileSync(file, JSON.stringify({ ...extra, disableAllHooks: true }));
|
|
4883
|
-
return file;
|
|
4884
|
-
}
|
|
4885
|
-
function parseHistory(raw) {
|
|
4886
|
-
if (!Array.isArray(raw)) return [];
|
|
4887
|
-
return raw.flatMap((item) => {
|
|
4888
|
-
if (!item || typeof item !== "object") return [];
|
|
4889
|
-
const { question, answer } = item;
|
|
4890
|
-
return typeof question === "string" && typeof answer === "string" ? [{ question, answer }] : [];
|
|
4891
|
-
});
|
|
4892
|
-
}
|
|
4893
|
-
function registerSideQuestionHandler(rpc, deps) {
|
|
4894
|
-
const now = deps.now ?? (() => Date.now());
|
|
4895
|
-
const retainMs = deps.retainMs ?? SIDE_QUESTION_RETAIN_MS;
|
|
4896
|
-
const maxRunMs = deps.maxRunMs ?? SIDE_QUESTION_MAX_RUN_MS;
|
|
4897
|
-
const fork = deps.run ?? (async (input) => {
|
|
4898
|
-
const { query } = await Promise.resolve().then(function () { return require('./index-5c33fqLQ.cjs'); });
|
|
4899
|
-
return runSideQuestion(query, input);
|
|
4900
|
-
});
|
|
4901
|
-
const run = async (input, live) => {
|
|
4902
|
-
if (!live) return fork(input);
|
|
4903
|
-
try {
|
|
4904
|
-
return await runSideQuestionLive(live.ask, input);
|
|
4905
|
-
} catch (error) {
|
|
4906
|
-
if (input.signal?.aborted || !isUnsupportedSideQuestionError(error)) throw error;
|
|
4907
|
-
logger.logger.debug(`[btw] live side question unsupported by this CLI, forking instead: ${error instanceof Error ? error.message : String(error)}`);
|
|
4908
|
-
return fork(input);
|
|
4909
|
-
}
|
|
4910
|
-
};
|
|
4911
|
-
const slots = /* @__PURE__ */ new Map();
|
|
4912
|
-
let active = null;
|
|
4913
|
-
const prune = () => {
|
|
4914
|
-
const t = now();
|
|
4915
|
-
for (const [id, slot] of slots) {
|
|
4916
|
-
if (slot.status !== "running" && slot.finishedAt !== void 0 && t - slot.finishedAt > retainMs) slots.delete(id);
|
|
4917
|
-
}
|
|
4918
|
-
};
|
|
4919
|
-
const finish = (slot, status, error) => {
|
|
4920
|
-
if (slot.status !== "running") return;
|
|
4921
|
-
slot.status = status;
|
|
4922
|
-
slot.error = error;
|
|
4923
|
-
slot.finishedAt = now();
|
|
4924
|
-
if (active === slot) active = null;
|
|
4925
|
-
};
|
|
4926
|
-
rpc.registerHandler("btw-ask", async (request) => {
|
|
4927
|
-
const question = typeof request?.question === "string" ? request.question.trim() : "";
|
|
4928
|
-
if (!question) throw new Error("Side question is empty");
|
|
4929
|
-
if (question.length > SIDE_QUESTION_MAX_CHARS) throw new Error("Side question is too long");
|
|
4930
|
-
prune();
|
|
4931
|
-
if (active) {
|
|
4932
|
-
const stale = active;
|
|
4933
|
-
stale.abort.abort("superseded");
|
|
4934
|
-
finish(stale, "cancelled");
|
|
4935
|
-
logger.logger.debug(`[btw] side question ${stale.requestId} superseded by a new ask`);
|
|
4936
|
-
}
|
|
4937
|
-
const candidate = deps.getLiveQuery?.() ?? null;
|
|
4938
|
-
const live = candidate && candidate.canControl() ? candidate : null;
|
|
4939
|
-
const resumeSessionId = deps.getClaudeSessionId() ?? null;
|
|
4940
|
-
const slot = {
|
|
4941
|
-
requestId: node_crypto.randomUUID(),
|
|
4942
|
-
status: "running",
|
|
4943
|
-
text: "",
|
|
4944
|
-
startedAt: now(),
|
|
4945
|
-
abort: new AbortController()
|
|
4946
|
-
};
|
|
4947
|
-
slots.set(slot.requestId, slot);
|
|
4948
|
-
active = slot;
|
|
4949
|
-
logger.logger.debug(`[btw] side question ${slot.requestId} start (${live ? "live" : resumeSessionId ? "fork" : "no-context"})`);
|
|
4950
|
-
const deadline = setTimeout(() => {
|
|
4951
|
-
if (slot.status !== "running") return;
|
|
4952
|
-
slot.abort.abort("timeout");
|
|
4953
|
-
finish(slot, "error", "Side question timed out");
|
|
4954
|
-
logger.logger.debug(`[btw] side question ${slot.requestId} timed out after ${maxRunMs}ms`);
|
|
4955
|
-
}, maxRunMs);
|
|
4956
|
-
deadline.unref?.();
|
|
4957
|
-
void run({
|
|
4958
|
-
question,
|
|
4959
|
-
history: parseHistory(request.history),
|
|
4960
|
-
resumeSessionId,
|
|
4961
|
-
cwd: deps.cwd,
|
|
4962
|
-
model: deps.getModel(),
|
|
4963
|
-
env: deps.getEnv?.(),
|
|
4964
|
-
settingsPath: deps.settingsPath,
|
|
4965
|
-
signal: slot.abort.signal,
|
|
4966
|
-
onText: (text) => {
|
|
4967
|
-
if (slot.status === "running") slot.text = text;
|
|
4968
|
-
}
|
|
4969
|
-
}, live).then((result) => {
|
|
4970
|
-
slot.text = result.answer;
|
|
4971
|
-
finish(slot, "done");
|
|
4972
|
-
logger.logger.debug(`[btw] side question ${slot.requestId} done (${result.mode ?? "fork"}, ${result.answer.length} chars)`);
|
|
4973
|
-
}).catch((error) => {
|
|
4974
|
-
const message = error instanceof Error ? error.message : String(error);
|
|
4975
|
-
if (slot.abort.signal.aborted) {
|
|
4976
|
-
finish(slot, "cancelled");
|
|
4977
|
-
} else {
|
|
4978
|
-
finish(slot, "error", message);
|
|
4979
|
-
logger.logger.debug(`[btw] side question ${slot.requestId} failed: ${message}`);
|
|
4980
|
-
}
|
|
4981
|
-
}).finally(() => clearTimeout(deadline));
|
|
4982
|
-
return { requestId: slot.requestId, hadContext: live ? true : Boolean(resumeSessionId), mode: live ? "live" : "fork" };
|
|
4983
|
-
});
|
|
4984
|
-
rpc.registerHandler("btw-poll", async (request) => {
|
|
4985
|
-
prune();
|
|
4986
|
-
const id = typeof request?.requestId === "string" ? request.requestId : "";
|
|
4987
|
-
const slot = slots.get(id);
|
|
4988
|
-
if (!slot) throw new Error("Unknown side question");
|
|
4989
|
-
return {
|
|
4990
|
-
requestId: slot.requestId,
|
|
4991
|
-
status: slot.status,
|
|
4992
|
-
text: slot.text,
|
|
4993
|
-
error: slot.error,
|
|
4994
|
-
startedAt: slot.startedAt,
|
|
4995
|
-
finishedAt: slot.finishedAt
|
|
4996
|
-
};
|
|
4997
|
-
});
|
|
4998
|
-
rpc.registerHandler("btw-cancel", async (request) => {
|
|
4999
|
-
const id = typeof request?.requestId === "string" ? request.requestId : "";
|
|
5000
|
-
const slot = slots.get(id);
|
|
5001
|
-
if (!slot || slot.status !== "running") return { cancelled: false };
|
|
5002
|
-
slot.abort.abort("cancelled by user");
|
|
5003
|
-
finish(slot, "cancelled");
|
|
5004
|
-
return { cancelled: true };
|
|
5005
|
-
});
|
|
5006
|
-
return {
|
|
5007
|
-
/** Test/introspection hook. */
|
|
5008
|
-
_slots: slots
|
|
5009
|
-
};
|
|
5010
|
-
}
|
|
5011
|
-
|
|
5012
4723
|
function replayClaudeForkJsonl(file, sink) {
|
|
5013
4724
|
let replayed = 0;
|
|
5014
4725
|
for (const line of file.split("\n")) {
|
|
@@ -5331,6 +5042,9 @@ exports.contentLogMetadata = contentLogMetadata.contentLogMetadata;
|
|
|
5331
5042
|
exports.RawJSONLinesSchema = types.RawJSONLinesSchema;
|
|
5332
5043
|
exports.getProjectPath = path.getProjectPath;
|
|
5333
5044
|
exports.createSessionScanner = sessionScanner.createSessionScanner;
|
|
5045
|
+
exports.describePendingApprovals = registerSideQuestionHandler.describePendingApprovals;
|
|
5046
|
+
exports.registerSideQuestionHandler = registerSideQuestionHandler.registerSideQuestionHandler;
|
|
5047
|
+
exports.writeSideQuestionSettingsFile = registerSideQuestionHandler.writeSideQuestionSettingsFile;
|
|
5334
5048
|
exports.MessageQueue2 = registerKillSessionHandler.MessageQueue2;
|
|
5335
5049
|
exports.registerKillSessionHandler = registerKillSessionHandler.registerKillSessionHandler;
|
|
5336
5050
|
exports.getEnvironmentInfo = doctor.getEnvironmentInfo;
|
|
@@ -5358,10 +5072,8 @@ exports.prewarmCacheFile = prewarmCacheFile;
|
|
|
5358
5072
|
exports.prewarmPredictionMeta = prewarmPredictionMeta;
|
|
5359
5073
|
exports.prewarmSlotDir = prewarmSlotDir;
|
|
5360
5074
|
exports.readPrewarmCache = readPrewarmCache;
|
|
5361
|
-
exports.registerSideQuestionHandler = registerSideQuestionHandler;
|
|
5362
5075
|
exports.replayClaudeForkJsonl = replayClaudeForkJsonl;
|
|
5363
5076
|
exports.resolveMessageMode = resolveMessageMode;
|
|
5364
5077
|
exports.startHookServer = startHookServer;
|
|
5365
5078
|
exports.withAssistantDenylist = withAssistantDenylist;
|
|
5366
5079
|
exports.writePrewarmCache = writePrewarmCache;
|
|
5367
|
-
exports.writeSideQuestionSettingsFile = writeSideQuestionSettingsFile;
|
|
@@ -2,83 +2,83 @@ import { c as compactCommandText, C as COMPACT_UNSUPPORTED_NOTICE } from './spec
|
|
|
2
2
|
import { useStdout, useInput, Box, Text, render } from 'ink';
|
|
3
3
|
import React, { useState, useRef, useEffect, useCallback } from 'react';
|
|
4
4
|
import { randomUUID } from 'node:crypto';
|
|
5
|
-
import { a as PROJECT_SESSION_CAPABILITY } from './index-
|
|
6
|
-
import { h as hashObject, s as startHappyServer, c as createProjectInjector } from './deterministicJson-
|
|
7
|
-
import { s as sharedProjectsClient } from './client-
|
|
5
|
+
import { a as PROJECT_SESSION_CAPABILITY } from './index-C27JFCbe.mjs';
|
|
6
|
+
import { h as hashObject, s as startHappyServer, c as createProjectInjector } from './deterministicJson-Dg_0QJAR.mjs';
|
|
7
|
+
import { s as sharedProjectsClient } from './client-CfTeXnYS.mjs';
|
|
8
8
|
import { join } from 'node:path';
|
|
9
|
-
import { c as connectionState, A as ApiClient } from './api-
|
|
10
|
-
import { l as logger } from './logger-
|
|
11
|
-
import { r as readSettings } from './persistence-
|
|
12
|
-
import { c as createSessionMetadata } from './createSessionMetadata-
|
|
9
|
+
import { c as connectionState, A as ApiClient } from './api-CiNezCys.mjs';
|
|
10
|
+
import { l as logger } from './logger-D1hb3CG8.mjs';
|
|
11
|
+
import { r as readSettings } from './persistence-CagHeZ-f.mjs';
|
|
12
|
+
import { c as createSessionMetadata } from './createSessionMetadata-CZuEDo2v.mjs';
|
|
13
13
|
import { e as errorLogMetadata, c as contentLogMetadata } from './contentLogMetadata-BlWI0egu.mjs';
|
|
14
|
-
import { g as getInitialMachineMetadata } from './machineMetadata-
|
|
15
|
-
import { M as MessageQueue2, r as registerKillSessionHandler } from './registerKillSessionHandler-
|
|
14
|
+
import { g as getInitialMachineMetadata } from './machineMetadata-Dxng45Uh.mjs';
|
|
15
|
+
import { M as MessageQueue2, r as registerKillSessionHandler } from './registerKillSessionHandler-D4SSwQj8.mjs';
|
|
16
16
|
import { p as projectPath } from './projectPath-BTBIMB57.mjs';
|
|
17
|
-
import { M as MessageBuffer } from './sessionExitLifecycle-
|
|
18
|
-
import { n as notifyDaemonSessionStarted } from './controlClient-
|
|
17
|
+
import { M as MessageBuffer } from './sessionExitLifecycle-iAtZN9sa.mjs';
|
|
18
|
+
import { n as notifyDaemonSessionStarted } from './controlClient-DYQ1g2ar.mjs';
|
|
19
19
|
import { e as encodeBase64 } from './authRelay-DhQhkBvX.mjs';
|
|
20
|
-
import { s as setupOfflineReconnection } from './setupOfflineReconnection-
|
|
21
|
-
import { A as AcpBackend, i as isAgentExitError } from './AcpBackend-
|
|
20
|
+
import { s as setupOfflineReconnection } from './setupOfflineReconnection-IKEI7fLJ.mjs';
|
|
21
|
+
import { A as AcpBackend, i as isAgentExitError } from './AcpBackend-RqGkFeeY.mjs';
|
|
22
22
|
import { a as GEMINI_API_KEY_ENV, b as GOOGLE_API_KEY_ENV, G as GEMINI_MODEL_ENV, C as CHANGE_TITLE_INSTRUCTION } from './constants-BC4St0xd.mjs';
|
|
23
|
-
import { readGeminiLocalConfig, determineGeminiModel, getGeminiModelSource, getInitialGeminiModel, saveGeminiModelToConfig } from './config-
|
|
24
|
-
import { B as BasePermissionHandler } from './BasePermissionHandler-
|
|
25
|
-
import { B as BaseReasoningProcessor, s as settleCodexSession } from './codexTermination-
|
|
23
|
+
import { readGeminiLocalConfig, determineGeminiModel, getGeminiModelSource, getInitialGeminiModel, saveGeminiModelToConfig } from './config-BfwjfFSC.mjs';
|
|
24
|
+
import { B as BasePermissionHandler } from './BasePermissionHandler-CgHLVNKT.mjs';
|
|
25
|
+
import { B as BaseReasoningProcessor, s as settleCodexSession } from './codexTermination-CLjDP6Ja.mjs';
|
|
26
26
|
import 'zod';
|
|
27
27
|
import '@paralleldrive/cuid2';
|
|
28
28
|
import './prompt-QHuFx9j6.mjs';
|
|
29
|
-
import './reportProgressTool-
|
|
30
|
-
import './client-
|
|
31
|
-
import './configuration-
|
|
29
|
+
import './reportProgressTool-BCn5oG52.mjs';
|
|
30
|
+
import './client-Cg_cuQb1.mjs';
|
|
31
|
+
import './configuration-C8r6uD9k.mjs';
|
|
32
32
|
import 'node:fs';
|
|
33
33
|
import 'node:os';
|
|
34
|
-
import './package-
|
|
34
|
+
import './package-CpmoMPuj.mjs';
|
|
35
35
|
import 'node:fs/promises';
|
|
36
36
|
import './precheckCompat-DeEbilbr.mjs';
|
|
37
37
|
import './agentGuidance-BDYt2Qy2.mjs';
|
|
38
38
|
import './trimIdent-BAjmv_TG.mjs';
|
|
39
39
|
import './pi-CqyoZMjI.mjs';
|
|
40
40
|
import './fileStore-5qpetZS0.mjs';
|
|
41
|
-
import './client-
|
|
41
|
+
import './client-B3lOol4f.mjs';
|
|
42
42
|
import 'node:child_process';
|
|
43
43
|
import 'node:util';
|
|
44
|
-
import './context-
|
|
45
|
-
import './sessionOps-
|
|
44
|
+
import './context-CtMY-M8T.mjs';
|
|
45
|
+
import './sessionOps-OmRqUFm4.mjs';
|
|
46
46
|
import 'axios';
|
|
47
|
-
import './time-
|
|
47
|
+
import './time-CgAwVt5R.mjs';
|
|
48
48
|
import 'socket.io-client';
|
|
49
49
|
import './backgroundTaskActivity-8PdPxrvy.mjs';
|
|
50
50
|
import './resources-CLP_MpK4.mjs';
|
|
51
|
-
import './tools-
|
|
52
|
-
import './peerTools-
|
|
51
|
+
import './tools-DthGQoo3.mjs';
|
|
52
|
+
import './peerTools-CNzlwuL7.mjs';
|
|
53
53
|
import './ids-DU6sLx4C.mjs';
|
|
54
|
-
import './remoteSessionClient-
|
|
54
|
+
import './remoteSessionClient-CfYDFlKm.mjs';
|
|
55
55
|
import '@modelcontextprotocol/sdk/server/mcp.js';
|
|
56
56
|
import 'node:http';
|
|
57
57
|
import '@modelcontextprotocol/sdk/server/streamableHttp.js';
|
|
58
58
|
import './limits-DIo7rEBR.mjs';
|
|
59
|
-
import './downloadTarget-
|
|
59
|
+
import './downloadTarget-CbuUiS5p.mjs';
|
|
60
60
|
import './terminals-Dlg0x3nY.mjs';
|
|
61
61
|
import './terminalTitleSuggest-CeKsX_V6.mjs';
|
|
62
62
|
import './tmuxSocket-B8Yx20sT.mjs';
|
|
63
|
-
import './bootstrap-
|
|
63
|
+
import './bootstrap-C2XSEyOe.mjs';
|
|
64
64
|
import './webPanels-B2_C2-3g.mjs';
|
|
65
|
-
import './pushNotifications-
|
|
65
|
+
import './pushNotifications-4sNESDMv.mjs';
|
|
66
66
|
import './previewPath-CXN4Vag0.mjs';
|
|
67
67
|
import 'crypto';
|
|
68
|
-
import './lidState-
|
|
68
|
+
import './lidState-BflRFw38.mjs';
|
|
69
69
|
import 'os';
|
|
70
70
|
import 'child_process';
|
|
71
71
|
import 'node:events';
|
|
72
|
-
import './registerCommonHandlers-
|
|
72
|
+
import './registerCommonHandlers-PTJ8TBj9.mjs';
|
|
73
73
|
import 'util';
|
|
74
74
|
import 'fs/promises';
|
|
75
75
|
import 'path';
|
|
76
76
|
import 'cross-spawn';
|
|
77
|
-
import './sync-
|
|
77
|
+
import './sync-DtzoF9sw.mjs';
|
|
78
78
|
import 'chalk';
|
|
79
79
|
import './detectCLI-CSGMlV51.mjs';
|
|
80
80
|
import 'fs';
|
|
81
|
-
import './localHappyAgentAuth-
|
|
81
|
+
import './localHappyAgentAuth-BAK_nqMG.mjs';
|
|
82
82
|
import 'tweetnacl';
|
|
83
83
|
import './fsMkdir-DumgLTzR.mjs';
|
|
84
84
|
import './types-CkqAACXx.mjs';
|
|
@@ -1223,6 +1223,9 @@ async function runGemini(opts) {
|
|
|
1223
1223
|
};
|
|
1224
1224
|
session.rpcHandlerManager.registerHandler("abort", handleAbort);
|
|
1225
1225
|
registerKillSessionHandler(session.rpcHandlerManager, () => handleKillSession("archive"), session, { processSignals: true, onSignal: () => handleKillSession("offline") });
|
|
1226
|
+
session.on("superseded", () => {
|
|
1227
|
+
void handleKillSession("superseded");
|
|
1228
|
+
});
|
|
1226
1229
|
const messageBuffer = new MessageBuffer();
|
|
1227
1230
|
const hasTTY = process.stdout.isTTY && process.stdin.isTTY;
|
|
1228
1231
|
let inkInstance = null;
|