@qwen-code/qwen-code 0.22.0 → 0.22.2-nightly.20260828.7357136dd1

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 (483) hide show
  1. package/bundled/computer-use/SKILL.md +229 -0
  2. package/bundled/computer-use/agents/openai.yaml +4 -0
  3. package/bundled/coordinate/SKILL.md +5 -5
  4. package/bundled/goal-draft/SKILL.md +109 -0
  5. package/bundled/qc-helper/docs/configuration/auth.md +7 -7
  6. package/bundled/qc-helper/docs/configuration/model-providers.md +70 -9
  7. package/bundled/qc-helper/docs/configuration/settings.md +48 -48
  8. package/bundled/qc-helper/docs/extension/introduction.md +3 -1
  9. package/bundled/qc-helper/docs/features/_meta.ts +1 -0
  10. package/bundled/qc-helper/docs/features/channels/_meta.ts +1 -0
  11. package/bundled/qc-helper/docs/features/channels/dingtalk.md +12 -0
  12. package/bundled/qc-helper/docs/features/channels/dws.md +120 -0
  13. package/bundled/qc-helper/docs/features/channels/overview.md +37 -6
  14. package/bundled/qc-helper/docs/features/code-review.md +27 -23
  15. package/bundled/qc-helper/docs/features/commands.md +4 -3
  16. package/bundled/qc-helper/docs/features/computer-use.md +57 -51
  17. package/bundled/qc-helper/docs/features/goals.md +58 -0
  18. package/bundled/qc-helper/docs/features/headless.md +13 -11
  19. package/bundled/qc-helper/docs/features/mcp.md +35 -12
  20. package/bundled/qc-helper/docs/features/status-line.md +3 -3
  21. package/bundled/qc-helper/docs/features/sub-agents.md +1 -1
  22. package/bundled/qc-helper/docs/features/worktree.md +1 -1
  23. package/bundled/qc-helper/docs/overview.md +1 -1
  24. package/bundled/qc-helper/docs/quickstart.md +1 -1
  25. package/bundled/qc-helper/docs/qwen-serve.md +29 -6
  26. package/bundled/review/SKILL.md +185 -435
  27. package/bundled/review/references/aone.md +18 -0
  28. package/bundled/review/references/persistence.md +109 -0
  29. package/bundled/review/references/posting.md +272 -0
  30. package/chunks/MaxSizedBox-LMWXCLDV.js +110 -0
  31. package/chunks/{StandaloneSessionPicker-KTHPCSR6.js → StandaloneSessionPicker-W3F7U3JL.js} +87 -88
  32. package/chunks/{acp-startup-profiler-T4GEAPLX.js → acp-startup-profiler-GNYAL6LI.js} +2 -2
  33. package/chunks/{acpAgent-CRY3JZ5O.js → acpAgent-EYZ6EEHD.js} +3223 -2145
  34. package/chunks/agent-RBLGBY65.js +95 -0
  35. package/chunks/agent-headless-L5T4Y4OZ.js +85 -0
  36. package/chunks/{anthropicContentGenerator-Y2OX6LS4.js → anthropicContentGenerator-GMHML35Q.js} +128 -59
  37. package/chunks/{artifact-tool-SBXMTVCB.js → artifact-tool-XSMPHZBT.js} +11 -3
  38. package/chunks/{askUserQuestion-KEQJRFD6.js → askUserQuestion-4SWJY65V.js} +2 -2
  39. package/chunks/bridge-5LR2F2ND.js +119 -0
  40. package/chunks/{ca-D3F4S6NG.js → ca-7HPYOYSZ.js} +3 -0
  41. package/chunks/{channel-management-service-IRTT7RNE.js → channel-management-service-KHR3N6CH.js} +6 -6
  42. package/chunks/channel-settings-store-4FOAZW72.js +120 -0
  43. package/chunks/{channel-worker-group-BJNMR2MP.js → channel-worker-group-6NA6BBZV.js} +9 -7
  44. package/chunks/{channel-worker-manager-EMA7CQDJ.js → channel-worker-manager-NEZ2J6RK.js} +11 -8
  45. package/chunks/{channel-worker-supervisor-F6I6WSWW.js → channel-worker-supervisor-FKU7DIHJ.js} +12 -6
  46. package/chunks/{chunk-HDKCKCYO.js → chunk-23RFD54N.js} +1 -1
  47. package/chunks/{read-package-up-UXSW3YPB.js → chunk-2EAZ43JQ.js} +1 -0
  48. package/chunks/{chunk-KM73TBQ4.js → chunk-2LD5U7Q3.js} +31 -0
  49. package/chunks/{chunk-GIWB5QLV.js → chunk-2SXSLSQE.js} +4 -4
  50. package/chunks/chunk-2TNL5KPM.js +49 -0
  51. package/chunks/chunk-335CJSNF.js +2320 -0
  52. package/chunks/chunk-36LGBEM6.js +130 -0
  53. package/chunks/{chunk-O5BDEWBC.js → chunk-3JXM2CVW.js} +3 -3
  54. package/chunks/{chunk-2E3V7G6Y.js → chunk-3K6TUZHS.js} +55 -50
  55. package/chunks/{chunk-WWUSHZ7M.js → chunk-3OOXT6CR.js} +5 -5
  56. package/chunks/{chunk-2UZJWSVD.js → chunk-3WK3QDNV.js} +2 -2
  57. package/chunks/{chunk-4J7OPYNS.js → chunk-3XOKEVII.js} +6 -6
  58. package/chunks/chunk-3Y34Q3JV.js +1584 -0
  59. package/chunks/{chunk-YMVFIYHV.js → chunk-42IDLQWS.js} +26 -20
  60. package/chunks/{chunk-7HFULI45.js → chunk-454XFGH4.js} +3 -3
  61. package/chunks/chunk-4CMJKUND.js +95 -0
  62. package/chunks/{chunk-XLDFW44M.js → chunk-4K7KNVWH.js} +3 -3
  63. package/chunks/{chunk-YDJRMQU4.js → chunk-4QHPPXK2.js} +16 -8
  64. package/chunks/{chunk-7KOFLDEP.js → chunk-5JTIYALA.js} +1 -1
  65. package/chunks/{chunk-CXJHQVEK.js → chunk-5PA6UEYA.js} +4 -0
  66. package/chunks/{chunk-7NBVNAJJ.js → chunk-62GQFYID.js} +3 -3
  67. package/chunks/{chunk-JGUBDRBC.js → chunk-6DIGWMGT.js} +3 -3
  68. package/chunks/{chunk-X7V3N6YH.js → chunk-6JCGO55P.js} +885 -3380
  69. package/chunks/{chunk-HIK2OF33.js → chunk-6PJOTWAN.js} +1 -1
  70. package/chunks/{chunk-VUMLT7E5.js → chunk-6W2IK5KC.js} +956 -17
  71. package/chunks/{chunk-S4C4JJKE.js → chunk-6ZZBRRKQ.js} +5 -5
  72. package/chunks/{chunk-W4CRPSC5.js → chunk-7EQQR46F.js} +1 -1
  73. package/chunks/{chunk-PHJJ3RVO.js → chunk-7GWQW5ID.js} +7 -15
  74. package/chunks/chunk-7J6OTNGO.js +424 -0
  75. package/chunks/{chunk-URN2JIAQ.js → chunk-7TUBJBBJ.js} +5 -1
  76. package/chunks/{chunk-A5F63FEW.js → chunk-7VD6IPQM.js} +1 -1
  77. package/chunks/{chunk-36OF5PRW.js → chunk-ABS25QER.js} +7 -3
  78. package/chunks/{chunk-UU4WC7DK.js → chunk-AJGR6E6Z.js} +117 -30
  79. package/chunks/{chunk-MQP3MHWN.js → chunk-AU3MMVJF.js} +43 -20
  80. package/chunks/{chunk-ZS5BHEPD.js → chunk-AXC26UCQ.js} +1 -1
  81. package/chunks/{chunk-PDL6LKB5.js → chunk-AY3BNYEQ.js} +1 -1
  82. package/chunks/{chunk-O5Z7EB6Y.js → chunk-AYHQZBJ4.js} +170 -207
  83. package/chunks/{chunk-WRT324N6.js → chunk-B466ZSHZ.js} +3 -3
  84. package/chunks/{chunk-5XHAOUWD.js → chunk-B5OUL5EL.js} +3 -3
  85. package/chunks/{chunk-GAHYKJPV.js → chunk-B5PHIJGI.js} +186 -60
  86. package/chunks/{chunk-IBJ5S45N.js → chunk-B7CDU2SL.js} +2 -2
  87. package/chunks/{chunk-UZPYR3EV.js → chunk-BFPESSTR.js} +1 -1
  88. package/chunks/{chunk-43T5WDQ7.js → chunk-BFSFJR3D.js} +1 -1
  89. package/chunks/{chunk-IWOWEENB.js → chunk-BKWNKLZB.js} +404 -44
  90. package/chunks/{chunk-3CLIDIVQ.js → chunk-BOWFGCEU.js} +3 -3
  91. package/chunks/{chunk-BB5IMQCV.js → chunk-BPAKYXQ3.js} +2 -2
  92. package/chunks/{chunk-ZRYQMWEP.js → chunk-BWORX6FA.js} +2 -2
  93. package/chunks/{chunk-AP3B7LKD.js → chunk-BXDAPVQU.js} +2 -2
  94. package/chunks/{chunk-NUGZAFR2.js → chunk-C2X7KY45.js} +147 -6
  95. package/chunks/{chunk-MZKWFWVG.js → chunk-C3KURPP7.js} +6 -6
  96. package/chunks/{chunk-WZDM44SB.js → chunk-CAJTKR6W.js} +7 -7
  97. package/chunks/{chunk-DB2OKNTU.js → chunk-CFJY4DGX.js} +2 -2
  98. package/chunks/{chunk-QKBYFU2Q.js → chunk-CFKIH3D3.js} +21 -1
  99. package/chunks/{chunk-I432KXWD.js → chunk-CMHFCLBU.js} +1 -1
  100. package/chunks/{create-sub-session-XBCVGNFU.js → chunk-CQH5KTKC.js} +4 -6
  101. package/chunks/{chunk-5HJUPACR.js → chunk-CRKKHXTI.js} +185 -174
  102. package/chunks/{chunk-L4HVF7LM.js → chunk-CYAUBK46.js} +3 -3
  103. package/chunks/{chunk-AZF6SME3.js → chunk-D5LUXLUH.js} +3 -3
  104. package/chunks/{chunk-RPJQ3O4M.js → chunk-DFDWJE6Z.js} +60 -53
  105. package/chunks/{chunk-KSPRQSB4.js → chunk-DIMEPKCW.js} +52 -12
  106. package/chunks/chunk-DJBQCO2E.js +842 -0
  107. package/chunks/{chunk-OVH5Y7KS.js → chunk-DP4MWIM3.js} +19 -3
  108. package/chunks/{chunk-LI4YHTQK.js → chunk-DYXFD5RO.js} +182 -3
  109. package/chunks/{chunk-NW35NVFN.js → chunk-E3XVSVKK.js} +26 -4
  110. package/chunks/{chunk-VSNPOSDN.js → chunk-EB6QRGHM.js} +108 -13
  111. package/chunks/{chunk-FVBVJEBG.js → chunk-EKNBU2X7.js} +10 -8
  112. package/chunks/{chunk-DJEHYM4H.js → chunk-EKSCLBBF.js} +3 -3
  113. package/chunks/{chunk-624NHDGB.js → chunk-ERFDKH32.js} +11 -0
  114. package/chunks/chunk-EW5VVLJT.js +3525 -0
  115. package/chunks/{chunk-T6XLJRQY.js → chunk-EWIQ3NAE.js} +38774 -6955
  116. package/chunks/{chunk-4XPSVIED.js → chunk-FALBWZF4.js} +6 -6
  117. package/chunks/chunk-FBX2SDQ4.js +48 -0
  118. package/chunks/{chunk-VMJL7RH6.js → chunk-FEHMA4RO.js} +539 -651
  119. package/chunks/{chunk-PXOJLJ5W.js → chunk-FMFBLTLY.js} +606 -223
  120. package/chunks/{chunk-ZLCT4C5A.js → chunk-FTF2YIZ5.js} +1 -1
  121. package/chunks/{chunk-IOSEW6KP.js → chunk-G6FECKTJ.js} +9 -6
  122. package/chunks/{chunk-RDG44S5I.js → chunk-GGNE3JAW.js} +2 -2
  123. package/chunks/chunk-GYTKQYDB.js +23 -0
  124. package/chunks/{chunk-B6UBOIFE.js → chunk-H33EQVMG.js} +14 -11
  125. package/chunks/chunk-H72BQNM3.js +645 -0
  126. package/chunks/{chunk-YZBDKFRQ.js → chunk-HGIMWQVT.js} +995 -892
  127. package/chunks/chunk-HOCJDUFY.js +20 -0
  128. package/chunks/{chunk-6UQSU7CQ.js → chunk-HPXV655A.js} +60 -107
  129. package/chunks/{chunk-45NQKMYB.js → chunk-HVC3PNVC.js} +1 -1
  130. package/chunks/{chunk-QJHPWLZC.js → chunk-HYDJDQGJ.js} +1 -1
  131. package/chunks/{chunk-7DMTAQJ6.js → chunk-IB7FQJRY.js} +163 -57
  132. package/chunks/{chunk-AW27A43Y.js → chunk-ICURCKIU.js} +1428 -120
  133. package/chunks/{chunk-4F5WV4RF.js → chunk-ISKH4QX3.js} +288 -15
  134. package/chunks/{chunk-SE55HQGF.js → chunk-J6S24ZJE.js} +92 -70
  135. package/chunks/{chunk-7DYNJFES.js → chunk-JB4JIVTJ.js} +6 -1
  136. package/chunks/{chunk-OARZJFZX.js → chunk-JN4IWWMN.js} +4 -4
  137. package/chunks/{chunk-6PCOVQO2.js → chunk-JUUBLSZU.js} +8 -8
  138. package/chunks/{chunk-FEMQ6Y7W.js → chunk-JWALNCLT.js} +47 -126
  139. package/chunks/{chunk-TBVSALA3.js → chunk-K5KXUXWC.js} +3 -3
  140. package/chunks/{chunk-XYQHT3AW.js → chunk-KTJFDCX4.js} +2 -2
  141. package/chunks/{chunk-6FRJEE2S.js → chunk-LEFCFTEX.js} +6 -6
  142. package/chunks/{chunk-BUGYW6FB.js → chunk-LEGTMYAE.js} +1 -1
  143. package/chunks/{chunk-MPHLIJYL.js → chunk-LLZA2IK3.js} +20 -8
  144. package/chunks/{chunk-BEGIBJAZ.js → chunk-LNETQKBE.js} +4 -4
  145. package/chunks/{chunk-KVGR4MCF.js → chunk-LUEHOUHM.js} +3 -3
  146. package/chunks/{chunk-2A4C2MEG.js → chunk-LVPZO674.js} +35 -12
  147. package/chunks/{chunk-25NESM4G.js → chunk-M4ORUPYI.js} +29 -5
  148. package/chunks/{chunk-VFACN2CE.js → chunk-M6FOJXW3.js} +1 -1
  149. package/chunks/{chunk-FYZMB6DB.js → chunk-MAYHGRP4.js} +12 -12
  150. package/chunks/{chunk-K3LPAED5.js → chunk-MQM5PJML.js} +24 -4
  151. package/chunks/{chunk-ZRFUT5VV.js → chunk-MTJN7FOT.js} +7 -7
  152. package/chunks/{chunk-BGXZBI5B.js → chunk-N4X7G4J2.js} +2 -1
  153. package/chunks/{chunk-2TRNCJK4.js → chunk-NIFYWDYN.js} +1 -1
  154. package/chunks/{chunk-SQS55KR4.js → chunk-NU7RKEZR.js} +2 -2
  155. package/chunks/{chunk-U2UYQMM6.js → chunk-NXMBRVMQ.js} +3 -3
  156. package/chunks/chunk-OI4NY7RA.js +346 -0
  157. package/chunks/{chunk-LURJYO2T.js → chunk-OZ6KS6KW.js} +4 -0
  158. package/chunks/{chunk-K52PZNU4.js → chunk-PDQGMSZK.js} +2 -2
  159. package/chunks/{chunk-PZRUV52H.js → chunk-PPKZ7JOE.js} +20 -2
  160. package/chunks/{chunk-SAH4BD2J.js → chunk-PQEISIKS.js} +67 -0
  161. package/chunks/{chunk-AO4M6NMD.js → chunk-PWIGAMA4.js} +146 -27
  162. package/chunks/{chunk-S3G6YFQC.js → chunk-QFCDF5PL.js} +1 -1
  163. package/chunks/chunk-QHMLYMMS.js +32 -0
  164. package/chunks/{chunk-5XUTPXQU.js → chunk-QPTRRPZU.js} +47 -13
  165. package/chunks/{chunk-UUQFJILB.js → chunk-RFI4YGMR.js} +34 -267
  166. package/chunks/{chunk-A6NRNRKE.js → chunk-RFIDDFAL.js} +1 -1
  167. package/chunks/chunk-RKFGE7JH.js +93 -0
  168. package/chunks/chunk-RNVFRIOO.js +275 -0
  169. package/chunks/{chunk-WU5E4HMO.js → chunk-RU7BK6B3.js} +1 -1
  170. package/chunks/{chunk-J5ZDDUKM.js → chunk-RVXDXY6I.js} +4 -4
  171. package/chunks/{chunk-OE52YHCZ.js → chunk-RWZB422L.js} +11 -11
  172. package/chunks/chunk-RXFQM6FQ.js +42 -0
  173. package/chunks/{chunk-MHG6NDS6.js → chunk-RYNZQGXN.js} +19 -2
  174. package/chunks/{chunk-4CWDWDL6.js → chunk-SJ5ERAW3.js} +1 -1
  175. package/chunks/{chunk-Q54XG7IX.js → chunk-SMPR7SPO.js} +1 -1
  176. package/chunks/{chunk-UIRLQ3N7.js → chunk-SRZZY4IY.js} +3 -3
  177. package/chunks/{chunk-ND7NOI4P.js → chunk-STUJ7IMZ.js} +0 -92
  178. package/chunks/{chunk-VYC7XFYV.js → chunk-SUX7HDNA.js} +5 -5
  179. package/chunks/{chunk-ZZUVC6RI.js → chunk-SVNO44PF.js} +3 -3
  180. package/chunks/{chunk-FDD2IUEL.js → chunk-SZLBBZH4.js} +370 -35
  181. package/chunks/{chunk-GHY5OIYP.js → chunk-T2NKRHZZ.js} +13 -13
  182. package/chunks/chunk-T4EFG2P5.js +113 -0
  183. package/chunks/{chunk-BMCSKS37.js → chunk-TLHUNMO7.js} +6 -6
  184. package/chunks/{chunk-JOLJTKIG.js → chunk-TPI7O7HR.js} +1 -1
  185. package/chunks/{chunk-6QSA4JHL.js → chunk-TQHGJYR3.js} +4492 -1121
  186. package/chunks/{chunk-ISJMN3ML.js → chunk-TTX2JUE6.js} +1 -1
  187. package/chunks/{chunk-EFB657PR.js → chunk-TW3E6YNO.js} +3 -3
  188. package/chunks/{chunk-LD5VIJ7S.js → chunk-TWSKM647.js} +1 -1
  189. package/chunks/chunk-U54AYGEC.js +337 -0
  190. package/chunks/{chunk-A5F2YNO6.js → chunk-UHQFIS7N.js} +260 -10
  191. package/chunks/{chunk-6NFAEG54.js → chunk-UTLCH2FK.js} +24 -13
  192. package/chunks/{chunk-7JBHIQS2.js → chunk-UY3PBNY3.js} +19 -37
  193. package/chunks/{chunk-DWCKACFL.js → chunk-V2NDP3I4.js} +2 -2
  194. package/chunks/{chunk-2GXYDNXP.js → chunk-V2QDDC5J.js} +19 -9
  195. package/chunks/{chunk-VLRBJ24J.js → chunk-V5J4J5TP.js} +2 -2
  196. package/chunks/{chunk-X2UOOG5V.js → chunk-VQUGEVGR.js} +1 -1
  197. package/chunks/{chunk-RDQ7QB4Y.js → chunk-VTHREBQM.js} +2 -2
  198. package/chunks/{chunk-YLFLHKDL.js → chunk-W3N5XAZ6.js} +1 -1
  199. package/chunks/{chunk-62JOGZL5.js → chunk-W6DUQ5GA.js} +11497 -10502
  200. package/chunks/{chunk-P47E4SJC.js → chunk-WALC5VJH.js} +4 -4
  201. package/chunks/{chunk-3ZFJUBTP.js → chunk-WAOIHTJS.js} +1 -1
  202. package/chunks/{chunk-KIVGVFMM.js → chunk-WBHKK3CU.js} +16 -4
  203. package/chunks/{chunk-XZJKSETB.js → chunk-WXEA74YB.js} +3 -3
  204. package/chunks/{chunk-VEND4KA4.js → chunk-X3ZRTCJD.js} +1 -1
  205. package/chunks/{chunk-YRLW2MSX.js → chunk-XBVNNDPK.js} +11 -4
  206. package/chunks/{chunk-XL5K4SVK.js → chunk-XF63PKEN.js} +1 -1
  207. package/chunks/{chunk-LDGWX737.js → chunk-XLLQJRAH.js} +323 -510
  208. package/chunks/{chunk-2Z6LSQMF.js → chunk-XQFT3QUF.js} +1 -1
  209. package/chunks/{chunk-P3QQPMQA.js → chunk-XZA32HII.js} +4 -4
  210. package/chunks/{chunk-C72BXMJ5.js → chunk-Y3QL45LS.js} +1 -1
  211. package/chunks/{chunk-QS4ENGVF.js → chunk-Y4TPOUEV.js} +17 -8
  212. package/chunks/{chunk-AVCCKIZ6.js → chunk-YRZX2PHA.js} +1 -1
  213. package/chunks/{chunk-Z3JMO2CH.js → chunk-YTDVNSUQ.js} +1 -1
  214. package/chunks/{chunk-WS7PAXXR.js → chunk-YWQ237GX.js} +15 -199
  215. package/chunks/chunk-ZELCTN6Y.js +29 -0
  216. package/chunks/{chunk-TQOF5KBL.js → chunk-ZEZKIS2K.js} +0 -31
  217. package/chunks/{chunk-IIWGSX4L.js → chunk-ZTP35P4B.js} +1 -1
  218. package/chunks/{chunk-K623ENWT.js → chunk-ZU4UDIWX.js} +23 -1
  219. package/chunks/chunk-ZYNTSXWK.js +32 -0
  220. package/chunks/config-utils-JVGAP34H.js +113 -0
  221. package/chunks/contextCommand-XDB7OSO7.js +106 -0
  222. package/chunks/{core-runtime-CES6JSVV.js → core-runtime-XHYA2RH7.js} +66 -63
  223. package/chunks/create-sub-session-23ITIELI.js +17 -0
  224. package/chunks/{create-sub-session-UJTPMVOG.js → create-sub-session-MHYCFNCM.js} +168 -87
  225. package/chunks/{cron-create-IKA56DAF.js → cron-create-KJ4IY6PP.js} +57 -10
  226. package/chunks/{cron-delete-K5Q62EGH.js → cron-delete-MBLQCAYY.js} +4 -4
  227. package/chunks/{cron-list-QBFGAMP7.js → cron-list-DWH2PQ47.js} +4 -4
  228. package/chunks/{daemon-RZZUPGOJ.js → daemon-K5XS42ID.js} +567 -27
  229. package/chunks/{daemon-git-worktree-guard-3QY2BQYB.js → daemon-git-worktree-guard-V3P5XLHB.js} +339 -95
  230. package/chunks/daemon-status-provider-KKU7ZTLM.js +117 -0
  231. package/chunks/daemon-trust-policy-TZGK34DW.js +112 -0
  232. package/chunks/{daemon-trust-policy-monitor-TK4K7M63.js → daemon-trust-policy-monitor-F23DD2M4.js} +69 -69
  233. package/chunks/{de-RYUHH2C6.js → de-X6HLSIFE.js} +1 -0
  234. package/chunks/deferred-core-runtime-LKLGBCGZ.js +114 -0
  235. package/chunks/{display-image-OEJMJV3S.js → display-image-BE7I6ZB6.js} +5 -5
  236. package/chunks/{dist-5EV2G6MC.js → dist-4WXLCBDR.js} +1 -1
  237. package/chunks/{dist-ES6HNUW2.js → dist-5VXFRTWU.js} +525 -64
  238. package/chunks/{dist-ESS34DHC.js → dist-6BPYWHVD.js} +89 -65
  239. package/chunks/{dist-2OG3PGKO.js → dist-GFN5DCBX.js} +76 -67
  240. package/chunks/{dist-K7IQB53U.js → dist-HZNT6GQS.js} +1 -1
  241. package/chunks/{dist-J6P3C52Z.js → dist-LVZCXVPF.js} +99 -26
  242. package/chunks/{dist-LZO24N3E.js → dist-N6W6E753.js} +71 -64
  243. package/chunks/dist-QDLFKWOL.js +2512 -0
  244. package/chunks/{dist-VVQBOKDH.js → dist-SWQMYP2Q.js} +18 -16
  245. package/chunks/earlyInputCapture-NERYFYTR.js +107 -0
  246. package/chunks/{edit-A2633SLR.js → edit-ACCATIXB.js} +49 -51
  247. package/chunks/{en-3RHLPITS.js → en-YLXBXM4Z.js} +5 -1
  248. package/chunks/{enter-worktree-OIAHE2TB.js → enter-worktree-35QCAAFP.js} +7 -8
  249. package/chunks/{enterPlanMode-SUGIKLR7.js → enterPlanMode-NEN6EPVM.js} +48 -50
  250. package/chunks/environment-CKWHBC5T.js +129 -0
  251. package/chunks/errors-XTZPNQ77.js +113 -0
  252. package/chunks/{exit-worktree-3UT3SSWT.js → exit-worktree-XQD6D543.js} +7 -8
  253. package/chunks/exitPlanMode-CY344X5J.js +83 -0
  254. package/chunks/{fast-path-3AVP3G35.js → fast-path-YSOX4PAM.js} +31 -10
  255. package/chunks/{fast-path-settings-WHX3J3ZI.js → fast-path-settings-XMFBYFUH.js} +2 -2
  256. package/chunks/{fr-4PL5GHG4.js → fr-FTZWF462.js} +1 -0
  257. package/chunks/{gemini-7PVQWHTH.js → gemini-VQY2YCPH.js} +137 -129
  258. package/chunks/{geminiContentGenerator-B2FOJJDJ.js → geminiContentGenerator-PAPXNIGU.js} +16 -13
  259. package/chunks/{glob-7YGXE6OV.js → glob-GVCUSBBF.js} +48 -50
  260. package/chunks/{goal-tools-TLJCE7YZ.js → goal-tools-5STK6OXW.js} +77 -31
  261. package/chunks/{grep-6DV6LTON.js → grep-5GPICQBU.js} +6 -6
  262. package/chunks/handleAutoUpdate-ZJPJN42W.js +109 -0
  263. package/chunks/i18n-BZYKOST7.js +124 -0
  264. package/chunks/{image-gen-7CSCJ73T.js → image-gen-J6FDGUZP.js} +8 -12
  265. package/chunks/initializer-GO2C5HE3.js +113 -0
  266. package/chunks/installationInfo-WM2GXQZ6.js +107 -0
  267. package/chunks/{ja-HZ7X7PQO.js → ja-2GL5FKYJ.js} +1 -0
  268. package/chunks/{keychain-token-storage-MTFTAESK.js → keychain-token-storage-37XPR34V.js} +2 -2
  269. package/chunks/list-ERDJB7PQ.js +116 -0
  270. package/chunks/{list-agents-43XUEXJV.js → list-agents-DI3YFTDT.js} +2 -2
  271. package/chunks/loadedSettingsAdapter-7JOCVOKV.js +110 -0
  272. package/chunks/{loggingContentGenerator-RNE66CKK.js → loggingContentGenerator-3ONLU3BS.js} +327 -39
  273. package/chunks/{loop-wakeup-E54KDUXC.js → loop-wakeup-XJFONSQ7.js} +5 -5
  274. package/chunks/{ls-CGL2UC3H.js → ls-3VAT2J7A.js} +4 -4
  275. package/chunks/{lsp-5IKUO5DX.js → lsp-5W7IRUBH.js} +2 -2
  276. package/chunks/{managed-npm-update-Y3SC3GLJ.js → managed-npm-update-TLRCC2GE.js} +62 -62
  277. package/chunks/mcp-2LH3QXR2.js +110 -0
  278. package/chunks/{monitor-PXYSGSUN.js → monitor-P7LDAL4W.js} +48 -50
  279. package/chunks/nonInteractiveCli-E5T7PZ27.js +184 -0
  280. package/chunks/{notebook-edit-ISIBJVBR.js → notebook-edit-F7KSG4WQ.js} +49 -51
  281. package/chunks/open-with-auth-4UI3KHUR.js +55 -0
  282. package/chunks/{openaiContentGenerator-6TBOPEGT.js → openaiContentGenerator-2EXCZUGN.js} +29 -32
  283. package/chunks/pidfile-P25DWA5Q.js +111 -0
  284. package/chunks/process-registry-OAEG6WGC.js +662 -0
  285. package/chunks/{processUtils-YK2TDTTU.js → processUtils-PVDKBL35.js} +2 -2
  286. package/chunks/prompt-terminal-ledger-AJ7T7OIV.js +105 -0
  287. package/chunks/{pt-QT5N2Q6Q.js → pt-XN2YWJVM.js} +1 -0
  288. package/chunks/{qwenContentGenerator-CLDMA2Y4.js → qwenContentGenerator-TBBRLWIT.js} +54 -62
  289. package/chunks/{qwenOAuth2-DLDR6UC5.js → qwenOAuth2-OF5WRBQT.js} +7 -11
  290. package/chunks/read-file-6IIY4RLJ.js +32 -0
  291. package/chunks/{read-mcp-resource-XYES2B42.js → read-mcp-resource-XD257PGJ.js} +2 -2
  292. package/chunks/read-package-up-6T6ICKR7.js +13 -0
  293. package/chunks/{record-artifact-W3IBTGL7.js → record-artifact-VW23GS4F.js} +4 -5
  294. package/chunks/report-findings-XA3FJG3N.js +33 -0
  295. package/chunks/request-shutdown-BCLA3JV2.js +133 -0
  296. package/chunks/resumeHistoryUtils-44IETXDY.js +118 -0
  297. package/chunks/ripGrep-E7ESZ7SS.js +39 -0
  298. package/chunks/{ru-STMG5BPD.js → ru-OLTMFJEW.js} +1 -0
  299. package/chunks/{run-qwen-serve-XJHOW2NY.js → run-qwen-serve-DXBCYW7V.js} +924 -356
  300. package/chunks/runtime-RUSPD35D.js +148 -0
  301. package/chunks/scheduled-tasks-DVRJZO6I.js +127 -0
  302. package/chunks/scheduler-TDRB2NSY.js +122 -0
  303. package/chunks/{sdk-exporters-http-RSIOP3G2.js → sdk-exporters-http-TTU2CHBU.js} +5 -5
  304. package/chunks/{sdk-impl-CB3KARSK.js → sdk-impl-UUMVYMAL.js} +12 -6
  305. package/chunks/{send-message-J4VT46OI.js → send-message-AJ4OCUBV.js} +24 -29
  306. package/chunks/serve-KITOM7OR.js +118 -0
  307. package/chunks/{server-74ONDK62.js → server-THCOMUC2.js} +5814 -4549
  308. package/chunks/{session-BO6VBWJP.js → session-XKR5MPXE.js} +152 -142
  309. package/chunks/session-pr-refresh-KRBH7KDA.js +278 -0
  310. package/chunks/{settings-35QZNFDG.js → settings-YXZ4XBKK.js} +72 -72
  311. package/chunks/shell-5FJ2DZ3W.js +93 -0
  312. package/chunks/{skill-DKEMQSNJ.js → skill-VMMJZ6CJ.js} +161 -33
  313. package/chunks/skill-settings-7SG4YA2W.js +118 -0
  314. package/chunks/spawnChannel-BPMIXRBI.js +112 -0
  315. package/chunks/standalone-update-QN5HFRIC.js +118 -0
  316. package/chunks/{startInteractiveUI-J2QSGWPU.js → startInteractiveUI-5A7RQFRP.js} +3139 -2438
  317. package/chunks/{syntheticOutput-JAXMIMZP.js → syntheticOutput-ML43GEFN.js} +3 -3
  318. package/chunks/{task-create-I2H322E4.js → task-create-QN4LYRSE.js} +11 -11
  319. package/chunks/{task-list-3OLIWFTQ.js → task-list-JPLGK45U.js} +5 -5
  320. package/chunks/{task-stop-JAUY6MSY.js → task-stop-CXEH5L2D.js} +2 -2
  321. package/chunks/{task-update-B3XO4CPI.js → task-update-IWEOJFV2.js} +11 -11
  322. package/chunks/{team-create-W534PMGX.js → team-create-HVGVUL2L.js} +49 -51
  323. package/chunks/{team-delete-Q7GE7RRI.js → team-delete-RZVVSGCY.js} +5 -5
  324. package/chunks/{team-plan-approval-WNV6P6NG.js → team-plan-approval-S5A5FQWU.js} +48 -50
  325. package/chunks/terminal-image-renderer-SIVPPXDI.js +114 -0
  326. package/chunks/theme-manager-TA33UZZX.js +102 -0
  327. package/chunks/{todoWrite-FJJTY2TI.js → todoWrite-WDJNQEMW.js} +43 -25
  328. package/chunks/{tool-search-Y4KL3LRE.js → tool-search-NX7IPDKP.js} +19 -20
  329. package/chunks/total-session-admission-PWXZBOVX.js +114 -0
  330. package/chunks/trustedFolders-V6Y4CU3F.js +122 -0
  331. package/chunks/{update-relaunch-OHVFN6KF.js → update-relaunch-CGSX3R37.js} +6 -6
  332. package/chunks/updateCheck-T5O2WGIB.js +118 -0
  333. package/chunks/useAutoAcceptIndicator-ULBJJWPY.js +120 -0
  334. package/chunks/{validateNonInterActiveAuth-WJXH426F.js → validateNonInterActiveAuth-E5S2JSRC.js} +114 -108
  335. package/chunks/{version-QMDRADXM.js → version-LS5JPU36.js} +2 -2
  336. package/chunks/{web-fetch-ROS6P4LP.js → web-fetch-RLMFZTS3.js} +25 -244
  337. package/chunks/{web-search-JS3E76O6.js → web-search-LMCIC4N5.js} +11 -13
  338. package/chunks/{web-shell-static-3NUTRHAH.js → web-shell-static-A6QMUNNV.js} +11 -4
  339. package/chunks/webapi-Z5OM224P.js +4118 -0
  340. package/chunks/{workflow-2FCMBTBZ.js → workflow-JBXU3IGA.js} +713 -138
  341. package/chunks/workspace-providers-status-525ORQBH.js +114 -0
  342. package/chunks/{workspace-registration-store-SU4EJKSD.js → workspace-registration-store-7Y44R4LV.js} +1 -1
  343. package/chunks/workspace-registry-HS4RWUSQ.js +123 -0
  344. package/chunks/workspace-service-7PXDM6EB.js +129 -0
  345. package/chunks/workspace-skills-status-FMJGC2XI.js +113 -0
  346. package/chunks/{workspace-trust-reconciler-4Y4F7XIX.js → workspace-trust-reconciler-3YTWSQBY.js} +78 -77
  347. package/chunks/write-file-BVQRYQQO.js +88 -0
  348. package/chunks/{zh-TW-NX43Z2S2.js → zh-TW-RPTMRTHG.js} +5 -1
  349. package/chunks/{zh-3JQ75KFU.js → zh-UNY63FR3.js} +5 -1
  350. package/chunks/{zoom-image-DNBKCGGF.js → zoom-image-FGCELNS4.js} +14 -15
  351. package/cli.js +13 -13
  352. package/locales/ca.js +3 -0
  353. package/locales/de.js +1 -0
  354. package/locales/en.js +5 -0
  355. package/locales/fr.js +1 -0
  356. package/locales/ja.js +1 -0
  357. package/locales/pt.js +1 -0
  358. package/locales/ru.js +1 -0
  359. package/locales/zh-TW.js +5 -0
  360. package/locales/zh.js +5 -0
  361. package/package.json +3 -3
  362. package/web-shell/assets/{abnfDiagram-VCTEODGH-DWHXEVlf.js → abnfDiagram-VCTEODGH-2XZDeWYO.js} +1 -1
  363. package/web-shell/assets/{arc-CXKjm86V.js → arc-B6UgMh90.js} +1 -1
  364. package/web-shell/assets/{architectureDiagram-5GKGNRK7-B_ynI0cX.js → architectureDiagram-5GKGNRK7-DZgNFeN1.js} +1 -1
  365. package/web-shell/assets/{blockDiagram-NRAW4CY4-DMebd9X0.js → blockDiagram-NRAW4CY4-DQ2wvBFN.js} +1 -1
  366. package/web-shell/assets/{c4Diagram-UCG6FXSJ-BZ5BlxS-.js → c4Diagram-UCG6FXSJ-DMmQMrc4.js} +1 -1
  367. package/web-shell/assets/channel-D_TyfiTx.js +1 -0
  368. package/web-shell/assets/{chunk-2Q5K7J3B-CluJKopE.js → chunk-2Q5K7J3B-C8Zh2e9y.js} +1 -1
  369. package/web-shell/assets/{chunk-5VM5RSS4-hzDAPFOo.js → chunk-5VM5RSS4-C3LTenP8.js} +1 -1
  370. package/web-shell/assets/{chunk-F27PBJKO-6vHioKJe.js → chunk-F27PBJKO-CxABOc8n.js} +1 -1
  371. package/web-shell/assets/{chunk-G27WJ6UU-B_5hKTGo.js → chunk-G27WJ6UU-CD_JxHDC.js} +1 -1
  372. package/web-shell/assets/{chunk-JWPE2WC7-CO9VoFCH.js → chunk-JWPE2WC7-BdmZPmce.js} +1 -1
  373. package/web-shell/assets/{chunk-LCL6LL3I-7L5JpxYu.js → chunk-LCL6LL3I-80bcHmfK.js} +1 -1
  374. package/web-shell/assets/{chunk-POPQ4Y6H-DHLJMAqj.js → chunk-POPQ4Y6H-CNpLZyQF.js} +1 -1
  375. package/web-shell/assets/{chunk-SVP7TREG-Dt-4Cqdl.js → chunk-SVP7TREG-CXlKgMv3.js} +1 -1
  376. package/web-shell/assets/{chunk-XXDRQBXY-QlSQ3ssG.js → chunk-XXDRQBXY-CivyYyvL.js} +1 -1
  377. package/web-shell/assets/classDiagram-DTDB5LWJ-Bw_H3xMd.js +1 -0
  378. package/web-shell/assets/classDiagram-v2-JRS7N3AN-Bw_H3xMd.js +1 -0
  379. package/web-shell/assets/{cose-bilkent-JH36ORCC-DMw3EOxl.js → cose-bilkent-JH36ORCC-COAjRH3w.js} +1 -1
  380. package/web-shell/assets/{cynefin-OW5HDTMX-s6vEA7RQ.js → cynefin-OW5HDTMX-DqU1JHO6.js} +1 -1
  381. package/web-shell/assets/{cynefinDiagram-5FMLGOSQ-AOKsvYLt.js → cynefinDiagram-5FMLGOSQ-BCLI1Bvj.js} +1 -1
  382. package/web-shell/assets/{dagre-3AP2YEHR-9QAZn3m7.js → dagre-3AP2YEHR-DmAz8nqF.js} +1 -1
  383. package/web-shell/assets/{diagram-S7CK7UJ4-CWpnu4FN.js → diagram-S7CK7UJ4-Ck-5QLT5.js} +1 -1
  384. package/web-shell/assets/{diagram-UQ7AKVKN-9l0jXD8q.js → diagram-UQ7AKVKN-C0ljX0mW.js} +1 -1
  385. package/web-shell/assets/{diagram-VSXAHHWV-BMUHroj4.js → diagram-VSXAHHWV-DPgvT24v.js} +1 -1
  386. package/web-shell/assets/{diagram-VX7I27RA-Co9x27vm.js → diagram-VX7I27RA-D7hWr1LR.js} +1 -1
  387. package/web-shell/assets/{diagram-Z3DM3KII-BKnTeOER.js → diagram-Z3DM3KII-D59tlOta.js} +1 -1
  388. package/web-shell/assets/{ebnfDiagram-PWID7BFC-QBZD9CKG.js → ebnfDiagram-PWID7BFC-CY2DDx00.js} +1 -1
  389. package/web-shell/assets/{erDiagram-SSCWMZ5O-dKWAEGun.js → erDiagram-SSCWMZ5O-AR4h8Q8k.js} +1 -1
  390. package/web-shell/assets/{flowDiagram-A5DVABFB-CR_UgVqj.js → flowDiagram-A5DVABFB-DbF0HqBz.js} +1 -1
  391. package/web-shell/assets/{ganttDiagram-EL5Y4UJY-DQUnjWO6.js → ganttDiagram-EL5Y4UJY-J52mrIhc.js} +1 -1
  392. package/web-shell/assets/{gitGraphDiagram-WWUBYQGX-C4j59wPL.js → gitGraphDiagram-WWUBYQGX-CcgMY5EV.js} +1 -1
  393. package/web-shell/assets/index-BjUg3vPr.css +5 -0
  394. package/web-shell/assets/index-CFwYYVFU.js +1873 -0
  395. package/web-shell/assets/{index-tYXRIPz4.js → index-MQs7l15A.js} +1 -1
  396. package/web-shell/assets/{infoDiagram-RXCK75RN-mzqbt50w.js → infoDiagram-RXCK75RN-Buu3ibp2.js} +1 -1
  397. package/web-shell/assets/{ishikawaDiagram-5VMMS53U-ChLOqhGl.js → ishikawaDiagram-5VMMS53U-CoKQxnF3.js} +1 -1
  398. package/web-shell/assets/{journeyDiagram-EYS64GPL-SifZE-R8.js → journeyDiagram-EYS64GPL-CxK35mTC.js} +1 -1
  399. package/web-shell/assets/{kanban-definition-3QL26DDD-Sft2qlbc.js → kanban-definition-3QL26DDD-tk2CHTQ1.js} +1 -1
  400. package/web-shell/assets/{layout-O2uHVkPd.js → layout-DEpMwb4u.js} +1 -1
  401. package/web-shell/assets/{linear-BVqYgjSc.js → linear-DSQsLh53.js} +1 -1
  402. package/web-shell/assets/{mermaid.core-CZ9MQaJ6.js → mermaid.core-DIZuPBQT.js} +6 -6
  403. package/web-shell/assets/{mindmap-definition-FBJOCRG2-BNQYjBqM.js → mindmap-definition-FBJOCRG2-CCAvk8r_.js} +1 -1
  404. package/web-shell/assets/{pegDiagram-XKGWAZYB-rh1J8uv6.js → pegDiagram-XKGWAZYB-CpJ28jxz.js} +1 -1
  405. package/web-shell/assets/{pieDiagram-E7YTZNPT-BQHR5mn9.js → pieDiagram-E7YTZNPT-ziJR2R32.js} +1 -1
  406. package/web-shell/assets/{quadrantDiagram-AXDQQJYC-CLCbP7mK.js → quadrantDiagram-AXDQQJYC-B60zE3Mh.js} +1 -1
  407. package/web-shell/assets/{railroadDiagram-O6MQD6OU-CDQhrkbm.js → railroadDiagram-O6MQD6OU-M3GqQ_g1.js} +1 -1
  408. package/web-shell/assets/{requirementDiagram-EFPCY7ZU-BdP9uswg.js → requirementDiagram-EFPCY7ZU-ntCtYqTk.js} +1 -1
  409. package/web-shell/assets/{sankeyDiagram-P5KCCOFB-CFZDFBXF.js → sankeyDiagram-P5KCCOFB-AYLoItcZ.js} +1 -1
  410. package/web-shell/assets/{sequenceDiagram-WJ2MYXX4-BW9WOJXI.js → sequenceDiagram-WJ2MYXX4-DEWk4Mlj.js} +1 -1
  411. package/web-shell/assets/{sizeCapture-X5ZJPWSS-CPMia32z.js → sizeCapture-X5ZJPWSS-OOWvzPay.js} +1 -1
  412. package/web-shell/assets/{stateDiagram-HBIQ2CUA-BANp9p7F.js → stateDiagram-HBIQ2CUA-BcMmvxem.js} +1 -1
  413. package/web-shell/assets/stateDiagram-v2-4QOOHH4V-DRLLqPWO.js +1 -0
  414. package/web-shell/assets/{swimlanes-XN3QIQJK-JroXksK-.js → swimlanes-XN3QIQJK-DuZTWWvh.js} +1 -1
  415. package/web-shell/assets/swimlanesDiagram-VK2B7HYN-DOfLQQYt.js +8 -0
  416. package/web-shell/assets/{timeline-definition-24CTP7MA-DfuVIfYY.js → timeline-definition-24CTP7MA-CjqtZXEd.js} +1 -1
  417. package/web-shell/assets/{vennDiagram-4TSXK5OY-BZXoSjRB.js → vennDiagram-4TSXK5OY-knVCVkQ4.js} +1 -1
  418. package/web-shell/assets/{wardleyDiagram-VM6X3IG4-BdiY8avC.js → wardleyDiagram-VM6X3IG4-yoWhw0a2.js} +1 -1
  419. package/web-shell/assets/{xychartDiagram-S5SC5T6Z-DcXh_U4H.js → xychartDiagram-S5SC5T6Z-ue14E_gL.js} +1 -1
  420. package/web-shell/index.html +20 -5
  421. package/chunks/MaxSizedBox-3OZJCC3J.js +0 -110
  422. package/chunks/agent-BFE3DQM3.js +0 -93
  423. package/chunks/agent-headless-LLVKZZ4P.js +0 -87
  424. package/chunks/bridge-EBYO4SYM.js +0 -118
  425. package/chunks/channel-settings-store-5VP2Y2YM.js +0 -115
  426. package/chunks/chunk-2J3OJGTL.js +0 -98
  427. package/chunks/chunk-7IV52LTO.js +0 -202
  428. package/chunks/chunk-AXMWHKXA.js +0 -42
  429. package/chunks/chunk-F6WFNA7U.js +0 -22
  430. package/chunks/chunk-IO257NUD.js +0 -623
  431. package/chunks/chunk-JS73NNWF.js +0 -30
  432. package/chunks/chunk-SJ4HB27T.js +0 -945
  433. package/chunks/chunk-VGHZT6JR.js +0 -51
  434. package/chunks/chunk-YHC2EYYG.js +0 -125
  435. package/chunks/computer-use-EGPWFEX6.js +0 -2142
  436. package/chunks/config-utils-WZ43VOBS.js +0 -25
  437. package/chunks/contextCommand-5DSEQI6S.js +0 -106
  438. package/chunks/daemon-status-provider-EYMLPYJU.js +0 -116
  439. package/chunks/daemon-trust-policy-CQYKZ7VO.js +0 -112
  440. package/chunks/deferred-core-runtime-WFEPUXZR.js +0 -114
  441. package/chunks/earlyInputCapture-PN4PP7V5.js +0 -107
  442. package/chunks/environment-WUPHLPKZ.js +0 -127
  443. package/chunks/errors-WPMPVIAT.js +0 -113
  444. package/chunks/exitPlanMode-MLFHYZNB.js +0 -85
  445. package/chunks/handleAutoUpdate-F5OTWUT5.js +0 -109
  446. package/chunks/i18n-C562S6KN.js +0 -124
  447. package/chunks/initializer-7YPGOFP4.js +0 -113
  448. package/chunks/installationInfo-ARU5Q2H7.js +0 -107
  449. package/chunks/list-KTSK275C.js +0 -116
  450. package/chunks/loadedSettingsAdapter-F3T2EQ5J.js +0 -110
  451. package/chunks/mcp-6ONTVPAY.js +0 -110
  452. package/chunks/nonInteractiveCli-KZDWFAN6.js +0 -178
  453. package/chunks/pidfile-IO7ALSZF.js +0 -111
  454. package/chunks/process-registry-PMJOA5CO.js +0 -172
  455. package/chunks/prompt-terminal-ledger-TCE7PMCE.js +0 -105
  456. package/chunks/read-file-2HOD2ATO.js +0 -33
  457. package/chunks/resumeHistoryUtils-DDSBAQJS.js +0 -118
  458. package/chunks/ripGrep-E7P6K4QR.js +0 -40
  459. package/chunks/runtime-J4SPTJRQ.js +0 -148
  460. package/chunks/scheduler-VRAEZZ4E.js +0 -122
  461. package/chunks/serve-KEAWV4TI.js +0 -118
  462. package/chunks/shell-H6K63WG3.js +0 -95
  463. package/chunks/skill-settings-TCKLXIXM.js +0 -118
  464. package/chunks/spawnChannel-2K6NKWM5.js +0 -111
  465. package/chunks/standalone-update-LSCGOEFP.js +0 -118
  466. package/chunks/terminal-image-renderer-UHX3UD66.js +0 -114
  467. package/chunks/theme-manager-6B47ZPIF.js +0 -102
  468. package/chunks/total-session-admission-NSCFWGJH.js +0 -113
  469. package/chunks/trustedFolders-7XMJWGQ3.js +0 -122
  470. package/chunks/updateCheck-EOVLHD4T.js +0 -118
  471. package/chunks/useAutoAcceptIndicator-ZNMIGBTN.js +0 -120
  472. package/chunks/workspace-providers-status-GPGU5YMT.js +0 -113
  473. package/chunks/workspace-registry-BQISXT6Y.js +0 -122
  474. package/chunks/workspace-service-LLY6HCUC.js +0 -129
  475. package/chunks/workspace-skills-status-L5N2Y3ZP.js +0 -113
  476. package/chunks/write-file-EJHU2Z3E.js +0 -90
  477. package/web-shell/assets/channel-Zg3WHgq_.js +0 -1
  478. package/web-shell/assets/classDiagram-DTDB5LWJ-C16l9jQz.js +0 -1
  479. package/web-shell/assets/classDiagram-v2-JRS7N3AN-C16l9jQz.js +0 -1
  480. package/web-shell/assets/index-BN_m_uHJ.css +0 -5
  481. package/web-shell/assets/index-DrlJu79f.js +0 -1792
  482. package/web-shell/assets/stateDiagram-v2-4QOOHH4V-NZYAoQLU.js +0 -1
  483. package/web-shell/assets/swimlanesDiagram-VK2B7HYN-3YdVX3vj.js +0 -8
