@qwen-code/qwen-code 0.23.2-preview.0 → 0.23.2

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.
Files changed (282) hide show
  1. package/bundled/qc-helper/docs/configuration/auth.md +1 -1
  2. package/bundled/qc-helper/docs/configuration/model-providers.md +19 -15
  3. package/bundled/qc-helper/docs/features/channels/dingtalk.md +1 -1
  4. package/bundled/qc-helper/docs/features/channels/github.md +1 -9
  5. package/bundled/qc-helper/docs/features/channels/overview.md +26 -51
  6. package/bundled/qc-helper/docs/features/channels/qqbot.md +1 -2
  7. package/bundled/qc-helper/docs/features/commands.md +48 -9
  8. package/bundled/qc-helper/docs/features/goals.md +2 -0
  9. package/bundled/qc-helper/docs/features/sub-agents.md +8 -0
  10. package/bundled/qc-helper/docs/qwen-serve.md +62 -48
  11. package/chunks/{MaxSizedBox-ZZJT3PJF.js → MaxSizedBox-4C3BKKKY.js} +17 -16
  12. package/chunks/{StandaloneSessionPicker-DIOSZTMX.js → StandaloneSessionPicker-TXVF65YW.js} +32 -31
  13. package/chunks/{acpAgent-62JUP5A7.js → acpAgent-H5XBKGB4.js} +301 -166
  14. package/chunks/{agent-NLPEQQDZ.js → agent-T5LEFJIU.js} +10 -10
  15. package/chunks/{agent-headless-Y2GR5F2Q.js → agent-headless-VZKSRH36.js} +10 -10
  16. package/chunks/{anthropicContentGenerator-I7LQZH26.js → anthropicContentGenerator-PRJWWVYJ.js} +2 -2
  17. package/chunks/{artifact-tool-P52OKKEF.js → artifact-tool-G5LHNECG.js} +1 -1
  18. package/chunks/{bridge-Q66BD62H.js → bridge-AOX5IY44.js} +18 -17
  19. package/chunks/{channel-management-service-TRTLQTSV.js → channel-management-service-MWQGHPAS.js} +4 -4
  20. package/chunks/{channel-settings-store-R5STFWUW.js → channel-settings-store-XZCGDGHW.js} +26 -25
  21. package/chunks/{channel-worker-group-PIYPVCTF.js → channel-worker-group-SQ5FRWOH.js} +5 -5
  22. package/chunks/{channel-worker-manager-FQHEDTD2.js → channel-worker-manager-TU4ZNWOE.js} +5 -5
  23. package/chunks/{channel-worker-supervisor-XJPZZ3VK.js → channel-worker-supervisor-EMITFMCP.js} +4 -4
  24. package/chunks/{chunk-3SH53ANB.js → chunk-22GORRNY.js} +12 -0
  25. package/chunks/{chunk-7L35FKPF.js → chunk-2BMXHB6N.js} +2 -2
  26. package/chunks/chunk-2WC3Y7YY.js +1033 -0
  27. package/chunks/{chunk-WZ4YULVF.js → chunk-3OAXF3UK.js} +210 -80
  28. package/chunks/{chunk-W673V2H3.js → chunk-46MMBZHI.js} +3 -3
  29. package/chunks/{chunk-6GRDHIVI.js → chunk-4I3WFI3U.js} +4 -4
  30. package/chunks/{chunk-QXXBW2G4.js → chunk-4JNHNVAZ.js} +3 -3
  31. package/chunks/{chunk-R2266LQ5.js → chunk-4WMGYG3F.js} +2 -2
  32. package/chunks/{chunk-Y6ZWXM44.js → chunk-5BH2AIEY.js} +1 -1
  33. package/chunks/{chunk-EA4NFWVG.js → chunk-5OZUKLL7.js} +3 -3
  34. package/chunks/{chunk-RX3FYFCN.js → chunk-67XTVRVB.js} +1 -1
  35. package/chunks/{chunk-MA5OUNN6.js → chunk-6G4V7SE4.js} +1 -1
  36. package/chunks/{chunk-B54PFQS5.js → chunk-7CLLH5TI.js} +1 -1
  37. package/chunks/{chunk-7GZCCHJL.js → chunk-7LTCFO6T.js} +3 -3
  38. package/chunks/{chunk-33MLFMCL.js → chunk-7NDZKE2M.js} +2 -2
  39. package/chunks/{chunk-5WC2ECUK.js → chunk-7PD7ZMX5.js} +17 -4
  40. package/chunks/{chunk-ZUNWKOAP.js → chunk-7SVM3RP2.js} +4 -24
  41. package/chunks/{chunk-5GD7LYOH.js → chunk-A7EFXK7P.js} +1 -1
  42. package/chunks/{chunk-RDV4NLI3.js → chunk-AO2VMS72.js} +2 -2
  43. package/chunks/{chunk-XAXTQURR.js → chunk-APXIW2TF.js} +3 -3
  44. package/chunks/{chunk-3BTHHXXE.js → chunk-AUTUFD5X.js} +1 -1
  45. package/chunks/{chunk-VH764G6B.js → chunk-B25JYXZE.js} +2 -2
  46. package/chunks/{chunk-MMMA36MN.js → chunk-BK7D2JR6.js} +3 -3
  47. package/chunks/{chunk-RPFJJ33Z.js → chunk-CALTQWTZ.js} +1 -1
  48. package/chunks/{chunk-EUXF6URV.js → chunk-CCBTNJB4.js} +16 -18
  49. package/chunks/{chunk-BF3RUIVP.js → chunk-CH2YDT6X.js} +36 -38
  50. package/chunks/{chunk-L6ZME3W7.js → chunk-CMWU6P4D.js} +1 -1
  51. package/chunks/{chunk-QJAFSFYA.js → chunk-CWVZBIZJ.js} +1 -1
  52. package/chunks/{chunk-JDPBJIKI.js → chunk-DAI65CMX.js} +1 -1
  53. package/chunks/{chunk-GM44O6F7.js → chunk-DARWOZY6.js} +1 -1
  54. package/chunks/{chunk-J4ECGDA3.js → chunk-ELD3OBPU.js} +3 -3
  55. package/chunks/{chunk-ZELCTN6Y.js → chunk-F23YN37B.js} +10 -0
  56. package/chunks/{chunk-OIPUQE3S.js → chunk-F2NYVASI.js} +14 -1
  57. package/chunks/{chunk-ODBNTMZW.js → chunk-FAJPLSYF.js} +36 -29
  58. package/chunks/{chunk-GXIHBIHC.js → chunk-FGHPZGOP.js} +29 -24
  59. package/chunks/{chunk-TK4XHPKW.js → chunk-G37O7YO6.js} +2 -2
  60. package/chunks/{chunk-4JKLPTV6.js → chunk-G3ZUMSFS.js} +12 -5
  61. package/chunks/{chunk-743XE7N7.js → chunk-G5VOXCRX.js} +1 -1
  62. package/chunks/{chunk-BL6B2QS2.js → chunk-GOEVQADN.js} +618 -1122
  63. package/chunks/{chunk-XI7RST4D.js → chunk-GOKAOSCN.js} +1 -1
  64. package/chunks/{chunk-FDOGGKAA.js → chunk-GSFV5RQW.js} +2 -0
  65. package/chunks/{chunk-43CI6YWJ.js → chunk-HJ5UJQQL.js} +1384 -1245
  66. package/chunks/{chunk-LUVXLLMS.js → chunk-IR6JKBAP.js} +1 -1
  67. package/chunks/{chunk-CPJRFFPH.js → chunk-IRGDIDGJ.js} +558 -158
  68. package/chunks/{chunk-DCPRCDSR.js → chunk-IWABUX6T.js} +1 -1
  69. package/chunks/{chunk-DTB5BXRG.js → chunk-JO77FGNZ.js} +16 -15
  70. package/chunks/{chunk-45ROPFQY.js → chunk-JYGIJA4W.js} +1 -1
  71. package/chunks/{chunk-M6YLOETP.js → chunk-KCF2436G.js} +1 -1
  72. package/chunks/{chunk-CABDNUJ4.js → chunk-KEPC5BOL.js} +5 -5
  73. package/chunks/{chunk-RN6V5HKE.js → chunk-KFECPHLV.js} +3 -3
  74. package/chunks/{chunk-WIRYFL2L.js → chunk-LEAOJ43M.js} +17 -15
  75. package/chunks/{chunk-IUJLW6ZI.js → chunk-LUNC5KCL.js} +3 -3
  76. package/chunks/{chunk-WZS3X663.js → chunk-LWX4WDFF.js} +2 -5
  77. package/chunks/{chunk-ISPBBKJN.js → chunk-MV5DTLJV.js} +7 -2
  78. package/chunks/chunk-NFXXBWSE.js +463 -0
  79. package/chunks/{chunk-PQSCGZT2.js → chunk-NPKCVSXX.js} +26 -2
  80. package/chunks/{chunk-7RXOEUFF.js → chunk-NX7ZTXFF.js} +1 -1
  81. package/chunks/{chunk-G5QLLD53.js → chunk-OXR34GCD.js} +14 -2
  82. package/chunks/{chunk-VHPG7BH6.js → chunk-PDN7FJZV.js} +1 -1
  83. package/chunks/{chunk-UHUT4IDM.js → chunk-PFKGV6PO.js} +9 -9
  84. package/chunks/{chunk-NFIDVZND.js → chunk-QB3KS3N3.js} +2 -21
  85. package/chunks/{chunk-QLM7D7W3.js → chunk-QFJZAY7W.js} +7 -7
  86. package/chunks/{chunk-NVS4Z6GT.js → chunk-QHLHE2OT.js} +1 -1
  87. package/chunks/{chunk-B44JBZBB.js → chunk-QQK4L3UU.js} +1 -1
  88. package/chunks/{chunk-63ACHB2H.js → chunk-QTB4VP4K.js} +50 -18
  89. package/chunks/{chunk-4BLTSTF6.js → chunk-R3JIDRUL.js} +4 -4
  90. package/chunks/{chunk-VEQBVJYH.js → chunk-R457KFV7.js} +3 -3
  91. package/chunks/{chunk-CG2PDIGD.js → chunk-RM244SCQ.js} +1 -1
  92. package/chunks/{chunk-W7PXLIZJ.js → chunk-RNAJVXUG.js} +5 -5
  93. package/chunks/{chunk-VF6D6EGV.js → chunk-S5QR6CB5.js} +52 -6
  94. package/chunks/{chunk-IRKQ4YYX.js → chunk-SVWWF5TZ.js} +29 -1
  95. package/chunks/{chunk-5HBA2Z7V.js → chunk-TGNNLRC3.js} +2 -3
  96. package/chunks/{chunk-ORREXWOM.js → chunk-TODNHE76.js} +3 -3
  97. package/chunks/{chunk-W3ONSAYO.js → chunk-TOOOLHVS.js} +2 -2
  98. package/chunks/{chunk-EHTKOO6W.js → chunk-TRQNRP2H.js} +2 -2
  99. package/chunks/{chunk-PQWM4SX2.js → chunk-U6REWGVR.js} +2 -2
  100. package/chunks/{chunk-UXDVUFKU.js → chunk-ULZECEIP.js} +2 -2
  101. package/chunks/{chunk-6YEOCHSE.js → chunk-VBLAI2HA.js} +101 -0
  102. package/chunks/{chunk-M73KHGNR.js → chunk-VJJXG73H.js} +404 -226
  103. package/chunks/{chunk-Q2F43WTJ.js → chunk-WBU2PIZ5.js} +23 -6
  104. package/chunks/{chunk-UULHYZ4W.js → chunk-WDN64MVT.js} +74 -15
  105. package/chunks/{chunk-XVTCSVBK.js → chunk-WDVV3LRM.js} +193 -169
  106. package/chunks/{chunk-LBKYQ33T.js → chunk-WK7P62DV.js} +16 -10
  107. package/chunks/{chunk-ULY4ISY2.js → chunk-WXD7INFV.js} +19 -4
  108. package/chunks/{chunk-ZIPYCXQP.js → chunk-WXPPUPHM.js} +1 -1
  109. package/chunks/{chunk-5Z4FCEPY.js → chunk-X7LFJF5D.js} +600 -46
  110. package/chunks/{chunk-YHDGABDC.js → chunk-XKBFYTCD.js} +1 -1
  111. package/chunks/{chunk-MWEF5MUK.js → chunk-XSOXPG2L.js} +8 -8
  112. package/chunks/{chunk-5VZFJTL2.js → chunk-YLOHCA6I.js} +2 -2
  113. package/chunks/{chunk-LN3WBOKU.js → chunk-YQGW3M6Z.js} +2 -2
  114. package/chunks/{chunk-2OR32P5M.js → chunk-ZN5TKAVR.js} +125 -10
  115. package/chunks/{chunk-XBLG564H.js → chunk-ZP5XDLSA.js} +10 -10
  116. package/chunks/{config-utils-37FHWPTP.js → config-utils-GPLIABL2.js} +21 -20
  117. package/chunks/{contextCommand-R4JUBV5N.js → contextCommand-NCUQUDBY.js} +18 -17
  118. package/chunks/{core-runtime-6U4OXU5C.js → core-runtime-WKYKWVYU.js} +23 -21
  119. package/chunks/{create-sub-session-LLUYAGZN.js → create-sub-session-PPLXB3JJ.js} +17 -16
  120. package/chunks/{daemon-UI6SQSBV.js → daemon-2CKIAO3I.js} +2 -2
  121. package/chunks/{daemon-git-worktree-guard-O2UTNFJC.js → daemon-git-worktree-guard-73ZWOLKL.js} +17 -16
  122. package/chunks/{daemon-status-provider-7GMAKSTX.js → daemon-status-provider-OK7VONJG.js} +22 -21
  123. package/chunks/{daemon-trust-policy-VNP76VMO.js → daemon-trust-policy-CAUCREG2.js} +22 -21
  124. package/chunks/{daemon-trust-policy-monitor-TD5O3BZA.js → daemon-trust-policy-monitor-3Y36OOEQ.js} +22 -21
  125. package/chunks/{deferred-core-runtime-NJM63YJS.js → deferred-core-runtime-Q7WFWYD3.js} +17 -16
  126. package/chunks/{dist-STAGIFNB.js → dist-6YDUH3BB.js} +388 -102
  127. package/chunks/{dist-XJ25G6OH.js → dist-BNQVF565.js} +2 -8
  128. package/chunks/{dist-NQ2636VT.js → dist-F34J4FZX.js} +1 -1
  129. package/chunks/{dist-OR2ZQTXZ.js → dist-F6JLAJLE.js} +1 -1
  130. package/chunks/{dist-WZTUKIDR.js → dist-NP7QKLVG.js} +2 -2
  131. package/chunks/{dist-M4CBX53H.js → dist-UFTFGI6I.js} +1 -1
  132. package/chunks/{dist-5I4HLUTO.js → dist-XLV33CLY.js} +1 -2
  133. package/chunks/{dist-24TCWK5H.js → dist-Y5KC3IHW.js} +1 -2
  134. package/chunks/{dist-FDISN4AK.js → dist-ZDNJK74R.js} +3 -7
  135. package/chunks/{edit-GL7OA6RV.js → edit-YJD6IETK.js} +10 -10
  136. package/chunks/{enterPlanMode-VC4BCSZE.js → enterPlanMode-EFPVTWIH.js} +10 -10
  137. package/chunks/{environment-BI6IBAZJ.js → environment-HP3AXFTB.js} +19 -18
  138. package/chunks/{errors-D6G2ZM2R.js → errors-22ON46G7.js} +19 -18
  139. package/chunks/{exitPlanMode-DX446CA6.js → exitPlanMode-MOQUNCBH.js} +10 -10
  140. package/chunks/{fast-path-MAYDLJIP.js → fast-path-2X7BPMXX.js} +3 -3
  141. package/chunks/{glob-TVKRFY36.js → glob-Y7ACIB3P.js} +10 -10
  142. package/chunks/{goal-tools-CA6YANRN.js → goal-tools-DABMICUC.js} +10 -10
  143. package/chunks/{handleAutoUpdate-AW4ZAHON.js → handleAutoUpdate-MCAMHYDI.js} +19 -18
  144. package/chunks/{i18n-IH5CRAY7.js → i18n-C3GDCALP.js} +17 -16
  145. package/chunks/{initializer-UBR37ZNM.js → initializer-4URDQL2G.js} +22 -21
  146. package/chunks/{installationInfo-Y52756EC.js → installationInfo-LBOL6SBV.js} +17 -16
  147. package/chunks/{list-7V5JDZPO.js → list-JOGBAC2R.js} +25 -24
  148. package/chunks/{list-agents-I5TRH3J7.js → list-agents-2CXPGJUE.js} +3 -3
  149. package/chunks/{llm-QDB6JVF5.js → llm-2KPNSAVY.js} +65 -59
  150. package/chunks/{llm-content-generator-EO6MZCEO.js → llm-content-generator-GR3FOHLB.js} +2 -2
  151. package/chunks/{loadedSettingsAdapter-I3YQKMC4.js → loadedSettingsAdapter-DVKROEJD.js} +22 -21
  152. package/chunks/{loggingContentGenerator-MNXYUGDG.js → loggingContentGenerator-P4K6K5W4.js} +12 -12
  153. package/chunks/{managed-npm-update-EA3EXPTO.js → managed-npm-update-VWBKHNIN.js} +17 -16
  154. package/chunks/{mcp-QTAJ544Y.js → mcp-6YYNSYLK.js} +22 -21
  155. package/chunks/{monitor-6FQKQOTP.js → monitor-A255TNZR.js} +10 -10
  156. package/chunks/{nonInteractiveCli-MRCTZL5X.js → nonInteractiveCli-LXGIKQAT.js} +55 -54
  157. package/chunks/{notebook-edit-BQQCKI7K.js → notebook-edit-5UYHS2DM.js} +10 -10
  158. package/chunks/{open-with-auth-D6JD6LDS.js → open-with-auth-6MVIHMXB.js} +1 -1
  159. package/chunks/{openaiContentGenerator-TTSKXNVH.js → openaiContentGenerator-A6MAMEO5.js} +7 -7
  160. package/chunks/{pidfile-KPIS6RIT.js → pidfile-B7DZC4TP.js} +20 -17
  161. package/chunks/{processUtils-ZCASPKK4.js → processUtils-BPZ2MCZS.js} +2 -2
  162. package/chunks/{prompt-terminal-ledger-D6HM6TV7.js → prompt-terminal-ledger-FYYTAOXS.js} +18 -17
  163. package/chunks/{qwenContentGenerator-GGZEFLBD.js → qwenContentGenerator-4IOJFD4S.js} +13 -13
  164. package/chunks/{read-file-VE5GDFLP.js → read-file-A4H4O3VQ.js} +2 -2
  165. package/chunks/{resumeHistoryUtils-HSSGMYDC.js → resumeHistoryUtils-YQQ43E4N.js} +19 -18
  166. package/chunks/{ripGrep-SEJE7AA6.js → ripGrep-W32NWFTA.js} +3 -3
  167. package/chunks/{run-qwen-serve-OJYVH7N6.js → run-qwen-serve-WBSWWIRV.js} +216 -64
  168. package/chunks/{runtime-KGMQQFJD.js → runtime-VRVBX2E5.js} +29 -26
  169. package/chunks/{scheduled-tasks-7H5HWHYD.js → scheduled-tasks-D65KJDA3.js} +20 -19
  170. package/chunks/{scheduler-BE42AKDG.js → scheduler-M2YPN7Z7.js} +19 -18
  171. package/chunks/{send-message-AWKUDJBH.js → send-message-76BKWKFZ.js} +3 -3
  172. package/chunks/{serve-KZVKYMSL.js → serve-BE3H2P6P.js} +22 -21
  173. package/chunks/{server-PJRALPJQ.js → server-FLY5JERG.js} +84 -148
  174. package/chunks/{session-IHITXU2S.js → session-JVN62R5K.js} +85 -57
  175. package/chunks/{session-attachments-root-GQ2TUI3Y.js → session-attachments-root-7ACGLHXA.js} +17 -16
  176. package/chunks/{session-pr-refresh-H43LULTE.js → session-pr-refresh-TQS57SDK.js} +19 -18
  177. package/chunks/{settings-RKEQQDFC.js → settings-D44YMZFT.js} +21 -20
  178. package/chunks/{shell-6PJ444U5.js → shell-3VE6I4V5.js} +10 -10
  179. package/chunks/{skill-Q3UP7B5V.js → skill-FHEGRRZU.js} +2 -2
  180. package/chunks/{skill-settings-LZR5YRRW.js → skill-settings-VHEJMBFL.js} +21 -20
  181. package/chunks/{spawnChannel-WM3DT2BF.js → spawnChannel-T6MX2ZDN.js} +17 -16
  182. package/chunks/{standalone-update-E5474IBI.js → standalone-update-QUGHFMCS.js} +18 -17
  183. package/chunks/{start-opentui-ui-WLWZNQ2I.js → start-opentui-ui-IHIIZ2LE.js} +438 -203
  184. package/chunks/{startInteractiveUI-FBQSGWGO.js → startInteractiveUI-LR7K2ARZ.js} +1171 -1234
  185. package/chunks/{task-create-PMAFST2T.js → task-create-MWXJFRRM.js} +3 -3
  186. package/chunks/{task-list-R2HSY2NC.js → task-list-EYO3FE57.js} +2 -2
  187. package/chunks/{task-update-JYC57USF.js → task-update-2JJJRHMT.js} +3 -3
  188. package/chunks/{team-create-VIGUFUT4.js → team-create-GY3VFY47.js} +10 -10
  189. package/chunks/{team-delete-CBHVBTPB.js → team-delete-IQZ6XGFI.js} +2 -2
  190. package/chunks/{team-plan-approval-HQVZA3MD.js → team-plan-approval-BQPGZOT5.js} +10 -10
  191. package/chunks/{terminal-image-renderer-LUKNCOVM.js → terminal-image-renderer-YNYW5CQG.js} +17 -16
  192. package/chunks/{theme-manager-LOENKYLY.js → theme-manager-U6CIK3GM.js} +17 -16
  193. package/chunks/{tool-search-ZIFAQCE2.js → tool-search-XI3QWD5I.js} +2 -2
  194. package/chunks/{total-session-admission-FUUJH3QH.js → total-session-admission-3SNSJJ32.js} +18 -17
  195. package/chunks/{trustedFolders-C76KYROP.js → trustedFolders-OVAQKNV5.js} +18 -17
  196. package/chunks/{update-relaunch-4G2SRXKX.js → update-relaunch-XV5O74E3.js} +5 -5
  197. package/chunks/{updateCheck-EIZIO7HI.js → updateCheck-CHUYWD6L.js} +17 -16
  198. package/chunks/{useAutoAcceptIndicator-EAA6KSY4.js → useAutoAcceptIndicator-VKSVIXZC.js} +23 -22
  199. package/chunks/{validateNonInterActiveAuth-BRX22QCN.js → validateNonInterActiveAuth-ZNUTD3E5.js} +53 -52
  200. package/chunks/{version-E56RU7PR.js → version-EK7VAGSI.js} +3 -1
  201. package/chunks/{web-fetch-AAUCD7RM.js → web-fetch-24KZO763.js} +2 -2
  202. package/chunks/{web-search-HFUQF44Q.js → web-search-CRNXKZ2X.js} +184 -7
  203. package/chunks/{web-shell-static-POZHGGXE.js → web-shell-static-BFDESDD4.js} +5 -4
  204. package/chunks/{workflow-3MABM53N.js → workflow-HD5NYMW5.js} +201 -65
  205. package/chunks/{workspace-providers-status-2FRLBZ5I.js → workspace-providers-status-MAM42IZS.js} +24 -23
  206. package/chunks/{workspace-registration-store-YL7HLYYI.js → workspace-registration-store-HKLJEDQX.js} +1 -2
  207. package/chunks/{workspace-registry-BNRP2ELW.js → workspace-registry-7RDDOBLN.js} +18 -17
  208. package/chunks/{workspace-runtime-coordinator-WKGF7VHS.js → workspace-runtime-coordinator-LEPDPXJO.js} +18 -17
  209. package/chunks/{workspace-service-4MYO72MM.js → workspace-service-5IFDCNN3.js} +23 -22
  210. package/chunks/{workspace-skills-status-SU66TJLZ.js → workspace-skills-status-FJ3HNH4H.js} +22 -21
  211. package/chunks/{workspace-trust-reconciler-D5QT7WQB.js → workspace-trust-reconciler-PQFHIWLR.js} +23 -22
  212. package/chunks/{write-file-NVPQE2AZ.js → write-file-ERG67ZFX.js} +11 -11
  213. package/chunks/{zoom-image-RJHC66WG.js → zoom-image-WQYEC3SR.js} +2 -2
  214. package/cli.js +12 -12
  215. package/export-transcript-document.js +82 -82
  216. package/package.json +4 -4
  217. package/web-shell/assets/{abnfDiagram-VCTEODGH-DHc6plZn.js → abnfDiagram-VCTEODGH-BRLgQbnT.js} +1 -1
  218. package/web-shell/assets/{arc-BQ9m8TDV.js → arc-qAF9_XsR.js} +1 -1
  219. package/web-shell/assets/{architectureDiagram-5GKGNRK7-D5ap3oVB.js → architectureDiagram-5GKGNRK7-BorUttEz.js} +1 -1
  220. package/web-shell/assets/{blockDiagram-NRAW4CY4-BIbnyNph.js → blockDiagram-NRAW4CY4-Bj0qZVxu.js} +1 -1
  221. package/web-shell/assets/{c4Diagram-UCG6FXSJ-BRsdx_iG.js → c4Diagram-UCG6FXSJ-BTqJis32.js} +1 -1
  222. package/web-shell/assets/channel-COIuCrVH.js +1 -0
  223. package/web-shell/assets/{chunk-2Q5K7J3B-3lf1fNlx.js → chunk-2Q5K7J3B-RrQ5X8m-.js} +1 -1
  224. package/web-shell/assets/{chunk-5VM5RSS4-DP8VNRc4.js → chunk-5VM5RSS4-uUjDl8wO.js} +1 -1
  225. package/web-shell/assets/{chunk-F27PBJKO-DrohDmZ6.js → chunk-F27PBJKO-C3JhpyzI.js} +1 -1
  226. package/web-shell/assets/{chunk-G27WJ6UU-UZ2QhSx6.js → chunk-G27WJ6UU-C8ZNFs7F.js} +1 -1
  227. package/web-shell/assets/{chunk-JWPE2WC7-BIMHVcZK.js → chunk-JWPE2WC7-DNpXtEOs.js} +1 -1
  228. package/web-shell/assets/{chunk-LCL6LL3I-izRxdSDd.js → chunk-LCL6LL3I-DagA2ZLw.js} +1 -1
  229. package/web-shell/assets/{chunk-POPQ4Y6H-CXADD4PP.js → chunk-POPQ4Y6H-R23uH7Xm.js} +1 -1
  230. package/web-shell/assets/{chunk-SVP7TREG-B96d8Y_1.js → chunk-SVP7TREG-Qz9RN_BR.js} +1 -1
  231. package/web-shell/assets/{chunk-XXDRQBXY-CF2sVQpv.js → chunk-XXDRQBXY-jYb1_hni.js} +1 -1
  232. package/web-shell/assets/classDiagram-DTDB5LWJ-DoX6OYqu.js +1 -0
  233. package/web-shell/assets/classDiagram-v2-JRS7N3AN-DoX6OYqu.js +1 -0
  234. package/web-shell/assets/{cose-bilkent-JH36ORCC-CT6tXVAS.js → cose-bilkent-JH36ORCC-Cv2OunpE.js} +1 -1
  235. package/web-shell/assets/{cynefin-OW5HDTMX-X1NS4vtV.js → cynefin-OW5HDTMX-LH42KFJx.js} +1 -1
  236. package/web-shell/assets/{cynefinDiagram-5FMLGOSQ-DNsKNOT4.js → cynefinDiagram-5FMLGOSQ-Dha4_OoR.js} +1 -1
  237. package/web-shell/assets/{dagre-3AP2YEHR-9-AHKqsb.js → dagre-3AP2YEHR-Br5lnUKD.js} +1 -1
  238. package/web-shell/assets/{diagram-S7CK7UJ4-Bjgms7j6.js → diagram-S7CK7UJ4-dpKq2bBX.js} +1 -1
  239. package/web-shell/assets/{diagram-UQ7AKVKN-h6bCprbE.js → diagram-UQ7AKVKN-BAgHWpXr.js} +1 -1
  240. package/web-shell/assets/{diagram-VSXAHHWV-4SbQXVLt.js → diagram-VSXAHHWV-GRRzpyE2.js} +1 -1
  241. package/web-shell/assets/{diagram-VX7I27RA-B5gPCzzB.js → diagram-VX7I27RA-BNFiaYpG.js} +1 -1
  242. package/web-shell/assets/{diagram-Z3DM3KII-DFJXIA3A.js → diagram-Z3DM3KII-BisZzB_h.js} +1 -1
  243. package/web-shell/assets/{ebnfDiagram-PWID7BFC-FwyaU7VY.js → ebnfDiagram-PWID7BFC-B1xbwycf.js} +1 -1
  244. package/web-shell/assets/{erDiagram-SSCWMZ5O-8vJQh2te.js → erDiagram-SSCWMZ5O-CQMzbGE5.js} +1 -1
  245. package/web-shell/assets/{flowDiagram-A5DVABFB-BzA_1gMN.js → flowDiagram-A5DVABFB-CZ_Zondl.js} +1 -1
  246. package/web-shell/assets/{ganttDiagram-EL5Y4UJY-Co-ABbVX.js → ganttDiagram-EL5Y4UJY-BTh2ShxS.js} +1 -1
  247. package/web-shell/assets/{gitGraphDiagram-WWUBYQGX-DW_FcyrX.js → gitGraphDiagram-WWUBYQGX-oHOB-Uxt.js} +1 -1
  248. package/web-shell/assets/{index-Bu-rZoJ-.js → index-CI1ysIEv.js} +478 -474
  249. package/web-shell/assets/index-CpxXGH-8.css +36 -0
  250. package/web-shell/assets/{index-BbMXfhNG.js → index-DWoFMu5x.js} +1 -1
  251. package/web-shell/assets/{infoDiagram-RXCK75RN-BEgfhUFN.js → infoDiagram-RXCK75RN-C0QpudbG.js} +1 -1
  252. package/web-shell/assets/{ishikawaDiagram-5VMMS53U-DCsMxQmc.js → ishikawaDiagram-5VMMS53U-a6B741uT.js} +1 -1
  253. package/web-shell/assets/{journeyDiagram-EYS64GPL-DyIEYoHz.js → journeyDiagram-EYS64GPL-Dbht9ICp.js} +1 -1
  254. package/web-shell/assets/{kanban-definition-3QL26DDD-CkxjqCNr.js → kanban-definition-3QL26DDD-D4OFR8-h.js} +1 -1
  255. package/web-shell/assets/{layout-BEWc0Al9.js → layout-Dvdh5jRH.js} +1 -1
  256. package/web-shell/assets/{linear-CNuNxirL.js → linear-Dvc6KIW2.js} +1 -1
  257. package/web-shell/assets/{mermaid.core-DZBre674.js → mermaid.core-CB36RfIb.js} +6 -6
  258. package/web-shell/assets/{mindmap-definition-FBJOCRG2-CpafFz_F.js → mindmap-definition-FBJOCRG2-Fmqo1CjP.js} +1 -1
  259. package/web-shell/assets/{pegDiagram-XKGWAZYB-DfZqk_dq.js → pegDiagram-XKGWAZYB-CCxYBoA4.js} +1 -1
  260. package/web-shell/assets/{pieDiagram-E7YTZNPT-S0UWXlgC.js → pieDiagram-E7YTZNPT-BVHKQFzt.js} +1 -1
  261. package/web-shell/assets/{quadrantDiagram-AXDQQJYC-dd37_Ohj.js → quadrantDiagram-AXDQQJYC-l95IznwR.js} +1 -1
  262. package/web-shell/assets/{railroadDiagram-O6MQD6OU-CH8NJZ7u.js → railroadDiagram-O6MQD6OU-BlLdRdXp.js} +1 -1
  263. package/web-shell/assets/{requirementDiagram-EFPCY7ZU-CFdqWYih.js → requirementDiagram-EFPCY7ZU-BkDLBR5w.js} +1 -1
  264. package/web-shell/assets/{sankeyDiagram-P5KCCOFB-CsddcEGD.js → sankeyDiagram-P5KCCOFB-jAIqRp65.js} +1 -1
  265. package/web-shell/assets/{sequenceDiagram-WJ2MYXX4-BZ270mGw.js → sequenceDiagram-WJ2MYXX4-f-soZYPr.js} +1 -1
  266. package/web-shell/assets/{sizeCapture-X5ZJPWSS-CGaS4DBV.js → sizeCapture-X5ZJPWSS-BzOuAfB2.js} +1 -1
  267. package/web-shell/assets/{stateDiagram-HBIQ2CUA-COpIzMu6.js → stateDiagram-HBIQ2CUA-BPLSs12r.js} +1 -1
  268. package/web-shell/assets/stateDiagram-v2-4QOOHH4V-IRul-LaT.js +1 -0
  269. package/web-shell/assets/{swimlanes-XN3QIQJK-CMF889m3.js → swimlanes-XN3QIQJK-D-9E_RIR.js} +1 -1
  270. package/web-shell/assets/swimlanesDiagram-VK2B7HYN-D6lgKepA.js +8 -0
  271. package/web-shell/assets/{timeline-definition-24CTP7MA-BelnxYz5.js → timeline-definition-24CTP7MA-CT56K-gV.js} +1 -1
  272. package/web-shell/assets/{vennDiagram-4TSXK5OY-CU-NRqIB.js → vennDiagram-4TSXK5OY-B-vi4IyO.js} +1 -1
  273. package/web-shell/assets/{wardleyDiagram-VM6X3IG4-CDNKqWh-.js → wardleyDiagram-VM6X3IG4-C9O7Ju98.js} +1 -1
  274. package/web-shell/assets/{xychartDiagram-S5SC5T6Z-CLqguL5D.js → xychartDiagram-S5SC5T6Z-6d8w3jg2.js} +1 -1
  275. package/web-shell/index.html +2 -2
  276. package/chunks/chunk-X35VIWWJ.js +0 -276
  277. package/web-shell/assets/channel-uMMdTrYk.js +0 -1
  278. package/web-shell/assets/classDiagram-DTDB5LWJ-DcY-26Ig.js +0 -1
  279. package/web-shell/assets/classDiagram-v2-JRS7N3AN-DcY-26Ig.js +0 -1
  280. package/web-shell/assets/index-CsPwZ1ut.css +0 -36
  281. package/web-shell/assets/stateDiagram-v2-4QOOHH4V-D6qEVAji.js +0 -1
  282. package/web-shell/assets/swimlanesDiagram-VK2B7HYN-mem5Jj4m.js +0 -8
