@qwen-code/qwen-code 0.19.9 → 0.19.10-nightly.20260715.c538bd70d

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 (310) hide show
  1. package/bundled/qc-helper/docs/configuration/settings.md +8 -0
  2. package/bundled/qc-helper/docs/features/channels/dingtalk.md +3 -0
  3. package/bundled/qc-helper/docs/features/channels/overview.md +11 -3
  4. package/bundled/qc-helper/docs/features/code-review.md +88 -44
  5. package/bundled/qc-helper/docs/features/commands.md +6 -6
  6. package/bundled/qc-helper/docs/features/hooks.md +29 -0
  7. package/bundled/qc-helper/docs/features/sub-agents.md +21 -0
  8. package/bundled/qc-helper/docs/qwen-serve.md +46 -20
  9. package/bundled/qc-helper/docs/reference/keyboard-shortcuts.md +1 -1
  10. package/bundled/review/DESIGN.md +219 -33
  11. package/bundled/review/SKILL.md +449 -153
  12. package/chunks/{MaxSizedBox-6HYJ3ZPJ.js → MaxSizedBox-LOOBDOTZ.js} +31 -31
  13. package/chunks/{StandaloneSessionPicker-WS4GXYOG.js → StandaloneSessionPicker-76CLZSH2.js} +51 -49
  14. package/chunks/{acpAgent-5FWSOZL5.js → acpAgent-DFJOK7EB.js} +567 -482
  15. package/chunks/{agent-HOLHB3RT.js → agent-OJQWXNHP.js} +26 -26
  16. package/chunks/{agent-headless-SXL6H56A.js → agent-headless-ND7GOORY.js} +26 -26
  17. package/chunks/{anthropicContentGenerator-L73TO3DB.js → anthropicContentGenerator-56U3YCP2.js} +5 -5
  18. package/chunks/{artifact-tool-U7IRTLIV.js → artifact-tool-MIZLXBLF.js} +2 -2
  19. package/chunks/{askUserQuestion-2DLUUZZG.js → askUserQuestion-XMJVPNWM.js} +2 -2
  20. package/chunks/{bridge-BCJQ7BBB.js → bridge-SNJK2JLK.js} +32 -32
  21. package/chunks/{ca-UJ6HC4H2.js → ca-C2JTT2N5.js} +4 -1
  22. package/chunks/channel-worker-group-K7QKH6IG.js +13 -0
  23. package/chunks/channel-worker-manager-YSFB4HUU.js +418 -0
  24. package/chunks/channel-worker-supervisor-QCKIOYZD.js +20 -0
  25. package/chunks/{chunk-CCDMCZPP.js → chunk-26UABK2C.js} +1 -1
  26. package/chunks/{chunk-LXNEJD34.js → chunk-2FO5GFKZ.js} +1 -1
  27. package/chunks/{chunk-L36P3NBD.js → chunk-2W3OOD4W.js} +2 -0
  28. package/chunks/{chunk-7R3CZA3Q.js → chunk-2Z5UX4KI.js} +1 -1
  29. package/chunks/chunk-3MX7D6QN.js +516 -0
  30. package/chunks/{chunk-CLFKOZEK.js → chunk-3XULHBC7.js} +1 -1
  31. package/chunks/chunk-4QZADKJS.js +34 -0
  32. package/chunks/{chunk-E2IY465S.js → chunk-4UDHAJFV.js} +10 -10
  33. package/chunks/{chunk-5U27BZ72.js → chunk-55SAYASQ.js} +190 -77
  34. package/chunks/chunk-5HBA2Z7V.js +28 -0
  35. package/chunks/{chunk-ZJE7NSL3.js → chunk-5M6IDOMF.js} +34 -97
  36. package/chunks/{chunk-HVY356M2.js → chunk-5SQ55XJZ.js} +3 -3
  37. package/chunks/{chunk-EAXLGSFP.js → chunk-6GRAQNTY.js} +8 -8
  38. package/chunks/{chunk-K434OPES.js → chunk-6WPJRYLZ.js} +3 -3
  39. package/chunks/{chunk-VWPVHAMO.js → chunk-7DXHIMXL.js} +5 -1
  40. package/chunks/{chunk-J4TSQ5EQ.js → chunk-7NFB7LBQ.js} +8 -1
  41. package/chunks/{chunk-5SFOMFG4.js → chunk-7R4DPSRA.js} +36 -2
  42. package/chunks/{chunk-W2UIXQDL.js → chunk-7STBROEV.js} +1 -1
  43. package/chunks/{chunk-BMGVRZN4.js → chunk-AETEZU4U.js} +1 -1
  44. package/chunks/{chunk-HPDUL5MF.js → chunk-AGZWN4WV.js} +1 -1
  45. package/chunks/{chunk-RDJSGHZE.js → chunk-ALGGS7UH.js} +1 -38
  46. package/chunks/{chunk-GWHYEOV2.js → chunk-ARKANCNX.js} +2 -1
  47. package/chunks/{chunk-34Z3U5RQ.js → chunk-AU4R7ACM.js} +518 -114
  48. package/chunks/{channel-worker-supervisor-WSOAAYUO.js → chunk-B7MFJBKE.js} +67 -35
  49. package/chunks/{chunk-524RQP4Q.js → chunk-B7NUUEXC.js} +10 -4
  50. package/chunks/{chunk-MC23XKFE.js → chunk-BLPMRN4B.js} +3 -3
  51. package/chunks/{chunk-A3XKDTSH.js → chunk-BRRKAUGR.js} +4 -4
  52. package/chunks/{chunk-W3JHSWRP.js → chunk-BUPLOPUA.js} +4 -4
  53. package/chunks/{chunk-3VAGG5T5.js → chunk-BYOOK22F.js} +121 -16
  54. package/chunks/{chunk-EMDMPBJ4.js → chunk-C47ENMZJ.js} +3 -3
  55. package/chunks/{chunk-3AHXV67U.js → chunk-C5TVXLJZ.js} +1 -1
  56. package/chunks/{chunk-X6TJ3YZV.js → chunk-CGT5TQIZ.js} +159 -57
  57. package/chunks/{chunk-4C5BQ2D2.js → chunk-CQQD7MDG.js} +82 -12
  58. package/chunks/{chunk-KKNMOEZH.js → chunk-E2UVIFI2.js} +185 -398
  59. package/chunks/{chunk-P67PFTUT.js → chunk-EPY4ZEU6.js} +4 -4
  60. package/chunks/{chunk-6PESIEKJ.js → chunk-EZSRHWGS.js} +68 -6
  61. package/chunks/{chunk-4GORAUCN.js → chunk-F333XEAU.js} +1 -1
  62. package/chunks/{chunk-YLV3XXFB.js → chunk-FBU7WRZI.js} +17 -1
  63. package/chunks/{chunk-Q6I5QHMH.js → chunk-FGTCZJOD.js} +1 -1
  64. package/chunks/{chunk-LK7KUE55.js → chunk-FSA7ERJ2.js} +1 -1
  65. package/chunks/{chunk-B4G2WOFA.js → chunk-FTU55ZZ7.js} +3 -3
  66. package/chunks/{chunk-EGYZ275M.js → chunk-GCD7PEDZ.js} +4 -4
  67. package/chunks/{chunk-SJHDYNHF.js → chunk-GDQQRV43.js} +3 -3
  68. package/chunks/{chunk-3BTRNWWD.js → chunk-GOXKNSDZ.js} +1 -64
  69. package/chunks/{chunk-GZRTYZ2R.js → chunk-GQKWT45X.js} +154 -1
  70. package/chunks/chunk-GYTKQYDB.js +23 -0
  71. package/chunks/{chunk-YVEDCAUE.js → chunk-HGT6JR3U.js} +19 -0
  72. package/chunks/{chunk-N3EMS75V.js → chunk-HKM2TEF7.js} +1268 -1233
  73. package/chunks/chunk-IDS7MSUP.js +74 -0
  74. package/chunks/{chunk-PVZM22CK.js → chunk-INKAZNYC.js} +5 -5
  75. package/chunks/{chunk-3G7CIHVV.js → chunk-IOQ75R4R.js} +4 -4
  76. package/chunks/{chunk-AURZZYMD.js → chunk-IQOOJSPR.js} +4 -4
  77. package/chunks/{chunk-AKIVHSJR.js → chunk-J4UQXGVL.js} +111 -93
  78. package/chunks/{chunk-VTU57BWZ.js → chunk-JEKOCLRN.js} +1 -1
  79. package/chunks/{chunk-B5ORX3FG.js → chunk-JGUT3LWZ.js} +6 -1
  80. package/chunks/{chunk-PDZ7MBDG.js → chunk-JIQHT2O6.js} +27 -6
  81. package/chunks/{chunk-XUOOWUZS.js → chunk-JPAH76WA.js} +1 -1
  82. package/chunks/{chunk-BAPGSC7U.js → chunk-K4LG6TVJ.js} +23 -9
  83. package/chunks/chunk-KET3M4K4.js +493 -0
  84. package/chunks/{chunk-ORBGV7NJ.js → chunk-KKRTYONM.js} +6 -4
  85. package/chunks/{chunk-SCGXUJBT.js → chunk-KPA5QGN2.js} +3 -3
  86. package/chunks/{chunk-IAVB3HM3.js → chunk-KSO42X3Z.js} +13 -0
  87. package/chunks/{chunk-4QLQE5WJ.js → chunk-L5U3ELZX.js} +1 -1
  88. package/chunks/{chunk-77XJ3SWN.js → chunk-LIUEXYPL.js} +5 -5
  89. package/chunks/{chunk-4ZVWQHEQ.js → chunk-LQIDP6K5.js} +1 -1
  90. package/chunks/{chunk-34MW4KTI.js → chunk-LT5CRUA5.js} +2 -2
  91. package/chunks/{chunk-DC5Z3DU6.js → chunk-LXLTBIDP.js} +43 -6
  92. package/chunks/{chunk-VA4KQY6V.js → chunk-MEK7CQJR.js} +3 -3
  93. package/chunks/{chunk-KHUQZZJ6.js → chunk-MO7O5722.js} +370 -36
  94. package/chunks/chunk-MR3PXB6E.js +48 -0
  95. package/chunks/{chunk-PODM4SZ4.js → chunk-MV52C5MA.js} +5 -5
  96. package/chunks/{chunk-WL4L7EZH.js → chunk-OA4JVLSA.js} +27 -1
  97. package/chunks/{chunk-X4NKFGFJ.js → chunk-OJAMDVF5.js} +0 -15
  98. package/chunks/{chunk-BZIFY5TF.js → chunk-OKAIGAYW.js} +3 -3
  99. package/chunks/{chunk-ECNYL4AA.js → chunk-OPNPGO6D.js} +1 -1
  100. package/chunks/{chunk-3SJSQXNS.js → chunk-PEJWA3QQ.js} +12 -8
  101. package/chunks/{chunk-MXL5UP4X.js → chunk-Q6TUALBE.js} +1 -1
  102. package/chunks/{chunk-QYMQSECS.js → chunk-QAW7PIHT.js} +2 -2
  103. package/chunks/{chunk-5HOMWMCL.js → chunk-QEDYXCLG.js} +4167 -1338
  104. package/chunks/chunk-QNNTA7IX.js +91 -0
  105. package/chunks/{chunk-D2GFWEXB.js → chunk-QNT5T4Q2.js} +6 -6
  106. package/chunks/{chunk-CUMMSHH6.js → chunk-R5XLNDE2.js} +1 -1
  107. package/chunks/{chunk-LUODI7WD.js → chunk-RCEEXIOO.js} +6 -4
  108. package/chunks/{chunk-WQUQVGTF.js → chunk-RQWDLG6Z.js} +183 -96
  109. package/chunks/{chunk-XYQSMABS.js → chunk-SLCVZX6F.js} +4 -4
  110. package/chunks/{chunk-CEA3E3JB.js → chunk-SPJQO2CE.js} +2 -2
  111. package/chunks/{chunk-JSG7ZSBC.js → chunk-TQBODCFD.js} +1 -1
  112. package/chunks/chunk-TV6K2FB4.js +224 -0
  113. package/chunks/{chunk-5XUCZNSY.js → chunk-TYLOFD2U.js} +1 -1
  114. package/chunks/{chunk-CNEIYWSA.js → chunk-UKWAQ7AV.js} +5 -5
  115. package/chunks/{chunk-7PU4FYLG.js → chunk-US4YQT62.js} +4 -4
  116. package/chunks/{chunk-Q4YQW46J.js → chunk-UYPPCIJQ.js} +36 -18
  117. package/chunks/{chunk-YAUFFXDS.js → chunk-UZKG7HFG.js} +12 -11
  118. package/chunks/{chunk-GWLSNBG4.js → chunk-VQLRHJKL.js} +30 -26
  119. package/chunks/{chunk-L6P4KPHR.js → chunk-VRUHAVZS.js} +59 -39
  120. package/chunks/{chunk-HKMAENAO.js → chunk-W2U4RJJU.js} +8 -6
  121. package/chunks/{chunk-ATAKVRIF.js → chunk-WDSCTLAB.js} +7 -7
  122. package/chunks/{chunk-ZLXQN2QS.js → chunk-WIEO4CWB.js} +1 -1
  123. package/chunks/{chunk-OQ4DRIOA.js → chunk-WJOC24IW.js} +2 -2
  124. package/chunks/{chunk-J3JA76CF.js → chunk-WTNZ6DXB.js} +1 -1
  125. package/chunks/{chunk-NVYTCB5Z.js → chunk-XCR44EEA.js} +14589 -13980
  126. package/chunks/{chunk-TDEXZKMT.js → chunk-Y66VOBRP.js} +2 -2
  127. package/chunks/{chunk-CC2ITGCF.js → chunk-YHN5SUIJ.js} +49 -6
  128. package/chunks/{chunk-D5SKC4YG.js → chunk-ZBAROUR6.js} +41 -13
  129. package/chunks/{chunk-U2NNEY4R.js → chunk-ZEEVKDO7.js} +1 -1
  130. package/chunks/{chunk-5VXNZWGF.js → chunk-ZLOHB76C.js} +1 -1
  131. package/chunks/{chunk-JZETEN3Z.js → chunk-ZNCLTRNU.js} +3 -3
  132. package/chunks/{chunk-TO6QE22P.js → chunk-ZP4ZZJJG.js} +26 -22
  133. package/chunks/{chunk-UOZWKTQG.js → chunk-ZPAHLFZU.js} +2 -2
  134. package/chunks/{chunk-XLA62MYB.js → chunk-ZTXZ7FM4.js} +2 -2
  135. package/chunks/{computer-use-HM37RX6A.js → computer-use-DRETHEQF.js} +26 -26
  136. package/chunks/{config-utils-NV2SVGPB.js → config-utils-XSHOMMK4.js} +3 -2
  137. package/chunks/{contextCommand-OF5SFGH2.js → contextCommand-7YJUW23J.js} +28 -28
  138. package/chunks/{create-sub-session-INX7TXJI.js → create-sub-session-EAB2U5XW.js} +2 -2
  139. package/chunks/{create-sub-session-KPRT7ECJ.js → create-sub-session-L5HOZAEL.js} +26 -26
  140. package/chunks/{cron-create-AMBKGZX6.js → cron-create-GMVKSXZT.js} +4 -4
  141. package/chunks/{cron-delete-LRU4OJYG.js → cron-delete-VDZKUAVK.js} +4 -4
  142. package/chunks/{cron-list-WVP2JXER.js → cron-list-UG7C7RAR.js} +4 -4
  143. package/chunks/{daemon-ARHTSTXP.js → daemon-MI5HF26N.js} +603 -62
  144. package/chunks/{daemon-status-provider-B2UTZUJ2.js → daemon-status-provider-2D47GOJT.js} +36 -36
  145. package/chunks/{de-EBJN3OVN.js → de-2VCDRDGU.js} +4 -1
  146. package/chunks/{dist-WKPOYU7O.js → dist-IEXZC5ZR.js} +1 -1
  147. package/chunks/{dist-XKU3ABM5.js → dist-PQK4GCKA.js} +1 -1
  148. package/chunks/{dist-VHV4EVHG.js → dist-U75JK3PF.js} +1 -1
  149. package/chunks/{dist-R7LN5AZE.js → dist-VXO7QBON.js} +2 -2
  150. package/chunks/{dist-PNVLTKTL.js → dist-WH4TZSH3.js} +158 -4
  151. package/chunks/{dist-QYCAEZIT.js → dist-X2ABIW5R.js} +5 -1
  152. package/chunks/{earlyInputCapture-3VTHRC4C.js → earlyInputCapture-OJQPGCSX.js} +27 -27
  153. package/chunks/{edit-VNI4NJ73.js → edit-LZOAFLT2.js} +27 -27
  154. package/chunks/{en-5A6LA7RK.js → en-NJCA3TAA.js} +5 -1
  155. package/chunks/{enter-worktree-IYYBKPZT.js → enter-worktree-VL2TCGI5.js} +26 -26
  156. package/chunks/{enterPlanMode-GMC5FD5A.js → enterPlanMode-QGHBHZWI.js} +42 -27
  157. package/chunks/{environment-5HSSRMJ7.js → environment-2G5IC2EU.js} +30 -29
  158. package/chunks/{errors-HMFCJJ7P.js → errors-7QNQDNI2.js} +28 -28
  159. package/chunks/{exit-worktree-6BHCMP5G.js → exit-worktree-5V3X2MRH.js} +26 -26
  160. package/chunks/{exitPlanMode-CJW7G74W.js → exitPlanMode-XDPNQB4H.js} +26 -26
  161. package/chunks/{fast-path-FRDMDVHG.js → fast-path-NNSD4BVZ.js} +3 -3
  162. package/chunks/{fast-path-settings-5QZE64HR.js → fast-path-settings-DAOVFADC.js} +6 -4
  163. package/chunks/{fr-YXRABLYZ.js → fr-5F3E7WKD.js} +4 -1
  164. package/chunks/{gemini-QYSEGHAX.js → gemini-RKDUWGXJ.js} +139 -76
  165. package/chunks/{geminiContentGenerator-J7YNZDYP.js → geminiContentGenerator-V7QGHXVF.js} +4 -4
  166. package/chunks/{glob-BRCSGFOT.js → glob-ZNQUUOTS.js} +28 -27
  167. package/chunks/{grep-EE2DUOSY.js → grep-NYIGLM7R.js} +26 -26
  168. package/chunks/{handleAutoUpdate-5NWTLR67.js → handleAutoUpdate-UBQ4IQXY.js} +30 -30
  169. package/chunks/{i18n-BASPENNQ.js → i18n-5T3S6SGP.js} +27 -27
  170. package/chunks/initializer-TJED246Q.js +73 -0
  171. package/chunks/{installationInfo-W6V4DT7W.js → installationInfo-OTEU7FKR.js} +27 -27
  172. package/chunks/{ja-7VQOANVG.js → ja-66J6B53L.js} +5 -2
  173. package/chunks/{keychain-token-storage-VKUBNCP4.js → keychain-token-storage-AU22CQI6.js} +2 -2
  174. package/chunks/list-6OHS7MFJ.js +76 -0
  175. package/chunks/loadedSettingsAdapter-5456XIYG.js +70 -0
  176. package/chunks/{loop-wakeup-WX7BLWWP.js → loop-wakeup-C4EXLYVA.js} +5 -5
  177. package/chunks/{ls-ZB2BDP6T.js → ls-2OUTG3IZ.js} +4 -4
  178. package/chunks/{lsp-V5DN4YUJ.js → lsp-4VMNXZW6.js} +2 -2
  179. package/chunks/mcp-NOWRPFKY.js +70 -0
  180. package/chunks/{monitor-X5Z3H4FY.js → monitor-CVDZO3IZ.js} +26 -26
  181. package/chunks/nonInteractiveCli-UGI7Y43E.js +129 -0
  182. package/chunks/{notebook-edit-TRM2QIJK.js → notebook-edit-NWIA5TEJ.js} +27 -27
  183. package/chunks/{openaiContentGenerator-AAYONPMF.js → openaiContentGenerator-KJONBBJO.js} +12 -12
  184. package/chunks/{pidfile-D4I4FTVA.js → pidfile-L3TGXMTF.js} +27 -27
  185. package/chunks/{pt-2C6YCSHL.js → pt-TFZO5Y6T.js} +4 -1
  186. package/chunks/{qwenContentGenerator-K3HZ2H76.js → qwenContentGenerator-GXUZB5SJ.js} +28 -28
  187. package/chunks/{qwenOAuth2-PJQ27GSO.js → qwenOAuth2-LEYOU7RU.js} +5 -5
  188. package/chunks/{read-file-7SZSIZOL.js → read-file-I4OUZXTA.js} +8 -8
  189. package/chunks/{read-mcp-resource-SM5DA4RG.js → read-mcp-resource-JUFHCKSC.js} +2 -2
  190. package/chunks/{record-artifact-4XKZX3UW.js → record-artifact-DWSMBXYY.js} +2 -2
  191. package/chunks/{ripGrep-YNPFVCZP.js → ripGrep-XLCXANIO.js} +26 -26
  192. package/chunks/{ru-6BBHVZZV.js → ru-4L4LFHIT.js} +4 -1
  193. package/chunks/{run-qwen-serve-DMWV5N6L.js → run-qwen-serve-R6SBP6YS.js} +1232 -371
  194. package/chunks/{runtime-57WWRVHN.js → runtime-U3S33YUQ.js} +42 -37
  195. package/chunks/{scheduler-YBLGWSIL.js → scheduler-65QCIELP.js} +26 -26
  196. package/chunks/{send-message-F36YD6KQ.js → send-message-JZ752NWD.js} +3 -3
  197. package/chunks/{serve-R63NK3CV.js → serve-PSPOFCOD.js} +36 -34
  198. package/chunks/{server-Z22GCAXP.js → server-6P5ZB56O.js} +5561 -1377
  199. package/chunks/{session-HKAAI7BN.js → session-ILLOYW75.js} +298 -98
  200. package/chunks/{settings-3EYN66GK.js → settings-RMUJGYIK.js} +34 -32
  201. package/chunks/{shell-6YXINTWJ.js → shell-65GTAN5Q.js} +28 -26
  202. package/chunks/{skill-OO57P4X6.js → skill-L76U3YCX.js} +10 -10
  203. package/chunks/{spawnChannel-JD7G4VU6.js → spawnChannel-LXIGZ4EM.js} +28 -28
  204. package/chunks/{src-G5UPLZSZ.js → src-DWZT2X3Z.js} +87 -27
  205. package/chunks/{standalone-update-OB7F4JPZ.js → standalone-update-F6SRKPSD.js} +28 -28
  206. package/chunks/{startInteractiveUI-73EGLIIH.js → startInteractiveUI-UEJQP7S3.js} +730 -397
  207. package/chunks/{syntheticOutput-34H7LGA7.js → syntheticOutput-LELY6HAI.js} +3 -3
  208. package/chunks/{task-create-FRGOEIKY.js → task-create-QY3BIMNM.js} +8 -7
  209. package/chunks/{task-list-OW766BXZ.js → task-list-D2U47WBJ.js} +6 -5
  210. package/chunks/{task-stop-SIR5SNBN.js → task-stop-N6E5IYLH.js} +2 -2
  211. package/chunks/{task-update-YRA532MT.js → task-update-HJCQILLB.js} +8 -7
  212. package/chunks/{team-create-PECAAPXK.js → team-create-4QBZVOGN.js} +26 -26
  213. package/chunks/{team-delete-6OSECUZC.js → team-delete-RCWYDRF4.js} +6 -5
  214. package/chunks/{team-plan-approval-L6F434RY.js → team-plan-approval-BK4CIOFV.js} +26 -26
  215. package/chunks/{theme-manager-ZG4RY6GU.js → theme-manager-5F2IGW6E.js} +27 -27
  216. package/chunks/{todoWrite-YDMFEV4G.js → todoWrite-FKCGATPJ.js} +4 -4
  217. package/chunks/{tool-search-THVIWAPB.js → tool-search-J2ESO33H.js} +9 -9
  218. package/chunks/{total-session-admission-JOKNRIIA.js → total-session-admission-U4LZ5QTQ.js} +33 -33
  219. package/chunks/tree-sitter-YJVE2ZUK.js +2980 -0
  220. package/chunks/{trustedFolders-EOGT3UVS.js → trustedFolders-TIDOXCJA.js} +29 -28
  221. package/chunks/types-ML3TRJQ5.js +16 -0
  222. package/chunks/{updateCheck-2KYEYVSB.js → updateCheck-VRVR26FI.js} +29 -29
  223. package/chunks/{validateNonInterActiveAuth-EN6ZQSR2.js → validateNonInterActiveAuth-UGKYAVLG.js} +75 -71
  224. package/chunks/{version-3UEA6ZIR.js → version-7HR6VZAT.js} +1 -1
  225. package/chunks/{web-fetch-PAAEQKBW.js → web-fetch-QGODBB6S.js} +5 -5
  226. package/chunks/{workflow-QCCCMYP3.js → workflow-EDQAITEW.js} +27 -27
  227. package/chunks/workspace-providers-status-27UGAK77.js +73 -0
  228. package/chunks/workspace-registration-store-5H7577YQ.js +27 -0
  229. package/chunks/{workspace-registry-24QFLQYH.js → workspace-registry-F3THGAXC.js} +33 -33
  230. package/chunks/workspace-service-4JSAQAHP.js +86 -0
  231. package/chunks/workspace-skills-status-5JTWZHZU.js +72 -0
  232. package/chunks/{write-file-I3MUDRIE.js → write-file-UY6XCZZM.js} +27 -27
  233. package/chunks/{zh-RQE7I22T.js → zh-FSAH32JB.js} +6 -2
  234. package/chunks/{zh-TW-TBPQGHKH.js → zh-TW-D2YIE2LO.js} +6 -2
  235. package/cli.js +11 -11
  236. package/locales/ca.js +6 -0
  237. package/locales/de.js +6 -0
  238. package/locales/en.js +8 -0
  239. package/locales/fr.js +6 -0
  240. package/locales/ja.js +7 -1
  241. package/locales/pt.js +6 -0
  242. package/locales/ru.js +6 -0
  243. package/locales/zh-TW.js +9 -1
  244. package/locales/zh.js +9 -1
  245. package/package.json +3 -3
  246. package/web-shell/assets/{arc-C15hqnJe.js → arc-CObt_TK9.js} +1 -1
  247. package/web-shell/assets/{architectureDiagram-3BPJPVTR-B-At37J_.js → architectureDiagram-3BPJPVTR-B7aiJ6CK.js} +1 -1
  248. package/web-shell/assets/{blockDiagram-GPEHLZMM-B51wjcU7.js → blockDiagram-GPEHLZMM-BSK2CrID.js} +1 -1
  249. package/web-shell/assets/{c4Diagram-AAUBKEIU-xBK7BAwN.js → c4Diagram-AAUBKEIU-Bhx2p7T_.js} +1 -1
  250. package/web-shell/assets/channel-BBaLq8MV.js +1 -0
  251. package/web-shell/assets/{chunk-2J33WTMH-xKmLg7Yr.js → chunk-2J33WTMH-c3Hzv0Ni.js} +1 -1
  252. package/web-shell/assets/{chunk-4BX2VUAB-BfkdKZCM.js → chunk-4BX2VUAB-DNXaK7ZF.js} +1 -1
  253. package/web-shell/assets/{chunk-55IACEB6-DT713sZf.js → chunk-55IACEB6-BXjvDj_i.js} +1 -1
  254. package/web-shell/assets/{chunk-727SXJPM-CYEeAamv.js → chunk-727SXJPM-B6CaKFp-.js} +1 -1
  255. package/web-shell/assets/{chunk-AQP2D5EJ-DBN-5CFd.js → chunk-AQP2D5EJ-tij6Mz9B.js} +1 -1
  256. package/web-shell/assets/{chunk-FMBD7UC4-CGZKk4PH.js → chunk-FMBD7UC4-DdlsGk2h.js} +1 -1
  257. package/web-shell/assets/{chunk-ND2GUHAM-qQbC2O-y.js → chunk-ND2GUHAM-CdgGZSHE.js} +1 -1
  258. package/web-shell/assets/{chunk-QZHKN3VN-B3zeXwsX.js → chunk-QZHKN3VN-D8oJn1C0.js} +1 -1
  259. package/web-shell/assets/classDiagram-4FO5ZUOK-B2ZK6sWE.js +1 -0
  260. package/web-shell/assets/classDiagram-v2-Q7XG4LA2-B2ZK6sWE.js +1 -0
  261. package/web-shell/assets/{cose-bilkent-S5V4N54A-BKsl1Wvy.js → cose-bilkent-S5V4N54A-BUVmNp1Y.js} +1 -1
  262. package/web-shell/assets/{dagre-BM42HDAG-CuuuLiBK.js → dagre-BM42HDAG-CO4q310O.js} +1 -1
  263. package/web-shell/assets/{diagram-2AECGRRQ-CG4_eKiV.js → diagram-2AECGRRQ-C6gFvWkg.js} +1 -1
  264. package/web-shell/assets/{diagram-5GNKFQAL-DSFTmZB1.js → diagram-5GNKFQAL-NG2I_c0h.js} +1 -1
  265. package/web-shell/assets/{diagram-KO2AKTUF-BxwlEHn8.js → diagram-KO2AKTUF-DFKMS6I9.js} +1 -1
  266. package/web-shell/assets/{diagram-LMA3HP47-BUAg-jMG.js → diagram-LMA3HP47-BiElfsfP.js} +1 -1
  267. package/web-shell/assets/{diagram-OG6HWLK6-BFM2jlO5.js → diagram-OG6HWLK6-zLWDYUqu.js} +1 -1
  268. package/web-shell/assets/{erDiagram-TEJ5UH35-CerbFPa2.js → erDiagram-TEJ5UH35-DoVaazhK.js} +1 -1
  269. package/web-shell/assets/{flowDiagram-I6XJVG4X-BNeZz5Zz.js → flowDiagram-I6XJVG4X-0RLz-mXg.js} +1 -1
  270. package/web-shell/assets/{ganttDiagram-6RSMTGT7-CTOogLaM.js → ganttDiagram-6RSMTGT7-C-eX1A39.js} +3 -3
  271. package/web-shell/assets/{gitGraphDiagram-PVQCEYII-yxSFkXPj.js → gitGraphDiagram-PVQCEYII-BauQu1Bu.js} +1 -1
  272. package/web-shell/assets/index-3uAT3ehO.css +5 -0
  273. package/web-shell/assets/index-CVHa2QH7.js +3 -0
  274. package/web-shell/assets/index-D1KigWat.js +1128 -0
  275. package/web-shell/assets/{infoDiagram-5YYISTIA-DYdAUevm.js → infoDiagram-5YYISTIA-C800cFvZ.js} +1 -1
  276. package/web-shell/assets/{ishikawaDiagram-YF4QCWOH-CNuijZ90.js → ishikawaDiagram-YF4QCWOH-CFK1Jk6e.js} +1 -1
  277. package/web-shell/assets/{journeyDiagram-JHISSGLW-BTyiuonf.js → journeyDiagram-JHISSGLW-Cjx0WAC4.js} +1 -1
  278. package/web-shell/assets/{kanban-definition-UN3LZRKU-DPJo0Uow.js → kanban-definition-UN3LZRKU-DWMDHbiv.js} +1 -1
  279. package/web-shell/assets/{linear-C8wKCbIC.js → linear-vpW4FrZs.js} +1 -1
  280. package/web-shell/assets/{mermaid.core-BV5o7nW5.js → mermaid.core-DsHRUnDd.js} +5 -5
  281. package/web-shell/assets/{mindmap-definition-RKZ34NQL-BtLcBmSt.js → mindmap-definition-RKZ34NQL-D3Eb1cAK.js} +1 -1
  282. package/web-shell/assets/{pieDiagram-4H26LBE5-C22J7A9Q.js → pieDiagram-4H26LBE5-Cr2-6sWt.js} +1 -1
  283. package/web-shell/assets/{quadrantDiagram-W4KKPZXB-DSL10wiL.js → quadrantDiagram-W4KKPZXB-Yd7yUgVp.js} +1 -1
  284. package/web-shell/assets/{requirementDiagram-4Y6WPE33-feqh0UpX.js → requirementDiagram-4Y6WPE33-BE6SprL8.js} +1 -1
  285. package/web-shell/assets/{sankeyDiagram-5OEKKPKP-Z4OVaWaZ.js → sankeyDiagram-5OEKKPKP-DzkuMK8d.js} +1 -1
  286. package/web-shell/assets/{sequenceDiagram-3UESZ5HK-DIluIcb1.js → sequenceDiagram-3UESZ5HK-wD9A3Dhi.js} +1 -1
  287. package/web-shell/assets/{stateDiagram-AJRCARHV-hlhnuoYH.js → stateDiagram-AJRCARHV-BOp5q1Nm.js} +1 -1
  288. package/web-shell/assets/stateDiagram-v2-BHNVJYJU-BDsWUmPG.js +1 -0
  289. package/web-shell/assets/{timeline-definition-PNZ67QCA-Dqf_CqgL.js → timeline-definition-PNZ67QCA-Btc08sUA.js} +1 -1
  290. package/web-shell/assets/{vennDiagram-CIIHVFJN-DD2QhaTX.js → vennDiagram-CIIHVFJN-Bv6upsOA.js} +1 -1
  291. package/web-shell/assets/{wardley-L42UT6IY-B2uI85U_.js → wardley-L42UT6IY-D-XamnCK.js} +1 -1
  292. package/web-shell/assets/{wardleyDiagram-YWT4CUSO-U1aJX71g.js → wardleyDiagram-YWT4CUSO-BbP_5Wfp.js} +1 -1
  293. package/web-shell/assets/{xychartDiagram-2RQKCTM6-C0ODHUee.js → xychartDiagram-2RQKCTM6-CO5Hh28b.js} +1 -1
  294. package/web-shell/index.html +2 -2
  295. package/chunks/chunk-CU3L64TP.js +0 -93
  296. package/chunks/initializer-UTQ7FB7G.js +0 -71
  297. package/chunks/list-DEICDL65.js +0 -74
  298. package/chunks/loadedSettingsAdapter-NOWEGDYJ.js +0 -68
  299. package/chunks/mcp-L5JXEEIA.js +0 -68
  300. package/chunks/nonInteractiveCli-LS2K4X6A.js +0 -124
  301. package/chunks/types-JNKGKUJT.js +0 -12
  302. package/chunks/workspace-providers-status-4KMGETOJ.js +0 -71
  303. package/chunks/workspace-service-RVLBMSMZ.js +0 -80
  304. package/chunks/workspace-skills-status-DS4ZVFTO.js +0 -70
  305. package/web-shell/assets/channel-CLiQD50f.js +0 -1
  306. package/web-shell/assets/classDiagram-4FO5ZUOK-D3sYqow5.js +0 -1
  307. package/web-shell/assets/classDiagram-v2-Q7XG4LA2-D3sYqow5.js +0 -1
  308. package/web-shell/assets/index-D5IWFVk1.css +0 -5
  309. package/web-shell/assets/index-KFJRDhX7.js +0 -783
  310. package/web-shell/assets/stateDiagram-v2-BHNVJYJU-BhQMwgpl.js +0 -1
