very-happy-cli 0.2.166 → 0.2.168
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-tRWk7yi7.mjs → AcpBackend-BoLDLYNT.mjs} +3 -3
- package/dist/{AcpBackend-20VHOXwb.cjs → AcpBackend-r83MMm-i.cjs} +3 -3
- package/dist/{BasePermissionHandler-COKc4pmt.cjs → BasePermissionHandler-CS0eRtT-.cjs} +1 -1
- package/dist/{BasePermissionHandler-CDCLIrZJ.mjs → BasePermissionHandler-DTcVlmKi.mjs} +1 -1
- package/dist/{BaseReasoningProcessor-BDVKvooR.mjs → BaseReasoningProcessor-BddnNlXQ.mjs} +1 -1
- package/dist/{BaseReasoningProcessor-DAGQdkNp.cjs → BaseReasoningProcessor-RJiBhA8h.cjs} +1 -1
- package/dist/{agentHome-2IbIjKCa.mjs → agentHome--LRsdUx6.mjs} +4 -4
- package/dist/{agentHome-KVWj6nCl.cjs → agentHome-D-e_j9hK.cjs} +4 -4
- package/dist/{api-DnNL5fLw.cjs → api-COSJ3Yb7.cjs} +88 -10
- package/dist/{api-Cmz3XS4P.mjs → api-hXLwtgMi.mjs} +88 -10
- package/dist/{apiMachine-DeoQ8QbZ.cjs → apiMachine-BTCUUGC6.cjs} +50 -15
- package/dist/{apiMachine-B6ySCFe0.mjs → apiMachine-BauSXWNd.mjs} +50 -15
- package/dist/{attachmentContent-DPWxHgX4.cjs → attachmentContent-BCK0AxDS.cjs} +2 -2
- package/dist/{attachmentContent-CTXapi-_.mjs → attachmentContent-CS0B2N0Q.mjs} +2 -2
- package/dist/{attachmentLimits-BfgKV5iE.cjs → attachmentLimits-BEYEEBm8.cjs} +13 -1
- package/dist/{attachmentLimits-C1PCCM79.mjs → attachmentLimits-CxG3T18E.mjs} +13 -1
- package/dist/{auth-pzWIFdOD.mjs → auth-BFeFguVs.mjs} +5 -5
- package/dist/{auth-BMaBjRAj.mjs → auth-BUXH1L2k.mjs} +10 -10
- package/dist/{auth-D4-eQz85.cjs → auth-CCj5KlYS.cjs} +10 -10
- package/dist/{auth-ietHtvwu.cjs → auth-CfB2XcAW.cjs} +5 -5
- package/dist/{auto-DL75Dx3I.mjs → auto-D5BYdAoT.mjs} +14 -14
- package/dist/{auto-DOWTQDPa.cjs → auto-ZCHKb4jo.cjs} +14 -14
- package/dist/{bootstrap-BpXIc2wn.cjs → bootstrap-DSX64t23.cjs} +2 -2
- package/dist/{bootstrap-XE8A7Ut2.mjs → bootstrap-DklT121U.mjs} +2 -2
- package/dist/{browser-CcG8GLRV.cjs → browser-CeekQeKt.cjs} +1 -1
- package/dist/{browser-DDFi1T8C.mjs → browser-DUf1dth8.mjs} +1 -1
- package/dist/{claudeLocal-DmM5Oyhv.mjs → claudeLocal-C8pXtb8q.mjs} +5 -5
- package/dist/{claudeLocal-DXBXwIOG.cjs → claudeLocal-hH0YYex3.cjs} +5 -5
- package/dist/{claudeLocalLauncher-Cs4eUC3P.mjs → claudeLocalLauncher-AtUe2tM-.mjs} +10 -10
- package/dist/{claudeLocalLauncher-C41Y6Kp4.cjs → claudeLocalLauncher-B-ta13pT.cjs} +10 -10
- package/dist/{claudeSessionFork-BdLnc2Hv.mjs → claudeSessionFork-BQPBKEHk.mjs} +1 -1
- package/dist/{claudeSessionFork-Cs0I3eGI.cjs → claudeSessionFork-Cq9FBfjD.cjs} +1 -1
- package/dist/{client-CbK33y_s.mjs → client-Bg6-mQKO.mjs} +3 -3
- package/dist/{client-GjTnsq6F.mjs → client-Cbl3ejoq.mjs} +2 -2
- package/dist/{client-JISJx2f-.cjs → client-DZpkmS5l.cjs} +3 -3
- package/dist/{client-DJ0kX_8M.cjs → client-EnFomCjx.cjs} +2 -2
- package/dist/codex/happyMcpStdioBridge.cjs +14 -14
- package/dist/codex/happyMcpStdioBridge.mjs +14 -14
- package/dist/{codexAppServerClient-BTjn2ZCZ.cjs → codexAppServerClient-pllsN90-.cjs} +4 -4
- package/dist/{codexAppServerClient-CldXEojt.mjs → codexAppServerClient-sWuwtddZ.mjs} +4 -4
- package/dist/{codexCommand-DjMU-Ijf.mjs → codexCommand-DbTkMlW4.mjs} +137 -56
- package/dist/{codexCommand-BpD0N1F7.cjs → codexCommand-_jkx59gI.cjs} +137 -56
- package/dist/{config-DuLL0Ppe.cjs → config-BuIIZPZK.cjs} +3 -3
- package/dist/{config-DjSJKatx.mjs → config-FCOoREKj.mjs} +3 -3
- package/dist/{configuration-D2v3puap.mjs → configuration-BZo1JWNV.mjs} +2 -2
- package/dist/{configuration-B0cb3xA3.cjs → configuration-DeuGrnej.cjs} +1 -1
- package/dist/{connect-CnNNyM9I.mjs → connect-C2yHh85e.mjs} +13 -13
- package/dist/{connect-B7JWEzyg.cjs → connect-CjDdF12U.cjs} +13 -13
- package/dist/{context-BFUpYT39.cjs → context-BhvZtm3j.cjs} +1 -1
- package/dist/{context-DjfqLWzE.mjs → context-DZIIcfld.mjs} +1 -1
- package/dist/{controlClient-BMUJfUeF.mjs → controlClient-CXD-Xdny.mjs} +18 -4
- package/dist/{controlClient-CmnHGcyl.cjs → controlClient-IDE3se23.cjs} +18 -3
- package/dist/{createSessionMetadata-DbfRBhRu.cjs → createSessionMetadata-BCHFLSLk.cjs} +56 -3
- package/dist/{createSessionMetadata-DU0bCg2m.mjs → createSessionMetadata-DoLFya-Q.mjs} +57 -5
- package/dist/defaultPermissionMode-BtZtLdQz.cjs +197 -0
- package/dist/defaultPermissionMode-Dxfv-5Ud.mjs +191 -0
- package/dist/{deterministicJson-Dp3TVyap.cjs → deterministicJson-BqQKrUzw.cjs} +8 -8
- package/dist/{deterministicJson-D-WPUrZb.mjs → deterministicJson-CF1fJMaM.mjs} +8 -8
- package/dist/{doctor-BlXXyQ1L.mjs → doctor-C98yYhYr.mjs} +6 -6
- package/dist/{doctor-CkJmdPbi.cjs → doctor-D61ncaeL.cjs} +6 -6
- package/dist/{downloadTarget-DjSwMHun.mjs → downloadTarget-CaISZbNy.mjs} +6 -6
- package/dist/{downloadTarget-CiQqRIc-.cjs → downloadTarget-Dist9t2e.cjs} +6 -6
- package/dist/{ensureDaemonRunning-C_aIOhgG.cjs → ensureDaemonRunning-BB0hnWY_.cjs} +5 -5
- package/dist/{ensureDaemonRunning-CAQag1zE.mjs → ensureDaemonRunning-CNiqOarI.mjs} +5 -5
- package/dist/{handleResumeCommand-Ci7wacT-.mjs → handleResumeCommand-BzcANj0i.mjs} +5 -5
- package/dist/{handleResumeCommand-6KzBGDnl.cjs → handleResumeCommand-CkzW-T_f.cjs} +5 -5
- package/dist/{index-DEKIgZUo.cjs → index-BQU1sS9K.cjs} +4 -4
- package/dist/{index-DBmNwMX9.cjs → index-BeeWN9Et.cjs} +33 -33
- package/dist/{index-WGCT6SSV.mjs → index-CdmIOFwG.mjs} +34 -34
- package/dist/{index-HQsigW_J.mjs → index-D2hg_u5i.mjs} +3 -3
- package/dist/{index-DQplgo0W.mjs → index-Dgqk3lfG.mjs} +4 -4
- package/dist/{index-CaFCAlX8.cjs → index-DipBfs9w.cjs} +3 -3
- package/dist/index.cjs +2 -2
- package/dist/index.mjs +2 -2
- package/dist/{install-oJUvsFu9.mjs → install-CK1FvmYQ.mjs} +3 -3
- package/dist/{install-CejEiRGW.cjs → install-VtuffPLu.cjs} +3 -3
- package/dist/lib.cjs +11 -11
- package/dist/lib.d.cts +61 -0
- package/dist/lib.d.mts +61 -0
- package/dist/lib.mjs +11 -11
- package/dist/{lidState-D8BmnJV1.cjs → lidState-2IT0tas7.cjs} +1 -1
- package/dist/{lidState-BfximpjX.mjs → lidState-CJ3XkJRn.mjs} +1 -1
- package/dist/{localHappyAgentAuth-d7B6S_o7.cjs → localHappyAgentAuth-CPMh61Su.cjs} +1 -1
- package/dist/{localHappyAgentAuth-Ct1aXwqd.mjs → localHappyAgentAuth-DkLbntlf.mjs} +1 -1
- package/dist/{logger-BpQcwNnt.mjs → logger-C6zzu57a.mjs} +2 -2
- package/dist/{logger-JTcJU-uL.cjs → logger-Ockf1cjN.cjs} +2 -2
- package/dist/{machineMetadata-BBg_Njw3.cjs → machineMetadata-CoMYwSlG.cjs} +4 -3
- package/dist/{machineMetadata-CBdxABeI.mjs → machineMetadata-DmTGIZAV.mjs} +4 -3
- package/dist/{main-B5b1gA3K.mjs → main-B8TX9xPq.mjs} +45 -45
- package/dist/{main-C16fOGgn.cjs → main-CThJ9JQb.cjs} +45 -45
- package/dist/{manager-BQ4flvQZ.mjs → manager-BEsI4qt3.mjs} +9 -3
- package/dist/{manager-Cly8xVIR.cjs → manager-HrEj442o.cjs} +8 -2
- package/dist/{mcp-BnNiBBax.cjs → mcp-Dwku1p2I.cjs} +14 -14
- package/dist/{mcp-DGNWgVdv.mjs → mcp-Yw93dOiW.mjs} +14 -14
- package/dist/mirrorProtocol-CQ5fAUgq.mjs +1247 -0
- package/dist/mirrorProtocol-CdPhEBSh.cjs +1270 -0
- package/dist/{package-BqwrPxL0.mjs → package-5xAdq5fu.mjs} +7 -7
- package/dist/{package-C1XvUQFy.cjs → package-DfoyJe1O.cjs} +7 -7
- package/dist/{peerTools-DPvbcs8V.cjs → peerTools-BEnBvEcU.cjs} +4 -4
- package/dist/{peerTools-CeCe-3lk.mjs → peerTools-uDR6MG0-.mjs} +4 -4
- package/dist/{persistence-2Xp_o6x6.cjs → persistence-B5oT6oQ9.cjs} +147 -25
- package/dist/{persistence-B9LmhAE2.mjs → persistence-B6M_W5iC.mjs} +123 -12
- package/dist/{piRunnerArgs-DI29dDNo.cjs → piRunnerArgs-MLN46-nK.cjs} +1 -1
- package/dist/{piRunnerArgs-7FaTyNOq.mjs → piRunnerArgs-vNIUWHqo.mjs} +1 -1
- package/dist/{piRuntime-R8XVChxK.cjs → piRuntime-DkUg8_5q.cjs} +1 -1
- package/dist/{piRuntime-0qEK5AqE.mjs → piRuntime-WMuI7f4q.mjs} +1 -1
- package/dist/{piTerminal-zcQKc8Sp.mjs → piTerminal-4NBSZVxd.mjs} +16 -16
- package/dist/{piTerminal-Ccj0KNPr.cjs → piTerminal-Bskvs69Z.cjs} +16 -16
- package/dist/{rateLimitWindows-C2Jk3Ih7.cjs → rateLimitWindows-C2-Ky86q.cjs} +1 -1
- package/dist/{rateLimitWindows-Dhfhbtqu.mjs → rateLimitWindows-CJ1xDAxa.mjs} +1 -1
- package/dist/{registerCommonHandlers-DdfGsFbM.mjs → registerCommonHandlers-BLHKlk5Z.mjs} +2 -2
- package/dist/{registerCommonHandlers-Aha_KfM3.cjs → registerCommonHandlers-COSTo15G.cjs} +2 -2
- package/dist/{registerKillSessionHandler-DboQlGcH.mjs → registerKillSessionHandler-BVQfhSgm.mjs} +14 -9
- package/dist/{registerKillSessionHandler-CjitOpUA.cjs → registerKillSessionHandler-DDZISNzu.cjs} +14 -9
- package/dist/{remoteSessionClient-BwI8rpQw.cjs → remoteSessionClient-B2pOMZRw.cjs} +5 -5
- package/dist/{remoteSessionClient-B2DtWuNP.mjs → remoteSessionClient-Dx0M2MXV.mjs} +5 -5
- package/dist/{reportProgressTool-B-Rcy0s3.cjs → reportProgressTool-C5vDEv9Y.cjs} +1 -1
- package/dist/{reportProgressTool-DnAD8wOa.mjs → reportProgressTool-CcwFr0ek.mjs} +1 -1
- package/dist/{run-Bh66Xs40.cjs → run-BKTv1E-D.cjs} +323 -37
- package/dist/{run-DPEwJpQR.mjs → run-BZjIDOGM.mjs} +322 -36
- package/dist/{runClaude-DLr_nBzw.mjs → runClaude-DFa77Ffl.mjs} +87 -25
- package/dist/{runClaude-C-lJdAKD.cjs → runClaude-DUlFZWiK.cjs} +87 -25
- package/dist/{runClaudeDeps-vWWLod7J.cjs → runClaudeDeps--TnER0c3.cjs} +100 -31
- package/dist/{runClaudeDeps-C7JV7nXG.mjs → runClaudeDeps-BYohagQU.mjs} +105 -36
- package/dist/{runGemini-o-CUSayc.cjs → runGemini-BSBejXek.cjs} +32 -32
- package/dist/{runGemini-tH6sLw-G.mjs → runGemini-CUiq1Zei.mjs} +32 -32
- package/dist/{runOpenClaw-C5DZvVhn.mjs → runOpenClaw-CgwRP4gR.mjs} +16 -16
- package/dist/{runOpenClaw-D24f35l0.cjs → runOpenClaw-DQFEi3E1.cjs} +16 -16
- package/dist/{sandbox-BaL1aslA.mjs → sandbox-BTwAN7Yi.mjs} +4 -4
- package/dist/{sandbox-TJZJ6ngw.cjs → sandbox-DuLRfMY3.cjs} +4 -4
- package/dist/selfCheck-DF26lf1b.mjs +84 -0
- package/dist/{selfCheck-Dugi0Nk_.cjs → selfCheck-DuOLndWl.cjs} +34 -34
- package/dist/{send-DDcJ3ayi.mjs → send-ComZSvT5.mjs} +8 -8
- package/dist/{send-CkWOSYmU.cjs → send-Dl4TJ0Ia.cjs} +8 -8
- package/dist/{server-7qFQ8J2u.cjs → server-CWmamKcS.cjs} +6 -6
- package/dist/{server-CUjRvQSd.mjs → server-CXFSsyZx.mjs} +4 -4
- package/dist/{sessionLock-DfhNICyS.cjs → sessionLock-BFD8cFNP.cjs} +12 -3
- package/dist/{sessionLock-DqVyHFAQ.mjs → sessionLock-DCKf-gjd.mjs} +12 -4
- package/dist/{sessionModeFile-M4OpiyrF.mjs → sessionModeFile-BYxsFSvc.mjs} +1 -1
- package/dist/{sessionModeFile-CIznKD7O.cjs → sessionModeFile-i-MVQRcU.cjs} +1 -1
- package/dist/{sessionOps-DOyy4gkY.cjs → sessionOps-BAQ_80Rg.cjs} +4 -4
- package/dist/{sessionOps-BnaEaOKs.mjs → sessionOps-CBXsQGV5.mjs} +4 -4
- package/dist/{sessionScanner-CcuOn9uU.mjs → sessionScanner-CwPBvQK2.mjs} +3 -3
- package/dist/{sessionScanner-Cu1yKlj4.cjs → sessionScanner-Dth3iDCi.cjs} +3 -3
- package/dist/{sessions-BQgk5Kw8.cjs → sessions-BULd_RQt.cjs} +9 -9
- package/dist/{sessions-C9O91rL1.mjs → sessions-DYAqiUS0.mjs} +9 -9
- package/dist/{setupOfflineReconnection-Byy8aeKT.mjs → setupOfflineReconnection-Bo9xb30l.mjs} +2 -2
- package/dist/{setupOfflineReconnection-DFmQ8s6I.cjs → setupOfflineReconnection-DI8BQf_g.cjs} +2 -2
- package/dist/{spawn-EZ2yrtWd.mjs → spawn-DmXpKIOT.mjs} +13 -13
- package/dist/{spawn-BS7LPmSm.cjs → spawn-oikb5mUh.cjs} +13 -13
- package/dist/{spawnHappyCLI-BAa49m0q.mjs → spawnHappyCLI-BCnZfffk.mjs} +1 -1
- package/dist/{spawnHappyCLI-DyaldIe5.cjs → spawnHappyCLI-Cs177BB4.cjs} +1 -1
- package/dist/{specialCommands-DouFaJ_0.cjs → specialCommands-CmrwEh71.cjs} +3 -3
- package/dist/{specialCommands-CCWtwIGZ.mjs → specialCommands-xD4uOtdG.mjs} +3 -3
- package/dist/{startFileWatcher-Dfs4whzr.mjs → startFileWatcher-De7rN8QW.mjs} +1 -1
- package/dist/{startFileWatcher-DQbbypJv.cjs → startFileWatcher-S_Af_QPR.cjs} +1 -1
- package/dist/{sync-x_lI_3j_.cjs → sync-BS9_zSQ2.cjs} +1 -1
- package/dist/{sync-BLpH13Kb.mjs → sync-CHOB3Org.mjs} +1 -1
- package/dist/{systemPrompt-4erwILTB.cjs → systemPrompt-D2ICcIsu.cjs} +1 -1
- package/dist/{systemPrompt-BanyDihy.mjs → systemPrompt-DNLUUejs.mjs} +1 -1
- package/dist/{teams-DzetlGWC.cjs → teams-BUbESH6L.cjs} +6 -6
- package/dist/{teams-D6BOT3lR.mjs → teams-By3oBC7r.mjs} +6 -6
- package/dist/{time-CfDKj6Bx.mjs → time-CN0jVVir.mjs} +1 -1
- package/dist/{time-T0YmeOhS.cjs → time-uSKpEhew.cjs} +1 -1
- package/dist/{titleGenerator-CoMxqKfP.cjs → titleGenerator-CLIXjn9b.cjs} +2 -2
- package/dist/{titleGenerator-ChImQ4q-.mjs → titleGenerator-CegRJ47n.mjs} +1 -1
- package/dist/{todo-CZZebKZg.cjs → todo-Bg1vurv9.cjs} +5 -5
- package/dist/{todo-SVtYxGON.mjs → todo-Bl3abqvy.mjs} +5 -5
- package/dist/{tools-3X2z3YDe.mjs → tools-BcLUrC57.mjs} +1 -1
- package/dist/{tools-IJ0TAcJs.cjs → tools-DuWKlc0k.cjs} +1 -1
- package/dist/{uninstall-CypD-kr1.mjs → uninstall-BlpZlM9U.mjs} +3 -3
- package/dist/{uninstall-CqqCWj7w.cjs → uninstall-DWnj2XVT.cjs} +3 -3
- package/package.json +7 -7
- package/dist/defaultPermissionMode-BnxJPVHT.mjs +0 -4
- package/dist/defaultPermissionMode-CxmTXUQR.cjs +0 -7
- package/dist/mirrorProtocol-BEGk2--0.cjs +0 -266
- package/dist/mirrorProtocol-h5WHpdhh.mjs +0 -248
- package/dist/selfCheck-DPi4lqme.mjs +0 -84
|
@@ -1,39 +1,39 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var logger = require('./logger-
|
|
4
|
-
var claudeLocal = require('./claudeLocal-
|
|
5
|
-
var sessionScanner = require('./sessionScanner-
|
|
3
|
+
var logger = require('./logger-Ockf1cjN.cjs');
|
|
4
|
+
var claudeLocal = require('./claudeLocal-hH0YYex3.cjs');
|
|
5
|
+
var sessionScanner = require('./sessionScanner-Dth3iDCi.cjs');
|
|
6
6
|
require('chalk');
|
|
7
7
|
require('node:util');
|
|
8
|
-
require('./configuration-
|
|
8
|
+
require('./configuration-DeuGrnej.cjs');
|
|
9
9
|
require('node:fs');
|
|
10
10
|
require('node:os');
|
|
11
11
|
require('node:path');
|
|
12
|
-
require('./package-
|
|
12
|
+
require('./package-DfoyJe1O.cjs');
|
|
13
13
|
require('node:fs/promises');
|
|
14
14
|
require('cross-spawn');
|
|
15
15
|
require('node:readline');
|
|
16
16
|
require('node:crypto');
|
|
17
17
|
require('./smallFastModel-D_uxGMo3.cjs');
|
|
18
18
|
require('./path-B7zW-WwE.cjs');
|
|
19
|
-
require('./systemPrompt-
|
|
19
|
+
require('./systemPrompt-D2ICcIsu.cjs');
|
|
20
20
|
require('./index-C9hI8a10.cjs');
|
|
21
21
|
require('zod');
|
|
22
22
|
require('@paralleldrive/cuid2');
|
|
23
23
|
require('./trimIdent-4gvk9Wk6.cjs');
|
|
24
24
|
require('./agentGuidance-BtBx2xxE.cjs');
|
|
25
|
-
require('./manager-
|
|
25
|
+
require('./manager-HrEj442o.cjs');
|
|
26
26
|
require('@anthropic-ai/sandbox-runtime');
|
|
27
27
|
require('./contentLogMetadata-ZSFk_NjQ.cjs');
|
|
28
28
|
require('./claudeCliPath-U4HHmV4r.cjs');
|
|
29
29
|
require('./projectPath-ChLhdOyt.cjs');
|
|
30
30
|
require('path');
|
|
31
31
|
require('url');
|
|
32
|
-
require('./sync-
|
|
33
|
-
require('./time-
|
|
32
|
+
require('./sync-BS9_zSQ2.cjs');
|
|
33
|
+
require('./time-uSKpEhew.cjs');
|
|
34
34
|
require('./types-CRS-srZK.cjs');
|
|
35
35
|
require('./transcriptCursor-DcXGLeSc.cjs');
|
|
36
|
-
require('./startFileWatcher-
|
|
36
|
+
require('./startFileWatcher-S_Af_QPR.cjs');
|
|
37
37
|
require('fs/promises');
|
|
38
38
|
|
|
39
39
|
async function claudeLocalLauncher(session) {
|
|
@@ -3,7 +3,7 @@ import { copyFile, unlink, readFile, rename, writeFile } from 'node:fs/promises'
|
|
|
3
3
|
import { createReadStream, createWriteStream } from 'node:fs';
|
|
4
4
|
import { join } from 'node:path';
|
|
5
5
|
import { createInterface } from 'node:readline';
|
|
6
|
-
import { l as logger } from './logger-
|
|
6
|
+
import { l as logger } from './logger-C6zzu57a.mjs';
|
|
7
7
|
|
|
8
8
|
class ForkTruncateUuidNotFoundError extends Error {
|
|
9
9
|
constructor(cutAfterUuid, sourcePath) {
|
|
@@ -5,7 +5,7 @@ var promises = require('node:fs/promises');
|
|
|
5
5
|
var node_fs = require('node:fs');
|
|
6
6
|
var path = require('node:path');
|
|
7
7
|
var node_readline = require('node:readline');
|
|
8
|
-
var logger = require('./logger-
|
|
8
|
+
var logger = require('./logger-Ockf1cjN.cjs');
|
|
9
9
|
|
|
10
10
|
class ForkTruncateUuidNotFoundError extends Error {
|
|
11
11
|
constructor(cutAfterUuid, sourcePath) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { randomUUID } from 'node:crypto';
|
|
2
|
-
import { c as configuration } from './configuration-
|
|
3
|
-
import { readSettings, readPersistedSessions, readCredentialsForConfiguredRelay } from './persistence-
|
|
4
|
-
import { r as readTeamScope, t as teamScopePath, w as writeTeamScope } from './context-
|
|
2
|
+
import { c as configuration } from './configuration-BZo1JWNV.mjs';
|
|
3
|
+
import { r as readSettings, b as readPersistedSessions, c as readCredentialsForConfiguredRelay } from './persistence-B6M_W5iC.mjs';
|
|
4
|
+
import { r as readTeamScope, t as teamScopePath, w as writeTeamScope } from './context-DZIIcfld.mjs';
|
|
5
5
|
|
|
6
6
|
async function teamRequest(path, method, token, scoped, body) {
|
|
7
7
|
const response = await fetch(`${configuration.serverUrl}${path}`, {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { c as configuration } from './configuration-
|
|
2
|
-
import { readCredentialsForConfiguredRelay, readSettings } from './persistence-
|
|
1
|
+
import { c as configuration } from './configuration-BZo1JWNV.mjs';
|
|
2
|
+
import { c as readCredentialsForConfiguredRelay, r as readSettings } from './persistence-B6M_W5iC.mjs';
|
|
3
3
|
|
|
4
4
|
class AutomationsRequestError extends Error {
|
|
5
5
|
constructor(status, code, runStatus) {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var node_crypto = require('node:crypto');
|
|
4
|
-
var configuration = require('./configuration-
|
|
5
|
-
var persistence = require('./persistence-
|
|
6
|
-
var context = require('./context-
|
|
4
|
+
var configuration = require('./configuration-DeuGrnej.cjs');
|
|
5
|
+
var persistence = require('./persistence-B5oT6oQ9.cjs');
|
|
6
|
+
var context = require('./context-BhvZtm3j.cjs');
|
|
7
7
|
|
|
8
8
|
async function teamRequest(path, method, token, scoped, body) {
|
|
9
9
|
const response = await fetch(`${configuration.configuration.serverUrl}${path}`, {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var configuration = require('./configuration-
|
|
4
|
-
var persistence = require('./persistence-
|
|
3
|
+
var configuration = require('./configuration-DeuGrnej.cjs');
|
|
4
|
+
var persistence = require('./persistence-B5oT6oQ9.cjs');
|
|
5
5
|
|
|
6
6
|
class AutomationsRequestError extends Error {
|
|
7
7
|
constructor(status, code, runStatus) {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var tools = require('../tools-
|
|
4
|
-
var reportProgressTool = require('../reportProgressTool-
|
|
5
|
-
var peerTools = require('../peerTools-
|
|
3
|
+
var tools = require('../tools-DuWKlc0k.cjs');
|
|
4
|
+
var reportProgressTool = require('../reportProgressTool-C5vDEv9Y.cjs');
|
|
5
|
+
var peerTools = require('../peerTools-BEnBvEcU.cjs');
|
|
6
6
|
var agentGuidance = require('../agentGuidance-BtBx2xxE.cjs');
|
|
7
7
|
var mcp_js = require('@modelcontextprotocol/sdk/server/mcp.js');
|
|
8
8
|
var stdio_js = require('@modelcontextprotocol/sdk/server/stdio.js');
|
|
@@ -10,33 +10,33 @@ var index_js = require('@modelcontextprotocol/sdk/client/index.js');
|
|
|
10
10
|
var streamableHttp_js = require('@modelcontextprotocol/sdk/client/streamableHttp.js');
|
|
11
11
|
var z = require('zod');
|
|
12
12
|
var limits = require('../limits-C-a7gr04.cjs');
|
|
13
|
-
require('../client-
|
|
13
|
+
require('../client-DZpkmS5l.cjs');
|
|
14
14
|
require('node:crypto');
|
|
15
|
-
require('../configuration-
|
|
15
|
+
require('../configuration-DeuGrnej.cjs');
|
|
16
16
|
require('node:fs');
|
|
17
17
|
require('node:os');
|
|
18
18
|
require('node:path');
|
|
19
|
-
require('../package-
|
|
19
|
+
require('../package-DfoyJe1O.cjs');
|
|
20
20
|
require('node:fs/promises');
|
|
21
|
-
require('../persistence-
|
|
21
|
+
require('../persistence-B5oT6oQ9.cjs');
|
|
22
22
|
require('../authRelay-BdYkC1Po.cjs');
|
|
23
23
|
require('tweetnacl');
|
|
24
|
-
require('../logger-
|
|
24
|
+
require('../logger-Ockf1cjN.cjs');
|
|
25
25
|
require('chalk');
|
|
26
26
|
require('node:util');
|
|
27
|
-
require('../context-
|
|
27
|
+
require('../context-BhvZtm3j.cjs');
|
|
28
28
|
require('../index-C9hI8a10.cjs');
|
|
29
29
|
require('@paralleldrive/cuid2');
|
|
30
|
-
require('../client-
|
|
30
|
+
require('../client-EnFomCjx.cjs');
|
|
31
31
|
require('../precheckCompat-CWOi5c9L.cjs');
|
|
32
32
|
require('../ids-B6ZC0HGt.cjs');
|
|
33
|
-
require('../controlClient-
|
|
34
|
-
require('../sessionOps-
|
|
33
|
+
require('../controlClient-IDE3se23.cjs');
|
|
34
|
+
require('../sessionOps-BAQ_80Rg.cjs');
|
|
35
35
|
require('axios');
|
|
36
|
-
require('../time-
|
|
36
|
+
require('../time-uSKpEhew.cjs');
|
|
37
37
|
require('socket.io-client');
|
|
38
38
|
require('../backgroundTaskActivity-CBvUdj39.cjs');
|
|
39
|
-
require('../remoteSessionClient-
|
|
39
|
+
require('../remoteSessionClient-B2pOMZRw.cjs');
|
|
40
40
|
require('../trimIdent-4gvk9Wk6.cjs');
|
|
41
41
|
|
|
42
42
|
function parseArgs(argv) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { r as registerTeamsTools } from '../tools-
|
|
2
|
-
import { r as registerAutomationTools, a as registerReportProgressTool } from '../reportProgressTool-
|
|
3
|
-
import { r as registerSessionPeerTools } from '../peerTools-
|
|
1
|
+
import { r as registerTeamsTools } from '../tools-BcLUrC57.mjs';
|
|
2
|
+
import { r as registerAutomationTools, a as registerReportProgressTool } from '../reportProgressTool-CcwFr0ek.mjs';
|
|
3
|
+
import { r as registerSessionPeerTools } from '../peerTools-uDR6MG0-.mjs';
|
|
4
4
|
import { P as PREVIEW_TOOL_NAME, a as PREVIEW_TOOL_TITLE, b as PREVIEW_TOOL_DESCRIPTION, c as PREVIEW_DOWNLOAD_PARAM_DESCRIPTION, R as REPORT_PROGRESS_TOOL_NAME } from '../agentGuidance-BDYt2Qy2.mjs';
|
|
5
5
|
import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
6
6
|
import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
|
|
@@ -8,33 +8,33 @@ import { Client } from '@modelcontextprotocol/sdk/client/index.js';
|
|
|
8
8
|
import { StreamableHTTPClientTransport } from '@modelcontextprotocol/sdk/client/streamableHttp.js';
|
|
9
9
|
import { z } from 'zod';
|
|
10
10
|
import { C as CLIPBOARD_TOOL_NAME, a as CLIPBOARD_TOOL_TITLE, b as CLIPBOARD_TOOL_DESCRIPTION } from '../limits-DIo7rEBR.mjs';
|
|
11
|
-
import '../client-
|
|
11
|
+
import '../client-Bg6-mQKO.mjs';
|
|
12
12
|
import 'node:crypto';
|
|
13
|
-
import '../configuration-
|
|
13
|
+
import '../configuration-BZo1JWNV.mjs';
|
|
14
14
|
import 'node:fs';
|
|
15
15
|
import 'node:os';
|
|
16
16
|
import 'node:path';
|
|
17
|
-
import '../package-
|
|
17
|
+
import '../package-5xAdq5fu.mjs';
|
|
18
18
|
import 'node:fs/promises';
|
|
19
|
-
import '../persistence-
|
|
19
|
+
import '../persistence-B6M_W5iC.mjs';
|
|
20
20
|
import '../authRelay-DSAvg1uv.mjs';
|
|
21
21
|
import 'tweetnacl';
|
|
22
|
-
import '../logger-
|
|
22
|
+
import '../logger-C6zzu57a.mjs';
|
|
23
23
|
import 'chalk';
|
|
24
24
|
import 'node:util';
|
|
25
|
-
import '../context-
|
|
25
|
+
import '../context-DZIIcfld.mjs';
|
|
26
26
|
import '../index-B0HEEYGh.mjs';
|
|
27
27
|
import '@paralleldrive/cuid2';
|
|
28
|
-
import '../client-
|
|
28
|
+
import '../client-Cbl3ejoq.mjs';
|
|
29
29
|
import '../precheckCompat-DeEbilbr.mjs';
|
|
30
30
|
import '../ids-DU6sLx4C.mjs';
|
|
31
|
-
import '../controlClient-
|
|
32
|
-
import '../sessionOps-
|
|
31
|
+
import '../controlClient-CXD-Xdny.mjs';
|
|
32
|
+
import '../sessionOps-CBXsQGV5.mjs';
|
|
33
33
|
import 'axios';
|
|
34
|
-
import '../time-
|
|
34
|
+
import '../time-CN0jVVir.mjs';
|
|
35
35
|
import 'socket.io-client';
|
|
36
36
|
import '../backgroundTaskActivity-8PdPxrvy.mjs';
|
|
37
|
-
import '../remoteSessionClient-
|
|
37
|
+
import '../remoteSessionClient-Dx0M2MXV.mjs';
|
|
38
38
|
import '../trimIdent-BAjmv_TG.mjs';
|
|
39
39
|
|
|
40
40
|
function parseArgs(argv) {
|
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
var node_child_process = require('node:child_process');
|
|
4
4
|
var spawn = require('cross-spawn');
|
|
5
5
|
var node_readline = require('node:readline');
|
|
6
|
-
var logger = require('./logger-
|
|
6
|
+
var logger = require('./logger-Ockf1cjN.cjs');
|
|
7
7
|
var contentLogMetadata = require('./contentLogMetadata-ZSFk_NjQ.cjs');
|
|
8
|
-
var manager = require('./manager-
|
|
9
|
-
var _package = require('./package-
|
|
10
|
-
var rateLimitWindows = require('./rateLimitWindows-
|
|
8
|
+
var manager = require('./manager-HrEj442o.cjs');
|
|
9
|
+
var _package = require('./package-DfoyJe1O.cjs');
|
|
10
|
+
var rateLimitWindows = require('./rateLimitWindows-C2-Ky86q.cjs');
|
|
11
11
|
|
|
12
12
|
function isAppServerAvailable() {
|
|
13
13
|
try {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { execSync } from 'node:child_process';
|
|
2
2
|
import { spawn } from 'cross-spawn';
|
|
3
3
|
import { createInterface } from 'node:readline';
|
|
4
|
-
import { l as logger } from './logger-
|
|
4
|
+
import { l as logger } from './logger-C6zzu57a.mjs';
|
|
5
5
|
import { e as errorLogMetadata, c as contentLogMetadata } from './contentLogMetadata-BlWI0egu.mjs';
|
|
6
|
-
import { i as initializeSandbox, w as wrapForMcpTransport } from './manager-
|
|
7
|
-
import { p as packageJson } from './package-
|
|
8
|
-
import { s as shouldReadCodexRateLimits, i as isUnsupportedCodexMethodError } from './rateLimitWindows-
|
|
6
|
+
import { i as initializeSandbox, w as wrapForMcpTransport } from './manager-BEsI4qt3.mjs';
|
|
7
|
+
import { p as packageJson } from './package-5xAdq5fu.mjs';
|
|
8
|
+
import { s as shouldReadCodexRateLimits, i as isUnsupportedCodexMethodError } from './rateLimitWindows-CJ1xDAxa.mjs';
|
|
9
9
|
|
|
10
10
|
function isAppServerAvailable() {
|
|
11
11
|
try {
|
|
@@ -1,96 +1,96 @@
|
|
|
1
|
-
import { a as authAndSetupMachineIfNeeded } from './auth-
|
|
1
|
+
import { a as authAndSetupMachineIfNeeded } from './auth-BFeFguVs.mjs';
|
|
2
2
|
import { c as createEnvelope, o as BUILTIN_TODO_DISCOVERY, P as PROMPT_QUEUE_CAPABILITY } from './index-B0HEEYGh.mjs';
|
|
3
3
|
import { p as publishForkBackfillWhenCommitted, F as FORK_BACKFILL_CAPABILITY } from './forkBackfill-DYIjlN1Z.mjs';
|
|
4
4
|
import { randomUUID } from 'node:crypto';
|
|
5
5
|
import { createId } from '@paralleldrive/cuid2';
|
|
6
6
|
import { r as registerAgentAttachmentDownloads } from './agentAttachments-M_B5qEF2.mjs';
|
|
7
|
-
import { C as CLAUDE_ATTACHMENT_KINDS, a as stageClaudeAttachments, b as appendStagedAttachmentsToPrompt } from './attachmentContent-
|
|
7
|
+
import { C as CLAUDE_ATTACHMENT_KINDS, a as stageClaudeAttachments, b as appendStagedAttachmentsToPrompt } from './attachmentContent-CS0B2N0Q.mjs';
|
|
8
8
|
import { useStdout, useInput, Box, Text, render } from 'ink';
|
|
9
|
-
import { c as claimSessionOrExit, a as applyServerSnapshot, w as withoutServerSnapshot, m as mergeReconnectMetadata } from './sessionLock-
|
|
9
|
+
import { c as claimSessionOrExit, a as applyServerSnapshot, b as applyHibernationReplay, w as withoutServerSnapshot, m as mergeReconnectMetadata } from './sessionLock-DCKf-gjd.mjs';
|
|
10
10
|
import React, { useState, useRef, useEffect, useCallback } from 'react';
|
|
11
|
-
import { c as connectionState, A as ApiClient } from './api-
|
|
12
|
-
import { C as CodexAppServerClient } from './codexAppServerClient-
|
|
13
|
-
import { p as parseSpecialCommand, w as wrapperRateLimitReporter } from './specialCommands-
|
|
14
|
-
import { l as logger } from './logger-
|
|
15
|
-
import { B as BasePermissionHandler } from './BasePermissionHandler-
|
|
16
|
-
import { B as BaseReasoningProcessor } from './BaseReasoningProcessor-
|
|
11
|
+
import { c as connectionState, A as ApiClient } from './api-hXLwtgMi.mjs';
|
|
12
|
+
import { C as CodexAppServerClient } from './codexAppServerClient-sWuwtddZ.mjs';
|
|
13
|
+
import { p as parseSpecialCommand, w as wrapperRateLimitReporter } from './specialCommands-xD4uOtdG.mjs';
|
|
14
|
+
import { l as logger } from './logger-C6zzu57a.mjs';
|
|
15
|
+
import { B as BasePermissionHandler } from './BasePermissionHandler-DTcVlmKi.mjs';
|
|
16
|
+
import { B as BaseReasoningProcessor } from './BaseReasoningProcessor-BddnNlXQ.mjs';
|
|
17
17
|
import { execSync } from 'node:child_process';
|
|
18
|
-
import { readSettings } from './persistence-
|
|
19
|
-
import { g as getInitialMachineMetadata } from './machineMetadata-
|
|
20
|
-
import { c as configuration } from './configuration-
|
|
21
|
-
import { M as MessageQueue2, r as registerKillSessionHandler } from './registerKillSessionHandler-
|
|
18
|
+
import { r as readSettings, l as latchKeepAwake, e as evaluateWrapperIdle, a as resolveCheckMs, H as HIBERNATION_CAPABILITY } from './persistence-B6M_W5iC.mjs';
|
|
19
|
+
import { g as getInitialMachineMetadata } from './machineMetadata-DmTGIZAV.mjs';
|
|
20
|
+
import { c as configuration } from './configuration-BZo1JWNV.mjs';
|
|
21
|
+
import { M as MessageQueue2, r as registerKillSessionHandler } from './registerKillSessionHandler-BVQfhSgm.mjs';
|
|
22
22
|
import { p as projectPath } from './projectPath-BTBIMB57.mjs';
|
|
23
23
|
import { join } from 'node:path';
|
|
24
|
-
import { c as createSessionMetadata } from './createSessionMetadata-
|
|
25
|
-
import { h as hashObject, s as startHappyServer } from './deterministicJson-
|
|
24
|
+
import { c as createSessionMetadata } from './createSessionMetadata-DoLFya-Q.mjs';
|
|
25
|
+
import { h as hashObject, s as startHappyServer } from './deterministicJson-CF1fJMaM.mjs';
|
|
26
26
|
import { M as MessageBuffer } from './messageBuffer-BWlGgR3A.mjs';
|
|
27
|
-
import { n as notifyDaemonSessionStarted,
|
|
27
|
+
import { n as notifyDaemonSessionStarted, j as reportSessionEditToDaemon, c as checkDaemonHibernation } from './controlClient-CXD-Xdny.mjs';
|
|
28
|
+
import { a as HibernationExitLatch, H as HibernationProbe, c as commitHibernation, b as DEFAULT_CODEX_PERMISSION_MODE } from './defaultPermissionMode-Dxfv-5Ud.mjs';
|
|
28
29
|
import { d as decodeBase64, e as encodeBase64 } from './authRelay-DSAvg1uv.mjs';
|
|
29
|
-
import { s as setupOfflineReconnection } from './setupOfflineReconnection-
|
|
30
|
+
import { s as setupOfflineReconnection } from './setupOfflineReconnection-Bo9xb30l.mjs';
|
|
30
31
|
import { t as trimIdent } from './trimIdent-BAjmv_TG.mjs';
|
|
31
32
|
import { C as CHANGE_TITLE_INSTRUCTION } from './constants-BC4St0xd.mjs';
|
|
32
|
-
import { a as DEFAULT_CODEX_PERMISSION_MODE } from './defaultPermissionMode-BnxJPVHT.mjs';
|
|
33
33
|
import { E as EditReportThrottle, a as extractCodexPatchPaths } from './editPaths-BVfS_FFL.mjs';
|
|
34
|
-
import { a as extractNoSandboxFlag, e as ensureDaemonRunning } from './ensureDaemonRunning-
|
|
34
|
+
import { a as extractNoSandboxFlag, e as ensureDaemonRunning } from './ensureDaemonRunning-CNiqOarI.mjs';
|
|
35
35
|
import 'tweetnacl';
|
|
36
36
|
import 'axios';
|
|
37
|
-
import './time-
|
|
38
|
-
import './browser-
|
|
37
|
+
import './time-CN0jVVir.mjs';
|
|
38
|
+
import './browser-DUf1dth8.mjs';
|
|
39
39
|
import 'open';
|
|
40
40
|
import 'zod';
|
|
41
41
|
import 'node:fs/promises';
|
|
42
|
-
import './attachmentLimits-
|
|
42
|
+
import './attachmentLimits-CxG3T18E.mjs';
|
|
43
43
|
import 'node:fs';
|
|
44
|
-
import './lidState-
|
|
44
|
+
import './lidState-CJ3XkJRn.mjs';
|
|
45
45
|
import 'os';
|
|
46
46
|
import 'child_process';
|
|
47
47
|
import 'node:events';
|
|
48
48
|
import 'socket.io-client';
|
|
49
49
|
import './limits-DIo7rEBR.mjs';
|
|
50
|
-
import './registerCommonHandlers-
|
|
50
|
+
import './registerCommonHandlers-BLHKlk5Z.mjs';
|
|
51
51
|
import 'util';
|
|
52
52
|
import 'fs/promises';
|
|
53
53
|
import 'crypto';
|
|
54
54
|
import 'path';
|
|
55
55
|
import 'cross-spawn';
|
|
56
|
-
import './sync-
|
|
56
|
+
import './sync-CHOB3Org.mjs';
|
|
57
57
|
import './backgroundTaskActivity-8PdPxrvy.mjs';
|
|
58
58
|
import './contentLogMetadata-BlWI0egu.mjs';
|
|
59
59
|
import 'chalk';
|
|
60
60
|
import 'node:readline';
|
|
61
|
-
import './manager-
|
|
61
|
+
import './manager-BEsI4qt3.mjs';
|
|
62
62
|
import '@anthropic-ai/sandbox-runtime';
|
|
63
63
|
import 'node:os';
|
|
64
|
-
import './package-
|
|
65
|
-
import './rateLimitWindows-
|
|
64
|
+
import './package-5xAdq5fu.mjs';
|
|
65
|
+
import './rateLimitWindows-CJ1xDAxa.mjs';
|
|
66
66
|
import 'node:util';
|
|
67
67
|
import './detectCLI-CSGMlV51.mjs';
|
|
68
68
|
import 'fs';
|
|
69
|
-
import './localHappyAgentAuth-
|
|
69
|
+
import './localHappyAgentAuth-DkLbntlf.mjs';
|
|
70
70
|
import './types-CkqAACXx.mjs';
|
|
71
71
|
import 'url';
|
|
72
|
-
import './client-
|
|
73
|
-
import './context-
|
|
74
|
-
import './sessionOps-
|
|
72
|
+
import './client-Bg6-mQKO.mjs';
|
|
73
|
+
import './context-DZIIcfld.mjs';
|
|
74
|
+
import './sessionOps-CBXsQGV5.mjs';
|
|
75
75
|
import './resources-BdFBQi8r.mjs';
|
|
76
|
-
import './tools-
|
|
77
|
-
import './reportProgressTool-
|
|
78
|
-
import './client-
|
|
76
|
+
import './tools-BcLUrC57.mjs';
|
|
77
|
+
import './reportProgressTool-CcwFr0ek.mjs';
|
|
78
|
+
import './client-Cbl3ejoq.mjs';
|
|
79
79
|
import './precheckCompat-DeEbilbr.mjs';
|
|
80
80
|
import './agentGuidance-BDYt2Qy2.mjs';
|
|
81
|
-
import './peerTools-
|
|
81
|
+
import './peerTools-uDR6MG0-.mjs';
|
|
82
82
|
import './ids-DU6sLx4C.mjs';
|
|
83
|
-
import './remoteSessionClient-
|
|
83
|
+
import './remoteSessionClient-Dx0M2MXV.mjs';
|
|
84
84
|
import '@modelcontextprotocol/sdk/server/mcp.js';
|
|
85
85
|
import 'node:http';
|
|
86
86
|
import '@modelcontextprotocol/sdk/server/streamableHttp.js';
|
|
87
|
-
import './downloadTarget-
|
|
87
|
+
import './downloadTarget-CaISZbNy.mjs';
|
|
88
88
|
import './terminals-Dlg0x3nY.mjs';
|
|
89
89
|
import './terminalTitleSuggest-CeKsX_V6.mjs';
|
|
90
90
|
import './tmuxSocket-B8Yx20sT.mjs';
|
|
91
|
-
import './bootstrap-
|
|
91
|
+
import './bootstrap-DklT121U.mjs';
|
|
92
92
|
import './previewPath-CXN4Vag0.mjs';
|
|
93
|
-
import './spawnHappyCLI-
|
|
93
|
+
import './spawnHappyCLI-BCnZfffk.mjs';
|
|
94
94
|
import './doctorReadiness-C208SMN9.mjs';
|
|
95
95
|
|
|
96
96
|
function getStartedSubagents(state) {
|
|
@@ -929,6 +929,29 @@ const CodexDisplay = ({ messageBuffer, logPath, onExit }) => {
|
|
|
929
929
|
));
|
|
930
930
|
};
|
|
931
931
|
|
|
932
|
+
async function settleCodexSession(session, intent, deactivate, log = () => {
|
|
933
|
+
}) {
|
|
934
|
+
if (intent === "archive") {
|
|
935
|
+
session.updateMetadata((currentMetadata) => ({
|
|
936
|
+
...currentMetadata,
|
|
937
|
+
lifecycleState: "archived",
|
|
938
|
+
lifecycleStateSince: Date.now(),
|
|
939
|
+
archivedBy: "cli",
|
|
940
|
+
archiveReason: "User terminated"
|
|
941
|
+
}));
|
|
942
|
+
}
|
|
943
|
+
session.sendSessionDeath();
|
|
944
|
+
await session.flush();
|
|
945
|
+
if (intent === "offline") {
|
|
946
|
+
try {
|
|
947
|
+
await deactivate(session.sessionId);
|
|
948
|
+
} catch (error) {
|
|
949
|
+
log("[Codex] deactivate on signal failed", error);
|
|
950
|
+
}
|
|
951
|
+
}
|
|
952
|
+
await session.close();
|
|
953
|
+
}
|
|
954
|
+
|
|
932
955
|
function resolveCodexExecutionPolicy(permissionMode, sandboxManagedByHappy) {
|
|
933
956
|
if (sandboxManagedByHappy) {
|
|
934
957
|
return {
|
|
@@ -1293,7 +1316,7 @@ async function runCodex(opts) {
|
|
|
1293
1316
|
dangerouslySkipPermissions: initialPermissionMode === "yolo" || initialPermissionMode === "bypassPermissions",
|
|
1294
1317
|
...forkedFromSessionId ? { parentSessionId: forkedFromSessionId } : {},
|
|
1295
1318
|
...forkedFromMessageId ? { forkedFromMessageId } : {},
|
|
1296
|
-
capabilities: [PROMPT_QUEUE_CAPABILITY, FORK_BACKFILL_CAPABILITY]
|
|
1319
|
+
capabilities: [PROMPT_QUEUE_CAPABILITY, FORK_BACKFILL_CAPABILITY, HIBERNATION_CAPABILITY]
|
|
1297
1320
|
});
|
|
1298
1321
|
metadata.attachmentKinds = [...CLAUDE_ATTACHMENT_KINDS];
|
|
1299
1322
|
const importCodexThreadId = process.env[IMPORT_CODEX_THREAD_ENV];
|
|
@@ -1331,12 +1354,16 @@ async function runCodex(opts) {
|
|
|
1331
1354
|
throw new Error(`Failed to reactivate archived session ${response.id}`);
|
|
1332
1355
|
}
|
|
1333
1356
|
let reconnectSeeded = false;
|
|
1357
|
+
let wakingFromHibernation = false;
|
|
1334
1358
|
if (reconnectSessionId && response) {
|
|
1335
1359
|
const snapshot = await api.getSession(response.id, response.encryptionKey, response.encryptionVariant);
|
|
1336
1360
|
if (snapshot.ok) {
|
|
1337
1361
|
response = applyServerSnapshot(response, snapshot.session);
|
|
1338
1362
|
reconnectSeeded = true;
|
|
1339
1363
|
logger.debug(`[START] Reconnect seeded from server: seq=${snapshot.session.seq} metadataVersion=${snapshot.session.metadataVersion}`);
|
|
1364
|
+
const wake = applyHibernationReplay(response);
|
|
1365
|
+
response = wake.response;
|
|
1366
|
+
wakingFromHibernation = wake.replaying;
|
|
1340
1367
|
} else {
|
|
1341
1368
|
response = withoutServerSnapshot(response);
|
|
1342
1369
|
logger.debug(`[START] Reconnect without server snapshot (${snapshot.reason}); skipping existing messages`);
|
|
@@ -1367,7 +1394,7 @@ async function runCodex(opts) {
|
|
|
1367
1394
|
if (reconnectSessionId) {
|
|
1368
1395
|
session.suppressNextArchiveSignal();
|
|
1369
1396
|
if (!reconnectSeeded) session.skipExistingMessages();
|
|
1370
|
-
void session.cancelUndeliveredQueuedInputs();
|
|
1397
|
+
if (!wakingFromHibernation) void session.cancelUndeliveredQueuedInputs();
|
|
1371
1398
|
session.updateMetadata((meta) => mergeReconnectMetadata(meta, metadata, Date.now()));
|
|
1372
1399
|
}
|
|
1373
1400
|
if (response) {
|
|
@@ -1531,6 +1558,9 @@ async function runCodex(opts) {
|
|
|
1531
1558
|
}
|
|
1532
1559
|
let abortController = new AbortController();
|
|
1533
1560
|
let shouldExit = false;
|
|
1561
|
+
const hibernationExit = new HibernationExitLatch((a, b) => a === "archive" && b !== "archive");
|
|
1562
|
+
let hibernationStamp = null;
|
|
1563
|
+
let hibernationProbe = null;
|
|
1534
1564
|
async function handleAbort(source) {
|
|
1535
1565
|
if (abortInProgress) {
|
|
1536
1566
|
await abortInProgress;
|
|
@@ -1573,23 +1603,16 @@ async function runCodex(opts) {
|
|
|
1573
1603
|
await abortInProgress;
|
|
1574
1604
|
abortInProgress = null;
|
|
1575
1605
|
}
|
|
1576
|
-
const handleKillSession = async () => {
|
|
1606
|
+
const handleKillSession = async (intent = "archive") => {
|
|
1607
|
+
if (hibernationExit.intercept(intent)) {
|
|
1608
|
+
logger.debug(`[Codex] ${intent} exit deferred: hibernation in progress`);
|
|
1609
|
+
return;
|
|
1610
|
+
}
|
|
1577
1611
|
logger.debug("[Codex] Kill session requested - terminating process");
|
|
1578
1612
|
await handleAbort("kill");
|
|
1579
1613
|
logger.debug("[Codex] Abort completed, proceeding with termination");
|
|
1580
1614
|
try {
|
|
1581
|
-
if (session)
|
|
1582
|
-
session.updateMetadata((currentMetadata) => ({
|
|
1583
|
-
...currentMetadata,
|
|
1584
|
-
lifecycleState: "archived",
|
|
1585
|
-
lifecycleStateSince: Date.now(),
|
|
1586
|
-
archivedBy: "cli",
|
|
1587
|
-
archiveReason: "User terminated"
|
|
1588
|
-
}));
|
|
1589
|
-
session.sendSessionDeath();
|
|
1590
|
-
await session.flush();
|
|
1591
|
-
await session.close();
|
|
1592
|
-
}
|
|
1615
|
+
if (session) await settleCodexSession(session, intent, (id) => api.deactivateSession(id), (m, e) => logger.debug(m, safeCodexErrorMetadata(e)));
|
|
1593
1616
|
try {
|
|
1594
1617
|
await client.disconnect();
|
|
1595
1618
|
} catch (e) {
|
|
@@ -1611,7 +1634,7 @@ async function runCodex(opts) {
|
|
|
1611
1634
|
}
|
|
1612
1635
|
});
|
|
1613
1636
|
session.rpcHandlerManager.registerHandler("abort", () => handleAbort("user"));
|
|
1614
|
-
const disposeTermination = registerKillSessionHandler(session.rpcHandlerManager, handleKillSession, session, { processSignals: true });
|
|
1637
|
+
const disposeTermination = registerKillSessionHandler(session.rpcHandlerManager, () => handleKillSession("archive"), session, { processSignals: true, onSignal: () => handleKillSession("offline") });
|
|
1615
1638
|
const messageBuffer = new MessageBuffer();
|
|
1616
1639
|
const hasTTY = process.stdout.isTTY && process.stdin.isTTY;
|
|
1617
1640
|
let inkInstance = null;
|
|
@@ -1863,6 +1886,54 @@ async function runCodex(opts) {
|
|
|
1863
1886
|
}
|
|
1864
1887
|
}
|
|
1865
1888
|
let pending = null;
|
|
1889
|
+
if (opts.startedBy === "daemon" && !hasTTY && process.env.HAPPY_SESSION_VARIANT !== "assistant") {
|
|
1890
|
+
let keepAwakeLatch = false;
|
|
1891
|
+
const hibernationSnapshot = () => {
|
|
1892
|
+
const meta = session.getMetadata();
|
|
1893
|
+
return {
|
|
1894
|
+
flavor: "codex",
|
|
1895
|
+
resumable: typeof meta?.codexThreadId === "string" && meta.codexThreadId.length > 0,
|
|
1896
|
+
uiSession: true,
|
|
1897
|
+
...process.env.HAPPY_SPAWNED_BY ? { spawnedBy: process.env.HAPPY_SPAWNED_BY } : {},
|
|
1898
|
+
...meta?.tags ? { tags: meta.tags } : {},
|
|
1899
|
+
keepAwake: keepAwakeLatch = latchKeepAwake(meta?.keepAwake, keepAwakeLatch),
|
|
1900
|
+
...typeof meta?.keepAwake === "boolean" ? { keepAwakeSetting: meta.keepAwake } : {},
|
|
1901
|
+
thinking: thinking || turnActive,
|
|
1902
|
+
queuedInputs: messageQueue.size() + (session.promptQueueHasPending() ? 1 : 0),
|
|
1903
|
+
waitingForInput: messageQueue.isWaiting(),
|
|
1904
|
+
pendingRequests: Object.keys(session.getAgentState()?.requests ?? {}).length,
|
|
1905
|
+
backgroundTasks: codexActiveSubagents.size,
|
|
1906
|
+
lastActivityAt: session.lastActivityAt,
|
|
1907
|
+
...shouldExit && !hibernationExit.hibernating ? { exiting: true } : {}
|
|
1908
|
+
};
|
|
1909
|
+
};
|
|
1910
|
+
hibernationProbe = new HibernationProbe({
|
|
1911
|
+
onKeepAwakeLatched: () => {
|
|
1912
|
+
if (session.getMetadata()?.keepAwake === void 0) session.updateMetadata((m) => m.keepAwake === void 0 ? { ...m, keepAwake: true } : m);
|
|
1913
|
+
},
|
|
1914
|
+
checkMs: resolveCheckMs(),
|
|
1915
|
+
snapshot: hibernationSnapshot,
|
|
1916
|
+
ask: (report) => checkDaemonHibernation({ sessionId: session.sessionId, pid: process.pid, report }),
|
|
1917
|
+
commit: (idleMs) => commitHibernation({
|
|
1918
|
+
client: session,
|
|
1919
|
+
claimExit: () => !shouldExit && hibernationExit.begin(),
|
|
1920
|
+
exitRequested: () => hibernationExit.exitRequested,
|
|
1921
|
+
markCommitted: () => hibernationExit.commit(),
|
|
1922
|
+
releaseExit: () => {
|
|
1923
|
+
const deferred = hibernationExit.release();
|
|
1924
|
+
if (deferred) void handleKillSession(deferred);
|
|
1925
|
+
},
|
|
1926
|
+
recheck: () => evaluateWrapperIdle(hibernationSnapshot(), idleMs, Date.now()),
|
|
1927
|
+
idleMs,
|
|
1928
|
+
finish: async (stamp) => {
|
|
1929
|
+
hibernationStamp = stamp;
|
|
1930
|
+
shouldExit = true;
|
|
1931
|
+
abortController.abort();
|
|
1932
|
+
}
|
|
1933
|
+
})
|
|
1934
|
+
});
|
|
1935
|
+
hibernationProbe.start();
|
|
1936
|
+
}
|
|
1866
1937
|
idleRelease.arm();
|
|
1867
1938
|
while (!shouldExit) {
|
|
1868
1939
|
logActiveHandles("loop-top");
|
|
@@ -1999,6 +2070,7 @@ async function runCodex(opts) {
|
|
|
1999
2070
|
}
|
|
2000
2071
|
} finally {
|
|
2001
2072
|
disposeTermination?.();
|
|
2073
|
+
hibernationProbe?.stop();
|
|
2002
2074
|
session.closePromptQueueDrain();
|
|
2003
2075
|
logger.debug("[codex]: Final cleanup start");
|
|
2004
2076
|
logActiveHandles("cleanup-start");
|
|
@@ -2047,6 +2119,15 @@ async function runCodex(opts) {
|
|
|
2047
2119
|
messageBuffer.clear();
|
|
2048
2120
|
logActiveHandles("cleanup-end");
|
|
2049
2121
|
logger.debug("[codex]: Final cleanup completed");
|
|
2122
|
+
if (hibernationExit.hibernating && hibernationStamp) {
|
|
2123
|
+
try {
|
|
2124
|
+
await api.deactivateSession(session.sessionId);
|
|
2125
|
+
} catch (error) {
|
|
2126
|
+
logger.debug("[codex]: deactivate after hibernation failed", safeCodexErrorMetadata(error));
|
|
2127
|
+
}
|
|
2128
|
+
logger.debug("[codex]: hibernated; exiting");
|
|
2129
|
+
process.exit(0);
|
|
2130
|
+
}
|
|
2050
2131
|
}
|
|
2051
2132
|
}
|
|
2052
2133
|
|