@@ -1,118 +1,121 @@
1
1
  // Force strict mode and setup for ESM
2
2
  "use strict";
3
3
  import {
4
+ isSymlinkedRoot,
4
5
  resolveSavedWorkflowScript,
5
6
  writeWorkflowSnapshot
6
- } from "./chunk-5HJUPACR.js";
7
+ } from "./chunk-CRKKHXTI.js";
7
8
  import {
8
9
  AgentEventEmitter,
9
- FileDiscoveryService,
10
10
  attachJsonlTranscriptWriter,
11
11
  buildAgentTranscriptAttach,
12
+ deriveApprovalModeConfig,
13
+ deriveConfig,
14
+ deriveWorktreeConfig,
15
+ getRuleDisplayName,
12
16
  isTerminalWorkflowStatus,
13
17
  rebuildToolRegistryOnOverride,
14
18
  resolveExternalWorktreeDir,
19
+ resolveToolName,
15
20
  toModelVisibleSubagentResult
16
- } from "./chunk-T6XLJRQY.js";
21
+ } from "./chunk-EWIQ3NAE.js";
17
22
  import "./chunk-GOFAQQZA.js";
23
+ import "./chunk-5M6IDOMF.js";
18
24
  import "./chunk-TWPJO254.js";
19
25
  import "./chunk-CQ35AJ4Z.js";
