@qwen-code/qwen-code 0.21.13 → 0.21.14

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 (293) hide show
  1. package/bundled/qc-helper/docs/configuration/settings.md +13 -7
  2. package/bundled/qc-helper/docs/features/code-review.md +5 -1
  3. package/bundled/qc-helper/docs/features/commands.md +120 -8
  4. package/bundled/qc-helper/docs/features/sub-agents.md +2 -2
  5. package/bundled/qc-helper/docs/qwen-serve-deploy-local.md +1 -1
  6. package/bundled/qc-helper/docs/qwen-serve.md +20 -3
  7. package/bundled/review/SKILL.md +50 -30
  8. package/chunks/{MaxSizedBox-UQALOVVT.js → MaxSizedBox-67IDQILY.js} +24 -23
  9. package/chunks/{StandaloneSessionPicker-KEGXNUG6.js → StandaloneSessionPicker-G4QJIRMH.js} +41 -40
  10. package/chunks/{acp-startup-profiler-NMDXYGDN.js → acp-startup-profiler-HUYGO57H.js} +2 -2
  11. package/chunks/{acpAgent-XPES32S7.js → acpAgent-BS3YYO33.js} +626 -141
  12. package/chunks/{agent-DPTOZFEM.js → agent-EHHEXKWN.js} +22 -21
  13. package/chunks/{agent-headless-GJCQMURW.js → agent-headless-UT2ZF76T.js} +22 -21
  14. package/chunks/{anthropicContentGenerator-G7BVXTKN.js → anthropicContentGenerator-M7XRJMSK.js} +3 -3
  15. package/chunks/{bridge-YNQBAA4Z.js → bridge-WQ4IL2RF.js} +26 -25
  16. package/chunks/{ca-4CQ6MYNQ.js → ca-SLZJD6QH.js} +8 -0
  17. package/chunks/{channel-management-service-GWY2GAIC.js → channel-management-service-X6LCQUAD.js} +1 -1
  18. package/chunks/{channel-settings-store-WNWYFHG7.js → channel-settings-store-ZDFXY7VY.js} +30 -29
  19. package/chunks/{channel-worker-group-7LXCMZ77.js → channel-worker-group-TJ35JDPE.js} +2 -2
  20. package/chunks/{channel-worker-manager-RYEME4ZZ.js → channel-worker-manager-G5LKWGOG.js} +2 -2
  21. package/chunks/{chunk-4PKCUT7F.js → chunk-2A6VQJYK.js} +6 -6
  22. package/chunks/chunk-2C6HJMG3.js +757 -0
  23. package/chunks/chunk-3PWCMXIR.js +9169 -0
  24. package/chunks/{chunk-BVJS5BSP.js → chunk-3PWNVF6N.js} +1 -1
  25. package/chunks/{chunk-X26JYGTD.js → chunk-3SL2P3WX.js} +1 -1
  26. package/chunks/{chunk-ZYBBISBY.js → chunk-3YRVPHT3.js} +15 -12
  27. package/chunks/{chunk-AS5IN4GK.js → chunk-47L5MLB5.js} +3 -3
  28. package/chunks/{chunk-3U3VAL47.js → chunk-4SR45OM4.js} +1 -1
  29. package/chunks/{chunk-OMLJNPBE.js → chunk-4ZMS3JCR.js} +1 -0
  30. package/chunks/{chunk-UKMR3CKV.js → chunk-4ZS3BLER.js} +3 -3
  31. package/chunks/{chunk-5EYKMUUY.js → chunk-544KT7X4.js} +1 -1
  32. package/chunks/{chunk-TUGSVUJB.js → chunk-55VKMB7X.js} +5 -5
  33. package/chunks/{chunk-GO7STP6N.js → chunk-5IJSFWQO.js} +4 -4
  34. package/chunks/{chunk-A4QRWUDE.js → chunk-5IYS4WWR.js} +1 -1
  35. package/chunks/{chunk-TS6625XH.js → chunk-5MK45KZ3.js} +9 -5
  36. package/chunks/{chunk-MLPXSYXR.js → chunk-6BJSYAML.js} +25 -16
  37. package/chunks/{chunk-V57QC6WW.js → chunk-6LAPGPVA.js} +5 -3
  38. package/chunks/{chunk-NNHNLJ2X.js → chunk-6RDZLBSJ.js} +240 -42
  39. package/chunks/{chunk-ZZO74WKW.js → chunk-73JUK3ZW.js} +24 -18
  40. package/chunks/{chunk-N5YPT6PH.js → chunk-7VNHO4MN.js} +7 -4
  41. package/chunks/{chunk-OVZPVYZB.js → chunk-AKBOLMUF.js} +95 -17
  42. package/chunks/{chunk-NHDR76JX.js → chunk-BQWNIPTE.js} +1 -1
  43. package/chunks/{chunk-IWPYVAO2.js → chunk-C3T6M24E.js} +2 -2
  44. package/chunks/{chunk-NM5V5OVW.js → chunk-CEXU72GE.js} +2 -2
  45. package/chunks/{chunk-AA2BEKV3.js → chunk-CH5OFRV7.js} +1 -1
  46. package/chunks/{chunk-MS7GNABG.js → chunk-CXJHQVEK.js} +8 -0
  47. package/chunks/{chunk-E23IPNGS.js → chunk-CZK622ZK.js} +12 -3
  48. package/chunks/{chunk-K5IDV3PC.js → chunk-D34RDOLP.js} +12 -2
  49. package/chunks/{chunk-OXCMMLED.js → chunk-DGJ7O55J.js} +1 -1
  50. package/chunks/{chunk-DGK6P3BQ.js → chunk-DHUPMYMC.js} +10 -10
  51. package/chunks/{chunk-O4D7SPJN.js → chunk-DRAONPUW.js} +3 -3
  52. package/chunks/{chunk-P7MPQI75.js → chunk-DVR7XKO5.js} +1 -1
  53. package/chunks/{chunk-PP4FUZNV.js → chunk-E5WQMF3K.js} +2 -2
  54. package/chunks/{chunk-4NFY2S7N.js → chunk-E7REAOTN.js} +15 -0
  55. package/chunks/{chunk-ZYYTZUI2.js → chunk-EOPBFLA5.js} +3 -3
  56. package/chunks/{chunk-OOQUVWIG.js → chunk-FN6M5WUL.js} +4 -4
  57. package/chunks/{chunk-DGZEMW5R.js → chunk-FS5NGKWC.js} +1 -1
  58. package/chunks/{chunk-MRMJCLIY.js → chunk-G6KI5UOJ.js} +2 -2
  59. package/chunks/{chunk-6ORZ2EDC.js → chunk-H3SHU2XU.js} +1 -1
  60. package/chunks/{chunk-GMIEIY3Y.js → chunk-I3N2Z25H.js} +1 -1
  61. package/chunks/{chunk-BHILXOC3.js → chunk-J63PKMYA.js} +1 -1
  62. package/chunks/{chunk-KD5BOPLP.js → chunk-J6YS7Z25.js} +98 -4
  63. package/chunks/chunk-K2Y45XXS.js +3887 -0
  64. package/chunks/{chunk-RVOJ2FBP.js → chunk-KC4WMLZO.js} +1486 -10574
  65. package/chunks/{chunk-LJQAUZMR.js → chunk-L3T4V5GZ.js} +925 -92
  66. package/chunks/{chunk-M6NDLY2T.js → chunk-LD5VIJ7S.js} +1 -1
  67. package/chunks/{chunk-RIAABG2K.js → chunk-LSO6EL4Y.js} +1 -1
  68. package/chunks/{chunk-XHRY7BXD.js → chunk-MDIGJH5X.js} +3 -3
  69. package/chunks/{chunk-MC4TLKEI.js → chunk-MVHJZ3FZ.js} +2 -2
  70. package/chunks/{chunk-YEYY7TEP.js → chunk-N6RSOOWJ.js} +5 -5
  71. package/chunks/{chunk-OD2WU5QY.js → chunk-NRPXRNN4.js} +1 -1
  72. package/chunks/{chunk-CKSJECTU.js → chunk-NVRMCWTP.js} +8 -4
  73. package/chunks/{chunk-Y3YCSWG5.js → chunk-OBJYN4MX.js} +1 -1
  74. package/chunks/{chunk-GGDBMYGZ.js → chunk-OEYAK5O6.js} +3 -3
  75. package/chunks/{chunk-6YKYPVDV.js → chunk-OEZCXK7Y.js} +3 -3
  76. package/chunks/{chunk-4S5337WV.js → chunk-OFTPCOGR.js} +4312 -2704
  77. package/chunks/{chunk-7UXUJ5T3.js → chunk-OJB5FYVK.js} +1 -1
  78. package/chunks/{chunk-WFSTRPRO.js → chunk-OJOP26ET.js} +1 -1
  79. package/chunks/{chunk-TIGA2IVL.js → chunk-OO4FKHLO.js} +2 -2
  80. package/chunks/{chunk-BZ263IKX.js → chunk-OVY67CYC.js} +1 -1
  81. package/chunks/{chunk-PQ36L4F5.js → chunk-P3AA6S7O.js} +1 -1
  82. package/chunks/{chunk-CU6GJD55.js → chunk-PCETXVVV.js} +1 -1
  83. package/chunks/{chunk-AFSG32D5.js → chunk-PHN4R2ZV.js} +1 -1
  84. package/chunks/{chunk-QF2NHSPB.js → chunk-PJSD2FOR.js} +233 -184
  85. package/chunks/{chunk-NEFOOD54.js → chunk-QAVTWAHL.js} +2 -2
  86. package/chunks/{chunk-AW4TRXOC.js → chunk-QEHH23OM.js} +1 -1
  87. package/chunks/{chunk-CZBYX5MY.js → chunk-QEJZUXSK.js} +1 -1
  88. package/chunks/{chunk-XIT3GURH.js → chunk-QRVHGEVY.js} +3 -3
  89. package/chunks/{chunk-M732YJPW.js → chunk-RXHBTKMG.js} +2 -2
  90. package/chunks/{chunk-JOOFMXGF.js → chunk-S7N3HUIB.js} +5 -5
  91. package/chunks/{chunk-76J3IJ3M.js → chunk-SCZU65AI.js} +3 -3
  92. package/chunks/{chunk-QIH2HAEN.js → chunk-SFJMFZT5.js} +1 -1
  93. package/chunks/{chunk-JNDY2MDR.js → chunk-SFTKAX4O.js} +1 -1
  94. package/chunks/{chunk-WSH6GRKG.js → chunk-SLILKYV2.js} +2 -2
  95. package/chunks/{chunk-DXIBNLBZ.js → chunk-SNQZZ765.js} +1 -1
  96. package/chunks/{chunk-V26NVGAU.js → chunk-TSMPNGBC.js} +8 -3
  97. package/chunks/{chunk-QV5YN5YD.js → chunk-U657UZJN.js} +5 -5
  98. package/chunks/{chunk-QNQAPSN2.js → chunk-UC67T4SF.js} +3 -1
  99. package/chunks/{chunk-O565M6A4.js → chunk-UYDGFWIJ.js} +199 -14
  100. package/chunks/{chunk-OY5RNSV4.js → chunk-V6WEMZPD.js} +3 -3
  101. package/chunks/{chunk-A267JX7H.js → chunk-VFP5YOHJ.js} +6 -6
  102. package/chunks/{chunk-HUTNYWBG.js → chunk-VTOLYFWM.js} +18 -10
  103. package/chunks/{chunk-EZ5RP345.js → chunk-W7EYJGN7.js} +40 -9
  104. package/chunks/{chunk-BKPPWD33.js → chunk-WAO53ZQF.js} +1 -1
  105. package/chunks/{chunk-S5DWMTHO.js → chunk-WP4WIUOJ.js} +2 -0
  106. package/chunks/{chunk-25EYDK42.js → chunk-WPVUOVYX.js} +1 -1
  107. package/chunks/{chunk-AXN7UPYQ.js → chunk-WSSH2BNO.js} +1 -1
  108. package/chunks/chunk-WZAD4ZNJ.js +59 -0
  109. package/chunks/{chunk-JUEPY766.js → chunk-XITLNXLX.js} +2 -2
  110. package/chunks/{chunk-EL5SXY3T.js → chunk-XT4RKHVE.js} +2 -2
  111. package/chunks/{chunk-IGGGG5CX.js → chunk-XYRBK56E.js} +4635 -1655
  112. package/chunks/{chunk-UZPM4XHR.js → chunk-Y4RVDOXV.js} +29 -8
  113. package/chunks/{chunk-QRCNA3SR.js → chunk-Y7QY6DKW.js} +49 -69
  114. package/chunks/{chunk-FDGGZIYW.js → chunk-YECDICIO.js} +2 -2
  115. package/chunks/{chunk-46UV252V.js → chunk-YHC2EYYG.js} +35 -38
  116. package/chunks/{chunk-U3VNBPUO.js → chunk-YHXQK4SR.js} +2 -2
  117. package/chunks/{chunk-A4MFR4C5.js → chunk-ZIGC3MUS.js} +2 -4
  118. package/chunks/{computer-use-77C5FHMW.js → computer-use-YORZJQE5.js} +22 -21
  119. package/chunks/{config-utils-IVHRSXWI.js → config-utils-NJQA5YLJ.js} +2 -2
  120. package/chunks/{contextCommand-PJ77GBWL.js → contextCommand-PACHGIF4.js} +24 -23
  121. package/chunks/{core-runtime-7VMIKUTG.js → core-runtime-6HD5DSPX.js} +22 -21
  122. package/chunks/{create-sub-session-2L5MQRN4.js → create-sub-session-IQFIPUQA.js} +26 -24
  123. package/chunks/{cron-create-H7UEPDSN.js → cron-create-NFRZEOQX.js} +2 -2
  124. package/chunks/{cron-delete-6SZK7YFM.js → cron-delete-GFVSVO7C.js} +2 -2
  125. package/chunks/{cron-list-H25JIHEZ.js → cron-list-NRW34CLU.js} +2 -2
  126. package/chunks/{daemon-2KTG7ZBN.js → daemon-XH76IXOC.js} +356 -21
  127. package/chunks/{daemon-git-worktree-guard-DXYIMWFT.js → daemon-git-worktree-guard-6P27GKSU.js} +24 -23
  128. package/chunks/{daemon-status-provider-ZDOYJCU6.js → daemon-status-provider-SXS66ZIR.js} +31 -30
  129. package/chunks/{daemon-trust-policy-E67OYUK2.js → daemon-trust-policy-5QJHAS3N.js} +29 -28
  130. package/chunks/{daemon-trust-policy-monitor-RYYGCQ3J.js → daemon-trust-policy-monitor-JA2WZRZ3.js} +29 -28
  131. package/chunks/{de-UBEBKG6V.js → de-AH4LGCF5.js} +8 -0
  132. package/chunks/{deferred-core-runtime-3SGXFXEQ.js → deferred-core-runtime-R2VWOVG3.js} +22 -21
  133. package/chunks/{discovery-ORA5J7YP.js → discovery-X2NV535U.js} +1 -1
  134. package/chunks/{dist-WJ4BHIEW.js → dist-ESS34DHC.js} +72 -0
  135. package/chunks/{earlyInputCapture-KJMLFVQV.js → earlyInputCapture-PQEEOFKJ.js} +22 -21
  136. package/chunks/{edit-I4LQFAEC.js → edit-RASZHTU2.js} +25 -23
  137. package/chunks/{en-X6YV7GME.js → en-MD3GP5YL.js} +8 -0
  138. package/chunks/{enter-worktree-YNPOJSRH.js → enter-worktree-CH5OMHJE.js} +22 -21
  139. package/chunks/{enterPlanMode-XCPK62ER.js → enterPlanMode-AQKR3CAH.js} +22 -21
  140. package/chunks/{environment-S7CTIHMX.js → environment-7QRYIEBA.js} +25 -24
  141. package/chunks/{errors-7HB2AIDS.js → errors-P2LL5452.js} +24 -23
  142. package/chunks/{exit-worktree-AIIY7SR6.js → exit-worktree-WUDL26CY.js} +22 -21
  143. package/chunks/{exitPlanMode-R4JY7V2O.js → exitPlanMode-JM75SAUI.js} +22 -21
  144. package/chunks/{fast-path-NDJV3ZFJ.js → fast-path-KVNSOHVA.js} +3 -3
  145. package/chunks/{fast-path-settings-LNOFM2YP.js → fast-path-settings-WHX3J3ZI.js} +2 -2
  146. package/chunks/{fr-VENTC2BS.js → fr-ZEML2JWS.js} +8 -0
  147. package/chunks/{gemini-RSUFP5OE.js → gemini-ADMD2EOS.js} +62 -61
  148. package/chunks/{geminiContentGenerator-SQ5XBPZ7.js → geminiContentGenerator-CS3M7SOS.js} +3 -3
  149. package/chunks/{glob-J4RUJAHX.js → glob-WIJOGYVV.js} +22 -21
  150. package/chunks/{goal-tools-VHTNVOKK.js → goal-tools-K5OHOJ6B.js} +1 -1
  151. package/chunks/{grep-VJWPLFOT.js → grep-CIFRQBR7.js} +22 -21
  152. package/chunks/{handleAutoUpdate-POCX2MNB.js → handleAutoUpdate-KJ4SN7DM.js} +26 -25
  153. package/chunks/{i18n-RM5YOICI.js → i18n-36SZUO4C.js} +23 -22
  154. package/chunks/{image-gen-EXECB5XM.js → image-gen-R4B5VUYB.js} +2 -2
  155. package/chunks/{initializer-Z2AFGBNR.js → initializer-CW5YCAOL.js} +29 -28
  156. package/chunks/{installationInfo-4I5FXNMH.js → installationInfo-NMQIOUGY.js} +23 -22
  157. package/chunks/{ja-QHT4EQTO.js → ja-UM5B2HMD.js} +8 -0
  158. package/chunks/{list-ZMBFIGZA.js → list-HHGT3S4P.js} +32 -31
  159. package/chunks/{loadedSettingsAdapter-T6TV4YJ7.js → loadedSettingsAdapter-SJ2MJF35.js} +29 -28
  160. package/chunks/{loggingContentGenerator-WF4ZOJEZ.js → loggingContentGenerator-GR2QQ2C5.js} +12 -10
  161. package/chunks/{loop-wakeup-WQS6JYAG.js → loop-wakeup-HWVUU5CF.js} +3 -3
  162. package/chunks/{managed-npm-update-E7IW6N7V.js → managed-npm-update-ADQJHKTO.js} +23 -22
  163. package/chunks/{mcp-6UNYX4HG.js → mcp-QW3OTL5W.js} +29 -28
  164. package/chunks/{monitor-EE2UYMGE.js → monitor-RJKPVERH.js} +22 -21
  165. package/chunks/{nonInteractiveCli-WAY237O4.js → nonInteractiveCli-MROMHSTL.js} +59 -57
  166. package/chunks/{notebook-edit-NTDY4QDU.js → notebook-edit-2ENWDBZO.js} +26 -24
  167. package/chunks/{openaiContentGenerator-YNFVJMRJ.js → openaiContentGenerator-Z3GPWJU4.js} +12 -11
  168. package/chunks/{pidfile-4XSFLYBZ.js → pidfile-5G42YSTP.js} +22 -21
  169. package/chunks/{processUtils-WDA2MJFD.js → processUtils-ZDMXYKQY.js} +2 -2
  170. package/chunks/{pt-VL3I5RNY.js → pt-5BMJ3XYH.js} +8 -0
  171. package/chunks/{qwenContentGenerator-434M7QKY.js → qwenContentGenerator-NLEMBZVU.js} +25 -24
  172. package/chunks/{qwenOAuth2-GMYZOO6A.js → qwenOAuth2-EBV52DWJ.js} +3 -3
  173. package/chunks/{read-file-TAFBKMNI.js → read-file-5BYIF53O.js} +9 -7
  174. package/chunks/{record-artifact-SEYFJEJF.js → record-artifact-GLU3UWBV.js} +3 -1
  175. package/chunks/{resumeHistoryUtils-EVG3WYK2.js → resumeHistoryUtils-AFTBRS3G.js} +25 -24
  176. package/chunks/{ripGrep-WOEK2PXS.js → ripGrep-NN7AOLQY.js} +22 -21
  177. package/chunks/{ru-4RCKL4PY.js → ru-6GL66ORV.js} +8 -0
  178. package/chunks/{run-qwen-serve-3QSGRXAN.js → run-qwen-serve-UR3DYDAF.js} +49 -40
  179. package/chunks/{runtime-5MLLZ7DC.js → runtime-PR5RKGNH.js} +32 -31
  180. package/chunks/{scheduler-RPBJ63CH.js → scheduler-GPMLVKJM.js} +24 -23
  181. package/chunks/{sdk-exporters-http-XUVP63H6.js → sdk-exporters-http-NC746HLT.js} +2 -2
  182. package/chunks/{sdk-impl-YXUEN2Z2.js → sdk-impl-YVL7BP6Y.js} +2 -2
  183. package/chunks/{send-message-VZENRWRH.js → send-message-TNBG5EVA.js} +1 -1
  184. package/chunks/{serve-HS3XLPXU.js → serve-E7V2JVA2.js} +29 -30
  185. package/chunks/{server-TC4A7AAZ.js → server-YXB3DBN7.js} +1267 -165
  186. package/chunks/{session-UBOFXVMN.js → session-DZEAUT7S.js} +60 -58
  187. package/chunks/{settings-D5644OM5.js → settings-ESZ3NWAP.js} +28 -27
  188. package/chunks/{shell-3PZULQQV.js → shell-JMSK5WIL.js} +22 -21
  189. package/chunks/{skill-PEVVXQ3L.js → skill-5K5CSUJV.js} +11 -9
  190. package/chunks/{skill-settings-J65JKKES.js → skill-settings-V64NIOTI.js} +28 -27
  191. package/chunks/{spawnChannel-IYGXRHSQ.js → spawnChannel-S63APBZZ.js} +24 -23
  192. package/chunks/{standalone-update-IFM53PE7.js → standalone-update-P42HDFXX.js} +24 -23
  193. package/chunks/{startInteractiveUI-3AVH7L6H.js → startInteractiveUI-LFBLFHJ4.js} +262 -191
  194. package/chunks/{task-create-FCBDX7UH.js → task-create-EILHJJB7.js} +4 -4
  195. package/chunks/{task-list-YIYIUFUA.js → task-list-WGJR6YL5.js} +18 -4
  196. package/chunks/{task-update-MYPFVOVM.js → task-update-XZAHVXJ5.js} +79 -8
  197. package/chunks/{team-create-ZAIA7KAV.js → team-create-EDNOUM2U.js} +23 -23
  198. package/chunks/{team-delete-6UMU4XLS.js → team-delete-UEP4QOOT.js} +3 -3
  199. package/chunks/{team-plan-approval-UNIUS7OD.js → team-plan-approval-QRSNK2DX.js} +22 -21
  200. package/chunks/{terminal-image-renderer-G343P2RV.js → terminal-image-renderer-6J2NPL32.js} +22 -21
  201. package/chunks/{theme-manager-Z3RIT7DB.js → theme-manager-WJMLRBXS.js} +22 -21
  202. package/chunks/{todoWrite-U2R4NVF4.js → todoWrite-ATS62CAP.js} +1 -1
  203. package/chunks/{tool-search-5R2OE4C7.js → tool-search-MZ6WU7DM.js} +9 -7
  204. package/chunks/{total-session-admission-4KBHMQQ2.js → total-session-admission-DQVW2LIP.js} +26 -25
  205. package/chunks/{trustedFolders-LK6T4XC7.js → trustedFolders-QMH25GOX.js} +23 -22
  206. package/chunks/{update-relaunch-UBKROIC6.js → update-relaunch-EG75LLW5.js} +5 -5
  207. package/chunks/{updateCheck-W4Y2GFSD.js → updateCheck-MTZIVGT5.js} +25 -24
  208. package/chunks/{useAutoAcceptIndicator-C7BEICBF.js → useAutoAcceptIndicator-IGCW5EPO.js} +31 -30
  209. package/chunks/{validateNonInterActiveAuth-LTEI2TB6.js → validateNonInterActiveAuth-D5FPAB2C.js} +56 -54
  210. package/chunks/{version-G5A5DGVS.js → version-UOLDLLRB.js} +1 -1
  211. package/chunks/{web-fetch-RTEQTR5Z.js → web-fetch-QKKW6CWH.js} +11 -8
  212. package/chunks/{web-search-5OXHEZPV.js → web-search-JYRBZMCW.js} +2 -2
  213. package/chunks/{workflow-ISQJHPG2.js → workflow-SR7SEAU7.js} +139 -37
  214. package/chunks/{workspace-providers-status-2ZPZPUPZ.js → workspace-providers-status-OXGV4EFF.js} +32 -31
  215. package/chunks/{workspace-registration-store-CYNY6IP6.js → workspace-registration-store-V5EGKLBH.js} +1 -1
  216. package/chunks/{workspace-registry-34GTUUHB.js → workspace-registry-KJVIYTF5.js} +26 -25
  217. package/chunks/{workspace-service-XCDQLE2Y.js → workspace-service-6RLSGUB5.js} +33 -32
  218. package/chunks/{workspace-skills-status-RS4O7AIJ.js → workspace-skills-status-BHFEPDGH.js} +30 -29
  219. package/chunks/{workspace-trust-reconciler-AYGXC7A3.js → workspace-trust-reconciler-DB5ERSUN.js} +33 -32
  220. package/chunks/{write-file-EWXKVVXF.js → write-file-IUP4GTZ4.js} +22 -21
  221. package/chunks/{zh-TW-SQ4HTSCW.js → zh-TW-LVLBK4KF.js} +8 -0
  222. package/chunks/{zh-LMSTK4WD.js → zh-UBMWS2BJ.js} +8 -0
  223. package/chunks/{zoom-image-4BFYJ3HG.js → zoom-image-SRBDTIVA.js} +14 -11
  224. package/cli.js +13 -13
  225. package/locales/ca.js +13 -0
  226. package/locales/de.js +12 -0
  227. package/locales/en.js +11 -0
  228. package/locales/fr.js +13 -0
  229. package/locales/ja.js +13 -0
  230. package/locales/pt.js +12 -0
  231. package/locales/ru.js +12 -0
  232. package/locales/zh-TW.js +11 -0
  233. package/locales/zh.js +11 -0
  234. package/package.json +3 -3
  235. package/web-shell/assets/{arc-CgOpDKvm.js → arc-DItbX0DI.js} +1 -1
  236. package/web-shell/assets/{architectureDiagram-3BPJPVTR-0Ag_m34F.js → architectureDiagram-3BPJPVTR-CmnIlH8y.js} +1 -1
  237. package/web-shell/assets/{blockDiagram-GPEHLZMM-IwTwFau0.js → blockDiagram-GPEHLZMM-pObnB9kw.js} +1 -1
  238. package/web-shell/assets/{c4Diagram-AAUBKEIU-DLa5GUv8.js → c4Diagram-AAUBKEIU-BNBmMS0Y.js} +1 -1
  239. package/web-shell/assets/channel-hZnMfWA9.js +1 -0
  240. package/web-shell/assets/{chunk-2J33WTMH-DcYP-WFG.js → chunk-2J33WTMH-Dz4JBOO6.js} +1 -1
  241. package/web-shell/assets/{chunk-4BX2VUAB-C8MVPMiQ.js → chunk-4BX2VUAB-Cz2GnvAR.js} +1 -1
  242. package/web-shell/assets/{chunk-55IACEB6-BUi4Yfv3.js → chunk-55IACEB6-CC6kOQYx.js} +1 -1
  243. package/web-shell/assets/{chunk-727SXJPM-Cy3Su2YY.js → chunk-727SXJPM-Z4lY4gbh.js} +1 -1
  244. package/web-shell/assets/{chunk-AQP2D5EJ-Dp8Teqv6.js → chunk-AQP2D5EJ-Yz0hZr3D.js} +1 -1
  245. package/web-shell/assets/{chunk-FMBD7UC4-BDTDM-4j.js → chunk-FMBD7UC4-nKmTWTv9.js} +1 -1
  246. package/web-shell/assets/{chunk-ND2GUHAM-7HfDt0r2.js → chunk-ND2GUHAM-CjZz0f6Y.js} +1 -1
  247. package/web-shell/assets/{chunk-QZHKN3VN-BIBU0uCF.js → chunk-QZHKN3VN-Bab3FpuS.js} +1 -1
  248. package/web-shell/assets/classDiagram-4FO5ZUOK-BRnxm8DX.js +1 -0
  249. package/web-shell/assets/classDiagram-v2-Q7XG4LA2-BRnxm8DX.js +1 -0
  250. package/web-shell/assets/{cose-bilkent-S5V4N54A-DRLdcg9p.js → cose-bilkent-S5V4N54A-BuSAGFox.js} +1 -1
  251. package/web-shell/assets/{dagre-BM42HDAG-DCCgDwqW.js → dagre-BM42HDAG-CRZXTg3g.js} +1 -1
  252. package/web-shell/assets/{diagram-2AECGRRQ-CsBTBmk3.js → diagram-2AECGRRQ-BFx1Ayrz.js} +1 -1
  253. package/web-shell/assets/{diagram-5GNKFQAL-C9qjH8Lt.js → diagram-5GNKFQAL-B2hMZ3gS.js} +1 -1
  254. package/web-shell/assets/{diagram-KO2AKTUF-Brjs_lj2.js → diagram-KO2AKTUF-DKxAQLmc.js} +1 -1
  255. package/web-shell/assets/{diagram-LMA3HP47-DtiWCl_F.js → diagram-LMA3HP47-Bo1xGqVY.js} +1 -1
  256. package/web-shell/assets/{diagram-OG6HWLK6-DmfKLkBT.js → diagram-OG6HWLK6-B9NG78d-.js} +1 -1
  257. package/web-shell/assets/{erDiagram-TEJ5UH35-Bve_4deH.js → erDiagram-TEJ5UH35-DltQKiqQ.js} +1 -1
  258. package/web-shell/assets/{flowDiagram-I6XJVG4X-C2_kXCcV.js → flowDiagram-I6XJVG4X-5xXGmS4I.js} +1 -1
  259. package/web-shell/assets/{ganttDiagram-6RSMTGT7-BSBIjiTF.js → ganttDiagram-6RSMTGT7-bhGL5n0l.js} +1 -1
  260. package/web-shell/assets/{gitGraphDiagram-PVQCEYII-CyebwI55.js → gitGraphDiagram-PVQCEYII-ZYnz9hgh.js} +1 -1
  261. package/web-shell/assets/{index-d0yfnV1M.js → index-CBBeUArD.js} +1 -1
  262. package/web-shell/assets/index-CbgU-jUo.css +5 -0
  263. package/web-shell/assets/index-_nhzXqab.js +1750 -0
  264. package/web-shell/assets/{infoDiagram-5YYISTIA-CSDGnWxU.js → infoDiagram-5YYISTIA-Cg-jamQf.js} +1 -1
  265. package/web-shell/assets/{ishikawaDiagram-YF4QCWOH-BK4jU13p.js → ishikawaDiagram-YF4QCWOH-CcmvKlyq.js} +1 -1
  266. package/web-shell/assets/{journeyDiagram-JHISSGLW-D_W6j-oF.js → journeyDiagram-JHISSGLW-BRsOQZp1.js} +1 -1
  267. package/web-shell/assets/{kanban-definition-UN3LZRKU-C7xf-SdC.js → kanban-definition-UN3LZRKU-xW-dmEHK.js} +1 -1
  268. package/web-shell/assets/{linear-DQmzxpxd.js → linear-ClBfEZH2.js} +1 -1
  269. package/web-shell/assets/{mermaid.core-9P7AGOLG.js → mermaid.core-D65NDkzc.js} +5 -5
  270. package/web-shell/assets/{mindmap-definition-RKZ34NQL-DgcgMyPk.js → mindmap-definition-RKZ34NQL-CyvFslYa.js} +1 -1
  271. package/web-shell/assets/{pieDiagram-4H26LBE5-3wWGb9eG.js → pieDiagram-4H26LBE5-BwSefMyG.js} +1 -1
  272. package/web-shell/assets/{quadrantDiagram-W4KKPZXB-BeCXnQw9.js → quadrantDiagram-W4KKPZXB-GqBJspFS.js} +1 -1
  273. package/web-shell/assets/{requirementDiagram-4Y6WPE33-Bi1UOHDz.js → requirementDiagram-4Y6WPE33-B137PlTJ.js} +1 -1
  274. package/web-shell/assets/{sankeyDiagram-5OEKKPKP-lrLUjjbb.js → sankeyDiagram-5OEKKPKP-maHkkt8i.js} +1 -1
  275. package/web-shell/assets/{sequenceDiagram-3UESZ5HK-BFuqKz6Q.js → sequenceDiagram-3UESZ5HK-DJ1mRaG3.js} +1 -1
  276. package/web-shell/assets/{stateDiagram-AJRCARHV-8DemQLhu.js → stateDiagram-AJRCARHV-aRmP7Q4i.js} +1 -1
  277. package/web-shell/assets/stateDiagram-v2-BHNVJYJU-Db39gvZ_.js +1 -0
  278. package/web-shell/assets/{timeline-definition-PNZ67QCA-uzEuVQXg.js → timeline-definition-PNZ67QCA-CIQ3BRPA.js} +1 -1
  279. package/web-shell/assets/{vennDiagram-CIIHVFJN-BQTeZ_-o.js → vennDiagram-CIIHVFJN-DR9VPd5h.js} +1 -1
  280. package/web-shell/assets/{wardley-L42UT6IY-B6yM5Im7.js → wardley-L42UT6IY-ZcfIbT4D.js} +1 -1
  281. package/web-shell/assets/{wardleyDiagram-YWT4CUSO-ChM8bmgn.js → wardleyDiagram-YWT4CUSO-D0jgPi4T.js} +1 -1
  282. package/web-shell/assets/{xychartDiagram-2RQKCTM6-oNG6HyB1.js → xychartDiagram-2RQKCTM6-BGWU4s5o.js} +1 -1
  283. package/web-shell/index.html +2 -2
  284. package/chunks/chunk-MPHPFVKK.js +0 -48
  285. package/chunks/chunk-RLKC46YT.js +0 -3582
  286. package/chunks/chunk-UPDOZBWO.js +0 -358
  287. package/web-shell/assets/channel-BrGVBa2L.js +0 -1
  288. package/web-shell/assets/classDiagram-4FO5ZUOK-B5TUzJzI.js +0 -1
  289. package/web-shell/assets/classDiagram-v2-Q7XG4LA2-B5TUzJzI.js +0 -1
  290. package/web-shell/assets/index-CIDsgxTe.js +0 -1792
  291. package/web-shell/assets/index-DiQnWi_E.css +0 -5
  292. package/web-shell/assets/stateDiagram-v2-BHNVJYJU-DhM5ixYd.js +0 -1
  293. /package/chunks/{chunk-NTTBXH7U.js → chunk-UGK4K2N2.js} +0 -0
