@qwen-code/qwen-code 0.21.13 → 0.21.14-preview.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (293) hide show
  1. package/bundled/qc-helper/docs/configuration/settings.md +13 -7
  2. package/bundled/qc-helper/docs/features/code-review.md +5 -1
  3. package/bundled/qc-helper/docs/features/commands.md +120 -8
  4. package/bundled/qc-helper/docs/features/sub-agents.md +2 -2
  5. package/bundled/qc-helper/docs/qwen-serve-deploy-local.md +1 -1
  6. package/bundled/qc-helper/docs/qwen-serve.md +20 -3
  7. package/bundled/review/SKILL.md +50 -30
  8. package/chunks/{MaxSizedBox-UQALOVVT.js → MaxSizedBox-3PZITE2Y.js} +24 -23
  9. package/chunks/{StandaloneSessionPicker-KEGXNUG6.js → StandaloneSessionPicker-2C34PNGO.js} +41 -40
  10. package/chunks/{acp-startup-profiler-NMDXYGDN.js → acp-startup-profiler-HUYGO57H.js} +2 -2
  11. package/chunks/{acpAgent-XPES32S7.js → acpAgent-3J4NHAYT.js} +626 -141
  12. package/chunks/{agent-DPTOZFEM.js → agent-VFX4RPP5.js} +22 -21
  13. package/chunks/{agent-headless-GJCQMURW.js → agent-headless-6WCF4J6N.js} +22 -21
  14. package/chunks/{anthropicContentGenerator-G7BVXTKN.js → anthropicContentGenerator-M7XRJMSK.js} +3 -3
  15. package/chunks/{bridge-YNQBAA4Z.js → bridge-XR5ZSR7U.js} +26 -25
  16. package/chunks/{ca-4CQ6MYNQ.js → ca-SLZJD6QH.js} +8 -0
  17. package/chunks/{channel-management-service-GWY2GAIC.js → channel-management-service-X6LCQUAD.js} +1 -1
  18. package/chunks/{channel-settings-store-WNWYFHG7.js → channel-settings-store-Z7BUEUJE.js} +30 -29
  19. package/chunks/{channel-worker-group-7LXCMZ77.js → channel-worker-group-TJ35JDPE.js} +2 -2
  20. package/chunks/{channel-worker-manager-RYEME4ZZ.js → channel-worker-manager-G5LKWGOG.js} +2 -2
  21. package/chunks/{chunk-MLPXSYXR.js → chunk-25GHLMQQ.js} +25 -16
  22. package/chunks/chunk-2C6HJMG3.js +757 -0
  23. package/chunks/{chunk-TUGSVUJB.js → chunk-2JXDFSVE.js} +5 -5
  24. package/chunks/{chunk-AS5IN4GK.js → chunk-2OA3JMRD.js} +3 -3
  25. package/chunks/chunk-3PWCMXIR.js +9169 -0
  26. package/chunks/{chunk-U3VNBPUO.js → chunk-4KQ2TI2K.js} +2 -2
  27. package/chunks/{chunk-NEFOOD54.js → chunk-4V4DFJBS.js} +2 -2
  28. package/chunks/{chunk-OMLJNPBE.js → chunk-4ZMS3JCR.js} +1 -0
  29. package/chunks/{chunk-PP4FUZNV.js → chunk-55PIFSP2.js} +2 -2
  30. package/chunks/{chunk-3U3VAL47.js → chunk-57KOJ2KZ.js} +1 -1
  31. package/chunks/{chunk-A4QRWUDE.js → chunk-5IYS4WWR.js} +1 -1
  32. package/chunks/{chunk-TS6625XH.js → chunk-5MK45KZ3.js} +9 -5
  33. package/chunks/{chunk-CU6GJD55.js → chunk-6DFPR7CS.js} +1 -1
  34. package/chunks/{chunk-V57QC6WW.js → chunk-6LAPGPVA.js} +5 -3
  35. package/chunks/{chunk-OOQUVWIG.js → chunk-6PDOHRN6.js} +4 -4
  36. package/chunks/{chunk-UZPM4XHR.js → chunk-6VDPDHIP.js} +29 -8
  37. package/chunks/{chunk-O4D7SPJN.js → chunk-73G3Z7QS.js} +3 -3
  38. package/chunks/{chunk-QIH2HAEN.js → chunk-7OCSX7FC.js} +1 -1
  39. package/chunks/{chunk-OVZPVYZB.js → chunk-AKBOLMUF.js} +95 -17
  40. package/chunks/{chunk-DGK6P3BQ.js → chunk-AQBHJ2IG.js} +10 -10
  41. package/chunks/{chunk-JNDY2MDR.js → chunk-BOJNAPUE.js} +1 -1
  42. package/chunks/{chunk-NHDR76JX.js → chunk-BQWNIPTE.js} +1 -1
  43. package/chunks/{chunk-AA2BEKV3.js → chunk-CH5OFRV7.js} +1 -1
  44. package/chunks/{chunk-MS7GNABG.js → chunk-CXJHQVEK.js} +8 -0
  45. package/chunks/{chunk-K5IDV3PC.js → chunk-D34RDOLP.js} +12 -2
  46. package/chunks/{chunk-OXCMMLED.js → chunk-DGJ7O55J.js} +1 -1
  47. package/chunks/{chunk-BKPPWD33.js → chunk-DRKYT2TR.js} +1 -1
  48. package/chunks/{chunk-P7MPQI75.js → chunk-DVR7XKO5.js} +1 -1
  49. package/chunks/{chunk-MRMJCLIY.js → chunk-DZCV3ZYU.js} +2 -2
  50. package/chunks/{chunk-EZ5RP345.js → chunk-E5RS7LF4.js} +40 -9
  51. package/chunks/{chunk-4NFY2S7N.js → chunk-E7REAOTN.js} +15 -0
  52. package/chunks/chunk-EOCQCNV4.js +3887 -0
  53. package/chunks/{chunk-BVJS5BSP.js → chunk-FCTLOVYW.js} +1 -1
  54. package/chunks/{chunk-DGZEMW5R.js → chunk-FS5NGKWC.js} +1 -1
  55. package/chunks/{chunk-XHRY7BXD.js → chunk-G6FFFICU.js} +3 -3
  56. package/chunks/{chunk-NM5V5OVW.js → chunk-GV3OIADZ.js} +2 -2
  57. package/chunks/{chunk-QV5YN5YD.js → chunk-HGPMOXLZ.js} +5 -5
  58. package/chunks/{chunk-GMIEIY3Y.js → chunk-I3N2Z25H.js} +1 -1
  59. package/chunks/{chunk-RIAABG2K.js → chunk-I7NTHW4C.js} +1 -1
  60. package/chunks/{chunk-HUTNYWBG.js → chunk-IOTPI425.js} +18 -10
  61. package/chunks/{chunk-ZYYTZUI2.js → chunk-ISRHAMNL.js} +3 -3
  62. package/chunks/{chunk-BHILXOC3.js → chunk-J63PKMYA.js} +1 -1
  63. package/chunks/{chunk-KD5BOPLP.js → chunk-J6YS7Z25.js} +98 -4
  64. package/chunks/{chunk-GO7STP6N.js → chunk-K3CECR5C.js} +4 -4
  65. package/chunks/{chunk-RVOJ2FBP.js → chunk-KC4WMLZO.js} +1486 -10574
  66. package/chunks/{chunk-IGGGG5CX.js → chunk-KSGWAYNE.js} +4580 -1652
  67. package/chunks/{chunk-X26JYGTD.js → chunk-L6CCLB3G.js} +1 -1
  68. package/chunks/{chunk-M6NDLY2T.js → chunk-LD5VIJ7S.js} +1 -1
  69. package/chunks/{chunk-ZYBBISBY.js → chunk-LLR424CQ.js} +15 -12
  70. package/chunks/{chunk-JUEPY766.js → chunk-LRDB2OLB.js} +2 -2
  71. package/chunks/{chunk-PQ36L4F5.js → chunk-MCG53LWC.js} +1 -1
  72. package/chunks/{chunk-OD2WU5QY.js → chunk-NRPXRNN4.js} +1 -1
  73. package/chunks/{chunk-76J3IJ3M.js → chunk-NV6LW6FT.js} +3 -3
  74. package/chunks/{chunk-CKSJECTU.js → chunk-NVRMCWTP.js} +8 -4
  75. package/chunks/{chunk-Y3YCSWG5.js → chunk-OBJYN4MX.js} +1 -1
  76. package/chunks/{chunk-WFSTRPRO.js → chunk-OJOP26ET.js} +1 -1
  77. package/chunks/{chunk-A267JX7H.js → chunk-OLZSWUZR.js} +6 -6
  78. package/chunks/{chunk-TIGA2IVL.js → chunk-OO4FKHLO.js} +2 -2
  79. package/chunks/{chunk-OY5RNSV4.js → chunk-OSAFWBNR.js} +3 -3
  80. package/chunks/{chunk-BZ263IKX.js → chunk-OVY67CYC.js} +1 -1
  81. package/chunks/{chunk-YEYY7TEP.js → chunk-P425IVUK.js} +5 -5
  82. package/chunks/{chunk-AFSG32D5.js → chunk-PMS7O6SA.js} +1 -1
  83. package/chunks/{chunk-6ORZ2EDC.js → chunk-PPTM4O4R.js} +1 -1
  84. package/chunks/{chunk-JOOFMXGF.js → chunk-QECSDJET.js} +5 -5
  85. package/chunks/{chunk-CZBYX5MY.js → chunk-QEJZUXSK.js} +1 -1
  86. package/chunks/{chunk-4PKCUT7F.js → chunk-QIHHJKXT.js} +6 -6
  87. package/chunks/{chunk-QRCNA3SR.js → chunk-RAQBBGS6.js} +49 -69
  88. package/chunks/{chunk-M732YJPW.js → chunk-RXHBTKMG.js} +2 -2
  89. package/chunks/{chunk-XIT3GURH.js → chunk-S6CXQKDD.js} +3 -3
  90. package/chunks/{chunk-GGDBMYGZ.js → chunk-SA7GBPEA.js} +3 -3
  91. package/chunks/{chunk-7UXUJ5T3.js → chunk-SBRIBTYN.js} +1 -1
  92. package/chunks/{chunk-MC4TLKEI.js → chunk-SGLPDKRT.js} +2 -2
  93. package/chunks/{chunk-WSH6GRKG.js → chunk-SLILKYV2.js} +2 -2
  94. package/chunks/{chunk-DXIBNLBZ.js → chunk-SNQZZ765.js} +1 -1
  95. package/chunks/{chunk-5EYKMUUY.js → chunk-SR2LYSMT.js} +1 -1
  96. package/chunks/{chunk-AW4TRXOC.js → chunk-TNPWODIZ.js} +1 -1
  97. package/chunks/{chunk-QF2NHSPB.js → chunk-U6RZRKNM.js} +233 -184
  98. package/chunks/{chunk-QNQAPSN2.js → chunk-UC67T4SF.js} +3 -1
  99. package/chunks/{chunk-O565M6A4.js → chunk-UYDGFWIJ.js} +199 -14
  100. package/chunks/{chunk-LJQAUZMR.js → chunk-VGAAAMRD.js} +925 -92
  101. package/chunks/{chunk-UKMR3CKV.js → chunk-VHPMDDPT.js} +3 -3
  102. package/chunks/{chunk-S5DWMTHO.js → chunk-WP4WIUOJ.js} +2 -0
  103. package/chunks/{chunk-25EYDK42.js → chunk-WPVUOVYX.js} +1 -1
  104. package/chunks/{chunk-AXN7UPYQ.js → chunk-WSSH2BNO.js} +1 -1
  105. package/chunks/{chunk-6YKYPVDV.js → chunk-WVIABDXV.js} +3 -3
  106. package/chunks/chunk-WZAD4ZNJ.js +59 -0
  107. package/chunks/{chunk-N5YPT6PH.js → chunk-X3YA3YGG.js} +7 -4
  108. package/chunks/{chunk-4S5337WV.js → chunk-XC377TLN.js} +4312 -2704
  109. package/chunks/{chunk-NNHNLJ2X.js → chunk-XO24LIZC.js} +240 -42
  110. package/chunks/{chunk-EL5SXY3T.js → chunk-XT4RKHVE.js} +2 -2
  111. package/chunks/{chunk-FDGGZIYW.js → chunk-YECDICIO.js} +2 -2
  112. package/chunks/{chunk-E23IPNGS.js → chunk-YFPZ3NNC.js} +12 -3
  113. package/chunks/{chunk-46UV252V.js → chunk-YHC2EYYG.js} +35 -38
  114. package/chunks/{chunk-V26NVGAU.js → chunk-YIWH3MKK.js} +8 -3
  115. package/chunks/{chunk-IWPYVAO2.js → chunk-YXC7JYUI.js} +2 -2
  116. package/chunks/{chunk-A4MFR4C5.js → chunk-ZIGC3MUS.js} +2 -4
  117. package/chunks/{chunk-ZZO74WKW.js → chunk-ZXEAEZFN.js} +24 -18
  118. package/chunks/{computer-use-77C5FHMW.js → computer-use-ABECHPS5.js} +22 -21
  119. package/chunks/{config-utils-IVHRSXWI.js → config-utils-NJQA5YLJ.js} +2 -2
  120. package/chunks/{contextCommand-PJ77GBWL.js → contextCommand-4CD5HZQQ.js} +24 -23
  121. package/chunks/{core-runtime-7VMIKUTG.js → core-runtime-2MOVQ4VX.js} +22 -21
  122. package/chunks/{create-sub-session-2L5MQRN4.js → create-sub-session-L6NNHG5N.js} +26 -24
  123. package/chunks/{cron-create-H7UEPDSN.js → cron-create-NFRZEOQX.js} +2 -2
  124. package/chunks/{cron-delete-6SZK7YFM.js → cron-delete-GFVSVO7C.js} +2 -2
  125. package/chunks/{cron-list-H25JIHEZ.js → cron-list-NRW34CLU.js} +2 -2
  126. package/chunks/{daemon-2KTG7ZBN.js → daemon-XH76IXOC.js} +356 -21
  127. package/chunks/{daemon-git-worktree-guard-DXYIMWFT.js → daemon-git-worktree-guard-BLXFEG4Q.js} +24 -23
  128. package/chunks/{daemon-status-provider-ZDOYJCU6.js → daemon-status-provider-XGD3TPTO.js} +31 -30
  129. package/chunks/{daemon-trust-policy-E67OYUK2.js → daemon-trust-policy-THEGCWPO.js} +29 -28
  130. package/chunks/{daemon-trust-policy-monitor-RYYGCQ3J.js → daemon-trust-policy-monitor-L7L4ACWQ.js} +29 -28
  131. package/chunks/{de-UBEBKG6V.js → de-AH4LGCF5.js} +8 -0
  132. package/chunks/{deferred-core-runtime-3SGXFXEQ.js → deferred-core-runtime-YQLHDUGE.js} +22 -21
  133. package/chunks/{discovery-ORA5J7YP.js → discovery-X2NV535U.js} +1 -1
  134. package/chunks/{dist-WJ4BHIEW.js → dist-ESS34DHC.js} +72 -0
  135. package/chunks/{earlyInputCapture-KJMLFVQV.js → earlyInputCapture-PCTXNW7N.js} +22 -21
  136. package/chunks/{edit-I4LQFAEC.js → edit-QX2EGWYW.js} +25 -23
  137. package/chunks/{en-X6YV7GME.js → en-MD3GP5YL.js} +8 -0
  138. package/chunks/{enter-worktree-YNPOJSRH.js → enter-worktree-EM3ZZ2SB.js} +22 -21
  139. package/chunks/{enterPlanMode-XCPK62ER.js → enterPlanMode-ESCMVAKB.js} +22 -21
  140. package/chunks/{environment-S7CTIHMX.js → environment-TOJI56YV.js} +25 -24
  141. package/chunks/{errors-7HB2AIDS.js → errors-DZ5FWWEM.js} +24 -23
  142. package/chunks/{exit-worktree-AIIY7SR6.js → exit-worktree-KUIJ36XA.js} +22 -21
  143. package/chunks/{exitPlanMode-R4JY7V2O.js → exitPlanMode-NFVY54FV.js} +22 -21
  144. package/chunks/{fast-path-NDJV3ZFJ.js → fast-path-JLQXJSH6.js} +3 -3
  145. package/chunks/{fast-path-settings-LNOFM2YP.js → fast-path-settings-WHX3J3ZI.js} +2 -2
  146. package/chunks/{fr-VENTC2BS.js → fr-ZEML2JWS.js} +8 -0
  147. package/chunks/{gemini-RSUFP5OE.js → gemini-I7OT4FWL.js} +62 -61
  148. package/chunks/{geminiContentGenerator-SQ5XBPZ7.js → geminiContentGenerator-GRIS77NJ.js} +3 -3
  149. package/chunks/{glob-J4RUJAHX.js → glob-7TBUUV6R.js} +22 -21
  150. package/chunks/{goal-tools-VHTNVOKK.js → goal-tools-K5OHOJ6B.js} +1 -1
  151. package/chunks/{grep-VJWPLFOT.js → grep-743SYWCZ.js} +22 -21
  152. package/chunks/{handleAutoUpdate-POCX2MNB.js → handleAutoUpdate-GAOYUYOD.js} +26 -25
  153. package/chunks/{i18n-RM5YOICI.js → i18n-2ITURYX6.js} +23 -22
  154. package/chunks/{image-gen-EXECB5XM.js → image-gen-4OIWDZD6.js} +2 -2
  155. package/chunks/{initializer-Z2AFGBNR.js → initializer-OC7LWA6X.js} +29 -28
  156. package/chunks/{installationInfo-4I5FXNMH.js → installationInfo-CO47QX3Q.js} +23 -22
  157. package/chunks/{ja-QHT4EQTO.js → ja-UM5B2HMD.js} +8 -0
  158. package/chunks/{list-ZMBFIGZA.js → list-ATR2SFWT.js} +32 -31
  159. package/chunks/{loadedSettingsAdapter-T6TV4YJ7.js → loadedSettingsAdapter-NK4B7AGK.js} +29 -28
  160. package/chunks/{loggingContentGenerator-WF4ZOJEZ.js → loggingContentGenerator-3WXBU5TQ.js} +12 -10
  161. package/chunks/{loop-wakeup-WQS6JYAG.js → loop-wakeup-HWVUU5CF.js} +3 -3
  162. package/chunks/{managed-npm-update-E7IW6N7V.js → managed-npm-update-4SSBWI2D.js} +23 -22
  163. package/chunks/{mcp-6UNYX4HG.js → mcp-C62AE2QI.js} +29 -28
  164. package/chunks/{monitor-EE2UYMGE.js → monitor-FEYEGASA.js} +22 -21
  165. package/chunks/{nonInteractiveCli-WAY237O4.js → nonInteractiveCli-AJEV5ZWO.js} +59 -57
  166. package/chunks/{notebook-edit-NTDY4QDU.js → notebook-edit-SLLTEY4O.js} +26 -24
  167. package/chunks/{openaiContentGenerator-YNFVJMRJ.js → openaiContentGenerator-WLUGIAPX.js} +12 -11
  168. package/chunks/{pidfile-4XSFLYBZ.js → pidfile-TV2VWUMB.js} +22 -21
  169. package/chunks/{processUtils-WDA2MJFD.js → processUtils-3IN2ZR55.js} +2 -2
  170. package/chunks/{pt-VL3I5RNY.js → pt-5BMJ3XYH.js} +8 -0
  171. package/chunks/{qwenContentGenerator-434M7QKY.js → qwenContentGenerator-GSGRFPJE.js} +25 -24
  172. package/chunks/{qwenOAuth2-GMYZOO6A.js → qwenOAuth2-JLSTIS4Z.js} +3 -3
  173. package/chunks/{read-file-TAFBKMNI.js → read-file-6PZZRGZZ.js} +9 -7
  174. package/chunks/{record-artifact-SEYFJEJF.js → record-artifact-GLU3UWBV.js} +3 -1
  175. package/chunks/{resumeHistoryUtils-EVG3WYK2.js → resumeHistoryUtils-5GEWKOOO.js} +25 -24
  176. package/chunks/{ripGrep-WOEK2PXS.js → ripGrep-FX7GBGFN.js} +22 -21
  177. package/chunks/{ru-4RCKL4PY.js → ru-6GL66ORV.js} +8 -0
  178. package/chunks/{run-qwen-serve-3QSGRXAN.js → run-qwen-serve-7RHU3NSV.js} +49 -40
  179. package/chunks/{runtime-5MLLZ7DC.js → runtime-EPOXAMLP.js} +32 -31
  180. package/chunks/{scheduler-RPBJ63CH.js → scheduler-F4Y7ENVV.js} +24 -23
  181. package/chunks/{sdk-exporters-http-XUVP63H6.js → sdk-exporters-http-NC746HLT.js} +2 -2
  182. package/chunks/{sdk-impl-YXUEN2Z2.js → sdk-impl-YVL7BP6Y.js} +2 -2
  183. package/chunks/{send-message-VZENRWRH.js → send-message-TNBG5EVA.js} +1 -1
  184. package/chunks/{serve-HS3XLPXU.js → serve-LQV4TN5A.js} +29 -30
  185. package/chunks/{server-TC4A7AAZ.js → server-IZCKLIYQ.js} +1267 -165
  186. package/chunks/{session-UBOFXVMN.js → session-52ZGTDVB.js} +60 -58
  187. package/chunks/{settings-D5644OM5.js → settings-WCVB34HW.js} +28 -27
  188. package/chunks/{shell-3PZULQQV.js → shell-33BIUBLH.js} +22 -21
  189. package/chunks/{skill-PEVVXQ3L.js → skill-IYVQ2QNK.js} +11 -9
  190. package/chunks/{skill-settings-J65JKKES.js → skill-settings-YG4ZS4OZ.js} +28 -27
  191. package/chunks/{spawnChannel-IYGXRHSQ.js → spawnChannel-BLA4YT4W.js} +24 -23
  192. package/chunks/{standalone-update-IFM53PE7.js → standalone-update-ALRIPWSM.js} +24 -23
  193. package/chunks/{startInteractiveUI-3AVH7L6H.js → startInteractiveUI-PISBXWKA.js} +262 -191
  194. package/chunks/{task-create-FCBDX7UH.js → task-create-EILHJJB7.js} +4 -4
  195. package/chunks/{task-list-YIYIUFUA.js → task-list-WGJR6YL5.js} +18 -4
  196. package/chunks/{task-update-MYPFVOVM.js → task-update-XZAHVXJ5.js} +79 -8
  197. package/chunks/{team-create-ZAIA7KAV.js → team-create-CIQDCC6A.js} +23 -23
  198. package/chunks/{team-delete-6UMU4XLS.js → team-delete-UEP4QOOT.js} +3 -3
  199. package/chunks/{team-plan-approval-UNIUS7OD.js → team-plan-approval-664XCRB4.js} +22 -21
  200. package/chunks/{terminal-image-renderer-G343P2RV.js → terminal-image-renderer-TEBO6ONY.js} +22 -21
  201. package/chunks/{theme-manager-Z3RIT7DB.js → theme-manager-3CIFH2JV.js} +22 -21
  202. package/chunks/{todoWrite-U2R4NVF4.js → todoWrite-ATS62CAP.js} +1 -1
  203. package/chunks/{tool-search-5R2OE4C7.js → tool-search-IJX5JHJB.js} +9 -7
  204. package/chunks/{total-session-admission-4KBHMQQ2.js → total-session-admission-XBK2NVRV.js} +26 -25
  205. package/chunks/{trustedFolders-LK6T4XC7.js → trustedFolders-OOFNLRWK.js} +23 -22
  206. package/chunks/{update-relaunch-UBKROIC6.js → update-relaunch-EIG7EYAQ.js} +5 -5
  207. package/chunks/{updateCheck-W4Y2GFSD.js → updateCheck-KYDCBLSF.js} +25 -24
  208. package/chunks/{useAutoAcceptIndicator-C7BEICBF.js → useAutoAcceptIndicator-RFX3KNBN.js} +31 -30
  209. package/chunks/{validateNonInterActiveAuth-LTEI2TB6.js → validateNonInterActiveAuth-MZXSAITU.js} +56 -54
  210. package/chunks/{version-G5A5DGVS.js → version-PJC6ZNXV.js} +1 -1
  211. package/chunks/{web-fetch-RTEQTR5Z.js → web-fetch-XXICVGKQ.js} +11 -8
  212. package/chunks/{web-search-5OXHEZPV.js → web-search-LHPM6QWC.js} +2 -2
  213. package/chunks/{workflow-ISQJHPG2.js → workflow-4CUO2BV7.js} +139 -37
  214. package/chunks/{workspace-providers-status-2ZPZPUPZ.js → workspace-providers-status-G4MUGH3X.js} +32 -31
  215. package/chunks/{workspace-registration-store-CYNY6IP6.js → workspace-registration-store-QMDMFWBE.js} +1 -1
  216. package/chunks/{workspace-registry-34GTUUHB.js → workspace-registry-FKBB4MZK.js} +26 -25
  217. package/chunks/{workspace-service-XCDQLE2Y.js → workspace-service-TIDTTA65.js} +33 -32
  218. package/chunks/{workspace-skills-status-RS4O7AIJ.js → workspace-skills-status-LBC2TZKM.js} +30 -29
  219. package/chunks/{workspace-trust-reconciler-AYGXC7A3.js → workspace-trust-reconciler-4KJ567XP.js} +33 -32
  220. package/chunks/{write-file-EWXKVVXF.js → write-file-R6LAEER5.js} +22 -21
  221. package/chunks/{zh-TW-SQ4HTSCW.js → zh-TW-LVLBK4KF.js} +8 -0
  222. package/chunks/{zh-LMSTK4WD.js → zh-UBMWS2BJ.js} +8 -0
  223. package/chunks/{zoom-image-4BFYJ3HG.js → zoom-image-XLCK6DDK.js} +14 -11
  224. package/cli.js +13 -13
  225. package/locales/ca.js +13 -0
  226. package/locales/de.js +12 -0
  227. package/locales/en.js +11 -0
  228. package/locales/fr.js +13 -0
  229. package/locales/ja.js +13 -0
  230. package/locales/pt.js +12 -0
  231. package/locales/ru.js +12 -0
  232. package/locales/zh-TW.js +11 -0
  233. package/locales/zh.js +11 -0
  234. package/package.json +3 -3
  235. package/web-shell/assets/{arc-CgOpDKvm.js → arc-DItbX0DI.js} +1 -1
  236. package/web-shell/assets/{architectureDiagram-3BPJPVTR-0Ag_m34F.js → architectureDiagram-3BPJPVTR-CmnIlH8y.js} +1 -1
  237. package/web-shell/assets/{blockDiagram-GPEHLZMM-IwTwFau0.js → blockDiagram-GPEHLZMM-pObnB9kw.js} +1 -1
  238. package/web-shell/assets/{c4Diagram-AAUBKEIU-DLa5GUv8.js → c4Diagram-AAUBKEIU-BNBmMS0Y.js} +1 -1
  239. package/web-shell/assets/channel-hZnMfWA9.js +1 -0
  240. package/web-shell/assets/{chunk-2J33WTMH-DcYP-WFG.js → chunk-2J33WTMH-Dz4JBOO6.js} +1 -1
  241. package/web-shell/assets/{chunk-4BX2VUAB-C8MVPMiQ.js → chunk-4BX2VUAB-Cz2GnvAR.js} +1 -1
  242. package/web-shell/assets/{chunk-55IACEB6-BUi4Yfv3.js → chunk-55IACEB6-CC6kOQYx.js} +1 -1
  243. package/web-shell/assets/{chunk-727SXJPM-Cy3Su2YY.js → chunk-727SXJPM-Z4lY4gbh.js} +1 -1
  244. package/web-shell/assets/{chunk-AQP2D5EJ-Dp8Teqv6.js → chunk-AQP2D5EJ-Yz0hZr3D.js} +1 -1
  245. package/web-shell/assets/{chunk-FMBD7UC4-BDTDM-4j.js → chunk-FMBD7UC4-nKmTWTv9.js} +1 -1
  246. package/web-shell/assets/{chunk-ND2GUHAM-7HfDt0r2.js → chunk-ND2GUHAM-CjZz0f6Y.js} +1 -1
  247. package/web-shell/assets/{chunk-QZHKN3VN-BIBU0uCF.js → chunk-QZHKN3VN-Bab3FpuS.js} +1 -1
  248. package/web-shell/assets/classDiagram-4FO5ZUOK-BRnxm8DX.js +1 -0
  249. package/web-shell/assets/classDiagram-v2-Q7XG4LA2-BRnxm8DX.js +1 -0
  250. package/web-shell/assets/{cose-bilkent-S5V4N54A-DRLdcg9p.js → cose-bilkent-S5V4N54A-BuSAGFox.js} +1 -1
  251. package/web-shell/assets/{dagre-BM42HDAG-DCCgDwqW.js → dagre-BM42HDAG-CRZXTg3g.js} +1 -1
  252. package/web-shell/assets/{diagram-2AECGRRQ-CsBTBmk3.js → diagram-2AECGRRQ-BFx1Ayrz.js} +1 -1
  253. package/web-shell/assets/{diagram-5GNKFQAL-C9qjH8Lt.js → diagram-5GNKFQAL-B2hMZ3gS.js} +1 -1
  254. package/web-shell/assets/{diagram-KO2AKTUF-Brjs_lj2.js → diagram-KO2AKTUF-DKxAQLmc.js} +1 -1
  255. package/web-shell/assets/{diagram-LMA3HP47-DtiWCl_F.js → diagram-LMA3HP47-Bo1xGqVY.js} +1 -1
  256. package/web-shell/assets/{diagram-OG6HWLK6-DmfKLkBT.js → diagram-OG6HWLK6-B9NG78d-.js} +1 -1
  257. package/web-shell/assets/{erDiagram-TEJ5UH35-Bve_4deH.js → erDiagram-TEJ5UH35-DltQKiqQ.js} +1 -1
  258. package/web-shell/assets/{flowDiagram-I6XJVG4X-C2_kXCcV.js → flowDiagram-I6XJVG4X-5xXGmS4I.js} +1 -1
  259. package/web-shell/assets/{ganttDiagram-6RSMTGT7-BSBIjiTF.js → ganttDiagram-6RSMTGT7-bhGL5n0l.js} +1 -1
  260. package/web-shell/assets/{gitGraphDiagram-PVQCEYII-CyebwI55.js → gitGraphDiagram-PVQCEYII-ZYnz9hgh.js} +1 -1
  261. package/web-shell/assets/{index-d0yfnV1M.js → index-CBBeUArD.js} +1 -1
  262. package/web-shell/assets/index-CbgU-jUo.css +5 -0
  263. package/web-shell/assets/index-_nhzXqab.js +1750 -0
  264. package/web-shell/assets/{infoDiagram-5YYISTIA-CSDGnWxU.js → infoDiagram-5YYISTIA-Cg-jamQf.js} +1 -1
  265. package/web-shell/assets/{ishikawaDiagram-YF4QCWOH-BK4jU13p.js → ishikawaDiagram-YF4QCWOH-CcmvKlyq.js} +1 -1
  266. package/web-shell/assets/{journeyDiagram-JHISSGLW-D_W6j-oF.js → journeyDiagram-JHISSGLW-BRsOQZp1.js} +1 -1
  267. package/web-shell/assets/{kanban-definition-UN3LZRKU-C7xf-SdC.js → kanban-definition-UN3LZRKU-xW-dmEHK.js} +1 -1
  268. package/web-shell/assets/{linear-DQmzxpxd.js → linear-ClBfEZH2.js} +1 -1
  269. package/web-shell/assets/{mermaid.core-9P7AGOLG.js → mermaid.core-D65NDkzc.js} +5 -5
  270. package/web-shell/assets/{mindmap-definition-RKZ34NQL-DgcgMyPk.js → mindmap-definition-RKZ34NQL-CyvFslYa.js} +1 -1
  271. package/web-shell/assets/{pieDiagram-4H26LBE5-3wWGb9eG.js → pieDiagram-4H26LBE5-BwSefMyG.js} +1 -1
  272. package/web-shell/assets/{quadrantDiagram-W4KKPZXB-BeCXnQw9.js → quadrantDiagram-W4KKPZXB-GqBJspFS.js} +1 -1
  273. package/web-shell/assets/{requirementDiagram-4Y6WPE33-Bi1UOHDz.js → requirementDiagram-4Y6WPE33-B137PlTJ.js} +1 -1
  274. package/web-shell/assets/{sankeyDiagram-5OEKKPKP-lrLUjjbb.js → sankeyDiagram-5OEKKPKP-maHkkt8i.js} +1 -1
  275. package/web-shell/assets/{sequenceDiagram-3UESZ5HK-BFuqKz6Q.js → sequenceDiagram-3UESZ5HK-DJ1mRaG3.js} +1 -1
  276. package/web-shell/assets/{stateDiagram-AJRCARHV-8DemQLhu.js → stateDiagram-AJRCARHV-aRmP7Q4i.js} +1 -1
  277. package/web-shell/assets/stateDiagram-v2-BHNVJYJU-Db39gvZ_.js +1 -0
  278. package/web-shell/assets/{timeline-definition-PNZ67QCA-uzEuVQXg.js → timeline-definition-PNZ67QCA-CIQ3BRPA.js} +1 -1
  279. package/web-shell/assets/{vennDiagram-CIIHVFJN-BQTeZ_-o.js → vennDiagram-CIIHVFJN-DR9VPd5h.js} +1 -1
  280. package/web-shell/assets/{wardley-L42UT6IY-B6yM5Im7.js → wardley-L42UT6IY-ZcfIbT4D.js} +1 -1
  281. package/web-shell/assets/{wardleyDiagram-YWT4CUSO-ChM8bmgn.js → wardleyDiagram-YWT4CUSO-D0jgPi4T.js} +1 -1
  282. package/web-shell/assets/{xychartDiagram-2RQKCTM6-oNG6HyB1.js → xychartDiagram-2RQKCTM6-BGWU4s5o.js} +1 -1
  283. package/web-shell/index.html +2 -2
  284. package/chunks/chunk-MPHPFVKK.js +0 -48
  285. package/chunks/chunk-RLKC46YT.js +0 -3582
  286. package/chunks/chunk-UPDOZBWO.js +0 -358
  287. package/web-shell/assets/channel-BrGVBa2L.js +0 -1
  288. package/web-shell/assets/classDiagram-4FO5ZUOK-B5TUzJzI.js +0 -1
  289. package/web-shell/assets/classDiagram-v2-Q7XG4LA2-B5TUzJzI.js +0 -1
  290. package/web-shell/assets/index-CIDsgxTe.js +0 -1792
  291. package/web-shell/assets/index-DiQnWi_E.css +0 -5
  292. package/web-shell/assets/stateDiagram-v2-BHNVJYJU-DhM5ixYd.js +0 -1
  293. /package/chunks/{chunk-NTTBXH7U.js → chunk-UGK4K2N2.js} +0 -0
