very-happy-cli 0.2.182 → 0.2.183
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-DLk3gMYH.mjs → AcpBackend-9c-Jeaxd.mjs} +3 -3
- package/dist/{AcpBackend-JA5eu8Y0.cjs → AcpBackend-B-aMuEzO.cjs} +3 -3
- package/dist/{AcpSessionManager-DjYidq4C.cjs → AcpSessionManager-BxXe24AV.cjs} +10 -3
- package/dist/{AcpSessionManager-OrCww-Qv.mjs → AcpSessionManager-CS0FOSQk.mjs} +10 -3
- package/dist/{BasePermissionHandler-u-neo-iN.mjs → BasePermissionHandler-BJ1ID_Br.mjs} +1 -1
- package/dist/{BasePermissionHandler-D3PMKLBS.cjs → BasePermissionHandler-BREjppjP.cjs} +1 -1
- package/dist/{acpSessionResume-u2TwX5Jd.mjs → acpSessionResume-BKtI9Jq_.mjs} +1 -1
- package/dist/{acpSessionResume-Dxo8222T.cjs → acpSessionResume-mVoJ75vI.cjs} +1 -1
- package/dist/{agentHome-D3hNrnoA.mjs → agentHome-B8Ctr_Nu.mjs} +4 -4
- package/dist/{agentHome-CP1tCBXz.cjs → agentHome-rzjm56o4.cjs} +4 -4
- package/dist/{api-C_YSQnsi.mjs → api-C29WLYkW.mjs} +79 -12
- package/dist/{api-CZWcG7uh.cjs → api-xZiqVynF.cjs} +81 -11
- package/dist/{apiMachine-DPGrED5C.cjs → apiMachine-B-FNBIYG.cjs} +14 -14
- package/dist/{apiMachine-C_GA5Bm-.mjs → apiMachine-Dz6Yfk0m.mjs} +14 -14
- package/dist/{attachmentContent-I_dJIevE.cjs → attachmentContent-COV4LF8k.cjs} +2 -2
- package/dist/{attachmentContent-Ckzyb1Uy.mjs → attachmentContent-DwY0uIg6.mjs} +2 -2
- package/dist/{auth-Lw_utSMV.cjs → auth-CYtk9_ga.cjs} +5 -5
- package/dist/{auth-BKnE7uv7.cjs → auth-D_qsnVr3.cjs} +8 -8
- package/dist/{auth-DOXMI-xp.mjs → auth-DvbSDalm.mjs} +8 -8
- package/dist/{auth-CGgpiJ5-.mjs → auth-xT70IYMx.mjs} +5 -5
- package/dist/{auto-CIgFHIyQ.cjs → auto-DT_PfpCx.cjs} +32 -25
- package/dist/{auto-Z56mMZnH.mjs → auto-IiPqvIsN.mjs} +32 -26
- package/dist/{bootstrap-DsXp74wv.cjs → bootstrap-C50NkfPx.cjs} +2 -2
- package/dist/{bootstrap-D3vlOROj.mjs → bootstrap-DS8Acdhm.mjs} +2 -2
- package/dist/{browser-CUxGoATV.mjs → browser-1j9gdZoD.mjs} +1 -1
- package/dist/{browser-CZlA9AkO.cjs → browser-CxKZLd2T.cjs} +1 -1
- package/dist/{claudeLocal-oELvwiZL.cjs → claudeLocal-CgNWpepB.cjs} +5 -5
- package/dist/{claudeLocal-FnTUgwCi.mjs → claudeLocal-U1Fa9sJo.mjs} +5 -5
- package/dist/{claudeLocalLauncher-CO5YHCzi.mjs → claudeLocalLauncher-BjCsfZUE.mjs} +10 -10
- package/dist/{claudeLocalLauncher-QsVXEVdE.cjs → claudeLocalLauncher-IyFm0D6a.cjs} +10 -10
- package/dist/{claudeSessionFork-Cspr6QW0.mjs → claudeSessionFork-6-1vKISn.mjs} +1 -1
- package/dist/{claudeSessionFork-BA4GE5AL.cjs → claudeSessionFork-BUO1XdSm.cjs} +1 -1
- package/dist/{client-xnWiHqdb.cjs → client--vZueZYF.cjs} +4 -4
- package/dist/{client-o-meK7-a.mjs → client-5_zDNdOh.mjs} +2 -2
- package/dist/{client-Ctbw05Xj.mjs → client-BgHvK7lo.mjs} +15 -7
- package/dist/{client-CDuW4MS9.cjs → client-DYGDBD0M.cjs} +15 -7
- package/dist/{client-DK8CzUry.cjs → client-DcKJ0ul_.cjs} +2 -2
- package/dist/{client-BGfmSbWc.mjs → client-DfDyE322.mjs} +4 -4
- package/dist/codex/happyMcpStdioBridge.cjs +16 -16
- package/dist/codex/happyMcpStdioBridge.mjs +16 -16
- package/dist/{codexAppServerClient-DhNDTU_i.cjs → codexAppServerClient-C3nrTfwY.cjs} +3 -3
- package/dist/{codexAppServerClient-BlsOZLul.mjs → codexAppServerClient-DvBg4hGc.mjs} +3 -3
- package/dist/{codexCommand-BGx5NMQR.mjs → codexCommand-Bqp2--g_.mjs} +94 -60
- package/dist/{codexCommand-DJDPfpIs.cjs → codexCommand-DSiU6MNt.cjs} +94 -60
- package/dist/{codexTermination-CqPMuokw.cjs → codexTermination-D9TRTglF.cjs} +1 -1
- package/dist/{codexTermination-CVhhwHZU.mjs → codexTermination-DsliWl_s.mjs} +1 -1
- package/dist/{config-CHpxzXBL.cjs → config-CRhWiOwi.cjs} +3 -3
- package/dist/{config-CWAe08-Q.mjs → config-DeaqRn3o.mjs} +3 -3
- package/dist/{configuration-B-CugKJ3.cjs → configuration-K3I6yOjZ.cjs} +1 -1
- package/dist/{configuration-YXw_Dcsb.mjs → configuration-elzht62L.mjs} +1 -1
- package/dist/{connect-BmHvMXH2.cjs → connect-B5UbfmO3.cjs} +13 -13
- package/dist/{connect-CPeJXHha.mjs → connect-CT5cOlnC.mjs} +13 -13
- package/dist/{context-Drzs_Z38.mjs → context-CLj1_RYF.mjs} +1 -1
- package/dist/{context-BtIVqHI5.cjs → context-DNKNF8Yh.cjs} +1 -1
- package/dist/{controlClient-D0kGwKYx.cjs → controlClient-ChqmxgbB.cjs} +3 -3
- package/dist/{controlClient-BL4hb4l3.mjs → controlClient-CuYQs2aZ.mjs} +3 -3
- package/dist/{createSessionMetadata-DvGDsnsn.mjs → createSessionMetadata-C1MbLQnh.mjs} +2 -2
- package/dist/{createSessionMetadata-L499emJn.cjs → createSessionMetadata-QfiRx4Tf.cjs} +2 -2
- package/dist/daemonSupervisor-57JYYzMf.cjs +268 -0
- package/dist/daemonSupervisor-DfzrtNhM.mjs +245 -0
- package/dist/{defaultPermissionMode-MXpZlXud.cjs → defaultPermissionMode-DQmdZZIg.cjs} +2 -2
- package/dist/{defaultPermissionMode-BLfxu-Yz.mjs → defaultPermissionMode-U9LuUeQh.mjs} +2 -2
- package/dist/{deterministicJson-CfLkBRvU.cjs → deterministicJson-BBRUcB8i.cjs} +569 -17
- package/dist/{deterministicJson-B_UAbmQ4.mjs → deterministicJson-BixlyPWV.mjs} +572 -21
- package/dist/{doctor-DMvlzmnE.cjs → doctor-CKgHUV4W.cjs} +7 -7
- package/dist/{doctor-bKScPtZu.mjs → doctor-Dban2oE2.mjs} +7 -7
- package/dist/{downloadTarget-D33BFvew.cjs → downloadTarget-CmC11Y7E.cjs} +6 -6
- package/dist/{downloadTarget-J9j37eFG.mjs → downloadTarget-VUTd9lEO.mjs} +6 -6
- package/dist/{ensureDaemonRunning-2IqWROJp.cjs → ensureDaemonRunning-L0fl0cLE.cjs} +5 -5
- package/dist/{ensureDaemonRunning-DLvwhpNg.mjs → ensureDaemonRunning-khb8Nr1n.mjs} +5 -5
- package/dist/{handleResumeCommand-CjtjQ_I7.mjs → handleResumeCommand-CLDGWpTJ.mjs} +5 -5
- package/dist/{handleResumeCommand-Dp2Y-p6V.cjs → handleResumeCommand-D9myBN2N.cjs} +5 -5
- package/dist/{index-BOT0Tg5E.mjs → index-BMZx-699.mjs} +4 -4
- package/dist/{index-CZC7egJA.cjs → index-BdJs0465.cjs} +3 -3
- package/dist/{index-BI0h2Zks.mjs → index-BptfFoXM.mjs} +268 -77
- package/dist/{index-DymOv3kK.cjs → index-COSjJPIv.cjs} +4 -4
- package/dist/{index-D_LvOWUN.mjs → index-CtwqBeH6.mjs} +3 -3
- package/dist/{index-DYVIbhAJ.cjs → index-DgA79dVw.cjs} +40 -40
- package/dist/{index-oh8XEozJ.cjs → index-Fq-jxjsB.cjs} +277 -76
- package/dist/{index-Cllzqoes.mjs → index-GkkbUZX-.mjs} +4 -4
- package/dist/{index-kA46KMxN.mjs → index-IRI8s8kz.mjs} +41 -41
- package/dist/{index-B_aNaW9w.cjs → index-y4JNyz9H.cjs} +4 -4
- package/dist/index.cjs +2 -2
- package/dist/index.mjs +2 -2
- package/dist/{install-D2NCbeJ-.cjs → install-BATFlr_l.cjs} +2 -2
- package/dist/{install-D0inLCv-.mjs → install-F3rP8tBU.mjs} +2 -2
- package/dist/{install-C46mkr9a.mjs → install-JvCk2PJV.mjs} +3 -3
- package/dist/{install-BAa_Xmof.cjs → install-cn98bTCs.cjs} +3 -3
- package/dist/lib.cjs +12 -12
- package/dist/lib.d.cts +1 -1
- package/dist/lib.d.mts +1 -1
- package/dist/lib.mjs +12 -12
- package/dist/{lidState-DcPvwniz.cjs → lidState-Bcs5kRHi.cjs} +1 -1
- package/dist/{lidState-D8Iuvjgl.mjs → lidState-DXeYTsrm.mjs} +1 -1
- package/dist/{localHappyAgentAuth-D3rQDRd9.mjs → localHappyAgentAuth-C1A4ChCR.mjs} +1 -1
- package/dist/{localHappyAgentAuth-SD6GM97y.cjs → localHappyAgentAuth-CypTSe42.cjs} +1 -1
- package/dist/{logger-DK1ytCz6.cjs → logger-Cgwz30rK.cjs} +2 -2
- package/dist/{logger-DpqihN1f.mjs → logger-RMPh5aqe.mjs} +2 -2
- package/dist/{machineMetadata-IJc6_iyx.cjs → machineMetadata-BSOGMNRi.cjs} +3 -3
- package/dist/{machineMetadata-D4E3qoIG.mjs → machineMetadata-BTUtPRth.mjs} +3 -3
- package/dist/{main-DUXh2rgW.cjs → main-4iiwYpCR.cjs} +61 -56
- package/dist/{main-CpUmw7hm.mjs → main-DNDL6t8z.mjs} +61 -56
- package/dist/{mcp-D5f3Vd-z.cjs → mcp-C7eEoGhz.cjs} +15 -15
- package/dist/{mcp-66g1TJ8P.mjs → mcp-DXYDPOpJ.mjs} +15 -15
- package/dist/{mirrorProtocol-bsCUcaCY.mjs → mirrorProtocol-DQRy5PaT.mjs} +3 -3
- package/dist/{mirrorProtocol-DkWOcZh9.cjs → mirrorProtocol-c5g5MgNc.cjs} +3 -3
- package/dist/{package-BfeqAzyJ.cjs → package-3aPiSpZj.cjs} +7 -7
- package/dist/{package-CKj8zndE.mjs → package-CTrz6U3C.mjs} +7 -7
- package/dist/{panels-r8LmaBs6.mjs → panels-B5sZ84vA.mjs} +5 -5
- package/dist/{panels-2PXsw9-d.cjs → panels-BmsmKHbw.cjs} +5 -5
- package/dist/{peerTools-D_id4d41.mjs → peerTools-DIPOX033.mjs} +5 -5
- package/dist/{peerTools-BVp1z0T_.cjs → peerTools-Dxe7iCi_.cjs} +5 -5
- package/dist/{persistence-BdpwWXKh.cjs → persistence-DZRMUZZS.cjs} +2 -2
- package/dist/{persistence-jOEuAFTS.mjs → persistence-zJo4r7YI.mjs} +2 -2
- package/dist/{piRunnerArgs-vxCHKnSA.cjs → piRunnerArgs-BSPiS6tZ.cjs} +1 -1
- package/dist/{piRunnerArgs-68I5F_M1.mjs → piRunnerArgs-IVdoHUB6.mjs} +1 -1
- package/dist/{piRuntime-C3Dg5uni.cjs → piRuntime-BJzjlMcN.cjs} +2 -2
- package/dist/{piRuntime-DgLIard1.mjs → piRuntime-BvHO3vgO.mjs} +2 -2
- package/dist/{piTerminal-C135BcLP.cjs → piTerminal-Cz4pW55d.cjs} +18 -18
- package/dist/{piTerminal-DJL0w-uA.mjs → piTerminal-D7vBOpkE.mjs} +18 -18
- package/dist/{pushNotifications-CMmRsbKv.mjs → pushNotifications-C4R9-1hU.mjs} +3 -3
- package/dist/{pushNotifications-CyQVDThC.cjs → pushNotifications-CgIrYml3.cjs} +3 -3
- package/dist/{query-CK--1fbL.cjs → query-CZQG1PdU.cjs} +1 -1
- package/dist/{query-CPXnDURZ.mjs → query-DKPmDsHS.mjs} +1 -1
- package/dist/{rateLimitWindows-DJxnNw-X.cjs → rateLimitWindows-CPV0nLeq.cjs} +1 -1
- package/dist/{rateLimitWindows-Cqa4AGaB.mjs → rateLimitWindows-HlHATOQ0.mjs} +1 -1
- package/dist/{registerCommonHandlers-DbNoM39q.cjs → registerCommonHandlers-D1pC83Op.cjs} +2 -2
- package/dist/{registerCommonHandlers-K8dICQO2.mjs → registerCommonHandlers-a9lHojSV.mjs} +2 -2
- package/dist/{registerKillSessionHandler-O1iriOMO.mjs → registerKillSessionHandler-Bp-fuH-w.mjs} +6 -6
- package/dist/{registerKillSessionHandler-DiS_go8d.cjs → registerKillSessionHandler-nTi2vVJy.cjs} +6 -6
- package/dist/{remoteSessionClient-BlURPulk.mjs → remoteSessionClient-Cwrddscy.mjs} +5 -5
- package/dist/{remoteSessionClient-CtV9mDko.cjs → remoteSessionClient-HQAKAvVd.cjs} +5 -5
- package/dist/{reportProgressTool-DlD_xjzU.cjs → reportProgressTool-Be-8ADI4.cjs} +4 -4
- package/dist/{reportProgressTool-nCExrHZH.mjs → reportProgressTool-CcZ32nrd.mjs} +4 -4
- package/dist/{resources-CH1iP6Cv.mjs → resources-CLdQfe3b.mjs} +1 -1
- package/dist/{resources-BPyN59Iv.cjs → resources-CqwHPhdK.cjs} +1 -1
- package/dist/{run-drtwHYkO.mjs → run-BBU8GyxE.mjs} +59 -243
- package/dist/{run-BBNrcCfI.cjs → run-CxRJk9qq.cjs} +69 -254
- package/dist/{runClaude-CFp27Tyi.mjs → runClaude-DR6pEQwd.mjs} +22 -22
- package/dist/{runClaude-B3KSeby4.cjs → runClaude-Dd5zJaUZ.cjs} +22 -22
- package/dist/{runClaudeDeps-DMcv93lA.mjs → runClaudeDeps-COgZaUZm.mjs} +50 -45
- package/dist/{runClaudeDeps-C_C9TCI0.cjs → runClaudeDeps-CTtZ_1mC.cjs} +45 -40
- package/dist/{runGemini-Bc6SY-hd.mjs → runGemini-DVoVUfPp.mjs} +37 -35
- package/dist/{runGemini-DzdSBAr9.cjs → runGemini-DX72qB92.cjs} +37 -35
- package/dist/{runOpenClaw-DI0qMlgF.mjs → runOpenClaw-BHjzmzeC.mjs} +18 -18
- package/dist/{runOpenClaw-DN6rEVqC.cjs → runOpenClaw-BSg4hFVt.cjs} +18 -18
- package/dist/{sandbox-v-ffe8LR.mjs → sandbox-CWR9EqoN.mjs} +4 -4
- package/dist/{sandbox-DtttPBMA.cjs → sandbox-D1T_hmgZ.cjs} +4 -4
- package/dist/{selfCheck-B-yy6bW3.cjs → selfCheck-CE7vlnNS.cjs} +36 -36
- package/dist/selfCheck-ZGgBtxFQ.mjs +85 -0
- package/dist/{send-DpBwSZuj.mjs → send-BDF0Zvxo.mjs} +8 -8
- package/dist/{send-ShzXYPRu.cjs → send-BxZqRCcG.cjs} +8 -8
- package/dist/{server-DScgJXxa.mjs → server-B4JtnDLF.mjs} +4 -4
- package/dist/{server-CEzKrfKj.cjs → server-DB7_70Mi.cjs} +6 -6
- package/dist/{sessionLock-Dc0fadGG.cjs → sessionLock-BXvFN6uw.cjs} +3 -3
- package/dist/{sessionLock-B6K4SBZD.mjs → sessionLock-CXOOX-VD.mjs} +3 -3
- package/dist/{sessionOps-Dx7wARjI.cjs → sessionOps-BWlDlFYP.cjs} +4 -4
- package/dist/{sessionOps-D0BPWPoh.mjs → sessionOps-ByVggB_q.mjs} +4 -4
- package/dist/{sessionScanner-BJ35TVG6.cjs → sessionScanner-DkxPB5VA.cjs} +3 -3
- package/dist/{sessionScanner-9Fpgaxtf.mjs → sessionScanner-r66RtF95.mjs} +3 -3
- package/dist/{sessions-TZGGAry1.cjs → sessions-BiJTxFy9.cjs} +10 -10
- package/dist/{sessions-CFtDlyZd.mjs → sessions-C1lLK_a9.mjs} +10 -10
- package/dist/{setupOfflineReconnection-Biaus-0T.mjs → setupOfflineReconnection-Bl3DuakT.mjs} +2 -2
- package/dist/{setupOfflineReconnection-B1GsVA8P.cjs → setupOfflineReconnection-CecTiFZ-.cjs} +2 -2
- package/dist/{spawn-CsoQ-Ecz.mjs → spawn-D-8MlEM6.mjs} +14 -14
- package/dist/{spawn-BRTuypQ2.cjs → spawn-D79mVa3h.cjs} +14 -14
- package/dist/{spawnAgents-Co-SLcx-.mjs → spawnAgents-DJHjq01u.mjs} +1 -1
- package/dist/{spawnAgents-CG211IW7.cjs → spawnAgents-Sfnf-4pN.cjs} +1 -1
- package/dist/{spawnHappyCLI-D47kX6jg.cjs → spawnHappyCLI-CQwQs9G5.cjs} +1 -1
- package/dist/{spawnHappyCLI-D1doCjkZ.mjs → spawnHappyCLI-v_bJwZ4Z.mjs} +1 -1
- package/dist/{specialCommands-Ch-Gvy-i.cjs → specialCommands-CWMVfT5s.cjs} +3 -3
- package/dist/{specialCommands-xSmqT_Fu.mjs → specialCommands-yMnFvS-W.mjs} +3 -3
- package/dist/{startFileWatcher-CCl2fFxT.mjs → startFileWatcher-BCDkT_tr.mjs} +1 -1
- package/dist/{startFileWatcher-gKQTstR6.cjs → startFileWatcher-GW4_E7dV.cjs} +1 -1
- package/dist/{startupSessionCreate-DlZc8yPl.mjs → startupSessionCreate-BcAGYo51.mjs} +1 -1
- package/dist/{startupSessionCreate-BXqoUX30.cjs → startupSessionCreate-tBRa_ze8.cjs} +1 -1
- package/dist/{streamRelay-DnJXsi36.mjs → streamRelay-BEDiy6_b.mjs} +1 -1
- package/dist/{streamRelay-B-J-4St1.cjs → streamRelay-BZ8drtof.cjs} +1 -1
- package/dist/{sync-BbjMC3sR.mjs → sync--QUIOuf8.mjs} +1 -1
- package/dist/{sync-BxMdnZzz.cjs → sync-BMDkyo75.cjs} +1 -1
- package/dist/{systemPrompt-C2KojRmK.cjs → systemPrompt-DoHSXrH0.cjs} +2 -2
- package/dist/{systemPrompt-CmSDAoIx.mjs → systemPrompt-O0Kd6vbA.mjs} +2 -2
- package/dist/{teams-DESdalox.cjs → teams-BkZop-sP.cjs} +9 -9
- package/dist/{teams-lRy1MS0Z.mjs → teams-CTF1gT48.mjs} +9 -9
- package/dist/{template-BaHAmH2K.cjs → template-CeC1dYe-.cjs} +32 -2
- package/dist/{template-CiOPa2rd.mjs → template-D1fm22em.mjs} +31 -3
- package/dist/{time-Cfknl7xG.mjs → time-B2KKdAym.mjs} +1 -1
- package/dist/{time-DNLeIRgR.cjs → time-CdCotzKU.cjs} +1 -1
- package/dist/{titleGenerator-ClnMSzwC.mjs → titleGenerator-BFDczskR.mjs} +1 -1
- package/dist/{titleGenerator-YNutaU88.cjs → titleGenerator-DZH1XqAf.cjs} +2 -2
- package/dist/{todo-DZbK5POc.mjs → todo-C2gyOUom.mjs} +6 -6
- package/dist/{todo-DS75Mboz.cjs → todo-DnTFTHmV.cjs} +6 -6
- package/dist/{tools-ClYcb1YQ.cjs → tools-C8rpwyIl.cjs} +1 -1
- package/dist/{tools-BgdU0dWp.mjs → tools-DUjkqSQL.mjs} +1 -1
- package/dist/{uninstall-bXenFevR.mjs → uninstall-B5Ew50mZ.mjs} +3 -3
- package/dist/{uninstall-Di1vPBLV.cjs → uninstall-CKMPWTMv.cjs} +3 -3
- package/package.json +7 -7
- package/dist/daemonSupervisor-B-SPSqhs.cjs +0 -13
- package/dist/daemonSupervisor-C6urv3_8.mjs +0 -10
- package/dist/selfCheck-BDfTwxqB.mjs +0 -85
|
@@ -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-K3I6yOjZ.cjs');
|
|
4
|
+
var persistence = require('./persistence-DZRMUZZS.cjs');
|
|
5
5
|
|
|
6
6
|
const UNSUPPORTED_BACKOFF_MS = 10 * 6e4;
|
|
7
7
|
class ProjectsUnsupportedError extends Error {
|
|
@@ -2,10 +2,10 @@ import { randomUUID } from 'node:crypto';
|
|
|
2
2
|
import { execFile } from 'node:child_process';
|
|
3
3
|
import { promisify } from 'node:util';
|
|
4
4
|
import { basename, dirname } from 'node:path';
|
|
5
|
-
import {
|
|
6
|
-
import { c as configuration } from './configuration-
|
|
7
|
-
import { r as readSettings, c as readPersistedSessions, b as readCredentialsForConfiguredRelay } from './persistence-
|
|
8
|
-
import { r as readTeamScope, t as teamScopePath, w as writeTeamScope } from './context-
|
|
5
|
+
import { f as isInsideTeamWorktree, r as rebaseTeamWorktreePath } from './index-BptfFoXM.mjs';
|
|
6
|
+
import { c as configuration } from './configuration-elzht62L.mjs';
|
|
7
|
+
import { r as readSettings, c as readPersistedSessions, b as readCredentialsForConfiguredRelay } from './persistence-zJo4r7YI.mjs';
|
|
8
|
+
import { r as readTeamScope, t as teamScopePath, w as writeTeamScope } from './context-CLj1_RYF.mjs';
|
|
9
9
|
|
|
10
10
|
async function teamRequest(path, method, token, scoped, body) {
|
|
11
11
|
const response = await fetch(`${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-C8rpwyIl.cjs');
|
|
4
|
+
var reportProgressTool = require('../reportProgressTool-Be-8ADI4.cjs');
|
|
5
|
+
var peerTools = require('../peerTools-Dxe7iCi_.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,36 +10,36 @@ 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--vZueZYF.cjs');
|
|
14
14
|
require('node:crypto');
|
|
15
15
|
require('node:child_process');
|
|
16
16
|
require('node:util');
|
|
17
17
|
require('node:path');
|
|
18
|
-
require('../index-
|
|
18
|
+
require('../index-Fq-jxjsB.cjs');
|
|
19
19
|
require('@paralleldrive/cuid2');
|
|
20
|
-
require('../configuration-
|
|
20
|
+
require('../configuration-K3I6yOjZ.cjs');
|
|
21
21
|
require('node:fs');
|
|
22
22
|
require('node:os');
|
|
23
|
-
require('../package-
|
|
23
|
+
require('../package-3aPiSpZj.cjs');
|
|
24
24
|
require('node:fs/promises');
|
|
25
|
-
require('../persistence-
|
|
25
|
+
require('../persistence-DZRMUZZS.cjs');
|
|
26
26
|
require('../authRelay-Dy1qU9td.cjs');
|
|
27
27
|
require('tweetnacl');
|
|
28
|
-
require('../logger-
|
|
28
|
+
require('../logger-Cgwz30rK.cjs');
|
|
29
29
|
require('chalk');
|
|
30
|
-
require('../context-
|
|
31
|
-
require('../client-
|
|
30
|
+
require('../context-DNKNF8Yh.cjs');
|
|
31
|
+
require('../client-DYGDBD0M.cjs');
|
|
32
32
|
require('../precheckCompat-CWOi5c9L.cjs');
|
|
33
|
-
require('../client-
|
|
33
|
+
require('../client-DcKJ0ul_.cjs');
|
|
34
34
|
require('../prompt-Bof2aQkI.cjs');
|
|
35
35
|
require('../ids-B6ZC0HGt.cjs');
|
|
36
|
-
require('../controlClient-
|
|
37
|
-
require('../sessionOps-
|
|
36
|
+
require('../controlClient-ChqmxgbB.cjs');
|
|
37
|
+
require('../sessionOps-BWlDlFYP.cjs');
|
|
38
38
|
require('axios');
|
|
39
|
-
require('../time-
|
|
39
|
+
require('../time-CdCotzKU.cjs');
|
|
40
40
|
require('socket.io-client');
|
|
41
41
|
require('../backgroundTaskActivity-CBvUdj39.cjs');
|
|
42
|
-
require('../remoteSessionClient-
|
|
42
|
+
require('../remoteSessionClient-HQAKAvVd.cjs');
|
|
43
43
|
require('../trimIdent-4gvk9Wk6.cjs');
|
|
44
44
|
|
|
45
45
|
function parseArgs(argv) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { r as registerTeamsTools } from '../tools-
|
|
2
|
-
import { r as registerAutomationTools, a as registerProjectTools, b as registerReportProgressTool } from '../reportProgressTool-
|
|
3
|
-
import { r as registerSessionPeerTools } from '../peerTools-
|
|
1
|
+
import { r as registerTeamsTools } from '../tools-DUjkqSQL.mjs';
|
|
2
|
+
import { r as registerAutomationTools, a as registerProjectTools, b as registerReportProgressTool } from '../reportProgressTool-CcZ32nrd.mjs';
|
|
3
|
+
import { r as registerSessionPeerTools } from '../peerTools-DIPOX033.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,36 +8,36 @@ 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-DfDyE322.mjs';
|
|
12
12
|
import 'node:crypto';
|
|
13
13
|
import 'node:child_process';
|
|
14
14
|
import 'node:util';
|
|
15
15
|
import 'node:path';
|
|
16
|
-
import '../index-
|
|
16
|
+
import '../index-BptfFoXM.mjs';
|
|
17
17
|
import '@paralleldrive/cuid2';
|
|
18
|
-
import '../configuration-
|
|
18
|
+
import '../configuration-elzht62L.mjs';
|
|
19
19
|
import 'node:fs';
|
|
20
20
|
import 'node:os';
|
|
21
|
-
import '../package-
|
|
21
|
+
import '../package-CTrz6U3C.mjs';
|
|
22
22
|
import 'node:fs/promises';
|
|
23
|
-
import '../persistence-
|
|
23
|
+
import '../persistence-zJo4r7YI.mjs';
|
|
24
24
|
import '../authRelay-DhQhkBvX.mjs';
|
|
25
25
|
import 'tweetnacl';
|
|
26
|
-
import '../logger-
|
|
26
|
+
import '../logger-RMPh5aqe.mjs';
|
|
27
27
|
import 'chalk';
|
|
28
|
-
import '../context-
|
|
29
|
-
import '../client-
|
|
28
|
+
import '../context-CLj1_RYF.mjs';
|
|
29
|
+
import '../client-BgHvK7lo.mjs';
|
|
30
30
|
import '../precheckCompat-DeEbilbr.mjs';
|
|
31
|
-
import '../client-
|
|
31
|
+
import '../client-5_zDNdOh.mjs';
|
|
32
32
|
import '../prompt-QHuFx9j6.mjs';
|
|
33
33
|
import '../ids-DU6sLx4C.mjs';
|
|
34
|
-
import '../controlClient-
|
|
35
|
-
import '../sessionOps-
|
|
34
|
+
import '../controlClient-CuYQs2aZ.mjs';
|
|
35
|
+
import '../sessionOps-ByVggB_q.mjs';
|
|
36
36
|
import 'axios';
|
|
37
|
-
import '../time-
|
|
37
|
+
import '../time-B2KKdAym.mjs';
|
|
38
38
|
import 'socket.io-client';
|
|
39
39
|
import '../backgroundTaskActivity-8PdPxrvy.mjs';
|
|
40
|
-
import '../remoteSessionClient-
|
|
40
|
+
import '../remoteSessionClient-Cwrddscy.mjs';
|
|
41
41
|
import '../trimIdent-BAjmv_TG.mjs';
|
|
42
42
|
|
|
43
43
|
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-Cgwz30rK.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-3aPiSpZj.cjs');
|
|
10
|
+
var rateLimitWindows = require('./rateLimitWindows-CPV0nLeq.cjs');
|
|
11
11
|
var processTree = require('./processTree-CMHWlVse.cjs');
|
|
12
12
|
|
|
13
13
|
const CODEX_HELPER_LABEL_MAX_CHARS = 80;
|
|
@@ -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-RMPh5aqe.mjs';
|
|
5
5
|
import { e as errorLogMetadata, c as contentLogMetadata } from './contentLogMetadata-BlWI0egu.mjs';
|
|
6
6
|
import { i as initializeSandbox, w as wrapForMcpTransport } from './manager-BEsI4qt3.mjs';
|
|
7
|
-
import { p as packageJson } from './package-
|
|
8
|
-
import { s as shouldReadCodexRateLimits, i as isUnsupportedCodexMethodError } from './rateLimitWindows-
|
|
7
|
+
import { p as packageJson } from './package-CTrz6U3C.mjs';
|
|
8
|
+
import { s as shouldReadCodexRateLimits, i as isUnsupportedCodexMethodError } from './rateLimitWindows-HlHATOQ0.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;
|
|
@@ -1,105 +1,105 @@
|
|
|
1
|
-
import { a as authAndSetupMachineIfNeeded } from './auth-
|
|
2
|
-
import {
|
|
3
|
-
import { h as hashObject, s as startHappyServer, c as createProjectInjector } from './deterministicJson-
|
|
4
|
-
import { s as sharedProjectsClient } from './client-
|
|
1
|
+
import { a as authAndSetupMachineIfNeeded } from './auth-xT70IYMx.mjs';
|
|
2
|
+
import { g as createEnvelope, j as BUILTIN_TODO_DISCOVERY, P as PROMPT_QUEUE_CAPABILITY, I as CODEX_STEER_CAPABILITY, a as PROJECT_SESSION_CAPABILITY } from './index-BptfFoXM.mjs';
|
|
3
|
+
import { h as hashObject, s as startHappyServer, c as createProjectInjector } from './deterministicJson-BixlyPWV.mjs';
|
|
4
|
+
import { s as sharedProjectsClient } from './client-5_zDNdOh.mjs';
|
|
5
5
|
import { unlink } from 'node:fs/promises';
|
|
6
6
|
import { p as publishForkBackfillWhenCommitted, F as FORK_BACKFILL_CAPABILITY } from './forkBackfill-DYIjlN1Z.mjs';
|
|
7
7
|
import { randomUUID } from 'node:crypto';
|
|
8
8
|
import { createId } from '@paralleldrive/cuid2';
|
|
9
|
+
import { t as textResultPayload, d as toolResultContentText, c as connectionState, A as ApiClient } from './api-C29WLYkW.mjs';
|
|
9
10
|
import { r as registerAgentAttachmentDownloads } from './agentAttachments-M_B5qEF2.mjs';
|
|
10
|
-
import { C as CLAUDE_ATTACHMENT_KINDS, a as stageClaudeAttachments, b as appendStagedAttachmentsToPrompt } from './attachmentContent-
|
|
11
|
+
import { C as CLAUDE_ATTACHMENT_KINDS, a as stageClaudeAttachments, b as appendStagedAttachmentsToPrompt } from './attachmentContent-DwY0uIg6.mjs';
|
|
11
12
|
import { useStdout, useInput, Box, Text, render } from 'ink';
|
|
12
|
-
import { c as claimSessionOrExit, a as applyServerSnapshot, b as applyReconnectReplay, w as withoutServerSnapshot, m as mergeReconnectMetadata, e as exitCursorStamp } from './sessionLock-
|
|
13
|
+
import { c as claimSessionOrExit, a as applyServerSnapshot, b as applyReconnectReplay, w as withoutServerSnapshot, m as mergeReconnectMetadata, e as exitCursorStamp } from './sessionLock-CXOOX-VD.mjs';
|
|
13
14
|
import React, { useState, useRef, useEffect, useCallback } from 'react';
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import { B as
|
|
19
|
-
import { B as BaseReasoningProcessor, s as settleCodexSession } from './codexTermination-CVhhwHZU.mjs';
|
|
15
|
+
import { C as CodexAppServerClient } from './codexAppServerClient-DvBg4hGc.mjs';
|
|
16
|
+
import { p as parseSpecialCommand, w as wrapperRateLimitReporter } from './specialCommands-yMnFvS-W.mjs';
|
|
17
|
+
import { l as logger } from './logger-RMPh5aqe.mjs';
|
|
18
|
+
import { B as BasePermissionHandler } from './BasePermissionHandler-BJ1ID_Br.mjs';
|
|
19
|
+
import { B as BaseReasoningProcessor, s as settleCodexSession } from './codexTermination-DsliWl_s.mjs';
|
|
20
20
|
import { execSync } from 'node:child_process';
|
|
21
|
-
import { r as readSettings, l as latchKeepAwake, e as evaluateWrapperIdle, a as resolveCheckMs, H as HIBERNATION_CAPABILITY } from './persistence-
|
|
22
|
-
import { g as getInitialMachineMetadata } from './machineMetadata-
|
|
23
|
-
import { c as configuration } from './configuration-
|
|
24
|
-
import { M as MessageQueue2, r as registerKillSessionHandler } from './registerKillSessionHandler-
|
|
21
|
+
import { r as readSettings, l as latchKeepAwake, e as evaluateWrapperIdle, a as resolveCheckMs, H as HIBERNATION_CAPABILITY } from './persistence-zJo4r7YI.mjs';
|
|
22
|
+
import { g as getInitialMachineMetadata } from './machineMetadata-BTUtPRth.mjs';
|
|
23
|
+
import { c as configuration } from './configuration-elzht62L.mjs';
|
|
24
|
+
import { M as MessageQueue2, r as registerKillSessionHandler } from './registerKillSessionHandler-Bp-fuH-w.mjs';
|
|
25
25
|
import { p as projectPath } from './projectPath-BTBIMB57.mjs';
|
|
26
26
|
import { join } from 'node:path';
|
|
27
|
-
import { c as createSessionMetadata } from './createSessionMetadata-
|
|
27
|
+
import { c as createSessionMetadata } from './createSessionMetadata-C1MbLQnh.mjs';
|
|
28
28
|
import { M as MessageBuffer } from './sessionExitLifecycle-CzkLIgNZ.mjs';
|
|
29
|
-
import { n as notifyDaemonSessionStarted, j as reportSessionEditToDaemon, c as checkDaemonHibernation } from './controlClient-
|
|
30
|
-
import { a as HibernationExitLatch, H as HibernationProbe, c as commitHibernation, b as DEFAULT_CODEX_PERMISSION_MODE } from './defaultPermissionMode-
|
|
29
|
+
import { n as notifyDaemonSessionStarted, j as reportSessionEditToDaemon, c as checkDaemonHibernation } from './controlClient-CuYQs2aZ.mjs';
|
|
30
|
+
import { a as HibernationExitLatch, H as HibernationProbe, c as commitHibernation, b as DEFAULT_CODEX_PERMISSION_MODE } from './defaultPermissionMode-U9LuUeQh.mjs';
|
|
31
31
|
import { d as decodeBase64, e as encodeBase64 } from './authRelay-DhQhkBvX.mjs';
|
|
32
|
-
import { s as setupOfflineReconnection } from './setupOfflineReconnection-
|
|
33
|
-
import { c as createSessionForStartup } from './startupSessionCreate-
|
|
32
|
+
import { s as setupOfflineReconnection } from './setupOfflineReconnection-Bl3DuakT.mjs';
|
|
33
|
+
import { c as createSessionForStartup } from './startupSessionCreate-BcAGYo51.mjs';
|
|
34
34
|
import { t as trimIdent } from './trimIdent-BAjmv_TG.mjs';
|
|
35
35
|
import { C as CHANGE_TITLE_INSTRUCTION } from './constants-BC4St0xd.mjs';
|
|
36
36
|
import { E as EditReportThrottle, a as extractCodexPatchPaths } from './editPaths-BVfS_FFL.mjs';
|
|
37
|
-
import { a as extractNoSandboxFlag, e as ensureDaemonRunning } from './ensureDaemonRunning-
|
|
37
|
+
import { a as extractNoSandboxFlag, e as ensureDaemonRunning } from './ensureDaemonRunning-khb8Nr1n.mjs';
|
|
38
38
|
import 'tweetnacl';
|
|
39
39
|
import 'axios';
|
|
40
|
-
import './time-
|
|
41
|
-
import './browser-
|
|
40
|
+
import './time-B2KKdAym.mjs';
|
|
41
|
+
import './browser-1j9gdZoD.mjs';
|
|
42
42
|
import 'open';
|
|
43
43
|
import 'zod';
|
|
44
44
|
import './prompt-QHuFx9j6.mjs';
|
|
45
|
-
import './reportProgressTool-
|
|
46
|
-
import './client-
|
|
45
|
+
import './reportProgressTool-CcZ32nrd.mjs';
|
|
46
|
+
import './client-BgHvK7lo.mjs';
|
|
47
47
|
import './precheckCompat-DeEbilbr.mjs';
|
|
48
48
|
import './agentGuidance-BDYt2Qy2.mjs';
|
|
49
49
|
import 'node:fs';
|
|
50
50
|
import 'node:os';
|
|
51
51
|
import './pi-CqyoZMjI.mjs';
|
|
52
52
|
import './fileStore-5qpetZS0.mjs';
|
|
53
|
-
import './client-
|
|
53
|
+
import './client-DfDyE322.mjs';
|
|
54
54
|
import 'node:util';
|
|
55
|
-
import './context-
|
|
56
|
-
import './sessionOps-
|
|
55
|
+
import './context-CLj1_RYF.mjs';
|
|
56
|
+
import './sessionOps-ByVggB_q.mjs';
|
|
57
57
|
import 'socket.io-client';
|
|
58
58
|
import './backgroundTaskActivity-8PdPxrvy.mjs';
|
|
59
|
-
import './resources-
|
|
60
|
-
import './tools-
|
|
61
|
-
import './peerTools-
|
|
59
|
+
import './resources-CLdQfe3b.mjs';
|
|
60
|
+
import './tools-DUjkqSQL.mjs';
|
|
61
|
+
import './peerTools-DIPOX033.mjs';
|
|
62
62
|
import './ids-DU6sLx4C.mjs';
|
|
63
|
-
import './remoteSessionClient-
|
|
63
|
+
import './remoteSessionClient-Cwrddscy.mjs';
|
|
64
64
|
import '@modelcontextprotocol/sdk/server/mcp.js';
|
|
65
65
|
import 'node:http';
|
|
66
66
|
import '@modelcontextprotocol/sdk/server/streamableHttp.js';
|
|
67
67
|
import './limits-DIo7rEBR.mjs';
|
|
68
|
-
import './downloadTarget-
|
|
68
|
+
import './downloadTarget-VUTd9lEO.mjs';
|
|
69
69
|
import './terminals-Dlg0x3nY.mjs';
|
|
70
70
|
import './terminalTitleSuggest-CeKsX_V6.mjs';
|
|
71
71
|
import './tmuxSocket-B8Yx20sT.mjs';
|
|
72
|
-
import './bootstrap-
|
|
73
|
-
import './package-
|
|
72
|
+
import './bootstrap-DS8Acdhm.mjs';
|
|
73
|
+
import './package-CTrz6U3C.mjs';
|
|
74
74
|
import './webPanels-B2_C2-3g.mjs';
|
|
75
|
-
import './pushNotifications-
|
|
75
|
+
import './pushNotifications-C4R9-1hU.mjs';
|
|
76
76
|
import './contentLogMetadata-BlWI0egu.mjs';
|
|
77
77
|
import './previewPath-CXN4Vag0.mjs';
|
|
78
78
|
import 'crypto';
|
|
79
|
-
import './
|
|
80
|
-
import './lidState-D8Iuvjgl.mjs';
|
|
79
|
+
import './lidState-DXeYTsrm.mjs';
|
|
81
80
|
import 'os';
|
|
82
81
|
import 'child_process';
|
|
83
82
|
import 'node:events';
|
|
84
|
-
import './registerCommonHandlers-
|
|
83
|
+
import './registerCommonHandlers-a9lHojSV.mjs';
|
|
85
84
|
import 'util';
|
|
86
85
|
import 'fs/promises';
|
|
87
86
|
import 'path';
|
|
88
87
|
import 'cross-spawn';
|
|
89
|
-
import './sync
|
|
88
|
+
import './sync--QUIOuf8.mjs';
|
|
90
89
|
import 'chalk';
|
|
90
|
+
import './processTreeSnapshot-CuLJDNC-.mjs';
|
|
91
91
|
import 'node:readline';
|
|
92
92
|
import './manager-BEsI4qt3.mjs';
|
|
93
93
|
import '@anthropic-ai/sandbox-runtime';
|
|
94
|
-
import './rateLimitWindows-
|
|
94
|
+
import './rateLimitWindows-HlHATOQ0.mjs';
|
|
95
95
|
import './processTree-CP5IvQ2Z.mjs';
|
|
96
96
|
import './detectCLI-CSGMlV51.mjs';
|
|
97
97
|
import 'fs';
|
|
98
|
-
import './localHappyAgentAuth-
|
|
98
|
+
import './localHappyAgentAuth-C1A4ChCR.mjs';
|
|
99
99
|
import './fsMkdir-DumgLTzR.mjs';
|
|
100
100
|
import './types-CkqAACXx.mjs';
|
|
101
101
|
import 'url';
|
|
102
|
-
import './spawnHappyCLI-
|
|
102
|
+
import './spawnHappyCLI-v_bJwZ4Z.mjs';
|
|
103
103
|
import './doctorReadiness-C208SMN9.mjs';
|
|
104
104
|
|
|
105
105
|
function getStartedSubagents(state) {
|
|
@@ -235,7 +235,32 @@ function turnStatus(turn) {
|
|
|
235
235
|
}
|
|
236
236
|
return "completed";
|
|
237
237
|
}
|
|
238
|
-
function
|
|
238
|
+
function commandFailed(exitCode, status) {
|
|
239
|
+
return typeof exitCode === "number" && exitCode !== 0 || status === "failed" || status === "declined";
|
|
240
|
+
}
|
|
241
|
+
function commandResult(message) {
|
|
242
|
+
const raw = [message.output, message.aggregated_output, message.formatted_output].find((v) => typeof v === "string");
|
|
243
|
+
const output = typeof raw === "string" ? raw : "";
|
|
244
|
+
const exitCode = message.exit_code;
|
|
245
|
+
const failed = commandFailed(exitCode, message.status);
|
|
246
|
+
const text = typeof exitCode === "number" && exitCode !== 0 ? `${output}${output === "" || output.endsWith("\n") ? "" : "\n"}[exit code ${exitCode}]` : output;
|
|
247
|
+
return textResultPayload(text, failed);
|
|
248
|
+
}
|
|
249
|
+
function errorText(error) {
|
|
250
|
+
if (typeof error === "string") return error;
|
|
251
|
+
if (error && typeof error === "object" && typeof error.message === "string") return error.message;
|
|
252
|
+
return JSON.stringify(error) ?? String(error);
|
|
253
|
+
}
|
|
254
|
+
function mcpResultText(result) {
|
|
255
|
+
if (result === void 0 || result === null) return null;
|
|
256
|
+
if (typeof result === "string") return result;
|
|
257
|
+
const content = result.content;
|
|
258
|
+
const text = Array.isArray(content) ? toolResultContentText(content) : "";
|
|
259
|
+
if (text) return text;
|
|
260
|
+
const structured = result.structuredContent;
|
|
261
|
+
return JSON.stringify(structured ?? result, null, 2) ?? null;
|
|
262
|
+
}
|
|
263
|
+
function emitHistoricalToolCall(envelopes, turn, item, name, title, args, output, isError = false) {
|
|
239
264
|
const time = turnTimestampMs(turn);
|
|
240
265
|
const opts = { turn: turn.id, time, codexItemId: item.id };
|
|
241
266
|
envelopes.push(createEnvelope("agent", {
|
|
@@ -249,20 +274,25 @@ function emitHistoricalToolCall(envelopes, turn, item, name, title, args, output
|
|
|
249
274
|
...opts,
|
|
250
275
|
id: `${item.id}:start`
|
|
251
276
|
}));
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
277
|
+
const running = "status" in item && (item.status === "inProgress" || item.status === "running");
|
|
278
|
+
if (running) {
|
|
279
|
+
if (output && output.trim().length > 0) {
|
|
280
|
+
envelopes.push(createEnvelope("agent", {
|
|
281
|
+
t: "text",
|
|
282
|
+
text: output,
|
|
283
|
+
thinking: true
|
|
284
|
+
}, {
|
|
285
|
+
...opts,
|
|
286
|
+
id: `${item.id}:output`
|
|
287
|
+
}));
|
|
288
|
+
}
|
|
289
|
+
return;
|
|
261
290
|
}
|
|
262
|
-
|
|
291
|
+
const result = textResultPayload(output ?? "", isError);
|
|
263
292
|
envelopes.push(createEnvelope("agent", {
|
|
264
293
|
t: "tool-call-end",
|
|
265
|
-
call: item.id
|
|
294
|
+
call: item.id,
|
|
295
|
+
...result ? { result } : {}
|
|
266
296
|
}, {
|
|
267
297
|
...opts,
|
|
268
298
|
id: `${item.id}:end`,
|
|
@@ -360,7 +390,8 @@ function mapCodexThreadToSessionEnvelopes(thread) {
|
|
|
360
390
|
"CodexBash",
|
|
361
391
|
commandToTitle(command),
|
|
362
392
|
{ command, cwd: item.cwd },
|
|
363
|
-
typeof item.aggregatedOutput === "string" ? item.aggregatedOutput : null
|
|
393
|
+
typeof item.aggregatedOutput === "string" ? item.aggregatedOutput : null,
|
|
394
|
+
commandFailed(item.exitCode, item.status)
|
|
364
395
|
);
|
|
365
396
|
break;
|
|
366
397
|
}
|
|
@@ -379,7 +410,8 @@ function mapCodexThreadToSessionEnvelopes(thread) {
|
|
|
379
410
|
}
|
|
380
411
|
case "mcpToolCall": {
|
|
381
412
|
const title = `${item.server}.${item.tool}`;
|
|
382
|
-
const
|
|
413
|
+
const failed = item.error !== void 0 && item.error !== null;
|
|
414
|
+
const output = failed ? errorText(item.error) : mcpResultText(item.result);
|
|
383
415
|
emitHistoricalToolCall(
|
|
384
416
|
envelopes,
|
|
385
417
|
turn,
|
|
@@ -391,7 +423,8 @@ function mapCodexThreadToSessionEnvelopes(thread) {
|
|
|
391
423
|
tool: item.tool,
|
|
392
424
|
arguments: item.arguments
|
|
393
425
|
},
|
|
394
|
-
output
|
|
426
|
+
output,
|
|
427
|
+
failed
|
|
395
428
|
);
|
|
396
429
|
break;
|
|
397
430
|
}
|
|
@@ -595,7 +628,8 @@ function mapCodexMcpMessageToSessionEnvelopes(message, state) {
|
|
|
595
628
|
const call = pickCallId(message);
|
|
596
629
|
const envelopes = [];
|
|
597
630
|
maybeEmitSubagentStart(subagent, opts, startedSubagents, activeSubagents, envelopes, pickSubagentLabel(message), labeledSubagents);
|
|
598
|
-
|
|
631
|
+
const result = commandResult(message);
|
|
632
|
+
envelopes.push(createEnvelope("agent", { t: "tool-call-end", call, ...result ? { result } : {} }, opts));
|
|
599
633
|
return {
|
|
600
634
|
currentTurnId: state.currentTurnId,
|
|
601
635
|
startedSubagents,
|