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
|
@@ -4,25 +4,25 @@ var spawn = require('cross-spawn');
|
|
|
4
4
|
var node_readline = require('node:readline');
|
|
5
5
|
var node_fs = require('node:fs');
|
|
6
6
|
var node_crypto = require('node:crypto');
|
|
7
|
-
var logger = require('./logger-
|
|
7
|
+
var logger = require('./logger-JTcJU-uL.cjs');
|
|
8
8
|
var smallFastModel = require('./smallFastModel-D_uxGMo3.cjs');
|
|
9
9
|
var path$1 = require('node:path');
|
|
10
10
|
var path = require('./path-B7zW-WwE.cjs');
|
|
11
|
-
var systemPrompt = require('./systemPrompt-
|
|
11
|
+
var systemPrompt = require('./systemPrompt-4erwILTB.cjs');
|
|
12
12
|
var manager = require('./manager-Cly8xVIR.cjs');
|
|
13
13
|
var contentLogMetadata = require('./contentLogMetadata-ZSFk_NjQ.cjs');
|
|
14
14
|
var claudeCliPath = require('./claudeCliPath-U4HHmV4r.cjs');
|
|
15
15
|
require('chalk');
|
|
16
16
|
require('node:util');
|
|
17
|
-
require('./configuration-
|
|
17
|
+
require('./configuration-B0cb3xA3.cjs');
|
|
18
18
|
require('node:os');
|
|
19
|
-
require('./package-
|
|
19
|
+
require('./package-C1XvUQFy.cjs');
|
|
20
20
|
require('node:fs/promises');
|
|
21
|
-
require('./index-
|
|
21
|
+
require('./index-C9hI8a10.cjs');
|
|
22
22
|
require('zod');
|
|
23
23
|
require('@paralleldrive/cuid2');
|
|
24
24
|
require('./trimIdent-4gvk9Wk6.cjs');
|
|
25
|
-
require('./agentGuidance-
|
|
25
|
+
require('./agentGuidance-BtBx2xxE.cjs');
|
|
26
26
|
require('@anthropic-ai/sandbox-runtime');
|
|
27
27
|
require('./projectPath-ChLhdOyt.cjs');
|
|
28
28
|
require('path');
|
|
@@ -2,25 +2,25 @@ import { spawn } from 'cross-spawn';
|
|
|
2
2
|
import { createInterface } from 'node:readline';
|
|
3
3
|
import { readdirSync, statSync, mkdirSync, existsSync } from 'node:fs';
|
|
4
4
|
import { randomUUID } from 'node:crypto';
|
|
5
|
-
import { l as logger } from './logger-
|
|
5
|
+
import { l as logger } from './logger-BpQcwNnt.mjs';
|
|
6
6
|
import { p as pinSmallFastModel, e as ensureLocalProxyBypass } from './smallFastModel-BLNgMrwR.mjs';
|
|
7
7
|
import { join } from 'node:path';
|
|
8
8
|
import { g as getProjectPath } from './path-D2wdaNSk.mjs';
|
|
9
|
-
import { c as claudeCheckSession, s as systemPrompt } from './systemPrompt-
|
|
9
|
+
import { c as claudeCheckSession, s as systemPrompt } from './systemPrompt-BanyDihy.mjs';
|
|
10
10
|
import { i as initializeSandbox, a as wrapCommand } from './manager-BQ4flvQZ.mjs';
|
|
11
11
|
import { c as contentLogMetadata } from './contentLogMetadata-BlWI0egu.mjs';
|
|
12
12
|
import { claudeCliPath } from './claudeCliPath-BqkaH2oR.mjs';
|
|
13
13
|
import 'chalk';
|
|
14
14
|
import 'node:util';
|
|
15
|
-
import './configuration-
|
|
15
|
+
import './configuration-D2v3puap.mjs';
|
|
16
16
|
import 'node:os';
|
|
17
|
-
import './package-
|
|
17
|
+
import './package-BqwrPxL0.mjs';
|
|
18
18
|
import 'node:fs/promises';
|
|
19
|
-
import './index-
|
|
19
|
+
import './index-B0HEEYGh.mjs';
|
|
20
20
|
import 'zod';
|
|
21
21
|
import '@paralleldrive/cuid2';
|
|
22
22
|
import './trimIdent-BAjmv_TG.mjs';
|
|
23
|
-
import './agentGuidance-
|
|
23
|
+
import './agentGuidance-BDYt2Qy2.mjs';
|
|
24
24
|
import '@anthropic-ai/sandbox-runtime';
|
|
25
25
|
import './projectPath-BTBIMB57.mjs';
|
|
26
26
|
import 'path';
|
|
@@ -1,27 +1,27 @@
|
|
|
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-JTcJU-uL.cjs');
|
|
4
|
+
var claudeLocal = require('./claudeLocal-DXBXwIOG.cjs');
|
|
5
|
+
var sessionScanner = require('./sessionScanner-Cu1yKlj4.cjs');
|
|
6
6
|
require('chalk');
|
|
7
7
|
require('node:util');
|
|
8
|
-
require('./configuration-
|
|
8
|
+
require('./configuration-B0cb3xA3.cjs');
|
|
9
9
|
require('node:fs');
|
|
10
10
|
require('node:os');
|
|
11
11
|
require('node:path');
|
|
12
|
-
require('./package-
|
|
12
|
+
require('./package-C1XvUQFy.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-
|
|
20
|
-
require('./index-
|
|
19
|
+
require('./systemPrompt-4erwILTB.cjs');
|
|
20
|
+
require('./index-C9hI8a10.cjs');
|
|
21
21
|
require('zod');
|
|
22
22
|
require('@paralleldrive/cuid2');
|
|
23
23
|
require('./trimIdent-4gvk9Wk6.cjs');
|
|
24
|
-
require('./agentGuidance-
|
|
24
|
+
require('./agentGuidance-BtBx2xxE.cjs');
|
|
25
25
|
require('./manager-Cly8xVIR.cjs');
|
|
26
26
|
require('@anthropic-ai/sandbox-runtime');
|
|
27
27
|
require('./contentLogMetadata-ZSFk_NjQ.cjs');
|
|
@@ -29,16 +29,19 @@ 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-x_lI_3j_.cjs');
|
|
33
|
+
require('./time-T0YmeOhS.cjs');
|
|
34
34
|
require('./types-CRS-srZK.cjs');
|
|
35
|
-
require('./
|
|
35
|
+
require('./transcriptCursor-DcXGLeSc.cjs');
|
|
36
|
+
require('./startFileWatcher-DQbbypJv.cjs');
|
|
36
37
|
require('fs/promises');
|
|
37
38
|
|
|
38
39
|
async function claudeLocalLauncher(session) {
|
|
39
40
|
const scanner = await sessionScanner.createSessionScanner({
|
|
40
41
|
sessionId: session.sessionId,
|
|
41
42
|
workingDirectory: session.path,
|
|
43
|
+
// B-551: prefer the transcript path Claude reported via its hook.
|
|
44
|
+
transcriptPathHints: session.transcriptPathHints ?? void 0,
|
|
42
45
|
onMessage: (message) => {
|
|
43
46
|
if (message.type !== "summary") {
|
|
44
47
|
session.client.sendClaudeSessionMessage(message);
|
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
import { l as logger } from './logger-
|
|
2
|
-
import { claudeLocal, ExitCodeError } from './claudeLocal-
|
|
3
|
-
import { c as createSessionScanner, F as Future } from './sessionScanner-
|
|
1
|
+
import { l as logger } from './logger-BpQcwNnt.mjs';
|
|
2
|
+
import { claudeLocal, ExitCodeError } from './claudeLocal-DmM5Oyhv.mjs';
|
|
3
|
+
import { c as createSessionScanner, F as Future } from './sessionScanner-CcuOn9uU.mjs';
|
|
4
4
|
import 'chalk';
|
|
5
5
|
import 'node:util';
|
|
6
|
-
import './configuration-
|
|
6
|
+
import './configuration-D2v3puap.mjs';
|
|
7
7
|
import 'node:fs';
|
|
8
8
|
import 'node:os';
|
|
9
9
|
import 'node:path';
|
|
10
|
-
import './package-
|
|
10
|
+
import './package-BqwrPxL0.mjs';
|
|
11
11
|
import 'node:fs/promises';
|
|
12
12
|
import 'cross-spawn';
|
|
13
13
|
import 'node:readline';
|
|
14
14
|
import 'node:crypto';
|
|
15
15
|
import './smallFastModel-BLNgMrwR.mjs';
|
|
16
16
|
import './path-D2wdaNSk.mjs';
|
|
17
|
-
import './systemPrompt-
|
|
18
|
-
import './index-
|
|
17
|
+
import './systemPrompt-BanyDihy.mjs';
|
|
18
|
+
import './index-B0HEEYGh.mjs';
|
|
19
19
|
import 'zod';
|
|
20
20
|
import '@paralleldrive/cuid2';
|
|
21
21
|
import './trimIdent-BAjmv_TG.mjs';
|
|
22
|
-
import './agentGuidance-
|
|
22
|
+
import './agentGuidance-BDYt2Qy2.mjs';
|
|
23
23
|
import './manager-BQ4flvQZ.mjs';
|
|
24
24
|
import '@anthropic-ai/sandbox-runtime';
|
|
25
25
|
import './contentLogMetadata-BlWI0egu.mjs';
|
|
@@ -27,16 +27,19 @@ import './claudeCliPath-BqkaH2oR.mjs';
|
|
|
27
27
|
import './projectPath-BTBIMB57.mjs';
|
|
28
28
|
import 'path';
|
|
29
29
|
import 'url';
|
|
30
|
-
import './sync-
|
|
31
|
-
import './time-
|
|
30
|
+
import './sync-BLpH13Kb.mjs';
|
|
31
|
+
import './time-CfDKj6Bx.mjs';
|
|
32
32
|
import './types-CkqAACXx.mjs';
|
|
33
|
-
import './
|
|
33
|
+
import './transcriptCursor-B7T_gkQ0.mjs';
|
|
34
|
+
import './startFileWatcher-Dfs4whzr.mjs';
|
|
34
35
|
import 'fs/promises';
|
|
35
36
|
|
|
36
37
|
async function claudeLocalLauncher(session) {
|
|
37
38
|
const scanner = await createSessionScanner({
|
|
38
39
|
sessionId: session.sessionId,
|
|
39
40
|
workingDirectory: session.path,
|
|
41
|
+
// B-551: prefer the transcript path Claude reported via its hook.
|
|
42
|
+
transcriptPathHints: session.transcriptPathHints ?? void 0,
|
|
40
43
|
onMessage: (message) => {
|
|
41
44
|
if (message.type !== "summary") {
|
|
42
45
|
session.client.sendClaudeSessionMessage(message);
|
|
@@ -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-BpQcwNnt.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-JTcJU-uL.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-D2v3puap.mjs';
|
|
3
|
+
import { readSettings, readPersistedSessions, readCredentialsForConfiguredRelay } from './persistence-B9LmhAE2.mjs';
|
|
4
|
+
import { r as readTeamScope, t as teamScopePath, w as writeTeamScope } from './context-DjfqLWzE.mjs';
|
|
5
5
|
|
|
6
6
|
async function teamRequest(path, method, token, scoped, body) {
|
|
7
7
|
const response = await fetch(`${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-B0cb3xA3.cjs');
|
|
4
|
+
var persistence = require('./persistence-2Xp_o6x6.cjs');
|
|
5
5
|
|
|
6
6
|
class AutomationsRequestError extends Error {
|
|
7
7
|
constructor(status, code, runStatus) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { c as configuration } from './configuration-
|
|
2
|
-
import { readCredentialsForConfiguredRelay, readSettings } from './persistence-
|
|
1
|
+
import { c as configuration } from './configuration-D2v3puap.mjs';
|
|
2
|
+
import { readCredentialsForConfiguredRelay, readSettings } from './persistence-B9LmhAE2.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-B0cb3xA3.cjs');
|
|
5
|
+
var persistence = require('./persistence-2Xp_o6x6.cjs');
|
|
6
|
+
var context = require('./context-BFUpYT39.cjs');
|
|
7
7
|
|
|
8
8
|
async function teamRequest(path, method, token, scoped, body) {
|
|
9
9
|
const response = await fetch(`${configuration.configuration.serverUrl}${path}`, {
|
|
@@ -1,41 +1,42 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var tools = require('../tools-
|
|
4
|
-
var
|
|
5
|
-
var peerTools = require('../peerTools-
|
|
3
|
+
var tools = require('../tools-IJ0TAcJs.cjs');
|
|
4
|
+
var reportProgressTool = require('../reportProgressTool-B-Rcy0s3.cjs');
|
|
5
|
+
var peerTools = require('../peerTools-DPvbcs8V.cjs');
|
|
6
|
+
var agentGuidance = require('../agentGuidance-BtBx2xxE.cjs');
|
|
6
7
|
var mcp_js = require('@modelcontextprotocol/sdk/server/mcp.js');
|
|
7
8
|
var stdio_js = require('@modelcontextprotocol/sdk/server/stdio.js');
|
|
8
9
|
var index_js = require('@modelcontextprotocol/sdk/client/index.js');
|
|
9
10
|
var streamableHttp_js = require('@modelcontextprotocol/sdk/client/streamableHttp.js');
|
|
10
11
|
var z = require('zod');
|
|
11
12
|
var limits = require('../limits-C-a7gr04.cjs');
|
|
12
|
-
|
|
13
|
-
require('../client-Do7cGPEq.cjs');
|
|
13
|
+
require('../client-JISJx2f-.cjs');
|
|
14
14
|
require('node:crypto');
|
|
15
|
-
require('../configuration-
|
|
15
|
+
require('../configuration-B0cb3xA3.cjs');
|
|
16
16
|
require('node:fs');
|
|
17
17
|
require('node:os');
|
|
18
18
|
require('node:path');
|
|
19
|
-
require('../package-
|
|
19
|
+
require('../package-C1XvUQFy.cjs');
|
|
20
20
|
require('node:fs/promises');
|
|
21
|
-
require('../persistence-
|
|
21
|
+
require('../persistence-2Xp_o6x6.cjs');
|
|
22
22
|
require('../authRelay-BdYkC1Po.cjs');
|
|
23
23
|
require('tweetnacl');
|
|
24
|
-
require('../logger-
|
|
24
|
+
require('../logger-JTcJU-uL.cjs');
|
|
25
25
|
require('chalk');
|
|
26
26
|
require('node:util');
|
|
27
|
-
require('../context-
|
|
28
|
-
require('../index-
|
|
27
|
+
require('../context-BFUpYT39.cjs');
|
|
28
|
+
require('../index-C9hI8a10.cjs');
|
|
29
29
|
require('@paralleldrive/cuid2');
|
|
30
|
-
require('../client-
|
|
30
|
+
require('../client-DJ0kX_8M.cjs');
|
|
31
|
+
require('../precheckCompat-CWOi5c9L.cjs');
|
|
31
32
|
require('../ids-B6ZC0HGt.cjs');
|
|
32
|
-
require('../controlClient-
|
|
33
|
-
require('../sessionOps-
|
|
33
|
+
require('../controlClient-CmnHGcyl.cjs');
|
|
34
|
+
require('../sessionOps-DOyy4gkY.cjs');
|
|
34
35
|
require('axios');
|
|
35
|
-
require('../time-
|
|
36
|
+
require('../time-T0YmeOhS.cjs');
|
|
36
37
|
require('socket.io-client');
|
|
37
38
|
require('../backgroundTaskActivity-CBvUdj39.cjs');
|
|
38
|
-
require('../remoteSessionClient-
|
|
39
|
+
require('../remoteSessionClient-BwI8rpQw.cjs');
|
|
39
40
|
require('../trimIdent-4gvk9Wk6.cjs');
|
|
40
41
|
|
|
41
42
|
function parseArgs(argv) {
|
|
@@ -105,7 +106,10 @@ async function main() {
|
|
|
105
106
|
title: agentGuidance.PREVIEW_TOOL_TITLE,
|
|
106
107
|
inputSchema: {
|
|
107
108
|
path: z.z.string().describe("Absolute path (or ~/\u2026) of the file to show the user"),
|
|
108
|
-
mode: z.z.enum(["file", "diff"]).optional()
|
|
109
|
+
mode: z.z.enum(["file", "diff"]).optional(),
|
|
110
|
+
// B-562: must be declared here too — the SDK strips undeclared arguments
|
|
111
|
+
// before they reach the forwarded callTool.
|
|
112
|
+
download: z.z.boolean().optional().describe(agentGuidance.PREVIEW_DOWNLOAD_PARAM_DESCRIPTION)
|
|
109
113
|
}
|
|
110
114
|
},
|
|
111
115
|
async (args) => {
|
|
@@ -162,8 +166,9 @@ async function main() {
|
|
|
162
166
|
return forwardTeam(`team_${String(type).replaceAll("-", "_")}`, { ...args, requestId });
|
|
163
167
|
}
|
|
164
168
|
});
|
|
165
|
-
|
|
169
|
+
reportProgressTool.registerAutomationTools(server, (name, args) => forwardTeam(name, args));
|
|
166
170
|
peerTools.registerSessionPeerTools(server, (name, args) => forwardTeam(name, args));
|
|
171
|
+
reportProgressTool.registerReportProgressTool(server, async (args) => (await ensureHttpClient()).callTool({ name: agentGuidance.REPORT_PROGRESS_TOOL_NAME, arguments: args }));
|
|
167
172
|
const stdio = new stdio_js.StdioServerTransport();
|
|
168
173
|
await server.connect(stdio);
|
|
169
174
|
}
|
|
@@ -1,39 +1,40 @@
|
|
|
1
|
-
import { r as registerTeamsTools } from '../tools-
|
|
2
|
-
import { r as registerAutomationTools } from '../
|
|
3
|
-
import { r as registerSessionPeerTools } from '../peerTools-
|
|
1
|
+
import { r as registerTeamsTools } from '../tools-3X2z3YDe.mjs';
|
|
2
|
+
import { r as registerAutomationTools, a as registerReportProgressTool } from '../reportProgressTool-DnAD8wOa.mjs';
|
|
3
|
+
import { r as registerSessionPeerTools } from '../peerTools-CeCe-3lk.mjs';
|
|
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';
|
|
4
5
|
import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
5
6
|
import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
|
|
6
7
|
import { Client } from '@modelcontextprotocol/sdk/client/index.js';
|
|
7
8
|
import { StreamableHTTPClientTransport } from '@modelcontextprotocol/sdk/client/streamableHttp.js';
|
|
8
9
|
import { z } from 'zod';
|
|
9
10
|
import { C as CLIPBOARD_TOOL_NAME, a as CLIPBOARD_TOOL_TITLE, b as CLIPBOARD_TOOL_DESCRIPTION } from '../limits-DIo7rEBR.mjs';
|
|
10
|
-
import
|
|
11
|
-
import '../client-BwaWdlCm.mjs';
|
|
11
|
+
import '../client-CbK33y_s.mjs';
|
|
12
12
|
import 'node:crypto';
|
|
13
|
-
import '../configuration-
|
|
13
|
+
import '../configuration-D2v3puap.mjs';
|
|
14
14
|
import 'node:fs';
|
|
15
15
|
import 'node:os';
|
|
16
16
|
import 'node:path';
|
|
17
|
-
import '../package-
|
|
17
|
+
import '../package-BqwrPxL0.mjs';
|
|
18
18
|
import 'node:fs/promises';
|
|
19
|
-
import '../persistence-
|
|
19
|
+
import '../persistence-B9LmhAE2.mjs';
|
|
20
20
|
import '../authRelay-DSAvg1uv.mjs';
|
|
21
21
|
import 'tweetnacl';
|
|
22
|
-
import '../logger-
|
|
22
|
+
import '../logger-BpQcwNnt.mjs';
|
|
23
23
|
import 'chalk';
|
|
24
24
|
import 'node:util';
|
|
25
|
-
import '../context-
|
|
26
|
-
import '../index-
|
|
25
|
+
import '../context-DjfqLWzE.mjs';
|
|
26
|
+
import '../index-B0HEEYGh.mjs';
|
|
27
27
|
import '@paralleldrive/cuid2';
|
|
28
|
-
import '../client-
|
|
28
|
+
import '../client-GjTnsq6F.mjs';
|
|
29
|
+
import '../precheckCompat-DeEbilbr.mjs';
|
|
29
30
|
import '../ids-DU6sLx4C.mjs';
|
|
30
|
-
import '../controlClient-
|
|
31
|
-
import '../sessionOps-
|
|
31
|
+
import '../controlClient-BMUJfUeF.mjs';
|
|
32
|
+
import '../sessionOps-BnaEaOKs.mjs';
|
|
32
33
|
import 'axios';
|
|
33
|
-
import '../time-
|
|
34
|
+
import '../time-CfDKj6Bx.mjs';
|
|
34
35
|
import 'socket.io-client';
|
|
35
36
|
import '../backgroundTaskActivity-8PdPxrvy.mjs';
|
|
36
|
-
import '../remoteSessionClient-
|
|
37
|
+
import '../remoteSessionClient-B2DtWuNP.mjs';
|
|
37
38
|
import '../trimIdent-BAjmv_TG.mjs';
|
|
38
39
|
|
|
39
40
|
function parseArgs(argv) {
|
|
@@ -103,7 +104,10 @@ async function main() {
|
|
|
103
104
|
title: PREVIEW_TOOL_TITLE,
|
|
104
105
|
inputSchema: {
|
|
105
106
|
path: z.string().describe("Absolute path (or ~/\u2026) of the file to show the user"),
|
|
106
|
-
mode: z.enum(["file", "diff"]).optional()
|
|
107
|
+
mode: z.enum(["file", "diff"]).optional(),
|
|
108
|
+
// B-562: must be declared here too — the SDK strips undeclared arguments
|
|
109
|
+
// before they reach the forwarded callTool.
|
|
110
|
+
download: z.boolean().optional().describe(PREVIEW_DOWNLOAD_PARAM_DESCRIPTION)
|
|
107
111
|
}
|
|
108
112
|
},
|
|
109
113
|
async (args) => {
|
|
@@ -162,6 +166,7 @@ async function main() {
|
|
|
162
166
|
});
|
|
163
167
|
registerAutomationTools(server, (name, args) => forwardTeam(name, args));
|
|
164
168
|
registerSessionPeerTools(server, (name, args) => forwardTeam(name, args));
|
|
169
|
+
registerReportProgressTool(server, async (args) => (await ensureHttpClient()).callTool({ name: REPORT_PROGRESS_TOOL_NAME, arguments: args }));
|
|
165
170
|
const stdio = new StdioServerTransport();
|
|
166
171
|
await server.connect(stdio);
|
|
167
172
|
}
|
|
@@ -3,10 +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-JTcJU-uL.cjs');
|
|
7
7
|
var contentLogMetadata = require('./contentLogMetadata-ZSFk_NjQ.cjs');
|
|
8
8
|
var manager = require('./manager-Cly8xVIR.cjs');
|
|
9
|
-
var _package = require('./package-
|
|
9
|
+
var _package = require('./package-C1XvUQFy.cjs');
|
|
10
|
+
var rateLimitWindows = require('./rateLimitWindows-C2Jk3Ih7.cjs');
|
|
10
11
|
|
|
11
12
|
function isAppServerAvailable() {
|
|
12
13
|
try {
|
|
@@ -104,6 +105,11 @@ class CodexAppServerClient {
|
|
|
104
105
|
// Handlers set by the consumer (runCodex.ts)
|
|
105
106
|
eventHandler = null;
|
|
106
107
|
approvalHandler = null;
|
|
108
|
+
// B-555: subscription rate-limit snapshots (sparse notifications + throttled reads).
|
|
109
|
+
rateLimitHandler = null;
|
|
110
|
+
rateLimitReadAt = 0;
|
|
111
|
+
rateLimitReadInFlight = false;
|
|
112
|
+
rateLimitReadUnsupported = false;
|
|
107
113
|
constructor(sandboxConfig) {
|
|
108
114
|
this.sandboxConfig = sandboxConfig;
|
|
109
115
|
}
|
|
@@ -119,6 +125,36 @@ class CodexAppServerClient {
|
|
|
119
125
|
setApprovalHandler(handler) {
|
|
120
126
|
this.approvalHandler = handler;
|
|
121
127
|
}
|
|
128
|
+
/**
|
|
129
|
+
* B-555: receive Codex `RateLimitSnapshot`s — from `account/rateLimits/updated`
|
|
130
|
+
* (sparse: null windows mean "not in this update") and from a throttled
|
|
131
|
+
* `account/rateLimits/read` after connect / each finished turn. Codex does
|
|
132
|
+
* the fetch with its own login; we never touch its credentials.
|
|
133
|
+
*/
|
|
134
|
+
setRateLimitHandler(handler) {
|
|
135
|
+
this.rateLimitHandler = handler;
|
|
136
|
+
this.maybeRefreshRateLimits();
|
|
137
|
+
}
|
|
138
|
+
maybeRefreshRateLimits() {
|
|
139
|
+
if (!this.rateLimitHandler || !this.connected) return;
|
|
140
|
+
if (!rateLimitWindows.shouldReadCodexRateLimits({
|
|
141
|
+
now: Date.now(),
|
|
142
|
+
lastReadAt: this.rateLimitReadAt,
|
|
143
|
+
inFlight: this.rateLimitReadInFlight,
|
|
144
|
+
unsupported: this.rateLimitReadUnsupported
|
|
145
|
+
})) return;
|
|
146
|
+
this.rateLimitReadAt = Date.now();
|
|
147
|
+
this.rateLimitReadInFlight = true;
|
|
148
|
+
this.request("account/rateLimits/read", {}, 15e3).then((result) => {
|
|
149
|
+
const snapshot = result?.rateLimits;
|
|
150
|
+
if (snapshot) this.rateLimitHandler?.(snapshot);
|
|
151
|
+
}).catch((error) => {
|
|
152
|
+
if (rateLimitWindows.isUnsupportedCodexMethodError(error)) this.rateLimitReadUnsupported = true;
|
|
153
|
+
logger.logger.debug("[CodexAppServer] account/rateLimits/read failed:", contentLogMetadata.errorLogMetadata(error));
|
|
154
|
+
}).finally(() => {
|
|
155
|
+
this.rateLimitReadInFlight = false;
|
|
156
|
+
});
|
|
157
|
+
}
|
|
122
158
|
extractTurnId(params) {
|
|
123
159
|
const turnId = params?.turn?.id ?? params?.turnId ?? params?.turn_id ?? null;
|
|
124
160
|
return typeof turnId === "string" && turnId.length > 0 ? turnId : null;
|
|
@@ -144,6 +180,7 @@ class CodexAppServerClient {
|
|
|
144
180
|
const aborted = status === "cancelled" || status === "canceled" || status === "aborted" || status === "interrupted";
|
|
145
181
|
this.tryResolvePendingTurn(aborted, turnId, source);
|
|
146
182
|
this._turnId = null;
|
|
183
|
+
this.maybeRefreshRateLimits();
|
|
147
184
|
if (turnId && this.completedTurnIds.has(turnId)) {
|
|
148
185
|
return;
|
|
149
186
|
}
|
|
@@ -379,6 +416,7 @@ class CodexAppServerClient {
|
|
|
379
416
|
this.notify("initialized");
|
|
380
417
|
this.connected = true;
|
|
381
418
|
logger.logger.debug("[CodexAppServer] Connected and initialized");
|
|
419
|
+
this.maybeRefreshRateLimits();
|
|
382
420
|
}
|
|
383
421
|
async disconnectInternal(opts) {
|
|
384
422
|
if (!this.connected && !this.process) return;
|
|
@@ -1052,6 +1090,7 @@ class CodexAppServerClient {
|
|
|
1052
1090
|
`codex/event/${msg.type}`
|
|
1053
1091
|
);
|
|
1054
1092
|
this._turnId = null;
|
|
1093
|
+
this.maybeRefreshRateLimits();
|
|
1055
1094
|
}
|
|
1056
1095
|
}
|
|
1057
1096
|
return;
|
|
@@ -1079,6 +1118,11 @@ class CodexAppServerClient {
|
|
|
1079
1118
|
}
|
|
1080
1119
|
return;
|
|
1081
1120
|
}
|
|
1121
|
+
if (method === "account/rateLimits/updated") {
|
|
1122
|
+
const snapshot = params?.rateLimits;
|
|
1123
|
+
if (snapshot) this.rateLimitHandler?.(snapshot);
|
|
1124
|
+
return;
|
|
1125
|
+
}
|
|
1082
1126
|
if (method === "mcpServer/startupStatus/updated") {
|
|
1083
1127
|
logger.logger.debug(`[CodexAppServer] mcpServer startup status:`, params);
|
|
1084
1128
|
return;
|
|
@@ -1,10 +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-
|
|
5
|
-
import {
|
|
4
|
+
import { l as logger } from './logger-BpQcwNnt.mjs';
|
|
5
|
+
import { e as errorLogMetadata, c as contentLogMetadata } from './contentLogMetadata-BlWI0egu.mjs';
|
|
6
6
|
import { i as initializeSandbox, w as wrapForMcpTransport } from './manager-BQ4flvQZ.mjs';
|
|
7
|
-
import { p as packageJson } from './package-
|
|
7
|
+
import { p as packageJson } from './package-BqwrPxL0.mjs';
|
|
8
|
+
import { s as shouldReadCodexRateLimits, i as isUnsupportedCodexMethodError } from './rateLimitWindows-Dhfhbtqu.mjs';
|
|
8
9
|
|
|
9
10
|
function isAppServerAvailable() {
|
|
10
11
|
try {
|
|
@@ -102,6 +103,11 @@ class CodexAppServerClient {
|
|
|
102
103
|
// Handlers set by the consumer (runCodex.ts)
|
|
103
104
|
eventHandler = null;
|
|
104
105
|
approvalHandler = null;
|
|
106
|
+
// B-555: subscription rate-limit snapshots (sparse notifications + throttled reads).
|
|
107
|
+
rateLimitHandler = null;
|
|
108
|
+
rateLimitReadAt = 0;
|
|
109
|
+
rateLimitReadInFlight = false;
|
|
110
|
+
rateLimitReadUnsupported = false;
|
|
105
111
|
constructor(sandboxConfig) {
|
|
106
112
|
this.sandboxConfig = sandboxConfig;
|
|
107
113
|
}
|
|
@@ -117,6 +123,36 @@ class CodexAppServerClient {
|
|
|
117
123
|
setApprovalHandler(handler) {
|
|
118
124
|
this.approvalHandler = handler;
|
|
119
125
|
}
|
|
126
|
+
/**
|
|
127
|
+
* B-555: receive Codex `RateLimitSnapshot`s — from `account/rateLimits/updated`
|
|
128
|
+
* (sparse: null windows mean "not in this update") and from a throttled
|
|
129
|
+
* `account/rateLimits/read` after connect / each finished turn. Codex does
|
|
130
|
+
* the fetch with its own login; we never touch its credentials.
|
|
131
|
+
*/
|
|
132
|
+
setRateLimitHandler(handler) {
|
|
133
|
+
this.rateLimitHandler = handler;
|
|
134
|
+
this.maybeRefreshRateLimits();
|
|
135
|
+
}
|
|
136
|
+
maybeRefreshRateLimits() {
|
|
137
|
+
if (!this.rateLimitHandler || !this.connected) return;
|
|
138
|
+
if (!shouldReadCodexRateLimits({
|
|
139
|
+
now: Date.now(),
|
|
140
|
+
lastReadAt: this.rateLimitReadAt,
|
|
141
|
+
inFlight: this.rateLimitReadInFlight,
|
|
142
|
+
unsupported: this.rateLimitReadUnsupported
|
|
143
|
+
})) return;
|
|
144
|
+
this.rateLimitReadAt = Date.now();
|
|
145
|
+
this.rateLimitReadInFlight = true;
|
|
146
|
+
this.request("account/rateLimits/read", {}, 15e3).then((result) => {
|
|
147
|
+
const snapshot = result?.rateLimits;
|
|
148
|
+
if (snapshot) this.rateLimitHandler?.(snapshot);
|
|
149
|
+
}).catch((error) => {
|
|
150
|
+
if (isUnsupportedCodexMethodError(error)) this.rateLimitReadUnsupported = true;
|
|
151
|
+
logger.debug("[CodexAppServer] account/rateLimits/read failed:", errorLogMetadata(error));
|
|
152
|
+
}).finally(() => {
|
|
153
|
+
this.rateLimitReadInFlight = false;
|
|
154
|
+
});
|
|
155
|
+
}
|
|
120
156
|
extractTurnId(params) {
|
|
121
157
|
const turnId = params?.turn?.id ?? params?.turnId ?? params?.turn_id ?? null;
|
|
122
158
|
return typeof turnId === "string" && turnId.length > 0 ? turnId : null;
|
|
@@ -142,6 +178,7 @@ class CodexAppServerClient {
|
|
|
142
178
|
const aborted = status === "cancelled" || status === "canceled" || status === "aborted" || status === "interrupted";
|
|
143
179
|
this.tryResolvePendingTurn(aborted, turnId, source);
|
|
144
180
|
this._turnId = null;
|
|
181
|
+
this.maybeRefreshRateLimits();
|
|
145
182
|
if (turnId && this.completedTurnIds.has(turnId)) {
|
|
146
183
|
return;
|
|
147
184
|
}
|
|
@@ -377,6 +414,7 @@ class CodexAppServerClient {
|
|
|
377
414
|
this.notify("initialized");
|
|
378
415
|
this.connected = true;
|
|
379
416
|
logger.debug("[CodexAppServer] Connected and initialized");
|
|
417
|
+
this.maybeRefreshRateLimits();
|
|
380
418
|
}
|
|
381
419
|
async disconnectInternal(opts) {
|
|
382
420
|
if (!this.connected && !this.process) return;
|
|
@@ -1050,6 +1088,7 @@ class CodexAppServerClient {
|
|
|
1050
1088
|
`codex/event/${msg.type}`
|
|
1051
1089
|
);
|
|
1052
1090
|
this._turnId = null;
|
|
1091
|
+
this.maybeRefreshRateLimits();
|
|
1053
1092
|
}
|
|
1054
1093
|
}
|
|
1055
1094
|
return;
|
|
@@ -1077,6 +1116,11 @@ class CodexAppServerClient {
|
|
|
1077
1116
|
}
|
|
1078
1117
|
return;
|
|
1079
1118
|
}
|
|
1119
|
+
if (method === "account/rateLimits/updated") {
|
|
1120
|
+
const snapshot = params?.rateLimits;
|
|
1121
|
+
if (snapshot) this.rateLimitHandler?.(snapshot);
|
|
1122
|
+
return;
|
|
1123
|
+
}
|
|
1080
1124
|
if (method === "mcpServer/startupStatus/updated") {
|
|
1081
1125
|
logger.debug(`[CodexAppServer] mcpServer startup status:`, params);
|
|
1082
1126
|
return;
|