@@ -13,21 +13,22 @@ import {
13
13
  matchMcpServerByRef,
14
14
  parseExtensionRef,
15
15
  parseMcpServerRef
16
- } from "./chunk-76J3IJ3M.js";
16
+ } from "./chunk-NV6LW6FT.js";
17
17
  import {
18
18
  getAvailableCommands,
19
+ getSlashCommandFirstToken,
19
20
  handleSlashCommand,
20
21
  insertAfterFunctionResponses,
21
22
  isSlashCommand,
22
23
  normalizePartList
23
- } from "./chunk-NNHNLJ2X.js";
24
+ } from "./chunk-XO24LIZC.js";
24
25
  import {
25
26
  collectContextData,
26
27
  formatContextUsageText
27
- } from "./chunk-N5YPT6PH.js";
28
+ } from "./chunk-X3YA3YGG.js";
28
29
  import {
29
30
  recomputeMcpGating
30
- } from "./chunk-GGDBMYGZ.js";
31
+ } from "./chunk-SA7GBPEA.js";
31
32
  import {
32
33
  SessionIdConflictError,
33
34
  appEvents,
@@ -35,39 +36,39 @@ import {
35
36
  cleanupReviewWorktreeLeases,
36
37
  loadCliConfig,
37
38
  normalizeDisabledToolList
38
- } from "./chunk-IGGGG5CX.js";
39
+ } from "./chunk-KSGWAYNE.js";
39
40
  import {
40
41
  getCommandSubcommandNames
41
- } from "./chunk-AFSG32D5.js";
42
+ } from "./chunk-PMS7O6SA.js";
42
43
  import {
43
44
  getEffectiveSupportedModes
44
- } from "./chunk-O4D7SPJN.js";
45
+ } from "./chunk-73G3Z7QS.js";
45
46
  import "./chunk-4WGODMVR.js";
