@qwen-code/qwen-code 0.21.6 → 0.21.7-nightly.20260808.4ec0371e6

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 (323) hide show
  1. package/bundled/qc-helper/docs/configuration/settings.md +50 -31
  2. package/bundled/qc-helper/docs/features/channels/dingtalk.md +41 -3
  3. package/bundled/qc-helper/docs/features/channels/feishu.md +13 -2
  4. package/bundled/qc-helper/docs/features/channels/github.md +13 -11
  5. package/bundled/qc-helper/docs/features/channels/gitlab.md +13 -11
  6. package/bundled/qc-helper/docs/features/channels/overview.md +49 -31
  7. package/bundled/qc-helper/docs/features/channels/plugins.md +2 -2
  8. package/bundled/qc-helper/docs/features/channels/qqbot.md +4 -2
  9. package/bundled/qc-helper/docs/features/channels/telegram.md +4 -2
  10. package/bundled/qc-helper/docs/features/channels/wecom.md +1 -1
  11. package/bundled/qc-helper/docs/features/code-review.md +31 -0
  12. package/bundled/qc-helper/docs/features/hooks.md +2 -0
  13. package/bundled/qc-helper/docs/qwen-serve.md +4 -1
  14. package/bundled/review/SKILL.md +52 -16
  15. package/chunks/{MaxSizedBox-2HFKP4LI.js → MaxSizedBox-COZBVNCI.js} +42 -41
  16. package/chunks/{StandaloneSessionPicker-RBV72M5N.js → StandaloneSessionPicker-3OF2FS6S.js} +59 -57
  17. package/chunks/{acpAgent-WO6JFCVQ.js → acpAgent-3JCJ6KWG.js} +236 -185
  18. package/chunks/{agent-AHGLYNZ4.js → agent-DBSC47CD.js} +39 -38
  19. package/chunks/{agent-headless-NTXKKGRO.js → agent-headless-ZJHZ7I3S.js} +39 -38
  20. package/chunks/{anthropicContentGenerator-3CAHEZBM.js → anthropicContentGenerator-SSFE2753.js} +15 -15
  21. package/chunks/{artifact-tool-RROCCJDA.js → artifact-tool-N652YE4L.js} +2 -2
  22. package/chunks/{askUserQuestion-2EPPBPUZ.js → askUserQuestion-ONW74PKJ.js} +2 -2
  23. package/chunks/{bridge-RPAU64CA.js → bridge-NFBYT4ZI.js} +43 -42
  24. package/chunks/{channel-management-service-IGEUOVRT.js → channel-management-service-LXSJXQGM.js} +19 -10
  25. package/chunks/{channel-settings-store-ON64MF7G.js → channel-settings-store-LABKDKSI.js} +46 -45
  26. package/chunks/{channel-worker-group-JWQK224X.js → channel-worker-group-MTW2AGT3.js} +4 -4
  27. package/chunks/{channel-worker-manager-77E3OXRQ.js → channel-worker-manager-UU6PTQSI.js} +4 -4
  28. package/chunks/{channel-worker-supervisor-62YWUGP2.js → channel-worker-supervisor-5SRD24FG.js} +3 -3
  29. package/chunks/{chunk-XC656O42.js → chunk-22NBYCPD.js} +3 -3
  30. package/chunks/{chunk-K2B3X3E7.js → chunk-26ISE5EG.js} +4 -4
  31. package/chunks/{chunk-Z7JILXGX.js → chunk-2UUMVNYT.js} +3 -3
  32. package/chunks/{chunk-ACZRB7AD.js → chunk-3ARO4N5G.js} +3 -3
  33. package/chunks/{chunk-CJ5WLD5Y.js → chunk-3HS6Y4UA.js} +96 -22
  34. package/chunks/{chunk-MBEMTXQT.js → chunk-3K7FH2KQ.js} +1 -32
  35. package/chunks/{chunk-QYPT3QUD.js → chunk-3ULCB3NE.js} +3 -3
  36. package/chunks/{chunk-IMOQO6YL.js → chunk-4Q6N3SNL.js} +1 -1
  37. package/chunks/{chunk-3UOLYNTF.js → chunk-4QJJHIZ5.js} +23 -14
  38. package/chunks/{chunk-VGFPFM4U.js → chunk-5PGKKSO6.js} +42 -16
  39. package/chunks/{chunk-NGJOAKJY.js → chunk-5YT3Y33M.js} +3 -3
  40. package/chunks/{chunk-T4JSA7KU.js → chunk-64YLXLMY.js} +3 -3
  41. package/chunks/{chunk-5L6CQ4ZU.js → chunk-6M26GBKX.js} +2 -2
  42. package/chunks/{chunk-ZPPP6VCL.js → chunk-6ZRFAKXK.js} +1 -1
  43. package/chunks/{chunk-OP2OHZ7K.js → chunk-764F335K.js} +18 -9
  44. package/chunks/{chunk-PPUOYL77.js → chunk-77WOUGCA.js} +53 -22
  45. package/chunks/{chunk-33FNCQSY.js → chunk-7MH4J33A.js} +2 -2
  46. package/chunks/{chunk-S7CV4KO6.js → chunk-AB4A73VL.js} +2 -2
  47. package/chunks/{chunk-O7V7N4G7.js → chunk-ACHMWGC5.js} +198 -35
  48. package/chunks/{chunk-NKSF7HYF.js → chunk-AG3P2RES.js} +1 -1
  49. package/chunks/{chunk-6PEXNQTX.js → chunk-ALFTV7GA.js} +26 -2
  50. package/chunks/{chunk-JELIWHXD.js → chunk-AOHJKPKL.js} +1 -1
  51. package/chunks/{chunk-XA4TMLFN.js → chunk-APMRLB2H.js} +580 -394
  52. package/chunks/{chunk-75QMRMO7.js → chunk-APNNM3JC.js} +3 -3
  53. package/chunks/{chunk-GLNBDYUX.js → chunk-AXMWHKXA.js} +6 -2
  54. package/chunks/{chunk-VNQCPBC2.js → chunk-B23P3YWE.js} +3 -3
  55. package/chunks/{chunk-H36SETQS.js → chunk-B2GJNDTV.js} +1 -1
  56. package/chunks/{chunk-Q5RM32DR.js → chunk-BCMJPTXV.js} +1 -1
  57. package/chunks/{chunk-A4VTILZT.js → chunk-BFSQBXHV.js} +714 -398
  58. package/chunks/{chunk-QMBEW7EW.js → chunk-BGG4MBYD.js} +2 -2
  59. package/chunks/{chunk-SLSWFHDF.js → chunk-BJKFFPX2.js} +4 -4
  60. package/chunks/{chunk-N2GJU6KI.js → chunk-BN3OROB3.js} +12 -12
  61. package/chunks/chunk-CE5UCTKO.js +3508 -0
  62. package/chunks/{chunk-2UISUFHQ.js → chunk-CJXIIILK.js} +3 -3
  63. package/chunks/{chunk-WK4TJUEA.js → chunk-CKASRHZI.js} +1 -1
  64. package/chunks/chunk-CPG6P4GG.js +82 -0
  65. package/chunks/{chunk-KKN2IE7Q.js → chunk-CTJLZLB5.js} +1 -1
  66. package/chunks/{chunk-DIEFUBV6.js → chunk-DIWZNWZT.js} +205 -35
  67. package/chunks/{chunk-CA4UIDFU.js → chunk-DPH3MUAP.js} +1 -1
  68. package/chunks/{chunk-4LKVQFHM.js → chunk-DREZZAZM.js} +2 -2
  69. package/chunks/{chunk-2DNKEBXY.js → chunk-EI3HZX6C.js} +1 -1
  70. package/chunks/{chunk-U25CMJYY.js → chunk-EKPKKXY2.js} +1 -1
  71. package/chunks/{chunk-432XCUHF.js → chunk-EQL65XGA.js} +1 -1
  72. package/chunks/{chunk-TYERNYH4.js → chunk-EUNWC2VS.js} +2 -2
  73. package/chunks/{chunk-4JH77A2U.js → chunk-EZ53KMUN.js} +1 -1
  74. package/chunks/{chunk-HY25ULVN.js → chunk-F3LPXDJP.js} +157 -56
  75. package/chunks/{chunk-D3UEZIQH.js → chunk-FJ6YHWHZ.js} +2 -2
  76. package/chunks/{chunk-UH7Z7Y45.js → chunk-FOGU3LJX.js} +1 -1
  77. package/chunks/{chunk-E4WHKETF.js → chunk-FVKHVJZQ.js} +2 -49
  78. package/chunks/{chunk-YZQTA3ID.js → chunk-GDXET5XU.js} +31 -3396
  79. package/chunks/{chunk-A5YZ3FA2.js → chunk-GM463R2B.js} +1 -1
  80. package/chunks/{chunk-MOHAWIAW.js → chunk-GNPNYXJB.js} +2 -2
  81. package/chunks/{chunk-SUKEUUAA.js → chunk-GUFY6D3E.js} +1 -1
  82. package/chunks/{chunk-FZFP7RZI.js → chunk-H2352CX2.js} +3 -3
  83. package/chunks/{chunk-GWRHVJY2.js → chunk-HKCYGZZ4.js} +22 -22
  84. package/chunks/{chunk-3PRJYMXC.js → chunk-HUWENAHO.js} +1 -1
  85. package/chunks/{chunk-G5NNWEYE.js → chunk-HY2INPTA.js} +4 -4
  86. package/chunks/{chunk-WVAESIM6.js → chunk-IA7TGCN2.js} +4 -4
  87. package/chunks/{chunk-HU5TUALO.js → chunk-IIJEYBNH.js} +3 -3
  88. package/chunks/{chunk-XM2O73NC.js → chunk-IMK3SJ43.js} +5703 -4343
  89. package/chunks/{chunk-4S4OEQ6U.js → chunk-J6SZID63.js} +2 -2
  90. package/chunks/{chunk-OWSW7EYP.js → chunk-JACAHYEN.js} +7 -7
  91. package/chunks/{chunk-R5RBXLNC.js → chunk-JRIJOZXO.js} +5 -5
  92. package/chunks/{chunk-SQOMTWQT.js → chunk-JSJTZ6GO.js} +4 -4
  93. package/chunks/{chunk-VWOVHOTT.js → chunk-KJZ26VBX.js} +1 -1
  94. package/chunks/{chunk-BFHXDAR7.js → chunk-KKBPOU75.js} +1 -1
  95. package/chunks/{chunk-TGGEZINK.js → chunk-KKRGVSHC.js} +7 -7
  96. package/chunks/{chunk-RK2EE3T7.js → chunk-KPMB4JEZ.js} +4 -4
  97. package/chunks/{chunk-MKVZE4ZJ.js → chunk-KTJFU7RT.js} +3 -2
  98. package/chunks/{chunk-MGSSJT27.js → chunk-L4N6TIP7.js} +5 -3
  99. package/chunks/{chunk-U4AF3QLU.js → chunk-L4OW63GW.js} +8 -8
  100. package/chunks/{chunk-C4CBJQKY.js → chunk-LDUGDB5H.js} +1 -1
  101. package/chunks/{chunk-W5DXUTXD.js → chunk-LDY4J4G6.js} +8 -8
  102. package/chunks/{chunk-GK2H5GRC.js → chunk-LMEIS6WW.js} +16 -6
  103. package/chunks/{chunk-6O5DVH27.js → chunk-M6HMMKVG.js} +1 -1
  104. package/chunks/{chunk-TOGZTG4X.js → chunk-MIA37QO3.js} +2 -2
  105. package/chunks/{chunk-536SWZTA.js → chunk-MV7VUCIG.js} +4 -4
  106. package/chunks/{chunk-T5U6IM4C.js → chunk-MVUQRLOH.js} +3 -3
  107. package/chunks/{chunk-GLWP3FDB.js → chunk-MZSJ43WV.js} +31 -2
  108. package/chunks/{chunk-UGTWD35F.js → chunk-NLREQJFK.js} +1 -1
  109. package/chunks/{chunk-RFUHDCNF.js → chunk-O7VQ3F22.js} +1 -1
  110. package/chunks/{chunk-3RXUYQJI.js → chunk-OIVKILPI.js} +49 -0
  111. package/chunks/{chunk-LBWNSLJK.js → chunk-ONSZH6VM.js} +2 -2
  112. package/chunks/{chunk-4WTAQEHV.js → chunk-OQTXYMKW.js} +3 -3
  113. package/chunks/{chunk-DYA25Y7U.js → chunk-OWMAZHIX.js} +1 -1
  114. package/chunks/{chunk-LAAFLUQV.js → chunk-P74TZRXD.js} +2 -2
  115. package/chunks/{chunk-BOGOR4HB.js → chunk-P7HUJDBZ.js} +7 -7
  116. package/chunks/chunk-PJRW65JO.js +107 -0
  117. package/chunks/{chunk-D7D7RXIJ.js → chunk-PYQADEFD.js} +6 -1
  118. package/chunks/{chunk-WO2B5E5B.js → chunk-Q3JQ7OSU.js} +1 -1
  119. package/chunks/{chunk-3LZKY4V4.js → chunk-QKJT5K4Q.js} +5 -5
  120. package/chunks/{chunk-OXX3FG2N.js → chunk-R2KZWK5Z.js} +3 -3
  121. package/chunks/{chunk-QZKYZCN3.js → chunk-REHWPCG2.js} +3 -3
  122. package/chunks/{chunk-2POQWYM6.js → chunk-RFA6VDCR.js} +3 -3
  123. package/chunks/{chunk-DIT4V3XH.js → chunk-RGTB44BO.js} +1 -1
  124. package/chunks/{chunk-SQC6K5HI.js → chunk-RPWVIXDB.js} +19 -2
  125. package/chunks/{chunk-ODPXHGLL.js → chunk-RZMGG3HP.js} +2 -2
  126. package/chunks/{chunk-2AGOQ7QO.js → chunk-S6HYI3MF.js} +118 -6
  127. package/chunks/chunk-SAH4BD2J.js +92 -0
  128. package/chunks/{chunk-JE44IPH6.js → chunk-SDUDZNF4.js} +2 -2
  129. package/chunks/{chunk-YAVY33G4.js → chunk-SEZ556DZ.js} +1 -1
  130. package/chunks/chunk-SOORFWKY.js +155 -0
  131. package/chunks/{chunk-KHUA3NQV.js → chunk-TAOSTUHI.js} +2 -2
  132. package/chunks/{chunk-VSALQLT7.js → chunk-TSYIQDG7.js} +1 -1
  133. package/chunks/{chunk-ULPQQSDN.js → chunk-TX3KSSDN.js} +3 -3
  134. package/chunks/{chunk-KVUBYJDM.js → chunk-TZEZYNYD.js} +1 -1
  135. package/chunks/{chunk-24ER7UV4.js → chunk-UFALT4LK.js} +1 -1
  136. package/chunks/{chunk-GESMMPAK.js → chunk-UKAYEQDU.js} +91 -63
  137. package/chunks/{chunk-XC2VAFVZ.js → chunk-UVX4Y6IN.js} +1 -1
  138. package/chunks/chunk-VDS2WYM5.js +244 -0
  139. package/chunks/{chunk-DVBEGGLG.js → chunk-VLFX3L3X.js} +10 -9
  140. package/chunks/{chunk-WNU7TZTO.js → chunk-VT3VNFVW.js} +3 -3
  141. package/chunks/{chunk-6WBWIPBF.js → chunk-WAUGQKUU.js} +4 -64
  142. package/chunks/{chunk-URN76TKR.js → chunk-WCG5O7IP.js} +2 -2
  143. package/chunks/{chunk-PX5DNLSA.js → chunk-XCG76UE6.js} +18 -10
  144. package/chunks/{chunk-TSERKWCX.js → chunk-XCWO3SMQ.js} +3 -3
  145. package/chunks/{chunk-5MJGUQU5.js → chunk-XIDHBXUI.js} +3 -3
  146. package/chunks/{chunk-3LGZEYOF.js → chunk-YHEEE624.js} +2 -2
  147. package/chunks/{chunk-SKNE3KQC.js → chunk-Z5ZAWED3.js} +19 -10
  148. package/chunks/{chunk-YMBOEAF4.js → chunk-Z6W3XDLN.js} +1 -1
  149. package/chunks/{chunk-EXCEQD22.js → chunk-ZKUJ4AO7.js} +4 -4
  150. package/chunks/{chunk-RHTTKJTP.js → chunk-ZQGHESAS.js} +1 -1
  151. package/chunks/{chunk-WUC6ZFXO.js → chunk-ZWBUH5UP.js} +1 -1
  152. package/chunks/{computer-use-5HXJ2P4X.js → computer-use-QLJ27OCZ.js} +39 -38
  153. package/chunks/{config-utils-VXD4SPVR.js → config-utils-KIEXWA4F.js} +4 -4
  154. package/chunks/{contextCommand-7BEHRX2H.js → contextCommand-JDTOJRBO.js} +41 -40
  155. package/chunks/{core-runtime-U4VJ5TIV.js → core-runtime-MZIAVYQC.js} +43 -42
  156. package/chunks/{create-sub-session-6EWLAZD5.js → create-sub-session-QIDZUOPU.js} +2 -2
  157. package/chunks/{create-sub-session-QZNQY332.js → create-sub-session-YBBCNSHE.js} +39 -38
  158. package/chunks/{cron-create-CCRIULJE.js → cron-create-VONA5JYY.js} +4 -4
  159. package/chunks/{cron-delete-FCFW6BGP.js → cron-delete-5JXSP2MI.js} +4 -4
  160. package/chunks/{cron-list-QDBVCHRF.js → cron-list-KE4F2CIR.js} +4 -4
  161. package/chunks/{daemon-YI5RY62O.js → daemon-SCTQMM7Z.js} +50 -2
  162. package/chunks/{daemon-status-provider-UJUGTDTL.js → daemon-status-provider-BZ7RD4ZJ.js} +47 -46
  163. package/chunks/{daemon-trust-policy-ZHDD5VYQ.js → daemon-trust-policy-2E4C3M7S.js} +45 -44
  164. package/chunks/{daemon-trust-policy-monitor-5SHYBDGA.js → daemon-trust-policy-monitor-UYLFH6RW.js} +45 -44
  165. package/chunks/{deferred-core-runtime-QWAEBTR5.js → deferred-core-runtime-6XZYMJZB.js} +39 -38
  166. package/chunks/{display-image-GUJA352B.js → display-image-NQRSIBXM.js} +4 -4
  167. package/chunks/{dist-SFQ34F4M.js → dist-26RK5XZO.js} +1 -1
  168. package/chunks/{dist-DPPHJAVL.js → dist-BATY7GI4.js} +187 -6
  169. package/chunks/{dist-A7H2KKUC.js → dist-HIACTZEK.js} +332 -113
  170. package/chunks/{dist-3BMEUGTG.js → dist-IRL7WA5Z.js} +1 -1
  171. package/chunks/{dist-HVBMEYWK.js → dist-KVISB2O2.js} +1 -1
  172. package/chunks/{dist-KS4O2NKE.js → dist-MBF3I5MX.js} +14 -8
  173. package/chunks/{dist-7JGAAQSC.js → dist-RCH3I7SS.js} +2 -2
  174. package/chunks/{dist-C5U4LJKW.js → dist-TUSWNE2I.js} +5 -4
  175. package/chunks/{earlyInputCapture-5BMSGKOI.js → earlyInputCapture-LATQCGDC.js} +40 -39
  176. package/chunks/{edit-IVQQVYYK.js → edit-72DP57CD.js} +39 -38
  177. package/chunks/{enter-worktree-P3DF2N6O.js → enter-worktree-B4FY2ZPP.js} +39 -38
  178. package/chunks/{enterPlanMode-KKTDVLAD.js → enterPlanMode-TQBWGCPL.js} +39 -38
  179. package/chunks/{environment-W5TRDM3G.js → environment-MOGZGZDS.js} +42 -41
  180. package/chunks/{errors-GJJB36IG.js → errors-PGON5GH7.js} +41 -40
  181. package/chunks/{exit-worktree-LV5RLOCU.js → exit-worktree-EYUD4YP2.js} +39 -38
  182. package/chunks/{exitPlanMode-TUGOB2LL.js → exitPlanMode-4Q7BSQXR.js} +39 -38
  183. package/chunks/{fast-path-2FU23PAQ.js → fast-path-WI7D5MER.js} +23 -3
  184. package/chunks/{fast-path-settings-WQJU2LAT.js → fast-path-settings-YBRL24DB.js} +2 -2
  185. package/chunks/{gemini-KDULDQPP.js → gemini-ZXURGM6Y.js} +87 -82
  186. package/chunks/{geminiContentGenerator-LOCFHNVA.js → geminiContentGenerator-EOODO75Y.js} +6 -6
  187. package/chunks/{glob-Z4NQFKWS.js → glob-QNRIUOS6.js} +39 -38
  188. package/chunks/{goal-tools-3AZKX5WQ.js → goal-tools-QSYW65HV.js} +3 -3
  189. package/chunks/{grep-Z67Z7EN6.js → grep-56MTW67B.js} +39 -38
  190. package/chunks/{handleAutoUpdate-DFUZE6I6.js → handleAutoUpdate-XGFIPVT4.js} +43 -42
  191. package/chunks/{i18n-R4FMZ7N2.js → i18n-RZB35L4B.js} +40 -39
  192. package/chunks/{image-gen-4CQJPQP5.js → image-gen-OE2EEKN3.js} +9 -9
  193. package/chunks/{initializer-DK672ZVE.js → initializer-YPVMTMKD.js} +46 -45
  194. package/chunks/{installationInfo-PO4Z3ES7.js → installationInfo-ZTMTMYNW.js} +40 -39
  195. package/chunks/{keychain-token-storage-7BT4TQ2A.js → keychain-token-storage-TVAMTNP7.js} +2 -2
  196. package/chunks/{list-QXQF6C53.js → list-NIW3WID5.js} +48 -47
  197. package/chunks/{list-agents-GC4BRET7.js → list-agents-Z4WABFDZ.js} +2 -2
  198. package/chunks/{loadedSettingsAdapter-4D7GUGW6.js → loadedSettingsAdapter-VSLILTOZ.js} +45 -44
  199. package/chunks/{loggingContentGenerator-2P3MNACM.js → loggingContentGenerator-KFZYVAGV.js} +17 -17
  200. package/chunks/{loop-wakeup-SQQSBMEY.js → loop-wakeup-UZ5RL5Y2.js} +5 -5
  201. package/chunks/{ls-63CC3NNX.js → ls-TVHDGIES.js} +4 -4
  202. package/chunks/{lsp-P6NVJVNT.js → lsp-CVN6OQPI.js} +2 -2
  203. package/chunks/{managed-npm-update-LWVJQTWO.js → managed-npm-update-WHTA2K5V.js} +40 -39
  204. package/chunks/{mcp-GHETAR6V.js → mcp-7KGK3CS3.js} +45 -44
  205. package/chunks/{monitor-4T7W4M6Q.js → monitor-FDWEJQWP.js} +39 -38
  206. package/chunks/nonInteractiveCli-2MVJ6TCS.js +155 -0
  207. package/chunks/{notebook-edit-OC2V7U5D.js → notebook-edit-ZUVK2XWE.js} +47 -38
  208. package/chunks/{openaiContentGenerator-RAJUFWQY.js → openaiContentGenerator-TNLWOPH5.js} +28 -21
  209. package/chunks/{pidfile-HVPYVRLS.js → pidfile-BB6SKPH2.js} +40 -39
  210. package/chunks/{process-registry-2CHQBXH5.js → process-registry-PMJOA5CO.js} +15 -0
  211. package/chunks/{processUtils-VIQ4JHVX.js → processUtils-WKHJOPDH.js} +2 -2
  212. package/chunks/{qwenContentGenerator-2QLCUFNZ.js → qwenContentGenerator-FZS2DYF7.js} +48 -46
  213. package/chunks/{qwenOAuth2-J2X3EN43.js → qwenOAuth2-UYMYRXBB.js} +9 -9
  214. package/chunks/{read-file-ZNAN2B26.js → read-file-FMTE6LPA.js} +10 -10
  215. package/chunks/{read-mcp-resource-RTSSEER5.js → read-mcp-resource-PZ4ZF6YL.js} +2 -2
  216. package/chunks/{record-artifact-E6AWQU2Z.js → record-artifact-P4HFMS7X.js} +3 -3
  217. package/chunks/{resumeHistoryUtils-RCY7AL5Y.js → resumeHistoryUtils-Z34RCZFF.js} +45 -43
  218. package/chunks/{ripGrep-C3KMLZM5.js → ripGrep-DUIYUZGM.js} +39 -38
  219. package/chunks/{run-qwen-serve-3JN75CIQ.js → run-qwen-serve-KOHHR3F4.js} +145 -62
  220. package/chunks/{runtime-VUA4WQYD.js → runtime-K4NTZSAU.js} +50 -49
  221. package/chunks/{scheduler-Z4IBXCOY.js → scheduler-6G6AMURS.js} +39 -38
  222. package/chunks/{sdk-exporters-http-IL2346MJ.js → sdk-exporters-http-KHAB5JSD.js} +2 -2
  223. package/chunks/{sdk-impl-SYKGVWOZ.js → sdk-impl-KD7FSTC3.js} +2 -2
  224. package/chunks/{send-message-TL6FIMMN.js → send-message-CAMSLG2L.js} +6 -5
  225. package/chunks/{serve-67T3P7XI.js → serve-NMG2TM5K.js} +46 -45
  226. package/chunks/{server-46ZO2CLV.js → server-FS7KDELS.js} +679 -360
  227. package/chunks/{session-B4IFAFC4.js → session-XZADUVKJ.js} +82 -81
  228. package/chunks/{settings-AI2BTBOZ.js → settings-G75R6FOA.js} +44 -43
  229. package/chunks/{shell-BKII3B6E.js → shell-3D3PMQHE.js} +39 -38
  230. package/chunks/{skill-6CFOWVGA.js → skill-TSEYMVQ2.js} +14 -14
  231. package/chunks/{skill-settings-6BFQWMW4.js → skill-settings-HJC2CPBJ.js} +44 -43
  232. package/chunks/{spawnChannel-FJXW35U7.js → spawnChannel-YWCN74G5.js} +41 -40
  233. package/chunks/{standalone-update-WVINHRNS.js → standalone-update-HLYOLX6V.js} +41 -40
  234. package/chunks/{startInteractiveUI-YE57CJ57.js → startInteractiveUI-ROUIQ5KU.js} +486 -187
  235. package/chunks/{syntheticOutput-BN7E626U.js → syntheticOutput-PEBJQYJV.js} +3 -3
  236. package/chunks/{task-create-Q727MXHJ.js → task-create-5NWCQSJF.js} +10 -9
  237. package/chunks/{task-list-G6KPQ5JT.js → task-list-53265TRZ.js} +5 -5
  238. package/chunks/{task-stop-TNXRNAL2.js → task-stop-FPCOIRYX.js} +2 -2
  239. package/chunks/{task-update-YB7PXO4R.js → task-update-5HN577LS.js} +10 -9
  240. package/chunks/{team-create-GNC7NFY6.js → team-create-OTP5SSB2.js} +39 -38
  241. package/chunks/{team-delete-GDO7H2T4.js → team-delete-MMQB4OSC.js} +5 -5
  242. package/chunks/{team-plan-approval-ECALJLIO.js → team-plan-approval-TQX5TMXU.js} +39 -38
  243. package/chunks/{terminal-image-renderer-II74TFVW.js → terminal-image-renderer-KF3GKNWW.js} +45 -39
  244. package/chunks/{theme-manager-2MGEDD22.js → theme-manager-XVWAAGAM.js} +40 -39
  245. package/chunks/{todoWrite-MHWHO5UO.js → todoWrite-JGV6VLOX.js} +4 -4
  246. package/chunks/{tool-search-S6LRRACA.js → tool-search-7N4D4O56.js} +14 -13
  247. package/chunks/{total-session-admission-7WVAWQPU.js → total-session-admission-ZQ4VKIRW.js} +43 -42
  248. package/chunks/{trustedFolders-NFS4KHO4.js → trustedFolders-4XYFPWVV.js} +40 -39
  249. package/chunks/{update-relaunch-Q5HLZ6UW.js → update-relaunch-L4GSBLUU.js} +5 -5
  250. package/chunks/{updateCheck-UOVZSTP7.js → updateCheck-PCUTVRFE.js} +42 -41
  251. package/chunks/{useAutoAcceptIndicator-PC6MOJCO.js → useAutoAcceptIndicator-WMXY7MND.js} +47 -46
  252. package/chunks/{validateNonInterActiveAuth-YMQP3ZM7.js → validateNonInterActiveAuth-5S3U2D56.js} +78 -77
  253. package/chunks/{version-T4AQFZJH.js → version-P57IQU2T.js} +1 -1
  254. package/chunks/{web-fetch-JQCJHEEX.js → web-fetch-5ZLLLCDD.js} +13 -13
  255. package/chunks/{web-search-QGZ2KY4G.js → web-search-NELKANTW.js} +10 -10
  256. package/chunks/web-shell-static-O73YPVVC.js +33 -0
  257. package/chunks/{workflow-YIT27YWZ.js → workflow-RXKBF3LO.js} +42 -40
  258. package/chunks/{workspace-providers-status-FIDZQ2PL.js → workspace-providers-status-HAEMNAWC.js} +48 -47
  259. package/chunks/{workspace-registration-store-RCSPE4DU.js → workspace-registration-store-U3U3YM6V.js} +1 -1
  260. package/chunks/{workspace-registry-5PEUCY6E.js → workspace-registry-ZFP33GVB.js} +43 -42
  261. package/chunks/{workspace-service-LANDVPL7.js → workspace-service-QMISJBMA.js} +50 -49
  262. package/chunks/{workspace-skills-status-2IQVJNIN.js → workspace-skills-status-K7EOUGXL.js} +46 -45
  263. package/chunks/{workspace-trust-reconciler-CZPZZCZC.js → workspace-trust-reconciler-BFPKULDZ.js} +50 -49
  264. package/chunks/{write-file-G5VNGCOG.js → write-file-2F76RRFE.js} +39 -38
  265. package/chunks/{zoom-image-6RBLD7X6.js → zoom-image-DPR22XWY.js} +10 -10
  266. package/cli.js +12 -12
  267. package/package.json +3 -3
  268. package/web-shell/assets/{arc-B-Vtkp1W.js → arc-CunFPPcQ.js} +1 -1
  269. package/web-shell/assets/{architectureDiagram-3BPJPVTR-qmTXIj64.js → architectureDiagram-3BPJPVTR-D3SqCgeM.js} +1 -1
  270. package/web-shell/assets/{blockDiagram-GPEHLZMM-ZlnXEtdP.js → blockDiagram-GPEHLZMM-CPRx90S_.js} +1 -1
  271. package/web-shell/assets/{c4Diagram-AAUBKEIU-Wyoirf6Z.js → c4Diagram-AAUBKEIU-CahP9Ue4.js} +1 -1
  272. package/web-shell/assets/channel-zbv7GWAw.js +1 -0
  273. package/web-shell/assets/{chunk-2J33WTMH-WQwbq9d8.js → chunk-2J33WTMH-DckIWZ12.js} +1 -1
  274. package/web-shell/assets/{chunk-4BX2VUAB-DQKnAXC4.js → chunk-4BX2VUAB-D2Kfctyn.js} +1 -1
  275. package/web-shell/assets/{chunk-55IACEB6-DIdgXNcO.js → chunk-55IACEB6-DkI11FTX.js} +1 -1
  276. package/web-shell/assets/{chunk-727SXJPM-CUwGOLEd.js → chunk-727SXJPM-rR-TSCIi.js} +1 -1
  277. package/web-shell/assets/{chunk-AQP2D5EJ-CCBGZFZ4.js → chunk-AQP2D5EJ-DFGKcGRO.js} +1 -1
  278. package/web-shell/assets/{chunk-FMBD7UC4-DMGXProk.js → chunk-FMBD7UC4-CjWqcTPE.js} +1 -1
  279. package/web-shell/assets/{chunk-ND2GUHAM-yejcFqsh.js → chunk-ND2GUHAM-RXe-87UV.js} +1 -1
  280. package/web-shell/assets/{chunk-QZHKN3VN-DxCyqTf7.js → chunk-QZHKN3VN-Dz0c_Yrn.js} +1 -1
  281. package/web-shell/assets/classDiagram-4FO5ZUOK-DSjLkJJZ.js +1 -0
  282. package/web-shell/assets/classDiagram-v2-Q7XG4LA2-DSjLkJJZ.js +1 -0
  283. package/web-shell/assets/{cose-bilkent-S5V4N54A-DOrF3cg_.js → cose-bilkent-S5V4N54A-ZHF0-jvV.js} +1 -1
  284. package/web-shell/assets/{dagre-BM42HDAG-Be6CdYQ_.js → dagre-BM42HDAG-7Umz_ygJ.js} +1 -1
  285. package/web-shell/assets/{diagram-2AECGRRQ-B_Rjsft2.js → diagram-2AECGRRQ-DomN8nxq.js} +1 -1
  286. package/web-shell/assets/{diagram-5GNKFQAL-BvQbKSm1.js → diagram-5GNKFQAL-eebvj2OL.js} +1 -1
  287. package/web-shell/assets/{diagram-KO2AKTUF-BsdmMdpS.js → diagram-KO2AKTUF-IR1mmn9d.js} +1 -1
  288. package/web-shell/assets/{diagram-LMA3HP47-CrQlBaNr.js → diagram-LMA3HP47-CKysx5KF.js} +1 -1
  289. package/web-shell/assets/{diagram-OG6HWLK6-aB1MD_DL.js → diagram-OG6HWLK6-cBy5puHn.js} +1 -1
  290. package/web-shell/assets/{erDiagram-TEJ5UH35-F-eUUn9n.js → erDiagram-TEJ5UH35-B5RJagPG.js} +1 -1
  291. package/web-shell/assets/{flowDiagram-I6XJVG4X-DY_d8lUK.js → flowDiagram-I6XJVG4X-CfHgDmPg.js} +1 -1
  292. package/web-shell/assets/{ganttDiagram-6RSMTGT7-Dqu7KBPg.js → ganttDiagram-6RSMTGT7-DUfFF5nb.js} +1 -1
  293. package/web-shell/assets/{gitGraphDiagram-PVQCEYII-2IkU_VEj.js → gitGraphDiagram-PVQCEYII-M9dt57k5.js} +1 -1
  294. package/web-shell/assets/{index-QQlUCJGg.css → index-B8e-CkuC.css} +2 -2
  295. package/web-shell/assets/{index-BuSbqggh.js → index-CKjO4myk.js} +1 -1
  296. package/web-shell/assets/index-Dc-fTO0V.js +1768 -0
  297. package/web-shell/assets/{infoDiagram-5YYISTIA-C4orwzPw.js → infoDiagram-5YYISTIA-CTKMmIro.js} +1 -1
  298. package/web-shell/assets/{ishikawaDiagram-YF4QCWOH-fXUEfef_.js → ishikawaDiagram-YF4QCWOH-DJIJDP4s.js} +1 -1
  299. package/web-shell/assets/{journeyDiagram-JHISSGLW-Bs0I1_J5.js → journeyDiagram-JHISSGLW-DgRnvn6S.js} +1 -1
  300. package/web-shell/assets/{kanban-definition-UN3LZRKU-BPRj1dw_.js → kanban-definition-UN3LZRKU-VUwO8yrg.js} +1 -1
  301. package/web-shell/assets/{linear-DFS6ZDpW.js → linear-BCvgV5I_.js} +1 -1
  302. package/web-shell/assets/{mermaid.core-CZxjWMaO.js → mermaid.core-mv_kVV6q.js} +5 -5
  303. package/web-shell/assets/{mindmap-definition-RKZ34NQL-Dsr3PmNs.js → mindmap-definition-RKZ34NQL-sfnjMlOd.js} +1 -1
  304. package/web-shell/assets/{pieDiagram-4H26LBE5-D5Ngpz5Y.js → pieDiagram-4H26LBE5-BlhICse4.js} +1 -1
  305. package/web-shell/assets/{quadrantDiagram-W4KKPZXB-WJK9I25z.js → quadrantDiagram-W4KKPZXB-BgTQzwen.js} +1 -1
  306. package/web-shell/assets/{requirementDiagram-4Y6WPE33-CmrYcwOH.js → requirementDiagram-4Y6WPE33-CZ-FTrrN.js} +1 -1
  307. package/web-shell/assets/{sankeyDiagram-5OEKKPKP-7SjCc4Mv.js → sankeyDiagram-5OEKKPKP-G5Wp_jn3.js} +1 -1
  308. package/web-shell/assets/{sequenceDiagram-3UESZ5HK-Dl9E0IRM.js → sequenceDiagram-3UESZ5HK-C8MKZ3i1.js} +1 -1
  309. package/web-shell/assets/{stateDiagram-AJRCARHV-CRRio7yV.js → stateDiagram-AJRCARHV-Bo0ZDm7y.js} +1 -1
  310. package/web-shell/assets/stateDiagram-v2-BHNVJYJU-31TSCPcH.js +1 -0
  311. package/web-shell/assets/{timeline-definition-PNZ67QCA-DVyXjjfq.js → timeline-definition-PNZ67QCA-M3L9E01f.js} +1 -1
  312. package/web-shell/assets/{vennDiagram-CIIHVFJN-Nb2Lckzq.js → vennDiagram-CIIHVFJN-DD4eHCrm.js} +1 -1
  313. package/web-shell/assets/{wardley-L42UT6IY-DuL_otIP.js → wardley-L42UT6IY-DNEL_3g4.js} +1 -1
  314. package/web-shell/assets/{wardleyDiagram-YWT4CUSO-DVI9Q4Aa.js → wardleyDiagram-YWT4CUSO-q484OoqI.js} +1 -1
  315. package/web-shell/assets/{xychartDiagram-2RQKCTM6-BNjAm7KD.js → xychartDiagram-2RQKCTM6-4mcNt1Yg.js} +1 -1
  316. package/web-shell/index.html +2 -2
  317. package/chunks/chunk-EMYZIABH.js +0 -81
  318. package/chunks/nonInteractiveCli-P4UKCJFM.js +0 -154
  319. package/web-shell/assets/channel-DXaHnfjS.js +0 -1
  320. package/web-shell/assets/classDiagram-4FO5ZUOK-BigU82A0.js +0 -1
  321. package/web-shell/assets/classDiagram-v2-Q7XG4LA2-BigU82A0.js +0 -1
  322. package/web-shell/assets/index-DrfC2e9s.js +0 -1768
  323. package/web-shell/assets/stateDiagram-v2-BHNVJYJU-1atT7XaU.js +0 -1
