@qwen-code/qwen-code 0.21.6-preview.0 → 0.21.7

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 (309) hide show
  1. package/bundled/qc-helper/docs/configuration/settings.md +19 -9
  2. package/bundled/qc-helper/docs/features/channels/dingtalk.md +1 -1
  3. package/bundled/qc-helper/docs/features/channels/github.md +31 -19
  4. package/bundled/qc-helper/docs/features/code-review.md +30 -1
  5. package/bundled/qc-helper/docs/qwen-serve.md +1 -1
  6. package/bundled/review/SKILL.md +59 -22
  7. package/chunks/{MaxSizedBox-A3UYJS6B.js → MaxSizedBox-ANWZBPTS.js} +38 -38
  8. package/chunks/{StandaloneSessionPicker-NGLY26I4.js → StandaloneSessionPicker-XKS3VU3A.js} +56 -55
  9. package/chunks/{acp-startup-profiler-3RICG2YW.js → acp-startup-profiler-ORIQ2CCQ.js} +2 -2
  10. package/chunks/{acpAgent-V54T2EEL.js → acpAgent-KUAZ3GCZ.js} +1091 -150
  11. package/chunks/{agent-2P53VL2L.js → agent-T6PTGX5R.js} +35 -35
  12. package/chunks/{agent-headless-6X4GCFRD.js → agent-headless-PR7YCB7S.js} +35 -35
  13. package/chunks/{anthropicContentGenerator-3CAHEZBM.js → anthropicContentGenerator-DTMVEL5M.js} +7 -7
  14. package/chunks/{artifact-tool-RROCCJDA.js → artifact-tool-U4VOZIK5.js} +2 -2
  15. package/chunks/{askUserQuestion-2EPPBPUZ.js → askUserQuestion-XOBQLPFA.js} +2 -2
  16. package/chunks/{bridge-TCFMLKHR.js → bridge-NU6YEEHK.js} +41 -41
  17. package/chunks/{channel-management-service-5XPPTWUQ.js → channel-management-service-FSQ7SHYI.js} +1 -1
  18. package/chunks/{channel-settings-store-B4HNMNQV.js → channel-settings-store-35VQVUVV.js} +42 -42
  19. package/chunks/{channel-worker-group-SVGPDH2C.js → channel-worker-group-JWQK224X.js} +5 -5
  20. package/chunks/{channel-worker-manager-72ZK2GTS.js → channel-worker-manager-77E3OXRQ.js} +5 -5
  21. package/chunks/{channel-worker-supervisor-NUEDVHX4.js → channel-worker-supervisor-62YWUGP2.js} +3 -3
  22. package/chunks/{chunk-XC656O42.js → chunk-22NBYCPD.js} +3 -3
  23. package/chunks/{chunk-WXS647W5.js → chunk-23RZCH76.js} +3 -3
  24. package/chunks/{chunk-O656RSMC.js → chunk-2U3WZGZG.js} +18 -10
  25. package/chunks/chunk-2VSTGY6M.js +107 -0
  26. package/chunks/{chunk-AU3XNTMV.js → chunk-33ACCIIY.js} +3 -3
  27. package/chunks/{chunk-MBEMTXQT.js → chunk-3K7FH2KQ.js} +1 -32
  28. package/chunks/{chunk-CJBRIJ7W.js → chunk-3NB7TSE2.js} +3 -3
  29. package/chunks/{chunk-QYPT3QUD.js → chunk-3ULCB3NE.js} +3 -3
  30. package/chunks/{chunk-7FUVSN4D.js → chunk-55LYDVPU.js} +1 -1
  31. package/chunks/{chunk-3ZRS2XNY.js → chunk-5KH532V7.js} +1 -1
  32. package/chunks/{chunk-P7LKADIT.js → chunk-6EOI4HOK.js} +7 -7
  33. package/chunks/{chunk-X6DV3WKN.js → chunk-6GONZVLS.js} +1 -1
  34. package/chunks/{chunk-T4XY5CT4.js → chunk-6HVUFDS2.js} +7 -7
  35. package/chunks/{chunk-5L6CQ4ZU.js → chunk-6M26GBKX.js} +2 -2
  36. package/chunks/{chunk-SPUDIAHX.js → chunk-6UWFTUQL.js} +530 -388
  37. package/chunks/{chunk-EKWNNQQD.js → chunk-6XJMFJ4D.js} +16 -10
  38. package/chunks/{chunk-72DZPDH4.js → chunk-6XU3PH66.js} +10 -5
  39. package/chunks/{chunk-WIPQR44Y.js → chunk-72LNFGUY.js} +3 -3
  40. package/chunks/{chunk-33FNCQSY.js → chunk-7MH4J33A.js} +2 -2
  41. package/chunks/{chunk-2AGOQ7QO.js → chunk-7UFKAV7Y.js} +118 -6
  42. package/chunks/{chunk-HKNSU4WX.js → chunk-AE77C5ZU.js} +198 -35
  43. package/chunks/{chunk-JELIWHXD.js → chunk-AOHJKPKL.js} +1 -1
  44. package/chunks/{chunk-GLNBDYUX.js → chunk-AXMWHKXA.js} +6 -2
  45. package/chunks/{chunk-H36SETQS.js → chunk-B2GJNDTV.js} +1 -1
  46. package/chunks/{chunk-QMBEW7EW.js → chunk-BGG4MBYD.js} +2 -2
  47. package/chunks/{chunk-QL4TN4HS.js → chunk-BRVWYMKV.js} +1 -1
  48. package/chunks/{chunk-6WBWIPBF.js → chunk-BVWVWGLE.js} +2 -2
  49. package/chunks/{chunk-WPKIU4PA.js → chunk-CB2464BK.js} +6 -6
  50. package/chunks/{chunk-2UISUFHQ.js → chunk-CJXIIILK.js} +3 -3
  51. package/chunks/{chunk-WK4TJUEA.js → chunk-CKASRHZI.js} +1 -1
  52. package/chunks/{chunk-Z7JILXGX.js → chunk-CNIID3TV.js} +3 -3
  53. package/chunks/{chunk-6KEN3RIC.js → chunk-CSZEXZBE.js} +3 -3
  54. package/chunks/{chunk-KKN2IE7Q.js → chunk-CTJLZLB5.js} +1 -1
  55. package/chunks/{chunk-5CDI4UOY.js → chunk-CXE7E23H.js} +131 -48
  56. package/chunks/{chunk-URJHXOSO.js → chunk-CYR3HI5X.js} +3 -3
  57. package/chunks/{chunk-546CDN6D.js → chunk-DBOFL3LQ.js} +3 -3
  58. package/chunks/{chunk-4LKVQFHM.js → chunk-DREZZAZM.js} +2 -2
  59. package/chunks/{chunk-2U7GPHA6.js → chunk-E33LOKRA.js} +1 -1
  60. package/chunks/{chunk-2DNKEBXY.js → chunk-EI3HZX6C.js} +1 -1
  61. package/chunks/{chunk-U25CMJYY.js → chunk-EKPKKXY2.js} +1 -1
  62. package/chunks/{chunk-QG2ACINA.js → chunk-EORNAQDT.js} +1 -1
  63. package/chunks/{chunk-432XCUHF.js → chunk-EQL65XGA.js} +1 -1
  64. package/chunks/{chunk-TYERNYH4.js → chunk-EUNWC2VS.js} +2 -2
  65. package/chunks/{chunk-CDHNGCJI.js → chunk-EUQTXRKZ.js} +7 -7
  66. package/chunks/{chunk-UH7Z7Y45.js → chunk-FOGU3LJX.js} +1 -1
  67. package/chunks/{chunk-BU4BRCPX.js → chunk-FPM27XN4.js} +5 -5
  68. package/chunks/{chunk-E4WHKETF.js → chunk-FVKHVJZQ.js} +2 -49
  69. package/chunks/{chunk-NKST54XA.js → chunk-FZBZSYKU.js} +1 -1
  70. package/chunks/{chunk-XZCMQUOF.js → chunk-GDXET5XU.js} +31 -3387
  71. package/chunks/{chunk-A5YZ3FA2.js → chunk-GM463R2B.js} +1 -1
  72. package/chunks/{chunk-MOHAWIAW.js → chunk-GNPNYXJB.js} +2 -2
  73. package/chunks/{chunk-AFZTZLFB.js → chunk-GSS34377.js} +3 -3
  74. package/chunks/{chunk-MVLM6PJK.js → chunk-H2UQ2M5Z.js} +6 -2
  75. package/chunks/{chunk-BK2UNYWD.js → chunk-HIBNSEJE.js} +12 -0
  76. package/chunks/{chunk-CXYBX4AL.js → chunk-HQB2KUAN.js} +1 -1
  77. package/chunks/{chunk-ZQL73PPE.js → chunk-HYRDKNUY.js} +2 -2
  78. package/chunks/{chunk-D7D7RXIJ.js → chunk-IC4Z6LX6.js} +1 -1
  79. package/chunks/{chunk-HU5TUALO.js → chunk-IIJEYBNH.js} +3 -3
  80. package/chunks/{chunk-DTAPI453.js → chunk-IUFV6FYU.js} +2 -2
  81. package/chunks/{chunk-MISUEWB4.js → chunk-J6SZID63.js} +12 -8
  82. package/chunks/{chunk-OWAK7LMW.js → chunk-KGJGEEVR.js} +7 -0
  83. package/chunks/{chunk-BFHXDAR7.js → chunk-KKBPOU75.js} +1 -1
  84. package/chunks/{chunk-XOZ2R6XI.js → chunk-KKJJB5X6.js} +3578 -1487
  85. package/chunks/{chunk-PQTK2FVO.js → chunk-KR4ZSC7K.js} +4 -4
  86. package/chunks/{chunk-NAYPZ72V.js → chunk-KXSDEOFU.js} +1 -1
  87. package/chunks/{chunk-MGSSJT27.js → chunk-L4N6TIP7.js} +5 -3
  88. package/chunks/{chunk-4T6QMNX2.js → chunk-LA7YLSR6.js} +185 -12
  89. package/chunks/{chunk-4E5PO6R7.js → chunk-LEMXGVEP.js} +4 -4
  90. package/chunks/{chunk-WVAESIM6.js → chunk-LZC3B5N2.js} +4 -4
  91. package/chunks/{chunk-6O5DVH27.js → chunk-M6HMMKVG.js} +1 -1
  92. package/chunks/{chunk-Z5S6KH2B.js → chunk-MAJS7AT4.js} +6 -6
  93. package/chunks/{chunk-XNZBXQCG.js → chunk-MKVZE4ZJ.js} +1 -1
  94. package/chunks/{chunk-I7JDGNG6.js → chunk-MVUQRLOH.js} +9 -5
  95. package/chunks/{chunk-GLWP3FDB.js → chunk-MZSJ43WV.js} +31 -2
  96. package/chunks/{chunk-ZPPP6VCL.js → chunk-NG2R4N5O.js} +1 -1
  97. package/chunks/chunk-NKLP3DCK.js +22 -0
  98. package/chunks/{chunk-WIRAPZ62.js → chunk-NLREQJFK.js} +7 -1
  99. package/chunks/{chunk-N47ZM2KI.js → chunk-OFI7IGST.js} +12 -12
  100. package/chunks/{chunk-DBIEZC7T.js → chunk-OH2VKQXH.js} +42 -16
  101. package/chunks/{chunk-C4GRKMUL.js → chunk-OHJLEW5J.js} +5 -5
  102. package/chunks/{chunk-3RXUYQJI.js → chunk-OIVKILPI.js} +49 -0
  103. package/chunks/{chunk-VDLXPEI5.js → chunk-OMKQH5C5.js} +3 -3
  104. package/chunks/{chunk-LBWNSLJK.js → chunk-ONSZH6VM.js} +2 -2
  105. package/chunks/{chunk-DYA25Y7U.js → chunk-OWMAZHIX.js} +1 -1
  106. package/chunks/{chunk-WAOLM6SQ.js → chunk-P2AJ7FTI.js} +1 -1
  107. package/chunks/{chunk-MFBUJMQ3.js → chunk-P3LEG54R.js} +4 -4
  108. package/chunks/{chunk-WVRJKSIG.js → chunk-PJOBIWUG.js} +1 -1
  109. package/chunks/{chunk-YUVTZ4UH.js → chunk-PQBHU2IA.js} +114 -18
  110. package/chunks/{chunk-GTM6IHBB.js → chunk-Q3JQ7OSU.js} +2 -1
  111. package/chunks/{chunk-IISDPZ5X.js → chunk-QETYKPMG.js} +1 -1
  112. package/chunks/{chunk-UKZEXS6K.js → chunk-R574ATRM.js} +11 -0
  113. package/chunks/{chunk-DOICUTPO.js → chunk-RERATVSK.js} +11 -10
  114. package/chunks/chunk-RGSBTHSU.js +3381 -0
  115. package/chunks/{chunk-6D6V55ZQ.js → chunk-RMH5OWLD.js} +1 -1
  116. package/chunks/{chunk-AVDEBBMI.js → chunk-RNVQB725.js} +2 -2
  117. package/chunks/{chunk-QWUYFMAR.js → chunk-RUL4S3K3.js} +87 -67
  118. package/chunks/{chunk-RTWF7FF7.js → chunk-RZHU3ILK.js} +5 -5
  119. package/chunks/{chunk-3DTM3RPU.js → chunk-S7CV4KO6.js} +3 -3
  120. package/chunks/{chunk-ZH7G3A4U.js → chunk-SCI7K3GM.js} +4 -4
  121. package/chunks/{chunk-YAVY33G4.js → chunk-SEZ556DZ.js} +1 -1
  122. package/chunks/{chunk-6KZP75GT.js → chunk-SHZYHGQH.js} +1 -1
  123. package/chunks/chunk-SOORFWKY.js +155 -0
  124. package/chunks/{chunk-NYZAL2W2.js → chunk-SPMY6CX6.js} +4 -4
  125. package/chunks/{chunk-EHMN6SEG.js → chunk-TDXGKHDN.js} +4 -4
  126. package/chunks/{chunk-XKTCA6BW.js → chunk-TLV2IMHR.js} +5 -5
  127. package/chunks/{chunk-XSGQKR37.js → chunk-TRLYP7OF.js} +358 -20
  128. package/chunks/{chunk-DG563ZCS.js → chunk-TYKC75AX.js} +3 -3
  129. package/chunks/{chunk-KVUBYJDM.js → chunk-TZEZYNYD.js} +1 -1
  130. package/chunks/{chunk-XC2VAFVZ.js → chunk-UVX4Y6IN.js} +1 -1
  131. package/chunks/{chunk-IKXE3AAC.js → chunk-VOARQPTA.js} +2 -2
  132. package/chunks/{chunk-TVFC3XF5.js → chunk-W4B7UBUS.js} +7 -7
  133. package/chunks/{chunk-M744OFVE.js → chunk-W7U4ESW2.js} +1 -1
  134. package/chunks/{chunk-URN76TKR.js → chunk-WCG5O7IP.js} +2 -2
  135. package/chunks/{chunk-A6SX5TAH.js → chunk-XCWO3SMQ.js} +9 -5
  136. package/chunks/{chunk-FDV3CXTD.js → chunk-Y4EWSQF7.js} +3 -3
  137. package/chunks/{chunk-3PRJYMXC.js → chunk-Y4NGLFGJ.js} +1 -1
  138. package/chunks/{chunk-DOA7MCDY.js → chunk-Y7E5LNLO.js} +973 -892
  139. package/chunks/{chunk-3LGZEYOF.js → chunk-YHEEE624.js} +2 -2
  140. package/chunks/{chunk-Y5HIDFKZ.js → chunk-YJQCUTT2.js} +4 -4
  141. package/chunks/{chunk-QONSRAEV.js → chunk-YP5KH5Y7.js} +1 -1
  142. package/chunks/{chunk-SQ3ZJOYL.js → chunk-ZJ3VGYHK.js} +20 -20
  143. package/chunks/{chunk-7GYP5COR.js → chunk-ZXU5UHMI.js} +1 -1
  144. package/chunks/{computer-use-GTOP2CVH.js → computer-use-KEAPATUY.js} +35 -35
  145. package/chunks/{config-utils-LIRO7NSU.js → config-utils-K7SCOWHD.js} +2 -2
  146. package/chunks/{contextCommand-K6T6RRF3.js → contextCommand-ZJA6A5K5.js} +38 -38
  147. package/chunks/{core-runtime-D2626QQU.js → core-runtime-QMJPWHCI.js} +35 -35
  148. package/chunks/create-sub-session-DJE6XICH.js +772 -0
  149. package/chunks/{create-sub-session-6EWLAZD5.js → create-sub-session-E4PBYXV5.js} +2 -2
  150. package/chunks/{cron-create-CCRIULJE.js → cron-create-GRBWYMIJ.js} +4 -4
  151. package/chunks/{cron-delete-FCFW6BGP.js → cron-delete-4CMKBR2M.js} +4 -4
  152. package/chunks/{cron-list-QDBVCHRF.js → cron-list-W7K4ASOA.js} +4 -4
  153. package/chunks/{daemon-CCIX4BMG.js → daemon-SCTQMM7Z.js} +165 -5
  154. package/chunks/{daemon-status-provider-2EHRZZVF.js → daemon-status-provider-FSWDPE2G.js} +45 -45
  155. package/chunks/{daemon-trust-policy-B3EPDJDR.js → daemon-trust-policy-P5L5VFAY.js} +41 -41
  156. package/chunks/{daemon-trust-policy-monitor-MFM5X26G.js → daemon-trust-policy-monitor-73JYN6ET.js} +41 -41
  157. package/chunks/{deferred-core-runtime-KXN7HLN7.js → deferred-core-runtime-BWRCCFTE.js} +35 -35
  158. package/chunks/discovery-XLHITE74.js +220 -0
  159. package/chunks/{display-image-GUJA352B.js → display-image-O2XFPQTC.js} +4 -4
  160. package/chunks/{dist-A7H2KKUC.js → dist-K4WWQBHS.js} +277 -98
  161. package/chunks/{dist-IKGVITP3.js → dist-KS4O2NKE.js} +99 -6
  162. package/chunks/{earlyInputCapture-WUNYYFOS.js → earlyInputCapture-L5ST23A6.js} +36 -36
  163. package/chunks/{edit-DMFCBP2D.js → edit-LHHRFNFK.js} +35 -35
  164. package/chunks/{enter-worktree-5SVBCXFC.js → enter-worktree-6NXCRZPF.js} +35 -35
  165. package/chunks/{enterPlanMode-QUIZFQ4M.js → enterPlanMode-ZVQT4U7D.js} +35 -35
  166. package/chunks/{environment-U6QP23VJ.js → environment-GJ2HWJOS.js} +38 -38
  167. package/chunks/{errors-GZWFA6ON.js → errors-6RLH3XXC.js} +38 -38
  168. package/chunks/{exit-worktree-FUB44KAF.js → exit-worktree-I2YLUHHY.js} +35 -35
  169. package/chunks/{exitPlanMode-XSHHYR73.js → exitPlanMode-7CCWKO7I.js} +35 -35
  170. package/chunks/{fast-path-JHQJSIMZ.js → fast-path-DVFD4HQD.js} +2 -2
  171. package/chunks/{gemini-O44ETOKT.js → gemini-7FWGOYD4.js} +78 -78
  172. package/chunks/{geminiContentGenerator-TTM4TZJM.js → geminiContentGenerator-V2WVLIXU.js} +6 -6
  173. package/chunks/{glob-YECOWTRW.js → glob-3N6GGI75.js} +35 -35
  174. package/chunks/{goal-tools-3AZKX5WQ.js → goal-tools-APOW6UXL.js} +3 -3
  175. package/chunks/{grep-BZO4LOTA.js → grep-V43ILZVX.js} +35 -35
  176. package/chunks/{handleAutoUpdate-TOO52D6H.js → handleAutoUpdate-A5WFVWIA.js} +40 -40
  177. package/chunks/{i18n-ARJYXZQ5.js → i18n-PLVQ4FBZ.js} +37 -37
  178. package/chunks/{image-gen-J6Q2YBEU.js → image-gen-7C6IK6DC.js} +9 -9
  179. package/chunks/{initializer-CEZ4RPQV.js → initializer-CVAIKZYL.js} +42 -42
  180. package/chunks/{installationInfo-AEGIIQAT.js → installationInfo-J6QDHNTK.js} +36 -36
  181. package/chunks/{keychain-token-storage-7BT4TQ2A.js → keychain-token-storage-TVAMTNP7.js} +2 -2
  182. package/chunks/{list-7XLPV5GC.js → list-ZZ4OUUWV.js} +44 -44
  183. package/chunks/{list-agents-GC4BRET7.js → list-agents-KFFIIS2G.js} +2 -2
  184. package/chunks/{loadedSettingsAdapter-YK5SBHOT.js → loadedSettingsAdapter-QRYRJSWL.js} +41 -41
  185. package/chunks/{loggingContentGenerator-I7QDXS43.js → loggingContentGenerator-OJCO75HM.js} +17 -17
  186. package/chunks/{loop-wakeup-SQQSBMEY.js → loop-wakeup-TLMJPMMP.js} +5 -5
  187. package/chunks/{ls-63CC3NNX.js → ls-UVVE2XGE.js} +4 -4
  188. package/chunks/{lsp-P6NVJVNT.js → lsp-QMEA2VLB.js} +2 -2
  189. package/chunks/{managed-npm-update-YSL7PA7G.js → managed-npm-update-PCOSCP2N.js} +48 -39
  190. package/chunks/{mcp-RKFQZXP6.js → mcp-M3WKKWKY.js} +41 -41
  191. package/chunks/{monitor-QHHJIKGL.js → monitor-GN24FH6C.js} +35 -35
  192. package/chunks/{nonInteractiveCli-XEBIE7MG.js → nonInteractiveCli-KPTU3VSQ.js} +75 -75
  193. package/chunks/{notebook-edit-SG7X2EQA.js → notebook-edit-4YM65BBO.js} +35 -35
  194. package/chunks/{openaiContentGenerator-63CVR33K.js → openaiContentGenerator-EDQT6GTV.js} +19 -19
  195. package/chunks/{pidfile-I3CXJGQD.js → pidfile-JOIIRN2C.js} +36 -36
  196. package/chunks/{processUtils-LJ3DSANX.js → processUtils-5SV4MX3Q.js} +2 -2
  197. package/chunks/{qwenContentGenerator-JINBVCH6.js → qwenContentGenerator-ODRJSUGR.js} +40 -40
  198. package/chunks/{qwenOAuth2-SY2O3NRR.js → qwenOAuth2-NESCMZ47.js} +8 -8
  199. package/chunks/{read-file-PGTXF25I.js → read-file-HPSODLPK.js} +10 -10
  200. package/chunks/{read-mcp-resource-RTSSEER5.js → read-mcp-resource-2TNSJTC3.js} +2 -2
  201. package/chunks/{record-artifact-E6AWQU2Z.js → record-artifact-RAON52FC.js} +3 -3
  202. package/chunks/{resumeHistoryUtils-FB2NFVZ2.js → resumeHistoryUtils-TXCOFFMQ.js} +42 -41
  203. package/chunks/{ripGrep-IY3KGPM6.js → ripGrep-ZKQGTQAO.js} +35 -35
  204. package/chunks/{run-qwen-serve-UYEMGPKA.js → run-qwen-serve-ZPKPKECF.js} +516 -87
  205. package/chunks/{runtime-CG3BKRFE.js → runtime-2FLNNM36.js} +44 -44
  206. package/chunks/{scheduler-VFUVGDE5.js → scheduler-365PJHNR.js} +35 -35
  207. package/chunks/{sdk-exporters-http-IL2346MJ.js → sdk-exporters-http-KHAB5JSD.js} +2 -2
  208. package/chunks/{sdk-impl-SYKGVWOZ.js → sdk-impl-KD7FSTC3.js} +2 -2
  209. package/chunks/{send-message-TL6FIMMN.js → send-message-ZM7MRUGP.js} +5 -5
  210. package/chunks/{serve-ZCCQ2G2L.js → serve-QD2RNLKJ.js} +42 -42
  211. package/chunks/{server-WS7LWXPP.js → server-XLJVLTYM.js} +7952 -611
  212. package/chunks/{session-IQLCT32T.js → session-3VTUHH4Q.js} +78 -78
  213. package/chunks/{settings-NX4EUIE6.js → settings-KULVPCQC.js} +40 -40
  214. package/chunks/{shell-THDYM4CS.js → shell-3SWW22MH.js} +35 -35
  215. package/chunks/{skill-OXXZBNQB.js → skill-KDHWYS7W.js} +14 -14
  216. package/chunks/{skill-settings-T3JZ33T2.js → skill-settings-NMY4JEJC.js} +40 -40
  217. package/chunks/{spawnChannel-COLJMSA7.js → spawnChannel-ZKS4Q5OU.js} +37 -37
  218. package/chunks/{standalone-update-ICW7H5IF.js → standalone-update-7CXPGAQ4.js} +38 -38
  219. package/chunks/{startInteractiveUI-6BDRXSMF.js → startInteractiveUI-2QQLEKM6.js} +473 -233
  220. package/chunks/{stdioHelpers-HGIYTWAY.js → stdioHelpers-7A2EE64Z.js} +5 -3
  221. package/chunks/{syntheticOutput-BN7E626U.js → syntheticOutput-ZLCUTKO2.js} +3 -3
  222. package/chunks/{task-create-2X4UP4F3.js → task-create-CQP5UEA3.js} +9 -9
  223. package/chunks/{task-list-WOLJPZ64.js → task-list-XLEZOJXP.js} +5 -5
  224. package/chunks/{task-stop-TNXRNAL2.js → task-stop-7ZQM5CFF.js} +2 -2
  225. package/chunks/{task-update-VDUSN36E.js → task-update-JA75U2SN.js} +9 -9
  226. package/chunks/{team-create-BCSMDK4Z.js → team-create-2WTNGAOX.js} +35 -35
  227. package/chunks/{team-delete-D2VMSDOT.js → team-delete-MHY3UZGY.js} +5 -5
  228. package/chunks/{team-plan-approval-B5YRLJFV.js → team-plan-approval-LZTYLEG4.js} +35 -35
  229. package/chunks/{terminal-image-renderer-PW6Z6VFY.js → terminal-image-renderer-R5HHAFJN.js} +41 -36
  230. package/chunks/{theme-manager-CMVKD2JH.js → theme-manager-PAUCSJFF.js} +36 -36
  231. package/chunks/{todoWrite-MHWHO5UO.js → todoWrite-UPVOHYGD.js} +4 -4
  232. package/chunks/{tool-search-SQTUSG6P.js → tool-search-2BFCGLI6.js} +13 -13
  233. package/chunks/{total-session-admission-XAXOSE46.js → total-session-admission-MK4SINFK.js} +41 -41
  234. package/chunks/{trustedFolders-Z2UAEG2V.js → trustedFolders-TJ5S26N7.js} +37 -37
  235. package/chunks/{update-relaunch-JBLI6LJF.js → update-relaunch-N7AYLARF.js} +6 -6
  236. package/chunks/{updateCheck-FDAVGOFT.js → updateCheck-QRZ3DVT5.js} +39 -39
  237. package/chunks/{useAutoAcceptIndicator-PDZFIYRM.js → useAutoAcceptIndicator-DBJ7Y5AF.js} +44 -44
  238. package/chunks/{validateNonInterActiveAuth-Q4763ONQ.js → validateNonInterActiveAuth-6ZQWUDS3.js} +72 -72
  239. package/chunks/{version-C7MPCGWD.js → version-AJQGQWXC.js} +1 -1
  240. package/chunks/{web-fetch-L7RAPOJB.js → web-fetch-QWJYRXFL.js} +13 -13
  241. package/chunks/{web-search-IDOYUOWX.js → web-search-2AOXJGHU.js} +9 -9
  242. package/chunks/web-shell-static-O73YPVVC.js +33 -0
  243. package/chunks/{workflow-HXURUJB5.js → workflow-ERH3SJG2.js} +36 -36
  244. package/chunks/{workspace-providers-status-JZ3GPWNU.js → workspace-providers-status-HZ474RA4.js} +44 -44
  245. package/chunks/{workspace-registration-store-SM2PWB6L.js → workspace-registration-store-6EUP4JXG.js} +1 -1
  246. package/chunks/{workspace-registry-6W4ES7BJ.js → workspace-registry-R4APRRNC.js} +41 -41
  247. package/chunks/{workspace-service-V47ZFJRX.js → workspace-service-HFIFDMU7.js} +46 -46
  248. package/chunks/{workspace-skills-status-6ZQ45XKA.js → workspace-skills-status-HAHEIHGK.js} +42 -42
  249. package/chunks/{workspace-trust-reconciler-6V25LMCN.js → workspace-trust-reconciler-65GTAGDK.js} +50 -50
  250. package/chunks/{write-file-H2QOF25K.js → write-file-B34CDELV.js} +35 -35
  251. package/chunks/{zoom-image-JTUSS43N.js → zoom-image-HPRBZHSS.js} +10 -10
  252. package/cli.js +15 -15
  253. package/package.json +3 -3
  254. package/web-shell/assets/{arc-DtI1rZcQ.js → arc-Ip-FFDJ0.js} +1 -1
  255. package/web-shell/assets/{architectureDiagram-3BPJPVTR-BPZwSVct.js → architectureDiagram-3BPJPVTR-CChqgwIb.js} +1 -1
  256. package/web-shell/assets/{blockDiagram-GPEHLZMM-BIQ03j4C.js → blockDiagram-GPEHLZMM-BHN-Tfss.js} +1 -1
  257. package/web-shell/assets/{c4Diagram-AAUBKEIU-CB0RyFGm.js → c4Diagram-AAUBKEIU-BhyjzDjN.js} +1 -1
  258. package/web-shell/assets/channel-Cu8qd6OB.js +1 -0
  259. package/web-shell/assets/{chunk-2J33WTMH-B3WoS-4H.js → chunk-2J33WTMH-BB9eyHrx.js} +1 -1
  260. package/web-shell/assets/{chunk-4BX2VUAB-C98xYZ1X.js → chunk-4BX2VUAB-BeV7ce_J.js} +1 -1
  261. package/web-shell/assets/{chunk-55IACEB6-CbTIWRwQ.js → chunk-55IACEB6-DO7kXDiV.js} +1 -1
  262. package/web-shell/assets/{chunk-727SXJPM-DWGnKTPu.js → chunk-727SXJPM-B27MPznD.js} +1 -1
  263. package/web-shell/assets/{chunk-AQP2D5EJ-4__QyCEX.js → chunk-AQP2D5EJ-DHIjqjD_.js} +1 -1
  264. package/web-shell/assets/{chunk-FMBD7UC4-DFtG1YCW.js → chunk-FMBD7UC4-DabMqyN2.js} +1 -1
  265. package/web-shell/assets/{chunk-ND2GUHAM-rvAhW51N.js → chunk-ND2GUHAM-Dw7Nnnxc.js} +1 -1
  266. package/web-shell/assets/{chunk-QZHKN3VN-DfiU9pwZ.js → chunk-QZHKN3VN-DdaZew1Q.js} +1 -1
  267. package/web-shell/assets/classDiagram-4FO5ZUOK-BI3KrXhq.js +1 -0
  268. package/web-shell/assets/classDiagram-v2-Q7XG4LA2-BI3KrXhq.js +1 -0
  269. package/web-shell/assets/{cose-bilkent-S5V4N54A-Cc4EIdxu.js → cose-bilkent-S5V4N54A-CgBpCYH5.js} +1 -1
  270. package/web-shell/assets/{dagre-BM42HDAG-CZNj4dGW.js → dagre-BM42HDAG-BB4IU8G0.js} +1 -1
  271. package/web-shell/assets/{diagram-2AECGRRQ-D5tiqQCr.js → diagram-2AECGRRQ-BcUTHU37.js} +1 -1
  272. package/web-shell/assets/{diagram-5GNKFQAL-pwzw0jVO.js → diagram-5GNKFQAL-B6Lyihyv.js} +1 -1
  273. package/web-shell/assets/{diagram-KO2AKTUF-4CWiM00x.js → diagram-KO2AKTUF-CRIJOjpG.js} +1 -1
  274. package/web-shell/assets/{diagram-LMA3HP47-Dd7rc7Qf.js → diagram-LMA3HP47-DdNiwWWT.js} +1 -1
  275. package/web-shell/assets/{diagram-OG6HWLK6-_vzV52ml.js → diagram-OG6HWLK6-Dz4b32Do.js} +1 -1
  276. package/web-shell/assets/{erDiagram-TEJ5UH35-CqbE2bx_.js → erDiagram-TEJ5UH35-D-8NGw77.js} +1 -1
  277. package/web-shell/assets/{flowDiagram-I6XJVG4X-CaxNr7w4.js → flowDiagram-I6XJVG4X-Dun26LyM.js} +1 -1
  278. package/web-shell/assets/{ganttDiagram-6RSMTGT7-AGjrtfUA.js → ganttDiagram-6RSMTGT7-F10Hu1Gc.js} +1 -1
  279. package/web-shell/assets/{gitGraphDiagram-PVQCEYII-ADG2zSkc.js → gitGraphDiagram-PVQCEYII-Bf8Ez6-D.js} +1 -1
  280. package/web-shell/assets/{index-BOryKCqt.js → index-BXqw-nGq.js} +1 -1
  281. package/web-shell/assets/index-QQlUCJGg.css +5 -0
  282. package/web-shell/assets/index-hcgjV7vS.js +1768 -0
  283. package/web-shell/assets/{infoDiagram-5YYISTIA-CE3B_IoZ.js → infoDiagram-5YYISTIA-DVgTMLvj.js} +1 -1
  284. package/web-shell/assets/{ishikawaDiagram-YF4QCWOH-CN-Frhoi.js → ishikawaDiagram-YF4QCWOH-uT-KepvK.js} +1 -1
  285. package/web-shell/assets/{journeyDiagram-JHISSGLW-CGgezS93.js → journeyDiagram-JHISSGLW-Vg_XadQf.js} +1 -1
  286. package/web-shell/assets/{kanban-definition-UN3LZRKU-BqWijky5.js → kanban-definition-UN3LZRKU-Dyv1ESBE.js} +1 -1
  287. package/web-shell/assets/{linear-D8sfpZf6.js → linear-BMIepYX3.js} +1 -1
  288. package/web-shell/assets/{mermaid.core-3PA4QrzM.js → mermaid.core-zA8pJ9ag.js} +5 -5
  289. package/web-shell/assets/{mindmap-definition-RKZ34NQL-D9QxwiCY.js → mindmap-definition-RKZ34NQL-BCW_BZ_5.js} +1 -1
  290. package/web-shell/assets/{pieDiagram-4H26LBE5-Bioaf6uE.js → pieDiagram-4H26LBE5-DseNEGp2.js} +1 -1
  291. package/web-shell/assets/{quadrantDiagram-W4KKPZXB-DBb2AS73.js → quadrantDiagram-W4KKPZXB-6Z7wr1Fi.js} +1 -1
  292. package/web-shell/assets/{requirementDiagram-4Y6WPE33-DXOvZ3KB.js → requirementDiagram-4Y6WPE33-CVOlCRPf.js} +1 -1
  293. package/web-shell/assets/{sankeyDiagram-5OEKKPKP-D9qg09Dm.js → sankeyDiagram-5OEKKPKP-CGhgrUJZ.js} +1 -1
  294. package/web-shell/assets/{sequenceDiagram-3UESZ5HK-DSAUIfpw.js → sequenceDiagram-3UESZ5HK-dlqmpLuQ.js} +1 -1
  295. package/web-shell/assets/{stateDiagram-AJRCARHV-BPZkzfQ3.js → stateDiagram-AJRCARHV-B9EW10Xb.js} +1 -1
  296. package/web-shell/assets/stateDiagram-v2-BHNVJYJU-CJTZJJ5X.js +1 -0
  297. package/web-shell/assets/{timeline-definition-PNZ67QCA-UDaQp9sP.js → timeline-definition-PNZ67QCA-BBRh0mgZ.js} +1 -1
  298. package/web-shell/assets/{vennDiagram-CIIHVFJN-2ouhAnHO.js → vennDiagram-CIIHVFJN-B8Gs-REP.js} +1 -1
  299. package/web-shell/assets/{wardley-L42UT6IY-Cq_WEvTK.js → wardley-L42UT6IY-D_y80Ur7.js} +1 -1
  300. package/web-shell/assets/{wardleyDiagram-YWT4CUSO-Dt24aXOM.js → wardleyDiagram-YWT4CUSO-D-CNfHJ-.js} +1 -1
  301. package/web-shell/assets/{xychartDiagram-2RQKCTM6-A5Xk2WCH.js → xychartDiagram-2RQKCTM6-DQ5CvELo.js} +1 -1
  302. package/web-shell/index.html +2 -2
  303. package/chunks/create-sub-session-MWUWNBM6.js +0 -401
  304. package/web-shell/assets/channel-vfbVFuM1.js +0 -1
  305. package/web-shell/assets/classDiagram-4FO5ZUOK-Cvr8atq3.js +0 -1
  306. package/web-shell/assets/classDiagram-v2-Q7XG4LA2-Cvr8atq3.js +0 -1
  307. package/web-shell/assets/index-Cb1LjsCv.css +0 -5
  308. package/web-shell/assets/index-CvJDaIy8.js +0 -1756
  309. package/web-shell/assets/stateDiagram-v2-BHNVJYJU-DInOqnhZ.js +0 -1