@@ -11,12 +11,13 @@ import {
11
11
  persistInlineWorkflowScript,
12
12
  resolveSavedWorkflowScript,
13
13
  writeWorkflowSnapshot
14
- } from "./chunk-G5QLLD53.js";
14
+ } from "./chunk-OXR34GCD.js";
15
15
  import {
16
16
  AgentEventEmitter,
17
17
  RESUME_ARGS_TOO_LARGE_NOTE,
18
18
  attachJsonlTranscriptWriter,
19
19
  buildAgentTranscriptAttach,
20
+ buildFailureLines,
20
21
  buildResumeCall,
21
22
  deriveApprovalModeConfig,
22
23
  deriveConfig,
@@ -32,15 +33,15 @@ import {
32
33
  resolveToolName,
33
34
  toModelVisibleSubagentResult,
34
35
  tryWithWorkflowTaskMutation
35
- } from "./chunk-43CI6YWJ.js";
36
+ } from "./chunk-HJ5UJQQL.js";
36
37
  import "./chunk-GOFAQQZA.js";
37
38
  import "./chunk-65I7S4Z3.js";
38
39
  import "./chunk-6HUXPLB5.js";
39
40
  import "./chunk-TWPJO254.js";
40
41
  import "./chunk-CQ35AJ4Z.js";
