very-happy-cli 0.2.179 → 0.2.181
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-DFipFF7-.cjs → AcpBackend-CgHb_ya5.cjs} +3 -3
- package/dist/{AcpBackend-CHp3y7cb.mjs → AcpBackend-DZGCSuXF.mjs} +3 -3
- package/dist/{AcpSessionManager-0zpvRJXc.cjs → AcpSessionManager-CacC2EVn.cjs} +1 -1
- package/dist/{AcpSessionManager-d2-rKWWa.mjs → AcpSessionManager-DwuPzWBh.mjs} +1 -1
- package/dist/{BasePermissionHandler-CH3zuEkA.cjs → BasePermissionHandler-DCP8ZEB4.cjs} +1 -1
- package/dist/{BasePermissionHandler-DdZBYIR4.mjs → BasePermissionHandler-Uo-GUjbb.mjs} +1 -1
- package/dist/{acpSessionResume-DTGmAPLt.mjs → acpSessionResume-9OLTD6kT.mjs} +1 -1
- package/dist/{acpSessionResume-oiCBnAVA.cjs → acpSessionResume-BaVMD80f.cjs} +1 -1
- package/dist/{agentHome-CghLvL_1.mjs → agentHome-B1BsKeqD.mjs} +4 -4
- package/dist/{agentHome-BWcz8mz0.cjs → agentHome-BtUmGcPX.cjs} +4 -4
- package/dist/{api-Cmjfr8Z7.cjs → api-COHFAkb_.cjs} +20 -12
- package/dist/{api-CzwFpJQc.mjs → api-Dr3wXL_7.mjs} +21 -13
- package/dist/{apiMachine-DJkTEiqy.mjs → apiMachine-CHEzPQdS.mjs} +73 -32
- package/dist/{apiMachine-G6OogT08.cjs → apiMachine-D8H7CXaz.cjs} +75 -34
- package/dist/{attachmentContent-B2os4HbA.mjs → attachmentContent-1YwtKgWl.mjs} +2 -2
- package/dist/{attachmentContent-Bo0UAsSu.cjs → attachmentContent-mIhbtRKl.cjs} +2 -2
- package/dist/{auth-DMX0xPNK.mjs → auth-CbZkcMAb.mjs} +8 -8
- package/dist/{auth-D6bBUwZa.cjs → auth-CgQP7d0q.cjs} +5 -5
- package/dist/{auth-BS6PaOOG.mjs → auth-DZsthtSk.mjs} +5 -5
- package/dist/{auth-HEhRaNgL.cjs → auth-Fg8fLadK.cjs} +8 -8
- package/dist/{auto-C6I55iOh.cjs → auto-BB7kqSh5.cjs} +19 -19
- package/dist/{auto-Cl1SEDcD.mjs → auto-_T-Ud-z5.mjs} +19 -19
- package/dist/{backgroundTaskActivity-BVwJBl02.mjs → backgroundTaskActivity-8PdPxrvy.mjs} +1 -1
- package/dist/{bootstrap-iuyufnp3.mjs → bootstrap-B6EkZh4u.mjs} +2 -2
- package/dist/{bootstrap-exVucYav.cjs → bootstrap-CYtOtbi7.cjs} +2 -2
- package/dist/{browser-CSYum7xH.mjs → browser-C2qhUHSE.mjs} +1 -1
- package/dist/{browser-BohJK12g.cjs → browser-DjNNQQk2.cjs} +1 -1
- package/dist/{claudeCliPath-U4HHmV4r.cjs → claudeCliPath-GaP3UUz1.cjs} +1 -1
- package/dist/{claudeLocal-Dq_R3Ax_.mjs → claudeLocal-BAFjWhZ8.mjs} +6 -6
- package/dist/{claudeLocal-re4yjSTx.cjs → claudeLocal-O_w7-fBh.cjs} +8 -8
- package/dist/{claudeLocalLauncher-CN67lN7-.mjs → claudeLocalLauncher-CWn30LZR.mjs} +11 -11
- package/dist/{claudeLocalLauncher-B4hJHpCA.cjs → claudeLocalLauncher-Df3zg1q0.cjs} +13 -13
- package/dist/{claudeSessionFork-BihfD0Ik.mjs → claudeSessionFork-2ZkSTOGn.mjs} +1 -1
- package/dist/{claudeSessionFork-DiSMYerV.cjs → claudeSessionFork-pwcKqB-e.cjs} +1 -1
- package/dist/{client-BhoEBnuN.mjs → client-BKyU66lg.mjs} +2 -2
- package/dist/{client-BKcK1Bi-.cjs → client-CUO3ItoB.cjs} +34 -8
- package/dist/{client-wo9nbxuf.mjs → client-CXOnzuOy.mjs} +2 -2
- package/dist/{client-ZjOsn6nZ.cjs → client-DWs6k041.cjs} +2 -2
- package/dist/{client-CuVdN6PP.cjs → client-D_U2VjO3.cjs} +2 -2
- package/dist/{client-DuTDwWSQ.mjs → client-DsQcxVUV.mjs} +34 -9
- package/dist/codex/happyMcpStdioBridge.cjs +17 -17
- package/dist/codex/happyMcpStdioBridge.mjs +18 -18
- package/dist/{codexAppServerClient-Dt5zxrun.cjs → codexAppServerClient-BRX3JZ_5.cjs} +3 -3
- package/dist/{codexAppServerClient-BK3zra_1.mjs → codexAppServerClient-C3JO3pwM.mjs} +3 -3
- package/dist/{codexCommand-B6pY7CMh.mjs → codexCommand-BZIAAqKS.mjs} +59 -51
- package/dist/{codexCommand-CAZ1SLjg.cjs → codexCommand-dKOc5iQl.cjs} +85 -77
- package/dist/{codexTermination-DmGbHxcD.cjs → codexTermination-BVR9HeVI.cjs} +7 -2
- package/dist/{codexTermination-Cd1Eon_4.mjs → codexTermination-ztFkwHrG.mjs} +7 -2
- package/dist/{config-2oMG_fEI.mjs → config-NbHjx8ge.mjs} +3 -3
- package/dist/{config-B0uK6K7n.cjs → config-cftYxLC7.cjs} +26 -26
- package/dist/{configuration-WMi4idBB.mjs → configuration-BPrfb17M.mjs} +1 -1
- package/dist/{configuration-CMHZnp6G.cjs → configuration-C8JgseHy.cjs} +1 -1
- package/dist/{connect-uaglGrde.cjs → connect-Br8VMrK1.cjs} +27 -27
- package/dist/{connect-BLVHhHzA.mjs → connect-CLD1ai0k.mjs} +14 -14
- package/dist/{context-DXzU5bFM.cjs → context-D1lgQTJC.cjs} +1 -1
- package/dist/{context-DploEcoN.mjs → context-_YGq8xdH.mjs} +1 -1
- package/dist/{controlClient-BWUJrj3t.mjs → controlClient-CkNpT5zS.mjs} +4 -4
- package/dist/{controlClient-C-5qCt8W.cjs → controlClient-D68Zj7Q-.cjs} +3 -3
- package/dist/{createSessionMetadata-3uXrJgOW.mjs → createSessionMetadata-3WAj3_xl.mjs} +2 -2
- package/dist/{createSessionMetadata-BkIzHALd.cjs → createSessionMetadata-DNIbKLHg.cjs} +3 -3
- package/dist/{defaultPermissionMode-pS3vmiSg.cjs → defaultPermissionMode-BmvjP32v.cjs} +2 -2
- package/dist/{defaultPermissionMode-BzxLh20a.mjs → defaultPermissionMode-DXMznl8v.mjs} +2 -2
- package/dist/{detectCLI-DR9ZaN6B.cjs → detectCLI-BuYR_Qxe.cjs} +4 -4
- package/dist/{deterministicJson-B8z2GPi9.cjs → deterministicJson-BS7D7URE.cjs} +89 -24
- package/dist/{deterministicJson-D_whDMFd.mjs → deterministicJson-BcBIKKf1.mjs} +87 -24
- package/dist/{doctor-Br1Kcy2J.cjs → doctor-Be7zC0AF.cjs} +10 -9
- package/dist/{doctor-CmtSsR2-.mjs → doctor-CoOaPq6w.mjs} +8 -8
- package/dist/{doctorReadiness-BCZGcN0a.cjs → doctorReadiness-Dl6yRQCy.cjs} +1 -1
- package/dist/{downloadTarget-BoNwTIH_.mjs → downloadTarget-CeaAXdJj.mjs} +6 -6
- package/dist/{downloadTarget-BQJK_6oH.cjs → downloadTarget-LyOiucn_.cjs} +6 -6
- package/dist/{ensureDaemonRunning-Czo9IHJQ.mjs → ensureDaemonRunning--98j7-17.mjs} +5 -5
- package/dist/{ensureDaemonRunning-BRUmsq6J.cjs → ensureDaemonRunning-B8z37VKD.cjs} +6 -6
- package/dist/fileStore-5qpetZS0.mjs +146 -0
- package/dist/fileStore-7qhnbs6N.cjs +152 -0
- package/dist/{handleResumeCommand-tKD_Hpxc.cjs → handleResumeCommand-BFZlrFVH.cjs} +7 -7
- package/dist/{handleResumeCommand-C8thKjqf.mjs → handleResumeCommand-gO8I4keP.mjs} +6 -6
- package/dist/{index-DMqDMT1Q.cjs → index-B5PXbZjW.cjs} +80 -62
- package/dist/{index-D09T1m8Y.cjs → index-BRMq9gOe.cjs} +3 -3
- package/dist/{index-B0UjHlAe.cjs → index-BkluinoS.cjs} +4 -4
- package/dist/{index-CdQI0C9p.mjs → index-CO0n9ue6.mjs} +4 -4
- package/dist/{index-DPOa4NhL.mjs → index-CeRXrGnH.mjs} +41 -6
- package/dist/{index-C6O2vVjm.cjs → index-Df2eHm3O.cjs} +42 -6
- package/dist/{index-BTxHphpV.mjs → index-DneHoQXf.mjs} +80 -62
- package/dist/{index-BiyC7cZ3.mjs → index-WUj3954m.mjs} +4 -4
- package/dist/{index-D3bidoG8.mjs → index-hQ8LP1C2.mjs} +3 -3
- package/dist/{index-CUuc6iCn.cjs → index-jF2t3ACW.cjs} +4 -4
- package/dist/index.cjs +2 -2
- package/dist/index.mjs +2 -2
- package/dist/{install-BX3lv3NO.mjs → install-D0inLCv-.mjs} +1 -1
- package/dist/{install-BXvf2E3o.cjs → install-D2NCbeJ-.cjs} +1 -1
- package/dist/{install-hnve_9vq.mjs → install-DkYFiVK4.mjs} +3 -3
- package/dist/{install-CYRZxS87.cjs → install-FqkSUjPC.cjs} +7 -7
- package/dist/{installPiTools-BKnXjrVu.cjs → installPiTools-CL_axh_6.cjs} +1 -1
- package/dist/{installTerminalHooks-BQZbvxsZ.cjs → installTerminalHooks-BETLKAtd.cjs} +3 -3
- package/dist/lib.cjs +13 -13
- package/dist/lib.d.cts +216 -2
- package/dist/lib.d.mts +216 -2
- package/dist/lib.mjs +13 -13
- package/dist/{lidState-Bb8fgXg3.mjs → lidState-DghbfRbr.mjs} +1 -1
- package/dist/{lidState-Dv2wwFTj.cjs → lidState-x8cJ8J_9.cjs} +1 -1
- package/dist/{localHappyAgentAuth-DjYvkXvV.cjs → localHappyAgentAuth-DZ2kb9uq.cjs} +1 -1
- package/dist/{localHappyAgentAuth-NEU7fax7.mjs → localHappyAgentAuth-IKmeRpuQ.mjs} +1 -1
- package/dist/{logger-C1GWx3gi.cjs → logger-DgBwUSgS.cjs} +2 -2
- package/dist/{logger-BtVhHnD8.mjs → logger-LFr8iPgl.mjs} +2 -2
- package/dist/machineMetadata-BglCsfvf.mjs +75 -0
- package/dist/machineMetadata-DB03ez4K.cjs +87 -0
- package/dist/{main-CWhSsbtU.cjs → main-YQ-Vkakw.cjs} +99 -132
- package/dist/{main-B2LWV8DI.mjs → main-_1LSzlLv.mjs} +93 -126
- package/dist/{mcp-CARUsXHV.cjs → mcp-BIY80jSc.cjs} +15 -15
- package/dist/{mcp-ext92q3Y.mjs → mcp-Csj-mT5Y.mjs} +15 -15
- package/dist/{mirrorProtocol-DEy2g1CB.cjs → mirrorProtocol-BphKIAK9.cjs} +15 -6
- package/dist/{mirrorProtocol-BwYibqry.mjs → mirrorProtocol-CAxOMBkb.mjs} +15 -6
- package/dist/{package-BPPebGQF.mjs → package-DYGwlmXl.mjs} +9 -8
- package/dist/{package-SgqTYsjn.cjs → package-NoD8QOOM.cjs} +9 -8
- package/dist/{panels-BZ0_Tt7B.mjs → panels-B8zRm7_d.mjs} +5 -5
- package/dist/{panels-D1c7q2dD.cjs → panels-DYEc1NyQ.cjs} +5 -5
- package/dist/{peerTools-CWKzcQ7u.mjs → peerTools-CK3JYu1k.mjs} +5 -5
- package/dist/{peerTools-DRQETXaz.cjs → peerTools-CP-x-Peu.cjs} +5 -5
- package/dist/{persistence-BegE7NPa.cjs → persistence-BY-D00wT.cjs} +2 -2
- package/dist/{persistence-Cr-wutZ4.mjs → persistence-D2Djrf7t.mjs} +2 -2
- package/dist/pi-CqyoZMjI.mjs +380 -0
- package/dist/pi-DlsrPCTa.cjs +400 -0
- package/dist/{piRunnerArgs-DwvM_yWA.mjs → piRunnerArgs-IZLoL7TG.mjs} +1 -1
- package/dist/{piRunnerArgs-Cs-378Vz.cjs → piRunnerArgs-gxLYIZH4.cjs} +1 -1
- package/dist/{piRuntime-Bue5mnlc.mjs → piRuntime-D7Y4oHVL.mjs} +2 -2
- package/dist/{piRuntime-BG-1td_n.cjs → piRuntime-o5L8uX-W.cjs} +2 -2
- package/dist/{piTerminal-G4z-xVyy.cjs → piTerminal-C_-JDkLN.cjs} +18 -18
- package/dist/{piTerminal-B5x9X5yV.mjs → piTerminal-Kphx8Uhw.mjs} +18 -18
- package/dist/projectPath-C3ioB4Bu.cjs +13 -0
- package/dist/{prompt-lgF9IE82.cjs → prompt-Bof2aQkI.cjs} +7 -2
- package/dist/{prompt-BOouDaTM.mjs → prompt-QHuFx9j6.mjs} +7 -2
- package/dist/{pushNotifications-DaLQUyi0.cjs → pushNotifications-BXoOSq_G.cjs} +14 -4
- package/dist/{pushNotifications-BdFjDjQe.mjs → pushNotifications-DXGIhE-A.mjs} +14 -4
- package/dist/{query-DYP_W1wp.mjs → query-CcA6DVZK.mjs} +1 -1
- package/dist/{query-Ctfg-5gy.cjs → query-CdCxzuaB.cjs} +1 -1
- package/dist/{rateLimitWindows-Dj_8voBK.cjs → rateLimitWindows-OpAmdOtC.cjs} +1 -1
- package/dist/{rateLimitWindows-CuEqk_0g.mjs → rateLimitWindows-ZtHZHe-l.mjs} +1 -1
- package/dist/{registerCommonHandlers-Cj084Sg7.cjs → registerCommonHandlers-CRjBoJLK.cjs} +30 -30
- package/dist/{registerCommonHandlers-BAlP7SGc.mjs → registerCommonHandlers-DF6bdDtd.mjs} +2 -2
- package/dist/{registerKillSessionHandler-qMju0ZfF.cjs → registerKillSessionHandler-7fOm6ooh.cjs} +6 -6
- package/dist/{registerKillSessionHandler-PD0jWtQo.mjs → registerKillSessionHandler-DDCKL3wf.mjs} +6 -6
- package/dist/{remoteSessionClient-Bn2qu5C5.mjs → remoteSessionClient-B2POSKFT.mjs} +5 -5
- package/dist/{remoteSessionClient-B7i7MkYV.cjs → remoteSessionClient-CFCn42bs.cjs} +5 -5
- package/dist/{reportProgressTool-gHItlSzz.mjs → reportProgressTool-tPxEvh6x.mjs} +4 -4
- package/dist/{reportProgressTool-CM1JFAHg.cjs → reportProgressTool-th4trcET.cjs} +4 -4
- package/dist/{resources-CvIlkzpP.cjs → resources-BPyN59Iv.cjs} +23 -2
- package/dist/{resources-y9jfyO-_.mjs → resources-CH1iP6Cv.mjs} +22 -3
- package/dist/{run-CNXwIe0A.cjs → run-C_FumCQk.cjs} +2767 -183
- package/dist/{run-BM4TxiyN.mjs → run-cKQBbVi4.mjs} +2762 -178
- package/dist/{runClaude-C_3I8hvR.mjs → runClaude-CYnM6krL.mjs} +34 -28
- package/dist/{runClaude-CWhj2V4Q.cjs → runClaude-z_2YC_aa.cjs} +35 -29
- package/dist/{runClaudeDeps-B81cOKnH.cjs → runClaudeDeps-CLubzWnA.cjs} +59 -122
- package/dist/{runClaudeDeps-QGrOeDe2.mjs → runClaudeDeps-duS06Pb4.mjs} +52 -114
- package/dist/{runGemini-BEdWEZLR.mjs → runGemini-C_Pc2EhH.mjs} +39 -37
- package/dist/{runGemini-CgRLYbt5.cjs → runGemini-vEoXV6qT.cjs} +67 -65
- package/dist/{runOpenClaw-C1NVmzOL.cjs → runOpenClaw-CXJCtMgB.cjs} +20 -20
- package/dist/{runOpenClaw-DdQZAYj1.mjs → runOpenClaw-Cxun1qLC.mjs} +19 -19
- package/dist/{sandbox-nocIjliq.cjs → sandbox-CO46H2tK.cjs} +4 -4
- package/dist/{sandbox-DjQUdCMG.mjs → sandbox-CsvPnTmz.mjs} +4 -4
- package/dist/{selfCheck-DCt4Uzbq.cjs → selfCheck-DIr7Gc0i.cjs} +39 -39
- package/dist/selfCheck-NamtBHVB.mjs +85 -0
- package/dist/{send-Ct7X4pPU.mjs → send-DMoFg6F1.mjs} +9 -9
- package/dist/{send-Dydf_hwZ.cjs → send-X2mfVEyr.cjs} +8 -8
- package/dist/{server-CosABFbd.cjs → server-BwTEdbkr.cjs} +6 -6
- package/dist/{server-DTQGZMxh.mjs → server-CkqQ0sRH.mjs} +4 -4
- package/dist/sessionExitLifecycle-CzkLIgNZ.mjs +142 -0
- package/dist/sessionExitLifecycle-DFltxXU8.cjs +148 -0
- package/dist/{sessionLock-DokGab2R.cjs → sessionLock-CdIRJlHH.cjs} +25 -5
- package/dist/{sessionLock-WYIyaVO4.mjs → sessionLock-JIfwCqMk.mjs} +24 -5
- package/dist/{sessionOps-S-qPBLFf.cjs → sessionOps-DVA-00nR.cjs} +4 -4
- package/dist/{sessionOps-BIGgRube.mjs → sessionOps-DqlftXxe.mjs} +5 -5
- package/dist/{sessionScanner-o5hnMi5e.mjs → sessionScanner-BI0Vo1xT.mjs} +3 -3
- package/dist/{sessionScanner-CIMM2hvZ.cjs → sessionScanner-BMwgGAhY.cjs} +3 -3
- package/dist/{sessions-BJHEZpi2.mjs → sessions-D6IimX7b.mjs} +11 -11
- package/dist/{sessions-JchI1w3z.cjs → sessions-DjgEcHaT.cjs} +10 -10
- package/dist/{setupOfflineReconnection-CNiAt5ZP.cjs → setupOfflineReconnection-CjuCiKY3.cjs} +2 -2
- package/dist/{setupOfflineReconnection-DMiBO2y9.mjs → setupOfflineReconnection-DgJK_4m1.mjs} +2 -2
- package/dist/{spawn-DgvUNYEo.mjs → spawn-Dvzy-tzc.mjs} +15 -15
- package/dist/{spawn-6PD7nnoC.cjs → spawn-rhF28shY.cjs} +15 -15
- package/dist/{spawnAgents-P006Hqio.mjs → spawnAgents-CCnlq-FI.mjs} +1 -1
- package/dist/{spawnAgents-DsXgegHM.cjs → spawnAgents-iwuqrgR9.cjs} +1 -1
- package/dist/{spawnHappyCLI-Dywezwk6.cjs → spawnHappyCLI-DnKmIsEt.cjs} +2 -2
- package/dist/{spawnHappyCLI-CCOrEtf9.mjs → spawnHappyCLI-Dq3LLXLb.mjs} +1 -1
- package/dist/{specialCommands-DPcd9edP.mjs → specialCommands-CcyZ1hGA.mjs} +3 -3
- package/dist/{specialCommands-QxPpkGKf.cjs → specialCommands-Zwr2C6A2.cjs} +3 -3
- package/dist/{startFileWatcher-DghDOCO4.mjs → startFileWatcher-4thXDK9d.mjs} +1 -1
- package/dist/{startFileWatcher-RECH5qY8.cjs → startFileWatcher-K6hJSyiR.cjs} +1 -1
- package/dist/startupSessionCreate-BfByJ16A.mjs +24 -0
- package/dist/startupSessionCreate-CKEbq0tL.cjs +26 -0
- package/dist/{streamRelay-DlUWKUpo.cjs → streamRelay-Gy8Xfnon.cjs} +1 -1
- package/dist/{streamRelay-DMV_TXfS.mjs → streamRelay-LcDvyEjK.mjs} +1 -1
- package/dist/{sync-D23jbqVa.cjs → sync-1hQ5KHpL.cjs} +1 -1
- package/dist/{sync-CSe0Rf45.mjs → sync-DO-2PU45.mjs} +1 -1
- package/dist/{systemPrompt-CFNKnh65.mjs → systemPrompt-BctLfMZs.mjs} +3 -3
- package/dist/{systemPrompt-BOy4kU4P.cjs → systemPrompt-Dj7pgkMK.cjs} +3 -3
- package/dist/{teams-DyY669f0.mjs → teams-Bu8YeOoF.mjs} +8 -8
- package/dist/{teams-Ov2BDT-A.cjs → teams-uQxUlyyz.cjs} +8 -8
- package/dist/{time-65DcU6Jx.mjs → time-BcoJaG8E.mjs} +1 -1
- package/dist/{time-CrwIMHta.cjs → time-nqa9shu8.cjs} +1 -1
- package/dist/{titleGenerator-CS_rh2_J.cjs → titleGenerator-D09XyYYG.cjs} +3 -3
- package/dist/{titleGenerator-CiAMxf7s.mjs → titleGenerator-D5r06bhf.mjs} +1 -1
- package/dist/{todo-KY-okGii.cjs → todo-CCOnL7pT.cjs} +6 -6
- package/dist/{todo-BDONw0sK.mjs → todo-D1q8146q.mjs} +6 -6
- package/dist/{tools-D8-PnZEG.mjs → tools-D2E--n1x.mjs} +3 -3
- package/dist/{tools-_w52DZG6.cjs → tools-DiCXnAC5.cjs} +3 -3
- package/dist/{uninstall-8vnLN-IE.cjs → uninstall-BrNwwwSD.cjs} +6 -6
- package/dist/{uninstall-_fjGRP9b.mjs → uninstall-CtwXi1Rt.mjs} +3 -3
- package/package.json +9 -8
- package/dist/machineMetadata-CLHS9sv_.cjs +0 -42
- package/dist/machineMetadata-D-g--oU_.mjs +0 -39
- package/dist/messageBuffer-BWlGgR3A.mjs +0 -71
- package/dist/messageBuffer-fJMH6uY8.cjs +0 -73
- package/dist/projectPath-ChLhdOyt.cjs +0 -13
- package/dist/selfCheck-CjCF4C3v.mjs +0 -85
|
@@ -1,23 +1,24 @@
|
|
|
1
1
|
import os from 'node:os';
|
|
2
|
-
import { c as claimSessionOrExit, a as applyServerSnapshot, b as
|
|
3
|
-
import { r as readSettings, H as HIBERNATION_CAPABILITY, a as resolveCheckMs, l as latchKeepAwake, e as evaluateWrapperIdle } from './persistence-
|
|
4
|
-
import { D as DEFAULT_CLAUDE_PERMISSION_MODE, H as HibernationProbe, c as commitHibernation } from './defaultPermissionMode-
|
|
2
|
+
import { c as claimSessionOrExit, a as applyServerSnapshot, b as applyReconnectReplay, w as withoutServerSnapshot, m as mergeReconnectMetadata, e as exitCursorStamp } from './sessionLock-JIfwCqMk.mjs';
|
|
3
|
+
import { r as readSettings, H as HIBERNATION_CAPABILITY, a as resolveCheckMs, l as latchKeepAwake, e as evaluateWrapperIdle } from './persistence-D2Djrf7t.mjs';
|
|
4
|
+
import { D as DEFAULT_CLAUDE_PERMISSION_MODE, H as HibernationProbe, c as commitHibernation } from './defaultPermissionMode-DXMznl8v.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-Dr3wXL_7.mjs';
|
|
7
|
+
import { l as logger } from './logger-LFr8iPgl.mjs';
|
|
8
|
+
import { s as spawnOriginTags, a as sessionWorktreeMetadata } from './createSessionMetadata-3WAj3_xl.mjs';
|
|
9
|
+
import { p as packageJson } from './package-DYGwlmXl.mjs';
|
|
10
|
+
import { P as PROMPT_QUEUE_CAPABILITY, a as PROJECT_SESSION_CAPABILITY } from './index-CeRXrGnH.mjs';
|
|
11
11
|
import { F as FORK_BACKFILL_CAPABILITY, p as publishForkBackfillWhenCommitted } from './forkBackfill-DYIjlN1Z.mjs';
|
|
12
|
-
import { c as configuration } from './configuration-
|
|
13
|
-
import { n as notifyDaemonSessionStarted, c as checkDaemonHibernation } from './controlClient-
|
|
14
|
-
import { g as getInitialMachineMetadata } from './machineMetadata-
|
|
12
|
+
import { c as configuration } from './configuration-BPrfb17M.mjs';
|
|
13
|
+
import { n as notifyDaemonSessionStarted, c as checkDaemonHibernation } from './controlClient-CkNpT5zS.mjs';
|
|
14
|
+
import { g as getInitialMachineMetadata } from './machineMetadata-BglCsfvf.mjs';
|
|
15
15
|
import { p as projectPath } from './projectPath-BTBIMB57.mjs';
|
|
16
16
|
import { resolve, join } from 'node:path';
|
|
17
|
+
import { c as createSessionForStartup } from './startupSessionCreate-BfByJ16A.mjs';
|
|
17
18
|
import { a as applySandboxPermissionPolicy, r as resolveInitialClaudePermissionMode, m as mapToClaudeMode, b as reconcilePublishedPermissionMode } from './permissionMode-CH4FoZfU.mjs';
|
|
18
19
|
import { d as decodeBase64, e as encodeBase64 } from './authRelay-DhQhkBvX.mjs';
|
|
19
20
|
import { readFile } from 'node:fs/promises';
|
|
20
|
-
import { C as CLAUDE_ATTACHMENT_KINDS, s as stripAttachmentManifest } from './attachmentContent-
|
|
21
|
+
import { C as CLAUDE_ATTACHMENT_KINDS, s as stripAttachmentManifest } from './attachmentContent-1YwtKgWl.mjs';
|
|
21
22
|
import { T as TranscriptPathHints } from './transcriptCursor-B7T_gkQ0.mjs';
|
|
22
23
|
import { p as planClaudeStartup } from './startupPlan-DFMyNgAs.mjs';
|
|
23
24
|
import 'node:fs';
|
|
@@ -25,35 +26,35 @@ import './processTreeSnapshot-CuLJDNC-.mjs';
|
|
|
25
26
|
import 'node:child_process';
|
|
26
27
|
import 'zod';
|
|
27
28
|
import 'axios';
|
|
28
|
-
import './lidState-
|
|
29
|
+
import './lidState-DghbfRbr.mjs';
|
|
29
30
|
import 'os';
|
|
30
31
|
import 'child_process';
|
|
31
32
|
import 'node:events';
|
|
32
33
|
import 'socket.io-client';
|
|
33
|
-
import './pushNotifications-
|
|
34
|
+
import './pushNotifications-DXGIhE-A.mjs';
|
|
34
35
|
import './contentLogMetadata-BlWI0egu.mjs';
|
|
35
36
|
import './limits-DIo7rEBR.mjs';
|
|
36
|
-
import './time-
|
|
37
|
-
import './registerCommonHandlers-
|
|
37
|
+
import './time-BcoJaG8E.mjs';
|
|
38
|
+
import './registerCommonHandlers-DF6bdDtd.mjs';
|
|
38
39
|
import 'util';
|
|
39
40
|
import 'fs/promises';
|
|
40
41
|
import 'crypto';
|
|
41
42
|
import 'path';
|
|
42
43
|
import 'cross-spawn';
|
|
43
44
|
import '@paralleldrive/cuid2';
|
|
44
|
-
import './sync-
|
|
45
|
-
import './backgroundTaskActivity-
|
|
45
|
+
import './sync-DO-2PU45.mjs';
|
|
46
|
+
import './backgroundTaskActivity-8PdPxrvy.mjs';
|
|
46
47
|
import 'chalk';
|
|
47
48
|
import 'node:util';
|
|
48
49
|
import './detectCLI-CSGMlV51.mjs';
|
|
49
50
|
import 'fs';
|
|
50
|
-
import './localHappyAgentAuth-
|
|
51
|
+
import './localHappyAgentAuth-IKmeRpuQ.mjs';
|
|
51
52
|
import 'tweetnacl';
|
|
52
53
|
import 'url';
|
|
53
54
|
|
|
54
55
|
const DEFAULT_CLAUDE_MODEL = void 0;
|
|
55
56
|
const DEFAULT_CLAUDE_EFFORT = void 0;
|
|
56
|
-
const importRunClaudeDeps = () => import('./runClaudeDeps-
|
|
57
|
+
const importRunClaudeDeps = () => import('./runClaudeDeps-duS06Pb4.mjs');
|
|
57
58
|
async function runClaude(credentials, options = {}) {
|
|
58
59
|
logger.debug(`[CLAUDE] ===== CLAUDE MODE STARTING =====`);
|
|
59
60
|
logger.debug(`[CLAUDE] This is the Claude agent, NOT Gemini`);
|
|
@@ -67,7 +68,7 @@ async function runClaude(credentials, options = {}) {
|
|
|
67
68
|
const isAssistantVariant = process.env.HAPPY_SESSION_VARIANT === "assistant";
|
|
68
69
|
if (isAssistantVariant) {
|
|
69
70
|
try {
|
|
70
|
-
const { bootstrapAssistantHome } = await import('./bootstrap-
|
|
71
|
+
const { bootstrapAssistantHome } = await import('./bootstrap-B6EkZh4u.mjs');
|
|
71
72
|
await bootstrapAssistantHome();
|
|
72
73
|
} catch (error) {
|
|
73
74
|
logger.debug("[START] Assistant home bootstrap failed:", error);
|
|
@@ -183,11 +184,11 @@ async function runClaude(credentials, options = {}) {
|
|
|
183
184
|
agentStateVersion: parseInt(reconnectAgentStateVersion || "0", 10)
|
|
184
185
|
};
|
|
185
186
|
} else {
|
|
186
|
-
response = await api.getOrCreateSession({ tag: sessionTag, metadata, state });
|
|
187
|
+
response = await createSessionForStartup(() => api.getOrCreateSession({ tag: sessionTag, metadata, state }), { startedBy: options.startedBy, log: (m) => logger.debug(m) });
|
|
187
188
|
}
|
|
188
189
|
if (!response) {
|
|
189
190
|
let offlineSessionId = null;
|
|
190
|
-
const { claudeLocal } = await import('./claudeLocal-
|
|
191
|
+
const { claudeLocal } = await import('./claudeLocal-BAFjWhZ8.mjs');
|
|
191
192
|
const { createSessionScanner: createSessionScanner2 } = await loadDeps();
|
|
192
193
|
const reconnection = startOfflineReconnection({
|
|
193
194
|
serverUrl: configuration.serverUrl,
|
|
@@ -235,16 +236,18 @@ async function runClaude(credentials, options = {}) {
|
|
|
235
236
|
}
|
|
236
237
|
let reconnectSeeded = false;
|
|
237
238
|
let wakingFromHibernation = false;
|
|
239
|
+
let reconnectReplay = null;
|
|
238
240
|
if (reconnectSessionId) {
|
|
239
241
|
const snapshot = await api.getSession(response.id, response.encryptionKey, response.encryptionVariant);
|
|
240
242
|
if (snapshot.ok) {
|
|
241
243
|
response = applyServerSnapshot(response, snapshot.session);
|
|
242
244
|
reconnectSeeded = true;
|
|
243
245
|
logger.debug(`[START] Reconnect seeded from server: seq=${snapshot.session.seq} metadataVersion=${snapshot.session.metadataVersion}`);
|
|
244
|
-
const wake =
|
|
246
|
+
const wake = applyReconnectReplay(response);
|
|
245
247
|
response = wake.response;
|
|
246
|
-
|
|
247
|
-
|
|
248
|
+
reconnectReplay = wake.replay;
|
|
249
|
+
wakingFromHibernation = wake.replay?.source === "hibernation";
|
|
250
|
+
if (wake.replay) logger.debug(`[START] Resuming (${wake.replay.source}): replaying records after seq=${response.seq}`);
|
|
248
251
|
} else {
|
|
249
252
|
response = withoutServerSnapshot(response);
|
|
250
253
|
logger.debug(`[START] Reconnect without server snapshot (${snapshot.reason}); skipping existing messages`);
|
|
@@ -338,7 +341,7 @@ async function runClaude(credentials, options = {}) {
|
|
|
338
341
|
if (reconnectSessionId) {
|
|
339
342
|
session.suppressNextArchiveSignal();
|
|
340
343
|
if (!reconnectSeeded) session.skipExistingMessages();
|
|
341
|
-
if (!wakingFromHibernation) void session.cancelUndeliveredQueuedInputs();
|
|
344
|
+
if (!wakingFromHibernation) void session.cancelUndeliveredQueuedInputs(reconnectReplay ? { maxSeq: reconnectReplay.seq } : void 0);
|
|
342
345
|
session.updateMetadata((meta) => ({
|
|
343
346
|
...mergeReconnectMetadata(meta, metadata, Date.now()),
|
|
344
347
|
queueCancellation: true,
|
|
@@ -797,10 +800,13 @@ async function runClaude(credentials, options = {}) {
|
|
|
797
800
|
const wrapperTree = snapshotTree(process.pid);
|
|
798
801
|
try {
|
|
799
802
|
if (session) {
|
|
803
|
+
const exitCursor = intent === "offline" ? exitCursorStamp(session.messageCursor, Date.now()) : void 0;
|
|
804
|
+
if (exitCursor) session.freezeInbound();
|
|
800
805
|
currentSession?.cleanup();
|
|
801
806
|
await settleSessionOnExit(session.sessionId, intent, {
|
|
802
807
|
updateMetadata: (handler) => session.updateMetadata(handler),
|
|
803
|
-
updateMetadataAndWait: (handler) => session.updateMetadataAndWait(handler),
|
|
808
|
+
updateMetadataAndWait: (handler, timeoutMs) => session.updateMetadataAndWait(handler, timeoutMs),
|
|
809
|
+
exitCursor,
|
|
804
810
|
sendSessionDeath: () => session.sendSessionDeath(),
|
|
805
811
|
archiveSession: (id) => api.archiveSession(id),
|
|
806
812
|
deactivateSession: (id) => api.deactivateSession(id),
|
|
@@ -1,25 +1,26 @@
|
|
|
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 defaultPermissionMode = require('./defaultPermissionMode-
|
|
4
|
+
var sessionLock = require('./sessionLock-CdIRJlHH.cjs');
|
|
5
|
+
var persistence = require('./persistence-BY-D00wT.cjs');
|
|
6
|
+
var defaultPermissionMode = require('./defaultPermissionMode-BmvjP32v.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-
|
|
12
|
-
var index = require('./index-
|
|
8
|
+
var api = require('./api-COHFAkb_.cjs');
|
|
9
|
+
var logger = require('./logger-DgBwUSgS.cjs');
|
|
10
|
+
var createSessionMetadata = require('./createSessionMetadata-DNIbKLHg.cjs');
|
|
11
|
+
var _package = require('./package-NoD8QOOM.cjs');
|
|
12
|
+
var index = require('./index-Df2eHm3O.cjs');
|
|
13
13
|
var forkBackfill = require('./forkBackfill-8eLDeS73.cjs');
|
|
14
|
-
var configuration = require('./configuration-
|
|
15
|
-
var controlClient = require('./controlClient-
|
|
16
|
-
var machineMetadata = require('./machineMetadata-
|
|
17
|
-
var projectPath = require('./projectPath-
|
|
14
|
+
var configuration = require('./configuration-C8JgseHy.cjs');
|
|
15
|
+
var controlClient = require('./controlClient-D68Zj7Q-.cjs');
|
|
16
|
+
var machineMetadata = require('./machineMetadata-DB03ez4K.cjs');
|
|
17
|
+
var projectPath = require('./projectPath-C3ioB4Bu.cjs');
|
|
18
18
|
var path = require('node:path');
|
|
19
|
+
var startupSessionCreate = require('./startupSessionCreate-CKEbq0tL.cjs');
|
|
19
20
|
var permissionMode = require('./permissionMode-CrV-XuMs.cjs');
|
|
20
21
|
var authRelay = require('./authRelay-Dy1qU9td.cjs');
|
|
21
22
|
var promises = require('node:fs/promises');
|
|
22
|
-
var attachmentContent = require('./attachmentContent-
|
|
23
|
+
var attachmentContent = require('./attachmentContent-mIhbtRKl.cjs');
|
|
23
24
|
var transcriptCursor = require('./transcriptCursor-DcXGLeSc.cjs');
|
|
24
25
|
var startupPlan = require('./startupPlan-BLMbfQIH.cjs');
|
|
25
26
|
require('node:fs');
|
|
@@ -27,35 +28,35 @@ require('./processTreeSnapshot-mDbnuojn.cjs');
|
|
|
27
28
|
require('node:child_process');
|
|
28
29
|
require('zod');
|
|
29
30
|
require('axios');
|
|
30
|
-
require('./lidState-
|
|
31
|
+
require('./lidState-x8cJ8J_9.cjs');
|
|
31
32
|
require('os');
|
|
32
33
|
require('child_process');
|
|
33
34
|
require('node:events');
|
|
34
35
|
require('socket.io-client');
|
|
35
|
-
require('./pushNotifications-
|
|
36
|
+
require('./pushNotifications-BXoOSq_G.cjs');
|
|
36
37
|
require('./contentLogMetadata-ZSFk_NjQ.cjs');
|
|
37
38
|
require('./limits-C-a7gr04.cjs');
|
|
38
|
-
require('./time-
|
|
39
|
-
require('./registerCommonHandlers-
|
|
39
|
+
require('./time-nqa9shu8.cjs');
|
|
40
|
+
require('./registerCommonHandlers-CRjBoJLK.cjs');
|
|
40
41
|
require('util');
|
|
41
42
|
require('fs/promises');
|
|
42
43
|
require('crypto');
|
|
43
44
|
require('path');
|
|
44
45
|
require('cross-spawn');
|
|
45
46
|
require('@paralleldrive/cuid2');
|
|
46
|
-
require('./sync-
|
|
47
|
+
require('./sync-1hQ5KHpL.cjs');
|
|
47
48
|
require('./backgroundTaskActivity-CBvUdj39.cjs');
|
|
48
49
|
require('chalk');
|
|
49
50
|
require('node:util');
|
|
50
|
-
require('./detectCLI-
|
|
51
|
+
require('./detectCLI-BuYR_Qxe.cjs');
|
|
51
52
|
require('fs');
|
|
52
|
-
require('./localHappyAgentAuth-
|
|
53
|
+
require('./localHappyAgentAuth-DZ2kb9uq.cjs');
|
|
53
54
|
require('tweetnacl');
|
|
54
55
|
require('url');
|
|
55
56
|
|
|
56
57
|
const DEFAULT_CLAUDE_MODEL = void 0;
|
|
57
58
|
const DEFAULT_CLAUDE_EFFORT = void 0;
|
|
58
|
-
const importRunClaudeDeps = () => Promise.resolve().then(function () { return require('./runClaudeDeps-
|
|
59
|
+
const importRunClaudeDeps = () => Promise.resolve().then(function () { return require('./runClaudeDeps-CLubzWnA.cjs'); });
|
|
59
60
|
async function runClaude(credentials, options = {}) {
|
|
60
61
|
logger.logger.debug(`[CLAUDE] ===== CLAUDE MODE STARTING =====`);
|
|
61
62
|
logger.logger.debug(`[CLAUDE] This is the Claude agent, NOT Gemini`);
|
|
@@ -69,7 +70,7 @@ async function runClaude(credentials, options = {}) {
|
|
|
69
70
|
const isAssistantVariant = process.env.HAPPY_SESSION_VARIANT === "assistant";
|
|
70
71
|
if (isAssistantVariant) {
|
|
71
72
|
try {
|
|
72
|
-
const { bootstrapAssistantHome } = await Promise.resolve().then(function () { return require('./bootstrap-
|
|
73
|
+
const { bootstrapAssistantHome } = await Promise.resolve().then(function () { return require('./bootstrap-CYtOtbi7.cjs'); });
|
|
73
74
|
await bootstrapAssistantHome();
|
|
74
75
|
} catch (error) {
|
|
75
76
|
logger.logger.debug("[START] Assistant home bootstrap failed:", error);
|
|
@@ -185,11 +186,11 @@ async function runClaude(credentials, options = {}) {
|
|
|
185
186
|
agentStateVersion: parseInt(reconnectAgentStateVersion || "0", 10)
|
|
186
187
|
};
|
|
187
188
|
} else {
|
|
188
|
-
response = await api$1.getOrCreateSession({ tag: sessionTag, metadata, state });
|
|
189
|
+
response = await startupSessionCreate.createSessionForStartup(() => api$1.getOrCreateSession({ tag: sessionTag, metadata, state }), { startedBy: options.startedBy, log: (m) => logger.logger.debug(m) });
|
|
189
190
|
}
|
|
190
191
|
if (!response) {
|
|
191
192
|
let offlineSessionId = null;
|
|
192
|
-
const { claudeLocal } = await Promise.resolve().then(function () { return require('./claudeLocal-
|
|
193
|
+
const { claudeLocal } = await Promise.resolve().then(function () { return require('./claudeLocal-O_w7-fBh.cjs'); });
|
|
193
194
|
const { createSessionScanner: createSessionScanner2 } = await loadDeps();
|
|
194
195
|
const reconnection = api.startOfflineReconnection({
|
|
195
196
|
serverUrl: configuration.configuration.serverUrl,
|
|
@@ -237,16 +238,18 @@ async function runClaude(credentials, options = {}) {
|
|
|
237
238
|
}
|
|
238
239
|
let reconnectSeeded = false;
|
|
239
240
|
let wakingFromHibernation = false;
|
|
241
|
+
let reconnectReplay = null;
|
|
240
242
|
if (reconnectSessionId) {
|
|
241
243
|
const snapshot = await api$1.getSession(response.id, response.encryptionKey, response.encryptionVariant);
|
|
242
244
|
if (snapshot.ok) {
|
|
243
245
|
response = sessionLock.applyServerSnapshot(response, snapshot.session);
|
|
244
246
|
reconnectSeeded = true;
|
|
245
247
|
logger.logger.debug(`[START] Reconnect seeded from server: seq=${snapshot.session.seq} metadataVersion=${snapshot.session.metadataVersion}`);
|
|
246
|
-
const wake = sessionLock.
|
|
248
|
+
const wake = sessionLock.applyReconnectReplay(response);
|
|
247
249
|
response = wake.response;
|
|
248
|
-
|
|
249
|
-
|
|
250
|
+
reconnectReplay = wake.replay;
|
|
251
|
+
wakingFromHibernation = wake.replay?.source === "hibernation";
|
|
252
|
+
if (wake.replay) logger.logger.debug(`[START] Resuming (${wake.replay.source}): replaying records after seq=${response.seq}`);
|
|
250
253
|
} else {
|
|
251
254
|
response = sessionLock.withoutServerSnapshot(response);
|
|
252
255
|
logger.logger.debug(`[START] Reconnect without server snapshot (${snapshot.reason}); skipping existing messages`);
|
|
@@ -340,7 +343,7 @@ async function runClaude(credentials, options = {}) {
|
|
|
340
343
|
if (reconnectSessionId) {
|
|
341
344
|
session.suppressNextArchiveSignal();
|
|
342
345
|
if (!reconnectSeeded) session.skipExistingMessages();
|
|
343
|
-
if (!wakingFromHibernation) void session.cancelUndeliveredQueuedInputs();
|
|
346
|
+
if (!wakingFromHibernation) void session.cancelUndeliveredQueuedInputs(reconnectReplay ? { maxSeq: reconnectReplay.seq } : void 0);
|
|
344
347
|
session.updateMetadata((meta) => ({
|
|
345
348
|
...sessionLock.mergeReconnectMetadata(meta, metadata, Date.now()),
|
|
346
349
|
queueCancellation: true,
|
|
@@ -799,10 +802,13 @@ async function runClaude(credentials, options = {}) {
|
|
|
799
802
|
const wrapperTree = snapshotTree(process.pid);
|
|
800
803
|
try {
|
|
801
804
|
if (session) {
|
|
805
|
+
const exitCursor = intent === "offline" ? sessionLock.exitCursorStamp(session.messageCursor, Date.now()) : void 0;
|
|
806
|
+
if (exitCursor) session.freezeInbound();
|
|
802
807
|
currentSession?.cleanup();
|
|
803
808
|
await settleSessionOnExit(session.sessionId, intent, {
|
|
804
809
|
updateMetadata: (handler) => session.updateMetadata(handler),
|
|
805
|
-
updateMetadataAndWait: (handler) => session.updateMetadataAndWait(handler),
|
|
810
|
+
updateMetadataAndWait: (handler, timeoutMs) => session.updateMetadataAndWait(handler, timeoutMs),
|
|
811
|
+
exitCursor,
|
|
806
812
|
sendSessionDeath: () => session.sendSessionDeath(),
|
|
807
813
|
archiveSession: (id) => api$1.archiveSession(id),
|
|
808
814
|
deactivateSession: (id) => api$1.deactivateSession(id),
|
|
@@ -1,99 +1,101 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var logger = require('./logger-
|
|
4
|
-
var controlClient = require('./controlClient-
|
|
3
|
+
var logger = require('./logger-DgBwUSgS.cjs');
|
|
4
|
+
var controlClient = require('./controlClient-D68Zj7Q-.cjs');
|
|
5
5
|
var backgroundTaskActivity = require('./backgroundTaskActivity-CBvUdj39.cjs');
|
|
6
|
-
var deterministicJson = require('./deterministicJson-
|
|
7
|
-
var client = require('./client-
|
|
6
|
+
var deterministicJson = require('./deterministicJson-BS7D7URE.cjs');
|
|
7
|
+
var client = require('./client-DWs6k041.cjs');
|
|
8
8
|
var node_crypto = require('node:crypto');
|
|
9
|
-
var
|
|
10
|
-
var query = require('./query-
|
|
9
|
+
var sessionExitLifecycle = require('./sessionExitLifecycle-DFltxXU8.cjs');
|
|
10
|
+
var query = require('./query-CdCxzuaB.cjs');
|
|
11
11
|
var claudeAgentSdk = require('@anthropic-ai/claude-agent-sdk');
|
|
12
12
|
var permissionMode = require('./permissionMode-CrV-XuMs.cjs');
|
|
13
|
-
var systemPrompt = require('./systemPrompt-
|
|
13
|
+
var systemPrompt = require('./systemPrompt-Dj7pgkMK.cjs');
|
|
14
14
|
var path$1 = require('node:path');
|
|
15
|
-
var specialCommands = require('./specialCommands-
|
|
15
|
+
var specialCommands = require('./specialCommands-Zwr2C6A2.cjs');
|
|
16
16
|
require('axios');
|
|
17
17
|
require('node:events');
|
|
18
18
|
require('socket.io-client');
|
|
19
|
-
var pushNotifications = require('./pushNotifications-
|
|
19
|
+
var pushNotifications = require('./pushNotifications-BXoOSq_G.cjs');
|
|
20
20
|
require('tweetnacl');
|
|
21
|
-
var configuration = require('./configuration-
|
|
22
|
-
require('./index-
|
|
23
|
-
require('./registerCommonHandlers-
|
|
21
|
+
var configuration = require('./configuration-C8JgseHy.cjs');
|
|
22
|
+
require('./index-Df2eHm3O.cjs');
|
|
23
|
+
require('./registerCommonHandlers-CRjBoJLK.cjs');
|
|
24
24
|
require('os');
|
|
25
25
|
require('child_process');
|
|
26
26
|
require('@paralleldrive/cuid2');
|
|
27
|
-
require('./persistence-
|
|
27
|
+
require('./persistence-BY-D00wT.cjs');
|
|
28
28
|
var contentLogMetadata = require('./contentLogMetadata-ZSFk_NjQ.cjs');
|
|
29
29
|
require('chalk');
|
|
30
30
|
var types = require('./types-CRS-srZK.cjs');
|
|
31
31
|
var path = require('./path-B7zW-WwE.cjs');
|
|
32
32
|
var fs = require('fs/promises');
|
|
33
|
-
var time = require('./time-
|
|
33
|
+
var time = require('./time-nqa9shu8.cjs');
|
|
34
34
|
var node_fs = require('node:fs');
|
|
35
|
-
var sessionScanner = require('./sessionScanner-
|
|
35
|
+
var sessionScanner = require('./sessionScanner-BMwgGAhY.cjs');
|
|
36
36
|
var node_child_process = require('node:child_process');
|
|
37
|
-
var streamRelay = require('./streamRelay-
|
|
38
|
-
var attachmentContent = require('./attachmentContent-
|
|
37
|
+
var streamRelay = require('./streamRelay-Gy8Xfnon.cjs');
|
|
38
|
+
var attachmentContent = require('./attachmentContent-mIhbtRKl.cjs');
|
|
39
39
|
var promises = require('node:fs/promises');
|
|
40
|
-
var claudeSessionFork = require('./claudeSessionFork-
|
|
41
|
-
var registerKillSessionHandler = require('./registerKillSessionHandler-
|
|
42
|
-
var doctor = require('./doctor-
|
|
40
|
+
var claudeSessionFork = require('./claudeSessionFork-pwcKqB-e.cjs');
|
|
41
|
+
var registerKillSessionHandler = require('./registerKillSessionHandler-7fOm6ooh.cjs');
|
|
42
|
+
var doctor = require('./doctor-Be7zC0AF.cjs');
|
|
43
43
|
var node_http = require('node:http');
|
|
44
44
|
var editPaths = require('./editPaths-Bqp4OFPw.cjs');
|
|
45
|
-
var projectPath = require('./projectPath-
|
|
45
|
+
var projectPath = require('./projectPath-C3ioB4Bu.cjs');
|
|
46
46
|
var processTreeSnapshot = require('./processTreeSnapshot-mDbnuojn.cjs');
|
|
47
|
-
var titleGenerator = require('./titleGenerator-
|
|
47
|
+
var titleGenerator = require('./titleGenerator-D09XyYYG.cjs');
|
|
48
48
|
var oneShotPrompts = require('./oneShotPrompts-CL0dip9C.cjs');
|
|
49
|
-
var reportProgressTool = require('./reportProgressTool-
|
|
49
|
+
var reportProgressTool = require('./reportProgressTool-th4trcET.cjs');
|
|
50
50
|
require('node:util');
|
|
51
|
-
require('./prompt-
|
|
51
|
+
require('./prompt-Bof2aQkI.cjs');
|
|
52
|
+
require('node:os');
|
|
52
53
|
require('zod');
|
|
53
|
-
require('./
|
|
54
|
-
require('./
|
|
55
|
-
require('./
|
|
54
|
+
require('./pi-DlsrPCTa.cjs');
|
|
55
|
+
require('./fileStore-7qhnbs6N.cjs');
|
|
56
|
+
require('./client-CUO3ItoB.cjs');
|
|
57
|
+
require('./context-D1lgQTJC.cjs');
|
|
58
|
+
require('./sessionOps-DVA-00nR.cjs');
|
|
56
59
|
require('./authRelay-Dy1qU9td.cjs');
|
|
57
|
-
require('./resources-
|
|
58
|
-
require('./tools-
|
|
59
|
-
require('./peerTools-
|
|
60
|
-
require('node:os');
|
|
60
|
+
require('./resources-BPyN59Iv.cjs');
|
|
61
|
+
require('./tools-DiCXnAC5.cjs');
|
|
62
|
+
require('./peerTools-CP-x-Peu.cjs');
|
|
61
63
|
require('./ids-B6ZC0HGt.cjs');
|
|
62
|
-
require('./remoteSessionClient-
|
|
64
|
+
require('./remoteSessionClient-CFCn42bs.cjs');
|
|
63
65
|
require('@modelcontextprotocol/sdk/server/mcp.js');
|
|
64
66
|
require('@modelcontextprotocol/sdk/server/streamableHttp.js');
|
|
65
67
|
require('./limits-C-a7gr04.cjs');
|
|
66
|
-
require('./downloadTarget-
|
|
68
|
+
require('./downloadTarget-LyOiucn_.cjs');
|
|
67
69
|
require('./terminals-B_bfC9c2.cjs');
|
|
68
70
|
require('./terminalTitleSuggest-DhvRFX3H.cjs');
|
|
69
71
|
require('./tmuxSocket-D-Xt6Vn-.cjs');
|
|
70
|
-
require('./bootstrap-
|
|
71
|
-
require('./package-
|
|
72
|
+
require('./bootstrap-CYtOtbi7.cjs');
|
|
73
|
+
require('./package-NoD8QOOM.cjs');
|
|
72
74
|
require('./agentGuidance-BtBx2xxE.cjs');
|
|
73
75
|
require('./trimIdent-4gvk9Wk6.cjs');
|
|
74
76
|
require('./webPanels-FCgFKvVe.cjs');
|
|
75
77
|
require('./previewPath-B0rBdhy1.cjs');
|
|
76
78
|
require('crypto');
|
|
77
79
|
require('./smallFastModel-D_uxGMo3.cjs');
|
|
78
|
-
require('./rateLimitWindows-
|
|
80
|
+
require('./rateLimitWindows-OpAmdOtC.cjs');
|
|
79
81
|
require('util');
|
|
80
82
|
require('path');
|
|
81
83
|
require('cross-spawn');
|
|
82
|
-
require('./sync-
|
|
84
|
+
require('./sync-1hQ5KHpL.cjs');
|
|
83
85
|
require('./transcriptCursor-DcXGLeSc.cjs');
|
|
84
|
-
require('./startFileWatcher-
|
|
86
|
+
require('./startFileWatcher-K6hJSyiR.cjs');
|
|
85
87
|
require('node:readline');
|
|
86
88
|
require('./doctor-u46qYYKX.cjs');
|
|
87
89
|
require('ps-list');
|
|
88
|
-
require('./doctorReadiness-
|
|
89
|
-
require('./detectCLI-
|
|
90
|
+
require('./doctorReadiness-Dl6yRQCy.cjs');
|
|
91
|
+
require('./detectCLI-BuYR_Qxe.cjs');
|
|
90
92
|
require('fs');
|
|
91
93
|
require('./cliUpdate-DsKXPFYp.cjs');
|
|
92
|
-
require('./piRunnerArgs-
|
|
93
|
-
require('./acpSessionResume-
|
|
94
|
+
require('./piRunnerArgs-gxLYIZH4.cjs');
|
|
95
|
+
require('./acpSessionResume-BaVMD80f.cjs');
|
|
94
96
|
require('url');
|
|
95
97
|
require('node:module');
|
|
96
|
-
require('./client-
|
|
98
|
+
require('./client-D_U2VjO3.cjs');
|
|
97
99
|
require('./precheckCompat-CWOi5c9L.cjs');
|
|
98
100
|
|
|
99
101
|
const SCHEDULE_WAKEUP_GRACE_MS = 6e4;
|
|
@@ -3729,7 +3731,7 @@ async function claudeRemoteLauncher(session, onPermissionModeChange, onEffective
|
|
|
3729
3731
|
logger.logger.debug("[claudeRemoteLauncher] Starting remote launcher");
|
|
3730
3732
|
const hasTTY = process.stdout.isTTY && process.stdin.isTTY;
|
|
3731
3733
|
logger.logger.debug(`[claudeRemoteLauncher] TTY available: ${hasTTY}`);
|
|
3732
|
-
let messageBuffer
|
|
3734
|
+
let messageBuffer = new sessionExitLifecycle.MessageBuffer();
|
|
3733
3735
|
let inkInstance = null;
|
|
3734
3736
|
if (hasTTY) {
|
|
3735
3737
|
const [{ render }, { default: React }, { RemoteModeDisplay }] = await Promise.all([
|
|
@@ -3739,7 +3741,7 @@ async function claudeRemoteLauncher(session, onPermissionModeChange, onEffective
|
|
|
3739
3741
|
]);
|
|
3740
3742
|
console.clear();
|
|
3741
3743
|
inkInstance = render(React.createElement(RemoteModeDisplay, {
|
|
3742
|
-
messageBuffer
|
|
3744
|
+
messageBuffer,
|
|
3743
3745
|
logPath: process.env.DEBUG ? session.logPath : void 0,
|
|
3744
3746
|
onExit: async () => {
|
|
3745
3747
|
logger.logger.debug("[remote]: Exiting client via Ctrl-C");
|
|
@@ -3913,14 +3915,14 @@ async function claudeRemoteLauncher(session, onPermissionModeChange, onEffective
|
|
|
3913
3915
|
session.scheduledWakeups.observe(message);
|
|
3914
3916
|
if (message.type === "system" && message.subtype === "api_retry") {
|
|
3915
3917
|
const notice = describeClaudeApiRetry(message);
|
|
3916
|
-
messageBuffer
|
|
3918
|
+
messageBuffer.addMessage(notice, "status");
|
|
3917
3919
|
if (apiRetryGate.observe(message, Date.now())) {
|
|
3918
3920
|
session.client.sendSessionEvent({ type: "message", message: notice, kind: "claude-api-retry" });
|
|
3919
3921
|
}
|
|
3920
3922
|
} else if (message.type === "system" && message.subtype === "informational") {
|
|
3921
3923
|
const warning = describeClaudeInformational(message);
|
|
3922
3924
|
if (warning) {
|
|
3923
|
-
messageBuffer
|
|
3925
|
+
messageBuffer.addMessage(warning, "status");
|
|
3924
3926
|
session.client.sendSessionEvent({ type: "message", message: warning, kind: "claude-warning" });
|
|
3925
3927
|
}
|
|
3926
3928
|
} else if (message.type === "result") {
|
|
@@ -3931,7 +3933,7 @@ async function claudeRemoteLauncher(session, onPermissionModeChange, onEffective
|
|
|
3931
3933
|
sdkToLogConverter.convert(message);
|
|
3932
3934
|
return;
|
|
3933
3935
|
}
|
|
3934
|
-
formatClaudeMessageForInk(message, messageBuffer
|
|
3936
|
+
formatClaudeMessageForInk(message, messageBuffer);
|
|
3935
3937
|
if (message.type === "assistant") {
|
|
3936
3938
|
let umessage = message;
|
|
3937
3939
|
if (umessage.message.content && Array.isArray(umessage.message.content)) {
|
|
@@ -4049,15 +4051,15 @@ async function claudeRemoteLauncher(session, onPermissionModeChange, onEffective
|
|
|
4049
4051
|
]);
|
|
4050
4052
|
while (!exitReason) {
|
|
4051
4053
|
logger.logger.debug("[remote]: launch");
|
|
4052
|
-
messageBuffer
|
|
4054
|
+
messageBuffer.addMessage("\u2550".repeat(40), "status");
|
|
4053
4055
|
const isNewSession = session.sessionId !== previousSessionId;
|
|
4054
4056
|
if (isNewSession) {
|
|
4055
|
-
messageBuffer
|
|
4057
|
+
messageBuffer.addMessage("Starting new Claude session...", "status");
|
|
4056
4058
|
permissionHandler.reset();
|
|
4057
4059
|
sdkToLogConverter.resetParentChain();
|
|
4058
4060
|
logger.logger.debug(`[remote]: New session detected (previous: ${previousSessionId}, current: ${session.sessionId})`);
|
|
4059
4061
|
} else {
|
|
4060
|
-
messageBuffer
|
|
4062
|
+
messageBuffer.addMessage("Continuing Claude session...", "status");
|
|
4061
4063
|
logger.logger.debug(`[remote]: Continuing existing session: ${session.sessionId}`);
|
|
4062
4064
|
}
|
|
4063
4065
|
previousSessionId = session.sessionId;
|
|
@@ -4345,7 +4347,7 @@ async function claudeRemoteLauncher(session, onPermissionModeChange, onEffective
|
|
|
4345
4347
|
}
|
|
4346
4348
|
});
|
|
4347
4349
|
logger.logger.debug(`[remote]: cleanup done +${Date.now() - t0}ms rawMode=${process.stdin.isRaw}`);
|
|
4348
|
-
messageBuffer
|
|
4350
|
+
messageBuffer.clear();
|
|
4349
4351
|
if (abortFuture) {
|
|
4350
4352
|
abortFuture.resolve(void 0);
|
|
4351
4353
|
}
|
|
@@ -4379,7 +4381,7 @@ async function loop(opts) {
|
|
|
4379
4381
|
logger.logger.debug(`[loop] Iteration with mode: ${mode}`);
|
|
4380
4382
|
switch (mode) {
|
|
4381
4383
|
case "local": {
|
|
4382
|
-
const { claudeLocalLauncher } = await Promise.resolve().then(function () { return require('./claudeLocalLauncher-
|
|
4384
|
+
const { claudeLocalLauncher } = await Promise.resolve().then(function () { return require('./claudeLocalLauncher-Df3zg1q0.cjs'); });
|
|
4383
4385
|
const result = await claudeLocalLauncher(session);
|
|
4384
4386
|
switch (result.type) {
|
|
4385
4387
|
case "switch":
|
|
@@ -4544,71 +4546,6 @@ function cleanupHookSettingsFile(filepath) {
|
|
|
4544
4546
|
}
|
|
4545
4547
|
}
|
|
4546
4548
|
|
|
4547
|
-
async function settleSessionOnExit(sessionId, intent, deps) {
|
|
4548
|
-
if (intent === "archive") {
|
|
4549
|
-
deps.updateMetadata((currentMetadata) => ({
|
|
4550
|
-
...currentMetadata,
|
|
4551
|
-
lifecycleState: "archived",
|
|
4552
|
-
lifecycleStateSince: Date.now(),
|
|
4553
|
-
archivedBy: "cli",
|
|
4554
|
-
archiveReason: "User terminated"
|
|
4555
|
-
}));
|
|
4556
|
-
}
|
|
4557
|
-
if (intent === "hibernate" && deps.hibernation) {
|
|
4558
|
-
const stamp = deps.hibernation;
|
|
4559
|
-
const handler = (currentMetadata) => ({ ...currentMetadata, hibernation: stamp });
|
|
4560
|
-
const landed = deps.updateMetadataAndWait ? await deps.updateMetadataAndWait(handler) : (deps.updateMetadata(handler), false);
|
|
4561
|
-
if (!landed) deps.log?.("[START] hibernation stamp not confirmed before going offline");
|
|
4562
|
-
}
|
|
4563
|
-
deps.sendSessionDeath();
|
|
4564
|
-
try {
|
|
4565
|
-
if (intent === "archive") await deps.archiveSession(sessionId);
|
|
4566
|
-
else await deps.deactivateSession(sessionId);
|
|
4567
|
-
} catch (error) {
|
|
4568
|
-
deps.log?.(`[START] ${intent === "archive" ? "archiveSession" : "deactivateSession"} during cleanup failed:`, error);
|
|
4569
|
-
}
|
|
4570
|
-
}
|
|
4571
|
-
class SessionExitGate {
|
|
4572
|
-
decided = null;
|
|
4573
|
-
hibernateCommitted = false;
|
|
4574
|
-
deferred = null;
|
|
4575
|
-
/** Returns the intent to act on, or null when cleanup already started. */
|
|
4576
|
-
claim(intent) {
|
|
4577
|
-
if (this.decided === "hibernate" && !this.hibernateCommitted && intent !== "hibernate") {
|
|
4578
|
-
if (this.deferred !== "archive") this.deferred = intent;
|
|
4579
|
-
return null;
|
|
4580
|
-
}
|
|
4581
|
-
if (this.decided !== null) return null;
|
|
4582
|
-
this.decided = intent;
|
|
4583
|
-
return intent;
|
|
4584
|
-
}
|
|
4585
|
-
get current() {
|
|
4586
|
-
return this.decided;
|
|
4587
|
-
}
|
|
4588
|
-
/** B-587: an exit was requested while the hibernation was deciding. */
|
|
4589
|
-
get exitRequested() {
|
|
4590
|
-
return this.deferred !== null;
|
|
4591
|
-
}
|
|
4592
|
-
/** B-587: the hibernation passed its last check — no more deferral. */
|
|
4593
|
-
commitHibernate() {
|
|
4594
|
-
if (this.decided === "hibernate") this.hibernateCommitted = true;
|
|
4595
|
-
}
|
|
4596
|
-
/**
|
|
4597
|
-
* B-587: a hibernation that aborted hands the exit back. Returns the exit
|
|
4598
|
-
* deferred meanwhile (the caller must run it now), or null.
|
|
4599
|
-
*/
|
|
4600
|
-
release(intent) {
|
|
4601
|
-
if (this.decided !== intent || intent === "hibernate" && this.hibernateCommitted) return null;
|
|
4602
|
-
this.decided = null;
|
|
4603
|
-
const deferred = this.deferred;
|
|
4604
|
-
this.deferred = null;
|
|
4605
|
-
return deferred;
|
|
4606
|
-
}
|
|
4607
|
-
}
|
|
4608
|
-
function exitIntentFromArchiveFlag(archive) {
|
|
4609
|
-
return archive ?? true ? "archive" : "offline";
|
|
4610
|
-
}
|
|
4611
|
-
|
|
4612
4549
|
function isUnsupportedSideQuestionError(error) {
|
|
4613
4550
|
const message = error instanceof Error ? error.message : String(error);
|
|
4614
4551
|
return /unknown|unsupported|not supported|unrecognized|invalid.*subtype/i.test(message);
|
|
@@ -4785,7 +4722,7 @@ function registerSideQuestionHandler(rpc, deps) {
|
|
|
4785
4722
|
const retainMs = deps.retainMs ?? SIDE_QUESTION_RETAIN_MS;
|
|
4786
4723
|
const maxRunMs = deps.maxRunMs ?? SIDE_QUESTION_MAX_RUN_MS;
|
|
4787
4724
|
const fork = deps.run ?? (async (input) => {
|
|
4788
|
-
const { query } = await Promise.resolve().then(function () { return require('./index-
|
|
4725
|
+
const { query } = await Promise.resolve().then(function () { return require('./index-jF2t3ACW.cjs'); });
|
|
4789
4726
|
return runSideQuestion(query, input);
|
|
4790
4727
|
});
|
|
4791
4728
|
const run = async (input, live) => {
|
|
@@ -5208,6 +5145,9 @@ function resolveMessageMode(current, meta, ctx) {
|
|
|
5208
5145
|
|
|
5209
5146
|
exports.reportSessionEditToDaemon = controlClient.reportSessionEditToDaemon;
|
|
5210
5147
|
exports.startHappyServer = deterministicJson.startHappyServer;
|
|
5148
|
+
exports.SessionExitGate = sessionExitLifecycle.SessionExitGate;
|
|
5149
|
+
exports.exitIntentFromArchiveFlag = sessionExitLifecycle.exitIntentFromArchiveFlag;
|
|
5150
|
+
exports.settleSessionOnExit = sessionExitLifecycle.settleSessionOnExit;
|
|
5211
5151
|
exports.claudeCheckSession = systemPrompt.claudeCheckSession;
|
|
5212
5152
|
exports.parseSpecialCommand = specialCommands.parseSpecialCommand;
|
|
5213
5153
|
exports.contentLogMetadata = contentLogMetadata.contentLogMetadata;
|
|
@@ -5226,7 +5166,6 @@ exports.createSelfReportState = reportProgressTool.createSelfReportState;
|
|
|
5226
5166
|
exports.BoardAnalyzer = BoardAnalyzer;
|
|
5227
5167
|
exports.FileRateLimiter = FileRateLimiter;
|
|
5228
5168
|
exports.PrewarmHookGate = PrewarmHookGate;
|
|
5229
|
-
exports.SessionExitGate = SessionExitGate;
|
|
5230
5169
|
exports.acquirePrewarmSlot = acquirePrewarmSlot;
|
|
5231
5170
|
exports.claudeModeHash = claudeModeHash;
|
|
5232
5171
|
exports.claudePrewarmEligibility = claudePrewarmEligibility;
|
|
@@ -5235,7 +5174,6 @@ exports.cleanupHookSettingsFile = cleanupHookSettingsFile;
|
|
|
5235
5174
|
exports.createClaudePrewarmLease = createClaudePrewarmLease;
|
|
5236
5175
|
exports.disposeAllClaudePrewarms = disposeAllClaudePrewarms;
|
|
5237
5176
|
exports.evaluatePrewarmPrediction = evaluatePrewarmPrediction;
|
|
5238
|
-
exports.exitIntentFromArchiveFlag = exitIntentFromArchiveFlag;
|
|
5239
5177
|
exports.formatPrewarmLine = formatPrewarmLine;
|
|
5240
5178
|
exports.generateHookSettingsFile = generateHookSettingsFile;
|
|
5241
5179
|
exports.loop = loop;
|
|
@@ -5246,7 +5184,6 @@ exports.readPrewarmCache = readPrewarmCache;
|
|
|
5246
5184
|
exports.registerSideQuestionHandler = registerSideQuestionHandler;
|
|
5247
5185
|
exports.replayClaudeForkJsonl = replayClaudeForkJsonl;
|
|
5248
5186
|
exports.resolveMessageMode = resolveMessageMode;
|
|
5249
|
-
exports.settleSessionOnExit = settleSessionOnExit;
|
|
5250
5187
|
exports.startHookServer = startHookServer;
|
|
5251
5188
|
exports.withAssistantDenylist = withAssistantDenylist;
|
|
5252
5189
|
exports.writePrewarmCache = writePrewarmCache;
|