very-happy-cli 0.2.181 → 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-DZGCSuXF.mjs → AcpBackend-9c-Jeaxd.mjs} +3 -3
- package/dist/{AcpBackend-CgHb_ya5.cjs → AcpBackend-B-aMuEzO.cjs} +3 -3
- package/dist/{AcpSessionManager-CacC2EVn.cjs → AcpSessionManager-BxXe24AV.cjs} +10 -3
- package/dist/{AcpSessionManager-DwuPzWBh.mjs → AcpSessionManager-CS0FOSQk.mjs} +10 -3
- package/dist/{BasePermissionHandler-Uo-GUjbb.mjs → BasePermissionHandler-BJ1ID_Br.mjs} +1 -1
- package/dist/{BasePermissionHandler-DCP8ZEB4.cjs → BasePermissionHandler-BREjppjP.cjs} +1 -1
- package/dist/{acpSessionResume-9OLTD6kT.mjs → acpSessionResume-BKtI9Jq_.mjs} +1 -1
- package/dist/{acpSessionResume-BaVMD80f.cjs → acpSessionResume-mVoJ75vI.cjs} +1 -1
- package/dist/{agentHome-B1BsKeqD.mjs → agentHome-B8Ctr_Nu.mjs} +4 -4
- package/dist/{agentHome-BtUmGcPX.cjs → agentHome-rzjm56o4.cjs} +4 -4
- package/dist/{api-Dr3wXL_7.mjs → api-C29WLYkW.mjs} +79 -12
- package/dist/{api-COHFAkb_.cjs → api-xZiqVynF.cjs} +81 -11
- package/dist/{apiMachine-D8H7CXaz.cjs → apiMachine-B-FNBIYG.cjs} +19 -14
- package/dist/{apiMachine-CHEzPQdS.mjs → apiMachine-Dz6Yfk0m.mjs} +19 -14
- package/dist/{attachmentContent-mIhbtRKl.cjs → attachmentContent-COV4LF8k.cjs} +2 -2
- package/dist/{attachmentContent-1YwtKgWl.mjs → attachmentContent-DwY0uIg6.mjs} +2 -2
- package/dist/{auth-CgQP7d0q.cjs → auth-CYtk9_ga.cjs} +5 -5
- package/dist/{auth-Fg8fLadK.cjs → auth-D_qsnVr3.cjs} +8 -8
- package/dist/{auth-CbZkcMAb.mjs → auth-DvbSDalm.mjs} +8 -8
- package/dist/{auth-DZsthtSk.mjs → auth-xT70IYMx.mjs} +5 -5
- package/dist/{auto-BB7kqSh5.cjs → auto-DT_PfpCx.cjs} +32 -25
- package/dist/{auto-_T-Ud-z5.mjs → auto-IiPqvIsN.mjs} +32 -26
- package/dist/{bootstrap-CYtOtbi7.cjs → bootstrap-C50NkfPx.cjs} +2 -2
- package/dist/{bootstrap-B6EkZh4u.mjs → bootstrap-DS8Acdhm.mjs} +2 -2
- package/dist/{browser-C2qhUHSE.mjs → browser-1j9gdZoD.mjs} +1 -1
- package/dist/{browser-DjNNQQk2.cjs → browser-CxKZLd2T.cjs} +1 -1
- package/dist/{claudeLocal-O_w7-fBh.cjs → claudeLocal-CgNWpepB.cjs} +5 -5
- package/dist/{claudeLocal-BAFjWhZ8.mjs → claudeLocal-U1Fa9sJo.mjs} +5 -5
- package/dist/{claudeLocalLauncher-CWn30LZR.mjs → claudeLocalLauncher-BjCsfZUE.mjs} +10 -10
- package/dist/{claudeLocalLauncher-Df3zg1q0.cjs → claudeLocalLauncher-IyFm0D6a.cjs} +10 -10
- package/dist/{claudeSessionFork-2ZkSTOGn.mjs → claudeSessionFork-6-1vKISn.mjs} +1 -1
- package/dist/{claudeSessionFork-pwcKqB-e.cjs → claudeSessionFork-BUO1XdSm.cjs} +1 -1
- package/dist/{client-CUO3ItoB.cjs → client--vZueZYF.cjs} +14 -4
- package/dist/{client-BKyU66lg.mjs → client-5_zDNdOh.mjs} +2 -2
- package/dist/{client-CXOnzuOy.mjs → client-BgHvK7lo.mjs} +15 -7
- package/dist/{client-D_U2VjO3.cjs → client-DYGDBD0M.cjs} +15 -7
- package/dist/{client-DWs6k041.cjs → client-DcKJ0ul_.cjs} +2 -2
- package/dist/{client-DsQcxVUV.mjs → client-DfDyE322.mjs} +14 -4
- package/dist/codex/happyMcpStdioBridge.cjs +20 -19
- package/dist/codex/happyMcpStdioBridge.mjs +20 -19
- package/dist/{codexAppServerClient-BRX3JZ_5.cjs → codexAppServerClient-C3nrTfwY.cjs} +3 -3
- package/dist/{codexAppServerClient-C3JO3pwM.mjs → codexAppServerClient-DvBg4hGc.mjs} +3 -3
- package/dist/{codexCommand-BZIAAqKS.mjs → codexCommand-Bqp2--g_.mjs} +96 -61
- package/dist/{codexCommand-dKOc5iQl.cjs → codexCommand-DSiU6MNt.cjs} +96 -61
- package/dist/{codexTermination-BVR9HeVI.cjs → codexTermination-D9TRTglF.cjs} +1 -1
- package/dist/{codexTermination-ztFkwHrG.mjs → codexTermination-DsliWl_s.mjs} +1 -1
- package/dist/{config-cftYxLC7.cjs → config-CRhWiOwi.cjs} +3 -3
- package/dist/{config-NbHjx8ge.mjs → config-DeaqRn3o.mjs} +3 -3
- package/dist/{configuration-C8JgseHy.cjs → configuration-K3I6yOjZ.cjs} +1 -1
- package/dist/{configuration-BPrfb17M.mjs → configuration-elzht62L.mjs} +1 -1
- package/dist/{connect-Br8VMrK1.cjs → connect-B5UbfmO3.cjs} +13 -13
- package/dist/{connect-CLD1ai0k.mjs → connect-CT5cOlnC.mjs} +13 -13
- package/dist/{context-_YGq8xdH.mjs → context-CLj1_RYF.mjs} +1 -1
- package/dist/{context-D1lgQTJC.cjs → context-DNKNF8Yh.cjs} +1 -1
- package/dist/{controlClient-D68Zj7Q-.cjs → controlClient-ChqmxgbB.cjs} +3 -3
- package/dist/{controlClient-CkNpT5zS.mjs → controlClient-CuYQs2aZ.mjs} +3 -3
- package/dist/{createSessionMetadata-3WAj3_xl.mjs → createSessionMetadata-C1MbLQnh.mjs} +2 -2
- package/dist/{createSessionMetadata-DNIbKLHg.cjs → createSessionMetadata-QfiRx4Tf.cjs} +2 -2
- package/dist/daemonSupervisor-57JYYzMf.cjs +268 -0
- package/dist/daemonSupervisor-DfzrtNhM.mjs +245 -0
- package/dist/{defaultPermissionMode-BmvjP32v.cjs → defaultPermissionMode-DQmdZZIg.cjs} +2 -2
- package/dist/{defaultPermissionMode-DXMznl8v.mjs → defaultPermissionMode-U9LuUeQh.mjs} +2 -2
- package/dist/{deterministicJson-BS7D7URE.cjs → deterministicJson-BBRUcB8i.cjs} +569 -17
- package/dist/{deterministicJson-BcBIKKf1.mjs → deterministicJson-BixlyPWV.mjs} +572 -21
- package/dist/{doctor-Be7zC0AF.cjs → doctor-CKgHUV4W.cjs} +7 -7
- package/dist/{doctor-CoOaPq6w.mjs → doctor-Dban2oE2.mjs} +7 -7
- package/dist/{downloadTarget-LyOiucn_.cjs → downloadTarget-CmC11Y7E.cjs} +6 -6
- package/dist/{downloadTarget-CeaAXdJj.mjs → downloadTarget-VUTd9lEO.mjs} +6 -6
- package/dist/{ensureDaemonRunning-B8z37VKD.cjs → ensureDaemonRunning-L0fl0cLE.cjs} +5 -5
- package/dist/{ensureDaemonRunning--98j7-17.mjs → ensureDaemonRunning-khb8Nr1n.mjs} +5 -5
- package/dist/fsMkdir-0K3yENml.cjs +56 -0
- package/dist/fsMkdir-DumgLTzR.mjs +53 -0
- package/dist/{handleResumeCommand-gO8I4keP.mjs → handleResumeCommand-CLDGWpTJ.mjs} +5 -5
- package/dist/{handleResumeCommand-BFZlrFVH.cjs → handleResumeCommand-D9myBN2N.cjs} +5 -5
- package/dist/{index-WUj3954m.mjs → index-BMZx-699.mjs} +4 -4
- package/dist/{index-BRMq9gOe.cjs → index-BdJs0465.cjs} +3 -3
- package/dist/{index-CeRXrGnH.mjs → index-BptfFoXM.mjs} +283 -77
- package/dist/{index-jF2t3ACW.cjs → index-COSjJPIv.cjs} +4 -4
- package/dist/{index-hQ8LP1C2.mjs → index-CtwqBeH6.mjs} +3 -3
- package/dist/{index-B5PXbZjW.cjs → index-DgA79dVw.cjs} +41 -40
- package/dist/{index-Df2eHm3O.cjs → index-Fq-jxjsB.cjs} +294 -76
- package/dist/{index-CO0n9ue6.mjs → index-GkkbUZX-.mjs} +4 -4
- package/dist/{index-DneHoQXf.mjs → index-IRI8s8kz.mjs} +42 -41
- package/dist/{index-BkluinoS.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-DkYFiVK4.mjs → install-JvCk2PJV.mjs} +3 -3
- package/dist/{install-FqkSUjPC.cjs → install-cn98bTCs.cjs} +3 -3
- package/dist/lib.cjs +12 -12
- package/dist/lib.d.cts +2 -1
- package/dist/lib.d.mts +2 -1
- package/dist/lib.mjs +12 -12
- package/dist/{lidState-x8cJ8J_9.cjs → lidState-Bcs5kRHi.cjs} +1 -1
- package/dist/{lidState-DghbfRbr.mjs → lidState-DXeYTsrm.mjs} +1 -1
- package/dist/{localHappyAgentAuth-IKmeRpuQ.mjs → localHappyAgentAuth-C1A4ChCR.mjs} +1 -1
- package/dist/{localHappyAgentAuth-DZ2kb9uq.cjs → localHappyAgentAuth-CypTSe42.cjs} +1 -1
- package/dist/{logger-DgBwUSgS.cjs → logger-Cgwz30rK.cjs} +2 -2
- package/dist/{logger-LFr8iPgl.mjs → logger-RMPh5aqe.mjs} +2 -2
- package/dist/{machineMetadata-DB03ez4K.cjs → machineMetadata-BSOGMNRi.cjs} +5 -3
- package/dist/{machineMetadata-BglCsfvf.mjs → machineMetadata-BTUtPRth.mjs} +5 -3
- package/dist/{main-YQ-Vkakw.cjs → main-4iiwYpCR.cjs} +61 -56
- package/dist/{main-_1LSzlLv.mjs → main-DNDL6t8z.mjs} +61 -56
- package/dist/{mcp-BIY80jSc.cjs → mcp-C7eEoGhz.cjs} +17 -15
- package/dist/{mcp-Csj-mT5Y.mjs → mcp-DXYDPOpJ.mjs} +17 -15
- package/dist/{mirrorProtocol-CAxOMBkb.mjs → mirrorProtocol-DQRy5PaT.mjs} +3 -3
- package/dist/{mirrorProtocol-BphKIAK9.cjs → mirrorProtocol-c5g5MgNc.cjs} +3 -3
- package/dist/{package-NoD8QOOM.cjs → package-3aPiSpZj.cjs} +7 -7
- package/dist/{package-DYGwlmXl.mjs → package-CTrz6U3C.mjs} +7 -7
- package/dist/{panels-B8zRm7_d.mjs → panels-B5sZ84vA.mjs} +5 -5
- package/dist/{panels-DYEc1NyQ.cjs → panels-BmsmKHbw.cjs} +5 -5
- package/dist/{peerTools-CK3JYu1k.mjs → peerTools-DIPOX033.mjs} +5 -5
- package/dist/{peerTools-CP-x-Peu.cjs → peerTools-Dxe7iCi_.cjs} +5 -5
- package/dist/{persistence-BY-D00wT.cjs → persistence-DZRMUZZS.cjs} +2 -2
- package/dist/{persistence-D2Djrf7t.mjs → persistence-zJo4r7YI.mjs} +2 -2
- package/dist/{piRunnerArgs-gxLYIZH4.cjs → piRunnerArgs-BSPiS6tZ.cjs} +1 -1
- package/dist/{piRunnerArgs-IZLoL7TG.mjs → piRunnerArgs-IVdoHUB6.mjs} +1 -1
- package/dist/{piRuntime-o5L8uX-W.cjs → piRuntime-BJzjlMcN.cjs} +2 -2
- package/dist/{piRuntime-D7Y4oHVL.mjs → piRuntime-BvHO3vgO.mjs} +2 -2
- package/dist/{piTerminal-C_-JDkLN.cjs → piTerminal-Cz4pW55d.cjs} +20 -18
- package/dist/{piTerminal-Kphx8Uhw.mjs → piTerminal-D7vBOpkE.mjs} +20 -18
- package/dist/{pushNotifications-DXGIhE-A.mjs → pushNotifications-C4R9-1hU.mjs} +5 -3
- package/dist/{pushNotifications-BXoOSq_G.cjs → pushNotifications-CgIrYml3.cjs} +5 -3
- package/dist/{query-CdCxzuaB.cjs → query-CZQG1PdU.cjs} +1 -1
- package/dist/{query-CcA6DVZK.mjs → query-DKPmDsHS.mjs} +1 -1
- package/dist/{rateLimitWindows-OpAmdOtC.cjs → rateLimitWindows-CPV0nLeq.cjs} +1 -1
- package/dist/{rateLimitWindows-ZtHZHe-l.mjs → rateLimitWindows-HlHATOQ0.mjs} +1 -1
- package/dist/{registerCommonHandlers-CRjBoJLK.cjs → registerCommonHandlers-D1pC83Op.cjs} +2 -2
- package/dist/{registerCommonHandlers-DF6bdDtd.mjs → registerCommonHandlers-a9lHojSV.mjs} +2 -2
- package/dist/{registerKillSessionHandler-DDCKL3wf.mjs → registerKillSessionHandler-Bp-fuH-w.mjs} +6 -6
- package/dist/{registerKillSessionHandler-7fOm6ooh.cjs → registerKillSessionHandler-nTi2vVJy.cjs} +6 -6
- package/dist/{remoteSessionClient-B2POSKFT.mjs → remoteSessionClient-Cwrddscy.mjs} +5 -5
- package/dist/{remoteSessionClient-CFCn42bs.cjs → remoteSessionClient-HQAKAvVd.cjs} +5 -5
- package/dist/{reportProgressTool-th4trcET.cjs → reportProgressTool-Be-8ADI4.cjs} +4 -4
- package/dist/{reportProgressTool-tPxEvh6x.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-cKQBbVi4.mjs → run-BBU8GyxE.mjs} +63 -244
- package/dist/{run-C_FumCQk.cjs → run-CxRJk9qq.cjs} +73 -255
- package/dist/{runClaude-CYnM6krL.mjs → runClaude-DR6pEQwd.mjs} +23 -22
- package/dist/{runClaude-z_2YC_aa.cjs → runClaude-Dd5zJaUZ.cjs} +23 -22
- package/dist/{runClaudeDeps-duS06Pb4.mjs → runClaudeDeps-COgZaUZm.mjs} +50 -45
- package/dist/{runClaudeDeps-CLubzWnA.cjs → runClaudeDeps-CTtZ_1mC.cjs} +45 -40
- package/dist/{runGemini-C_Pc2EhH.mjs → runGemini-DVoVUfPp.mjs} +40 -37
- package/dist/{runGemini-vEoXV6qT.cjs → runGemini-DX72qB92.cjs} +40 -37
- package/dist/{runOpenClaw-Cxun1qLC.mjs → runOpenClaw-BHjzmzeC.mjs} +19 -18
- package/dist/{runOpenClaw-CXJCtMgB.cjs → runOpenClaw-BSg4hFVt.cjs} +19 -18
- package/dist/{sandbox-CsvPnTmz.mjs → sandbox-CWR9EqoN.mjs} +4 -4
- package/dist/{sandbox-CO46H2tK.cjs → sandbox-D1T_hmgZ.cjs} +4 -4
- package/dist/{selfCheck-DIr7Gc0i.cjs → selfCheck-CE7vlnNS.cjs} +36 -36
- package/dist/selfCheck-ZGgBtxFQ.mjs +85 -0
- package/dist/{send-DMoFg6F1.mjs → send-BDF0Zvxo.mjs} +8 -8
- package/dist/{send-X2mfVEyr.cjs → send-BxZqRCcG.cjs} +8 -8
- package/dist/{server-CkqQ0sRH.mjs → server-B4JtnDLF.mjs} +4 -4
- package/dist/{server-BwTEdbkr.cjs → server-DB7_70Mi.cjs} +6 -6
- package/dist/{sessionLock-CdIRJlHH.cjs → sessionLock-BXvFN6uw.cjs} +3 -3
- package/dist/{sessionLock-JIfwCqMk.mjs → sessionLock-CXOOX-VD.mjs} +3 -3
- package/dist/{sessionOps-DVA-00nR.cjs → sessionOps-BWlDlFYP.cjs} +4 -4
- package/dist/{sessionOps-DqlftXxe.mjs → sessionOps-ByVggB_q.mjs} +4 -4
- package/dist/{sessionScanner-BMwgGAhY.cjs → sessionScanner-DkxPB5VA.cjs} +3 -3
- package/dist/{sessionScanner-BI0Vo1xT.mjs → sessionScanner-r66RtF95.mjs} +3 -3
- package/dist/{sessions-DjgEcHaT.cjs → sessions-BiJTxFy9.cjs} +10 -10
- package/dist/{sessions-D6IimX7b.mjs → sessions-C1lLK_a9.mjs} +10 -10
- package/dist/{setupOfflineReconnection-DgJK_4m1.mjs → setupOfflineReconnection-Bl3DuakT.mjs} +2 -2
- package/dist/{setupOfflineReconnection-CjuCiKY3.cjs → setupOfflineReconnection-CecTiFZ-.cjs} +2 -2
- package/dist/{spawn-Dvzy-tzc.mjs → spawn-D-8MlEM6.mjs} +14 -14
- package/dist/{spawn-rhF28shY.cjs → spawn-D79mVa3h.cjs} +14 -14
- package/dist/{spawnAgents-CCnlq-FI.mjs → spawnAgents-DJHjq01u.mjs} +1 -1
- package/dist/{spawnAgents-iwuqrgR9.cjs → spawnAgents-Sfnf-4pN.cjs} +1 -1
- package/dist/{spawnHappyCLI-DnKmIsEt.cjs → spawnHappyCLI-CQwQs9G5.cjs} +1 -1
- package/dist/{spawnHappyCLI-Dq3LLXLb.mjs → spawnHappyCLI-v_bJwZ4Z.mjs} +1 -1
- package/dist/{specialCommands-Zwr2C6A2.cjs → specialCommands-CWMVfT5s.cjs} +3 -3
- package/dist/{specialCommands-CcyZ1hGA.mjs → specialCommands-yMnFvS-W.mjs} +3 -3
- package/dist/{startFileWatcher-4thXDK9d.mjs → startFileWatcher-BCDkT_tr.mjs} +1 -1
- package/dist/{startFileWatcher-K6hJSyiR.cjs → startFileWatcher-GW4_E7dV.cjs} +1 -1
- package/dist/{startupSessionCreate-BfByJ16A.mjs → startupSessionCreate-BcAGYo51.mjs} +1 -1
- package/dist/{startupSessionCreate-CKEbq0tL.cjs → startupSessionCreate-tBRa_ze8.cjs} +1 -1
- package/dist/{streamRelay-LcDvyEjK.mjs → streamRelay-BEDiy6_b.mjs} +1 -1
- package/dist/{streamRelay-Gy8Xfnon.cjs → streamRelay-BZ8drtof.cjs} +1 -1
- package/dist/{sync-DO-2PU45.mjs → sync--QUIOuf8.mjs} +1 -1
- package/dist/{sync-1hQ5KHpL.cjs → sync-BMDkyo75.cjs} +1 -1
- package/dist/{systemPrompt-Dj7pgkMK.cjs → systemPrompt-DoHSXrH0.cjs} +2 -2
- package/dist/{systemPrompt-BctLfMZs.mjs → systemPrompt-O0Kd6vbA.mjs} +2 -2
- package/dist/{teams-uQxUlyyz.cjs → teams-BkZop-sP.cjs} +13 -10
- package/dist/{teams-Bu8YeOoF.mjs → teams-CTF1gT48.mjs} +13 -10
- package/dist/{template-BaHAmH2K.cjs → template-CeC1dYe-.cjs} +32 -2
- package/dist/{template-CiOPa2rd.mjs → template-D1fm22em.mjs} +31 -3
- package/dist/{time-BcoJaG8E.mjs → time-B2KKdAym.mjs} +1 -1
- package/dist/{time-nqa9shu8.cjs → time-CdCotzKU.cjs} +1 -1
- package/dist/{titleGenerator-D5r06bhf.mjs → titleGenerator-BFDczskR.mjs} +1 -1
- package/dist/{titleGenerator-D09XyYYG.cjs → titleGenerator-DZH1XqAf.cjs} +2 -2
- package/dist/{todo-D1q8146q.mjs → todo-C2gyOUom.mjs} +6 -6
- package/dist/{todo-CCOnL7pT.cjs → todo-DnTFTHmV.cjs} +6 -6
- package/dist/{tools-DiCXnAC5.cjs → tools-C8rpwyIl.cjs} +1 -1
- package/dist/{tools-D2E--n1x.mjs → tools-DUjkqSQL.mjs} +1 -1
- package/dist/{uninstall-CtwXi1Rt.mjs → uninstall-B5Ew50mZ.mjs} +3 -3
- package/dist/{uninstall-BrNwwwSD.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-NamtBHVB.mjs +0 -85
|
@@ -1,21 +1,29 @@
|
|
|
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
|
class AutomationsRequestError extends Error {
|
|
7
|
-
constructor(status, code, runStatus) {
|
|
8
|
-
super(describeAutomationError(status, code, runStatus));
|
|
7
|
+
constructor(status, code, runStatus, invalidFields = []) {
|
|
8
|
+
super(describeAutomationError(status, code, runStatus, invalidFields));
|
|
9
9
|
this.status = status;
|
|
10
10
|
this.code = code;
|
|
11
11
|
this.runStatus = runStatus;
|
|
12
|
+
this.invalidFields = invalidFields;
|
|
12
13
|
}
|
|
13
14
|
}
|
|
14
15
|
function isAutomationsUnavailable(error) {
|
|
15
16
|
return error instanceof AutomationsRequestError && error.status === 404 && !error.code.endsWith("_not_found");
|
|
16
17
|
}
|
|
17
18
|
const AUTOMATIONS_UNAVAILABLE_MESSAGE = "Automations are not enabled on this server (set VH_AUTOMATIONS_ENABLED=true on the server, or upgrade it).";
|
|
18
|
-
function
|
|
19
|
+
function validationFieldPaths(body) {
|
|
20
|
+
const message = body?.message;
|
|
21
|
+
if (typeof message !== "string") return [];
|
|
22
|
+
const fields = /* @__PURE__ */ new Set();
|
|
23
|
+
for (const match of message.matchAll(/(?:^|, )body\/([A-Za-z0-9_./]{1,64}) /g)) fields.add(match[1].replace(/\//g, "."));
|
|
24
|
+
return [...fields];
|
|
25
|
+
}
|
|
26
|
+
function describeAutomationError(status, code, runStatus, invalidFields = []) {
|
|
19
27
|
if (status === 404 && !code.endsWith("_not_found")) return AUTOMATIONS_UNAVAILABLE_MESSAGE;
|
|
20
28
|
const known = {
|
|
21
29
|
automation_not_found: "No automation with that name or id.",
|
|
@@ -37,7 +45,7 @@ function describeAutomationError(status, code, runStatus) {
|
|
|
37
45
|
invalid_timezone: "The time zone is not a valid IANA zone."
|
|
38
46
|
};
|
|
39
47
|
if (known[code]) return known[code];
|
|
40
|
-
if (status === 400) return
|
|
48
|
+
if (status === 400) return `The server rejected the request (HTTP 400${invalidFields.length ? `; invalid: ${invalidFields.join(", ")}` : ""}): check the arguments, or the server may expect a newer request shape.`;
|
|
41
49
|
return `Automations request failed (HTTP ${status}${code ? `, ${code}` : ""}).`;
|
|
42
50
|
}
|
|
43
51
|
function createAutomationsClient(options) {
|
|
@@ -66,7 +74,7 @@ function createAutomationsClient(options) {
|
|
|
66
74
|
}
|
|
67
75
|
if (!response.ok) {
|
|
68
76
|
const code = typeof parsed?.error === "string" ? parsed.error : "";
|
|
69
|
-
throw new AutomationsRequestError(response.status, code, typeof parsed?.status === "string" ? parsed.status : void 0);
|
|
77
|
+
throw new AutomationsRequestError(response.status, code, typeof parsed?.status === "string" ? parsed.status : void 0, response.status === 400 ? validationFieldPaths(parsed) : []);
|
|
70
78
|
}
|
|
71
79
|
return parsed;
|
|
72
80
|
}
|
|
@@ -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 {
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
import { randomUUID } from 'node:crypto';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
2
|
+
import { execFile } from 'node:child_process';
|
|
3
|
+
import { promisify } from 'node:util';
|
|
4
|
+
import { basename, dirname } from 'node:path';
|
|
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';
|
|
5
9
|
|
|
6
10
|
async function teamRequest(path, method, token, scoped, body) {
|
|
7
11
|
const response = await fetch(`${configuration.serverUrl}${path}`, {
|
|
@@ -59,6 +63,12 @@ function teamCreateBody(input, machineId, sessionId, directory) {
|
|
|
59
63
|
if (input.projectId) return { ...body, project: { projectId: input.projectId } };
|
|
60
64
|
return { ...body, project: { inheritFromSessionId: sessionId, ...directory ? { directory } : {} } };
|
|
61
65
|
}
|
|
66
|
+
const gitCommonDir = async (directory) => (await promisify(execFile)("git", ["-C", directory, "rev-parse", "--path-format=absolute", "--git-common-dir"], { timeout: 1e4 })).stdout.trim();
|
|
67
|
+
async function teamProjectDirectory(path, commonDir = gitCommonDir) {
|
|
68
|
+
if (!path || !isInsideTeamWorktree(path)) return path;
|
|
69
|
+
const common = await commonDir(path).catch(() => null);
|
|
70
|
+
return common && basename(common) === ".git" ? rebaseTeamWorktreePath(path, dirname(common)) : path;
|
|
71
|
+
}
|
|
62
72
|
function createTeamsClient(sessionId) {
|
|
63
73
|
const scopePath = () => teamScopePath(sessionId ?? process.env.HAPPY_SESSION_ID);
|
|
64
74
|
return {
|
|
@@ -80,7 +90,7 @@ function createTeamsClient(sessionId) {
|
|
|
80
90
|
if (priorScope && !options?.expectedTeamId) throw new Error("This session already belongs to another team scope");
|
|
81
91
|
let teamId = input.teamId ?? options?.expectedTeamId;
|
|
82
92
|
if (!teamId) {
|
|
83
|
-
const created = await teamRequest("/v1/teams", "POST", credentials.token, false, teamCreateBody(input, machineId, sid, persisted.metadata.path));
|
|
93
|
+
const created = await teamRequest("/v1/teams", "POST", credentials.token, false, teamCreateBody(input, machineId, sid, await teamProjectDirectory(persisted.metadata.path)));
|
|
84
94
|
teamId = created.team.id;
|
|
85
95
|
} else {
|
|
86
96
|
const existing = await teamRequest(`/v1/teams/${encodeURIComponent(teamId)}`, "GET", credentials.token, false);
|
|
@@ -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,35 +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
|
-
require('
|
|
15
|
+
require('node:child_process');
|
|
16
|
+
require('node:util');
|
|
17
|
+
require('node:path');
|
|
18
|
+
require('../index-Fq-jxjsB.cjs');
|
|
19
|
+
require('@paralleldrive/cuid2');
|
|
20
|
+
require('../configuration-K3I6yOjZ.cjs');
|
|
16
21
|
require('node:fs');
|
|
17
22
|
require('node:os');
|
|
18
|
-
require('
|
|
19
|
-
require('../package-NoD8QOOM.cjs');
|
|
23
|
+
require('../package-3aPiSpZj.cjs');
|
|
20
24
|
require('node:fs/promises');
|
|
21
|
-
require('../persistence-
|
|
25
|
+
require('../persistence-DZRMUZZS.cjs');
|
|
22
26
|
require('../authRelay-Dy1qU9td.cjs');
|
|
23
27
|
require('tweetnacl');
|
|
24
|
-
require('../logger-
|
|
28
|
+
require('../logger-Cgwz30rK.cjs');
|
|
25
29
|
require('chalk');
|
|
26
|
-
require('
|
|
27
|
-
require('../
|
|
28
|
-
require('../index-Df2eHm3O.cjs');
|
|
29
|
-
require('@paralleldrive/cuid2');
|
|
30
|
-
require('../client-D_U2VjO3.cjs');
|
|
30
|
+
require('../context-DNKNF8Yh.cjs');
|
|
31
|
+
require('../client-DYGDBD0M.cjs');
|
|
31
32
|
require('../precheckCompat-CWOi5c9L.cjs');
|
|
32
|
-
require('../client-
|
|
33
|
+
require('../client-DcKJ0ul_.cjs');
|
|
33
34
|
require('../prompt-Bof2aQkI.cjs');
|
|
34
35
|
require('../ids-B6ZC0HGt.cjs');
|
|
35
|
-
require('../controlClient-
|
|
36
|
-
require('../sessionOps-
|
|
36
|
+
require('../controlClient-ChqmxgbB.cjs');
|
|
37
|
+
require('../sessionOps-BWlDlFYP.cjs');
|
|
37
38
|
require('axios');
|
|
38
|
-
require('../time-
|
|
39
|
+
require('../time-CdCotzKU.cjs');
|
|
39
40
|
require('socket.io-client');
|
|
40
41
|
require('../backgroundTaskActivity-CBvUdj39.cjs');
|
|
41
|
-
require('../remoteSessionClient-
|
|
42
|
+
require('../remoteSessionClient-HQAKAvVd.cjs');
|
|
42
43
|
require('../trimIdent-4gvk9Wk6.cjs');
|
|
43
44
|
|
|
44
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,35 +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
|
-
import '
|
|
13
|
+
import 'node:child_process';
|
|
14
|
+
import 'node:util';
|
|
15
|
+
import 'node:path';
|
|
16
|
+
import '../index-BptfFoXM.mjs';
|
|
17
|
+
import '@paralleldrive/cuid2';
|
|
18
|
+
import '../configuration-elzht62L.mjs';
|
|
14
19
|
import 'node:fs';
|
|
15
20
|
import 'node:os';
|
|
16
|
-
import '
|
|
17
|
-
import '../package-DYGwlmXl.mjs';
|
|
21
|
+
import '../package-CTrz6U3C.mjs';
|
|
18
22
|
import 'node:fs/promises';
|
|
19
|
-
import '../persistence-
|
|
23
|
+
import '../persistence-zJo4r7YI.mjs';
|
|
20
24
|
import '../authRelay-DhQhkBvX.mjs';
|
|
21
25
|
import 'tweetnacl';
|
|
22
|
-
import '../logger-
|
|
26
|
+
import '../logger-RMPh5aqe.mjs';
|
|
23
27
|
import 'chalk';
|
|
24
|
-
import '
|
|
25
|
-
import '../
|
|
26
|
-
import '../index-CeRXrGnH.mjs';
|
|
27
|
-
import '@paralleldrive/cuid2';
|
|
28
|
-
import '../client-CXOnzuOy.mjs';
|
|
28
|
+
import '../context-CLj1_RYF.mjs';
|
|
29
|
+
import '../client-BgHvK7lo.mjs';
|
|
29
30
|
import '../precheckCompat-DeEbilbr.mjs';
|
|
30
|
-
import '../client-
|
|
31
|
+
import '../client-5_zDNdOh.mjs';
|
|
31
32
|
import '../prompt-QHuFx9j6.mjs';
|
|
32
33
|
import '../ids-DU6sLx4C.mjs';
|
|
33
|
-
import '../controlClient-
|
|
34
|
-
import '../sessionOps-
|
|
34
|
+
import '../controlClient-CuYQs2aZ.mjs';
|
|
35
|
+
import '../sessionOps-ByVggB_q.mjs';
|
|
35
36
|
import 'axios';
|
|
36
|
-
import '../time-
|
|
37
|
+
import '../time-B2KKdAym.mjs';
|
|
37
38
|
import 'socket.io-client';
|
|
38
39
|
import '../backgroundTaskActivity-8PdPxrvy.mjs';
|
|
39
|
-
import '../remoteSessionClient-
|
|
40
|
+
import '../remoteSessionClient-Cwrddscy.mjs';
|
|
40
41
|
import '../trimIdent-BAjmv_TG.mjs';
|
|
41
42
|
|
|
42
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,104 +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-ztFkwHrG.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-
|
|
54
|
-
import '
|
|
55
|
-
import './
|
|
53
|
+
import './client-DfDyE322.mjs';
|
|
54
|
+
import 'node:util';
|
|
55
|
+
import './context-CLj1_RYF.mjs';
|
|
56
|
+
import './sessionOps-ByVggB_q.mjs';
|
|
56
57
|
import 'socket.io-client';
|
|
57
58
|
import './backgroundTaskActivity-8PdPxrvy.mjs';
|
|
58
|
-
import './resources-
|
|
59
|
-
import './tools-
|
|
60
|
-
import './peerTools-
|
|
59
|
+
import './resources-CLdQfe3b.mjs';
|
|
60
|
+
import './tools-DUjkqSQL.mjs';
|
|
61
|
+
import './peerTools-DIPOX033.mjs';
|
|
61
62
|
import './ids-DU6sLx4C.mjs';
|
|
62
|
-
import './remoteSessionClient-
|
|
63
|
+
import './remoteSessionClient-Cwrddscy.mjs';
|
|
63
64
|
import '@modelcontextprotocol/sdk/server/mcp.js';
|
|
64
65
|
import 'node:http';
|
|
65
66
|
import '@modelcontextprotocol/sdk/server/streamableHttp.js';
|
|
66
67
|
import './limits-DIo7rEBR.mjs';
|
|
67
|
-
import './downloadTarget-
|
|
68
|
+
import './downloadTarget-VUTd9lEO.mjs';
|
|
68
69
|
import './terminals-Dlg0x3nY.mjs';
|
|
69
70
|
import './terminalTitleSuggest-CeKsX_V6.mjs';
|
|
70
71
|
import './tmuxSocket-B8Yx20sT.mjs';
|
|
71
|
-
import './bootstrap-
|
|
72
|
-
import './package-
|
|
72
|
+
import './bootstrap-DS8Acdhm.mjs';
|
|
73
|
+
import './package-CTrz6U3C.mjs';
|
|
73
74
|
import './webPanels-B2_C2-3g.mjs';
|
|
74
|
-
import './pushNotifications-
|
|
75
|
+
import './pushNotifications-C4R9-1hU.mjs';
|
|
75
76
|
import './contentLogMetadata-BlWI0egu.mjs';
|
|
76
77
|
import './previewPath-CXN4Vag0.mjs';
|
|
77
78
|
import 'crypto';
|
|
78
|
-
import './
|
|
79
|
-
import './lidState-DghbfRbr.mjs';
|
|
79
|
+
import './lidState-DXeYTsrm.mjs';
|
|
80
80
|
import 'os';
|
|
81
81
|
import 'child_process';
|
|
82
82
|
import 'node:events';
|
|
83
|
-
import './registerCommonHandlers-
|
|
83
|
+
import './registerCommonHandlers-a9lHojSV.mjs';
|
|
84
84
|
import 'util';
|
|
85
85
|
import 'fs/promises';
|
|
86
86
|
import 'path';
|
|
87
87
|
import 'cross-spawn';
|
|
88
|
-
import './sync
|
|
88
|
+
import './sync--QUIOuf8.mjs';
|
|
89
89
|
import 'chalk';
|
|
90
|
+
import './processTreeSnapshot-CuLJDNC-.mjs';
|
|
90
91
|
import 'node:readline';
|
|
91
92
|
import './manager-BEsI4qt3.mjs';
|
|
92
93
|
import '@anthropic-ai/sandbox-runtime';
|
|
93
|
-
import './rateLimitWindows-
|
|
94
|
+
import './rateLimitWindows-HlHATOQ0.mjs';
|
|
94
95
|
import './processTree-CP5IvQ2Z.mjs';
|
|
95
|
-
import 'node:util';
|
|
96
96
|
import './detectCLI-CSGMlV51.mjs';
|
|
97
97
|
import 'fs';
|
|
98
|
-
import './localHappyAgentAuth-
|
|
98
|
+
import './localHappyAgentAuth-C1A4ChCR.mjs';
|
|
99
|
+
import './fsMkdir-DumgLTzR.mjs';
|
|
99
100
|
import './types-CkqAACXx.mjs';
|
|
100
101
|
import 'url';
|
|
101
|
-
import './spawnHappyCLI-
|
|
102
|
+
import './spawnHappyCLI-v_bJwZ4Z.mjs';
|
|
102
103
|
import './doctorReadiness-C208SMN9.mjs';
|
|
103
104
|
|
|
104
105
|
function getStartedSubagents(state) {
|
|
@@ -234,7 +235,32 @@ function turnStatus(turn) {
|
|
|
234
235
|
}
|
|
235
236
|
return "completed";
|
|
236
237
|
}
|
|
237
|
-
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) {
|
|
238
264
|
const time = turnTimestampMs(turn);
|
|
239
265
|
const opts = { turn: turn.id, time, codexItemId: item.id };
|
|
240
266
|
envelopes.push(createEnvelope("agent", {
|
|
@@ -248,20 +274,25 @@ function emitHistoricalToolCall(envelopes, turn, item, name, title, args, output
|
|
|
248
274
|
...opts,
|
|
249
275
|
id: `${item.id}:start`
|
|
250
276
|
}));
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
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;
|
|
260
290
|
}
|
|
261
|
-
|
|
291
|
+
const result = textResultPayload(output ?? "", isError);
|
|
262
292
|
envelopes.push(createEnvelope("agent", {
|
|
263
293
|
t: "tool-call-end",
|
|
264
|
-
call: item.id
|
|
294
|
+
call: item.id,
|
|
295
|
+
...result ? { result } : {}
|
|
265
296
|
}, {
|
|
266
297
|
...opts,
|
|
267
298
|
id: `${item.id}:end`,
|
|
@@ -359,7 +390,8 @@ function mapCodexThreadToSessionEnvelopes(thread) {
|
|
|
359
390
|
"CodexBash",
|
|
360
391
|
commandToTitle(command),
|
|
361
392
|
{ command, cwd: item.cwd },
|
|
362
|
-
typeof item.aggregatedOutput === "string" ? item.aggregatedOutput : null
|
|
393
|
+
typeof item.aggregatedOutput === "string" ? item.aggregatedOutput : null,
|
|
394
|
+
commandFailed(item.exitCode, item.status)
|
|
363
395
|
);
|
|
364
396
|
break;
|
|
365
397
|
}
|
|
@@ -378,7 +410,8 @@ function mapCodexThreadToSessionEnvelopes(thread) {
|
|
|
378
410
|
}
|
|
379
411
|
case "mcpToolCall": {
|
|
380
412
|
const title = `${item.server}.${item.tool}`;
|
|
381
|
-
const
|
|
413
|
+
const failed = item.error !== void 0 && item.error !== null;
|
|
414
|
+
const output = failed ? errorText(item.error) : mcpResultText(item.result);
|
|
382
415
|
emitHistoricalToolCall(
|
|
383
416
|
envelopes,
|
|
384
417
|
turn,
|
|
@@ -390,7 +423,8 @@ function mapCodexThreadToSessionEnvelopes(thread) {
|
|
|
390
423
|
tool: item.tool,
|
|
391
424
|
arguments: item.arguments
|
|
392
425
|
},
|
|
393
|
-
output
|
|
426
|
+
output,
|
|
427
|
+
failed
|
|
394
428
|
);
|
|
395
429
|
break;
|
|
396
430
|
}
|
|
@@ -594,7 +628,8 @@ function mapCodexMcpMessageToSessionEnvelopes(message, state) {
|
|
|
594
628
|
const call = pickCallId(message);
|
|
595
629
|
const envelopes = [];
|
|
596
630
|
maybeEmitSubagentStart(subagent, opts, startedSubagents, activeSubagents, envelopes, pickSubagentLabel(message), labeledSubagents);
|
|
597
|
-
|
|
631
|
+
const result = commandResult(message);
|
|
632
|
+
envelopes.push(createEnvelope("agent", { t: "tool-call-end", call, ...result ? { result } : {} }, opts));
|
|
598
633
|
return {
|
|
599
634
|
currentTurnId: state.currentTurnId,
|
|
600
635
|
startedSubagents,
|