41
- import "./chunk-YHDGABDC.js";
42
+ import "./chunk-XKBFYTCD.js";
42
43
  import "./chunk-LYT2OU7D.js";
43
- import "./chunk-B54PFQS5.js";
44
+ import "./chunk-7CLLH5TI.js";
44
45
  import {
45
46
  GitWorktreeService,
46
47
  generateAgentWorktreeSlug,
@@ -50,7 +51,7 @@ import {
50
51
  parsePositiveIntegerEnv
51
52
  } from "./chunk-6PVPNMXU.js";
52
53
  import "./chunk-565U2ANU.js";
53
- import "./chunk-FDOGGKAA.js";
54
+ import "./chunk-GSFV5RQW.js";
54
55
  import "./chunk-IRH27ZC2.js";
55
56
  import "./chunk-QHWCP53L.js";
56
57
  import "./chunk-F53KKZUD.js";
@@ -62,8 +63,8 @@ import "./chunk-CHEIIBT3.js";
62
63
  import {
63
64
  SUBAGENT_PLAN_LIFECYCLE_TOOLS
64
65
  } from "./chunk-QAZ2MGYT.js";
65
- import "./chunk-B44JBZBB.js";
66
- import "./chunk-BF3RUIVP.js";
66
+ import "./chunk-QQK4L3UU.js";
67
+ import "./chunk-CH2YDT6X.js";
67
68
  import "./chunk-JX6XHPTX.js";
68
69
  import "./chunk-CLKE4IY3.js";
69
70
  import "./chunk-ZSTCM3MX.js";
@@ -72,7 +73,7 @@ import "./chunk-MLXTMF7H.js";
72
73
  import "./chunk-3LPJ776W.js";
73
74
  import "./chunk-3CZ2BQV6.js";
74
75
  import "./chunk-PQEISIKS.js";
75
- import "./chunk-VF6D6EGV.js";
76
+ import "./chunk-S5QR6CB5.js";
76
77
  import {
77
78
  runWithAgentContext
78
79
  } from "./chunk-H3Q3RSKZ.js";
@@ -82,7 +83,7 @@ import "./chunk-OFVAS4AR.js";
82
83
  import "./chunk-HNLMYDQE.js";
83
84
  import "./chunk-QHMLYMMS.js";
84
85
  import "./chunk-CFKIH3D3.js";
85
- import "./chunk-6YEOCHSE.js";
86
+ import "./chunk-VBLAI2HA.js";
86
87
  import {
87
88
  createAbortController,
88
89
  createChildAbortController
@@ -96,7 +97,7 @@ import {
96
97
  logWorkflowRun,
97
98
  read,
98
99
  writeLine
99
- } from "./chunk-OIPUQE3S.js";
100
+ } from "./chunk-F2NYVASI.js";
100
101
  import "./chunk-5ETULJLP.js";
101
102
  import "./chunk-XBVNNDPK.js";
102
103
  import "./chunk-VGC4I5JJ.js";
@@ -108,7 +109,7 @@ import "./chunk-HD7O6WLV.js";
108
109
  import "./chunk-WZAD4ZNJ.js";
109
110
  import "./chunk-FPGTNKCP.js";
110
111
  import "./chunk-TIGXX4PA.js";
111
- import "./chunk-DTB5BXRG.js";
112
+ import "./chunk-JO77FGNZ.js";
112
113
  import "./chunk-XFFRI3WM.js";
113
114
  import "./chunk-4HOEU2OR.js";
114
115
  import "./chunk-HHJLM3WQ.js";
@@ -238,6 +239,44 @@ var WorkflowBudgetExceededError = class extends Error {
238
239
  }
239
240
  };