46
47
  import "./chunk-3SH53ANB.js";
47
48
  import "./chunk-NYX53SV4.js";
48
- import "./chunk-DXIBNLBZ.js";
49
+ import "./chunk-SNQZZ765.js";
49
50
  import {
50
51
  isGoalStatusKind
51
52
  } from "./chunk-EKTCKZV5.js";
52
53
  import "./chunk-2M55OBEB.js";
53
54
  import {
54
55
  startNonInteractiveOpenAILogHousekeeping
55
- } from "./chunk-6YKYPVDV.js";
56
+ } from "./chunk-WVIABDXV.js";
56
57
  import "./chunk-KW7NOTN6.js";
57
58
  import {
58
59
  beginAcpBootstrapConfigProfiling,
59
60
  buildAndFreezeAcpStartupProfile,
60
61
  endAcpBootstrapConfigProfiling,
61
62
  markAcpStartup
62
- } from "./chunk-CZBYX5MY.js";
63
- import "./chunk-GO7STP6N.js";
64
- import "./chunk-JUEPY766.js";
65
- import "./chunk-NEFOOD54.js";
63
+ } from "./chunk-QEJZUXSK.js";
64
+ import "./chunk-K3CECR5C.js";
65
+ import "./chunk-LRDB2OLB.js";
66
+ import "./chunk-4V4DFJBS.js";
66
67
  import "./chunk-YAF2MQZ6.js";
67
68
  import {
68
69
  computeCpuPercent
69
70
  } from "./chunk-LBOVL47Y.js";
70
- import "./chunk-QRCNA3SR.js";
71
+ import "./chunk-RAQBBGS6.js";
71
72
  import "./chunk-6H67XLET.js";
72
73
  import {
73
74
  GENERATION_MAX_PROMPT_BYTES,
@@ -91,7 +92,7 @@ import {
91
92
  shouldSuppressRememberErrorDetails,
92
93
  workspaceMemoryFailureCode,
93
94
  workspaceMemoryFailureDiagnostics
94
- } from "./chunk-ZZO74WKW.js";
95
+ } from "./chunk-ZXEAEZFN.js";
95
96
  import {
96
97
  BaseEmitter,
97
98
  HistoryReplayer,
@@ -99,11 +100,13 @@ import {
99
100
  ToolCallEmitter,
100
101
  createTranscriptMessageUpdate,
101
102
  createTranscriptUsageUpdate,
102
- hasFullSessionContext
103
- } from "./chunk-RLKC46YT.js";
104
- import "./chunk-BZ263IKX.js";
105
- import "./chunk-4NFY2S7N.js";
106
- import "./chunk-3U3VAL47.js";
103
+ hasFullSessionContext,
104
+ observeAcpToolResultProjection,
105
+ observeAcpToolResultWire
106
+ } from "./chunk-EOCQCNV4.js";
107
+ import "./chunk-OVY67CYC.js";
108
+ import "./chunk-E7REAOTN.js";
109
+ import "./chunk-57KOJ2KZ.js";
107
110
  import "./chunk-2MIN6GRR.js";
108
111
  import "./chunk-QHTIBUWB.js";
109
112
  import "./chunk-3Z43GZUQ.js";
@@ -121,22 +124,22 @@ import {
121
124
  buildPermissionSettings,
122
125
  normalizePermissionRules,
123
126
  readPermissionRuleSet
124
- } from "./chunk-7UXUJ5T3.js";
127
+ } from "./chunk-SBRIBTYN.js";
125
128
  import {
126
129
  MAX_AUDIO_BYTES,
127
130
  sanitizeVoiceErrorMessage,
128
131
  transcribeVoiceAudio
129
- } from "./chunk-6ORZ2EDC.js";
132
+ } from "./chunk-PPTM4O4R.js";
130
133
  import {
131
134
  readVoiceModel
132
- } from "./chunk-QIH2HAEN.js";
135
+ } from "./chunk-7OCSX7FC.js";
133
136
  import "./chunk-WGHHA7ZH.js";
134
- import "./chunk-NTTBXH7U.js";
135
- import "./chunk-XHRY7BXD.js";
137
+ import "./chunk-UGK4K2N2.js";
138
+ import "./chunk-G6FFFICU.js";
136
139
  import {
137
140
  SESSION_SOURCE_META_KEY,
138
141
  parseSessionSource
139
- } from "./chunk-LJQAUZMR.js";
142
+ } from "./chunk-VGAAAMRD.js";
140
143
  import "./chunk-7U5G6JXI.js";
