@qwen-code/qwen-code 0.22.0 → 0.22.1

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 (449) 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/qc-helper/docs/configuration/auth.md +7 -7
  5. package/bundled/qc-helper/docs/configuration/model-providers.md +70 -9
  6. package/bundled/qc-helper/docs/configuration/settings.md +40 -40
  7. package/bundled/qc-helper/docs/extension/introduction.md +3 -1
  8. package/bundled/qc-helper/docs/features/channels/_meta.ts +1 -0
  9. package/bundled/qc-helper/docs/features/channels/dingtalk.md +12 -0
  10. package/bundled/qc-helper/docs/features/channels/dws.md +120 -0
  11. package/bundled/qc-helper/docs/features/channels/overview.md +3 -3
  12. package/bundled/qc-helper/docs/features/code-review.md +25 -21
  13. package/bundled/qc-helper/docs/features/commands.md +2 -2
  14. package/bundled/qc-helper/docs/features/computer-use.md +57 -51
  15. package/bundled/qc-helper/docs/features/mcp.md +35 -12
  16. package/bundled/qc-helper/docs/features/sub-agents.md +1 -1
  17. package/bundled/qc-helper/docs/features/worktree.md +1 -1
  18. package/bundled/qc-helper/docs/overview.md +1 -1
  19. package/bundled/qc-helper/docs/quickstart.md +1 -1
  20. package/bundled/qc-helper/docs/qwen-serve.md +29 -6
  21. package/bundled/review/SKILL.md +119 -417
  22. package/bundled/review/references/aone.md +18 -0
  23. package/bundled/review/references/persistence.md +105 -0
  24. package/bundled/review/references/posting.md +270 -0
  25. package/chunks/MaxSizedBox-UUTUE42J.js +112 -0
  26. package/chunks/{StandaloneSessionPicker-KTHPCSR6.js → StandaloneSessionPicker-XF2TVJFK.js} +87 -86
  27. package/chunks/{acp-startup-profiler-T4GEAPLX.js → acp-startup-profiler-GNYAL6LI.js} +2 -2
  28. package/chunks/{acpAgent-CRY3JZ5O.js → acpAgent-GY53MJIW.js} +2216 -1931
  29. package/chunks/agent-7U6CC5KF.js +97 -0
  30. package/chunks/agent-headless-32O4L2CT.js +87 -0
  31. package/chunks/{anthropicContentGenerator-Y2OX6LS4.js → anthropicContentGenerator-U76GTVB6.js} +128 -58
  32. package/chunks/{artifact-tool-SBXMTVCB.js → artifact-tool-XDJCZZCF.js} +2 -2
  33. package/chunks/{askUserQuestion-KEQJRFD6.js → askUserQuestion-ZXXERLEV.js} +2 -2
  34. package/chunks/bridge-DFX2FFH4.js +119 -0
  35. package/chunks/{ca-D3F4S6NG.js → ca-7HPYOYSZ.js} +3 -0
  36. package/chunks/{channel-management-service-IRTT7RNE.js → channel-management-service-HXXS3HOZ.js} +4 -4
  37. package/chunks/channel-settings-store-ELLH2M4M.js +117 -0
  38. package/chunks/{channel-worker-group-BJNMR2MP.js → channel-worker-group-EVDC2P4K.js} +8 -7
  39. package/chunks/{channel-worker-manager-EMA7CQDJ.js → channel-worker-manager-IJJZHGEI.js} +8 -7
  40. package/chunks/{channel-worker-supervisor-F6I6WSWW.js → channel-worker-supervisor-YSKB5GVB.js} +12 -7
  41. package/chunks/{chunk-2TRNCJK4.js → chunk-27ONXAFY.js} +1 -1
  42. package/chunks/{chunk-OVH5Y7KS.js → chunk-2CRNTW2B.js} +19 -3
  43. package/chunks/{read-package-up-UXSW3YPB.js → chunk-2EAZ43JQ.js} +1 -0
  44. package/chunks/{chunk-DB2OKNTU.js → chunk-2FN2HNTI.js} +2 -2
  45. package/chunks/{chunk-KM73TBQ4.js → chunk-2LD5U7Q3.js} +31 -0
  46. package/chunks/{chunk-QJHPWLZC.js → chunk-2MHGD7EE.js} +1 -1
  47. package/chunks/{chunk-BMCSKS37.js → chunk-2NCVUT3C.js} +6 -6
  48. package/chunks/{chunk-A5F2YNO6.js → chunk-2NNTE2ED.js} +245 -10
  49. package/chunks/{chunk-Z3JMO2CH.js → chunk-2SERYG4T.js} +1 -1
  50. package/chunks/{chunk-4J7OPYNS.js → chunk-2YDYDDE2.js} +6 -6
  51. package/chunks/{chunk-PXOJLJ5W.js → chunk-2YEZNBSD.js} +333 -184
  52. package/chunks/{chunk-UU4WC7DK.js → chunk-2ZV3CZKI.js} +82 -12
  53. package/chunks/{chunk-SE55HQGF.js → chunk-3B5DCAQU.js} +74 -52
  54. package/chunks/{chunk-UIRLQ3N7.js → chunk-3BV7TZNQ.js} +3 -3
  55. package/chunks/{chunk-2Z6LSQMF.js → chunk-3FSBMAYD.js} +1 -1
  56. package/chunks/{chunk-DJEHYM4H.js → chunk-3UZCLCXR.js} +3 -3
  57. package/chunks/{chunk-WWUSHZ7M.js → chunk-43C2II2G.js} +5 -5
  58. package/chunks/{chunk-2GXYDNXP.js → chunk-47SIHHPL.js} +8 -8
  59. package/chunks/{chunk-PHJJ3RVO.js → chunk-4DCP3362.js} +7 -15
  60. package/chunks/chunk-4K7NQDCG.js +104 -0
  61. package/chunks/{chunk-UZPYR3EV.js → chunk-4TPAG3O7.js} +1 -1
  62. package/chunks/{chunk-BEGIBJAZ.js → chunk-5CI4AXDD.js} +4 -4
  63. package/chunks/{chunk-7KOFLDEP.js → chunk-5JTIYALA.js} +1 -1
  64. package/chunks/{chunk-7HFULI45.js → chunk-5MK32KJV.js} +3 -3
  65. package/chunks/{chunk-CXJHQVEK.js → chunk-5PA6UEYA.js} +4 -0
  66. package/chunks/{chunk-IBJ5S45N.js → chunk-5T4LWWNX.js} +2 -2
  67. package/chunks/{chunk-VUMLT7E5.js → chunk-5Y2JCJAH.js} +2 -2
  68. package/chunks/{chunk-YZBDKFRQ.js → chunk-5ZYZPDDF.js} +993 -895
  69. package/chunks/{chunk-2A4C2MEG.js → chunk-62PXFOK4.js} +35 -12
  70. package/chunks/{chunk-IIWGSX4L.js → chunk-6E4WHQJV.js} +1 -1
  71. package/chunks/{chunk-6PCOVQO2.js → chunk-6HTMIKXZ.js} +8 -8
  72. package/chunks/{chunk-RDG44S5I.js → chunk-6KS24S3X.js} +2 -2
  73. package/chunks/{chunk-GAHYKJPV.js → chunk-6US7BF3G.js} +7 -59
  74. package/chunks/{chunk-MHG6NDS6.js → chunk-6YAR6ZU3.js} +2 -2
  75. package/chunks/{chunk-3CLIDIVQ.js → chunk-73WFGVIZ.js} +3 -3
  76. package/chunks/{chunk-ZZUVC6RI.js → chunk-76WGY6LW.js} +3 -3
  77. package/chunks/{chunk-XLDFW44M.js → chunk-77TOMRBG.js} +3 -3
  78. package/chunks/{chunk-PDL6LKB5.js → chunk-7AS7QX72.js} +1 -1
  79. package/chunks/{chunk-ND7NOI4P.js → chunk-7CWEZQ6T.js} +0 -15
  80. package/chunks/{chunk-DWCKACFL.js → chunk-7DPKPBOQ.js} +2 -2
  81. package/chunks/{chunk-45NQKMYB.js → chunk-7JPW6IYH.js} +1 -1
  82. package/chunks/{chunk-HDKCKCYO.js → chunk-7QGEJI7M.js} +1 -1
  83. package/chunks/{chunk-S4C4JJKE.js → chunk-A7X32SCT.js} +5 -5
  84. package/chunks/{chunk-O5Z7EB6Y.js → chunk-AYHQZBJ4.js} +170 -207
  85. package/chunks/{chunk-7DYNJFES.js → chunk-AYVIGUUK.js} +6 -1
  86. package/chunks/{chunk-7DMTAQJ6.js → chunk-BDHLBR46.js} +132 -49
  87. package/chunks/{chunk-43T5WDQ7.js → chunk-BFSFJR3D.js} +1 -1
  88. package/chunks/{chunk-AP3B7LKD.js → chunk-BKDAF7ES.js} +2 -2
  89. package/chunks/{chunk-B6UBOIFE.js → chunk-BQBUZDDH.js} +14 -11
  90. package/chunks/{chunk-VLRBJ24J.js → chunk-BVE5EMIG.js} +2 -2
  91. package/chunks/{chunk-P47E4SJC.js → chunk-BX2BZPFJ.js} +3 -3
  92. package/chunks/{chunk-OARZJFZX.js → chunk-C4WBKZJT.js} +4 -4
  93. package/chunks/{chunk-QKBYFU2Q.js → chunk-CFKIH3D3.js} +21 -1
  94. package/chunks/{chunk-URN2JIAQ.js → chunk-CITGRGCM.js} +2 -1
  95. package/chunks/{chunk-WU5E4HMO.js → chunk-CPPYZHBN.js} +1 -1
  96. package/chunks/chunk-DCSAVGDJ.js +20 -0
  97. package/chunks/{chunk-Q54XG7IX.js → chunk-DEYPMJPD.js} +1 -1
  98. package/chunks/{chunk-KSPRQSB4.js → chunk-DIMEPKCW.js} +52 -12
  99. package/chunks/{chunk-I432KXWD.js → chunk-DP7LABIB.js} +1 -1
  100. package/chunks/{chunk-36OF5PRW.js → chunk-E4I5MVBR.js} +7 -3
  101. package/chunks/{chunk-AW27A43Y.js → chunk-E55H6BZ7.js} +93 -1
  102. package/chunks/{chunk-K623ENWT.js → chunk-E6FGMDFQ.js} +4 -0
  103. package/chunks/{chunk-5XUTPXQU.js → chunk-EAV3TENS.js} +6 -9
  104. package/chunks/{chunk-LI4YHTQK.js → chunk-EB4VDXNI.js} +1 -1
  105. package/chunks/{chunk-JOLJTKIG.js → chunk-EC5BONC3.js} +1 -1
  106. package/chunks/{chunk-25NESM4G.js → chunk-EEQYTWGU.js} +29 -5
  107. package/chunks/{chunk-4CWDWDL6.js → chunk-EKP3M4RF.js} +1 -1
  108. package/chunks/{chunk-W4CRPSC5.js → chunk-ELY4QVIB.js} +1 -1
  109. package/chunks/{chunk-BB5IMQCV.js → chunk-EMGAVCBZ.js} +2 -2
  110. package/chunks/chunk-FBX2SDQ4.js +48 -0
  111. package/chunks/{chunk-C72BXMJ5.js → chunk-FJWICLG7.js} +1 -1
  112. package/chunks/{chunk-6FRJEE2S.js → chunk-FK4H3V6S.js} +5 -5
  113. package/chunks/{chunk-LDGWX737.js → chunk-FN5C6C7G.js} +160 -59
  114. package/chunks/{chunk-3ZFJUBTP.js → chunk-FPH6TXD3.js} +1 -1
  115. package/chunks/{chunk-WRT324N6.js → chunk-FVDQ5E67.js} +3 -3
  116. package/chunks/{chunk-VFACN2CE.js → chunk-GNMJNDZE.js} +1 -1
  117. package/chunks/{chunk-FVBVJEBG.js → chunk-GNRVKN76.js} +10 -8
  118. package/chunks/{chunk-PZRUV52H.js → chunk-GTUKW3I6.js} +20 -2
  119. package/chunks/chunk-GYTKQYDB.js +23 -0
  120. package/chunks/{chunk-VMJL7RH6.js → chunk-GZJUCMH4.js} +4 -4
  121. package/chunks/{chunk-MQP3MHWN.js → chunk-HJOWQUE2.js} +21 -15
  122. package/chunks/{chunk-ZS5BHEPD.js → chunk-I32QCIK7.js} +1 -1
  123. package/chunks/{chunk-7IV52LTO.js → chunk-I6VVOZDK.js} +2 -2
  124. package/chunks/{chunk-X7V3N6YH.js → chunk-I6YW3T3W.js} +218 -37
  125. package/chunks/{chunk-2E3V7G6Y.js → chunk-ICWGPK23.js} +55 -50
  126. package/chunks/{chunk-SQS55KR4.js → chunk-IJVDHPKD.js} +2 -2
  127. package/chunks/{chunk-QS4ENGVF.js → chunk-IKN3IUJP.js} +9 -8
  128. package/chunks/{chunk-2UZJWSVD.js → chunk-ILPXSKGQ.js} +2 -2
  129. package/chunks/{chunk-ZRYQMWEP.js → chunk-IPQA4SR5.js} +2 -2
  130. package/chunks/{chunk-XYQHT3AW.js → chunk-IRIX323G.js} +2 -2
  131. package/chunks/{chunk-5HJUPACR.js → chunk-J7MLXFC5.js} +2 -2
  132. package/chunks/{chunk-AZF6SME3.js → chunk-JECO75XD.js} +3 -3
  133. package/chunks/chunk-JLGFGPZJ.js +346 -0
  134. package/chunks/{chunk-WZDM44SB.js → chunk-JUIJ3FXC.js} +7 -7
  135. package/chunks/{chunk-A6NRNRKE.js → chunk-JVPFTDBK.js} +1 -1
  136. package/chunks/{chunk-2J3OJGTL.js → chunk-K2OJUPOE.js} +1 -21
  137. package/chunks/{chunk-GHY5OIYP.js → chunk-K63NK3KL.js} +13 -13
  138. package/chunks/{chunk-7JBHIQS2.js → chunk-KCOXDRQL.js} +7 -13
  139. package/chunks/{chunk-6NFAEG54.js → chunk-KOJ6MHD5.js} +24 -13
  140. package/chunks/{chunk-WS7PAXXR.js → chunk-KWFP3WV6.js} +18 -13
  141. package/chunks/{chunk-A5F63FEW.js → chunk-L436XFLJ.js} +1 -1
  142. package/chunks/{chunk-KIVGVFMM.js → chunk-LI2HEMKO.js} +16 -4
  143. package/chunks/{chunk-GIWB5QLV.js → chunk-LJP2BBMK.js} +4 -4
  144. package/chunks/{create-sub-session-XBCVGNFU.js → chunk-LRKMQPMD.js} +4 -6
  145. package/chunks/{chunk-6UQSU7CQ.js → chunk-MDZO5V2O.js} +58 -107
  146. package/chunks/{chunk-AO4M6NMD.js → chunk-MW5AHWOZ.js} +60 -20
  147. package/chunks/{chunk-FYZMB6DB.js → chunk-MYLXL7F6.js} +11 -11
  148. package/chunks/{chunk-ZLCT4C5A.js → chunk-MZS7GEC7.js} +1 -1
  149. package/chunks/{chunk-VEND4KA4.js → chunk-NER3H7PI.js} +1 -1
  150. package/chunks/{chunk-AVCCKIZ6.js → chunk-NVK4HJYQ.js} +1 -1
  151. package/chunks/{chunk-MPHLIJYL.js → chunk-NY3IJYAV.js} +14 -8
  152. package/chunks/{chunk-XZJKSETB.js → chunk-O3BUXIPM.js} +3 -3
  153. package/chunks/{chunk-4XPSVIED.js → chunk-O5YGAEQS.js} +6 -6
  154. package/chunks/{chunk-NW35NVFN.js → chunk-ODXCSIH5.js} +4 -4
  155. package/chunks/{chunk-5XHAOUWD.js → chunk-OI2DR6QB.js} +3 -3
  156. package/chunks/{chunk-BUGYW6FB.js → chunk-OQ6LTSX3.js} +1 -1
  157. package/chunks/{chunk-J5ZDDUKM.js → chunk-OT26ITEY.js} +4 -4
  158. package/chunks/{chunk-EFB657PR.js → chunk-OX44MOAN.js} +3 -3
  159. package/chunks/{chunk-LURJYO2T.js → chunk-OZ6KS6KW.js} +4 -0
  160. package/chunks/{chunk-4F5WV4RF.js → chunk-PAJGKZAA.js} +281 -10
  161. package/chunks/{chunk-HIK2OF33.js → chunk-PVBT5QPD.js} +1 -1
  162. package/chunks/chunk-QHMLYMMS.js +32 -0
  163. package/chunks/{chunk-U2UYQMM6.js → chunk-R2ZJH3FV.js} +3 -3
  164. package/chunks/{chunk-K52PZNU4.js → chunk-RRKNX553.js} +2 -2
  165. package/chunks/chunk-RXFQM6FQ.js +42 -0
  166. package/chunks/{chunk-SJ4HB27T.js → chunk-SDVF6A42.js} +3 -3
  167. package/chunks/{chunk-TBVSALA3.js → chunk-SKNVVYIJ.js} +3 -3
  168. package/chunks/{chunk-JGUBDRBC.js → chunk-SLEWBQWM.js} +3 -3
  169. package/chunks/{chunk-ZRFUT5VV.js → chunk-SM7ZVKTF.js} +7 -7
  170. package/chunks/{chunk-UUQFJILB.js → chunk-SQPOJ4ZI.js} +15 -3
  171. package/chunks/{chunk-RPJQ3O4M.js → chunk-SRGENTPF.js} +31 -41
  172. package/chunks/{chunk-ISJMN3ML.js → chunk-T2CRBIDJ.js} +1 -1
  173. package/chunks/{chunk-MZKWFWVG.js → chunk-T2HMXHYA.js} +6 -6
  174. package/chunks/{chunk-FEMQ6Y7W.js → chunk-T6OODF2U.js} +47 -126
  175. package/chunks/{chunk-VYC7XFYV.js → chunk-TKO4TLT6.js} +5 -5
  176. package/chunks/{chunk-KVGR4MCF.js → chunk-TOF4UZHH.js} +3 -3
  177. package/chunks/{chunk-LD5VIJ7S.js → chunk-TWSKM647.js} +1 -1
  178. package/chunks/{chunk-7NBVNAJJ.js → chunk-UCSV2IZW.js} +3 -3
  179. package/chunks/{chunk-FDD2IUEL.js → chunk-UX3IFLJM.js} +229 -21
  180. package/chunks/{chunk-YDJRMQU4.js → chunk-V3GINY6K.js} +3 -3
  181. package/chunks/{chunk-XL5K4SVK.js → chunk-VL4YX3FH.js} +1 -1
  182. package/chunks/{chunk-62JOGZL5.js → chunk-VMDURMFY.js} +199 -87
  183. package/chunks/{chunk-OE52YHCZ.js → chunk-W2WRNJKX.js} +11 -11
  184. package/chunks/{chunk-YLFLHKDL.js → chunk-W3N5XAZ6.js} +1 -1
  185. package/chunks/{chunk-IWOWEENB.js → chunk-WBT3STGU.js} +385 -25
  186. package/chunks/{chunk-S3G6YFQC.js → chunk-WEGXPP5E.js} +1 -1
  187. package/chunks/{chunk-RDQ7QB4Y.js → chunk-XJS54K4A.js} +2 -2
  188. package/chunks/{chunk-L4HVF7LM.js → chunk-XNXWEGKB.js} +3 -3
  189. package/chunks/{chunk-T6XLJRQY.js → chunk-XYX474JQ.js} +36509 -5182
  190. package/chunks/{chunk-F6WFNA7U.js → chunk-XZA32HII.js} +3 -6
  191. package/chunks/{chunk-NUGZAFR2.js → chunk-ZEADBZLO.js} +147 -6
  192. package/chunks/chunk-ZELCTN6Y.js +29 -0
  193. package/chunks/{chunk-TQOF5KBL.js → chunk-ZEZKIS2K.js} +0 -31
  194. package/chunks/{chunk-IOSEW6KP.js → chunk-ZJG323IA.js} +5 -4
  195. package/chunks/{chunk-VSNPOSDN.js → chunk-ZKAZP2ZG.js} +107 -12
  196. package/chunks/{chunk-YMVFIYHV.js → chunk-ZLTEQYNC.js} +2 -2
  197. package/chunks/{chunk-O5BDEWBC.js → chunk-ZWKGZB2K.js} +3 -3
  198. package/chunks/{chunk-6QSA4JHL.js → chunk-ZXDM7DYV.js} +2772 -814
  199. package/chunks/chunk-ZYNTSXWK.js +32 -0
  200. package/chunks/config-utils-7M6PCTLT.js +113 -0
  201. package/chunks/contextCommand-G4QG3TW6.js +108 -0
  202. package/chunks/{core-runtime-CES6JSVV.js → core-runtime-PKNQ63VL.js} +63 -58
  203. package/chunks/{create-sub-session-UJTPMVOG.js → create-sub-session-PLGPY6TV.js} +60 -58
  204. package/chunks/create-sub-session-RVHSWVAP.js +17 -0
  205. package/chunks/{cron-create-IKA56DAF.js → cron-create-IJGVR5R2.js} +4 -4
  206. package/chunks/{cron-delete-K5Q62EGH.js → cron-delete-4N5BI6GL.js} +4 -4
  207. package/chunks/{cron-list-QBFGAMP7.js → cron-list-2CATIPUX.js} +4 -4
  208. package/chunks/{daemon-RZZUPGOJ.js → daemon-NAYK4XXU.js} +51 -24
  209. package/chunks/{daemon-git-worktree-guard-3QY2BQYB.js → daemon-git-worktree-guard-LDBJXH2U.js} +338 -92
  210. package/chunks/daemon-status-provider-F5FEHVVG.js +118 -0
  211. package/chunks/daemon-trust-policy-C6YTU5CQ.js +114 -0
  212. package/chunks/{daemon-trust-policy-monitor-TK4K7M63.js → daemon-trust-policy-monitor-IGEJPHQ4.js} +68 -66
  213. package/chunks/{de-RYUHH2C6.js → de-X6HLSIFE.js} +1 -0
  214. package/chunks/deferred-core-runtime-GHT3GDOR.js +116 -0
  215. package/chunks/{display-image-OEJMJV3S.js → display-image-DR55LL6M.js} +5 -5
  216. package/chunks/dist-4Q7NTUNB.js +2512 -0
  217. package/chunks/{dist-ESS34DHC.js → dist-6H6RZ5H6.js} +2 -2
  218. package/chunks/{dist-LZO24N3E.js → dist-7CKN54NL.js} +1 -1
  219. package/chunks/{dist-5EV2G6MC.js → dist-DJBNNPLN.js} +1 -1
  220. package/chunks/{dist-J6P3C52Z.js → dist-FVJZSIO4.js} +28 -7
  221. package/chunks/{dist-K7IQB53U.js → dist-SATKXKUR.js} +1 -1
  222. package/chunks/{dist-ES6HNUW2.js → dist-TJUDJTCB.js} +246 -17
  223. package/chunks/{dist-VVQBOKDH.js → dist-UQUFZDIY.js} +1 -1
  224. package/chunks/{dist-2OG3PGKO.js → dist-ZBVOXSKF.js} +3 -3
  225. package/chunks/earlyInputCapture-HOSJTLWP.js +109 -0
  226. package/chunks/{edit-A2633SLR.js → edit-KSPVUEAS.js} +48 -48
  227. package/chunks/{en-3RHLPITS.js → en-6MDBWMTG.js} +3 -0
  228. package/chunks/{enter-worktree-OIAHE2TB.js → enter-worktree-UOZ6ZTP7.js} +7 -8
  229. package/chunks/{enterPlanMode-SUGIKLR7.js → enterPlanMode-DZTABSKN.js} +47 -47
  230. package/chunks/environment-JXOSW25V.js +131 -0
  231. package/chunks/errors-IOXFDE4J.js +115 -0
  232. package/chunks/{exit-worktree-3UT3SSWT.js → exit-worktree-G2QATUCV.js} +7 -8
  233. package/chunks/exitPlanMode-PZG4FXRB.js +85 -0
  234. package/chunks/{fast-path-3AVP3G35.js → fast-path-EBS7NAVL.js} +28 -7
  235. package/chunks/{fast-path-settings-WHX3J3ZI.js → fast-path-settings-XMFBYFUH.js} +2 -2
  236. package/chunks/{fr-4PL5GHG4.js → fr-FTZWF462.js} +1 -0
  237. package/chunks/{gemini-7PVQWHTH.js → gemini-JELEKOVS.js} +129 -123
  238. package/chunks/{geminiContentGenerator-B2FOJJDJ.js → geminiContentGenerator-I2CKP7XI.js} +16 -13
  239. package/chunks/{glob-7YGXE6OV.js → glob-TDVEVPQZ.js} +47 -47
  240. package/chunks/{goal-tools-TLJCE7YZ.js → goal-tools-CNVXMSZD.js} +72 -28
  241. package/chunks/{grep-6DV6LTON.js → grep-3NLSS32D.js} +6 -6
  242. package/chunks/handleAutoUpdate-AWAGHKOX.js +111 -0
  243. package/chunks/i18n-CYA25C5F.js +126 -0
  244. package/chunks/{image-gen-7CSCJ73T.js → image-gen-63NN2H5N.js} +9 -11
  245. package/chunks/initializer-JD2FLNLO.js +115 -0
  246. package/chunks/installationInfo-N3DCWVWR.js +109 -0
  247. package/chunks/{ja-HZ7X7PQO.js → ja-2GL5FKYJ.js} +1 -0
  248. package/chunks/{keychain-token-storage-MTFTAESK.js → keychain-token-storage-3MGFRYGM.js} +2 -2
  249. package/chunks/list-XDQAUET5.js +118 -0
  250. package/chunks/{list-agents-43XUEXJV.js → list-agents-EXRSHIDJ.js} +2 -2
  251. package/chunks/loadedSettingsAdapter-IK7H5JRK.js +112 -0
  252. package/chunks/{loggingContentGenerator-RNE66CKK.js → loggingContentGenerator-CZWUAHAI.js} +27 -30
  253. package/chunks/{loop-wakeup-E54KDUXC.js → loop-wakeup-XBPB2BRO.js} +5 -5
  254. package/chunks/{ls-CGL2UC3H.js → ls-WFONAND2.js} +4 -4
  255. package/chunks/{lsp-5IKUO5DX.js → lsp-DUKPDUXN.js} +2 -2
  256. package/chunks/{managed-npm-update-Y3SC3GLJ.js → managed-npm-update-54W23SP5.js} +61 -59
  257. package/chunks/mcp-2E7ZLMEE.js +112 -0
  258. package/chunks/{monitor-PXYSGSUN.js → monitor-A4J5QRGJ.js} +47 -47
  259. package/chunks/nonInteractiveCli-ZNDXB62Y.js +185 -0
  260. package/chunks/{notebook-edit-ISIBJVBR.js → notebook-edit-4ANFZON5.js} +48 -48
  261. package/chunks/open-with-auth-4UI3KHUR.js +55 -0
  262. package/chunks/{openaiContentGenerator-6TBOPEGT.js → openaiContentGenerator-JCCJJQZC.js} +29 -30
  263. package/chunks/pidfile-DHV2Y7UD.js +113 -0
  264. package/chunks/{processUtils-YK2TDTTU.js → processUtils-JJAR56SO.js} +2 -2
  265. package/chunks/prompt-terminal-ledger-LDZ6QVYA.js +107 -0
  266. package/chunks/{pt-QT5N2Q6Q.js → pt-XN2YWJVM.js} +1 -0
  267. package/chunks/{qwenContentGenerator-CLDMA2Y4.js → qwenContentGenerator-5JM44ZSA.js} +53 -59
  268. package/chunks/{qwenOAuth2-DLDR6UC5.js → qwenOAuth2-JIYAWXTW.js} +8 -10
  269. package/chunks/{read-file-2HOD2ATO.js → read-file-N3E5DY7N.js} +13 -14
  270. package/chunks/{read-mcp-resource-XYES2B42.js → read-mcp-resource-7A7NFSFL.js} +2 -2
  271. package/chunks/read-package-up-6T6ICKR7.js +13 -0
  272. package/chunks/{record-artifact-W3IBTGL7.js → record-artifact-CPJ4IJSD.js} +4 -5
  273. package/chunks/report-findings-VFM5DENC.js +33 -0
  274. package/chunks/request-shutdown-AXVOFN5C.js +133 -0
  275. package/chunks/resumeHistoryUtils-YQRITQAG.js +120 -0
  276. package/chunks/ripGrep-NEIHKBKB.js +39 -0
  277. package/chunks/{ru-STMG5BPD.js → ru-OLTMFJEW.js} +1 -0
  278. package/chunks/{run-qwen-serve-XJHOW2NY.js → run-qwen-serve-IWGPZADI.js} +622 -79
  279. package/chunks/{runtime-J4SPTJRQ.js → runtime-I76HPFUE.js} +73 -71
  280. package/chunks/{scheduler-VRAEZZ4E.js → scheduler-M6YL4K4I.js} +62 -60
  281. package/chunks/{sdk-exporters-http-RSIOP3G2.js → sdk-exporters-http-XXSKBD2C.js} +5 -5
  282. package/chunks/{sdk-impl-CB3KARSK.js → sdk-impl-VPNBLV7I.js} +7 -7
  283. package/chunks/{send-message-J4VT46OI.js → send-message-A2GXDX3B.js} +10 -31
  284. package/chunks/serve-XY5S63GN.js +120 -0
  285. package/chunks/{server-74ONDK62.js → server-TWXRRREO.js} +965 -405
  286. package/chunks/{session-BO6VBWJP.js → session-IT5ZXU7A.js} +151 -140
  287. package/chunks/{settings-35QZNFDG.js → settings-IX5HOOCG.js} +71 -69
  288. package/chunks/shell-LZ55AAJB.js +95 -0
  289. package/chunks/{skill-DKEMQSNJ.js → skill-WSZ53D2R.js} +108 -25
  290. package/chunks/skill-settings-5U7FTJIK.js +120 -0
  291. package/chunks/spawnChannel-TMC6VXGN.js +113 -0
  292. package/chunks/standalone-update-CUYGWTR4.js +120 -0
  293. package/chunks/{startInteractiveUI-J2QSGWPU.js → startInteractiveUI-O6BI2OSA.js} +381 -293
  294. package/chunks/{syntheticOutput-JAXMIMZP.js → syntheticOutput-5AJ444QT.js} +3 -3
  295. package/chunks/{task-create-I2H322E4.js → task-create-CDJSOEQD.js} +11 -11
  296. package/chunks/{task-list-3OLIWFTQ.js → task-list-BELMPA75.js} +5 -5
  297. package/chunks/{task-stop-JAUY6MSY.js → task-stop-U3S3KZG2.js} +2 -2
  298. package/chunks/{task-update-B3XO4CPI.js → task-update-77VCFDDZ.js} +11 -11
  299. package/chunks/{team-create-W534PMGX.js → team-create-UF4TMQEH.js} +48 -48
  300. package/chunks/{team-delete-Q7GE7RRI.js → team-delete-YWFXX77L.js} +5 -5
  301. package/chunks/{team-plan-approval-WNV6P6NG.js → team-plan-approval-U57NSR6C.js} +47 -47
  302. package/chunks/terminal-image-renderer-DRL3BROJ.js +116 -0
  303. package/chunks/theme-manager-HHJPUDRN.js +104 -0
  304. package/chunks/{todoWrite-FJJTY2TI.js → todoWrite-435EO2CS.js} +4 -4
  305. package/chunks/{tool-search-Y4KL3LRE.js → tool-search-SV35UV72.js} +18 -19
  306. package/chunks/total-session-admission-TQI7TCTL.js +114 -0
  307. package/chunks/trustedFolders-YKK67IP3.js +124 -0
  308. package/chunks/{update-relaunch-OHVFN6KF.js → update-relaunch-DX7LVA4P.js} +6 -6
  309. package/chunks/updateCheck-6JRTKTUF.js +120 -0
  310. package/chunks/useAutoAcceptIndicator-MYXYSKSL.js +122 -0
  311. package/chunks/{validateNonInterActiveAuth-WJXH426F.js → validateNonInterActiveAuth-B26O4YJP.js} +113 -106
  312. package/chunks/{version-QMDRADXM.js → version-K5D7VJ4B.js} +2 -2
  313. package/chunks/{web-fetch-ROS6P4LP.js → web-fetch-VFHZLLNZ.js} +25 -242
  314. package/chunks/{web-search-JS3E76O6.js → web-search-AQE5A4J5.js} +11 -11
  315. package/chunks/{web-shell-static-3NUTRHAH.js → web-shell-static-A6QMUNNV.js} +11 -4
  316. package/chunks/webapi-Z5OM224P.js +4118 -0
  317. package/chunks/{workflow-2FCMBTBZ.js → workflow-XL6AEUZ7.js} +635 -94
  318. package/chunks/workspace-providers-status-H6TG34YV.js +116 -0
  319. package/chunks/{workspace-registration-store-SU4EJKSD.js → workspace-registration-store-I4U3V5LL.js} +1 -1
  320. package/chunks/workspace-registry-2PWNIYNI.js +123 -0
  321. package/chunks/workspace-service-4FGTUJLA.js +131 -0
  322. package/chunks/workspace-skills-status-7VOLUDT6.js +115 -0
  323. package/chunks/{workspace-trust-reconciler-4Y4F7XIX.js → workspace-trust-reconciler-GJ466KCE.js} +74 -73
  324. package/chunks/write-file-PWOYCT2K.js +90 -0
  325. package/chunks/{zh-TW-NX43Z2S2.js → zh-TW-MV4FWFB6.js} +3 -0
  326. package/chunks/{zh-3JQ75KFU.js → zh-X3WGU6SI.js} +3 -0
  327. package/chunks/{zoom-image-DNBKCGGF.js → zoom-image-NYJPC3NI.js} +13 -14
  328. package/cli.js +15 -15
  329. package/locales/ca.js +3 -0
  330. package/locales/de.js +1 -0
  331. package/locales/en.js +3 -0
  332. package/locales/fr.js +1 -0
  333. package/locales/ja.js +1 -0
  334. package/locales/pt.js +1 -0
  335. package/locales/ru.js +1 -0
  336. package/locales/zh-TW.js +3 -0
  337. package/locales/zh.js +3 -0
  338. package/package.json +3 -3
  339. package/web-shell/assets/{abnfDiagram-VCTEODGH-DWHXEVlf.js → abnfDiagram-VCTEODGH-yq7z7Anb.js} +1 -1
  340. package/web-shell/assets/{arc-CXKjm86V.js → arc-CbJO0xnT.js} +1 -1
  341. package/web-shell/assets/{architectureDiagram-5GKGNRK7-B_ynI0cX.js → architectureDiagram-5GKGNRK7-CRh89421.js} +1 -1
  342. package/web-shell/assets/{blockDiagram-NRAW4CY4-DMebd9X0.js → blockDiagram-NRAW4CY4-C75KAhKv.js} +1 -1
  343. package/web-shell/assets/{c4Diagram-UCG6FXSJ-BZ5BlxS-.js → c4Diagram-UCG6FXSJ-BzlMveFB.js} +1 -1
  344. package/web-shell/assets/channel-B3sGR79J.js +1 -0
  345. package/web-shell/assets/{chunk-2Q5K7J3B-CluJKopE.js → chunk-2Q5K7J3B-DA8QDX3a.js} +1 -1
  346. package/web-shell/assets/{chunk-5VM5RSS4-hzDAPFOo.js → chunk-5VM5RSS4-Bgu7gQ7Y.js} +1 -1
  347. package/web-shell/assets/{chunk-F27PBJKO-6vHioKJe.js → chunk-F27PBJKO-BOew7pIK.js} +1 -1
  348. package/web-shell/assets/{chunk-G27WJ6UU-B_5hKTGo.js → chunk-G27WJ6UU-DHx1I-hO.js} +1 -1
  349. package/web-shell/assets/{chunk-JWPE2WC7-CO9VoFCH.js → chunk-JWPE2WC7-SarFW0WU.js} +1 -1
  350. package/web-shell/assets/{chunk-LCL6LL3I-7L5JpxYu.js → chunk-LCL6LL3I-BLzP083Z.js} +1 -1
  351. package/web-shell/assets/{chunk-POPQ4Y6H-DHLJMAqj.js → chunk-POPQ4Y6H-Bmkv_iKm.js} +1 -1
  352. package/web-shell/assets/{chunk-SVP7TREG-Dt-4Cqdl.js → chunk-SVP7TREG-MPx9r1N2.js} +1 -1
  353. package/web-shell/assets/{chunk-XXDRQBXY-QlSQ3ssG.js → chunk-XXDRQBXY-Ck-09rKG.js} +1 -1
  354. package/web-shell/assets/classDiagram-DTDB5LWJ-sTGo0K3v.js +1 -0
  355. package/web-shell/assets/classDiagram-v2-JRS7N3AN-sTGo0K3v.js +1 -0
  356. package/web-shell/assets/{cose-bilkent-JH36ORCC-DMw3EOxl.js → cose-bilkent-JH36ORCC-DWm6lfOG.js} +1 -1
  357. package/web-shell/assets/{cynefin-OW5HDTMX-s6vEA7RQ.js → cynefin-OW5HDTMX-DcBUyr5R.js} +1 -1
  358. package/web-shell/assets/{cynefinDiagram-5FMLGOSQ-AOKsvYLt.js → cynefinDiagram-5FMLGOSQ-Df8qmd_p.js} +1 -1
  359. package/web-shell/assets/{dagre-3AP2YEHR-9QAZn3m7.js → dagre-3AP2YEHR-DDmGspD7.js} +1 -1
  360. package/web-shell/assets/{diagram-S7CK7UJ4-CWpnu4FN.js → diagram-S7CK7UJ4-BK_qFvbi.js} +1 -1
  361. package/web-shell/assets/{diagram-UQ7AKVKN-9l0jXD8q.js → diagram-UQ7AKVKN-Uw3AP_bi.js} +1 -1
  362. package/web-shell/assets/{diagram-VSXAHHWV-BMUHroj4.js → diagram-VSXAHHWV-CJOQKxY7.js} +1 -1
  363. package/web-shell/assets/{diagram-VX7I27RA-Co9x27vm.js → diagram-VX7I27RA-DhdvZna5.js} +1 -1
  364. package/web-shell/assets/{diagram-Z3DM3KII-BKnTeOER.js → diagram-Z3DM3KII-edQU0nlP.js} +1 -1
  365. package/web-shell/assets/{ebnfDiagram-PWID7BFC-QBZD9CKG.js → ebnfDiagram-PWID7BFC-4kugBEsO.js} +1 -1
  366. package/web-shell/assets/{erDiagram-SSCWMZ5O-dKWAEGun.js → erDiagram-SSCWMZ5O-BMkFivWO.js} +1 -1
  367. package/web-shell/assets/{flowDiagram-A5DVABFB-CR_UgVqj.js → flowDiagram-A5DVABFB-BM1ea8g-.js} +1 -1
  368. package/web-shell/assets/{ganttDiagram-EL5Y4UJY-DQUnjWO6.js → ganttDiagram-EL5Y4UJY-CXj_cKRf.js} +1 -1
  369. package/web-shell/assets/{gitGraphDiagram-WWUBYQGX-C4j59wPL.js → gitGraphDiagram-WWUBYQGX-D0nEqwqu.js} +1 -1
  370. package/web-shell/assets/{index-tYXRIPz4.js → index-B6JN54Pd.js} +1 -1
  371. package/web-shell/assets/{index-BN_m_uHJ.css → index-C-XlQn24.css} +1 -1
  372. package/web-shell/assets/index-DLjXM0dn.js +1860 -0
  373. package/web-shell/assets/{infoDiagram-RXCK75RN-mzqbt50w.js → infoDiagram-RXCK75RN-DF7aGGbQ.js} +1 -1
  374. package/web-shell/assets/{ishikawaDiagram-5VMMS53U-ChLOqhGl.js → ishikawaDiagram-5VMMS53U-CZYNX1lL.js} +1 -1
  375. package/web-shell/assets/{journeyDiagram-EYS64GPL-SifZE-R8.js → journeyDiagram-EYS64GPL-CvrqMUz1.js} +1 -1
  376. package/web-shell/assets/{kanban-definition-3QL26DDD-Sft2qlbc.js → kanban-definition-3QL26DDD-BZNJQZBj.js} +1 -1
  377. package/web-shell/assets/{layout-O2uHVkPd.js → layout-Bf83x7D6.js} +1 -1
  378. package/web-shell/assets/{linear-BVqYgjSc.js → linear-Bkc3ES2f.js} +1 -1
  379. package/web-shell/assets/{mermaid.core-CZ9MQaJ6.js → mermaid.core-C6xuovwz.js} +6 -6
  380. package/web-shell/assets/{mindmap-definition-FBJOCRG2-BNQYjBqM.js → mindmap-definition-FBJOCRG2-DzH6gVRg.js} +1 -1
  381. package/web-shell/assets/{pegDiagram-XKGWAZYB-rh1J8uv6.js → pegDiagram-XKGWAZYB-DCvLh2fa.js} +1 -1
  382. package/web-shell/assets/{pieDiagram-E7YTZNPT-BQHR5mn9.js → pieDiagram-E7YTZNPT-BtjVlx_6.js} +1 -1
  383. package/web-shell/assets/{quadrantDiagram-AXDQQJYC-CLCbP7mK.js → quadrantDiagram-AXDQQJYC-IbroqxFe.js} +1 -1
  384. package/web-shell/assets/{railroadDiagram-O6MQD6OU-CDQhrkbm.js → railroadDiagram-O6MQD6OU-BvMykiWW.js} +1 -1
  385. package/web-shell/assets/{requirementDiagram-EFPCY7ZU-BdP9uswg.js → requirementDiagram-EFPCY7ZU-D-HHMyrh.js} +1 -1
  386. package/web-shell/assets/{sankeyDiagram-P5KCCOFB-CFZDFBXF.js → sankeyDiagram-P5KCCOFB-C0XXhB6d.js} +1 -1
  387. package/web-shell/assets/{sequenceDiagram-WJ2MYXX4-BW9WOJXI.js → sequenceDiagram-WJ2MYXX4-DseAXj5d.js} +1 -1
  388. package/web-shell/assets/{sizeCapture-X5ZJPWSS-CPMia32z.js → sizeCapture-X5ZJPWSS-Cek2EweK.js} +1 -1
  389. package/web-shell/assets/{stateDiagram-HBIQ2CUA-BANp9p7F.js → stateDiagram-HBIQ2CUA-yLv8wafW.js} +1 -1
  390. package/web-shell/assets/stateDiagram-v2-4QOOHH4V-DeThXnol.js +1 -0
  391. package/web-shell/assets/{swimlanes-XN3QIQJK-JroXksK-.js → swimlanes-XN3QIQJK-Cwz-opvE.js} +1 -1
  392. package/web-shell/assets/swimlanesDiagram-VK2B7HYN-GW0R1ZSv.js +8 -0
  393. package/web-shell/assets/{timeline-definition-24CTP7MA-DfuVIfYY.js → timeline-definition-24CTP7MA-BJuFD7OG.js} +1 -1
  394. package/web-shell/assets/{vennDiagram-4TSXK5OY-BZXoSjRB.js → vennDiagram-4TSXK5OY-CNAavdoV.js} +1 -1
  395. package/web-shell/assets/{wardleyDiagram-VM6X3IG4-BdiY8avC.js → wardleyDiagram-VM6X3IG4-DaIjAidq.js} +1 -1
  396. package/web-shell/assets/{xychartDiagram-S5SC5T6Z-DcXh_U4H.js → xychartDiagram-S5SC5T6Z-DkcQXjTy.js} +1 -1
  397. package/web-shell/index.html +19 -4
  398. package/chunks/MaxSizedBox-3OZJCC3J.js +0 -110
  399. package/chunks/agent-BFE3DQM3.js +0 -93
  400. package/chunks/agent-headless-LLVKZZ4P.js +0 -87
  401. package/chunks/bridge-EBYO4SYM.js +0 -118
  402. package/chunks/channel-settings-store-5VP2Y2YM.js +0 -115
  403. package/chunks/chunk-AXMWHKXA.js +0 -42
  404. package/chunks/chunk-IO257NUD.js +0 -623
  405. package/chunks/chunk-YHC2EYYG.js +0 -125
  406. package/chunks/computer-use-EGPWFEX6.js +0 -2142
  407. package/chunks/config-utils-WZ43VOBS.js +0 -25
  408. package/chunks/contextCommand-5DSEQI6S.js +0 -106
  409. package/chunks/daemon-status-provider-EYMLPYJU.js +0 -116
  410. package/chunks/daemon-trust-policy-CQYKZ7VO.js +0 -112
  411. package/chunks/deferred-core-runtime-WFEPUXZR.js +0 -114
  412. package/chunks/earlyInputCapture-PN4PP7V5.js +0 -107
  413. package/chunks/environment-WUPHLPKZ.js +0 -127
  414. package/chunks/errors-WPMPVIAT.js +0 -113
  415. package/chunks/exitPlanMode-MLFHYZNB.js +0 -85
  416. package/chunks/handleAutoUpdate-F5OTWUT5.js +0 -109
  417. package/chunks/i18n-C562S6KN.js +0 -124
  418. package/chunks/initializer-7YPGOFP4.js +0 -113
  419. package/chunks/installationInfo-ARU5Q2H7.js +0 -107
  420. package/chunks/list-KTSK275C.js +0 -116
  421. package/chunks/loadedSettingsAdapter-F3T2EQ5J.js +0 -110
  422. package/chunks/mcp-6ONTVPAY.js +0 -110
  423. package/chunks/nonInteractiveCli-KZDWFAN6.js +0 -178
  424. package/chunks/pidfile-IO7ALSZF.js +0 -111
  425. package/chunks/prompt-terminal-ledger-TCE7PMCE.js +0 -105
  426. package/chunks/resumeHistoryUtils-DDSBAQJS.js +0 -118
  427. package/chunks/ripGrep-E7P6K4QR.js +0 -40
  428. package/chunks/serve-KEAWV4TI.js +0 -118
  429. package/chunks/shell-H6K63WG3.js +0 -95
  430. package/chunks/skill-settings-TCKLXIXM.js +0 -118
  431. package/chunks/spawnChannel-2K6NKWM5.js +0 -111
  432. package/chunks/standalone-update-LSCGOEFP.js +0 -118
  433. package/chunks/terminal-image-renderer-UHX3UD66.js +0 -114
  434. package/chunks/theme-manager-6B47ZPIF.js +0 -102
  435. package/chunks/total-session-admission-NSCFWGJH.js +0 -113
  436. package/chunks/trustedFolders-7XMJWGQ3.js +0 -122
  437. package/chunks/updateCheck-EOVLHD4T.js +0 -118
  438. package/chunks/useAutoAcceptIndicator-ZNMIGBTN.js +0 -120
  439. package/chunks/workspace-providers-status-GPGU5YMT.js +0 -113
  440. package/chunks/workspace-registry-BQISXT6Y.js +0 -122
  441. package/chunks/workspace-service-LLY6HCUC.js +0 -129
  442. package/chunks/workspace-skills-status-L5N2Y3ZP.js +0 -113
  443. package/chunks/write-file-EJHU2Z3E.js +0 -90
  444. package/web-shell/assets/channel-Zg3WHgq_.js +0 -1
  445. package/web-shell/assets/classDiagram-DTDB5LWJ-C16l9jQz.js +0 -1
  446. package/web-shell/assets/classDiagram-v2-JRS7N3AN-C16l9jQz.js +0 -1
  447. package/web-shell/assets/index-DrlJu79f.js +0 -1792
  448. package/web-shell/assets/stateDiagram-v2-4QOOHH4V-NZYAoQLU.js +0 -1
  449. package/web-shell/assets/swimlanesDiagram-VK2B7HYN-3YdVX3vj.js +0 -8