240
241
 
242
+ // packages/core/src/agents/runtime/workflow-agent-failure.ts
243
+ init_esbuild_shims();
244
+ var WorkflowAgentFailedError = class extends Error {
245
+ static {
246
+ __name(this, "WorkflowAgentFailedError");
247
+ }
248
+ name = "WorkflowAgentFailedError";
249
+ kind;
250
+ terminateMode;
251
+ constructor(message, kind, terminateMode) {
252
+ super(message);
253
+ this.kind = kind;
254
+ this.terminateMode = terminateMode;
255
+ }
256
+ };
257
+ function isWorkflowAgentFailedError(error) {
258
+ return typeof error === "object" && error !== null && error.name === "WorkflowAgentFailedError";
259
+ }
260
+ __name(isWorkflowAgentFailedError, "isWorkflowAgentFailedError");
261
+ var WorkflowAgentCapExceededError = class extends Error {
262
+ static {
263
+ __name(this, "WorkflowAgentCapExceededError");
264
+ }
265
+ name = "WorkflowAgentCapExceededError";
266
+ constructor(maxAgents) {
267
+ super(
268
+ `Workflow exceeded the maximum of ${maxAgents} agent() calls per run.`
269
+ );
270
+ }
271
+ };
272
+ function isWorkflowRunLevelError(error) {
273
+ if (typeof error !== "object" || error === null) return false;
274
+ const name = error.name;
275
+ return name === "WorkflowBudgetExceededError" || name === "WorkflowAgentCapExceededError";
276
+ }
277
+ __name(isWorkflowRunLevelError, "isWorkflowRunLevelError");
278
+ var WORKFLOW_ABORT_REASON_STALLED = "stalled";
279
+
241
280
  // packages/core/src/agents/runtime/workflow-stall.ts
242
281
  init_esbuild_shims();
243
282
  var DEFAULT_STALL_MS = 18e4;
@@ -285,7 +324,7 @@ function attachStallWatchdog(emitter, controller, stallMs) {
285
324
  `[Workflow] agent dispatch stalled \u2014 no progress for ${stallMs}ms; aborting.`
286
325
  );