@@ -3,7 +3,7 @@
3
3
  import {
4
4
  classifyApiError,
5
5
  prefixMidTurnUserMessageParts
6
- } from "./chunk-Q4YQW46J.js";
6
+ } from "./chunk-UYPPCIJQ.js";
7
7
  import {
8
8
  EXTENSION_CONTEXT_BUDGET,
9
9
  buildExtensionMentionContext,
@@ -12,96 +12,102 @@ import {
12
12
  matchMcpServerByRef,
13
13
  parseExtensionRef,
14
14
  parseMcpServerRef
15
- } from "./chunk-77XJ3SWN.js";
15
+ } from "./chunk-LIUEXYPL.js";
16
16
  import {
17
17
  getAvailableCommands,
18
18
  handleSlashCommand,
19
19
  insertAfterFunctionResponses,
20
20
  isSlashCommand,
21
21
  normalizePartList
22
- } from "./chunk-5U27BZ72.js";
22
+ } from "./chunk-55SAYASQ.js";
23
23
  import {
24
24
  appEvents,
25
25
  buildDisabledSkillNamesProvider,
26
26
  loadCliConfig,
27
27
  normalizeDisabledToolList
28
- } from "./chunk-5HOMWMCL.js";
29
- import "./chunk-5DTTYNB7.js";
30
- import {
31
- collectContextData,
32
- formatContextUsageText
33
- } from "./chunk-D2GFWEXB.js";
28
+ } from "./chunk-QEDYXCLG.js";
34
29
  import {
35
30
  getCommandSubcommandNames
36
- } from "./chunk-AURZZYMD.js";
37
- import "./chunk-JZETEN3Z.js";
31
+ } from "./chunk-IQOOJSPR.js";
32
+ import "./chunk-ZNCLTRNU.js";
38
33
  import {
39
34
  getEffectiveSupportedModes
40
- } from "./chunk-GWLSNBG4.js";
35
+ } from "./chunk-VQLRHJKL.js";
36
+ import "./chunk-UKWAQ7AV.js";
37
+ import "./chunk-5DTTYNB7.js";
38
+ import {
39
+ collectContextData,
40
+ formatContextUsageText
41
+ } from "./chunk-QNT5T4Q2.js";
41
42
  import "./chunk-4WGODMVR.js";