141
144
  import "./chunk-WCCLLK7X.js";
142
145
  import "./chunk-OCPBI7J5.js";
@@ -148,26 +151,26 @@ import {
148
151
  parseAcpModelOption,
149
152
  resolveAcpModelOption,
150
153
  sanitizeProviderBaseUrl
151
- } from "./chunk-ZYYTZUI2.js";
154
+ } from "./chunk-ISRHAMNL.js";
152
155
  import {
153
156
  mapSkillConfigToStatus
154
157
  } from "./chunk-BGXZBI5B.js";
155
158
  import {
156
159
  resolveSkillSettings
157
160
  } from "./chunk-Z4X5MTRT.js";
158
- import "./chunk-TUGSVUJB.js";
159
- import "./chunk-QV5YN5YD.js";
161
+ import "./chunk-2JXDFSVE.js";
162
+ import "./chunk-HGPMOXLZ.js";
160
163
  import "./chunk-57OAHC2Y.js";
161
- import "./chunk-OD2WU5QY.js";
164
+ import "./chunk-NRPXRNN4.js";
162
165
  import "./chunk-45NQKMYB.js";
163
- import "./chunk-A4QRWUDE.js";
166
+ import "./chunk-5IYS4WWR.js";
164
167
  import "./chunk-V6WHFGST.js";
165
168
  import {
166
169
  createLoadedSettingsAdapter
167
- } from "./chunk-BVJS5BSP.js";
170
+ } from "./chunk-FCTLOVYW.js";
168
171
  import {
169
172
  ndJsonStream
170
- } from "./chunk-NHDR76JX.js";
173
+ } from "./chunk-BQWNIPTE.js";
171
174
  import {
172
175
  ACP_PREFLIGHT_KINDS,
173
176
  IDLE_HOOK_EVENTS,
@@ -175,9 +178,9 @@ import {
175
178
  SERVE_STATUS_EXT_METHODS,
176
179
  STATUS_SCHEMA_VERSION,
177
180
  mapDomainErrorToErrorKind
178
- } from "./chunk-QNQAPSN2.js";
181
+ } from "./chunk-UC67T4SF.js";
179
182
  import "./chunk-ZLCT4C5A.js";
180
- import "./chunk-BKPPWD33.js";
183
+ import "./chunk-DRKYT2TR.js";
181
184
  import {
182
185
  ACTIVE_WORK_CLOSE_IF_UNHELD_PARAM,
183
186
  ACTIVE_WORK_HEARTBEAT_META_KEY,
@@ -189,6 +192,7 @@ import {
189
192
  CHANNEL_STARTUP_PROFILE_VERSION,
190
193
  CLIENT_MCP_OVER_WS_CONFIG_FLAG,
191
194
  DAEMON_CHANNEL_DELIVERY_META_KEY,
195
+ DAEMON_MEDIA_REFERENCES_META_KEY,
192
196
  DAEMON_MODEL_PROMPT_META_KEY,
193
197
  DAEMON_PROMPT_DISPLAY_TEXT_META_KEY,
194
198
  LOAD_REPLAY_BULK_MODE,
@@ -207,7 +211,7 @@ import {
207
211
  WORKTREE_MCP_DEFER_META_KEY,
208
212
  clampActiveWorkIntervalMs,
209
213
  isValidTrustedModelPrompt
210
- } from "./chunk-S5DWMTHO.js";
214
+ } from "./chunk-WP4WIUOJ.js";
211
215
  import {
212
216
  NOT_CURRENTLY_GENERATING_CANCEL_MESSAGE,
213
217
  isNotCurrentlyGeneratingCancelError
@@ -241,7 +245,7 @@ import "./chunk-H4A72DE5.js";
241
245
  import {
242
246
  assembleMcpServers,
243
247
  loadMcpApprovals
244
- } from "./chunk-JOOFMXGF.js";
248
+ } from "./chunk-QECSDJET.js";
245
249
  import {
246
250
  getOutputLanguageFilePath,
247
251
  getPersistScopeForModelSelection,
@@ -250,9 +254,9 @@ import {
250
254
  resolveOutputLanguageOrPreserveAuto,
251
255
  updateOutputLanguageFile,
252
256
  writeOutputLanguageAndRegisterPath
253
- } from "./chunk-A267JX7H.js";
257
+ } from "./chunk-OLZSWUZR.js";
254
258
  import "./chunk-RKUWKYED.js";
255
- import "./chunk-E23IPNGS.js";
259
+ import "./chunk-YFPZ3NNC.js";
256
260
  import "./chunk-GOXKNSDZ.js";
257
261
  import {
258
262
  getSystemDefaultsPath,
@@ -261,7 +265,7 @@ import {
261
265
  import {
262
266
  getCurrentLanguage,
263
267
  setLanguageAsync
264
- } from "./chunk-HUTNYWBG.js";
268
+ } from "./chunk-IOTPI425.js";
265
269
  import {
266
270
  SUPPORTED_LANGUAGES
267
271
  } from "./chunk-5EJZE3FP.js";
@@ -269,17 +273,17 @@ import {
269
273
  findEnvFiles,
270
274
  preResolveHomeEnvOverrides,
271
275
  reloadEnvironment
272
- } from "./chunk-MC4TLKEI.js";
276
+ } from "./chunk-SGLPDKRT.js";
273
277
  import {
274
278
  ENV_ACP_REPEATED_TOOL_FAILURE_GUARD
275
- } from "./chunk-MS7GNABG.js";
276
- import "./chunk-CU6GJD55.js";
279
+ } from "./chunk-CXJHQVEK.js";
280
+ import "./chunk-6DFPR7CS.js";
277
281
  import "./chunk-WZMH7II3.js";
278
282
  import {
279
283
  isFolderTrustEnabled,
280
284
  isWorkspaceTrusted,
281
285
  loadTrustedFolders
282
- } from "./chunk-IWPYVAO2.js";
286
+ } from "./chunk-YXC7JYUI.js";
283
287
  import "./chunk-NPQ5ZKRP.js";
284
288
  import "./chunk-MR3PXB6E.js";
285
289
  import "./chunk-XFSFZCM5.js";