@@ -0,0 +1,757 @@
1
+ // Force strict mode and setup for ESM
2
+ "use strict";
3
+ import {
4
+ isWithinRoot
5
+ } from "./chunk-3PWCMXIR.js";
6
+ import {
7
+ BaseDeclarativeTool,
8
+ BaseToolInvocation,
9
+ ToolDisplayNames,
10
+ ToolNames
11
+ } from "./chunk-6HY6IF3Z.js";
12
+ import {
13
+ isNodeError
14
+ } from "./chunk-BUQDLC2G.js";
15
+ import {
16
+ init_esbuild_shims
17
+ } from "./chunk-5O2XNYP6.js";
18
+ import {
19
+ __name
20
+ } from "./chunk-J2S4EL5Y.js";
21
+
22
+ // packages/core/src/tools/record-artifact.ts
23
+ init_esbuild_shims();
24
+ import { lstatSync, readlinkSync, realpathSync } from "node:fs";
25
+ import fs from "node:fs/promises";
26
+ import path2 from "node:path";
27
+
28
+ // packages/core/src/utils/workspace-artifact-path.ts
29
+ init_esbuild_shims();
30
+ import path from "node:path";
31
+ var WORKTREE_DIR_RE = /^(.*)[\\/]\.qwen[\\/]worktrees[\\/][^\\/]+$/;
32
+ function resolveBoundWorkspaceRoot(targetDir) {
33
+ const resolved = path.resolve(targetDir);
34
+ const match = resolved.match(WORKTREE_DIR_RE);
35
+ if (!match) {
36
+ return resolved;
37
+ }
38
+ const base = match[1];
39
+ if (!base) {
40
+ return path.parse(resolved).root;
41
+ }
42
+ if (/^[A-Za-z]:$/.test(base)) {
43
+ return `${base}${path.sep}`;
44
+ }
45
+ return base;
46
+ }
47
+ __name(resolveBoundWorkspaceRoot, "resolveBoundWorkspaceRoot");
48
+ function toCanonicalWorkspaceArtifactPath(absoluteFilePath, targetDir) {
49
+ const baseDir = resolveBoundWorkspaceRoot(targetDir);
50
+ const relativePath = path.relative(baseDir, path.resolve(absoluteFilePath));
51
+ if (!relativePath || relativePath === ".." || relativePath.startsWith(`..${path.sep}`) || path.isAbsolute(relativePath)) {
52
+ return null;
53
+ }
54
+ return relativePath.split(path.sep).join("/");
55
+ }
56
+ __name(toCanonicalWorkspaceArtifactPath, "toCanonicalWorkspaceArtifactPath");
57
+
58
+ // packages/core/src/tools/record-artifact.ts
59
+ var DESCRIPTION = `Registers a session artifact so clients can show it in an artifacts panel. Use it after creating a useful file, URL, image, report, notebook, or other intermediate result that the user may want to open later, unless the producing tool already returned artifact metadata. For example, write_file automatically records HTML, image, PDF, notebook, CSV, and Excel files it writes inside the workspace, so do not call record_artifact again for the same workspacePath; still call it for other formats such as Markdown, JSON, and plain text, and for files produced outside write_file. When the session creates a remote resource, such as a pull request, issue, or comment submitted via gh, record its URL with kind "link" and the url locator so the user can reopen it later.
60
+
61
+ Provide exactly one locator: workspacePath, managedId, or url. Do not use the old "path" field. Use the Artifact tool, not record_artifact, for published interactive HTML artifacts.
62
+
63
+ For workspace files, workspacePath must be relative to the current execution directory (for example "report.csv" or "reports/summary.html") or an absolute path inside the bound workspace. Do not add workspace folder prefixes such as "w/agent/", and do not use ".." to walk up from a worktree. This tool resolves the file, verifies it exists as a regular file inside the workspace, then stores a workspace-root-relative canonical workspacePath. A successful result includes status=available, the canonical workspacePath, and resolvedPath. If verification fails, the tool returns an error \u2014 do not tell the user the artifact can be opened or downloaded.`;
64
+ var ARTIFACT_TITLE_MAX_LENGTH = 200;
65
+ var ARTIFACT_WORKSPACE_PATH_MAX_LENGTH = 500;
66
+ var WORKSPACE_PATH_HINT = '"workspacePath" must be relative to the current execution directory (for example "report.csv") or an absolute path inside the workspace. Do not add workspace folder prefixes such as "w/agent/".';
67
+ var RecordArtifactInvocation = class extends BaseToolInvocation {
68
+ constructor(params, config) {
69
+ super(params);
70
+ this.config = config;
71
+ }
72
+ static {
73
+ __name(this, "RecordArtifactInvocation");
74
+ }
75
+ getDescription() {
76
+ return `Recording artifact ${this.params.title}`;
77
+ }
78
+ async execute(_signal) {
79
+ const workspacePathInput = trimOptional(this.params.workspacePath);
80
+ if (workspacePathInput) {
81
+ const locator = await resolveWorkspaceArtifactLocator(
82
+ workspacePathInput,
83
+ this.config
84
+ );
85
+ if (!locator.ok) {
86
+ return {
87
+ llmContent: locator.message,
88
+ returnDisplay: locator.message,
89
+ error: {
90
+ message: locator.message,
91
+ type: locator.type
92
+ }
93
+ };
94
+ }
95
+ const artifact2 = {
96
+ title: this.params.title.trim(),
97
+ kind: this.params.kind,
98
+ storage: "workspace",
99
+ description: trimOptional(this.params.description),
100
+ workspacePath: locator.workspacePath,
101
+ mimeType: trimOptional(this.params.mimeType),
102
+ sizeBytes: this.params.sizeBytes ?? locator.sizeBytes,
103
+ metadata: this.params.metadata
104
+ };
105
+ return {
106
+ llmContent: formatWorkspaceSuccess(artifact2.title, locator),
107
+ returnDisplay: formatWorkspaceSuccess(artifact2.title, locator),
108
+ artifacts: [artifact2]
109
+ };
110
+ }
111
+ const artifact = {
112
+ title: this.params.title.trim(),
113
+ kind: this.params.kind,
114
+ storage: this.params.storage ?? inferStorage(this.params),
115
+ description: trimOptional(this.params.description),
116
+ managedId: trimOptional(this.params.managedId),
117
+ url: trimOptional(this.params.url),
118
+ mimeType: trimOptional(this.params.mimeType),
119
+ sizeBytes: this.params.sizeBytes,
120
+ metadata: this.params.metadata
121
+ };
122
+ return {
123
+ llmContent: `Recorded artifact "${artifact.title}".`,
124
+ returnDisplay: `Recorded artifact **${artifact.title}**.`,
125
+ artifacts: [artifact]
126
+ };
127
+ }
128
+ };
129
+ var RecordArtifactTool = class _RecordArtifactTool extends BaseDeclarativeTool {
130
+ constructor(config) {
131
+ super(
132
+ _RecordArtifactTool.Name,
133
+ ToolDisplayNames.RECORD_ARTIFACT,
134
+ DESCRIPTION,
135
+ "other" /* Other */,
136
+ {
137
+ type: "object",
138
+ additionalProperties: false,
139
+ properties: {
140
+ title: {
141
+ type: "string",
142
+ description: "Concise title shown in the client artifact list."
143
+ },
144
+ kind: {
145
+ type: "string",
146
+ enum: [
147
+ "file",
148
+ "link",
149
+ "html",
150
+ "image",
151
+ "video",
152
+ "audio",
153
+ "pdf",
154
+ "notebook",
155
+ "other"
156
+ ],
157
+ description: "Best-effort artifact type for client rendering."
158
+ },
159
+ storage: {
160
+ type: "string",
161
+ enum: ["workspace", "external_url", "managed"],
162
+ description: "Storage class. Omit it to infer from the provided locator."
163
+ },
164
+ description: {
165
+ type: "string",
166
+ description: "Optional short description for the user."
167
+ },
168
+ workspacePath: {
169
+ type: "string",
170
+ description: "Path relative to the current execution directory, or an absolute path inside the bound workspace. The tool verifies the file and stores a workspace-root-relative canonical path."
171
+ },
172
+ managedId: {
173
+ type: "string",
174
+ description: "Opaque identifier for a resource managed by an extension or tool."
175
+ },
176
+ url: {
177
+ type: "string",
178
+ description: "HTTP or HTTPS URL that the user can open for details."
179
+ },
180
+ mimeType: {
181
+ type: "string",
182
+ description: "Optional MIME type."
183
+ },
184
+ sizeBytes: {
185
+ type: "integer",
186
+ minimum: 0,
187
+ description: "Optional size in bytes."
188
+ },
189
+ metadata: {
190
+ type: "object",
191
+ additionalProperties: {
192
+ anyOf: [
193
+ { type: "string" },
194
+ { type: "number" },
195
+ { type: "boolean" },
196
+ { type: "null" }
197
+ ]
198
+ },
199
+ description: "Small primitive metadata bag for client-specific display hints."
200
+ }
201
+ },
202
+ required: ["title"]
203
+ },
204
+ true,
205
+ false,
206
+ true,
207
+ false,
208
+ "artifact url link file image report notebook dashboard"
209
+ );
210
+ this.config = config;
211
+ }
212
+ static {
213
+ __name(this, "RecordArtifactTool");
214
+ }
215
+ static Name = ToolNames.RECORD_ARTIFACT;
216
+ validateToolParams(params) {
217
+ if (hasLegacyPathField(params)) {
218
+ return '"path" is not supported; use "workspacePath" for a file in the current execution directory (relative to that directory, or an absolute path inside the workspace). Example: "report.csv".';
219
+ }
220
+ return super.validateToolParams(params);
221
+ }
222
+ validateToolParamValues(params) {
223
+ params.title = (params.title ?? "").trim();
224
+ const titleError = validateString(
225
+ params.title,
226
+ "title",
227
+ ARTIFACT_TITLE_MAX_LENGTH,
228
+ true
229
+ );
230
+ if (titleError) {
231
+ return titleError;
232
+ }
233
+ const descriptionError = validateString(
234
+ params.description,
235
+ "description",
236
+ 1e3,
237
+ false
238
+ );
239
+ if (descriptionError) {
240
+ return descriptionError;
241
+ }
242
+ const mimeTypeError = validateString(
243
+ params.mimeType,
244
+ "mimeType",
245
+ 120,
246
+ false
247
+ );
248
+ if (mimeTypeError) {
249
+ return mimeTypeError;
250
+ }
251
+ if (params.kind && !isArtifactKind(params.kind)) {
252
+ return '"kind" must be a supported artifact kind';
253
+ }
254
+ if (params.storage && params.storage !== "workspace" && params.storage !== "external_url" && params.storage !== "managed") {
255
+ return '"storage" must be workspace, external_url, or managed';
256
+ }
257
+ const locators = [
258
+ trimOptional(params.workspacePath),
259
+ trimOptional(params.managedId),
260
+ trimOptional(params.url)
261
+ ].filter(Boolean);
262
+ if (locators.length !== 1) {
263
+ return 'Provide exactly one of "workspacePath", "managedId", or "url"';
264
+ }
265
+ const inferredStorage = inferStorage(params);
266
+ if (params.storage && params.storage !== inferredStorage) {
267
+ return `"storage" must be "${inferredStorage}" for the provided locator`;
268
+ }
269
+ if (params.workspacePath) {
270
+ const workspacePathError = validateWorkspacePath(
271
+ params.workspacePath,
272
+ this.config.getTargetDir()
273
+ );
274
+ if (workspacePathError) {
275
+ return workspacePathError;
276
+ }
277
+ }
278
+ if (params.managedId) {
279
+ const managedIdError = validateManagedId(params.managedId);
280
+ if (managedIdError) {
281
+ return managedIdError;
282
+ }
283
+ }
284
+ if (params.url) {
285
+ try {
286
+ const parsed = new URL(params.url);
287
+ if (parsed.username || parsed.password) {
288
+ return '"url" must not include credentials';
289
+ }
290
+ if (parsed.protocol !== "http:" && parsed.protocol !== "https:") {
291
+ return '"url" must use http or https';
292
+ }
293
+ } catch {
294
+ return '"url" must be a valid URL';
295
+ }
296
+ }
297
+ if (params.sizeBytes !== void 0 && (!Number.isSafeInteger(params.sizeBytes) || params.sizeBytes < 0)) {
298
+ return '"sizeBytes" must be a non-negative safe integer';
299
+ }
300
+ const metadataError = validateMetadata(params.metadata);
301
+ if (metadataError) {
302
+ return metadataError;
303
+ }
304
+ return null;
305
+ }
306
+ createInvocation(params) {
307
+ return new RecordArtifactInvocation(params, this.config);
308
+ }
309
+ };
310
+ function inferStorage(params) {
311
+ if (trimOptional(params.workspacePath)) {
312
+ return "workspace";
313
+ }
314
+ if (trimOptional(params.managedId)) {
315
+ return "managed";
316
+ }
317
+ return "external_url";
318
+ }
319
+ __name(inferStorage, "inferStorage");
320
+ function trimOptional(value) {
321
+ const trimmed = value?.trim();
322
+ return trimmed ? trimmed : void 0;
323
+ }
324
+ __name(trimOptional, "trimOptional");
325
+ function validateString(value, field, maxLength, required) {
326
+ const trimmed = value?.trim();
327
+ if (!trimmed) {
328
+ return required ? `Missing or empty "${field}"` : null;
329
+ }
330
+ if (trimmed.length > maxLength) {
331
+ return `"${field}" exceeds ${maxLength} characters`;
332
+ }
333
+ if (hasControlCharacter(trimmed, field === "description")) {
334
+ return `"${field}" contains control characters`;
335
+ }
336
+ if (isDisplayField(field) && hasUnsafeDisplayPayload(trimmed)) {
337
+ return `"${field}" contains unsafe markup`;
338
+ }
339
+ return null;
340
+ }
341
+ __name(validateString, "validateString");
342
+ function validateManagedId(value) {
343
+ const trimmed = value.trim();
344
+ const stringError = validateString(trimmed, "managedId", 200, true);
345
+ if (stringError) {
346
+ return stringError;
347
+ }
348
+ if (trimmed.includes("/") || trimmed.includes("\\") || trimmed.includes("..") || path2.isAbsolute(trimmed) || path2.win32.isAbsolute(trimmed)) {
349
+ return '"managedId" must be an opaque managed resource id';
350
+ }
351
+ return null;
352
+ }
353
+ __name(validateManagedId, "validateManagedId");
354
+ function isDisplayField(field) {
355
+ return field === "title" || field === "description" || field === "mimeType" || field === "workspacePath" || field === "managedId";
356
+ }
357
+ __name(isDisplayField, "isDisplayField");
358
+ function hasControlCharacter(value, allowLineWhitespace = false) {
359
+ for (let i = 0; i < value.length; i++) {
360
+ const code = value.charCodeAt(i);
361
+ if (allowLineWhitespace && (code === 9 || code === 10 || code === 13)) {
362
+ continue;
363
+ }
364
+ if (code <= 31 || code === 127 || code >= 8203 && code <= 8207 || code === 8232 || code === 8233 || code >= 8234 && code <= 8238 || code >= 8294 && code <= 8297 || code === 65279) {
365
+ return true;
366
+ }
367
+ }
368
+ return false;
369
+ }
370
+ __name(hasControlCharacter, "hasControlCharacter");
371
+ function hasUnsafeDisplayPayload(value) {
372
+ return /<\s*\/?[a-z!]|&(?:#[0-9]+|#x[0-9a-f]+|[a-z][a-z0-9]+);|javascript\s*:|data\s*:\s*(?:text\/(?:html|javascript)|application\/javascript|image\/svg\+xml)/i.test(
373
+ value
374
+ ) || /(?:^|[\s"'`<])on[a-z][a-z0-9-]*\s*=/i.test(value);
375
+ }
376
+ __name(hasUnsafeDisplayPayload, "hasUnsafeDisplayPayload");
377
+ function validateWorkspacePath(value, cwd) {
378
+ const trimmed = value.trim();
379
+ if (!trimmed) {
380
+ return 'Missing or empty "workspacePath"';
381
+ }
382
+ if (hasControlCharacter(trimmed) || hasUnsafeDisplayPayload(trimmed)) {
383
+ return hasControlCharacter(trimmed) ? '"workspacePath" contains control characters' : '"workspacePath" contains unsafe markup';
384
+ }
385
+ if (isRedirectorRoutedPath(trimmed) || isForeignWindowsAbsolute(trimmed)) {
386
+ return WORKSPACE_PATH_HINT;
387
+ }
388
+ if (isAbsoluteWorkspaceInput(trimmed)) {
389
+ if (trimmed.length > 4096) {
390
+ return '"workspacePath" exceeds 4096 characters';
391
+ }
392
+ const root = resolveBoundWorkspaceRoot(
393
+ tryResolveForContainment(path2.resolve(cwd)) ?? path2.resolve(cwd)
394
+ );
395
+ const comparable = tryResolveForContainment(path2.resolve(trimmed));
396
+ if (comparable && !isWithinRoot(comparable, root)) {
397
+ return '"workspacePath" must stay inside the workspace';
398
+ }
399
+ return null;
400
+ }
401
+ if (trimmed.length > ARTIFACT_WORKSPACE_PATH_MAX_LENGTH) {
402
+ return `"workspacePath" exceeds ${ARTIFACT_WORKSPACE_PATH_MAX_LENGTH} characters`;
403
+ }
404
+ const portableNormalized = path2.posix.normalize(trimmed.replace(/\\/g, "/"));
405
+ if (portableNormalized === ".." || portableNormalized.startsWith("../") || path2.posix.isAbsolute(portableNormalized)) {
406
+ return '"workspacePath" must stay inside the current execution directory';
407
+ }
408
+ return null;
409
+ }
410
+ __name(validateWorkspacePath, "validateWorkspacePath");
411
+ function validateMetadata(metadata) {
412
+ if (metadata === void 0) {
413
+ return null;
414
+ }
415
+ if (typeof metadata !== "object" || metadata === null || Array.isArray(metadata)) {
416
+ return '"metadata" must be an object';
417
+ }
418
+ for (const [key, value] of Object.entries(metadata)) {
419
+ if (!key) {
420
+ return '"metadata" keys must not be empty';
421
+ }
422
+ if (key.length > 120) {
423
+ return '"metadata" keys must be 120 characters or fewer';
424
+ }
425
+ if (hasControlCharacter(key) || hasUnsafeDisplayPayload(key)) {
426
+ return '"metadata" keys contain unsafe content';
427
+ }
428
+ if (value !== null && typeof value !== "string" && typeof value !== "number" && typeof value !== "boolean") {
429
+ return '"metadata" values must be primitive';
430
+ }
431
+ if (typeof value === "number" && !Number.isFinite(value)) {
432
+ return '"metadata" numbers must be finite';
433
+ }
434
+ if (typeof value === "string" && (hasControlCharacter(value) || hasUnsafeDisplayPayload(value))) {
435
+ return '"metadata" string values contain unsafe content';
436
+ }
437
+ }
438
+ if (Buffer.byteLength(JSON.stringify(metadata), "utf8") > 4096) {
439
+ return '"metadata" must be 4096 bytes or fewer';
440
+ }
441
+ return null;
442
+ }
443
+ __name(validateMetadata, "validateMetadata");
444
+ function isArtifactKind(kind) {
445
+ return kind === "file" || kind === "link" || kind === "html" || kind === "image" || kind === "video" || kind === "audio" || kind === "pdf" || kind === "notebook" || kind === "other";
446
+ }
447
+ __name(isArtifactKind, "isArtifactKind");
448
+ function hasLegacyPathField(params) {
449
+ const raw = params;
450
+ return Object.prototype.hasOwnProperty.call(raw, "path") && raw.path != null && raw.path !== "";
451
+ }
452
+ __name(hasLegacyPathField, "hasLegacyPathField");
453
+ function isRedirectorRoutedPath(value) {
454
+ const slashes = value.replace(/\//g, "\\").replace(/^\\\?\?\\/, "\\\\?\\");
455
+ if (/\\Device\\Mup\\/i.test(slashes)) {
456
+ return true;
457
+ }
458
+ const posixDoubleSlash = process.platform !== "win32" && !value.includes("\\") && /^\/\//.test(value);
459
+ if (!posixDoubleSlash && (/^\\\\[^\\?]+(?:\\|$)/.test(slashes) || /^\\\\\?\\[Uu][Nn][Cc]\\/.test(slashes))) {
460
+ return true;
461
+ }
462
+ return /^\\\\\?\\/.test(slashes) && !/^\\\\\?\\[A-Za-z]:\\/.test(slashes);
463
+ }
464
+ __name(isRedirectorRoutedPath, "isRedirectorRoutedPath");
465
+ function isForeignWindowsAbsolute(value) {
466
+ if (process.platform === "win32") {
467
+ return false;
468
+ }
469
+ return /^[A-Za-z]:/.test(value) || value.startsWith("\\");
470
+ }
471
+ __name(isForeignWindowsAbsolute, "isForeignWindowsAbsolute");
472
+ function isAbsoluteWorkspaceInput(value) {
473
+ return path2.isAbsolute(value) || process.platform === "win32" && path2.win32.isAbsolute(value);
474
+ }
475
+ __name(isAbsoluteWorkspaceInput, "isAbsoluteWorkspaceInput");
476
+ function formatWorkspaceSuccess(title, locator) {
477
+ return [
478
+ `Recorded artifact "${title}".`,
479
+ "status: available",
480
+ `workspacePath: ${locator.workspacePath}`,
481
+ `resolvedPath: ${locator.resolvedPath}`
482
+ ].join("\n");
483
+ }
484
+ __name(formatWorkspaceSuccess, "formatWorkspaceSuccess");
485
+ function locatorFailure(type, message) {
486
+ return { ok: false, type, message };
487
+ }
488
+ __name(locatorFailure, "locatorFailure");
489
+ async function resolveExistingDir(dir) {
490
+ const resolved = path2.resolve(dir);
491
+ try {
492
+ return await fs.realpath(resolved);
493
+ } catch {
494
+ return resolved;
495
+ }
496
+ }
497
+ __name(resolveExistingDir, "resolveExistingDir");
498
+ function tryResolveForContainment(absolutePath) {
499
+ const resolved = path2.resolve(absolutePath);
500
+ if (pathHasRedirectorHop(resolved)) {
501
+ return void 0;
502
+ }
503
+ try {
504
+ return realpathSync(resolved);
505
+ } catch {
506
+ try {
507
+ const parent = path2.dirname(resolved);
508
+ if (pathHasRedirectorHop(parent)) {
509
+ return void 0;
510
+ }
511
+ return path2.join(realpathSync(parent), path2.basename(resolved));
512
+ } catch {
513
+ return void 0;
514
+ }
515
+ }
516
+ }
517
+ __name(tryResolveForContainment, "tryResolveForContainment");
518
+ var REDIRECTOR_HOP_LIMIT = 8;
519
+ function pathHasRedirectorHop(absolutePath) {
520
+ if (isRedirectorRoutedPath(absolutePath)) {
521
+ return true;
522
+ }
523
+ const resolved = path2.resolve(absolutePath);
524
+ const root = path2.parse(resolved).root;
525
+ const relative = path2.relative(root, resolved);
526
+ if (!relative || relative.startsWith("..")) {
527
+ return symlinkChainHitsRedirector(resolved);
528
+ }
529
+ let acc = root;
530
+ for (const segment of relative.split(path2.sep).filter(Boolean)) {
531
+ acc = path2.join(acc, segment);
532
+ if (isRedirectorRoutedPath(acc) || symlinkChainHitsRedirector(acc)) {
533
+ return true;
534
+ }
535
+ }
536
+ return false;
537
+ }
538
+ __name(pathHasRedirectorHop, "pathHasRedirectorHop");
539
+ function symlinkChainHitsRedirector(absolutePath) {
540
+ let current = absolutePath;
541
+ for (let hop = 0; hop < REDIRECTOR_HOP_LIMIT; hop++) {
542
+ let lst;
543
+ try {
544
+ lst = lstatSync(current);
545
+ } catch {
546
+ return false;
547
+ }
548
+ if (!lst.isSymbolicLink()) {
549
+ return false;
550
+ }
551
+ let target;
552
+ try {
553
+ target = readlinkSync(current);
554
+ } catch {
555
+ return false;
556
+ }
557
+ if (isRedirectorRoutedPath(target)) {
558
+ return true;
559
+ }
560
+ const next = path2.isAbsolute(target) ? target : path2.resolve(path2.dirname(current), target);
561
+ if (isRedirectorRoutedPath(next)) {
562
+ return true;
563
+ }
564
+ current = next;
565
+ }
566
+ return false;
567
+ }
568
+ __name(symlinkChainHitsRedirector, "symlinkChainHitsRedirector");
569
+ async function resolveWorkspaceArtifactLocator(rawPath, config) {
570
+ const cwd = await resolveExistingDir(config.getTargetDir());
571
+ const root = await resolveExistingDir(resolveBoundWorkspaceRoot(cwd));
572
+ const first = workspacePathCandidate(rawPath, cwd, root, true);
573
+ if (!first.ok) {
574
+ return first;
575
+ }
576
+ const inspected = await inspectWorkspaceCandidate(
577
+ first.path,
578
+ rawPath,
579
+ cwd,
580
+ root
581
+ );
582
+ if (inspected.ok || inspected.type !== "file_not_found" /* FILE_NOT_FOUND */ || process.platform === "win32" || !rawPath.includes("\\")) {
583
+ return inspected;
584
+ }
585
+ const fallback = workspacePathCandidate(rawPath, cwd, root, false);
586
+ if (!fallback.ok || fallback.path === first.path) {
587
+ return inspected;
588
+ }
589
+ return inspectWorkspaceCandidate(fallback.path, rawPath, cwd, root);
590
+ }
591
+ __name(resolveWorkspaceArtifactLocator, "resolveWorkspaceArtifactLocator");
592
+ function workspacePathCandidate(locator, cwd, root, preservePosixBackslash) {
593
+ if (isRedirectorRoutedPath(locator) || isForeignWindowsAbsolute(locator)) {
594
+ return locatorFailure(
595
+ "invalid_tool_params" /* INVALID_TOOL_PARAMS */,
596
+ WORKSPACE_PATH_HINT
597
+ );
598
+ }
599
+ if (isAbsoluteWorkspaceInput(locator)) {
600
+ const absolute = path2.resolve(locator);
601
+ const comparable = tryResolveForContainment(absolute);
602
+ if (comparable && !isWithinRoot(comparable, root)) {
603
+ return locatorFailure(
604
+ "path_not_in_workspace" /* PATH_NOT_IN_WORKSPACE */,
605
+ `Failed to record artifact: "${locator}" is outside the workspace.
606
+ ${WORKSPACE_PATH_HINT}`
607
+ );
608
+ }
609
+ return { ok: true, path: absolute };
610
+ }
611
+ const relative = preservePosixBackslash && process.platform !== "win32" ? locator : locator.replace(/\\/g, "/");
612
+ return { ok: true, path: path2.resolve(cwd, relative) };
613
+ }
614
+ __name(workspacePathCandidate, "workspacePathCandidate");
615
+ async function inspectWorkspaceCandidate(candidate, rawPath, cwd, root) {
616
+ if (pathHasRedirectorHop(candidate)) {
617
+ return locatorFailure(
618
+ "path_not_in_workspace" /* PATH_NOT_IN_WORKSPACE */,
619
+ `Failed to record artifact: "${rawPath}" resolves outside the workspace.
620
+ ${WORKSPACE_PATH_HINT}`
621
+ );
622
+ }
623
+ let lst;
624
+ try {
625
+ lst = await fs.lstat(candidate);
626
+ } catch (error) {
627
+ return pathInspectFailure(
628
+ error,
629
+ candidate,
630
+ rawPath,
631
+ `Failed to record artifact: could not inspect "${candidate}" (${error instanceof Error ? error.message : String(error)}).`
632
+ );
633
+ }
634
+ if (lst.isDirectory()) {
635
+ return locatorFailure(
636
+ "target_is_directory" /* TARGET_IS_DIRECTORY */,
637
+ `Failed to record artifact: "${candidate}" is a directory, not a file.
638
+ ${WORKSPACE_PATH_HINT}`
639
+ );
640
+ }
641
+ let resolved;
642
+ try {
643
+ resolved = await fs.realpath(candidate);
644
+ } catch (error) {
645
+ return pathInspectFailure(
646
+ error,
647
+ candidate,
648
+ rawPath,
649
+ `Failed to record artifact: could not resolve "${rawPath}" (${error instanceof Error ? error.message : String(error)}).`
650
+ );
651
+ }
652
+ if (!isWithinRoot(resolved, root)) {
653
+ return locatorFailure(
654
+ "path_not_in_workspace" /* PATH_NOT_IN_WORKSPACE */,
655
+ `Failed to record artifact: "${rawPath}" resolves outside the workspace.
656
+ ${WORKSPACE_PATH_HINT}`
657
+ );
658
+ }
659
+ let st;
660
+ try {
661
+ st = await fs.stat(resolved);
662
+ } catch (error) {
663
+ return pathInspectFailure(
664
+ error,
665
+ resolved,
666
+ rawPath,
667
+ `Failed to record artifact: ${error instanceof Error ? error.message : String(error)}`
668
+ );
669
+ }
670
+ if (!st.isFile()) {
671
+ return locatorFailure(
672
+ st.isDirectory() ? "target_is_directory" /* TARGET_IS_DIRECTORY */ : "target_not_regular_file" /* TARGET_NOT_REGULAR_FILE */,
673
+ `Failed to record artifact: "${resolved}" is not a regular file.
674
+ ${WORKSPACE_PATH_HINT}`
675
+ );
676
+ }
677
+ const workspacePath = toCanonicalWorkspaceArtifactPath(resolved, cwd);
678
+ if (!workspacePath) {
679
+ return locatorFailure(
680
+ "path_not_in_workspace" /* PATH_NOT_IN_WORKSPACE */,
681
+ `Failed to record artifact: "${rawPath}" could not be converted to a workspace-root-relative path.
682
+ ${WORKSPACE_PATH_HINT}`
683
+ );
684
+ }
685
+ const canonicalError = validateString(
686
+ workspacePath,
687
+ "workspacePath",
688
+ ARTIFACT_WORKSPACE_PATH_MAX_LENGTH,
689
+ true
690
+ );
691
+ if (canonicalError) {
692
+ return locatorFailure(
693
+ "invalid_tool_params" /* INVALID_TOOL_PARAMS */,
694
+ canonicalError.includes("exceeds") ? `Failed to record artifact: the stored workspace-root-relative path "${workspacePath}" exceeds ${ARTIFACT_WORKSPACE_PATH_MAX_LENGTH} characters.` : canonicalError
695
+ );
696
+ }
697
+ return {
698
+ ok: true,
699
+ workspacePath,
700
+ resolvedPath: resolved,
701
+ sizeBytes: st.size
702
+ };
703
+ }
704
+ __name(inspectWorkspaceCandidate, "inspectWorkspaceCandidate");
705
+ function classifyPathError(error) {
706
+ if (!isNodeError(error)) {
707
+ return "execution_failed" /* EXECUTION_FAILED */;
708
+ }
709
+ if (error.code === "ENOENT" || error.code === "ENOTDIR") {
710
+ return "file_not_found" /* FILE_NOT_FOUND */;
711
+ }
712
+ if (error.code === "EACCES" || error.code === "EPERM") {
713
+ return "permission_denied" /* PERMISSION_DENIED */;
714
+ }
715
+ return "execution_failed" /* EXECUTION_FAILED */;
716
+ }
717
+ __name(classifyPathError, "classifyPathError");
718
+ function pathInspectFailure(error, candidate, rawPath, fallbackMessage) {
719
+ const type = classifyPathError(error);
720
+ if (type === "file_not_found" /* FILE_NOT_FOUND */) {
721
+ return locatorFailure(
722
+ type,
723
+ [
724
+ `Failed to record artifact: file not found at "${candidate}".`,
725
+ WORKSPACE_PATH_HINT
726
+ ].join("\n")
727
+ );
728
+ }
729
+ if (type === "permission_denied" /* PERMISSION_DENIED */) {
730
+ return locatorFailure(
731
+ type,
732
+ `Failed to record artifact: permission denied for "${rawPath}".
733
+ ${WORKSPACE_PATH_HINT}`
734
+ );
735
+ }
736
+ return locatorFailure(type, fallbackMessage);
737
+ }
738
+ __name(pathInspectFailure, "pathInspectFailure");
739
+
740
+ export {
741
+ toCanonicalWorkspaceArtifactPath,
742
+ ARTIFACT_TITLE_MAX_LENGTH,
743
+ ARTIFACT_WORKSPACE_PATH_MAX_LENGTH,
744
+ RecordArtifactTool,
745
+ hasControlCharacter,
746
+ hasUnsafeDisplayPayload
747
+ };
748
+ /**
749
+ * @license
750
+ * Copyright 2026 Qwen Team
751
+ * SPDX-License-Identifier: Apache-2.0
752
+ */
753
+ /**
754
+ * @license
755
+ * Copyright 2025 Google LLC
756
+ * SPDX-License-Identifier: Apache-2.0
757
+ */