very-happy-cli 0.2.173 → 0.2.174
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-DG5AHZXF.mjs → AcpBackend-CS8TSaaH.mjs} +3 -3
- package/dist/{AcpBackend-ByLLiXvl.cjs → AcpBackend-MMfGUkmp.cjs} +3 -3
- package/dist/{AcpSessionManager-Zf00QnlL.cjs → AcpSessionManager-C2MqOirs.cjs} +1 -1
- package/dist/{AcpSessionManager-B7FIrsys.mjs → AcpSessionManager-y1Iy1mzc.mjs} +1 -1
- package/dist/{BasePermissionHandler-CgPa--v2.mjs → BasePermissionHandler-BiWdGyL1.mjs} +1 -1
- package/dist/{BasePermissionHandler-kD4FK-7K.cjs → BasePermissionHandler-CJQPjMEa.cjs} +1 -1
- package/dist/{BaseReasoningProcessor-Cnmvd83F.mjs → BaseReasoningProcessor-2sLuoRYw.mjs} +1 -1
- package/dist/{BaseReasoningProcessor-CeMRo-8g.cjs → BaseReasoningProcessor-BY9a3RTU.cjs} +1 -1
- package/dist/{agentHome-DVLed_WJ.cjs → agentHome-BeAq0X3o.cjs} +4 -4
- package/dist/{agentHome-b9H3fCBZ.mjs → agentHome-CK6SbAVu.mjs} +4 -4
- package/dist/{api-BBoamFqd.cjs → api-Cy_Mbe8W.cjs} +10 -10
- package/dist/{api-DDz_YyoH.mjs → api-rOLB1-sV.mjs} +10 -10
- package/dist/{apiMachine-DRxPV0j2.cjs → apiMachine-A9n14NN1.cjs} +14 -14
- package/dist/{apiMachine-DqQ8WeIe.mjs → apiMachine-VBkOChth.mjs} +14 -14
- package/dist/{attachmentContent-DNsACM9b.mjs → attachmentContent-CSGb8uDJ.mjs} +2 -2
- package/dist/{attachmentContent-CmR86NxQ.cjs → attachmentContent-ULnsMsIL.cjs} +2 -2
- package/dist/{attachmentLimits-CxG3T18E.mjs → attachmentLimits-BLbji11b.mjs} +1 -1
- package/dist/{attachmentLimits-BEYEEBm8.cjs → attachmentLimits-D6bT2jU1.cjs} +1 -1
- package/dist/{auth-BF8QvXR1.cjs → auth--YSQ1-dG.cjs} +8 -8
- package/dist/{auth-3UXAs__6.cjs → auth-BD2z4MCH.cjs} +5 -5
- package/dist/{auth-DvB0u-4H.mjs → auth-CiZfkTkd.mjs} +5 -5
- package/dist/{auth-BVqHWH_r.mjs → auth-EnJQu_vf.mjs} +8 -8
- package/dist/{auto-D3PSMTni.cjs → auto-CobMGmFM.cjs} +15 -15
- package/dist/{auto-D0Ai-s17.mjs → auto-D_hKBFAY.mjs} +15 -15
- package/dist/{bootstrap-BsXIVhrG.cjs → bootstrap-BYrt5zUv.cjs} +2 -2
- package/dist/{bootstrap-Cg_t3W-0.mjs → bootstrap-D1RRCJdQ.mjs} +2 -2
- package/dist/{browser-f6xCPkkN.mjs → browser-IVfX6PQT.mjs} +1 -1
- package/dist/{browser-Cbyo0qny.cjs → browser-i45hmvWw.cjs} +1 -1
- package/dist/{claudeLocal-AByQMi4D.cjs → claudeLocal-Cg8Qn4tF.cjs} +5 -5
- package/dist/{claudeLocal-DqJUowRE.mjs → claudeLocal-DnPoeXP2.mjs} +5 -5
- package/dist/{claudeLocalLauncher-BFxrneBS.mjs → claudeLocalLauncher-BAavVhU8.mjs} +10 -10
- package/dist/{claudeLocalLauncher-CSnWv8cG.cjs → claudeLocalLauncher-CFlsscqX.cjs} +10 -10
- package/dist/{claudeSessionFork-DEuvbqD3.cjs → claudeSessionFork-DmwPXMmz.cjs} +1 -1
- package/dist/{claudeSessionFork-DsmA1Jv6.mjs → claudeSessionFork-bp8LeRZ9.mjs} +1 -1
- package/dist/{client-W3gPBBN2.cjs → client-B6H6ZROd.cjs} +2 -2
- package/dist/{client-CzNWPOBI.mjs → client-Bi1DOVy9.mjs} +2 -2
- package/dist/{client-mnqGeUey.mjs → client-DbqP92Fy.mjs} +3 -3
- package/dist/{client-CuadUoga.cjs → client-QtWC3yii.cjs} +3 -3
- package/dist/codex/happyMcpStdioBridge.cjs +15 -15
- package/dist/codex/happyMcpStdioBridge.mjs +15 -15
- package/dist/{codexAppServerClient-BgNcgkVT.cjs → codexAppServerClient-BWB1267F.cjs} +71 -21
- package/dist/{codexAppServerClient-BCAPEmbn.mjs → codexAppServerClient-pnCpJlD8.mjs} +71 -21
- package/dist/{codexCommand-3ZsmFNCE.mjs → codexCommand-BmtdCu-D.mjs} +81 -44
- package/dist/{codexCommand-B-xQ7uoD.cjs → codexCommand-u4m_X8VA.cjs} +81 -44
- package/dist/{config-CJTzYT71.cjs → config-BaJCpLzN.cjs} +3 -3
- package/dist/{config-q8FBDbqS.mjs → config-Czc1tQDn.mjs} +3 -3
- package/dist/{configuration-C_-2io9T.cjs → configuration-Btwt68O2.cjs} +1 -1
- package/dist/{configuration-2Eck1oZf.mjs → configuration-zOfO2qdB.mjs} +1 -1
- package/dist/{connect-CJc2q7Zb.mjs → connect-D21OhdsD.mjs} +13 -13
- package/dist/{connect-ch6-M_fR.cjs → connect-DQaDa6i7.cjs} +13 -13
- package/dist/{context-C1tA72Pn.mjs → context-BTX3YYdt.mjs} +1 -1
- package/dist/{context--xjJuO00.cjs → context-BknomZTq.cjs} +1 -1
- package/dist/{controlClient-DCH7YKU2.cjs → controlClient-CEpaptre.cjs} +3 -3
- package/dist/{controlClient-Dn0x8DWU.mjs → controlClient-CbmWgWJW.mjs} +3 -3
- package/dist/{createSessionMetadata-IMDmdFLj.mjs → createSessionMetadata-CM7ErnPh.mjs} +2 -2
- package/dist/{createSessionMetadata-BeY_Ct51.cjs → createSessionMetadata-Cgfcg0WZ.cjs} +2 -2
- package/dist/{defaultPermissionMode-C7be9Tg9.mjs → defaultPermissionMode-CmgCDVpL.mjs} +2 -2
- package/dist/{defaultPermissionMode-CP-RNe7S.cjs → defaultPermissionMode-DqdkzYUY.cjs} +2 -2
- package/dist/{deterministicJson-3OOoCWI0.cjs → deterministicJson-B3V5Ss2l.cjs} +9 -9
- package/dist/{deterministicJson-Cun6TLIF.mjs → deterministicJson-DVvfcibH.mjs} +9 -9
- package/dist/{doctor-DE9dpmhV.cjs → doctor-C_Xfs8Bs.cjs} +7 -7
- package/dist/{doctor-B3krtkx6.mjs → doctor-CidhGBde.mjs} +7 -7
- package/dist/{downloadTarget-BBAA6-Wy.mjs → downloadTarget-C-18yOBz.mjs} +6 -6
- package/dist/{downloadTarget-nKU9KvK-.cjs → downloadTarget-DJKG6wVj.cjs} +6 -6
- package/dist/{ensureDaemonRunning-bshCT05q.mjs → ensureDaemonRunning-CWo9yDAC.mjs} +5 -5
- package/dist/{ensureDaemonRunning-D3F9Wn4o.cjs → ensureDaemonRunning-Dk1yo6aK.cjs} +5 -5
- package/dist/{handleResumeCommand-DqQ2rB_w.mjs → handleResumeCommand-ApqydtLf.mjs} +5 -5
- package/dist/{handleResumeCommand-DSYAc7pz.cjs → handleResumeCommand-DvFAI68O.cjs} +5 -5
- package/dist/{index-CLTdBqtl.mjs → index-BVC5vBcc.mjs} +37 -37
- package/dist/{index-C9hI8a10.cjs → index-BZdhwBKa.cjs} +3 -1
- package/dist/{index-DtDYoGpm.mjs → index-CMeZ7WcS.mjs} +4 -4
- package/dist/{index-DzqTd9GX.cjs → index-CXCoTvVd.cjs} +36 -36
- package/dist/{index-I6GVU3_G.cjs → index-CjFzrcin.cjs} +3 -3
- package/dist/{index-C7IYgnoC.mjs → index-D0IWz-WE.mjs} +3 -3
- package/dist/{index-BzM5uj8R.cjs → index-azi2eHdp.cjs} +4 -4
- package/dist/{index-B0HEEYGh.mjs → index-boE-d8CM.mjs} +3 -1
- package/dist/index.cjs +2 -2
- package/dist/index.mjs +2 -2
- package/dist/{install-BFd6bwk2.mjs → install-BOPmEeSo.mjs} +3 -3
- package/dist/{install-D8XM9y0N.cjs → install-DayuanHz.cjs} +3 -3
- package/dist/lib.cjs +12 -12
- package/dist/lib.mjs +12 -12
- package/dist/{lidState-hKB4aKcf.cjs → lidState-7uLoa43a.cjs} +1 -1
- package/dist/{lidState-B1KB4bLv.mjs → lidState-Bv862v_R.mjs} +1 -1
- package/dist/{localHappyAgentAuth-B94JIex_.mjs → localHappyAgentAuth-CLP3CBMK.mjs} +1 -1
- package/dist/{localHappyAgentAuth-B_ItamJZ.cjs → localHappyAgentAuth-CfILduPd.cjs} +1 -1
- package/dist/{logger-CKCRe63e.mjs → logger-CUxbqfrp.mjs} +2 -2
- package/dist/{logger-DYejzaY9.cjs → logger-XjIS0lU7.cjs} +2 -2
- package/dist/{machineMetadata-C7Slozib.cjs → machineMetadata-DTxYqMdE.cjs} +3 -3
- package/dist/{machineMetadata-CiemL6uU.mjs → machineMetadata-QfdvKIrL.mjs} +3 -3
- package/dist/{main-CJCss2TE.cjs → main-BpC52KlL.cjs} +44 -44
- package/dist/{main-BQBSqrW3.mjs → main-DcfU9Axf.mjs} +44 -44
- package/dist/{mcp-BRtLFMHZ.mjs → mcp-BhUNcpoX.mjs} +14 -14
- package/dist/{mcp-cq0hhROT.cjs → mcp-EEwHzYYU.cjs} +14 -14
- package/dist/{mirrorProtocol-hPlbcL2P.mjs → mirrorProtocol-BoBu65cj.mjs} +3 -3
- package/dist/{mirrorProtocol-pDuMxeQj.cjs → mirrorProtocol-WfE5yd3v.cjs} +3 -3
- package/dist/{package-DwxuhtoO.cjs → package-DFQUF2in.cjs} +7 -7
- package/dist/{package-JFU2Ry9r.mjs → package-DkI3yDe0.mjs} +7 -7
- package/dist/{peerTools-DiBZOaPT.cjs → peerTools-DbI6tEk1.cjs} +4 -4
- package/dist/{peerTools-D-yf7SlL.mjs → peerTools-zfe59JAw.mjs} +4 -4
- package/dist/{persistence-Bi1BTtHq.cjs → persistence-BO7AS2NK.cjs} +2 -2
- package/dist/{persistence-CG158J29.mjs → persistence-CBToZ0R6.mjs} +2 -2
- package/dist/{piRunnerArgs-C-8jIqUE.mjs → piRunnerArgs-C2us7__q.mjs} +1 -1
- package/dist/{piRunnerArgs-DkCs_Ma1.cjs → piRunnerArgs-CICVlVem.cjs} +1 -1
- package/dist/{piRuntime-C4Ei1y-P.mjs → piRuntime-BYHZYbw6.mjs} +1 -1
- package/dist/{piRuntime-CHsld2lz.cjs → piRuntime-CTezrTNw.cjs} +1 -1
- package/dist/{piTerminal-D4Hy_mmZ.cjs → piTerminal-CeiWEB-T.cjs} +16 -16
- package/dist/{piTerminal-yp98lIpx.mjs → piTerminal-YCRkoVWF.mjs} +16 -16
- package/dist/{rateLimitWindows-Blhk1RyR.cjs → rateLimitWindows-U7NsRvIa.cjs} +1 -1
- package/dist/{rateLimitWindows-C36y0Ldw.mjs → rateLimitWindows-i2-530Zt.mjs} +1 -1
- package/dist/{registerCommonHandlers-ni8jeOJc.mjs → registerCommonHandlers-C_KbP5Mq.mjs} +2 -2
- package/dist/{registerCommonHandlers-Ct5XkkNU.cjs → registerCommonHandlers-DTeuk3Hw.cjs} +2 -2
- package/dist/{registerKillSessionHandler-B0LoAR3_.mjs → registerKillSessionHandler-B7zpuzvS.mjs} +6 -6
- package/dist/{registerKillSessionHandler-DoR8z8b6.cjs → registerKillSessionHandler-B_FqygY4.cjs} +6 -6
- package/dist/{remoteSessionClient-B5vn4Ghn.mjs → remoteSessionClient-Bk1Qzb5I.mjs} +5 -5
- package/dist/{remoteSessionClient-B7YBUGMI.cjs → remoteSessionClient-D79ci1L8.cjs} +5 -5
- package/dist/{reportProgressTool-25DIibtH.mjs → reportProgressTool-DujvMncK.mjs} +2 -2
- package/dist/{reportProgressTool-BVTrYVsY.cjs → reportProgressTool-oJMMqzKb.cjs} +2 -2
- package/dist/{run-Buxf1ATU.cjs → run-CyiUjBZK.cjs} +34 -34
- package/dist/{run-D4qgzSft.mjs → run-DVE2Gq-E.mjs} +33 -33
- package/dist/{runClaude-CRkWhQ5T.mjs → runClaude-BcpBew2h.mjs} +21 -21
- package/dist/{runClaude-D4B0SSd5.cjs → runClaude-CmAHAR3N.cjs} +21 -21
- package/dist/{runClaudeDeps-CbyQIbNw.mjs → runClaudeDeps-C2fTmXoo.mjs} +40 -40
- package/dist/{runClaudeDeps-BKYHcQkO.cjs → runClaudeDeps-Z_RVvcuG.cjs} +35 -35
- package/dist/{runGemini-Dn6yFpnO.mjs → runGemini-BYmVfC3b.mjs} +32 -32
- package/dist/{runGemini-OgmDK1Lq.cjs → runGemini-Bv4nVBfj.cjs} +32 -32
- package/dist/{runOpenClaw-DFD--ZW9.cjs → runOpenClaw-D5suaSgY.cjs} +18 -18
- package/dist/{runOpenClaw-CDU1UOZ1.mjs → runOpenClaw-msp2nzW8.mjs} +18 -18
- package/dist/{sandbox-DojsNXsy.mjs → sandbox-CH7xLX1-.mjs} +4 -4
- package/dist/{sandbox-ryBV4t4z.cjs → sandbox-CSnsdXId.cjs} +4 -4
- package/dist/{selfCheck-B69om90v.cjs → selfCheck-B4mCW5Em.cjs} +34 -34
- package/dist/selfCheck-WbfDqlfQ.mjs +84 -0
- package/dist/{send-Bi7MDDHN.cjs → send-DzRwXl8a.cjs} +8 -8
- package/dist/{send-DyRupwU5.mjs → send-lrV7t7dr.mjs} +8 -8
- package/dist/{server-DpJPHOAb.cjs → server-BAwRC79P.cjs} +6 -6
- package/dist/{server-B4SxszzQ.mjs → server-DBHPW2gs.mjs} +4 -4
- package/dist/{sessionLock-DdoHaNAf.cjs → sessionLock-ClIuWFru.cjs} +3 -3
- package/dist/{sessionLock-ZtySCwjt.mjs → sessionLock-D_-T15Y-.mjs} +3 -3
- package/dist/{sessionModeFile-Bkzcsv_J.cjs → sessionModeFile-BFejyKn5.cjs} +1 -1
- package/dist/{sessionModeFile-B-z4OPU6.mjs → sessionModeFile-BP1s4On2.mjs} +1 -1
- package/dist/{sessionOps-BUzvciA5.cjs → sessionOps-C7wI8Ll6.cjs} +4 -4
- package/dist/{sessionOps-BtqGzSz1.mjs → sessionOps-DfAtoDD5.mjs} +4 -4
- package/dist/{sessionScanner-60sqJeks.mjs → sessionScanner-1-ANJdrm.mjs} +3 -3
- package/dist/{sessionScanner-DOdHh5CA.cjs → sessionScanner-BJFPUwar.cjs} +3 -3
- package/dist/{sessions-OCFh0naE.cjs → sessions-Bi13Rn0K.cjs} +9 -9
- package/dist/{sessions-AM5DxBgS.mjs → sessions-Dp_X8vP2.mjs} +9 -9
- package/dist/{setupOfflineReconnection-BcHl9VGI.cjs → setupOfflineReconnection-BJCXuFad.cjs} +2 -2
- package/dist/{setupOfflineReconnection-VK1e2LME.mjs → setupOfflineReconnection-D51KXWAP.mjs} +2 -2
- package/dist/{spawn-CjtSsVs5.cjs → spawn-BiYYv0J7.cjs} +13 -13
- package/dist/{spawn-CG1ckxEZ.mjs → spawn-DeXPOMMC.mjs} +13 -13
- package/dist/{spawnAgents-HDaE3C0-.mjs → spawnAgents-BhsbJ253.mjs} +1 -1
- package/dist/{spawnAgents-vglexX9N.cjs → spawnAgents-CgMKuOhZ.cjs} +1 -1
- package/dist/{spawnHappyCLI-XVh-9eez.mjs → spawnHappyCLI-CYS23qZY.mjs} +1 -1
- package/dist/{spawnHappyCLI-A9QYQdFL.cjs → spawnHappyCLI-CrKdy_rv.cjs} +1 -1
- package/dist/{specialCommands-VaHfF5iC.mjs → specialCommands-BbNlcS3G.mjs} +3 -3
- package/dist/{specialCommands-BK2gc9vz.cjs → specialCommands-Dkg5wrXd.cjs} +3 -3
- package/dist/{startFileWatcher-CwkqU0fA.cjs → startFileWatcher-BJ4vTfRp.cjs} +1 -1
- package/dist/{startFileWatcher-Dls9MDuo.mjs → startFileWatcher-CgH0PknF.mjs} +1 -1
- package/dist/{streamRelay-Iogsh51a.mjs → streamRelay-C8zI7OnR.mjs} +1 -1
- package/dist/{streamRelay-Ce9sgcOV.cjs → streamRelay-DqPFsCgx.cjs} +1 -1
- package/dist/{sync-BN5jPiq4.cjs → sync-CGVTRg-R.cjs} +1 -1
- package/dist/{sync-CU7N-dAQ.mjs → sync-MTpgBfV2.mjs} +1 -1
- package/dist/{systemPrompt-W9opO926.mjs → systemPrompt-BMGFnaRU.mjs} +2 -2
- package/dist/{systemPrompt-bo6KFoMZ.cjs → systemPrompt-DRCJdhNo.cjs} +2 -2
- package/dist/{teams--pI0Ri5A.cjs → teams-0d4XG2_h.cjs} +6 -6
- package/dist/{teams-hotQxTHy.mjs → teams-H_F3UZkh.mjs} +6 -6
- package/dist/{time-jR_TKQyj.mjs → time-7iVn8KLQ.mjs} +1 -1
- package/dist/{time-BDZ6VD5o.cjs → time-ChuhR6SU.cjs} +1 -1
- package/dist/{titleGenerator-Dp0eIi1b.mjs → titleGenerator-CLdAiwN1.mjs} +1 -1
- package/dist/{titleGenerator-CQ6ZqGb2.cjs → titleGenerator-CozWnU-t.cjs} +2 -2
- package/dist/{todo-CwW7byJY.mjs → todo-7mtNKrxn.mjs} +6 -6
- package/dist/{todo-DVCyX6N9.cjs → todo-BeIYBXws.cjs} +6 -6
- package/dist/{tools-C5HNddiJ.cjs → tools-9hPR5-u8.cjs} +1 -1
- package/dist/{tools-BzD8JYIx.mjs → tools-BSlqfWAq.mjs} +1 -1
- package/dist/{uninstall-G9lEyEVW.cjs → uninstall-Bf5MardO.cjs} +3 -3
- package/dist/{uninstall-HRcEekvo.mjs → uninstall-Uei9RnVT.mjs} +3 -3
- package/package.json +7 -7
- package/dist/selfCheck-jA7PDBkO.mjs +0 -84
|
@@ -4,21 +4,21 @@ 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-XjIS0lU7.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-DRCJdhNo.cjs');
|
|
12
12
|
var manager = require('./manager-HrEj442o.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-Btwt68O2.cjs');
|
|
18
18
|
require('node:os');
|
|
19
|
-
require('./package-
|
|
19
|
+
require('./package-DFQUF2in.cjs');
|
|
20
20
|
require('node:fs/promises');
|
|
21
|
-
require('./index-
|
|
21
|
+
require('./index-BZdhwBKa.cjs');
|
|
22
22
|
require('zod');
|
|
23
23
|
require('@paralleldrive/cuid2');
|
|
24
24
|
require('./trimIdent-4gvk9Wk6.cjs');
|
|
@@ -2,21 +2,21 @@ 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-CUxbqfrp.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-BMGFnaRU.mjs';
|
|
10
10
|
import { i as initializeSandbox, a as wrapCommand } from './manager-BEsI4qt3.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-zOfO2qdB.mjs';
|
|
16
16
|
import 'node:os';
|
|
17
|
-
import './package-
|
|
17
|
+
import './package-DkI3yDe0.mjs';
|
|
18
18
|
import 'node:fs/promises';
|
|
19
|
-
import './index-
|
|
19
|
+
import './index-boE-d8CM.mjs';
|
|
20
20
|
import 'zod';
|
|
21
21
|
import '@paralleldrive/cuid2';
|
|
22
22
|
import './trimIdent-BAjmv_TG.mjs';
|
|
@@ -1,21 +1,21 @@
|
|
|
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-CUxbqfrp.mjs';
|
|
2
|
+
import { claudeLocal, ExitCodeError } from './claudeLocal-DnPoeXP2.mjs';
|
|
3
|
+
import { c as createSessionScanner, F as Future } from './sessionScanner-1-ANJdrm.mjs';
|
|
4
4
|
import 'chalk';
|
|
5
5
|
import 'node:util';
|
|
6
|
-
import './configuration-
|
|
6
|
+
import './configuration-zOfO2qdB.mjs';
|
|
7
7
|
import 'node:fs';
|
|
8
8
|
import 'node:os';
|
|
9
9
|
import 'node:path';
|
|
10
|
-
import './package-
|
|
10
|
+
import './package-DkI3yDe0.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-BMGFnaRU.mjs';
|
|
18
|
+
import './index-boE-d8CM.mjs';
|
|
19
19
|
import 'zod';
|
|
20
20
|
import '@paralleldrive/cuid2';
|
|
21
21
|
import './trimIdent-BAjmv_TG.mjs';
|
|
@@ -27,11 +27,11 @@ 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-MTpgBfV2.mjs';
|
|
31
|
+
import './time-7iVn8KLQ.mjs';
|
|
32
32
|
import './types-CkqAACXx.mjs';
|
|
33
33
|
import './transcriptCursor-B7T_gkQ0.mjs';
|
|
34
|
-
import './startFileWatcher-
|
|
34
|
+
import './startFileWatcher-CgH0PknF.mjs';
|
|
35
35
|
import 'fs/promises';
|
|
36
36
|
|
|
37
37
|
async function claudeLocalLauncher(session) {
|
|
@@ -1,23 +1,23 @@
|
|
|
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-XjIS0lU7.cjs');
|
|
4
|
+
var claudeLocal = require('./claudeLocal-Cg8Qn4tF.cjs');
|
|
5
|
+
var sessionScanner = require('./sessionScanner-BJFPUwar.cjs');
|
|
6
6
|
require('chalk');
|
|
7
7
|
require('node:util');
|
|
8
|
-
require('./configuration-
|
|
8
|
+
require('./configuration-Btwt68O2.cjs');
|
|
9
9
|
require('node:fs');
|
|
10
10
|
require('node:os');
|
|
11
11
|
require('node:path');
|
|
12
|
-
require('./package-
|
|
12
|
+
require('./package-DFQUF2in.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-DRCJdhNo.cjs');
|
|
20
|
+
require('./index-BZdhwBKa.cjs');
|
|
21
21
|
require('zod');
|
|
22
22
|
require('@paralleldrive/cuid2');
|
|
23
23
|
require('./trimIdent-4gvk9Wk6.cjs');
|
|
@@ -29,11 +29,11 @@ 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-CGVTRg-R.cjs');
|
|
33
|
+
require('./time-ChuhR6SU.cjs');
|
|
34
34
|
require('./types-CRS-srZK.cjs');
|
|
35
35
|
require('./transcriptCursor-DcXGLeSc.cjs');
|
|
36
|
-
require('./startFileWatcher-
|
|
36
|
+
require('./startFileWatcher-BJ4vTfRp.cjs');
|
|
37
37
|
require('fs/promises');
|
|
38
38
|
|
|
39
39
|
async function claudeLocalLauncher(session) {
|
|
@@ -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-XjIS0lU7.cjs');
|
|
9
9
|
|
|
10
10
|
class ForkTruncateUuidNotFoundError extends Error {
|
|
11
11
|
constructor(cutAfterUuid, sourcePath) {
|
|
@@ -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-CUxbqfrp.mjs';
|
|
7
7
|
|
|
8
8
|
class ForkTruncateUuidNotFoundError extends Error {
|
|
9
9
|
constructor(cutAfterUuid, sourcePath) {
|
|
@@ -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-Btwt68O2.cjs');
|
|
4
|
+
var persistence = require('./persistence-BO7AS2NK.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 { c as readCredentialsForConfiguredRelay, r as readSettings } from './persistence-
|
|
1
|
+
import { c as configuration } from './configuration-zOfO2qdB.mjs';
|
|
2
|
+
import { c as readCredentialsForConfiguredRelay, r as readSettings } from './persistence-CBToZ0R6.mjs';
|
|
3
3
|
|
|
4
4
|
class AutomationsRequestError extends Error {
|
|
5
5
|
constructor(status, code, runStatus) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { randomUUID } from 'node:crypto';
|
|
2
|
-
import { c as configuration } from './configuration-
|
|
3
|
-
import { r as readSettings, b as readPersistedSessions, c as readCredentialsForConfiguredRelay } from './persistence-
|
|
4
|
-
import { r as readTeamScope, t as teamScopePath, w as writeTeamScope } from './context-
|
|
2
|
+
import { c as configuration } from './configuration-zOfO2qdB.mjs';
|
|
3
|
+
import { r as readSettings, b as readPersistedSessions, c as readCredentialsForConfiguredRelay } from './persistence-CBToZ0R6.mjs';
|
|
4
|
+
import { r as readTeamScope, t as teamScopePath, w as writeTeamScope } from './context-BTX3YYdt.mjs';
|
|
5
5
|
|
|
6
6
|
async function teamRequest(path, method, token, scoped, body) {
|
|
7
7
|
const response = await fetch(`${configuration.serverUrl}${path}`, {
|
|
@@ -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-Btwt68O2.cjs');
|
|
5
|
+
var persistence = require('./persistence-BO7AS2NK.cjs');
|
|
6
|
+
var context = require('./context-BknomZTq.cjs');
|
|
7
7
|
|
|
8
8
|
async function teamRequest(path, method, token, scoped, body) {
|
|
9
9
|
const response = await fetch(`${configuration.configuration.serverUrl}${path}`, {
|
|
@@ -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-9hPR5-u8.cjs');
|
|
4
|
+
var reportProgressTool = require('../reportProgressTool-oJMMqzKb.cjs');
|
|
5
|
+
var peerTools = require('../peerTools-DbI6tEk1.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-QtWC3yii.cjs');
|
|
14
14
|
require('node:crypto');
|
|
15
|
-
require('../configuration-
|
|
15
|
+
require('../configuration-Btwt68O2.cjs');
|
|
16
16
|
require('node:fs');
|
|
17
17
|
require('node:os');
|
|
18
18
|
require('node:path');
|
|
19
|
-
require('../package-
|
|
19
|
+
require('../package-DFQUF2in.cjs');
|
|
20
20
|
require('node:fs/promises');
|
|
21
|
-
require('../persistence-
|
|
21
|
+
require('../persistence-BO7AS2NK.cjs');
|
|
22
22
|
require('../authRelay-BdYkC1Po.cjs');
|
|
23
23
|
require('tweetnacl');
|
|
24
|
-
require('../logger-
|
|
24
|
+
require('../logger-XjIS0lU7.cjs');
|
|
25
25
|
require('chalk');
|
|
26
26
|
require('node:util');
|
|
27
|
-
require('../context
|
|
28
|
-
require('../index-
|
|
27
|
+
require('../context-BknomZTq.cjs');
|
|
28
|
+
require('../index-BZdhwBKa.cjs');
|
|
29
29
|
require('@paralleldrive/cuid2');
|
|
30
|
-
require('../client-
|
|
30
|
+
require('../client-B6H6ZROd.cjs');
|
|
31
31
|
require('../precheckCompat-CWOi5c9L.cjs');
|
|
32
32
|
require('../ids-B6ZC0HGt.cjs');
|
|
33
|
-
require('../controlClient-
|
|
34
|
-
require('../sessionOps-
|
|
33
|
+
require('../controlClient-CEpaptre.cjs');
|
|
34
|
+
require('../sessionOps-C7wI8Ll6.cjs');
|
|
35
35
|
require('axios');
|
|
36
|
-
require('../time-
|
|
36
|
+
require('../time-ChuhR6SU.cjs');
|
|
37
37
|
require('socket.io-client');
|
|
38
38
|
require('../backgroundTaskActivity-CBvUdj39.cjs');
|
|
39
|
-
require('../remoteSessionClient-
|
|
39
|
+
require('../remoteSessionClient-D79ci1L8.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-BSlqfWAq.mjs';
|
|
2
|
+
import { r as registerAutomationTools, a as registerReportProgressTool } from '../reportProgressTool-DujvMncK.mjs';
|
|
3
|
+
import { r as registerSessionPeerTools } from '../peerTools-zfe59JAw.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-DbqP92Fy.mjs';
|
|
12
12
|
import 'node:crypto';
|
|
13
|
-
import '../configuration-
|
|
13
|
+
import '../configuration-zOfO2qdB.mjs';
|
|
14
14
|
import 'node:fs';
|
|
15
15
|
import 'node:os';
|
|
16
16
|
import 'node:path';
|
|
17
|
-
import '../package-
|
|
17
|
+
import '../package-DkI3yDe0.mjs';
|
|
18
18
|
import 'node:fs/promises';
|
|
19
|
-
import '../persistence-
|
|
19
|
+
import '../persistence-CBToZ0R6.mjs';
|
|
20
20
|
import '../authRelay-DSAvg1uv.mjs';
|
|
21
21
|
import 'tweetnacl';
|
|
22
|
-
import '../logger-
|
|
22
|
+
import '../logger-CUxbqfrp.mjs';
|
|
23
23
|
import 'chalk';
|
|
24
24
|
import 'node:util';
|
|
25
|
-
import '../context-
|
|
26
|
-
import '../index-
|
|
25
|
+
import '../context-BTX3YYdt.mjs';
|
|
26
|
+
import '../index-boE-d8CM.mjs';
|
|
27
27
|
import '@paralleldrive/cuid2';
|
|
28
|
-
import '../client-
|
|
28
|
+
import '../client-Bi1DOVy9.mjs';
|
|
29
29
|
import '../precheckCompat-DeEbilbr.mjs';
|
|
30
30
|
import '../ids-DU6sLx4C.mjs';
|
|
31
|
-
import '../controlClient-
|
|
32
|
-
import '../sessionOps-
|
|
31
|
+
import '../controlClient-CbmWgWJW.mjs';
|
|
32
|
+
import '../sessionOps-DfAtoDD5.mjs';
|
|
33
33
|
import 'axios';
|
|
34
|
-
import '../time-
|
|
34
|
+
import '../time-7iVn8KLQ.mjs';
|
|
35
35
|
import 'socket.io-client';
|
|
36
36
|
import '../backgroundTaskActivity-8PdPxrvy.mjs';
|
|
37
|
-
import '../remoteSessionClient-
|
|
37
|
+
import '../remoteSessionClient-Bk1Qzb5I.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-XjIS0lU7.cjs');
|
|
7
7
|
var contentLogMetadata = require('./contentLogMetadata-ZSFk_NjQ.cjs');
|
|
8
8
|
var manager = require('./manager-HrEj442o.cjs');
|
|
9
|
-
var _package = require('./package-
|
|
10
|
-
var rateLimitWindows = require('./rateLimitWindows-
|
|
9
|
+
var _package = require('./package-DFQUF2in.cjs');
|
|
10
|
+
var rateLimitWindows = require('./rateLimitWindows-U7NsRvIa.cjs');
|
|
11
11
|
|
|
12
12
|
function isAppServerAvailable() {
|
|
13
13
|
try {
|
|
@@ -102,6 +102,12 @@ class CodexAppServerClient {
|
|
|
102
102
|
notificationProtocol = "unknown";
|
|
103
103
|
completedTurnIds = /* @__PURE__ */ new Set();
|
|
104
104
|
rawFileChangesByItemId = /* @__PURE__ */ new Map();
|
|
105
|
+
// B-622: inactivity watchdog for the pending turn — re-armed by every
|
|
106
|
+
// notification, never a cap on how long a turn may run (see sendTurnAndWait).
|
|
107
|
+
turnWatchdog = null;
|
|
108
|
+
// Approval / elicitation requests we are still answering: a human may take
|
|
109
|
+
// longer than the watchdog to decide, and that is not Codex going silent.
|
|
110
|
+
inflightServerRequests = 0;
|
|
105
111
|
// Handlers set by the consumer (runCodex.ts)
|
|
106
112
|
eventHandler = null;
|
|
107
113
|
approvalHandler = null;
|
|
@@ -178,11 +184,12 @@ class CodexAppServerClient {
|
|
|
178
184
|
}
|
|
179
185
|
emitRawTurnCompletion(turnId, status, error, source) {
|
|
180
186
|
const aborted = status === "cancelled" || status === "canceled" || status === "aborted" || status === "interrupted";
|
|
187
|
+
const failed = status === "failed" || error !== void 0 && error !== null;
|
|
181
188
|
this.tryResolvePendingTurn(aborted, turnId, source);
|
|
182
189
|
this._turnId = null;
|
|
183
190
|
this.maybeRefreshRateLimits();
|
|
184
191
|
if (turnId && this.completedTurnIds.has(turnId)) {
|
|
185
|
-
return;
|
|
192
|
+
if (!failed) return;
|
|
186
193
|
}
|
|
187
194
|
if (turnId) {
|
|
188
195
|
this.completedTurnIds.add(turnId);
|
|
@@ -318,14 +325,6 @@ class CodexAppServerClient {
|
|
|
318
325
|
phase: item.phase
|
|
319
326
|
});
|
|
320
327
|
}
|
|
321
|
-
if (item.phase === "final_answer" && this.pendingTurnCompletion) {
|
|
322
|
-
this.emitRawTurnCompletion(
|
|
323
|
-
this.extractTurnId(params),
|
|
324
|
-
"completed",
|
|
325
|
-
null,
|
|
326
|
-
`${method}:final_answer`
|
|
327
|
-
);
|
|
328
|
-
}
|
|
329
328
|
return true;
|
|
330
329
|
}
|
|
331
330
|
return method.startsWith("item/");
|
|
@@ -663,6 +662,7 @@ class CodexAppServerClient {
|
|
|
663
662
|
}
|
|
664
663
|
resolvePendingTurn(aborted) {
|
|
665
664
|
if (!this.pendingTurnCompletion) return;
|
|
665
|
+
this.clearTurnWatchdog();
|
|
666
666
|
this.pendingTurnCompletion.resolve(aborted);
|
|
667
667
|
this.pendingTurnCompletion = null;
|
|
668
668
|
}
|
|
@@ -784,30 +784,55 @@ class CodexAppServerClient {
|
|
|
784
784
|
}
|
|
785
785
|
await this.ensureConnected();
|
|
786
786
|
const timeoutMs = opts?.turnTimeoutMs ?? CodexAppServerClient.TURN_TIMEOUT_MS;
|
|
787
|
-
let timer = null;
|
|
788
787
|
const completion = new Promise((resolve) => {
|
|
789
788
|
this.pendingTurnCompletion = {
|
|
790
789
|
resolve,
|
|
791
790
|
turnId: null
|
|
792
791
|
};
|
|
793
|
-
|
|
794
|
-
if (this.pendingTurnCompletion) {
|
|
795
|
-
logger.logger.warn(`[CodexAppServer] Turn timed out after ${timeoutMs}ms \u2014 treating as abort`);
|
|
796
|
-
this.resolvePendingTurn(true);
|
|
797
|
-
}
|
|
798
|
-
}, timeoutMs);
|
|
792
|
+
this.armTurnWatchdog(timeoutMs);
|
|
799
793
|
});
|
|
800
794
|
try {
|
|
801
795
|
await this.sendTurn(prompt, opts);
|
|
802
796
|
} catch (err) {
|
|
803
|
-
|
|
797
|
+
this.clearTurnWatchdog();
|
|
804
798
|
this.pendingTurnCompletion = null;
|
|
805
799
|
throw err;
|
|
806
800
|
}
|
|
807
801
|
const aborted = await completion;
|
|
808
|
-
|
|
802
|
+
this.clearTurnWatchdog();
|
|
809
803
|
return { aborted };
|
|
810
804
|
}
|
|
805
|
+
armTurnWatchdog(timeoutMs) {
|
|
806
|
+
this.clearTurnWatchdog();
|
|
807
|
+
const timer = setTimeout(() => {
|
|
808
|
+
this.turnWatchdog = null;
|
|
809
|
+
if (!this.pendingTurnCompletion) return;
|
|
810
|
+
if (this.inflightServerRequests > 0) {
|
|
811
|
+
this.armTurnWatchdog(timeoutMs);
|
|
812
|
+
return;
|
|
813
|
+
}
|
|
814
|
+
logger.logger.warn(`[CodexAppServer] No notification from Codex for ${timeoutMs}ms \u2014 giving the turn up as aborted`);
|
|
815
|
+
const turnId = this.pendingTurnCompletion.turnId ?? this._turnId;
|
|
816
|
+
this.eventHandler?.({
|
|
817
|
+
type: "turn_aborted",
|
|
818
|
+
reason: "timeout",
|
|
819
|
+
...turnId ? { turn_id: turnId } : {},
|
|
820
|
+
error: { message: `Codex sent nothing for ${Math.max(1, Math.round(timeoutMs / 6e4))} minutes; this turn was given up. Send the message again, or restart the session if it keeps happening.` }
|
|
821
|
+
});
|
|
822
|
+
this.resolvePendingTurn(true);
|
|
823
|
+
}, timeoutMs);
|
|
824
|
+
this.turnWatchdog = { timer, timeoutMs };
|
|
825
|
+
}
|
|
826
|
+
/** Any sign of life from the app-server while a turn is pending restarts the clock. */
|
|
827
|
+
touchTurnWatchdog() {
|
|
828
|
+
if (!this.turnWatchdog || !this.pendingTurnCompletion) return;
|
|
829
|
+
this.armTurnWatchdog(this.turnWatchdog.timeoutMs);
|
|
830
|
+
}
|
|
831
|
+
clearTurnWatchdog() {
|
|
832
|
+
if (!this.turnWatchdog) return;
|
|
833
|
+
clearTimeout(this.turnWatchdog.timer);
|
|
834
|
+
this.turnWatchdog = null;
|
|
835
|
+
}
|
|
811
836
|
async interruptTurn() {
|
|
812
837
|
if (!this._threadId) return;
|
|
813
838
|
if (!this._turnId) {
|
|
@@ -1015,6 +1040,15 @@ class CodexAppServerClient {
|
|
|
1015
1040
|
};
|
|
1016
1041
|
}
|
|
1017
1042
|
async handleServerRequest(id, method, params) {
|
|
1043
|
+
this.inflightServerRequests += 1;
|
|
1044
|
+
try {
|
|
1045
|
+
await this.handleServerRequestInner(id, method, params);
|
|
1046
|
+
} finally {
|
|
1047
|
+
this.inflightServerRequests -= 1;
|
|
1048
|
+
this.touchTurnWatchdog();
|
|
1049
|
+
}
|
|
1050
|
+
}
|
|
1051
|
+
async handleServerRequestInner(id, method, params) {
|
|
1018
1052
|
if (method === "mcpServer/elicitation/request") {
|
|
1019
1053
|
const toolName = this.parseToolNameFromElicitationMessage(params?.message) ?? params?.serverName ?? "McpTool";
|
|
1020
1054
|
const decision = await this.handleApproval({
|
|
@@ -1068,6 +1102,7 @@ class CodexAppServerClient {
|
|
|
1068
1102
|
return "denied";
|
|
1069
1103
|
}
|
|
1070
1104
|
handleNotification(method, params) {
|
|
1105
|
+
this.touchTurnWatchdog();
|
|
1071
1106
|
if (method === "codex/event" || method.startsWith("codex/event/")) {
|
|
1072
1107
|
this.notificationProtocol = "legacy";
|
|
1073
1108
|
const msg = params?.msg;
|
|
@@ -1127,6 +1162,21 @@ class CodexAppServerClient {
|
|
|
1127
1162
|
logger.logger.debug(`[CodexAppServer] mcpServer startup status:`, params);
|
|
1128
1163
|
return;
|
|
1129
1164
|
}
|
|
1165
|
+
if (method === "error" && params?.willRetry === true) {
|
|
1166
|
+
const error = params?.error ?? {};
|
|
1167
|
+
const message = typeof error.message === "string" ? error.message : "";
|
|
1168
|
+
const info = error.codexErrorInfo;
|
|
1169
|
+
const httpStatus = info && typeof info === "object" ? info.responseStreamDisconnected?.httpStatusCode ?? info.httpStatusCode ?? null : null;
|
|
1170
|
+
const turnId = typeof params?.turnId === "string" ? params.turnId : null;
|
|
1171
|
+
this.eventHandler?.({
|
|
1172
|
+
type: "turn_retry",
|
|
1173
|
+
message,
|
|
1174
|
+
...typeof httpStatus === "number" ? { http_status: httpStatus } : {},
|
|
1175
|
+
...turnId ? { turn_id: turnId } : {},
|
|
1176
|
+
...typeof error.additionalDetails === "string" ? { details: error.additionalDetails } : {}
|
|
1177
|
+
});
|
|
1178
|
+
return;
|
|
1179
|
+
}
|
|
1130
1180
|
logger.logger.debug(`[CodexAppServer] Notification: ${method}`);
|
|
1131
1181
|
}
|
|
1132
1182
|
}
|