very-happy-cli 0.2.206 → 0.2.208
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-dO5GAvaj.cjs → AcpBackend-Bi1lwlYT.cjs} +3 -3
- package/dist/{AcpBackend-CfTTWCK_.mjs → AcpBackend-DzhaCmBY.mjs} +3 -3
- package/dist/{AcpSessionManager-DpT9znny.cjs → AcpSessionManager-CMVLdPbj.cjs} +1 -1
- package/dist/{AcpSessionManager-a-A4YDP7.mjs → AcpSessionManager-DkaQ_APH.mjs} +1 -1
- package/dist/{BasePermissionHandler-C917oi-W.cjs → BasePermissionHandler-CvLAw0Oc.cjs} +1 -1
- package/dist/{BasePermissionHandler-Cg2py7Mi.mjs → BasePermissionHandler-pWG2_iEy.mjs} +1 -1
- package/dist/{account-BpEOGAi-.cjs → account-CPqnFWmL.cjs} +5 -5
- package/dist/{account-CY_3dfMO.mjs → account-CdqfSY_p.mjs} +5 -5
- package/dist/{acpSessionResume-D1v1ZqjL.mjs → acpSessionResume-BhITqLyG.mjs} +1 -1
- package/dist/{acpSessionResume-BTchDv4R.cjs → acpSessionResume-CJkt6Lb3.cjs} +1 -1
- package/dist/{agentHome-B8Fp21kp.cjs → agentHome-DNBlAPo7.cjs} +4 -4
- package/dist/{agentHome-Bb0sGzgt.mjs → agentHome-s35ZR8h2.mjs} +4 -4
- package/dist/{api-DGJVcaIF.mjs → api-CSqHDB2c.mjs} +9 -9
- package/dist/{api-B-u-Mk6V.cjs → api-DD2Kb6PC.cjs} +9 -9
- package/dist/{apiMachine-Bi15f6YB.cjs → apiMachine-B120yCAC.cjs} +111 -18
- package/dist/{apiMachine-B-GyYD22.mjs → apiMachine-glpowPBP.mjs} +112 -19
- package/dist/{attachmentContent-BvGKA5QH.cjs → attachmentContent-DaAXfnD3.cjs} +2 -2
- package/dist/{attachmentContent-C-qFMirp.mjs → attachmentContent-Dz1Klp7p.mjs} +2 -2
- package/dist/{auth-CT2084Ag.cjs → auth-CsFFmyP7.cjs} +8 -8
- package/dist/{auth-CP7a7YqH.mjs → auth-D20iF90G.mjs} +5 -5
- package/dist/{auth-FRjFFR7K.mjs → auth-DGORGC8x.mjs} +8 -8
- package/dist/{auth-Bnj_x4XN.cjs → auth-r1hltcyI.cjs} +5 -5
- package/dist/{auto-DaADkeaT.cjs → auto-Ciz46Iqn.cjs} +14 -14
- package/dist/{auto-CxItjek7.mjs → auto-DbrbFKf9.mjs} +15 -15
- package/dist/{bootstrap-BCuF4Kla.mjs → bootstrap-BNtlEESB.mjs} +2 -2
- package/dist/{bootstrap-Cq_W1C3z.cjs → bootstrap-W09l0EHC.cjs} +2 -2
- package/dist/{browser-C-PWxfCE.mjs → browser-C9mNP2Jk.mjs} +1 -1
- package/dist/{browser-CHC75A5J.cjs → browser-dRvYvuKK.cjs} +1 -1
- package/dist/{claudeLocal-XsMte9X2.mjs → claudeLocal-DReeJSNX.mjs} +5 -5
- package/dist/{claudeLocal-TVtTBsHi.cjs → claudeLocal-pk26w0aA.cjs} +4 -4
- package/dist/{claudeLocalLauncher-DDU1kyxO.mjs → claudeLocalLauncher-BXg1eVkk.mjs} +10 -10
- package/dist/{claudeLocalLauncher-D5XU298r.cjs → claudeLocalLauncher-ENxo2qLu.cjs} +9 -9
- package/dist/{claudeSessionFork-CZpugNK3.mjs → claudeSessionFork-BJgKcXCZ.mjs} +1 -1
- package/dist/{claudeSessionFork-CzzRjCFN.cjs → claudeSessionFork-Dkza0l7k.cjs} +1 -1
- package/dist/{client-Cdax95Aw.cjs → client-B-1f7vJk.cjs} +2 -2
- package/dist/{client-Bqyfl2t0.mjs → client-BcJGDe88.mjs} +4 -4
- package/dist/{client-DizbJlbC.mjs → client-CHusuUpK.mjs} +2 -2
- package/dist/{client-C2F0G1gB.cjs → client-CiMpU3hu.cjs} +4 -4
- package/dist/{client-jlIx75iG.cjs → client-CikaTA8m.cjs} +2 -2
- package/dist/{client-D9viv5fT.cjs → client-CqswQ5dm.cjs} +2 -2
- package/dist/{client-5ekzs8hv.mjs → client-D79GAZdH.mjs} +2 -2
- package/dist/{client-ztj20uaj.mjs → client-DM4LAJtu.mjs} +2 -2
- package/dist/codex/happyMcpStdioBridge.cjs +18 -18
- package/dist/codex/happyMcpStdioBridge.mjs +18 -18
- package/dist/{codexAppServerClient-oSG91fFK.cjs → codexAppServerClient-1UQzZZVz.cjs} +107 -5
- package/dist/{codexAppServerClient-DFRZ__3w.mjs → codexAppServerClient-4OO0KZot.mjs} +105 -7
- package/dist/{codexCommand-BE__EfSf.mjs → codexCommand-DXD9hMjf.mjs} +119 -106
- package/dist/{codexCommand-BNjxG3C_.cjs → codexCommand-NEGUEjNu.cjs} +122 -109
- package/dist/{codexTermination-DuGPgcGv.mjs → codexTermination-CVq2OFB8.mjs} +1 -1
- package/dist/{codexTermination-_YHZVugN.cjs → codexTermination-PerhM3_A.cjs} +1 -1
- package/dist/{config-BH7N9kZX.cjs → config-BWInnJrU.cjs} +3 -3
- package/dist/{config-DXO9RUqb.mjs → config-ut95-JvJ.mjs} +3 -3
- package/dist/{configuration-Da2jFKHx.cjs → configuration-DjajVIcC.cjs} +1 -1
- package/dist/{configuration-BreL0beF.mjs → configuration-DyUL3r3_.mjs} +1 -1
- package/dist/{connect-B_UrNMnp.mjs → connect-BUjKAnlC.mjs} +12 -12
- package/dist/{connect-BIIxh5a9.cjs → connect-CsdM0x3Z.cjs} +12 -12
- package/dist/{context-n1LlNbjT.cjs → context-Cr3K4S2w.cjs} +1 -1
- package/dist/{context-DFudPCad.mjs → context-D2H9Axdp.mjs} +1 -1
- package/dist/{controlClient-Dlait4BW.cjs → controlClient-BpIuQ1Ns.cjs} +3 -3
- package/dist/{controlClient-DwiujrH8.mjs → controlClient-HuyeDWsu.mjs} +3 -3
- package/dist/{createSessionMetadata-83WjQzAt.cjs → createSessionMetadata-B18g5IaB.cjs} +2 -2
- package/dist/{createSessionMetadata-B0wB4nIY.mjs → createSessionMetadata-ysHgFXAk.mjs} +2 -2
- package/dist/{deterministicJson-BUtDwjAU.mjs → deterministicJson-9MtfxFkH.mjs} +14 -14
- package/dist/{deterministicJson-Dppskedb.cjs → deterministicJson-CjoGQVig.cjs} +14 -14
- package/dist/{doctor-QQS5dGqG.mjs → doctor-3F1VRGNQ.mjs} +7 -7
- package/dist/{doctor-BtVympkn.cjs → doctor-B5X_WgW5.cjs} +7 -7
- package/dist/{downloadTarget-CVm8ey3W.mjs → downloadTarget-Bphxqzlj.mjs} +6 -6
- package/dist/{downloadTarget-CxGQUh-7.cjs → downloadTarget-Da5r5bmz.cjs} +6 -6
- package/dist/{ensureDaemonRunning-CjD9jtqp.cjs → ensureDaemonRunning-B5KACtnt.cjs} +5 -5
- package/dist/{ensureDaemonRunning-m6Kd3BM7.mjs → ensureDaemonRunning-CfWwG5sk.mjs} +5 -5
- package/dist/{exitNotice-HOwYf-97.mjs → exitNotice-BhE9UKcS.mjs} +2 -2
- package/dist/{exitNotice-bUdz2C4L.cjs → exitNotice-DZXhuGy_.cjs} +2 -2
- package/dist/{format-2GqpXiRX.mjs → format-CNxQ0daG.mjs} +1 -1
- package/dist/{format-BXxqj69f.cjs → format-VdzxFoPn.cjs} +1 -1
- package/dist/{handleResumeCommand-D_NUSPvz.cjs → handleResumeCommand-CqCDmme6.cjs} +5 -5
- package/dist/{handleResumeCommand-CTT8lfhV.mjs → handleResumeCommand-D7_cvcc9.mjs} +5 -5
- package/dist/{index-TDGlRjkn.cjs → index-Bw7x7m6a.cjs} +4 -4
- package/dist/{index-CIWLX_eM.mjs → index-BzsL5LN5.mjs} +4 -4
- package/dist/{index-B2xEPLkK.cjs → index-CFCunVeQ.cjs} +40 -40
- package/dist/{index-BLL_KBUA.mjs → index-CNW2-T1Y.mjs} +3 -3
- package/dist/{index-CDO9rljT.mjs → index-CPRRUQzg.mjs} +41 -41
- package/dist/{index-C2PX_W49.mjs → index-CdEG8IE-.mjs} +4 -4
- package/dist/{index-BrvS8Bor.cjs → index-DJ8lYOQz.cjs} +4 -4
- package/dist/{index-CJXPB8kU.cjs → index-DY6iQHV4.cjs} +3 -3
- package/dist/index.cjs +2 -2
- package/dist/index.mjs +2 -2
- package/dist/{install-BaUw2G6E.cjs → install-C3VX-lFh.cjs} +3 -3
- package/dist/{install-DDfCEbu9.mjs → install-DXc3VEgr.mjs} +3 -3
- package/dist/{issue-BrxmnVRr.cjs → issue-16qqmyzu.cjs} +7 -7
- package/dist/{issue-Mh6p_OMm.mjs → issue-Du98oR1Q.mjs} +7 -7
- package/dist/lib.cjs +11 -11
- package/dist/lib.d.cts +8 -0
- package/dist/lib.d.mts +8 -0
- package/dist/lib.mjs +11 -11
- package/dist/{localHappyAgentAuth-B2bOV9RF.mjs → localHappyAgentAuth-3xKBQJOa.mjs} +1 -1
- package/dist/{localHappyAgentAuth-BtDypYZb.cjs → localHappyAgentAuth-B_P4c1Gm.cjs} +1 -1
- package/dist/{logger-DOp6YYAW.mjs → logger-B3uJyacO.mjs} +2 -2
- package/dist/{logger-B_GiBdoD.cjs → logger-el0cE85h.cjs} +2 -2
- package/dist/{machineMetadata-8PjdzhIk.mjs → machineMetadata-CO2nMt0D.mjs} +3 -3
- package/dist/{machineMetadata-rjOkg7or.cjs → machineMetadata-HmfiZ6TU.cjs} +3 -3
- package/dist/{main-Dxj1sGm3.cjs → main-Czhmne4w.cjs} +48 -48
- package/dist/{main-BfSuibka.mjs → main-NKVfJrjR.mjs} +48 -48
- package/dist/{manager-BEsI4qt3.mjs → manager-2Il8XJVq.mjs} +1 -1
- package/dist/{mcp-C_G7MsCo.mjs → mcp-6E6MzmHX.mjs} +15 -15
- package/dist/{mcp-DmRG6Yyk.cjs → mcp-Dt7Xv0aE.cjs} +15 -15
- package/dist/{mirrorProtocol-N8M4o7UD.mjs → mirrorProtocol-BqPADAVi.mjs} +2 -2
- package/dist/{mirrorProtocol-C8ZsCJzM.cjs → mirrorProtocol-D02HTC80.cjs} +2 -2
- package/dist/{package-CJeweE1o.mjs → package-BObPhT96.mjs} +7 -7
- package/dist/{package-DTEEvw5V.cjs → package-COEvA5iY.cjs} +7 -7
- package/dist/{panels-D9DTAY7b.cjs → panels-8gxstFem.cjs} +5 -5
- package/dist/{panels-BJGEusTH.mjs → panels-B8SzSCYI.mjs} +5 -5
- package/dist/{peerTools-Cs7_fbtQ.cjs → peerTools-BsHkjxPt.cjs} +5 -5
- package/dist/{peerTools-D66WcwUZ.mjs → peerTools-D0rxyRcF.mjs} +5 -5
- package/dist/{persistence-DURvN3Hm.mjs → persistence-Bqjt2vfj.mjs} +2 -2
- package/dist/{persistence-_HpJ8Xqx.cjs → persistence-Cuh7Fmqq.cjs} +2 -2
- package/dist/{piRunnerArgs-BqqnRbD2.cjs → piRunnerArgs-BM4IL7-Q.cjs} +1 -1
- package/dist/{piRunnerArgs-Q9_OZpgB.mjs → piRunnerArgs-CrRB06Q-.mjs} +1 -1
- package/dist/{piRuntime-DVfBZwGV.mjs → piRuntime-C5J-NcI-.mjs} +1 -1
- package/dist/{piRuntime-CfymNU4r.cjs → piRuntime-Cxax5MJ9.cjs} +1 -1
- package/dist/{piTerminal-SWzeud-Y.cjs → piTerminal-B6FmRG-j.cjs} +17 -17
- package/dist/{piTerminal-BmVTobWw.mjs → piTerminal-CDNQVXeX.mjs} +17 -17
- package/dist/{pushNotifications-DzWubbyC.cjs → pushNotifications-B-NnyAOy.cjs} +2 -2
- package/dist/{pushNotifications-CrN3Ja_a.mjs → pushNotifications-C4KS8SZe.mjs} +2 -2
- package/dist/{query-CcFiFfJ8.mjs → query-B9_vGm55.mjs} +1 -1
- package/dist/{query-DXKQY4gV.cjs → query-O39pVPly.cjs} +1 -1
- package/dist/{rateLimitWindows-BmZ6gZY8.cjs → rateLimitWindows-CnmV6sQI.cjs} +1 -1
- package/dist/{rateLimitWindows-BrCPAQCV.mjs → rateLimitWindows-CrWlGKPl.mjs} +1 -1
- package/dist/{reconnectGate-BbxwTsar.mjs → reconnectGate-4HRVraOQ.mjs} +1 -1
- package/dist/{reconnectGate-DBf3oDWw.cjs → reconnectGate-CetSTiP3.cjs} +1 -1
- package/dist/{registerCommonHandlers-DJcGS4eV.cjs → registerCommonHandlers-BQQSEBbH.cjs} +2 -2
- package/dist/{registerCommonHandlers-Dd5Ld0CL.mjs → registerCommonHandlers-CZJBrvGH.mjs} +2 -2
- package/dist/{registerKillSessionHandler-CCpSkYc2.cjs → registerKillSessionHandler-CRt4C583.cjs} +5 -5
- package/dist/{registerKillSessionHandler-DNLUoqKq.mjs → registerKillSessionHandler-UkuPaLm6.mjs} +5 -5
- package/dist/{registerSideQuestionHandler-D7zu0Z-I.cjs → registerSideQuestionHandler-ChnSNcv4.cjs} +4 -4
- package/dist/{registerSideQuestionHandler-_YMnEk1L.mjs → registerSideQuestionHandler-zuvmCRN8.mjs} +4 -4
- package/dist/{remoteSessionClient-Don4DO6r.cjs → remoteSessionClient-CLzIiMIY.cjs} +5 -5
- package/dist/{remoteSessionClient-iIWEgwCP.mjs → remoteSessionClient-DHuh-nj5.mjs} +5 -5
- package/dist/{reportProgressTool-B9DJTgdO.mjs → reportProgressTool-dSJwAO7H.mjs} +4 -4
- package/dist/{reportProgressTool-DwHrvFHn.cjs → reportProgressTool-ikM2aqgu.cjs} +4 -4
- package/dist/{run-CbsSCESl.cjs → run-9AiIc6rL.cjs} +34 -34
- package/dist/{run-RKaV1s5m.mjs → run-BO0aCF9F.mjs} +34 -34
- package/dist/{runClaude-B4hSm06m.cjs → runClaude-D6TktbLM.cjs} +20 -20
- package/dist/{runClaude-BnMkhjUP.mjs → runClaude-DF4b_nnj.mjs} +20 -20
- package/dist/{runClaudeDeps-BrS568YD.cjs → runClaudeDeps-B5_HGZVN.cjs} +38 -38
- package/dist/{runClaudeDeps-jlxTi74f.mjs → runClaudeDeps-CljBZRuq.mjs} +44 -44
- package/dist/{runGemini-D34l_LpW.mjs → runGemini-B4R_gBKP.mjs} +35 -35
- package/dist/{runGemini-DMLMq-y1.cjs → runGemini-CtuKMFr2.cjs} +35 -35
- package/dist/{runOpenClaw-BGKlUFHd.cjs → runOpenClaw-9AXOnCW3.cjs} +17 -17
- package/dist/{runOpenClaw-Dezk2LNe.mjs → runOpenClaw-Dvu4yTbZ.mjs} +17 -17
- package/dist/{sandbox-Db7g31zm.mjs → sandbox-B3YL-SmJ.mjs} +4 -4
- package/dist/{sandbox-C70ODcxh.cjs → sandbox-C0Aresqc.cjs} +4 -4
- package/dist/{selfCheck-UKA82vpj.cjs → selfCheck-CsteE3NU.cjs} +39 -39
- package/dist/selfCheck-ZpXxm1nH.mjs +89 -0
- package/dist/{send-BD8y_Dvq.cjs → send-CTi1xuRM.cjs} +8 -8
- package/dist/{send-8-CnqJTX.mjs → send-hCtrYHjk.mjs} +8 -8
- package/dist/{server-B-0TJW4B.cjs → server-BC1WoqwX.cjs} +6 -6
- package/dist/{server-CxmH3n3Y.mjs → server-C73IJReH.mjs} +4 -4
- package/dist/{sessionLock-BRaWaYhl.cjs → sessionLock-B78eUsZn.cjs} +3 -3
- package/dist/{sessionLock-Cg33c_Um.mjs → sessionLock-D5Mt-kl0.mjs} +3 -3
- package/dist/{sessionOps-1_wWgsXG.mjs → sessionOps-IQlrlpXx.mjs} +4 -4
- package/dist/{sessionOps-C-ms5bYE.cjs → sessionOps-Z0t9Sy6x.cjs} +4 -4
- package/dist/{sessionProvider-BKJ7EW-9.mjs → sessionProvider-8T4aF-U7.mjs} +5 -5
- package/dist/{sessionProvider-nbK5DYvh.cjs → sessionProvider-C0oC0cQ0.cjs} +5 -5
- package/dist/{sessionScanner-S7FsjWqu.cjs → sessionScanner-BHdRInLC.cjs} +3 -3
- package/dist/{sessionScanner-CGP1nnOy.mjs → sessionScanner-DW1TZj2O.mjs} +3 -3
- package/dist/{sessions-7B68T5D2.mjs → sessions-COgEytKt.mjs} +10 -10
- package/dist/{sessions-CwC-s7iA.cjs → sessions-iFR3MR2E.cjs} +10 -10
- package/dist/{setupOfflineReconnection-DSlXZLP9.mjs → setupOfflineReconnection-DXZKHKXk.mjs} +2 -2
- package/dist/{setupOfflineReconnection-D9BD_Cha.cjs → setupOfflineReconnection-YFeqV96O.cjs} +2 -2
- package/dist/{spawn-D4gyZP6A.cjs → spawn-8_ucIJAi.cjs} +12 -12
- package/dist/{spawn-CJ6ow1Et.mjs → spawn-Diu7Dy6k.mjs} +13 -13
- package/dist/{spawnHappyCLI-CKgAt8NU.cjs → spawnHappyCLI-BuzhxaUb.cjs} +1 -1
- package/dist/{spawnHappyCLI-BRcxn8Ui.mjs → spawnHappyCLI-CKOV5SN4.mjs} +1 -1
- package/dist/{startFileWatcher-DJ_IPi0y.mjs → startFileWatcher-BEiKblzC.mjs} +1 -1
- package/dist/{startFileWatcher-Baw_dgs_.cjs → startFileWatcher-YhoX-sbf.cjs} +1 -1
- package/dist/{startupSessionCreate-DeJNxWtb.mjs → startupSessionCreate-DZOZ_d4O.mjs} +3 -3
- package/dist/{startupSessionCreate-Cjl3wk3-.cjs → startupSessionCreate-mjEPEPs_.cjs} +3 -3
- package/dist/{sync-COxP1DF-.mjs → sync-BHsEZG8-.mjs} +1 -1
- package/dist/{sync-BqlAL8Iu.cjs → sync-BkxVNbmG.cjs} +1 -1
- package/dist/{systemPrompt-Ch052UGr.cjs → systemPrompt-CF39MlXL.cjs} +1 -1
- package/dist/{systemPrompt-bX3lhFwJ.mjs → systemPrompt-DVKEL0KU.mjs} +1 -1
- package/dist/{teams-B15InkZ8.cjs → teams-hkfoYZYl.cjs} +8 -8
- package/dist/{teams-DCCFeNBI.mjs → teams-zF_HSHny.mjs} +8 -8
- package/dist/{time-COyPPTSV.cjs → time-C1eHsyYl.cjs} +1 -1
- package/dist/{time-BHGz6WMO.mjs → time-PLmNnNT8.mjs} +1 -1
- package/dist/{titleGenerator-J99R5x-_.mjs → titleGenerator-B_9QYPm2.mjs} +1 -1
- package/dist/{titleGenerator-D4FFE3Mo.cjs → titleGenerator-DhB7M-Go.cjs} +2 -2
- package/dist/{todo-BZAJpKe1.mjs → todo-OkokZjAB.mjs} +7 -7
- package/dist/{todo-BHGF7oHm.cjs → todo-RDZfI_KT.cjs} +7 -7
- package/dist/{tools-Ck6hDYQh.mjs → tools-BrtfEQhr.mjs} +1 -1
- package/dist/{tools-DswZApdy.cjs → tools-bCceLykM.cjs} +1 -1
- package/dist/{uninstall-DUBwOYXT.cjs → uninstall-Cz7mXpuS.cjs} +3 -3
- package/dist/{uninstall-33r_D-SV.mjs → uninstall-pLwbtTh8.mjs} +3 -3
- package/package.json +7 -7
- package/dist/selfCheck-CUVp2nQo.mjs +0 -89
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { r as registerTeamsTools } from '../tools-
|
|
2
|
-
import { r as registerAutomationTools, a as registerProjectTools, b as registerIssueTools, c as registerReportProgressTool } from '../reportProgressTool-
|
|
3
|
-
import { r as registerSessionPeerTools } from '../peerTools-
|
|
1
|
+
import { r as registerTeamsTools } from '../tools-BrtfEQhr.mjs';
|
|
2
|
+
import { r as registerAutomationTools, a as registerProjectTools, b as registerIssueTools, c as registerReportProgressTool } from '../reportProgressTool-dSJwAO7H.mjs';
|
|
3
|
+
import { r as registerSessionPeerTools } from '../peerTools-D0rxyRcF.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,40 +8,40 @@ 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-BcJGDe88.mjs';
|
|
12
12
|
import 'node:crypto';
|
|
13
13
|
import 'node:child_process';
|
|
14
14
|
import 'node:util';
|
|
15
15
|
import 'node:path';
|
|
16
16
|
import '../index-DWk-WTU-.mjs';
|
|
17
17
|
import '@paralleldrive/cuid2';
|
|
18
|
-
import '../configuration-
|
|
18
|
+
import '../configuration-DyUL3r3_.mjs';
|
|
19
19
|
import 'node:fs';
|
|
20
20
|
import 'node:os';
|
|
21
|
-
import '../package-
|
|
21
|
+
import '../package-BObPhT96.mjs';
|
|
22
22
|
import 'node:fs/promises';
|
|
23
|
-
import '../persistence-
|
|
23
|
+
import '../persistence-Bqjt2vfj.mjs';
|
|
24
24
|
import '../authRelay-DhQhkBvX.mjs';
|
|
25
25
|
import 'tweetnacl';
|
|
26
|
-
import '../logger-
|
|
26
|
+
import '../logger-B3uJyacO.mjs';
|
|
27
27
|
import 'chalk';
|
|
28
|
-
import '../context-
|
|
29
|
-
import '../exitNotice-
|
|
28
|
+
import '../context-D2H9Axdp.mjs';
|
|
29
|
+
import '../exitNotice-BhE9UKcS.mjs';
|
|
30
30
|
import '../prompt-QHuFx9j6.mjs';
|
|
31
|
-
import '../client-
|
|
31
|
+
import '../client-DM4LAJtu.mjs';
|
|
32
32
|
import '../precheckCompat-DeEbilbr.mjs';
|
|
33
|
-
import '../client-
|
|
34
|
-
import '../client-
|
|
35
|
-
import '../format-
|
|
33
|
+
import '../client-CHusuUpK.mjs';
|
|
34
|
+
import '../client-D79GAZdH.mjs';
|
|
35
|
+
import '../format-CNxQ0daG.mjs';
|
|
36
36
|
import '../ids-DU6sLx4C.mjs';
|
|
37
|
-
import '../controlClient-
|
|
38
|
-
import '../sessionOps-
|
|
37
|
+
import '../controlClient-HuyeDWsu.mjs';
|
|
38
|
+
import '../sessionOps-IQlrlpXx.mjs';
|
|
39
39
|
import 'axios';
|
|
40
|
-
import '../time-
|
|
40
|
+
import '../time-PLmNnNT8.mjs';
|
|
41
41
|
import '../specialCommands-MXUN0wfI.mjs';
|
|
42
42
|
import 'socket.io-client';
|
|
43
43
|
import '../backgroundTaskActivity-8PdPxrvy.mjs';
|
|
44
|
-
import '../remoteSessionClient-
|
|
44
|
+
import '../remoteSessionClient-DHuh-nj5.mjs';
|
|
45
45
|
import '../trimIdent-BAjmv_TG.mjs';
|
|
46
46
|
|
|
47
47
|
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-el0cE85h.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-COEvA5iY.cjs');
|
|
10
|
+
var rateLimitWindows = require('./rateLimitWindows-CnmV6sQI.cjs');
|
|
11
11
|
var processTree = require('./processTree-CMHWlVse.cjs');
|
|
12
12
|
|
|
13
13
|
const CODEX_HELPER_LABEL_MAX_CHARS = 80;
|
|
@@ -45,6 +45,87 @@ function codexChildAnnouncements(item) {
|
|
|
45
45
|
return [];
|
|
46
46
|
}
|
|
47
47
|
|
|
48
|
+
const UNEXPECTED_STATUS = /^unexpected status (\d{3}) ([^:]*?):\s*([\s\S]*?)(?:,\s*url:\s*(\S+))?$/;
|
|
49
|
+
function readableCodexErrorText(text) {
|
|
50
|
+
const trimmed = text.trim();
|
|
51
|
+
const status = UNEXPECTED_STATUS.exec(trimmed);
|
|
52
|
+
if (status) {
|
|
53
|
+
const [, code, reason, rawBody, url] = status;
|
|
54
|
+
const head = `HTTP ${code} ${reason.trim()} from the model API`;
|
|
55
|
+
const detail = readableHttpBody(rawBody, `${code} ${reason}`);
|
|
56
|
+
return `${head}${detail ? `: ${detail}` : ""}${url ? ` (${url})` : ""}`;
|
|
57
|
+
}
|
|
58
|
+
return unwrapJsonMessage(trimmed) ?? trimmed;
|
|
59
|
+
}
|
|
60
|
+
function unwrapJsonMessage(text) {
|
|
61
|
+
if (!text.startsWith("{")) return null;
|
|
62
|
+
try {
|
|
63
|
+
const body = JSON.parse(text);
|
|
64
|
+
const inner = typeof body.error === "object" && body.error ? body.error.message : void 0;
|
|
65
|
+
const message = typeof inner === "string" && inner.trim() ? inner : typeof body.error === "string" && body.error.trim() ? body.error : typeof body.message === "string" && body.message.trim() ? body.message : null;
|
|
66
|
+
return message ? message.trim() : null;
|
|
67
|
+
} catch {
|
|
68
|
+
return null;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
function readableHttpBody(raw, statusLine) {
|
|
72
|
+
let body = unwrapJsonMessage(raw.trim()) ?? raw.trim();
|
|
73
|
+
if (/<[a-z!/][^>]*>/i.test(body)) {
|
|
74
|
+
const title = /<title[^>]*>([\s\S]*?)<\/title>/i.exec(body);
|
|
75
|
+
body = title ? title[1] : body.replace(/<[^>]+>/g, " ");
|
|
76
|
+
}
|
|
77
|
+
body = body.replace(/\s+/g, " ").trim();
|
|
78
|
+
if (!body) return null;
|
|
79
|
+
const normalize = (value) => value.toLowerCase().replace(/[^a-z0-9]/g, "");
|
|
80
|
+
if (normalize(body) === normalize(statusLine)) return null;
|
|
81
|
+
return body.length > 240 ? `${body.slice(0, 240)}\u2026` : body;
|
|
82
|
+
}
|
|
83
|
+
function describeCodexFailure(msg) {
|
|
84
|
+
const hasFailure = msg?.status === "failed" || msg?.error !== void 0 && msg?.error !== null;
|
|
85
|
+
if (!hasFailure) return null;
|
|
86
|
+
const err = msg.error;
|
|
87
|
+
if (typeof err === "string" && err.length > 0) return readableCodexErrorText(err);
|
|
88
|
+
if (err && typeof err === "object" && typeof err.message === "string" && err.message.length > 0) {
|
|
89
|
+
return readableCodexErrorText(err.message);
|
|
90
|
+
}
|
|
91
|
+
return "Unknown error";
|
|
92
|
+
}
|
|
93
|
+
function describeCodexRetry(msg) {
|
|
94
|
+
const message = typeof msg?.message === "string" ? msg.message.trim() : "";
|
|
95
|
+
const status = typeof msg?.http_status === "number" ? msg.http_status : null;
|
|
96
|
+
const cause = status ? `HTTP ${status} from the model API` : "a model API error";
|
|
97
|
+
return message ? `Codex is retrying after ${cause} (${message})` : `Codex is retrying after ${cause}`;
|
|
98
|
+
}
|
|
99
|
+
function codexStderrTailOf(error) {
|
|
100
|
+
const tail = error?.codexStderrTail;
|
|
101
|
+
return typeof tail === "string" && tail.trim() ? tail.trim() : null;
|
|
102
|
+
}
|
|
103
|
+
const TRANSPORT_LOSS = /^Codex process (exited|disconnected)\b|stdin not writable| timed out after \d+ms/;
|
|
104
|
+
function describeThrownTurnError(error) {
|
|
105
|
+
const message = error instanceof Error ? error.message : typeof error === "string" ? error : "";
|
|
106
|
+
if (!message.trim() || TRANSPORT_LOSS.test(message)) return null;
|
|
107
|
+
return readableCodexErrorText(message);
|
|
108
|
+
}
|
|
109
|
+
function codexExitOf(error) {
|
|
110
|
+
const exit = error?.codexExit;
|
|
111
|
+
if (!exit || typeof exit !== "object") return null;
|
|
112
|
+
return {
|
|
113
|
+
code: typeof exit.code === "number" ? exit.code : null,
|
|
114
|
+
signal: typeof exit.signal === "string" && exit.signal ? exit.signal : null
|
|
115
|
+
};
|
|
116
|
+
}
|
|
117
|
+
function describeCodexExit(exit, tail) {
|
|
118
|
+
const status = exit.signal ? `signal=${exit.signal}` : `code=${exit.code ?? "null"}`;
|
|
119
|
+
const hint = exit.signal === "SIGKILL" ? " \u2014 killed by the system, most likely out of memory (a very large Codex thread can need several GB to resume)" : "";
|
|
120
|
+
return `Codex process exited (${status})${hint}${tail ? `: ${tail}` : ""}`;
|
|
121
|
+
}
|
|
122
|
+
function processLossMessage(error) {
|
|
123
|
+
const tail = codexStderrTailOf(error);
|
|
124
|
+
const exit = codexExitOf(error);
|
|
125
|
+
if (exit) return `Process exited unexpectedly: ${describeCodexExit(exit, tail)}`;
|
|
126
|
+
return tail ? `Process exited unexpectedly: ${tail}` : "Process exited unexpectedly";
|
|
127
|
+
}
|
|
128
|
+
|
|
48
129
|
function jsonRpcErrorCodeOf(error) {
|
|
49
130
|
const code = error?.jsonRpcCode;
|
|
50
131
|
return typeof code === "number" ? code : null;
|
|
@@ -170,6 +251,9 @@ class CodexAppServerClient {
|
|
|
170
251
|
threadStopGrace = null;
|
|
171
252
|
/** Last few hundred chars of the app-server's stderr: Codex's own last words when it dies. */
|
|
172
253
|
stderrRing = "";
|
|
254
|
+
/** B-901: this app-server ended a turn — it got past loading the thread. */
|
|
255
|
+
servedTurnSinceSpawn = false;
|
|
256
|
+
unexpectedExitHandler = null;
|
|
173
257
|
rawFileChangesByItemId = /* @__PURE__ */ new Map();
|
|
174
258
|
// B-622: inactivity watchdog for the pending turn — re-armed by every
|
|
175
259
|
// notification, never a cap on how long a turn may run (see sendTurnAndWait).
|
|
@@ -220,6 +304,10 @@ class CodexAppServerClient {
|
|
|
220
304
|
get threadModel() {
|
|
221
305
|
return this._threadModel;
|
|
222
306
|
}
|
|
307
|
+
/** B-901: the app-server died on its own (never called for our own disconnect/release). */
|
|
308
|
+
setUnexpectedExitHandler(handler) {
|
|
309
|
+
this.unexpectedExitHandler = handler;
|
|
310
|
+
}
|
|
223
311
|
setEventHandler(handler) {
|
|
224
312
|
this.eventHandler = handler;
|
|
225
313
|
}
|
|
@@ -346,6 +434,7 @@ class CodexAppServerClient {
|
|
|
346
434
|
const aborted = status === "cancelled" || status === "canceled" || status === "aborted" || status === "interrupted";
|
|
347
435
|
const failed = status === "failed" || error !== void 0 && error !== null;
|
|
348
436
|
this.clearThreadStopGrace();
|
|
437
|
+
this.servedTurnSinceSpawn = true;
|
|
349
438
|
this.tryResolvePendingTurn(aborted, turnId, source);
|
|
350
439
|
this._turnId = null;
|
|
351
440
|
this.maybeRefreshRateLimits();
|
|
@@ -592,11 +681,14 @@ class CodexAppServerClient {
|
|
|
592
681
|
}
|
|
593
682
|
this.connected = false;
|
|
594
683
|
const tail = this.stderrTail();
|
|
684
|
+
const exit = { code: code ?? null, signal: signal ?? null };
|
|
595
685
|
const exited = `Codex process exited (code=${code ?? "null"}${signal ? `, signal=${signal}` : ""})`;
|
|
686
|
+
this.unexpectedExitHandler?.({ ...exit, threadId: this._threadId, servedTurn: this.servedTurnSinceSpawn });
|
|
596
687
|
for (const [id, req] of this.pending) {
|
|
597
688
|
if (req.epoch !== epoch) continue;
|
|
598
689
|
const error = new Error(`${exited} while waiting for ${req.method}`);
|
|
599
690
|
error.codexStderrTail = tail;
|
|
691
|
+
error.codexExit = exit;
|
|
600
692
|
req.reject(error);
|
|
601
693
|
this.pending.delete(id);
|
|
602
694
|
}
|
|
@@ -607,12 +699,13 @@ class CodexAppServerClient {
|
|
|
607
699
|
type: "turn_aborted",
|
|
608
700
|
reason: "process-exit",
|
|
609
701
|
...turnId ? { turn_id: turnId } : {},
|
|
610
|
-
error: { message:
|
|
702
|
+
error: { message: describeCodexExit(exit, tail) }
|
|
611
703
|
});
|
|
612
704
|
}
|
|
613
705
|
this.resolvePendingTurn(true);
|
|
614
706
|
});
|
|
615
707
|
this.stderrRing = "";
|
|
708
|
+
this.servedTurnSinceSpawn = false;
|
|
616
709
|
this.steerUnsupported = false;
|
|
617
710
|
this.steeredAwaitingEcho.clear();
|
|
618
711
|
this.childThreadLabels.clear();
|
|
@@ -798,7 +891,12 @@ ${text}`.slice(-400);
|
|
|
798
891
|
config: this.buildThreadConfig(opts?.mcpServers ?? defaults.mcpServers),
|
|
799
892
|
baseInstructions: null,
|
|
800
893
|
developerInstructions: null,
|
|
801
|
-
persistExtendedHistory: true
|
|
894
|
+
persistExtendedHistory: true,
|
|
895
|
+
// B-901: nothing here reads the resumed turns, and on a long thread
|
|
896
|
+
// they came back as one JSON line of hundreds of MB (400 MB for an
|
|
897
|
+
// 850 MB rollout) that this process had to buffer and parse. Older
|
|
898
|
+
// Codex ignores the unknown param, as with lastTurnId (B-851).
|
|
899
|
+
excludeTurns: true
|
|
802
900
|
};
|
|
803
901
|
const result = await this.request("thread/resume", params);
|
|
804
902
|
this._threadId = result.thread.id;
|
|
@@ -1651,3 +1749,7 @@ ${text}`.slice(-400);
|
|
|
1651
1749
|
}
|
|
1652
1750
|
|
|
1653
1751
|
exports.CodexAppServerClient = CodexAppServerClient;
|
|
1752
|
+
exports.describeCodexFailure = describeCodexFailure;
|
|
1753
|
+
exports.describeCodexRetry = describeCodexRetry;
|
|
1754
|
+
exports.describeThrownTurnError = describeThrownTurnError;
|
|
1755
|
+
exports.processLossMessage = processLossMessage;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { execSync } from 'node:child_process';
|
|
2
2
|
import { spawn } from 'cross-spawn';
|
|
3
3
|
import { createInterface } from 'node:readline';
|
|
4
|
-
import { l as logger } from './logger-
|
|
4
|
+
import { l as logger } from './logger-B3uJyacO.mjs';
|
|
5
5
|
import { e as errorLogMetadata, c as contentLogMetadata } from './contentLogMetadata-BlWI0egu.mjs';
|
|
6
|
-
import { i as initializeSandbox,
|
|
7
|
-
import { p as packageJson } from './package-
|
|
8
|
-
import { s as shouldReadCodexRateLimits, i as isUnsupportedCodexMethodError } from './rateLimitWindows-
|
|
6
|
+
import { i as initializeSandbox, a as wrapForMcpTransport } from './manager-2Il8XJVq.mjs';
|
|
7
|
+
import { p as packageJson } from './package-BObPhT96.mjs';
|
|
8
|
+
import { s as shouldReadCodexRateLimits, i as isUnsupportedCodexMethodError } from './rateLimitWindows-CrWlGKPl.mjs';
|
|
9
9
|
import { s as stopProcessGracefully, k as killProcessTree } from './processTree-CP5IvQ2Z.mjs';
|
|
10
10
|
|
|
11
11
|
const CODEX_HELPER_LABEL_MAX_CHARS = 80;
|
|
@@ -43,6 +43,87 @@ function codexChildAnnouncements(item) {
|
|
|
43
43
|
return [];
|
|
44
44
|
}
|
|
45
45
|
|
|
46
|
+
const UNEXPECTED_STATUS = /^unexpected status (\d{3}) ([^:]*?):\s*([\s\S]*?)(?:,\s*url:\s*(\S+))?$/;
|
|
47
|
+
function readableCodexErrorText(text) {
|
|
48
|
+
const trimmed = text.trim();
|
|
49
|
+
const status = UNEXPECTED_STATUS.exec(trimmed);
|
|
50
|
+
if (status) {
|
|
51
|
+
const [, code, reason, rawBody, url] = status;
|
|
52
|
+
const head = `HTTP ${code} ${reason.trim()} from the model API`;
|
|
53
|
+
const detail = readableHttpBody(rawBody, `${code} ${reason}`);
|
|
54
|
+
return `${head}${detail ? `: ${detail}` : ""}${url ? ` (${url})` : ""}`;
|
|
55
|
+
}
|
|
56
|
+
return unwrapJsonMessage(trimmed) ?? trimmed;
|
|
57
|
+
}
|
|
58
|
+
function unwrapJsonMessage(text) {
|
|
59
|
+
if (!text.startsWith("{")) return null;
|
|
60
|
+
try {
|
|
61
|
+
const body = JSON.parse(text);
|
|
62
|
+
const inner = typeof body.error === "object" && body.error ? body.error.message : void 0;
|
|
63
|
+
const message = typeof inner === "string" && inner.trim() ? inner : typeof body.error === "string" && body.error.trim() ? body.error : typeof body.message === "string" && body.message.trim() ? body.message : null;
|
|
64
|
+
return message ? message.trim() : null;
|
|
65
|
+
} catch {
|
|
66
|
+
return null;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
function readableHttpBody(raw, statusLine) {
|
|
70
|
+
let body = unwrapJsonMessage(raw.trim()) ?? raw.trim();
|
|
71
|
+
if (/<[a-z!/][^>]*>/i.test(body)) {
|
|
72
|
+
const title = /<title[^>]*>([\s\S]*?)<\/title>/i.exec(body);
|
|
73
|
+
body = title ? title[1] : body.replace(/<[^>]+>/g, " ");
|
|
74
|
+
}
|
|
75
|
+
body = body.replace(/\s+/g, " ").trim();
|
|
76
|
+
if (!body) return null;
|
|
77
|
+
const normalize = (value) => value.toLowerCase().replace(/[^a-z0-9]/g, "");
|
|
78
|
+
if (normalize(body) === normalize(statusLine)) return null;
|
|
79
|
+
return body.length > 240 ? `${body.slice(0, 240)}\u2026` : body;
|
|
80
|
+
}
|
|
81
|
+
function describeCodexFailure(msg) {
|
|
82
|
+
const hasFailure = msg?.status === "failed" || msg?.error !== void 0 && msg?.error !== null;
|
|
83
|
+
if (!hasFailure) return null;
|
|
84
|
+
const err = msg.error;
|
|
85
|
+
if (typeof err === "string" && err.length > 0) return readableCodexErrorText(err);
|
|
86
|
+
if (err && typeof err === "object" && typeof err.message === "string" && err.message.length > 0) {
|
|
87
|
+
return readableCodexErrorText(err.message);
|
|
88
|
+
}
|
|
89
|
+
return "Unknown error";
|
|
90
|
+
}
|
|
91
|
+
function describeCodexRetry(msg) {
|
|
92
|
+
const message = typeof msg?.message === "string" ? msg.message.trim() : "";
|
|
93
|
+
const status = typeof msg?.http_status === "number" ? msg.http_status : null;
|
|
94
|
+
const cause = status ? `HTTP ${status} from the model API` : "a model API error";
|
|
95
|
+
return message ? `Codex is retrying after ${cause} (${message})` : `Codex is retrying after ${cause}`;
|
|
96
|
+
}
|
|
97
|
+
function codexStderrTailOf(error) {
|
|
98
|
+
const tail = error?.codexStderrTail;
|
|
99
|
+
return typeof tail === "string" && tail.trim() ? tail.trim() : null;
|
|
100
|
+
}
|
|
101
|
+
const TRANSPORT_LOSS = /^Codex process (exited|disconnected)\b|stdin not writable| timed out after \d+ms/;
|
|
102
|
+
function describeThrownTurnError(error) {
|
|
103
|
+
const message = error instanceof Error ? error.message : typeof error === "string" ? error : "";
|
|
104
|
+
if (!message.trim() || TRANSPORT_LOSS.test(message)) return null;
|
|
105
|
+
return readableCodexErrorText(message);
|
|
106
|
+
}
|
|
107
|
+
function codexExitOf(error) {
|
|
108
|
+
const exit = error?.codexExit;
|
|
109
|
+
if (!exit || typeof exit !== "object") return null;
|
|
110
|
+
return {
|
|
111
|
+
code: typeof exit.code === "number" ? exit.code : null,
|
|
112
|
+
signal: typeof exit.signal === "string" && exit.signal ? exit.signal : null
|
|
113
|
+
};
|
|
114
|
+
}
|
|
115
|
+
function describeCodexExit(exit, tail) {
|
|
116
|
+
const status = exit.signal ? `signal=${exit.signal}` : `code=${exit.code ?? "null"}`;
|
|
117
|
+
const hint = exit.signal === "SIGKILL" ? " \u2014 killed by the system, most likely out of memory (a very large Codex thread can need several GB to resume)" : "";
|
|
118
|
+
return `Codex process exited (${status})${hint}${tail ? `: ${tail}` : ""}`;
|
|
119
|
+
}
|
|
120
|
+
function processLossMessage(error) {
|
|
121
|
+
const tail = codexStderrTailOf(error);
|
|
122
|
+
const exit = codexExitOf(error);
|
|
123
|
+
if (exit) return `Process exited unexpectedly: ${describeCodexExit(exit, tail)}`;
|
|
124
|
+
return tail ? `Process exited unexpectedly: ${tail}` : "Process exited unexpectedly";
|
|
125
|
+
}
|
|
126
|
+
|
|
46
127
|
function jsonRpcErrorCodeOf(error) {
|
|
47
128
|
const code = error?.jsonRpcCode;
|
|
48
129
|
return typeof code === "number" ? code : null;
|
|
@@ -168,6 +249,9 @@ class CodexAppServerClient {
|
|
|
168
249
|
threadStopGrace = null;
|
|
169
250
|
/** Last few hundred chars of the app-server's stderr: Codex's own last words when it dies. */
|
|
170
251
|
stderrRing = "";
|
|
252
|
+
/** B-901: this app-server ended a turn — it got past loading the thread. */
|
|
253
|
+
servedTurnSinceSpawn = false;
|
|
254
|
+
unexpectedExitHandler = null;
|
|
171
255
|
rawFileChangesByItemId = /* @__PURE__ */ new Map();
|
|
172
256
|
// B-622: inactivity watchdog for the pending turn — re-armed by every
|
|
173
257
|
// notification, never a cap on how long a turn may run (see sendTurnAndWait).
|
|
@@ -218,6 +302,10 @@ class CodexAppServerClient {
|
|
|
218
302
|
get threadModel() {
|
|
219
303
|
return this._threadModel;
|
|
220
304
|
}
|
|
305
|
+
/** B-901: the app-server died on its own (never called for our own disconnect/release). */
|
|
306
|
+
setUnexpectedExitHandler(handler) {
|
|
307
|
+
this.unexpectedExitHandler = handler;
|
|
308
|
+
}
|
|
221
309
|
setEventHandler(handler) {
|
|
222
310
|
this.eventHandler = handler;
|
|
223
311
|
}
|
|
@@ -344,6 +432,7 @@ class CodexAppServerClient {
|
|
|
344
432
|
const aborted = status === "cancelled" || status === "canceled" || status === "aborted" || status === "interrupted";
|
|
345
433
|
const failed = status === "failed" || error !== void 0 && error !== null;
|
|
346
434
|
this.clearThreadStopGrace();
|
|
435
|
+
this.servedTurnSinceSpawn = true;
|
|
347
436
|
this.tryResolvePendingTurn(aborted, turnId, source);
|
|
348
437
|
this._turnId = null;
|
|
349
438
|
this.maybeRefreshRateLimits();
|
|
@@ -590,11 +679,14 @@ class CodexAppServerClient {
|
|
|
590
679
|
}
|
|
591
680
|
this.connected = false;
|
|
592
681
|
const tail = this.stderrTail();
|
|
682
|
+
const exit = { code: code ?? null, signal: signal ?? null };
|
|
593
683
|
const exited = `Codex process exited (code=${code ?? "null"}${signal ? `, signal=${signal}` : ""})`;
|
|
684
|
+
this.unexpectedExitHandler?.({ ...exit, threadId: this._threadId, servedTurn: this.servedTurnSinceSpawn });
|
|
594
685
|
for (const [id, req] of this.pending) {
|
|
595
686
|
if (req.epoch !== epoch) continue;
|
|
596
687
|
const error = new Error(`${exited} while waiting for ${req.method}`);
|
|
597
688
|
error.codexStderrTail = tail;
|
|
689
|
+
error.codexExit = exit;
|
|
598
690
|
req.reject(error);
|
|
599
691
|
this.pending.delete(id);
|
|
600
692
|
}
|
|
@@ -605,12 +697,13 @@ class CodexAppServerClient {
|
|
|
605
697
|
type: "turn_aborted",
|
|
606
698
|
reason: "process-exit",
|
|
607
699
|
...turnId ? { turn_id: turnId } : {},
|
|
608
|
-
error: { message:
|
|
700
|
+
error: { message: describeCodexExit(exit, tail) }
|
|
609
701
|
});
|
|
610
702
|
}
|
|
611
703
|
this.resolvePendingTurn(true);
|
|
612
704
|
});
|
|
613
705
|
this.stderrRing = "";
|
|
706
|
+
this.servedTurnSinceSpawn = false;
|
|
614
707
|
this.steerUnsupported = false;
|
|
615
708
|
this.steeredAwaitingEcho.clear();
|
|
616
709
|
this.childThreadLabels.clear();
|
|
@@ -796,7 +889,12 @@ ${text}`.slice(-400);
|
|
|
796
889
|
config: this.buildThreadConfig(opts?.mcpServers ?? defaults.mcpServers),
|
|
797
890
|
baseInstructions: null,
|
|
798
891
|
developerInstructions: null,
|
|
799
|
-
persistExtendedHistory: true
|
|
892
|
+
persistExtendedHistory: true,
|
|
893
|
+
// B-901: nothing here reads the resumed turns, and on a long thread
|
|
894
|
+
// they came back as one JSON line of hundreds of MB (400 MB for an
|
|
895
|
+
// 850 MB rollout) that this process had to buffer and parse. Older
|
|
896
|
+
// Codex ignores the unknown param, as with lastTurnId (B-851).
|
|
897
|
+
excludeTurns: true
|
|
800
898
|
};
|
|
801
899
|
const result = await this.request("thread/resume", params);
|
|
802
900
|
this._threadId = result.thread.id;
|
|
@@ -1648,4 +1746,4 @@ ${text}`.slice(-400);
|
|
|
1648
1746
|
}
|
|
1649
1747
|
}
|
|
1650
1748
|
|
|
1651
|
-
export { CodexAppServerClient as C };
|
|
1749
|
+
export { CodexAppServerClient as C, describeCodexRetry as a, describeThrownTurnError as b, describeCodexFailure as d, processLossMessage as p };
|