@@ -1,623 +0,0 @@
1
- // Force strict mode and setup for ESM
2
- "use strict";
3
- import {
4
- TextTokenizer,
5
- isSupportedImageMimeType
6
- } from "./chunk-YHC2EYYG.js";
7
- import {
8
- createDebugLogger
9
- } from "./chunk-A5F2YNO6.js";
10
- import {
11
- init_esbuild_shims
12
- } from "./chunk-5O2XNYP6.js";
13
- import {
14
- __name
15
- } from "./chunk-J2S4EL5Y.js";
16
-
17
- // packages/core/src/utils/request-tokenizer/requestTokenizer.ts
18
- init_esbuild_shims();
19
-
20
- // packages/core/src/utils/request-tokenizer/imageTokenizer.ts
21
- init_esbuild_shims();
22
- var debugLogger = createDebugLogger("IMAGE_TOKENIZER");
23
- var ImageTokenizer = class _ImageTokenizer {
24
- static {
25
- __name(this, "ImageTokenizer");
26
- }
27
- /** 28x28 pixels = 1 token */
28
- static PIXELS_PER_TOKEN = 28 * 28;
29
- /** Minimum tokens per image */
30
- static MIN_TOKENS_PER_IMAGE = 4;
31
- /** Maximum tokens per image */
32
- static MAX_TOKENS_PER_IMAGE = 16384;
33
- /** Special tokens for vision markers */
34
- static VISION_SPECIAL_TOKENS = 2;
35
- /**
36
- * Extract image metadata from base64 data
37
- *
38
- * @param base64Data Base64-encoded image data (with or without data URL prefix)
39
- * @param mimeType MIME type of the image
40
- * @returns Promise resolving to ImageMetadata with dimensions and format info
41
- */
42
- async extractImageMetadata(base64Data, mimeType) {
43
- try {
44
- if (!isSupportedImageMimeType(mimeType)) {
45
- debugLogger.warn(`Unsupported image format: ${mimeType}`);
46
- return {
47
- width: 512,
48
- height: 512,
49
- mimeType,
50
- dataSize: Math.floor(base64Data.length * 0.75)
51
- };
52
- }
53
- const cleanBase64 = base64Data.replace(/^data:[^;]+;base64,/, "");
54
- const buffer = Buffer.from(cleanBase64, "base64");
55
- const dimensions = await this.extractDimensions(buffer, mimeType);
56
- return {
57
- width: dimensions.width,
58
- height: dimensions.height,
59
- mimeType,
60
- dataSize: buffer.length
61
- };
62
- } catch (error) {
63
- debugLogger.warn("Failed to extract image metadata:", error);
64
- return {
65
- width: 512,
66
- height: 512,
67
- mimeType,
68
- dataSize: Math.floor(base64Data.length * 0.75)
69
- };
70
- }
71
- }
72
- /**
73
- * Extract image dimensions from buffer based on format
74
- *
75
- * @param buffer Binary image data buffer
76
- * @param mimeType MIME type to determine parsing strategy
77
- * @returns Promise resolving to width and height dimensions
78
- */
79
- async extractDimensions(buffer, mimeType) {
80
- if (mimeType.includes("png")) {
81
- return this.extractPngDimensions(buffer);
82
- }
83
- if (mimeType.includes("jpeg") || mimeType.includes("jpg")) {
84
- return this.extractJpegDimensions(buffer);
85
- }
86
- if (mimeType.includes("webp")) {
87
- return this.extractWebpDimensions(buffer);
88
- }
89
- if (mimeType.includes("gif")) {
90
- return this.extractGifDimensions(buffer);
91
- }
92
- if (mimeType.includes("bmp")) {
93
- return this.extractBmpDimensions(buffer);
94
- }
95
- if (mimeType.includes("tiff")) {
96
- return this.extractTiffDimensions(buffer);
97
- }
98
- if (mimeType.includes("heic")) {
99
- return this.extractHeicDimensions(buffer);
100
- }
101
- return { width: 512, height: 512 };
102
- }
103
- /**
104
- * Extract PNG dimensions from IHDR chunk
105
- * PNG signature: 89 50 4E 47 0D 0A 1A 0A
106
- * Width/height at bytes 16-19 and 20-23 (big-endian)
107
- */
108
- extractPngDimensions(buffer) {
109
- if (buffer.length < 24) {
110
- throw new Error("Invalid PNG: buffer too short");
111
- }
112
- const signature = buffer.subarray(0, 8);
113
- const expectedSignature = Buffer.from([
114
- 137,
115
- 80,
116
- 78,
117
- 71,
118
- 13,
119
- 10,
120
- 26,
121
- 10
122
- ]);
123
- if (!signature.equals(expectedSignature)) {
124
- throw new Error("Invalid PNG signature");
125
- }
126
- const width = buffer.readUInt32BE(16);
127
- const height = buffer.readUInt32BE(20);
128
- return { width, height };
129
- }
130
- /**
131
- * Extract JPEG dimensions from SOF (Start of Frame) markers
132
- * JPEG starts with FF D8, SOF markers: 0xC0-0xC3, 0xC5-0xC7, 0xC9-0xCB, 0xCD-0xCF
133
- * Dimensions at offset +5 (height) and +7 (width) from SOF marker
134
- */
135
- extractJpegDimensions(buffer) {
136
- if (buffer.length < 4 || buffer[0] !== 255 || buffer[1] !== 216) {
137
- throw new Error("Invalid JPEG signature");
138
- }
139
- let offset = 2;
140
- while (offset < buffer.length - 8) {
141
- if (buffer[offset] !== 255) {
142
- offset++;
143
- continue;
144
- }
145
- const marker = buffer[offset + 1];
146
- if (marker >= 192 && marker <= 195 || marker >= 197 && marker <= 199 || marker >= 201 && marker <= 203 || marker >= 205 && marker <= 207) {
147
- const height = buffer.readUInt16BE(offset + 5);
148
- const width = buffer.readUInt16BE(offset + 7);
149
- return { width, height };
150
- }
151
- const segmentLength = buffer.readUInt16BE(offset + 2);
152
- offset += 2 + segmentLength;
153
- }
154
- throw new Error("Could not find JPEG dimensions");
155
- }
156
- /**
157
- * Extract WebP dimensions from RIFF container
158
- * Supports VP8, VP8L, and VP8X formats
159
- */
160
- extractWebpDimensions(buffer) {
161
- if (buffer.length < 16) {
162
- throw new Error("Invalid WebP: too short");
163
- }
164
- const riffSignature = buffer.subarray(0, 4).toString("ascii");
165
- const webpSignature = buffer.subarray(8, 12).toString("ascii");
166
- if (riffSignature !== "RIFF" || webpSignature !== "WEBP") {
167
- throw new Error("Invalid WebP signature");
168
- }
169
- const format = buffer.subarray(12, 16).toString("ascii");
170
- if (format === "VP8 ") {
171
- if (buffer.length < 30) {
172
- throw new Error("Invalid VP8 WebP: too short");
173
- }
174
- const width = buffer.readUInt16LE(26) & 16383;
175
- const height = buffer.readUInt16LE(28) & 16383;
176
- return { width, height };
177
- } else if (format === "VP8L") {
178
- if (buffer.length < 25) {
179
- throw new Error("Invalid VP8L WebP: too short");
180
- }
181
- if (buffer[20] !== 47) {
182
- throw new Error("Invalid VP8L WebP signature");
183
- }
184
- const bits = buffer.readUInt32LE(21);
185
- const width = (bits & 16383) + 1;
186
- const height = (bits >> 14 & 16383) + 1;
187
- return { width, height };
188
- } else if (format === "VP8X") {
189
- if (buffer.length < 30) {
190
- throw new Error("Invalid VP8X WebP: too short");
191
- }
192
- const width = buffer.readUIntLE(24, 3) + 1;
193
- const height = buffer.readUIntLE(27, 3) + 1;
194
- return { width, height };
195
- }
196
- throw new Error("Unsupported WebP format");
197
- }
198
- /**
199
- * Extract GIF dimensions from header
200
- * Supports GIF87a and GIF89a formats
201
- */
202
- extractGifDimensions(buffer) {
203
- if (buffer.length < 10) {
204
- throw new Error("Invalid GIF: too short");
205
- }
206
- const signature = buffer.subarray(0, 6).toString("ascii");
207
- if (signature !== "GIF87a" && signature !== "GIF89a") {
208
- throw new Error("Invalid GIF signature");
209
- }
210
- const width = buffer.readUInt16LE(6);
211
- const height = buffer.readUInt16LE(8);
212
- return { width, height };
213
- }
214
- /**
215
- * Calculate tokens for an image based on its metadata
216
- *
217
- * @param metadata Image metadata containing width, height, and format info
218
- * @returns Total token count including base image tokens and special tokens
219
- */
220
- calculateTokens(metadata) {
221
- return this.calculateTokensWithScaling(metadata.width, metadata.height);
222
- }
223
- /**
224
- * Calculate tokens with scaling logic
225
- *
226
- * Steps:
227
- * 1. Normalize to 28-pixel multiples
228
- * 2. Scale large images down, small images up
229
- * 3. Calculate tokens: pixels / 784 + 2 special tokens
230
- *
231
- * @param width Original image width in pixels
232
- * @param height Original image height in pixels
233
- * @returns Total token count for the image
234
- */
235
- calculateTokensWithScaling(width, height) {
236
- let hBar = Math.round(height / 28) * 28;
237
- let wBar = Math.round(width / 28) * 28;
238
- const minPixels = _ImageTokenizer.MIN_TOKENS_PER_IMAGE * _ImageTokenizer.PIXELS_PER_TOKEN;
239
- const maxPixels = _ImageTokenizer.MAX_TOKENS_PER_IMAGE * _ImageTokenizer.PIXELS_PER_TOKEN;
240
- if (hBar * wBar > maxPixels) {
241
- const beta = Math.sqrt(height * width / maxPixels);
242
- hBar = Math.floor(height / beta / 28) * 28;
243
- wBar = Math.floor(width / beta / 28) * 28;
244
- } else if (hBar * wBar < minPixels) {
245
- const beta = Math.sqrt(minPixels / (height * width));
246
- hBar = Math.ceil(height * beta / 28) * 28;
247
- wBar = Math.ceil(width * beta / 28) * 28;
248
- }
249
- const imageTokens = Math.floor(
250
- hBar * wBar / _ImageTokenizer.PIXELS_PER_TOKEN
251
- );
252
- return imageTokens + _ImageTokenizer.VISION_SPECIAL_TOKENS;
253
- }
254
- /**
255
- * Calculate tokens for multiple images serially
256
- *
257
- * @param base64DataArray Array of image data with MIME type information
258
- * @returns Promise resolving to array of token counts in same order as input
259
- */
260
- async calculateTokensBatch(base64DataArray) {
261
- const results = [];
262
- for (const { data, mimeType } of base64DataArray) {
263
- try {
264
- const metadata = await this.extractImageMetadata(data, mimeType);
265
- results.push(this.calculateTokens(metadata));
266
- } catch (error) {
267
- debugLogger.warn("Error calculating tokens for image:", error);
268
- results.push(
269
- _ImageTokenizer.MIN_TOKENS_PER_IMAGE + _ImageTokenizer.VISION_SPECIAL_TOKENS
270
- );
271
- }
272
- }
273
- return results;
274
- }
275
- /**
276
- * Extract BMP dimensions from header
277
- * BMP signature: 42 4D (BM)
278
- * Width/height at bytes 18-21 and 22-25 (little-endian)
279
- */
280
- extractBmpDimensions(buffer) {
281
- if (buffer.length < 26) {
282
- throw new Error("Invalid BMP: buffer too short");
283
- }
284
- if (buffer[0] !== 66 || buffer[1] !== 77) {
285
- throw new Error("Invalid BMP signature");
286
- }
287
- const width = buffer.readUInt32LE(18);
288
- const height = buffer.readInt32LE(22);
289
- return { width, height: Math.abs(height) };
290
- }
291
- /**
292
- * Extract TIFF dimensions from IFD (Image File Directory)
293
- * TIFF can be little-endian (II) or big-endian (MM)
294
- * Width/height are stored in IFD entries with tags 0x0100 and 0x0101
295
- */
296
- extractTiffDimensions(buffer) {
297
- if (buffer.length < 8) {
298
- throw new Error("Invalid TIFF: buffer too short");
299
- }
300
- const byteOrder = buffer.subarray(0, 2).toString("ascii");
301
- const isLittleEndian = byteOrder === "II";
302
- const isBigEndian = byteOrder === "MM";
303
- if (!isLittleEndian && !isBigEndian) {
304
- throw new Error("Invalid TIFF byte order");
305
- }
306
- const magic = isLittleEndian ? buffer.readUInt16LE(2) : buffer.readUInt16BE(2);
307
- if (magic !== 42) {
308
- throw new Error("Invalid TIFF magic number");
309
- }
310
- const ifdOffset = isLittleEndian ? buffer.readUInt32LE(4) : buffer.readUInt32BE(4);
311
- if (ifdOffset >= buffer.length) {
312
- throw new Error("Invalid TIFF IFD offset");
313
- }
314
- const numEntries = isLittleEndian ? buffer.readUInt16LE(ifdOffset) : buffer.readUInt16BE(ifdOffset);
315
- let width = 0;
316
- let height = 0;
317
- for (let i = 0; i < numEntries; i++) {
318
- const entryOffset = ifdOffset + 2 + i * 12;
319
- if (entryOffset + 12 > buffer.length) break;
320
- const tag = isLittleEndian ? buffer.readUInt16LE(entryOffset) : buffer.readUInt16BE(entryOffset);
321
- const type = isLittleEndian ? buffer.readUInt16LE(entryOffset + 2) : buffer.readUInt16BE(entryOffset + 2);
322
- const value = type === 3 ? isLittleEndian ? buffer.readUInt16LE(entryOffset + 8) : buffer.readUInt16BE(entryOffset + 8) : isLittleEndian ? buffer.readUInt32LE(entryOffset + 8) : buffer.readUInt32BE(entryOffset + 8);
323
- if (tag === 256) {
324
- width = value;
325
- } else if (tag === 257) {
326
- height = value;
327
- }
328
- if (width > 0 && height > 0) break;
329
- }
330
- if (width === 0 || height === 0) {
331
- throw new Error("Could not find TIFF dimensions");
332
- }
333
- return { width, height };
334
- }
335
- /**
336
- * Extract HEIC dimensions from meta box
337
- * HEIC is based on ISO Base Media File Format
338
- * This is a simplified implementation that looks for 'ispe' (Image Spatial Extents) box
339
- */
340
- extractHeicDimensions(buffer) {
341
- if (buffer.length < 12) {
342
- throw new Error("Invalid HEIC: buffer too short");
343
- }
344
- const ftypBox = buffer.subarray(4, 8).toString("ascii");
345
- if (ftypBox !== "ftyp") {
346
- throw new Error("Invalid HEIC: missing ftyp box");
347
- }
348
- const brand = buffer.subarray(8, 12).toString("ascii");
349
- if (!["heic", "heix", "hevc", "hevx"].includes(brand)) {
350
- throw new Error("Invalid HEIC brand");
351
- }
352
- let offset = 0;
353
- while (offset < buffer.length - 8) {
354
- const boxSize = buffer.readUInt32BE(offset);
355
- const boxType = buffer.subarray(offset + 4, offset + 8).toString("ascii");
356
- if (boxType === "meta") {
357
- const metaOffset = offset + 8;
358
- let innerOffset = metaOffset + 4;
359
- while (innerOffset < offset + boxSize - 8) {
360
- const innerBoxSize = buffer.readUInt32BE(innerOffset);
361
- const innerBoxType = buffer.subarray(innerOffset + 4, innerOffset + 8).toString("ascii");
362
- if (innerBoxType === "ispe") {
363
- if (innerOffset + 20 <= buffer.length) {
364
- const width = buffer.readUInt32BE(innerOffset + 12);
365
- const height = buffer.readUInt32BE(innerOffset + 16);
366
- return { width, height };
367
- }
368
- }
369
- if (innerBoxSize === 0) break;
370
- innerOffset += innerBoxSize;
371
- }
372
- }
373
- if (boxSize === 0) break;
374
- offset += boxSize;
375
- }
376
- debugLogger.warn("Could not extract HEIC dimensions, using default");
377
- return { width: 512, height: 512 };
378
- }
379
- };
380
-
381
- // packages/core/src/utils/request-tokenizer/requestTokenizer.ts
382
- var debugLogger2 = createDebugLogger("TOKENIZER");
383
- var RequestTokenizer = class {
384
- static {
385
- __name(this, "RequestTokenizer");
386
- }
387
- textTokenizer;
388
- imageTokenizer;
389
- constructor() {
390
- this.textTokenizer = new TextTokenizer();
391
- this.imageTokenizer = new ImageTokenizer();
392
- }
393
- /**
394
- * Calculate tokens for a request using serial processing
395
- */
396
- async calculateTokens(request) {
397
- const startTime = performance.now();
398
- try {
399
- const { textContents, imageContents, audioContents, otherContents } = this.processAndGroupContents(request);
400
- if (textContents.length === 0 && imageContents.length === 0 && audioContents.length === 0 && otherContents.length === 0) {
401
- return {
402
- totalTokens: 0,
403
- breakdown: {
404
- textTokens: 0,
405
- imageTokens: 0,
406
- audioTokens: 0,
407
- otherTokens: 0
408
- },
409
- processingTime: performance.now() - startTime
410
- };
411
- }
412
- const textTokens = await this.calculateTextTokens(textContents);
413
- const imageTokens = await this.calculateImageTokens(imageContents);
414
- const audioTokens = await this.calculateAudioTokens(audioContents);
415
- const otherTokens = await this.calculateOtherTokens(otherContents);
416
- const totalTokens = textTokens + imageTokens + audioTokens + otherTokens;
417
- const processingTime = performance.now() - startTime;
418
- return {
419
- totalTokens,
420
- breakdown: {
421
- textTokens,
422
- imageTokens,
423
- audioTokens,
424
- otherTokens
425
- },
426
- processingTime
427
- };
428
- } catch (error) {
429
- debugLogger2.error("Error calculating tokens:", error);
430
- const fallbackTokens = this.calculateFallbackTokens(request);
431
- return {
432
- totalTokens: fallbackTokens,
433
- breakdown: {
434
- textTokens: fallbackTokens,
435
- imageTokens: 0,
436
- audioTokens: 0,
437
- otherTokens: 0
438
- },
439
- processingTime: performance.now() - startTime
440
- };
441
- }
442
- }
443
- /**
444
- * Calculate tokens for text contents
445
- */
446
- async calculateTextTokens(textContents) {
447
- if (textContents.length === 0) return 0;
448
- try {
449
- return await this.textTokenizer.calculateTokens(textContents.join(""));
450
- } catch (error) {
451
- debugLogger2.warn("Error calculating text tokens:", error);
452
- const totalChars = textContents.join("").length;
453
- return Math.ceil(totalChars / 4);
454
- }
455
- }
456
- /**
457
- * Calculate tokens for image contents using serial processing
458
- */
459
- async calculateImageTokens(imageContents) {
460
- if (imageContents.length === 0) return 0;
461
- try {
462
- const tokenCounts = await this.imageTokenizer.calculateTokensBatch(imageContents);
463
- return tokenCounts.reduce((sum, count) => sum + count, 0);
464
- } catch (error) {
465
- debugLogger2.warn("Error calculating image tokens:", error);
466
- return imageContents.length * 6;
467
- }
468
- }
469
- /**
470
- * Calculate tokens for audio contents
471
- * TODO: Implement proper audio token calculation
472
- */
473
- async calculateAudioTokens(audioContents) {
474
- if (audioContents.length === 0) return 0;
475
- let totalTokens = 0;
476
- for (const audioContent of audioContents) {
477
- try {
478
- const dataSize = Math.floor(audioContent.data.length * 0.75);
479
- totalTokens += Math.max(Math.ceil(dataSize / 100), 10);
480
- } catch (error) {
481
- debugLogger2.warn("Error calculating audio tokens:", error);
482
- totalTokens += 10;
483
- }
484
- }
485
- return totalTokens;
486
- }
487
- /**
488
- * Calculate tokens for other content types (functions, files, etc.)
489
- */
490
- async calculateOtherTokens(otherContents) {
491
- if (otherContents.length === 0) return 0;
492
- try {
493
- return await this.textTokenizer.calculateTokens(otherContents.join(""));
494
- } catch (error) {
495
- debugLogger2.warn("Error calculating other content tokens:", error);
496
- const totalChars = otherContents.join("").length;
497
- return Math.ceil(totalChars / 4);
498
- }
499
- }
500
- /**
501
- * Fallback token calculation using simple string serialization
502
- */
503
- calculateFallbackTokens(request) {
504
- try {
505
- const content = JSON.stringify(request.contents);
506
- return Math.ceil(content.length / 4);
507
- } catch (error) {
508
- debugLogger2.warn("Error in fallback token calculation:", error);
509
- return 100;
510
- }
511
- }
512
- /**
513
- * Process request contents and group by type
514
- */
515
- processAndGroupContents(request) {
516
- const textContents = [];
517
- const imageContents = [];
518
- const audioContents = [];
519
- const otherContents = [];
520
- if (!request.contents) {
521
- return { textContents, imageContents, audioContents, otherContents };
522
- }
523
- const contents = Array.isArray(request.contents) ? request.contents : [request.contents];
524
- for (const content of contents) {
525
- this.processContent(
526
- content,
527
- textContents,
528
- imageContents,
529
- audioContents,
530
- otherContents
531
- );
532
- }
533
- return { textContents, imageContents, audioContents, otherContents };
534
- }
535
- /**
536
- * Process a single content item and add to appropriate arrays
537
- */
538
- processContent(content, textContents, imageContents, audioContents, otherContents) {
539
- if (typeof content === "string") {
540
- if (content.trim()) {
541
- textContents.push(content);
542
- }
543
- return;
544
- }
545
- if ("parts" in content && content.parts) {
546
- for (const part of content.parts) {
547
- this.processPart(
548
- part,
549
- textContents,
550
- imageContents,
551
- audioContents,
552
- otherContents
553
- );
554
- }
555
- return;
556
- }
557
- this.processPart(
558
- content,
559
- textContents,
560
- imageContents,
561
- audioContents,
562
- otherContents
563
- );
564
- }
565
- /**
566
- * Process a single part and add to appropriate arrays
567
- */
568
- processPart(part, textContents, imageContents, audioContents, otherContents) {
569
- if (typeof part === "string") {
570
- if (part.trim()) {
571
- textContents.push(part);
572
- }
573
- return;
574
- }
575
- if ("text" in part && part.text) {
576
- textContents.push(part.text);
577
- return;
578
- }
579
- if ("inlineData" in part && part.inlineData) {
580
- const { data, mimeType } = part.inlineData;
581
- if (mimeType && mimeType.startsWith("image/")) {
582
- imageContents.push({ data: data || "", mimeType });
583
- return;
584
- }
585
- if (mimeType && mimeType.startsWith("audio/")) {
586
- audioContents.push({ data: data || "", mimeType });
587
- return;
588
- }
589
- }
590
- if ("fileData" in part && part.fileData) {
591
- otherContents.push(JSON.stringify(part.fileData));
592
- return;
593
- }
594
- if ("functionCall" in part && part.functionCall) {
595
- otherContents.push(JSON.stringify(part.functionCall));
596
- return;
597
- }
598
- if ("functionResponse" in part && part.functionResponse) {
599
- otherContents.push(JSON.stringify(part.functionResponse));
600
- return;
601
- }
602
- try {
603
- const serialized = JSON.stringify(part);
604
- if (serialized && serialized !== "{}") {
605
- otherContents.push(serialized);
606
- }
607
- } catch (error) {
608
- debugLogger2.warn("Failed to serialize unknown part type:", error);
609
- }
610
- }
611
- };
612
-
613
- // packages/core/src/utils/request-tokenizer/index.ts
614
- init_esbuild_shims();
615
-
616
- export {
617
- RequestTokenizer
618
- };
619
- /**
620
- * @license
621
- * Copyright 2025 Qwen
622
- * SPDX-License-Identifier: Apache-2.0
623
- */