@@ -37,7 +37,7 @@ init_esbuild_shims();
37
37
  // packages/channels/dingtalk/dist/DingtalkAdapter.js
38
38
  init_esbuild_shims();
39
39
  import { mkdirSync, writeFileSync } from "node:fs";
40
- import { randomUUID as randomUUID4 } from "node:crypto";
40
+ import { randomUUID as randomUUID5 } from "node:crypto";
41
41
  import { basename as basename2, join } from "node:path";
42
42
  import { tmpdir as tmpdir2 } from "node:os";
43
43
  import { Buffer as Buffer2 } from "node:buffer";
@@ -4540,15 +4540,17 @@ function replaceImageMarkers(text, markers, replacements) {
4540
4540
  return result;
4541
4541
  }
4542
4542
  __name(replaceImageMarkers, "replaceImageMarkers");
4543
+ function stripPartialImageMarker(text) {
4544
+ const visibleText = maskCode(text);
4545
+ const partialMarker = /\[I(?:M(?:A(?:G(?:E(?::[^\]\r\n]*)?)?)?)?)?$/i.exec(visibleText);
4546
+ if (partialMarker?.index === void 0)
4547
+ return text;
4548
+ return `${text.slice(0, partialMarker.index)}[Image pending]`;
4549
+ }
4550
+ __name(stripPartialImageMarker, "stripPartialImageMarker");
4543
4551
  function sanitizeStreamingImageMarkers(text) {
4544
4552
  const markers = findImageMarkers(text);
4545
- let result = replaceImageMarkers(text, markers, markers.map(() => "[Image pending]"));
4546
- const visibleText = maskCode(result);
4547
- const partialMarker = /\[(?:I(?:M(?:A(?:G(?:E(?::[^\]\r\n]*)?)?)?)?)?)?$/i.exec(visibleText);
4548
- if (partialMarker?.index !== void 0) {
4549
- result = `${result.slice(0, partialMarker.index)}[Image pending]`;
4550
- }
4551
- return result;
4553
+ return stripPartialImageMarker(replaceImageMarkers(text, markers, markers.map(() => "[Image pending]")));
4552
4554
  }