20
- import "./chunk-5M6IDOMF.js";
21
- import "./chunk-KVGR4MCF.js";
22
- import "./chunk-XZJKSETB.js";
23
- import "./chunk-YMVFIYHV.js";
26
+ import "./chunk-EKSCLBBF.js";
27
+ import "./chunk-LUEHOUHM.js";
28
+ import "./chunk-WXEA74YB.js";
29
+ import "./chunk-42IDLQWS.js";
24
30
  import {
25
31
  parsePositiveIntegerEnv
26
32
  } from "./chunk-6PVPNMXU.js";
27
- import "./chunk-7DYNJFES.js";
28
- import "./chunk-DJEHYM4H.js";
33
+ import "./chunk-JB4JIVTJ.js";
34
+ import "./chunk-DJBQCO2E.js";
29
35
  import "./chunk-IRH27ZC2.js";
30
36
  import "./chunk-QHWCP53L.js";
31
- import "./chunk-AZF6SME3.js";
37
+ import "./chunk-D5LUXLUH.js";
32
38
  import "./chunk-O6GEWCJA.js";
33
39
  import "./chunk-T26EAKDL.js";
34
40
  import {
35
41
  GitWorktreeService,
36
42
  generateAgentWorktreeSlug,
37
43
  writeWorktreeSessionMarker
38
- } from "./chunk-GIWB5QLV.js";
44
+ } from "./chunk-2SXSLSQE.js";
39
45
  import "./chunk-CPBF7KYF.js";