43
+ import "./chunk-NHDKSOEY.js";
42
44
  import {
43
45
  isTerminalGoalStatusKind
44
46
  } from "./chunk-7X7TEQNX.js";
45
- import "./chunk-KW7NOTN6.js";
46
- import "./chunk-CNEIYWSA.js";
47
47
  import "./chunk-HTHUX2T5.js";
48
- import "./chunk-MXL5UP4X.js";
49
- import "./chunk-3G7CIHVV.js";
50
- import "./chunk-VA4KQY6V.js";
51
- import "./chunk-NHDKSOEY.js";
52
- import "./chunk-OQ4DRIOA.js";
53
- import "./chunk-EMDMPBJ4.js";
48
+ import "./chunk-WJOC24IW.js";
49
+ import "./chunk-C47ENMZJ.js";
54
50
  import "./chunk-YAF2MQZ6.js";
51
+ import "./chunk-Q6TUALBE.js";
52
+ import "./chunk-KW7NOTN6.js";
55
53
  import {
56
54
  MAX_REMEMBER_CONTENT_BYTES,
55
+ collectHistoryReplayUpdates,
56
+ copyCumulativeUsage,
57
+ createReplayCumulativeUsage,
57
58
  createWorkspaceMemoryExtractionErrorLogger,
58
59
  formatWorkspaceMemoryForgetSummary,
59
60
  isValidServerName,
61
+ replayTranscriptRecordPage,
60
62
  shouldSuppressRememberErrorDetails,
61
63
  workspaceMemoryFailureCode,
62
64
  workspaceMemoryFailureDiagnostics
63
- } from "./chunk-GZRTYZ2R.js";
65
+ } from "./chunk-GQKWT45X.js";
64
66
  import {
65
67
  HistoryReplayer,
66
68
  MessageEmitter,
67
69
  PlanEmitter,
68
70
  ToolCallEmitter
69
- } from "./chunk-N3EMS75V.js";
70
- import "./chunk-U2NNEY4R.js";
71
- import "./chunk-Q6I5QHMH.js";
71
+ } from "./chunk-HKM2TEF7.js";
72
+ import "./chunk-ZEEVKDO7.js";
73
+ import "./chunk-FGTCZJOD.js";
72
74
  import "./chunk-QHTIBUWB.js";
73
75
  import "./chunk-L573Z2QZ.js";
