very-happy-cli 0.2.188 → 0.2.190
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-2loP7MpF.mjs → AcpBackend-Dd1h-Rgt.mjs} +3 -3
- package/dist/{AcpBackend-B8AYkp5n.cjs → AcpBackend-dkRv9QHm.cjs} +3 -3
- package/dist/{AcpSessionManager-CLqo9R9Y.cjs → AcpSessionManager-AqWAqahm.cjs} +3 -3
- package/dist/{AcpSessionManager-C17doAoR.mjs → AcpSessionManager-QBZ-CIf7.mjs} +4 -4
- package/dist/{BasePermissionHandler-CrfyUmqO.mjs → BasePermissionHandler-CLp1ge-4.mjs} +1 -1
- package/dist/{BasePermissionHandler-C8UEcFz0.cjs → BasePermissionHandler-CpSugp7Z.cjs} +1 -1
- package/dist/{acpSessionResume-OuYlLGxL.cjs → acpSessionResume-CZao6QEd.cjs} +1 -1
- package/dist/{acpSessionResume-F705a1cF.mjs → acpSessionResume-CcpDuIO5.mjs} +1 -1
- package/dist/{agentHome-Dc7LYF3d.mjs → agentHome-BJGRA2Kx.mjs} +4 -4
- package/dist/{agentHome-DsKHJ_Sf.cjs → agentHome-fIUqT-pn.cjs} +4 -4
- package/dist/{api-BOqjYd5r.cjs → api-CXL6jp-p.cjs} +18 -9
- package/dist/{api-DNKa7kVy.mjs → api-Dw8gFsQi.mjs} +19 -10
- package/dist/{apiMachine-Di1G9ECW.mjs → apiMachine-BBNEtjf7.mjs} +56 -15
- package/dist/{apiMachine--rcPpMmt.cjs → apiMachine-C6UqHoPF.cjs} +55 -14
- package/dist/{attachmentContent-C9S4ekAz.mjs → attachmentContent-CC4yIrSm.mjs} +2 -2
- package/dist/{attachmentContent-BFRMLong.cjs → attachmentContent-NmVfKp-B.cjs} +2 -2
- package/dist/{auth-CXmI92aj.cjs → auth-Bb_SL2os.cjs} +5 -5
- package/dist/{auth-Bzwo_vOM.mjs → auth-Bh6SUoGi.mjs} +8 -8
- package/dist/{auth-BNhhk2Fr.mjs → auth-Bj0psrD2.mjs} +5 -5
- package/dist/{auth-CQtfznF0.cjs → auth-DKa4MsAi.cjs} +8 -8
- package/dist/{auto-DXLdaX5O.cjs → auto-C9Qohh0P.cjs} +17 -16
- package/dist/{auto-DHYOLnXB.mjs → auto-DK7pbCnV.mjs} +19 -18
- package/dist/{bootstrap-Di38SnpN.mjs → bootstrap-Ct9Nb4sv.mjs} +2 -2
- package/dist/{bootstrap-eJ1l7VYl.cjs → bootstrap-DBJB0y-H.cjs} +2 -2
- package/dist/{browser-6Cg7G6bb.mjs → browser-BGxDRhHy.mjs} +1 -1
- package/dist/{browser-D3uBFRQu.cjs → browser-CLJWcodR.cjs} +1 -1
- package/dist/{claudeLocal-BBaE4QF_.cjs → claudeLocal-B6YDYlnY.cjs} +4 -4
- package/dist/{claudeLocal-CqaEs-81.mjs → claudeLocal-Ux31hZyC.mjs} +5 -5
- package/dist/{claudeLocalLauncher-BDUPxtsI.mjs → claudeLocalLauncher-D06QijMw.mjs} +10 -10
- package/dist/{claudeLocalLauncher-wPxKtH_P.cjs → claudeLocalLauncher-DFvmF8rC.cjs} +9 -9
- package/dist/{claudeSessionFork-DzWFzj9m.mjs → claudeSessionFork-D2GI7P59.mjs} +1 -1
- package/dist/{claudeSessionFork-CmY25Fl3.cjs → claudeSessionFork-DTLZ2rek.cjs} +1 -1
- package/dist/{client-DmY03OZZ.cjs → client-Bffkrs5p.cjs} +2 -2
- package/dist/{client-C2HcMqRF.cjs → client-CARZ_lNS.cjs} +3 -3
- package/dist/{client-agH03Irm.cjs → client-CMKGrnmT.cjs} +2 -2
- package/dist/{client-DWws_aQK.mjs → client-CnGNYidN.mjs} +2 -2
- package/dist/{client-qJ0y8fus.mjs → client-CtL0Vtww.mjs} +4 -4
- package/dist/{client-DcDE6Ifk.mjs → client-DZkBUoh9.mjs} +2 -2
- package/dist/codex/happyMcpStdioBridge.cjs +16 -15
- package/dist/codex/happyMcpStdioBridge.mjs +17 -16
- package/dist/{codexAppServerClient-DgE99i7X.mjs → codexAppServerClient-CLc5nhLT.mjs} +37 -6
- package/dist/{codexAppServerClient-DwzC8LR0.cjs → codexAppServerClient-CpT9F6EM.cjs} +37 -6
- package/dist/{codexCommand-1vFEA1KT.cjs → codexCommand-39kH99SJ.cjs} +148 -61
- package/dist/{codexCommand-DUSVzbKh.mjs → codexCommand-Dliq3EBv.mjs} +143 -56
- package/dist/{codexTermination-DuDPyBRR.cjs → codexTermination-ByW7tRjr.cjs} +1 -1
- package/dist/{codexTermination-Bybovr2z.mjs → codexTermination-ORIw0gpU.mjs} +1 -1
- package/dist/{codexThreadFork-DNekT4nQ.cjs → codexThreadFork-5kwoKjMu.cjs} +11 -17
- package/dist/{codexThreadFork-R76RU5H0.mjs → codexThreadFork-DobPd19R.mjs} +11 -17
- package/dist/{config-C4xOL5bH.cjs → config-CeIzCsfj.cjs} +3 -3
- package/dist/{config-BrzZ0O-6.mjs → config-CxSsGO1Z.mjs} +3 -3
- package/dist/{configuration-BZHpFD7K.mjs → configuration-Dechcvd-.mjs} +1 -1
- package/dist/{configuration-DyPW9mVa.cjs → configuration-Dt5lKW3P.cjs} +1 -1
- package/dist/{connect-DurKwMEo.cjs → connect-NPDzIVC6.cjs} +12 -12
- package/dist/{connect-Cw_INlj8.mjs → connect-UwQHvCpR.mjs} +13 -13
- package/dist/{context-2xDvjkQp.cjs → context-BdZssgF0.cjs} +1 -1
- package/dist/{context-t7YV0aZc.mjs → context-C9JbJoNe.mjs} +1 -1
- package/dist/{controlClient-DvFaPsg6.cjs → controlClient-BRk65BRO.cjs} +3 -3
- package/dist/{controlClient-Bw56NIrj.mjs → controlClient-D7NGfmtq.mjs} +3 -3
- package/dist/{createSessionMetadata-Dpg6bV6f.cjs → createSessionMetadata-B_HZCDj_.cjs} +2 -2
- package/dist/{createSessionMetadata-Dn5BkLfU.mjs → createSessionMetadata-DyhFKAby.mjs} +2 -2
- package/dist/defaultPermissionMode-BnxJPVHT.mjs +4 -0
- package/dist/defaultPermissionMode-CxmTXUQR.cjs +7 -0
- package/dist/{deterministicJson-D0BrV1FD.cjs → deterministicJson-BEygolBQ.cjs} +12 -12
- package/dist/{deterministicJson-CsRckxVq.mjs → deterministicJson-DNmMVhFu.mjs} +13 -13
- package/dist/{doctor-CYe4d9kU.cjs → doctor-B9lW1WlG.cjs} +7 -7
- package/dist/{doctor-B4HQiW6j.mjs → doctor-BdBi7TFZ.mjs} +7 -7
- package/dist/{downloadTarget-tYMV_VHo.mjs → downloadTarget-CGojGjaN.mjs} +6 -6
- package/dist/{downloadTarget-CuhBVvuC.cjs → downloadTarget-DS0zT2AU.cjs} +6 -6
- package/dist/{ensureDaemonRunning-DVtIG9z7.mjs → ensureDaemonRunning-BOdbryDM.mjs} +5 -5
- package/dist/{ensureDaemonRunning-Ce3BlWiR.cjs → ensureDaemonRunning-Bibp6vhe.cjs} +5 -5
- package/dist/exitAfterFlush-AbKNZM0N.mjs +23 -0
- package/dist/exitAfterFlush-DIT_sIxR.cjs +25 -0
- package/dist/{handleResumeCommand-BU1uMNyv.mjs → handleResumeCommand-CgLzBYne.mjs} +5 -5
- package/dist/{handleResumeCommand-CLxsmAW0.cjs → handleResumeCommand-DXOuWr4p.cjs} +5 -5
- package/dist/{agentAttachments-Dbw8iMCZ.cjs → heldInput-BOtqFO2r.cjs} +27 -0
- package/dist/heldInput-C69lA2dH.mjs +44 -0
- package/dist/{index-KwuXqLwe.cjs → index-Bs5FD8JF.cjs} +4 -4
- package/dist/{index-ChX0eVXw.mjs → index-CBHfkQNY.mjs} +142 -60
- package/dist/{index-DoXbGEAi.cjs → index-CwRW11hT.cjs} +3 -3
- package/dist/{index-CVHRt3SS.mjs → index-DUByZsKe.mjs} +4 -4
- package/dist/{index-wWJJAQRk.cjs → index-DXSIi6j_.cjs} +4 -4
- package/dist/{index-DDz0Ftoy.mjs → index-Db0HIC-k.mjs} +4 -4
- package/dist/{index-WKyN-bNy.mjs → index-DmqsRnV7.mjs} +1 -1
- package/dist/{index-DG1kGjkF.cjs → index-f8oDidjV.cjs} +142 -60
- package/dist/{index-B1OxWiNG.mjs → index-rNTX33in.mjs} +3 -3
- package/dist/index.cjs +2 -2
- package/dist/index.mjs +2 -2
- package/dist/{install-cAYvHxXR.cjs → install-CXIL_FYx.cjs} +3 -3
- package/dist/{install-CMa_FOWu.mjs → install-DfPrEWGG.mjs} +3 -3
- package/dist/lib.cjs +11 -11
- package/dist/lib.d.cts +61 -1
- package/dist/lib.d.mts +61 -1
- package/dist/lib.mjs +12 -12
- package/dist/{lidState-D-lsD1FS.mjs → lidState-D0DF20oG.mjs} +1 -1
- package/dist/{lidState-d1vgQ3n7.cjs → lidState-q_XFYg33.cjs} +1 -1
- package/dist/{localHappyAgentAuth-wvDp-nGj.mjs → localHappyAgentAuth-BBhM4Qk1.mjs} +1 -1
- package/dist/{localHappyAgentAuth-DucSnCg3.cjs → localHappyAgentAuth-CKNW-MXw.cjs} +1 -1
- package/dist/{logger-C3vZG6Q0.cjs → logger-BBRTTVsQ.cjs} +2 -2
- package/dist/{logger-RpzJ4d8V.mjs → logger-CL7pin9b.mjs} +2 -2
- package/dist/{machineMetadata-CiQ2_1Mq.mjs → machineMetadata-DP06qdBk.mjs} +3 -3
- package/dist/{machineMetadata-CAvFq1Jg.cjs → machineMetadata-DnFNlrVK.cjs} +3 -3
- package/dist/{main-ChpYcFZi.cjs → main-DLOXykOR.cjs} +49 -48
- package/dist/{main-IPhaImjm.mjs → main-DO7nRvhf.mjs} +49 -48
- package/dist/{mcp-CWnMvju6.mjs → mcp-C-4sPTae.mjs} +16 -15
- package/dist/{mcp-2xF232hL.cjs → mcp-Du0MgR7e.cjs} +15 -14
- package/dist/{mirrorProtocol-CVzPObON.cjs → mirrorProtocol-GuWMxLkh.cjs} +2 -2
- package/dist/{mirrorProtocol-Dr7fNq8V.mjs → mirrorProtocol-dkq2ZENA.mjs} +3 -3
- package/dist/{package-CwB8rFJt.mjs → package-C6uiXULx.mjs} +7 -7
- package/dist/{package-Gnf_935w.cjs → package-DrY090nZ.cjs} +7 -7
- package/dist/{panels-DTlTsndU.cjs → panels-4DRBKHZP.cjs} +5 -5
- package/dist/{panels-L1mSkC-y.mjs → panels-DXYdJA6n.mjs} +5 -5
- package/dist/{peerTools-C1E5cQ86.cjs → peerTools-5ZM4spcZ.cjs} +5 -5
- package/dist/{peerTools-2_8Bw9PU.mjs → peerTools-dY1aJez4.mjs} +5 -5
- package/dist/{persistence-CqtjFiD1.cjs → persistence-Bl5S3TLB.cjs} +6 -2
- package/dist/{persistence-Bn4qEbDg.mjs → persistence-Dogj7JIp.mjs} +6 -3
- package/dist/{piRunnerArgs-BI8yQRBZ.cjs → piRunnerArgs-C3jZ1M6b.cjs} +1 -1
- package/dist/{piRunnerArgs-DWBb63W9.mjs → piRunnerArgs-D8nN_Iit.mjs} +1 -1
- package/dist/{piRuntime--mQ43MSM.cjs → piRuntime-Bd9-eq6M.cjs} +1 -1
- package/dist/{piRuntime-Do8oqbm3.mjs → piRuntime-BoeMsAXK.mjs} +1 -1
- package/dist/{piTerminal-BzcvLFsP.cjs → piTerminal-C3j1ca3x.cjs} +17 -16
- package/dist/{piTerminal-GC1KHTYQ.mjs → piTerminal-GEPkIGD4.mjs} +18 -17
- package/dist/{pushNotifications-Bb-QSqXw.cjs → pushNotifications-CfspRcl-.cjs} +20 -2
- package/dist/{pushNotifications-BThg4nVd.mjs → pushNotifications-dUceOIni.mjs} +21 -3
- package/dist/{query-Bz3pocKH.cjs → query-DjsVgG3E.cjs} +1 -1
- package/dist/{query-CkgIJ_Dy.mjs → query-iYH-tm7L.mjs} +1 -1
- package/dist/{rateLimitReporter-BkHyvLru.cjs → rateLimitReporter-DUu2KydZ.cjs} +3 -3
- package/dist/{rateLimitReporter-Iw4k3Bbr.mjs → rateLimitReporter-jeVi-fym.mjs} +3 -3
- package/dist/{rateLimitWindows-Bm_dcQGW.cjs → rateLimitWindows-Bx3ROBP5.cjs} +1 -1
- package/dist/{rateLimitWindows-CQ4tIQnx.mjs → rateLimitWindows-CEn0DXaX.mjs} +1 -1
- package/dist/{registerCommonHandlers-CIs6H2DV.cjs → registerCommonHandlers-Beun-cQv.cjs} +2 -2
- package/dist/{registerCommonHandlers-CaWl9ll1.mjs → registerCommonHandlers-DWZ7mfdt.mjs} +2 -2
- package/dist/{specialCommands-BsvSoDhC.cjs → registerKillSessionHandler-CA1FFr_F.cjs} +15 -62
- package/dist/{specialCommands-DHU7TNeK.mjs → registerKillSessionHandler-CzgklwLG.mjs} +17 -60
- package/dist/{remoteSessionClient-uPj7omsw.mjs → remoteSessionClient-BiC2KDew.mjs} +5 -5
- package/dist/{remoteSessionClient-DgUMfPW4.cjs → remoteSessionClient-DGFI__5Z.cjs} +5 -5
- package/dist/{reportProgressTool-DUEq3xAL.mjs → reportProgressTool-CgPy6n_7.mjs} +3 -3
- package/dist/{reportProgressTool-CaJ8EwLq.cjs → reportProgressTool-CvPGov1F.cjs} +2 -2
- package/dist/{run-DTUJBD6p.mjs → run-B_gFgJVB.mjs} +393 -42
- package/dist/{run-DyyGMqND.cjs → run-rPqQwDi_.cjs} +391 -40
- package/dist/{runClaude-DTNvIz2J.mjs → runClaude-CykqeXK7.mjs} +26 -23
- package/dist/{runClaude-8JDaPoGQ.cjs → runClaude-DM8gm8iu.cjs} +27 -24
- package/dist/{runClaudeDeps-CgGkgg7e.mjs → runClaudeDeps-D2phXGut.mjs} +106 -46
- package/dist/{runClaudeDeps-BeLo5zss.cjs → runClaudeDeps-DGAomimZ.cjs} +101 -40
- package/dist/{runGemini-BSOdU563.cjs → runGemini-CXTeSOZp.cjs} +50 -49
- package/dist/{runGemini-eU8UOzfc.mjs → runGemini-CtWCVkj5.mjs} +49 -48
- package/dist/{runOpenClaw-D8RZiA1e.mjs → runOpenClaw-BBdjlViJ.mjs} +25 -24
- package/dist/{runOpenClaw-CYyFoGRZ.cjs → runOpenClaw-CH_9_RyZ.cjs} +26 -25
- package/dist/{sandbox-C8zfNX-4.cjs → sandbox-Bb5IMun3.cjs} +4 -4
- package/dist/{sandbox-DlPahdhl.mjs → sandbox-DGmXZ6Zz.mjs} +4 -4
- package/dist/selfCheck-BfK945YQ.mjs +86 -0
- package/dist/{selfCheck-D28nvuPJ.cjs → selfCheck-CccwNTTK.cjs} +37 -37
- package/dist/{send-DBpv-1eh.mjs → send-B6rHg8GT.mjs} +9 -8
- package/dist/{send-C58kX4qz.cjs → send-BpiXPkDo.cjs} +9 -8
- package/dist/{server-J5K6pOox.mjs → server-BkdAyHhC.mjs} +4 -4
- package/dist/{server-I_CETZzn.cjs → server-DHUzjApC.cjs} +6 -6
- package/dist/{sessionLock-DjE7O0LS.cjs → sessionLock-BFBReiKq.cjs} +134 -3
- package/dist/{sessionLock-C7Wg1RVd.mjs → sessionLock-Ca_bIo50.mjs} +121 -4
- package/dist/{sessionOps-CYjMT7Ad.mjs → sessionOps-CA2kpm66.mjs} +36 -5
- package/dist/{sessionOps-DGMpl9NB.cjs → sessionOps-DeWVqpe4.cjs} +36 -4
- package/dist/{sessionProvider-DVtxrOuM.cjs → sessionProvider-VFbtUmMR.cjs} +5 -5
- package/dist/{sessionProvider-TLiFn9kD.mjs → sessionProvider-g18IiK74.mjs} +5 -5
- package/dist/{sessionScanner-BZ1ZSn6I.cjs → sessionScanner-CGzsN8V6.cjs} +3 -3
- package/dist/{sessionScanner-CknV1IlN.mjs → sessionScanner-DDDud5re.mjs} +3 -3
- package/dist/{sessions-DU4bxkap.mjs → sessions-B4d50sCI.mjs} +36 -26
- package/dist/{sessions-CTkBKs5U.cjs → sessions-CKJPWFgu.cjs} +37 -25
- package/dist/{setupOfflineReconnection-DaOXnGuH.mjs → setupOfflineReconnection-CyPNgyCe.mjs} +2 -2
- package/dist/{setupOfflineReconnection-CQHNuP_0.cjs → setupOfflineReconnection-DPXRo_zf.cjs} +2 -2
- package/dist/{spawn-C0wZc03S.cjs → spawn-CgSJzzWS.cjs} +17 -16
- package/dist/{spawn-DdnYTtQe.mjs → spawn-CrYN_OOT.mjs} +18 -17
- package/dist/{spawnAgents-BjyU78Ue.cjs → spawnAgents-C1-4m7aN.cjs} +3 -1
- package/dist/{spawnAgents-D-7wMw-a.mjs → spawnAgents-DWCDYCQ1.mjs} +4 -2
- package/dist/{spawnHappyCLI-BJUd974I.cjs → spawnHappyCLI-CTy3p6V_.cjs} +1 -1
- package/dist/{spawnHappyCLI-CnyyJk74.mjs → spawnHappyCLI-DjbkiSH1.mjs} +1 -1
- package/dist/specialCommands-J3JFOq0J.cjs +60 -0
- package/dist/specialCommands-MXUN0wfI.mjs +54 -0
- package/dist/{startFileWatcher-DBboREco.cjs → startFileWatcher-BQs0cJA-.cjs} +1 -1
- package/dist/{startFileWatcher-CpO5Mwbr.mjs → startFileWatcher-Dedtu1vq.mjs} +1 -1
- package/dist/{defaultPermissionMode-DMTnlccv.mjs → startupSessionCreate-BKFU4v_h.mjs} +25 -6
- package/dist/{defaultPermissionMode-Dlm0q1m0.cjs → startupSessionCreate-Dxy3X4DG.cjs} +25 -7
- package/dist/{streamRelay-CqBynIon.mjs → streamRelay-P9e7Sohm.mjs} +1 -1
- package/dist/{sync-6HFRJP1h.cjs → sync-DtWB7RzA.cjs} +1 -1
- package/dist/{sync-I8NYmycF.mjs → sync-eZkXnsW_.mjs} +1 -1
- package/dist/{systemPrompt-BDWj5QSL.cjs → systemPrompt-2XOpZ1j6.cjs} +1 -1
- package/dist/{systemPrompt-C1RSY_60.mjs → systemPrompt-Bn6g6aCH.mjs} +2 -2
- package/dist/{teams-eUD7ymif.cjs → teams-ecFay4Gn.cjs} +6 -6
- package/dist/{teams-GpLFbXXE.mjs → teams-nadkqrbW.mjs} +7 -7
- package/dist/{template-CEK8MEjo.mjs → template-BiTD-jI9.mjs} +1 -1
- package/dist/{time-umG7yHkb.mjs → time-CN3TuSVG.mjs} +1 -1
- package/dist/{time-BAJRbB6U.cjs → time-gPD_EmA-.cjs} +1 -1
- package/dist/{titleGenerator-dmFlxkRs.mjs → titleGenerator-DgzTQdn2.mjs} +1 -1
- package/dist/{titleGenerator-iqb2jOF1.cjs → titleGenerator-lT5ldPuN.cjs} +2 -2
- package/dist/{todo-DsR7WnQS.cjs → todo-B1VeMk5A.cjs} +5 -5
- package/dist/{todo-CT4AJ3sH.mjs → todo-BIxd7l2Q.mjs} +6 -6
- package/dist/{tools-30E66QL_.cjs → tools-DvqbLsCF.cjs} +1 -1
- package/dist/{tools-BOWazSD6.mjs → tools-zXJpxiG_.mjs} +1 -1
- package/dist/{uninstall-DImXs6VZ.mjs → uninstall-9htK6mb7.mjs} +3 -3
- package/dist/{uninstall-BtTc9hHa.cjs → uninstall-CvIOpwB5.cjs} +3 -3
- package/package.json +7 -7
- package/dist/agentAttachments-M_B5qEF2.mjs +0 -18
- package/dist/selfCheck-4bcdHPFQ.mjs +0 -86
- package/dist/startupSessionCreate-BgaVuvQp.mjs +0 -24
- package/dist/startupSessionCreate-C1u2dtz8.cjs +0 -26
|
@@ -1,62 +1,63 @@
|
|
|
1
1
|
import os from 'node:os';
|
|
2
|
-
import { c as claimSessionOrExit, a as applyServerSnapshot, b as applyReconnectReplay, w as withoutServerSnapshot, m as mergeReconnectMetadata, e as exitCursorStamp } from './sessionLock-
|
|
3
|
-
import { r as readSettings, H as HIBERNATION_CAPABILITY, a as resolveCheckMs, l as latchKeepAwake, e as evaluateWrapperIdle } from './persistence-
|
|
4
|
-
import {
|
|
2
|
+
import { A as AUTO_RESTART_CAPABILITY, c as claimSessionOrExit, a as applyServerSnapshot, b as applyReconnectReplay, w as withoutServerSnapshot, m as mergeReconnectMetadata, t as takeAutoRestartedEvent, e as exitCursorStamp } from './sessionLock-Ca_bIo50.mjs';
|
|
3
|
+
import { r as readSettings, H as HIBERNATION_CAPABILITY, a as resolveCheckMs, l as latchKeepAwake, e as evaluateWrapperIdle } from './persistence-Dogj7JIp.mjs';
|
|
4
|
+
import { c as createSessionForStartup, H as HibernationProbe, a as commitHibernation } from './startupSessionCreate-BKFU4v_h.mjs';
|
|
5
5
|
import { randomUUID } from 'node:crypto';
|
|
6
|
-
import { c as connectionState, A as ApiClient, s as startOfflineReconnection } from './api-
|
|
7
|
-
import { l as logger } from './logger-
|
|
8
|
-
import { s as spawnOriginTags, a as sessionWorktreeMetadata } from './createSessionMetadata-
|
|
9
|
-
import { p as packageJson } from './package-
|
|
10
|
-
import { P as PROMPT_QUEUE_CAPABILITY, a as PROJECT_SESSION_CAPABILITY } from './index-
|
|
6
|
+
import { c as connectionState, A as ApiClient, s as startOfflineReconnection } from './api-Dw8gFsQi.mjs';
|
|
7
|
+
import { l as logger } from './logger-CL7pin9b.mjs';
|
|
8
|
+
import { s as spawnOriginTags, a as sessionWorktreeMetadata } from './createSessionMetadata-DyhFKAby.mjs';
|
|
9
|
+
import { p as packageJson } from './package-C6uiXULx.mjs';
|
|
10
|
+
import { P as PROMPT_QUEUE_CAPABILITY, a as PROJECT_SESSION_CAPABILITY } from './index-DmqsRnV7.mjs';
|
|
11
11
|
import { F as FORK_BACKFILL_CAPABILITY, p as publishForkBackfillWhenCommitted } from './forkBackfill-DYIjlN1Z.mjs';
|
|
12
|
-
import { c as configuration } from './configuration-
|
|
12
|
+
import { c as configuration } from './configuration-Dechcvd-.mjs';
|
|
13
13
|
import { l as loadSessionProvider, a as applyProviderEnv } from './providerBinding-CYubGg-Z.mjs';
|
|
14
|
-
import { n as notifyDaemonSessionStarted, c as checkDaemonHibernation } from './controlClient-
|
|
15
|
-
import { g as getInitialMachineMetadata } from './machineMetadata-
|
|
14
|
+
import { n as notifyDaemonSessionStarted, c as checkDaemonHibernation } from './controlClient-D7NGfmtq.mjs';
|
|
15
|
+
import { g as getInitialMachineMetadata } from './machineMetadata-DP06qdBk.mjs';
|
|
16
16
|
import { p as projectPath } from './projectPath-BTBIMB57.mjs';
|
|
17
17
|
import { resolve, join } from 'node:path';
|
|
18
|
-
import { c as createSessionForStartup } from './startupSessionCreate-BgaVuvQp.mjs';
|
|
19
18
|
import { a as applySandboxPermissionPolicy, r as resolveInitialClaudePermissionMode, m as mapToClaudeMode, b as reconcilePublishedPermissionMode } from './permissionMode-CH4FoZfU.mjs';
|
|
20
19
|
import { d as decodeBase64, e as encodeBase64 } from './authRelay-DhQhkBvX.mjs';
|
|
21
20
|
import { readFile } from 'node:fs/promises';
|
|
22
|
-
import {
|
|
21
|
+
import { D as DEFAULT_CLAUDE_PERMISSION_MODE } from './defaultPermissionMode-BnxJPVHT.mjs';
|
|
22
|
+
import { C as CLAUDE_ATTACHMENT_KINDS, s as stripAttachmentManifest } from './attachmentContent-CC4yIrSm.mjs';
|
|
23
23
|
import { T as TranscriptPathHints } from './transcriptCursor-B7T_gkQ0.mjs';
|
|
24
24
|
import { p as planClaudeStartup } from './startupPlan-DFMyNgAs.mjs';
|
|
25
|
+
import './cliUpdate-Y34VGe9Y.mjs';
|
|
25
26
|
import 'node:fs';
|
|
26
27
|
import './processTreeSnapshot-CuLJDNC-.mjs';
|
|
27
28
|
import 'node:child_process';
|
|
28
29
|
import 'zod';
|
|
29
30
|
import 'axios';
|
|
30
|
-
import './lidState-
|
|
31
|
+
import './lidState-D0DF20oG.mjs';
|
|
31
32
|
import 'os';
|
|
32
33
|
import 'child_process';
|
|
33
34
|
import 'node:events';
|
|
34
35
|
import 'socket.io-client';
|
|
35
|
-
import './pushNotifications-
|
|
36
|
+
import './pushNotifications-dUceOIni.mjs';
|
|
36
37
|
import './contentLogMetadata-BlWI0egu.mjs';
|
|
37
38
|
import './limits-DIo7rEBR.mjs';
|
|
38
|
-
import './time-
|
|
39
|
-
import './registerCommonHandlers-
|
|
39
|
+
import './time-CN3TuSVG.mjs';
|
|
40
|
+
import './registerCommonHandlers-DWZ7mfdt.mjs';
|
|
40
41
|
import 'util';
|
|
41
42
|
import 'fs/promises';
|
|
42
43
|
import 'crypto';
|
|
43
44
|
import 'path';
|
|
44
45
|
import 'cross-spawn';
|
|
45
46
|
import '@paralleldrive/cuid2';
|
|
46
|
-
import './sync-
|
|
47
|
+
import './sync-eZkXnsW_.mjs';
|
|
47
48
|
import './backgroundTaskActivity-8PdPxrvy.mjs';
|
|
48
49
|
import 'chalk';
|
|
49
50
|
import 'node:util';
|
|
50
51
|
import './detectCLI-CSGMlV51.mjs';
|
|
51
52
|
import 'fs';
|
|
52
|
-
import './localHappyAgentAuth-
|
|
53
|
+
import './localHappyAgentAuth-BBhM4Qk1.mjs';
|
|
53
54
|
import 'tweetnacl';
|
|
54
55
|
import './fsMkdir-DumgLTzR.mjs';
|
|
55
56
|
import 'url';
|
|
56
57
|
|
|
57
58
|
const DEFAULT_CLAUDE_MODEL = void 0;
|
|
58
59
|
const DEFAULT_CLAUDE_EFFORT = void 0;
|
|
59
|
-
const importRunClaudeDeps = () => import('./runClaudeDeps-
|
|
60
|
+
const importRunClaudeDeps = () => import('./runClaudeDeps-D2phXGut.mjs');
|
|
60
61
|
async function runClaude(credentials, options = {}) {
|
|
61
62
|
logger.debug(`[CLAUDE] ===== CLAUDE MODE STARTING =====`);
|
|
62
63
|
logger.debug(`[CLAUDE] This is the Claude agent, NOT Gemini`);
|
|
@@ -70,7 +71,7 @@ async function runClaude(credentials, options = {}) {
|
|
|
70
71
|
const isAssistantVariant = process.env.HAPPY_SESSION_VARIANT === "assistant";
|
|
71
72
|
if (isAssistantVariant) {
|
|
72
73
|
try {
|
|
73
|
-
const { bootstrapAssistantHome } = await import('./bootstrap-
|
|
74
|
+
const { bootstrapAssistantHome } = await import('./bootstrap-Ct9Nb4sv.mjs');
|
|
74
75
|
await bootstrapAssistantHome();
|
|
75
76
|
} catch (error) {
|
|
76
77
|
logger.debug("[START] Assistant home bootstrap failed:", error);
|
|
@@ -145,7 +146,7 @@ async function runClaude(credentials, options = {}) {
|
|
|
145
146
|
// a brand-new session cannot pick a PDF until after sending once.
|
|
146
147
|
attachmentKinds: [...CLAUDE_ATTACHMENT_KINDS],
|
|
147
148
|
queueCancellation: true,
|
|
148
|
-
capabilities: ["claude-steer-v1", "claude-live-permission-v1", "claude-live-permission-v2", "claude-btw-v1", "claude-runtime-controls-v1", "claude-opus-5-5-v1", PROMPT_QUEUE_CAPABILITY, FORK_BACKFILL_CAPABILITY, HIBERNATION_CAPABILITY, PROJECT_SESSION_CAPABILITY],
|
|
149
|
+
capabilities: ["claude-steer-v1", "claude-live-permission-v1", "claude-live-permission-v2", "claude-btw-v1", "claude-runtime-controls-v1", "claude-opus-5-5-v1", PROMPT_QUEUE_CAPABILITY, FORK_BACKFILL_CAPABILITY, HIBERNATION_CAPABILITY, AUTO_RESTART_CAPABILITY, PROJECT_SESSION_CAPABILITY],
|
|
149
150
|
// Effective mode this process enforces. Kept current by
|
|
150
151
|
// publishPermissionMode below; the web renders it instead of guessing.
|
|
151
152
|
permissionMode: mapToClaudeMode(initialPermissionMode ?? "default"),
|
|
@@ -190,7 +191,7 @@ async function runClaude(credentials, options = {}) {
|
|
|
190
191
|
}
|
|
191
192
|
if (!response) {
|
|
192
193
|
let offlineSessionId = null;
|
|
193
|
-
const { claudeLocal } = await import('./claudeLocal-
|
|
194
|
+
const { claudeLocal } = await import('./claudeLocal-Ux31hZyC.mjs');
|
|
194
195
|
const { createSessionScanner: createSessionScanner2 } = await loadDeps();
|
|
195
196
|
const reconnection = startOfflineReconnection({
|
|
196
197
|
serverUrl: configuration.serverUrl,
|
|
@@ -919,6 +920,8 @@ async function runClaude(credentials, options = {}) {
|
|
|
919
920
|
});
|
|
920
921
|
hibernationProbe.start();
|
|
921
922
|
}
|
|
923
|
+
const autoUpdated = takeAutoRestartedEvent(process.env);
|
|
924
|
+
if (autoUpdated) session.sendSessionEvent(autoUpdated);
|
|
922
925
|
const exitCode = await loop({
|
|
923
926
|
path: workingDirectory,
|
|
924
927
|
model: options.model,
|
|
@@ -1,64 +1,65 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var os = require('node:os');
|
|
4
|
-
var sessionLock = require('./sessionLock-
|
|
5
|
-
var persistence = require('./persistence-
|
|
6
|
-
var
|
|
4
|
+
var sessionLock = require('./sessionLock-BFBReiKq.cjs');
|
|
5
|
+
var persistence = require('./persistence-Bl5S3TLB.cjs');
|
|
6
|
+
var startupSessionCreate = require('./startupSessionCreate-Dxy3X4DG.cjs');
|
|
7
7
|
var node_crypto = require('node:crypto');
|
|
8
|
-
var api = require('./api-
|
|
9
|
-
var logger = require('./logger-
|
|
10
|
-
var createSessionMetadata = require('./createSessionMetadata-
|
|
11
|
-
var _package = require('./package-
|
|
8
|
+
var api = require('./api-CXL6jp-p.cjs');
|
|
9
|
+
var logger = require('./logger-BBRTTVsQ.cjs');
|
|
10
|
+
var createSessionMetadata = require('./createSessionMetadata-B_HZCDj_.cjs');
|
|
11
|
+
var _package = require('./package-DrY090nZ.cjs');
|
|
12
12
|
var index = require('./index-BOe6dKnL.cjs');
|
|
13
13
|
var forkBackfill = require('./forkBackfill-8eLDeS73.cjs');
|
|
14
|
-
var configuration = require('./configuration-
|
|
14
|
+
var configuration = require('./configuration-Dt5lKW3P.cjs');
|
|
15
15
|
var providerBinding = require('./providerBinding-B-Qbx9W2.cjs');
|
|
16
|
-
var controlClient = require('./controlClient-
|
|
17
|
-
var machineMetadata = require('./machineMetadata-
|
|
16
|
+
var controlClient = require('./controlClient-BRk65BRO.cjs');
|
|
17
|
+
var machineMetadata = require('./machineMetadata-DnFNlrVK.cjs');
|
|
18
18
|
var projectPath = require('./projectPath-C3ioB4Bu.cjs');
|
|
19
19
|
var path = require('node:path');
|
|
20
|
-
var startupSessionCreate = require('./startupSessionCreate-C1u2dtz8.cjs');
|
|
21
20
|
var permissionMode = require('./permissionMode-CrV-XuMs.cjs');
|
|
22
21
|
var authRelay = require('./authRelay-Dy1qU9td.cjs');
|
|
23
22
|
var promises = require('node:fs/promises');
|
|
24
|
-
var
|
|
23
|
+
var defaultPermissionMode = require('./defaultPermissionMode-CxmTXUQR.cjs');
|
|
24
|
+
var attachmentContent = require('./attachmentContent-NmVfKp-B.cjs');
|
|
25
25
|
var transcriptCursor = require('./transcriptCursor-DcXGLeSc.cjs');
|
|
26
26
|
var startupPlan = require('./startupPlan-BLMbfQIH.cjs');
|
|
27
|
+
require('./cliUpdate-DsKXPFYp.cjs');
|
|
27
28
|
require('node:fs');
|
|
28
29
|
require('./processTreeSnapshot-mDbnuojn.cjs');
|
|
29
30
|
require('node:child_process');
|
|
30
31
|
require('zod');
|
|
31
32
|
require('axios');
|
|
32
|
-
require('./lidState-
|
|
33
|
+
require('./lidState-q_XFYg33.cjs');
|
|
33
34
|
require('os');
|
|
34
35
|
require('child_process');
|
|
35
36
|
require('node:events');
|
|
36
37
|
require('socket.io-client');
|
|
37
|
-
require('./pushNotifications-
|
|
38
|
+
require('./pushNotifications-CfspRcl-.cjs');
|
|
38
39
|
require('./contentLogMetadata-ZSFk_NjQ.cjs');
|
|
39
40
|
require('./limits-C-a7gr04.cjs');
|
|
40
|
-
require('./time-
|
|
41
|
-
require('./registerCommonHandlers-
|
|
41
|
+
require('./time-gPD_EmA-.cjs');
|
|
42
|
+
require('./registerCommonHandlers-Beun-cQv.cjs');
|
|
42
43
|
require('util');
|
|
43
44
|
require('fs/promises');
|
|
44
45
|
require('crypto');
|
|
45
46
|
require('path');
|
|
46
47
|
require('cross-spawn');
|
|
47
48
|
require('@paralleldrive/cuid2');
|
|
48
|
-
require('./sync-
|
|
49
|
+
require('./sync-DtWB7RzA.cjs');
|
|
49
50
|
require('./backgroundTaskActivity-CBvUdj39.cjs');
|
|
50
51
|
require('chalk');
|
|
51
52
|
require('node:util');
|
|
52
53
|
require('./detectCLI-BuYR_Qxe.cjs');
|
|
53
54
|
require('fs');
|
|
54
|
-
require('./localHappyAgentAuth-
|
|
55
|
+
require('./localHappyAgentAuth-CKNW-MXw.cjs');
|
|
55
56
|
require('tweetnacl');
|
|
56
57
|
require('./fsMkdir-0K3yENml.cjs');
|
|
57
58
|
require('url');
|
|
58
59
|
|
|
59
60
|
const DEFAULT_CLAUDE_MODEL = void 0;
|
|
60
61
|
const DEFAULT_CLAUDE_EFFORT = void 0;
|
|
61
|
-
const importRunClaudeDeps = () => Promise.resolve().then(function () { return require('./runClaudeDeps-
|
|
62
|
+
const importRunClaudeDeps = () => Promise.resolve().then(function () { return require('./runClaudeDeps-DGAomimZ.cjs'); });
|
|
62
63
|
async function runClaude(credentials, options = {}) {
|
|
63
64
|
logger.logger.debug(`[CLAUDE] ===== CLAUDE MODE STARTING =====`);
|
|
64
65
|
logger.logger.debug(`[CLAUDE] This is the Claude agent, NOT Gemini`);
|
|
@@ -72,7 +73,7 @@ async function runClaude(credentials, options = {}) {
|
|
|
72
73
|
const isAssistantVariant = process.env.HAPPY_SESSION_VARIANT === "assistant";
|
|
73
74
|
if (isAssistantVariant) {
|
|
74
75
|
try {
|
|
75
|
-
const { bootstrapAssistantHome } = await Promise.resolve().then(function () { return require('./bootstrap-
|
|
76
|
+
const { bootstrapAssistantHome } = await Promise.resolve().then(function () { return require('./bootstrap-DBJB0y-H.cjs'); });
|
|
76
77
|
await bootstrapAssistantHome();
|
|
77
78
|
} catch (error) {
|
|
78
79
|
logger.logger.debug("[START] Assistant home bootstrap failed:", error);
|
|
@@ -147,7 +148,7 @@ async function runClaude(credentials, options = {}) {
|
|
|
147
148
|
// a brand-new session cannot pick a PDF until after sending once.
|
|
148
149
|
attachmentKinds: [...attachmentContent.CLAUDE_ATTACHMENT_KINDS],
|
|
149
150
|
queueCancellation: true,
|
|
150
|
-
capabilities: ["claude-steer-v1", "claude-live-permission-v1", "claude-live-permission-v2", "claude-btw-v1", "claude-runtime-controls-v1", "claude-opus-5-5-v1", index.PROMPT_QUEUE_CAPABILITY, forkBackfill.FORK_BACKFILL_CAPABILITY, persistence.HIBERNATION_CAPABILITY, index.PROJECT_SESSION_CAPABILITY],
|
|
151
|
+
capabilities: ["claude-steer-v1", "claude-live-permission-v1", "claude-live-permission-v2", "claude-btw-v1", "claude-runtime-controls-v1", "claude-opus-5-5-v1", index.PROMPT_QUEUE_CAPABILITY, forkBackfill.FORK_BACKFILL_CAPABILITY, persistence.HIBERNATION_CAPABILITY, sessionLock.AUTO_RESTART_CAPABILITY, index.PROJECT_SESSION_CAPABILITY],
|
|
151
152
|
// Effective mode this process enforces. Kept current by
|
|
152
153
|
// publishPermissionMode below; the web renders it instead of guessing.
|
|
153
154
|
permissionMode: permissionMode.mapToClaudeMode(initialPermissionMode ?? "default"),
|
|
@@ -192,7 +193,7 @@ async function runClaude(credentials, options = {}) {
|
|
|
192
193
|
}
|
|
193
194
|
if (!response) {
|
|
194
195
|
let offlineSessionId = null;
|
|
195
|
-
const { claudeLocal } = await Promise.resolve().then(function () { return require('./claudeLocal-
|
|
196
|
+
const { claudeLocal } = await Promise.resolve().then(function () { return require('./claudeLocal-B6YDYlnY.cjs'); });
|
|
196
197
|
const { createSessionScanner: createSessionScanner2 } = await loadDeps();
|
|
197
198
|
const reconnection = api.startOfflineReconnection({
|
|
198
199
|
serverUrl: configuration.configuration.serverUrl,
|
|
@@ -894,11 +895,11 @@ async function runClaude(credentials, options = {}) {
|
|
|
894
895
|
};
|
|
895
896
|
};
|
|
896
897
|
if (options.startedBy === "daemon" && options.startingMode === "remote" && !isAssistantVariant) {
|
|
897
|
-
hibernationProbe = new
|
|
898
|
+
hibernationProbe = new startupSessionCreate.HibernationProbe({
|
|
898
899
|
checkMs: persistence.resolveCheckMs(),
|
|
899
900
|
snapshot: hibernationSnapshot,
|
|
900
901
|
ask: (report) => controlClient.checkDaemonHibernation({ sessionId: session.sessionId, pid: process.pid, report }),
|
|
901
|
-
commit: (idleMs) =>
|
|
902
|
+
commit: (idleMs) => startupSessionCreate.commitHibernation({
|
|
902
903
|
client: session,
|
|
903
904
|
claimExit: () => exitGate.claim("hibernate") !== null,
|
|
904
905
|
exitRequested: () => exitGate.exitRequested,
|
|
@@ -921,6 +922,8 @@ async function runClaude(credentials, options = {}) {
|
|
|
921
922
|
});
|
|
922
923
|
hibernationProbe.start();
|
|
923
924
|
}
|
|
925
|
+
const autoUpdated = sessionLock.takeAutoRestartedEvent(process.env);
|
|
926
|
+
if (autoUpdated) session.sendSessionEvent(autoUpdated);
|
|
924
927
|
const exitCode = await loop({
|
|
925
928
|
path: workingDirectory,
|
|
926
929
|
model: options.model,
|
|
@@ -1,81 +1,81 @@
|
|
|
1
|
-
import { l as logger } from './logger-
|
|
2
|
-
import { q as notifyDaemonSessionEvent, t as notifyDaemonClaudeAuthFailed } from './controlClient-
|
|
3
|
-
export { k as reportSessionEditToDaemon } from './controlClient-
|
|
1
|
+
import { l as logger } from './logger-CL7pin9b.mjs';
|
|
2
|
+
import { q as notifyDaemonSessionEvent, t as notifyDaemonClaudeAuthFailed } from './controlClient-D7NGfmtq.mjs';
|
|
3
|
+
export { k as reportSessionEditToDaemon } from './controlClient-D7NGfmtq.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-DNmMVhFu.mjs';
|
|
6
|
+
export { s as startHappyServer } from './deterministicJson-DNmMVhFu.mjs';
|
|
7
|
+
import { s as sharedProjectsClient } from './client-CnGNYidN.mjs';
|
|
8
8
|
import { randomInt, randomUUID, createHash } from 'node:crypto';
|
|
9
|
-
import {
|
|
10
|
-
export { M as MessageQueue2, r as registerKillSessionHandler } from './specialCommands-DHU7TNeK.mjs';
|
|
9
|
+
import { a as parseSpecialCommand } from './specialCommands-MXUN0wfI.mjs';
|
|
11
10
|
import { M as MessageBuffer } from './sessionExitLifecycle-CzkLIgNZ.mjs';
|
|
12
11
|
export { S as SessionExitGate, e as exitIntentFromArchiveFlag, s as settleSessionOnExit } from './sessionExitLifecycle-CzkLIgNZ.mjs';
|
|
13
|
-
import { q as query } from './query-
|
|
12
|
+
import { q as query } from './query-iYH-tm7L.mjs';
|
|
14
13
|
import { AbortError } from '@anthropic-ai/claude-agent-sdk';
|
|
15
14
|
import { m as mapToClaudeMode, p as parseClaudePermissionMode, c as resolveRemoteClaudePermissionMode } from './permissionMode-CH4FoZfU.mjs';
|
|
16
|
-
import { c as claudeCheckSession, s as systemPrompt } from './systemPrompt-
|
|
15
|
+
import { c as claudeCheckSession, s as systemPrompt } from './systemPrompt-Bn6g6aCH.mjs';
|
|
17
16
|
import { join, resolve, dirname } from 'node:path';
|
|
18
17
|
import 'axios';
|
|
19
18
|
import 'node:events';
|
|
20
19
|
import 'socket.io-client';
|
|
21
|
-
import { A as AsyncLock } from './pushNotifications-
|
|
20
|
+
import { A as AsyncLock } from './pushNotifications-dUceOIni.mjs';
|
|
22
21
|
import 'tweetnacl';
|
|
23
|
-
import { c as configuration, e as ensurePrivateDirectory } from './configuration-
|
|
24
|
-
import './index-
|
|
25
|
-
import './registerCommonHandlers-
|
|
22
|
+
import { c as configuration, e as ensurePrivateDirectory } from './configuration-Dechcvd-.mjs';
|
|
23
|
+
import './index-DmqsRnV7.mjs';
|
|
24
|
+
import './registerCommonHandlers-DWZ7mfdt.mjs';
|
|
26
25
|
import 'os';
|
|
27
26
|
import 'child_process';
|
|
28
27
|
import '@paralleldrive/cuid2';
|
|
29
|
-
import './persistence-
|
|
28
|
+
import './persistence-Dogj7JIp.mjs';
|
|
30
29
|
import { c as contentLogMetadata } from './contentLogMetadata-BlWI0egu.mjs';
|
|
31
30
|
import 'chalk';
|
|
32
31
|
import { R as RawJSONLinesSchema } from './types-CkqAACXx.mjs';
|
|
33
32
|
import { g as getProjectPath } from './path-D2wdaNSk.mjs';
|
|
34
33
|
import { access } from 'fs/promises';
|
|
35
|
-
import { d as delay } from './time-
|
|
34
|
+
import { d as delay } from './time-CN3TuSVG.mjs';
|
|
36
35
|
import { mkdirSync, writeFileSync, readFileSync, unlinkSync, renameSync, statSync, existsSync } from 'node:fs';
|
|
37
|
-
import { F as Future, d as describeClaudeProcessExit } from './sessionScanner-
|
|
38
|
-
export { c as createSessionScanner } from './sessionScanner-
|
|
36
|
+
import { F as Future, d as describeClaudeProcessExit } from './sessionScanner-DDDud5re.mjs';
|
|
37
|
+
export { c as createSessionScanner } from './sessionScanner-DDDud5re.mjs';
|
|
39
38
|
import { execSync } from 'node:child_process';
|
|
40
|
-
import { S as StreamRelay } from './streamRelay-
|
|
41
|
-
import { C as CLAUDE_ATTACHMENT_KINDS, c as chatAttachmentDirectory, a as stageClaudeAttachments, b as appendStagedAttachmentsToPrompt } from './attachmentContent-
|
|
39
|
+
import { S as StreamRelay } from './streamRelay-P9e7Sohm.mjs';
|
|
40
|
+
import { C as CLAUDE_ATTACHMENT_KINDS, c as chatAttachmentDirectory, a as stageClaudeAttachments, b as appendStagedAttachmentsToPrompt } from './attachmentContent-CC4yIrSm.mjs';
|
|
42
41
|
import { writeFile, rename, unlink, readFile } from 'node:fs/promises';
|
|
43
|
-
import { F as ForkSourceMissingError } from './claudeSessionFork-
|
|
44
|
-
import { w as wrapperRateLimitReporter } from './rateLimitReporter-
|
|
45
|
-
export {
|
|
42
|
+
import { F as ForkSourceMissingError } from './claudeSessionFork-D2GI7P59.mjs';
|
|
43
|
+
import { w as wrapperRateLimitReporter } from './rateLimitReporter-jeVi-fym.mjs';
|
|
44
|
+
export { M as MessageQueue2, r as registerKillSessionHandler } from './registerKillSessionHandler-CzgklwLG.mjs';
|
|
45
|
+
export { g as getEnvironmentInfo } from './doctor-BdBi7TFZ.mjs';
|
|
46
46
|
import { createServer } from 'node:http';
|
|
47
47
|
export { E as EditReportThrottle, b as extractClaudeEditPaths } from './editPaths-BVfS_FFL.mjs';
|
|
48
48
|
import { p as projectPath } from './projectPath-BTBIMB57.mjs';
|
|
49
49
|
export { s as snapshotTree, t as terminateSurvivors } from './processTreeSnapshot-CuLJDNC-.mjs';
|
|
50
|
-
import { r as resolveClaudeBinary, a as runClaudeOneShot } from './titleGenerator-
|
|
51
|
-
export { T as TitleGenerator } from './titleGenerator-
|
|
50
|
+
import { r as resolveClaudeBinary, a as runClaudeOneShot } from './titleGenerator-DgzTQdn2.mjs';
|
|
51
|
+
export { T as TitleGenerator } from './titleGenerator-DgzTQdn2.mjs';
|
|
52
52
|
import { B as BOARD_ANALYZER_PROMPT_PREFIX } from './oneShotPrompts-DT4p6RNd.mjs';
|
|
53
|
-
import { i as isSelfReportFresh } from './reportProgressTool-
|
|
54
|
-
export { c as createSelfReportState } from './reportProgressTool-
|
|
53
|
+
import { i as isSelfReportFresh } from './reportProgressTool-CgPy6n_7.mjs';
|
|
54
|
+
export { c as createSelfReportState } from './reportProgressTool-CgPy6n_7.mjs';
|
|
55
55
|
import 'node:util';
|
|
56
56
|
import './prompt-QHuFx9j6.mjs';
|
|
57
57
|
import 'node:os';
|
|
58
58
|
import 'zod';
|
|
59
59
|
import './pi-CqyoZMjI.mjs';
|
|
60
60
|
import './fileStore-5qpetZS0.mjs';
|
|
61
|
-
import './client-
|
|
62
|
-
import './context-
|
|
63
|
-
import './sessionOps-
|
|
61
|
+
import './client-CtL0Vtww.mjs';
|
|
62
|
+
import './context-C9JbJoNe.mjs';
|
|
63
|
+
import './sessionOps-CA2kpm66.mjs';
|
|
64
64
|
import './authRelay-DhQhkBvX.mjs';
|
|
65
65
|
import './resources-CLP_MpK4.mjs';
|
|
66
|
-
import './tools-
|
|
67
|
-
import './peerTools-
|
|
66
|
+
import './tools-zXJpxiG_.mjs';
|
|
67
|
+
import './peerTools-dY1aJez4.mjs';
|
|
68
68
|
import './ids-DU6sLx4C.mjs';
|
|
69
|
-
import './remoteSessionClient-
|
|
69
|
+
import './remoteSessionClient-BiC2KDew.mjs';
|
|
70
70
|
import '@modelcontextprotocol/sdk/server/mcp.js';
|
|
71
71
|
import '@modelcontextprotocol/sdk/server/streamableHttp.js';
|
|
72
72
|
import './limits-DIo7rEBR.mjs';
|
|
73
|
-
import './downloadTarget-
|
|
73
|
+
import './downloadTarget-CGojGjaN.mjs';
|
|
74
74
|
import './terminals-Dlg0x3nY.mjs';
|
|
75
75
|
import './terminalTitleSuggest-CeKsX_V6.mjs';
|
|
76
76
|
import './tmuxSocket-B8Yx20sT.mjs';
|
|
77
|
-
import './bootstrap-
|
|
78
|
-
import './package-
|
|
77
|
+
import './bootstrap-Ct9Nb4sv.mjs';
|
|
78
|
+
import './package-C6uiXULx.mjs';
|
|
79
79
|
import './agentGuidance-BDYt2Qy2.mjs';
|
|
80
80
|
import './trimIdent-BAjmv_TG.mjs';
|
|
81
81
|
import './webPanels-B2_C2-3g.mjs';
|
|
@@ -85,22 +85,22 @@ import './promptCacheTtl-Ce0TVbrx.mjs';
|
|
|
85
85
|
import 'util';
|
|
86
86
|
import 'path';
|
|
87
87
|
import 'cross-spawn';
|
|
88
|
-
import './sync-
|
|
88
|
+
import './sync-eZkXnsW_.mjs';
|
|
89
89
|
import './transcriptCursor-B7T_gkQ0.mjs';
|
|
90
|
-
import './startFileWatcher-
|
|
90
|
+
import './startFileWatcher-Dedtu1vq.mjs';
|
|
91
91
|
import 'node:readline';
|
|
92
|
-
import './rateLimitWindows-
|
|
92
|
+
import './rateLimitWindows-CEn0DXaX.mjs';
|
|
93
93
|
import './doctor-BPkYWSuq.mjs';
|
|
94
94
|
import 'ps-list';
|
|
95
95
|
import './doctorReadiness-C208SMN9.mjs';
|
|
96
96
|
import './detectCLI-CSGMlV51.mjs';
|
|
97
97
|
import 'fs';
|
|
98
98
|
import './cliUpdate-Y34VGe9Y.mjs';
|
|
99
|
-
import './piRunnerArgs-
|
|
100
|
-
import './acpSessionResume-
|
|
99
|
+
import './piRunnerArgs-D8nN_Iit.mjs';
|
|
100
|
+
import './acpSessionResume-CcpDuIO5.mjs';
|
|
101
101
|
import 'url';
|
|
102
102
|
import 'node:module';
|
|
103
|
-
import './client-
|
|
103
|
+
import './client-DZkBUoh9.mjs';
|
|
104
104
|
import './precheckCompat-DeEbilbr.mjs';
|
|
105
105
|
|
|
106
106
|
const SCHEDULE_WAKEUP_GRACE_MS = 6e4;
|
|
@@ -456,10 +456,13 @@ class Session {
|
|
|
456
456
|
}
|
|
457
457
|
};
|
|
458
458
|
/**
|
|
459
|
-
* Clear the current session ID (used by /clear command)
|
|
459
|
+
* Clear the current session ID (used by /clear command). The next turn
|
|
460
|
+
* starts a conversation that never saw the project prefix, so it carries
|
|
461
|
+
* the full prefix again instead of only a digest (B-845).
|
|
460
462
|
*/
|
|
461
463
|
clearSessionId = () => {
|
|
462
464
|
this.sessionId = null;
|
|
465
|
+
this._projectInjector?.reset();
|
|
463
466
|
logger.debug("[Session] Session ID cleared");
|
|
464
467
|
};
|
|
465
468
|
/**
|
|
@@ -769,6 +772,10 @@ function planUnconfirmedCommands(commands, context) {
|
|
|
769
772
|
tombstone: commands.filter((_, i) => i !== index).map((c) => c.uuid)
|
|
770
773
|
};
|
|
771
774
|
}
|
|
775
|
+
function planUndeliveredMessage(message, context) {
|
|
776
|
+
if (context.exiting || !context.parkFree) return null;
|
|
777
|
+
return { ...message, finalized: true };
|
|
778
|
+
}
|
|
772
779
|
|
|
773
780
|
const AUTH_FAILURE_RESULT_TEXT = /Failed to authenticate|OAuth session expired/i;
|
|
774
781
|
const QUERY_RECYCLE_NOTICE = {
|
|
@@ -1630,11 +1637,17 @@ async function claudeRemote(opts) {
|
|
|
1630
1637
|
if (initialUserMessage.uuid) commandTracker.track(initialUserMessage.uuid, { message: initial.message, mode: initial.mode });
|
|
1631
1638
|
let modelUnconfirmed = false;
|
|
1632
1639
|
let pullingNext = false;
|
|
1640
|
+
let queryClosed = false;
|
|
1641
|
+
const inputClosed = () => queryClosed || messages.done;
|
|
1633
1642
|
const pullNextMessage = () => {
|
|
1634
1643
|
if (pullingNext) {
|
|
1635
1644
|
logger.debug("[claudeRemote] Already waiting for the next message");
|
|
1636
1645
|
return;
|
|
1637
1646
|
}
|
|
1647
|
+
if (inputClosed()) {
|
|
1648
|
+
logger.debug("[claudeRemote] Input closed; the next message belongs to the next launch");
|
|
1649
|
+
return;
|
|
1650
|
+
}
|
|
1638
1651
|
pullingNext = true;
|
|
1639
1652
|
opts.nextMessage().then(async (pulled) => {
|
|
1640
1653
|
let next = withoutRetiredModel(pulled);
|
|
@@ -1643,6 +1656,16 @@ async function claudeRemote(opts) {
|
|
|
1643
1656
|
messages.end();
|
|
1644
1657
|
return;
|
|
1645
1658
|
}
|
|
1659
|
+
const handBack = (message) => {
|
|
1660
|
+
pullingNext = false;
|
|
1661
|
+
logger.debug("[claudeRemote] Query input closed before the pulled message was sent; handing it back to the launcher");
|
|
1662
|
+
if (opts.onUndeliveredMessage) opts.onUndeliveredMessage(message);
|
|
1663
|
+
else logger.warn("[claudeRemote] Pulled message could not be delivered and no owner took it back");
|
|
1664
|
+
};
|
|
1665
|
+
if (inputClosed()) {
|
|
1666
|
+
handBack(next);
|
|
1667
|
+
return;
|
|
1668
|
+
}
|
|
1646
1669
|
if (modelUnconfirmed || needsModelSwitch(mode.model, next.mode.model)) {
|
|
1647
1670
|
try {
|
|
1648
1671
|
await withTimeout(response.setModel(modelTarget(next.mode.model)), SET_MODEL_TIMEOUT_MS, "set_model");
|
|
@@ -1650,11 +1673,19 @@ async function claudeRemote(opts) {
|
|
|
1650
1673
|
logger.debug(`[claudeRemote] Model switched to ${modelTarget(next.mode.model) ?? "default"}`);
|
|
1651
1674
|
} catch (e) {
|
|
1652
1675
|
logger.debug(`[claudeRemote] setModel failed: ${e instanceof Error ? e.message : String(e)}`);
|
|
1676
|
+
if (inputClosed()) {
|
|
1677
|
+
handBack(next);
|
|
1678
|
+
return;
|
|
1679
|
+
}
|
|
1653
1680
|
opts.onCompletionEvent?.(modelSwitchFailureNotice(next.mode.model, e));
|
|
1654
1681
|
if (e instanceof TimeoutError) modelUnconfirmed = true;
|
|
1655
1682
|
next = { ...next, mode: { ...next.mode, model: mode.model } };
|
|
1656
1683
|
}
|
|
1657
1684
|
}
|
|
1685
|
+
if (inputClosed()) {
|
|
1686
|
+
handBack(next);
|
|
1687
|
+
return;
|
|
1688
|
+
}
|
|
1658
1689
|
mode = next.mode;
|
|
1659
1690
|
updateThinking(true);
|
|
1660
1691
|
turn.pushed();
|
|
@@ -1834,6 +1865,7 @@ async function claudeRemote(opts) {
|
|
|
1834
1865
|
}
|
|
1835
1866
|
} finally {
|
|
1836
1867
|
updateThinking(false);
|
|
1868
|
+
queryClosed = true;
|
|
1837
1869
|
if (cliCapabilities.has(MSG_LIFECYCLE_CAPABILITY)) {
|
|
1838
1870
|
const unconfirmed = commandTracker.takeUnconfirmed();
|
|
1839
1871
|
if (unconfirmed.length > 0) {
|
|
@@ -4142,6 +4174,10 @@ async function claudeRemoteLauncher(session, onPermissionModeChange, onEffective
|
|
|
4142
4174
|
const parked = modeGate.takeParked();
|
|
4143
4175
|
if (parked) {
|
|
4144
4176
|
permissionHandler.handleModeChange(parked.mode.permissionMode);
|
|
4177
|
+
if (parked.finalized) {
|
|
4178
|
+
if (typeof parked.message === "string") onPromptFinalized?.(parked.message);
|
|
4179
|
+
return parked;
|
|
4180
|
+
}
|
|
4145
4181
|
if (typeof parked.message === "string") return { ...parked, message: await finalize(parked.message) };
|
|
4146
4182
|
return parked;
|
|
4147
4183
|
}
|
|
@@ -4268,13 +4304,32 @@ async function claudeRemoteLauncher(session, onPermissionModeChange, onEffective
|
|
|
4268
4304
|
if (plan.redeliver) {
|
|
4269
4305
|
redeliveredCommands.add(plan.redeliver.uuid);
|
|
4270
4306
|
logger.debug(`[remote]: re-sending unconfirmed user message ${plan.redeliver.uuid} into the next launch`);
|
|
4271
|
-
modeGate.park({ message: plan.redeliver.payload.message, mode: plan.redeliver.payload.mode, uuid: plan.redeliver.uuid });
|
|
4307
|
+
modeGate.park({ message: plan.redeliver.payload.message, mode: plan.redeliver.payload.mode, uuid: plan.redeliver.uuid, finalized: true });
|
|
4272
4308
|
}
|
|
4273
4309
|
if (plan.tombstone.length > 0) {
|
|
4274
4310
|
logger.debug(`[remote]: ${plan.tombstone.length} user message(s) never started before the query ended`);
|
|
4275
4311
|
session.client.sendQueueCancelReason(plan.tombstone, "aborted");
|
|
4276
4312
|
}
|
|
4277
4313
|
},
|
|
4314
|
+
// B-853: the Query's input closed while this message was in
|
|
4315
|
+
// hand — it never reached Claude Code. Run it first in the
|
|
4316
|
+
// next launch (it was pulled before anything still queued);
|
|
4317
|
+
// only when that slot is taken does the web get a tombstone
|
|
4318
|
+
// it can put back and resend, never silence. Leaving remote
|
|
4319
|
+
// mode is the user's stop (`aborted`); otherwise the Query
|
|
4320
|
+
// was replaced before it took the message (`restarted`).
|
|
4321
|
+
onUndeliveredMessage: (message) => {
|
|
4322
|
+
const parked = planUndeliveredMessage(message, { parkFree: !modeGate.hasParked, exiting: exitReason !== null });
|
|
4323
|
+
if (parked) {
|
|
4324
|
+
logger.debug("[remote]: pulled message missed its Query; replaying it in the next launch");
|
|
4325
|
+
modeGate.park(parked);
|
|
4326
|
+
} else if (message.uuid) {
|
|
4327
|
+
logger.debug(`[remote]: pulled message ${message.uuid} missed its Query and cannot be replayed`);
|
|
4328
|
+
session.client.sendQueueCancelReason([message.uuid], exitReason !== null ? "aborted" : "restarted");
|
|
4329
|
+
} else {
|
|
4330
|
+
logger.warn("[remote]: pulled message missed its Query and carries no uuid to tombstone");
|
|
4331
|
+
}
|
|
4332
|
+
},
|
|
4278
4333
|
onCommandsDropped: (uuids) => {
|
|
4279
4334
|
logger.debug(`[remote]: ${uuids.length} user message(s) never read before the turn ended`);
|
|
4280
4335
|
session.client.sendQueueCancelReason(uuids, "aborted");
|
|
@@ -4368,6 +4423,11 @@ async function claudeRemoteLauncher(session, onPermissionModeChange, onEffective
|
|
|
4368
4423
|
modeGate.reset();
|
|
4369
4424
|
}
|
|
4370
4425
|
}
|
|
4426
|
+
const stranded = modeGate.takeParked();
|
|
4427
|
+
if (stranded?.uuid) {
|
|
4428
|
+
logger.debug(`[remote]: leaving remote mode with parked message ${stranded.uuid}; tombstoning it`);
|
|
4429
|
+
session.client.sendQueueCancelReason([stranded.uuid], "aborted");
|
|
4430
|
+
}
|
|
4371
4431
|
} finally {
|
|
4372
4432
|
session.client.off("message", observeSessionRecord);
|
|
4373
4433
|
rewindReconciler.dispose();
|
|
@@ -4420,7 +4480,7 @@ async function loop(opts) {
|
|
|
4420
4480
|
logger.debug(`[loop] Iteration with mode: ${mode}`);
|
|
4421
4481
|
switch (mode) {
|
|
4422
4482
|
case "local": {
|
|
4423
|
-
const { claudeLocalLauncher } = await import('./claudeLocalLauncher-
|
|
4483
|
+
const { claudeLocalLauncher } = await import('./claudeLocalLauncher-D06QijMw.mjs');
|
|
4424
4484
|
const result = await claudeLocalLauncher(session);
|
|
4425
4485
|
switch (result.type) {
|
|
4426
4486
|
case "switch":
|
|
@@ -4761,7 +4821,7 @@ function registerSideQuestionHandler(rpc, deps) {
|
|
|
4761
4821
|
const retainMs = deps.retainMs ?? SIDE_QUESTION_RETAIN_MS;
|
|
4762
4822
|
const maxRunMs = deps.maxRunMs ?? SIDE_QUESTION_MAX_RUN_MS;
|
|
4763
4823
|
const fork = deps.run ?? (async (input) => {
|
|
4764
|
-
const { query } = await import('./index-
|
|
4824
|
+
const { query } = await import('./index-Db0HIC-k.mjs');
|
|
4765
4825
|
return runSideQuestion(query, input);
|
|
4766
4826
|
});
|
|
4767
4827
|
const run = async (input, live) => {
|