40
- import "./chunk-VUMLT7E5.js";
41
- import "./chunk-ISJMN3ML.js";
42
- import "./chunk-XLDFW44M.js";
43
- import "./chunk-Q54XG7IX.js";
44
- import "./chunk-FEMQ6Y7W.js";
45
- import "./chunk-2TRNCJK4.js";
46
- import "./chunk-NUGZAFR2.js";
47
- import "./chunk-LDGWX737.js";
46
+ import "./chunk-6W2IK5KC.js";
47
+ import "./chunk-TTX2JUE6.js";
48
+ import "./chunk-4K7KNVWH.js";
49
+ import "./chunk-SMPR7SPO.js";
50
+ import "./chunk-JWALNCLT.js";
51
+ import "./chunk-NIFYWDYN.js";
52
+ import "./chunk-C2X7KY45.js";
53
+ import "./chunk-XLLQJRAH.js";
54
+ import "./chunk-7J6OTNGO.js";
48
55
  import {
49
56
  SUBAGENT_PLAN_LIFECYCLE_TOOLS
50
- } from "./chunk-VLRBJ24J.js";
57
+ } from "./chunk-V5J4J5TP.js";
51
58
  import "./chunk-MLXTMF7H.js";
52
59
  import "./chunk-NAVJD2PQ.js";