76
+ import {
77
+ computeCpuPercent
78
+ } from "./chunk-HGT6JR3U.js";
79
+ import "./chunk-RXFQM6FQ.js";
80
+ import "./chunk-MV52C5MA.js";
81
+ import "./chunk-6H67XLET.js";
82
+ import "./chunk-IOQ75R4R.js";
83
+ import "./chunk-MEK7CQJR.js";
84
+ import "./chunk-BUPLOPUA.js";
85
+ import "./chunk-E5Z2AVNV.js";
86
+ import {
87
+ formatAcpModelId,
88
+ parseAcpBaseModelId,
89
+ parseAcpModelOption,
90
+ sanitizeProviderBaseUrl
91
+ } from "./chunk-LT5CRUA5.js";
92
+ import {
93
+ mapSkillConfigToStatus
94
+ } from "./chunk-2W3OOD4W.js";
74
95
  import {
75
96
  PERMISSION_RULE_TYPES,
76
97
  PermissionRulesValidationError,
77
98
  buildPermissionSettings,
78
99
  normalizePermissionRules,
79
100
  readPermissionRuleSet
80
- } from "./chunk-5VXNZWGF.js";
101
+ } from "./chunk-ZLOHB76C.js";
81
102
  import {
82
103
  MAX_AUDIO_BYTES,
83
104
  sanitizeVoiceErrorMessage,
84
105
  transcribeVoiceAudio
85
- } from "./chunk-PDZ7MBDG.js";
106
+ } from "./chunk-JIQHT2O6.js";
86
107
  import {
87
108
  readVoiceModel
88
- } from "./chunk-HPDUL5MF.js";
89
- import "./chunk-LK7KUE55.js";
90
- import {
91
- computeCpuPercent
92
- } from "./chunk-YVEDCAUE.js";
93
- import "./chunk-RXFQM6FQ.js";
94
- import "./chunk-PODM4SZ4.js";
95
- import "./chunk-6H67XLET.js";
96
- import "./chunk-BAPGSC7U.js";
97
- import "./chunk-P67PFTUT.js";
98
- import "./chunk-57OAHC2Y.js";
99
- import "./chunk-TO6QE22P.js";
100
- import "./chunk-W3JHSWRP.js";
101
- import "./chunk-E5Z2AVNV.js";
102
- import {
103
- NOT_CURRENTLY_GENERATING_CANCEL_MESSAGE
104
- } from "./chunk-IAVB3HM3.js";
109
+ } from "./chunk-AGZWN4WV.js";
110
+ import "./chunk-FSA7ERJ2.js";
105
111
  import {
106
112
  CLIENT_MCP_OVER_WS_CONFIG_FLAG,
107
113
  LOAD_REPLAY_BULK_MODE,
@@ -110,21 +116,23 @@ import {
110
116
  LOAD_REPLAY_VERSION,
111
117
  MID_TURN_QUEUE_DRAIN_METHOD
112
118
  } from "./chunk-PZL23GTM.js";
113
- import "./chunk-W7FJ3N32.js";
114
119
  import "./chunk-6RLROE6G.js";
115
120
  import "./chunk-COH43MRJ.js";
116
121
  import {
117
- ndJsonStream
118
- } from "./chunk-TEGEBB2I.js";
122
+ NOT_CURRENTLY_GENERATING_CANCEL_MESSAGE
123
+ } from "./chunk-KSO42X3Z.js";
124
+ import "./chunk-K4LG6TVJ.js";
125
+ import "./chunk-EPY4ZEU6.js";
126
+ import "./chunk-57OAHC2Y.js";
127
+ import "./chunk-ZP4ZZJJG.js";
128
+ import "./chunk-4QZADKJS.js";
129
+ import "./chunk-V6WHFGST.js";
119
130
  import {
120
- formatAcpModelId,
121
- parseAcpBaseModelId,
122
- parseAcpModelOption,
123
- sanitizeProviderBaseUrl
124
- } from "./chunk-34MW4KTI.js";
131
+ createLoadedSettingsAdapter
132
+ } from "./chunk-AETEZU4U.js";
125
133
  import {
126
- mapSkillConfigToStatus
127
- } from "./chunk-L36P3NBD.js";
134
+ ndJsonStream
135
+ } from "./chunk-TEGEBB2I.js";
128
136
  import {
129
137
  ACP_PREFLIGHT_KINDS,
130
138
  IDLE_HOOK_EVENTS,
@@ -132,14 +140,21 @@ import {
132
140
  SERVE_STATUS_EXT_METHODS,
133
141
  STATUS_SCHEMA_VERSION,
134
142
  mapDomainErrorToErrorKind
135
- } from "./chunk-VWPVHAMO.js";
136
- import "./chunk-DC5Z3DU6.js";
137
- import "./chunk-V6WHFGST.js";
143
+ } from "./chunk-7DXHIMXL.js";
144
+ import "./chunk-W7FJ3N32.js";
145
+ import "./chunk-GYTKQYDB.js";
146
+ import "./chunk-TJTKSVIV.js";
147
+ import "./chunk-M5GB774H.js";
148
+ import "./chunk-OJAMDVF5.js";
149
+ import "./chunk-LXLTBIDP.js";
150
+ import "./chunk-R5XLNDE2.js";
151
+ import "./chunk-AU4R7ACM.js";
138
152
  import {
139
- createLoadedSettingsAdapter
140
- } from "./chunk-BMGVRZN4.js";
141
- import "./chunk-CUMMSHH6.js";
142
- import "./chunk-ATAKVRIF.js";
153
+ AgentSideConnection,
154
+ PROTOCOL_VERSION,
155
+ RequestError
156
+ } from "./chunk-UDXSXLER.js";
157
+ import "./chunk-WDSCTLAB.js";
143
158
  import {
144
159
  OUTPUT_LANGUAGE_AUTO,
145
160
  getOutputLanguageFilePath,
@@ -150,44 +165,37 @@ import {
150
165
  resolveOutputLanguage,
151
166
  updateOutputLanguageFile,
152
167
  writeOutputLanguageAndRegisterPath
153
- } from "./chunk-4C5BQ2D2.js";
168
+ } from "./chunk-CQQD7MDG.js";
154
169
  import "./chunk-RKUWKYED.js";
155
170
  import {
156
171
  SUPPORTED_LANGUAGES,
157
172
  getCurrentLanguage,
158
173
  setLanguageAsync
159
- } from "./chunk-YAUFFXDS.js";
174
+ } from "./chunk-UZKG7HFG.js";
160
175
  import {
161
176
  findEnvFiles,
162
177
  preResolveHomeEnvOverrides,
163
178
  reloadEnvironment
164
- } from "./chunk-SCGXUJBT.js";
179
+ } from "./chunk-KPA5QGN2.js";
180
+ import "./chunk-GOXKNSDZ.js";
165
181
  import {
166
182
  getSystemDefaultsPath,
167
183
  getSystemSettingsPath
168
- } from "./chunk-3BTRNWWD.js";
184
+ } from "./chunk-IDS7MSUP.js";
169
185
  import "./chunk-QRUIS3DN.js";
170
- import "./chunk-X4NKFGFJ.js";
171
- import "./chunk-TJTKSVIV.js";
172
- import "./chunk-M5GB774H.js";
173
- import "./chunk-34Z3U5RQ.js";
174
- import {
175
- AgentSideConnection,
176
- PROTOCOL_VERSION,
177
- RequestError
178
- } from "./chunk-UDXSXLER.js";
179
186
  import {
180
187
  isFolderTrustEnabled,
181
188
  isWorkspaceTrusted,
182
189
  loadTrustedFolders
183
- } from "./chunk-HKMAENAO.js";
184
- import "./chunk-RDJSGHZE.js";
185
- import "./chunk-XFSFZCM5.js";
186
- import "./chunk-3AHXV67U.js";
187
- import "./chunk-VJNBRRZG.js";
190
+ } from "./chunk-W2U4RJJU.js";
191
+ import "./chunk-ALGGS7UH.js";
192
+ import "./chunk-MR3PXB6E.js";
188
193
  import {
189
194
  writeStderrLine
190
195
  } from "./chunk-YUZI3WAC.js";
196
+ import "./chunk-XFSFZCM5.js";
197
+ import "./chunk-C5TVXLJZ.js";
198
+ import "./chunk-VJNBRRZG.js";
191
199
  import {
192
200
  ALL_PROVIDERS,
193
201
  APPROVAL_MODE_INFO,
@@ -205,7 +213,7 @@ import {
205
213
  McpBudgetWouldExceedError,
206
214
  McpServerSpawnFailedError,
207
215
  McpTransportPool,
208
- ORPHAN_TOOL_USE_REPAIR_REASON,
216
+ MessageDisplayDispatcher,
209
217
  POOLED_TRANSPORTS_DEFAULT,
210
218
  SESSION_ARTIFACT_PERSISTENCE_VERSION,
211
219
  SESSION_TITLE_MAX_LENGTH,
@@ -226,7 +234,7 @@ import {
226
234
  buildBtwPrompt,
227
235
  buildContextUsage,
228
236
  buildInstallPlan,
229
- buildSyntheticToolResponseParts,
237
+ buildSessionRecoveryPlanFromApiHistory,
230
238
  clampInlineMediaPart,
231
239
  clearGoalTerminalObserver,
232
240
  computeUniqueBranchTitle,
@@ -235,7 +243,6 @@ import {
235
243
  dedupeToolCallsById,
236
244
  detectAutonomousSentinel,
237
245
  detectLoopSentinel,
238
- detectTurnInterruption,
239
246
  encodeSessionTranscriptCursor,
240
247
  evaluateAutoMode,
241
248
  evaluatePermissionFlow,
@@ -281,6 +288,8 @@ import {
281
288
  recordAllow,
282
289
  recordFallbackApprove,
283
290
  redactUrlCredentials,
291
+ refreshMemoryAfterManagedWrite,
292
+ refreshMemoryInstruction,
284
293
  resolveBaseUrl,
285
294
  restoreWorktreeContext,
286
295
  runForkedAgent,
@@ -299,37 +308,37 @@ import {
299
308
  subagentGenerator,
300
309
  unregisterGoalHook,
301
310
  updateSetting
302
- } from "./chunk-NVYTCB5Z.js";
303
- import "./chunk-CU3L64TP.js";
304
- import "./chunk-ZJE7NSL3.js";
311
+ } from "./chunk-XCR44EEA.js";
305
312
  import {
306
313
  external_exports
307
314
  } from "./chunk-H6XPXXMH.js";
308
- import "./chunk-MC23XKFE.js";
309
- import "./chunk-LUODI7WD.js";
310
- import "./chunk-ORBGV7NJ.js";
311
- import "./chunk-KKNMOEZH.js";
315
+ import "./chunk-5M6IDOMF.js";
316
+ import "./chunk-BLPMRN4B.js";
317
+ import "./chunk-RCEEXIOO.js";
318
+ import "./chunk-KKRTYONM.js";
319
+ import "./chunk-TV6K2FB4.js";
320
+ import "./chunk-E2UVIFI2.js";
312
321
  import {
313
322
  runSideQuery
314
- } from "./chunk-W2UIXQDL.js";
323
+ } from "./chunk-7STBROEV.js";
315
324
  import "./chunk-XU457J4V.js";
316
325
  import "./chunk-VDDGDZMA.js";
317
- import "./chunk-CEA3E3JB.js";
326
+ import "./chunk-SPJQO2CE.js";
318
327
  import "./chunk-SZRN75WQ.js";
319
328
  import "./chunk-HTO4JFDZ.js";
320
329
  import "./chunk-CPBF7KYF.js";
321
330
  import {
322
331
  APPROVAL_MODES,
323
332
  FORK_SUBAGENT_TYPE
324
- } from "./chunk-4GORAUCN.js";
333
+ } from "./chunk-F333XEAU.js";
325
334
  import "./chunk-6AM5D4ME.js";
326
- import "./chunk-7R3CZA3Q.js";
335
+ import "./chunk-2Z5UX4KI.js";
327
336
  import {
328
337
  HookEventName,
329
338
  createHookOutput
330
- } from "./chunk-GWHYEOV2.js";
331
- import "./chunk-4QLQE5WJ.js";
332
- import "./chunk-5XUCZNSY.js";
339
+ } from "./chunk-ARKANCNX.js";
340
+ import "./chunk-L5U3ELZX.js";
341
+ import "./chunk-TYLOFD2U.js";
333
342
  import {
334
343
  AuthType,
335
344
  ConversationFinishedEvent,
@@ -354,7 +363,7 @@ import {
354
363
  startToolSpan,
355
364
  uiTelemetryService,
356
365
  withInteractionSpan
357
- } from "./chunk-3VAGG5T5.js";
366
+ } from "./chunk-BYOOK22F.js";
358
367
  import "./chunk-4WKAA4KS.js";
359
368
  import "./chunk-CR3C7WXL.js";
360
369
  import "./chunk-CARU2RR2.js";
@@ -362,44 +371,45 @@ import "./chunk-VGC4I5JJ.js";
362
371
  import {
363
372
  getAutoMemoryRoot,
364
373
  getUserAutoMemoryRoot
365
- } from "./chunk-YLV3XXFB.js";
366
- import "./chunk-TDEXZKMT.js";
367
- import "./chunk-J3JA76CF.js";
374
+ } from "./chunk-FBU7WRZI.js";
375
+ import "./chunk-Y66VOBRP.js";
376
+ import "./chunk-WTNZ6DXB.js";
368
377
  import {
369
378
  ToolConfirmationOutcome,
370
- ToolNames
371
- } from "./chunk-B5ORX3FG.js";
379
+ ToolNames,
380
+ isShellProgressData
381
+ } from "./chunk-JGUT3LWZ.js";
372
382
  import {
373
383
  clearCachedCredentialFile,
374
384
  qwenOAuth2Events
375
- } from "./chunk-BZIFY5TF.js";
376
- import "./chunk-UOZWKTQG.js";
385
+ } from "./chunk-OKAIGAYW.js";
386
+ import "./chunk-ZPAHLFZU.js";
377
387
  import "./chunk-JESCGQM3.js";
378
- import "./chunk-ZLXQN2QS.js";
388
+ import "./chunk-WIEO4CWB.js";
379
389
  import "./chunk-XVNQMZ2I.js";
380
390
  import {
381
391
  DEFAULT_TOKEN_LIMIT,
382
392
  tokenLimit
383
- } from "./chunk-524RQP4Q.js";
384
- import "./chunk-JSG7ZSBC.js";
393
+ } from "./chunk-B7NUUEXC.js";
394
+ import "./chunk-TQBODCFD.js";
385
395
  import "./chunk-A4UCTEB5.js";
386
396
  import "./chunk-XWRJCPHC.js";
387
397
  import "./chunk-4LD5APFL.js";
388
398
  import "./chunk-TYAMGABM.js";
389
399
  import "./chunk-FCMNKVXT.js";
390
400
  import "./chunk-DJ2GSRLV.js";
391
- import "./chunk-4ZVWQHEQ.js";
401
+ import "./chunk-LQIDP6K5.js";
392
402
  import {
393
403
  Storage,
394
404
  createDebugLogger,
395
405
  getErrorMessage,
396
406
  getErrorStatus,
397
407
  isSubpath
398
- } from "./chunk-J4TSQ5EQ.js";
399
- import "./chunk-CCDMCZPP.js";
408
+ } from "./chunk-7NFB7LBQ.js";
409
+ import "./chunk-26UABK2C.js";
400
410
  import {
401
411
  runExitCleanup
402
- } from "./chunk-ECNYL4AA.js";
412
+ } from "./chunk-OPNPGO6D.js";
403
413
  import "./chunk-75DOP5OR.js";
404
414
  import "./chunk-DMTGGOSA.js";
405
415
  import "./chunk-YQ3U5MUC.js";
@@ -1337,7 +1347,12 @@ ${inputText}
1337
1347
  ${rewritten}
