@qwen-code/qwen-code 0.23.5-dev.codemode-responses.20260915.f024b37689 → 0.23.5-preview.0

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 (377) hide show
  1. package/bundled/computer-use/SKILL.md +24 -3
  2. package/bundled/qc-helper/docs/configuration/model-providers.md +43 -0
  3. package/bundled/qc-helper/docs/configuration/settings.md +10 -9
  4. package/bundled/qc-helper/docs/extension/agent-plugins.md +1 -0
  5. package/bundled/qc-helper/docs/extension/introduction.md +49 -0
  6. package/bundled/qc-helper/docs/features/channels/dingtalk.md +39 -4
  7. package/bundled/qc-helper/docs/features/channels/overview.md +12 -0
  8. package/bundled/qc-helper/docs/features/commands.md +57 -52
  9. package/bundled/qc-helper/docs/features/computer-use.md +1 -1
  10. package/bundled/qc-helper/docs/features/goals.md +8 -0
  11. package/bundled/qc-helper/docs/features/hooks.md +16 -0
  12. package/bundled/qc-helper/docs/qwen-serve.md +3 -1
  13. package/bundled/workflow-authoring/SKILL.md +48 -22
  14. package/chunks/{MaxSizedBox-BFMIFJWT.js → MaxSizedBox-FCF6M53W.js} +40 -43
  15. package/chunks/{StandaloneSessionPicker-4ZH7MOVG.js → StandaloneSessionPicker-V635V72I.js} +60 -63
  16. package/chunks/{acp-startup-profiler-RUQNTNU5.js → acp-startup-profiler-MOOU37VM.js} +2 -2
  17. package/chunks/{acp-subagent-executor-AHMVA4P3.js → acp-subagent-executor-TND6W2O5.js} +46 -47
  18. package/chunks/{acpAgent-UMAJ3XR3.js → acpAgent-3DPWZTNC.js} +954 -322
  19. package/chunks/{agent-CXB2CCQN.js → agent-KIHGINKN.js} +27 -30
  20. package/chunks/{agent-headless-7D5ZC736.js → agent-headless-EJ4QOUSM.js} +27 -30
  21. package/chunks/{anthropicContentGenerator-H5YPXIDE.js → anthropicContentGenerator-4FGOM5LK.js} +46 -64
  22. package/chunks/{artifact-tool-MFGORTWZ.js → artifact-tool-MUTNH4NI.js} +1 -1
  23. package/chunks/{askUserQuestion-WS4GUT7C.js → askUserQuestion-AKIRLVB5.js} +1 -1
  24. package/chunks/bareMode-QWKZPLPX.js +14 -0
  25. package/chunks/{bridge-A2WKX6IK.js → bridge-MUX5YJZT.js} +46 -49
  26. package/chunks/{ca-GZ4FDJU2.js → ca-WC3A5B3Q.js} +12 -1
  27. package/chunks/{channel-management-service-AFVIT4VH.js → channel-management-service-RRILWSXX.js} +4 -4
  28. package/chunks/{channel-settings-store-AXJIN7HG.js → channel-settings-store-7CBIRZER.js} +51 -54
  29. package/chunks/{channel-worker-group-JR6JOELM.js → channel-worker-group-3DUJFZJR.js} +8 -8
  30. package/chunks/{channel-worker-manager-AVKJEZFL.js → channel-worker-manager-E5UW2VLA.js} +8 -8
  31. package/chunks/{channel-worker-supervisor-OOYY7BAQ.js → channel-worker-supervisor-VN33GSEC.js} +5 -5
  32. package/chunks/{chunk-2YMRRI2C.js → chunk-2C5TR6HN.js} +82 -9
  33. package/chunks/{chunk-YDFOHRS5.js → chunk-2GP6BQ2J.js} +1 -1
  34. package/chunks/{chunk-RN6BU77T.js → chunk-347O2YZJ.js} +158 -290
  35. package/chunks/{chunk-LTINUI3O.js → chunk-36NRLIR6.js} +10 -8
  36. package/chunks/{chunk-AXZMWAJV.js → chunk-36SDZ2Q4.js} +8 -0
  37. package/chunks/{chunk-QR4Q425T.js → chunk-3BZI5GDP.js} +1 -1
  38. package/chunks/{chunk-C3YMBSLR.js → chunk-3HTUE6ZR.js} +3 -3
  39. package/chunks/{chunk-QS5Q5F42.js → chunk-3LLEB5CU.js} +2 -2
  40. package/chunks/{chunk-FPPG5Y3W.js → chunk-3UGMLA4V.js} +10 -8
  41. package/chunks/{chunk-66N6C4EH.js → chunk-3WILPKTJ.js} +2 -2
  42. package/chunks/{chunk-SROLVJFY.js → chunk-3WWPEFMX.js} +1 -1
  43. package/chunks/{chunk-ZKIAGIGH.js → chunk-3XBUCOWS.js} +1 -1
  44. package/chunks/{chunk-6RQFMGN2.js → chunk-43Y26NPF.js} +3 -3
  45. package/chunks/{chunk-INGBUYL6.js → chunk-4FLUQWJ4.js} +1 -1
  46. package/chunks/{chunk-S77FFY67.js → chunk-4JFLRHNE.js} +1 -1
  47. package/chunks/{chunk-MJHLKWGJ.js → chunk-4QPVZA5J.js} +70 -23
  48. package/chunks/{chunk-XX5HQLCZ.js → chunk-6OTF7TTE.js} +32 -1
  49. package/chunks/{chunk-4Y2I3CI3.js → chunk-6USYH3EU.js} +99 -6
  50. package/chunks/{chunk-Q3TFRP5G.js → chunk-7D4CV7JH.js} +102 -9
  51. package/chunks/{chunk-EWJTAP3Y.js → chunk-7O5PYQ3M.js} +20 -1
  52. package/chunks/chunk-ADN5KESB.js +28 -0
  53. package/chunks/chunk-AKRSSKUT.js +229 -0
  54. package/chunks/{chunk-54YUXX7X.js → chunk-AQP3H22J.js} +1 -1
  55. package/chunks/{chunk-EQWKIA72.js → chunk-AUX2FL5T.js} +24 -7
  56. package/chunks/{chunk-YGFJ6BRT.js → chunk-AZCTY64Z.js} +1 -1
  57. package/chunks/{chunk-QLX4D55R.js → chunk-B5TJK7B3.js} +1 -1
  58. package/chunks/{chunk-HXMDDII6.js → chunk-B6RMK4ED.js} +4 -4
  59. package/chunks/{chunk-UCKM6KCJ.js → chunk-BHG3H6OZ.js} +1 -1
  60. package/chunks/{chunk-JLF2AQAL.js → chunk-BHVF3R6B.js} +7 -5
  61. package/chunks/{chunk-HFJSQ4GL.js → chunk-BTICBRPL.js} +1 -1
  62. package/chunks/{chunk-KZCK5JUN.js → chunk-C3T6HPNM.js} +1 -1
  63. package/chunks/{chunk-FCLMJS6N.js → chunk-CDDP4ONL.js} +164 -27
  64. package/chunks/{chunk-Y3ZXDBUL.js → chunk-CQPM66MG.js} +4 -4
  65. package/chunks/{chunk-WKVZES7O.js → chunk-CXONOVBN.js} +1 -1
  66. package/chunks/{chunk-TYBRGFYL.js → chunk-CXY6BICQ.js} +501 -479
  67. package/chunks/{chunk-W23HOFDK.js → chunk-D3KVGQUV.js} +1 -1
  68. package/chunks/{chunk-LMJSPC55.js → chunk-D7JMO2GP.js} +3 -7
  69. package/chunks/{chunk-CXXAZ2LZ.js → chunk-DC4ZNGH4.js} +1 -1
  70. package/chunks/{chunk-FMLBBXHB.js → chunk-DRAX5YAI.js} +2 -2
  71. package/chunks/{chunk-DOTF2PF2.js → chunk-DRD6VBNH.js} +1 -1
  72. package/chunks/chunk-DX6JTDMR.js +105 -0
  73. package/chunks/{chunk-MNRK6MIH.js → chunk-E2VSBAFA.js} +53 -11
  74. package/chunks/{chunk-QJKR2P2K.js → chunk-EIBECN2J.js} +3 -3
  75. package/chunks/{chunk-LWWRJRCD.js → chunk-ESBYWATJ.js} +1 -1
  76. package/chunks/{chunk-3544ZEGZ.js → chunk-FASYATAZ.js} +5 -7
  77. package/chunks/{chunk-6YUS5JCV.js → chunk-FBY32737.js} +4 -4
  78. package/chunks/{chunk-LBWIJ5T7.js → chunk-FCPJXKDG.js} +10 -7
  79. package/chunks/{chunk-FX6GJIPZ.js → chunk-FEDFZBGR.js} +3 -3
  80. package/chunks/{chunk-DQ4LBRZN.js → chunk-FIJODK52.js} +3 -3
  81. package/chunks/{chunk-HVSRWLOW.js → chunk-FX6PZBOV.js} +3 -3
  82. package/chunks/{chunk-L6DIANLD.js → chunk-G45B3INR.js} +1 -1
  83. package/chunks/{chunk-EYLUKEYW.js → chunk-GI7SLDOI.js} +2 -2
  84. package/chunks/chunk-GJKP6XOB.js +1092 -0
  85. package/chunks/{chunk-I6YJZGHS.js → chunk-GSAOVDTH.js} +9 -9
  86. package/chunks/{chunk-XK4UQSIR.js → chunk-H6L4NEAT.js} +1 -1
  87. package/chunks/{chunk-GMCEFKNR.js → chunk-HNFKYKHH.js} +103 -22
  88. package/chunks/{chunk-6XDB3FR4.js → chunk-HX4WXX3H.js} +301 -138
  89. package/chunks/{chunk-HG46TTAG.js → chunk-HXUI5D4H.js} +1 -1
  90. package/chunks/{chunk-QI4WBHPF.js → chunk-HYHSMTRA.js} +4 -4
  91. package/chunks/{chunk-ZUKC5J6Q.js → chunk-IKBEIDOH.js} +14 -14
  92. package/chunks/{chunk-LCAJ63TF.js → chunk-INN5ORKX.js} +1 -1
  93. package/chunks/{chunk-GNV2SFO7.js → chunk-IVFTLUZD.js} +26 -1
  94. package/chunks/{chunk-GNKSR3FU.js → chunk-IXO2OCIP.js} +2 -2
  95. package/chunks/{chunk-SNT634Q6.js → chunk-K4XMAIRX.js} +30 -33
  96. package/chunks/{chunk-WBP64MZR.js → chunk-KAYC5FBN.js} +5269 -2785
  97. package/chunks/chunk-KEM7MWS7.js +3541 -0
  98. package/chunks/{chunk-ADQUK6WA.js → chunk-KVC7HZWK.js} +1 -1
  99. package/chunks/{chunk-UQXURNLM.js → chunk-KVQ3QL4K.js} +3 -3
  100. package/chunks/{chunk-7U5G6JXI.js → chunk-KWYTSSTJ.js} +105 -6
  101. package/chunks/{chunk-Q4G2YPI4.js → chunk-L2A5VBDL.js} +3019 -2352
  102. package/chunks/{chunk-WD6YQI5M.js → chunk-L3SNMEDW.js} +1 -1
  103. package/chunks/{chunk-BYUAT5OC.js → chunk-L7TJUPNR.js} +19 -3
  104. package/chunks/{chunk-ABNX6E6K.js → chunk-LFKXIOGC.js} +1 -1
  105. package/chunks/{chunk-GFAK6DYU.js → chunk-LO2UWNO5.js} +2 -2
  106. package/chunks/{chunk-67ZDP7UX.js → chunk-M22WLKLI.js} +5 -5
  107. package/chunks/{chunk-54B2LTKP.js → chunk-M23GFJ5B.js} +24 -5
  108. package/chunks/{chunk-VGY2RGXL.js → chunk-M4U2LTD2.js} +1 -1
  109. package/chunks/{chunk-ZNI3YJHS.js → chunk-MFDKHGTD.js} +1 -1
  110. package/chunks/{chunk-R7OO56VZ.js → chunk-MMRGG6R4.js} +1 -1
  111. package/chunks/{chunk-E6IR653O.js → chunk-MO4XID7S.js} +1 -1
  112. package/chunks/{chunk-NJ4ZNDVP.js → chunk-NKTMUPHJ.js} +3 -6
  113. package/chunks/{chunk-4DTFTPTU.js → chunk-NQ272MQG.js} +1 -1
  114. package/chunks/{chunk-DWKFTUGI.js → chunk-OALXNGUA.js} +6 -6
  115. package/chunks/{chunk-FBDHP23D.js → chunk-OSG23MR3.js} +1 -1
  116. package/chunks/{chunk-NJ2OFVUX.js → chunk-P42KMMU6.js} +860 -1
  117. package/chunks/{chunk-5KJ54DY3.js → chunk-PF7GAP6K.js} +60 -58
  118. package/chunks/{chunk-MQRLLBMQ.js → chunk-PPJSG2PU.js} +2 -2
  119. package/chunks/{chunk-EPVEPTI3.js → chunk-PZRXWQUA.js} +753 -18
  120. package/chunks/{chunk-VI5UVPOB.js → chunk-Q54O3EIA.js} +30 -28
  121. package/chunks/{chunk-QTUQV33C.js → chunk-QGEISOJ2.js} +4 -4
  122. package/chunks/{chunk-XKRYQOHS.js → chunk-QHSOINX6.js} +2 -2
  123. package/chunks/{chunk-Z6Q7I37O.js → chunk-QIPLWW6Q.js} +1 -1
  124. package/chunks/chunk-QMENOK5T.js +1246 -0
  125. package/chunks/chunk-QT6Z2IBF.js +347 -0
  126. package/chunks/{chunk-TBSCTWKF.js → chunk-RN6A53UJ.js} +25 -0
  127. package/chunks/{chunk-E7ZTAOJZ.js → chunk-RRI764F7.js} +21 -19
  128. package/chunks/{chunk-YI2YCNSP.js → chunk-SENYKRII.js} +1 -1
  129. package/chunks/chunk-SFHX5G2S.js +2796 -0
  130. package/chunks/chunk-SK3RZOPS.js +34 -0
  131. package/chunks/{chunk-SKYOAH4Z.js → chunk-SOLRBF7L.js} +13 -9
  132. package/chunks/{chunk-5WLF44DS.js → chunk-SSWTA7CH.js} +12 -12
  133. package/chunks/{chunk-IAS753HG.js → chunk-SYMXYRM5.js} +11 -2
  134. package/chunks/{chunk-FGROOEKM.js → chunk-TDKUXSJO.js} +34 -6
  135. package/chunks/{chunk-ZJ7JQUGY.js → chunk-TKF4JINY.js} +1 -1
  136. package/chunks/{chunk-ZOQ6HC7U.js → chunk-TPY6HW55.js} +4 -4
  137. package/chunks/{chunk-EDB556X7.js → chunk-TRZ22SG5.js} +1 -1
  138. package/chunks/{chunk-FHSOZSBO.js → chunk-TXTCM3TC.js} +4 -4
  139. package/chunks/{chunk-5ODRE7E5.js → chunk-U4AASWUQ.js} +28 -12
  140. package/chunks/{chunk-PPE7VUMD.js → chunk-UQGRJTDK.js} +2 -2
  141. package/chunks/{chunk-JO67LVXW.js → chunk-UZSB57EV.js} +6 -8
  142. package/chunks/{chunk-UY4OCBX4.js → chunk-V4JJAVHQ.js} +2 -2
  143. package/chunks/chunk-VEXUA6DX.js +1026 -0
  144. package/chunks/{chunk-ME4JBHSB.js → chunk-VQDWCQOE.js} +2 -0
  145. package/chunks/{chunk-ZC75SULX.js → chunk-VU3XMZ5I.js} +23 -4
  146. package/chunks/{chunk-A2UYI473.js → chunk-WL36KHUQ.js} +6 -6
  147. package/chunks/{chunk-IWOJ2FHG.js → chunk-WNQIJTOP.js} +8 -8
  148. package/chunks/{chunk-IANIY25T.js → chunk-WSJI6ODG.js} +99 -30
  149. package/chunks/{chunk-3CKAOJ4L.js → chunk-WZWTY7SG.js} +6 -6
  150. package/chunks/{chunk-EKMJR7M3.js → chunk-X7AYIXC7.js} +1 -1
  151. package/chunks/{chunk-IBRQG2MP.js → chunk-XAJZFGD2.js} +11 -11
  152. package/chunks/{chunk-VRQZESKP.js → chunk-XICCGDWF.js} +2 -2
  153. package/chunks/{chunk-L5R4D5T4.js → chunk-Y2KJC55Y.js} +12 -7
  154. package/chunks/{chunk-2S2WIGCM.js → chunk-Y4NNIGYO.js} +1 -1
  155. package/chunks/{chunk-J7LBAKDH.js → chunk-YL3UJML3.js} +7 -7
  156. package/chunks/{chunk-GSS4SZNG.js → chunk-YP2K3WOS.js} +40 -56
  157. package/chunks/{chunk-ZZUXUBEB.js → chunk-YQQ2U7AS.js} +8 -5
  158. package/chunks/{chunk-FAWTMDX7.js → chunk-YXHY6BKS.js} +15 -0
  159. package/chunks/{chunk-FIP5QS2U.js → chunk-YZXSDPOQ.js} +140 -39
  160. package/chunks/{chunk-WATHOB6X.js → chunk-ZFHKUQZ4.js} +3 -3
  161. package/chunks/{chunk-R5OA3ONY.js → chunk-ZMYKNKET.js} +6 -6
  162. package/chunks/{codex-subagent-executor-LANZAZPH.js → codex-subagent-executor-AEAIQZDC.js} +48 -49
  163. package/chunks/{config-utils-CRK2LQPA.js → config-utils-KX2YS725.js} +43 -46
  164. package/chunks/{contextCommand-GY5X3LIY.js → contextCommand-RV6Y5LNJ.js} +41 -44
  165. package/chunks/{core-runtime-IJIV2LHP.js → core-runtime-ZI4RTOJQ.js} +45 -48
  166. package/chunks/{create-sub-session-MNIVRHGB.js → create-sub-session-BBWFQARJ.js} +46 -48
  167. package/chunks/{daemon-NJB4PWZ7.js → daemon-INCM4VBX.js} +3 -1
  168. package/chunks/{daemon-git-worktree-guard-W6Z2BGDH.js → daemon-git-worktree-guard-KECEMV6A.js} +39 -42
  169. package/chunks/{daemon-status-provider-TJF3APU3.js → daemon-status-provider-NULJNAEV.js} +53 -56
  170. package/chunks/{daemon-trust-policy-6INCISDU.js → daemon-trust-policy-S4KWGPV3.js} +47 -50
  171. package/chunks/{daemon-trust-policy-monitor-JRTAQG54.js → daemon-trust-policy-monitor-546N5ZVL.js} +47 -50
  172. package/chunks/{de-VGY3VNBU.js → de-6AVKPTXQ.js} +11 -0
  173. package/chunks/{deferred-core-runtime-2JRTPTNM.js → deferred-core-runtime-T23ZT443.js} +39 -42
  174. package/chunks/{dist-NIOJXMGY.js → dist-4P3ZJYGI.js} +1 -1
  175. package/chunks/{dist-VDLSBCLM.js → dist-7MGRENQ5.js} +1 -1
  176. package/chunks/{dist-SE4J6Z4O.js → dist-BNW423XT.js} +326 -77
  177. package/chunks/{dist-TFGETXFN.js → dist-CESMUYGN.js} +4 -4
  178. package/chunks/{dist-MPUZZOG5.js → dist-DBBOFWSC.js} +1 -1
  179. package/chunks/{dist-T6DDPDLQ.js → dist-G5UMXIGF.js} +1 -1
  180. package/chunks/{dist-PA7WPFVE.js → dist-UXVNLQHG.js} +3 -3
  181. package/chunks/{dist-GUB7QRYA.js → dist-VA4LREAQ.js} +2 -2
  182. package/chunks/{dist-2QYIVNS6.js → dist-XDRTR4QP.js} +1 -1
  183. package/chunks/{edit-JDIXXCYB.js → edit-CMSQB7NP.js} +27 -30
  184. package/chunks/{en-E5ZO5TZW.js → en-56QLKXS2.js} +23 -1
  185. package/chunks/{enter-worktree-CAARFWBI.js → enter-worktree-DA6A4XC5.js} +3 -3
  186. package/chunks/{enterPlanMode-YTNTBZBN.js → enterPlanMode-UDPMNESD.js} +27 -30
  187. package/chunks/{environment-UAI5L52V.js → environment-TSQJUTPV.js} +42 -45
  188. package/chunks/{errors-J4UCDCW5.js → errors-RIVYJS6T.js} +41 -44
  189. package/chunks/{exit-worktree-JXGGUOBP.js → exit-worktree-4H6Z2VQI.js} +3 -3
  190. package/chunks/{exitPlanMode-YMWJ2EO7.js → exitPlanMode-BYBBFN2T.js} +27 -30
  191. package/chunks/{fast-path-MBAN7TK3.js → fast-path-F2CYDDZ4.js} +4 -4
  192. package/chunks/{fast-path-settings-XDYX7X5Z.js → fast-path-settings-N2VGRGDJ.js} +2 -2
  193. package/chunks/{fr-UAZJJH5N.js → fr-EBUDHJL3.js} +11 -0
  194. package/chunks/{glob-YEM24E3Z.js → glob-Z2JMJKKN.js} +27 -30
  195. package/chunks/{goal-tools-LJIVH5T6.js → goal-tools-HXVVLGCV.js} +27 -30
  196. package/chunks/{handleAutoUpdate-DYCSYDYL.js → handleAutoUpdate-FZP45KOR.js} +43 -46
  197. package/chunks/{i18n-PTAV7SN3.js → i18n-OTB62AKW.js} +40 -43
  198. package/chunks/{image-gen-5G2TQ3DY.js → image-gen-HIAZCB5T.js} +6 -7
  199. package/chunks/{initializer-MPXTKQA4.js → initializer-4JXZEC4B.js} +47 -50
  200. package/chunks/{installationInfo-U5EFA3OL.js → installationInfo-2IJV5QKC.js} +39 -42
  201. package/chunks/{ja-2RITCMAJ.js → ja-NCDT4CGV.js} +11 -0
  202. package/chunks/{list-YOE25QUI.js → list-KQSQ4A5G.js} +50 -53
  203. package/chunks/{llm-ZZ2WNQMC.js → llm-LSUBOJAR.js} +154 -974
  204. package/chunks/{llm-content-generator-CG2HRJZC.js → llm-content-generator-MLIONRXE.js} +17 -12
  205. package/chunks/{loadedSettingsAdapter-NPGWGURF.js → loadedSettingsAdapter-TZTTNRHI.js} +47 -50
  206. package/chunks/{loggingContentGenerator-TUL6SJVL.js → loggingContentGenerator-TUPEXFMM.js} +31 -34
  207. package/chunks/{loop-wakeup-VG6CGBQA.js → loop-wakeup-ZBVRI6VH.js} +1 -1
  208. package/chunks/{managed-npm-update-YUDSCJP3.js → managed-npm-update-WEA5XMFZ.js} +40 -43
  209. package/chunks/{mcp-EX3GDQVO.js → mcp-TFDTUPIA.js} +47 -50
  210. package/chunks/{model-configuration-6DEKTXJI.js → model-configuration-ZCAKKIOF.js} +48 -51
  211. package/chunks/{modelConfigUtils-4NA2MHEE.js → modelConfigUtils-J3ZPW7ZK.js} +41 -44
  212. package/chunks/{monitor-PPUGNAWR.js → monitor-CI7YE7MT.js} +29 -32
  213. package/chunks/{nonInteractiveCli-6TW2XYP5.js → nonInteractiveCli-GPT3TVOK.js} +96 -98
  214. package/chunks/{notebook-edit-4MUXHZHT.js → notebook-edit-3WCVRNGL.js} +27 -30
  215. package/chunks/{openaiContentGenerator-5J73W5XZ.js → openaiContentGenerator-OGILGUZE.js} +12 -17
  216. package/chunks/{openaiResponsesContentGenerator-AWRYZLJU.js → openaiResponsesContentGenerator-NXOXUPFM.js} +45 -13
  217. package/chunks/{pidfile-M7WELKBB.js → pidfile-GBTBIGHF.js} +39 -42
  218. package/chunks/{process-registry-X6ZCASEN.js → process-registry-7LAPI3ZB.js} +1 -1
  219. package/chunks/{processUtils-SPRINFNY.js → processUtils-O4II3RYH.js} +2 -2
  220. package/chunks/{prompt-terminal-ledger-25BRD7FX.js → prompt-terminal-ledger-ILIXZI3E.js} +40 -43
  221. package/chunks/{pt-5ZF7ZQUV.js → pt-FYYFWYUC.js} +11 -0
  222. package/chunks/{qwenContentGenerator-H5AAKXPC.js → qwenContentGenerator-I4LRYADV.js} +33 -36
  223. package/chunks/{qwenOAuth2-WIEUEFEY.js → qwenOAuth2-3J66TOT5.js} +6 -7
  224. package/chunks/{read-file-ILGEFPB3.js → read-file-G4XKW2CS.js} +5 -9
  225. package/chunks/{record-artifact-PXMNP7GZ.js → record-artifact-L3CFJOMA.js} +2 -2
  226. package/chunks/{report-findings-W6GR7SYZ.js → report-findings-LY5HQY4K.js} +3 -3
  227. package/chunks/{resumeHistoryUtils-RB52QOCH.js → resumeHistoryUtils-YPJU4XFE.js} +44 -47
  228. package/chunks/{ripGrep-O6QAFHQK.js → ripGrep-AAKMALLM.js} +7 -11
  229. package/chunks/{ru-7BNZFQKG.js → ru-RHEB3RNS.js} +11 -0
  230. package/chunks/{run-qwen-serve-5NO3TKUL.js → run-qwen-serve-ZVEKGS7Y.js} +177 -98
  231. package/chunks/{runtime-G2YUYMSZ.js → runtime-SJCRYNPA.js} +52 -55
  232. package/chunks/safe-mode-KLGUG54M.js +11 -0
  233. package/chunks/sandbox-UIXL423Z.js +146 -0
  234. package/chunks/sandboxConfig-CY343YNJ.js +114 -0
  235. package/chunks/{scheduled-tasks-HDHV3URA.js → scheduled-tasks-5UGBEVNZ.js} +50 -53
  236. package/chunks/{scheduler-6MDJX2ZK.js → scheduler-GCZYLZ2P.js} +41 -44
  237. package/chunks/{sdk-exporters-http-3R2TRQHE.js → sdk-exporters-http-DR4G663K.js} +1 -1
  238. package/chunks/{sdk-impl-4WF3VZ2F.js → sdk-impl-SJR26MQF.js} +3 -3
  239. package/chunks/{send-message-UMJKN27Q.js → send-message-DN76MXDX.js} +6 -6
  240. package/chunks/{serve-Z2EJQYKB.js → serve-2XXQLVK2.js} +48 -51
  241. package/chunks/{server-JTNBK3LH.js → server-UHMKPCAZ.js} +408 -211
  242. package/chunks/{session-5YK2BXH4.js → session-ZLUK7E4P.js} +108 -108
  243. package/chunks/{session-attachments-root-QO3VFJS6.js → session-attachments-root-DHQM5IEZ.js} +39 -42
  244. package/chunks/{session-pr-refresh-OTK3HCJZ.js → session-pr-refresh-3OMTQWCZ.js} +48 -51
  245. package/chunks/{settings-2VKLACYV.js → settings-P4DHIIUP.js} +50 -53
  246. package/chunks/{shell-64NAVGMS.js → shell-IMFUVQQ5.js} +27 -30
  247. package/chunks/{skill-R3ALMLLM.js → skill-NB5RJGZW.js} +7 -11
  248. package/chunks/{skill-settings-HZ34TUMP.js → skill-settings-IXG5CTQO.js} +47 -50
  249. package/chunks/{spawnChannel-XGFWHEIK.js → spawnChannel-Q3YALTCJ.js} +44 -45
  250. package/chunks/{standalone-update-R32Y3XRR.js → standalone-update-H5OJ7MM7.js} +41 -44
  251. package/chunks/{start-opentui-ui-YGJOUE2H.js → start-opentui-ui-JKAIWGF7.js} +733 -386
  252. package/chunks/{startInteractiveUI-5ZEVKSFF.js → startInteractiveUI-YRPOT6GH.js} +370 -337
  253. package/chunks/task-create-75HVPEAH.js +1 -1
  254. package/chunks/{team-create-GCVUXJLE.js → team-create-2XTBYRJF.js} +31 -34
  255. package/chunks/{team-plan-approval-NOL62FJD.js → team-plan-approval-CFNWW7ZQ.js} +27 -30
  256. package/chunks/{terminal-image-renderer-WG5TLPGC.js → terminal-image-renderer-UDPJPGPQ.js} +39 -42
  257. package/chunks/{theme-manager-HDS4YFPW.js → theme-manager-SK57EKMO.js} +39 -42
  258. package/chunks/{tool-search-HMT5GYUR.js → tool-search-ZHTJU2MV.js} +5 -9
  259. package/chunks/{total-session-admission-Y5RCHEXO.js → total-session-admission-UUZBDQCG.js} +47 -50
  260. package/chunks/{tree-sitter-LSORDVZ3.js → tree-sitter-4D7QS7F6.js} +1 -1
  261. package/chunks/{tree-sitter-bash-UARELQ6C.js → tree-sitter-bash-VEJGF5XF.js} +1 -1
  262. package/chunks/{trustedFolders-3Y2WCXMR.js → trustedFolders-4LDBLNTS.js} +40 -43
  263. package/chunks/{update-relaunch-MTJ32SLF.js → update-relaunch-LI7GRP36.js} +5 -5
  264. package/chunks/{updateCheck-YFX3VY6O.js → updateCheck-PKSSORPO.js} +43 -46
  265. package/chunks/{useAutoAcceptIndicator-FCHNQPMD.js → useAutoAcceptIndicator-I32UEQPI.js} +50 -53
  266. package/chunks/{validateNonInterActiveAuth-HUFQKCGG.js → validateNonInterActiveAuth-YFPCYYNL.js} +93 -95
  267. package/chunks/{version-S5TGWCA3.js → version-4MTL4JVU.js} +1 -1
  268. package/chunks/{web-fetch-23M7BYHB.js → web-fetch-O6RG6ISB.js} +9 -13
  269. package/chunks/{web-search-F5PNIQUA.js → web-search-JHAXVEMD.js} +9 -14
  270. package/chunks/{web-shell-static-T7UGLVE4.js → web-shell-static-FFWCUUZS.js} +8 -4
  271. package/chunks/{workflow-BLJLID2C.js → workflow-O7L6VDYU.js} +396 -113
  272. package/chunks/{workspace-providers-status-UH7KLZDT.js → workspace-providers-status-WRX6CJM4.js} +53 -56
  273. package/chunks/{workspace-registration-store-3SA3V7BA.js → workspace-registration-store-7G4E7YPY.js} +1 -1
  274. package/chunks/{workspace-registry-C6C6EKQ5.js → workspace-registry-SXIMGT4D.js} +47 -50
  275. package/chunks/{workspace-runtime-coordinator-RAI6XDJB.js → workspace-runtime-coordinator-7DOEHXYT.js} +47 -50
  276. package/chunks/{workspace-service-H7UTJYJU.js → workspace-service-HDXOZMYC.js} +53 -56
  277. package/chunks/{workspace-skills-status-FPVC7XXK.js → workspace-skills-status-VN4L37CA.js} +50 -53
  278. package/chunks/{workspace-trust-reconciler-JS7A6UIF.js → workspace-trust-reconciler-XEBW5FUL.js} +57 -60
  279. package/chunks/{write-file-GQGG7NBQ.js → write-file-LKX4ETIO.js} +29 -32
  280. package/chunks/{zh-V2EYTYJP.js → zh-F76MZTL3.js} +23 -1
  281. package/chunks/{zh-TW-7PRVUGLW.js → zh-TW-S3YTQ4DS.js} +23 -1
  282. package/chunks/{zoom-image-EC43KL4H.js → zoom-image-RDPRTP4B.js} +5 -9
  283. package/cli.js +19 -15
  284. package/export-transcript-document.css +1 -1
  285. package/export-transcript-document.js +151 -150
  286. package/locales/ca.js +19 -2
  287. package/locales/de.js +18 -0
  288. package/locales/en.js +33 -2
  289. package/locales/fr.js +18 -0
  290. package/locales/ja.js +18 -0
  291. package/locales/pt.js +18 -0
  292. package/locales/ru.js +18 -0
  293. package/locales/zh-TW.js +33 -2
  294. package/locales/zh.js +33 -2
  295. package/package.json +3 -3
  296. package/web-shell/assets/{abnfDiagram-VCTEODGH-BtpzKw3A.js → abnfDiagram-VCTEODGH-RxykUDmi.js} +1 -1
  297. package/web-shell/assets/{arc-CQiVKZJP.js → arc-CZpgGCJC.js} +1 -1
  298. package/web-shell/assets/{architectureDiagram-5GKGNRK7-ekIPBb2d.js → architectureDiagram-5GKGNRK7-BHSMzNDT.js} +1 -1
  299. package/web-shell/assets/{blockDiagram-NRAW4CY4-BrRWkWri.js → blockDiagram-NRAW4CY4-Bn4mF9SZ.js} +1 -1
  300. package/web-shell/assets/{c4Diagram-UCG6FXSJ-qYS8CYZ3.js → c4Diagram-UCG6FXSJ-CBM-Bj6t.js} +1 -1
  301. package/web-shell/assets/channel-DFYs_LlK.js +1 -0
  302. package/web-shell/assets/{chunk-2Q5K7J3B-ZasyyEZm.js → chunk-2Q5K7J3B-D5Fin58O.js} +1 -1
  303. package/web-shell/assets/{chunk-5VM5RSS4-C_IzCGeA.js → chunk-5VM5RSS4-CY05weF7.js} +1 -1
  304. package/web-shell/assets/{chunk-F27PBJKO-C25NZOyD.js → chunk-F27PBJKO-3neZnj5Y.js} +1 -1
  305. package/web-shell/assets/{chunk-G27WJ6UU-XPOHNSGX.js → chunk-G27WJ6UU-Cd7EU4BE.js} +1 -1
  306. package/web-shell/assets/{chunk-JWPE2WC7-BQBh0Xni.js → chunk-JWPE2WC7-DwK1mqFw.js} +1 -1
  307. package/web-shell/assets/{chunk-LCL6LL3I-CoShjpX7.js → chunk-LCL6LL3I-Sl7vY22C.js} +1 -1
  308. package/web-shell/assets/{chunk-POPQ4Y6H-BwRmCDSz.js → chunk-POPQ4Y6H-BXNzpbVg.js} +1 -1
  309. package/web-shell/assets/{chunk-SVP7TREG-DSzE5-Mw.js → chunk-SVP7TREG-DjjButcp.js} +1 -1
  310. package/web-shell/assets/{chunk-XXDRQBXY-BQSQv30h.js → chunk-XXDRQBXY-DNOiCjOJ.js} +1 -1
  311. package/web-shell/assets/classDiagram-DTDB5LWJ-DnGrKXoM.js +1 -0
  312. package/web-shell/assets/classDiagram-v2-JRS7N3AN-DnGrKXoM.js +1 -0
  313. package/web-shell/assets/{cose-bilkent-JH36ORCC-XVUVTHVo.js → cose-bilkent-JH36ORCC-BUnker7a.js} +1 -1
  314. package/web-shell/assets/{cynefin-OW5HDTMX-CrsKx4lQ.js → cynefin-OW5HDTMX-DcUgdWE5.js} +1 -1
  315. package/web-shell/assets/{cynefinDiagram-5FMLGOSQ-BPeZEuHw.js → cynefinDiagram-5FMLGOSQ-CvDKsZsL.js} +1 -1
  316. package/web-shell/assets/{dagre-3AP2YEHR-D31cQ2Qs.js → dagre-3AP2YEHR-jpCmUbr1.js} +1 -1
  317. package/web-shell/assets/{diagram-S7CK7UJ4-zyiG097Q.js → diagram-S7CK7UJ4-DBe_bKE5.js} +1 -1
  318. package/web-shell/assets/{diagram-UQ7AKVKN-Br3vtfsy.js → diagram-UQ7AKVKN-oXvPpDgs.js} +1 -1
  319. package/web-shell/assets/{diagram-VSXAHHWV-Bxkhjx4u.js → diagram-VSXAHHWV-BD7-_SGh.js} +1 -1
  320. package/web-shell/assets/{diagram-VX7I27RA-BQH8QiDk.js → diagram-VX7I27RA-DOJL0wub.js} +1 -1
  321. package/web-shell/assets/{diagram-Z3DM3KII-B_aQ1cw0.js → diagram-Z3DM3KII-DRIiodDD.js} +1 -1
  322. package/web-shell/assets/{ebnfDiagram-PWID7BFC-B9N7BRQE.js → ebnfDiagram-PWID7BFC-Db31Ulmb.js} +1 -1
  323. package/web-shell/assets/{erDiagram-SSCWMZ5O-Cx6Hb1Re.js → erDiagram-SSCWMZ5O-CVHhwI2_.js} +1 -1
  324. package/web-shell/assets/{flowDiagram-A5DVABFB-DTuLP7GU.js → flowDiagram-A5DVABFB-DWOFy1FK.js} +1 -1
  325. package/web-shell/assets/{ganttDiagram-EL5Y4UJY-DYS3d-sL.js → ganttDiagram-EL5Y4UJY-C0sxQtPd.js} +1 -1
  326. package/web-shell/assets/{gitGraphDiagram-WWUBYQGX-Cp0EGx04.js → gitGraphDiagram-WWUBYQGX-CNituBYC.js} +1 -1
  327. package/web-shell/assets/index-B15NlwB8.js +2213 -0
  328. package/web-shell/assets/index-BSrS0tQ6.css +36 -0
  329. package/web-shell/assets/{index-45-LkPDB.js → index-gm9tLk7h.js} +1 -1
  330. package/web-shell/assets/{infoDiagram-RXCK75RN-9--kukiT.js → infoDiagram-RXCK75RN-CxhJYtIR.js} +1 -1
  331. package/web-shell/assets/{ishikawaDiagram-5VMMS53U-CGBdsDLD.js → ishikawaDiagram-5VMMS53U-By2mchUy.js} +1 -1
  332. package/web-shell/assets/{journeyDiagram-EYS64GPL-DeXhcscd.js → journeyDiagram-EYS64GPL-CVH-OweI.js} +1 -1
  333. package/web-shell/assets/{kanban-definition-3QL26DDD-CFdvsU3b.js → kanban-definition-3QL26DDD-Cc9dQXLy.js} +1 -1
  334. package/web-shell/assets/knowledge-Dg9788h4.svg +1 -0
  335. package/web-shell/assets/{layout-DAnwQ3KB.js → layout-C_60ysHw.js} +1 -1
  336. package/web-shell/assets/{linear-CTo7v7Nh.js → linear-BvAVfqwu.js} +1 -1
  337. package/web-shell/assets/{mermaid.core-jggSxF1i.js → mermaid.core-C3CoBKAc.js} +6 -6
  338. package/web-shell/assets/{mindmap-definition-FBJOCRG2-DzIepvlJ.js → mindmap-definition-FBJOCRG2-Cuu8Q8LM.js} +1 -1
  339. package/web-shell/assets/{pegDiagram-XKGWAZYB-BFGS9GJv.js → pegDiagram-XKGWAZYB-DmAeyDO2.js} +1 -1
  340. package/web-shell/assets/{pieDiagram-E7YTZNPT-B2UUcNIT.js → pieDiagram-E7YTZNPT-B7vbB_xv.js} +1 -1
  341. package/web-shell/assets/{quadrantDiagram-AXDQQJYC-BgM6htrX.js → quadrantDiagram-AXDQQJYC-BqOBkRR7.js} +1 -1
  342. package/web-shell/assets/{railroadDiagram-O6MQD6OU-Dk9cS7N-.js → railroadDiagram-O6MQD6OU-sI06lZIu.js} +1 -1
  343. package/web-shell/assets/{requirementDiagram-EFPCY7ZU-C9oRg7xi.js → requirementDiagram-EFPCY7ZU-Bg13d10S.js} +1 -1
  344. package/web-shell/assets/{sankeyDiagram-P5KCCOFB-B-_c7GzI.js → sankeyDiagram-P5KCCOFB-WFOzZHrR.js} +1 -1
  345. package/web-shell/assets/{sequenceDiagram-WJ2MYXX4-R0M-347u.js → sequenceDiagram-WJ2MYXX4-CCdRbA4E.js} +1 -1
  346. package/web-shell/assets/{sizeCapture-X5ZJPWSS-Df0f8UAW.js → sizeCapture-X5ZJPWSS-BH5F3bGg.js} +1 -1
  347. package/web-shell/assets/{stateDiagram-HBIQ2CUA-CsUEfAA-.js → stateDiagram-HBIQ2CUA-NwS2X3QB.js} +1 -1
  348. package/web-shell/assets/stateDiagram-v2-4QOOHH4V-1aU2JZXO.js +1 -0
  349. package/web-shell/assets/{swimlanes-XN3QIQJK-9OGHVSrx.js → swimlanes-XN3QIQJK-Bm38pM28.js} +1 -1
  350. package/web-shell/assets/swimlanesDiagram-VK2B7HYN-Dp-u6kQG.js +8 -0
  351. package/web-shell/assets/{timeline-definition-24CTP7MA-DAfGqS2B.js → timeline-definition-24CTP7MA-Do-agLSo.js} +1 -1
  352. package/web-shell/assets/{vennDiagram-4TSXK5OY-CKATpwHi.js → vennDiagram-4TSXK5OY-aggLfZzl.js} +1 -1
  353. package/web-shell/assets/{wardleyDiagram-VM6X3IG4-CQHdhTrm.js → wardleyDiagram-VM6X3IG4-D5JR3mXX.js} +1 -1
  354. package/web-shell/assets/{xychartDiagram-S5SC5T6Z-5k9NLqlY.js → xychartDiagram-S5SC5T6Z-DhtLDuXs.js} +1 -1
  355. package/web-shell/index.html +2 -2
  356. package/chunks/chunk-4OQSG35W.js +0 -1416
  357. package/chunks/chunk-7MIBD3LG.js +0 -137
  358. package/chunks/chunk-ARDHE6MM.js +0 -235
  359. package/chunks/chunk-C75BXMPM.js +0 -169
  360. package/chunks/chunk-ERU3SDXT.js +0 -27
  361. package/chunks/chunk-FPGTNKCP.js +0 -251
  362. package/chunks/chunk-JIJ65YKA.js +0 -2812
  363. package/chunks/chunk-JL6APGBX.js +0 -43
  364. package/chunks/chunk-SGXJQP5Q.js +0 -4172
  365. package/chunks/chunk-TPEV2QHG.js +0 -514
  366. package/chunks/chunk-YVWS4SLL.js +0 -137
  367. package/web-shell/assets/channel-DSQQnOZj.js +0 -1
  368. package/web-shell/assets/classDiagram-DTDB5LWJ-V94ta08R.js +0 -1
  369. package/web-shell/assets/classDiagram-v2-JRS7N3AN-V94ta08R.js +0 -1
  370. package/web-shell/assets/index-H8um-iEl.js +0 -2207
  371. package/web-shell/assets/index-n6N-2a3v.css +0 -36
  372. package/web-shell/assets/stateDiagram-v2-4QOOHH4V-CnSuTPJ2.js +0 -1
  373. package/web-shell/assets/swimlanesDiagram-VK2B7HYN-Bb7TcWQw.js +0 -8
  374. package/chunks/{chunk-QZW6WRB7.js → chunk-5NUKK2DT.js} +2 -2
  375. package/chunks/{chunk-JS73NNWF.js → chunk-FUSEMYFX.js} +0 -0
  376. package/chunks/{chunk-SVWWF5TZ.js → chunk-WVURIAEE.js} +3 -3
  377. package/chunks/{task-update-RI7QNVDP.js → task-update-3LSYQDRW.js} +4 -4