@@ -318,6 +322,8 @@ import {
318
322
  SessionWriterError,
319
323
  SessionWriterUnavailableError,
320
324
  TURN_INTERRUPTION_HISTORY_TAIL_COUNT,
325
+ TURN_RESULT_CODE_TEXT_TRUNCATED,
326
+ TURN_RESULT_TEXT_MAX_CHARS,
321
327
  WorkspaceMcpBudget,
322
328
  abortGoalForStopHookCap,
323
329
  acquireSleepInhibitor,
@@ -382,12 +388,15 @@ import {
382
388
  isDenialFallbackReason,
383
389
  isGatedMcpScope,
384
390
  isPlanModeBlocked,
391
+ isTurnResultRecordPayload,
385
392
  markDuplicateProviderToolCallResponseSent,
386
393
  matchesAnyServerPattern,
387
394
  mcpServerRequiresOAuth,
388
395
  needsConfirmation,
389
396
  normalizeEventPayload,
390
397
  normalizeSnapshotPayload,
398
+ normalizeTurnResultError,
399
+ observeToolResultBoundary,
391
400
  persistPermissionOutcome,
392
401
  projectGoalStateToLegacy,
393
402
  readManyFiles,
@@ -407,29 +416,31 @@ import {
407
416
  shouldHaltOnTurnToolCallCap,
408
417
  shouldRunAutoModeForCall,
409
418
  subagentGenerator,
419
+ toolResultBoundaryArtifact,
420
+ toolResultPartDiagnosticValues,
410
421
  truncateNotificationLabel,
411
422
  updateSetting,
412
423
  validatePlanModeShellApproval,
413
424
  validatePlanModeShellContext
414
- } from "./chunk-4S5337WV.js";
425
+ } from "./chunk-XC377TLN.js";
415
426
  import "./chunk-GOFAQQZA.js";
416
427
  import "./chunk-5M6IDOMF.js";
417
428
  import "./chunk-TWPJO254.js";
418
429
  import {
419
430
  external_exports
420
431
  } from "./chunk-CQ35AJ4Z.js";
421
- import "./chunk-DGZEMW5R.js";
422
- import "./chunk-WSH6GRKG.js";
423
- import "./chunk-CKSJECTU.js";
424
- import "./chunk-OVZPVYZB.js";
432
+ import "./chunk-FS5NGKWC.js";
433
+ import "./chunk-SLILKYV2.js";
434
+ import "./chunk-NVRMCWTP.js";
435
+ import "./chunk-AKBOLMUF.js";
425
436
  import {
426
437
  parsePositiveIntegerEnv
427
438
  } from "./chunk-6PVPNMXU.js";
428
- import "./chunk-5EYKMUUY.js";
439
+ import "./chunk-SR2LYSMT.js";
429
440
  import "./chunk-IRH27ZC2.js";
430
441
  import "./chunk-QHWCP53L.js";
431
- import "./chunk-Y3YCSWG5.js";
432
- import "./chunk-UPDOZBWO.js";
442
+ import "./chunk-OBJYN4MX.js";
443
+ import "./chunk-2C6HJMG3.js";
433
444
  import {
434
445
  promptIdContext,
435
446
  todoWorkChainContext
@@ -440,7 +451,7 @@ import "./chunk-CPBF7KYF.js";
440
451
  import {
441
452
  APPROVAL_MODES
442
453
  } from "./chunk-RWDNJBWN.js";
443
- import "./chunk-25EYDK42.js";
454
+ import "./chunk-WPVUOVYX.js";
444
455
  import {
445
456
  HookEventName,
446
457
  createHookOutput
@@ -455,8 +466,8 @@ import {
455
466
  parseGoalSnapshotV2,
456
467
  parseGoalStateCause,
457
468
  wrapUserPromptSubmitContext
458
- } from "./chunk-OMLJNPBE.js";
459
- import "./chunk-OXCMMLED.js";
469
+ } from "./chunk-4ZMS3JCR.js";
470
+ import "./chunk-DGJ7O55J.js";
460
471
  import {
461
472
  AgentOutputMessageCapture,
462
473
  addAgentInputMessageAttributes,
@@ -467,7 +478,7 @@ import {
467
478
  registerAcpEventLoopLagGauge,
468
479
  startEventLoopLagMonitor,
469
480
  withDaemonSpan
470
- } from "./chunk-TIGA2IVL.js";
481
+ } from "./chunk-OO4FKHLO.js";
471
482
  import "./chunk-SAH4BD2J.js";
472
483
  import "./chunk-XLLKYULU.js";
473
484
  import {
@@ -486,7 +497,7 @@ import "./chunk-KBXKR5R2.js";
486
497
  import {
487
498
  clearCachedCredentialFile,
488
499
  qwenOAuth2Events
489
- } from "./chunk-GMIEIY3Y.js";
500
+ } from "./chunk-I3N2Z25H.js";
490
501
  import "./chunk-NAVJD2PQ.js";
491
502
  import "./chunk-ROIYNTHJ.js";
492
503
  import "./chunk-2B2BF7P7.js";
@@ -497,7 +508,6 @@ import {
497
508
  REASONING_EFFORT_TIERS,
498
509
  applyReasoningEffort
499
510
  } from "./chunk-KM73TBQ4.js";
500
- import "./chunk-MPHPFVKK.js";
501
511
  import "./chunk-AXMWHKXA.js";
502
512
  import {
503
513
  getToolCallPreparations
@@ -517,11 +527,9 @@ import {
517
527
  apiActivityTracker,
518
528
  formatFullTurnVisionNotice,
519
529
  formatVisionBridgeNotice,
520
- getAllGeminiMdFilenames,
521
530
  getFullTurnVisionModelSelector,
522
531
  getInvocationContext,
523
532
  getMCPServerStatus,
524
- getSpecificMimeType,
525
533
  hasImageParts,
526
534
  logConversationFinishedEvent,
527
535
  logLoopDetected,
@@ -536,9 +544,13 @@ import {
536
544
  shouldRunVisionBridge,
537
545
  splitImageParts,
538
546
  uiTelemetryService
539
- } from "./chunk-RVOJ2FBP.js";
547
+ } from "./chunk-KC4WMLZO.js";
540
548
  import "./chunk-YRLW2MSX.js";
541
549
  import "./chunk-VGC4I5JJ.js";
550
+ import {
551
+ getAllGeminiMdFilenames,
552
+ getSpecificMimeType
553
+ } from "./chunk-3PWCMXIR.js";
542
554
  import {
543
555
  getAutoMemoryRoot,
544
556
  getUserAutoMemoryRoot
@@ -558,16 +570,17 @@ import {
558
570
  import {
559
571
  AuthType,
560
572
  preloadContentGenerator
561
- } from "./chunk-4PKCUT7F.js";
573
+ } from "./chunk-QIHHJKXT.js";
562
574
  import "./chunk-F6WFNA7U.js";
563
- import "./chunk-46UV252V.js";
575
+ import "./chunk-WZAD4ZNJ.js";
564
576
  import {
565
577
  DEFAULT_TOKEN_LIMIT,
566
578
  tokenLimit
567
579
  } from "./chunk-FPGTNKCP.js";
580
+ import "./chunk-YHC2EYYG.js";
568
581
  import "./chunk-CPHEPGAO.js";
569
- import "./chunk-P7MPQI75.js";
570
- import "./chunk-FDGGZIYW.js";
582
+ import "./chunk-DVR7XKO5.js";
583
+ import "./chunk-YECDICIO.js";
571
584
  import {
572
585
  endToolExecutionSpan,
573
586
  endToolSpan,
@@ -578,11 +591,11 @@ import {
578
591
  startToolExecutionSpan,
579
592
  startToolSpan,
580
593
  withInteractionSpan
581
- } from "./chunk-EL5SXY3T.js";
594
+ } from "./chunk-XT4RKHVE.js";
582
595
  import "./chunk-HHJLM3WQ.js";
583
596
  import {
584
597
  sessionIdContext
585
- } from "./chunk-K5IDV3PC.js";
598
+ } from "./chunk-D34RDOLP.js";
586
599
  import {
587
600
  Storage,
588
601
  createDebugLogger,
@@ -591,10 +604,10 @@ import {
591
604
  isSubpath
592
605
  } from "./chunk-BUQDLC2G.js";
593
606
  import "./chunk-VOQXFAY5.js";
594
- import "./chunk-AW4TRXOC.js";
607
+ import "./chunk-TNPWODIZ.js";
595
608
  import {
596
609
  runExitCleanup
597
- } from "./chunk-X26JYGTD.js";
610
+ } from "./chunk-L6CCLB3G.js";
598
611
  import {
599
612
  writeStderrLine,
600
613
  writeStderrLineSafe
@@ -2213,6 +2226,7 @@ var SubAgentTracker = class {
2213
2226
  success: event.success,
2214
2227
  message: event.responseParts ?? [],
2215
2228
  resultDisplay: event.resultDisplay,
2229
+ boundaryArtifact: event.boundaryArtifact,
2216
2230
  args: state?.args,
2217
2231
  subagentMeta: this.subagentMeta
2218
2232
  }).catch((error) => {
@@ -3034,6 +3048,30 @@ var NEW_PROMPT_ABORT_REASON = "qwen:new-prompt";
3034
3048
  var SESSION_DISPOSE_ABORT_REASON = "qwen:session-dispose";
3035
3049
  var DAEMON_RETRY_META_KEY = "qwen.daemon.retry";
3036
3050
  var DAEMON_CONTINUE_META_KEY = "qwen.daemon.continueLastTurn";
3051
+ var MAX_DAEMON_MEDIA_REFERENCES = 256;
3052
+ function readDaemonMediaReferences(value) {
3053
+ if (!Array.isArray(value) || value.length === 0 || value.length > MAX_DAEMON_MEDIA_REFERENCES) {
3054
+ return void 0;
3055
+ }
3056
+ const references = [];
3057
+ for (const item of value) {
3058
+ if (!item || typeof item !== "object" || Array.isArray(item)) {
3059
+ return void 0;
3060
+ }
3061
+ const reference = item;
3062
+ if (reference["type"] !== "image" || typeof reference["mediaId"] !== "string" || reference["mediaId"].length === 0 || reference["mediaId"].length > 128 || typeof reference["mimeType"] !== "string" || reference["mimeType"].length === 0 || reference["mimeType"].length > 128 || typeof reference["size"] !== "number" || !Number.isSafeInteger(reference["size"]) || reference["size"] <= 0) {
3063
+ return void 0;
3064
+ }
3065
+ references.push({
3066
+ type: reference["type"],
3067
+ mediaId: reference["mediaId"],
3068
+ mimeType: reference["mimeType"],
3069
+ size: reference["size"]
3070
+ });
3071
+ }
3072
+ return references;
3073
+ }
3074
+ __name(readDaemonMediaReferences, "readDaemonMediaReferences");
3037
3075
  var TODO_STOP_GUARD_PROMPT_PREFIX = "[Todo Stop Guard] ";
3038
3076
  var TODO_STOP_GUARD_PROMPT_BODY_SUFFIX = " todo item(s) are still pending or in progress. Continue executing the current task now. Do not ask the user whether to continue. If progress requires user input, use the structured question or permission flow. If progress depends on external state, report the blocker explicitly.";
3039
3077
  var TODO_STOP_GUARD_FINAL_PROMPT_SUFFIX = " This is the final automatic continuation. Before ending, either complete/update the todos or report the completed progress and the exact blocker.";
@@ -3386,6 +3424,43 @@ function hasInlineMediaContentBlock(content) {
3386
3424
  return content.some((part) => part.type === "image" || part.type === "audio");
3387
3425
  }
3388
3426
  __name(hasInlineMediaContentBlock, "hasInlineMediaContentBlock");
3427
+ function extractTurnPromptText(content) {
3428
+ let hasImage = false;
3429
+ for (const block of content) {
3430
+ if (block.type === "image") hasImage = true;
3431
+ if (block.type === "text" && block.text.length > 0) return block.text;
3432
+ }
3433
+ return hasImage ? "[image]" : "";
3434
+ }
3435
+ __name(extractTurnPromptText, "extractTurnPromptText");
3436
+ function truncateTurnText(text) {
3437
+ if (text.length <= TURN_RESULT_TEXT_MAX_CHARS) {
3438
+ return { text, truncated: false };
3439
+ }
3440
+ return { text: text.slice(0, TURN_RESULT_TEXT_MAX_CHARS), truncated: true };
3441
+ }
3442
+ __name(truncateTurnText, "truncateTurnText");
3443
+ function stripReferencedInlineDataParts(parts, content) {
3444
+ const coveredByKey = /* @__PURE__ */ new Map();
3445
+ for (const block of content) {
3446
+ if (block.type !== "image") continue;
3447
+ const key = `${block.mimeType}\0${block.data}`;
3448
+ coveredByKey.set(key, (coveredByKey.get(key) ?? 0) + 1);
3449
+ }
3450
+ if (coveredByKey.size === 0) return parts;
3451
+ return parts.filter((part) => {
3452
+ const inlineData = part.inlineData;
3453
+ if (inlineData === void 0 || typeof inlineData.data !== "string") {
3454
+ return true;
3455
+ }
3456
+ const key = `${inlineData.mimeType ?? ""}\0${inlineData.data}`;
3457
+ const remaining = coveredByKey.get(key) ?? 0;
3458
+ if (remaining === 0) return true;
3459
+ coveredByKey.set(key, remaining - 1);
3460
+ return false;
3461
+ });
3462
+ }
3463
+ __name(stripReferencedInlineDataParts, "stripReferencedInlineDataParts");
3389
3464
  function capMidTurnDrainItems(items, fieldName) {
3390
3465
  if (items.length <= MAX_MID_TURN_DRAIN_ITEMS) return items;
3391
3466
  debugLogger6.warn(
@@ -3422,14 +3497,18 @@ function getValidMidTurnContentBlocks(content, displayText) {
3422
3497
  return validBlocks;
3423
3498
  }
3424
3499
  __name(getValidMidTurnContentBlocks, "getValidMidTurnContentBlocks");
3425
- function getStructuredMidTurnDisplayText(content, displayText) {
3500
+ function getStructuredMidTurnDisplayText(content, displayText, willPersistReferences) {
3426
3501
  if (typeof displayText === "string" && displayText.trim().length > 0) {
3427
3502
  return displayText.trim();
3428
3503
  }
3429
3504
  const text = content.filter(
3430
3505
  (part) => part.type === "text"
3431
3506
  ).map((part) => part.text).join("\n").trim();
3432
- return text || "[User message with attachments]";
3507
+ if (text) return text;
3508
+ if (!willPersistReferences && hasInlineMediaContentBlock(content)) {
3509
+ return "[User message with attachments]";
3510
+ }
3511
+ return text;
3433
3512
  }
3434
3513
  __name(getStructuredMidTurnDisplayText, "getStructuredMidTurnDisplayText");
3435
3514
  function parseMidTurnDrainResponse(response) {
@@ -3445,14 +3524,20 @@ function parseMidTurnDrainResponse(response) {
3445
3524
  item["displayText"]
3446
3525
  );
3447
3526
  if (content.length === 0) return [];
3527
+ const mediaReferences = readDaemonMediaReferences(
3528
+ item["mediaReferences"]
3529
+ );
3530
+ const willPersistReferences = mediaReferences !== void 0 && mediaReferences.length === content.filter((block) => block.type === "image").length;
3448
3531
  return [
3449
3532
  {
3450
3533
  kind: "structured",
3451
3534
  content,
3452
3535
  displayText: getStructuredMidTurnDisplayText(
3453
3536
  content,
3454
- item["displayText"]
3455
- )
3537
+ item["displayText"],
3538
+ willPersistReferences
3539
+ ),
3540
+ ...mediaReferences ? { mediaReferences } : {}
3456
3541
  }
3457
3542
  ];
3458
3543
  }
@@ -3477,7 +3562,7 @@ function isValidMidTurnDrainResponse(response, requireQueuedPromptState) {
3477
3562
  }
3478
3563
  if (Array.isArray(response["items"])) {
3479
3564
  return response["items"].every(
3480
- (item) => isRecord2(item) && Array.isArray(item["content"]) && item["content"].length > 0 && item["content"].every(isContentBlock)
3565
+ (item) => isRecord2(item) && Array.isArray(item["content"]) && item["content"].length > 0 && item["content"].every(isContentBlock) && (item["mediaReferences"] === void 0 || readDaemonMediaReferences(item["mediaReferences"]) !== void 0)
3481
3566
  );
3482
3567
  }
3483
3568
  return Array.isArray(response["messages"]) && response["messages"].every(
@@ -3507,15 +3592,37 @@ var TodoStopGuardClaimTimeoutError = class extends Error {
3507
3592
  };
3508
3593
  function beginChannelDeliveryResponseBlock(capture) {
3509
3594
  capture?.agentOutput.beginResponse();
3510
- if (!capture?.channelDelivery) return void 0;
3511
- capture.channelDelivery.finalText = "";
3512
- return [];
3595
+ if (capture?.channelDelivery) capture.channelDelivery.finalText = "";
3596
+ if (capture?.turnResult) capture.turnResult.finalText = "";
3597
+ if (!capture?.channelDelivery && !capture?.turnResult) return void 0;
3598
+ return {
3599
+ parts: [],
3600
+ chars: 0,
3601
+ ...capture?.channelDelivery ? {} : { capChars: TURN_RESULT_TEXT_MAX_CHARS + 1 }
3602
+ };
3513
3603
  }
3514
3604
  __name(beginChannelDeliveryResponseBlock, "beginChannelDeliveryResponseBlock");
3605
+ function appendChannelDeliveryResponseText(responseBlock, text) {
3606
+ if (!responseBlock) return;
3607
+ if (responseBlock.capChars !== void 0 && responseBlock.chars >= responseBlock.capChars) {
3608
+ return;
3609
+ }
3610
+ responseBlock.parts.push(text);
3611
+ responseBlock.chars += text.length;
3612
+ }
3613
+ __name(appendChannelDeliveryResponseText, "appendChannelDeliveryResponseText");
3614
+ function rewindChannelDeliveryResponseBlock(responseBlock, checkpoint) {
3615
+ if (!responseBlock) return;
3616
+ const removed = responseBlock.parts.splice(checkpoint);
3617
+ for (const part of removed) responseBlock.chars -= part.length;
3618
+ }
3619
+ __name(rewindChannelDeliveryResponseBlock, "rewindChannelDeliveryResponseBlock");
3515
3620
  function commitChannelDeliveryResponseBlock(capture, responseBlock, hasFunctionCalls) {
3516
3621
  capture?.agentOutput.commitResponse(hasFunctionCalls);
3517
- if (capture?.channelDelivery && responseBlock && !hasFunctionCalls) {
3518
- capture.channelDelivery.finalText = responseBlock.join("");
3622
+ if (responseBlock && !hasFunctionCalls) {
3623
+ const finalText = responseBlock.parts.join("");
3624
+ if (capture?.channelDelivery) capture.channelDelivery.finalText = finalText;
3625
+ if (capture?.turnResult) capture.turnResult.finalText = finalText;
3519
3626
  }
3520
3627
  }
3521
3628
  __name(commitChannelDeliveryResponseBlock, "commitChannelDeliveryResponseBlock");
@@ -5208,6 +5315,42 @@ var Session = class {
5208
5315
  }
5209
5316
  }
5210
5317
  async prompt(params, invocationContext, admissionCancellation, modelPrompt, scheduledGoalTurn) {
5318
+ if (invocationContext !== void 0 && invocationContext.sessionId !== this.config.getSessionId()) {
5319
+ throw RequestError.invalidParams(
5320
+ void 0,
5321
+ "Invocation context session does not match the active session"
5322
+ );
5323
+ }
5324
+ const turnRecording = this.#beginTurnRecording(params, invocationContext);
5325
+ try {
5326
+ const result = await this.#promptWithTurnRecording(
5327
+ params,
5328
+ invocationContext,
5329
+ admissionCancellation,
5330
+ modelPrompt,
5331
+ scheduledGoalTurn,
5332
+ turnRecording
5333
+ );
5334
+ this.#settleTurnRecording(
5335
+ result.stopReason === "cancelled" ? "cancelled" : "completed",
5336
+ turnRecording,
5337
+ result
5338
+ );
5339
+ return result;
5340
+ } catch (error) {
5341
+ const pendingSend = turnRecording?.abortController;
5342
+ const abortReason = pendingSend?.signal.aborted === true ? pendingSend.signal.reason : void 0;
5343
+ const controlledAbort = abortReason === USER_CANCEL_ABORT_REASON || abortReason === SESSION_DISPOSE_ABORT_REASON || abortReason === NEW_PROMPT_ABORT_REASON && this.#isAbortError(error);
5344
+ if (controlledAbort) {
5345
+ const result = { stopReason: "cancelled" };
5346
+ this.#settleTurnRecording("cancelled", turnRecording, result);
5347
+ return result;
5348
+ }
5349
+ this.#settleTurnRecording("error", turnRecording, void 0, error);
5350
+ throw error;
5351
+ }
5352
+ }
5353
+ async #promptWithTurnRecording(params, invocationContext, admissionCancellation, modelPrompt, scheduledGoalTurn, turnRecording) {
5211
5354
  if (this.closing) {
5212
5355
  throw RequestError.invalidParams(void 0, "Session is closing");
5213
5356
  }
@@ -5267,6 +5410,7 @@ var Session = class {
5267
5410
  }
5268
5411
  this.pendingPrompt?.abort(NEW_PROMPT_ABORT_REASON);
5269
5412
  const pendingSend = goalTurn?.controller ?? new AbortController();
5413
+ if (turnRecording) turnRecording.abortController = pendingSend;
5270
5414
  const cancelPendingSend = /* @__PURE__ */ __name(() => pendingSend.abort(USER_CANCEL_ABORT_REASON), "cancelPendingSend");
5271
5415
  if (admissionCancellation) {
5272
5416
  admissionCancellation.addEventListener("abort", cancelPendingSend, {
@@ -5372,6 +5516,7 @@ var Session = class {
5372
5516
  const channelDelivery = parsePromptChannelDelivery(params);
5373
5517
  const responseCapture = {
5374
5518
  ...channelDelivery ? { channelDelivery: { finalText: "" } } : {},
5519
+ ...turnRecording ? { turnResult: turnRecording.finalAnswer } : {},
5375
5520
  agentOutput: new AgentOutputMessageCapture(this.config)
5376
5521
  };
5377
5522
  let resolveCompletion;
@@ -5381,6 +5526,7 @@ var Session = class {
5381
5526
  let rejectedByLoopProtection = false;
5382
5527
  let promptResult;
5383
5528
  let promptFailed = false;
5529
+ if (turnRecording) turnRecording.startedAt = Date.now();
5384
5530
  try {
5385
5531
  const result = await this.#executePrompt(
5386
5532
  params,
@@ -5518,7 +5664,7 @@ var Session = class {
5518
5664
  * `qwen/notify/session/prompt-suggestion` extNotification. Mirrors
5519
5665
  * the CLI's `AppContainer.tsx` integration: same `generatePromptSuggestion`
5520
5666
  * call, same `enableCacheSharing` flag forwarding, same curated
5521
- * history slice (`getHistory(true).slice(-40)`).
5667
+ * history tail (`getHistoryTail(40, true)`).
5522
5668
  *
5523
5669
  * Differences from the CLI:
5524
5670
  * - Triggers only on `stopReason === 'end_turn'` (the daemon
@@ -5548,21 +5694,25 @@ var Session = class {
5548
5694
  const promptId = this.config.getSessionId() + "########" + String(this.turn);
5549
5695
  void (async () => {
5550
5696
  try {
5551
- const fullHistory = chat.getHistory(true);
5552
- const lastEntry = fullHistory[fullHistory.length - 1];
5697
+ const conversationHistory = chat.getHistoryTail(40, true);
5698
+ const lastEntry = conversationHistory[conversationHistory.length - 1];
5553
5699
  if (!lastEntry || lastEntry.role !== "model") {
5554
5700
  debugLogger6.debug(
5555
5701
  "Skipping followup suggestion: last history entry is not model"
5556
5702
  );
5557
5703
  return;
5558
5704
  }
5559
- const conversationHistory = fullHistory.length > 40 ? fullHistory.slice(-40) : fullHistory;
5560
5705
  const r = await generatePromptSuggestion(
5561
5706
  this.config,
5562
5707
  conversationHistory,
5563
5708
  ac.signal,
5564
5709
  {
5565
- enableCacheSharing: this.settings.merged.ui?.enableCacheSharing === true
5710
+ // On by default: the schema declares `default: true`, but
5711
+ // `mergeSettings` doesn't apply schema defaults, so an unset value
5712
+ // is `undefined` and a `=== true` gate left the cache-aware fork
5713
+ // as dead code unless the flag was explicitly set (#9230). Mirrors
5714
+ // AppContainer — only an explicit `false` opts out.
5715
+ enableCacheSharing: this.settings.merged.ui?.enableCacheSharing !== false
5566
5716
  }
5567
5717
  );
5568
5718
  if (ac.signal.aborted) return;
@@ -5648,7 +5798,8 @@ var Session = class {
5648
5798
  },
5649
5799
  async () => {
5650
5800
  const promptText = params.prompt.filter((block) => block.type === "text").map((block) => block.type === "text" ? block.text : "").join(" ");
5651
- const promptDisplayText = typeof promptMetadata?.[DAEMON_PROMPT_DISPLAY_TEXT_META_KEY] === "string" ? promptMetadata[DAEMON_PROMPT_DISPLAY_TEXT_META_KEY] : void 0;
5801
+ const promptDisplayTextValue = promptMetadata?.[DAEMON_PROMPT_DISPLAY_TEXT_META_KEY];
5802
+ const promptDisplayText = typeof promptDisplayTextValue === "string" ? promptDisplayTextValue : void 0;
5652
5803
  const modelPromptBlocks = modelPrompt === void 0 ? params.prompt : [{ type: "text", text: modelPrompt }];
5653
5804
  logUserPrompt(
5654
5805
  this.config,
@@ -5671,6 +5822,12 @@ var Session = class {
5671
5822
  );
5672
5823
  }
5673
5824
  }
5825
+ const firstTextBlock = modelPromptBlocks.find(
5826
+ (block) => block.type === "text"
5827
+ );
5828
+ const inputText = firstTextBlock?.text || "";
5829
+ const isSlashInput = !isContinue && isSlashCommand(inputText);
5830
+ const slashCommandName = getSlashCommandFirstToken(inputText);
5674
5831
  let continuationParts = null;
5675
5832
  let strippedOrphanEntries = null;
5676
5833
  let orphanPushCountSnapshot = 0;
@@ -5709,12 +5866,16 @@ var Session = class {
5709
5866
  } else if (isContinue) {
5710
5867
  } else if (isRetry) {
5711
5868
  this.#getCurrentChat().stripOrphanedUserEntriesFromHistory();
5712
- } else {
5869
+ } else if (!isSlashInput || slashCommandName !== "advisor") {
5870
+ const mediaReferences = readDaemonMediaReferences(
5871
+ promptMetadata?.[DAEMON_MEDIA_REFERENCES_META_KEY]
5872
+ );
5713
5873
  const recorder = this.config.getChatRecordingService();
5714
- if (promptDisplayText !== void 0) {
5874
+ if (promptDisplayText !== void 0 || mediaReferences) {
5715
5875
  recorder?.recordUserMessage(promptText, goalTurn?.permit, {
5716
- displayText: promptDisplayText,
5717
- hookContext: ""
5876
+ displayText: promptDisplayText ?? promptText,
5877
+ hookContext: "",
5878
+ ...mediaReferences ? { mediaReferences } : {}
5718
5879
  });
5719
5880
  } else if (goalTurn) {
5720
5881
  recorder?.recordUserMessage(promptText, goalTurn.permit);
@@ -5722,11 +5883,6 @@ var Session = class {
5722
5883
  recorder?.recordUserMessage(promptText);
5723
5884
  }
5724
5885
  }
5725
- const firstTextBlock = modelPromptBlocks.find(
5726
- (block) => block.type === "text"
5727
- );
5728
- const inputText = firstTextBlock?.text || "";
5729
- const isSlashInput = !isContinue && isSlashCommand(inputText);
5730
5886
  if (!isSlashInput && !isContinue && !isRetry) {
5731
5887
  this.refreshContextFilesOnWrite = false;
5732
5888
  }
@@ -5757,13 +5913,58 @@ var Session = class {
5757
5913
  startNewSession: /* @__PURE__ */ __name(() => this.rebindGoalRuntimeForNewSession(), "startNewSession")
5758
5914
  }
5759
5915
  );
5760
- parts = await this.#processSlashCommandResult(
5761
- slashCommandResult,
5762
- modelPromptBlocks,
5763
- pendingSend.signal,
5764
- onFullTurnModel
5765
- );
5916
+ if (slashCommandName === "advisor" && pendingSend.signal.aborted && slashCommandResult.type === "message") {
5917
+ this.todoStopGuard.suspend();
5918
+ logConversationFinishedEvent(
5919
+ this.config,
5920
+ new ConversationFinishedEvent(
5921
+ this.config.getApprovalMode(),
5922
+ 0
5923
+ )
5924
+ );
5925
+ return { stopReason: "cancelled" };
5926
+ }
5927
+ const resolvedCommandInfo = slashCommandResult.resolvedCommand;
5928
+ const shouldRecordSlashCommand = !(resolvedCommandInfo?.kind === "built-in" /* BUILT_IN */ && resolvedCommandInfo.name === "advisor");
5929
+ if (slashCommandName === "advisor" && shouldRecordSlashCommand && goalTurn?.origin !== "runtime" && !isRetry) {
5930
+ const recorder = this.config.getChatRecordingService();
5931
+ if (promptDisplayText !== void 0) {
5932
+ recorder?.recordUserMessage(promptText, goalTurn?.permit, {
5933
+ displayText: promptDisplayText,
5934
+ hookContext: ""
5935
+ });
5936
+ } else if (goalTurn) {
5937
+ recorder?.recordUserMessage(promptText, goalTurn.permit);
5938
+ } else {
5939
+ recorder?.recordUserMessage(promptText);
5940
+ }
5941
+ }
5942
+ try {
5943
+ parts = await this.#processSlashCommandResult(
5944
+ slashCommandResult,
5945
+ modelPromptBlocks,
5946
+ pendingSend.signal,
5947
+ onFullTurnModel,
5948
+ shouldRecordSlashCommand
5949
+ );
5950
+ } catch (error) {
5951
+ logConversationFinishedEvent(
5952
+ this.config,
5953
+ new ConversationFinishedEvent(
5954
+ this.config.getApprovalMode(),
5955
+ 0
5956
+ )
5957
+ );
5958
+ throw error;
5959
+ }
5766
5960
  if (parts === null) {
5961
+ logConversationFinishedEvent(
5962
+ this.config,
5963
+ new ConversationFinishedEvent(
5964
+ this.config.getApprovalMode(),
5965
+ 0
5966
+ )
5967
+ );
5767
5968
  return { stopReason: "end_turn" };
5768
5969
  }
5769
5970
  } else {
@@ -5909,7 +6110,7 @@ ${this.pendingRecoveredAgentsNotice}
5909
6110
  const responseStream = sendResult.responseStream;
5910
6111
  nextMessage = null;
5911
6112
  channelDeliveryResponseBlock = beginChannelDeliveryResponseBlock(responseCapture);
5912
- channelDeliveryCheckpoint = channelDeliveryResponseBlock?.length ?? 0;
6113
+ channelDeliveryCheckpoint = channelDeliveryResponseBlock?.parts.length ?? 0;
5913
6114
  let streamFailed = false;
5914
6115
  try {
5915
6116
  for await (const resp of responseStream) {
@@ -5930,7 +6131,10 @@ ${this.pendingRecoveredAgentsNotice}
5930
6131
  );
5931
6132
  if (!part.thought) {
5932
6133
  responseCapture.agentOutput.appendText(part.text);
5933
- channelDeliveryResponseBlock?.push(part.text);
6134
+ appendChannelDeliveryResponseText(
6135
+ channelDeliveryResponseBlock,
6136
+ part.text
6137
+ );
5934
6138
  messageDisplay?.addChunk(part.text);
5935
6139
  }
5936
6140
  }
@@ -5953,9 +6157,10 @@ ${this.pendingRecoveredAgentsNotice}
5953
6157
  resp.type === "retry" /* RETRY */ && resp.isContinuation === true
5954
6158
  );
5955
6159
  if (resp.type === "model_fallback" /* MODEL_FALLBACK */ || !resp.isContinuation) {
5956
- if (channelDeliveryResponseBlock) {
5957
- channelDeliveryResponseBlock.length = channelDeliveryCheckpoint;
5958
- }
6160
+ rewindChannelDeliveryResponseBlock(
6161
+ channelDeliveryResponseBlock,
6162
+ channelDeliveryCheckpoint
6163
+ );
5959
6164
  }
5960
6165
  await finalizeToolCallPreparations(
5961
6166
  preparationTracker,
@@ -6668,7 +6873,7 @@ ${this.pendingRecoveredAgentsNotice}
6668
6873
  channelDeliveryResponseBlock = beginChannelDeliveryResponseBlock(
6669
6874
  options.responseCapture
6670
6875
  );
6671
- channelDeliveryCheckpoint = channelDeliveryResponseBlock?.length ?? 0;
6876
+ channelDeliveryCheckpoint = channelDeliveryResponseBlock?.parts.length ?? 0;
6672
6877
  initialSend = false;
6673
6878
  if (guardForThisSend) {
6674
6879
  const guardCommitted = this.todoStopGuard.commitContinuation(
@@ -6701,7 +6906,10 @@ ${this.pendingRecoveredAgentsNotice}
6701
6906
  );
6702
6907
  if (!part.thought) {
6703
6908
  options.responseCapture?.agentOutput.appendText(part.text);
6704
- channelDeliveryResponseBlock?.push(part.text);
6909
+ appendChannelDeliveryResponseText(
6910
+ channelDeliveryResponseBlock,
6911
+ part.text
6912
+ );
6705
6913
  messageDisplay?.addChunk(part.text);
6706
6914
  }
6707
6915
  }
@@ -6724,9 +6932,10 @@ ${this.pendingRecoveredAgentsNotice}
6724
6932
  response.type === "retry" /* RETRY */ && response.isContinuation === true
6725
6933
  );
6726
6934
  if (response.type === "model_fallback" /* MODEL_FALLBACK */ || !response.isContinuation) {
6727
- if (channelDeliveryResponseBlock) {
6728
- channelDeliveryResponseBlock.length = channelDeliveryCheckpoint;
6729
- }
6935
+ rewindChannelDeliveryResponseBlock(
6936
+ channelDeliveryResponseBlock,
6937
+ channelDeliveryCheckpoint
6938
+ );
6730
6939
  }
6731
6940
  await finalizeToolCallPreparations(
6732
6941
  preparationTracker,
@@ -6918,9 +7127,11 @@ ${this.pendingRecoveredAgentsNotice}
6918
7127
  }
6919
7128
  }
6920
7129
  async sendUpdate(update) {
7130
+ const projectedUpdate = projectAcpToolResultUpdate(update);
7131
+ observeAcpToolResultProjection(update, projectedUpdate, this.sessionId);
6921
7132
  const params = {
6922
7133
  sessionId: this.sessionId,
6923
- update: projectAcpToolResultUpdate(update)
7134
+ update: projectedUpdate
6924
7135
  };
6925
7136
  if (update.sessionUpdate === "plan") {
6926
7137
  this.activeTodoPlanRevision = void 0;
@@ -6951,6 +7162,52 @@ ${this.pendingRecoveredAgentsNotice}
6951
7162
  }, 0);
6952
7163
  timer.unref();
6953
7164
  }
7165
+ #beginTurnRecording(params, invocationContext) {
7166
+ if (!invocationContext) return null;
7167
+ const promptMetadata = params._meta;
7168
+ const rawPromptDisplayText = promptMetadata?.[DAEMON_PROMPT_DISPLAY_TEXT_META_KEY];
7169
+ const promptDisplayText = typeof rawPromptDisplayText === "string" && rawPromptDisplayText !== "" ? rawPromptDisplayText : void 0;
7170
+ const { text, truncated } = truncateTurnText(
7171
+ promptDisplayText ?? extractTurnPromptText(params.prompt)
7172
+ );
7173
+ const recordingService = this.config.getChatRecordingService();
7174
+ return {
7175
+ promptId: invocationContext.promptId,
7176
+ ...invocationContext.originatorClientId !== void 0 ? { originatorClientId: invocationContext.originatorClientId } : {},
7177
+ promptText: text,
7178
+ promptTextTruncated: truncated,
7179
+ finalAnswer: { finalText: "" },
7180
+ ...recordingService !== void 0 ? { recordingService } : {}
7181
+ };
7182
+ }
7183
+ #settleTurnRecording(state, recording, response, error) {
7184
+ if (recording === null) return;
7185
+ const finalAnswer = truncateTurnText(recording.finalAnswer.finalText);
7186
+ const stopReason = response?.stopReason ?? (state === "cancelled" ? "cancelled" : void 0);
7187
+ const payload = {
7188
+ promptId: recording.promptId,
7189
+ state,
7190
+ ...stopReason !== void 0 ? { stopReason } : {},
7191
+ ...state === "error" ? { error: normalizeTurnResultError(error) } : {},
7192
+ ...recording.startedAt !== void 0 ? { startedAt: recording.startedAt } : {},
7193
+ endedAt: Date.now(),
7194
+ promptText: recording.promptText,
7195
+ ...recording.promptTextTruncated ? { promptTextTruncated: true } : {},
7196
+ ...finalAnswer.text.length > 0 ? { resultText: finalAnswer.text } : {},
7197
+ ...finalAnswer.truncated ? {
7198
+ resultTruncated: true,
7199
+ resultCode: TURN_RESULT_CODE_TEXT_TRUNCATED
7200
+ } : {},
7201
+ ...recording.originatorClientId !== void 0 ? { originatorClientId: recording.originatorClientId } : {}
7202
+ };
7203
+ try {
7204
+ recording.recordingService?.recordTurnResult(payload);
7205
+ } catch (recordError) {
7206
+ debugLogger6.warn(
7207
+ `Failed to record turn result: ${this.#formatError(recordError)}`
7208
+ );
7209
+ }
7210
+ }
6954
7211
  #getCurrentChat() {
6955
7212
  return this.config.getGeminiClient().getChat();
6956
7213
  }
@@ -7481,7 +7738,22 @@ ${this.pendingRecoveredAgentsNotice}
7481
7738
  }
7482
7739
  }
7483
7740
  const built = prefixMidTurnUserMessageParts(rawParts, displayText);
7484
- this.config.getChatRecordingService()?.recordMidTurnUserMessage(built, displayText);
7741
+ const recorder = this.config.getChatRecordingService();
7742
+ if (message.kind === "structured" && message.mediaReferences) {
7743
+ const everyMediaBlockHasAReference = message.mediaReferences.length === message.content.filter((block) => block.type === "image").length;
7744
+ if (everyMediaBlockHasAReference) {
7745
+ recorder?.recordMidTurnUserMessage(
7746
+ stripReferencedInlineDataParts(built, message.content),
7747
+ displayText,
7748
+ void 0,
7749
+ message.mediaReferences
7750
+ );
7751
+ } else {
7752
+ recorder?.recordMidTurnUserMessage(built, displayText);
7753
+ }
7754
+ } else {
7755
+ recorder?.recordMidTurnUserMessage(built, displayText);
7756
+ }
7485
7757
  parts.push(...built);
7486
7758
  }
7487
7759
  return parts;
@@ -7803,7 +8075,7 @@ ${this.pendingRecoveredAgentsNotice}
7803
8075
  }
7804
8076
  const responseStream = sendResult.responseStream;
7805
8077
  const channelDeliveryResponseBlock = beginChannelDeliveryResponseBlock(responseCapture);
7806
- const channelDeliveryCheckpoint = channelDeliveryResponseBlock?.length ?? 0;
8078
+ const channelDeliveryCheckpoint = channelDeliveryResponseBlock?.parts.length ?? 0;
7807
8079
  if (loopTick && turnCount === 1) {
7808
8080
  this.loopTickResolver?.markDelivered();
7809
8081
  }
@@ -7829,7 +8101,10 @@ ${this.pendingRecoveredAgentsNotice}
7829
8101
  );
7830
8102
  if (!part.thought) {
7831
8103
  responseCapture.agentOutput.appendText(part.text);
7832
- channelDeliveryResponseBlock?.push(part.text);
8104
+ appendChannelDeliveryResponseText(
8105
+ channelDeliveryResponseBlock,
8106
+ part.text
8107
+ );
7833
8108
  messageDisplay?.addChunk(part.text);
7834
8109
  }
7835
8110
  }
@@ -7852,9 +8127,10 @@ ${this.pendingRecoveredAgentsNotice}
7852
8127
  resp.type === "retry" /* RETRY */ && resp.isContinuation === true
7853
8128
  );
7854
8129
  if (resp.type === "model_fallback" /* MODEL_FALLBACK */ || !resp.isContinuation) {
7855
- if (channelDeliveryResponseBlock) {
7856
- channelDeliveryResponseBlock.length = channelDeliveryCheckpoint;
7857
- }
8130
+ rewindChannelDeliveryResponseBlock(
8131
+ channelDeliveryResponseBlock,
8132
+ channelDeliveryCheckpoint
8133
+ );
7858
8134
  }
7859
8135
  await finalizeToolCallPreparations(
7860
8136
  preparationTracker,
@@ -8834,11 +9110,17 @@ ${this.pendingRecoveredAgentsNotice}
8834
9110
  callId: record.callId,
8835
9111
  toolName: record.toolName,
8836
9112
  responseParts: record.responseParts,
8837
- persistedOutputFiles: record.persistedOutputFiles
8838
- }))
9113
+ persistedOutputFiles: record.persistedOutputFiles,
9114
+ artifacts: record.metadata.artifacts
9115
+ })),
9116
+ new Map(orderedRecords.map((record) => [record.callId, promptId]))
8839
9117
  );