287
326
  try {
288
- controller.abort("stalled");
327
+ controller.abort(WORKFLOW_ABORT_REASON_STALLED);
289
328
  } catch (e) {
290
329
  debugLogger3.warn("stall watchdog abort threw:", e);
291
330
  }
@@ -357,8 +396,9 @@ async function runStallResilient(attemptFn, opts) {
357
396
  continue;
358
397
  }
359
398
  if (watchdog.stalled()) {
360
- throw new Error(
361
- `agent "${label ?? "workflow-agent"}" stalled on all ${MAX_STALL_ATTEMPTS} attempts (no progress for ${stallMs}ms each).`
399
+ throw new WorkflowAgentFailedError(
400
+ `agent "${label ?? "workflow-agent"}" stalled on all ${MAX_STALL_ATTEMPTS} attempts (no progress for ${stallMs}ms each).`,
401
+ "stalled"
362
402
  );
363
403
  }
364
404
  throw err;
@@ -437,16 +477,20 @@ __name(deriveArgsSeed, "deriveArgsSeed");
437
477
  function buildReplay(entries) {
438
478
  const results = /* @__PURE__ */ new Map();
439
479
  const started = /* @__PURE__ */ new Map();
480
+ const failed = /* @__PURE__ */ new Set();
440
481
  for (const e of entries) {
441
482
  if (e.type === "result") {
442
483
  results.set(e.key, e);
443
484
  } else if (e.type === "started") {
485
+ failed.delete(e.key);
444
486
  const list = started.get(e.key);
445
487
  if (list) list.push(e);
446
488
  else started.set(e.key, [e]);
489
+ } else if (e.type === "failed") {
490
+ failed.add(e.key);
447
491
  }
448
492
  }
449
- return { results, started };
493
+ return { results, started, failed };
450
494
  }
451
495
  __name(buildReplay, "buildReplay");
452
496
  var WorkflowJournal = class {
@@ -512,7 +556,7 @@ var WorkflowJournal = class {
512
556
  return buildReplay(entries);
513
557
  } catch (e) {
514
558
  debugLogger4.warn(`WorkflowJournal.load failed for ${this.path}: ${e}`);
515
- return { results: /* @__PURE__ */ new Map(), started: /* @__PURE__ */ new Map() };
559
+ return { results: /* @__PURE__ */ new Map(), started: /* @__PURE__ */ new Map(), failed: /* @__PURE__ */ new Set() };
516
560
  }
517
561
  }
518
562
  /** Append one entry. Rejects only on I/O error (callers `.catch`). */
@@ -863,8 +907,22 @@ function attachDispatchTranscript(config, agentId, prompt, agentName, emitter, a
863
907
  }
864
908
  }
865
909
  __name(attachDispatchTranscript, "attachDispatchTranscript");
910
+ function terminalDispatchError(workflowAgentId, mode) {
911
+ const message = `Workflow subagent ${workflowAgentId} did not complete (terminate mode: ${mode}).`;
912
+ switch (mode) {
913
+ case "MAX_TURNS" /* MAX_TURNS */:
914
+ return new WorkflowAgentFailedError(message, "max_turns", mode);
915
+ case "TIMEOUT" /* TIMEOUT */:
916
+ return new WorkflowAgentFailedError(message, "timeout", mode);
917
+ case "ERROR" /* ERROR */:
918
+ return new WorkflowAgentFailedError(message, "error", mode);
919
+ default:
920
+ return new Error(message);
921
+ }
922
+ }
923
+ __name(terminalDispatchError, "terminalDispatchError");
866
924
  async function runSingleDispatch(config, prompt, opts, attemptSignal, emitter, workflowAgentId, agentIdentity, onTokens) {
867
- const { AgentHeadless, ContextState } = await import("./agent-headless-Y2GR5F2Q.js");
925
+ const { AgentHeadless, ContextState } = await import("./agent-headless-VZKSRH36.js");
868
926
  const ctx = new ContextState();
869
927
  ctx.set("task_prompt", prompt);
870
928
  debugLogger.debug(`[workflow] Dispatch ${workflowAgentId}`);
@@ -906,9 +964,7 @@ async function runSingleDispatch(config, prompt, opts, attemptSignal, emitter, w
906
964
  }
907
965
  const mode = subagent.getTerminateMode();
908
966
  if (mode !== "GOAL" /* GOAL */) {
909
- throw new Error(
910
- `Workflow subagent ${workflowAgentId} did not complete (terminate mode: ${mode}).`
911
- );
967
+ throw terminalDispatchError(workflowAgentId, mode);
912
968
  }
913
969
  return toModelVisibleSubagentResult(subagent.getFinalText(), mode);
914
970
  }
