@qwen-code/qwen-code 0.21.7-nightly.20260808.4ec0371e6 → 0.21.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -0
- package/bundled/qc-helper/docs/configuration/settings.md +12 -8
- package/bundled/qc-helper/docs/features/commands.md +1 -1
- package/bundled/qc-helper/docs/features/hooks.md +50 -0
- package/bundled/qc-helper/docs/integration-jetbrains.md +1 -0
- package/bundled/qc-helper/docs/qwen-serve.md +1 -1
- package/bundled/qc-helper/docs/reference/keyboard-shortcuts.md +50 -36
- package/bundled/review/SKILL.md +24 -5
- package/chunks/{MaxSizedBox-COZBVNCI.js → MaxSizedBox-7PM6BGJ5.js} +13 -10
- package/chunks/{StandaloneSessionPicker-3OF2FS6S.js → StandaloneSessionPicker-3UQHM7GV.js} +29 -26
- package/chunks/{acp-startup-profiler-ORIQ2CCQ.js → acp-startup-profiler-B5BYAMYQ.js} +2 -2
- package/chunks/{acpAgent-3JCJ6KWG.js → acpAgent-5UWLFV6V.js} +369 -148
- package/chunks/{agent-DBSC47CD.js → agent-624T2BLO.js} +13 -10
- package/chunks/{agent-headless-ZJHZ7I3S.js → agent-headless-2EE5J2KX.js} +13 -10
- package/chunks/{bridge-NFBYT4ZI.js → bridge-JENKGFFP.js} +15 -12
- package/chunks/{ca-NYKNH222.js → ca-ZLKAB4K3.js} +6 -0
- package/chunks/{channel-management-service-LXSJXQGM.js → channel-management-service-DDWUPHMU.js} +1 -1
- package/chunks/{channel-settings-store-LABKDKSI.js → channel-settings-store-SA6JZSPH.js} +21 -18
- package/chunks/{channel-worker-group-MTW2AGT3.js → channel-worker-group-E67EN3RV.js} +2 -2
- package/chunks/{channel-worker-manager-UU6PTQSI.js → channel-worker-manager-SW4C45CF.js} +2 -2
- package/chunks/{chunk-CJXIIILK.js → chunk-2FRY5CRX.js} +1 -1
- package/chunks/{chunk-HKCYGZZ4.js → chunk-2ILAOM2I.js} +30 -13
- package/chunks/{chunk-LDY4J4G6.js → chunk-2M4K4KYS.js} +176 -119
- package/chunks/{chunk-22NBYCPD.js → chunk-3P2LV43B.js} +1 -1
- package/chunks/{chunk-XCG76UE6.js → chunk-3PY4LPJF.js} +17 -129
- package/chunks/{chunk-26ISE5EG.js → chunk-3SE7J4DR.js} +3 -3
- package/chunks/{chunk-APMRLB2H.js → chunk-3WNQOYHQ.js} +12 -12
- package/chunks/{chunk-O7VQ3F22.js → chunk-4ALIARFY.js} +1 -1
- package/chunks/{chunk-FJ6YHWHZ.js → chunk-4DU3NCHG.js} +47 -54
- package/chunks/{chunk-BGG4MBYD.js → chunk-4PYCZH2V.js} +4 -187
- package/chunks/{chunk-3HS6Y4UA.js → chunk-4WU6NY7F.js} +2 -2
- package/chunks/{chunk-JRIJOZXO.js → chunk-5ZGR6RKJ.js} +3 -3
- package/chunks/{chunk-3K7FH2KQ.js → chunk-67N6HB5H.js} +1310 -171
- package/chunks/{chunk-ZQGHESAS.js → chunk-6TR7CFXH.js} +1 -1
- package/chunks/{chunk-EZ53KMUN.js → chunk-757GB46F.js} +1 -1
- package/chunks/{chunk-5YT3Y33M.js → chunk-77QVBFCU.js} +3 -3
- package/chunks/{chunk-5PGKKSO6.js → chunk-7DVT4LVV.js} +35 -28
- package/chunks/{chunk-IMK3SJ43.js → chunk-7VUERJHS.js} +1066 -597
- package/chunks/{chunk-KPMB4JEZ.js → chunk-B52AWKBB.js} +64 -20
- package/chunks/{chunk-R2KZWK5Z.js → chunk-BF224XHL.js} +2 -2
- package/chunks/{chunk-TSYIQDG7.js → chunk-BF52U4XJ.js} +1 -1
- package/chunks/{chunk-LDUGDB5H.js → chunk-C5VWPTGT.js} +1 -1
- package/chunks/{chunk-W7U4ESW2.js → chunk-CG3WBKJK.js} +1 -1
- package/chunks/chunk-COBO5EBO.js +135 -0
- package/chunks/{chunk-ACHMWGC5.js → chunk-DQSDACD2.js} +1 -1
- package/chunks/{chunk-VT3VNFVW.js → chunk-DX5W5AON.js} +2 -2
- package/chunks/{chunk-JACAHYEN.js → chunk-E4ZBKMSF.js} +4 -4
- package/chunks/{chunk-MV7VUCIG.js → chunk-EIVICVHM.js} +4 -4
- package/chunks/{chunk-YHEEE624.js → chunk-EN2TKTFH.js} +1 -1
- package/chunks/chunk-F6WFNA7U.js +22 -0
- package/chunks/{chunk-Z6W3XDLN.js → chunk-FN6YXJOP.js} +1 -1
- package/chunks/{chunk-BJKFFPX2.js → chunk-FWBXMANW.js} +3 -3
- package/chunks/{chunk-764F335K.js → chunk-FYAXKJK7.js} +314 -63
- package/chunks/{chunk-XIDHBXUI.js → chunk-GBDINRIL.js} +3 -3
- package/chunks/{chunk-Z5ZAWED3.js → chunk-GOEVOFQI.js} +3 -3
- package/chunks/{chunk-ZKUJ4AO7.js → chunk-GQCEQPYQ.js} +3 -3
- package/chunks/{chunk-BFSQBXHV.js → chunk-GXSNGY5M.js} +399 -534
- package/chunks/{chunk-3ARO4N5G.js → chunk-HA3SAB64.js} +22 -69
- package/chunks/{chunk-3ULCB3NE.js → chunk-HV76SFIA.js} +1 -1
- package/chunks/{chunk-LMEIS6WW.js → chunk-HWX5HPUG.js} +3 -3
- package/chunks/{chunk-VLFX3L3X.js → chunk-IBYULW65.js} +6 -6
- package/chunks/{chunk-SDUDZNF4.js → chunk-IUQ52YJK.js} +1 -1
- package/chunks/{chunk-H2352CX2.js → chunk-IYES5WOT.js} +2 -2
- package/chunks/{chunk-CE5UCTKO.js → chunk-KAQCJO6Y.js} +1 -1
- package/chunks/{chunk-DPH3MUAP.js → chunk-KKDVZLGL.js} +1 -1
- package/chunks/{chunk-R574ATRM.js → chunk-M2PNLYGY.js} +41 -0
- package/chunks/{chunk-P7HUJDBZ.js → chunk-M3STHEMM.js} +11 -16
- package/chunks/{chunk-VDS2WYM5.js → chunk-NGYI5EF5.js} +2 -2
- package/chunks/{chunk-ALGGS7UH.js → chunk-NPQ5ZKRP.js} +82 -1
- package/chunks/{chunk-GUFY6D3E.js → chunk-NPUXXRJI.js} +1 -1
- package/chunks/{chunk-4Q6N3SNL.js → chunk-NVRDQFCX.js} +1 -1
- package/chunks/{chunk-77WOUGCA.js → chunk-OHKJVAKG.js} +7 -7
- package/chunks/{chunk-TAOSTUHI.js → chunk-PG62DFWD.js} +10 -10
- package/chunks/{chunk-REHWPCG2.js → chunk-PLFATELK.js} +1 -1
- package/chunks/{chunk-APNNM3JC.js → chunk-QGHSP65Z.js} +2 -2
- package/chunks/{chunk-HY2INPTA.js → chunk-QQWD7LZV.js} +4 -4
- package/chunks/{chunk-P74TZRXD.js → chunk-QXVSWG66.js} +1 -1
- package/chunks/{chunk-TX3KSSDN.js → chunk-S3Y3GBFD.js} +1 -1
- package/chunks/{chunk-B23P3YWE.js → chunk-SNRT2TJJ.js} +6 -23
- package/chunks/chunk-SR7RZ4MS.js +202 -0
- package/chunks/{chunk-F3LPXDJP.js → chunk-TE3ZAJE7.js} +13 -3
- package/chunks/{chunk-AB4A73VL.js → chunk-TKSZJ5BV.js} +1 -1
- package/chunks/{chunk-RZMGG3HP.js → chunk-U5SLIG7E.js} +1 -1
- package/chunks/chunk-UA5H3DS2.js +203 -0
- package/chunks/{chunk-JSJTZ6GO.js → chunk-VWMUDKLC.js} +3 -3
- package/chunks/{chunk-RGTB44BO.js → chunk-VXZ5HAOV.js} +1 -1
- package/chunks/{chunk-BCMJPTXV.js → chunk-WG6542MA.js} +1 -1
- package/chunks/{chunk-AG3P2RES.js → chunk-WV5J6Q6N.js} +1 -1
- package/chunks/{chunk-MIA37QO3.js → chunk-XHD7CRP2.js} +2 -2
- package/chunks/{chunk-KKRGVSHC.js → chunk-XZKQT2B2.js} +4 -4
- package/chunks/{chunk-4QJJHIZ5.js → chunk-Y4TETC74.js} +5 -5
- package/chunks/{chunk-QKJT5K4Q.js → chunk-YEF7XEO2.js} +3 -3
- package/chunks/{chunk-UKAYEQDU.js → chunk-YHJFF7KH.js} +131 -38
- package/chunks/{chunk-64YLXLMY.js → chunk-YOM7DEGB.js} +2 -2
- package/chunks/{chunk-BN3OROB3.js → chunk-ZCLLJARV.js} +9 -9
- package/chunks/{chunk-RFA6VDCR.js → chunk-ZHA242R4.js} +2 -2
- package/chunks/{chunk-L4OW63GW.js → chunk-ZPLALRXZ.js} +17 -9
- package/chunks/{computer-use-QLJ27OCZ.js → computer-use-ESQYJ3JY.js} +13 -10
- package/chunks/{config-utils-KIEXWA4F.js → config-utils-XQHBJP7G.js} +2 -2
- package/chunks/{contextCommand-JDTOJRBO.js → contextCommand-CX3YF4ZE.js} +15 -12
- package/chunks/{core-runtime-MZIAVYQC.js → core-runtime-DIAU7JMG.js} +13 -10
- package/chunks/{create-sub-session-YBBCNSHE.js → create-sub-session-HDPD6HOA.js} +13 -10
- package/chunks/{daemon-SCTQMM7Z.js → daemon-VZBGJUNL.js} +30 -0
- package/chunks/{daemon-status-provider-BZ7RD4ZJ.js → daemon-status-provider-H6O4UQ4F.js} +19 -16
- package/chunks/{daemon-trust-policy-2E4C3M7S.js → daemon-trust-policy-BNUXG6MT.js} +20 -17
- package/chunks/{daemon-trust-policy-monitor-UYLFH6RW.js → daemon-trust-policy-monitor-E4EQ7GF4.js} +20 -17
- package/chunks/{de-VL76CPLV.js → de-LIW4XVLN.js} +5 -0
- package/chunks/{deferred-core-runtime-6XZYMJZB.js → deferred-core-runtime-CBMSHPAU.js} +13 -10
- package/chunks/{dist-BATY7GI4.js → dist-EEEQGCZA.js} +731 -136
- package/chunks/{dist-26RK5XZO.js → dist-MKX5OSFF.js} +4 -3
- package/chunks/{earlyInputCapture-LATQCGDC.js → earlyInputCapture-UIOP7OIN.js} +13 -10
- package/chunks/{edit-72DP57CD.js → edit-ITMZYFKA.js} +13 -10
- package/chunks/{en-IRJ2WN5T.js → en-SY5GTIGX.js} +6 -0
- package/chunks/{enter-worktree-B4FY2ZPP.js → enter-worktree-S4PL5UV6.js} +13 -10
- package/chunks/{enterPlanMode-TQBWGCPL.js → enterPlanMode-YV52NNJT.js} +13 -10
- package/chunks/{environment-MOGZGZDS.js → environment-NGOWPRZV.js} +17 -14
- package/chunks/{errors-PGON5GH7.js → errors-BU26DTDX.js} +15 -12
- package/chunks/{exit-worktree-EYUD4YP2.js → exit-worktree-XRM6LH5F.js} +13 -10
- package/chunks/{exitPlanMode-4Q7BSQXR.js → exitPlanMode-ZLI5F7KR.js} +13 -10
- package/chunks/{fast-path-WI7D5MER.js → fast-path-UJWORIED.js} +3 -3
- package/chunks/{fast-path-settings-YBRL24DB.js → fast-path-settings-37WQD5B2.js} +6 -3
- package/chunks/{fr-GK3HQYVB.js → fr-RQFO7U4P.js} +5 -0
- package/chunks/{gemini-ZXURGM6Y.js → gemini-ZSKNDUMU.js} +55 -48
- package/chunks/{geminiContentGenerator-EOODO75Y.js → geminiContentGenerator-YGEXOEKD.js} +1 -1
- package/chunks/{glob-QNRIUOS6.js → glob-7KZG44BR.js} +13 -10
- package/chunks/{goal-tools-QSYW65HV.js → goal-tools-PXWN5VK3.js} +3 -1
- package/chunks/{grep-56MTW67B.js → grep-6ZFC7RJ5.js} +13 -10
- package/chunks/{handleAutoUpdate-XGFIPVT4.js → handleAutoUpdate-KSEL3TQS.js} +17 -14
- package/chunks/{i18n-RZB35L4B.js → i18n-ZIUXBW5V.js} +14 -11
- package/chunks/{image-gen-OE2EEKN3.js → image-gen-AUIZJJNK.js} +6 -4
- package/chunks/{initializer-YPVMTMKD.js → initializer-7AHY3N6Q.js} +20 -17
- package/chunks/{installationInfo-ZTMTMYNW.js → installationInfo-VGBXMYLY.js} +14 -11
- package/chunks/{ja-3FA46IKD.js → ja-KOZKHJHZ.js} +5 -0
- package/chunks/{list-NIW3WID5.js → list-PSFKQHLB.js} +23 -20
- package/chunks/{loadedSettingsAdapter-VSLILTOZ.js → loadedSettingsAdapter-FTMRCTOF.js} +20 -17
- package/chunks/{loggingContentGenerator-KFZYVAGV.js → loggingContentGenerator-MZAN52UV.js} +5 -3
- package/chunks/{managed-npm-update-WHTA2K5V.js → managed-npm-update-O4NHK45X.js} +14 -11
- package/chunks/{mcp-7KGK3CS3.js → mcp-6CFP2AYQ.js} +20 -17
- package/chunks/{monitor-FDWEJQWP.js → monitor-DAKD6OU4.js} +13 -10
- package/chunks/{nonInteractiveCli-2MVJ6TCS.js → nonInteractiveCli-RC7VIUZL.js} +49 -44
- package/chunks/{notebook-edit-ZUVK2XWE.js → notebook-edit-474DPMRL.js} +13 -10
- package/chunks/{openaiContentGenerator-TNLWOPH5.js → openaiContentGenerator-2NFY2MWO.js} +6 -3
- package/chunks/{pidfile-BB6SKPH2.js → pidfile-KBFVDNQP.js} +13 -10
- package/chunks/{processUtils-WKHJOPDH.js → processUtils-6GRYH4Y3.js} +2 -2
- package/chunks/{pt-3AOBKPIJ.js → pt-U6AOCTMF.js} +5 -0
- package/chunks/{qwenContentGenerator-FZS2DYF7.js → qwenContentGenerator-KAHU6IZY.js} +14 -11
- package/chunks/{qwenOAuth2-UYMYRXBB.js → qwenOAuth2-RRQTCP4W.js} +6 -4
- package/chunks/{read-file-FMTE6LPA.js → read-file-3M6WXDXP.js} +4 -2
- package/chunks/{resumeHistoryUtils-Z34RCZFF.js → resumeHistoryUtils-D6TAY3HX.js} +16 -13
- package/chunks/{ripGrep-DUIYUZGM.js → ripGrep-PLPENT3E.js} +13 -10
- package/chunks/{ru-VJRAMC4W.js → ru-CMX4UMYP.js} +5 -0
- package/chunks/{run-qwen-serve-KOHHR3F4.js → run-qwen-serve-ZAFIJKJC.js} +93 -40
- package/chunks/{runtime-K4NTZSAU.js → runtime-ZED7CYOZ.js} +23 -20
- package/chunks/{scheduler-6G6AMURS.js → scheduler-MD3AL2W5.js} +13 -10
- package/chunks/{serve-NMG2TM5K.js → serve-E3VUDRZN.js} +20 -17
- package/chunks/{server-FS7KDELS.js → server-OWMEMAKR.js} +381 -192
- package/chunks/{session-XZADUVKJ.js → session-HZ57QK7K.js} +141 -81
- package/chunks/{settings-G75R6FOA.js → settings-V7BR3RKP.js} +19 -16
- package/chunks/{shell-3D3PMQHE.js → shell-23OMNMW6.js} +13 -10
- package/chunks/{skill-TSEYMVQ2.js → skill-6HBDYZRS.js} +4 -2
- package/chunks/{skill-settings-HJC2CPBJ.js → skill-settings-HWJLTU7M.js} +19 -16
- package/chunks/{spawnChannel-YWCN74G5.js → spawnChannel-N6KKUW5B.js} +13 -10
- package/chunks/{standalone-update-HLYOLX6V.js → standalone-update-QGIKHATD.js} +15 -12
- package/chunks/{startInteractiveUI-ROUIQ5KU.js → startInteractiveUI-GX2CRL42.js} +269 -118
- package/chunks/{team-create-OTP5SSB2.js → team-create-CFFKU7KL.js} +13 -10
- package/chunks/{team-plan-approval-TQX5TMXU.js → team-plan-approval-6EFOKR6A.js} +13 -10
- package/chunks/{terminal-image-renderer-KF3GKNWW.js → terminal-image-renderer-TLDNACQY.js} +13 -10
- package/chunks/{theme-manager-XVWAAGAM.js → theme-manager-5LJ3H7VO.js} +13 -10
- package/chunks/{tool-search-7N4D4O56.js → tool-search-UJV3A24H.js} +4 -2
- package/chunks/{total-session-admission-ZQ4VKIRW.js → total-session-admission-D63QYXGO.js} +15 -12
- package/chunks/{trustedFolders-4XYFPWVV.js → trustedFolders-KZCOB53W.js} +17 -12
- package/chunks/{update-relaunch-L4GSBLUU.js → update-relaunch-IFILM3SA.js} +5 -5
- package/chunks/{updateCheck-PCUTVRFE.js → updateCheck-YZ2CRCFC.js} +16 -13
- package/chunks/{useAutoAcceptIndicator-WMXY7MND.js → useAutoAcceptIndicator-AXEVNA3Q.js} +22 -19
- package/chunks/{validateNonInterActiveAuth-5S3U2D56.js → validateNonInterActiveAuth-3WTOJFWA.js} +44 -41
- package/chunks/{version-P57IQU2T.js → version-GXK7OHZY.js} +1 -1
- package/chunks/{web-fetch-5ZLLLCDD.js → web-fetch-ILB4GAVR.js} +10 -6
- package/chunks/{web-search-NELKANTW.js → web-search-HKRPGPZZ.js} +5 -3
- package/chunks/{workflow-RXKBF3LO.js → workflow-FXIPRQQA.js} +735 -134
- package/chunks/{workspace-providers-status-HAEMNAWC.js → workspace-providers-status-NYHC7HSR.js} +22 -19
- package/chunks/{workspace-registration-store-U3U3YM6V.js → workspace-registration-store-AKEB7OMW.js} +1 -1
- package/chunks/{workspace-registry-ZFP33GVB.js → workspace-registry-CDAS5TVZ.js} +15 -12
- package/chunks/{workspace-service-QMISJBMA.js → workspace-service-PAMUKMAV.js} +23 -20
- package/chunks/{workspace-skills-status-K7EOUGXL.js → workspace-skills-status-YQSHCCMS.js} +20 -17
- package/chunks/{workspace-trust-reconciler-BFPKULDZ.js → workspace-trust-reconciler-RPTXOIY2.js} +22 -19
- package/chunks/{write-file-2F76RRFE.js → write-file-CGS57TS4.js} +13 -10
- package/chunks/{zh-ARWDLDLR.js → zh-AGL2FVBI.js} +6 -0
- package/chunks/{zh-TW-Y4RGI3P7.js → zh-TW-KI66MHQY.js} +6 -0
- package/chunks/{zoom-image-DPR22XWY.js → zoom-image-E7D72GYV.js} +4 -2
- package/cli.js +13 -13
- package/locales/ca.js +10 -0
- package/locales/de.js +9 -0
- package/locales/en.js +10 -0
- package/locales/fr.js +9 -0
- package/locales/ja.js +9 -0
- package/locales/pt.js +9 -0
- package/locales/ru.js +9 -0
- package/locales/zh-TW.js +10 -0
- package/locales/zh.js +10 -0
- package/package.json +3 -3
- package/web-shell/assets/{arc-CunFPPcQ.js → arc-DybZaz32.js} +1 -1
- package/web-shell/assets/{architectureDiagram-3BPJPVTR-D3SqCgeM.js → architectureDiagram-3BPJPVTR-jN3qBd19.js} +1 -1
- package/web-shell/assets/{blockDiagram-GPEHLZMM-CPRx90S_.js → blockDiagram-GPEHLZMM-Ct5DZPrj.js} +1 -1
- package/web-shell/assets/{c4Diagram-AAUBKEIU-CahP9Ue4.js → c4Diagram-AAUBKEIU-CUAFMlUG.js} +1 -1
- package/web-shell/assets/channel-BMwLrwLW.js +1 -0
- package/web-shell/assets/{chunk-2J33WTMH-DckIWZ12.js → chunk-2J33WTMH-CuV8n90B.js} +1 -1
- package/web-shell/assets/{chunk-4BX2VUAB-D2Kfctyn.js → chunk-4BX2VUAB-BUzl_kls.js} +1 -1
- package/web-shell/assets/{chunk-55IACEB6-DkI11FTX.js → chunk-55IACEB6-BnDBLX6A.js} +1 -1
- package/web-shell/assets/{chunk-727SXJPM-rR-TSCIi.js → chunk-727SXJPM-B83uTOjm.js} +1 -1
- package/web-shell/assets/{chunk-AQP2D5EJ-DFGKcGRO.js → chunk-AQP2D5EJ-DM3HLgpT.js} +1 -1
- package/web-shell/assets/{chunk-FMBD7UC4-CjWqcTPE.js → chunk-FMBD7UC4-CSQ5hgyb.js} +1 -1
- package/web-shell/assets/{chunk-ND2GUHAM-RXe-87UV.js → chunk-ND2GUHAM-BWOF4SxX.js} +1 -1
- package/web-shell/assets/{chunk-QZHKN3VN-Dz0c_Yrn.js → chunk-QZHKN3VN-BsOH9LMi.js} +1 -1
- package/web-shell/assets/classDiagram-4FO5ZUOK-BGDv98jY.js +1 -0
- package/web-shell/assets/classDiagram-v2-Q7XG4LA2-BGDv98jY.js +1 -0
- package/web-shell/assets/{cose-bilkent-S5V4N54A-ZHF0-jvV.js → cose-bilkent-S5V4N54A-IENqH2iJ.js} +1 -1
- package/web-shell/assets/{dagre-BM42HDAG-7Umz_ygJ.js → dagre-BM42HDAG--dyzDTGo.js} +1 -1
- package/web-shell/assets/{diagram-2AECGRRQ-DomN8nxq.js → diagram-2AECGRRQ-BE7Dcqof.js} +1 -1
- package/web-shell/assets/{diagram-5GNKFQAL-eebvj2OL.js → diagram-5GNKFQAL-Cr8-5OTj.js} +1 -1
- package/web-shell/assets/{diagram-KO2AKTUF-IR1mmn9d.js → diagram-KO2AKTUF-Bzey3uAY.js} +1 -1
- package/web-shell/assets/{diagram-LMA3HP47-CKysx5KF.js → diagram-LMA3HP47-sErl28Xb.js} +1 -1
- package/web-shell/assets/{diagram-OG6HWLK6-cBy5puHn.js → diagram-OG6HWLK6-Dq30ATIo.js} +1 -1
- package/web-shell/assets/{erDiagram-TEJ5UH35-B5RJagPG.js → erDiagram-TEJ5UH35-BkCoEfVW.js} +1 -1
- package/web-shell/assets/{flowDiagram-I6XJVG4X-CfHgDmPg.js → flowDiagram-I6XJVG4X-DHwO0rrI.js} +1 -1
- package/web-shell/assets/{ganttDiagram-6RSMTGT7-DUfFF5nb.js → ganttDiagram-6RSMTGT7-s7vAPxWq.js} +1 -1
- package/web-shell/assets/{gitGraphDiagram-PVQCEYII-M9dt57k5.js → gitGraphDiagram-PVQCEYII-CQxhwPOU.js} +1 -1
- package/web-shell/assets/{index-B8e-CkuC.css → index-Bckpjr-I.css} +1 -1
- package/web-shell/assets/{index-CKjO4myk.js → index-CF4wApWp.js} +1 -1
- package/web-shell/assets/{index-Dc-fTO0V.js → index-DwEr9HEW.js} +316 -316
- package/web-shell/assets/{infoDiagram-5YYISTIA-CTKMmIro.js → infoDiagram-5YYISTIA-BnFrD0bq.js} +1 -1
- package/web-shell/assets/{ishikawaDiagram-YF4QCWOH-DJIJDP4s.js → ishikawaDiagram-YF4QCWOH-Bf9zK5NK.js} +1 -1
- package/web-shell/assets/{journeyDiagram-JHISSGLW-DgRnvn6S.js → journeyDiagram-JHISSGLW-CyGAhsxi.js} +1 -1
- package/web-shell/assets/{kanban-definition-UN3LZRKU-VUwO8yrg.js → kanban-definition-UN3LZRKU-CbsK5akB.js} +1 -1
- package/web-shell/assets/{linear-BCvgV5I_.js → linear-cQsF4P8D.js} +1 -1
- package/web-shell/assets/{mermaid.core-mv_kVV6q.js → mermaid.core-Z4HVqrKY.js} +5 -5
- package/web-shell/assets/{mindmap-definition-RKZ34NQL-sfnjMlOd.js → mindmap-definition-RKZ34NQL-CYnrBo_f.js} +1 -1
- package/web-shell/assets/{pieDiagram-4H26LBE5-BlhICse4.js → pieDiagram-4H26LBE5-CBzOfhrs.js} +1 -1
- package/web-shell/assets/{quadrantDiagram-W4KKPZXB-BgTQzwen.js → quadrantDiagram-W4KKPZXB-D4LK1Ebn.js} +1 -1
- package/web-shell/assets/{requirementDiagram-4Y6WPE33-CZ-FTrrN.js → requirementDiagram-4Y6WPE33-Bzti2Lcj.js} +1 -1
- package/web-shell/assets/{sankeyDiagram-5OEKKPKP-G5Wp_jn3.js → sankeyDiagram-5OEKKPKP-yTBw5Z2s.js} +1 -1
- package/web-shell/assets/{sequenceDiagram-3UESZ5HK-C8MKZ3i1.js → sequenceDiagram-3UESZ5HK-D07UVRiZ.js} +1 -1
- package/web-shell/assets/{stateDiagram-AJRCARHV-Bo0ZDm7y.js → stateDiagram-AJRCARHV-UE_lHsTn.js} +1 -1
- package/web-shell/assets/stateDiagram-v2-BHNVJYJU-DC6xgXjX.js +1 -0
- package/web-shell/assets/{timeline-definition-PNZ67QCA-M3L9E01f.js → timeline-definition-PNZ67QCA-DRvYdiTs.js} +1 -1
- package/web-shell/assets/{vennDiagram-CIIHVFJN-DD4eHCrm.js → vennDiagram-CIIHVFJN-CQLIXs0u.js} +1 -1
- package/web-shell/assets/{wardley-L42UT6IY-DNEL_3g4.js → wardley-L42UT6IY-JZz_Xqse.js} +1 -1
- package/web-shell/assets/{wardleyDiagram-YWT4CUSO-q484OoqI.js → wardleyDiagram-YWT4CUSO--i7BiJwB.js} +1 -1
- package/web-shell/assets/{xychartDiagram-2RQKCTM6-4mcNt1Yg.js → xychartDiagram-2RQKCTM6-Bkc-bW0S.js} +1 -1
- package/web-shell/index.html +2 -2
- package/chunks/chunk-ALFTV7GA.js +0 -92
- package/web-shell/assets/channel-zbv7GWAw.js +0 -1
- package/web-shell/assets/classDiagram-4FO5ZUOK-DSjLkJJZ.js +0 -1
- package/web-shell/assets/classDiagram-v2-Q7XG4LA2-DSjLkJJZ.js +0 -1
- package/web-shell/assets/stateDiagram-v2-BHNVJYJU-31TSCPcH.js +0 -1
|
@@ -5,13 +5,14 @@ import {
|
|
|
5
5
|
FileDiscoveryService,
|
|
6
6
|
GitWorktreeService,
|
|
7
7
|
generateAgentWorktreeSlug,
|
|
8
|
+
isTerminalWorkflowStatus,
|
|
8
9
|
rebuildToolRegistryOnOverride,
|
|
9
10
|
resolveSavedWorkflowScript,
|
|
10
11
|
stripAnsiAndControl,
|
|
11
12
|
toModelVisibleSubagentResult,
|
|
12
13
|
writeWorkflowSnapshot,
|
|
13
14
|
writeWorktreeSessionMarker
|
|
14
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-GXSNGY5M.js";
|
|
15
16
|
import "./chunk-GOFAQQZA.js";
|
|
16
17
|
import "./chunk-5M6IDOMF.js";
|
|
17
18
|
import "./chunk-TWPJO254.js";
|
|
@@ -23,7 +24,7 @@ import "./chunk-7MH4J33A.js";
|
|
|
23
24
|
import {
|
|
24
25
|
parsePositiveIntegerEnv
|
|
25
26
|
} from "./chunk-6PVPNMXU.js";
|
|
26
|
-
import "./chunk-
|
|
27
|
+
import "./chunk-VXZ5HAOV.js";
|
|
27
28
|
import "./chunk-IRH27ZC2.js";
|
|
28
29
|
import "./chunk-QHWCP53L.js";
|
|
29
30
|
import "./chunk-GNPNYXJB.js";
|
|
@@ -36,12 +37,12 @@ import "./chunk-J6SZID63.js";
|
|
|
36
37
|
import "./chunk-KRXPRVGL.js";
|
|
37
38
|
import "./chunk-GM463R2B.js";
|
|
38
39
|
import "./chunk-SEZ556DZ.js";
|
|
39
|
-
import "./chunk-
|
|
40
|
-
import "./chunk-
|
|
40
|
+
import "./chunk-2FRY5CRX.js";
|
|
41
|
+
import "./chunk-67N6HB5H.js";
|
|
41
42
|
import {
|
|
42
43
|
SUBAGENT_PLAN_LIFECYCLE_TOOLS
|
|
43
44
|
} from "./chunk-WAUGQKUU.js";
|
|
44
|
-
import "./chunk-
|
|
45
|
+
import "./chunk-PLFATELK.js";
|
|
45
46
|
import "./chunk-L4N6TIP7.js";
|
|
46
47
|
import "./chunk-SAH4BD2J.js";
|
|
47
48
|
import {
|
|
@@ -55,11 +56,12 @@ import "./chunk-AQ37AY7B.js";
|
|
|
55
56
|
import {
|
|
56
57
|
WorkspaceContext
|
|
57
58
|
} from "./chunk-EQL65XGA.js";
|
|
58
|
-
import "./chunk-
|
|
59
|
+
import "./chunk-3P2LV43B.js";
|
|
59
60
|
import "./chunk-NAVJD2PQ.js";
|
|
60
|
-
import "./chunk-
|
|
61
|
-
import "./chunk-
|
|
61
|
+
import "./chunk-HV76SFIA.js";
|
|
62
|
+
import "./chunk-4PYCZH2V.js";
|
|
62
63
|
import "./chunk-P3QQPMQA.js";
|
|
64
|
+
import "./chunk-SR7RZ4MS.js";
|
|
63
65
|
import "./chunk-M6HMMKVG.js";
|
|
64
66
|
import "./chunk-DGEIYUC3.js";
|
|
65
67
|
import "./chunk-MPHPFVKK.js";
|
|
@@ -75,10 +77,11 @@ import {
|
|
|
75
77
|
logWorkflowRun,
|
|
76
78
|
read,
|
|
77
79
|
writeLine
|
|
78
|
-
} from "./chunk-
|
|
80
|
+
} from "./chunk-3PY4LPJF.js";
|
|
79
81
|
import "./chunk-WOJZWRAZ.js";
|
|
80
82
|
import "./chunk-VGC4I5JJ.js";
|
|
81
83
|
import "./chunk-FVKHVJZQ.js";
|
|
84
|
+
import "./chunk-COBO5EBO.js";
|
|
82
85
|
import {
|
|
83
86
|
SyntheticOutputTool
|
|
84
87
|
} from "./chunk-6ZRFAKXK.js";
|
|
@@ -88,7 +91,8 @@ import {
|
|
|
88
91
|
ToolDisplayNames,
|
|
89
92
|
ToolNames
|
|
90
93
|
} from "./chunk-PYQADEFD.js";
|
|
91
|
-
import "./chunk-
|
|
94
|
+
import "./chunk-M3STHEMM.js";
|
|
95
|
+
import "./chunk-F6WFNA7U.js";
|
|
92
96
|
import "./chunk-46UV252V.js";
|
|
93
97
|
import "./chunk-ZBVS26BY.js";
|
|
94
98
|
import "./chunk-KKBPOU75.js";
|
|
@@ -404,6 +408,50 @@ function resolveMaxWallClockMs(opts) {
|
|
|
404
408
|
return DEFAULT_MAX_WALL_CLOCK_MS;
|
|
405
409
|
}
|
|
406
410
|
__name(resolveMaxWallClockMs, "resolveMaxWallClockMs");
|
|
411
|
+
var WallClockWatchdog = class {
|
|
412
|
+
constructor(budgetMs, onFire) {
|
|
413
|
+
this.onFire = onFire;
|
|
414
|
+
this.remainingMs = budgetMs;
|
|
415
|
+
this.arm();
|
|
416
|
+
}
|
|
417
|
+
static {
|
|
418
|
+
__name(this, "WallClockWatchdog");
|
|
419
|
+
}
|
|
420
|
+
timer;
|
|
421
|
+
remainingMs;
|
|
422
|
+
armedAt = 0;
|
|
423
|
+
paused = false;
|
|
424
|
+
stopped = false;
|
|
425
|
+
pause() {
|
|
426
|
+
if (this.stopped || this.paused || this.timer === void 0) return;
|
|
427
|
+
this.paused = true;
|
|
428
|
+
clearTimeout(this.timer);
|
|
429
|
+
this.timer = void 0;
|
|
430
|
+
this.remainingMs = Math.max(
|
|
431
|
+
0,
|
|
432
|
+
this.remainingMs - (performance.now() - this.armedAt)
|
|
433
|
+
);
|
|
434
|
+
}
|
|
435
|
+
resume() {
|
|
436
|
+
if (this.stopped || !this.paused) return;
|
|
437
|
+
this.paused = false;
|
|
438
|
+
this.arm();
|
|
439
|
+
}
|
|
440
|
+
stop() {
|
|
441
|
+
this.stopped = true;
|
|
442
|
+
if (this.timer !== void 0) clearTimeout(this.timer);
|
|
443
|
+
this.timer = void 0;
|
|
444
|
+
}
|
|
445
|
+
arm() {
|
|
446
|
+
this.armedAt = performance.now();
|
|
447
|
+
this.timer = setTimeout(() => {
|
|
448
|
+
this.stopped = true;
|
|
449
|
+
this.timer = void 0;
|
|
450
|
+
this.onFire();
|
|
451
|
+
}, this.remainingMs);
|
|
452
|
+
this.timer.unref?.();
|
|
453
|
+
}
|
|
454
|
+
};
|
|
407
455
|
function validateArgs(val, depth = 0, seen = /* @__PURE__ */ new WeakSet()) {
|
|
408
456
|
if (depth > ARGS_MAX_DEPTH) {
|
|
409
457
|
throw new Error(
|
|
@@ -473,6 +521,17 @@ function createWorkflowSandbox(opts) {
|
|
|
473
521
|
}, "safePhase");
|
|
474
522
|
if (opts.args !== void 0) validateArgs(opts.args);
|
|
475
523
|
const argsJson = opts.args === void 0 ? null : JSON.stringify(opts.args);
|
|
524
|
+
const unconsumedRoots = /* @__PURE__ */ new Map();
|
|
525
|
+
const unconsumedRejections = /* @__PURE__ */ new Map();
|
|
526
|
+
let nextUnconsumedId = 1;
|
|
527
|
+
let unconsumedSettled = false;
|
|
528
|
+
let mirroredEscapeKeys = /* @__PURE__ */ new Set();
|
|
529
|
+
const unconsumedRejectionLine = /* @__PURE__ */ __name((rec) => {
|
|
530
|
+
if (rec.dispatchFailed) {
|
|
531
|
+
return rec.isRoot ? "dispatch failed (result not consumed): " + rec.msg : "dispatch failed (rejection not handled): " + rec.msg;
|
|
532
|
+
}
|
|
533
|
+
return "script handler failed (rejection not handled): " + rec.msg;
|
|
534
|
+
}, "unconsumedRejectionLine");
|
|
476
535
|
const bridge = {
|
|
477
536
|
argsJson,
|
|
478
537
|
pushPhase: safePhase,
|
|
@@ -490,6 +549,52 @@ function createWorkflowSandbox(opts) {
|
|
|
490
549
|
`Workflow result revival failed at index ${idx}: ${reason}; slot set to null (non-JSON-serializable thunk return).`
|
|
491
550
|
);
|
|
492
551
|
}, "logRevivalFailure"),
|
|
552
|
+
// --- Unconsumed-rejection mirror bookkeeping ---
|
|
553
|
+
wfRegisterRoot: /* @__PURE__ */ __name(() => {
|
|
554
|
+
const id = nextUnconsumedId++;
|
|
555
|
+
unconsumedRoots.set(id, { rejectionHandled: false, adoptedOut: false });
|
|
556
|
+
return id;
|
|
557
|
+
}, "wfRegisterRoot"),
|
|
558
|
+
wfMarkRejectionHandled: /* @__PURE__ */ __name((rootId) => {
|
|
559
|
+
const root = unconsumedRoots.get(rootId);
|
|
560
|
+
if (root) root.rejectionHandled = true;
|
|
561
|
+
}, "wfMarkRejectionHandled"),
|
|
562
|
+
wfIsRootHandled: /* @__PURE__ */ __name((rootId) => unconsumedRoots.get(rootId)?.rejectionHandled === true, "wfIsRootHandled"),
|
|
563
|
+
wfMarkAdopted: /* @__PURE__ */ __name((rootId) => {
|
|
564
|
+
const root = unconsumedRoots.get(rootId);
|
|
565
|
+
if (root) root.adoptedOut = true;
|
|
566
|
+
}, "wfMarkAdopted"),
|
|
567
|
+
runId: opts.runId ?? "",
|
|
568
|
+
wfReportUnconsumed: /* @__PURE__ */ __name((rootId, isRoot, dispatchFailed, msg) => {
|
|
569
|
+
if (unconsumedSettled) {
|
|
570
|
+
const rec = {
|
|
571
|
+
rootId,
|
|
572
|
+
isRoot,
|
|
573
|
+
dispatchFailed,
|
|
574
|
+
msg
|
|
575
|
+
};
|
|
576
|
+
const rootState = unconsumedRoots.get(rootId);
|
|
577
|
+
if (!rootState?.rejectionHandled && !(dispatchFailed && rootState?.adoptedOut)) {
|
|
578
|
+
safeLog(unconsumedRejectionLine(rec));
|
|
579
|
+
}
|
|
580
|
+
return 0;
|
|
581
|
+
}
|
|
582
|
+
const id = nextUnconsumedId++;
|
|
583
|
+
unconsumedRejections.set(id, { rootId, isRoot, dispatchFailed, msg });
|
|
584
|
+
return id;
|
|
585
|
+
}, "wfReportUnconsumed"),
|
|
586
|
+
wfClearUnconsumed: /* @__PURE__ */ __name((id) => {
|
|
587
|
+
unconsumedRejections.delete(id);
|
|
588
|
+
}, "wfClearUnconsumed"),
|
|
589
|
+
// R10-1: teardown discrimination cannot key on the error name alone.
|
|
590
|
+
// The dominant in-flight cancellation path (controller.abort() →
|
|
591
|
+
// subagent returns terminateMode=CANCELLED → runSingleDispatch throws
|
|
592
|
+
// a PLAIN Error) never produces an 'AbortError', so the mirror would
|
|
593
|
+
// log a spurious dispatch failure for a correctly-cancelled run. Once
|
|
594
|
+
// the run's abort signal has fired, the run is already settling as
|
|
595
|
+
// cancelled / timed-out — every rejection still crossing the boundary
|
|
596
|
+
// is teardown noise regardless of its shape.
|
|
597
|
+
isRunAborted: /* @__PURE__ */ __name(() => opts.abortOnTimeout?.signal.aborted === true, "isRunAborted"),
|
|
493
598
|
// The truthy flags distinguish "injected" from "default stub" inside the
|
|
494
599
|
// init script without leaking the host function itself when not used.
|
|
495
600
|
hasParallel: !!opts.parallel,
|
|
@@ -557,27 +662,318 @@ function createWorkflowSandbox(opts) {
|
|
|
557
662
|
// those wrappers will produce vm-realm results); reject with a
|
|
558
663
|
// freshly-constructed vm-realm Error so e.constructor.constructor
|
|
559
664
|
// stays in the vm realm.
|
|
665
|
+
// Dispatch promises are ObservedPromise instances (a vm-realm
|
|
666
|
+
// Promise subclass). Its then override marks the result consumed
|
|
667
|
+
// and re-attaches the teardown observer to the derived promise, so
|
|
668
|
+
// script-derived chains (agent(...).then(...), await, and the
|
|
669
|
+
// ELEMENTS of static-combinator aggregates \u2014 everything that
|
|
670
|
+
// funnels through then) stay observed at every depth. The
|
|
671
|
+
// AGGREGATES of Promise.all/race/any are built by the native
|
|
672
|
+
// statics and never pass through the observed then, so those
|
|
673
|
+
// statics are wrapped explicitly below (observeAggregate).
|
|
674
|
+
// Without this, a correctly-cancelled run holding a pending derived
|
|
675
|
+
// chain fired a process-level unhandledRejection even though the
|
|
676
|
+
// bare dispatch promise was observed.
|
|
677
|
+
//
|
|
678
|
+
// Unconsumed rejections of an observed node are recorded through
|
|
679
|
+
// the bridge and mirrored into the run log at run settlement (a
|
|
680
|
+
// later consumption clears the record first) \u2014 a dispatch refused
|
|
681
|
+
// at the entry gate (budget / agent cap) or failing mid-run reaches
|
|
682
|
+
// no other surface, so without the mirror the failure leaves no
|
|
683
|
+
// log, alarm, or telemetry.
|
|
684
|
+
function mapDispatchError(hostErr) {
|
|
685
|
+
var msg;
|
|
686
|
+
try {
|
|
687
|
+
msg = (hostErr && hostErr.message != null)
|
|
688
|
+
? String(hostErr.message)
|
|
689
|
+
: String(hostErr);
|
|
690
|
+
} catch (e) {
|
|
691
|
+
msg = '[unserializable rejection value]';
|
|
692
|
+
}
|
|
693
|
+
const vmErr = new Error(msg);
|
|
694
|
+
// Teardown discrimination at the host boundary \u2014 before the error
|
|
695
|
+
// is flattened into a vm-realm Error. Two shapes count as
|
|
696
|
+
// teardown: an error NAMED 'AbortError' (the scheduler's
|
|
697
|
+
// abortError() DOMException), and ANY rejection that crosses
|
|
698
|
+
// after the run's abort signal has fired \u2014 the dominant
|
|
699
|
+
// cancellation path rejects with a plain Error ('did not complete
|
|
700
|
+
// (terminate mode: CANCELLED).'), which a name-only match would
|
|
701
|
+
// mirror as a spurious dispatch failure on a correctly-cancelled
|
|
702
|
+
// run. Matching the name here (rather than the message text)
|
|
703
|
+
// still suppresses teardown noise without swallowing genuine
|
|
704
|
+
// failures whose message merely contains 'aborted' (e.g. a
|
|
705
|
+
// network-layer 'connection aborted by peer').
|
|
706
|
+
var isAbort = false;
|
|
707
|
+
try {
|
|
708
|
+
isAbort = !!(hostErr && hostErr.name === 'AbortError');
|
|
709
|
+
} catch (e) {
|
|
710
|
+
isAbort = false;
|
|
711
|
+
}
|
|
712
|
+
if (isAbort || __b.isRunAborted()) vmErr.__wfAbort = true;
|
|
713
|
+
vmErr.__wfDispatchFailed = true;
|
|
714
|
+
return vmErr;
|
|
715
|
+
}
|
|
716
|
+
function readFlag(value, name) {
|
|
717
|
+
try {
|
|
718
|
+
return !!(value && value[name]);
|
|
719
|
+
} catch (e) {
|
|
720
|
+
return false;
|
|
721
|
+
}
|
|
722
|
+
}
|
|
723
|
+
function observeDispatch(promise) {
|
|
724
|
+
// Direct native-then call: routing through ObservedPromise.then
|
|
725
|
+
// would mark the promise consumed and recurse the observer. The
|
|
726
|
+
// observer body must be exception-safe on ANY rejection value:
|
|
727
|
+
// a script handler can throw an exotic value (a message getter
|
|
728
|
+
// that throws, a Proxy with throwing traps), and an observer
|
|
729
|
+
// killed mid-body would turn the very rejection it watches into
|
|
730
|
+
// a process-level unhandledRejection \u2014 the exact failure class
|
|
731
|
+
// the observer exists to remove.
|
|
732
|
+
Promise.prototype.then.call(promise, undefined, function (err) {
|
|
733
|
+
if (promise.__wfConsumed) return;
|
|
734
|
+
// R11-30: also suppress on the run-level abort state, not just
|
|
735
|
+
// the rejection's own marker \u2014 a wrapped Promise.any aggregate
|
|
736
|
+
// rejects with a natively built AggregateError that carries
|
|
737
|
+
// neither marker, so teardown rejections of a correctly-
|
|
738
|
+
// cancelled run would still be mirrored when it is unconsumed.
|
|
739
|
+
if (readFlag(err, '__wfAbort') || __b.isRunAborted()) return;
|
|
740
|
+
var dispatchFailed = readFlag(err, '__wfDispatchFailed');
|
|
741
|
+
var errors = null;
|
|
742
|
+
try {
|
|
743
|
+
if (err && Array.isArray(err.errors)) errors = err.errors;
|
|
744
|
+
} catch (e) {
|
|
745
|
+
errors = null;
|
|
746
|
+
}
|
|
747
|
+
if (!dispatchFailed && errors) {
|
|
748
|
+
// R11-4: Promise.any rejects with a fresh vm-realm
|
|
749
|
+
// AggregateError carrying no flags; the element errors are
|
|
750
|
+
// reachable on .errors with their markers preserved. Derive
|
|
751
|
+
// the attribution from the causes instead of blaming the
|
|
752
|
+
// script for a dispatch failure.
|
|
753
|
+
for (var i = 0; i < errors.length; i++) {
|
|
754
|
+
if (readFlag(errors[i], '__wfDispatchFailed')) {
|
|
755
|
+
dispatchFailed = true;
|
|
756
|
+
break;
|
|
757
|
+
}
|
|
758
|
+
}
|
|
759
|
+
}
|
|
760
|
+
// R11-15: cross-root suppression \u2014 aggregate roots track
|
|
761
|
+
// rejectionHandled independently of their elements' roots, so
|
|
762
|
+
// a forwarded dispatch failure whose originating element root
|
|
763
|
+
// the script already handled must not mirror from the
|
|
764
|
+
// aggregate. The element rootId is stamped in vmAsync;
|
|
765
|
+
// Promise.all/race forward the element's own reason,
|
|
766
|
+
// Promise.any surfaces them on .errors.
|
|
767
|
+
try {
|
|
768
|
+
var sourceIds = [];
|
|
769
|
+
if (err && err.__wfRootId) {
|
|
770
|
+
sourceIds.push(err.__wfRootId);
|
|
771
|
+
} else if (errors) {
|
|
772
|
+
for (var j = 0; j < errors.length; j++) {
|
|
773
|
+
if (errors[j] && errors[j].__wfRootId) {
|
|
774
|
+
sourceIds.push(errors[j].__wfRootId);
|
|
775
|
+
}
|
|
776
|
+
}
|
|
777
|
+
}
|
|
778
|
+
for (var k = 0; k < sourceIds.length; k++) {
|
|
779
|
+
if (
|
|
780
|
+
sourceIds[k] !== promise.__wfRootId &&
|
|
781
|
+
__b.wfIsRootHandled(sourceIds[k])
|
|
782
|
+
) {
|
|
783
|
+
return;
|
|
784
|
+
}
|
|
785
|
+
}
|
|
786
|
+
} catch (e) {
|
|
787
|
+
// A throwing exotic value must not kill the observer; fall
|
|
788
|
+
// through and mirror conservatively.
|
|
789
|
+
}
|
|
790
|
+
var msg;
|
|
791
|
+
try {
|
|
792
|
+
msg = String(err && err.message != null ? err.message : err);
|
|
793
|
+
} catch (e) {
|
|
794
|
+
msg = '[unserializable rejection value]';
|
|
795
|
+
}
|
|
796
|
+
promise.__wfUnconsumedId = __b.wfReportUnconsumed(
|
|
797
|
+
promise.__wfRootId,
|
|
798
|
+
promise.__wfIsRoot === true,
|
|
799
|
+
dispatchFailed,
|
|
800
|
+
msg,
|
|
801
|
+
);
|
|
802
|
+
});
|
|
803
|
+
}
|
|
804
|
+
// R11-3: await / Promise.resolve / returning a thenable from a
|
|
805
|
+
// handler adopts an ObservedPromise through this then with the
|
|
806
|
+
// adopting promise's capability (resolve, reject) pair \u2014 native
|
|
807
|
+
// functions, indistinguishable from real handlers by arity. They
|
|
808
|
+
// are detected by the native toString signature. Adoption
|
|
809
|
+
// CONSUMES the result (a delayed adoption clears a recorded
|
|
810
|
+
// verdict exactly like a delayed await) but is NOT a rejection
|
|
811
|
+
// handler: the rejection transfers into the adopting promise \u2014
|
|
812
|
+
// typically an async wrapper's implicit promise, which is a plain
|
|
813
|
+
// vm-realm Promise the mirror cannot observe. Marking adoption as
|
|
814
|
+
// handling would silently disarm the mirror for the forgotten-
|
|
815
|
+
// await failure class; the run-level escape hook in the host
|
|
816
|
+
// surfaces those escapes instead. Bound script functions also
|
|
817
|
+
// stringify as native code; misreading one as adoption only
|
|
818
|
+
// forgoes the rejectionHandled marking, never native semantics.
|
|
819
|
+
function isAdoptionAttach(handler) {
|
|
820
|
+
try {
|
|
821
|
+
return (
|
|
822
|
+
typeof handler === 'function' &&
|
|
823
|
+
Function.prototype.toString
|
|
824
|
+
.call(handler)
|
|
825
|
+
.indexOf('[native code]') !== -1
|
|
826
|
+
);
|
|
827
|
+
} catch (e) {
|
|
828
|
+
return false;
|
|
829
|
+
}
|
|
830
|
+
}
|
|
831
|
+
class ObservedPromise extends Promise {
|
|
832
|
+
then(onFulfilled, onRejected) {
|
|
833
|
+
// R11-26: introspect the handler BEFORE any state mutation.
|
|
834
|
+
// The read is guarded because a script-supplied handler can
|
|
835
|
+
// be exotic (a revoked Proxy wrapping a function, a throwing
|
|
836
|
+
// accessor) \u2014 an unguarded read made .then() throw
|
|
837
|
+
// synchronously, something native then never does, leaving
|
|
838
|
+
// the promise marked consumed with no handler attached.
|
|
839
|
+
var rethrows = false;
|
|
840
|
+
try {
|
|
841
|
+
rethrows = !!(onRejected && onRejected.__wfRethrows);
|
|
842
|
+
} catch (e) {
|
|
843
|
+
rethrows = false;
|
|
844
|
+
}
|
|
845
|
+
this.__wfConsumed = true;
|
|
846
|
+
// An attached rejection handler means the script can surface the
|
|
847
|
+
// root rejection itself; the mirror stays silent for it. The
|
|
848
|
+
// finally override below routes through this then with marked
|
|
849
|
+
// rethrow combinators \u2014 those re-raise the rejection instead of
|
|
850
|
+
// handling it, so they must NOT set the flag (marking them
|
|
851
|
+
// handled would silently drop a fire-and-forget
|
|
852
|
+
// agent(...).finally(...) failure). Adoption attaches count
|
|
853
|
+
// as consumption only, never handling (see isAdoptionAttach):
|
|
854
|
+
// they mark adoptedOut so forwarded sibling entries defer to
|
|
855
|
+
// the adopting chain / escape hook instead of mirroring.
|
|
856
|
+
if (isAdoptionAttach(onRejected)) {
|
|
857
|
+
__b.wfMarkAdopted(this.__wfRootId);
|
|
858
|
+
} else if (typeof onRejected === 'function' && !rethrows) {
|
|
859
|
+
__b.wfMarkRejectionHandled(this.__wfRootId);
|
|
860
|
+
}
|
|
861
|
+
// A delayed consumption clears a verdict recorded at
|
|
862
|
+
// rejection-settlement time, so a late-but-real await is not
|
|
863
|
+
// misreported as unconsumed.
|
|
864
|
+
if (this.__wfUnconsumedId !== undefined) {
|
|
865
|
+
__b.wfClearUnconsumed(this.__wfUnconsumedId);
|
|
866
|
+
this.__wfUnconsumedId = undefined;
|
|
867
|
+
}
|
|
868
|
+
const derived = super.then(onFulfilled, onRejected);
|
|
869
|
+
derived.__wfRootId = this.__wfRootId;
|
|
870
|
+
observeDispatch(derived);
|
|
871
|
+
return derived;
|
|
872
|
+
}
|
|
873
|
+
finally(onFinally) {
|
|
874
|
+
// Native Promise.prototype.finally calls the observed then with
|
|
875
|
+
// two function combinators, indistinguishable there from a real
|
|
876
|
+
// then(f, g) \u2014 which would mark the root rejection handled even
|
|
877
|
+
// though finally rethrows it. Implement finally through the
|
|
878
|
+
// observed then with an explicitly-marked rethrow combinator so
|
|
879
|
+
// the mirror stays armed for finally-only chains.
|
|
880
|
+
if (typeof onFinally !== 'function') {
|
|
881
|
+
return this.then(undefined, undefined);
|
|
882
|
+
}
|
|
883
|
+
const onRethrow = function (err) {
|
|
884
|
+
return Promise.resolve(onFinally()).then(function () {
|
|
885
|
+
throw err;
|
|
886
|
+
});
|
|
887
|
+
};
|
|
888
|
+
onRethrow.__wfRethrows = true;
|
|
889
|
+
return this.then(
|
|
890
|
+
function (value) {
|
|
891
|
+
return Promise.resolve(onFinally()).then(function () {
|
|
892
|
+
return value;
|
|
893
|
+
});
|
|
894
|
+
},
|
|
895
|
+
onRethrow,
|
|
896
|
+
);
|
|
897
|
+
}
|
|
898
|
+
}
|
|
899
|
+
// --- Static combinators: observe the aggregate promise ---
|
|
900
|
+
// Promise.all/race/any build their aggregate via the native static;
|
|
901
|
+
// it never passes through the observed then, so a fire-and-forget
|
|
902
|
+
// aggregate holding a failed dispatch would escape the run-log
|
|
903
|
+
// mirror. While the run is live the host's adoption-escape hook
|
|
904
|
+
// (R11-3) still catches and mirrors the process-level
|
|
905
|
+
// unhandledRejection \u2014 a round-14 A/B confirmed that hook, not
|
|
906
|
+
// this wrap, is the live-run backstop \u2014 but only with the coarse
|
|
907
|
+
// '(rejection not handled)' wording, and once the run's hook is
|
|
908
|
+
// detached nothing in the sandbox catches the escape. R14-A:
|
|
909
|
+
// wrapping the statics gives each aggregate its own observer, so
|
|
910
|
+
// consumption tracking works through the aggregate's own observed
|
|
911
|
+
// then (await / .catch / .then marks it handled) and the mirror
|
|
912
|
+
// itself classifies the rejection; the elements still funnel
|
|
913
|
+
// through the then override via the native static's internal
|
|
914
|
+
// attach, so they stay marked consumed.
|
|
915
|
+
function observeAggregate(nativeAggregate) {
|
|
916
|
+
const rootId = __b.wfRegisterRoot();
|
|
917
|
+
const observed = new ObservedPromise(function (resolve, reject) {
|
|
918
|
+
Promise.prototype.then.call(nativeAggregate, resolve, reject);
|
|
919
|
+
});
|
|
920
|
+
observed.__wfRootId = rootId;
|
|
921
|
+
observed.__wfIsRoot = true;
|
|
922
|
+
observeDispatch(observed);
|
|
923
|
+
return observed;
|
|
924
|
+
}
|
|
925
|
+
const nativePromiseAll = Promise.all;
|
|
926
|
+
const nativePromiseRace = Promise.race;
|
|
927
|
+
const nativePromiseAny = Promise.any;
|
|
928
|
+
// R11-16: a static called on a script-defined Promise subclass
|
|
929
|
+
// must honor the species contract and return a subclass instance,
|
|
930
|
+
// so non-default receivers bypass observation (their elements
|
|
931
|
+
// still funnel through the observed then, and a fire-and-forget
|
|
932
|
+
// dispatch failure escaping such an aggregate is still caught by
|
|
933
|
+
// the host's adoption-escape hook via its stamped markers).
|
|
934
|
+
Promise.all = function (items) {
|
|
935
|
+
if (this !== Promise) return nativePromiseAll.call(this, items);
|
|
936
|
+
return observeAggregate(nativePromiseAll.call(this, items));
|
|
937
|
+
};
|
|
938
|
+
Promise.race = function (items) {
|
|
939
|
+
if (this !== Promise) return nativePromiseRace.call(this, items);
|
|
940
|
+
return observeAggregate(nativePromiseRace.call(this, items));
|
|
941
|
+
};
|
|
942
|
+
Promise.any = function (items) {
|
|
943
|
+
if (this !== Promise) return nativePromiseAny.call(this, items);
|
|
944
|
+
return observeAggregate(nativePromiseAny.call(this, items));
|
|
945
|
+
};
|
|
560
946
|
function vmAsync(hostFn) {
|
|
561
947
|
return function (...vmArgs) {
|
|
562
|
-
|
|
948
|
+
const rootId = __b.wfRegisterRoot();
|
|
949
|
+
const p = new ObservedPromise(function (resolve, reject) {
|
|
950
|
+
function rejectMapped(hostErr) {
|
|
951
|
+
const vmErr = mapDispatchError(hostErr);
|
|
952
|
+
// Stamp the originating root and run BEFORE the error can
|
|
953
|
+
// be forwarded into aggregate promises: the observer's
|
|
954
|
+
// cross-root suppression (R11-15) reads __wfRootId and
|
|
955
|
+
// the host's adoption-escape hook (R11-3) attributes by
|
|
956
|
+
// __wfRunId.
|
|
957
|
+
try {
|
|
958
|
+
vmErr.__wfRootId = rootId;
|
|
959
|
+
vmErr.__wfRunId = __b.runId;
|
|
960
|
+
} catch (e) {}
|
|
961
|
+
reject(vmErr);
|
|
962
|
+
}
|
|
563
963
|
try {
|
|
564
964
|
const hostPromise = hostFn.apply(null, vmArgs);
|
|
565
965
|
hostPromise.then(
|
|
566
966
|
function (value) { resolve(value); },
|
|
567
|
-
|
|
568
|
-
const msg = (hostErr && hostErr.message != null)
|
|
569
|
-
? String(hostErr.message)
|
|
570
|
-
: String(hostErr);
|
|
571
|
-
reject(new Error(msg));
|
|
572
|
-
}
|
|
967
|
+
rejectMapped
|
|
573
968
|
);
|
|
574
969
|
} catch (hostErr) {
|
|
575
|
-
|
|
576
|
-
? String(hostErr.message)
|
|
577
|
-
: String(hostErr);
|
|
578
|
-
reject(new Error(msg));
|
|
970
|
+
rejectMapped(hostErr);
|
|
579
971
|
}
|
|
580
972
|
});
|
|
973
|
+
p.__wfRootId = rootId;
|
|
974
|
+
p.__wfIsRoot = true;
|
|
975
|
+
observeDispatch(p);
|
|
976
|
+
return p;
|
|
581
977
|
};
|
|
582
978
|
}
|
|
583
979
|
|
|
@@ -875,41 +1271,118 @@ function createWorkflowSandbox(opts) {
|
|
|
875
1271
|
{ filename: "workflow-sandbox-init.js" }
|
|
876
1272
|
);
|
|
877
1273
|
const maxWallClockMs = resolveMaxWallClockMs(opts);
|
|
1274
|
+
const flushUnconsumedRejections = /* @__PURE__ */ __name(async () => {
|
|
1275
|
+
unconsumedSettled = true;
|
|
1276
|
+
if (nextUnconsumedId === 1) return;
|
|
1277
|
+
await new Promise((resolve) => {
|
|
1278
|
+
setImmediate(resolve);
|
|
1279
|
+
});
|
|
1280
|
+
for (const rec of unconsumedRejections.values()) {
|
|
1281
|
+
const rootState = unconsumedRoots.get(rec.rootId);
|
|
1282
|
+
if (rootState?.rejectionHandled) {
|
|
1283
|
+
continue;
|
|
1284
|
+
}
|
|
1285
|
+
if (rec.dispatchFailed && rootState?.adoptedOut) {
|
|
1286
|
+
continue;
|
|
1287
|
+
}
|
|
1288
|
+
const key = rec.rootId + "\0" + rec.msg;
|
|
1289
|
+
if (mirroredEscapeKeys.has(key)) continue;
|
|
1290
|
+
mirroredEscapeKeys.add(key);
|
|
1291
|
+
safeLog(unconsumedRejectionLine(rec));
|
|
1292
|
+
}
|
|
1293
|
+
unconsumedRejections.clear();
|
|
1294
|
+
}, "flushUnconsumedRejections");
|
|
1295
|
+
const hookRunId = opts.runId ?? "";
|
|
1296
|
+
const adoptionEscapeHook = /* @__PURE__ */ __name((reason, _promise) => {
|
|
1297
|
+
try {
|
|
1298
|
+
if (!reason || typeof reason !== "object") return;
|
|
1299
|
+
const marked = reason;
|
|
1300
|
+
if (marked.__wfDispatchFailed !== true) return;
|
|
1301
|
+
if (String(marked.__wfRunId ?? "") !== hookRunId) return;
|
|
1302
|
+
const rootId = typeof marked.__wfRootId === "number" ? marked.__wfRootId : void 0;
|
|
1303
|
+
if (rootId !== void 0 && unconsumedRoots.get(rootId)?.rejectionHandled) {
|
|
1304
|
+
return;
|
|
1305
|
+
}
|
|
1306
|
+
let msg;
|
|
1307
|
+
try {
|
|
1308
|
+
msg = marked.message != null ? String(marked.message) : String(reason);
|
|
1309
|
+
} catch {
|
|
1310
|
+
msg = "[unserializable rejection value]";
|
|
1311
|
+
}
|
|
1312
|
+
const key = String(rootId ?? "") + "\0" + msg;
|
|
1313
|
+
if (mirroredEscapeKeys.has(key)) return;
|
|
1314
|
+
mirroredEscapeKeys.add(key);
|
|
1315
|
+
safeLog("dispatch failed (rejection not handled): " + msg);
|
|
1316
|
+
} catch (e) {
|
|
1317
|
+
debugLogger2.warn("adoptionEscapeHook failed:", e);
|
|
1318
|
+
}
|
|
1319
|
+
}, "adoptionEscapeHook");
|
|
878
1320
|
let extractedMeta = null;
|
|
879
1321
|
return {
|
|
880
1322
|
async run(scriptSource) {
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
1323
|
+
unconsumedSettled = false;
|
|
1324
|
+
unconsumedRoots.clear();
|
|
1325
|
+
unconsumedRejections.clear();
|
|
1326
|
+
nextUnconsumedId = 1;
|
|
1327
|
+
mirroredEscapeKeys = /* @__PURE__ */ new Set();
|
|
1328
|
+
let watchdog;
|
|
1329
|
+
let stopWatchingState;
|
|
1330
|
+
let rearmWatchdogOnAbort;
|
|
1331
|
+
process.on("unhandledRejection", adoptionEscapeHook);
|
|
1332
|
+
try {
|
|
1333
|
+
const { stripped, meta } = extractAndStripMeta(scriptSource);
|
|
1334
|
+
extractedMeta = meta;
|
|
1335
|
+
const wrapped = `(async () => {
|
|
884
1336
|
${stripped}
|
|
885
1337
|
})()`;
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
)
|
|
901
|
-
);
|
|
902
|
-
}
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
1338
|
+
const script = new vm.Script(wrapped, {
|
|
1339
|
+
filename: "workflow.js"
|
|
1340
|
+
});
|
|
1341
|
+
const runOpts = {
|
|
1342
|
+
timeout: 3e4
|
|
1343
|
+
};
|
|
1344
|
+
const result = script.runInContext(ctx, runOpts);
|
|
1345
|
+
const timeoutPromise = new Promise((_, reject) => {
|
|
1346
|
+
watchdog = new WallClockWatchdog(maxWallClockMs, () => {
|
|
1347
|
+
opts.abortOnTimeout?.abort();
|
|
1348
|
+
reject(
|
|
1349
|
+
new Error(
|
|
1350
|
+
`Workflow execution exceeded ${maxWallClockMs} ms of active time (paused time is not counted). Override via SandboxOptions.maxWallClockMs or QWEN_CODE_MAX_WORKFLOW_SECONDS env var.`
|
|
1351
|
+
)
|
|
1352
|
+
);
|
|
1353
|
+
});
|
|
1354
|
+
});
|
|
1355
|
+
const aborted = /* @__PURE__ */ __name(() => opts.abortOnTimeout?.signal.aborted === true, "aborted");
|
|
1356
|
+
stopWatchingState = opts.scheduler?.onStateChange(({ state }) => {
|
|
1357
|
+
if (state === "paused" && !aborted()) watchdog?.pause();
|
|
1358
|
+
else watchdog?.resume();
|
|
1359
|
+
});
|
|
1360
|
+
if (opts.scheduler?.snapshot().state === "paused" && !aborted()) {
|
|
1361
|
+
watchdog?.pause();
|
|
1362
|
+
}
|
|
1363
|
+
rearmWatchdogOnAbort = /* @__PURE__ */ __name(() => watchdog?.resume(), "rearmWatchdogOnAbort");
|
|
1364
|
+
opts.abortOnTimeout?.signal.addEventListener(
|
|
1365
|
+
"abort",
|
|
1366
|
+
rearmWatchdogOnAbort,
|
|
1367
|
+
{ once: true }
|
|
1368
|
+
);
|
|
906
1369
|
return await Promise.race([result, timeoutPromise]);
|
|
907
1370
|
} finally {
|
|
908
|
-
if (
|
|
1371
|
+
if (rearmWatchdogOnAbort) {
|
|
1372
|
+
opts.abortOnTimeout?.signal.removeEventListener(
|
|
1373
|
+
"abort",
|
|
1374
|
+
rearmWatchdogOnAbort
|
|
1375
|
+
);
|
|
1376
|
+
}
|
|
1377
|
+
stopWatchingState?.();
|
|
1378
|
+
watchdog?.stop();
|
|
1379
|
+
await flushUnconsumedRejections();
|
|
1380
|
+
process.off("unhandledRejection", adoptionEscapeHook);
|
|
909
1381
|
}
|
|
910
1382
|
},
|
|
911
1383
|
getPhases: /* @__PURE__ */ __name(() => [...phases], "getPhases"),
|
|
912
1384
|
getLogs: /* @__PURE__ */ __name(() => [...logs], "getLogs"),
|
|
1385
|
+
appendLog: /* @__PURE__ */ __name((line) => safeLog(line), "appendLog"),
|
|
913
1386
|
getMeta: /* @__PURE__ */ __name(() => extractedMeta, "getMeta")
|
|
914
1387
|
};
|
|
915
1388
|
}
|
|
@@ -1146,58 +1619,122 @@ init_esbuild_shims();
|
|
|
1146
1619
|
var WORKFLOW_SUBAGENT_SYSTEM_PROMPT = 'You are a subagent spawned by a workflow orchestration script. Use the tools available to complete the task.\nCRITICAL: Your final text response is returned **verbatim** as a string to the calling script \u2014 it is your return value, not a message to a human.\n- Output the literal result (data, JSON, text). Do NOT output confirmations like "Done." or "Sent."\n- If asked for JSON, return ONLY the raw JSON \u2014 no code fences, no prose, no markdown.\n- Do NOT use SendUserMessage to deliver your answer. Put your answer in your final text response.\n- Be concise. The script will parse your output.';
|
|
1147
1620
|
var WORKFLOW_SUBAGENT_SYSTEM_PROMPT_WITH_SCHEMA = "You are a subagent spawned by a workflow orchestration script. Use the tools available to complete the task.\nCRITICAL: You MUST deliver your final answer by calling the `structured_output` tool with arguments that conform to its parameter schema. Plain-text final answers are DISCARDED \u2014 only a valid `structured_output` call returns a result to the calling script.\n- Use other tools (Read, Grep, etc.) to gather information first.\n- When ready, call `structured_output` ONCE with the conforming JSON object.\n- If validation fails, the error tells you what to fix. Try again with corrected fields.\n- After two failed attempts, the run terminates \u2014 get the arguments right.\n- Do NOT use SendUserMessage to deliver your answer.\n- Be concise; the script reads only the structured payload, not your prose.";
|
|
1148
1621
|
|
|
1149
|
-
// packages/core/src/
|
|
1622
|
+
// packages/core/src/agents/runtime/workflow-dispatch-scheduler.ts
|
|
1150
1623
|
init_esbuild_shims();
|
|
1151
1624
|
function abortError() {
|
|
1152
|
-
return new DOMException("
|
|
1625
|
+
return new DOMException("Workflow dispatch scheduler aborted.", "AbortError");
|
|
1153
1626
|
}
|
|
1154
1627
|
__name(abortError, "abortError");
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
)
|
|
1628
|
+
var WorkflowDispatchScheduler = class {
|
|
1629
|
+
constructor(limit, signal, onStateChange) {
|
|
1630
|
+
this.limit = limit;
|
|
1631
|
+
this.signal = signal;
|
|
1632
|
+
if (!Number.isInteger(limit) || limit < 1) {
|
|
1633
|
+
throw new Error(
|
|
1634
|
+
`Workflow dispatch limit must be a positive integer, got ${String(limit)}.`
|
|
1635
|
+
);
|
|
1636
|
+
}
|
|
1637
|
+
if (onStateChange) this.stateListeners.add(onStateChange);
|
|
1638
|
+
if (signal && !signal.aborted) {
|
|
1639
|
+
signal.addEventListener("abort", () => this.abortPending(), {
|
|
1640
|
+
once: true
|
|
1641
|
+
});
|
|
1642
|
+
}
|
|
1643
|
+
}
|
|
1644
|
+
static {
|
|
1645
|
+
__name(this, "WorkflowDispatchScheduler");
|
|
1646
|
+
}
|
|
1647
|
+
state = "running";
|
|
1648
|
+
inFlight = 0;
|
|
1649
|
+
queue = [];
|
|
1650
|
+
gateWaiters = [];
|
|
1651
|
+
stateListeners = /* @__PURE__ */ new Set();
|
|
1652
|
+
/**
|
|
1653
|
+
* Subscribe to state transitions. Returns an unsubscribe function.
|
|
1654
|
+
* The constructor callback (when given) is registered as the first
|
|
1655
|
+
* listener; this method lets additional observers — e.g. the sandbox's
|
|
1656
|
+
* pause-aware wall-clock watchdog — hook the same transitions.
|
|
1657
|
+
*/
|
|
1658
|
+
onStateChange(listener) {
|
|
1659
|
+
this.stateListeners.add(listener);
|
|
1660
|
+
return () => {
|
|
1661
|
+
this.stateListeners.delete(listener);
|
|
1662
|
+
};
|
|
1663
|
+
}
|
|
1664
|
+
run(thunk) {
|
|
1665
|
+
return new Promise((resolve, reject) => {
|
|
1666
|
+
if (this.signal?.aborted) {
|
|
1667
|
+
reject(abortError());
|
|
1668
|
+
return;
|
|
1669
|
+
}
|
|
1670
|
+
this.queue.push({
|
|
1671
|
+
thunk,
|
|
1672
|
+
resolve,
|
|
1673
|
+
reject
|
|
1674
|
+
});
|
|
1675
|
+
this.pump();
|
|
1676
|
+
});
|
|
1677
|
+
}
|
|
1678
|
+
pause() {
|
|
1679
|
+
if (this.state !== "running" || this.signal?.aborted) return false;
|
|
1680
|
+
this.setState("pausing");
|
|
1681
|
+
if (this.inFlight === 0) this.setState("paused");
|
|
1682
|
+
return true;
|
|
1683
|
+
}
|
|
1684
|
+
resume() {
|
|
1685
|
+
if (this.state !== "paused" || this.signal?.aborted) return false;
|
|
1686
|
+
this.setState("running");
|
|
1687
|
+
while (this.gateWaiters.length > 0) {
|
|
1688
|
+
this.gateWaiters.shift().resolve();
|
|
1689
|
+
}
|
|
1690
|
+
this.pump();
|
|
1691
|
+
return true;
|
|
1692
|
+
}
|
|
1693
|
+
waitUntilRunning() {
|
|
1694
|
+
if (this.signal?.aborted) return Promise.reject(abortError());
|
|
1695
|
+
if (this.state === "running") return Promise.resolve();
|
|
1696
|
+
return new Promise((resolve, reject) => {
|
|
1697
|
+
this.gateWaiters.push({ resolve, reject });
|
|
1698
|
+
});
|
|
1699
|
+
}
|
|
1700
|
+
snapshot() {
|
|
1701
|
+
return {
|
|
1702
|
+
state: this.state,
|
|
1703
|
+
queued: this.queue.length,
|
|
1704
|
+
inFlight: this.inFlight
|
|
1705
|
+
};
|
|
1160
1706
|
}
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
const job = queue.shift();
|
|
1166
|
-
if (signal?.aborted) {
|
|
1707
|
+
pump() {
|
|
1708
|
+
while (this.state === "running" && this.inFlight < this.limit && this.queue.length > 0) {
|
|
1709
|
+
const job = this.queue.shift();
|
|
1710
|
+
if (this.signal?.aborted) {
|
|
1167
1711
|
job.reject(abortError());
|
|
1168
1712
|
continue;
|
|
1169
1713
|
}
|
|
1170
|
-
|
|
1714
|
+
this.inFlight++;
|
|
1171
1715
|
Promise.resolve().then(job.thunk).then(job.resolve, job.reject).finally(() => {
|
|
1172
|
-
|
|
1173
|
-
|
|
1716
|
+
this.inFlight--;
|
|
1717
|
+
if (this.state === "pausing" && this.inFlight === 0) {
|
|
1718
|
+
this.setState("paused");
|
|
1719
|
+
}
|
|
1720
|
+
this.pump();
|
|
1174
1721
|
});
|
|
1175
1722
|
}
|
|
1176
|
-
}
|
|
1177
|
-
|
|
1178
|
-
if (
|
|
1179
|
-
|
|
1180
|
-
|
|
1723
|
+
}
|
|
1724
|
+
setState(state) {
|
|
1725
|
+
if (this.state === state) return;
|
|
1726
|
+
this.state = state;
|
|
1727
|
+
const snapshot = this.snapshot();
|
|
1728
|
+
for (const listener of [...this.stateListeners]) listener(snapshot);
|
|
1729
|
+
}
|
|
1730
|
+
abortPending() {
|
|
1731
|
+
const error = abortError();
|
|
1732
|
+
while (this.queue.length > 0) this.queue.shift().reject(error);
|
|
1733
|
+
while (this.gateWaiters.length > 0) {
|
|
1734
|
+
this.gateWaiters.shift().reject(error);
|
|
1181
1735
|
}
|
|
1182
|
-
queue.push({
|
|
1183
|
-
thunk,
|
|
1184
|
-
resolve,
|
|
1185
|
-
reject
|
|
1186
|
-
});
|
|
1187
|
-
pump();
|
|
1188
|
-
}), "run");
|
|
1189
|
-
if (signal && !signal.aborted) {
|
|
1190
|
-
signal.addEventListener(
|
|
1191
|
-
"abort",
|
|
1192
|
-
() => {
|
|
1193
|
-
while (queue.length > 0) queue.shift().reject(abortError());
|
|
1194
|
-
},
|
|
1195
|
-
{ once: true }
|
|
1196
|
-
);
|
|
1197
1736
|
}
|
|
1198
|
-
|
|
1199
|
-
}
|
|
1200
|
-
__name(createConcurrencyLimiter, "createConcurrencyLimiter");
|
|
1737
|
+
};
|
|
1201
1738
|
|
|
1202
1739
|
// packages/core/src/agents/runtime/workflow-orchestrator.ts
|
|
1203
1740
|
var DEFAULT_MAX_AGENTS_PER_RUN = 1e3;
|
|
@@ -1312,7 +1849,7 @@ function createProductionDispatch(config, signal, onTokens, bridgeApprovalEvents
|
|
|
1312
1849
|
}
|
|
1313
1850
|
__name(createProductionDispatch, "createProductionDispatch");
|
|
1314
1851
|
async function runSingleDispatch(config, prompt, opts, attemptSignal, emitter, onTokens) {
|
|
1315
|
-
const { AgentHeadless, ContextState } = await import("./agent-headless-
|
|
1852
|
+
const { AgentHeadless, ContextState } = await import("./agent-headless-2EE5J2KX.js");
|
|
1316
1853
|
const ctx = new ContextState();
|
|
1317
1854
|
ctx.set("task_prompt", prompt);
|
|
1318
1855
|
const workflowAgentId = `workflow-agent-${randomBytes(8).toString("hex")}`;
|
|
@@ -1750,7 +2287,15 @@ var WorkflowOrchestrator = class {
|
|
|
1750
2287
|
const runId = req.runId ?? generateRunId();
|
|
1751
2288
|
const maxAgents = resolveMaxAgentsPerRun();
|
|
1752
2289
|
const signal = req.abortOnTimeout?.signal;
|
|
1753
|
-
const
|
|
2290
|
+
const scheduler = req.scheduler ?? new WorkflowDispatchScheduler(resolveConcurrencyLimit(), signal);
|
|
2291
|
+
const rejectThroughPauseGate = /* @__PURE__ */ __name((error) => scheduler.waitUntilRunning().then(
|
|
2292
|
+
() => {
|
|
2293
|
+
throw error;
|
|
2294
|
+
},
|
|
2295
|
+
() => {
|
|
2296
|
+
throw error;
|
|
2297
|
+
}
|
|
2298
|
+
), "rejectThroughPauseGate");
|
|
1754
2299
|
let agentCount = 0;
|
|
1755
2300
|
const emitter = req.emitter;
|
|
1756
2301
|
const budget = req.budget;
|
|
@@ -1785,7 +2330,10 @@ var WorkflowOrchestrator = class {
|
|
|
1785
2330
|
} catch (e) {
|
|
1786
2331
|
debugLogger2.warn("emitter.agentCompleted threw:", e);
|
|
1787
2332
|
}
|
|
1788
|
-
return
|
|
2333
|
+
return scheduler.waitUntilRunning().then(
|
|
2334
|
+
() => cached.result,
|
|
2335
|
+
() => cached.result
|
|
2336
|
+
);
|
|
1789
2337
|
}
|
|
1790
2338
|
}
|
|
1791
2339
|
hadMiss = true;
|
|
@@ -1798,13 +2346,13 @@ var WorkflowOrchestrator = class {
|
|
|
1798
2346
|
debugLogger2.warn(
|
|
1799
2347
|
`[Workflow] budget gate refused dispatch at entry: runId=${runId} spent=${budget.spent()} total=${budget.total}`
|
|
1800
2348
|
);
|
|
1801
|
-
return
|
|
2349
|
+
return rejectThroughPauseGate(
|
|
1802
2350
|
new WorkflowBudgetExceededError(runId, budget.total, budget.spent())
|
|
1803
2351
|
);
|
|
1804
2352
|
}
|
|
1805
2353
|
agentCount += 1;
|
|
1806
2354
|
if (agentCount > maxAgents) {
|
|
1807
|
-
return
|
|
2355
|
+
return rejectThroughPauseGate(
|
|
1808
2356
|
new Error(
|
|
1809
2357
|
`Workflow exceeded the maximum of ${maxAgents} agent() calls per run.`
|
|
1810
2358
|
)
|
|
@@ -1816,25 +2364,31 @@ var WorkflowOrchestrator = class {
|
|
|
1816
2364
|
} catch (e) {
|
|
1817
2365
|
debugLogger2.warn("emitter.agentDispatched threw:", e);
|
|
1818
2366
|
}
|
|
1819
|
-
|
|
1820
|
-
|
|
1821
|
-
|
|
1822
|
-
|
|
1823
|
-
|
|
1824
|
-
|
|
1825
|
-
|
|
1826
|
-
|
|
1827
|
-
|
|
1828
|
-
);
|
|
2367
|
+
let completionEmitted = false;
|
|
2368
|
+
const emitCompletion = /* @__PURE__ */ __name((error) => {
|
|
2369
|
+
if (completionEmitted) return;
|
|
2370
|
+
completionEmitted = true;
|
|
2371
|
+
const message = error === void 0 ? void 0 : error instanceof Error ? error.message : String(error);
|
|
2372
|
+
try {
|
|
2373
|
+
emitter?.agentCompleted?.(label, message);
|
|
2374
|
+
} catch (e) {
|
|
2375
|
+
debugLogger2.warn("emitter.agentCompleted threw:", e);
|
|
1829
2376
|
}
|
|
1830
|
-
|
|
1831
|
-
|
|
1832
|
-
|
|
1833
|
-
|
|
1834
|
-
|
|
1835
|
-
|
|
1836
|
-
|
|
2377
|
+
}, "emitCompletion");
|
|
2378
|
+
return scheduler.run(async () => {
|
|
2379
|
+
try {
|
|
2380
|
+
if (budget && budget.total !== null && budget.remaining() <= 0) {
|
|
2381
|
+
debugLogger2.warn(
|
|
2382
|
+
`[Workflow] budget gate refused dispatch at slot-acquire: runId=${runId} spent=${budget.spent()} total=${budget.total}`
|
|
2383
|
+
);
|
|
2384
|
+
throw new WorkflowBudgetExceededError(
|
|
2385
|
+
runId,
|
|
2386
|
+
budget.total,
|
|
2387
|
+
budget.spent()
|
|
2388
|
+
);
|
|
1837
2389
|
}
|
|
2390
|
+
const result = await this.dispatch(prompt, opts);
|
|
2391
|
+
emitCompletion();
|
|
1838
2392
|
if (journal && journalKey !== void 0) {
|
|
1839
2393
|
journal.append({
|
|
1840
2394
|
type: "result",
|
|
@@ -1853,14 +2407,8 @@ var WorkflowOrchestrator = class {
|
|
|
1853
2407
|
}
|
|
1854
2408
|
}
|
|
1855
2409
|
return result;
|
|
1856
|
-
}
|
|
1857
|
-
|
|
1858
|
-
const msg = err instanceof Error ? err.message : String(err);
|
|
1859
|
-
try {
|
|
1860
|
-
emitter?.agentCompleted?.(label, msg);
|
|
1861
|
-
} catch (e) {
|
|
1862
|
-
debugLogger2.warn("emitter.agentCompleted threw:", e);
|
|
1863
|
-
}
|
|
2410
|
+
} catch (err) {
|
|
2411
|
+
emitCompletion(err);
|
|
1864
2412
|
if (budget) {
|
|
1865
2413
|
try {
|
|
1866
2414
|
emitter?.budgetUpdated?.(budget.spent(), budget.total);
|
|
@@ -1870,35 +2418,70 @@ var WorkflowOrchestrator = class {
|
|
|
1870
2418
|
}
|
|
1871
2419
|
throw err;
|
|
1872
2420
|
}
|
|
2421
|
+
}).then(
|
|
2422
|
+
// Resolve even if the gate aborts: a successful dispatch must not
|
|
2423
|
+
// turn into a teardown rejection — for a fire-and-forget call the
|
|
2424
|
+
// script never attached a handler, so the rejection would surface
|
|
2425
|
+
// as a spurious process-level unhandledRejection alarm on a
|
|
2426
|
+
// correctly-cancelled run.
|
|
2427
|
+
(result) => scheduler.waitUntilRunning().then(
|
|
2428
|
+
() => result,
|
|
2429
|
+
() => result
|
|
2430
|
+
),
|
|
2431
|
+
(error) => {
|
|
2432
|
+
emitCompletion(error);
|
|
2433
|
+
return scheduler.waitUntilRunning().then(
|
|
2434
|
+
() => {
|
|
2435
|
+
throw error;
|
|
2436
|
+
},
|
|
2437
|
+
() => {
|
|
2438
|
+
throw error;
|
|
2439
|
+
}
|
|
2440
|
+
);
|
|
2441
|
+
}
|
|
1873
2442
|
);
|
|
1874
2443
|
}, "countedDispatch");
|
|
1875
2444
|
const parallelImpl = makeParallelImpl(signal);
|
|
1876
2445
|
const pipelineImpl = makePipelineImpl(signal);
|
|
1877
2446
|
const resolveSavedWorkflow = req.resolveSavedWorkflow;
|
|
2447
|
+
const parentSandboxRef = {
|
|
2448
|
+
current: void 0
|
|
2449
|
+
};
|
|
1878
2450
|
const workflowImpl = resolveSavedWorkflow ? async (nameOrRef, nestedArgs) => {
|
|
1879
2451
|
const resolved = await resolveSavedWorkflow(nameOrRef);
|
|
1880
2452
|
const nestedSandbox = createWorkflowSandbox({
|
|
1881
2453
|
args: nestedArgs,
|
|
2454
|
+
runId,
|
|
1882
2455
|
dispatch: countedDispatch,
|
|
1883
2456
|
parallel: parallelImpl,
|
|
1884
2457
|
pipeline: pipelineImpl,
|
|
1885
2458
|
abortOnTimeout: req.abortOnTimeout,
|
|
1886
2459
|
emitter,
|
|
1887
|
-
budget
|
|
2460
|
+
budget,
|
|
2461
|
+
scheduler
|
|
1888
2462
|
// No `workflow` — single-level nesting limit.
|
|
1889
2463
|
});
|
|
1890
|
-
|
|
2464
|
+
try {
|
|
2465
|
+
return await nestedSandbox.run(resolved.script);
|
|
2466
|
+
} finally {
|
|
2467
|
+
for (const line of nestedSandbox.getLogs()) {
|
|
2468
|
+
parentSandboxRef.current?.appendLog(line);
|
|
2469
|
+
}
|
|
2470
|
+
}
|
|
1891
2471
|
} : void 0;
|
|
1892
2472
|
const sandbox = createWorkflowSandbox({
|
|
1893
2473
|
args: req.args,
|
|
2474
|
+
runId,
|
|
1894
2475
|
dispatch: countedDispatch,
|
|
1895
2476
|
parallel: parallelImpl,
|
|
1896
2477
|
pipeline: pipelineImpl,
|
|
1897
2478
|
workflow: workflowImpl,
|
|
1898
2479
|
abortOnTimeout: req.abortOnTimeout,
|
|
1899
2480
|
emitter,
|
|
1900
|
-
budget
|
|
2481
|
+
budget,
|
|
2482
|
+
scheduler
|
|
1901
2483
|
});
|
|
2484
|
+
parentSandboxRef.current = sandbox;
|
|
1902
2485
|
try {
|
|
1903
2486
|
const result = await sandbox.run(req.script);
|
|
1904
2487
|
return {
|
|
@@ -2013,11 +2596,12 @@ __name(extractErrorMessage, "extractErrorMessage");
|
|
|
2013
2596
|
|
|
2014
2597
|
// packages/core/src/agents/runtime/workflow-runner.ts
|
|
2015
2598
|
var WorkflowRunHandle = class {
|
|
2016
|
-
constructor(runId, budget, registry, controller, start) {
|
|
2599
|
+
constructor(runId, budget, registry, controller, scheduler, start) {
|
|
2017
2600
|
this.runId = runId;
|
|
2018
2601
|
this.budget = budget;
|
|
2019
2602
|
this.registry = registry;
|
|
2020
2603
|
this.controller = controller;
|
|
2604
|
+
this.scheduler = scheduler;
|
|
2021
2605
|
this.completion = Promise.resolve().then(start);
|
|
2022
2606
|
}
|
|
2023
2607
|
static {
|
|
@@ -2027,6 +2611,12 @@ var WorkflowRunHandle = class {
|
|
|
2027
2611
|
abort() {
|
|
2028
2612
|
this.controller.abort();
|
|
2029
2613
|
}
|
|
2614
|
+
pause() {
|
|
2615
|
+
return this.scheduler.pause();
|
|
2616
|
+
}
|
|
2617
|
+
resume() {
|
|
2618
|
+
return this.scheduler.resume();
|
|
2619
|
+
}
|
|
2030
2620
|
};
|
|
2031
2621
|
var WorkflowRunner = class {
|
|
2032
2622
|
static {
|
|
@@ -2105,11 +2695,17 @@ var WorkflowRunner = class {
|
|
|
2105
2695
|
emitUpdate();
|
|
2106
2696
|
}, "budgetUpdated")
|
|
2107
2697
|
};
|
|
2698
|
+
const scheduler = new WorkflowDispatchScheduler(
|
|
2699
|
+
resolveConcurrencyLimit(),
|
|
2700
|
+
controller.signal,
|
|
2701
|
+
({ state }) => registry?.onDispatchStateChange(runId, state)
|
|
2702
|
+
);
|
|
2108
2703
|
const handle = new WorkflowRunHandle(
|
|
2109
2704
|
runId,
|
|
2110
2705
|
budget,
|
|
2111
2706
|
registry,
|
|
2112
2707
|
controller,
|
|
2708
|
+
scheduler,
|
|
2113
2709
|
async () => {
|
|
2114
2710
|
try {
|
|
2115
2711
|
const outcome = await orchestrator.run({
|
|
@@ -2121,7 +2717,8 @@ var WorkflowRunner = class {
|
|
|
2121
2717
|
budget,
|
|
2122
2718
|
resolveSavedWorkflow: /* @__PURE__ */ __name((ref) => resolveSavedWorkflowScript(ref, config), "resolveSavedWorkflow"),
|
|
2123
2719
|
journal,
|
|
2124
|
-
resumeReplay
|
|
2720
|
+
resumeReplay,
|
|
2721
|
+
scheduler
|
|
2125
2722
|
});
|
|
2126
2723
|
if (entry) {
|
|
2127
2724
|
entry.meta = outcome.meta;
|
|
@@ -2130,6 +2727,12 @@ var WorkflowRunner = class {
|
|
|
2130
2727
|
}
|
|
2131
2728
|
}
|
|
2132
2729
|
registry?.setRecentLogs(runId, outcome.logs);
|
|
2730
|
+
if (entry && isTerminalWorkflowStatus(entry.status)) {
|
|
2731
|
+
return {
|
|
2732
|
+
ok: false,
|
|
2733
|
+
message: entry.status === "cancelled" ? "Workflow run cancelled." : entry.error ?? "Workflow run failed."
|
|
2734
|
+
};
|
|
2735
|
+
}
|
|
2133
2736
|
registry?.complete(runId, outcome.result, Date.now());
|
|
2134
2737
|
return { ok: true, outcome };
|
|
2135
2738
|
} catch (error) {
|
|
@@ -2145,20 +2748,18 @@ var WorkflowRunner = class {
|
|
|
2145
2748
|
return { ok: false, message, details };
|
|
2146
2749
|
} finally {
|
|
2147
2750
|
controller.abort();
|
|
2148
|
-
if (entry && entry.status
|
|
2751
|
+
if (entry && isTerminalWorkflowStatus(entry.status)) {
|
|
2752
|
+
const telemetryEvent = new WorkflowRunEvent({
|
|
2753
|
+
status: entry.status,
|
|
2754
|
+
agents_dispatched: entry.agentsDispatched,
|
|
2755
|
+
agents_completed: entry.agentsCompleted,
|
|
2756
|
+
phase_count: entry.phases.length,
|
|
2757
|
+
tokens_spent: entry.tokensSpent,
|
|
2758
|
+
duration_ms: (entry.endTime ?? entry.startTime) - entry.startTime
|
|
2759
|
+
});
|
|
2149
2760
|
await writeWorkflowSnapshot(config, entry);
|
|
2150
2761
|
try {
|
|
2151
|
-
logWorkflowRun(
|
|
2152
|
-
config,
|
|
2153
|
-
new WorkflowRunEvent({
|
|
2154
|
-
status: entry.status,
|
|
2155
|
-
agents_dispatched: entry.agentsDispatched,
|
|
2156
|
-
agents_completed: entry.agentsCompleted,
|
|
2157
|
-
phase_count: entry.phases.length,
|
|
2158
|
-
tokens_spent: entry.tokensSpent,
|
|
2159
|
-
duration_ms: (entry.endTime ?? entry.startTime) - entry.startTime
|
|
2160
|
-
})
|
|
2161
|
-
);
|
|
2762
|
+
logWorkflowRun(config, telemetryEvent);
|
|
2162
2763
|
} catch {
|
|
2163
2764
|
}
|
|
2164
2765
|
}
|
|
@@ -2203,7 +2804,7 @@ var WORKFLOW_PARAM_SCHEMA = {
|
|
|
2203
2804
|
run_in_background: {
|
|
2204
2805
|
type: "boolean",
|
|
2205
2806
|
default: false,
|
|
2206
|
-
description: "Optional. When true, start the workflow under the interactive session and return a run handle immediately. The Background Tasks view can observe or stop it, and completion is delivered to the conversation when the run settles. Interactive TUI only. Defaults to false."
|
|
2807
|
+
description: "Optional. When true, start the workflow under the interactive session and return a run handle immediately. The Background Tasks view can observe, cooperatively pause/resume, or stop it, and completion is delivered to the conversation when the run settles. Interactive TUI only. Defaults to false."
|
|
2207
2808
|
}
|
|
2208
2809
|
}
|
|
2209
2810
|
// `script` is required UNLESS `scriptPath` is supplied; this XOR can't be
|
|
@@ -2271,7 +2872,7 @@ Run ID: ${handle.runId}
|
|
|
2271
2872
|
Status: ${status}`
|
|
2272
2873
|
}
|
|
2273
2874
|
],
|
|
2274
|
-
returnDisplay: usageBanner + `Workflow ${handle.runId} started in the background (status: ${status}). Use Background Tasks to observe or stop it.`
|
|
2875
|
+
returnDisplay: usageBanner + `Workflow ${handle.runId} started in the background (status: ${status}). Use Background Tasks to observe, cooperatively pause/resume, or stop it.`
|
|
2275
2876
|
};
|
|
2276
2877
|
}
|
|
2277
2878
|
const settlement = await handle.completion;
|
|
@@ -2421,7 +3022,7 @@ var WorkflowTool = class extends BaseDeclarativeTool {
|
|
|
2421
3022
|
super(
|
|
2422
3023
|
ToolNames.WORKFLOW,
|
|
2423
3024
|
ToolDisplayNames.WORKFLOW,
|
|
2424
|
-
"Execute a workflow script that orchestrates subagents. Supports `phase`, `log`, sequential `agent`, concurrent fan-out via `parallel(thunks)` / `pipeline(items, ...stages)` (default `max(1, min(16, cpus-2))` agents in flight per run, up to 1000 agents total; both env-overridable), per-call `agent({ schema, agentType, model, isolation: 'worktree' })` for structured-output contracts, declarative-agent selection, model override, and git-worktree-isolated subagents. Pass `resumeFromRunId` to resume a prior run \u2014 agent() calls whose rolling prefix-hash matches the journal are served from cache for the longest unchanged prefix. Runs are tracked in the background-tasks view and the `/workflows` dialog (live phase tree, token usage, cancel). Set `run_in_background: true` to return a run handle immediately in the interactive TUI and receive completion through the conversation. Scripts run in a node:vm sandbox without access to the filesystem or shell; all I/O happens through the spawned agents.",
|
|
3025
|
+
"Execute a workflow script that orchestrates subagents. Supports `phase`, `log`, sequential `agent`, concurrent fan-out via `parallel(thunks)` / `pipeline(items, ...stages)` (default `max(1, min(16, cpus-2))` agents in flight per run, up to 1000 agents total; both env-overridable), per-call `agent({ schema, agentType, model, isolation: 'worktree' })` for structured-output contracts, declarative-agent selection, model override, and git-worktree-isolated subagents. Pass `resumeFromRunId` to resume a prior run \u2014 agent() calls whose rolling prefix-hash matches the journal are served from cache for the longest unchanged prefix. Runs are tracked in the background-tasks view and the `/workflows` dialog (live phase tree, token usage, cooperative pause/resume, cancel). Set `run_in_background: true` to return a run handle immediately in the interactive TUI and receive completion through the conversation. Scripts run in a node:vm sandbox without access to the filesystem or shell; all I/O happens through the spawned agents.",
|
|
2425
3026
|
"other" /* Other */,
|
|
2426
3027
|
WORKFLOW_PARAM_SCHEMA,
|
|
2427
3028
|
/* isOutputMarkdown */
|