8840
9118
  orderedRecords.forEach((record, index) => {
8841
- this.config.getChatRecordingService()?.recordToolResult(finalized[index].responseParts, record.metadata);
9119
+ this.config.getChatRecordingService()?.recordToolResult(finalized[index].responseParts, {
9120
+ ...record.metadata,
9121
+ persistedOutputFiles: finalized[index].persistedOutputFiles,
9122
+ artifacts: finalized[index].artifacts
9123
+ });
8842
9124
  });
8843
9125
  return {
8844
9126
  ...result,
@@ -8954,7 +9236,9 @@ ${this.pendingRecoveredAgentsNotice}
8954
9236
  message: response.responseParts,
8955
9237
  resultDisplay: response.resultDisplay,
8956
9238
  error: response.error,
8957
- success: false
9239
+ success: false,
9240
+ artifacts: response.artifacts,
9241
+ persistedOutputFiles: response.persistedOutputFiles
8958
9242
  });
8959
9243
  }
8960
9244
  } catch (emitError) {
@@ -8975,7 +9259,8 @@ ${this.pendingRecoveredAgentsNotice}
8975
9259
  executionStatus: response.executionStatus ?? "not_started",
8976
9260
  resultDisplay: response.resultDisplay,
8977
9261
  error: response.error,
8978
- errorType: response.errorType
9262
+ errorType: response.errorType,
9263
+ artifacts: response.artifacts
8979
9264
  }