1338
1348
  ---`
1339
1349
  );
1340
- this.outputHistory.push(rewritten);
1350
+ if (this.contextTurns > 0) {
1351
+ this.outputHistory.push(rewritten);
1352
+ if (Number.isFinite(this.contextTurns) && this.outputHistory.length > this.contextTurns) {
1353
+ this.outputHistory = this.outputHistory.slice(-this.contextTurns);
1354
+ }
1355
+ }
1341
1356
  return rewritten;
1342
1357
  } catch (error) {
1343
1358
  debugLogger4.warn(
@@ -1387,6 +1402,9 @@ var MessageRewriteMiddleware = class {
1387
1402
  const content = updateRecord["content"];
1388
1403
  const text = content?.["text"] ?? "";
1389
1404
  await this.sendUpdate(update);
1405
+ if (updateType === "agent_message_chunk" && updateRecord["_meta"]?.["source"] === "slash_command") {
1406
+ return;
1407
+ }
1390
1408
  let didAccumulate = false;
1391
1409
  if (updateType === "agent_thought_chunk") {
1392
1410
  if (this.target === "thought" || this.target === "all") {
@@ -1473,9 +1491,10 @@ var MessageRewriteMiddleware = class {
1473
1491
  * Call this before session ends to ensure all rewrites are flushed.
1474
1492
  */
1475
1493
  async waitForPendingRewrites() {
1476
- if (this.pendingRewrites.length > 0) {
1477
- await Promise.allSettled(this.pendingRewrites);
1494
+ while (this.pendingRewrites.length > 0) {
1495
+ const inFlight = this.pendingRewrites;
1478
1496
  this.pendingRewrites = [];
1497
+ await Promise.allSettled(inFlight);
1479
1498
  }
1480
1499
  }
1481
1500
  };
@@ -2022,6 +2041,7 @@ var Session = class {
2022
2041
  // or session reload), which would otherwise execute orphaned cron prompts
2023
2042
  // on a session whose registries are already unregistered.
2024
2043
  disposed = false;
2044
+ unsubscribeChatRecordingFailure;
2025
2045
  // Modular components
2026
2046
  historyReplayer;
2027
2047
  toolCallEmitter;
@@ -2131,6 +2151,8 @@ var Session = class {
2131
2151
  this.config.getMonitorRegistry().setNotificationCallback(void 0);
2132
2152
  this.config.getBackgroundShellRegistry().setNotificationCallback(void 0);
2133
2153
  this.config.getChatRecordingService()?.setTitleRecordedCallback(void 0);
2154
+ this.unsubscribeChatRecordingFailure?.();
2155
+ this.unsubscribeChatRecordingFailure = void 0;
2134
2156
  this.config.setSubSessionSpawner(void 0);
2135
2157
  clearGoalTerminalObserver(this.sessionId);
2136
2158
  }
@@ -2389,16 +2411,18 @@ var Session = class {
2389
2411
  return { accepted: false, interruption: "none" };
2390
2412
  }
2391
2413
  const chat = this.#getCurrentChat();
2392
- const detection = detectTurnInterruption(
2393
- chat.getHistoryTailShallow?.(TURN_INTERRUPTION_HISTORY_TAIL_COUNT) ?? chat.getHistoryTail(TURN_INTERRUPTION_HISTORY_TAIL_COUNT)
2394
- );
2395
- if (detection.kind === "none") {
2414
+ const recoveryPlan = buildSessionRecoveryPlanFromApiHistory({
2415
+ sessionId: this.sessionId,
2416
+ apiHistory: chat.getHistoryTailShallow?.(TURN_INTERRUPTION_HISTORY_TAIL_COUNT) ?? chat.getHistoryTail(TURN_INTERRUPTION_HISTORY_TAIL_COUNT)
2417
+ });
2418
+ if (!recoveryPlan.continuation) {
2396
2419
  return { accepted: false, interruption: "none" };
2397
2420
  }
2421
+ const interruption = recoveryPlan.kind === "interrupted_prompt" ? "interrupted_prompt" : "interrupted_turn";
2398
2422
  if (this.pendingPrompt && !this.pendingPrompt.signal.aborted) {
2399
- return { accepted: false, interruption: detection.kind };
2423
+ return { accepted: false, interruption };
2400
2424
  }
2401
- return { accepted: true, interruption: detection.kind };
2425
+ return { accepted: true, interruption };
2402
2426
  }
2403
2427
  /**
2404
2428
  * Generate a server-side follow-up suggestion for the just-completed
@@ -2522,10 +2546,11 @@ var Session = class {
2522
2546
  let strippedOrphanEntries = null;
2523
2547
  let orphanPushCountSnapshot = 0;
2524
2548
  if (isContinue) {
2525
- const detection = detectTurnInterruption(
2526
- this.#getCurrentChat().getHistory()
2527
- );
2528
- if (detection.kind === "none") {
2549
+ const recoveryPlan = buildSessionRecoveryPlanFromApiHistory({
2550
+ sessionId: this.sessionId,
2551
+ apiHistory: this.#getCurrentChat().getHistory()
2552
+ });
2553
+ if (!recoveryPlan.continuation) {
2529
2554
  debugLogger6.warn(
2530
2555
  `[Session] continue ${promptId}: no interrupted turn on re-detection, nothing to continue`
2531
2556
  );
@@ -2538,15 +2563,12 @@ var Session = class {
2538
2563
  );
2539
2564
  return { stopReason: "end_turn" };
2540
2565
  }
2541
- if (detection.kind === "interrupted_prompt") {
2566
+ if (recoveryPlan.continuation.mode === "retry_user_parts") {
2542
2567
  strippedOrphanEntries = this.#getCurrentChat().stripOrphanedUserEntriesFromHistory() ?? null;
2543
2568
  orphanPushCountSnapshot = this.#getCurrentChat().getUserContentPushCount?.() ?? 0;
2544
- continuationParts = detection.parts;
2569
+ continuationParts = recoveryPlan.continuation.parts;
2545
2570
  } else {
2546
- continuationParts = buildSyntheticToolResponseParts(
2547
- detection.danglingCalls,
2548
- ORPHAN_TOOL_USE_REPAIR_REASON
2549
- );
2571
+ continuationParts = recoveryPlan.continuation.parts;
2550
2572
  }
2551
2573
  }
2552
2574
  if (isContinue) {
@@ -2579,7 +2601,8 @@ var Session = class {
2579
2601
  } else {
2580
2602
  parts = await this.#resolvePrompt(
2581
2603
  params.prompt,
2582
- pendingSend.signal
2604
+ pendingSend.signal,
2605
+ { promptLast: true }
2583
2606
  );
2584
2607
  }
2585
2608
  const hooksEnabled = !this.config.getDisableAllHooks?.();
@@ -2656,6 +2679,9 @@ ${this.pendingWorktreeNotice}
2656
2679
  const functionCalls = [];
2657
2680
  let usageMetadata = null;
2658
2681
  const streamStartTime = Date.now();
2682
+ const messageDisplay = this.#createMessageDisplayDispatcher(
2683
+ pendingSend.signal
2684
+ );
2659
2685
  try {
2660
2686
  const sendResult = await this.#sendMessageStreamWithAutoCompression(
2661
2687
  promptId,
@@ -2686,6 +2712,9 @@ ${this.pendingWorktreeNotice}
2686
2712
  "assistant",
2687
2713
  part.thought
2688
2714
  );
2715
+ if (!part.thought) {
2716
+ messageDisplay?.addChunk(part.text);
2717
+ }
2689
2718
  }
2690
2719
  }
2691
2720
  if (resp.type === "chunk" /* CHUNK */ && resp.value.usageMetadata) {
@@ -2728,6 +2757,8 @@ ${this.pendingWorktreeNotice}
2728
2757
  );
2729
2758
  }
2730
2759
  throw error;
2760
+ } finally {
2761
+ await messageDisplay?.finish();
2731
2762
  }
2732
2763
  if (usageMetadata) {
2733
2764
  this.#recordPromptTokenCount(usageMetadata);
@@ -2876,6 +2907,9 @@ ${this.pendingWorktreeNotice}
2876
2907
  const functionCalls = [];
2877
2908
  let usageMetadata = null;
2878
2909
  const streamStartTime = Date.now();
2910
+ const messageDisplay = this.#createMessageDisplayDispatcher(
2911
+ pendingSend.signal
2912
+ );
2879
2913
  try {
2880
2914
  const continueSendResult = await this.#sendMessageStreamWithAutoCompression(
2881
2915
  promptId + "_stop_hook_" + stopHookIterationCount,
@@ -2905,6 +2939,9 @@ ${this.pendingWorktreeNotice}
2905
2939
  "assistant",
2906
2940
  part.thought
2907
2941
  );
2942
+ if (!part.thought) {
2943
+ messageDisplay?.addChunk(part.text);
2944
+ }
2908
2945
  }
2909
2946
  }
2910
2947
  if (resp.type === "chunk" /* CHUNK */ && resp.value.usageMetadata) {
@@ -2938,6 +2975,8 @@ ${this.pendingWorktreeNotice}
2938
2975
  );
2939
2976
  }
2940
2977
  throw error;
2978
+ } finally {
2979
+ await messageDisplay?.finish();
2941
2980
  }
2942
2981
  if (usageMetadata) {
2943
2982
  this.#recordPromptTokenCount(usageMetadata);
@@ -2993,6 +3032,28 @@ ${this.pendingWorktreeNotice}
2993
3032
  * stop reason when the provider send should be skipped because the request
2994
3033
  * was cancelled or the session token limit was exceeded.
2995
3034
  */
3035
+ /**
3036
+ * Create the MessageDisplay hook dispatcher for one model call's streamed
3037
+ * reply, or null when the hook isn't registered (the common case — keeps
3038
+ * the streaming loops zero-cost). The ACP surface consumes GeminiChat's
3039
+ * raw stream directly rather than going through
3040
+ * GeminiClient.sendMessageStream, so it has to fire this hook itself —
3041
+ * with the same contract as the terminal UI path in client.ts: debounced
3042
+ * cumulative text, one message_id per model call, and an is_final firing
3043
+ * on every non-aborted exit (delivered by awaiting `finish()` in a
3044
+ * finally around each streaming loop).
3045
+ */
3046
+ #createMessageDisplayDispatcher(signal) {
3047
+ const messageBus = this.config.getMessageBus?.();
3048
+ if (this.config.getDisableAllHooks?.() || !messageBus || !this.config.hasHooksForEvent?.("MessageDisplay")) {
3049
+ return null;
3050
+ }
3051
+ return new MessageDisplayDispatcher(
3052
+ messageBus,
3053
+ signal,
3054
+ (message) => debugLogger6.warn(message)
3055
+ );
3056
+ }
2996
3057
  async #sendMessageStreamWithAutoCompression(promptId, message, abortSignal, options = {}) {
2997
3058
  const geminiClient = this.config.getGeminiClient();
2998
3059
  let compressionDiagnostic = null;
@@ -3519,28 +3580,38 @@ ${this.pendingWorktreeNotice}
3519
3580
  this.loopTickResolver?.markDelivered();
3520
3581
  }
3521
3582
  nextMessage = null;
3522
- for await (const resp of responseStream) {
3523
- if (ac.signal.aborted) return;
3524
- if (resp.type === "chunk" /* CHUNK */ && resp.value.candidates && resp.value.candidates.length > 0) {
3525
- const candidate = resp.value.candidates[0];
3526
- for (const part of candidate.content?.parts ?? []) {
3527
- if (!part.text) continue;
3528
- this.messageEmitter.emitMessage(
3529
- part.text,
3530
- "assistant",
3531
- part.thought
3532
- );
3583
+ const messageDisplay = this.#createMessageDisplayDispatcher(
3584
+ ac.signal
3585
+ );
3586
+ try {
3587
+ for await (const resp of responseStream) {
3588
+ if (ac.signal.aborted) return;
3589
+ if (resp.type === "chunk" /* CHUNK */ && resp.value.candidates && resp.value.candidates.length > 0) {
3590
+ const candidate = resp.value.candidates[0];
3591
+ for (const part of candidate.content?.parts ?? []) {
3592
+ if (!part.text) continue;
3593
+ this.messageEmitter.emitMessage(
3594
+ part.text,
3595
+ "assistant",
3596
+ part.thought
3597
+ );
3598
+ if (!part.thought) {
3599
+ messageDisplay?.addChunk(part.text);
3600
+ }
3601
+ }
3602
+ }
3603
+ if (resp.type === "chunk" /* CHUNK */ && resp.value.usageMetadata) {
3604
+ usageMetadata = resp.value.usageMetadata;
3605
+ }
3606
+ if (resp.type === "chunk" /* CHUNK */ && resp.value.functionCalls) {
3607
+ functionCalls.push(...resp.value.functionCalls);
3608
+ }
3609
+ if (resp.type === "model_fallback" /* MODEL_FALLBACK */) {
3610
+ functionCalls.length = 0;
3533
3611
  }
3534
3612
  }
3535
- if (resp.type === "chunk" /* CHUNK */ && resp.value.usageMetadata) {
3536
- usageMetadata = resp.value.usageMetadata;
3537
- }
3538
- if (resp.type === "chunk" /* CHUNK */ && resp.value.functionCalls) {
3539
- functionCalls.push(...resp.value.functionCalls);
3540
- }
3541
- if (resp.type === "model_fallback" /* MODEL_FALLBACK */) {
3542
- functionCalls.length = 0;
3543
- }
3613
+ } finally {
3614
+ await messageDisplay?.finish();
3544
3615
  }
3545
3616
  if (usageMetadata) {
3546
3617
  this.#recordPromptTokenCount(usageMetadata);
@@ -3649,15 +3720,27 @@ ${this.pendingWorktreeNotice}
3649
3720
  kind: "shell"
3650
3721
  });
3651
3722
  });
3652
- this.config.getChatRecordingService()?.setTitleRecordedCallback((customTitle, titleSource) => {
3723
+ this.config.getChatRecordingService()?.setTitleRecordedCallback((customTitle, titleSource, sessionId) => {
3653
3724
  void this.client.extNotification("qwen/notify/session/title-update", {
3654
3725
  v: 1,
3655
- sessionId: this.sessionId,
3726
+ sessionId,
3656
3727
  title: customTitle,
3657
3728
  titleSource
3658
3729
  }).catch(() => {
3659
3730
  });
3660
3731
  });
3732
+ if (typeof this.config.onChatRecordingFailure === "function") {
3733
+ this.unsubscribeChatRecordingFailure = this.config.onChatRecordingFailure(
3734
+ (event) => this.client.extNotification(
3735
+ "qwen/notify/session/recording-degraded",
3736
+ {
3737
+ v: 1,
3738
+ sessionId: event.sessionId,
3739
+ reason: "write_failed"
3740
+ }
3741
+ )
3742
+ );
3743
+ }
3661
3744
  }
3662
3745
  #enqueueBackgroundNotification(item) {
3663
3746
  while (this.notificationQueue.length >= MAX_NOTIFICATION_QUEUE) {
@@ -3746,35 +3829,43 @@ ${this.pendingWorktreeNotice}
3746
3829
  }
3747
3830
  const responseStream = sendResult.responseStream;
3748
3831
  nextMessage = null;
3749
- for await (const resp of responseStream) {
3750
- if (ac.signal.aborted) {
3751
- await this.#emitBackgroundNotificationEndTurn("cancelled");
3752
- return;
3753
- }
3754
- if (resp.type === "chunk" /* CHUNK */ && resp.value.candidates && resp.value.candidates.length > 0) {
3755
- const candidate = resp.value.candidates[0];
3756
- for (const part of candidate.content?.parts ?? []) {
3757
- if (!part.text) continue;
3758
- if (part.thought) {
3759
- await this.messageEmitter.emitMessage(
3760
- part.text,
3761
- "assistant",
3762
- true
3763
- );
3764
- } else {
3765
- responseText += part.text;
3832
+ const messageDisplay = this.#createMessageDisplayDispatcher(
3833
+ ac.signal
3834
+ );
3835
+ try {
3836
+ for await (const resp of responseStream) {
3837
+ if (ac.signal.aborted) {
3838
+ await this.#emitBackgroundNotificationEndTurn("cancelled");
3839
+ return;
3840
+ }
3841
+ if (resp.type === "chunk" /* CHUNK */ && resp.value.candidates && resp.value.candidates.length > 0) {
3842
+ const candidate = resp.value.candidates[0];
3843
+ for (const part of candidate.content?.parts ?? []) {
3844
+ if (!part.text) continue;
3845
+ if (part.thought) {
3846
+ await this.messageEmitter.emitMessage(
3847
+ part.text,
3848
+ "assistant",
3849
+ true
3850
+ );
3851
+ } else {
3852
+ responseText += part.text;
3853
+ messageDisplay?.addChunk(part.text);
3854
+ }
3766
3855
  }
3767
3856
  }
3857
+ if (resp.type === "chunk" /* CHUNK */ && resp.value.usageMetadata) {
3858
+ usageMetadata = resp.value.usageMetadata;
3859
+ }
3860
+ if (resp.type === "chunk" /* CHUNK */ && resp.value.functionCalls) {
3861
+ functionCalls.push(...resp.value.functionCalls);
3862
+ }
3863
+ if (resp.type === "model_fallback" /* MODEL_FALLBACK */) {
3864
+ functionCalls.length = 0;
3865
+ }
3768
3866
  }
3769
- if (resp.type === "chunk" /* CHUNK */ && resp.value.usageMetadata) {
3770
- usageMetadata = resp.value.usageMetadata;
3771
- }
3772
- if (resp.type === "chunk" /* CHUNK */ && resp.value.functionCalls) {
3773
- functionCalls.push(...resp.value.functionCalls);
3774
- }
3775
- if (resp.type === "model_fallback" /* MODEL_FALLBACK */) {
3776
- functionCalls.length = 0;
3777
- }
3867
+ } finally {
3868
+ await messageDisplay?.finish();
3778
3869
  }
3779
3870
  if (responseText.length > 0) {
3780
3871
  await this.#emitBackgroundNotificationResponse(
@@ -3901,26 +3992,54 @@ ${this.pendingWorktreeNotice}
3901
3992
  }
3902
3993
  async sendAvailableCommandsUpdate() {
3903
3994
  try {
3904
- const { availableCommands, availableSkills, availableSkillDetails } = await buildAvailableCommandsSnapshot(
3905
- this.config,
3906
- void 0,
3907
- this.settings
3908
- );
3909
- const update = {
3910
- sessionUpdate: "available_commands_update",
3911
- availableCommands,
3912
- ...availableSkills !== void 0 ? {
3913
- _meta: {
3914
- availableSkills,
3915
- ...availableSkillDetails ? { availableSkillDetails } : {}
3916
- }
3917
- } : {}
3918
- };
3919
- await this.sendUpdate(update);
3995
+ await this.sendAvailableCommandsUpdateOrThrow();
3920
3996
  } catch (error) {
3921
3997
  debugLogger6.error("Error sending available commands update:", error);
3922
3998
  }
3923
3999
  }
4000
+ async refreshSkillsFromSettings() {
4001
+ this.settings.reloadScopeFromDisk("Workspace" /* Workspace */);
4002
+ const skillManager = this.config.getSkillManager();
4003
+ let updateFailed = false;
4004
+ let updateError;
4005
+ try {
4006
+ await this.sendAvailableCommandsUpdateOrThrow();
4007
+ } catch (error) {
4008
+ updateFailed = true;
4009
+ updateError = error;
4010
+ }
4011
+ if (skillManager) {
4012
+ try {
4013
+ skillManager.suppressNextSlashReload();
4014
+ await skillManager.notifyConfigChanged();
4015
+ } catch (error) {
4016
+ if (!updateFailed) throw error;
4017
+ debugLogger6.error(
4018
+ "SkillManager refresh failed after command update failure:",
4019
+ error
4020
+ );
4021
+ }
4022
+ }
4023
+ if (updateFailed) throw updateError;
4024
+ }
4025
+ async sendAvailableCommandsUpdateOrThrow() {
4026
+ const { availableCommands, availableSkills, availableSkillDetails } = await buildAvailableCommandsSnapshot(
4027
+ this.config,
4028
+ void 0,
4029
+ this.settings
4030
+ );
4031
+ const update = {
4032
+ sessionUpdate: "available_commands_update",
4033
+ availableCommands,
4034
+ ...availableSkills !== void 0 ? {
4035
+ _meta: {
4036
+ availableSkills,
4037
+ ...availableSkillDetails ? { availableSkillDetails } : {}
4038
+ }
4039
+ } : {}
4040
+ };
4041
+ await this.sendUpdate(update);
4042
+ }
3924
4043
  /**
3925
4044
  * Requests permission from the client for a tool call.
3926
4045
  * Used by SubAgentTracker for sub-agent approval requests.
@@ -4212,6 +4331,17 @@ ${this.pendingWorktreeNotice}
4212
4331
  parts2.push(await recordSkippedToolCall(remainingCall, message));
4213
4332
  }
4214
4333
  }, "appendSkippedAfter");
4334
+ const memoryWriteCandidates = [];
4335
+ const collectMemoryWriteCandidates = /* @__PURE__ */ __name((result) => {
4336
+ if (result.memoryWriteCandidates) {
4337
+ memoryWriteCandidates.push(...result.memoryWriteCandidates);
4338
+ }
4339
+ }, "collectMemoryWriteCandidates");
4340
+ const refreshMemoryIfNeeded = /* @__PURE__ */ __name(async () => {
4341
+ await refreshMemoryAfterManagedWrite(this.config, memoryWriteCandidates, {
4342
+ logContext: `ACP session ${this.sessionId} memory tool batch`
4343
+ });
4344
+ }, "refreshMemoryIfNeeded");
4215
4345
  const runBounded = /* @__PURE__ */ __name(async (calls, runAbortSignal, onStopAfterPermissionCancel, onStopAfterLoopDetected, shouldSkipUnstarted) => {
4216
4346
  const configuredMaxConcurrency = parsePositiveIntegerEnv(
4217
4347
  process.env["QWEN_CODE_MAX_TOOL_CONCURRENCY"],
@@ -4325,103 +4455,117 @@ ${this.pendingWorktreeNotice}
4325
4455
  return results;
4326
4456
  }, "runBounded");
4327
4457
  const parts = [];
4328
- for (const batch of batches) {
4329
- if (batch.kind === "duplicate") {
4330
- await emitDuplicateBatch(batch);
4331
- parts.push(...batch.response.responseParts);
4332
- continue;
4333
- }
4334
- if (batch.concurrent && batch.calls.length > 1) {
4335
- const batchAbortController = new AbortController();
4336
- let batchStopAfterPermissionCancel = false;
4337
- const propagateAbort = /* @__PURE__ */ __name(() => {
4338
- batchAbortController.abort(abortSignal.reason);
4339
- }, "propagateAbort");
4340
- if (abortSignal.aborted) {
4341
- propagateAbort();
4342
- } else {
4343
- abortSignal.addEventListener("abort", propagateAbort, {
4344
- once: true
4345
- });
4346
- }
4347
- const stopBatchAfterPermissionCancel = /* @__PURE__ */ __name(() => {
4348
- batchStopAfterPermissionCancel = true;
4349
- batchAbortController.abort(USER_CANCEL_ABORT_REASON);
4350
- }, "stopBatchAfterPermissionCancel");
4351
- let results;
4352
- try {
4353
- results = await runBounded(
4354
- batch.calls,
4355
- batchAbortController.signal,
4356
- stopBatchAfterPermissionCancel,
4357
- () => batchAbortController.abort("loop_detected"),
4358
- () => batchStopAfterPermissionCancel
4359
- );
4360
- } finally {
4361
- abortSignal.removeEventListener("abort", propagateAbort);
4362
- }
4363
- let shouldStop = false;
4364
- let shouldStopForLoop = false;
4365
- for (const r of results) {
4366
- parts.push(...r.parts);
4367
- shouldStop ||= r.stopAfterPermissionCancel;
4368
- shouldStopForLoop ||= r.loopDetected === true;
4369
- }
4370
- if (shouldStopForLoop) {
4371
- await appendSkippedAfter(
4372
- parts,
4373
- batch.calls[batch.calls.length - 1],
4374
- LOOP_DETECTED_SKIP_MESSAGE
4375
- );
4376
- return {
4377
- parts,
4378
- stopAfterPermissionCancel: false,
4379
- loopDetected: true
4380
- };
4381
- }
4382
- if (shouldStop) {
4383
- await appendSkippedAfter(parts, batch.calls[batch.calls.length - 1]);
4384
- return {
4385
- parts,
4386
- stopAfterPermissionCancel: true,
4387
- repeatedDuplicateProviderToolCall: false
4388
- };
4458
+ try {
4459
+ for (const batch of batches) {
4460
+ if (batch.kind === "duplicate") {
4461
+ await emitDuplicateBatch(batch);
4462
+ parts.push(...batch.response.responseParts);
4463
+ continue;
4389
4464
  }
4390
- } else {
4391
- for (const fc of batch.calls) {
4392
- const r = await this.runTool(
4393
- abortSignal,
4394
- promptId,
4395
- fc,
4396
- void 0,
4397
- toolLoopState,
4398
- recordSkippedToolCall
4399
- );
4400
- parts.push(...r.parts);
4401
- if (r.loopDetected) {
4402
- await appendSkippedAfter(parts, fc, LOOP_DETECTED_SKIP_MESSAGE);
4465
+ if (batch.concurrent && batch.calls.length > 1) {
4466
+ const batchAbortController = new AbortController();
4467
+ let batchStopAfterPermissionCancel = false;
4468
+ const propagateAbort = /* @__PURE__ */ __name(() => {
4469
+ batchAbortController.abort(abortSignal.reason);
4470
+ }, "propagateAbort");
4471
+ if (abortSignal.aborted) {
4472
+ propagateAbort();
4473
+ } else {
4474
+ abortSignal.addEventListener("abort", propagateAbort, {
4475
+ once: true
4476
+ });
4477
+ }
4478
+ const stopBatchAfterPermissionCancel = /* @__PURE__ */ __name(() => {
4479
+ batchStopAfterPermissionCancel = true;
4480
+ batchAbortController.abort(USER_CANCEL_ABORT_REASON);
4481
+ }, "stopBatchAfterPermissionCancel");
4482
+ let results;
4483
+ try {
4484
+ results = await runBounded(
4485
+ batch.calls,
4486
+ batchAbortController.signal,
4487
+ stopBatchAfterPermissionCancel,
4488
+ () => batchAbortController.abort("loop_detected"),
4489
+ () => batchStopAfterPermissionCancel
4490
+ );
4491
+ } finally {
4492
+ abortSignal.removeEventListener("abort", propagateAbort);
4493
+ }
4494
+ let shouldStop = false;
4495
+ let shouldStopForLoop = false;
4496
+ for (const r of results) {
4497
+ parts.push(...r.parts);
4498
+ collectMemoryWriteCandidates(r);
4499
+ shouldStop ||= r.stopAfterPermissionCancel;
4500
+ shouldStopForLoop ||= r.loopDetected === true;
4501
+ }
4502
+ if (shouldStopForLoop) {
4503
+ await appendSkippedAfter(
4504
+ parts,
4505
+ batch.calls[batch.calls.length - 1],
4506
+ LOOP_DETECTED_SKIP_MESSAGE
4507
+ );
4403
4508
  return {
4404
4509
  parts,
4405
4510
  stopAfterPermissionCancel: false,
4406
- loopDetected: true
4511
+ loopDetected: true,
4512
+ memoryWriteCandidates
4407
4513
  };
4408
4514
  }
4409
- if (r.stopAfterPermissionCancel) {
4410
- await appendSkippedAfter(parts, fc);
4515
+ if (shouldStop) {
4516
+ await appendSkippedAfter(
4517
+ parts,
4518
+ batch.calls[batch.calls.length - 1]
4519
+ );
4411
4520
  return {
4412
4521
  parts,
4413
4522
  stopAfterPermissionCancel: true,
4414
- repeatedDuplicateProviderToolCall: false
4523
+ repeatedDuplicateProviderToolCall: false,
4524
+ memoryWriteCandidates
4415
4525
  };
4416
4526
  }
4527
+ } else {
4528
+ for (const fc of batch.calls) {
4529
+ const r = await this.runTool(
4530
+ abortSignal,
4531
+ promptId,
4532
+ fc,
4533
+ void 0,
4534
+ toolLoopState,
4535
+ recordSkippedToolCall
4536
+ );
4537
+ parts.push(...r.parts);
4538
+ collectMemoryWriteCandidates(r);
4539
+ if (r.loopDetected) {
4540
+ await appendSkippedAfter(parts, fc, LOOP_DETECTED_SKIP_MESSAGE);
4541
+ return {
4542
+ parts,
4543
+ stopAfterPermissionCancel: false,
4544
+ loopDetected: true,
4545
+ memoryWriteCandidates
4546
+ };
4547
+ }
4548
+ if (r.stopAfterPermissionCancel) {
4549
+ await appendSkippedAfter(parts, fc);
4550
+ return {
4551
+ parts,
4552
+ stopAfterPermissionCancel: true,
4553
+ repeatedDuplicateProviderToolCall: false,
4554
+ memoryWriteCandidates
4555
+ };
4556
+ }
4557
+ }
4417
4558
  }
4418
4559
  }
4560
+ return {
4561
+ parts,
4562
+ stopAfterPermissionCancel: false,
4563
+ repeatedDuplicateProviderToolCall: false,
4564
+ memoryWriteCandidates
4565
+ };
4566
+ } finally {
4567
+ await refreshMemoryIfNeeded();
4419
4568
  }
4420
- return {
4421
- parts,
4422
- stopAfterPermissionCancel: false,
4423
- repeatedDuplicateProviderToolCall: false
4424
- };
4425
4569
  }
4426
4570
  /**
4427
4571
  * Assemble the per-turn system reminders the model needs to see at the
@@ -4936,27 +5080,61 @@ ${this.pendingWorktreeNotice}
4936
5080
  }
4937
5081
  const execSpan = startToolExecutionSpan();
4938
5082
  let toolResult;
5083
+ let toolSettled = false;
5084
+ let heartbeatCount = 0;
5085
+ let lastHeartbeat;
5086
+ const onToolProgress = /* @__PURE__ */ __name((chunk) => {
5087
+ if (toolSettled || !isShellProgressData(chunk)) {
5088
+ return;
5089
+ }
5090
+ heartbeatCount++;
5091
+ lastHeartbeat = chunk;
5092
+ void this.sendUpdate({
5093
+ sessionUpdate: "tool_call_update",
5094
+ toolCallId: callId,
5095
+ status: "in_progress",
5096
+ _meta: { toolName, shellProgress: chunk }
5097
+ }).catch((err) => {
5098
+ debugLogger6.debug(
5099
+ `[Session.runTool] heartbeat update failed for ${callId}: ${err}`
5100
+ );
5101
+ });
5102
+ }, "onToolProgress");
5103
+ const heartbeatSpanAttributes = /* @__PURE__ */ __name(() => heartbeatCount > 0 ? {
5104
+ attributes: {
5105
+ "shell.heartbeat_count": heartbeatCount,
5106
+ ...lastHeartbeat?.lastOutputAgeMs !== void 0 && {
5107
+ "shell.last_output_age_ms": lastHeartbeat.lastOutputAgeMs
5108
+ }
5109
+ }
5110
+ } : void 0, "heartbeatSpanAttributes");
4939
5111
  try {
4940
5112
  const sleepInhibitorHandle = acquireSleepInhibitor(
4941
5113
  this.config,
4942
5114
  `Qwen Code is executing tool ${toolName}`
4943
5115
  );
4944
5116
  try {
4945
- toolResult = await invocation.execute(activeToolAbortSignal);
5117
+ toolResult = await invocation.execute(
5118
+ activeToolAbortSignal,
5119
+ onToolProgress
5120
+ );
4946
5121
  } finally {
5122
+ toolSettled = true;
4947
5123
  sleepInhibitorHandle.release();
4948
5124
  }
4949
5125
  const aborted2 = activeToolAbortSignal.aborted;
4950
5126
  endToolExecutionSpan(execSpan, {
4951
5127
  success: !toolResult.error && !aborted2,
4952
5128
  error: aborted2 ? "tool_cancelled" : toolResult.error ? "tool_error" : void 0,
4953
- cancelled: aborted2
5129
+ cancelled: aborted2,
5130
+ ...heartbeatSpanAttributes()
4954
5131
  });
4955
5132
  } catch (execError) {
4956
5133
  endToolExecutionSpan(execSpan, {
4957
5134
  success: false,
4958
5135
  error: activeToolAbortSignal.aborted ? "tool_cancelled" : "tool_exception",
4959
- cancelled: activeToolAbortSignal.aborted
5136
+ cancelled: activeToolAbortSignal.aborted,
5137
+ ...heartbeatSpanAttributes()
4960
5138
  });
4961
5139
  throw execError;
4962
5140
  }
@@ -5082,7 +5260,14 @@ ${this.pendingWorktreeNotice}
5082
5260
  }
5083
5261
  return {
5084
5262
  parts: responseParts,
5085
- stopAfterPermissionCancel: nestedPermissionCancelled
5263
+ stopAfterPermissionCancel: nestedPermissionCancelled,
5264
+ memoryWriteCandidates: status === "success" ? [
5265
+ {
5266
+ toolName,
5267
+ args,
5268
+ status
5269
+ }
5270
+ ] : void 0
5086
5271
  };
5087
5272
  } catch (e) {
5088
5273
  cleanupAgentToolResources();
@@ -5203,7 +5388,7 @@ ${this.pendingWorktreeNotice}
5203
5388
  throw new Error(result.content || "Slash command failed.");
5204
5389
  }
5205
5390
  const rendered = (result.content || "").replace(/\n/g, " \n");
5206
- await this.messageEmitter.emitAgentMessage(rendered);
5391
+ await this.messageEmitter.emitSlashCommandOutput(rendered);
5207
5392
  this.config.getChatRecordingService()?.recordSlashCommand({
5208
5393
  phase: "result",
5209
5394
  rawCommand: originalPrompt.filter((b) => b.type === "text").map((b) => b.type === "text" ? b.text : "").join(" "),
@@ -5219,7 +5404,7 @@ ${this.pendingWorktreeNotice}
5219
5404
  if (msg.messageType === "error") {
5220
5405
  throw new Error(msg.content || "Slash command failed.");
5221
5406
  }
5222
- await this.messageEmitter.emitAgentMessage(
5407
+ await this.messageEmitter.emitSlashCommandOutput(
5223
5408
  (msg.content || "").replace(/\n/g, " \n")
5224
5409
  );
5225
5410
  chunks.push(msg.content || "");
@@ -5242,7 +5427,8 @@ ${this.pendingWorktreeNotice}
5242
5427
  case "no_command":
5243
5428
  return this.#resolvePrompt(
5244
5429
  originalPrompt,
5245
- new AbortController().signal
5430
+ new AbortController().signal,
5431
+ { promptLast: true }
5246
5432
  );
5247
5433
  default: {
5248
5434
  const _exhaustive = result;
@@ -5251,7 +5437,7 @@ ${this.pendingWorktreeNotice}
5251
5437
  }
5252
5438
  }
5253
5439
  }
5254
- async #resolvePrompt(message, abortSignal) {
5440
+ async #resolvePrompt(message, abortSignal, options = {}) {
5255
5441
  const FILE_URI_SCHEME = "file://";
5256
5442
  const embeddedContext = [];
5257
5443
  const extensionMentions = /* @__PURE__ */ new Map();
@@ -5341,7 +5527,7 @@ ${this.pendingWorktreeNotice}
5341
5527
  initialQueryText += `@${pathName}`;
5342
5528
  }
5343
5529
  }
5344
- const processedQueryParts = [];
5530
+ const referenceParts = [...extensionParts, ...mcpServerParts];
5345
5531
  if (pathSpecsToRead.length > 0) {
5346
5532
  const readResult = await readManyFiles(this.config, {
5347
5533
  paths: pathSpecsToRead,
@@ -5349,26 +5535,19 @@ ${this.pendingWorktreeNotice}
5349
5535
  ...preserveUnsupportedImageForBridge ? { preserveUnsupportedImageForBridge } : {}
5350
5536
  });
5351
5537
  const contentParts = Array.isArray(readResult.contentParts) ? readResult.contentParts : [readResult.contentParts];
5352
- processedQueryParts.push({ text: initialQueryText });
5353
- processedQueryParts.push(...extensionParts);
5354
- processedQueryParts.push(...mcpServerParts);
5355
5538
  for (const part of contentParts) {
5356
5539
  if (typeof part === "string") {
5357
- processedQueryParts.push({ text: part });
5540
+ referenceParts.push({ text: part });
5358
5541
  } else if (preserveUnsupportedImageForBridge && hasImageParts([part])) {
5359
- processedQueryParts.push(part);
5542
+ referenceParts.push(part);
5360
5543
  } else {
5361
- processedQueryParts.push(clampInlineMediaPart(part));
5544
+ referenceParts.push(clampInlineMediaPart(part));
5362
5545
  }
5363
5546
  }
5364
- } else {
5365
- processedQueryParts.push({ text: initialQueryText.trim() });
5366
- processedQueryParts.push(...extensionParts);
5367
- processedQueryParts.push(...mcpServerParts);
5368
5547
  }
5369
5548
  for (const contextPart of embeddedContext) {
5370
5549
  if ("text" in contextPart && contextPart.text) {
5371
- processedQueryParts.push({
5550
+ referenceParts.push({
5372
5551
  text: `File: ${contextPart.uri}