@@ -1097,24 +1153,22 @@ ${WORKFLOW_SUBAGENT_SYSTEM_PROMPT_WITH_SCHEMA}` : WORKFLOW_SUBAGENT_SYSTEM_PROMP
1097
1153
  }
1098
1154
  const mode2 = subagent.getTerminateMode();
1099
1155
  if (mode2 !== "GOAL" /* GOAL */ && mode2 !== "CANCELLED" /* CANCELLED */) {
1100
- throw new Error(
1101
- `Workflow subagent ${workflowAgentId} did not complete (terminate mode: ${mode2}).`
1102
- );
1156
+ throw terminalDispatchError(workflowAgentId, mode2);
1103
1157
  }
1104
1158
  if (schemaState.attempts > 2) {
1105
- throw new Error(
1106
- "subagent completed without calling StructuredOutput (after 2 in-conversation nudges)."
1159
+ throw new WorkflowAgentFailedError(
1160
+ "subagent completed without calling StructuredOutput (after 2 in-conversation nudges).",
1161
+ "no_structured_output"
1107
1162
  );
1108
1163
  }
1109
- throw new Error(
1110
- "subagent completed without calling structured_output (no validation attempt \u2014 model produced plain-text content)."
1164
+ throw new WorkflowAgentFailedError(
1165
+ "subagent completed without calling structured_output (no validation attempt \u2014 model produced plain-text content).",
1166
+ "no_structured_output"
1111
1167
  );
1112
1168
  }
1113
1169
  const mode = subagent.getTerminateMode();
1114
1170
  if (mode !== "GOAL" /* GOAL */) {
1115
- throw new Error(
1116
- `Workflow subagent ${workflowAgentId} did not complete (terminate mode: ${mode}).`
1117
- );
1171
+ throw terminalDispatchError(workflowAgentId, mode);
1118
1172
  }
1119
1173
  let finalText = toModelVisibleSubagentResult(
1120
1174
  subagent.getFinalText(),
@@ -1365,6 +1419,9 @@ var WorkflowOrchestrator = class {
1365
1419
  let prefixHash = deriveArgsSeed(req.args);
1366
1420
  let hadMiss = false;
1367
1421
  let journalAgentId = 0;
1422
+ const parentSandboxRef = {
1423
+ current: void 0
1424
+ };
1368
1425
  const countedDispatch = /* @__PURE__ */ __name((prompt, opts) => {
1369
1426
  if (typeof prompt !== "string" || prompt.length === 0) {
1370
1427
  return rejectThroughPauseGate(
@@ -1373,6 +1430,7 @@ var WorkflowOrchestrator = class {
1373
1430
  }
1374
1431
  let journalKey;
1375
1432
  let journalEntryId;
1433
+ let respawnLine;
1376
1434
  if (journal) {
1377
1435
  journalKey = deriveAgentKey(prefixHash, prompt, opts);
1378
1436
  prefixHash = journalKey;
@@ -1408,11 +1466,12 @@ var WorkflowOrchestrator = class {
1408
1466
  );
1409
1467
  }
1410
1468
  }
1469
+ const priorStarts = replay?.started.get(journalKey);
1470
+ if (priorStarts && priorStarts.length > 0 && !replay?.results.has(journalKey)) {
1471
+ const name = typeof opts.label === "string" ? `"${stripAnsiAndControl(opts.label)}"` : "an agent";
1472
+ respawnLine = replay?.failed.has(journalKey) ? `[resume] re-running ${name}: it failed in the previous run` : `[resume] respawning ${name}: interrupted in a previous run (${priorStarts.length} prior attempt${priorStarts.length === 1 ? "" : "s"})`;
1473
+ }
1411
1474
  hadMiss = true;
1412
- journalEntryId = String(journalAgentId += 1);
1413
- journal.append({ type: "started", key: journalKey, agentId: journalEntryId }).catch(
1414
- (e) => debugLogger.warn(`journal started-append failed: ${e}`)
1415
- );
1416
1475
  }
1417
1476
  if (budget && budget.total !== null && budget.remaining() <= 0) {
1418
1477
  debugLogger.warn(
@@ -1422,14 +1481,15 @@ var WorkflowOrchestrator = class {
1422
1481
  new WorkflowBudgetExceededError(runId, budget.total, budget.spent())
1423
1482
  );
1424
1483
  }
1425
- agentCount += 1;
1426
- if (agentCount > maxAgents) {
1484
+ if (agentCount >= maxAgents) {
1427
1485
  return rejectThroughPauseGate(
1428
- new Error(
1429
- `Workflow exceeded the maximum of ${maxAgents} agent() calls per run.`
1430
- )
1486
+ new WorkflowAgentCapExceededError(maxAgents)
1431
1487
  );
1432
1488
  }
1489
+ agentCount += 1;
1490
+ if (journal && journalKey !== void 0) {
1491
+ journalEntryId = String(journalAgentId += 1);
1492
+ }
1433
1493
  const label = typeof opts.label === "string" ? opts.label : void 0;
1434
1494
  const dispatchId = issueDispatchTrace(prompt, opts);
1435
1495
  try {
@@ -1470,6 +1530,23 @@ var WorkflowOrchestrator = class {
1470
1530
  budget.spent()
1471
1531
  );
1472
1532
  }
1533
+ if (journal && journalKey !== void 0 && journalEntryId !== void 0) {
1534
+ journal.append({
1535
+ type: "started",
1536
+ key: journalKey,
1537
+ agentId: journalEntryId
1538
+ }).catch(
1539
+ (e) => debugLogger.warn(`journal started-append failed: ${e}`)
1540
+ );
1541
+ }
1542
+ if (respawnLine) {
1543
+ parentSandboxRef.current?.appendLog(respawnLine);
1544
+ try {
1545
+ emitter?.resumeRespawn?.(respawnLine);
1546
+ } catch (e) {
1547
+ debugLogger.warn("emitter.resumeRespawn threw:", e);
1548
+ }
1549
+ }
1473
1550
  const result = await this.dispatch(prompt, opts, dispatchId);
1474
1551
  emitCompletion();
1475
1552
  if (journal && journalKey !== void 0) {
@@ -1499,7 +1576,26 @@ var WorkflowOrchestrator = class {
1499
1576
  debugLogger.warn("emitter.budgetUpdated threw:", e);
1500
1577
  }
1501
1578
  }
1502
- throw err;
1579
+ if (journal && journalKey !== void 0 && !signal?.aborted && !isWorkflowRunLevelError(err)) {
1580
+ journal.append({
1581
+ type: "failed",
1582
+ key: journalKey,
1583
+ agentId: journalEntryId ?? ""
1584
+ }).catch(
1585
+ (e) => debugLogger.warn(`journal failed-append failed: ${e}`)
1586
+ );
1587
+ }
1588
+ if (signal?.aborted || isWorkflowRunLevelError(err)) throw err;
1589
+ if (isWorkflowAgentFailedError(err)) {
1590
+ debugLogger.warn(
1591
+ `[Workflow] agent settled to null (${err.kind}): ${err.message}`
1592
+ );
1593
+ } else {
1594
+ debugLogger.warn(
1595
+ `[Workflow] agent settled to null: ${extractErrorMessage(err)}`
1596
+ );
1597
+ }
1598
+ return null;
1503
1599
  }
1504
1600
  }).then(
1505
1601
  // Resolve even if the gate aborts: a successful dispatch must not
@@ -1527,9 +1623,6 @@ var WorkflowOrchestrator = class {
1527
1623
  const parallelImpl = makeParallelImpl(signal, dependencyContext);
1528
1624
  const pipelineImpl = makePipelineImpl(signal, dependencyContext);
1529
1625
  const resolveSavedWorkflow = req.resolveSavedWorkflow;
1530
- const parentSandboxRef = {
1531
- current: void 0
1532
- };
1533
1626
  const workflowImpl = resolveSavedWorkflow ? async (nameOrRef, nestedArgs) => {
1534
1627
  const resolved = await resolveSavedWorkflow(nameOrRef);
1535
1628
  const nestedSandbox = createWorkflowSandbox({
@@ -1587,31 +1680,45 @@ var WorkflowOrchestrator = class {
1587
1680
  }
1588
1681
  }
1589
1682
  };
1590
- async function settleToNullArray(thunks, signal, kind = "parallel") {
1683
+ async function settleToNullArray(thunks, signal) {
1591
1684
  const settled = await Promise.allSettled(
1592
1685
  thunks.map((t) => Promise.resolve().then(t))
1593
1686
  );
1594
1687
  if (signal?.aborted)
1595
1688
  throw new DOMException("Workflow run aborted.", "AbortError");
1596
- let budgetDropped = 0;
1597
- const result = settled.map((r, i) => {
1689
+ const visitedReasons = /* @__PURE__ */ new WeakSet();
1690
+ const findRunFailureReason = /* @__PURE__ */ __name((reason) => {
1691
+ if (reason === null || typeof reason !== "object") return void 0;
1692
+ if (visitedReasons.has(reason)) return void 0;
1693
+ visitedReasons.add(reason);
1694
+ try {
1695
+ if (reason.__wfRunFailure === true) {
1696
+ return reason;
1697
+ }
1698
+ const errors = reason?.errors;
1699
+ if (!Array.isArray(errors)) return void 0;
1700
+ for (const error of errors) {
1701
+ const runFailure = findRunFailureReason(error);
1702
+ if (runFailure !== void 0) return runFailure;
1703
+ }
1704
+ } catch {
1705
+ return void 0;
1706
+ }
1707
+ return void 0;
1708
+ }, "findRunFailureReason");
1709
+ for (const result of settled) {
1710
+ if (result.status !== "rejected") continue;
1711
+ const runFailure = findRunFailureReason(result.reason);
1712
+ if (runFailure !== void 0) throw runFailure;
1713
+ }
1714
+ return settled.map((r, i) => {
1598
1715
  if (r.status === "fulfilled") return r.value;
1599
1716
  const reason = r.reason;
1600
- if (reason?.name === "WorkflowBudgetExceededError") {
1601
- budgetDropped += 1;
1602
- } else {
1603
- debugLogger.warn(
1604
- `Workflow thunk at index ${i} rejected: ${String(reason?.message ?? r.reason)}`
1605
- );
1606
- }
1607
- return null;
1608
- });
1609
- if (budgetDropped > 0) {
1610
1717
  debugLogger.warn(
1611
- `${kind}: ${budgetDropped} slot${budgetDropped === 1 ? "" : "s"} dropped \u2014 token budget exceeded.`
1718
+ `Workflow thunk at index ${i} rejected: ${String(reason?.message ?? r.reason)}`
1612
1719
  );
1613
- }
1614
- return result;
1720
+ return null;
1721
+ });
1615
1722
  }
1616
1723
  __name(settleToNullArray, "settleToNullArray");
1617
1724
  function makeParallelImpl(signal, dependencyContext) {
@@ -1689,8 +1796,7 @@ function makePipelineImpl(signal, dependencyContext) {
1689
1796
  });
1690
1797
  return settleToNullArray(
1691
1798
  branches.map(({ thunk }) => thunk),
1692
- signal,
1693
- "pipeline"
1799
+ signal
1694
1800
  ).then((result) => {
1695
1801
  if (parent && branches.length > 0) {
1696
1802
  parent.tails = mergeFanoutTails(
@@ -1984,7 +2090,12 @@ var WorkflowRunner = class {
1984
2090
  if (!isCurrentEntry()) return;
1985
2091
  registry?.onBudgetUpdated(runId, spent, total);
1986
2092
  emitUpdate();
1987
- }, "budgetUpdated")
2093
+ }, "budgetUpdated"),
2094
+ resumeRespawn: /* @__PURE__ */ __name((line) => {
2095
+ if (!isCurrentEntry()) return;
2096
+ registry?.onResumeRespawn(runId, line);
2097
+ emitUpdate();
2098
+ }, "resumeRespawn")
1988
2099
  };
1989
2100
  const scheduler = new WorkflowDispatchScheduler(
1990
2101
  resolveConcurrencyLimit(),
@@ -2054,6 +2165,19 @@ var WorkflowRunner = class {
2054
2165
  status: entry.status,
2055
2166
  agents_dispatched: entry.agentsDispatched,
2056
2167
  agents_completed: entry.agentsCompleted,
2168
+ // Read off the dispatch traces rather than the counters: a
2169
+ // dispatch that failed or replayed from cache still counts as
2170
+ // completed, so without these three a run that lost half its
2171
+ // fan-out and one that lost none report identically.
2172
+ agents_failed: entry.dispatches.reduce(
2173
+ (n, dispatch) => dispatch.status === "failed" ? n + 1 : n,
2174
+ 0
2175
+ ),
2176
+ agents_cached: entry.dispatches.reduce(
2177
+ (n, dispatch) => dispatch.status === "cached" ? n + 1 : n,
2178
+ 0
2179
+ ),
2180
+ agents_respawned: entry.agentsRespawned ?? 0,
2057
2181
  phase_count: entry.phases.length,
2058
2182
  tokens_spent: entry.tokensSpent,
2059
2183
  duration_ms: (entry.endTime ?? entry.startTime) - entry.startTime
@@ -2102,7 +2226,7 @@ var WORKFLOW_PARAM_SCHEMA = {
2102
2226
  properties: {
2103
2227
  script: {
2104
2228
  type: "string",
2105
- description: `JavaScript source of the workflow. Wrapped as an async IIFE. May call the injected globals \`phase(title)\`, \`log(msg)\`, \`agent(prompt, opts?)\`, and read \`args\`. agent() opts: \`{ label?, phase?, schema?, model?, agentType?, isolation?, workingDir?, stallMs? }\`. \`schema\` (JSON Schema object): the subagent must deliver its result by calling \`structured_output\` with arguments matching the schema; agent() resolves to the validated object. Two failed attempts produce a terminal error "subagent completed without calling StructuredOutput (after 2 in-conversation nudges)". \`agentType\` (string): resolves against the declarative-agents registry (\`.qwen/agents/<name>.md\`, project then user then built-in). Unresolved names throw "agent({agentType}): agent type 'X' not found". \`model\` (string): per-call model override; routes provider correctly via the subagent runtime view. \`isolation\`: \`'worktree'\` provisions a fresh git worktree under \`<projectRoot>/.qwen/worktrees/agent-<7hex>\`; the worktree is auto-removed if no changes, otherwise the path and branch are returned alongside the result. \`'remote'\` throws "agent({isolation:'remote'}) is not available in this build" (parity with upstream). isolation=worktree refuses to run when the parent working tree has uncommitted changes (the subagent would see a stale HEAD). \`workingDir\` (string): pin the subagent to an EXISTING git worktree of this repository that the caller owns \u2014 nothing is created and nothing is removed. Use it when the directory the agent must work in already exists and its uncommitted state is the point (a review worktree, a checkout a previous step provisioned) \u2014 exactly the case isolation cannot serve. Mutually exclusive with \`isolation\`. The path must be a linked worktree of this repository registered via \`git worktree add\` (it may live anywhere on disk) \u2014 the main checkout is not eligible. \`stallMs\` (number, ms): a no-progress watchdog, not a wall-clock cap. The dispatch is aborted and retried (up to ${MAX_STALL_ATTEMPTS} attempts total) after this many milliseconds with no observable subagent progress \u2014 including before the first response arrives; the timer is suspended while a tool is in flight, so a legitimately slow tool is not a stall. Default ${DEFAULT_STALL_MS} (override via \`${MAX_WORKFLOW_STALL_MS_ENV}\`, whole seconds); \`0\` disables the watchdog. Wall time per attempt is bounded separately. Workflow subagents always have SendMessage / Monitor / EnterPlanMode / ExitPlanMode in their disallowed-tool floor regardless of agentType. Concurrency: \`parallel([() => agent(...), ...])\` runs thunks through a shared per-run window (default \`max(2, min(16, cpus-2))\` agents in flight; override via \`${MAX_WORKFLOW_CONCURRENCY_ENV}\`) and resolves to a position-aligned array \u2014 a thunk that throws, or resolves to a non-JSON-serializable value, becomes \`null\` at its index (errors-as-data); parallel() itself rejects only on invalid arguments or abort. \`pipeline(items, ...stages)\` runs each item through the stages (staggered, no inter-stage barrier); a stage that throws, returns \`null\`, or returns a non-JSON-serializable value drops that item to \`null\`. Pass THUNKS to parallel, not eager calls: \`parallel([() => agent(...)])\`, not \`parallel([agent(...)])\`. At most ${DEFAULT_MAX_AGENTS_PER_RUN} agent() calls per run (override via \`${MAX_WORKFLOW_AGENTS_ENV}\`). \`Date.now()\` and \`Math.random()\` both throw \u2014 workflow scripts must be deterministic for resume. \`export const meta = {...}\` declarations are stripped before execution.`
2229
+ description: `JavaScript source of the workflow. Wrapped as an async IIFE. May call the injected globals \`phase(title)\`, \`log(msg)\`, \`agent(prompt, opts?)\`, and read \`args\`. agent() opts: \`{ label?, phase?, schema?, model?, agentType?, isolation?, workingDir?, stallMs? }\`. \`schema\` (JSON Schema object): the subagent must deliver its result by calling \`structured_output\` with arguments matching the schema; agent() resolves to the validated object. After two in-conversation nudges without a valid result, it resolves to null and the failure is recorded as "subagent completed without calling StructuredOutput (after 2 in-conversation nudges)"; check for null. \`agentType\` (string): resolves against the declarative-agents registry (\`.qwen/agents/<name>.md\`, project then user then built-in). Unresolved names make the admitted agent() resolve to null and record "agent({agentType}): agent type 'X' not found"; check for null. \`model\` (string): per-call model override; routes provider correctly via the subagent runtime view. \`isolation\`: \`'worktree'\` provisions a fresh git worktree under \`<projectRoot>/.qwen/worktrees/agent-<7hex>\`; the worktree is auto-removed if no changes, otherwise the path and branch are returned alongside the result. \`'remote'\` makes the admitted agent() resolve to null and records "agent({isolation:'remote'}) is not available in this build" (parity with upstream). isolation=worktree also resolves to null and records a refusal when the parent working tree has uncommitted changes (the subagent would see a stale HEAD). \`workingDir\` (string): pin the subagent to an EXISTING git worktree of this repository that the caller owns \u2014 nothing is created and nothing is removed. Use it when the directory the agent must work in already exists and its uncommitted state is the point (a review worktree, a checkout a previous step provisioned) \u2014 exactly the case isolation cannot serve. Mutually exclusive with \`isolation\`. The path must be a linked worktree of this repository registered via \`git worktree add\` (it may live anywhere on disk) \u2014 the main checkout is not eligible. \`stallMs\` (number, ms): a no-progress watchdog, not a wall-clock cap. The dispatch is aborted and retried (up to ${MAX_STALL_ATTEMPTS} attempts total) after this many milliseconds with no observable subagent progress \u2014 including before the first response arrives; the timer is suspended while a tool is in flight, so a legitimately slow tool is not a stall. Default ${DEFAULT_STALL_MS} (override via \`${MAX_WORKFLOW_STALL_MS_ENV}\`, whole seconds); \`0\` disables the watchdog. Wall time per attempt is bounded separately. Workflow subagents always have SendMessage / Monitor / EnterPlanMode / ExitPlanMode in their disallowed-tool floor regardless of agentType. Concurrency: \`parallel([() => agent(...), ...])\` runs thunks through a shared per-run window (default \`max(2, min(16, cpus-2))\` agents in flight; override via \`${MAX_WORKFLOW_CONCURRENCY_ENV}\`) and resolves to a position-aligned array \u2014 a thunk that throws, or resolves to a non-JSON-serializable value, becomes \`null\` at its index (errors-as-data); parallel() itself rejects on invalid arguments, abort, or a run-level token/agent-cap refusal. \`pipeline(items, ...stages)\` runs each item through the stages (staggered, no inter-stage barrier); an ordinary stage error, \`null\`, or non-JSON-serializable value drops that item to \`null\`, while a run-level refusal rejects the batch. A bare sequential \`await agent()\` follows the same rule: an agent that fails on its own terms resolves to \`null\` there too, so the fan-out and the sequential form never disagree about what a broken agent means. Pass THUNKS to parallel, not eager calls: \`parallel([() => agent(...)])\`, not \`parallel([agent(...)])\`. At most ${DEFAULT_MAX_AGENTS_PER_RUN} agent() calls per run (override via \`${MAX_WORKFLOW_AGENTS_ENV}\`). \`Date.now()\` and \`Math.random()\` both throw \u2014 workflow scripts must be deterministic for resume. \`export const meta = {...}\` declarations are stripped before execution.`
2106
2230
  },
