very-happy-cli 0.2.165 → 0.2.166
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/README.md +1 -1
- package/dist/{AcpBackend-DCfNt9bD.cjs → AcpBackend-20VHOXwb.cjs} +3 -3
- package/dist/{AcpBackend-C11FnVw5.mjs → AcpBackend-tRWk7yi7.mjs} +3 -3
- package/dist/{AcpSessionManager-BQnDJvct.mjs → AcpSessionManager-B7FIrsys.mjs} +1 -1
- package/dist/{AcpSessionManager-9yN2iH4b.cjs → AcpSessionManager-Zf00QnlL.cjs} +1 -1
- package/dist/{BasePermissionHandler-CwJ48yiB.mjs → BasePermissionHandler-CDCLIrZJ.mjs} +1 -1
- package/dist/{BasePermissionHandler-BwQHxl6M.cjs → BasePermissionHandler-COKc4pmt.cjs} +1 -1
- package/dist/{BaseReasoningProcessor-ClF2g1qz.mjs → BaseReasoningProcessor-BDVKvooR.mjs} +1 -1
- package/dist/{BaseReasoningProcessor-81lf_M8G.cjs → BaseReasoningProcessor-DAGQdkNp.cjs} +1 -1
- package/dist/{agentGuidance-CQuNlNx8.mjs → agentGuidance-BDYt2Qy2.mjs} +4 -2
- package/dist/{agentGuidance-B5NATuFa.cjs → agentGuidance-BtBx2xxE.cjs} +4 -1
- package/dist/{agentHome-DvR176E5.mjs → agentHome-2IbIjKCa.mjs} +4 -4
- package/dist/{agentHome-D3Nn82kI.cjs → agentHome-KVWj6nCl.cjs} +4 -4
- package/dist/{api-DTVPUE7g.mjs → api-Cmz3XS4P.mjs} +14 -12
- package/dist/{api-AzdzTKFs.cjs → api-DnNL5fLw.cjs} +14 -12
- package/dist/{apiMachine-BQ-b4Lu3.mjs → apiMachine-B6ySCFe0.mjs} +2137 -65
- package/dist/{apiMachine-B_cJldfa.cjs → apiMachine-DeoQ8QbZ.cjs} +2134 -62
- package/dist/{attachmentContent-dzIs-wis.mjs → attachmentContent-CTXapi-_.mjs} +2 -2
- package/dist/{attachmentContent-muDCe4Gy.cjs → attachmentContent-DPWxHgX4.cjs} +2 -2
- package/dist/{attachmentLimits-eJZ4ZBjF.cjs → attachmentLimits-BfgKV5iE.cjs} +28 -2
- package/dist/{attachmentLimits-B8nzhw-i.mjs → attachmentLimits-C1PCCM79.mjs} +28 -2
- package/dist/{auth-Jtmvh1w4.mjs → auth-BMaBjRAj.mjs} +8 -8
- package/dist/{auth-DtP-B4gf.cjs → auth-D4-eQz85.cjs} +8 -8
- package/dist/{auth-CfLd3phE.cjs → auth-ietHtvwu.cjs} +5 -5
- package/dist/{auth-BY5ujhGn.mjs → auth-pzWIFdOD.mjs} +5 -5
- package/dist/{auto-DjWfR1UB.mjs → auto-DL75Dx3I.mjs} +83 -21
- package/dist/{auto-ClNnbSoF.cjs → auto-DOWTQDPa.cjs} +84 -20
- package/dist/{bootstrap-B1dMZA-u.cjs → bootstrap-BpXIc2wn.cjs} +2 -2
- package/dist/{bootstrap-D_ExGrY2.mjs → bootstrap-XE8A7Ut2.mjs} +2 -2
- package/dist/{browser-_gV7tcPs.cjs → browser-CcG8GLRV.cjs} +1 -1
- package/dist/{browser-mwzpOmcw.mjs → browser-DDFi1T8C.mjs} +1 -1
- package/dist/{claudeLocal-G5UmJ81F.cjs → claudeLocal-DXBXwIOG.cjs} +6 -6
- package/dist/{claudeLocal-BeHToEK5.mjs → claudeLocal-DmM5Oyhv.mjs} +6 -6
- package/dist/{claudeLocalLauncher-B4y2BsmO.cjs → claudeLocalLauncher-C41Y6Kp4.cjs} +14 -11
- package/dist/{claudeLocalLauncher-Cq6bqAT4.mjs → claudeLocalLauncher-Cs4eUC3P.mjs} +14 -11
- package/dist/{claudeSessionFork-CokUhS4r.mjs → claudeSessionFork-BdLnc2Hv.mjs} +1 -1
- package/dist/{claudeSessionFork-CDJq_b9r.cjs → claudeSessionFork-Cs0I3eGI.cjs} +1 -1
- package/dist/{client-BwaWdlCm.mjs → client-CbK33y_s.mjs} +3 -3
- package/dist/{client-uN9d6Git.cjs → client-DJ0kX_8M.cjs} +2 -2
- package/dist/{client-CJZKBZCE.mjs → client-GjTnsq6F.mjs} +2 -2
- package/dist/{client-Do7cGPEq.cjs → client-JISJx2f-.cjs} +3 -3
- package/dist/codex/happyMcpStdioBridge.cjs +23 -18
- package/dist/codex/happyMcpStdioBridge.mjs +22 -17
- package/dist/{codexAppServerClient-BuSdeUxT.cjs → codexAppServerClient-BTjn2ZCZ.cjs} +46 -2
- package/dist/{codexAppServerClient-B0QaMQsC.mjs → codexAppServerClient-CldXEojt.mjs} +47 -3
- package/dist/{codexCommand-YdYmykAR.cjs → codexCommand-BpD0N1F7.cjs} +71 -51
- package/dist/{codexCommand-C3gdjMAw.mjs → codexCommand-DjMU-Ijf.mjs} +71 -51
- package/dist/{config-CGCIFRCN.mjs → config-DjSJKatx.mjs} +3 -3
- package/dist/{config-ChoHFnfO.cjs → config-DuLL0Ppe.cjs} +3 -3
- package/dist/{configuration-BE61XNsg.cjs → configuration-B0cb3xA3.cjs} +1 -1
- package/dist/{configuration-L1qcGTFM.mjs → configuration-D2v3puap.mjs} +1 -1
- package/dist/{connect-D5IKfcfd.cjs → connect-B7JWEzyg.cjs} +13 -13
- package/dist/{connect-CFD0Em6a.mjs → connect-CnNNyM9I.mjs} +13 -13
- package/dist/{context-3WVw8qPz.cjs → context-BFUpYT39.cjs} +1 -1
- package/dist/{context-DaCCB4cm.mjs → context-DjfqLWzE.mjs} +1 -1
- package/dist/{controlClient-Ci7HTMII.mjs → controlClient-BMUJfUeF.mjs} +13 -6
- package/dist/{controlClient-RWTlQA4_.cjs → controlClient-CmnHGcyl.cjs} +13 -5
- package/dist/{createSessionMetadata-CWR-AB2A.mjs → createSessionMetadata-DU0bCg2m.mjs} +2 -2
- package/dist/{createSessionMetadata-CPGTztXP.cjs → createSessionMetadata-DbfRBhRu.cjs} +2 -2
- package/dist/{deterministicJson-BBwG-Ase.mjs → deterministicJson-D-WPUrZb.mjs} +36 -52
- package/dist/{deterministicJson-C4Jo2RWy.cjs → deterministicJson-Dp3TVyap.cjs} +41 -59
- package/dist/{doctor-CAC6qY9Z.mjs → doctor-BlXXyQ1L.mjs} +6 -6
- package/dist/{doctor-ZOQLE5AH.cjs → doctor-CkJmdPbi.cjs} +6 -6
- package/dist/{assistantTools-BsrG3PD-.cjs → downloadTarget-CiQqRIc-.cjs} +44 -6
- package/dist/{assistantTools-DPGga5lM.mjs → downloadTarget-DjSwMHun.mjs} +45 -8
- package/dist/{ensureDaemonRunning-b1pvEFcS.mjs → ensureDaemonRunning-CAQag1zE.mjs} +5 -5
- package/dist/{ensureDaemonRunning-mIgX2vnc.cjs → ensureDaemonRunning-C_aIOhgG.cjs} +5 -5
- package/dist/{handleResumeCommand-DGNhbv-3.cjs → handleResumeCommand-6KzBGDnl.cjs} +5 -5
- package/dist/{handleResumeCommand-CTGbZkCL.mjs → handleResumeCommand-Ci7wacT-.mjs} +5 -5
- package/dist/{index-vVWpCoTr.mjs → index-B0HEEYGh.mjs} +22 -5
- package/dist/{index-DqlyNgt4.cjs → index-C9hI8a10.cjs} +26 -4
- package/dist/{index-BzIxE0Eu.cjs → index-CaFCAlX8.cjs} +3 -3
- package/dist/{index-DrSPR59N.cjs → index-DBmNwMX9.cjs} +39 -38
- package/dist/{index-DIodyAqF.cjs → index-DEKIgZUo.cjs} +4 -4
- package/dist/{index-Diu6HdWH.mjs → index-DQplgo0W.mjs} +4 -4
- package/dist/{index-BgzjPv07.mjs → index-HQsigW_J.mjs} +3 -3
- package/dist/{index-DjtBengz.mjs → index-WGCT6SSV.mjs} +40 -39
- package/dist/index.cjs +2 -2
- package/dist/index.mjs +2 -2
- package/dist/{install-BO_W7VhL.mjs → install-BdvKiOQw.mjs} +2 -0
- package/dist/{install-DrUQk2DJ.cjs → install-CejEiRGW.cjs} +3 -3
- package/dist/{install-Cs5qAPrB.cjs → install-Cf6AFSWC.cjs} +2 -0
- package/dist/{install-Cp_aB-NQ.mjs → install-oJUvsFu9.mjs} +3 -3
- package/dist/lib.cjs +12 -12
- package/dist/lib.d.cts +55 -2
- package/dist/lib.d.mts +55 -2
- package/dist/lib.mjs +12 -12
- package/dist/{lidState-BLHLmhwd.mjs → lidState-BfximpjX.mjs} +1 -1
- package/dist/{lidState-z9ekRpZu.cjs → lidState-D8BmnJV1.cjs} +1 -1
- package/dist/{localHappyAgentAuth-BWvmc_Hg.mjs → localHappyAgentAuth-Ct1aXwqd.mjs} +1 -1
- package/dist/{localHappyAgentAuth-BCx0y1qW.cjs → localHappyAgentAuth-d7B6S_o7.cjs} +1 -1
- package/dist/{logger-CknSVkIe.mjs → logger-BpQcwNnt.mjs} +2 -2
- package/dist/{logger-D0hkk7Vo.cjs → logger-JTcJU-uL.cjs} +2 -2
- package/dist/{machineMetadata-BDCYOXQg.cjs → machineMetadata-BBg_Njw3.cjs} +3 -3
- package/dist/{machineMetadata-Cj1DoFot.mjs → machineMetadata-CBdxABeI.mjs} +3 -3
- package/dist/{main-CKUfkVG_.mjs → main-B5b1gA3K.mjs} +44 -44
- package/dist/{main-COAPGIso.cjs → main-C16fOGgn.cjs} +44 -44
- package/dist/{mcp-BILnw4si.cjs → mcp-BnNiBBax.cjs} +24 -19
- package/dist/{mcp-DeYUfpo8.mjs → mcp-DGNWgVdv.mjs} +23 -18
- package/dist/{mirrorProtocol-BUtmg1ws.cjs → mirrorProtocol-BEGk2--0.cjs} +80 -0
- package/dist/{mirrorProtocol-BNLtoWjO.mjs → mirrorProtocol-h5WHpdhh.mjs} +79 -1
- package/dist/{package-VIUXrYZ1.mjs → package-BqwrPxL0.mjs} +7 -7
- package/dist/{package-UkmvSFsg.cjs → package-C1XvUQFy.cjs} +7 -7
- package/dist/{peerTools-SWITnkqz.mjs → peerTools-CeCe-3lk.mjs} +4 -4
- package/dist/{peerTools-CttfOxti.cjs → peerTools-DPvbcs8V.cjs} +4 -4
- package/dist/{persistence-C6ztVW1W.cjs → persistence-2Xp_o6x6.cjs} +3 -3
- package/dist/{persistence-DujtUH94.mjs → persistence-B9LmhAE2.mjs} +3 -3
- package/dist/{piRunnerArgs-BVJHIjlk.mjs → piRunnerArgs-7FaTyNOq.mjs} +1 -1
- package/dist/{piRunnerArgs-tBQg6xDw.cjs → piRunnerArgs-DI29dDNo.cjs} +1 -1
- package/dist/{piRuntime-DKFA8u8t.mjs → piRuntime-0qEK5AqE.mjs} +1 -1
- package/dist/{piRuntime-DZzjF9It.cjs → piRuntime-R8XVChxK.cjs} +1 -1
- package/dist/{piTerminal-t5pQHCPT.cjs → piTerminal-Ccj0KNPr.cjs} +17 -17
- package/dist/{piTerminal-BTSaFlpV.mjs → piTerminal-zcQKc8Sp.mjs} +17 -17
- package/dist/precheckCompat-CWOi5c9L.cjs +29 -0
- package/dist/precheckCompat-DeEbilbr.mjs +26 -0
- package/dist/rateLimitWindows-C2Jk3Ih7.cjs +258 -0
- package/dist/rateLimitWindows-Dhfhbtqu.mjs +248 -0
- package/dist/{registerCommonHandlers--8ds2auE.cjs → registerCommonHandlers-Aha_KfM3.cjs} +2 -2
- package/dist/{registerCommonHandlers-BR0J4g64.mjs → registerCommonHandlers-DdfGsFbM.mjs} +2 -2
- package/dist/{registerKillSessionHandler-CI23l8aJ.cjs → registerKillSessionHandler-CjitOpUA.cjs} +6 -6
- package/dist/{registerKillSessionHandler-Czz0tdki.mjs → registerKillSessionHandler-DboQlGcH.mjs} +6 -6
- package/dist/{remoteSessionClient-DCAUHgPz.mjs → remoteSessionClient-B2DtWuNP.mjs} +5 -5
- package/dist/{remoteSessionClient-BAkIwM2S.cjs → remoteSessionClient-BwI8rpQw.cjs} +5 -5
- package/dist/{tools-mWqsE6ji.cjs → reportProgressTool-B-Rcy0s3.cjs} +73 -9
- package/dist/{tools-BVRoGcQH.mjs → reportProgressTool-DnAD8wOa.mjs} +67 -10
- package/dist/{run-CkKujjn8.cjs → run-Bh66Xs40.cjs} +268 -118
- package/dist/{run-B75qm2I6.mjs → run-DPEwJpQR.mjs} +266 -116
- package/dist/{runClaude-B1T9DLLi.cjs → runClaude-C-lJdAKD.cjs} +25 -20
- package/dist/{runClaude-aBfBweec.mjs → runClaude-DLr_nBzw.mjs} +25 -20
- package/dist/{runClaudeDeps-BOrPP4J1.mjs → runClaudeDeps-C7JV7nXG.mjs} +47 -37
- package/dist/{runClaudeDeps-BGjNGfuZ.cjs → runClaudeDeps-vWWLod7J.cjs} +44 -35
- package/dist/{runGemini-BuAA_OQb.cjs → runGemini-o-CUSayc.cjs} +42 -35
- package/dist/{runGemini-a-V7JE-J.mjs → runGemini-tH6sLw-G.mjs} +42 -35
- package/dist/{runOpenClaw-DUSwXg1A.mjs → runOpenClaw-C5DZvVhn.mjs} +18 -18
- package/dist/{runOpenClaw-BBVffIh9.cjs → runOpenClaw-D24f35l0.cjs} +18 -18
- package/dist/{sandbox-Brb_5wzc.mjs → sandbox-BaL1aslA.mjs} +4 -4
- package/dist/{sandbox-Fd2G5yaq.cjs → sandbox-TJZJ6ngw.cjs} +4 -4
- package/dist/selfCheck-DPi4lqme.mjs +84 -0
- package/dist/{selfCheck-NuJKMInJ.cjs → selfCheck-Dugi0Nk_.cjs} +34 -34
- package/dist/{send-4dgHKC3u.cjs → send-CkWOSYmU.cjs} +8 -8
- package/dist/{send-DEQJiq_x.mjs → send-DDcJ3ayi.mjs} +8 -8
- package/dist/{server-DWGcDmHG.cjs → server-7qFQ8J2u.cjs} +6 -6
- package/dist/{server-C6AlUFkw.mjs → server-CUjRvQSd.mjs} +4 -4
- package/dist/{sessionLock-B1GgaO1q.cjs → sessionLock-DfhNICyS.cjs} +2 -2
- package/dist/{sessionLock-Dm8QyGo4.mjs → sessionLock-DqVyHFAQ.mjs} +2 -2
- package/dist/{sessionModeFile-BvOEJ4Fl.cjs → sessionModeFile-CIznKD7O.cjs} +1 -1
- package/dist/{sessionModeFile-CuNAWCKL.mjs → sessionModeFile-M4OpiyrF.mjs} +1 -1
- package/dist/{sessionOps-DG5MMEp_.mjs → sessionOps-BnaEaOKs.mjs} +4 -4
- package/dist/{sessionOps-JP64uJmc.cjs → sessionOps-DOyy4gkY.cjs} +4 -4
- package/dist/{sessionScanner-DqSk5Ol_.mjs → sessionScanner-CcuOn9uU.mjs} +75 -19
- package/dist/{sessionScanner-BBPEgJ5S.cjs → sessionScanner-Cu1yKlj4.cjs} +75 -19
- package/dist/{sessions-DgJuw_i0.cjs → sessions-BQgk5Kw8.cjs} +9 -9
- package/dist/{sessions-4isbBAWi.mjs → sessions-C9O91rL1.mjs} +9 -9
- package/dist/{setupOfflineReconnection-_MoZtsro.mjs → setupOfflineReconnection-Byy8aeKT.mjs} +2 -2
- package/dist/{setupOfflineReconnection-CKJKVIUS.cjs → setupOfflineReconnection-DFmQ8s6I.cjs} +2 -2
- package/dist/{spawn-CshERWbY.cjs → spawn-BS7LPmSm.cjs} +13 -12
- package/dist/{spawn-BTOG4tTm.mjs → spawn-EZ2yrtWd.mjs} +13 -12
- package/dist/{spawnAgents-Czi2VDzj.mjs → spawnAgents-HDaE3C0-.mjs} +1 -1
- package/dist/{spawnAgents-McixdtV1.cjs → spawnAgents-vglexX9N.cjs} +1 -1
- package/dist/{spawnHappyCLI-Dc4xYm8P.mjs → spawnHappyCLI-BAa49m0q.mjs} +1 -1
- package/dist/{spawnHappyCLI-Dd5_8Vex.cjs → spawnHappyCLI-DyaldIe5.cjs} +1 -1
- package/dist/specialCommands-CCWtwIGZ.mjs +93 -0
- package/dist/specialCommands-DouFaJ_0.cjs +96 -0
- package/dist/{startFileWatcher-1LedLBY-.cjs → startFileWatcher-DQbbypJv.cjs} +1 -1
- package/dist/{startFileWatcher-B0VlG-Fn.mjs → startFileWatcher-Dfs4whzr.mjs} +1 -1
- package/dist/{streamRelay-C0AffuX6.cjs → streamRelay-Ce9sgcOV.cjs} +1 -1
- package/dist/{streamRelay-BzMEEvJU.mjs → streamRelay-Iogsh51a.mjs} +1 -1
- package/dist/{sync-Dfm6K2te.mjs → sync-BLpH13Kb.mjs} +1 -1
- package/dist/{sync-DwUUGGFz.cjs → sync-x_lI_3j_.cjs} +1 -1
- package/dist/{systemPrompt-CB1Ls0AE.cjs → systemPrompt-4erwILTB.cjs} +3 -3
- package/dist/{systemPrompt-D41Zw1a3.mjs → systemPrompt-BanyDihy.mjs} +3 -3
- package/dist/{teams-D8Ly3i6u.mjs → teams-D6BOT3lR.mjs} +7 -7
- package/dist/{teams-NWv2ji16.cjs → teams-DzetlGWC.cjs} +7 -7
- package/dist/{time-v1Y_qEJp.mjs → time-CfDKj6Bx.mjs} +1 -1
- package/dist/{time-BbzJ7PJQ.cjs → time-T0YmeOhS.cjs} +1 -1
- package/dist/{titleGenerator-BhoblAQY.mjs → titleGenerator-ChImQ4q-.mjs} +1 -1
- package/dist/{titleGenerator-cH6IkPRi.cjs → titleGenerator-CoMxqKfP.cjs} +2 -2
- package/dist/{todo-D1hgWV6d.cjs → todo-CZZebKZg.cjs} +6 -6
- package/dist/{todo-CuNct-fw.mjs → todo-SVtYxGON.mjs} +6 -6
- package/dist/{tools-jof0Bu54.mjs → tools-3X2z3YDe.mjs} +1 -1
- package/dist/{tools-c2fb0CF5.cjs → tools-IJ0TAcJs.cjs} +1 -1
- package/dist/transcriptCursor-B7T_gkQ0.mjs +102 -0
- package/dist/transcriptCursor-DcXGLeSc.cjs +106 -0
- package/dist/{uninstall-VPH5GfrA.cjs → uninstall-CqqCWj7w.cjs} +3 -3
- package/dist/{uninstall-BB7WYYAk.mjs → uninstall-CypD-kr1.mjs} +3 -3
- package/package.json +7 -7
- package/scripts/terminal_status_forwarder.cjs +89 -0
- package/dist/selfCheck-BgwJ3NGS.mjs +0 -84
- package/dist/specialCommands-BSqhYg5X.mjs +0 -52
- package/dist/specialCommands-DSsTeRej.cjs +0 -54
|
@@ -1,61 +1,61 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var auth = require('./auth-
|
|
4
|
-
var index = require('./index-
|
|
3
|
+
var auth = require('./auth-ietHtvwu.cjs');
|
|
4
|
+
var index = require('./index-C9hI8a10.cjs');
|
|
5
5
|
var forkBackfill = require('./forkBackfill-8eLDeS73.cjs');
|
|
6
6
|
var node_crypto = require('node:crypto');
|
|
7
7
|
var cuid2 = require('@paralleldrive/cuid2');
|
|
8
8
|
var agentAttachments = require('./agentAttachments-Dbw8iMCZ.cjs');
|
|
9
|
-
var attachmentContent = require('./attachmentContent-
|
|
9
|
+
var attachmentContent = require('./attachmentContent-DPWxHgX4.cjs');
|
|
10
10
|
var ink = require('ink');
|
|
11
|
-
var sessionLock = require('./sessionLock-
|
|
11
|
+
var sessionLock = require('./sessionLock-DfhNICyS.cjs');
|
|
12
12
|
var React = require('react');
|
|
13
|
-
var api = require('./api-
|
|
14
|
-
var codexAppServerClient = require('./codexAppServerClient-
|
|
15
|
-
var
|
|
16
|
-
var
|
|
17
|
-
var
|
|
13
|
+
var api = require('./api-DnNL5fLw.cjs');
|
|
14
|
+
var codexAppServerClient = require('./codexAppServerClient-BTjn2ZCZ.cjs');
|
|
15
|
+
var specialCommands = require('./specialCommands-DouFaJ_0.cjs');
|
|
16
|
+
var logger = require('./logger-JTcJU-uL.cjs');
|
|
17
|
+
var BasePermissionHandler = require('./BasePermissionHandler-COKc4pmt.cjs');
|
|
18
|
+
var BaseReasoningProcessor = require('./BaseReasoningProcessor-DAGQdkNp.cjs');
|
|
18
19
|
var node_child_process = require('node:child_process');
|
|
19
|
-
var persistence = require('./persistence-
|
|
20
|
-
var machineMetadata = require('./machineMetadata-
|
|
21
|
-
var configuration = require('./configuration-
|
|
22
|
-
var registerKillSessionHandler = require('./registerKillSessionHandler-
|
|
20
|
+
var persistence = require('./persistence-2Xp_o6x6.cjs');
|
|
21
|
+
var machineMetadata = require('./machineMetadata-BBg_Njw3.cjs');
|
|
22
|
+
var configuration = require('./configuration-B0cb3xA3.cjs');
|
|
23
|
+
var registerKillSessionHandler = require('./registerKillSessionHandler-CjitOpUA.cjs');
|
|
23
24
|
var projectPath = require('./projectPath-ChLhdOyt.cjs');
|
|
24
25
|
var path = require('node:path');
|
|
25
|
-
var createSessionMetadata = require('./createSessionMetadata-
|
|
26
|
-
var deterministicJson = require('./deterministicJson-
|
|
26
|
+
var createSessionMetadata = require('./createSessionMetadata-DbfRBhRu.cjs');
|
|
27
|
+
var deterministicJson = require('./deterministicJson-Dp3TVyap.cjs');
|
|
27
28
|
var messageBuffer = require('./messageBuffer-fJMH6uY8.cjs');
|
|
28
|
-
var controlClient = require('./controlClient-
|
|
29
|
+
var controlClient = require('./controlClient-CmnHGcyl.cjs');
|
|
29
30
|
var authRelay = require('./authRelay-BdYkC1Po.cjs');
|
|
30
|
-
var setupOfflineReconnection = require('./setupOfflineReconnection-
|
|
31
|
+
var setupOfflineReconnection = require('./setupOfflineReconnection-DFmQ8s6I.cjs');
|
|
31
32
|
var trimIdent = require('./trimIdent-4gvk9Wk6.cjs');
|
|
32
|
-
var specialCommands = require('./specialCommands-DSsTeRej.cjs');
|
|
33
33
|
var constants = require('./constants-VJ0N6WuG.cjs');
|
|
34
34
|
var defaultPermissionMode = require('./defaultPermissionMode-CxmTXUQR.cjs');
|
|
35
35
|
var editPaths = require('./editPaths-Bqp4OFPw.cjs');
|
|
36
|
-
var ensureDaemonRunning = require('./ensureDaemonRunning-
|
|
36
|
+
var ensureDaemonRunning = require('./ensureDaemonRunning-C_aIOhgG.cjs');
|
|
37
37
|
require('tweetnacl');
|
|
38
38
|
require('axios');
|
|
39
|
-
require('./time-
|
|
40
|
-
require('./browser-
|
|
39
|
+
require('./time-T0YmeOhS.cjs');
|
|
40
|
+
require('./browser-CcG8GLRV.cjs');
|
|
41
41
|
require('open');
|
|
42
42
|
require('zod');
|
|
43
43
|
require('node:fs/promises');
|
|
44
|
-
require('./attachmentLimits-
|
|
44
|
+
require('./attachmentLimits-BfgKV5iE.cjs');
|
|
45
45
|
require('node:fs');
|
|
46
|
-
require('./lidState-
|
|
46
|
+
require('./lidState-D8BmnJV1.cjs');
|
|
47
47
|
require('os');
|
|
48
48
|
require('child_process');
|
|
49
49
|
require('node:events');
|
|
50
50
|
require('socket.io-client');
|
|
51
51
|
require('./limits-C-a7gr04.cjs');
|
|
52
|
-
require('./registerCommonHandlers
|
|
52
|
+
require('./registerCommonHandlers-Aha_KfM3.cjs');
|
|
53
53
|
require('util');
|
|
54
54
|
require('fs/promises');
|
|
55
55
|
require('crypto');
|
|
56
56
|
require('path');
|
|
57
57
|
require('cross-spawn');
|
|
58
|
-
require('./sync-
|
|
58
|
+
require('./sync-x_lI_3j_.cjs');
|
|
59
59
|
require('./backgroundTaskActivity-CBvUdj39.cjs');
|
|
60
60
|
require('./contentLogMetadata-ZSFk_NjQ.cjs');
|
|
61
61
|
require('chalk');
|
|
@@ -63,34 +63,36 @@ require('node:readline');
|
|
|
63
63
|
require('./manager-Cly8xVIR.cjs');
|
|
64
64
|
require('@anthropic-ai/sandbox-runtime');
|
|
65
65
|
require('node:os');
|
|
66
|
-
require('./package-
|
|
66
|
+
require('./package-C1XvUQFy.cjs');
|
|
67
|
+
require('./rateLimitWindows-C2Jk3Ih7.cjs');
|
|
67
68
|
require('node:util');
|
|
68
69
|
require('./detectCLI-DR9ZaN6B.cjs');
|
|
69
70
|
require('fs');
|
|
70
|
-
require('./localHappyAgentAuth-
|
|
71
|
+
require('./localHappyAgentAuth-d7B6S_o7.cjs');
|
|
71
72
|
require('./types-CRS-srZK.cjs');
|
|
72
73
|
require('url');
|
|
73
|
-
require('./client-
|
|
74
|
-
require('./context-
|
|
75
|
-
require('./sessionOps-
|
|
74
|
+
require('./client-JISJx2f-.cjs');
|
|
75
|
+
require('./context-BFUpYT39.cjs');
|
|
76
|
+
require('./sessionOps-DOyy4gkY.cjs');
|
|
76
77
|
require('./resources-JDPugcDq.cjs');
|
|
77
|
-
require('./tools-
|
|
78
|
-
require('./
|
|
79
|
-
require('./client-
|
|
80
|
-
require('./
|
|
78
|
+
require('./tools-IJ0TAcJs.cjs');
|
|
79
|
+
require('./reportProgressTool-B-Rcy0s3.cjs');
|
|
80
|
+
require('./client-DJ0kX_8M.cjs');
|
|
81
|
+
require('./precheckCompat-CWOi5c9L.cjs');
|
|
82
|
+
require('./agentGuidance-BtBx2xxE.cjs');
|
|
83
|
+
require('./peerTools-DPvbcs8V.cjs');
|
|
81
84
|
require('./ids-B6ZC0HGt.cjs');
|
|
82
|
-
require('./remoteSessionClient-
|
|
85
|
+
require('./remoteSessionClient-BwI8rpQw.cjs');
|
|
83
86
|
require('@modelcontextprotocol/sdk/server/mcp.js');
|
|
84
87
|
require('node:http');
|
|
85
88
|
require('@modelcontextprotocol/sdk/server/streamableHttp.js');
|
|
86
|
-
require('./
|
|
89
|
+
require('./downloadTarget-CiQqRIc-.cjs');
|
|
87
90
|
require('./terminals-B_bfC9c2.cjs');
|
|
88
91
|
require('./terminalTitleSuggest-DhvRFX3H.cjs');
|
|
89
92
|
require('./tmuxSocket-D-Xt6Vn-.cjs');
|
|
90
|
-
require('./bootstrap-
|
|
91
|
-
require('./agentGuidance-B5NATuFa.cjs');
|
|
93
|
+
require('./bootstrap-BpXIc2wn.cjs');
|
|
92
94
|
require('./previewPath-B0rBdhy1.cjs');
|
|
93
|
-
require('./spawnHappyCLI-
|
|
95
|
+
require('./spawnHappyCLI-DyaldIe5.cjs');
|
|
94
96
|
require('./doctorReadiness-BCZGcN0a.cjs');
|
|
95
97
|
|
|
96
98
|
function getStartedSubagents(state) {
|
|
@@ -652,20 +654,29 @@ async function readChildThread(client, childId) {
|
|
|
652
654
|
return { envelopes: mapCodexThreadToSessionEnvelopes(thread) };
|
|
653
655
|
}
|
|
654
656
|
|
|
657
|
+
const HAPPY_MCP_SERVER_NAME = "happy";
|
|
655
658
|
class CodexPermissionHandler extends BasePermissionHandler.BasePermissionHandler {
|
|
656
659
|
// Exact tool names that should always be auto-approved. Include the bare
|
|
657
660
|
// form (used by Codex elicitation messages like `tool "change_title"`)
|
|
658
|
-
// and the MCP-qualified form for defense in depth.
|
|
661
|
+
// and the MCP-qualified form for defense in depth. A BARE name (and an ID
|
|
662
|
+
// prefix) only counts when the request comes from our own server: any
|
|
663
|
+
// other MCP server may expose a tool with the same name.
|
|
664
|
+
// B-556: report_progress only writes this session's own board line (same
|
|
665
|
+
// trust as change_title); an approval prompt per report would park the
|
|
666
|
+
// session in "waiting for you" at every milestone.
|
|
659
667
|
static ALWAYS_AUTO_APPROVE_NAMES = /* @__PURE__ */ new Set([
|
|
660
668
|
"change_title",
|
|
661
|
-
"mcp__happy__change_title"
|
|
669
|
+
"mcp__happy__change_title",
|
|
670
|
+
"report_progress",
|
|
671
|
+
"mcp__happy__report_progress"
|
|
662
672
|
]);
|
|
663
673
|
// Tool-call IDs that should auto-approve when they exactly match one of
|
|
664
674
|
// these values or start with `<name>-` (e.g. `change_title-1765385846663`).
|
|
665
675
|
// Substring matching was a bypass vector — any tool whose ID happened to
|
|
666
676
|
// contain `change_title` as a substring would be silently approved.
|
|
667
677
|
static ALWAYS_AUTO_APPROVE_ID_PREFIXES = [
|
|
668
|
-
"change_title"
|
|
678
|
+
"change_title",
|
|
679
|
+
"report_progress"
|
|
669
680
|
];
|
|
670
681
|
constructor(session) {
|
|
671
682
|
super(session);
|
|
@@ -673,7 +684,11 @@ class CodexPermissionHandler extends BasePermissionHandler.BasePermissionHandler
|
|
|
673
684
|
getLogPrefix() {
|
|
674
685
|
return "[Codex]";
|
|
675
686
|
}
|
|
676
|
-
shouldAutoApprove(toolName, toolCallId) {
|
|
687
|
+
shouldAutoApprove(toolName, toolCallId, serverName) {
|
|
688
|
+
if (toolName.startsWith(`mcp__${HAPPY_MCP_SERVER_NAME}__`)) {
|
|
689
|
+
return CodexPermissionHandler.ALWAYS_AUTO_APPROVE_NAMES.has(toolName);
|
|
690
|
+
}
|
|
691
|
+
if (serverName !== HAPPY_MCP_SERVER_NAME) return false;
|
|
677
692
|
if (CodexPermissionHandler.ALWAYS_AUTO_APPROVE_NAMES.has(toolName)) {
|
|
678
693
|
return true;
|
|
679
694
|
}
|
|
@@ -689,10 +704,11 @@ class CodexPermissionHandler extends BasePermissionHandler.BasePermissionHandler
|
|
|
689
704
|
* @param toolCallId - The unique ID of the tool call
|
|
690
705
|
* @param toolName - The name of the tool being called
|
|
691
706
|
* @param input - The input parameters for the tool
|
|
707
|
+
* @param serverName - MCP server of an elicitation (`mcpServer/elicitation/request`); undefined for exec/patch
|
|
692
708
|
* @returns Promise resolving to permission result
|
|
693
709
|
*/
|
|
694
|
-
async handleToolCall(toolCallId, toolName, input) {
|
|
695
|
-
if (this.shouldAutoApprove(toolName, toolCallId)) {
|
|
710
|
+
async handleToolCall(toolCallId, toolName, input, serverName) {
|
|
711
|
+
if (this.shouldAutoApprove(toolName, toolCallId, serverName)) {
|
|
696
712
|
logger.logger.debug(`${this.getLogPrefix()} Auto-approving tool ${toolName} (${toolCallId})`);
|
|
697
713
|
this.session.updateAgentState((currentState) => ({
|
|
698
714
|
...currentState,
|
|
@@ -1517,7 +1533,7 @@ async function runCodex(opts) {
|
|
|
1517
1533
|
}
|
|
1518
1534
|
let abortController = new AbortController();
|
|
1519
1535
|
let shouldExit = false;
|
|
1520
|
-
async function handleAbort() {
|
|
1536
|
+
async function handleAbort(source) {
|
|
1521
1537
|
if (abortInProgress) {
|
|
1522
1538
|
await abortInProgress;
|
|
1523
1539
|
return;
|
|
@@ -1533,6 +1549,9 @@ async function runCodex(opts) {
|
|
|
1533
1549
|
gracePeriodMs: 3e3,
|
|
1534
1550
|
forceRestartOnTimeout: true
|
|
1535
1551
|
});
|
|
1552
|
+
if (source === "user" && abortResult.hadActiveTurn && abortResult.aborted) {
|
|
1553
|
+
session.sendSessionEvent({ type: "message", message: "Aborted by user" });
|
|
1554
|
+
}
|
|
1536
1555
|
if (abortResult.forcedRestart) {
|
|
1537
1556
|
logger.logger.warn("[Codex] Forced app-server restart after interrupt timeout");
|
|
1538
1557
|
session.sendSessionEvent({
|
|
@@ -1558,7 +1577,7 @@ async function runCodex(opts) {
|
|
|
1558
1577
|
}
|
|
1559
1578
|
const handleKillSession = async () => {
|
|
1560
1579
|
logger.logger.debug("[Codex] Kill session requested - terminating process");
|
|
1561
|
-
await handleAbort();
|
|
1580
|
+
await handleAbort("kill");
|
|
1562
1581
|
logger.logger.debug("[Codex] Abort completed, proceeding with termination");
|
|
1563
1582
|
try {
|
|
1564
1583
|
if (session) {
|
|
@@ -1593,7 +1612,7 @@ async function runCodex(opts) {
|
|
|
1593
1612
|
return { error: error instanceof Error ? error.message : "Child read failed" };
|
|
1594
1613
|
}
|
|
1595
1614
|
});
|
|
1596
|
-
session.rpcHandlerManager.registerHandler("abort", handleAbort);
|
|
1615
|
+
session.rpcHandlerManager.registerHandler("abort", () => handleAbort("user"));
|
|
1597
1616
|
const disposeTermination = registerKillSessionHandler.registerKillSessionHandler(session.rpcHandlerManager, handleKillSession, session, { processSignals: true });
|
|
1598
1617
|
const messageBuffer$1 = new messageBuffer.MessageBuffer();
|
|
1599
1618
|
const hasTTY = process.stdout.isTTY && process.stdin.isTTY;
|
|
@@ -1606,7 +1625,7 @@ async function runCodex(opts) {
|
|
|
1606
1625
|
onExit: async () => {
|
|
1607
1626
|
logger.logger.debug("[codex]: Exiting agent via Ctrl-C");
|
|
1608
1627
|
shouldExit = true;
|
|
1609
|
-
await handleAbort();
|
|
1628
|
+
await handleAbort("exit");
|
|
1610
1629
|
}
|
|
1611
1630
|
}), {
|
|
1612
1631
|
exitOnCtrlC: false,
|
|
@@ -1655,7 +1674,7 @@ async function runCodex(opts) {
|
|
|
1655
1674
|
const toolName = params.type === "exec" ? "CodexBash" : params.type === "patch" ? "CodexPatch" : params.toolName ?? "McpTool";
|
|
1656
1675
|
const input = params.type === "exec" ? { command: params.command, cwd: params.cwd } : params.type === "patch" ? { changes: params.fileChanges } : params.input ?? {};
|
|
1657
1676
|
try {
|
|
1658
|
-
const result = await permissionHandler.handleToolCall(params.callId, toolName, input);
|
|
1677
|
+
const result = await permissionHandler.handleToolCall(params.callId, toolName, input, params.type === "mcp" ? params.serverName : void 0);
|
|
1659
1678
|
logger.logger.debug("[Codex] Permission request resolved");
|
|
1660
1679
|
return result.decision;
|
|
1661
1680
|
} catch (error) {
|
|
@@ -1664,6 +1683,7 @@ async function runCodex(opts) {
|
|
|
1664
1683
|
}
|
|
1665
1684
|
});
|
|
1666
1685
|
const editThrottle = new editPaths.EditReportThrottle();
|
|
1686
|
+
client.setRateLimitHandler((snapshot) => specialCommands.wrapperRateLimitReporter().observeCodex(snapshot));
|
|
1667
1687
|
client.setEventHandler((msg) => {
|
|
1668
1688
|
if (msg.type === "token_count") {
|
|
1669
1689
|
session.sendAgentUsageSnapshot("codex", msg);
|
|
@@ -1768,7 +1788,7 @@ async function runCodex(opts) {
|
|
|
1768
1788
|
const happyServer = await deterministicJson.startHappyServer(session);
|
|
1769
1789
|
const bridgeEntrypoint = path.join(projectPath.projectPath(), "bin", "very-happy-mcp.mjs");
|
|
1770
1790
|
const mcpServers = {
|
|
1771
|
-
|
|
1791
|
+
[HAPPY_MCP_SERVER_NAME]: {
|
|
1772
1792
|
command: process.execPath,
|
|
1773
1793
|
args: ["--no-warnings", "--no-deprecation", bridgeEntrypoint, "--url", happyServer.url]
|
|
1774
1794
|
}
|
|
@@ -1,59 +1,59 @@
|
|
|
1
|
-
import { a as authAndSetupMachineIfNeeded } from './auth-
|
|
2
|
-
import {
|
|
1
|
+
import { a as authAndSetupMachineIfNeeded } from './auth-pzWIFdOD.mjs';
|
|
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-CTXapi-_.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, w as withoutServerSnapshot, m as mergeReconnectMetadata } from './sessionLock-DqVyHFAQ.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 {
|
|
14
|
-
import {
|
|
15
|
-
import { B as
|
|
11
|
+
import { c as connectionState, A as ApiClient } from './api-Cmz3XS4P.mjs';
|
|
12
|
+
import { C as CodexAppServerClient } from './codexAppServerClient-CldXEojt.mjs';
|
|
13
|
+
import { p as parseSpecialCommand, w as wrapperRateLimitReporter } from './specialCommands-CCWtwIGZ.mjs';
|
|
14
|
+
import { l as logger } from './logger-BpQcwNnt.mjs';
|
|
15
|
+
import { B as BasePermissionHandler } from './BasePermissionHandler-CDCLIrZJ.mjs';
|
|
16
|
+
import { B as BaseReasoningProcessor } from './BaseReasoningProcessor-BDVKvooR.mjs';
|
|
16
17
|
import { execSync } from 'node:child_process';
|
|
17
|
-
import { readSettings } from './persistence-
|
|
18
|
-
import { g as getInitialMachineMetadata } from './machineMetadata-
|
|
19
|
-
import { c as configuration } from './configuration-
|
|
20
|
-
import { M as MessageQueue2, r as registerKillSessionHandler } from './registerKillSessionHandler-
|
|
18
|
+
import { readSettings } from './persistence-B9LmhAE2.mjs';
|
|
19
|
+
import { g as getInitialMachineMetadata } from './machineMetadata-CBdxABeI.mjs';
|
|
20
|
+
import { c as configuration } from './configuration-D2v3puap.mjs';
|
|
21
|
+
import { M as MessageQueue2, r as registerKillSessionHandler } from './registerKillSessionHandler-DboQlGcH.mjs';
|
|
21
22
|
import { p as projectPath } from './projectPath-BTBIMB57.mjs';
|
|
22
23
|
import { join } from 'node:path';
|
|
23
|
-
import { c as createSessionMetadata } from './createSessionMetadata-
|
|
24
|
-
import { h as hashObject, s as startHappyServer } from './deterministicJson-
|
|
24
|
+
import { c as createSessionMetadata } from './createSessionMetadata-DU0bCg2m.mjs';
|
|
25
|
+
import { h as hashObject, s as startHappyServer } from './deterministicJson-D-WPUrZb.mjs';
|
|
25
26
|
import { M as MessageBuffer } from './messageBuffer-BWlGgR3A.mjs';
|
|
26
|
-
import { n as notifyDaemonSessionStarted,
|
|
27
|
+
import { n as notifyDaemonSessionStarted, h as reportSessionEditToDaemon } from './controlClient-BMUJfUeF.mjs';
|
|
27
28
|
import { d as decodeBase64, e as encodeBase64 } from './authRelay-DSAvg1uv.mjs';
|
|
28
|
-
import { s as setupOfflineReconnection } from './setupOfflineReconnection-
|
|
29
|
+
import { s as setupOfflineReconnection } from './setupOfflineReconnection-Byy8aeKT.mjs';
|
|
29
30
|
import { t as trimIdent } from './trimIdent-BAjmv_TG.mjs';
|
|
30
|
-
import { p as parseSpecialCommand } from './specialCommands-BSqhYg5X.mjs';
|
|
31
31
|
import { C as CHANGE_TITLE_INSTRUCTION } from './constants-BC4St0xd.mjs';
|
|
32
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-CAQag1zE.mjs';
|
|
35
35
|
import 'tweetnacl';
|
|
36
36
|
import 'axios';
|
|
37
|
-
import './time-
|
|
38
|
-
import './browser-
|
|
37
|
+
import './time-CfDKj6Bx.mjs';
|
|
38
|
+
import './browser-DDFi1T8C.mjs';
|
|
39
39
|
import 'open';
|
|
40
40
|
import 'zod';
|
|
41
41
|
import 'node:fs/promises';
|
|
42
|
-
import './attachmentLimits-
|
|
42
|
+
import './attachmentLimits-C1PCCM79.mjs';
|
|
43
43
|
import 'node:fs';
|
|
44
|
-
import './lidState-
|
|
44
|
+
import './lidState-BfximpjX.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-DdfGsFbM.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-BLpH13Kb.mjs';
|
|
57
57
|
import './backgroundTaskActivity-8PdPxrvy.mjs';
|
|
58
58
|
import './contentLogMetadata-BlWI0egu.mjs';
|
|
59
59
|
import 'chalk';
|
|
@@ -61,34 +61,36 @@ import 'node:readline';
|
|
|
61
61
|
import './manager-BQ4flvQZ.mjs';
|
|
62
62
|
import '@anthropic-ai/sandbox-runtime';
|
|
63
63
|
import 'node:os';
|
|
64
|
-
import './package-
|
|
64
|
+
import './package-BqwrPxL0.mjs';
|
|
65
|
+
import './rateLimitWindows-Dhfhbtqu.mjs';
|
|
65
66
|
import 'node:util';
|
|
66
67
|
import './detectCLI-CSGMlV51.mjs';
|
|
67
68
|
import 'fs';
|
|
68
|
-
import './localHappyAgentAuth-
|
|
69
|
+
import './localHappyAgentAuth-Ct1aXwqd.mjs';
|
|
69
70
|
import './types-CkqAACXx.mjs';
|
|
70
71
|
import 'url';
|
|
71
|
-
import './client-
|
|
72
|
-
import './context-
|
|
73
|
-
import './sessionOps-
|
|
72
|
+
import './client-CbK33y_s.mjs';
|
|
73
|
+
import './context-DjfqLWzE.mjs';
|
|
74
|
+
import './sessionOps-BnaEaOKs.mjs';
|
|
74
75
|
import './resources-BdFBQi8r.mjs';
|
|
75
|
-
import './tools-
|
|
76
|
-
import './
|
|
77
|
-
import './client-
|
|
78
|
-
import './
|
|
76
|
+
import './tools-3X2z3YDe.mjs';
|
|
77
|
+
import './reportProgressTool-DnAD8wOa.mjs';
|
|
78
|
+
import './client-GjTnsq6F.mjs';
|
|
79
|
+
import './precheckCompat-DeEbilbr.mjs';
|
|
80
|
+
import './agentGuidance-BDYt2Qy2.mjs';
|
|
81
|
+
import './peerTools-CeCe-3lk.mjs';
|
|
79
82
|
import './ids-DU6sLx4C.mjs';
|
|
80
|
-
import './remoteSessionClient-
|
|
83
|
+
import './remoteSessionClient-B2DtWuNP.mjs';
|
|
81
84
|
import '@modelcontextprotocol/sdk/server/mcp.js';
|
|
82
85
|
import 'node:http';
|
|
83
86
|
import '@modelcontextprotocol/sdk/server/streamableHttp.js';
|
|
84
|
-
import './
|
|
87
|
+
import './downloadTarget-DjSwMHun.mjs';
|
|
85
88
|
import './terminals-Dlg0x3nY.mjs';
|
|
86
89
|
import './terminalTitleSuggest-CeKsX_V6.mjs';
|
|
87
90
|
import './tmuxSocket-B8Yx20sT.mjs';
|
|
88
|
-
import './bootstrap-
|
|
89
|
-
import './agentGuidance-CQuNlNx8.mjs';
|
|
91
|
+
import './bootstrap-XE8A7Ut2.mjs';
|
|
90
92
|
import './previewPath-CXN4Vag0.mjs';
|
|
91
|
-
import './spawnHappyCLI-
|
|
93
|
+
import './spawnHappyCLI-BAa49m0q.mjs';
|
|
92
94
|
import './doctorReadiness-C208SMN9.mjs';
|
|
93
95
|
|
|
94
96
|
function getStartedSubagents(state) {
|
|
@@ -650,20 +652,29 @@ async function readChildThread(client, childId) {
|
|
|
650
652
|
return { envelopes: mapCodexThreadToSessionEnvelopes(thread) };
|
|
651
653
|
}
|
|
652
654
|
|
|
655
|
+
const HAPPY_MCP_SERVER_NAME = "happy";
|
|
653
656
|
class CodexPermissionHandler extends BasePermissionHandler {
|
|
654
657
|
// Exact tool names that should always be auto-approved. Include the bare
|
|
655
658
|
// form (used by Codex elicitation messages like `tool "change_title"`)
|
|
656
|
-
// and the MCP-qualified form for defense in depth.
|
|
659
|
+
// and the MCP-qualified form for defense in depth. A BARE name (and an ID
|
|
660
|
+
// prefix) only counts when the request comes from our own server: any
|
|
661
|
+
// other MCP server may expose a tool with the same name.
|
|
662
|
+
// B-556: report_progress only writes this session's own board line (same
|
|
663
|
+
// trust as change_title); an approval prompt per report would park the
|
|
664
|
+
// session in "waiting for you" at every milestone.
|
|
657
665
|
static ALWAYS_AUTO_APPROVE_NAMES = /* @__PURE__ */ new Set([
|
|
658
666
|
"change_title",
|
|
659
|
-
"mcp__happy__change_title"
|
|
667
|
+
"mcp__happy__change_title",
|
|
668
|
+
"report_progress",
|
|
669
|
+
"mcp__happy__report_progress"
|
|
660
670
|
]);
|
|
661
671
|
// Tool-call IDs that should auto-approve when they exactly match one of
|
|
662
672
|
// these values or start with `<name>-` (e.g. `change_title-1765385846663`).
|
|
663
673
|
// Substring matching was a bypass vector — any tool whose ID happened to
|
|
664
674
|
// contain `change_title` as a substring would be silently approved.
|
|
665
675
|
static ALWAYS_AUTO_APPROVE_ID_PREFIXES = [
|
|
666
|
-
"change_title"
|
|
676
|
+
"change_title",
|
|
677
|
+
"report_progress"
|
|
667
678
|
];
|
|
668
679
|
constructor(session) {
|
|
669
680
|
super(session);
|
|
@@ -671,7 +682,11 @@ class CodexPermissionHandler extends BasePermissionHandler {
|
|
|
671
682
|
getLogPrefix() {
|
|
672
683
|
return "[Codex]";
|
|
673
684
|
}
|
|
674
|
-
shouldAutoApprove(toolName, toolCallId) {
|
|
685
|
+
shouldAutoApprove(toolName, toolCallId, serverName) {
|
|
686
|
+
if (toolName.startsWith(`mcp__${HAPPY_MCP_SERVER_NAME}__`)) {
|
|
687
|
+
return CodexPermissionHandler.ALWAYS_AUTO_APPROVE_NAMES.has(toolName);
|
|
688
|
+
}
|
|
689
|
+
if (serverName !== HAPPY_MCP_SERVER_NAME) return false;
|
|
675
690
|
if (CodexPermissionHandler.ALWAYS_AUTO_APPROVE_NAMES.has(toolName)) {
|
|
676
691
|
return true;
|
|
677
692
|
}
|
|
@@ -687,10 +702,11 @@ class CodexPermissionHandler extends BasePermissionHandler {
|
|
|
687
702
|
* @param toolCallId - The unique ID of the tool call
|
|
688
703
|
* @param toolName - The name of the tool being called
|
|
689
704
|
* @param input - The input parameters for the tool
|
|
705
|
+
* @param serverName - MCP server of an elicitation (`mcpServer/elicitation/request`); undefined for exec/patch
|
|
690
706
|
* @returns Promise resolving to permission result
|
|
691
707
|
*/
|
|
692
|
-
async handleToolCall(toolCallId, toolName, input) {
|
|
693
|
-
if (this.shouldAutoApprove(toolName, toolCallId)) {
|
|
708
|
+
async handleToolCall(toolCallId, toolName, input, serverName) {
|
|
709
|
+
if (this.shouldAutoApprove(toolName, toolCallId, serverName)) {
|
|
694
710
|
logger.debug(`${this.getLogPrefix()} Auto-approving tool ${toolName} (${toolCallId})`);
|
|
695
711
|
this.session.updateAgentState((currentState) => ({
|
|
696
712
|
...currentState,
|
|
@@ -1515,7 +1531,7 @@ async function runCodex(opts) {
|
|
|
1515
1531
|
}
|
|
1516
1532
|
let abortController = new AbortController();
|
|
1517
1533
|
let shouldExit = false;
|
|
1518
|
-
async function handleAbort() {
|
|
1534
|
+
async function handleAbort(source) {
|
|
1519
1535
|
if (abortInProgress) {
|
|
1520
1536
|
await abortInProgress;
|
|
1521
1537
|
return;
|
|
@@ -1531,6 +1547,9 @@ async function runCodex(opts) {
|
|
|
1531
1547
|
gracePeriodMs: 3e3,
|
|
1532
1548
|
forceRestartOnTimeout: true
|
|
1533
1549
|
});
|
|
1550
|
+
if (source === "user" && abortResult.hadActiveTurn && abortResult.aborted) {
|
|
1551
|
+
session.sendSessionEvent({ type: "message", message: "Aborted by user" });
|
|
1552
|
+
}
|
|
1534
1553
|
if (abortResult.forcedRestart) {
|
|
1535
1554
|
logger.warn("[Codex] Forced app-server restart after interrupt timeout");
|
|
1536
1555
|
session.sendSessionEvent({
|
|
@@ -1556,7 +1575,7 @@ async function runCodex(opts) {
|
|
|
1556
1575
|
}
|
|
1557
1576
|
const handleKillSession = async () => {
|
|
1558
1577
|
logger.debug("[Codex] Kill session requested - terminating process");
|
|
1559
|
-
await handleAbort();
|
|
1578
|
+
await handleAbort("kill");
|
|
1560
1579
|
logger.debug("[Codex] Abort completed, proceeding with termination");
|
|
1561
1580
|
try {
|
|
1562
1581
|
if (session) {
|
|
@@ -1591,7 +1610,7 @@ async function runCodex(opts) {
|
|
|
1591
1610
|
return { error: error instanceof Error ? error.message : "Child read failed" };
|
|
1592
1611
|
}
|
|
1593
1612
|
});
|
|
1594
|
-
session.rpcHandlerManager.registerHandler("abort", handleAbort);
|
|
1613
|
+
session.rpcHandlerManager.registerHandler("abort", () => handleAbort("user"));
|
|
1595
1614
|
const disposeTermination = registerKillSessionHandler(session.rpcHandlerManager, handleKillSession, session, { processSignals: true });
|
|
1596
1615
|
const messageBuffer = new MessageBuffer();
|
|
1597
1616
|
const hasTTY = process.stdout.isTTY && process.stdin.isTTY;
|
|
@@ -1604,7 +1623,7 @@ async function runCodex(opts) {
|
|
|
1604
1623
|
onExit: async () => {
|
|
1605
1624
|
logger.debug("[codex]: Exiting agent via Ctrl-C");
|
|
1606
1625
|
shouldExit = true;
|
|
1607
|
-
await handleAbort();
|
|
1626
|
+
await handleAbort("exit");
|
|
1608
1627
|
}
|
|
1609
1628
|
}), {
|
|
1610
1629
|
exitOnCtrlC: false,
|
|
@@ -1653,7 +1672,7 @@ async function runCodex(opts) {
|
|
|
1653
1672
|
const toolName = params.type === "exec" ? "CodexBash" : params.type === "patch" ? "CodexPatch" : params.toolName ?? "McpTool";
|
|
1654
1673
|
const input = params.type === "exec" ? { command: params.command, cwd: params.cwd } : params.type === "patch" ? { changes: params.fileChanges } : params.input ?? {};
|
|
1655
1674
|
try {
|
|
1656
|
-
const result = await permissionHandler.handleToolCall(params.callId, toolName, input);
|
|
1675
|
+
const result = await permissionHandler.handleToolCall(params.callId, toolName, input, params.type === "mcp" ? params.serverName : void 0);
|
|
1657
1676
|
logger.debug("[Codex] Permission request resolved");
|
|
1658
1677
|
return result.decision;
|
|
1659
1678
|
} catch (error) {
|
|
@@ -1662,6 +1681,7 @@ async function runCodex(opts) {
|
|
|
1662
1681
|
}
|
|
1663
1682
|
});
|
|
1664
1683
|
const editThrottle = new EditReportThrottle();
|
|
1684
|
+
client.setRateLimitHandler((snapshot) => wrapperRateLimitReporter().observeCodex(snapshot));
|
|
1665
1685
|
client.setEventHandler((msg) => {
|
|
1666
1686
|
if (msg.type === "token_count") {
|
|
1667
1687
|
session.sendAgentUsageSnapshot("codex", msg);
|
|
@@ -1766,7 +1786,7 @@ async function runCodex(opts) {
|
|
|
1766
1786
|
const happyServer = await startHappyServer(session);
|
|
1767
1787
|
const bridgeEntrypoint = join(projectPath(), "bin", "very-happy-mcp.mjs");
|
|
1768
1788
|
const mcpServers = {
|
|
1769
|
-
|
|
1789
|
+
[HAPPY_MCP_SERVER_NAME]: {
|
|
1770
1790
|
command: process.execPath,
|
|
1771
1791
|
args: ["--no-warnings", "--no-deprecation", bridgeEntrypoint, "--url", happyServer.url]
|
|
1772
1792
|
}
|
|
@@ -2,15 +2,15 @@ import { existsSync, readFileSync, mkdirSync, writeFileSync } from 'fs';
|
|
|
2
2
|
import { join } from 'path';
|
|
3
3
|
import { homedir } from 'os';
|
|
4
4
|
import { execSync } from 'child_process';
|
|
5
|
-
import { l as logger } from './logger-
|
|
5
|
+
import { l as logger } from './logger-BpQcwNnt.mjs';
|
|
6
6
|
import { D as DEFAULT_GEMINI_MODEL, G as GEMINI_MODEL_ENV } from './constants-BC4St0xd.mjs';
|
|
7
7
|
import 'chalk';
|
|
8
8
|
import 'node:util';
|
|
9
|
-
import './configuration-
|
|
9
|
+
import './configuration-D2v3puap.mjs';
|
|
10
10
|
import 'node:fs';
|
|
11
11
|
import 'node:os';
|
|
12
12
|
import 'node:path';
|
|
13
|
-
import './package-
|
|
13
|
+
import './package-BqwrPxL0.mjs';
|
|
14
14
|
import 'node:fs/promises';
|
|
15
15
|
import './trimIdent-BAjmv_TG.mjs';
|
|
16
16
|
|
|
@@ -4,15 +4,15 @@ var fs = require('fs');
|
|
|
4
4
|
var path = require('path');
|
|
5
5
|
var os = require('os');
|
|
6
6
|
var child_process = require('child_process');
|
|
7
|
-
var logger = require('./logger-
|
|
7
|
+
var logger = require('./logger-JTcJU-uL.cjs');
|
|
8
8
|
var constants = require('./constants-VJ0N6WuG.cjs');
|
|
9
9
|
require('chalk');
|
|
10
10
|
require('node:util');
|
|
11
|
-
require('./configuration-
|
|
11
|
+
require('./configuration-B0cb3xA3.cjs');
|
|
12
12
|
require('node:fs');
|
|
13
13
|
require('node:os');
|
|
14
14
|
require('node:path');
|
|
15
|
-
require('./package-
|
|
15
|
+
require('./package-C1XvUQFy.cjs');
|
|
16
16
|
require('node:fs/promises');
|
|
17
17
|
require('./trimIdent-4gvk9Wk6.cjs');
|
|
18
18
|
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
var node_fs = require('node:fs');
|
|
4
4
|
var os = require('node:os');
|
|
5
5
|
var path = require('node:path');
|
|
6
|
-
var _package = require('./package-
|
|
6
|
+
var _package = require('./package-C1XvUQFy.cjs');
|
|
7
7
|
var promises = require('node:fs/promises');
|
|
8
8
|
|
|
9
9
|
const PRIVATE_DIRECTORY_MODE = 448;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { mkdirSync, chmodSync, readdirSync, statSync, appendFileSync, writeFileSync, existsSync, readFileSync } from 'node:fs';
|
|
2
2
|
import { homedir } from 'node:os';
|
|
3
3
|
import { join } from 'node:path';
|
|
4
|
-
import { p as packageJson } from './package-
|
|
4
|
+
import { p as packageJson } from './package-BqwrPxL0.mjs';
|
|
5
5
|
import { mkdir, chmod, writeFile } from 'node:fs/promises';
|
|
6
6
|
|
|
7
7
|
const PRIVATE_DIRECTORY_MODE = 448;
|
|
@@ -3,12 +3,12 @@
|
|
|
3
3
|
var chalk = require('chalk');
|
|
4
4
|
var os = require('os');
|
|
5
5
|
var path = require('path');
|
|
6
|
-
var persistence = require('./persistence-
|
|
7
|
-
var api = require('./api-
|
|
8
|
-
var configuration = require('./configuration-
|
|
6
|
+
var persistence = require('./persistence-2Xp_o6x6.cjs');
|
|
7
|
+
var api = require('./api-DnNL5fLw.cjs');
|
|
8
|
+
var configuration = require('./configuration-B0cb3xA3.cjs');
|
|
9
9
|
var http = require('http');
|
|
10
10
|
var crypto = require('crypto');
|
|
11
|
-
var browser = require('./browser-
|
|
11
|
+
var browser = require('./browser-CcG8GLRV.cjs');
|
|
12
12
|
var child_process = require('child_process');
|
|
13
13
|
var util = require('util');
|
|
14
14
|
require('node:fs/promises');
|
|
@@ -17,28 +17,28 @@ require('zod');
|
|
|
17
17
|
require('./authRelay-BdYkC1Po.cjs');
|
|
18
18
|
require('node:crypto');
|
|
19
19
|
require('tweetnacl');
|
|
20
|
-
require('./logger-
|
|
20
|
+
require('./logger-JTcJU-uL.cjs');
|
|
21
21
|
require('node:util');
|
|
22
22
|
require('node:path');
|
|
23
23
|
require('node:os');
|
|
24
|
-
require('./package-
|
|
24
|
+
require('./package-C1XvUQFy.cjs');
|
|
25
25
|
require('axios');
|
|
26
|
-
require('./lidState-
|
|
26
|
+
require('./lidState-D8BmnJV1.cjs');
|
|
27
27
|
require('node:events');
|
|
28
28
|
require('socket.io-client');
|
|
29
|
-
require('./attachmentLimits-
|
|
30
|
-
require('./index-
|
|
29
|
+
require('./attachmentLimits-BfgKV5iE.cjs');
|
|
30
|
+
require('./index-C9hI8a10.cjs');
|
|
31
31
|
require('@paralleldrive/cuid2');
|
|
32
32
|
require('./limits-C-a7gr04.cjs');
|
|
33
|
-
require('./time-
|
|
34
|
-
require('./registerCommonHandlers
|
|
33
|
+
require('./time-T0YmeOhS.cjs');
|
|
34
|
+
require('./registerCommonHandlers-Aha_KfM3.cjs');
|
|
35
35
|
require('fs/promises');
|
|
36
36
|
require('cross-spawn');
|
|
37
37
|
require('./projectPath-ChLhdOyt.cjs');
|
|
38
38
|
require('url');
|
|
39
|
-
require('./sync-
|
|
39
|
+
require('./sync-x_lI_3j_.cjs');
|
|
40
40
|
require('./backgroundTaskActivity-CBvUdj39.cjs');
|
|
41
|
-
require('./controlClient-
|
|
41
|
+
require('./controlClient-CmnHGcyl.cjs');
|
|
42
42
|
require('./contentLogMetadata-ZSFk_NjQ.cjs');
|
|
43
43
|
require('open');
|
|
44
44
|
|