8980
9265
  });
8981
9266
  }, "emitDuplicateBatch");
@@ -9322,6 +9607,8 @@ ${this.pendingRecoveredAgentsNotice}
9322
9607
  let executionStatus = "not_started";
9323
9608
  let executionErrorType;
9324
9609
  let executeReturned = false;
9610
+ let executeAttempted = false;
9611
+ let producerObserved = false;
9325
9612
  let terminalStatus;
9326
9613
  let toolType = "native";
9327
9614
  let mcpServerName = void 0;
@@ -9401,9 +9688,28 @@ ${this.pendingRecoveredAgentsNotice}
9401
9688
  terminalStatus = opts.status;
9402
9689
  spanError = opts.status === "error" ? error.message : void 0;
9403
9690
  cleanupAgentToolResources();
9691
+ const errorParts = errorResponse(
9692
+ error,
9693
+ toolName2,
9694
+ opts.status,
9695
+ opts.errorType
9696
+ );
9404
9697
  if (toolName2 !== ToolNames.TODO_WRITE) {
9405
9698
  try {
9406
- await this.toolCallEmitter.emitError(callId, toolName2, error);
9699
+ if (opts.settledMetadata) {
9700
+ await this.toolCallEmitter.emitResult({
9701
+ callId,
9702
+ toolName: toolName2,
9703
+ args,
9704
+ message: errorParts,
9705
+ error,
9706
+ success: false,
9707
+ artifacts: opts.settledMetadata.artifacts,
9708
+ persistedOutputFiles: opts.settledMetadata.persistedOutputFiles
9709
+ });
9710
+ } else {
9711
+ await this.toolCallEmitter.emitError(callId, toolName2, error);
9712
+ }
9407
9713
  } catch (emitError) {
9408
9714
  debugLogger6.debug(
9409
9715
  "[Session.runTool] Failed to emit terminal tool update",
@@ -9411,16 +9717,28 @@ ${this.pendingRecoveredAgentsNotice}
9411
9717
  );
9412
9718
  }
9413
9719
  }
9414
- const errorParts = errorResponse(
9415
- error,
9416
- toolName2,
9417
- opts.status,
9418
- opts.errorType
9419
- );
9720
+ if (executeAttempted && !producerObserved) {
9721
+ observeToolResultBoundary({
9722
+ stage: "producer",
9723
+ sessionId: this.sessionId,
9724
+ promptId,
9725
+ toolCallId: callId,
9726
+ toolName: toolName2,
9727
+ artifacts: [
9728
+ opts.settledMetadata ? toolResultBoundaryArtifact(
9729
+ opts.settledMetadata.persistedOutputFiles,
9730
+ opts.settledMetadata.artifacts
9731
+ ) : toolResultBoundaryArtifact([], [])
9732
+ ],
9733
+ values: /* @__PURE__ */ __name(() => toolResultPartDiagnosticValues(errorParts), "values")
9734
+ });
9735
+ producerObserved = true;
9736
+ }
9420
9737
  queueToolResultRecord?.(fc, {
9421
9738
  callId,
9422
9739
  toolName: toolName2,
9423
9740
  responseParts: errorParts,
9741
+ persistedOutputFiles: opts.settledMetadata?.persistedOutputFiles,
9424
9742
  policyToolName: guardContext.policyToolName,
9425
9743
  toolType,
9426
9744
  executionErrorType: executionStatus === "error" ? executionErrorType ?? opts.errorType : void 0,
@@ -9429,6 +9747,7 @@ ${this.pendingRecoveredAgentsNotice}
9429
9747
  status: opts.status,
9430
9748
  executionStatus,
9431
9749
  resultDisplay: void 0,
9750
+ artifacts: opts.settledMetadata?.artifacts,
9432
9751
  error: opts.status === "error" ? error : void 0,
9433
9752
  errorType: opts.status === "error" ? opts.errorType : void 0
9434
9753
  }
@@ -10348,6 +10667,8 @@ ${this.pendingRecoveredAgentsNotice}
10348
10667
  }
10349
10668
  }
10350
10669
  } : void 0, "heartbeatSpanAttributes");
10670
+ let settledArtifacts;
10671
+ let settledPersistedOutputFiles;
10351
10672
  const sleepInhibitorHandle = acquireSleepInhibitor(
10352
10673
  this.config,
10353
10674
  `Qwen Code is executing tool ${toolName}`
@@ -10369,12 +10690,21 @@ ${this.pendingRecoveredAgentsNotice}
10369
10690
  callId
10370
10691
  });
10371
10692
  executionStatus = "error";
10693
+ executeAttempted = true;
10372
10694
  try {
10373
10695
  toolResult = await invocation.execute(
10374
10696
  activeToolAbortSignal,
10375
10697
  onToolProgress
10376
10698
  );
10377
10699
  executeReturned = true;
10700
+ try {
10701
+ settledArtifacts = toolResult.artifacts;
10702
+ } catch {
10703
+ }
10704
+ try {
10705
+ settledPersistedOutputFiles = toolResult.persistedOutputFiles;
10706
+ } catch {
10707
+ }
10378
10708
  parentAbortedAtExecutionSettle = activeToolAbortSignal.aborted;
10379
10709
  isExecutionTimeout = toolResult.error?.type === "execution_timeout" /* EXECUTION_TIMEOUT */;
10380
10710
  aborted = parentAbortedAtExecutionSettle && !isExecutionTimeout;
@@ -10409,6 +10739,32 @@ ${this.pendingRecoveredAgentsNotice}
10409
10739
  toolSettled = true;
10410
10740
  sleepInhibitorHandle.release();
10411
10741
  }