53
- import "./chunk-WRT324N6.js";
54
- import "./chunk-YDJRMQU4.js";
55
- import "./chunk-SJ4HB27T.js";
56
- import "./chunk-P3QQPMQA.js";
57
- import "./chunk-2UZJWSVD.js";
58
- import "./chunk-SAH4BD2J.js";
59
- import "./chunk-VSNPOSDN.js";
60
+ import "./chunk-B466ZSHZ.js";
61
+ import "./chunk-4QHPPXK2.js";
62
+ import "./chunk-QHMLYMMS.js";
63
+ import "./chunk-3WK3QDNV.js";
64
+ import "./chunk-PQEISIKS.js";
65
+ import "./chunk-EB6QRGHM.js";
60
66
  import {
61
67
  runWithAgentContext
62
- } from "./chunk-I432KXWD.js";
68
+ } from "./chunk-CMHFCLBU.js";
63
69
  import "./chunk-S6LOFUVP.js";
64
- import "./chunk-7IV52LTO.js";
65
- import "./chunk-AXMWHKXA.js";
70
+ import "./chunk-CFKIH3D3.js";
71
+ import "./chunk-2LD5U7Q3.js";
66
72
  import {
67
73
  createAbortController,
68
74
  createChildAbortController
69
75
  } from "./chunk-DJ2GSRLV.js";
70
- import "./chunk-2J3OJGTL.js";
71
- import "./chunk-LI4YHTQK.js";
72
- import "./chunk-QKBYFU2Q.js";
73
- import "./chunk-C72BXMJ5.js";
76
+ import "./chunk-DYXFD5RO.js";
77
+ import "./chunk-Y3QL45LS.js";
74
78
  import {
75
79
  WorkflowRunEvent,
76
80
  logWorkflowRun,
77
81
  read,
78
82
  writeLine
79
- } from "./chunk-FDD2IUEL.js";
80
- import "./chunk-YRLW2MSX.js";
83
+ } from "./chunk-SZLBBZH4.js";
84
+ import "./chunk-XBVNNDPK.js";
81
85
  import "./chunk-VGC4I5JJ.js";
82
- import "./chunk-IWOWEENB.js";
83
- import "./chunk-HIK2OF33.js";
84
- import "./chunk-ZRYQMWEP.js";
85
- import "./chunk-2E3V7G6Y.js";
86
- import "./chunk-F6WFNA7U.js";
86
+ import {
87
+ isWithinRoot
88
+ } from "./chunk-BKWNKLZB.js";
89
+ import "./chunk-6PJOTWAN.js";
90
+ import "./chunk-BWORX6FA.js";
87
91
  import "./chunk-WZAD4ZNJ.js";
88
92
  import "./chunk-FPGTNKCP.js";
89
- import "./chunk-YHC2EYYG.js";
90
- import "./chunk-PZRUV52H.js";
91
- import "./chunk-JGUBDRBC.js";
92
- import "./chunk-HDKCKCYO.js";
93
+ import "./chunk-6DIGWMGT.js";
94
+ import "./chunk-3K6TUZHS.js";
95
+ import "./chunk-XZA32HII.js";
96
+ import "./chunk-23RFD54N.js";
97
+ import "./chunk-PPKZ7JOE.js";
93
98
  import "./chunk-HHJLM3WQ.js";
94
99
  import {
95
100
  stripAnsiAndControl
96
- } from "./chunk-GAHYKJPV.js";
101
+ } from "./chunk-B5PHIJGI.js";
97
102
  import "./chunk-74TONY4F.js";
98
103
  import {
99
104
  SyntheticOutputTool
100
- } from "./chunk-XL5K4SVK.js";
101
- import "./chunk-WZDM44SB.js";
102
- import "./chunk-K623ENWT.js";
105
+ } from "./chunk-XF63PKEN.js";
106
+ import "./chunk-CAJTKR6W.js";
107
+ import "./chunk-ZU4UDIWX.js";
103
108
  import "./chunk-AQ37AY7B.js";
104
- import {
105
- WorkspaceContext
106
- } from "./chunk-K52PZNU4.js";
109
+ import "./chunk-PDQGMSZK.js";
107
110
  import {
108
111
  BaseDeclarativeTool,
109
112
  BaseToolInvocation,
110
113
  ToolDisplayNames,
111
114
  ToolNames
112
- } from "./chunk-6NFAEG54.js";
115
+ } from "./chunk-UTLCH2FK.js";
113
116
  import {
114
117
  createDebugLogger
115
- } from "./chunk-A5F2YNO6.js";
118
+ } from "./chunk-UHQFIS7N.js";
116
119
  import "./chunk-75DOP5OR.js";
117
120
  import "./chunk-DMTGGOSA.js";
118
121
  import "./chunk-YQ3U5MUC.js";