2107
2231
  scriptPath: {
2108
2232
  type: "string",
@@ -2396,19 +2520,31 @@ function buildRunTrailer(config, handle, args, logs, includeResume = true) {
2396
2520
  lines.push(`journal: ${sanitizeLine(handle.journalPath)}`);
2397
2521
  }
2398
2522
  const entry = handle.registry?.get(handle.runId);
2523
+ let failedCount = 0;
2399
2524
  if (entry) {
2400
2525
  const countByStatus = /* @__PURE__ */ __name((status) => entry.dispatches.reduce(
2401
2526
  (n, dispatch) => dispatch.status === status ? n + 1 : n,
2402
2527
  0
2403
2528
  ), "countByStatus");
2529
+ const respawned = entry.agentsRespawned ?? 0;
2530
+ failedCount = countByStatus("failed");
2404
2531
  lines.push(
2405
- `agents: ${entry.dispatches.length} dispatched \xB7 ${countByStatus("completed")} completed \xB7 ${countByStatus("cached")} cached \xB7 ${countByStatus("failed")} failed \xB7 ${countByStatus("cancelled")} cancelled`
2532
+ `agents: ${entry.dispatches.length} dispatched` + (respawned > 0 ? ` (${respawned} re-ran from a prior run)` : "") + ` \xB7 ${countByStatus("completed")} completed \xB7 ${countByStatus("cached")} cached \xB7 ${failedCount} failed \xB7 ${countByStatus("cancelled")} cancelled`
2406
2533
  );
2407
2534
  }
2408
2535
  const spent = handle.budget.spent();
2409
2536
  lines.push(
2410
2537
  handle.budget.total === null ? `tokens: ${spent} spent (no cap)` : `tokens: ${spent} / ${handle.budget.total} spent`
2411
2538
  );
2539
+ const failures = entry ? buildFailureLines(entry) : [];
2540
+ if (failures.length > 0 && entry) {
2541
+ lines.push(
2542
+ `failures (${failedCount}):`,
2543
+ ...failures.map(
2544
+ (line) => clampForDisplay(sanitizeLine(line), TRAILER_LOG_LINE_CHARS)
2545
+ )
2546
+ );
2547
+ }
2412
2548
  const resume = buildResumeCall({
2413
2549
  runId: handle.runId,
2414
2550
  scriptPath: handle.scriptPath,
@@ -2667,7 +2803,7 @@ Reach for one to be comprehensive (decompose the work and cover every part in pa
2667
2803
 
2668
2804
  **Runtime** \u2014 see the \`script\` parameter for the detailed authoring contract.
2669
2805
 
2670
- \`phase(title)\`, \`log(msg)\`, \`agent(prompt, opts?)\`, \`parallel(thunks)\`, \`pipeline(items, ...stages)\`, \`workflow(nameOrRef, args?)\`, plus the \`args\` and \`budget\` globals. \`workflow()\` runs a saved workflow inline under this run's caps and nests one level only \u2014 a workflow reached through \`workflow()\` cannot call \`workflow()\` itself, and doing so throws. Saved workflows are \`<name>.js\` files under \`<projectRoot>/.qwen/workflows\` (project scope, also surfaced as \`/<name>\` slash commands) or \`~/.qwen/workflows\` (user scope, lower precedence when both define the same name); \`workflow('<name>')\` resolves against those two directories, while \`scriptPath\` takes an absolute path to a script inside either of them or inside the generated-scripts root (\`$QWEN_CODE_PROJECT_DIR/workflows/generated\` \u2014 the per-project runtime dir, not the project tree \u2014 where a tool emitting a one-run script writes it; never a slash command, never resolvable by name); a path outside those roots is refused. Default \`max(2, min(16, cpus-2))\` agents in flight per run (\`${MAX_WORKFLOW_CONCURRENCY_ENV}\`), up to ${DEFAULT_MAX_AGENTS_PER_RUN} agents total (\`${MAX_WORKFLOW_AGENTS_ENV}\`), under a 30-minute wall-clock cap per run (\`QWEN_CODE_MAX_WORKFLOW_SECONDS\`) \u2014 a fan-out near the agent cap will not fit inside the default cap. Each subagent attempt is separately capped at ${DEFAULT_WORKFLOW_SUBAGENT_MAX_TURNS} turns (\`${WORKFLOW_SUBAGENT_MAX_TURNS_ENV}\`) and ${DEFAULT_WORKFLOW_SUBAGENT_MAX_TIME_MINUTES} minutes (\`${WORKFLOW_SUBAGENT_MAX_MINUTES_ENV}\`) \u2014 an attempt that hits either becomes \`null\` in \`parallel()\`/\`pipeline()\`, indistinguishable from a missing agent, so raise them for legitimately long work. A per-run output-token cap may also be in effect: read \`budget.total\` (\`null\` = uncapped) before committing to a large fan-out, because once the cap is reached every further \`agent()\` call is refused \u2014 a bare sequential \`await agent()\` sees the rejection, while inside \`parallel()\`/\`pipeline()\` the refused slot becomes \`null\` and the script keeps running on partial results. Per-call \`agent({ schema, agentType, model, isolation: 'worktree', workingDir, stallMs })\` covers structured-output contracts, declarative-agent selection, model override, git-worktree-isolated subagents, pinning an agent to a caller-owned worktree, and the no-progress stall watchdog (\`stallMs: 0\` disables it). \`resumeFromRunId\` resumes a prior run \u2014 agent() calls whose rolling prefix-hash matches the journal are served from cache for the longest unchanged prefix. Every run hands back its runId, the script's path on disk (an inline script is persisted, so a resume edits that file rather than re-sending the source) and its journal path; the journal holds one result line per completed agent, so read it before diagnosing an empty or surprising result. Runs appear in the background-tasks view and the \`/workflows\` dialog (live phase tree, token usage, cooperative pause/resume, cancel); \`run_in_background: true\` returns a run handle immediately in the interactive TUI and delivers completion through the conversation. Scripts run in a node:vm sandbox with no filesystem or shell access \u2014 all I/O happens through the spawned agents.
2806
+ \`phase(title)\`, \`log(msg)\`, \`agent(prompt, opts?)\`, \`parallel(thunks)\`, \`pipeline(items, ...stages)\`, \`workflow(nameOrRef, args?)\`, plus the \`args\` and \`budget\` globals. \`workflow()\` runs a saved workflow inline under this run's caps and nests one level only \u2014 a workflow reached through \`workflow()\` cannot call \`workflow()\` itself, and doing so throws. Saved workflows are \`<name>.js\` files under \`<projectRoot>/.qwen/workflows\` (project scope, also surfaced as \`/<name>\` slash commands) or \`~/.qwen/workflows\` (user scope, lower precedence when both define the same name); \`workflow('<name>')\` resolves against those two directories, while \`scriptPath\` takes an absolute path to a script inside either of them or inside the generated-scripts root (\`$QWEN_CODE_PROJECT_DIR/workflows/generated\` \u2014 the per-project runtime dir, not the project tree \u2014 where a tool emitting a one-run script writes it; never a slash command, never resolvable by name); a path outside those roots is refused. Default \`max(2, min(16, cpus-2))\` agents in flight per run (\`${MAX_WORKFLOW_CONCURRENCY_ENV}\`), up to ${DEFAULT_MAX_AGENTS_PER_RUN} agents total (\`${MAX_WORKFLOW_AGENTS_ENV}\`), under a 30-minute wall-clock cap per run (\`QWEN_CODE_MAX_WORKFLOW_SECONDS\`) \u2014 a fan-out near the agent cap will not fit inside the default cap. Each subagent attempt is separately capped at ${DEFAULT_WORKFLOW_SUBAGENT_MAX_TURNS} turns (\`${WORKFLOW_SUBAGENT_MAX_TURNS_ENV}\`) and ${DEFAULT_WORKFLOW_SUBAGENT_MAX_TIME_MINUTES} minutes (\`${WORKFLOW_SUBAGENT_MAX_MINUTES_ENV}\`) \u2014 raise them for legitimately long work. \`agent()\` resolves to \`null\` when that admitted agent fails on its own \u2014 including turn/time caps, model or setup errors, missing structured output, and exhausted stall retries \u2014 and it does so for a bare \`await agent()\` exactly as it does inside \`parallel()\`/\`pipeline()\`, so check for \`null\` wherever you read a result. Call-shape validation failures \u2014 such as an empty prompt, an unsupported option combination, or an invalid option value \u2014 reject a bare call; inside \`parallel()\`/\`pipeline()\`, the surrounding ordinary thunk or stage rejection becomes a position-aligned \`null\`. Run-level rejections no later call could survive \u2014 the token budget, the ${DEFAULT_MAX_AGENTS_PER_RUN}-agent cap, and cancellation \u2014 throw and end a \`parallel()\`/\`pipeline()\` batch. An admitted agent that fails and settles to \`null\` still counts as dispatched and is named, with its error, in the run's failures list; a \`null\` returned by an ordinary thunk or stage is not an agent dispatch. A per-run output-token cap may also be in effect: read \`budget.total\` (\`null\` = uncapped) before committing to a large fan-out, because once the cap is reached every further \`agent()\` call is refused. Per-call \`agent({ schema, agentType, model, isolation: 'worktree', workingDir, stallMs })\` covers structured-output contracts, declarative-agent selection, model override, git-worktree-isolated subagents, pinning an agent to a caller-owned worktree, and the no-progress stall watchdog (\`stallMs: 0\` disables it). \`resumeFromRunId\` resumes a prior run \u2014 agent() calls whose rolling prefix-hash matches the journal are served from cache for the longest unchanged prefix. Every run hands back its runId, the script's path on disk (an inline script is persisted, so a resume edits that file rather than re-sending the source) and its journal path; the journal holds one result line per completed agent, so read it before diagnosing an empty or surprising result. Runs appear in the background-tasks view and the \`/workflows\` dialog (live phase tree, token usage, cooperative pause/resume, cancel); \`run_in_background: true\` returns a run handle immediately in the interactive TUI and delivers completion through the conversation. Scripts run in a node:vm sandbox with no filesystem or shell access \u2014 all I/O happens through the spawned agents.
2671
2807
 
2672
2808
  **Scout first, then orchestrate**
2673
2809
 
@@ -2,54 +2,55 @@
2
2
  "use strict";
3
3
  import {
4
4
  createWorkspaceProvidersStatusProvider
5
- } from "./chunk-LBKYQ33T.js";
6
- import "./chunk-2OR32P5M.js";
7
- import "./chunk-7GZCCHJL.js";
5
+ } from "./chunk-WK7P62DV.js";
6
+ import "./chunk-ZN5TKAVR.js";
7
+ import "./chunk-7LTCFO6T.js";
8
8
  import "./chunk-6RZX2HIH.js";
9
9
  import "./chunk-FETY36NQ.js";
10
- import "./chunk-Q2F43WTJ.js";
11
- import "./chunk-MWEF5MUK.js";
10
+ import "./chunk-WBU2PIZ5.js";
11
+ import "./chunk-XSOXPG2L.js";
12
12
  import "./chunk-RKUWKYED.js";
13
13
  import "./chunk-BW4333PP.js";
14
14
  import "./chunk-IDS7MSUP.js";
15
15
  import "./chunk-CRZBDVP2.js";
16
16
  import "./chunk-5EJZE3FP.js";
17
- import "./chunk-Y6ZWXM44.js";
17
+ import "./chunk-5BH2AIEY.js";
18
18
  import "./chunk-QTNCGZHQ.js";
19
- import "./chunk-7RXOEUFF.js";
19
+ import "./chunk-NX7ZTXFF.js";
20
20
  import "./chunk-NPQ5ZKRP.js";
21
21
  import "./chunk-MR3PXB6E.js";
22
- import "./chunk-BL6B2QS2.js";
22
+ import "./chunk-GOEVQADN.js";
23
23
  import "./chunk-GELRJXE2.js";
24
24
  import "./chunk-32CM56LO.js";
25
- import "./chunk-G5QLLD53.js";
25
+ import "./chunk-OXR34GCD.js";
26
26
  import "./chunk-2EKVPSIJ.js";
27
27
  import "./chunk-LJZSMWOH.js";
28
28
  import "./chunk-YZTGGCEE.js";
29
- import "./chunk-DCPRCDSR.js";
29
+ import "./chunk-2WC3Y7YY.js";
30
+ import "./chunk-IWABUX6T.js";
30
31
  import "./chunk-DJXSOEFB.js";
31
- import "./chunk-LN3WBOKU.js";
32
+ import "./chunk-YQGW3M6Z.js";
32
33
  import "./chunk-J3VZF2AL.js";
33
34
  import "./chunk-OWCFKIFQ.js";
34
35
  import "./chunk-ZPJWUGCS.js";
35
- import "./chunk-5Z4FCEPY.js";
36
+ import "./chunk-X7LFJF5D.js";
36
37
  import "./chunk-BUQN5LTI.js";
37
38
  import "./chunk-XDNFODER.js";
38
- import "./chunk-XI7RST4D.js";
39
+ import "./chunk-GOKAOSCN.js";
39
40
  import "./chunk-VNOVK4I7.js";
40
- import "./chunk-43CI6YWJ.js";
41
+ import "./chunk-HJ5UJQQL.js";
41
42
  import "./chunk-GOFAQQZA.js";
42
43
  import "./chunk-65I7S4Z3.js";
43
44
  import "./chunk-6HUXPLB5.js";
44
45
  import "./chunk-TWPJO254.js";
45
46
  import "./chunk-CQ35AJ4Z.js";
46
- import "./chunk-YHDGABDC.js";
47
+ import "./chunk-XKBFYTCD.js";
47
48
  import "./chunk-LYT2OU7D.js";
48
- import "./chunk-B54PFQS5.js";
49
+ import "./chunk-7CLLH5TI.js";
49
50
  import "./chunk-HIXUUCGY.js";
50
51
  import "./chunk-6PVPNMXU.js";
51
52
  import "./chunk-565U2ANU.js";
52
- import "./chunk-FDOGGKAA.js";
53
+ import "./chunk-GSFV5RQW.js";
53
54
  import "./chunk-IRH27ZC2.js";
54
55
  import "./chunk-QHWCP53L.js";
55
56
  import "./chunk-F53KKZUD.js";
@@ -59,8 +60,8 @@ import "./chunk-N6S3NUYJ.js";
59
60
  import "./chunk-O6GEWCJA.js";
60
61
  import "./chunk-CHEIIBT3.js";
61
62
  import "./chunk-QAZ2MGYT.js";
62
- import "./chunk-B44JBZBB.js";
63
- import "./chunk-BF3RUIVP.js";
63
+ import "./chunk-QQK4L3UU.js";
64
+ import "./chunk-CH2YDT6X.js";
64
65
  import "./chunk-JX6XHPTX.js";
65
66
  import "./chunk-CLKE4IY3.js";
66
67
  import "./chunk-ZSTCM3MX.js";
@@ -69,7 +70,7 @@ import "./chunk-MLXTMF7H.js";
69
70
  import "./chunk-3LPJ776W.js";
70
71
  import "./chunk-3CZ2BQV6.js";
71
72
  import "./chunk-PQEISIKS.js";
72
- import "./chunk-VF6D6EGV.js";
73
+ import "./chunk-S5QR6CB5.js";
73
74
  import "./chunk-H3Q3RSKZ.js";
74
75
  import "./chunk-S6LOFUVP.js";
75
76
  import "./chunk-NAVJD2PQ.js";
@@ -77,13 +78,13 @@ import "./chunk-OFVAS4AR.js";
77
78
  import "./chunk-HNLMYDQE.js";
78
79
  import "./chunk-QHMLYMMS.js";
79
80
  import "./chunk-CFKIH3D3.js";
80
- import "./chunk-6YEOCHSE.js";
81
+ import "./chunk-VBLAI2HA.js";
81
82
  import "./chunk-DJ2GSRLV.js";
82
83
  import "./chunk-4ALNJDHL.js";
83
84
  import "./chunk-NOO4QFXM.js";
84
85
  import "./chunk-KFFCDLKV.js";
85
86
  import "./chunk-7OCIQNKX.js";
86
- import "./chunk-OIPUQE3S.js";
87
+ import "./chunk-F2NYVASI.js";
87
88
  import "./chunk-5ETULJLP.js";
88
89
  import "./chunk-XBVNNDPK.js";
89
90
  import "./chunk-VGC4I5JJ.js";
@@ -93,7 +94,7 @@ import "./chunk-HD7O6WLV.js";
93
94
  import "./chunk-WZAD4ZNJ.js";
94
95
  import "./chunk-FPGTNKCP.js";
95
96
  import "./chunk-TIGXX4PA.js";
96
- import "./chunk-DTB5BXRG.js";
97
+ import "./chunk-JO77FGNZ.js";
97
98
  import "./chunk-XFFRI3WM.js";
98
99
  import "./chunk-4HOEU2OR.js";
99
100
  import "./chunk-HHJLM3WQ.js";