@qwen-code/qwen-code 0.19.2 → 0.19.3-nightly.20260701.a974594d7

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 (291) hide show
  1. package/bundled/extension-creator/SKILL.md +357 -0
  2. package/bundled/loop/SKILL.md +34 -10
  3. package/bundled/loop/SKILL.test.ts +52 -0
  4. package/bundled/loop/autonomous-loop.test.ts +59 -0
  5. package/bundled/loop/autonomous-loop.ts +102 -0
  6. package/bundled/loop/loop-task-file.test.ts +1064 -0
  7. package/bundled/loop/loop-task-file.ts +404 -0
  8. package/bundled/loop/loop-tick-resolver.test.ts +864 -0
  9. package/bundled/loop/loop-tick-resolver.ts +416 -0
  10. package/bundled/qc-helper/SKILL.md +26 -19
  11. package/bundled/qc-helper/docs/configuration/auth.md +11 -11
  12. package/bundled/qc-helper/docs/configuration/model-providers.md +13 -13
  13. package/bundled/qc-helper/docs/configuration/settings.md +77 -75
  14. package/bundled/qc-helper/docs/features/channels/plugins.md +1 -1
  15. package/bundled/qc-helper/docs/features/commands.md +108 -77
  16. package/bundled/qc-helper/docs/features/hooks.md +6 -1
  17. package/bundled/qc-helper/docs/features/memory.md +53 -1
  18. package/bundled/qc-helper/docs/features/status-line.md +3 -3
  19. package/bundled/qc-helper/docs/ide-integration/ide-integration.md +4 -4
  20. package/bundled/qc-helper/docs/qwen-serve.md +24 -2
  21. package/bundled/qc-helper/docs/support/tos-privacy.md +16 -3
  22. package/bundled/qc-helper/docs/support/troubleshooting.md +6 -0
  23. package/chunks/{MaxSizedBox-7RERNLFK.js → MaxSizedBox-UZHJ73JB.js} +29 -27
  24. package/chunks/{StandaloneSessionPicker-S22XBSN6.js → StandaloneSessionPicker-GGUIZWCE.js} +42 -37
  25. package/chunks/{acpAgent-4MCETHF2.js → acpAgent-QYZFICEZ.js} +1292 -332
  26. package/chunks/{agent-K3ENVYSB.js → agent-2EN7YNSW.js} +24 -23
  27. package/chunks/{agent-headless-HO3V3A3A.js → agent-headless-SLTEZ5LV.js} +24 -23
  28. package/chunks/{anthropicContentGenerator-E3TQ5XJJ.js → anthropicContentGenerator-CA3JTAMO.js} +33 -12
  29. package/chunks/{artifact-tool-QA4KRO3B.js → artifact-tool-RM7WINJO.js} +3 -3
  30. package/chunks/{askUserQuestion-HMWXW6VN.js → askUserQuestion-J3P6QAJ7.js} +2 -2
  31. package/chunks/{bridge-4LV2HBH2.js → bridge-HZVAUTMX.js} +29 -28
  32. package/chunks/{ca-7WC7ELX6.js → ca-RYOETBUW.js} +10 -9
  33. package/chunks/{chunk-JXQ23SNT.js → chunk-2JKEQWDZ.js} +623 -78
  34. package/chunks/chunk-32MCHZQC.js +73 -0
  35. package/chunks/{chunk-PXFFKNCO.js → chunk-35FH347N.js} +5308 -2500
  36. package/chunks/{chunk-5JZLXFPD.js → chunk-3O2BJMFW.js} +11 -11
  37. package/chunks/{chunk-2JD55C6G.js → chunk-3TK7FSCP.js} +2 -2
  38. package/chunks/{chunk-USGMPVOY.js → chunk-4722VFFU.js} +19 -10
  39. package/chunks/chunk-6FIWYVN4.js +4932 -0
  40. package/chunks/{chunk-I2RFAW6Q.js → chunk-7SP275SH.js} +7 -5
  41. package/chunks/{chunk-5R4SBCX6.js → chunk-AIBPG5MB.js} +3 -3
  42. package/chunks/{chunk-C4K3FEQ2.js → chunk-AVQDCKNF.js} +124 -21
  43. package/chunks/{chunk-OTBK43JR.js → chunk-B236XPGF.js} +1 -1
  44. package/chunks/{chunk-WA5OJGFL.js → chunk-B5MPZI4K.js} +458 -125
  45. package/chunks/{chunk-5DWXLGOM.js → chunk-BJBWRCSK.js} +1 -1
  46. package/chunks/{chunk-4W4T77MO.js → chunk-BLAE2TCO.js} +109 -6
  47. package/chunks/chunk-BMFMJINR.js +45 -0
  48. package/chunks/{chunk-T2VDEFUU.js → chunk-BZHLWC6T.js} +2 -2
  49. package/chunks/{chunk-XU5P23GN.js → chunk-CA4ML3VH.js} +3 -3
  50. package/chunks/{chunk-WGAEWQTF.js → chunk-DBR7PF4B.js} +1 -2
  51. package/chunks/{chunk-S566HKUS.js → chunk-DHXWNSJA.js} +15 -1
  52. package/chunks/{chunk-LLFFKXZZ.js → chunk-DJ25MIU2.js} +167 -43
  53. package/chunks/{chunk-KBXLIVWQ.js → chunk-DX3TKXNT.js} +2 -2
  54. package/chunks/{chunk-OIC6S73E.js → chunk-E5I6YSNO.js} +1 -1
  55. package/chunks/{chunk-TXVGVZYR.js → chunk-ESVSWG6Z.js} +3 -3
  56. package/chunks/{chunk-EX4W6ZYG.js → chunk-EUURTJY7.js} +1 -1
  57. package/chunks/{chunk-QBZ22PQX.js → chunk-EWALXUAD.js} +3 -1
  58. package/chunks/{chunk-F6XNTYNE.js → chunk-FQDMX5IL.js} +30 -307
  59. package/chunks/{chunk-3QFE4OTE.js → chunk-FR3II765.js} +4 -4
  60. package/chunks/{chunk-VYFMN7C6.js → chunk-FV4SQ54H.js} +382 -55
  61. package/chunks/{chunk-ZD3NW5KL.js → chunk-FZY7NH37.js} +63 -9
  62. package/chunks/{chunk-CI5O6SQL.js → chunk-G525INVW.js} +4 -4
  63. package/chunks/{chunk-CGOMICBE.js → chunk-GDIG7TMG.js} +34 -1
  64. package/chunks/{chunk-R2BXK7SX.js → chunk-GHOTR7HL.js} +6 -1
  65. package/chunks/{chunk-TZM5JIAX.js → chunk-GZKQ36JS.js} +10 -7
  66. package/chunks/{chunk-BS64PXY3.js → chunk-HIYUAXBG.js} +1 -1
  67. package/chunks/{chunk-TMBPDHXD.js → chunk-HTWHAN44.js} +1 -1
  68. package/chunks/{chunk-EL5IHQON.js → chunk-HUGAEYZR.js} +6 -27
  69. package/chunks/{chunk-2BIF2NVV.js → chunk-HWG4XLD7.js} +2 -2
  70. package/chunks/{chunk-I5T6PIBQ.js → chunk-I4MXURND.js} +1076 -954
  71. package/chunks/{chunk-JTYRZODB.js → chunk-IBEM64M4.js} +39 -11
  72. package/chunks/{chunk-XKBP7M7A.js → chunk-IKO44NAT.js} +149 -31
  73. package/chunks/{chunk-2BAQ3ACS.js → chunk-JERW36RG.js} +404 -4
  74. package/chunks/{chunk-TOEGRAVX.js → chunk-JV7A66DR.js} +28 -16
  75. package/chunks/{chunk-3RJ3ZPPR.js → chunk-KKQWC6WS.js} +7 -7
  76. package/chunks/{chunk-EXMX5YHG.js → chunk-KXVVXAAC.js} +1 -1
  77. package/chunks/{chunk-Z7XXFPGP.js → chunk-LDWTYE33.js} +1 -1
  78. package/chunks/{chunk-X6EDWN44.js → chunk-LWGLBVWA.js} +1 -1
  79. package/chunks/{chunk-NYOHZYHM.js → chunk-LXEW6BHF.js} +45 -3
  80. package/chunks/{chunk-BGUDAULQ.js → chunk-LXGWLOCM.js} +5 -5
  81. package/chunks/{chunk-ZUAXI2OA.js → chunk-M2U5NM24.js} +188 -11366
  82. package/chunks/{chunk-BNXANYLH.js → chunk-MOUXUCXQ.js} +81 -1
  83. package/chunks/{chunk-FPACXT7T.js → chunk-MTJVHQDP.js} +534 -164
  84. package/chunks/{chunk-UAARJR2G.js → chunk-N4V4VBP6.js} +2 -2
  85. package/chunks/chunk-NIOPRZNN.js +27 -0
  86. package/chunks/{chunk-2TJ3YN6Q.js → chunk-NOYV2NXI.js} +517 -490
  87. package/chunks/{chunk-PRYMDRBV.js → chunk-NPQWQYU6.js} +1 -1
  88. package/chunks/{chunk-J6AW7O5D.js → chunk-NVTRORSK.js} +2 -2
  89. package/chunks/{chunk-PF523XJX.js → chunk-OE5J6UA7.js} +1 -1
  90. package/chunks/{chunk-RS4HRC75.js → chunk-OEY3YAL2.js} +99 -8
  91. package/chunks/{chunk-R36VMVEP.js → chunk-PLQTLKMR.js} +5 -5
  92. package/chunks/{chunk-UN3C6GOR.js → chunk-PPFWEV7G.js} +10 -108
  93. package/chunks/chunk-Q3JOGB4U.js +481 -0
  94. package/chunks/{chunk-HG6YKEBI.js → chunk-Q7TDHJ2G.js} +192 -30
  95. package/chunks/{chunk-EW6C27XX.js → chunk-QHHNFG22.js} +9 -3
  96. package/chunks/chunk-QYUE6W3T.js +123 -0
  97. package/chunks/{chunk-GZCJS5WH.js → chunk-SJBIFVD2.js} +2 -2
  98. package/chunks/{chunk-3UALQ56H.js → chunk-T42ACHFI.js} +1 -1
  99. package/chunks/chunk-T44AF4I6.js +690 -0
  100. package/chunks/{chunk-DBZUXSSV.js → chunk-TMILTLP3.js} +6 -6
  101. package/chunks/{chunk-EEEZIVFJ.js → chunk-TOAUDIS7.js} +1 -1
  102. package/chunks/chunk-UAKXW3DN.js +30 -0
  103. package/chunks/{chunk-VQRYPFCV.js → chunk-V5YJAUHW.js} +10 -460
  104. package/chunks/{chunk-D5E5TMYH.js → chunk-VHRREANT.js} +16 -2
  105. package/chunks/{chunk-5RVSM6NW.js → chunk-VN4CKYUW.js} +1 -1
  106. package/chunks/chunk-VXGPYF7U.js +37 -0
  107. package/chunks/{chunk-UAARVVBI.js → chunk-WGY3GIPP.js} +1 -1
  108. package/chunks/{chunk-GYZQA2FO.js → chunk-WJAY4WXR.js} +1 -1
  109. package/chunks/chunk-XKSCTXPK.js +167 -0
  110. package/chunks/chunk-YCEHOJZJ.js +840 -0
  111. package/chunks/{chunk-BG4BIP7F.js → chunk-YCRTJYSQ.js} +4 -2
  112. package/chunks/{chunk-CGEGHF2C.js → chunk-YPCPZSZB.js} +1 -1
  113. package/chunks/chunk-YTFBURQD.js +313 -0
  114. package/chunks/{chunk-HGNSRCRB.js → chunk-YXK4GPYO.js} +1 -1
  115. package/chunks/{chunk-OQHQHJRK.js → chunk-Z34RYLRO.js} +151 -4775
  116. package/chunks/chunk-ZGSV5ORL.js +11273 -0
  117. package/chunks/{computer-use-6BBRNT6S.js → computer-use-FCNWHVPW.js} +103 -49
  118. package/chunks/{contextCommand-UJAJ6N57.js → contextCommand-FVFMZZEU.js} +26 -25
  119. package/chunks/{cron-create-4KQE6YLH.js → cron-create-IY5NMIHQ.js} +4 -4
  120. package/chunks/{cron-delete-THME66UP.js → cron-delete-OLNEQWKO.js} +6 -6
  121. package/chunks/{cron-list-7A54SJ5N.js → cron-list-YAUAUV24.js} +5 -5
  122. package/chunks/{daemon-status-provider-CSL3BUOY.js → daemon-status-provider-42JEXENZ.js} +32 -32
  123. package/chunks/{de-ACHALDED.js → de-HB5NJXGB.js} +10 -9
  124. package/chunks/{dist-BD27IA3L.js → dist-4FCNM6KJ.js} +2 -2
  125. package/chunks/{dist-OD2FY543.js → dist-K4XZILIO.js} +1 -1
  126. package/chunks/{dist-BOOH5JWN.js → dist-SU6L7ZNJ.js} +114 -9
  127. package/chunks/{dist-QHJRBCMP.js → dist-UKPWQJCL.js} +44 -2
  128. package/chunks/{dist-QFFZWACU.js → dist-VD7HXTML.js} +20 -9
  129. package/chunks/{earlyInputCapture-X6KMCSHD.js → earlyInputCapture-FFFEC6P4.js} +25 -24
  130. package/chunks/{edit-7J6WXARF.js → edit-32ILSGZY.js} +72 -30
  131. package/chunks/{en-NCUBOJOY.js → en-U3LWGSFX.js} +19 -9
  132. package/chunks/{enter-worktree-KULCKJPJ.js → enter-worktree-XWZKIN6A.js} +24 -23
  133. package/chunks/{enterPlanMode-H2CIOLMH.js → enterPlanMode-LPFFY7BJ.js} +24 -23
  134. package/chunks/{errors-6G2JYR54.js → errors-UXBPYPI2.js} +26 -25
  135. package/chunks/{exit-worktree-ECBWBVC5.js → exit-worktree-IBS4UIU7.js} +24 -23
  136. package/chunks/{exitPlanMode-DQV56GTW.js → exitPlanMode-JA72YHII.js} +24 -23
  137. package/chunks/{fast-path-35JJFS3C.js → fast-path-7UU67Y2W.js} +30 -13
  138. package/chunks/{fast-path-settings-TSVI53EB.js → fast-path-settings-UQLRFDQP.js} +3 -2
  139. package/chunks/{fr-GVKZ27MF.js → fr-XY3NQFCM.js} +10 -9
  140. package/chunks/{gemini-NDTG7WAX.js → gemini-GMVKJNMX.js} +211 -105
  141. package/chunks/{geminiContentGenerator-XTG6SFLA.js → geminiContentGenerator-7NIFF2L4.js} +4 -4
  142. package/chunks/{glob-SJ2JBZK4.js → glob-4NJCW5HI.js} +24 -23
  143. package/chunks/{grep-BRMWFEWR.js → grep-PAIMLQEL.js} +24 -23
  144. package/chunks/{initializer-P5AXF7PV.js → initializer-R6KU4VYM.js} +31 -28
  145. package/chunks/{ja-FKZ2WZ4D.js → ja-J7YAG7SA.js} +10 -9
  146. package/chunks/{keychain-token-storage-CSYMNRPP.js → keychain-token-storage-GPAKRDKQ.js} +2 -2
  147. package/chunks/{list-6COK34BP.js → list-H7LXAO64.js} +32 -29
  148. package/chunks/{loadedSettingsAdapter-XIUTN245.js → loadedSettingsAdapter-H27JMTLU.js} +30 -27
  149. package/chunks/{loop-wakeup-33GPXJLA.js → loop-wakeup-Y3OIRQFM.js} +7 -7
  150. package/chunks/{ls-BYQY7RVV.js → ls-TVJEYS7O.js} +4 -4
  151. package/chunks/{lsp-X54RO4IV.js → lsp-JZSDVR3F.js} +2 -2
  152. package/chunks/{monitor-DH7KFSJV.js → monitor-JSIHDPXP.js} +24 -23
  153. package/chunks/nonInteractiveCli-Y4CHOETG.js +100 -0
  154. package/chunks/{notebook-edit-D4R4ZLMA.js → notebook-edit-SHRNL2UM.js} +52 -23
  155. package/chunks/{openaiContentGenerator-F74IPQ6E.js → openaiContentGenerator-ORZZ7VFO.js} +13 -12
  156. package/chunks/{pt-SY5NCFGR.js → pt-6RTAA6SS.js} +10 -9
  157. package/chunks/{qwenContentGenerator-ATTK5P4D.js → qwenContentGenerator-H643PL2G.js} +26 -25
  158. package/chunks/{qwenOAuth2-K4AASPCV.js → qwenOAuth2-OI2B7PES.js} +5 -4
  159. package/chunks/{read-file-767G23OY.js → read-file-5PRNPTTY.js} +8 -8
  160. package/chunks/{read-mcp-resource-I5HCZJ6X.js → read-mcp-resource-QTXGKTEV.js} +2 -2
  161. package/chunks/{ripGrep-4OMMGSWX.js → ripGrep-JIKZMABJ.js} +24 -23
  162. package/chunks/{ru-FWNXJG4F.js → ru-AUBGJ2C4.js} +10 -9
  163. package/chunks/{run-qwen-serve-REKSTYRA.js → run-qwen-serve-PQV7QOHZ.js} +284 -52
  164. package/chunks/{scheduler-UNTFDQLG.js → scheduler-OS3R5MGU.js} +24 -23
  165. package/chunks/{send-message-2DAFXEYP.js → send-message-DKGHWSTF.js} +2 -2
  166. package/chunks/{serve-KZ56QB5S.js → serve-LVYZDKCZ.js} +31 -29
  167. package/chunks/{server-BV5TZUMU.js → server-P4YIH35I.js} +11458 -8447
  168. package/chunks/{session-OIBXFSGD.js → session-DE4TZBKH.js} +195 -58
  169. package/chunks/{settings-WJTCBIRA.js → settings-DFTYMJYF.js} +30 -27
  170. package/chunks/{shell-WC52IBHW.js → shell-3GNQLNV7.js} +24 -23
  171. package/chunks/{skill-U7F7JR4M.js → skill-NCNG4KKZ.js} +38 -11
  172. package/chunks/{spawnChannel-EI2E5BCW.js → spawnChannel-DHRIMDVL.js} +26 -25
  173. package/chunks/{src-4F6FBZFI.js → src-PNZYGM3R.js} +104 -28
  174. package/chunks/{startInteractiveUI-SFRVB3CE.js → startInteractiveUI-P6GZBFQW.js} +2817 -2500
  175. package/chunks/{syntheticOutput-PPS3HDVA.js → syntheticOutput-X7L5HWLN.js} +3 -3
  176. package/chunks/{task-create-OUYCA553.js → task-create-AWEUI4GI.js} +6 -6
  177. package/chunks/{task-list-WAX7I2IA.js → task-list-KZ3VJLDU.js} +5 -5
  178. package/chunks/{task-stop-CAIL6FNH.js → task-stop-GUNOZKJ5.js} +2 -2
  179. package/chunks/{task-update-AHEO5OUT.js → task-update-Y56GP6DU.js} +6 -6
  180. package/chunks/{team-create-3WC7CIIW.js → team-create-6JMW3KQK.js} +24 -23
  181. package/chunks/{team-delete-HGHFG23B.js → team-delete-6AFRGDJY.js} +5 -5
  182. package/chunks/{theme-manager-DICFCT3P.js → theme-manager-FEHQO22G.js} +25 -24
  183. package/chunks/{todoWrite-IFBMN3FH.js → todoWrite-JRS6NOEU.js} +4 -4
  184. package/chunks/{tool-search-L5K7HLER.js → tool-search-IXAEKS7J.js} +101 -16
  185. package/chunks/trustedFolders-SJRXNHZE.js +76 -0
  186. package/chunks/types-QX5C3CHJ.js +12 -0
  187. package/chunks/{validateNonInterActiveAuth-GCH4Z6KI.js → validateNonInterActiveAuth-HCH7OBDH.js} +56 -51
  188. package/chunks/{web-fetch-B5IIQ5TT.js → web-fetch-RELNL37A.js} +29 -15
  189. package/chunks/{workflow-OB3AND7I.js → workflow-M2COBI7R.js} +38 -32
  190. package/chunks/{workspace-providers-status-ZIR5EPOO.js → workspace-providers-status-GOCWYDMK.js} +32 -29
  191. package/chunks/workspace-service-34C7SUBU.js +75 -0
  192. package/chunks/{write-file-SEXBNDZM.js → write-file-E52WRXZL.js} +67 -31
  193. package/chunks/{zh-RBEGQVQT.js → zh-F5T4WWZO.js} +19 -9
  194. package/chunks/{zh-TW-QGAVRXT3.js → zh-TW-LKLBTZHE.js} +19 -9
  195. package/cli-entry.js +20 -9
  196. package/cli.js +6 -6
  197. package/locales/ca.js +15 -13
  198. package/locales/de.js +15 -13
  199. package/locales/en.js +31 -13
  200. package/locales/fr.js +16 -14
  201. package/locales/ja.js +15 -14
  202. package/locales/pt.js +15 -13
  203. package/locales/ru.js +15 -13
  204. package/locales/zh-TW.js +28 -12
  205. package/locales/zh.js +28 -12
  206. package/node_modules/@qwen-code/audio-capture/dist/index.d.ts +35 -0
  207. package/node_modules/@qwen-code/audio-capture/dist/index.js +48 -0
  208. package/node_modules/@qwen-code/audio-capture/dist/index.js.map +1 -0
  209. package/node_modules/@qwen-code/audio-capture/dist/platform.d.ts +7 -0
  210. package/node_modules/@qwen-code/audio-capture/dist/platform.js +18 -0
  211. package/node_modules/@qwen-code/audio-capture/dist/platform.js.map +1 -0
  212. package/node_modules/@qwen-code/audio-capture/node_modules/node-gyp-build/LICENSE +21 -0
  213. package/node_modules/@qwen-code/audio-capture/node_modules/node-gyp-build/README.md +58 -0
  214. package/node_modules/@qwen-code/audio-capture/node_modules/node-gyp-build/SECURITY.md +5 -0
  215. package/node_modules/@qwen-code/audio-capture/node_modules/node-gyp-build/bin.js +84 -0
  216. package/node_modules/@qwen-code/audio-capture/node_modules/node-gyp-build/build-test.js +19 -0
  217. package/node_modules/@qwen-code/audio-capture/node_modules/node-gyp-build/index.js +6 -0
  218. package/node_modules/@qwen-code/audio-capture/node_modules/node-gyp-build/node-gyp-build.js +207 -0
  219. package/node_modules/@qwen-code/audio-capture/node_modules/node-gyp-build/optional.js +7 -0
  220. package/node_modules/@qwen-code/audio-capture/node_modules/node-gyp-build/package.json +43 -0
  221. package/node_modules/@qwen-code/audio-capture/package.json +30 -0
  222. package/node_modules/@qwen-code/audio-capture/prebuilds/darwin-arm64/@qwen-code+audio-capture.node +0 -0
  223. package/node_modules/@qwen-code/audio-capture/prebuilds/darwin-x64/@qwen-code+audio-capture.node +0 -0
  224. package/node_modules/@qwen-code/audio-capture/prebuilds/linux-arm64/@qwen-code+audio-capture.node +0 -0
  225. package/node_modules/@qwen-code/audio-capture/prebuilds/linux-x64/@qwen-code+audio-capture.node +0 -0
  226. package/node_modules/@qwen-code/audio-capture/prebuilds/win32-x64/@qwen-code+audio-capture.node +0 -0
  227. package/package.json +18 -6
  228. package/patches/chrome-devtools-mcp+1.4.0.patch +31 -0
  229. package/postinstall.js +50 -0
  230. package/web-shell/assets/{arc-D_ae_Y9k.js → arc-C2DILvUl.js} +1 -1
  231. package/web-shell/assets/{architectureDiagram-3BPJPVTR-BMLRjppa.js → architectureDiagram-3BPJPVTR-b8gZ2cNw.js} +1 -1
  232. package/web-shell/assets/{blockDiagram-GPEHLZMM-qVDQC8KL.js → blockDiagram-GPEHLZMM-BuRpghMj.js} +1 -1
  233. package/web-shell/assets/{c4Diagram-AAUBKEIU-CxWS6MBd.js → c4Diagram-AAUBKEIU-2ItdhFmE.js} +1 -1
  234. package/web-shell/assets/channel-eRvn2UA3.js +1 -0
  235. package/web-shell/assets/{chunk-2J33WTMH-BtNuY5Yp.js → chunk-2J33WTMH-B1QXa0q3.js} +1 -1
  236. package/web-shell/assets/{chunk-4BX2VUAB-BU-x368d.js → chunk-4BX2VUAB-DXfhKlNq.js} +1 -1
  237. package/web-shell/assets/{chunk-55IACEB6-DRgTLvBu.js → chunk-55IACEB6-ClSNjxLo.js} +1 -1
  238. package/web-shell/assets/{chunk-727SXJPM-D2aElv7q.js → chunk-727SXJPM-Dsh2wisB.js} +1 -1
  239. package/web-shell/assets/{chunk-AQP2D5EJ-BwHCMRQ0.js → chunk-AQP2D5EJ-C1TkY5AR.js} +1 -1
  240. package/web-shell/assets/{chunk-FMBD7UC4-BMyPH-ku.js → chunk-FMBD7UC4-CGtN9XR6.js} +1 -1
  241. package/web-shell/assets/{chunk-ND2GUHAM-BNKTstUf.js → chunk-ND2GUHAM-BHiPi1SS.js} +1 -1
  242. package/web-shell/assets/{chunk-QZHKN3VN-gD3vsFId.js → chunk-QZHKN3VN-CzG3I5o1.js} +1 -1
  243. package/web-shell/assets/classDiagram-4FO5ZUOK-YZNwy1rx.js +1 -0
  244. package/web-shell/assets/classDiagram-v2-Q7XG4LA2-YZNwy1rx.js +1 -0
  245. package/web-shell/assets/{cose-bilkent-S5V4N54A-BG9FAsXE.js → cose-bilkent-S5V4N54A-EgrIoH_K.js} +1 -1
  246. package/web-shell/assets/{dagre-BM42HDAG-Cy1sR7om.js → dagre-BM42HDAG-BUnpdX8S.js} +1 -1
  247. package/web-shell/assets/default-aEtf0G7-.svg +1 -0
  248. package/web-shell/assets/{diagram-2AECGRRQ-Bxi1I_Vu.js → diagram-2AECGRRQ-BlLUCVYu.js} +1 -1
  249. package/web-shell/assets/{diagram-5GNKFQAL-BGCJjO6y.js → diagram-5GNKFQAL-FG-enmjQ.js} +1 -1
  250. package/web-shell/assets/{diagram-KO2AKTUF-CMTeLXp7.js → diagram-KO2AKTUF-BlzmTONk.js} +1 -1
  251. package/web-shell/assets/{diagram-LMA3HP47-BN1wyAGh.js → diagram-LMA3HP47-CoBQ8mIx.js} +1 -1
  252. package/web-shell/assets/{diagram-OG6HWLK6-UYSG_zcp.js → diagram-OG6HWLK6-DvxV6sX8.js} +1 -1
  253. package/web-shell/assets/{erDiagram-TEJ5UH35-DqXL08lw.js → erDiagram-TEJ5UH35-Jq1tpAoj.js} +1 -1
  254. package/web-shell/assets/{flowDiagram-I6XJVG4X-BPJ9SFji.js → flowDiagram-I6XJVG4X-CbtYOry5.js} +1 -1
  255. package/web-shell/assets/{ganttDiagram-6RSMTGT7-BEd9Pnms.js → ganttDiagram-6RSMTGT7-ZEn2VEKR.js} +1 -1
  256. package/web-shell/assets/{gitGraphDiagram-PVQCEYII-DrNRH3oi.js → gitGraphDiagram-PVQCEYII-BZh-LkhJ.js} +1 -1
  257. package/web-shell/assets/index-5FhE0ORO.css +5 -0
  258. package/web-shell/assets/index-CDTGmqVm.js +720 -0
  259. package/web-shell/assets/{infoDiagram-5YYISTIA-CFYBrkVI.js → infoDiagram-5YYISTIA-B9HuZygK.js} +1 -1
  260. package/web-shell/assets/insert-DmRbh9Rv.svg +1 -0
  261. package/web-shell/assets/{ishikawaDiagram-YF4QCWOH-Dxsddth7.js → ishikawaDiagram-YF4QCWOH-D76cNpYG.js} +1 -1
  262. package/web-shell/assets/{journeyDiagram-JHISSGLW-DxaDK80t.js → journeyDiagram-JHISSGLW-6bGo7P1t.js} +1 -1
  263. package/web-shell/assets/{kanban-definition-UN3LZRKU-Q0jQCOct.js → kanban-definition-UN3LZRKU-DuYyRBvB.js} +1 -1
  264. package/web-shell/assets/{linear-DGGM2kcP.js → linear-CpdSW1BC.js} +1 -1
  265. package/web-shell/assets/{mermaid.core-ByoxnWut.js → mermaid.core-s5xbZMMj.js} +5 -5
  266. package/web-shell/assets/{mindmap-definition-RKZ34NQL-C0ZseHsi.js → mindmap-definition-RKZ34NQL-go01fZ2y.js} +1 -1
  267. package/web-shell/assets/{pieDiagram-4H26LBE5-MQXNhl5A.js → pieDiagram-4H26LBE5-BfuZiEHO.js} +1 -1
  268. package/web-shell/assets/{quadrantDiagram-W4KKPZXB-DIR4ee2A.js → quadrantDiagram-W4KKPZXB-DsoINqV6.js} +1 -1
  269. package/web-shell/assets/queue-DWpnpFgW.svg +1 -0
  270. package/web-shell/assets/{requirementDiagram-4Y6WPE33-BTR0UdYQ.js → requirementDiagram-4Y6WPE33-B7FU4LiU.js} +1 -1
  271. package/web-shell/assets/{sankeyDiagram-5OEKKPKP-sfnhMELN.js → sankeyDiagram-5OEKKPKP-BEDjFnGB.js} +1 -1
  272. package/web-shell/assets/{sequenceDiagram-3UESZ5HK-DXczHOHH.js → sequenceDiagram-3UESZ5HK-gzmmL5tK.js} +1 -1
  273. package/web-shell/assets/{stateDiagram-AJRCARHV-DdE_KQFH.js → stateDiagram-AJRCARHV-BtHD4IN_.js} +1 -1
  274. package/web-shell/assets/stateDiagram-v2-BHNVJYJU-DFy6gLDd.js +1 -0
  275. package/web-shell/assets/{timeline-definition-PNZ67QCA-DIc61uE8.js → timeline-definition-PNZ67QCA-T_8gmMCf.js} +1 -1
  276. package/web-shell/assets/{vennDiagram-CIIHVFJN-BF7ODmxB.js → vennDiagram-CIIHVFJN-DdjuqnjO.js} +1 -1
  277. package/web-shell/assets/{wardley-L42UT6IY-3pc1MEaw.js → wardley-L42UT6IY-Cgtrvb37.js} +1 -1
  278. package/web-shell/assets/{wardleyDiagram-YWT4CUSO-9jnPcZuP.js → wardleyDiagram-YWT4CUSO-BW3f3-yW.js} +1 -1
  279. package/web-shell/assets/{xychartDiagram-2RQKCTM6-DcthaZK6.js → xychartDiagram-2RQKCTM6-BUS9IKkc.js} +1 -1
  280. package/web-shell/index.html +2 -2
  281. package/chunks/chunk-B6HQGTYR.js +0 -410
  282. package/chunks/chunk-RKIZXJMB.js +0 -13
  283. package/chunks/headlessSafetyWarnings-LJ6FJX77.js +0 -57
  284. package/chunks/nonInteractiveCli-7575LBXP.js +0 -91
  285. package/chunks/workspace-service-OM5D4OI2.js +0 -60
  286. package/web-shell/assets/channel-DYPNiTww.js +0 -1
  287. package/web-shell/assets/classDiagram-4FO5ZUOK-p_g25Tni.js +0 -1
  288. package/web-shell/assets/classDiagram-v2-Q7XG4LA2-p_g25Tni.js +0 -1
  289. package/web-shell/assets/index-CpOXWDPh.js +0 -714
  290. package/web-shell/assets/index-oVK7qhre.css +0 -5
  291. package/web-shell/assets/stateDiagram-v2-BHNVJYJU-BHUSEndU.js +0 -1