@@ -0,0 +1,1092 @@
1
+ // Force strict mode and setup for ESM
2
+ "use strict";
3
+ import {
4
+ preloadRuntimeFetchModule
5
+ } from "./chunk-7O5PYQ3M.js";
6
+ import {
7
+ init_esbuild_shims
8
+ } from "./chunk-5O2XNYP6.js";
9
+ import {
10
+ __name
11
+ } from "./chunk-J2S4EL5Y.js";
12
+
13
+ // packages/core/src/models/modelConfigErrors.ts
14
+ init_esbuild_shims();
15
+ function getDefaultApiKeyEnvVar(authType) {
16
+ switch (authType) {
17
+ case "openai":
18
+ case "openai-responses":
19
+ return "OPENAI_API_KEY";
20
+ case "anthropic":
21
+ return "ANTHROPIC_API_KEY";
22
+ case "gemini":
23
+ return "GEMINI_API_KEY";
24
+ case "vertex-ai":
25
+ return "GOOGLE_API_KEY";
26
+ default:
27
+ return "API_KEY";
28
+ }
29
+ }
30
+ __name(getDefaultApiKeyEnvVar, "getDefaultApiKeyEnvVar");
31
+ function getDefaultModelEnvVar(authType) {
32
+ switch (authType) {
33
+ case "openai":
34
+ case "openai-responses":
35
+ return "OPENAI_MODEL";
36
+ case "anthropic":
37
+ return "ANTHROPIC_MODEL";
38
+ case "gemini":
39
+ return "GEMINI_MODEL";
40
+ case "vertex-ai":
41
+ return "GOOGLE_MODEL";
42
+ default:
43
+ return "MODEL";
44
+ }
45
+ }
46
+ __name(getDefaultModelEnvVar, "getDefaultModelEnvVar");
47
+ var VERTEX_ADC_HINT = " Alternatively, set GOOGLE_CLOUD_PROJECT to authenticate with Application Default Credentials instead of an API key.";
48
+ function adcHint(authType, explicitEnvKey) {
49
+ return authType === "vertex-ai" && !explicitEnvKey ? VERTEX_ADC_HINT : "";
50
+ }
51
+ __name(adcHint, "adcHint");
52
+ var ModelConfigError = class extends Error {
53
+ static {
54
+ __name(this, "ModelConfigError");
55
+ }
56
+ constructor(message) {
57
+ super(message);
58
+ this.name = new.target.name;
59
+ Object.setPrototypeOf(this, new.target.prototype);
60
+ }
61
+ };
62
+ var StrictMissingCredentialsError = class extends ModelConfigError {
63
+ static {
64
+ __name(this, "StrictMissingCredentialsError");
65
+ }
66
+ code = "STRICT_MISSING_CREDENTIALS";
67
+ constructor(authType, model, envKey) {
68
+ const providerKey = authType || "(unknown)";
69
+ const modelName = model || "(unknown)";
70
+ super(
71
+ `Missing credentials for modelProviders model '${modelName}'. ` + (envKey ? `Current configured envKey: '${envKey}'. Set that environment variable, or update modelProviders.${providerKey}[].envKey.` : `Configure modelProviders.${providerKey}[].envKey and set that environment variable.`) + adcHint(authType, envKey)
72
+ );
73
+ }
74
+ };
75
+ var StrictMissingModelIdError = class extends ModelConfigError {
76
+ static {
77
+ __name(this, "StrictMissingModelIdError");
78
+ }
79
+ code = "STRICT_MISSING_MODEL_ID";
80
+ constructor(authType) {
81
+ super(
82
+ `Missing model id for strict modelProviders resolution (authType: ${authType}).`
83
+ );
84
+ }
85
+ };
86
+ var MissingApiKeyError = class extends ModelConfigError {
87
+ static {
88
+ __name(this, "MissingApiKeyError");
89
+ }
90
+ code = "MISSING_API_KEY";
91
+ constructor(params) {
92
+ super(
93
+ `Missing API key for ${params.authType} auth. Current model: '${params.model || "(unknown)"}', baseUrl: '${params.baseUrl || "(default)"}'. Provide an API key via settings (security.auth.apiKey), or set the environment variable '${params.envKey}'.` + adcHint(params.authType, params.explicitEnvKey)
94
+ );
95
+ }
96
+ };
97
+ var MissingModelError = class extends ModelConfigError {
98
+ static {
99
+ __name(this, "MissingModelError");
100
+ }
101
+ code = "MISSING_MODEL";
102
+ constructor(params) {
103
+ super(
104
+ `Missing model for ${params.authType} auth. Set the environment variable '${params.envKey}'.`
105
+ );
106
+ }
107
+ };
108
+ var MissingBaseUrlError = class extends ModelConfigError {
109
+ static {
110
+ __name(this, "MissingBaseUrlError");
111
+ }
112
+ code = "MISSING_BASE_URL";
113
+ constructor(params) {
114
+ super(
115
+ `Missing baseUrl for modelProviders model '${params.model || "(unknown)"}'. Configure modelProviders.${params.authType || "(unknown)"}[].baseUrl.`
116
+ );
117
+ }
118
+ };
119
+ var MissingAnthropicBaseUrlEnvError = class extends ModelConfigError {
120
+ static {
121
+ __name(this, "MissingAnthropicBaseUrlEnvError");
122
+ }
123
+ code = "MISSING_ANTHROPIC_BASE_URL_ENV";
124
+ constructor() {
125
+ super("ANTHROPIC_BASE_URL environment variable not found.");
126
+ }
127
+ };
128
+
129
+ // packages/core/src/utils/default-qwen-model.ts
130
+ init_esbuild_shims();
131
+ var DEFAULT_QWEN_MODEL = "coder-model";
132
+
133
+ // packages/core/src/config/models.ts
134
+ init_esbuild_shims();
135
+ var DEFAULT_QWEN_EMBEDDING_MODEL = "text-embedding-v4";
136
+ var MAINLINE_CODER_MODEL = "qwen3.7-max";
137
+
138
+ // packages/core/src/models/constants.ts
139
+ init_esbuild_shims();
140
+ var MODEL_GENERATION_CONFIG_FIELDS = [
141
+ "samplingParams",
142
+ "timeout",
143
+ "streamIdleTimeoutMs",
144
+ "maxRetries",
145
+ "retryInitialDelayMs",
146
+ "retryMaxDelayMs",
147
+ "retryErrorCodes",
148
+ "enableCacheControl",
149
+ "enableRequestMetadata",
150
+ "forceGlobalCacheScope",
151
+ "cacheRetention",
152
+ "cacheRetentionByBlock",
153
+ "schemaCompliance",
154
+ "reasoning",
155
+ "contextWindowSize",
156
+ "customHeaders",
157
+ "extra_body",
158
+ "thinkingMandatory",
159
+ "modalities",
160
+ "splitToolMedia",
161
+ "toolResultContentFormat"
162
+ ];
163
+ var CREDENTIAL_FIELDS = [
164
+ "model",
165
+ "apiKey",
166
+ "apiKeyEnvKey",
167
+ "baseUrl"
168
+ ];
169
+ var PROVIDER_SOURCED_FIELDS = [
170
+ ...CREDENTIAL_FIELDS,
171
+ ...MODEL_GENERATION_CONFIG_FIELDS
172
+ ];
173
+ var AUTH_ENV_MAPPINGS = {
174
+ openai: {
175
+ apiKey: ["OPENAI_API_KEY"],
176
+ baseUrl: ["OPENAI_BASE_URL"],
177
+ model: ["OPENAI_MODEL", "QWEN_MODEL"]
178
+ },
179
+ "openai-responses": {
180
+ apiKey: ["OPENAI_API_KEY"],
181
+ baseUrl: ["OPENAI_BASE_URL"],
182
+ model: ["OPENAI_MODEL"]
183
+ },
184
+ anthropic: {
185
+ apiKey: ["ANTHROPIC_API_KEY"],
186
+ baseUrl: ["ANTHROPIC_BASE_URL"],
187
+ model: ["ANTHROPIC_MODEL"]
188
+ },
189
+ gemini: {
190
+ apiKey: ["GEMINI_API_KEY"],
191
+ baseUrl: [],
192
+ model: ["GEMINI_MODEL"]
193
+ },
194
+ "vertex-ai": {
195
+ apiKey: ["GOOGLE_API_KEY"],
196
+ baseUrl: [],
197
+ model: ["GOOGLE_MODEL"]
198
+ },
199
+ "qwen-oauth": {
200
+ apiKey: [],
201
+ baseUrl: [],
202
+ model: []
203
+ }
204
+ };
205
+ var DEFAULT_MODELS = {
206
+ openai: MAINLINE_CODER_MODEL,
207
+ "qwen-oauth": DEFAULT_QWEN_MODEL
208
+ };
209
+ var QWEN_OAUTH_MODELS = [
210
+ {
211
+ id: "coder-model",
212
+ name: "coder-model",
213
+ description: "Qwen 3.7 Max \u2014 efficient hybrid model with leading coding performance",
214
+ capabilities: { vision: true }
215
+ }
216
+ ];
217
+ var QWEN_OAUTH_ALLOWED_MODELS = QWEN_OAUTH_MODELS.map(
218
+ (model) => model.id
219
+ );
220
+
221
+ // packages/core/src/core/tokenLimits.ts
222
+ init_esbuild_shims();
223
+ var DEFAULT_TOKEN_LIMIT = 2e5;
224
+ var DEFAULT_OUTPUT_TOKEN_LIMIT = 32e3;
225
+ var ESCALATED_MAX_TOKENS = 64e3;
226
+ var OUTPUT_TOKEN_CEILING = ESCALATED_MAX_TOKENS;
227
+ var MIN_CLAMPED_OUTPUT_TOKENS = 4e3;
228
+ function outputClampMargin(contextWindowSize) {
229
+ return Math.max(1e4, Math.round(0.05 * contextWindowSize));
230
+ }
231
+ __name(outputClampMargin, "outputClampMargin");
232
+ function clampOutputTokensToWindow(outputCeiling, contextWindowSize, promptTokens) {
233
+ const room = contextWindowSize - promptTokens - outputClampMargin(contextWindowSize);
234
+ return Math.min(outputCeiling, Math.max(MIN_CLAMPED_OUTPUT_TOKENS, room));
235
+ }
236
+ __name(clampOutputTokensToWindow, "clampOutputTokensToWindow");
237
+ function parsePositiveIntegerEnvValue(raw) {
238
+ if (raw === void 0) return void 0;
239
+ const trimmed = raw.trim();
240
+ if (!/^\d+$/.test(trimmed)) return void 0;
241
+ const parsed = Number(trimmed);
242
+ if (!Number.isSafeInteger(parsed) || parsed <= 0) return void 0;
243
+ return parsed;
244
+ }
245
+ __name(parsePositiveIntegerEnvValue, "parsePositiveIntegerEnvValue");
246
+ var LIMITS = {
247
+ "32k": 32768,
248
+ "64k": 65536,
249
+ "128k": 131072,
250
+ "192k": 196608,
251
+ // MiniMax-M2.5 context window
252
+ "200k": 2e5,
253
+ // vendor-declared decimal, used by OpenAI, Anthropic, etc.
254
+ "256k": 262144,
255
+ "272k": 272e3,
256
+ // vendor-declared decimal, GPT-5.x input (400K total - 128K output)
257
+ "384k": 384e3,
258
+ // vendor-declared decimal, DeepSeek V4 max output
259
+ "400k": 4e5,
260
+ // vendor-declared decimal, used by OpenAI GPT-5.x
261
+ "512k": 524288,
262
+ "1m": 1e6,
263
+ // Output token limits (typically much smaller than input limits)
264
+ "4k": 4096,
265
+ "8k": 8192,
266
+ "16k": 16384
267
+ };
268
+ function normalize(model) {
269
+ let s = (model ?? "").toLowerCase().trim();
270
+ s = s.replace(/^.*\//, "");
271
+ s = s.split("|").pop() ?? s;
272
+ s = s.replace(
273
+ /:(?:free|beta|extended|thinking|online|nitro|floor|latest|\d+(?:\.\d+)?(?:x\d+)?b(?:-[\w.]+)*)$/,
274
+ ""
275
+ );
276
+ s = s.split(":").pop() ?? s;
277
+ s = s.replace(/\s+/g, "-");
278
+ s = s.replace(/^(claude-[a-z]+-\d+(?:-\d+)?)\.(\d+)(?:\.\d+)*/, "$1-$2");
279
+ s = s.replace(/-preview/g, "");
280
+ if (!s.match(/^qwen-(?:plus|flash|vl-max)-latest$/) && !s.match(/^kimi-k2-\d{4}$/)) {
281
+ s = s.replace(
282
+ /-(?:\d{4,}|\d+x\d+b|v\d+(?:\.\d+)*|(?<=-[^-]+-)\d+(?:\.\d+)+|latest|exp)$/g,
283
+ ""
284
+ );
285
+ }
286
+ s = s.replace(/-(?:\d?bit|int[48]|bf16|fp16|q[45]|quantized)$/g, "");
287
+ return s;
288
+ }
289
+ __name(normalize, "normalize");
290
+ var CLAUDE_OPUS_EXTENDED = /^claude-opus-(?:4-(?:6|7|8)|5)/;
291
+ var PATTERNS = [
292
+ // -------------------
293
+ // Google Gemini
294
+ // -------------------
295
+ [/^gemini-3/, LIMITS["1m"]],
296
+ // Gemini 3.x (Pro, Flash, 3.1, etc.): 1M
297
+ [/^gemini-/, LIMITS["1m"]],
298
+ // Gemini fallback (1.5, 2.x): 1M
299
+ // -------------------
300
+ // OpenAI
301
+ // -------------------
302
+ [/^gpt-5/, LIMITS["272k"]],
303
+ // GPT-5.x: 272K input (400K total - 128K output)
304
+ [/^gpt-/, LIMITS["128k"]],
305
+ // GPT fallback (4o, 4.1, etc.): 128K
306
+ [/^o\d/, LIMITS["200k"]],
307
+ // o-series (o3, o4-mini, etc.): 200K
308
+ // -------------------
309
+ // Anthropic Claude
310
+ // -------------------
311
+ [CLAUDE_OPUS_EXTENDED, LIMITS["1m"]],
312
+ // Opus 4.6-4.8, Opus 5.x: 1M
313
+ [/^claude-/, LIMITS["200k"]],
314
+ // All Claude models: 200K
315
+ // -------------------
316
+ // Alibaba / Qwen
317
+ // -------------------
318
+ // Commercial API models (1,000,000 context)
319
+ [/^qwen3-coder-plus/, LIMITS["1m"]],
320
+ [/^qwen3-coder-flash/, LIMITS["1m"]],
321
+ [/^qwen3\.\d/, LIMITS["1m"]],
322
+ [/^qwen-plus-latest$/, LIMITS["1m"]],
323
+ [/^qwen-flash-latest$/, LIMITS["1m"]],
324
+ [/^coder-model$/, LIMITS["1m"]],
325
+ // Commercial API models (256K context)
326
+ [/^qwen3-max/, LIMITS["256k"]],
327
+ // Open-source Qwen3 variants: 256K native
328
+ [/^qwen3-coder-/, LIMITS["256k"]],
329
+ // Qwen fallback (VL, turbo, plus, 2.5, etc.): 256K
330
+ [/^qwen/, LIMITS["256k"]],
331
+ // -------------------
332
+ // DeepSeek
333
+ // -------------------
334
+ [/^deepseek-v4/, LIMITS["1m"]],
335
+ // DeepSeek V4 (flash, pro): 1M
336
+ [/^deepseek/, LIMITS["128k"]],
337
+ // -------------------
338
+ // Zhipu GLM
339
+ // -------------------
340
+ // 1M context is the forward default for new GLM releases (GLM-5.2+, GLM-6.x,
341
+ // and beyond) so they need no future code change. Confirmed 200K families
342
+ // (GLM-5 / 5.0 / 5.1, GLM-4.x and older) are pinned explicitly first.
343
+ [/^glm-5(\.[01])?(-|$)/, 202752],
344
+ // GLM-5 / 5.0 / 5.1: 200K
345
+ [/^glm-(?:[5-9]|\d{2,})/, LIMITS["1m"]],
346
+ // GLM-5.2+, 6.x..9.x, 10.x+: 1M
347
+ [/^glm-/, 202752],
348
+ // GLM <=4.x / non-numeric fallback: 200K
349
+ // -------------------
350
+ // MiniMax
351
+ // -------------------
352
+ [/^minimax-m3/i, LIMITS["1m"]],
353
+ // MiniMax-M3: 1,000,000
354
+ [/^minimax-m2\.5/i, LIMITS["192k"]],
355
+ // MiniMax-M2.5: 196,608
356
+ [/^minimax-/i, LIMITS["200k"]],
357
+ // MiniMax fallback: 200K
358
+ // -------------------
359
+ // Moonshot / Kimi
360
+ // -------------------
361
+ [/^kimi-k3/, LIMITS["1m"]],
362
+ // Kimi K3: 1M
363
+ [/^kimi-/, LIMITS["256k"]],
364
+ // Kimi fallback: 256K
365
+ // -------------------
366
+ // ByteDance Seed-OSS (512K)
367
+ // -------------------
368
+ [/^seed-oss/, LIMITS["512k"]]
369
+ ];
370
+ var OUTPUT_PATTERNS = [
371
+ // Google Gemini
372
+ [/^gemini-3/, LIMITS["64k"]],
373
+ // Gemini 3.x: 64K
374
+ [/^gemini-/, LIMITS["8k"]],
375
+ // Gemini fallback: 8K
376
+ // OpenAI
377
+ [/^gpt-5/, LIMITS["128k"]],
378
+ // GPT-5.x: 128K
379
+ [/^gpt-/, LIMITS["16k"]],
380
+ // GPT fallback: 16K
381
+ [/^o\d/, LIMITS["128k"]],
382
+ // o-series: 128K
383
+ // Anthropic Claude
384
+ [CLAUDE_OPUS_EXTENDED, 128e3],
385
+ // Opus 4.6-4.8, Opus 5.x: 128K
386
+ [/^claude-sonnet-4-6/, LIMITS["64k"]],
387
+ // Sonnet 4.6: 64K
388
+ [/^claude-/, LIMITS["64k"]],
389
+ // Claude fallback: 64K
390
+ // Alibaba / Qwen
391
+ [/^qwen3\.\d/, LIMITS["64k"]],
392
+ [/^coder-model$/, LIMITS["64k"]],
393
+ [/^qwen/, LIMITS["32k"]],
394
+ // Qwen fallback (VL, turbo, plus, etc.): 32K
395
+ // DeepSeek
396
+ [/^deepseek-v4/, LIMITS["384k"]],
397
+ // DeepSeek V4 (flash, pro): 384K
398
+ [/^deepseek-reasoner/, LIMITS["64k"]],
399
+ [/^deepseek-r1/, LIMITS["64k"]],
400
+ [/^deepseek-chat/, LIMITS["8k"]],
401
+ // Zhipu GLM
402
+ [/^glm-5(?:\.\d+)?(?:-|$)/, LIMITS["128k"]],
403
+ [/^glm-4\.7/, LIMITS["16k"]],
404
+ // MiniMax
405
+ [/^minimax-m2\.5/i, LIMITS["64k"]],
406
+ // Kimi
407
+ [/^kimi-k3/, LIMITS["128k"]],
408
+ // Kimi K3: 128K default max output (up to 1M configurable)
409
+ [/^kimi-k2\.5/, LIMITS["32k"]]
410
+ ];
411
+ function findTokenLimit(model, type = "input") {
412
+ const norm = normalize(model);
413
+ const patterns = type === "output" ? OUTPUT_PATTERNS : PATTERNS;
414
+ for (const [regex, limit] of patterns) {
415
+ if (regex.test(norm)) {
416
+ return limit;
417
+ }
418
+ }
419
+ return void 0;
420
+ }
421
+ __name(findTokenLimit, "findTokenLimit");
422
+ function hasExplicitOutputLimit(model) {
423
+ const norm = normalize(model);
424
+ return OUTPUT_PATTERNS.some(([regex]) => regex.test(norm));
425
+ }
426
+ __name(hasExplicitOutputLimit, "hasExplicitOutputLimit");
427
+ function knownTokenLimit(model, type = "input") {
428
+ return findTokenLimit(model, type);
429
+ }
430
+ __name(knownTokenLimit, "knownTokenLimit");
431
+ function tokenLimit(model, type = "input") {
432
+ return knownTokenLimit(model, type) ?? (type === "output" ? DEFAULT_OUTPUT_TOKEN_LIMIT : DEFAULT_TOKEN_LIMIT);
433
+ }
434
+ __name(tokenLimit, "tokenLimit");
435
+ function defaultOutputCeiling(model) {
436
+ const outputLimit = tokenLimit(model, "output");
437
+ if (CLAUDE_OPUS_EXTENDED.test(normalize(model))) {
438
+ return outputLimit;
439
+ }
440
+ return Math.min(outputLimit, OUTPUT_TOKEN_CEILING);
441
+ }
442
+ __name(defaultOutputCeiling, "defaultOutputCeiling");
443
+ function reconcileMaxTokens(configMaxTokens, requestMaxTokens) {
444
+ if (typeof configMaxTokens === "number" && typeof requestMaxTokens === "number") {
445
+ return Math.min(configMaxTokens, requestMaxTokens);
446
+ }
447
+ return void 0;
448
+ }
449
+ __name(reconcileMaxTokens, "reconcileMaxTokens");
450
+
451
+ // packages/core/src/core/reasoning-effort.ts
452
+ init_esbuild_shims();
453
+ var REASONING_EFFORT_TIERS = [
454
+ "low",
455
+ "medium",
456
+ "high",
457
+ "xhigh",
458
+ "max"
459
+ ];
460
+ var REASONING_EFFORT_RANKS = {
461
+ low: 20,
462
+ medium: 30,
463
+ high: 40,
464
+ xhigh: 60,
465
+ max: 70
466
+ };
467
+ function getGptReasoningCapabilities(model) {
468
+ const normalized = normalize(
469
+ (model ?? "").trim().replace(/:batch(?=:|$)/gi, "")
470
+ ).replace(/-\d{4}-\d{2}-\d{2}$/, "").replace(/^(gpt-5\.\d+)(?:\.\d+)+(?=-|$)/, "$1");
471
+ switch (normalized) {
472
+ case "gpt-5":
473
+ case "gpt-5-mini":
474
+ case "gpt-5-nano":
475
+ case "gpt-5.1-codex":
476
+ return {
477
+ efforts: ["low", "medium", "high"],
478
+ defaultEffort: "medium",
479
+ defaultEnabled: true,
480
+ thinkingMandatory: true
481
+ };
482
+ case "gpt-5-pro":
483
+ return {
484
+ efforts: ["high"],
485
+ defaultEffort: "high",
486
+ defaultEnabled: true,
487
+ thinkingMandatory: true
488
+ };
489
+ case "gpt-5.1":
490
+ return {
491
+ efforts: ["low", "medium", "high"],
492
+ defaultEffort: "medium",
493
+ defaultEnabled: false,
494
+ thinkingMandatory: false
495
+ };
496
+ case "gpt-5.2":
497
+ case "gpt-5.4":
498
+ case "gpt-5.4-mini":
499
+ case "gpt-5.4-nano":
500
+ return {
501
+ efforts: ["low", "medium", "high", "xhigh"],
502
+ defaultEffort: "medium",
503
+ defaultEnabled: false,
504
+ thinkingMandatory: false
505
+ };
506
+ case "gpt-5.1-codex-max":
507
+ case "gpt-5.2-codex":
508
+ case "gpt-5.3-codex":
509
+ return {
510
+ efforts: ["low", "medium", "high", "xhigh"],
511
+ defaultEffort: "medium",
512
+ defaultEnabled: true,
513
+ thinkingMandatory: true
514
+ };
515
+ case "gpt-5.2-pro":
516
+ case "gpt-5.4-pro":
517
+ return {
518
+ efforts: ["medium", "high", "xhigh"],
519
+ defaultEffort: "medium",
520
+ defaultEnabled: true,
521
+ thinkingMandatory: true
522
+ };
523
+ case "gpt-5.5":
524
+ return {
525
+ efforts: ["low", "medium", "high", "xhigh"],
526
+ defaultEffort: "medium",
527
+ defaultEnabled: true,
528
+ thinkingMandatory: false
529
+ };
530
+ case "gpt-5.5-pro":
531
+ return {
532
+ efforts: ["medium", "high", "xhigh"],
533
+ defaultEffort: "high",
534
+ defaultEnabled: true,
535
+ thinkingMandatory: true
536
+ };
537
+ case "gpt-5.6":
538
+ case "gpt-5.6-sol":
539
+ case "gpt-5.6-terra":
540
+ case "gpt-5.6-luna":
541
+ return {
542
+ efforts: REASONING_EFFORT_TIERS,
543
+ defaultEffort: "medium",
544
+ defaultEnabled: true,
545
+ thinkingMandatory: false
546
+ };
547
+ case "gpt-6-astra":
548
+ return {
549
+ efforts: REASONING_EFFORT_TIERS,
550
+ defaultEffort: "medium",
551
+ defaultEnabled: true,
552
+ thinkingMandatory: true
553
+ };
554
+ default:
555
+ return void 0;
556
+ }
557
+ }
558
+ __name(getGptReasoningCapabilities, "getGptReasoningCapabilities");
559
+ function isReasoningEffortPlaceholder(value) {
560
+ return value == null || value === "";
561
+ }
562
+ __name(isReasoningEffortPlaceholder, "isReasoningEffortPlaceholder");
563
+ function normalizeReasoningEffort(raw) {
564
+ if (!raw || typeof raw !== "string") {
565
+ return void 0;
566
+ }
567
+ const key = raw.trim().toLowerCase().replace(/[\s_-]+/g, "");
568
+ switch (key) {
569
+ case "low":
570
+ return "low";
571
+ case "medium":
572
+ case "med":
573
+ return "medium";
574
+ case "high":
575
+ return "high";
576
+ case "xhigh":
577
+ case "extrahigh":
578
+ return "xhigh";
579
+ case "max":
580
+ case "maximum":
581
+ return "max";
582
+ default:
583
+ return void 0;
584
+ }
585
+ }
586
+ __name(normalizeReasoningEffort, "normalizeReasoningEffort");
587
+ function clampReasoningEffort(requested, supported) {
588
+ const set = supported && supported.length > 0 ? supported : REASONING_EFFORT_TIERS;
589
+ if (set.includes(requested)) {
590
+ return requested;
591
+ }
592
+ const requestedRank = REASONING_EFFORT_RANKS[requested];
593
+ const ranked = [...set].sort(
594
+ (a, b) => REASONING_EFFORT_RANKS[a] - REASONING_EFFORT_RANKS[b]
595
+ );
596
+ for (const tier of ranked) {
597
+ if (REASONING_EFFORT_RANKS[tier] >= requestedRank) {
598
+ return tier;
599
+ }
600
+ }
601
+ return ranked[ranked.length - 1];
602
+ }
603
+ __name(clampReasoningEffort, "clampReasoningEffort");
604
+ function applyReasoningEffort(config, effort) {
605
+ config.setReasoningEffort(effort);
606
+ return config.getReasoningEffort() === effort;
607
+ }
608
+ __name(applyReasoningEffort, "applyReasoningEffort");
609
+ function setGeneratorReasoningEffort(cfg, effort) {
610
+ if (!cfg || cfg.reasoning === false) {
611
+ return false;
612
+ }
613
+ const next = {
614
+ ...cfg.reasoning ?? {}
615
+ };
616
+ if (effort) {
617
+ next.effort = effort;
618
+ } else {
619
+ delete next.effort;
620
+ }
621
+ cfg.reasoning = Object.keys(next).length > 0 ? next : void 0;
622
+ return true;
623
+ }
624
+ __name(setGeneratorReasoningEffort, "setGeneratorReasoningEffort");
625
+ function reasoningEffortsForCapability(reasoning) {
626
+ if (!reasoning) return REASONING_EFFORT_TIERS;
627
+ return reasoning.toggleOnly ? [] : reasoning.efforts;
628
+ }
629
+ __name(reasoningEffortsForCapability, "reasoningEffortsForCapability");
630
+ function parseModelReasoningCapabilities(value) {
631
+ if (!value || typeof value !== "object") return void 0;
632
+ const candidate = value;
633
+ if (candidate["thinking"] !== true) return void 0;
634
+ const disableField = candidate["disableField"];
635
+ if (disableField !== "enable_thinking" && disableField !== "reasoning_effort" && disableField !== "thinking") {
636
+ return void 0;
637
+ }
638
+ if ("toggleOnly" in candidate && typeof candidate["toggleOnly"] !== "boolean" || "canDisable" in candidate && candidate["canDisable"] !== false) {
639
+ return void 0;
640
+ }
641
+ if (candidate["toggleOnly"] === true) {
642
+ return candidate;
643
+ }
644
+ const efforts = candidate["efforts"];
645
+ if (!Array.isArray(efforts) || efforts.length === 0 || !efforts.every(
646
+ (effort) => typeof effort === "string" && REASONING_EFFORT_TIERS.includes(effort)
647
+ ) || new Set(efforts).size !== efforts.length) {
648
+ return void 0;
649
+ }
650
+ const defaultEffort = candidate["defaultEffort"];
651
+ if (defaultEffort !== void 0 && !efforts.includes(defaultEffort)) {
652
+ return void 0;
653
+ }
654
+ return candidate;
655
+ }
656
+ __name(parseModelReasoningCapabilities, "parseModelReasoningCapabilities");
657
+
658
+ // packages/core/src/core/contentGenerator.ts
659
+ init_esbuild_shims();
660
+ function setSource(sources, path, source) {
661
+ sources[path] = source;
662
+ }
663
+ __name(setSource, "setSource");
664
+ function getSeedSource(seed, path) {
665
+ return seed?.[path];
666
+ }
667
+ __name(getSeedSource, "getSeedSource");
668
+ function resolveContentGeneratorConfigWithSources(config, authType, generationConfig, seedSources, options) {
669
+ const sources = { ...seedSources || {} };
670
+ const strictModelProvider = options?.strictModelProvider === true;
671
+ const newContentGeneratorConfig = {
672
+ ...generationConfig || {},
673
+ authType,
674
+ reasoningSnapshot: generationConfig?.reasoningSnapshot ?? config?.getReasoningSnapshot?.(),
675
+ reasoningRouteBaseUrl: generationConfig && "reasoningRouteBaseUrl" in generationConfig ? generationConfig.reasoningRouteBaseUrl : config?.getCurrentModelRegistryBaseUrl?.(),
676
+ proxy: config?.getProxy()
677
+ };
678
+ setSource(sources, "authType", {
679
+ kind: "computed",
680
+ detail: "provided by caller"
681
+ });
682
+ if (config?.getProxy()) {
683
+ setSource(sources, "proxy", {
684
+ kind: "computed",
685
+ detail: "Config.getProxy()"
686
+ });
687
+ }
688
+ const seedOrUnknown = /* @__PURE__ */ __name((path) => getSeedSource(seedSources, path) ?? { kind: "unknown" }, "seedOrUnknown");
689
+ for (const field of PROVIDER_SOURCED_FIELDS) {
690
+ if (generationConfig && field in generationConfig && !sources[field]) {
691
+ setSource(sources, field, seedOrUnknown(field));
692
+ }
693
+ }
694
+ const validation = validateModelConfig(
695
+ newContentGeneratorConfig,
696
+ strictModelProvider
697
+ );
698
+ if (!validation.valid) {
699
+ throw new Error(validation.errors.map((e) => e.message).join("\n"));
700
+ }
701
+ return {
702
+ config: newContentGeneratorConfig,
703
+ sources
704
+ };
705
+ }
706
+ __name(resolveContentGeneratorConfigWithSources, "resolveContentGeneratorConfigWithSources");
707
+ var VERTEX_PROJECT_ENV_VAR = "GOOGLE_CLOUD_PROJECT";
708
+ function hasVertexProjectConfigured(lookup = (key) => process.env[key]) {
709
+ return !!lookup(VERTEX_PROJECT_ENV_VAR)?.trim();
710
+ }
711
+ __name(hasVertexProjectConfigured, "hasVertexProjectConfigured");
712
+ function usesVertexApplicationDefaultCredentials(config) {
713
+ return config.authType === "vertex-ai" /* USE_VERTEX_AI */ && !config.apiKeyEnvKey && hasVertexProjectConfigured();
714
+ }
715
+ __name(usesVertexApplicationDefaultCredentials, "usesVertexApplicationDefaultCredentials");
716
+ function validateModelConfig(config, isStrictModelProvider = false) {
717
+ const errors = [];
718
+ if (config.authType === "qwen-oauth" /* QWEN_OAUTH */) {
719
+ return { valid: true, errors: [] };
720
+ }
721
+ if (!config.apiKey && !usesVertexApplicationDefaultCredentials(config)) {
722
+ if (isStrictModelProvider) {
723
+ errors.push(
724
+ new StrictMissingCredentialsError(
725
+ config.authType,
726
+ config.model,
727
+ config.apiKeyEnvKey
728
+ )
729
+ );
730
+ } else {
731
+ const envKey = config.apiKeyEnvKey || getDefaultApiKeyEnvVar(config.authType);
732
+ errors.push(
733
+ new MissingApiKeyError({
734
+ authType: config.authType,
735
+ model: config.model,
736
+ baseUrl: config.baseUrl,
737
+ envKey,
738
+ explicitEnvKey: config.apiKeyEnvKey
739
+ })
740
+ );
741
+ }
742
+ }
743
+ if (!config.model) {
744
+ if (isStrictModelProvider) {
745
+ errors.push(new StrictMissingModelIdError(config.authType));
746
+ } else {
747
+ const envKey = getDefaultModelEnvVar(config.authType);
748
+ errors.push(new MissingModelError({ authType: config.authType, envKey }));
749
+ }
750
+ }
751
+ if (config.authType === "anthropic" /* USE_ANTHROPIC */ && !config.baseUrl) {
752
+ if (isStrictModelProvider) {
753
+ errors.push(
754
+ new MissingBaseUrlError({
755
+ authType: config.authType,
756
+ model: config.model
757
+ })
758
+ );
759
+ } else if (config.authType === "anthropic" /* USE_ANTHROPIC */) {
760
+ errors.push(new MissingAnthropicBaseUrlEnvError());
761
+ }
762
+ }
763
+ return { valid: errors.length === 0, errors };
764
+ }
765
+ __name(validateModelConfig, "validateModelConfig");
766
+ function getModuleNotFoundError(error) {
767
+ let current = error;
768
+ while (current instanceof Error) {
769
+ if ("code" in current && current.code === "ERR_MODULE_NOT_FOUND") {
770
+ return current;
771
+ }
772
+ current = current.cause;
773
+ }
774
+ return void 0;
775
+ }
776
+ __name(getModuleNotFoundError, "getModuleNotFoundError");
777
+ function wrapProviderLoadError(error, authType) {
778
+ const moduleNotFoundError = getModuleNotFoundError(error);
779
+ if (!moduleNotFoundError) {
780
+ return error;
781
+ }
782
+ return new Error(
783
+ `Qwen Code was updated in the background and needs to be restarted.
784
+ Please exit and restart Qwen Code to use the '${authType}' provider.`,
785
+ { cause: moduleNotFoundError }
786
+ );
787
+ }
788
+ __name(wrapProviderLoadError, "wrapProviderLoadError");
789
+ var LazyContentGenerator = class {
790
+ constructor(loader) {
791
+ this.loader = loader;
792
+ }
793
+ static {
794
+ __name(this, "LazyContentGenerator");
795
+ }
796
+ generatorPromise;
797
+ preloadedOnly = false;
798
+ getGenerator() {
799
+ this.generatorPromise ??= this.loader();
800
+ return this.generatorPromise;
801
+ }
802
+ getGeneratorForUse() {
803
+ this.preloadedOnly = false;
804
+ return this.getGenerator();
805
+ }
806
+ preload() {
807
+ if (!this.generatorPromise) {
808
+ this.preloadedOnly = true;
809
+ }
810
+ return this.getGenerator();
811
+ }
812
+ resetPreload() {
813
+ if (!this.preloadedOnly) return;
814
+ this.preloadedOnly = false;
815
+ this.generatorPromise = void 0;
816
+ }
817
+ async generateContent(request, userPromptId) {
818
+ return (await this.getGeneratorForUse()).generateContent(
819
+ request,
820
+ userPromptId
821
+ );
822
+ }
823
+ async generateContentStream(request, userPromptId) {
824
+ return (await this.getGeneratorForUse()).generateContentStream(
825
+ request,
826
+ userPromptId
827
+ );
828
+ }
829
+ async embedContent(request) {
830
+ return (await this.getGeneratorForUse()).embedContent(request);
831
+ }
832
+ };
833
+ async function preloadContentGenerator(generator) {
834
+ if (generator instanceof LazyContentGenerator) {
835
+ await generator.preload();
836
+ }
837
+ }
838
+ __name(preloadContentGenerator, "preloadContentGenerator");
839
+ function resetPreloadedContentGenerator(generator) {
840
+ if (generator instanceof LazyContentGenerator) {
841
+ generator.resetPreload();
842
+ }
843
+ }
844
+ __name(resetPreloadedContentGenerator, "resetPreloadedContentGenerator");
845
+ async function createContentGenerator(generatorConfig, config, isInitialAuth) {
846
+ const validation = validateModelConfig(generatorConfig, false);
847
+ if (!validation.valid) {
848
+ throw new Error(validation.errors.map((e) => e.message).join("\n"));
849
+ }
850
+ const authType = generatorConfig.authType;
851
+ if (!authType) {
852
+ throw new Error("ContentGeneratorConfig must have an authType");
853
+ }
854
+ await preloadRuntimeFetchModule();
855
+ let loadBaseGenerator;
856
+ try {
857
+ if (authType === "openai" /* USE_OPENAI */) {
858
+ loadBaseGenerator = /* @__PURE__ */ __name(async () => {
859
+ const { createOpenAIContentGenerator } = await import("./openaiContentGenerator-OGILGUZE.js");
860
+ return createOpenAIContentGenerator(generatorConfig, config);
861
+ }, "loadBaseGenerator");
862
+ } else if (authType === "openai-responses" /* USE_OPENAI_RESPONSES */) {
863
+ loadBaseGenerator = /* @__PURE__ */ __name(async () => {
864
+ const { createOpenAIResponsesContentGenerator } = await import("./openaiResponsesContentGenerator-NXOXUPFM.js");
865
+ return createOpenAIResponsesContentGenerator(generatorConfig, config);
866
+ }, "loadBaseGenerator");
867
+ } else if (authType === "qwen-oauth" /* QWEN_OAUTH */) {
868
+ const { getQwenOAuthClient: getQwenOauthClient } = await import("./qwenOAuth2-3J66TOT5.js");
869
+ try {
870
+ const qwenClient = await getQwenOauthClient(
871
+ config,
872
+ isInitialAuth ? { requireCachedCredentials: true } : void 0
873
+ );
874
+ loadBaseGenerator = /* @__PURE__ */ __name(async () => {
875
+ const { QwenContentGenerator } = await import("./qwenContentGenerator-I4LRYADV.js");
876
+ return new QwenContentGenerator(qwenClient, generatorConfig, config);
877
+ }, "loadBaseGenerator");
878
+ } catch (error) {
879
+ if (getModuleNotFoundError(error)) {
880
+ throw error;
881
+ }
882
+ throw new Error(error instanceof Error ? error.message : String(error));
883
+ }
884
+ } else if (authType === "anthropic" /* USE_ANTHROPIC */) {
885
+ loadBaseGenerator = /* @__PURE__ */ __name(async () => {
886
+ const { createAnthropicContentGenerator } = await import("./anthropicContentGenerator-4FGOM5LK.js");
887
+ return createAnthropicContentGenerator(generatorConfig, config);
888
+ }, "loadBaseGenerator");
889
+ } else if (authType === "gemini" /* USE_GEMINI */ || authType === "vertex-ai" /* USE_VERTEX_AI */) {
890
+ loadBaseGenerator = /* @__PURE__ */ __name(async () => {
891
+ const { createLlmContentGenerator } = await import("./llm-content-generator-MLIONRXE.js");
892
+ return createLlmContentGenerator(generatorConfig, config);
893
+ }, "loadBaseGenerator");
894
+ } else {
895
+ throw new Error(
896
+ `Error creating contentGenerator: Unsupported authType: ${authType}`
897
+ );
898
+ }
899
+ } catch (error) {
900
+ throw wrapProviderLoadError(error, authType);
901
+ }
902
+ return new LazyContentGenerator(async () => {
903
+ try {
904
+ const [baseGenerator, { LoggingContentGenerator }] = await Promise.all([
905
+ loadBaseGenerator(),
906
+ import("./loggingContentGenerator-TUPEXFMM.js")
907
+ ]);
908
+ return new LoggingContentGenerator(
909
+ baseGenerator,
910
+ config,
911
+ generatorConfig
912
+ );
913
+ } catch (error) {
914
+ throw wrapProviderLoadError(error, authType);
915
+ }
916
+ });
917
+ }
918
+ __name(createContentGenerator, "createContentGenerator");
919
+
920
+ // packages/core/src/core/modalityDefaults.ts
921
+ init_esbuild_shims();
922
+ var FULL_MULTIMODAL = {
923
+ image: true,
924
+ pdf: true,
925
+ audio: true,
926
+ video: true
927
+ };
928
+ var MODALITY_PATTERNS = [
929
+ // -------------------
930
+ // Google Gemini — full multimodal
931
+ // -------------------
932
+ [/^gemini-3/, FULL_MULTIMODAL],
933
+ [/^gemini-/, FULL_MULTIMODAL],
934
+ // -------------------
935
+ // OpenAI — image by default for all gpt/o-series models
936
+ // -------------------
937
+ [/^gpt-5/, { image: true }],
938
+ [/^gpt-/, { image: true }],
939
+ [/^o\d/, { image: true }],
940
+ // -------------------
941
+ // Anthropic Claude — image + pdf
942
+ // -------------------
943
+ [/^claude-/, { image: true, pdf: true }],
944
+ // -------------------
945
+ // Alibaba / Qwen
946
+ // -------------------
947
+ // Qwen Plus models: image + video support
948
+ [/^qwen3\.5-plus/, { image: true, video: true }],
949
+ [/^qwen3\.6-plus/, { image: true, video: true }],
950
+ [/^qwen3\.7-plus/, { image: true, video: true }],
951
+ // Qwen 3.8 series: flash/plus support image + video; max supports image only
952
+ [/^qwen3\.8-flash/, { image: true, video: true }],
953
+ [/^qwen3\.8-plus/, { image: true, video: true }],
954
+ [/^qwen3\.8-max/, { image: true }],
955
+ [/^coder-model$/, { image: true, video: true }],
956
+ // Qwen VL (vision-language) models: image + video
957
+ [/^qwen-vl-/, { image: true, video: true }],
958
+ [/^qwen3-vl-/, { image: true, video: true }],
959
+ // Qwen coder / text models: text-only
960
+ [/^qwen3-coder-/, {}],
961
+ // Qwen3.6-35B-A3B (local quant variants) — image + video
962
+ [/^qwen3\.6-35b/, { image: true, video: true }],
963
+ [/^qwen/, {}],
964
+ // -------------------
965
+ // DeepSeek — text-only, except explicit vision variants
966
+ // (QwenLM/qwen-code#10270)
967
+ // -------------------
968
+ [/^deepseek-.*vision/, { image: true }],
969
+ [/^deepseek/, {}],
970
+ // -------------------
971
+ // Zhipu GLM — v-suffix ids are vision models; others are text-only
972
+ // (QwenLM/qwen-code#10270)
973
+ // -------------------
974
+ [/^glm-[0-9.]+v/, { image: true }],
975
+ // glm-5.3-flash natively integrates vision input (no v suffix)
976
+ [/^glm-5\.3-flash/, { image: true }],
977
+ [/^glm-5(?:-|$)/, {}],
978
+ [/^glm-/, {}],
979
+ // -------------------
980
+ // MiniMax — M3 supports image + video input; older models default to text-only
981
+ // -------------------
982
+ [/^minimax-m3/i, { image: true, video: true }],
983
+ [/^minimax-/, {}],
984
+ // -------------------
985
+ // Moonshot / Kimi
986
+ // -------------------
987
+ [/^kimi-k3/, { image: true, video: true }],
988
+ [/^kimi-k2\./, { image: true, video: true }],
989
+ [/^kimi-/, {}],
990
+ // -------------------
991
+ // ByteDance Doubao — Seed-series and *-vision / *-vl models accept image
992
+ // input; other Doubao models (pro / lite / text) are text-only.
993
+ // (QwenLM/qwen-code#4876)
994
+ // -------------------
995
+ // seedance (text→video) and seedream (text→image) are generation models with
996
+ // text-only input — exclude them before the multimodal Seed chat series.
997
+ [/^doubao-seed(ance|ream)/, {}],
998
+ [/^doubao-seed/, { image: true }],
999
+ [/^doubao-.*(vision|vl)/, { image: true }],
1000
+ [/^doubao/, {}]
1001
+ ];
1002
+ function defaultModalities(model) {
1003
+ const norm = normalize(model);
1004
+ for (const [regex, modalities] of MODALITY_PATTERNS) {
1005
+ if (regex.test(norm)) {
1006
+ return { ...modalities };
1007
+ }
1008
+ }
1009
+ return {};
1010
+ }
1011
+ __name(defaultModalities, "defaultModalities");
1012
+ function isQwenFamilyWireModel(model) {
1013
+ if (!model) {
1014
+ return false;
1015
+ }
1016
+ const normalized = model.toLowerCase();
1017
+ return normalized.startsWith("qwen") || normalized === "coder-model";
1018
+ }
1019
+ __name(isQwenFamilyWireModel, "isQwenFamilyWireModel");
1020
+ function isTieredEffortWireModel(model, configuredReasoning) {
1021
+ if (!model) {
1022
+ return false;
1023
+ }
1024
+ const reasoning = parseModelReasoningCapabilities(configuredReasoning);
1025
+ if (reasoning) {
1026
+ return isQwenFamilyWireModel(model) && !reasoning.toggleOnly && reasoning.disableField === "reasoning_effort";
1027
+ }
1028
+ return model.toLowerCase().startsWith("qwen3.8-max");
1029
+ }
1030
+ __name(isTieredEffortWireModel, "isTieredEffortWireModel");
1031
+
1032
+ export {
1033
+ getDefaultApiKeyEnvVar,
1034
+ VERTEX_ADC_HINT,
1035
+ DEFAULT_QWEN_MODEL,
1036
+ DEFAULT_QWEN_EMBEDDING_MODEL,
1037
+ MAINLINE_CODER_MODEL,
1038
+ MODEL_GENERATION_CONFIG_FIELDS,
1039
+ PROVIDER_SOURCED_FIELDS,
1040
+ AUTH_ENV_MAPPINGS,
1041
+ DEFAULT_MODELS,
1042
+ QWEN_OAUTH_MODELS,
1043
+ QWEN_OAUTH_ALLOWED_MODELS,
1044
+ DEFAULT_TOKEN_LIMIT,
1045
+ OUTPUT_TOKEN_CEILING,
1046
+ clampOutputTokensToWindow,
1047
+ parsePositiveIntegerEnvValue,
1048
+ normalize,
1049
+ hasExplicitOutputLimit,
1050
+ knownTokenLimit,
1051
+ tokenLimit,
1052
+ defaultOutputCeiling,
1053
+ reconcileMaxTokens,
1054
+ REASONING_EFFORT_TIERS,
1055
+ getGptReasoningCapabilities,
1056
+ isReasoningEffortPlaceholder,
1057
+ normalizeReasoningEffort,
1058
+ clampReasoningEffort,
1059
+ applyReasoningEffort,
1060
+ setGeneratorReasoningEffort,
1061
+ reasoningEffortsForCapability,
1062
+ parseModelReasoningCapabilities,
1063
+ defaultModalities,
1064
+ isQwenFamilyWireModel,
1065
+ isTieredEffortWireModel,
1066
+ resolveContentGeneratorConfigWithSources,
1067
+ hasVertexProjectConfigured,
1068
+ preloadContentGenerator,
1069
+ resetPreloadedContentGenerator,
1070
+ createContentGenerator
1071
+ };
1072
+ /**
1073
+ * @license
1074
+ * Copyright 2025 Qwen Team
1075
+ * SPDX-License-Identifier: Apache-2.0
1076
+ */
1077
+ /**
1078
+ * @license
1079
+ * Copyright 2025 Google LLC
1080
+ * Copyright 2026 Qwen Team
1081
+ * SPDX-License-Identifier: Apache-2.0
1082
+ */
1083
+ /**
1084
+ * @license
1085
+ * Copyright 2025 Google LLC
1086
+ * SPDX-License-Identifier: Apache-2.0
1087
+ */
1088
+ /**
1089
+ * @license
1090
+ * Copyright 2025 Qwen
1091
+ * SPDX-License-Identifier: Apache-2.0
1092
+ */