10742
+ producerObserved = true;
10743
+ try {
10744
+ observeToolResultBoundary({
10745
+ stage: "producer",
10746
+ sessionId: this.sessionId,
10747
+ promptId,
10748
+ toolCallId: callId,
10749
+ toolName,
10750
+ artifacts: [
10751
+ toolResultBoundaryArtifact(
10752
+ settledPersistedOutputFiles,
10753
+ settledArtifacts
10754
+ )
10755
+ ],
10756
+ values: /* @__PURE__ */ __name(() => [
10757
+ ...toolResultPartDiagnosticValues(toolResult.llmContent),
10758
+ ...typeof toolResult.returnDisplay === "string" ? [
10759
+ {
10760
+ representation: "display",
10761
+ value: toolResult.returnDisplay
10762
+ }
10763
+ ] : []
10764
+ ], "values")
10765
+ });
10766
+ } catch {
10767
+ }
10412
10768
  cleanupAgentToolResources();
10413
10769
  if ((isEnterPlanModeTool || isExitPlanModeTool) && !toolResult.error && this.config.getApprovalMode() !== approvalMode) {
10414
10770
  await this.sendCurrentModeUpdateNotification();
@@ -10462,7 +10818,11 @@ ${this.pendingRecoveredAgentsNotice}
10462
10818
  {
10463
10819
  status: "cancelled",
10464
10820
  errorType: void 0,
10465
- executionStatus
10821
+ executionStatus,
10822
+ settledMetadata: {
10823
+ artifacts: settledArtifacts,
10824
+ persistedOutputFiles: settledPersistedOutputFiles
10825
+ }
10466
10826
  }
10467
10827
  );
10468
10828
  }
@@ -10475,7 +10835,11 @@ ${this.pendingRecoveredAgentsNotice}
10475
10835
  return earlyErrorResponse(new Error(stopMessage), toolName, {
10476
10836
  status: "error",
10477
10837
  errorType: "execution_denied" /* EXECUTION_DENIED */,
10478
- executionStatus
10838
+ executionStatus,
10839
+ settledMetadata: {
10840
+ artifacts: settledArtifacts,
10841
+ persistedOutputFiles: settledPersistedOutputFiles
10842
+ }
10479
10843
  });
10480
10844
  }
10481
10845
  if (postHookResult.additionalContext) {
@@ -10579,7 +10943,8 @@ ${this.pendingRecoveredAgentsNotice}
10579
10943
  resultDisplay: toolResult.returnDisplay,
10580
10944
  error: responseError,
10581
10945
  success: succeeded,
10582
- artifacts: toolResult.artifacts
10946
+ artifacts: settledArtifacts,
10947
+ persistedOutputFiles: settledPersistedOutputFiles
10583
10948
  });
10584
10949
  } catch (emitError) {
10585
10950
  debugLogger6.debug(
@@ -10618,7 +10983,7 @@ ${this.pendingRecoveredAgentsNotice}
10618
10983
  callId,
10619
10984
  toolName,
10620
10985
  responseParts,
10621
- persistedOutputFiles: toolResult.persistedOutputFiles,
10986
+ persistedOutputFiles: settledPersistedOutputFiles,
10622
10987
  policyToolName,
10623
10988
  toolType,
10624
10989
  executionErrorType: executionStatus === "error" ? executionErrorType : void 0,
@@ -10628,6 +10993,7 @@ ${this.pendingRecoveredAgentsNotice}
10628
10993
  executionStatus,
10629
10994
  resultDisplay: toolResult.returnDisplay,
10630
10995
  ...visionBridgeNotice !== void 0 ? { visionBridgeNotice } : {},
10996
+ artifacts: settledArtifacts,
10631
10997
  error: status === "error" && toolResult.error ? new Error(toolResult.error.message) : void 0,
10632
10998
  errorType: status === "error" ? executionErrorType : void 0
10633
10999
  }
@@ -10736,19 +11102,18 @@ ${this.pendingRecoveredAgentsNotice}
10736
11102
  *
10737
11103
  * Supported result types in ACP mode:
10738
11104
  * - submit_prompt: Submits content to the model
11105
+ * - message: Emits a single message to the client
10739
11106
  * - stream_messages: Streams multiple messages to the client (ACP-specific)
10740
11107
  * - unsupported: Command cannot be executed in ACP mode
10741
11108
  * - no_command: No command was found, use original prompt
10742
11109
  *
10743
- * Note: 'message' type is not supported in ACP mode - commands should use
10744
- * 'stream_messages' instead for consistent async handling.
10745
- *
10746
11110
  * @param result The result from handleSlashCommand
10747
11111
  * @param originalPrompt The original prompt blocks
10748
11112
  * @returns Parts to use for the prompt, or null if command was handled without needing model interaction
10749
11113
  */
10750
- async #processSlashCommandResult(result, originalPrompt, abortSignal, onFullTurnModel) {
11114
+ async #processSlashCommandResult(result, originalPrompt, abortSignal, onFullTurnModel, shouldRecordResult) {
10751
11115
  this.refreshContextFilesOnWrite = result.type === "submit_prompt" && Boolean(result.refreshContextFilesOnWrite);
11116
+ const recorder = shouldRecordResult ? this.config.getChatRecordingService() : void 0;
10752
11117
  switch (result.type) {
10753
11118
  case "submit_prompt":
10754
11119
  return this.#applyBridgeConversionsIfNeeded(
@@ -10762,7 +11127,7 @@ ${this.pendingRecoveredAgentsNotice}
10762
11127
  }
10763
11128
  const rendered = (result.content || "").replace(/\n/g, " \n");
10764
11129
  await this.messageEmitter.emitSlashCommandOutput(rendered);
10765
- this.config.getChatRecordingService()?.recordSlashCommand({
11130
+ recorder?.recordSlashCommand({
10766
11131
  phase: "result",
10767
11132
  rawCommand: originalPrompt.filter((b) => b.type === "text").map((b) => b.type === "text" ? b.text : "").join(" "),
10768
11133
  outputHistoryItems: [
@@ -10783,7 +11148,7 @@ ${this.pendingRecoveredAgentsNotice}
10783
11148
  chunks.push(msg.content || "");
10784
11149
  }
10785
11150
  if (chunks.length > 0) {
10786
- this.config.getChatRecordingService()?.recordSlashCommand({
11151
+ recorder?.recordSlashCommand({
10787
11152
  phase: "result",
10788
11153
  rawCommand: originalPrompt.filter((b) => b.type === "text").map((b) => b.type === "text" ? b.text : "").join(" "),
10789
11154
  outputHistoryItems: [
@@ -11517,6 +11882,38 @@ var ACP_REASONING_EFFORT_NAMES = {
11517
11882
  max: "Max"
11518
11883
  };
11519
11884
  var WORKSPACE_MEMORY_REMEMBER_CHILD_TIMEOUT_MS = 295e3;
11885
+ var TURN_STATUS_SCAN_PAGE_LIMIT = 500;
11886
+ var TURN_STATUS_SCAN_MAX_PAGES = 10;
11887
+ async function findSettledTurnResult(reader, sessionId, promptId, workspaceCwd) {
11888
+ let cursor;
11889
+ for (let page = 0; page < TURN_STATUS_SCAN_MAX_PAGES; page++) {
11890
+ const result = await reader.readPage(sessionId, {
11891
+ ...cursor !== void 0 ? { cursor } : { direction: "backward" },
11892
+ limit: TURN_STATUS_SCAN_PAGE_LIMIT,
11893
+ maxBytes: SESSION_TRANSCRIPT_MAX_PAGE_BYTES
11894
+ });
11895
+ for (let i = result.records.length - 1; i >= 0; i--) {
11896
+ const record = result.records[i];
11897
+ if (record.type !== "system" || record.subtype !== "turn_result") {
11898
+ continue;
11899
+ }
11900
+ const payload = record.systemPayload;
11901
+ if (!isTurnResultRecordPayload(payload)) continue;
11902
+ if (promptId === void 0 || payload.promptId === promptId) {
11903
+ return payload;
11904
+ }
11905
+ }
11906
+ if (!result.hasMore || result.nextCursorState === void 0) {
11907
+ return void 0;
11908
+ }
11909
+ cursor = encodeSessionTranscriptCursor(
11910
+ result.nextCursorState,
11911
+ workspaceCwd
11912
+ );
11913
+ }
11914
+ return void 0;
11915
+ }
11916
+ __name(findSettledTurnResult, "findSettledTurnResult");
11520
11917
  function createAcpSessionProfiler(span, attributePrefix) {
11521
11918
  let failedStage;
11522
11919
  const setAttribute = /* @__PURE__ */ __name((name, value) => {
@@ -13563,7 +13960,10 @@ async function runAcpAgent(config, settings, argv, options) {
13563
13960
  let initializeRequestId;
13564
13961
  const pendingNewSessionRequestIds = /* @__PURE__ */ new Set();
13565
13962
  const stream = ndJsonStream(stdout, stdin, {
13566
- onMessageObserved: /* @__PURE__ */ __name(({ direction, message }) => {
13963
+ onMessageObserved: /* @__PURE__ */ __name(({ direction, bytes, message }) => {
13964
+ if (direction === "sent") {
13965
+ observeAcpToolResultWire(message, bytes);
13966
+ }
13567
13967
  if (direction === "received" && "id" in message && "method" in message) {
13568
13968
  if (message.method === "session/new") {
13569
13969
  pendingNewSessionRequestIds.add(message.id);
@@ -14764,7 +15164,7 @@ var QwenAgent = class {
14764
15164
  }
14765
15165
  this.clientCapabilities = args.clientCapabilities;
14766
15166
  const authMethods = buildAuthMethods();
14767
- const version = "0.21.13";
15167
+ const version = "0.21.14-preview.0";
14768
15168
  const response = {
14769
15169
  protocolVersion: PROTOCOL_VERSION,
14770
15170
  agentInfo: {
@@ -19788,6 +20188,91 @@ ${outputText}
19788
20188
  } : null
19789
20189
  };
19790
20190
  }
20191
+ case SERVE_CONTROL_EXT_METHODS.sessionTurnStatus: {
20192
+ const sessionId = params["sessionId"];
20193
+ if (typeof sessionId !== "string" || !SESSION_ID_RE.test(sessionId)) {
20194
+ throw RequestError.invalidParams(
20195
+ void 0,
20196
+ "Invalid or missing sessionId"
20197
+ );
20198
+ }
20199
+ const rawPromptId = params["promptId"];
20200
+ if (rawPromptId !== void 0 && (typeof rawPromptId !== "string" || rawPromptId.length === 0)) {
20201
+ throw RequestError.invalidParams(
20202
+ void 0,
20203
+ "Invalid or missing promptId"
20204
+ );
20205
+ }
20206
+ const session = this.sessionOrThrow(sessionId);
20207
+ const settings = loadSettingsCached(cwd);
20208
+ return await runWithAcpRuntimeOutputDir(settings, cwd, async () => {
20209
+ try {
20210
+ await session.getConfig().getChatRecordingService()?.flush();
20211
+ } catch {
20212
+ }
20213
+ let reader;
20214
+ try {
20215
+ reader = new SessionTranscriptReader(cwd);
20216
+ const turnResult = await findSettledTurnResult(
20217
+ reader,
20218
+ sessionId,
20219
+ typeof rawPromptId === "string" ? rawPromptId : void 0,
20220
+ cwd
20221
+ );
20222
+ return {
20223
+ v: 1,
20224
+ sessionId,
20225
+ turnResult: turnResult ?? null
20226
+ };
20227
+ } catch (error) {
20228
+ if (error.code === "ENOENT") {
20229
+ return { v: 1, sessionId, turnResult: null };
20230
+ }
20231
+ if (error instanceof SessionTranscriptSnapshotUnavailableError && reader) {
20232
+ try {
20233
+ const transcript = await fs2.stat(
20234
+ reader.getSessionFilePath(sessionId)
20235
+ );
20236
+ if (transcript.size === 0) {
20237
+ return { v: 1, sessionId, turnResult: null };
20238
+ }
20239
+ } catch (statError) {
20240
+ if (statError.code === "ENOENT") {
20241
+ return { v: 1, sessionId, turnResult: null };
20242
+ }
20243
+ }
20244
+ }
20245
+ if (error instanceof InvalidSessionTranscriptCursorError) {
20246
+ throw new RequestError(-32602, error.message, {
20247
+ errorKind: "invalid_transcript_cursor"
20248
+ });
20249
+ }
20250
+ if (error instanceof SessionTranscriptSnapshotUnavailableError) {
20251
+ throw new RequestError(-32010, error.message, {
20252
+ errorKind: "transcript_snapshot_unavailable",
20253
+ sessionId
20254
+ });
20255
+ }
20256
+ if (error instanceof SessionTranscriptTooLargeError) {
20257
+ throw new RequestError(-32011, error.message, {
20258
+ errorKind: "transcript_too_large",
20259
+ sessionId,
20260
+ snapshotSize: error.snapshotSize,
20261
+ maxBytes: error.maxBytes
20262
+ });
20263
+ }
20264
+ if (error instanceof SessionTranscriptPageTooLargeError) {
20265
+ throw new RequestError(-32012, error.message, {
20266
+ errorKind: "transcript_page_too_large",
20267
+ sessionId,
20268
+ pageBytes: error.pageBytes,
20269
+ maxBytes: error.maxBytes
20270
+ });
20271
+ }
20272
+ throw error;
20273
+ }
20274
+ });
20275
+ }
19791
20276
  case SERVE_CONTROL_EXT_METHODS.sessionContinue: {
19792
20277
  const sessionId = params["sessionId"];
19793
20278
  if (typeof sessionId !== "string" || sessionId.length === 0) {