@@ -12,7 +12,7 @@ import {
12
12
  isTerminalTaskLifecycleType,
13
13
  sanitizeLogText,
14
14
  sanitizeSenderName
15
- } from "./chunk-DIEFUBV6.js";
15
+ } from "./chunk-DIWZNWZT.js";
16
16
  import "./chunk-UDXSXLER.js";
17
17
  import "./chunk-H6XPXXMH.js";
18
18
  import "./chunk-CR3C7WXL.js";
@@ -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) {
@@ -5071,6 +5073,8 @@ var DingtalkInteractiveCardClient = class {
5071
5073
 
5072
5074
  // packages/channels/dingtalk/dist/interactive-card-types.js
5073
5075
  init_esbuild_shims();
5076
+ var DINGTALK_INTERACTIVE_CARD_TIMEOUT_EXCLUSIVE_MINIMUM = 0;
5077
+ var DINGTALK_INTERACTIVE_CARD_TIMEOUT_MAXIMUM_MS = 2147483647;
5074
5078
  var DEFAULT_QUESTION_TIMEOUT_MS = 27e4;
5075
5079
  function asRecord(value) {
5076
5080
  return value !== null && typeof value === "object" && !Array.isArray(value) ? value : void 0;
@@ -5115,7 +5119,7 @@ function parseDingtalkInteractiveCardConfig(value) {
5115
5119
  throw new Error("DingTalk interactiveCards.questionCard must be an object.");
5116
5120
  }
5117
5121
  const timeoutMs = question?.["timeoutMs"] === void 0 ? DEFAULT_QUESTION_TIMEOUT_MS : question["timeoutMs"];
5118
- if (typeof timeoutMs !== "number" || !Number.isFinite(timeoutMs) || timeoutMs <= 0) {
5122
+ if (typeof timeoutMs !== "number" || !Number.isFinite(timeoutMs) || timeoutMs <= DINGTALK_INTERACTIVE_CARD_TIMEOUT_EXCLUSIVE_MINIMUM) {
5119
5123
  throw new Error("DingTalk interactiveCards.questionCard.timeoutMs must be a finite positive number.");
5120
5124
  }
5121
5125
  return {
@@ -5125,7 +5129,7 @@ function parseDingtalkInteractiveCardConfig(value) {
5125
5129
  },
5126
5130
  questionCard: {
5127
5131
  enabled: optionalBoolean(question?.["enabled"], "questionCard.enabled", true),
5128
- timeoutMs
5132
+ timeoutMs: Math.min(timeoutMs, DINGTALK_INTERACTIVE_CARD_TIMEOUT_MAXIMUM_MS)
5129
5133
  }
5130
5134
  };
5131
5135
  }
@@ -5189,6 +5193,9 @@ __name(parseDingtalkCardActorId, "parseDingtalkCardActorId");
5189
5193
  init_esbuild_shims();
5190
5194
  import { randomUUID as randomUUID2 } from "node:crypto";
5191
5195
  var FLUSH_INTERVAL_MS = 500;
5196
+ var STATUS_REFRESH_INTERVAL_MS = 1e3;
5197
+ var BREAKER_PROBE_INTERVAL_MS = 3e4;
5198
+ var MAX_CONSECUTIVE_STATUS_FAILURES = 3;
5192
5199
  var CONTENT_LIMIT = 2e4;
5193
5200
  var TRUNCATION_MARKER = "[Earlier output truncated]\n";
5194
5201
  function boundContent(content) {
@@ -5209,22 +5216,66 @@ var StatusCardController = class {
5209
5216
  constructor(options) {
5210
5217
  this.options = options;
5211
5218
  }
5212
- append(segment, target, chunk) {
5213
- if (!chunk || this.terminalSegmentIds.has(segment.segmentId))
5219
+ ensure(segment, target) {
5220
+ if (this.terminalSegmentIds.has(segment.segmentId))
5221
+ return;
5222
+ if (!this.recordsBySegment.has(segment.segmentId)) {
5223
+ this.createRecord(segment, target);
5224
+ }
5225
+ }
5226
+ replace(segment, target, content) {
5227
+ if (this.terminalSegmentIds.has(segment.segmentId))
5214
5228
  return;
5215
- let record = this.recordsBySegment.get(segment.segmentId);
5229
+ const record = this.recordsBySegment.get(segment.segmentId);
5216
5230
  if (!record) {
5217
- record = this.createRecord(segment, target);
5231
+ this.createRecord(segment, target, content);
5232
+ return;
5218
5233
  }
5219
5234
  if (record.terminal)
5220
5235
  return;
5221
- record.content = boundContent(record.content + chunk);
5236
+ record.content = boundContent(content);
5222
5237
  if (record.streamFailed)
5223
5238
  return;
5224
5239
  record.pendingSnapshot = sanitizeStreamingImageMarkers(record.content);
5225
5240
  this.scheduleFlush(record);
5226
5241
  }
5227
- createRecord(segment, target) {
5242
+ /**
5243
+ * Whether a created, still-running status card is displaying content for
5244
+ * this segment. Awaits the in-flight creation so a boundary decision made
5245
+ * while creation is pending does not race it. A latched stream failure
5246
+ * means the card can never show further content, so it is not live.
5247
+ */
5248
+ async isCardLive(segmentId) {
5249
+ const record = this.recordsBySegment.get(segmentId);
5250
+ if (!record || record.terminal || record.streamFailed)
5251
+ return false;
5252
+ return record.ready;
5253
+ }
5254
+ /**
5255
+ * Drain any pending snapshot so callers can treat the card's current
5256
+ * content as delivered. Returns false when there is no live record, the
5257
+ * card never became ready, or the stream failed during the drain, so the
5258
+ * caller can fall back instead of claiming delivery.
5259
+ */
5260
+ async flushPending(segmentId) {
5261
+ const record = this.recordsBySegment.get(segmentId);
5262
+ if (!record || record.terminal)
5263
+ return false;
5264
+ if (!await record.ready)
5265
+ return false;
5266
+ while (!record.terminal && !record.streamFailed) {
5267
+ if (record.flushTimer) {
5268
+ clearTimeout(record.flushTimer);
5269
+ record.flushTimer = void 0;
5270
+ }
5271
+ this.flush(record);
5272
+ await record.writeChain;
5273
+ if (record.pendingSnapshot === void 0)
5274
+ break;
5275
+ }
5276
+ return !record.terminal && !record.streamFailed;
5277
+ }
5278
+ createRecord(segment, target, initialContent = "") {
5228
5279
  const outTrackId = `qwen-status-${randomUUID2()}`;
5229
5280
  const record = {
5230
5281
  segmentId: segment.segmentId,
@@ -5233,12 +5284,13 @@ var StatusCardController = class {
5233
5284
  ownerId: segment.owner.id,
5234
5285
  target,
5235
5286
  outTrackId,
5236
- content: "",
5287
+ content: boundContent(initialContent),
5237
5288
  startedAt: Date.now(),
5238
5289
  lastStatusSecond: 0,
5239
5290
  ready: Promise.resolve(false),
5240
5291
  terminal: false,
5241
5292
  streamFailed: false,
5293
+ consecutiveStatusFailures: 0,
5242
5294
  stopClaimed: false,
5243
5295
  forbiddenActors: /* @__PURE__ */ new Set(),
5244
5296
  lastWriteAt: Date.now(),
@@ -5250,10 +5302,14 @@ var StatusCardController = class {
5250
5302
  segmentIds.add(record.segmentId);
5251
5303
  this.segmentIdsByRun.set(record.runId, segmentIds);
5252
5304
  record.ready = this.create(record, target);
5305
+ void record.ready.then((ready) => {
5306
+ if (ready)
5307
+ this.scheduleStatusRefresh(record);
5308
+ });
5253
5309
  return record;
5254
5310
  }
5255
- complete(segmentId, text) {
5256
- return this.finalize(segmentId, boundContent(text), "Completed", false);
5311
+ complete(segmentId, text, retainedContent) {
5312
+ return this.finalize(segmentId, boundContent(text), "Completed", false, retainedContent);
5257
5313
  }
5258
5314
  fail(segmentId, error) {
5259
5315
  void this.finalize(segmentId, boundContent(error), "Failed", true);
@@ -5296,12 +5352,13 @@ var StatusCardController = class {
5296
5352
  }
5297
5353
  async create(record, target) {
5298
5354
  try {
5355
+ const initialContent = sanitizeStreamingImageMarkers(record.content);
5299
5356
  await this.options.client.createAndDeliver({
5300
5357
  templateId: STATUS_CARD_TEMPLATE_ID,
5301
5358
  outTrackId: record.outTrackId,
5302
5359
  target,
5303
5360
  cardParamMap: {
5304
- content: "",
5361
+ content: initialContent,
5305
5362
  flowStatus: 2,
5306
5363
  statusLine: this.statusLine(record, "Running").text,
5307
5364
  hasAction: "true",
@@ -5311,7 +5368,7 @@ var StatusCardController = class {
5311
5368
  await this.options.client.openOrUpdateStream({
5312
5369
  outTrackId: record.outTrackId,
5313
5370
  key: "content",
5314
- content: "",
5371
+ content: initialContent,
5315
5372
  finalize: false
5316
5373
  });
5317
5374
  return true;
@@ -5358,6 +5415,10 @@ var StatusCardController = class {
5358
5415
  }).catch((error) => {
5359
5416
  record.streamFailed = true;
5360
5417
  record.pendingSnapshot = void 0;
5418
+ if (record.statusTimer) {
5419
+ clearTimeout(record.statusTimer);
5420
+ record.statusTimer = void 0;
5421
+ }
5361
5422
  this.options.onError?.("status card streaming", error);
5362
5423
  });
5363
5424
  const tracked = write.finally(() => {
@@ -5371,7 +5432,7 @@ var StatusCardController = class {
5371
5432
  record.inFlight = tracked;
5372
5433
  record.writeChain = tracked;
5373
5434
  }
5374
- async finalize(segmentId, content, state, isError) {
5435
+ async finalize(segmentId, content, state, isError, retainedContent) {
5375
5436
  const record = this.recordsBySegment.get(segmentId);
5376
5437
  if (!record || record.terminal)
5377
5438
  return false;
@@ -5386,12 +5447,16 @@ var StatusCardController = class {
5386
5447
  if (record.flushTimer)
5387
5448
  clearTimeout(record.flushTimer);
5388
5449
  record.flushTimer = void 0;
5450
+ if (record.statusTimer)
5451
+ clearTimeout(record.statusTimer);
5452
+ record.statusTimer = void 0;
5389
5453
  record.pendingSnapshot = void 0;
5390
5454
  try {
5391
5455
  if (!await record.ready)
5392
5456
  return false;
5393
5457
  await record.writeChain;
5394
- const finalContent = boundContent(sanitizeStreamingImageMarkers(content || record.content));
5458
+ const retained = content || (retainedContent ? retainedContent(record.content) : record.content);
5459
+ const finalContent = boundContent(sanitizeStreamingImageMarkers(retained));
5395
5460
  await this.options.client.openOrUpdateStream({
5396
5461
  outTrackId: record.outTrackId,
5397
5462
  key: "content",
@@ -5444,7 +5509,7 @@ var StatusCardController = class {
5444
5509
  };
5445
5510
  }
5446
5511
  async updateRunningStatus(record) {
5447
- if (record.terminal)
5512
+ if (record.terminal || record.streamFailed)
5448
5513
  return;
5449
5514
  const status = this.statusLine(record, "Running");
5450
5515
  if (status.second === record.lastStatusSecond)
@@ -5455,10 +5520,37 @@ var StatusCardController = class {
5455
5520
  cardParamMap: { statusLine: status.text }
5456
5521
  });
5457
5522
  record.lastStatusSecond = status.second;
5523
+ record.consecutiveStatusFailures = 0;
5524
+ if (record.statusTimer) {
5525
+ clearTimeout(record.statusTimer);
5526
+ record.statusTimer = void 0;
5527
+ }
5528
+ this.scheduleStatusRefresh(record);
5458
5529
  } catch (error) {
5530
+ record.consecutiveStatusFailures++;
5459
5531
  this.options.onError?.("status card metadata", error);
5460
5532
  }
5461
5533
  }
5534
+ scheduleStatusRefresh(record, intervalMs = STATUS_REFRESH_INTERVAL_MS) {
5535
+ if (record.terminal || record.streamFailed || record.statusTimer)
5536
+ return;
5537
+ const elapsed = Math.max(0, Date.now() - record.startedAt);
5538
+ const delay = Math.max(50, intervalMs - elapsed % intervalMs);
5539
+ record.statusTimer = setTimeout(() => {
5540
+ record.statusTimer = void 0;
5541
+ if (record.terminal || record.streamFailed)
5542
+ return;
5543
+ const refresh = record.writeChain.then(() => this.updateRunningStatus(record));
5544
+ record.writeChain = refresh;
5545
+ void refresh.finally(() => {
5546
+ if (record.consecutiveStatusFailures >= MAX_CONSECUTIVE_STATUS_FAILURES) {
5547
+ this.scheduleStatusRefresh(record, BREAKER_PROBE_INTERVAL_MS);
5548
+ return;
5549
+ }
5550
+ this.scheduleStatusRefresh(record);
5551
+ });
5552
+ }, delay);
5553
+ }
5462
5554
  };
5463
5555
 
5464
5556
  // packages/channels/dingtalk/dist/question-card-controller.js
@@ -5793,6 +5885,19 @@ ${questions}`;
5793
5885
 
5794
5886
  // packages/channels/dingtalk/dist/interaction-presenter.js
5795
5887
  init_esbuild_shims();
5888
+ import { randomUUID as randomUUID4 } from "node:crypto";
5889
+ function escapeMarkdownText(text) {
5890
+ return text.replace(/([\\`*_[\]{}()#+.!|>~-])/gu, "\\$1");
5891
+ }
5892
+ __name(escapeMarkdownText, "escapeMarkdownText");
5893
+ function formatSenderPrefixes(sender) {
5894
+ const senderName = sanitizeSenderName(sender.senderName);
5895
+ return {
5896
+ senderPrefix: `@${escapeMarkdownText(senderName)}`,
5897
+ senderRawPrefix: `@${senderName}`
5898
+ };
5899
+ }
5900
+ __name(formatSenderPrefixes, "formatSenderPrefixes");
5796
5901
  var DingtalkInteractionPresenter = class {
5797
5902
  static {
5798
5903
  __name(this, "DingtalkInteractionPresenter");
@@ -5804,14 +5909,40 @@ var DingtalkInteractionPresenter = class {
5804
5909
  constructor(options) {
5805
5910
  this.options = options;
5806
5911
  }
5807
- registerRun(runId, ownerId, target) {
5912
+ registerRun(runId, ownerId, target, sessionId = "", sender) {
5808
5913
  this.runs.set(runId, {
5914
+ runId,
5809
5915
  ownerId,
5810
5916
  target,
5917
+ baseContext: {
5918
+ channelName: "dingtalk",
5919
+ sessionId,
5920
+ runId,
5921
+ segmentId: runId,
5922
+ owner: { kind: "channel_user", id: ownerId },
5923
+ target: {
5924
+ channelName: "dingtalk",
5925
+ chatId: target.chatId,
5926
+ senderId: ownerId,
5927
+ isGroup: target.isGroup
5928
+ }
5929
+ },
5811
5930
  projectionChain: Promise.resolve(),
5931
+ ...target.isGroup && sender ? formatSenderPrefixes(sender) : {},
5812
5932
  terminal: false
5813
5933
  });
5814
5934
  }
5935
+ startStatusCard(runId) {
5936
+ const run = this.runs.get(runId);
5937
+ if (!run || run.terminal)
5938
+ return;
5939
+ const statusContext = this.ensureStatusContext(run);
5940
+ void this.enqueue(run, () => {
5941
+ const statusCards = this.options.statusCards;
5942
+ const target = this.cardTarget(statusContext.target);
5943
+ statusCards?.ensure(statusContext, target);
5944
+ });
5945
+ }
5815
5946
  appendOutput(segment, chunk) {
5816
5947
  const run = this.runs.get(segment.runId);
5817
5948
  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 +5959,9 @@ var DingtalkInteractionPresenter = class {
5828
5959
  presentation.content = this.boundContent(presentation.content + chunk);
5829
5960
  this.segments.set(segment.segmentId, presentation);
5830
5961
  run.activeSegmentId = segment.segmentId;
5831
- if (!this.options.statusCards)
5832
- return;
5962
+ const statusContext = this.ensureStatusContext(run, segment);
5833
5963
  void this.enqueue(run, () => {
5834
- this.options.statusCards?.append(segment, this.cardTarget(segment.target), chunk);
5964
+ this.options.statusCards?.replace(statusContext, this.cardTarget(statusContext.target), presentation.content);
5835
5965
  });
5836
5966
  }
5837
5967
  closeOutput(segmentId, text, reason, segment) {
@@ -5852,17 +5982,48 @@ var DingtalkInteractionPresenter = class {
5852
5982
  }
5853
5983
  return this.enqueue(run, async () => {
5854
5984
  const statusCards = this.options.statusCards;
5985
+ const statusContext = this.ensureStatusContext(run, presentation.context);
5855
5986
  if (reason === "failed") {
5856
- statusCards?.fail(segmentId, text);
5987
+ statusCards?.ensure(statusContext, this.cardTarget(statusContext.target));
5988
+ statusCards?.fail(statusContext.segmentId, this.withSenderPrefix(run, "\u672C\u6B21\u5904\u7406\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002"));
5989
+ await this.redeliverCardDeliveredContent(run);
5857
5990
  return statusCards !== void 0;
5858
5991
  }
5859
5992
  if (reason === "cancelled") {
5860
5993
  return statusCards !== void 0;
5861
5994
  }
5862
- const completed = statusCards !== void 0 && await statusCards.complete(segmentId, text);
5995
+ if (reason === "response_boundary") {
5996
+ const deliveredViaCard = statusCards !== void 0 && await statusCards.isCardLive(statusContext.segmentId) && await statusCards.flushPending(statusContext.segmentId);
5997
+ if (deliveredViaCard) {
5998
+ run.cardDelivered = {
5999
+ text: stripPartialImageMarker(text || presentation.content),
6000
+ chatId: presentation.context.target.chatId,
6001
+ sessionId: presentation.context.sessionId
6002
+ };
6003
+ return true;
6004
+ }
6005
+ const fallbackText2 = stripPartialImageMarker(text || presentation.content);
6006
+ if (!fallbackText2 || !this.options.sendFallback)
6007
+ return false;
6008
+ await this.options.sendFallback(presentation.context.target.chatId, fallbackText2, presentation.context.sessionId);
6009
+ return true;
6010
+ }
6011
+ if (reason === "input_requested") {
6012
+ const completed2 = statusCards !== void 0 && await statusCards.complete(statusContext.segmentId, this.withSenderPrefix(run, text || presentation.content));
6013
+ run.statusContext = void 0;
6014
+ if (completed2)
6015
+ return true;
6016
+ const fallbackText2 = stripPartialImageMarker(text || presentation.content);
6017
+ if (!fallbackText2 || !this.options.sendFallback)
6018
+ return false;
6019
+ await this.options.sendFallback(presentation.context.target.chatId, fallbackText2, presentation.context.sessionId);
6020
+ return true;
6021
+ }
6022
+ statusCards?.ensure(statusContext, this.cardTarget(statusContext.target));
6023
+ const completed = statusCards !== void 0 && await statusCards.complete(statusContext.segmentId, this.withSenderPrefix(run, text || presentation.content));
5863
6024
  if (completed)
5864
6025
  return true;
5865
- const fallbackText = text || presentation.content;
6026
+ const fallbackText = stripPartialImageMarker(text || presentation.content);
5866
6027
  if (!fallbackText || !this.options.sendFallback)
5867
6028
  return false;
5868
6029
  await this.options.sendFallback(presentation.context.target.chatId, fallbackText, presentation.context.sessionId);
@@ -5892,12 +6053,23 @@ var DingtalkInteractionPresenter = class {
5892
6053
  this.addTerminalSegment(activeSegmentId);
5893
6054
  }
5894
6055
  const finalization = this.enqueue(run, async () => {
5895
- if (terminal === "failed" && activeSegmentId) {
5896
- this.options.statusCards?.fail(activeSegmentId, detail);
6056
+ if (terminal === "failed") {
6057
+ const statusContext = this.ensureStatusContext(run);
6058
+ this.options.statusCards?.ensure(statusContext, this.cardTarget(statusContext.target));
6059
+ this.options.statusCards?.fail(statusContext.segmentId, this.withSenderPrefix(run, "\u672C\u6B21\u5904\u7406\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002"));
6060
+ await this.redeliverCardDeliveredContent(run);
5897
6061
  } else if (terminal === "cancelled") {
6062
+ const statusContext = run.statusContext;
6063
+ if (statusContext) {
6064
+ 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"));
6065
+ }
5898
6066
  this.options.statusCards?.cancelRun(runId, detail === "cancel_command" ? "cancel_command" : "dropped");
5899
- } else if (activeSegmentId) {
5900
- await this.options.statusCards?.complete(activeSegmentId, detail);
6067
+ await this.redeliverCardDeliveredContent(run);
6068
+ } else {
6069
+ const statusContext = run.statusContext;
6070
+ if (statusContext) {
6071
+ await this.options.statusCards?.complete(statusContext.segmentId, "", (retained) => retained ? this.withSenderPrefix(run, retained) : retained);
6072
+ }
5901
6073
  }
5902
6074
  });
5903
6075
  void finalization.then(() => {
@@ -5929,17 +6101,71 @@ var DingtalkInteractionPresenter = class {
5929
6101
  return result;
5930
6102
  };
5931
6103
  }
6104
+ /**
6105
+ * A failed or cancelled terminal overwrites the single continuity card,
6106
+ * erasing content a boundary already declared delivered there. Send it as
6107
+ * a text message so it survives the overwrite.
6108
+ */
6109
+ async redeliverCardDeliveredContent(run) {
6110
+ const delivered = run.cardDelivered;
6111
+ if (!delivered || !this.options.sendFallback)
6112
+ return;
6113
+ run.cardDelivered = void 0;
6114
+ await this.options.sendFallback(delivered.chatId, delivered.text, delivered.sessionId);
6115
+ }
5932
6116
  enqueue(run, operation) {
5933
6117
  const result = run.projectionChain.then(operation);
5934
6118
  run.projectionChain = result.then(() => void 0, () => void 0);
5935
6119
  return result;
5936
6120
  }
5937
- boundContent(content) {
5938
- const limit = 2e4;
5939
- const marker = "[Earlier output truncated]\n";
6121
+ boundContent(content, limit = CONTENT_LIMIT) {
5940
6122
  if (content.length <= limit)
5941
6123
  return content;
5942
- return `${marker}${content.slice(content.length - (limit - marker.length))}`;
6124
+ if (limit === 0)
6125
+ return "";
6126
+ if (limit <= TRUNCATION_MARKER.length)
6127
+ return content.slice(-limit);
6128
+ return `${TRUNCATION_MARKER}${content.slice(content.length - (limit - TRUNCATION_MARKER.length))}`;
6129
+ }
6130
+ withSenderPrefix(run, content) {
6131
+ if (!run.senderPrefix)
6132
+ return this.boundContent(content);
6133
+ const body = this.withoutExistingSenderPrefix(run, content);
6134
+ if (!body)
6135
+ return run.senderPrefix;
6136
+ const separator = "\n\n";
6137
+ const bodyLimit = Math.max(0, CONTENT_LIMIT - run.senderPrefix.length - separator.length);
6138
+ return `${run.senderPrefix}${separator}${this.boundContent(body, bodyLimit)}`;
6139
+ }
6140
+ withoutExistingSenderPrefix(run, content) {
6141
+ const prefixes = /* @__PURE__ */ new Set([run.senderPrefix, run.senderRawPrefix]);
6142
+ let body = content;
6143
+ while (body) {
6144
+ let removed = false;
6145
+ for (const prefix of prefixes) {
6146
+ if (!prefix)
6147
+ continue;
6148
+ if (body === prefix)
6149
+ return "";
6150
+ if (!body.startsWith(prefix))
6151
+ continue;
6152
+ const remainder = body.slice(prefix.length);
6153
+ if (/^\s/u.test(remainder)) {
6154
+ body = remainder.replace(/^\s{1,2}/u, "");
6155
+ removed = true;
6156
+ break;
6157
+ }
6158
+ }
6159
+ if (!removed)
6160
+ break;
6161
+ }
6162
+ return body;
6163
+ }
6164
+ ensureStatusContext(run, segment) {
6165
+ if (run.statusContext)
6166
+ return run.statusContext;
6167
+ run.statusContext = segment ? { ...segment } : { ...run.baseContext, segmentId: `${run.runId}:${randomUUID4()}` };
6168
+ return run.statusContext;
5943
6169
  }
5944
6170
  cardTarget(target) {
5945
6171
  const isGroup = target.isGroup === true;
@@ -5972,7 +6198,6 @@ var DIRECT_MSG_API = "https://api.dingtalk.com/v1.0/robot/oToMessages/batchSend"
5972
6198
  var PROACTIVE_MSG_KEY = "sampleMarkdown";
5973
6199
  var TOKEN_API = "https://oapi.dingtalk.com/gettoken";
5974
6200
  var PROACTIVE_FETCH_TIMEOUT_MS = 15e3;
5975
- var TEXT_MESSAGE_LIMIT = 3800;
5976
6201
  var mentionTarget = Symbol("mentionTarget");
5977
6202
  var IMAGE_INSTRUCTIONS = [
5978
6203
  "",
@@ -5983,9 +6208,9 @@ var IMAGE_INSTRUCTIONS = [
5983
6208
  "",
5984
6209
  "Only use a real image file inside the workspace or system temporary directory."
5985
6210
  ].join("\n");
5986
- function withNonBotMentionContext(data, text) {
6211
+ function collectNonBotMentionIds(data) {
5987
6212
  if (!Array.isArray(data.atUsers) || typeof data.chatbotUserId !== "string") {
5988
- return text;
6213
+ return [];
5989
6214
  }
5990
6215
  const mentions = /* @__PURE__ */ new Set();
5991
6216
  for (const user of data.atUsers) {
@@ -5995,32 +6220,13 @@ function withNonBotMentionContext(data, text) {
5995
6220
  if (dingtalkId === data.chatbotUserId)
5996
6221
  continue;
5997
6222
  const staffId = typeof user.staffId === "string" ? user.staffId : void 0;
5998
- const stableId = dingtalkId || staffId;
6223
+ const stableId = staffId || dingtalkId;
5999
6224
  if (stableId)
6000
6225
  mentions.add(stableId);
6001
6226
  }
6002
- if (mentions.size === 0)
6003
- return text;
6004
- const memberLabel = mentions.size === 1 ? "member" : "members";
6005
- const context = `[Mentioned ${mentions.size} other group ${memberLabel}]`;
6006
- return text ? `${context}
6007
- ${text}` : context;
6008
- }
6009
- __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;
6227
+ return [...mentions];
6022
6228
  }
6023
- __name(splitTextChunks, "splitTextChunks");
6229
+ __name(collectNonBotMentionIds, "collectNonBotMentionIds");
6024
6230
  var DingtalkChannel = class _DingtalkChannel extends ChannelBase {
6025
6231
  static {
6026
6232
  __name(this, "DingtalkChannel");
@@ -6031,7 +6237,6 @@ var DingtalkChannel = class _DingtalkChannel extends ChannelBase {
6031
6237
  seenMessages = /* @__PURE__ */ new Map();
6032
6238
  mentionTargets = /* @__PURE__ */ new Map();
6033
6239
  sessionMentionTargets = /* @__PURE__ */ new Map();
6034
- textReplySessions = /* @__PURE__ */ new Set();
6035
6240
  bufferedMentionTargets = /* @__PURE__ */ new Set();
6036
6241
  bufferedMentionTargetsBySession = /* @__PURE__ */ new Map();
6037
6242
  dedupTimer;
@@ -6115,7 +6320,7 @@ var DingtalkChannel = class _DingtalkChannel extends ChannelBase {
6115
6320
  statusCards: this.statusCardController,
6116
6321
  questionCards: this.questionCardController,
6117
6322
  ...config.blockStreaming !== "on" ? {
6118
- sendFallback: /* @__PURE__ */ __name((chatId, text, sessionId) => this.sendResponseMessage(chatId, text, sessionId), "sendFallback")
6323
+ sendFallback: /* @__PURE__ */ __name((chatId, text, sessionId) => this.sendFallbackReply(chatId, text, sessionId), "sendFallback")
6119
6324
  } : {}
6120
6325
  });
6121
6326
  }
@@ -6370,34 +6575,6 @@ var DingtalkChannel = class _DingtalkChannel extends ChannelBase {
6370
6575
  headers: { "Content-Type": "application/json" },
6371
6576
  body: JSON.stringify(body)
6372
6577
  });
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
6578
  if (isMention && process.env["QWEN_CHANNEL_DEBUG_MENTIONS"] === "1") {
6402
6579
  const payload = await resp.clone().json().catch(() => void 0);
6403
6580
  const response = payload && typeof payload === "object" ? payload : {};
@@ -6408,7 +6585,7 @@ var DingtalkChannel = class _DingtalkChannel extends ChannelBase {
6408
6585
  }
6409
6586
  if (!resp.ok) {
6410
6587
  const detail = await resp.text().catch(() => "");
6411
- process.stderr.write(`[DingTalk:${this.name}] sendTextReply failed: HTTP ${resp.status} ${detail}
6588
+ process.stderr.write(`[DingTalk:${this.name}] sendMessage failed: HTTP ${resp.status} ${detail}
6412
6589
  `);
6413
6590
  }
6414
6591
  }
@@ -6697,7 +6874,6 @@ var DingtalkChannel = class _DingtalkChannel extends ChannelBase {
6697
6874
  }
6698
6875
  }
6699
6876
  this.sessionMentionTargets.delete(sessionId);
6700
- this.textReplySessions.delete(sessionId);
6701
6877
  const cardRunId = this.cardRunBySession.get(sessionId);
6702
6878
  if (cardRunId) {
6703
6879
  this.cardRunBySession.delete(sessionId);
@@ -6726,7 +6902,8 @@ var DingtalkChannel = class _DingtalkChannel extends ChannelBase {
6726
6902
  if (event.runId && event.owner && inboundOwner?.ownerId === event.owner.id) {
6727
6903
  this.cardRuns.set(event.runId, inboundOwner);
6728
6904
  this.cardRunBySession.set(event.sessionId, event.runId);
6729
- this.interactionPresenter?.registerRun(event.runId, event.owner.id, inboundOwner.target);
6905
+ this.interactionPresenter?.registerRun(event.runId, event.owner.id, inboundOwner.target, event.sessionId, inboundOwner.sender);
6906
+ this.interactionPresenter?.startStatusCard(event.runId);
6730
6907
  }
6731
6908
  return;
6732
6909
  }
@@ -6784,7 +6961,6 @@ var DingtalkChannel = class _DingtalkChannel extends ChannelBase {
6784
6961
  this.mentionTargets.delete(messageId);
6785
6962
  if (this.atSender && atUserId) {
6786
6963
  this.sessionMentionTargets.set(sessionId, atUserId);
6787
- this.textReplySessions.add(sessionId);
6788
6964
  }
6789
6965
  }
6790
6966
  this.startReaction(chatId, messageId, sessionId);
@@ -6800,7 +6976,12 @@ var DingtalkChannel = class _DingtalkChannel extends ChannelBase {
6800
6976
  target: {
6801
6977
  chatId: envelope.chatId,
6802
6978
  isGroup: envelope.isGroup
6803
- }
6979
+ },
6980
+ ...this.atSender && envelope.isGroup ? {
6981
+ sender: {
6982
+ senderName: envelope.senderName
6983
+ }
6984
+ } : {}
6804
6985
  });
6805
6986
  if (this.inboundCardOwners.size > 1e3) {
6806
6987
  const oldest = this.inboundCardOwners.keys().next().value;
@@ -6834,22 +7015,17 @@ var DingtalkChannel = class _DingtalkChannel extends ChannelBase {
6834
7015
  }
6835
7016
  onPromptEnd(chatId, sessionId, messageId) {
6836
7017
  this.sessionMentionTargets.delete(sessionId);
6837
- this.textReplySessions.delete(sessionId);
6838
7018
  this.stopReaction(chatId, messageId, sessionId);
6839
7019
  }
6840
7020
  async sendResponseMessage(chatId, text, sessionId) {
6841
7021
  const atUserId = this.atSender ? this.sessionMentionTargets.get(sessionId) : void 0;
6842
7022
  if (atUserId)
6843
7023
  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);
7024
+ await this.sendReply(chatId, text, atUserId);
7025
+ }
7026
+ async sendFallbackReply(chatId, text, sessionId) {
7027
+ const atUserId = this.atSender ? this.sessionMentionTargets.get(sessionId) : void 0;
7028
+ await this.sendReply(chatId, text, atUserId);
6853
7029
  }
6854
7030
  async onResponseComplete(chatId, text, sessionId, segment) {
6855
7031
  if (segment && this.interactionPresenter) {
@@ -7035,7 +7211,7 @@ var DingtalkChannel = class _DingtalkChannel extends ChannelBase {
7035
7211
  }
7036
7212
  ];
7037
7213
  } else {
7038
- const dir = join(tmpdir2(), "channel-files", randomUUID4());
7214
+ const dir = join(tmpdir2(), "channel-files", randomUUID5());
7039
7215
  mkdirSync(dir, { recursive: true });
7040
7216
  const safeName = basename2(fileName || "") || `dingtalk_${mediaType}_${Date.now()}`;
7041
7217
  const filePath = join(dir, safeName);
@@ -7099,7 +7275,7 @@ var DingtalkChannel = class _DingtalkChannel extends ChannelBase {
7099
7275
  const quoted = this.extractQuotedContext(data);
7100
7276
  const chatId = conversationId || sessionWebhook;
7101
7277
  const messageText = isMentioned ? cleanText : cleanText || content.text;
7102
- const envelopeText = isGroup ? withNonBotMentionContext(data, messageText) : messageText;
7278
+ const mentionedMemberIds = isGroup ? collectNonBotMentionIds(data) : [];
7103
7279
  const senderId = senderStaffId || senderIdValue || "";
7104
7280
  const senderName = senderNick || senderId || "Unknown";
7105
7281
  const envelope = {
@@ -7108,7 +7284,8 @@ var DingtalkChannel = class _DingtalkChannel extends ChannelBase {
7108
7284
  senderName,
7109
7285
  chatId,
7110
7286
  ...isGroup && conversationTitle ? { chatName: conversationTitle } : {},
7111
- text: envelopeText,
7287
+ text: messageText,
7288
+ ...mentionedMemberIds.length > 0 ? { mentionedMemberIds } : {},
7112
7289
  isGroup,
7113
7290
  isMentioned,
7114
7291
  isReplyToBot: quoted.isReplyToBot,
@@ -7157,6 +7334,48 @@ var plugin = {
7157
7334
  kind: "secret",
7158
7335
  required: true,
7159
7336
  envResolvable: true
7337
+ },
7338
+ {
7339
+ key: "interactiveCards",
7340
+ label: "Interactive Cards",
7341
+ kind: "object",
7342
+ properties: [
7343
+ {
7344
+ key: "enabled",
7345
+ label: "Enabled",
7346
+ kind: "boolean"
7347
+ },
7348
+ {
7349
+ key: "statusCard",
7350
+ label: "Status Card",
7351
+ kind: "object",
7352
+ properties: [
7353
+ {
7354
+ key: "enabled",
7355
+ label: "Enabled",
7356
+ kind: "boolean"
7357
+ }
7358
+ ]
7359
+ },
7360
+ {
7361
+ key: "questionCard",
7362
+ label: "Question Card",
7363
+ kind: "object",
7364
+ properties: [
7365
+ {
7366
+ key: "enabled",
7367
+ label: "Enabled",
7368
+ kind: "boolean"
7369
+ },
7370
+ {
7371
+ key: "timeoutMs",
7372
+ label: "Timeout (ms)",
7373
+ kind: "number",
7374
+ exclusiveMinimum: DINGTALK_INTERACTIVE_CARD_TIMEOUT_EXCLUSIVE_MINIMUM
7375
+ }
7376
+ ]
7377
+ }
7378
+ ]
7160
7379
  }
7161
7380
  ]
7162
7381
  },