@@ -23,28 +23,28 @@ import {
23
23
  } from "./chunk-OMX7CUOE.js";
24
24
  import {
25
25
  isAnyAutoMemPath
26
- } from "./chunk-BNXANYLH.js";
26
+ } from "./chunk-MOUXUCXQ.js";
27
27
  import {
28
28
  InstallationManager
29
- } from "./chunk-T2VDEFUU.js";
29
+ } from "./chunk-BZHLWC6T.js";
30
30
  import {
31
31
  STRUCTURED_OUTPUT_REDACTED_ARGS
32
- } from "./chunk-OIC6S73E.js";
32
+ } from "./chunk-E5I6YSNO.js";
33
33
  import {
34
34
  BaseDeclarativeTool,
35
35
  BaseToolInvocation,
36
36
  ToolDisplayNames,
37
37
  ToolNames
38
- } from "./chunk-TOEGRAVX.js";
38
+ } from "./chunk-JV7A66DR.js";
39
39
  import {
40
40
  atomicWriteFile,
41
41
  atomicWriteFileSync
42
- } from "./chunk-3UALQ56H.js";
42
+ } from "./chunk-T42ACHFI.js";
43
43
  import {
44
44
  convertSchema,
45
45
  runtimeDiagnostics,
46
46
  safeJsonParse
47
- } from "./chunk-CGEGHF2C.js";
47
+ } from "./chunk-YPCPZSZB.js";
48
48
  import {
49
49
  require_lib
50
50
  } from "./chunk-IRJWHZWU.js";