5373
5552
  ${contextPart.text}`
5374
5553
  });
@@ -5380,11 +5559,14 @@ ${contextPart.text}`
5380
5559
  data: contextPart.blob
5381
5560
  }
5382
5561
  };
5383
- processedQueryParts.push(
5562
+ referenceParts.push(
5384
5563
  preserveUnsupportedImageForBridge && hasImageParts([inlinePart]) ? inlinePart : clampInlineMediaPart(inlinePart)
5385
5564
  );
5386
5565
  }
5387
5566
  }
5567
+ const promptText = pathSpecsToRead.length > 0 ? initialQueryText : initialQueryText.trim();
5568
+ const promptPart = { text: promptText };
5569
+ const processedQueryParts = options.promptLast ? [...referenceParts, promptPart] : [promptPart, ...referenceParts];
5388
5570
  return this.#applyBridgeConversionsIfNeeded(
5389
5571
  processedQueryParts,
5390
5572
  abortSignal
@@ -5830,132 +6012,6 @@ function isBulkLoadReplayRequest(params) {
5830
6012
  return meta?.[LOAD_REPLAY_MODE_META_KEY] === LOAD_REPLAY_BULK_MODE;
5831
6013
  }
5832
6014
  __name(isBulkLoadReplayRequest, "isBulkLoadReplayRequest");
