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,82 +1,83 @@
|
|
|
1
|
-
import { l as logger } from './logger-
|
|
2
|
-
import { u as notifyDaemonSessionEvent, v as notifyDaemonClaudeAuthFailed } from './controlClient-
|
|
3
|
-
export { o as reportSessionEditToDaemon } from './controlClient-
|
|
1
|
+
import { l as logger } from './logger-D1hb3CG8.mjs';
|
|
2
|
+
import { u as notifyDaemonSessionEvent, v as notifyDaemonClaudeAuthFailed } from './controlClient-DYQ1g2ar.mjs';
|
|
3
|
+
export { o as reportSessionEditToDaemon } from './controlClient-DYQ1g2ar.mjs';
|
|
4
4
|
import { s as sameBackgroundTasks, c as createBackgroundTaskTracker } from './backgroundTaskActivity-8PdPxrvy.mjs';
|
|
5
|
-
import { c as createProjectInjector, h as hashObject, l as leadBoardFor } from './deterministicJson-
|
|
6
|
-
export { s as startHappyServer } from './deterministicJson-
|
|
7
|
-
import { s as sharedProjectsClient } from './client-
|
|
5
|
+
import { c as createProjectInjector, h as hashObject, l as leadBoardFor } from './deterministicJson-Dg_0QJAR.mjs';
|
|
6
|
+
export { s as startHappyServer } from './deterministicJson-Dg_0QJAR.mjs';
|
|
7
|
+
import { s as sharedProjectsClient } from './client-CfTeXnYS.mjs';
|
|
8
8
|
import { randomInt, randomUUID, createHash } from 'node:crypto';
|
|
9
9
|
import { a as parseSpecialCommand } from './specialCommands-MXUN0wfI.mjs';
|
|
10
|
-
import { M as MessageBuffer } from './sessionExitLifecycle-
|
|
11
|
-
export { S as SessionExitGate, e as exitIntentFromArchiveFlag, s as settleSessionOnExit } from './sessionExitLifecycle-
|
|
12
|
-
import { q as query } from './query-
|
|
10
|
+
import { M as MessageBuffer } from './sessionExitLifecycle-iAtZN9sa.mjs';
|
|
11
|
+
export { S as SessionExitGate, e as exitIntentFromArchiveFlag, s as settleSessionOnExit } from './sessionExitLifecycle-iAtZN9sa.mjs';
|
|
12
|
+
import { q as query } from './query-6OWHW1U1.mjs';
|
|
13
13
|
import { AbortError } from '@anthropic-ai/claude-agent-sdk';
|
|
14
14
|
import { m as mapToClaudeMode, p as parseClaudePermissionMode, c as resolveRemoteClaudePermissionMode } from './permissionMode-CH4FoZfU.mjs';
|
|
15
|
-
import { c as claudeCheckSession, s as systemPrompt } from './systemPrompt-
|
|
15
|
+
import { c as claudeCheckSession, s as systemPrompt } from './systemPrompt-B1Xd99hK.mjs';
|
|
16
16
|
import { join, resolve, dirname } from 'node:path';
|
|
17
17
|
import 'axios';
|
|
18
|
+
import { A as AsyncLock } from './pushNotifications-4sNESDMv.mjs';
|
|
18
19
|
import 'node:events';
|
|
19
20
|
import 'socket.io-client';
|
|
20
|
-
import { A as AsyncLock } from './pushNotifications-DjEl8G0a.mjs';
|
|
21
21
|
import 'tweetnacl';
|
|
22
|
-
import { c as configuration, e as ensurePrivateDirectory } from './configuration-
|
|
23
|
-
import './index-
|
|
24
|
-
import './registerCommonHandlers-
|
|
22
|
+
import { c as configuration, e as ensurePrivateDirectory } from './configuration-C8r6uD9k.mjs';
|
|
23
|
+
import './index-C27JFCbe.mjs';
|
|
24
|
+
import './registerCommonHandlers-PTJ8TBj9.mjs';
|
|
25
25
|
import 'os';
|
|
26
26
|
import 'child_process';
|
|
27
27
|
import '@paralleldrive/cuid2';
|
|
28
|
-
import './persistence-
|
|
28
|
+
import './persistence-CagHeZ-f.mjs';
|
|
29
29
|
import { c as contentLogMetadata } from './contentLogMetadata-BlWI0egu.mjs';
|
|
30
30
|
import 'chalk';
|
|
31
31
|
import { R as RawJSONLinesSchema } from './types-CkqAACXx.mjs';
|
|
32
32
|
import { g as getProjectPath } from './path-D2wdaNSk.mjs';
|
|
33
33
|
import { access } from 'fs/promises';
|
|
34
|
-
import { d as delay } from './time-
|
|
34
|
+
import { d as delay } from './time-CgAwVt5R.mjs';
|
|
35
35
|
import { mkdirSync, writeFileSync, readFileSync, unlinkSync, renameSync, statSync, existsSync } from 'node:fs';
|
|
36
|
-
import { F as Future, d as describeClaudeProcessExit } from './sessionScanner-
|
|
37
|
-
export { c as createSessionScanner } from './sessionScanner-
|
|
36
|
+
import { F as Future, d as describeClaudeProcessExit } from './sessionScanner-BlAOpqMh.mjs';
|
|
37
|
+
export { c as createSessionScanner } from './sessionScanner-BlAOpqMh.mjs';
|
|
38
38
|
import { execSync } from 'node:child_process';
|
|
39
|
-
import { S as StreamRelay } from './streamRelay-
|
|
40
|
-
import { C as CLAUDE_ATTACHMENT_KINDS, c as chatAttachmentDirectory, a as stageClaudeAttachments, b as appendStagedAttachmentsToPrompt } from './attachmentContent-
|
|
39
|
+
import { S as StreamRelay } from './streamRelay-DFZyAPD_.mjs';
|
|
40
|
+
import { C as CLAUDE_ATTACHMENT_KINDS, c as chatAttachmentDirectory, a as stageClaudeAttachments, b as appendStagedAttachmentsToPrompt } from './attachmentContent-CiY3MvdO.mjs';
|
|
41
41
|
import { writeFile, rename, unlink, readFile } from 'node:fs/promises';
|
|
42
|
-
import { F as ForkSourceMissingError } from './claudeSessionFork-
|
|
43
|
-
import { w as wrapperRateLimitReporter } from './
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
export {
|
|
42
|
+
import { F as ForkSourceMissingError } from './claudeSessionFork-BqV6E0ep.mjs';
|
|
43
|
+
import { w as wrapperRateLimitReporter } from './registerSideQuestionHandler-4mRv0Msq.mjs';
|
|
44
|
+
export { d as describePendingApprovals, r as registerSideQuestionHandler, a as writeSideQuestionSettingsFile } from './registerSideQuestionHandler-4mRv0Msq.mjs';
|
|
45
|
+
import { n as noteAccountAuthFailure } from './wrapperAccount-RPtq8BwD.mjs';
|
|
46
|
+
export { M as MessageQueue2, r as registerKillSessionHandler } from './registerKillSessionHandler-D4SSwQj8.mjs';
|
|
47
|
+
export { g as getEnvironmentInfo } from './doctor-COeFzPpz.mjs';
|
|
47
48
|
import { createServer } from 'node:http';
|
|
48
49
|
export { E as EditReportThrottle, b as extractClaudeEditPaths } from './editPaths-BVfS_FFL.mjs';
|
|
49
50
|
import { p as projectPath } from './projectPath-BTBIMB57.mjs';
|
|
50
|
-
export { s as snapshotTree, t as terminateSurvivors } from './processTreeSnapshot-
|
|
51
|
-
import { r as resolveClaudeBinary, a as runClaudeOneShot } from './titleGenerator-
|
|
52
|
-
export { T as TitleGenerator } from './titleGenerator-
|
|
51
|
+
export { s as snapshotTree, t as terminateSurvivors } from './processTreeSnapshot-fuwxC0fr.mjs';
|
|
52
|
+
import { r as resolveClaudeBinary, a as runClaudeOneShot } from './titleGenerator-D2UB7Uyr.mjs';
|
|
53
|
+
export { T as TitleGenerator } from './titleGenerator-D2UB7Uyr.mjs';
|
|
53
54
|
import { B as BOARD_ANALYZER_PROMPT_PREFIX } from './oneShotPrompts-DT4p6RNd.mjs';
|
|
54
|
-
import { i as isSelfReportFresh } from './reportProgressTool-
|
|
55
|
-
export { c as createSelfReportState } from './reportProgressTool-
|
|
55
|
+
import { i as isSelfReportFresh } from './reportProgressTool-BCn5oG52.mjs';
|
|
56
|
+
export { c as createSelfReportState } from './reportProgressTool-BCn5oG52.mjs';
|
|
56
57
|
import 'node:util';
|
|
57
58
|
import './prompt-QHuFx9j6.mjs';
|
|
58
59
|
import 'node:os';
|
|
59
60
|
import 'zod';
|
|
60
61
|
import './pi-CqyoZMjI.mjs';
|
|
61
62
|
import './fileStore-5qpetZS0.mjs';
|
|
62
|
-
import './client-
|
|
63
|
-
import './context-
|
|
64
|
-
import './sessionOps-
|
|
63
|
+
import './client-B3lOol4f.mjs';
|
|
64
|
+
import './context-CtMY-M8T.mjs';
|
|
65
|
+
import './sessionOps-OmRqUFm4.mjs';
|
|
65
66
|
import './authRelay-DhQhkBvX.mjs';
|
|
66
67
|
import './resources-CLP_MpK4.mjs';
|
|
67
|
-
import './tools-
|
|
68
|
-
import './peerTools-
|
|
68
|
+
import './tools-DthGQoo3.mjs';
|
|
69
|
+
import './peerTools-CNzlwuL7.mjs';
|
|
69
70
|
import './ids-DU6sLx4C.mjs';
|
|
70
|
-
import './remoteSessionClient-
|
|
71
|
+
import './remoteSessionClient-CfYDFlKm.mjs';
|
|
71
72
|
import '@modelcontextprotocol/sdk/server/mcp.js';
|
|
72
73
|
import '@modelcontextprotocol/sdk/server/streamableHttp.js';
|
|
73
74
|
import './limits-DIo7rEBR.mjs';
|
|
74
|
-
import './downloadTarget-
|
|
75
|
+
import './downloadTarget-CbuUiS5p.mjs';
|
|
75
76
|
import './terminals-Dlg0x3nY.mjs';
|
|
76
77
|
import './terminalTitleSuggest-CeKsX_V6.mjs';
|
|
77
78
|
import './tmuxSocket-B8Yx20sT.mjs';
|
|
78
|
-
import './bootstrap-
|
|
79
|
-
import './package-
|
|
79
|
+
import './bootstrap-C2XSEyOe.mjs';
|
|
80
|
+
import './package-CpmoMPuj.mjs';
|
|
80
81
|
import './agentGuidance-BDYt2Qy2.mjs';
|
|
81
82
|
import './trimIdent-BAjmv_TG.mjs';
|
|
82
83
|
import './webPanels-B2_C2-3g.mjs';
|
|
@@ -86,24 +87,25 @@ import './promptCacheTtl-Ce0TVbrx.mjs';
|
|
|
86
87
|
import 'util';
|
|
87
88
|
import 'path';
|
|
88
89
|
import 'cross-spawn';
|
|
89
|
-
import './sync-
|
|
90
|
+
import './sync-DtzoF9sw.mjs';
|
|
90
91
|
import './transcriptCursor-B7T_gkQ0.mjs';
|
|
91
|
-
import './startFileWatcher-
|
|
92
|
+
import './startFileWatcher-6hslFu_B.mjs';
|
|
92
93
|
import 'node:readline';
|
|
93
|
-
import './rateLimitWindows-
|
|
94
|
-
import './claudeAccountEnv-
|
|
95
|
-
import './store-
|
|
96
|
-
import './doctor-
|
|
94
|
+
import './rateLimitWindows-4uhuwKnU.mjs';
|
|
95
|
+
import './claudeAccountEnv-CPO6CGNd.mjs';
|
|
96
|
+
import './store-BlPvTr_Q.mjs';
|
|
97
|
+
import './doctor-GN5mPOn5.mjs';
|
|
97
98
|
import 'ps-list';
|
|
99
|
+
import './processTermination-ChJG5SLW.mjs';
|
|
98
100
|
import './doctorReadiness-C208SMN9.mjs';
|
|
99
101
|
import './detectCLI-CSGMlV51.mjs';
|
|
100
102
|
import 'fs';
|
|
101
103
|
import './cliUpdate-Y34VGe9Y.mjs';
|
|
102
|
-
import './piRunnerArgs-
|
|
103
|
-
import './acpSessionResume-
|
|
104
|
+
import './piRunnerArgs-DKU5LoWu.mjs';
|
|
105
|
+
import './acpSessionResume-DEOIZUuj.mjs';
|
|
104
106
|
import 'url';
|
|
105
107
|
import 'node:module';
|
|
106
|
-
import './client-
|
|
108
|
+
import './client-Cg_cuQb1.mjs';
|
|
107
109
|
import './precheckCompat-DeEbilbr.mjs';
|
|
108
110
|
|
|
109
111
|
const SCHEDULE_WAKEUP_GRACE_MS = 6e4;
|
|
@@ -4557,7 +4559,7 @@ async function loop(opts) {
|
|
|
4557
4559
|
logger.debug(`[loop] Iteration with mode: ${mode}`);
|
|
4558
4560
|
switch (mode) {
|
|
4559
4561
|
case "local": {
|
|
4560
|
-
const { claudeLocalLauncher } = await import('./claudeLocalLauncher-
|
|
4562
|
+
const { claudeLocalLauncher } = await import('./claudeLocalLauncher-B5cOrszW.mjs');
|
|
4561
4563
|
const result = await claudeLocalLauncher(session);
|
|
4562
4564
|
switch (result.type) {
|
|
4563
4565
|
case "switch":
|
|
@@ -4723,296 +4725,6 @@ function cleanupHookSettingsFile(filepath) {
|
|
|
4723
4725
|
}
|
|
4724
4726
|
}
|
|
4725
4727
|
|
|
4726
|
-
function isUnsupportedSideQuestionError(error) {
|
|
4727
|
-
const message = error instanceof Error ? error.message : String(error);
|
|
4728
|
-
return /unknown|unsupported|not supported|unrecognized|invalid.*subtype/i.test(message);
|
|
4729
|
-
}
|
|
4730
|
-
async function runSideQuestionLive(ask, input) {
|
|
4731
|
-
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) }));
|
|
4732
|
-
const result = await ask({ question: input.question.trim(), ...history.length ? { history } : {} }, input.signal);
|
|
4733
|
-
if (input.signal?.aborted) throw new Error("Side question cancelled");
|
|
4734
|
-
const text = typeof result?.response === "string" ? result.response : "";
|
|
4735
|
-
if (!text.trim()) throw new Error("Side question ended without a result");
|
|
4736
|
-
const fallback = result.refusal_fallback?.content;
|
|
4737
|
-
const answer = fallback ? `\u26A0 ${fallback}
|
|
4738
|
-
|
|
4739
|
-
${text}` : text;
|
|
4740
|
-
input.onText?.(answer);
|
|
4741
|
-
return { answer, hadContext: true, mode: "live" };
|
|
4742
|
-
}
|
|
4743
|
-
const SIDE_QUESTION_SYSTEM_PROMPT = [
|
|
4744
|
-
"A user message wrapped in a side-question system-reminder is a SIDE QUESTION: answer it",
|
|
4745
|
-
"directly in one response from the conversation context, with no tools and no action on the main task."
|
|
4746
|
-
].join(" ");
|
|
4747
|
-
const SIDE_QUESTION_REMINDER = [
|
|
4748
|
-
"<system-reminder>This is a side question from the user. You must answer this question directly in a single response.",
|
|
4749
|
-
"",
|
|
4750
|
-
"IMPORTANT CONTEXT:",
|
|
4751
|
-
"- You are a separate, lightweight agent spawned to answer this one question",
|
|
4752
|
-
"- The main agent is NOT interrupted - it continues working independently in the background",
|
|
4753
|
-
"- You share the conversation context but are a completely separate instance",
|
|
4754
|
-
'- Do NOT reference being interrupted or what you were "previously doing" - that framing is incorrect',
|
|
4755
|
-
"",
|
|
4756
|
-
"CRITICAL CONSTRAINTS:",
|
|
4757
|
-
"- You have NO tools available - you cannot read files, run commands, search, or take any actions",
|
|
4758
|
-
"- This is a one-off response - there will be no follow-up turns",
|
|
4759
|
-
"- You can ONLY provide information based on what you already know from the conversation context",
|
|
4760
|
-
`- NEVER say things like "Let me try...", "I'll now...", "Let me check...", or promise to take any action`,
|
|
4761
|
-
"- If you don't know the answer, say so - do not offer to look it up or investigate",
|
|
4762
|
-
"",
|
|
4763
|
-
"Simply answer the question with the information you have.</system-reminder>"
|
|
4764
|
-
].join("\n");
|
|
4765
|
-
const MAX_HISTORY_CHARS = 2e3;
|
|
4766
|
-
function clip(text, max) {
|
|
4767
|
-
return text.length > max ? `${text.slice(0, max)}\u2026` : text;
|
|
4768
|
-
}
|
|
4769
|
-
function buildSideQuestionPrompt(question, history = []) {
|
|
4770
|
-
const trimmed = question.trim();
|
|
4771
|
-
const prior = history.filter((h) => h.question.trim() && h.answer.trim()).slice(-12);
|
|
4772
|
-
const body = `${SIDE_QUESTION_REMINDER}
|
|
4773
|
-
|
|
4774
|
-
${trimmed}`;
|
|
4775
|
-
if (prior.length === 0) return body;
|
|
4776
|
-
const lines = prior.map((h) => `Q: ${clip(h.question.trim(), MAX_HISTORY_CHARS)}
|
|
4777
|
-
A: ${clip(h.answer.trim(), MAX_HISTORY_CHARS)}`);
|
|
4778
|
-
return `<earlier-side-questions>
|
|
4779
|
-
${lines.join("\n\n")}
|
|
4780
|
-
</earlier-side-questions>
|
|
4781
|
-
|
|
4782
|
-
${body}`;
|
|
4783
|
-
}
|
|
4784
|
-
function sideQuestionQueryOptions(input) {
|
|
4785
|
-
return {
|
|
4786
|
-
cwd: input.cwd,
|
|
4787
|
-
...input.resumeSessionId ? { resume: input.resumeSessionId, forkSession: true } : {},
|
|
4788
|
-
persistSession: false,
|
|
4789
|
-
tools: [],
|
|
4790
|
-
mcpServers: {},
|
|
4791
|
-
strictMcpConfig: true,
|
|
4792
|
-
maxTurns: 1,
|
|
4793
|
-
includePartialMessages: true,
|
|
4794
|
-
permissionMode: "default",
|
|
4795
|
-
model: input.model,
|
|
4796
|
-
env: input.env,
|
|
4797
|
-
settingsPath: input.settingsPath,
|
|
4798
|
-
appendSystemPrompt: SIDE_QUESTION_SYSTEM_PROMPT,
|
|
4799
|
-
canCallTool: async () => ({ behavior: "deny", message: "Side questions cannot use tools" }),
|
|
4800
|
-
abort: input.signal
|
|
4801
|
-
};
|
|
4802
|
-
}
|
|
4803
|
-
function assistantBlocks(message) {
|
|
4804
|
-
if (message.type !== "assistant") return [];
|
|
4805
|
-
const content = message.message?.content;
|
|
4806
|
-
return Array.isArray(content) ? content.filter((b) => Boolean(b) && typeof b === "object") : [];
|
|
4807
|
-
}
|
|
4808
|
-
function textFromAssistant(message) {
|
|
4809
|
-
return assistantBlocks(message).map((block) => block.type === "text" ? String(block.text ?? "") : "").join("");
|
|
4810
|
-
}
|
|
4811
|
-
function toolUseFromAssistant(message) {
|
|
4812
|
-
const block = assistantBlocks(message).find((b) => b.type === "tool_use");
|
|
4813
|
-
return block ? String(block.name ?? "a tool") : null;
|
|
4814
|
-
}
|
|
4815
|
-
function toolAttemptNotice(toolName) {
|
|
4816
|
-
return `(The model tried to call ${toolName} instead of answering directly. Try rephrasing or ask in the main conversation.)`;
|
|
4817
|
-
}
|
|
4818
|
-
function apiErrorFromSystem(message) {
|
|
4819
|
-
if (message.type !== "system") return null;
|
|
4820
|
-
const m = message;
|
|
4821
|
-
if (m.subtype !== "api_error") return null;
|
|
4822
|
-
if (typeof m.error === "string") return m.error;
|
|
4823
|
-
const detail = m.error?.formatted ?? m.error?.message;
|
|
4824
|
-
return typeof detail === "string" && detail ? detail : "API error";
|
|
4825
|
-
}
|
|
4826
|
-
async function runSideQuestion(query, input) {
|
|
4827
|
-
const options = sideQuestionQueryOptions(input);
|
|
4828
|
-
const stream = query({ prompt: buildSideQuestionPrompt(input.question, input.history), options });
|
|
4829
|
-
let streamed = "";
|
|
4830
|
-
let final = "";
|
|
4831
|
-
let toolAttempt = null;
|
|
4832
|
-
let lastApiError = null;
|
|
4833
|
-
let resultSeen = false;
|
|
4834
|
-
for await (const message of stream) {
|
|
4835
|
-
if (message.type === "stream_event") {
|
|
4836
|
-
const event = message.event;
|
|
4837
|
-
if (event?.type === "content_block_delta" && event.delta?.type === "text_delta" && event.delta.text) {
|
|
4838
|
-
streamed += event.delta.text;
|
|
4839
|
-
input.onText?.(streamed);
|
|
4840
|
-
}
|
|
4841
|
-
continue;
|
|
4842
|
-
}
|
|
4843
|
-
if (message.type === "assistant") {
|
|
4844
|
-
const text = textFromAssistant(message);
|
|
4845
|
-
if (text) {
|
|
4846
|
-
final = final ? `${final}
|
|
4847
|
-
|
|
4848
|
-
${text}` : text;
|
|
4849
|
-
input.onText?.(final);
|
|
4850
|
-
}
|
|
4851
|
-
toolAttempt ??= toolUseFromAssistant(message);
|
|
4852
|
-
continue;
|
|
4853
|
-
}
|
|
4854
|
-
if (message.type === "system") {
|
|
4855
|
-
lastApiError = apiErrorFromSystem(message) ?? lastApiError;
|
|
4856
|
-
continue;
|
|
4857
|
-
}
|
|
4858
|
-
if (message.type === "result") {
|
|
4859
|
-
resultSeen = true;
|
|
4860
|
-
const result = message;
|
|
4861
|
-
if (result.subtype !== "success") {
|
|
4862
|
-
if (toolAttempt && result.subtype === "error_max_turns") break;
|
|
4863
|
-
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";
|
|
4864
|
-
throw new Error(`Side question failed: ${detail}`);
|
|
4865
|
-
}
|
|
4866
|
-
if (!final && typeof result.result === "string") final = result.result;
|
|
4867
|
-
}
|
|
4868
|
-
}
|
|
4869
|
-
if (input.signal?.aborted) throw new Error("Side question cancelled");
|
|
4870
|
-
if (toolAttempt && !final.trim() && !streamed.trim()) {
|
|
4871
|
-
const notice = toolAttemptNotice(toolAttempt);
|
|
4872
|
-
input.onText?.(notice);
|
|
4873
|
-
return { answer: notice, hadContext: Boolean(input.resumeSessionId), mode: "fork" };
|
|
4874
|
-
}
|
|
4875
|
-
if (!resultSeen && !final && !streamed) throw new Error(`Side question ended without a result${lastApiError ? `: ${lastApiError}` : ""}`);
|
|
4876
|
-
return { answer: final || streamed, hadContext: Boolean(input.resumeSessionId), mode: "fork" };
|
|
4877
|
-
}
|
|
4878
|
-
|
|
4879
|
-
const SIDE_QUESTION_RETAIN_MS = 5 * 6e4;
|
|
4880
|
-
const SIDE_QUESTION_MAX_CHARS = 8e3;
|
|
4881
|
-
const SIDE_QUESTION_MAX_RUN_MS = 10 * 6e4;
|
|
4882
|
-
function writeSideQuestionSettingsFile(homeDir, extra = {}) {
|
|
4883
|
-
const dir = join(homeDir, "tmp", "hooks");
|
|
4884
|
-
mkdirSync(dir, { recursive: true });
|
|
4885
|
-
const file = join(dir, `side-question-${process.pid}.json`);
|
|
4886
|
-
writeFileSync(file, JSON.stringify({ ...extra, disableAllHooks: true }));
|
|
4887
|
-
return file;
|
|
4888
|
-
}
|
|
4889
|
-
function parseHistory(raw) {
|
|
4890
|
-
if (!Array.isArray(raw)) return [];
|
|
4891
|
-
return raw.flatMap((item) => {
|
|
4892
|
-
if (!item || typeof item !== "object") return [];
|
|
4893
|
-
const { question, answer } = item;
|
|
4894
|
-
return typeof question === "string" && typeof answer === "string" ? [{ question, answer }] : [];
|
|
4895
|
-
});
|
|
4896
|
-
}
|
|
4897
|
-
function registerSideQuestionHandler(rpc, deps) {
|
|
4898
|
-
const now = deps.now ?? (() => Date.now());
|
|
4899
|
-
const retainMs = deps.retainMs ?? SIDE_QUESTION_RETAIN_MS;
|
|
4900
|
-
const maxRunMs = deps.maxRunMs ?? SIDE_QUESTION_MAX_RUN_MS;
|
|
4901
|
-
const fork = deps.run ?? (async (input) => {
|
|
4902
|
-
const { query } = await import('./index-DEN6vfEY.mjs');
|
|
4903
|
-
return runSideQuestion(query, input);
|
|
4904
|
-
});
|
|
4905
|
-
const run = async (input, live) => {
|
|
4906
|
-
if (!live) return fork(input);
|
|
4907
|
-
try {
|
|
4908
|
-
return await runSideQuestionLive(live.ask, input);
|
|
4909
|
-
} catch (error) {
|
|
4910
|
-
if (input.signal?.aborted || !isUnsupportedSideQuestionError(error)) throw error;
|
|
4911
|
-
logger.debug(`[btw] live side question unsupported by this CLI, forking instead: ${error instanceof Error ? error.message : String(error)}`);
|
|
4912
|
-
return fork(input);
|
|
4913
|
-
}
|
|
4914
|
-
};
|
|
4915
|
-
const slots = /* @__PURE__ */ new Map();
|
|
4916
|
-
let active = null;
|
|
4917
|
-
const prune = () => {
|
|
4918
|
-
const t = now();
|
|
4919
|
-
for (const [id, slot] of slots) {
|
|
4920
|
-
if (slot.status !== "running" && slot.finishedAt !== void 0 && t - slot.finishedAt > retainMs) slots.delete(id);
|
|
4921
|
-
}
|
|
4922
|
-
};
|
|
4923
|
-
const finish = (slot, status, error) => {
|
|
4924
|
-
if (slot.status !== "running") return;
|
|
4925
|
-
slot.status = status;
|
|
4926
|
-
slot.error = error;
|
|
4927
|
-
slot.finishedAt = now();
|
|
4928
|
-
if (active === slot) active = null;
|
|
4929
|
-
};
|
|
4930
|
-
rpc.registerHandler("btw-ask", async (request) => {
|
|
4931
|
-
const question = typeof request?.question === "string" ? request.question.trim() : "";
|
|
4932
|
-
if (!question) throw new Error("Side question is empty");
|
|
4933
|
-
if (question.length > SIDE_QUESTION_MAX_CHARS) throw new Error("Side question is too long");
|
|
4934
|
-
prune();
|
|
4935
|
-
if (active) {
|
|
4936
|
-
const stale = active;
|
|
4937
|
-
stale.abort.abort("superseded");
|
|
4938
|
-
finish(stale, "cancelled");
|
|
4939
|
-
logger.debug(`[btw] side question ${stale.requestId} superseded by a new ask`);
|
|
4940
|
-
}
|
|
4941
|
-
const candidate = deps.getLiveQuery?.() ?? null;
|
|
4942
|
-
const live = candidate && candidate.canControl() ? candidate : null;
|
|
4943
|
-
const resumeSessionId = deps.getClaudeSessionId() ?? null;
|
|
4944
|
-
const slot = {
|
|
4945
|
-
requestId: randomUUID(),
|
|
4946
|
-
status: "running",
|
|
4947
|
-
text: "",
|
|
4948
|
-
startedAt: now(),
|
|
4949
|
-
abort: new AbortController()
|
|
4950
|
-
};
|
|
4951
|
-
slots.set(slot.requestId, slot);
|
|
4952
|
-
active = slot;
|
|
4953
|
-
logger.debug(`[btw] side question ${slot.requestId} start (${live ? "live" : resumeSessionId ? "fork" : "no-context"})`);
|
|
4954
|
-
const deadline = setTimeout(() => {
|
|
4955
|
-
if (slot.status !== "running") return;
|
|
4956
|
-
slot.abort.abort("timeout");
|
|
4957
|
-
finish(slot, "error", "Side question timed out");
|
|
4958
|
-
logger.debug(`[btw] side question ${slot.requestId} timed out after ${maxRunMs}ms`);
|
|
4959
|
-
}, maxRunMs);
|
|
4960
|
-
deadline.unref?.();
|
|
4961
|
-
void run({
|
|
4962
|
-
question,
|
|
4963
|
-
history: parseHistory(request.history),
|
|
4964
|
-
resumeSessionId,
|
|
4965
|
-
cwd: deps.cwd,
|
|
4966
|
-
model: deps.getModel(),
|
|
4967
|
-
env: deps.getEnv?.(),
|
|
4968
|
-
settingsPath: deps.settingsPath,
|
|
4969
|
-
signal: slot.abort.signal,
|
|
4970
|
-
onText: (text) => {
|
|
4971
|
-
if (slot.status === "running") slot.text = text;
|
|
4972
|
-
}
|
|
4973
|
-
}, live).then((result) => {
|
|
4974
|
-
slot.text = result.answer;
|
|
4975
|
-
finish(slot, "done");
|
|
4976
|
-
logger.debug(`[btw] side question ${slot.requestId} done (${result.mode ?? "fork"}, ${result.answer.length} chars)`);
|
|
4977
|
-
}).catch((error) => {
|
|
4978
|
-
const message = error instanceof Error ? error.message : String(error);
|
|
4979
|
-
if (slot.abort.signal.aborted) {
|
|
4980
|
-
finish(slot, "cancelled");
|
|
4981
|
-
} else {
|
|
4982
|
-
finish(slot, "error", message);
|
|
4983
|
-
logger.debug(`[btw] side question ${slot.requestId} failed: ${message}`);
|
|
4984
|
-
}
|
|
4985
|
-
}).finally(() => clearTimeout(deadline));
|
|
4986
|
-
return { requestId: slot.requestId, hadContext: live ? true : Boolean(resumeSessionId), mode: live ? "live" : "fork" };
|
|
4987
|
-
});
|
|
4988
|
-
rpc.registerHandler("btw-poll", async (request) => {
|
|
4989
|
-
prune();
|
|
4990
|
-
const id = typeof request?.requestId === "string" ? request.requestId : "";
|
|
4991
|
-
const slot = slots.get(id);
|
|
4992
|
-
if (!slot) throw new Error("Unknown side question");
|
|
4993
|
-
return {
|
|
4994
|
-
requestId: slot.requestId,
|
|
4995
|
-
status: slot.status,
|
|
4996
|
-
text: slot.text,
|
|
4997
|
-
error: slot.error,
|
|
4998
|
-
startedAt: slot.startedAt,
|
|
4999
|
-
finishedAt: slot.finishedAt
|
|
5000
|
-
};
|
|
5001
|
-
});
|
|
5002
|
-
rpc.registerHandler("btw-cancel", async (request) => {
|
|
5003
|
-
const id = typeof request?.requestId === "string" ? request.requestId : "";
|
|
5004
|
-
const slot = slots.get(id);
|
|
5005
|
-
if (!slot || slot.status !== "running") return { cancelled: false };
|
|
5006
|
-
slot.abort.abort("cancelled by user");
|
|
5007
|
-
finish(slot, "cancelled");
|
|
5008
|
-
return { cancelled: true };
|
|
5009
|
-
});
|
|
5010
|
-
return {
|
|
5011
|
-
/** Test/introspection hook. */
|
|
5012
|
-
_slots: slots
|
|
5013
|
-
};
|
|
5014
|
-
}
|
|
5015
|
-
|
|
5016
4728
|
function replayClaudeForkJsonl(file, sink) {
|
|
5017
4729
|
let replayed = 0;
|
|
5018
4730
|
for (const line of file.split("\n")) {
|
|
@@ -5324,4 +5036,4 @@ function resolveMessageMode(current, meta, ctx) {
|
|
|
5324
5036
|
};
|
|
5325
5037
|
}
|
|
5326
5038
|
|
|
5327
|
-
export { BoardAnalyzer, FileRateLimiter, PrewarmHookGate, RawJSONLinesSchema, acquirePrewarmSlot, claudeCheckSession, claudeModeHash, claudePrewarmEligibility, claudePrewarmSessionEligibility, cleanupHookSettingsFile, contentLogMetadata, createClaudePrewarmLease, disposeAllClaudePrewarms, evaluatePrewarmPrediction, formatPrewarmLine, generateHookSettingsFile, getProjectPath, loop, parseSpecialCommand, prewarmCacheFile, prewarmPredictionMeta, prewarmSlotDir, readPrewarmCache,
|
|
5039
|
+
export { BoardAnalyzer, FileRateLimiter, PrewarmHookGate, RawJSONLinesSchema, acquirePrewarmSlot, claudeCheckSession, claudeModeHash, claudePrewarmEligibility, claudePrewarmSessionEligibility, cleanupHookSettingsFile, contentLogMetadata, createClaudePrewarmLease, disposeAllClaudePrewarms, evaluatePrewarmPrediction, formatPrewarmLine, generateHookSettingsFile, getProjectPath, loop, parseSpecialCommand, prewarmCacheFile, prewarmPredictionMeta, prewarmSlotDir, readPrewarmCache, replayClaudeForkJsonl, resolveMessageMode, startHookServer, withAssistantDenylist, writePrewarmCache };
|