@@ -128,15 +131,320 @@ import {
128
131
  // packages/core/src/tools/workflow/workflow.ts
129
132
  init_esbuild_shims();
130
133
 
131
- // packages/core/src/agents/runtime/workflow-orchestrator.ts
132
- init_esbuild_shims();
133
- import { randomBytes } from "node:crypto";
134
- import { AsyncLocalStorage } from "node:async_hooks";
135
- import * as os from "node:os";
136
-
137
134
  // packages/core/src/agents/runtime/workflow-sandbox.ts
138
135
  init_esbuild_shims();
139
136
  import * as vm from "node:vm";
137
+
138
+ // packages/core/src/agents/runtime/workflow-meta-literal.ts
139
+ init_esbuild_shims();
140
+ var WorkflowMetaSyntaxError = class extends Error {
141
+ static {
142
+ __name(this, "WorkflowMetaSyntaxError");
143
+ }
144
+ index;
145
+ constructor(message, index) {
146
+ super(message);
147
+ this.name = "WorkflowMetaSyntaxError";
148
+ this.index = index;
149
+ }
150
+ };
151
+ function parseWorkflowMetaLiteral(source) {
152
+ const parser = new MetaLiteralParser(source);
153
+ parser.skipTrivia();
154
+ const value = parser.parseValue(0);
155
+ parser.skipTrivia();
156
+ if (parser.index < source.length) {
157
+ throw parser.fail("unexpected trailing content");
158
+ }
159
+ return value;
160
+ }
161
+ __name(parseWorkflowMetaLiteral, "parseWorkflowMetaLiteral");
162
+ var MAX_DEPTH = 32;
163
+ var WHITESPACE = /* @__PURE__ */ new Set([" ", " ", "\n", "\r", "\f", "\v", "\xA0", "\uFEFF"]);
164
+ var ID_START = /[A-Za-z_$]/;
165
+ var ID_PART = /[A-Za-z0-9_$]/;
166
+ var MetaLiteralParser = class {
167
+ constructor(src) {
168
+ this.src = src;
169
+ }
170
+ static {
171
+ __name(this, "MetaLiteralParser");
172
+ }
173
+ index = 0;
174
+ fail(message) {
175
+ const from = Math.max(0, this.index - 24);
176
+ const snippet = this.src.slice(from, this.index + 24).replace(/\s+/g, " ").trim();
177
+ return new WorkflowMetaSyntaxError(
178
+ `${message} at position ${this.index} (near "${snippet}"). meta must be a plain object literal \u2014 strings, numbers, booleans, null, arrays and objects only, with no variables, function calls, spreads, accessors or template substitutions.`,
179
+ this.index
180
+ );
181
+ }
182
+ skipTrivia() {
183
+ for (; ; ) {
184
+ while (this.index < this.src.length && WHITESPACE.has(this.src[this.index])) {
185
+ this.index++;
186
+ }
187
+ if (this.src.startsWith("//", this.index)) {
188
+ let end = this.index + 2;
189
+ while (end < this.src.length && !"\n\r\u2028\u2029".includes(this.src[end])) {
190
+ end++;
191
+ }
192
+ if (this.src[end] === "\r" && this.src[end + 1] === "\n") end++;
193
+ this.index = end < this.src.length ? end + 1 : this.src.length;
194
+ continue;
195
+ }
196
+ if (this.src.startsWith("/*", this.index)) {
197
+ const end = this.src.indexOf("*/", this.index + 2);
198
+ if (end === -1) throw this.fail("unterminated comment");
199
+ this.index = end + 2;
200
+ continue;
201
+ }
202
+ return;
203
+ }
204
+ }
205
+ parseValue(depth) {
206
+ if (depth > MAX_DEPTH) throw this.fail("meta literal is nested too deeply");
207
+ this.skipTrivia();
208
+ const c = this.src[this.index];
209
+ if (c === void 0) throw this.fail("unexpected end of meta literal");
210
+ if (c === "{") return this.parseObject(depth);
211
+ if (c === "[") return this.parseArray(depth);
212
+ if (c === '"' || c === "'" || c === "`") return this.parseString();
213
+ if (c === "-" || c >= "0" && c <= "9") return this.parseNumber();
214
+ if (this.src.startsWith("true", this.index)) return this.word("true", true);
215
+ if (this.src.startsWith("false", this.index)) {
216
+ return this.word("false", false);
217
+ }
218
+ if (this.src.startsWith("null", this.index)) return this.word("null", null);
219
+ if (c === "/")
220
+ throw this.fail("regular expressions are not allowed in meta");
221
+ throw this.fail("unsupported value");
222
+ }
223
+ word(literal, value) {
224
+ const after = this.src[this.index + literal.length];
225
+ if (after !== void 0 && ID_PART.test(after)) {
226
+ throw this.fail("unsupported value");
227
+ }
228
+ this.index += literal.length;
229
+ return value;
230
+ }
231
+ parseObject(depth) {
232
+ this.index++;
233
+ const out = /* @__PURE__ */ Object.create(null);
234
+ for (; ; ) {
235
+ this.skipTrivia();
236
+ const c = this.src[this.index];
237
+ if (c === "}") {
238
+ this.index++;
239
+ return out;
240
+ }
241
+ if (c === void 0) throw this.fail("unterminated object");
242
+ if (this.src.startsWith("...", this.index)) {
243
+ throw this.fail("spread is not allowed in meta");
244
+ }
245
+ if (c === "[") throw this.fail("computed keys are not allowed in meta");
246
+ const key = this.parseKey();
247
+ this.skipTrivia();
248
+ if (this.src[this.index] === "(") {
249
+ throw this.fail("methods are not allowed in meta");
250
+ }
251
+ if (this.src[this.index] !== ":")
252
+ throw this.fail('expected ":" after key');
253
+ this.index++;
254
+ out[key] = this.parseValue(depth + 1);
255
+ this.skipTrivia();
256
+ if (this.src[this.index] === ",") {
257
+ this.index++;
258
+ continue;
259
+ }
260
+ if (this.src[this.index] === "}") {
261
+ this.index++;
262
+ return out;
263
+ }
264
+ throw this.fail('expected "," or "}"');
265
+ }
266
+ }
267
+ parseKey() {
268
+ const c = this.src[this.index];
269
+ if (c === '"' || c === "'" || c === "`") return this.parseString();
270
+ if (c !== void 0 && ID_START.test(c)) {
271
+ const start = this.index;
272
+ while (this.index < this.src.length && ID_PART.test(this.src[this.index])) {
273
+ this.index++;
274
+ }
275
+ const word = this.src.slice(start, this.index);
276
+ if (word === "get" || word === "set" || word === "async") {
277
+ const save = this.index;
278
+ this.skipTrivia();
279
+ const next = this.src[this.index];
280
+ const startsPropertyName = next !== void 0 && (ID_START.test(next) || next === '"' || next === "'" || next === "[");
281
+ this.index = save;
282
+ if (startsPropertyName) {
283
+ throw this.fail(
284
+ word === "async" ? "async members are not allowed in meta" : `${word}ters are not allowed in meta`
285
+ );
286
+ }
287
+ }
288
+ return word;
289
+ }
290
+ throw this.fail("expected a property name");
291
+ }
292
+ parseArray(depth) {
293
+ this.index++;
294
+ const out = [];
295
+ for (; ; ) {
296
+ this.skipTrivia();
297
+ const c = this.src[this.index];
298
+ if (c === "]") {
299
+ this.index++;
300
+ return out;
301
+ }
302
+ if (c === void 0) throw this.fail("unterminated array");
303
+ if (this.src.startsWith("...", this.index)) {
304
+ throw this.fail("spread is not allowed in meta");
305
+ }
306
+ if (c === ",") throw this.fail("missing array element");
307
+ out.push(this.parseValue(depth + 1));
308
+ this.skipTrivia();
309
+ if (this.src[this.index] === ",") {
310
+ this.index++;
311
+ continue;
312
+ }
313
+ if (this.src[this.index] === "]") {
314
+ this.index++;
315
+ return out;
316
+ }
317
+ throw this.fail('expected "," or "]"');
318
+ }
319
+ }
320
+ parseString() {
321
+ const quote = this.src[this.index++];
322
+ let out = "";
323
+ for (; ; ) {
324
+ const c = this.src[this.index];
325
+ if (c === void 0) throw this.fail("unterminated string");
326
+ if (c === quote) {
327
+ this.index++;
328
+ return out;
329
+ }
330
+ if (c === "\n" || c === "\r") {
331
+ if (quote !== "`") throw this.fail("unterminated string");
332
+ if (c === "\r") {
333
+ this.index++;
334
+ if (this.src[this.index] === "\n") this.index++;
335
+ out += "\n";
336
+ continue;
337
+ }
338
+ }
339
+ if (quote === "`" && c === "$" && this.src[this.index + 1] === "{") {
340
+ throw this.fail("template substitutions are not allowed in meta");
341
+ }
342
+ if (c === "\\") {
343
+ out += this.parseEscape();
344
+ continue;
345
+ }
346
+ out += c;
347
+ this.index++;
348
+ }
349
+ }
350
+ parseEscape() {
351
+ this.index++;
352
+ const c = this.src[this.index++];
353
+ switch (c) {
354
+ case "n":
355
+ return "\n";
356
+ case "t":
357
+ return " ";
358
+ case "r":
359
+ return "\r";
360
+ case "b":
361
+ return "\b";
362
+ case "f":
363
+ return "\f";
364
+ case "v":
365
+ return "\v";
366
+ case "0":
367
+ if (/[0-9]/.test(this.src[this.index] ?? "")) {
368
+ throw this.fail("octal escapes are not allowed in meta");
369
+ }
370
+ return "\0";
371
+ case "x": {
372
+ const hex = this.src.slice(this.index, this.index + 2);
373
+ if (!/^[0-9a-fA-F]{2}$/.test(hex)) {
374
+ throw this.fail("invalid \\x escape");
375
+ }
376
+ this.index += 2;
377
+ return String.fromCharCode(parseInt(hex, 16));
378
+ }
379
+ case "u": {
380
+ if (this.src[this.index] === "{") {
381
+ const end = this.src.indexOf("}", this.index);
382
+ const hex2 = end === -1 ? "" : this.src.slice(this.index + 1, end);
383
+ if (!/^[0-9a-fA-F]{1,6}$/.test(hex2)) {
384
+ throw this.fail("invalid \\u{...} escape");
385
+ }
386
+ const code = parseInt(hex2, 16);
387
+ if (code > 1114111) throw this.fail("invalid \\u{...} escape");
388
+ this.index = end + 1;
389
+ return String.fromCodePoint(code);
390
+ }
391
+ const hex = this.src.slice(this.index, this.index + 4);
392
+ if (!/^[0-9a-fA-F]{4}$/.test(hex)) {
393
+ throw this.fail("invalid \\u escape");
394
+ }
395
+ this.index += 4;
396
+ return String.fromCharCode(parseInt(hex, 16));
397
+ }
398
+ case "\n":
399
+ return "";
400
+ // line continuation
401
+ case "\r":
402
+ if (this.src[this.index] === "\n") this.index++;
403
+ return "";
404
+ case "\u2028":
405
+ case "\u2029":
406
+ return "";
407
+ case void 0:
408
+ throw this.fail("unterminated escape sequence");
409
+ default:
410
+ return c;
411
+ }
412
+ }
413
+ parseNumber() {
414
+ const start = this.index;
415
+ if (this.src[this.index] === "-") this.index++;
416
+ while (this.index < this.src.length && /[0-9]/.test(this.src[this.index])) {
417
+ this.index++;
418
+ }
419
+ if (this.src[this.index] === ".") {
420
+ this.index++;
421
+ while (this.index < this.src.length && /[0-9]/.test(this.src[this.index])) {
422
+ this.index++;
423
+ }
424
+ }
425
+ if (this.src[this.index] === "e" || this.src[this.index] === "E") {
426
+ this.index++;
427
+ if (this.src[this.index] === "+" || this.src[this.index] === "-") {
428
+ this.index++;
429
+ }
430
+ while (this.index < this.src.length && /[0-9]/.test(this.src[this.index])) {
431
+ this.index++;
432
+ }
433
+ }
434
+ const after = this.src[this.index];
435
+ if (after !== void 0 && ID_PART.test(after)) {
436
+ throw this.fail("unsupported numeric literal");
437
+ }
438
+ const text = this.src.slice(start, this.index);
439
+ const value = Number(text);
440
+ if (text.length === 0 || !Number.isFinite(value)) {
441
+ throw this.fail("unsupported numeric literal");
442
+ }
443
+ return value;
444
+ }
445
+ };
446
+
447
+ // packages/core/src/agents/runtime/workflow-sandbox.ts
140
448
  function findMetaBlockBounds(source) {
141
449
  const re = /^\s*export\s+const\s+meta\s*=\s*\{/;
142
450
  const match = re.exec(source);
@@ -195,7 +503,7 @@ function findMetaBlockBounds(source) {
195
503
  }
196
504
  if (depth !== 0) {
197
505
  throw new Error(
198
- "stripExportMeta: unbalanced braces in export const meta declaration \u2014 the workflow script cannot be safely stripped. Check the meta block syntax."
506
+ "unbalanced braces in export const meta declaration \u2014 the workflow script cannot be safely stripped. Check the meta block syntax."
199
507
  );
200
508
  }
201
509
  const endBraceIncl = i - 1;
@@ -208,45 +516,86 @@ function extractAndStripMeta(source) {
208
516
  if (!bounds) return { stripped: source, meta: null };
209
517
  const metaSource = source.slice(bounds.startBrace, bounds.endBraceIncl + 1);
210
518
  const stripped = source.slice(0, bounds.exportIdx) + source.slice(bounds.afterMeta);
211
- const metaContext = vm.createContext(/* @__PURE__ */ Object.create(null));
212
519
  let raw;
213
520
  try {
214
- raw = new vm.Script(`(${metaSource})`).runInContext(metaContext);
521
+ raw = parseWorkflowMetaLiteral(metaSource);
215
522
  } catch (e) {
216
523
  const msg = e instanceof Error ? e.message : String(e);
217
- throw new Error(
218
- `extractAndStripMeta: failed to evaluate meta object literal: ${msg}`
219
- );
524
+ throw new Error(`invalid meta object literal: ${msg}`);
220
525
  }
221
- rejectThenablesInMeta(raw);
222
526
  const meta = validateMeta(raw);
223
527
  return { stripped, meta };
224
528
  }
225
529
  __name(extractAndStripMeta, "extractAndStripMeta");
226
- function rejectThenablesInMeta(value, seen = /* @__PURE__ */ new WeakSet()) {
227
- if (value === null || typeof value !== "object") return;
228
- if (seen.has(value)) return;
229
- seen.add(value);
230
- const maybeThen = value.then;
231
- if (typeof maybeThen === "function") {
232
- try {
233
- value.catch(() => {
234
- });
235
- } catch {
236
- }
237
- throw new Error(
238
- "extractAndStripMeta: meta values must not be Promises (no async / dynamic import allowed in meta literal)"
239
- );
240
- }
241
- if (Array.isArray(value)) {
242
- for (const v of value) rejectThenablesInMeta(v, seen);
243
- return;
244
- }
245
- for (const v of Object.values(value)) {
246
- rejectThenablesInMeta(v, seen);
247
- }
530
+ var WORKFLOW_SCRIPT_FILENAME = "workflow.js";
531
+ function wrapWorkflowBody(strippedSource) {
532
+ return `(async () => {'use strict';
533
+ ${strippedSource}
534
+ })()`;
248
535
  }
249
- __name(rejectThenablesInMeta, "rejectThenablesInMeta");
536
+ __name(wrapWorkflowBody, "wrapWorkflowBody");
537
+ function compileWorkflowScript(scriptSource) {
538
+ const { stripped, meta } = extractAndStripMeta(scriptSource);
539
+ const bounds = findMetaBlockBounds(scriptSource);
540
+ const compilable = bounds ? scriptSource.slice(0, bounds.exportIdx) + scriptSource.slice(bounds.exportIdx, bounds.afterMeta).replace(/[^\r\n\u2028\u2029]/g, " ") + scriptSource.slice(bounds.afterMeta) : stripped;
541
+ const script = new vm.Script(wrapWorkflowBody(compilable), {
542
+ filename: WORKFLOW_SCRIPT_FILENAME
543
+ });
544
+ return { script, meta };
545
+ }
546
+ __name(compileWorkflowScript, "compileWorkflowScript");
547
+ var COMPILE_ERROR_LINE_WIDTH = 80;
548
+ function describeWorkflowCompileError(error, authorLineCount) {
549
+ const err = error instanceof Error ? error : new Error(String(error));
550
+ const stack = typeof err.stack === "string" ? err.stack : "";
551
+ const frame = [];
552
+ for (const line of stack.split("\n")) {
553
+ if (frame.length >= 3 && /^\s+at\s/.test(line)) break;
554
+ frame.push(line);
555
+ }
556
+ const header = frame[0] ?? "";
557
+ const match = /^.*?:(\d+)$/.exec(header);
558
+ if (frame.length < 3 || !match) {
559
+ return err.message;
560
+ }
561
+ const bodyLine = Number(match[1]) - 1;
562
+ if (bodyLine < 1) return err.message;
563
+ if (bodyLine > authorLineCount) {
564
+ return "The script ends with unmatched or incomplete syntax. Check parentheses, brackets, braces, quotes, and template literals near the end.";
565
+ }
566
+ const rendered = clampSourceFrame(frame[1] ?? "", frame[2] ?? "");
567
+ const tail = frame.slice(3).filter((l) => l.trim().length > 0).join("\n");
568
+ return [`line ${bodyLine}`, rendered, tail].filter(Boolean).join("\n");
569
+ }
570
+ __name(describeWorkflowCompileError, "describeWorkflowCompileError");
571
+ function clampSourceFrame(sourceLine, caretLine) {
572
+ if (sourceLine.length <= COMPILE_ERROR_LINE_WIDTH) {
573
+ return `${sourceLine}
574
+ ${caretLine}`;
575
+ }
576
+ const caret = /\^+/.exec(caretLine);
577
+ if (!caret) return "";
578
+ const caretCol = caret.index;
579
+ const start = Math.max(
580
+ 0,
581
+ Math.min(
582
+ caretCol - Math.floor(COMPILE_ERROR_LINE_WIDTH / 2),
583
+ sourceLine.length - COMPILE_ERROR_LINE_WIDTH
584
+ )
585
+ );
586
+ const prefix = start > 0 ? "\u2026" : "";
587
+ const window = sourceLine.slice(start, start + COMPILE_ERROR_LINE_WIDTH);
588
+ const suffix = start + COMPILE_ERROR_LINE_WIDTH < sourceLine.length ? "\u2026" : "";
589
+ const visibleCaretStart = Math.max(caretCol, start);
590
+ const visibleCaretEnd = Math.min(
591
+ caretCol + caret[0].length,
592
+ start + COMPILE_ERROR_LINE_WIDTH
593
+ );
594
+ const shiftedCaret = " ".repeat(prefix.length + visibleCaretStart - start) + "^".repeat(visibleCaretEnd - visibleCaretStart);
595
+ return `${prefix}${window}${suffix}
596
+ ${shiftedCaret}`;
597
+ }
598
+ __name(clampSourceFrame, "clampSourceFrame");
250
599
  function validateMeta(value) {
251
600
  if (value === null || typeof value !== "object") {
252
601
  throw new Error("meta must be an object");
@@ -1227,8 +1576,8 @@ function createWorkflowSandbox(opts) {
1227
1576
  const flushUnconsumedRejections = /* @__PURE__ */ __name(async () => {
1228
1577
  unconsumedSettled = true;
1229
1578
  if (nextUnconsumedId === 1) return;
1230
- await new Promise((resolve) => {
1231
- setImmediate(resolve);
1579
+ await new Promise((resolve2) => {
1580
+ setImmediate(resolve2);
1232
1581
  });
1233
1582
  for (const rec of unconsumedRejections.values()) {
1234
1583
  const rootState = unconsumedRoots.get(rec.rootId);
@@ -1283,14 +1632,8 @@ function createWorkflowSandbox(opts) {
1283
1632
  let rearmWatchdogOnAbort;
1284
1633
  process.on("unhandledRejection", adoptionEscapeHook);
1285
1634
  try {
1286
- const { stripped, meta } = extractAndStripMeta(scriptSource);
1635
+ const { script, meta } = compileWorkflowScript(scriptSource);
1287
1636
  extractedMeta = meta;
1288
- const wrapped = `(async () => {
1289
- ${stripped}
1290
- })()`;
1291
- const script = new vm.Script(wrapped, {
1292
- filename: "workflow.js"
1293
- });
1294
1637
  const runOpts = {
1295
1638
  timeout: 3e4
1296
1639
  };
@@ -1341,6 +1684,12 @@ ${stripped}
1341
1684
  }
1342
1685
  __name(createWorkflowSandbox, "createWorkflowSandbox");
1343
1686
 
1687
+ // packages/core/src/agents/runtime/workflow-orchestrator.ts
1688
+ init_esbuild_shims();
1689
+ import { randomBytes } from "node:crypto";
1690
+ import { AsyncLocalStorage } from "node:async_hooks";
1691
+ import * as os from "node:os";
1692
+
1344
1693
  // packages/core/src/agents/runtime/workflow-budget.ts
1345
1694
  init_esbuild_shims();
1346
1695
  var debugLogger2 = createDebugLogger("WORKFLOW_BUDGET");
@@ -1428,7 +1777,7 @@ var WorkflowBudgetExceededError = class extends Error {
1428
1777
 
1429
1778
  // packages/core/src/agents/runtime/workflow-stall.ts
1430
1779
  init_esbuild_shims();
1431
- var DEFAULT_STALL_MS = 6e4;
1780
+ var DEFAULT_STALL_MS = 18e4;
1432
1781
  var MAX_STALL_ATTEMPTS = 3;
1433
1782
  var MAX_WORKFLOW_STALL_MS_ENV = "QWEN_CODE_WORKFLOW_STALL_SECONDS";
1434
1783
  function resolveStallMs(perCall, env = process.env) {
@@ -1713,14 +2062,14 @@ var WorkflowDispatchScheduler = class {
1713
2062
  };
1714
2063
  }
1715
2064
  run(thunk) {
1716
- return new Promise((resolve, reject) => {
2065
+ return new Promise((resolve2, reject) => {
1717
2066
  if (this.signal?.aborted) {
1718
2067
  reject(abortError());
1719
2068
  return;
1720
2069
  }
1721
2070
  this.queue.push({
1722
2071
  thunk,
1723
- resolve,
2072
+ resolve: resolve2,
1724
2073
  reject
1725
2074
  });
1726
2075
  this.pump();
@@ -1744,8 +2093,8 @@ var WorkflowDispatchScheduler = class {
1744
2093
  waitUntilRunning() {
1745
2094
  if (this.signal?.aborted) return Promise.reject(abortError());
1746
2095
  if (this.state === "running") return Promise.resolve();
1747
- return new Promise((resolve, reject) => {
1748
- this.gateWaiters.push({ resolve, reject });
2096
+ return new Promise((resolve2, reject) => {
2097
+ this.gateWaiters.push({ resolve: resolve2, reject });
1749
2098
  });
1750
2099
  }
1751
2100
  snapshot() {
@@ -2002,7 +2351,7 @@ function attachDispatchTranscript(config, agentId, prompt, agentName, emitter, a
2002
2351
  }
2003
2352
  __name(attachDispatchTranscript, "attachDispatchTranscript");
2004
2353
  async function runSingleDispatch(config, prompt, opts, attemptSignal, emitter, workflowAgentId, agentIdentity, onTokens) {
2005
- const { AgentHeadless, ContextState } = await import("./agent-headless-LLVKZZ4P.js");
2354
+ const { AgentHeadless, ContextState } = await import("./agent-headless-L5T4Y4OZ.js");
2006
2355
  const ctx = new ContextState();
2007
2356
  ctx.set("task_prompt", prompt);
2008
2357
  debugLogger.debug(`[workflow] Dispatch ${workflowAgentId}`);
@@ -2028,7 +2377,11 @@ async function runSingleDispatch(config, prompt, opts, attemptSignal, emitter, w
2028
2377
  { tools: ["*"], disallowedTools: WORKFLOW_SUBAGENT_DISALLOWED_TOOLS },
2029
2378
  // P-stall: the stall-watchdog emitter observes reasoning-loop events
2030
2379
  // (round/tool/usage) to detect a hang and abort `attemptSignal`.
2031
- emitter
2380
+ emitter,
2381
+ void 0,
2382
+ void 0,
2383
+ prompt,
2384
+ workflowAgentId
2032
2385
  );
2033
2386
  try {
2034
2387
  await runWithAgentContext(
@@ -2118,6 +2471,7 @@ ${WORKFLOW_SUBAGENT_SYSTEM_PROMPT_WITH_SCHEMA}` : WORKFLOW_SUBAGENT_SYSTEM_PROMP
2118
2471
  };
2119
2472
  let worktreeIsolation = null;
2120
2473
  let effectiveContext = config;
2474
+ let approvalCleanup;
2121
2475
  if (opts.isolation !== void 0 && opts.workingDir !== void 0) {
2122
2476
  throw new Error(
2123
2477
  "agent({workingDir, isolation}): incompatible options. workingDir pins the agent to a worktree you already own; isolation creates a fresh one and removes it afterwards. Pass one."
@@ -2125,10 +2479,9 @@ ${WORKFLOW_SUBAGENT_SYSTEM_PROMPT_WITH_SCHEMA}` : WORKFLOW_SUBAGENT_SYSTEM_PROMP
2125
2479
  }
2126
2480
  if (opts.isolation === "worktree") {
2127
2481
  worktreeIsolation = await provisionWorkflowWorktree(config);
2128
- effectiveContext = createDirScopedConfigOverride(
2129
- config,
2130
- worktreeIsolation.path
2131
- );
2482
+ effectiveContext = deriveWorktreeConfig(config, worktreeIsolation.path, {
2483
+ customIgnoreFiles: config.getFileFilteringOptions().customIgnoreFiles
2484
+ });
2132
2485
  } else if (opts.workingDir !== void 0) {
2133
2486
  if (typeof opts.workingDir !== "string" || opts.workingDir.trim().length === 0) {
2134
2487
  throw new Error(
@@ -2145,7 +2498,17 @@ ${WORKFLOW_SUBAGENT_SYSTEM_PROMPT_WITH_SCHEMA}` : WORKFLOW_SUBAGENT_SYSTEM_PROMP
2145
2498
  `agent({workingDir: ${sanitizeForErrorMessage(JSON.stringify(opts.workingDir))}}): ${sanitizeForErrorMessage(resolved.error)}`
2146
2499
  );
2147
2500
  }
2148
- effectiveContext = createDirScopedConfigOverride(config, resolved.path);
2501
+ effectiveContext = deriveWorktreeConfig(config, resolved.path, {
2502
+ customIgnoreFiles: config.getFileFilteringOptions().customIgnoreFiles
2503
+ });
2504
+ }
2505
+ if (effectiveContext !== config) {
2506
+ const approvalHandle = deriveApprovalModeConfig(
2507
+ effectiveContext,
2508
+ config.getApprovalMode()
2509
+ );
2510
+ approvalCleanup = approvalHandle.cleanup;
2511
+ effectiveContext = approvalHandle.config;
2149
2512
  }
2150
2513
  let onParentAbort;
2151
2514
  try {
@@ -2186,7 +2549,9 @@ ${WORKFLOW_SUBAGENT_SYSTEM_PROMPT_WITH_SCHEMA}` : WORKFLOW_SUBAGENT_SYSTEM_PROMP
2186
2549
  max_turns: resolveSubagentMaxTurns(),
2187
2550
  max_time_minutes: resolveSubagentMaxTimeMinutes()
2188
2551
  },
2189
- eventEmitter
2552
+ eventEmitter,
2553
+ taskName: String(ctx.get("task_prompt")),
2554
+ subagentId: workflowAgentId
2190
2555
  }
2191
2556
  );
2192
2557
  try {
@@ -2256,6 +2621,7 @@ ${WORKFLOW_SUBAGENT_SYSTEM_PROMPT_WITH_SCHEMA}` : WORKFLOW_SUBAGENT_SYSTEM_PROMP
2256
2621
  if (onParentAbort && signal) {
2257
2622
  signal.removeEventListener("abort", onParentAbort);
2258
2623
  }
2624
+ approvalCleanup?.();
2259
2625
  if (worktreeIsolation) {
2260
2626
  try {
2261
2627
  await cleanupWorkflowWorktree(worktreeIsolation);
@@ -2338,26 +2704,6 @@ async function provisionWorkflowWorktree(config) {
2338
2704
  };
2339
2705
  }
2340
2706
  __name(provisionWorkflowWorktree, "provisionWorkflowWorktree");
2341
- function createDirScopedConfigOverride(base, wtPath) {
2342
- const ov = Object.create(base);
2343
- ov.targetDir = wtPath;
2344
- ov.cwd = wtPath;
2345
- ov.getTargetDir = () => wtPath;
2346
- ov.getCwd = () => wtPath;
2347
- ov.getWorkingDir = () => wtPath;
2348
- ov.getProjectRoot = () => wtPath;
2349
- const wtFileService = new FileDiscoveryService(
2350
- wtPath,
2351
- base.getFileFilteringOptions().customIgnoreFiles
2352
- );
2353
- ov.fileDiscoveryService = wtFileService;
2354
- ov.getFileService = () => wtFileService;
2355
- const wtWorkspace = new WorkspaceContext(wtPath);
2356
- ov.workspaceContext = wtWorkspace;
2357
- ov.getWorkspaceContext = () => wtWorkspace;
2358
- return ov;
2359
- }
2360
- __name(createDirScopedConfigOverride, "createDirScopedConfigOverride");
2361
2707
  async function cleanupWorkflowWorktree(isolation) {
2362
2708
  const wtService = new GitWorktreeService(isolation.repoRoot);
2363
2709
  const [hasChanges, hasUnmerged] = await Promise.all([
@@ -2447,7 +2793,7 @@ function attachSchemaListeners(emitter, state) {
2447
2793
  }
2448
2794
  __name(attachSchemaListeners, "attachSchemaListeners");
2449
2795
  async function createSchemaConfigOverride(base, schema) {
2450
- const override = Object.create(base);
2796
+ const override = deriveConfig(base);
2451
2797
  await rebuildToolRegistryOnOverride(override, base);
2452
2798
  const registry = override.getToolRegistry();
2453
2799
  registry.registerTool(new SyntheticOutputTool(schema));
@@ -2897,6 +3243,21 @@ var WorkflowRunHandle = class {
2897
3243
  return this.scheduler.resume();
2898
3244
  }
2899
3245
  };
3246
+ var WorkflowScriptNotLaunchedError = class extends Error {
3247
+ constructor(detail) {
3248
+ super(
3249
+ `Workflow script is invalid and was not launched:
3250
+ ${detail}
3251
+
3252
+ Workflow scripts must be plain JavaScript \u2014 the usual causes are TypeScript syntax (type annotations, interfaces, generics) and broken string quoting or escaping. Metadata must use literal values.`
3253
+ );
3254
+ this.detail = detail;
3255
+ this.name = "WorkflowScriptNotLaunchedError";
3256
+ }
3257
+ static {
3258
+ __name(this, "WorkflowScriptNotLaunchedError");
3259
+ }
3260
+ };
2900
3261
  var WorkflowRunner = class {
2901
3262
  static {
2902
3263
  __name(this, "WorkflowRunner");
@@ -2911,6 +3272,16 @@ var WorkflowRunner = class {
2911
3272
  ) : void 0;
2912
3273
  const script = loaded?.script ?? options.script ?? "";
2913
3274
  const scriptPath = loaded?.scriptPath ?? options.scriptPath;
3275
+ try {
3276
+ compileWorkflowScript(script);
3277
+ } catch (error) {
3278
+ throw new WorkflowScriptNotLaunchedError(
3279
+ describeWorkflowCompileError(
3280
+ error,
3281
+ script.split(/\r\n|[\n\r\u2028\u2029]/).length
3282
+ )
3283
+ );
3284
+ }
2914
3285
  const runId = options.resumeFromRunId ?? `wf_${randomBytes2(8).toString("hex")}`;
2915
3286
  const storage = config.storage;
2916
3287
  const journal = storage ? new WorkflowJournal(storage.getWorkflowRunJournalPath(runId)) : void 0;
@@ -3104,17 +3475,18 @@ function extractErrorMessage2(error) {
3104
3475
  __name(extractErrorMessage2, "extractErrorMessage");
3105
3476
 
3106
3477
  // packages/core/src/tools/workflow/workflow.ts
3478
+ import { promises as fs } from "node:fs";
3107
3479
  import * as path from "node:path";
3108
3480
  var WORKFLOW_PARAM_SCHEMA = {
3109
3481
  type: "object",
3110
3482
  properties: {
3111
3483
  script: {
3112
3484
  type: "string",
3113
- 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 once progress has begun (a dispatch that produces no first response is bounded by the subagent time cap, not this watchdog); 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(1, 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.`
3485
+ 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(1, 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.`
3114
3486
  },
3115
3487
  scriptPath: {
3116
3488
  type: "string",
3117
- description: "Optional. Absolute path to a saved workflow `.js` file to load and run instead of inline `script`. Primarily set by the `/<name>` saved-workflow slash command. Provide exactly ONE of `script` or `scriptPath`. The file is read at execution time, so edits to a saved workflow take effect on the next run."
3489
+ description: "Optional. Absolute path to a workflow `.js` file to load and run instead of inline `script`. Primarily set by the `/<name>` saved-workflow slash command; a tool that generated a script for this run hands you its path the same way. The file must resolve inside a saved-workflow directory (`.qwen/workflows`, `~/.qwen/workflows`) or the generated-scripts root (`$QWEN_CODE_PROJECT_DIR/workflows/generated` \u2014 the per-project runtime dir, not the project tree) \u2014 any other path is refused. Provide exactly ONE of `script` or `scriptPath`. The file is read at execution time, so edits to a saved workflow take effect on the next run."
3118
3490
  },
3119
3491
  args: {
3120
3492
  description: "Optional structured value bound to the `args` global. Pass actual JSON, not a stringified value."
@@ -3147,9 +3519,29 @@ var WorkflowToolInvocation = class extends BaseToolInvocation {
3147
3519
  setCallId(callId) {
3148
3520
  this.callId = callId;
3149
3521
  }
3522
+ /**
3523
+ * Cache so the transcript header and the approval dialog cannot disagree,
3524
+ * and so an oversized script is scanned once per invocation rather than
3525
+ * once per surface that asks.
3526
+ */
3527
+ metaCache;
3528
+ resolveMeta() {
3529
+ if (this.metaCache === void 0) {
3530
+ this.metaCache = this.params.script ? readMetaForConfirmation(this.params.script) : null;
3531
+ }
3532
+ return this.metaCache;
3533
+ }
3150
3534
  getDescription() {
3535
+ const meta = this.resolveMeta();
3536
+ if (meta) {
3537
+ return `Run workflow: ${sanitizeLine(meta.name)}`;
3538
+ }
3151
3539
  if (this.params.scriptPath && this.params.script === void 0) {
3152
- return `Run saved workflow (${path.basename(this.params.scriptPath)})`;
3540
+ const kind = isGeneratedWorkflowScriptPath(
3541
+ this.config,
3542
+ this.params.scriptPath
3543
+ ) ? "generated workflow script" : "saved workflow";
3544
+ return `Run ${kind} (${path.basename(this.params.scriptPath)})`;
3153
3545
  }
3154
3546
  return `Run a workflow script (${this.params.script?.length ?? 0} chars)`;
3155
3547
  }
@@ -3159,6 +3551,62 @@ var WorkflowToolInvocation = class extends BaseToolInvocation {
3159
3551
  getDefaultPermission() {
3160
3552
  return Promise.resolve("ask");
3161
3553
  }
3554
+ /**
3555
+ * Show what is about to run, and scope the grant that approves it.
3556
+ *
3557
+ * Without this override the base class renders `Confirm WorkflowTool` over
3558
+ * `Run a workflow script (4127 chars)` — a character count standing in for
3559
+ * arbitrary model-authored JavaScript that may fan out to
3560
+ * `DEFAULT_MAX_AGENTS_PER_RUN` subagents, provision git worktrees and spend
3561
+ * an uncapped token budget. The asymmetry is visible within one run: the
3562
+ * subagent approvals this workflow bubbles up each get a full dialog.
3563
+ *
3564
+ * Two properties of the grant matter as much as the disclosure:
3565
+ *
3566
+ * - An inline `script` can never be pre-approved. It is fresh
3567
+ * model-authored source every time, so a blanket "always allow" would
3568
+ * transfer consent from the script the user read to every script the
3569
+ * model writes afterwards. `hideAlwaysAllow` removes the option and the
3570
+ * empty `permissionRules` stops `injectPermissionRulesIfMissing` from
3571
+ * supplying the bare-tool-name rule, which `buildPermissionRules`
3572
+ * documents as matching *all* invocations.
3573
+ * - A `scriptPath` names a file on disk that the user chose, so it can be
3574
+ * pre-approved — but scoped to that path. The rule is built with the
3575
+ * same helpers the matcher uses so a tool rename moves both sides.
3576
+ */
3577
+ async getConfirmationDetails(_abortSignal) {
3578
+ const meta = this.resolveMeta();
3579
+ const isGeneratedScriptPath = this.params.scriptPath !== void 0 && await isGeneratedWorkflowScriptPathCanonical(
3580
+ this.config,
3581
+ this.params.scriptPath
3582
+ );
3583
+ const body = buildConfirmationPrompt(
3584
+ this.params,
3585
+ meta,
3586
+ isGeneratedScriptPath
3587
+ );
3588
+ const banner = resolveUsageBanner(
3589
+ this.config,
3590
+ this.config.getWorkflowRunRegistry?.(),
3591
+ resolveMaxTokensPerWorkflow()
3592
+ );
3593
+ const isInlineScript = this.params.script !== void 0;
3594
+ const details = {
3595
+ type: "info",
3596
+ title: "Run a dynamic workflow?",
3597
+ prompt: banner ? `${banner}${body}` : body,
3598
+ // The body is a script excerpt and a phase list: rendering it as
3599
+ // Markdown would swallow the very characters the reader needs to see.
3600
+ renderPromptAsPlainText: true,
3601
+ hideAlwaysAllow: isInlineScript,
3602
+ permissionRules: isInlineScript ? [] : [
3603
+ `${getRuleDisplayName(resolveToolName(ToolNames.WORKFLOW))}(scriptPath:${this.params.scriptPath})`
3604
+ ],
3605
+ onConfirm: /* @__PURE__ */ __name(async (_outcome, _payload) => {
3606
+ }, "onConfirm")
3607
+ };
3608
+ return details;
3609
+ }
3162
3610
  async execute(signal, updateOutput, _shellExecutionConfig) {
3163
3611
  const runInBackground = this.params.run_in_background === true;
3164
3612
  if (runInBackground && signal.aborted) {
@@ -3182,6 +3630,16 @@ var WorkflowToolInvocation = class extends BaseToolInvocation {
3182
3630
  if (runInBackground && signal.aborted) {
3183
3631
  return backgroundStartCancelledResult();
3184
3632
  }
3633
+ if (error instanceof WorkflowScriptNotLaunchedError) {
3634
+ return {
3635
+ llmContent: [{ text: error.message }],
3636
+ returnDisplay: error.message,
3637
+ error: {
3638
+ message: error.message,
3639
+ type: "invalid_tool_params" /* INVALID_TOOL_PARAMS */
3640
+ }
3641
+ };
3642
+ }
3185
3643
  throw error;
3186
3644
  }
3187
3645
  if (runInBackground) {
@@ -3293,6 +3751,106 @@ function resolveUsageBanner(config, registry, budgetTotal) {
3293
3751
  return buildUsageBanner(budgetTotal);
3294
3752
  }
3295
3753
  __name(resolveUsageBanner, "resolveUsageBanner");
3754
+ var CONFIRM_SCRIPT_EXCERPT_CHARS = 1200;
3755
+ var CONFIRM_ARGS_CHARS = 300;
3756
+ var CONFIRM_MAX_PHASES = 12;
3757
+ function sanitizeLine(text) {
3758
+ return stripAnsiAndControl(text);
3759
+ }
3760
+ __name(sanitizeLine, "sanitizeLine");
3761
+ function sanitizeBlock(text) {
3762
+ return text.replace(/\t/g, " ").split("\n").map((line) => stripAnsiAndControl(line)).join("\n");
3763
+ }
3764
+ __name(sanitizeBlock, "sanitizeBlock");
3765
+ function clampForDisplay(text, max) {
3766
+ if (text.length <= max) return text;
3767
+ return `${text.slice(0, max)}
3768
+ \u2026 (${text.length - max} more characters)`;
3769
+ }
3770
+ __name(clampForDisplay, "clampForDisplay");
3771
+ function readMetaForConfirmation(script) {
3772
+ try {
3773
+ return extractAndStripMeta(script).meta;
3774
+ } catch {
3775
+ return null;
3776
+ }
3777
+ }
3778
+ __name(readMetaForConfirmation, "readMetaForConfirmation");
3779
+ function isGeneratedWorkflowScriptPath(config, scriptPath) {
3780
+ return isWithinRoot(scriptPath, config.storage.getGeneratedWorkflowsDir());
3781
+ }
3782
+ __name(isGeneratedWorkflowScriptPath, "isGeneratedWorkflowScriptPath");
3783
+ async function isGeneratedWorkflowScriptPathCanonical(config, scriptPath) {
3784
+ const root = config.storage.getGeneratedWorkflowsDir();
3785
+ if (await isSymlinkedRoot(root)) return false;
3786
+ let realScriptPath;
3787
+ try {
3788
+ realScriptPath = await fs.realpath(scriptPath);
3789
+ } catch {
3790
+ return isWithinRoot(scriptPath, root);
3791
+ }
3792
+ let realRoot;
3793
+ try {
3794
+ realRoot = await fs.realpath(root);
3795
+ } catch {
3796
+ realRoot = path.resolve(root);
3797
+ }
3798
+ return isWithinRoot(realScriptPath, realRoot);
3799
+ }
3800
+ __name(isGeneratedWorkflowScriptPathCanonical, "isGeneratedWorkflowScriptPathCanonical");
3801
+ function buildConfirmationPrompt(params, meta, isGeneratedScriptPath) {
3802
+ const lines = [];
3803
+ if (meta) {
3804
+ lines.push(`Workflow: ${sanitizeLine(meta.name)}`);
3805
+ lines.push(sanitizeLine(meta.description));
3806
+ } else if (params.scriptPath) {
3807
+ const label = isGeneratedScriptPath ? "Generated workflow script" : "Saved workflow";
3808
+ lines.push(`${label}: ${sanitizeLine(params.scriptPath)}`);
3809
+ } else {
3810
+ lines.push("Workflow: (the script declares no meta block)");
3811
+ }
3812
+ if (meta?.phases?.length) {
3813
+ const shown = meta.phases.slice(0, CONFIRM_MAX_PHASES);
3814
+ lines.push("", `Phases (${meta.phases.length}):`);
3815
+ shown.forEach((phase, i) => {
3816
+ const detail = phase.detail ? ` \u2014 ${sanitizeLine(phase.detail)}` : "";
3817
+ lines.push(` ${i + 1}. ${sanitizeLine(phase.title)}${detail}`);
3818
+ });
3819
+ if (meta.phases.length > shown.length) {
3820
+ lines.push(` \u2026 and ${meta.phases.length - shown.length} more`);
3821
+ }
3822
+ }
3823
+ if (params.scriptPath && meta) {
3824
+ lines.push("", `Loaded from: ${sanitizeLine(params.scriptPath)}`);
3825
+ }
3826
+ if (params.resumeFromRunId) {
3827
+ lines.push("", `Resuming run: ${sanitizeLine(params.resumeFromRunId)}`);
3828
+ }
3829
+ if (params.args !== void 0) {
3830
+ let rendered;
3831
+ try {
3832
+ rendered = JSON.stringify(params.args) ?? String(params.args);
3833
+ } catch {
3834
+ rendered = "(args are not JSON-serializable)";
3835
+ }
3836
+ lines.push(
3837
+ "",
3838
+ `Args: ${clampForDisplay(sanitizeLine(rendered), CONFIRM_ARGS_CHARS)}`
3839
+ );
3840
+ }
3841
+ if (params.script) {
3842
+ lines.push(
3843
+ "",
3844
+ "Script:",
3845
+ clampForDisplay(
3846
+ sanitizeBlock(params.script),
3847
+ CONFIRM_SCRIPT_EXCERPT_CHARS
3848
+ )
3849
+ );
3850
+ }
3851
+ return lines.join("\n");
3852
+ }
3853
+ __name(buildConfirmationPrompt, "buildConfirmationPrompt");
3296
3854
  function buildUsageBanner(total) {
3297
3855
  if (total === null) {
3298
3856
  return `> Workflows have no per-run token cap. Set \`${MAX_TOKENS_PER_WORKFLOW_ENV}=<n>\` (env) for a soft cap. Suppress this notice with \`skipWorkflowUsageWarning: true\` in settings.
@@ -3347,13 +3905,25 @@ function safeStringifyDisplayPayload(payload) {
3347
3905
  __name(safeStringifyDisplayPayload, "safeStringifyDisplayPayload");
3348
3906
  var WORKFLOW_TOOL_DESCRIPTION = `Execute a workflow script that orchestrates subagents deterministically.
3349
3907
 
3908
+ **Only on an explicit request**
3909
+
3910
+ Do not call this tool unless the user has asked for multi-agent orchestration. A run can dispatch up to ${DEFAULT_MAX_AGENTS_PER_RUN} subagents and spend tokens accordingly, so that scale has to be requested rather than inferred. It counts as requested when any of these holds:
3911
+
3912
+ - The user's message contains the word \`workflow\`; a system reminder confirms it when it does.
3913
+ - The user asked for orchestration in their own words \u2014 run a workflow, fan out agents, orchestrate this with subagents.
3914
+ - A skill or slash command the user invoked instructs you to use this tool.
3915
+ - The user named a saved workflow to run, reached through \`workflow('<name>')\` or \`scriptPath\`.
3916
+ - The user asked to resume or continue an earlier run, which is \`resumeFromRunId\`.
3917
+
3918
+ Otherwise do not call it, however well the task would parallelize. Do the work in the main loop, or spawn a single subagent for one self-contained piece. When a workflow would genuinely be the better tool, say in one sentence what it would fan out over and roughly how many agents that is, then let the user decide \u2014 and mention that including the word \`workflow\` next time skips the ask.
3919
+
3350
3920
  **What a workflow is for**
3351
3921
 
3352
3922
  Reach for one to be comprehensive (decompose the work and cover every part in parallel), to be confident (independent perspectives and adversarial checks before an answer is committed to), or to take on scale a single context cannot hold \u2014 migrations, audits, broad sweeps. The script is where that structure is encoded: what fans out, what verifies, what synthesizes. Parallelism on its own is not a reason; work that is already one short sequence of edits belongs in the main loop.
3353
3923
 
3354
3924
  **Runtime** \u2014 see the \`script\` parameter for the detailed authoring contract.
3355
3925
 
3356
- \`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 anywhere. Default \`max(1, 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. 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.
3926
+ \`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(1, 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. 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.
3357
3927
 
3358
3928
  **Scout first, then orchestrate**
3359
3929
 
@@ -3403,7 +3973,7 @@ var WorkflowTool = class extends BaseDeclarativeTool {
3403
3973
  const hasScript = typeof params.script === "string" && params.script.length > 0;
3404
3974
  const hasPath = typeof params.scriptPath === "string" && params.scriptPath.length > 0;
3405
3975
  if (!hasScript && !hasPath) {
3406
- return "WorkflowTool: provide `script` (inline source) or `scriptPath` (a saved workflow file).";
3976
+ return "WorkflowTool: provide `script` (inline source) or `scriptPath` (a workflow script file).";
3407
3977
  }
3408
3978
  if (hasScript && hasPath) {
3409
3979
  return "WorkflowTool: provide exactly one of `script` or `scriptPath`, not both.";
@@ -3428,6 +3998,11 @@ var WorkflowTool = class extends BaseDeclarativeTool {
3428
3998
  export {
3429
3999
  WorkflowTool
3430
4000
  };
4001
+ /**
4002
+ * @license
4003
+ * Copyright 2025 Google LLC
4004
+ * SPDX-License-Identifier: Apache-2.0
4005
+ */
3431
4006
  /**
3432
4007
  * @license
3433
4008
  * Copyright 2025 Qwen