5833
- function createReplayCumulativeUsage() {
5834
- return {
5835
- promptTokens: 0,
5836
- cachedTokens: 0,
5837
- candidateTokens: 0,
5838
- apiTimeMs: 0
5839
- };
5840
- }
5841
- __name(createReplayCumulativeUsage, "createReplayCumulativeUsage");
5842
- function copyCumulativeUsage(target, source) {
5843
- target.promptTokens = source.promptTokens;
5844
- target.cachedTokens = source.cachedTokens;
5845
- target.candidateTokens = source.candidateTokens;
5846
- target.apiTimeMs = source.apiTimeMs;
5847
- }
5848
- __name(copyCumulativeUsage, "copyCumulativeUsage");
5849
- function isCumulativeUsage(value) {
5850
- if (!isObjectRecord(value)) return false;
5851
- return typeof value["promptTokens"] === "number" && Number.isFinite(value["promptTokens"]) && typeof value["cachedTokens"] === "number" && Number.isFinite(value["cachedTokens"]) && typeof value["candidateTokens"] === "number" && Number.isFinite(value["candidateTokens"]) && typeof value["apiTimeMs"] === "number" && Number.isFinite(value["apiTimeMs"]);
5852
- }
5853
- __name(isCumulativeUsage, "isCumulativeUsage");
5854
- function isPendingReplayToolCall(value) {
5855
- if (!isObjectRecord(value)) return false;
5856
- return typeof value["callId"] === "string" && typeof value["toolName"] === "string" && (value["timestamp"] === void 0 || typeof value["timestamp"] === "string") && typeof value["recordId"] === "string";
5857
- }
5858
- __name(isPendingReplayToolCall, "isPendingReplayToolCall");
5859
- function parseTranscriptReplayState(replay) {
5860
- if (!isObjectRecord(replay)) {
5861
- return {
5862
- pendingToolCalls: [],
5863
- cumulativeUsage: createReplayCumulativeUsage()
5864
- };
5865
- }
5866
- const rawPending = replay["pendingToolCalls"];
5867
- const pendingToolCalls = Array.isArray(rawPending) ? rawPending.filter(isPendingReplayToolCall) : [];
5868
- if (Array.isArray(rawPending) && pendingToolCalls.length !== rawPending.length) {
5869
- const dropped = rawPending.length - pendingToolCalls.length;
5870
- debugLogger7.warn(
5871
- `[transcript] replay state dropped ${dropped} of ${rawPending.length} malformed pending tool calls`
5872
- );
5873
- }
5874
- const cumulativeUsage = isCumulativeUsage(replay["cumulativeUsage"]) ? { ...replay["cumulativeUsage"] } : createReplayCumulativeUsage();
5875
- return { pendingToolCalls, cumulativeUsage };
5876
- }
5877
- __name(parseTranscriptReplayState, "parseTranscriptReplayState");
5878
- async function collectHistoryReplayUpdates({
5879
- sessionId,
5880
- config,
5881
- records,
5882
- gaps,
5883
- cumulativeUsage
5884
- }) {
5885
- const updates = [];
5886
- const replayContext = {
5887
- sessionId,
5888
- config,
5889
- sendUpdate: /* @__PURE__ */ __name(async (update) => {
5890
- updates.push(update);
5891
- }, "sendUpdate"),
5892
- cumulativeUsage
5893
- };
5894
- try {
5895
- await new HistoryReplayer(replayContext).replay(records, gaps);
5896
- } catch (error) {
5897
- const replayError = error instanceof Error ? error.message : String(error);
5898
- debugLogger7.warn(
5899
- "[historyReplay] History replay failed for session %s (partial updates: %d):",
5900
- sessionId,
5901
- updates.length,
5902
- error
5903
- );
5904
- return { updates, replayError };
5905
- }
5906
- return { updates };
5907
- }
5908
- __name(collectHistoryReplayUpdates, "collectHistoryReplayUpdates");
5909
- async function collectHistoryReplayUpdatesPage({
5910
- sessionId,
5911
- config,
5912
- records,
5913
- gaps,
5914
- cumulativeUsage,
5915
- pendingToolCalls,
5916
- finalizeDangling
5917
- }) {
5918
- const updates = [];
5919
- const replayContext = {
5920
- sessionId,
5921
- config,
5922
- sendUpdate: /* @__PURE__ */ __name(async (update) => {
5923
- updates.push(update);
5924
- }, "sendUpdate"),
5925
- cumulativeUsage
5926
- };
5927
- const replayer = new HistoryReplayer(replayContext);
5928
- try {
5929
- const state = await replayer.replayPage(records, {
5930
- pendingToolCalls,
5931
- finalizeDangling,
5932
- gaps
5933
- });
5934
- return { updates, pendingToolCalls: state.pendingToolCalls };
5935
- } catch (error) {
5936
- debugLogger7.warn(
5937
- "[historyReplay] Paged history replay failed for session %s (partial updates: %d):",
5938
- sessionId,
5939
- updates.length,
5940
- error
5941
- );
5942
- return {
5943
- updates,
5944
- pendingToolCalls: replayer.getPendingToolCalls(),
5945
- replayError: "Replay conversion failed for this page"
5946
- };
5947
- }
5948
- }
5949
- __name(collectHistoryReplayUpdatesPage, "collectHistoryReplayUpdatesPage");
5950
- function liftSessionUpdateTimestamps(updates) {
5951
- return updates.map((update) => {
5952
- const record = update;
5953
- const meta = record["_meta"];
5954
- const timestamp = isObjectRecord(meta) ? meta["timestamp"] : void 0;
5955
- return typeof timestamp === "number" || typeof timestamp === "string" ? { ...record, timestamp } : update;
5956
- });
5957
- }
5958
- __name(liftSessionUpdateTimestamps, "liftSessionUpdateTimestamps");
5959
6015
  function createHiddenWorkspaceMemoryConfig(config) {
5960
6016
  return new Proxy(config, {
5961
6017
  get(target, prop) {
@@ -7809,7 +7865,7 @@ var QwenAgent = class {
7809
7865
  async initialize(args) {
7810
7866
  this.clientCapabilities = args.clientCapabilities;
7811
7867
  const authMethods = buildAuthMethods();
7812
- const version = "0.19.9";
7868
+ const version = "0.19.10-nightly.20260715.c538bd70d";
7813
7869
  return {
7814
7870
  protocolVersion: PROTOCOL_VERSION,
7815
7871
  agentInfo: {
@@ -7933,9 +7989,10 @@ var QwenAgent = class {
7933
7989
  config,
7934
7990
  records,
7935
7991
  gaps: sessionData?.historyGaps,
7936
- cumulativeUsage: replayUsage
7992
+ cumulativeUsage: replayUsage,
7993
+ logger: debugLogger7
7937
7994
  });
7938
- replayUpdates = liftSessionUpdateTimestamps(replay.updates);
7995
+ replayUpdates = replay.updates;
7939
7996
  copyCumulativeUsage(session.cumulativeUsage, replayUsage);
7940
7997
  if (replay.replayError !== void 0) {
7941
7998
  replayEnvelope = {
@@ -9191,6 +9248,19 @@ var QwenAgent = class {
9191
9248
  }
9192
9249
  return session;
9193
9250
  }
9251
+ async refreshLiveSessionMemoryInstructions(logContext) {
9252
+ const sessions = [...this.sessions.values()];
9253
+ if (sessions.length === 0) {
9254
+ return;
9255
+ }
9256
+ await Promise.all(
9257
+ sessions.map(
9258
+ (session) => refreshMemoryInstruction(session.getConfig(), {
9259
+ logContext: `${logContext} session ${session.getId()}`
9260
+ })
9261
+ )
9262
+ );
9263
+ }
9194
9264
  buildSessionContextStatus(sessionId) {
9195
9265
  const session = this.sessionOrThrow(sessionId);
9196
9266
  const config = session.getConfig();
@@ -10041,43 +10111,25 @@ var QwenAgent = class {
10041
10111
  ...typeof rawLimit === "number" ? { limit: rawLimit } : {}
10042
10112
  });
10043
10113
  const config = await this.getTranscriptReplayConfig(cwd, settings);
10044
- const replayState = parseTranscriptReplayState(page.replay);
10045
- const replay = await collectHistoryReplayUpdatesPage({
10114
+ const replay = await replayTranscriptRecordPage({
10046
10115
  sessionId,
10116
+ page,
10047
10117
  config,
10048
- records: page.records,
10049
- gaps: page.gaps,
10050
- cumulativeUsage: replayState.cumulativeUsage,
10051
- pendingToolCalls: replayState.pendingToolCalls,
10052
- finalizeDangling: !page.hasMore
10118
+ encodeCursor: /* @__PURE__ */ __name((state) => encodeSessionTranscriptCursor(state, cwd), "encodeCursor"),
10119
+ logger: debugLogger7
10053
10120
  });
10054
- const updates = liftSessionUpdateTimestamps(replay.updates);
10055
- let nextCursor;
10056
- if (page.nextCursorState && replay.replayError === void 0) {
10057
- const nextCursorState = {
10058
- ...page.nextCursorState,
10059
- replay: {
10060
- pendingToolCalls: replay.pendingToolCalls,
10061
- // Preserved for future replay emitters that need cumulative
10062
- // usage across page boundaries; current frames expose per-record
10063
- // usage metadata only.
10064
- cumulativeUsage: replayState.cumulativeUsage
10065
- }
10066
- };
10067
- nextCursor = encodeSessionTranscriptCursor(nextCursorState, cwd);
10068
- }
10069
10121
  return {
10070
10122
  v: 1,
10071
10123
  sessionId,
10072
- events: updates.map((update) => ({
10124
+ events: replay.updates.map((update) => ({
10073
10125
  v: 1,
10074
10126
  type: "session_update",
10075
10127
  data: update
10076
10128
  })),
10077
- ...nextCursor !== void 0 ? { nextCursor } : {},
10078
- hasMore: page.hasMore,
10079
- startTime: page.startTime,
10080
- lastUpdated: page.lastUpdated,
10129
+ ...replay.nextCursor !== void 0 ? { nextCursor: replay.nextCursor } : {},
10130
+ hasMore: replay.hasMore,
10131
+ startTime: replay.startTime,
10132
+ lastUpdated: replay.lastUpdated,
10081
10133
  ...replay.replayError !== void 0 ? { partial: true, replayError: replay.replayError } : {}
10082
10134
  };
10083
10135
  });
@@ -10228,6 +10280,11 @@ var QwenAgent = class {
10228
10280
  contextMode,
10229
10281
  abortSignal: childSignal
10230
10282
  });
10283
+ if (result.filesTouched.length > 0) {
10284
+ await this.refreshLiveSessionMemoryInstructions(
10285
+ "workspace memory remember"
10286
+ );
10287
+ }
10231
10288
  return result;
10232
10289
  } catch (err) {
10233
10290
  if (err instanceof RequestError) {
@@ -10806,8 +10863,7 @@ var QwenAgent = class {
10806
10863
  const recording = session.getConfig().getChatRecordingService();
10807
10864
  let ok = false;
10808
10865
  if (recording) {
10809
- ok = recording.recordCustomTitle(displayName, source);
10810
- await recording.flush();
10866
+ ok = await recording.recordCustomTitle(displayName, source);
10811
10867
  }
10812
10868
  return { sessionId, displayName, titleSource: source, persisted: ok };
10813
10869
  }
@@ -11506,28 +11562,33 @@ ${outputText}
11506
11562
  case SERVE_CONTROL_EXT_METHODS.workspaceExtensionsRefresh: {
11507
11563
  const sessionId = params["sessionId"];
11508
11564
  const session = this.sessionOrThrow(sessionId);
11509
- const extensionManager = session.getConfig().getExtensionManager();
11510
- const skillManager = session.getConfig().getSkillManager();
11511
- await Promise.all([
11512
- extensionManager.refreshCache().catch((err) => {
11513
- debugLogger7.warn(
11514
- `Extension refresh failed for session ${sessionId}: ${err instanceof Error ? err.message : String(err)}`
11515
- );
11516
- }),
11517
- skillManager?.refreshCache().catch((err) => {
11518
- debugLogger7.warn(
11519
- `Skill refresh failed after extension refresh for session ${sessionId}: ${err instanceof Error ? err.message : String(err)}`
11520
- );
11521
- })
11522
- ]);
11523
- try {
11524
- await extensionManager.refreshTools();
11525
- } catch (err) {
11526
- debugLogger7.warn(
11527
- `Extension tool refresh failed for session ${sessionId}: ${err instanceof Error ? err.message : String(err)}`
11565
+ const config = session.getConfig();
11566
+ const extensionManager = config.getExtensionManager();
11567
+ const errors = [];
11568
+ const runRefresh = /* @__PURE__ */ __name(async (refresh) => {
11569
+ try {
11570
+ await refresh();
11571
+ } catch (error) {
11572
+ errors.push(error);
11573
+ }
11574
+ }, "runRefresh");
11575
+ await runRefresh(async () => await extensionManager.refreshCache());
11576
+ await runRefresh(async () => await extensionManager.refreshTools());
11577
+ await runRefresh(
11578
+ async () => await config.getGeminiClient()?.refreshSystemInstruction()
11579
+ );
11580
+ await runRefresh(
11581
+ async () => await session.sendAvailableCommandsUpdate()
11582
+ );
11583
+ if (errors.length > 0) {
11584
+ const details = errors.map(
11585
+ (error) => error instanceof Error ? error.message : String(error)
11586
+ ).join("; ");
11587
+ throw new AggregateError(
11588
+ errors,
11589
+ `Extension runtime refresh failed: ${details}`
11528
11590
  );
11529
11591
  }
11530
- await session.sendAvailableCommandsUpdate();
11531
11592
  return { ok: true };
11532
11593
  }
11533
11594
  case "deleteSession": {
@@ -11571,8 +11632,7 @@ ${outputText}
11571
11632
  }
11572
11633
  const liveRecording = this.sessions.get(sessionId)?.getConfig().getChatRecordingService();
11573
11634
  if (liveRecording) {
11574
- const ok = liveRecording.recordCustomTitle(title, "manual");
11575
- await liveRecording.flush();
11635
+ const ok = await liveRecording.recordCustomTitle(title, "manual");
11576
11636
  return { success: ok };
11577
11637
  }
11578
11638
  const success = await runWithAcpRuntimeOutputDir(
@@ -11706,9 +11766,10 @@ ${outputText}
11706
11766
  };
11707
11767
  }
11708
11768
  } catch (err) {
11709
- artifactSnapshotUnavailable = err instanceof Error ? err.message : String(err);
11769
+ const reason = err instanceof Error ? err.message : String(err);
11770
+ artifactSnapshotUnavailable = "artifact snapshot unavailable after rewind";
11710
11771
  debugLogger7.warn(
11711
- `[ACP] Failed to rebuild artifact snapshot after rewind for session=${sessionId}: ${artifactSnapshotUnavailable}`
11772
+ `[ACP] Failed to rebuild artifact snapshot after rewind for session=${sessionId}: ${reason}`
11712
11773
  );
11713
11774
  }
11714
11775
  return {
@@ -11745,10 +11806,11 @@ ${outputText}
11745
11806
  config: this.config,
11746
11807
  records: sessionData.conversation.messages,
11747
11808
  gaps: sessionData.historyGaps,
11748
- cumulativeUsage: createReplayCumulativeUsage()
11809
+ cumulativeUsage: createReplayCumulativeUsage(),
11810
+ logger: debugLogger7
11749
11811
  });
11750
11812
  return {
11751
- updates: liftSessionUpdateTimestamps(replay.updates),
11813
+ updates: replay.updates,
11752
11814
  startTime: sessionData.conversation.startTime,
11753
11815
  lastUpdated: sessionData.conversation.lastUpdated,
11754
11816
  // Signal to the client that replay aborted partway so it doesn't
@@ -12166,6 +12228,29 @@ ${outputText}
12166
12228
  sessionsSkipped: skipped
12167
12229
  };
12168
12230
  }
12231
+ case SERVE_CONTROL_EXT_METHODS.workspaceSkillsRefresh: {
12232
+ this.settings.reloadScopeFromDisk("Workspace" /* Workspace */);
12233
+ const sessions = this.getActiveSessions();
12234
+ const results = await Promise.allSettled(
12235
+ sessions.map((session) => session.refreshSkillsFromSettings())
12236
+ );
12237
+ for (let i = 0; i < results.length; i++) {
12238
+ if (results[i].status === "rejected") {
12239
+ const reason = results[i].reason;
12240
+ debugLogger7.warn(
12241
+ `Session ${sessions[i].getId()} skill refresh failed: ${reason}`
12242
+ );
12243
+ }
12244
+ }
12245
+ return {
12246
+ sessionsRefreshed: results.filter(
12247
+ (result) => result.status === "fulfilled"
12248
+ ).length,
12249
+ sessionsFailed: results.filter(
12250
+ (result) => result.status === "rejected"
12251
+ ).length
12252
+ };
12253
+ }
12169
12254
  default:
12170
12255
  throw RequestError.methodNotFound(method);
12171
12256
  }