@@ -70,7 +70,7 @@ import {
70
70
  setShellTracePropagation,
71
71
  shortenPath,
72
72
  unescapePath
73
- } from "./chunk-C4K3FEQ2.js";
73
+ } from "./chunk-AVQDCKNF.js";
74
74
  import {
75
75
  require_dist
76
76
  } from "./chunk-ZERZSAZL.js";
@@ -12747,7 +12747,7 @@ var require_service_config = __commonJS({
12747
12747
  exports.validateRetryThrottling = validateRetryThrottling;
12748
12748
  exports.validateServiceConfig = validateServiceConfig;
12749
12749
  exports.extractAndSelectServiceConfig = extractAndSelectServiceConfig;
12750
- var os5 = __require("os");
12750
+ var os4 = __require("os");
12751
12751
  var constants_1 = require_constants2();
12752
12752
  var DURATION_REGEX = /^\d+(\.\d{1,9})?s$/;
12753
12753
  var CLIENT_LANGUAGE_STRING = "node";
@@ -13054,7 +13054,7 @@ var require_service_config = __commonJS({
13054
13054
  if (Array.isArray(validatedConfig.clientHostname)) {
13055
13055
  let hostnameMatched = false;
13056
13056
  for (const hostname2 of validatedConfig.clientHostname) {
13057
- if (hostname2 === os5.hostname()) {
13057
+ if (hostname2 === os4.hostname()) {
13058
13058
  hostnameMatched = true;
13059
13059
  }
13060
13060
  }
@@ -24757,7 +24757,7 @@ var require_subchannel_call = __commonJS({
24757
24757
  Object.defineProperty(exports, "__esModule", { value: true });
24758
24758
  exports.Http2SubchannelCall = void 0;
24759
24759
  var http2 = __require("http2");
24760
- var os5 = __require("os");
24760
+ var os4 = __require("os");
24761
24761
  var constants_1 = require_constants2();
24762
24762
  var metadata_1 = require_metadata();
24763
24763
  var stream_decoder_1 = require_stream_decoder();
@@ -24765,7 +24765,7 @@ var require_subchannel_call = __commonJS({
24765
24765
  var constants_2 = require_constants2();
24766
24766
  var TRACER_NAME = "subchannel_call";
24767
24767
  function getSystemErrorName(errno) {
24768
- for (const [name, num] of Object.entries(os5.constants.errno)) {
24768
+ for (const [name, num] of Object.entries(os4.constants.errno)) {
24769
24769
  if (num === errno) {
24770
24770
  return name;
24771
24771
  }
@@ -44576,7 +44576,7 @@ var require_ProcessDetector = __commonJS({
44576
44576
  exports.processDetector = void 0;
44577
44577
  var api_1 = (init_esm(), __toCommonJS(esm_exports));
44578
44578
  var semconv_1 = require_semconv2();
44579
- var os5 = __require("os");
44579
+ var os4 = __require("os");
44580
44580
  var ProcessDetector = class {
44581
44581
  static {
44582
44582
  __name(this, "ProcessDetector");
@@ -44599,7 +44599,7 @@ var require_ProcessDetector = __commonJS({
44599
44599
  attributes[semconv_1.ATTR_PROCESS_COMMAND] = process.argv[1];
44600
44600
  }
44601
44601
  try {
44602
- const userInfo = os5.userInfo();
44602
+ const userInfo = os4.userInfo();
44603
44603
  attributes[semconv_1.ATTR_PROCESS_OWNER] = userInfo.username;
44604
44604
  } catch (e) {
44605
44605
  api_1.diag.debug(`error obtaining process owner: ${e}`);
@@ -50949,8 +50949,8 @@ var require_homedir = __commonJS({
50949
50949
  "node_modules/resolve/lib/homedir.js"(exports, module) {
50950
50950
  "use strict";
50951
50951
  init_esbuild_shims();
50952
- var os5 = __require("os");
50953
- module.exports = os5.homedir || /* @__PURE__ */ __name(function homedir3() {
50952
+ var os4 = __require("os");
50953
+ module.exports = os4.homedir || /* @__PURE__ */ __name(function homedir3() {
50954
50954
  var home = process.env.HOME;
50955
50955
  var user = process.env.LOGNAME || process.env.USER || process.env.LNAME || process.env.USERNAME;
50956
50956
  if (process.platform === "win32") {
@@ -57009,7 +57009,6 @@ var require_src31 = __commonJS({
57009
57009
 
57010
57010
  // packages/core/src/tools/read-file.ts
57011
57011
  init_esbuild_shims();
57012
- import os4 from "node:os";
57013
57012
  import path10 from "node:path";
57014
57013
  import fs8 from "node:fs/promises";
57015
57014
 
@@ -58997,7 +58996,7 @@ async function processSingleFileContent(filePath, config, optionsOrOffset, legac
58997
58996
  stats
58998
58997
  };
58999
58998
  } catch (e) {
59000
- const msg = e instanceof Error ? e.message : String(e);
58999
+ const msg = getErrorMessage(e);
59001
59000
  return {
59002
59001
  llmContent: `Error parsing notebook ${relativePathForDisplay}: ${msg}`,
59003
59002
  returnDisplay: `Error reading notebook: ${relativePathForDisplay}`,
@@ -59016,7 +59015,7 @@ async function processSingleFileContent(filePath, config, optionsOrOffset, legac
59016
59015
  }
59017
59016
  }
59018
59017
  } catch (error) {
59019
- const errorMessage2 = error instanceof Error ? error.message : String(error);
59018
+ const errorMessage2 = getErrorMessage(error);
59020
59019
  const displayPath = path2.relative(rootDirectory, filePath).replace(/\\/g, "/");
59021
59020
  return {
59022
59021
  llmContent: `Error reading file ${displayPath}: ${errorMessage2}`,
@@ -59073,6 +59072,13 @@ var EVENT_SUBAGENT_EXECUTION = "qwen-code.subagent_execution";
59073
59072
  var EVENT_SKILL_LAUNCH = "qwen-code.skill_launch";
59074
59073
  var EVENT_AUTH = "qwen-code.auth";
59075
59074
  var EVENT_USER_FEEDBACK = "qwen-code.user_feedback";
59075
+ var EVENT_TOOL_OUTPUT_TRUNCATED = "qwen-code.tool_output_truncated";
59076
+ var DEFAULT_SENSITIVE_SPAN_ATTRIBUTE_MAX_LENGTH = 1024 * 1024;
59077
+ var SENSITIVE_SPAN_ATTRIBUTE_MAX_LENGTH_LIMIT = 100 * 1024 * 1024;
59078
+ function isValidSensitiveSpanAttributeMaxLength(value) {
59079
+ return Number.isSafeInteger(value) && value >= 1 && value <= SENSITIVE_SPAN_ATTRIBUTE_MAX_LENGTH_LIMIT;
59080
+ }
59081
+ __name(isValidSensitiveSpanAttributeMaxLength, "isValidSensitiveSpanAttributeMaxLength");
59076
59082
  var EVENT_PROMPT_SUGGESTION = "qwen-code.prompt_suggestion";
59077
59083
  var EVENT_SPECULATION = "qwen-code.speculation";
59078
59084
  var EVENT_WORKFLOW_KEYWORD = "qwen-code.workflow_keyword";
@@ -60999,13 +61005,16 @@ var UserPromptEvent = class {
60999
61005
  prompt_id;
61000
61006
  auth_type;
61001
61007
  prompt;
61002
- constructor(prompt_length, prompt_Id, auth_type, prompt) {
61008
+ /** Model that actually processed the prompt (e.g. an inline override). */
61009
+ model;
61010
+ constructor(prompt_length, prompt_Id, auth_type, prompt, model) {
61003
61011
  this["event.name"] = "user_prompt";
61004
61012
  this["event.timestamp"] = (/* @__PURE__ */ new Date()).toISOString();
61005
61013
  this.prompt_length = prompt_length;
61006
61014
  this.prompt_id = prompt_Id;
61007
61015
  this.auth_type = auth_type;
61008
61016
  this.prompt = prompt;
61017
+ this.model = model;
61009
61018
  }
61010
61019
  };
61011
61020
  var UserRetryEvent = class {
@@ -61149,12 +61158,18 @@ var ApiCancelEvent = class {
61149
61158
  model;
61150
61159
  prompt_id;
61151
61160
  auth_type;
61152
- constructor(model, prompt_id, auth_type) {
61161
+ // Pending self-paced /loop wakeups dropped by this abort, when any. Lets a
61162
+ // user abort that ends a loop be told apart from an ordinary cancellation.
61163
+ // Named for wakeups (not "loops") to avoid colliding with loop_type, the
61164
+ // unrelated repetition-detection vocabulary in this file.
61165
+ loop_wakeups_cancelled;
61166
+ constructor(model, prompt_id, auth_type, loop_wakeups_cancelled) {
61153
61167
  this["event.name"] = "api_cancel";
61154
61168
  this["event.timestamp"] = (/* @__PURE__ */ new Date()).toISOString();
61155
61169
  this.model = model;
61156
61170
  this.prompt_id = prompt_id;
61157
61171
  this.auth_type = auth_type;
61172
+ this.loop_wakeups_cancelled = loop_wakeups_cancelled;
61158
61173
  }
61159
61174
  };
61160
61175
  var ApiResponseEvent = class {
@@ -61235,9 +61250,11 @@ var LoopType = /* @__PURE__ */ ((LoopType2) => {
61235
61250
  LoopType2["REPETITIVE_THOUGHTS"] = "repetitive_thoughts";
61236
61251
  LoopType2["READ_FILE_LOOP"] = "read_file_loop";
61237
61252
  LoopType2["ACTION_STAGNATION"] = "action_stagnation";
61253
+ LoopType2["SHELL_COMMAND_STAGNATION"] = "shell_command_stagnation";
61238
61254
  LoopType2["GLOBAL_TOOL_CALL_DUPLICATE"] = "global_tool_call_duplicate";
61239
61255
  LoopType2["ALTERNATING_TOOL_CALL_PATTERN"] = "alternating_tool_call_pattern";
61240
61256
  LoopType2["TURN_TOOL_CALL_CAP"] = "turn_tool_call_cap";
61257
+ LoopType2["INVALID_TOOL_PARAMS_STAGNATION"] = "invalid_tool_params_stagnation";
61241
61258
  return LoopType2;
61242
61259
  })(LoopType || {});
61243
61260
  var LoopDetectedEvent = class {
@@ -62696,22 +62713,21 @@ function convertOpenAITextToParts(text, requestContext, final = true) {
62696
62713
  return parseTaggedThinkingText(text);
62697
62714
  }
62698
62715
  __name(convertOpenAITextToParts, "convertOpenAITextToParts");
62716
+ function hasThoughtPart(parts) {
62717
+ return parts.some((part) => part.thought === true);
62718
+ }
62719
+ __name(hasThoughtPart, "hasThoughtPart");
62699
62720
  function convertOpenAIResponseToGemini(openaiResponse, requestContext) {
62700
62721
  const choice = openaiResponse.choices?.[0];
62701
62722
  const response = new GenerateContentResponse();
62702
62723
  if (choice) {
62703
62724
  const parts = [];
62704
- if (!requestContext.responseParsingOptions?.taggedThinkingTags) {
62705
- const reasoningText = choice.message.reasoning_content ?? choice.message.reasoning;
62706
- if (reasoningText) {
62707
- parts.push({ text: reasoningText, thought: true });
62708
- }
62709
- }
62710
- if (choice.message.content) {
62711
- parts.push(
62712
- ...convertOpenAITextToParts(choice.message.content, requestContext)
62713
- );
62725
+ const textParts = choice.message.content ? convertOpenAITextToParts(choice.message.content, requestContext) : [];
62726
+ const reasoningText = choice.message.reasoning_content ?? choice.message.reasoning;
62727
+ if (reasoningText && !hasThoughtPart(textParts)) {
62728
+ parts.push({ text: reasoningText, thought: true });
62714
62729
  }
62730
+ parts.push(...textParts);
62715
62731
  if (choice.message.tool_calls) {
62716
62732
  for (const toolCall of choice.message.tool_calls) {
62717
62733
  if (toolCall.function) {
@@ -62785,22 +62801,8 @@ function convertOpenAIChunkToGemini(chunk, requestContext) {
62785
62801
  }
62786
62802
  if (choice) {
62787
62803
  const parts = [];
62788
- if (!requestContext.responseParsingOptions?.taggedThinkingTags) {
62789
- const reasoningText = choice.delta?.reasoning_content ?? choice.delta?.reasoning;
62790
- if (reasoningText) {
62791
- const normalizedReasoningText = normalizeStreamingTextDelta(
62792
- reasoningText,
62793
- requestContext.reasoningDeltaState ??= {
62794
- emittedText: "",
62795
- emittedLength: 0,
62796
- cumulativeMode: false
62797
- }
62798
- );
62799
- if (normalizedReasoningText) {
62800
- parts.push({ text: normalizedReasoningText, thought: true });
62801
- }
62802
- }
62803
- }
62804
+ let contentParts = [];
62805
+ const reasoningText = choice.delta?.reasoning_content ?? choice.delta?.reasoning;
62804
62806
  if (typeof choice.delta?.content === "string") {
62805
62807
  const normalizedContent = normalizeStreamingTextDelta(
62806
62808
  choice.delta.content,
@@ -62811,17 +62813,72 @@ function convertOpenAIChunkToGemini(chunk, requestContext) {
62811
62813
  }
62812
62814
  );
62813
62815
  if (normalizedContent || choice.finish_reason) {
62814
- parts.push(
62815
- ...convertOpenAITextToParts(
62816
- normalizedContent,
62817
- requestContext,
62818
- Boolean(choice.finish_reason)
62819
- )
62816
+ contentParts = convertOpenAITextToParts(
62817
+ normalizedContent,
62818
+ requestContext,
62819
+ Boolean(choice.finish_reason)
62820
62820
  );
62821
62821
  }
62822
62822
  } else if (choice.finish_reason) {
62823
- parts.push(...convertOpenAITextToParts("", requestContext, true));
62823
+ contentParts = convertOpenAITextToParts("", requestContext, true);
62824
+ }
62825
+ if (hasThoughtPart(contentParts)) {
62826
+ requestContext.hasTaggedThinkingThought = true;
62827
+ requestContext.pendingReasoningText = void 0;
62828
+ debugLogger6.debug(
62829
+ "convertOpenAIChunkToGemini: tagged thinking content emitted a thought; dropping buffered reasoning"
62830
+ );
62831
+ if (requestContext.pendingContentParts?.length) {
62832
+ debugLogger6.debug(
62833
+ `convertOpenAIChunkToGemini: flushing ${requestContext.pendingContentParts.length} buffered content part(s) before tagged content`
62834
+ );
62835
+ parts.push(...requestContext.pendingContentParts);
62836
+ requestContext.pendingContentParts = void 0;
62837
+ }
62824
62838
  }
62839
+ if (reasoningText && (!requestContext.responseParsingOptions?.taggedThinkingTags || !requestContext.hasTaggedThinkingThought)) {
62840
+ const normalizedReasoningText = normalizeStreamingTextDelta(
62841
+ reasoningText,
62842
+ requestContext.reasoningDeltaState ??= {
62843
+ emittedText: "",
62844
+ emittedLength: 0,
62845
+ cumulativeMode: false
62846
+ }
62847
+ );
62848
+ if (normalizedReasoningText && !requestContext.responseParsingOptions?.taggedThinkingTags) {
62849
+ parts.push({ text: normalizedReasoningText, thought: true });
62850
+ } else if (normalizedReasoningText && !requestContext.hasTaggedThinkingThought) {
62851
+ requestContext.pendingReasoningText = (requestContext.pendingReasoningText ?? "") + normalizedReasoningText;
62852
+ debugLogger6.debug(
62853
+ `convertOpenAIChunkToGemini: buffered reasoning text (${requestContext.pendingReasoningText.length} chars) for tagged stream`
62854
+ );
62855
+ }
62856
+ }
62857
+ if (requestContext.responseParsingOptions?.taggedThinkingTags && !requestContext.hasTaggedThinkingThought && requestContext.pendingReasoningText && contentParts.length) {
62858
+ requestContext.pendingContentParts = [
62859
+ ...requestContext.pendingContentParts ?? [],
62860
+ ...contentParts
62861
+ ];
62862
+ debugLogger6.debug(
62863
+ `convertOpenAIChunkToGemini: buffered ${contentParts.length} content part(s) behind pending reasoning`
62864
+ );
62865
+ contentParts = [];
62866
+ }
62867
+ if (choice.finish_reason && requestContext.responseParsingOptions?.taggedThinkingTags && !requestContext.hasTaggedThinkingThought && requestContext.pendingReasoningText) {
62868
+ debugLogger6.debug(
62869
+ "convertOpenAIChunkToGemini: flushing buffered reasoning for tagged stream with no tagged thought"
62870
+ );
62871
+ parts.push({ text: requestContext.pendingReasoningText, thought: true });
62872
+ requestContext.pendingReasoningText = void 0;
62873
+ }
62874
+ if (choice.finish_reason && requestContext.pendingContentParts?.length) {
62875
+ debugLogger6.debug(
62876
+ `convertOpenAIChunkToGemini: flushing ${requestContext.pendingContentParts.length} buffered content part(s) on stream finish`
62877
+ );
62878
+ parts.push(...requestContext.pendingContentParts);
62879
+ requestContext.pendingContentParts = void 0;
62880
+ }
62881
+ parts.push(...contentParts);
62825
62882
  if (choice.delta?.tool_calls) {
62826
62883
  for (const toolCall of choice.delta.tool_calls) {
62827
62884
  const index = toolCall.index ?? 0;
@@ -63103,6 +63160,12 @@ function mergeConsecutiveAssistantMessages(messages) {
63103
63160
  if (combinedToolCalls.length > 0) {
63104
63161
  lastMessage.tool_calls = combinedToolCalls;
63105
63162
  }
63163
+ const lastReasoning = lastMessage.reasoning_content;
63164
+ const currentReasoning = message.reasoning_content;
63165
+ const combinedReasoning = [lastReasoning, currentReasoning].filter(Boolean).join("");
63166
+ if (combinedReasoning) {
63167
+ lastMessage.reasoning_content = combinedReasoning;
63168
+ }
63106
63169
  continue;
63107
63170
  }
63108
63171
  }
@@ -63504,23 +63567,71 @@ import { AsyncLocalStorage as AsyncLocalStorage3 } from "node:async_hooks";
63504
63567
  // packages/core/src/telemetry/detailed-span-attributes.ts
63505
63568
  init_esbuild_shims();
63506
63569
  import { createHash as createHash2 } from "node:crypto";
63507
- var MAX_CONTENT_SIZE = 60 * 1024;
63508
63570
  var SYSTEM_PROMPT_PREVIEW_LENGTH = 500;
63571
+ var SHORT_TRUNCATION_SUFFIX = "...[TRUNCATED]";
63509
63572
  var seenHashes = /* @__PURE__ */ new Set();
63510
- function isEnabled(config) {
63573
+ function areSensitiveSpanAttributesEnabled(config) {
63511
63574
  return isTelemetrySdkInitialized() && config.getTelemetryIncludeSensitiveSpanAttributes();
63512
63575
  }
63513
- __name(isEnabled, "isEnabled");
63514
- function truncateContent(content, maxSize = MAX_CONTENT_SIZE) {
63515
- if (content.length <= maxSize) {
63576
+ __name(areSensitiveSpanAttributesEnabled, "areSensitiveSpanAttributesEnabled");
63577
+ function truncateContent(content, maxSize = DEFAULT_SENSITIVE_SPAN_ATTRIBUTE_MAX_LENGTH, originalLength = content.length) {
63578
+ if (!Number.isSafeInteger(maxSize) || maxSize < 1) {
63579
+ throw new TypeError(
63580
+ `maxSize must be a positive safe integer, got ${String(maxSize)}`
63581
+ );
63582
+ }
63583
+ if (!Number.isSafeInteger(originalLength) || originalLength < 0) {
63584
+ throw new TypeError(
63585
+ `originalLength must be a non-negative safe integer, got ${String(
63586
+ originalLength
63587
+ )}`
63588
+ );
63589
+ }
63590
+ if (originalLength < content.length) {
63591
+ throw new TypeError(
63592
+ `originalLength must be greater than or equal to content length, got ${originalLength} for content length ${content.length}`
63593
+ );
63594
+ }
63595
+ if (originalLength <= maxSize && content.length <= maxSize) {
63516
63596
  return { content, truncated: false };
63517
63597
  }
63598
+ if (originalLength > content.length && content.length <= maxSize) {
63599
+ return { content, truncated: true };
63600
+ }
63601
+ const suffix = `
63602
+
63603
+ [TRUNCATED - Content exceeds configured limit of ${maxSize} characters]`;
63604
+ if (suffix.length >= maxSize) {
63605
+ if (SHORT_TRUNCATION_SUFFIX.length >= maxSize) {
63606
+ return {
63607
+ content: SHORT_TRUNCATION_SUFFIX.slice(0, maxSize),
63608
+ truncated: true
63609
+ };
63610
+ }
63611
+ return {
63612
+ content: content.slice(0, maxSize - SHORT_TRUNCATION_SUFFIX.length) + SHORT_TRUNCATION_SUFFIX,
63613
+ truncated: true
63614
+ };
63615
+ }
63518
63616
  return {
63519
- content: content.slice(0, maxSize) + "\n\n[TRUNCATED - Content exceeds 60KB limit]",
63617
+ content: content.slice(0, maxSize - suffix.length) + suffix,
63520
63618
  truncated: true
63521
63619
  };
63522
63620
  }
63523
63621
  __name(truncateContent, "truncateContent");
63622
+ function getMaxContentSize(config) {
63623
+ return config.getTelemetrySensitiveSpanAttributeMaxLength();
63624
+ }
63625
+ __name(getMaxContentSize, "getMaxContentSize");
63626
+ function truncatePrefixedContent(prefix, content, maxSize) {
63627
+ const prefixedContent = `${prefix}${content}`;
63628
+ const result = truncateContent(prefixedContent, maxSize);
63629
+ return {
63630
+ ...result,
63631
+ originalLength: content.length
63632
+ };
63633
+ }
63634
+ __name(truncatePrefixedContent, "truncatePrefixedContent");
63524
63635
  function shortHash(content) {
63525
63636
  return createHash2("sha256").update(content).digest("hex").slice(0, 12);
63526
63637
  }
@@ -63531,20 +63642,24 @@ function stringifyContentUnion(value) {
63531
63642
  }
63532
63643
  __name(stringifyContentUnion, "stringifyContentUnion");
63533
63644
  function addUserPromptAttributes(config, span, promptText) {
63534
- if (!isEnabled(config) || !promptText) return;
63535
- const { content, truncated } = truncateContent(promptText);
63645
+ if (!areSensitiveSpanAttributesEnabled(config) || !promptText) return;
63646
+ const { content, truncated, originalLength } = truncatePrefixedContent(
63647
+ `[USER PROMPT]
63648
+ `,
63649
+ promptText,
63650
+ getMaxContentSize(config)
63651
+ );
63536
63652
  span.setAttributes({
63537
- new_context: `[USER PROMPT]
63538
- ${content}`,
63653
+ new_context: content,
63539
63654
  ...truncated && {
63540
63655
  new_context_truncated: true,
63541
- new_context_original_length: promptText.length
63656
+ new_context_original_length: originalLength
63542
63657
  }
63543
63658
  });
63544
63659
  }
63545
63660
  __name(addUserPromptAttributes, "addUserPromptAttributes");
63546
63661
  function addSystemPromptAttributes(config, span, systemInstruction) {
63547
- if (!isEnabled(config) || !systemInstruction) return;
63662
+ if (!areSensitiveSpanAttributesEnabled(config) || !systemInstruction) return;
63548
63663
  const text = stringifyContentUnion(systemInstruction);
63549
63664
  if (!text) return;
63550
63665
  const hash = `sp_${shortHash(text)}`;
@@ -63555,7 +63670,10 @@ function addSystemPromptAttributes(config, span, systemInstruction) {
63555
63670
  });
63556
63671
  if (!seenHashes.has(hash)) {
63557
63672
  seenHashes.add(hash);
63558
- const { content, truncated } = truncateContent(text);
63673
+ const { content, truncated } = truncateContent(
63674
+ text,
63675
+ getMaxContentSize(config)
63676
+ );
63559
63677
  span.setAttribute("system_prompt", content);
63560
63678
  if (truncated) {
63561
63679
  span.setAttribute("system_prompt_truncated", true);
@@ -63564,7 +63682,7 @@ function addSystemPromptAttributes(config, span, systemInstruction) {
63564
63682
  }
63565
63683
  __name(addSystemPromptAttributes, "addSystemPromptAttributes");
63566
63684
  function addToolSchemaAttributes(config, span, tools) {
63567
- if (!isEnabled(config) || !tools?.length) return;
63685
+ if (!areSensitiveSpanAttributesEnabled(config) || !tools?.length) return;
63568
63686
  const declarations = [];
63569
63687
  for (const tool of tools) {
63570
63688
  const inner = tool["functionDeclarations"];
@@ -63584,12 +63702,18 @@ function addToolSchemaAttributes(config, span, tools) {
63584
63702
  const hashKey = `tool_${hash}`;
63585
63703
  if (!seenHashes.has(hashKey)) {
63586
63704
  seenHashes.add(hashKey);
63587
- const { content, truncated } = truncateContent(declJson);
63705
+ const { content, truncated } = truncateContent(
63706
+ declJson,
63707
+ getMaxContentSize(config)
63708
+ );
63588
63709
  span.addEvent("tool_schema", {
63589
63710
  tool_name: name,
63590
63711
  tool_hash: hash,
63591
63712
  tool_definition: content,
63592
- ...truncated && { tool_definition_truncated: true }
63713
+ ...truncated && {
63714
+ tool_definition_truncated: true,
63715
+ tool_definition_original_length: declJson.length
63716
+ }
63593
63717
  });
63594
63718
  }
63595
63719
  }
@@ -63599,40 +63723,53 @@ function addToolSchemaAttributes(config, span, tools) {
63599
63723
  });
63600
63724
  }
63601
63725
  __name(addToolSchemaAttributes, "addToolSchemaAttributes");
63602
- function addModelOutputAttributes(config, span, responseText) {
63603
- if (!isEnabled(config) || !responseText) return;
63604
- const { content, truncated } = truncateContent(responseText);
63726
+ function addModelOutputAttributes(config, span, responseText, originalLength) {
63727
+ if (!areSensitiveSpanAttributesEnabled(config) || !responseText) return;
63728
+ const responseTextOriginalLength = originalLength ?? responseText.length;
63729
+ const { content, truncated } = truncateContent(
63730
+ responseText,
63731
+ getMaxContentSize(config),
63732
+ responseTextOriginalLength
63733
+ );
63605
63734
  span.setAttributes({
63606
63735
  "response.model_output": content,
63607
63736
  ...truncated && {
63608
63737
  "response.model_output_truncated": true,
63609
- "response.model_output_original_length": responseText.length
63738
+ "response.model_output_original_length": responseTextOriginalLength
63610
63739
  }
63611
63740
  });
63612
63741
  }
63613
63742
  __name(addModelOutputAttributes, "addModelOutputAttributes");
63614
63743
  function addToolInputAttributes(config, span, toolName, toolInput) {
63615
- if (!isEnabled(config)) return;
63616
- const { content, truncated } = truncateContent(toolInput);
63744
+ if (!areSensitiveSpanAttributesEnabled(config)) return;
63745
+ const { content, truncated, originalLength } = truncatePrefixedContent(
63746
+ `[TOOL INPUT: ${toolName}]
63747
+ `,
63748
+ toolInput,
63749
+ getMaxContentSize(config)
63750
+ );
63617
63751
  span.setAttributes({
63618
- tool_input: `[TOOL INPUT: ${toolName}]
63619
- ${content}`,
63752
+ tool_input: content,
63620
63753
  ...truncated && {
63621
63754
  tool_input_truncated: true,
63622
- tool_input_original_length: toolInput.length
63755
+ tool_input_original_length: originalLength
63623
63756
  }
63624
63757
  });
63625
63758
  }
63626
63759
  __name(addToolInputAttributes, "addToolInputAttributes");
63627
63760
  function addToolResultAttributes(config, span, toolName, toolResult) {
63628
- if (!isEnabled(config)) return;
63629
- const { content, truncated } = truncateContent(toolResult);
63761
+ if (!areSensitiveSpanAttributesEnabled(config)) return;
63762
+ const { content, truncated, originalLength } = truncatePrefixedContent(
63763
+ `[TOOL RESULT: ${toolName}]
63764
+ `,
63765
+ toolResult,
63766
+ getMaxContentSize(config)
63767
+ );
63630
63768
  span.setAttributes({
63631
- tool_result: `[TOOL RESULT: ${toolName}]
63632
- ${content}`,
63769
+ tool_result: content,
63633
63770
  ...truncated && {
63634
63771
  tool_result_truncated: true,
63635
- tool_result_original_length: toolResult.length
63772
+ tool_result_original_length: originalLength
63636
63773
  }
63637
63774
  });
63638
63775
  }
@@ -64017,6 +64154,34 @@ function endLLMRequestSpan(span, metadata) {
64017
64154
  }
64018
64155
  }
64019
64156
  spanCtx.span.setAttributes(endAttributes);
64157
+ try {
64158
+ if (metadata?.config && metadata.success) {
64159
+ const model = String(spanCtx.attributes["qwen-code.model"] ?? "");
64160
+ if (metadata.requestSetupMs !== void 0) {
64161
+ recordApiRequestBreakdown(metadata.config, metadata.requestSetupMs, {
64162
+ model,
64163
+ phase: "request_preparation" /* REQUEST_PREPARATION */
64164
+ });
64165
+ }
64166
+ if (metadata.ttftMs !== void 0) {
64167
+ recordApiRequestBreakdown(metadata.config, metadata.ttftMs, {
64168
+ model,
64169
+ phase: "network_latency" /* NETWORK_LATENCY */
64170
+ });
64171
+ }
64172
+ const breakdownSamplingMs = metadata.ttftMs !== void 0 ? Math.max(0, duration - metadata.ttftMs) : void 0;
64173
+ if (breakdownSamplingMs !== void 0 && breakdownSamplingMs > 0) {
64174
+ recordApiRequestBreakdown(metadata.config, breakdownSamplingMs, {
64175
+ model,
64176
+ phase: "response_processing" /* RESPONSE_PROCESSING */
64177
+ });
64178
+ }
64179
+ }
64180
+ } catch (error) {
64181
+ debugLogger8.warn(
64182
+ `Failed to record API request breakdown histogram: ${error instanceof Error ? error.message : String(error)}`
64183
+ );
64184
+ }
64020
64185
  if (metadata === void 0 || metadata.success) {
64021
64186
  spanCtx.span.setStatus({ code: SpanStatusCode.OK });
64022
64187
  } else {
@@ -65416,6 +65581,30 @@ function parseTelemetryTargetValue(value) {
65416
65581
  return void 0;
65417
65582
  }
65418
65583
  __name(parseTelemetryTargetValue, "parseTelemetryTargetValue");
65584
+ function parseSensitiveSpanAttributeMaxLengthEnvValue(envName, value) {
65585
+ if (value === void 0) return void 0;
65586
+ const trimmed = value.trim();
65587
+ const parsed = Number(trimmed);
65588
+ if (!/^\d+$/.test(trimmed) || !isValidSensitiveSpanAttributeMaxLength(parsed)) {
65589
+ throw new FatalConfigError(
65590
+ `Invalid ${envName}: must be a positive integer no greater than ${SENSITIVE_SPAN_ATTRIBUTE_MAX_LENGTH_LIMIT}, got '${value}'`
65591
+ );
65592
+ }
65593
+ return parsed;
65594
+ }
65595
+ __name(parseSensitiveSpanAttributeMaxLengthEnvValue, "parseSensitiveSpanAttributeMaxLengthEnvValue");
65596
+ function parseSensitiveSpanAttributeMaxLengthSetting(settingName, value) {
65597
+ if (value === void 0) return void 0;
65598
+ if (typeof value !== "number" || !isValidSensitiveSpanAttributeMaxLength(value)) {
65599
+ throw new FatalConfigError(
65600
+ `Invalid ${settingName}: must be a positive integer no greater than ${SENSITIVE_SPAN_ATTRIBUTE_MAX_LENGTH_LIMIT}, got ${String(
65601
+ value
65602
+ )}`
65603
+ );
65604
+ }
65605
+ return value;
65606
+ }
65607
+ __name(parseSensitiveSpanAttributeMaxLengthSetting, "parseSensitiveSpanAttributeMaxLengthSetting");
65419
65608
  async function resolveTelemetrySettings(options) {
65420
65609
  const argv = options.argv ?? {};
65421
65610
  const env = options.env ?? {};
@@ -65446,6 +65635,13 @@ async function resolveTelemetrySettings(options) {
65446
65635
  const includeSensitiveSpanAttributes = parseBooleanEnvFlag(
65447
65636
  env["QWEN_TELEMETRY_INCLUDE_SENSITIVE_SPAN_ATTRIBUTES"]
65448
65637
  ) ?? settings.includeSensitiveSpanAttributes ?? false;
65638
+ const sensitiveSpanAttributeMaxLength = parseSensitiveSpanAttributeMaxLengthEnvValue(
65639
+ "QWEN_TELEMETRY_SENSITIVE_SPAN_ATTRIBUTE_MAX_LENGTH",
65640
+ env["QWEN_TELEMETRY_SENSITIVE_SPAN_ATTRIBUTE_MAX_LENGTH"]
65641
+ ) ?? parseSensitiveSpanAttributeMaxLengthSetting(
65642
+ "telemetry.sensitiveSpanAttributeMaxLength",
65643
+ settings.sensitiveSpanAttributeMaxLength
65644
+ ) ?? DEFAULT_SENSITIVE_SPAN_ATTRIBUTE_MAX_LENGTH;
65449
65645
  const outfile = argv.telemetryOutfile ?? env["QWEN_TELEMETRY_OUTFILE"] ?? settings.outfile;
65450
65646
  const otlpTracesEndpoint = env["QWEN_TELEMETRY_OTLP_TRACES_ENDPOINT"] ?? env["OTEL_EXPORTER_OTLP_TRACES_ENDPOINT"] ?? settings.otlpTracesEndpoint;
65451
65647
  const otlpLogsEndpoint = env["QWEN_TELEMETRY_OTLP_LOGS_ENDPOINT"] ?? env["OTEL_EXPORTER_OTLP_LOGS_ENDPOINT"] ?? settings.otlpLogsEndpoint;
@@ -65487,6 +65683,7 @@ async function resolveTelemetrySettings(options) {
65487
65683
  otlpMetricsEndpoint,
65488
65684
  logPrompts,
65489
65685
  includeSensitiveSpanAttributes,
65686
+ sensitiveSpanAttributeMaxLength,
65490
65687
  outfile,
65491
65688
  resourceAttributes,
65492
65689
  metrics: { includeSessionId: metricsIncludeSessionId },
@@ -65520,6 +65717,12 @@ var createInitialModelMetrics = /* @__PURE__ */ __name(() => ({
65520
65717
  ...createInitialModelMetricsCore(),
65521
65718
  bySource: /* @__PURE__ */ Object.create(null)
65522
65719
  }), "createInitialModelMetrics");
65720
+ var createInitialSkillMetrics = /* @__PURE__ */ __name(() => ({
65721
+ totalCalls: 0,
65722
+ totalSuccess: 0,
65723
+ totalFail: 0,
65724
+ byName: {}
65725
+ }), "createInitialSkillMetrics");
65523
65726
  var createInitialMetrics = /* @__PURE__ */ __name(() => ({
65524
65727
  models: {},
65525
65728
  tools: {
@@ -65538,7 +65741,8 @@ var createInitialMetrics = /* @__PURE__ */ __name(() => ({
65538
65741
  files: {
65539
65742
  totalLinesAdded: 0,
65540
65743
  totalLinesRemoved: 0
65541
- }
65744
+ },
65745
+ skills: createInitialSkillMetrics()
65542
65746
  }), "createInitialMetrics");
65543
65747
  var UiTelemetryService = class _UiTelemetryService extends EventEmitter {
65544
65748
  static {
@@ -65570,6 +65774,23 @@ var UiTelemetryService = class _UiTelemetryService extends EventEmitter {
65570
65774
  getMetricsForSession(sessionId) {
65571
65775
  return this.#sessionMetrics.get(sessionId) ?? createInitialMetrics();
65572
65776
  }
65777
+ recordSkillInvocation(skillName, success, sessionId) {
65778
+ this.#accumulateSkillInvocation(this.#metrics, skillName, success);
65779
+ if (sessionId && !this.#closedSessions.has(sessionId)) {
65780
+ if (!this.#sessionMetrics.has(sessionId)) {
65781
+ this.#sessionMetrics.set(sessionId, createInitialMetrics());
65782
+ }
65783
+ this.#accumulateSkillInvocation(
65784
+ this.#sessionMetrics.get(sessionId),
65785
+ skillName,
65786
+ success
65787
+ );
65788
+ }
65789
+ this.emit("update", {
65790
+ metrics: this.#metrics,
65791
+ lastPromptTokenCount: this.#lastPromptTokenCount
65792
+ });
65793
+ }
65573
65794
  getLastPromptTokenCount() {
65574
65795
  return this.#lastPromptTokenCount;
65575
65796
  }
@@ -65703,6 +65924,38 @@ var UiTelemetryService = class _UiTelemetryService extends EventEmitter {
65703
65924
  }
65704
65925
  }
65705
65926
  }
65927
+ #accumulateSkillInvocation(metrics2, skillName, success) {
65928
+ const skills = metrics2.skills ?? createInitialSkillMetrics();
65929
+ metrics2.skills = skills;
65930
+ skills.totalCalls++;
65931
+ if (success) {
65932
+ skills.totalSuccess++;
65933
+ } else {
65934
+ skills.totalFail++;
65935
+ }
65936
+ if (!Object.prototype.hasOwnProperty.call(skills.byName, skillName)) {
65937
+ Object.defineProperty(skills.byName, skillName, {
65938
+ value: {
65939
+ count: 0,
65940
+ success: 0,
65941
+ fail: 0
65942
+ },
65943
+ enumerable: true,
65944
+ configurable: true,
65945
+ writable: true
65946
+ });
65947
+ }
65948
+ const skillStats = skills.byName[skillName];
65949
+ if (!skillStats) {
65950
+ return;
65951
+ }
65952
+ skillStats.count++;
65953
+ if (success) {
65954
+ skillStats.success++;
65955
+ } else {
65956
+ skillStats.fail++;
65957
+ }
65958
+ }
65706
65959
  #getOrCreateModelMetrics(metrics2, modelName) {
65707
65960
  if (!metrics2.models[modelName]) {
65708
65961
  metrics2.models[modelName] = createInitialModelMetrics();
@@ -66220,7 +66473,6 @@ __name(snapshotRetryMetadata, "snapshotRetryMetadata");
66220
66473
  var debugLogger10 = createDebugLogger("LOGGING_CONTENT_GENERATOR");
66221
66474
  var MAX_RESPONSE_TEXT_LENGTH = 4096;
66222
66475
  var RESPONSE_TEXT_TRUNCATION_SUFFIX = "...[truncated]";
66223
- var MAX_RESPONSE_TEXT_PREFIX_LENGTH = MAX_RESPONSE_TEXT_LENGTH - RESPONSE_TEXT_TRUNCATION_SUFFIX.length;
66224
66476
  var LoggingContentGenerator = class {
66225
66477
  constructor(wrapped, config, generatorConfig) {
66226
66478
  this.wrapped = wrapped;
@@ -66357,9 +66609,14 @@ var LoggingContentGenerator = class {
66357
66609
  () => this.wrapped.generateContent(req, userPromptId)
66358
66610
  );
66359
66611
  const durationMs = Date.now() - startTime;
66360
- const responseText = isInternal ? void 0 : this.extractResponseText(result);
66361
- if (!isInternal) {
66362
- addModelOutputAttributes(this.config, llmSpan, responseText);
66612
+ const shouldCollectSensitiveSpanAttributes = !isInternal && this.shouldCollectSensitiveSpanAttributes();
66613
+ const modelOutput = shouldCollectSensitiveSpanAttributes ? this.extractResponseTextForSensitiveSpan(
66614
+ result,
66615
+ this.config.getTelemetrySensitiveSpanAttributeMaxLength()
66616
+ ) : void 0;
66617
+ const responseText = isInternal ? void 0 : this.extractResponseText(result, MAX_RESPONSE_TEXT_LENGTH);
66618
+ if (shouldCollectSensitiveSpanAttributes) {
66619
+ this.safelyAddModelOutputAttributes(llmSpan, modelOutput);
66363
66620
  }
66364
66621
  this.safelyLogApiResponse(
66365
66622
  result.responseId ?? "",
@@ -66391,7 +66648,8 @@ var LoggingContentGenerator = class {
66391
66648
  finishReason: response.candidates?.[0]?.finishReason || void 0,
66392
66649
  thoughtsTokenCount: response.usageMetadata?.thoughtsTokenCount,
66393
66650
  subagentName: subagentNameContext.getStore() || void 0,
66394
- ...retrySnapshot
66651
+ ...retrySnapshot,
66652
+ config: this.config
66395
66653
  });
66396
66654
  return response;
66397
66655
  } catch (error) {
@@ -66404,7 +66662,8 @@ var LoggingContentGenerator = class {
66404
66662
  errorType: getErrorType(error),
66405
66663
  errorStatusCode: getErrorStatus(error),
66406
66664
  subagentName: subagentNameContext.getStore() || void 0,
66407
- ...retrySnapshot
66665
+ ...retrySnapshot,
66666
+ config: this.config
66408
66667
  });
66409
66668
  await context.with(spanContext, async () => {
66410
66669
  this.safelyLogApiError("", durationMs, error, req.model, userPromptId);
@@ -66477,7 +66736,8 @@ var LoggingContentGenerator = class {
66477
66736
  errorType: getErrorType(error),
66478
66737
  errorStatusCode: getErrorStatus(error),
66479
66738
  subagentName: subagentNameContext.getStore() || void 0,
66480
- ...retrySnapshot
66739
+ ...retrySnapshot,
66740
+ config: this.config
66481
66741
  });
66482
66742
  try {
66483
66743
  await this.safelyLogOpenAIInteraction(
@@ -66554,7 +66814,8 @@ var LoggingContentGenerator = class {
66554
66814
  error: "Stream span timed out (idle)",
66555
66815
  responseId: firstResponseId || void 0,
66556
66816
  subagentName: subagentName || void 0,
66557
- ...retrySnapshot
66817
+ ...retrySnapshot,
66818
+ config: this.config
66558
66819
  });
66559
66820
  spanEndedByTimeout = true;
66560
66821
  }, STREAM_IDLE_TIMEOUT_MS);
@@ -66591,7 +66852,15 @@ var LoggingContentGenerator = class {
66591
66852
  }
66592
66853
  const durationMs = Date.now() - startTime;
66593
66854
  const consolidatedResponse = shouldCollectResponses ? this.consolidateGeminiResponsesForLogging(responses) : void 0;
66594
- const streamResponseText = isInternal ? void 0 : this.extractResponseText(consolidatedResponse);
66855
+ const shouldCollectSensitiveSpanAttributes = !isInternal && span !== void 0 && this.shouldCollectSensitiveSpanAttributes();
66856
+ const streamModelOutput = shouldCollectSensitiveSpanAttributes ? this.extractResponseTextForSensitiveSpan(
66857
+ consolidatedResponse,
66858
+ this.config.getTelemetrySensitiveSpanAttributeMaxLength()
66859
+ ) : void 0;
66860
+ const streamResponseText = isInternal ? void 0 : this.extractResponseText(
66861
+ consolidatedResponse,
66862
+ MAX_RESPONSE_TEXT_LENGTH
66863
+ );
66595
66864
  if (!spanEndedByTimeout) {
66596
66865
  runInSpan(
66597
66866
  () => this.safelyLogApiResponse(
@@ -66603,8 +66872,8 @@ var LoggingContentGenerator = class {
66603
66872
  streamResponseText
66604
66873
  )
66605
66874
  );
66606
- if (!isInternal && span) {
66607
- addModelOutputAttributes(this.config, span, streamResponseText);
66875
+ if (shouldCollectSensitiveSpanAttributes && span) {
66876
+ this.safelyAddModelOutputAttributes(span, streamModelOutput);
66608
66877
  }
66609
66878
  await runInSpan(
66610
66879
  () => this.safelyLogOpenAIInteraction(
@@ -66659,7 +66928,8 @@ var LoggingContentGenerator = class {
66659
66928
  subagentName: subagentName || void 0,
66660
66929
  errorType: lastError ? getErrorType(lastError) : void 0,
66661
66930
  errorStatusCode: lastError ? getErrorStatus(lastError) : void 0,
66662
- ...retrySnapshot
66931
+ ...retrySnapshot,
66932
+ config: this.config
66663
66933
  });
66664
66934
  }
66665
66935
  }
@@ -66812,40 +67082,84 @@ var LoggingContentGenerator = class {
66812
67082
  ];
66813
67083
  return consolidated;
66814
67084
  }
66815
- extractResponseText(response) {
66816
- const parts = response?.candidates?.[0]?.content?.parts;
66817
- if (!parts?.length) {
66818
- return void 0;
66819
- }
67085
+ extractResponseText(response, maxLength) {
66820
67086
  let text = "";
66821
- let hasText = false;
66822
67087
  let truncated = false;
66823
- const appendText = /* @__PURE__ */ __name((partText) => {
66824
- hasText = true;
67088
+ const maxPrefixLength = Math.max(
67089
+ 0,
67090
+ maxLength - RESPONSE_TEXT_TRUNCATION_SUFFIX.length
67091
+ );
67092
+ const hasText = this.forEachVisibleResponseText(response, (partText) => {
66825
67093
  if (truncated) {
66826
67094
  return;
66827
67095
  }
66828
- const remaining = MAX_RESPONSE_TEXT_PREFIX_LENGTH - text.length;
67096
+ const remaining = maxPrefixLength - text.length;
66829
67097
  if (partText.length <= remaining) {
66830
67098
  text += partText;
66831
67099
  return;
66832
67100
  }
66833
67101
  text += partText.slice(0, Math.max(0, remaining));
66834
67102
  truncated = true;
66835
- }, "appendText");
67103
+ });
67104
+ if (!hasText) {
67105
+ return void 0;
67106
+ }
67107
+ return truncated ? `${text}${RESPONSE_TEXT_TRUNCATION_SUFFIX}` : text;
67108
+ }
67109
+ extractResponseTextForSensitiveSpan(response, maxLength) {
67110
+ let text = "";
67111
+ let originalLength = 0;
67112
+ const hasText = this.forEachVisibleResponseText(response, (partText) => {
67113
+ originalLength += partText.length;
67114
+ const remaining = maxLength - text.length;
67115
+ if (remaining > 0) {
67116
+ text += partText.slice(0, remaining);
67117
+ }
67118
+ });
67119
+ if (!hasText) {
67120
+ return void 0;
67121
+ }
67122
+ return { text, originalLength };
67123
+ }
67124
+ forEachVisibleResponseText(response, onText) {
67125
+ const parts = response?.candidates?.[0]?.content?.parts;
67126
+ if (!parts?.length) {
67127
+ return false;
67128
+ }
67129
+ let hasText = false;
66836
67130
  for (const part of parts) {
66837
- if (typeof part === "string") {
66838
- appendText(part);
67131
+ const text = this.getVisibleResponsePartText(part);
67132
+ if (text === void 0) {
66839
67133
  continue;
66840
67134
  }
66841
- if ("text" in part && typeof part.text === "string" && !("thought" in part && part.thought)) {
66842
- appendText(part.text);
66843
- }
67135
+ hasText = true;
67136
+ onText(text);
66844
67137
  }
66845
- if (!hasText) {
66846
- return void 0;
67138
+ return hasText;
67139
+ }
67140
+ getVisibleResponsePartText(part) {
67141
+ if (typeof part === "string") {
67142
+ return part;
66847
67143
  }
66848
- return truncated ? `${text}${RESPONSE_TEXT_TRUNCATION_SUFFIX}` : text;
67144
+ if ("text" in part && typeof part.text === "string" && !("thought" in part && part.thought)) {
67145
+ return part.text;
67146
+ }
67147
+ return void 0;
67148
+ }
67149
+ safelyAddModelOutputAttributes(span, modelOutput) {
67150
+ try {
67151
+ addModelOutputAttributes(
67152
+ this.config,
67153
+ span,
67154
+ modelOutput?.text,
67155
+ modelOutput?.originalLength
67156
+ );
67157
+ } catch (error) {
67158
+ debugLogger10.warn("Failed to add model output span attributes:", error);
67159
+ }
67160
+ }
67161
+ shouldCollectSensitiveSpanAttributes() {
67162
+ return areSensitiveSpanAttributesEnabled(this.config);
66849
67163
  }
66850
67164
  async countTokens(req) {
66851
67165
  return this.wrapped.countTokens(req);
@@ -67227,11 +67541,11 @@ async function createContentGenerator(generatorConfig, config, isInitialAuth) {
67227
67541
  let baseGenerator;
67228
67542
  try {
67229
67543
  if (authType === "openai" /* USE_OPENAI */) {
67230
- const { createOpenAIContentGenerator } = await import("./openaiContentGenerator-F74IPQ6E.js");
67544
+ const { createOpenAIContentGenerator } = await import("./openaiContentGenerator-ORZZ7VFO.js");
67231
67545
  baseGenerator = createOpenAIContentGenerator(generatorConfig, config);
67232
67546
  } else if (authType === "qwen-oauth" /* QWEN_OAUTH */) {
67233
- const { getQwenOAuthClient: getQwenOauthClient } = await import("./qwenOAuth2-K4AASPCV.js");
67234
- const { QwenContentGenerator } = await import("./qwenContentGenerator-ATTK5P4D.js");
67547
+ const { getQwenOAuthClient: getQwenOauthClient } = await import("./qwenOAuth2-OI2B7PES.js");
67548
+ const { QwenContentGenerator } = await import("./qwenContentGenerator-H643PL2G.js");
67235
67549
  try {
67236
67550
  const qwenClient = await getQwenOauthClient(
67237
67551
  config,
@@ -67249,10 +67563,10 @@ async function createContentGenerator(generatorConfig, config, isInitialAuth) {
67249
67563
  throw new Error(error instanceof Error ? error.message : String(error));
67250
67564
  }
67251
67565
  } else if (authType === "anthropic" /* USE_ANTHROPIC */) {
67252
- const { createAnthropicContentGenerator } = await import("./anthropicContentGenerator-E3TQ5XJJ.js");
67566
+ const { createAnthropicContentGenerator } = await import("./anthropicContentGenerator-CA3JTAMO.js");
67253
67567
  baseGenerator = createAnthropicContentGenerator(generatorConfig, config);
67254
67568
  } else if (authType === "gemini" /* USE_GEMINI */ || authType === "vertex-ai" /* USE_VERTEX_AI */) {
67255
- const { createGeminiContentGenerator } = await import("./geminiContentGenerator-XTG6SFLA.js");
67569
+ const { createGeminiContentGenerator } = await import("./geminiContentGenerator-7NIFF2L4.js");
67256
67570
  baseGenerator = createGeminiContentGenerator(generatorConfig, config);
67257
67571
  } else {
67258
67572
  throw new Error(
@@ -67560,7 +67874,8 @@ var QwenLogger = class _QwenLogger {
67560
67874
  const rumEvent = this.createActionEvent("user", "new_prompt", {
67561
67875
  properties: {
67562
67876
  prompt_id: event.prompt_id,
67563
- prompt_length: event.prompt_length
67877
+ prompt_length: event.prompt_length,
67878
+ ...event.model ? { model: event.model } : {}
67564
67879
  }
67565
67880
  });
67566
67881
  this.enqueueLogEvent(rumEvent);
@@ -67701,7 +68016,8 @@ var QwenLogger = class _QwenLogger {
67701
68016
  properties: {
67702
68017
  model: event.model,
67703
68018
  prompt_id: event.prompt_id,
67704
- auth_type: event.auth_type
68019
+ auth_type: event.auth_type,
68020
+ loop_wakeups_cancelled: event.loop_wakeups_cancelled
67705
68021
  }
67706
68022
  });
67707
68023
  this.enqueueLogEvent(rumEvent);
@@ -68774,6 +69090,9 @@ function logUserPrompt(config, event) {
68774
69090
  if (event.auth_type) {
68775
69091
  attributes["auth_type"] = event.auth_type;
68776
69092
  }
69093
+ if (event.model) {
69094
+ attributes["model"] = event.model;
69095
+ }
68777
69096
  if (shouldLogUserPrompts(config)) {
68778
69097
  attributes["prompt"] = event.prompt;
68779
69098
  }
@@ -68847,7 +69166,9 @@ function logToolOutputTruncated(config, event) {
68847
69166
  const attributes = {
68848
69167
  ...getCommonAttributes(config),
68849
69168
  ...event,
68850
- "event.name": "tool_output_truncated",
69169
+ // event class's `eventName` (short, no prefix) leaks via spread — override with
69170
+ // full namespaced constant for OTel compliance. Same pattern as other event loggers.
69171
+ "event.name": EVENT_TOOL_OUTPUT_TRUNCATED,
68851
69172
  "event.timestamp": (/* @__PURE__ */ new Date()).toISOString()
68852
69173
  };
68853
69174
  const logger = import_api_logs2.logs.getLogger(SERVICE_NAME);
@@ -69411,6 +69732,14 @@ function logSkillLaunch(config, event) {
69411
69732
  logger.emit(logRecord);
69412
69733
  }
69413
69734
  __name(logSkillLaunch, "logSkillLaunch");
69735
+ function recordSkillInvocation(config, event) {
69736
+ uiTelemetryService.recordSkillInvocation(
69737
+ event.skillName,
69738
+ event.success,
69739
+ config.getSessionId()
69740
+ );
69741
+ }
69742
+ __name(recordSkillInvocation, "recordSkillInvocation");
69414
69743
  function logUserFeedback(config, event) {
69415
69744
  const uiEvent = {
69416
69745
  ...event,
@@ -69737,8 +70066,8 @@ var ReadFileToolInvocation = class extends BaseToolInvocation {
69737
70066
  return [{ path: this.params.file_path, line: this.params.offset }];
69738
70067
  }
69739
70068
  /**
69740
- * Returns 'ask' for paths outside the workspace/temp/userSkills directories,
69741
- * so that external file reads require user confirmation.
70069
+ * Returns 'ask' for paths outside the workspace/qwen-managed temp/userSkills
70070
+ * directories, so that external file reads require user confirmation.
69742
70071
  */
69743
70072
  async getDefaultPermission() {
69744
70073
  const filePath = path10.resolve(this.params.file_path);
@@ -69749,7 +70078,6 @@ var ReadFileToolInvocation = class extends BaseToolInvocation {
69749
70078
  // are advertised to the model as polling targets via read_file.
69750
70079
  path10.join(this.config.storage.getProjectDir(), "subagents"),
69751
70080
  Storage.getGlobalTempDir(),
69752
- os4.tmpdir(),
69753
70081
  ...this.config.storage.getUserSkillsDirs(),
69754
70082
  Storage.getUserExtensionsDir()
69755
70083
  ];
@@ -69989,6 +70317,9 @@ export {
69989
70317
  EVENT_TOOL_CALL,
69990
70318
  EVENT_API_ERROR,
69991
70319
  EVENT_API_RESPONSE,
70320
+ DEFAULT_SENSITIVE_SPAN_ATTRIBUTE_MAX_LENGTH,
70321
+ SENSITIVE_SPAN_ATTRIBUTE_MAX_LENGTH_LIMIT,
70322
+ isValidSensitiveSpanAttributeMaxLength,
69992
70323
  MAIN_SOURCE,
69993
70324
  subagentNameContext,
69994
70325
  UiTelemetryService,
@@ -70081,6 +70412,7 @@ export {
70081
70412
  SemanticAttributes,
70082
70413
  sanitizeHookName,
70083
70414
  QwenLogger,
70415
+ areSensitiveSpanAttributesEnabled,
70084
70416
  truncateContent,
70085
70417
  addUserPromptAttributes,
70086
70418
  addSystemPromptAttributes,
@@ -70165,6 +70497,7 @@ export {
70165
70497
  logExtensionDisable,
70166
70498
  logAuth,
70167
70499
  logSkillLaunch,
70500
+ recordSkillInvocation,
70168
70501
  logUserFeedback,
70169
70502
  logArenaSessionStarted,
70170
70503
  logArenaAgentCompleted,