4553
4555
  __name(sanitizeStreamingImageMarkers, "sanitizeStreamingImageMarkers");
4554
4556
  function isInside(realPath, directory) {
@@ -5189,6 +5191,9 @@ __name(parseDingtalkCardActorId, "parseDingtalkCardActorId");
5189
5191
  init_esbuild_shims();
5190
5192
  import { randomUUID as randomUUID2 } from "node:crypto";
5191
5193
  var FLUSH_INTERVAL_MS = 500;
5194
+ var STATUS_REFRESH_INTERVAL_MS = 1e3;
5195
+ var BREAKER_PROBE_INTERVAL_MS = 3e4;
5196
+ var MAX_CONSECUTIVE_STATUS_FAILURES = 3;
5192
5197
  var CONTENT_LIMIT = 2e4;
5193
5198
  var TRUNCATION_MARKER = "[Earlier output truncated]\n";
5194
5199
  function boundContent(content) {
@@ -5209,22 +5214,66 @@ var StatusCardController = class {
5209
5214
  constructor(options) {
5210
5215
  this.options = options;
5211
5216
  }
5212
- append(segment, target, chunk) {
5213
- if (!chunk || this.terminalSegmentIds.has(segment.segmentId))
5217
+ ensure(segment, target) {
5218
+ if (this.terminalSegmentIds.has(segment.segmentId))
5219
+ return;
5220
+ if (!this.recordsBySegment.has(segment.segmentId)) {
5221
+ this.createRecord(segment, target);
5222
+ }
5223
+ }
5224
+ replace(segment, target, content) {
5225
+ if (this.terminalSegmentIds.has(segment.segmentId))
5214
5226
  return;
5215
- let record = this.recordsBySegment.get(segment.segmentId);
5227
+ const record = this.recordsBySegment.get(segment.segmentId);
5216
5228
  if (!record) {
5217
- record = this.createRecord(segment, target);
5229
+ this.createRecord(segment, target, content);
5230
+ return;
5218
5231
  }
5219
5232
  if (record.terminal)
5220
5233
  return;
5221
- record.content = boundContent(record.content + chunk);
5234
+ record.content = boundContent(content);
5222
5235
  if (record.streamFailed)
5223
5236
  return;
5224
5237
  record.pendingSnapshot = sanitizeStreamingImageMarkers(record.content);
5225
5238
  this.scheduleFlush(record);
5226
5239
  }
5227
- createRecord(segment, target) {
5240
+ /**
5241
+ * Whether a created, still-running status card is displaying content for
5242
+ * this segment. Awaits the in-flight creation so a boundary decision made
5243
+ * while creation is pending does not race it. A latched stream failure
5244
+ * means the card can never show further content, so it is not live.
5245
+ */
5246
+ async isCardLive(segmentId) {
5247
+ const record = this.recordsBySegment.get(segmentId);
5248
+ if (!record || record.terminal || record.streamFailed)
5249
+ return false;
5250
+ return record.ready;
5251
+ }
5252
+ /**
5253
+ * Drain any pending snapshot so callers can treat the card's current
5254
+ * content as delivered. Returns false when there is no live record, the
5255
+ * card never became ready, or the stream failed during the drain, so the
5256
+ * caller can fall back instead of claiming delivery.
5257
+ */
5258
+ async flushPending(segmentId) {
5259
+ const record = this.recordsBySegment.get(segmentId);
5260
+ if (!record || record.terminal)
5261
+ return false;
5262
+ if (!await record.ready)
5263
+ return false;
5264
+ while (!record.terminal && !record.streamFailed) {
5265
+ if (record.flushTimer) {
5266
+ clearTimeout(record.flushTimer);
5267
+ record.flushTimer = void 0;
5268
+ }
5269
+ this.flush(record);
5270
+ await record.writeChain;
5271
+ if (record.pendingSnapshot === void 0)
5272
+ break;
5273
+ }
5274
+ return !record.terminal && !record.streamFailed;
5275
+ }
5276
+ createRecord(segment, target, initialContent = "") {
5228
5277
  const outTrackId = `qwen-status-${randomUUID2()}`;
5229
5278
  const record = {
5230
5279
  segmentId: segment.segmentId,
@@ -5233,12 +5282,13 @@ var StatusCardController = class {
5233
5282
  ownerId: segment.owner.id,
5234
5283
  target,
5235
5284
  outTrackId,
5236
- content: "",
5285
+ content: boundContent(initialContent),
5237
5286
  startedAt: Date.now(),
5238
5287
  lastStatusSecond: 0,
5239
5288
  ready: Promise.resolve(false),
5240
5289
  terminal: false,
5241
5290
  streamFailed: false,
5291
+ consecutiveStatusFailures: 0,
5242
5292
  stopClaimed: false,
5243
5293
  forbiddenActors: /* @__PURE__ */ new Set(),
5244
5294
  lastWriteAt: Date.now(),
@@ -5250,10 +5300,14 @@ var StatusCardController = class {
5250
5300
  segmentIds.add(record.segmentId);
5251
5301
  this.segmentIdsByRun.set(record.runId, segmentIds);
5252
5302
  record.ready = this.create(record, target);
5303
+ void record.ready.then((ready) => {
5304
+ if (ready)
5305
+ this.scheduleStatusRefresh(record);
5306
+ });
5253
5307
  return record;
5254
5308
  }
5255
- complete(segmentId, text) {
5256
- return this.finalize(segmentId, boundContent(text), "Completed", false);
5309
+ complete(segmentId, text, retainedContent) {
5310
+ return this.finalize(segmentId, boundContent(text), "Completed", false, retainedContent);
5257
5311
  }
5258
5312
  fail(segmentId, error) {
5259
5313
  void this.finalize(segmentId, boundContent(error), "Failed", true);
@@ -5296,12 +5350,13 @@ var StatusCardController = class {
5296
5350
  }
5297
5351
  async create(record, target) {
5298
5352
  try {
5353
+ const initialContent = sanitizeStreamingImageMarkers(record.content);
5299
5354
  await this.options.client.createAndDeliver({
5300
5355
  templateId: STATUS_CARD_TEMPLATE_ID,
5301
5356
  outTrackId: record.outTrackId,
5302
5357
  target,
5303
5358
  cardParamMap: {
5304
- content: "",
5359
+ content: initialContent,
5305
5360
  flowStatus: 2,
5306
5361
  statusLine: this.statusLine(record, "Running").text,
5307
5362
  hasAction: "true",
@@ -5311,7 +5366,7 @@ var StatusCardController = class {
5311
5366
  await this.options.client.openOrUpdateStream({
5312
5367
  outTrackId: record.outTrackId,
5313
5368
  key: "content",
5314
- content: "",
5369
+ content: initialContent,
5315
5370
  finalize: false
5316
5371
  });
5317
5372
  return true;
@@ -5358,6 +5413,10 @@ var StatusCardController = class {
5358
5413
  }).catch((error) => {
5359
5414
  record.streamFailed = true;
5360
5415
  record.pendingSnapshot = void 0;
5416
+ if (record.statusTimer) {
5417
+ clearTimeout(record.statusTimer);
5418
+ record.statusTimer = void 0;
5419
+ }
5361
5420
  this.options.onError?.("status card streaming", error);
5362
5421
  });
5363
5422
  const tracked = write.finally(() => {
@@ -5371,7 +5430,7 @@ var StatusCardController = class {
5371
5430
  record.inFlight = tracked;
5372
5431
  record.writeChain = tracked;
5373
5432
  }
5374
- async finalize(segmentId, content, state, isError) {
5433
+ async finalize(segmentId, content, state, isError, retainedContent) {
5375
5434
  const record = this.recordsBySegment.get(segmentId);
5376
5435
  if (!record || record.terminal)
5377
5436
  return false;
@@ -5386,12 +5445,16 @@ var StatusCardController = class {
5386
5445
  if (record.flushTimer)
5387
5446
  clearTimeout(record.flushTimer);
5388
5447
  record.flushTimer = void 0;
5448
+ if (record.statusTimer)
5449
+ clearTimeout(record.statusTimer);
5450
+ record.statusTimer = void 0;
5389
5451
  record.pendingSnapshot = void 0;
5390
5452
  try {
5391
5453
  if (!await record.ready)
5392
5454
  return false;
5393
5455
  await record.writeChain;
5394
- const finalContent = boundContent(sanitizeStreamingImageMarkers(content || record.content));
5456
+ const retained = content || (retainedContent ? retainedContent(record.content) : record.content);
5457
+ const finalContent = boundContent(sanitizeStreamingImageMarkers(retained));
5395
5458
  await this.options.client.openOrUpdateStream({
5396
5459
  outTrackId: record.outTrackId,
5397
5460
  key: "content",
@@ -5444,7 +5507,7 @@ var StatusCardController = class {
5444
5507
  };
5445
5508
  }
5446
5509
  async updateRunningStatus(record) {
5447
- if (record.terminal)
5510
+ if (record.terminal || record.streamFailed)
5448
5511
  return;
5449
5512
  const status = this.statusLine(record, "Running");
5450
5513
  if (status.second === record.lastStatusSecond)
@@ -5455,10 +5518,37 @@ var StatusCardController = class {
5455
5518
  cardParamMap: { statusLine: status.text }
5456
5519
  });
5457
5520
  record.lastStatusSecond = status.second;
5521
+ record.consecutiveStatusFailures = 0;
5522
+ if (record.statusTimer) {
5523
+ clearTimeout(record.statusTimer);
5524
+ record.statusTimer = void 0;
5525
+ }
5526
+ this.scheduleStatusRefresh(record);
5458
5527
  } catch (error) {
5528
+ record.consecutiveStatusFailures++;
5459
5529
  this.options.onError?.("status card metadata", error);
5460
5530
  }
5461
5531
  }
5532
+ scheduleStatusRefresh(record, intervalMs = STATUS_REFRESH_INTERVAL_MS) {
5533
+ if (record.terminal || record.streamFailed || record.statusTimer)
5534
+ return;
5535
+ const elapsed = Math.max(0, Date.now() - record.startedAt);
5536
+ const delay = Math.max(50, intervalMs - elapsed % intervalMs);
5537
+ record.statusTimer = setTimeout(() => {
5538
+ record.statusTimer = void 0;
5539
+ if (record.terminal || record.streamFailed)
5540
+ return;
5541
+ const refresh = record.writeChain.then(() => this.updateRunningStatus(record));
5542
+ record.writeChain = refresh;
5543
+ void refresh.finally(() => {
5544
+ if (record.consecutiveStatusFailures >= MAX_CONSECUTIVE_STATUS_FAILURES) {
5545
+ this.scheduleStatusRefresh(record, BREAKER_PROBE_INTERVAL_MS);
5546
+ return;
5547
+ }
5548
+ this.scheduleStatusRefresh(record);
5549
+ });
5550
+ }, delay);
5551
+ }
5462
5552
  };
5463
5553
 
5464
5554
  // packages/channels/dingtalk/dist/question-card-controller.js
@@ -5793,6 +5883,19 @@ ${questions}`;
5793
5883
 
5794
5884
  // packages/channels/dingtalk/dist/interaction-presenter.js
5795
5885
  init_esbuild_shims();
5886
+ import { randomUUID as randomUUID4 } from "node:crypto";
5887
+ function escapeMarkdownText(text) {
5888
+ return text.replace(/([\\`*_[\]{}()#+.!|>~-])/gu, "\\$1");
5889
+ }
5890
+ __name(escapeMarkdownText, "escapeMarkdownText");
5891
+ function formatSenderPrefixes(sender) {
5892
+ const senderName = sanitizeSenderName(sender.senderName);
5893
+ return {
5894
+ senderPrefix: `@${escapeMarkdownText(senderName)}`,
5895
+ senderRawPrefix: `@${senderName}`
5896
+ };
5897
+ }
5898
+ __name(formatSenderPrefixes, "formatSenderPrefixes");
5796
5899
  var DingtalkInteractionPresenter = class {
5797
5900
  static {
5798
5901
  __name(this, "DingtalkInteractionPresenter");
@@ -5804,14 +5907,40 @@ var DingtalkInteractionPresenter = class {
5804
5907
  constructor(options) {
5805
5908
  this.options = options;
5806
5909
  }
5807
- registerRun(runId, ownerId, target) {
5910
+ registerRun(runId, ownerId, target, sessionId = "", sender) {
5808
5911
  this.runs.set(runId, {
5912
+ runId,
5809
5913
  ownerId,
5810
5914
  target,
5915
+ baseContext: {
5916
+ channelName: "dingtalk",
5917
+ sessionId,
5918
+ runId,
5919
+ segmentId: runId,
5920
+ owner: { kind: "channel_user", id: ownerId },
5921
+ target: {
5922
+ channelName: "dingtalk",
5923
+ chatId: target.chatId,
5924
+ senderId: ownerId,
5925
+ isGroup: target.isGroup
5926
+ }
5927
+ },
5811
5928
  projectionChain: Promise.resolve(),
5929
+ ...target.isGroup && sender ? formatSenderPrefixes(sender) : {},
5812
5930
  terminal: false
5813
5931
  });
5814
5932
  }
5933
+ startStatusCard(runId) {
5934
+ const run = this.runs.get(runId);
5935
+ if (!run || run.terminal)
5936
+ return;
5937
+ const statusContext = this.ensureStatusContext(run);
5938
+ void this.enqueue(run, () => {
5939
+ const statusCards = this.options.statusCards;
5940
+ const target = this.cardTarget(statusContext.target);
5941
+ statusCards?.ensure(statusContext, target);
5942
+ });
5943
+ }
5815
5944
  appendOutput(segment, chunk) {
5816
5945
  const run = this.runs.get(segment.runId);
5817
5946
  if (!run || run.terminal || run.ownerId !== segment.owner.id || run.target.chatId !== segment.target.chatId || run.target.isGroup !== segment.target.isGroup || !chunk || this.terminalSegmentIds.has(segment.segmentId)) {
@@ -5828,10 +5957,9 @@ var DingtalkInteractionPresenter = class {
5828
5957
  presentation.content = this.boundContent(presentation.content + chunk);
5829
5958
  this.segments.set(segment.segmentId, presentation);
5830
5959
  run.activeSegmentId = segment.segmentId;
5831
- if (!this.options.statusCards)
5832
- return;
5960
+ const statusContext = this.ensureStatusContext(run, segment);
5833
5961
  void this.enqueue(run, () => {
5834
- this.options.statusCards?.append(segment, this.cardTarget(segment.target), chunk);
5962
+ this.options.statusCards?.replace(statusContext, this.cardTarget(statusContext.target), presentation.content);
5835
5963
  });
5836
5964
  }
5837
5965
  closeOutput(segmentId, text, reason, segment) {
@@ -5852,17 +5980,48 @@ var DingtalkInteractionPresenter = class {
5852
5980
  }
5853
5981
  return this.enqueue(run, async () => {
5854
5982
  const statusCards = this.options.statusCards;
5983
+ const statusContext = this.ensureStatusContext(run, presentation.context);
5855
5984
  if (reason === "failed") {
5856
- statusCards?.fail(segmentId, text);
5985
+ statusCards?.ensure(statusContext, this.cardTarget(statusContext.target));
5986
+ statusCards?.fail(statusContext.segmentId, this.withSenderPrefix(run, "\u672C\u6B21\u5904\u7406\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002"));
5987
+ await this.redeliverCardDeliveredContent(run);
5857
5988
  return statusCards !== void 0;
5858
5989
  }
5859
5990
  if (reason === "cancelled") {
5860
5991
  return statusCards !== void 0;
5861
5992
  }
5862
- const completed = statusCards !== void 0 && await statusCards.complete(segmentId, text);
5993
+ if (reason === "response_boundary") {
5994
+ const deliveredViaCard = statusCards !== void 0 && await statusCards.isCardLive(statusContext.segmentId) && await statusCards.flushPending(statusContext.segmentId);
5995
+ if (deliveredViaCard) {
5996
+ run.cardDelivered = {
5997
+ text: stripPartialImageMarker(text || presentation.content),
5998
+ chatId: presentation.context.target.chatId,
5999
+ sessionId: presentation.context.sessionId
6000
+ };
6001
+ return true;
6002
+ }
6003
+ const fallbackText2 = stripPartialImageMarker(text || presentation.content);
6004
+ if (!fallbackText2 || !this.options.sendFallback)
6005
+ return false;
6006
+ await this.options.sendFallback(presentation.context.target.chatId, fallbackText2, presentation.context.sessionId);
6007
+ return true;
6008
+ }
6009
+ if (reason === "input_requested") {
6010
+ const completed2 = statusCards !== void 0 && await statusCards.complete(statusContext.segmentId, this.withSenderPrefix(run, text || presentation.content));
6011
+ run.statusContext = void 0;
6012
+ if (completed2)
6013
+ return true;
6014
+ const fallbackText2 = stripPartialImageMarker(text || presentation.content);
6015
+ if (!fallbackText2 || !this.options.sendFallback)
6016
+ return false;
6017
+ await this.options.sendFallback(presentation.context.target.chatId, fallbackText2, presentation.context.sessionId);
6018
+ return true;
6019
+ }
6020
+ statusCards?.ensure(statusContext, this.cardTarget(statusContext.target));
6021
+ const completed = statusCards !== void 0 && await statusCards.complete(statusContext.segmentId, this.withSenderPrefix(run, text || presentation.content));
5863
6022
  if (completed)
5864
6023
  return true;
5865
- const fallbackText = text || presentation.content;
6024
+ const fallbackText = stripPartialImageMarker(text || presentation.content);
5866
6025
  if (!fallbackText || !this.options.sendFallback)
5867
6026
  return false;
5868
6027
  await this.options.sendFallback(presentation.context.target.chatId, fallbackText, presentation.context.sessionId);
@@ -5892,12 +6051,23 @@ var DingtalkInteractionPresenter = class {
5892
6051
  this.addTerminalSegment(activeSegmentId);
5893
6052
  }
5894
6053
  const finalization = this.enqueue(run, async () => {
5895
- if (terminal === "failed" && activeSegmentId) {
5896
- this.options.statusCards?.fail(activeSegmentId, detail);
6054
+ if (terminal === "failed") {
6055
+ const statusContext = this.ensureStatusContext(run);
6056
+ this.options.statusCards?.ensure(statusContext, this.cardTarget(statusContext.target));
6057
+ this.options.statusCards?.fail(statusContext.segmentId, this.withSenderPrefix(run, "\u672C\u6B21\u5904\u7406\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002"));
6058
+ await this.redeliverCardDeliveredContent(run);
5897
6059
  } else if (terminal === "cancelled") {
6060
+ const statusContext = run.statusContext;
6061
+ if (statusContext) {
6062
+ this.options.statusCards?.replace(statusContext, this.cardTarget(statusContext.target), this.withSenderPrefix(run, detail === "cancel_command" ? "\u4EFB\u52A1\u5DF2\u505C\u6B62" : "\u4EFB\u52A1\u5DF2\u53D6\u6D88"));
6063
+ }
5898
6064
  this.options.statusCards?.cancelRun(runId, detail === "cancel_command" ? "cancel_command" : "dropped");
5899
- } else if (activeSegmentId) {
5900
- await this.options.statusCards?.complete(activeSegmentId, detail);
6065
+ await this.redeliverCardDeliveredContent(run);
6066
+ } else {
6067
+ const statusContext = run.statusContext;
6068
+ if (statusContext) {
6069
+ await this.options.statusCards?.complete(statusContext.segmentId, "", (retained) => retained ? this.withSenderPrefix(run, retained) : retained);
6070
+ }
5901
6071
  }
5902
6072
  });
5903
6073
  void finalization.then(() => {
@@ -5929,17 +6099,71 @@ var DingtalkInteractionPresenter = class {
5929
6099
  return result;
5930
6100
  };
5931
6101
  }
6102
+ /**
6103
+ * A failed or cancelled terminal overwrites the single continuity card,
6104
+ * erasing content a boundary already declared delivered there. Send it as
6105
+ * a text message so it survives the overwrite.
6106
+ */
6107
+ async redeliverCardDeliveredContent(run) {
6108
+ const delivered = run.cardDelivered;
6109
+ if (!delivered || !this.options.sendFallback)
6110
+ return;
6111
+ run.cardDelivered = void 0;
6112
+ await this.options.sendFallback(delivered.chatId, delivered.text, delivered.sessionId);
6113
+ }
5932
6114
  enqueue(run, operation) {
5933
6115
  const result = run.projectionChain.then(operation);
5934
6116
  run.projectionChain = result.then(() => void 0, () => void 0);
5935
6117
  return result;
5936
6118
  }
5937
- boundContent(content) {
5938
- const limit = 2e4;
5939
- const marker = "[Earlier output truncated]\n";
6119
+ boundContent(content, limit = CONTENT_LIMIT) {
5940
6120
  if (content.length <= limit)
5941
6121
  return content;
5942
- return `${marker}${content.slice(content.length - (limit - marker.length))}`;
6122
+ if (limit === 0)
6123
+ return "";
6124
+ if (limit <= TRUNCATION_MARKER.length)
6125
+ return content.slice(-limit);
6126
+ return `${TRUNCATION_MARKER}${content.slice(content.length - (limit - TRUNCATION_MARKER.length))}`;
6127
+ }
6128
+ withSenderPrefix(run, content) {
6129
+ if (!run.senderPrefix)
6130
+ return this.boundContent(content);
6131
+ const body = this.withoutExistingSenderPrefix(run, content);
6132
+ if (!body)
6133
+ return run.senderPrefix;
6134
+ const separator = "\n\n";
6135
+ const bodyLimit = Math.max(0, CONTENT_LIMIT - run.senderPrefix.length - separator.length);
6136
+ return `${run.senderPrefix}${separator}${this.boundContent(body, bodyLimit)}`;
6137
+ }
6138
+ withoutExistingSenderPrefix(run, content) {
6139
+ const prefixes = /* @__PURE__ */ new Set([run.senderPrefix, run.senderRawPrefix]);
6140
+ let body = content;
6141
+ while (body) {
6142
+ let removed = false;
6143
+ for (const prefix of prefixes) {
6144
+ if (!prefix)
6145
+ continue;
6146
+ if (body === prefix)
6147
+ return "";
6148
+ if (!body.startsWith(prefix))
6149
+ continue;
6150
+ const remainder = body.slice(prefix.length);
6151
+ if (/^\s/u.test(remainder)) {
6152
+ body = remainder.replace(/^\s{1,2}/u, "");
6153
+ removed = true;
6154
+ break;
6155
+ }
6156
+ }
6157
+ if (!removed)
6158
+ break;
6159
+ }
6160
+ return body;
6161
+ }
6162
+ ensureStatusContext(run, segment) {
6163
+ if (run.statusContext)
6164
+ return run.statusContext;
6165
+ run.statusContext = segment ? { ...segment } : { ...run.baseContext, segmentId: `${run.runId}:${randomUUID4()}` };
6166
+ return run.statusContext;
5943
6167
  }
5944
6168
  cardTarget(target) {
5945
6169
  const isGroup = target.isGroup === true;
@@ -5972,7 +6196,6 @@ var DIRECT_MSG_API = "https://api.dingtalk.com/v1.0/robot/oToMessages/batchSend"
5972
6196
  var PROACTIVE_MSG_KEY = "sampleMarkdown";
5973
6197
  var TOKEN_API = "https://oapi.dingtalk.com/gettoken";
5974
6198
  var PROACTIVE_FETCH_TIMEOUT_MS = 15e3;
5975
- var TEXT_MESSAGE_LIMIT = 3800;
5976
6199
  var mentionTarget = Symbol("mentionTarget");
5977
6200
  var IMAGE_INSTRUCTIONS = [
5978
6201
  "",
@@ -6007,20 +6230,6 @@ function withNonBotMentionContext(data, text) {
6007
6230
  ${text}` : context;
6008
6231
  }
6009
6232
  __name(withNonBotMentionContext, "withNonBotMentionContext");
6010
- function splitTextChunks(text, firstChunkLimit) {
6011
- if (!text)
6012
- return [text];
6013
- const chunks = [];
6014
- let offset = 0;
6015
- let chunkLimit = firstChunkLimit;
6016
- while (offset < text.length) {
6017
- chunks.push(text.slice(offset, offset + chunkLimit));
6018
- offset += chunkLimit;
6019
- chunkLimit = TEXT_MESSAGE_LIMIT;
6020
- }
6021
- return chunks;
6022
- }
6023
- __name(splitTextChunks, "splitTextChunks");
6024
6233
  var DingtalkChannel = class _DingtalkChannel extends ChannelBase {
6025
6234
  static {
6026
6235
  __name(this, "DingtalkChannel");
@@ -6031,7 +6240,6 @@ var DingtalkChannel = class _DingtalkChannel extends ChannelBase {
6031
6240
  seenMessages = /* @__PURE__ */ new Map();
6032
6241
  mentionTargets = /* @__PURE__ */ new Map();
6033
6242
  sessionMentionTargets = /* @__PURE__ */ new Map();
6034
- textReplySessions = /* @__PURE__ */ new Set();
6035
6243
  bufferedMentionTargets = /* @__PURE__ */ new Set();
6036
6244
  bufferedMentionTargetsBySession = /* @__PURE__ */ new Map();
6037
6245
  dedupTimer;
@@ -6115,7 +6323,7 @@ var DingtalkChannel = class _DingtalkChannel extends ChannelBase {
6115
6323
  statusCards: this.statusCardController,
6116
6324
  questionCards: this.questionCardController,
6117
6325
  ...config.blockStreaming !== "on" ? {
6118
- sendFallback: /* @__PURE__ */ __name((chatId, text, sessionId) => this.sendResponseMessage(chatId, text, sessionId), "sendFallback")
6326
+ sendFallback: /* @__PURE__ */ __name((chatId, text, sessionId) => this.sendFallbackReply(chatId, text, sessionId), "sendFallback")
6119
6327
  } : {}
6120
6328
  });
6121
6329
  }
@@ -6370,34 +6578,6 @@ var DingtalkChannel = class _DingtalkChannel extends ChannelBase {
6370
6578
  headers: { "Content-Type": "application/json" },
6371
6579
  body: JSON.stringify(body)
6372
6580
  });
6373
- if (!resp.ok) {
6374
- const detail = await resp.text().catch(() => "");
6375
- process.stderr.write(`[DingTalk:${this.name}] sendMessage failed: HTTP ${resp.status} ${detail}
6376
- `);
6377
- }
6378
- }
6379
- }
6380
- async sendTextReply(chatId, text, atUserId) {
6381
- const webhook = this.webhooks.get(chatId);
6382
- if (!webhook)
6383
- return;
6384
- const mentionPrefix = atUserId ? `@${atUserId}
6385
-
6386
- ` : "";
6387
- const chunks = splitTextChunks(text, TEXT_MESSAGE_LIMIT - mentionPrefix.length);
6388
- for (let i = 0; i < chunks.length; i++) {
6389
- const isMention = i === 0 && atUserId !== void 0;
6390
- const resp = await fetch(webhook, {
6391
- method: "POST",
6392
- headers: { "Content-Type": "application/json" },
6393
- body: JSON.stringify({
6394
- msgtype: "text",
6395
- text: {
6396
- content: isMention ? `${mentionPrefix}${chunks[i]}` : chunks[i]
6397
- },
6398
- ...isMention ? { at: { atUserIds: [atUserId] } } : {}
6399
- })
6400
- });
6401
6581
  if (isMention && process.env["QWEN_CHANNEL_DEBUG_MENTIONS"] === "1") {
6402
6582
  const payload = await resp.clone().json().catch(() => void 0);
6403
6583
  const response = payload && typeof payload === "object" ? payload : {};
@@ -6408,7 +6588,7 @@ var DingtalkChannel = class _DingtalkChannel extends ChannelBase {
6408
6588
  }
6409
6589
  if (!resp.ok) {
6410
6590
  const detail = await resp.text().catch(() => "");
6411
- process.stderr.write(`[DingTalk:${this.name}] sendTextReply failed: HTTP ${resp.status} ${detail}
6591
+ process.stderr.write(`[DingTalk:${this.name}] sendMessage failed: HTTP ${resp.status} ${detail}
6412
6592
  `);
6413
6593
  }
6414
6594
  }
@@ -6697,7 +6877,6 @@ var DingtalkChannel = class _DingtalkChannel extends ChannelBase {
6697
6877
  }
6698
6878
  }
6699
6879
  this.sessionMentionTargets.delete(sessionId);
6700
- this.textReplySessions.delete(sessionId);
6701
6880
  const cardRunId = this.cardRunBySession.get(sessionId);
6702
6881
  if (cardRunId) {
6703
6882
  this.cardRunBySession.delete(sessionId);
@@ -6726,7 +6905,8 @@ var DingtalkChannel = class _DingtalkChannel extends ChannelBase {
6726
6905
  if (event.runId && event.owner && inboundOwner?.ownerId === event.owner.id) {
6727
6906
  this.cardRuns.set(event.runId, inboundOwner);
6728
6907
  this.cardRunBySession.set(event.sessionId, event.runId);
6729
- this.interactionPresenter?.registerRun(event.runId, event.owner.id, inboundOwner.target);
6908
+ this.interactionPresenter?.registerRun(event.runId, event.owner.id, inboundOwner.target, event.sessionId, inboundOwner.sender);
6909
+ this.interactionPresenter?.startStatusCard(event.runId);
6730
6910
  }
6731
6911
  return;
6732
6912
  }
@@ -6784,7 +6964,6 @@ var DingtalkChannel = class _DingtalkChannel extends ChannelBase {
6784
6964
  this.mentionTargets.delete(messageId);
6785
6965
  if (this.atSender && atUserId) {
6786
6966
  this.sessionMentionTargets.set(sessionId, atUserId);
6787
- this.textReplySessions.add(sessionId);
6788
6967
  }
6789
6968
  }
6790
6969
  this.startReaction(chatId, messageId, sessionId);
@@ -6800,7 +6979,12 @@ var DingtalkChannel = class _DingtalkChannel extends ChannelBase {
6800
6979
  target: {
6801
6980
  chatId: envelope.chatId,
6802
6981
  isGroup: envelope.isGroup
6803
- }
6982
+ },
6983
+ ...this.atSender && envelope.isGroup ? {
6984
+ sender: {
6985
+ senderName: envelope.senderName
6986
+ }
6987
+ } : {}
6804
6988
  });
6805
6989
  if (this.inboundCardOwners.size > 1e3) {
6806
6990
  const oldest = this.inboundCardOwners.keys().next().value;
@@ -6834,22 +7018,17 @@ var DingtalkChannel = class _DingtalkChannel extends ChannelBase {
6834
7018
  }
6835
7019
  onPromptEnd(chatId, sessionId, messageId) {
6836
7020
  this.sessionMentionTargets.delete(sessionId);
6837
- this.textReplySessions.delete(sessionId);
6838
7021
  this.stopReaction(chatId, messageId, sessionId);
6839
7022
  }
6840
7023
  async sendResponseMessage(chatId, text, sessionId) {
6841
7024
  const atUserId = this.atSender ? this.sessionMentionTargets.get(sessionId) : void 0;
6842
7025
  if (atUserId)
6843
7026
  this.sessionMentionTargets.delete(sessionId);
6844
- if (this.textReplySessions.has(sessionId)) {
6845
- if (findImageMarkers(text).length > 0) {
6846
- await this.sendReply(chatId, text, atUserId);
6847
- return;
6848
- }
6849
- await this.sendTextReply(chatId, text, atUserId);
6850
- return;
6851
- }
6852
- await this.sendReply(chatId, text);
7027
+ await this.sendReply(chatId, text, atUserId);
7028
+ }
7029
+ async sendFallbackReply(chatId, text, sessionId) {
7030
+ const atUserId = this.atSender ? this.sessionMentionTargets.get(sessionId) : void 0;
7031
+ await this.sendReply(chatId, text, atUserId);
6853
7032
  }
6854
7033
  async onResponseComplete(chatId, text, sessionId, segment) {
6855
7034
  if (segment && this.interactionPresenter) {
@@ -7035,7 +7214,7 @@ var DingtalkChannel = class _DingtalkChannel extends ChannelBase {
7035
7214
  }
7036
7215
  ];
7037
7216
  } else {
7038
- const dir = join(tmpdir2(), "channel-files", randomUUID4());
7217
+ const dir = join(tmpdir2(), "channel-files", randomUUID5());
7039
7218
  mkdirSync(dir, { recursive: true });
7040
7219
  const safeName = basename2(fileName || "") || `dingtalk_${mediaType}_${Date.now()}`;
7041
7220
  const filePath = join(dir, safeName);