@qwen-code/qwen-code 0.19.9 → 0.19.10

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 +7 -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-67ODZ4SZ.js} +31 -31
  13. package/chunks/{StandaloneSessionPicker-WS4GXYOG.js → StandaloneSessionPicker-SIPBQT5Z.js} +51 -49
  14. package/chunks/{acpAgent-5FWSOZL5.js → acpAgent-VPZJXLFX.js} +528 -478
  15. package/chunks/{agent-HOLHB3RT.js → agent-Z7NWL6XL.js} +26 -26
  16. package/chunks/{agent-headless-SXL6H56A.js → agent-headless-73HZ6ROQ.js} +26 -26
  17. package/chunks/{anthropicContentGenerator-L73TO3DB.js → anthropicContentGenerator-56U3YCP2.js} +5 -5
  18. package/chunks/{artifact-tool-U7IRTLIV.js → artifact-tool-BWZZJ42H.js} +2 -2
  19. package/chunks/{askUserQuestion-2DLUUZZG.js → askUserQuestion-WU3S5A5T.js} +2 -2
  20. package/chunks/{bridge-BCJQ7BBB.js → bridge-XFKW6S7Q.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-5RWKSGEU.js +418 -0
  24. package/chunks/channel-worker-supervisor-PCDAZN4D.js +20 -0
  25. package/chunks/{chunk-LXNEJD34.js → chunk-2FO5GFKZ.js} +1 -1
  26. package/chunks/{chunk-B5ORX3FG.js → chunk-2UUAIFQO.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-E2IY465S.js → chunk-3XJFUTNM.js} +10 -10
  31. package/chunks/{chunk-JZETEN3Z.js → chunk-422XAKCK.js} +3 -3
  32. package/chunks/{chunk-N3EMS75V.js → chunk-4FMG7EDJ.js} +1268 -1233
  33. package/chunks/{chunk-HKMAENAO.js → chunk-4YWLED2A.js} +8 -6
  34. package/chunks/{chunk-SCGXUJBT.js → chunk-5EBKKSBX.js} +3 -3
  35. package/chunks/chunk-5HBA2Z7V.js +28 -0
  36. package/chunks/{chunk-XYQSMABS.js → chunk-5LROA5W4.js} +4 -4
  37. package/chunks/{chunk-ZJE7NSL3.js → chunk-5M6IDOMF.js} +34 -97
  38. package/chunks/{chunk-VA4KQY6V.js → chunk-65N2J6V2.js} +3 -3
  39. package/chunks/{chunk-4C5BQ2D2.js → chunk-6GETGQWP.js} +71 -12
  40. package/chunks/{chunk-PVZM22CK.js → chunk-6GKMJPOC.js} +5 -5
  41. package/chunks/{chunk-W2UIXQDL.js → chunk-6OATMEYN.js} +1 -1
  42. package/chunks/{chunk-GZRTYZ2R.js → chunk-6W6DI34P.js} +154 -1
  43. package/chunks/{chunk-EMDMPBJ4.js → chunk-7L4XBYVW.js} +3 -3
  44. package/chunks/{chunk-EAXLGSFP.js → chunk-7MJAZMXK.js} +8 -8
  45. package/chunks/{chunk-K434OPES.js → chunk-7NAWTFVY.js} +3 -3
  46. package/chunks/{chunk-J4TSQ5EQ.js → chunk-7NFB7LBQ.js} +8 -1
  47. package/chunks/{chunk-5SFOMFG4.js → chunk-7R4DPSRA.js} +36 -2
  48. package/chunks/{chunk-P67PFTUT.js → chunk-AAR5SGMD.js} +4 -4
  49. package/chunks/{chunk-RDJSGHZE.js → chunk-ALGGS7UH.js} +1 -38
  50. package/chunks/{chunk-GWHYEOV2.js → chunk-ARKANCNX.js} +2 -1
  51. package/chunks/{chunk-D2GFWEXB.js → chunk-B5I2IIWY.js} +6 -6
  52. package/chunks/{chunk-524RQP4Q.js → chunk-B7NUUEXC.js} +10 -4
  53. package/chunks/{chunk-CUMMSHH6.js → chunk-BBNVFRGD.js} +1 -1
  54. package/chunks/{chunk-5HOMWMCL.js → chunk-CEW4HDPK.js} +4166 -1338
  55. package/chunks/chunk-CJFNEBYB.js +91 -0
  56. package/chunks/{chunk-VWPVHAMO.js → chunk-CUUXANEQ.js} +5 -1
  57. package/chunks/{chunk-GWLSNBG4.js → chunk-DK33QJ3V.js} +30 -26
  58. package/chunks/{chunk-HPDUL5MF.js → chunk-DPFBNG72.js} +1 -1
  59. package/chunks/{chunk-KKNMOEZH.js → chunk-E2UVIFI2.js} +185 -398
  60. package/chunks/{chunk-MC23XKFE.js → chunk-E67NFMF4.js} +3 -3
  61. package/chunks/{chunk-OQ4DRIOA.js → chunk-EQY6POVO.js} +2 -2
  62. package/chunks/{chunk-XUOOWUZS.js → chunk-F7NXQH4Y.js} +1 -1
  63. package/chunks/{chunk-YLV3XXFB.js → chunk-FBU7WRZI.js} +17 -1
  64. package/chunks/{chunk-LK7KUE55.js → chunk-FSA7ERJ2.js} +1 -1
  65. package/chunks/{chunk-PDZ7MBDG.js → chunk-FXMC7SL2.js} +27 -6
  66. package/chunks/{chunk-SJHDYNHF.js → chunk-GDQQRV43.js} +3 -3
  67. package/chunks/{chunk-34MW4KTI.js → chunk-GGJII3FM.js} +2 -2
  68. package/chunks/{chunk-3BTRNWWD.js → chunk-GOXKNSDZ.js} +1 -64
  69. package/chunks/chunk-GYTKQYDB.js +23 -0
  70. package/chunks/{chunk-HVY356M2.js → chunk-H3FQOPPS.js} +3 -3
  71. package/chunks/{chunk-YVEDCAUE.js → chunk-HGT6JR3U.js} +19 -0
  72. package/chunks/{chunk-WQUQVGTF.js → chunk-HHEFI4RP.js} +183 -96
  73. package/chunks/chunk-IDS7MSUP.js +74 -0
  74. package/chunks/{chunk-6PESIEKJ.js → chunk-JSJFKYWT.js} +68 -6
  75. package/chunks/{chunk-CNEIYWSA.js → chunk-K4PZ5F5T.js} +5 -5
  76. package/chunks/{chunk-NVYTCB5Z.js → chunk-K7CRWKOE.js} +14534 -13980
  77. package/chunks/{chunk-ORBGV7NJ.js → chunk-KKRTYONM.js} +6 -4
  78. package/chunks/{chunk-IAVB3HM3.js → chunk-KSO42X3Z.js} +13 -0
  79. package/chunks/chunk-L37RC7MQ.js +493 -0
  80. package/chunks/{chunk-4QLQE5WJ.js → chunk-L5U3ELZX.js} +1 -1
  81. package/chunks/{chunk-3G7CIHVV.js → chunk-L62SEJWY.js} +4 -4
  82. package/chunks/{chunk-EGYZ275M.js → chunk-LNUXFLLJ.js} +4 -4
  83. package/chunks/{chunk-4ZVWQHEQ.js → chunk-LQIDP6K5.js} +1 -1
  84. package/chunks/{chunk-VTU57BWZ.js → chunk-LQU7EVFA.js} +1 -1
  85. package/chunks/{chunk-B4G2WOFA.js → chunk-LTNI523B.js} +2 -2
  86. package/chunks/{chunk-DC5Z3DU6.js → chunk-LXLTBIDP.js} +43 -6
  87. package/chunks/{chunk-KHUQZZJ6.js → chunk-MO7O5722.js} +370 -36
  88. package/chunks/chunk-MR3PXB6E.js +48 -0
  89. package/chunks/{chunk-5VXNZWGF.js → chunk-N6FXRR6P.js} +1 -1
  90. package/chunks/{chunk-WL4L7EZH.js → chunk-OA4JVLSA.js} +27 -1
  91. package/chunks/{chunk-TO6QE22P.js → chunk-OATTJGPJ.js} +26 -22
  92. package/chunks/{chunk-X6TJ3YZV.js → chunk-OFEVHGVU.js} +159 -57
  93. package/chunks/{chunk-X4NKFGFJ.js → chunk-OJAMDVF5.js} +0 -15
  94. package/chunks/{chunk-BZIFY5TF.js → chunk-OKAIGAYW.js} +3 -3
  95. package/chunks/{chunk-3VAGG5T5.js → chunk-P6LART6G.js} +116 -15
  96. package/chunks/{chunk-3SJSQXNS.js → chunk-PEJWA3QQ.js} +12 -8
  97. package/chunks/{chunk-BAPGSC7U.js → chunk-Q5GLXH5Q.js} +23 -9
  98. package/chunks/{chunk-MXL5UP4X.js → chunk-Q6TUALBE.js} +1 -1
  99. package/chunks/{chunk-QYMQSECS.js → chunk-QAW7PIHT.js} +2 -2
  100. package/chunks/{chunk-LUODI7WD.js → chunk-RCEEXIOO.js} +6 -4
  101. package/chunks/{chunk-YAUFFXDS.js → chunk-RDRVMDWV.js} +12 -11
  102. package/chunks/{chunk-CEA3E3JB.js → chunk-SPJQO2CE.js} +2 -2
  103. package/chunks/{chunk-U2NNEY4R.js → chunk-SPUYQB4T.js} +1 -1
  104. package/chunks/{chunk-34Z3U5RQ.js → chunk-SXU3KKNI.js} +514 -114
  105. package/chunks/{chunk-ECNYL4AA.js → chunk-TISZXPAX.js} +1 -1
  106. package/chunks/{chunk-JSG7ZSBC.js → chunk-TQBODCFD.js} +1 -1
  107. package/chunks/{chunk-AKIVHSJR.js → chunk-TTUO4DNG.js} +111 -93
  108. package/chunks/chunk-TV6K2FB4.js +224 -0
  109. package/chunks/{chunk-4GORAUCN.js → chunk-TXY2C3D2.js} +1 -1
  110. package/chunks/{chunk-5XUCZNSY.js → chunk-TYLOFD2U.js} +1 -1
  111. package/chunks/{chunk-CLFKOZEK.js → chunk-UFOKA4PR.js} +1 -1
  112. package/chunks/{channel-worker-supervisor-WSOAAYUO.js → chunk-URU5UEK6.js} +67 -35
  113. package/chunks/{chunk-D5SKC4YG.js → chunk-V7EQTZYR.js} +41 -13
  114. package/chunks/{chunk-L6P4KPHR.js → chunk-VBRRNQB7.js} +59 -39
  115. package/chunks/{chunk-BMGVRZN4.js → chunk-W34A5MJH.js} +1 -1
  116. package/chunks/{chunk-PODM4SZ4.js → chunk-WDW64OW3.js} +5 -5
  117. package/chunks/{chunk-W3JHSWRP.js → chunk-WDWJ4OQJ.js} +4 -4
  118. package/chunks/{chunk-Q4YQW46J.js → chunk-WIASPMLX.js} +31 -17
  119. package/chunks/{chunk-ZLXQN2QS.js → chunk-WIEO4CWB.js} +1 -1
  120. package/chunks/{chunk-A3XKDTSH.js → chunk-WLXYAKV7.js} +4 -4
  121. package/chunks/{chunk-Q6I5QHMH.js → chunk-WTSXKLG5.js} +1 -1
  122. package/chunks/{chunk-J3JA76CF.js → chunk-WX6SD4IQ.js} +1 -1
  123. package/chunks/{chunk-77XJ3SWN.js → chunk-X362TMXZ.js} +5 -5
  124. package/chunks/{chunk-CCDMCZPP.js → chunk-XLIRF7IK.js} +1 -1
  125. package/chunks/{chunk-AURZZYMD.js → chunk-XXJKGHZV.js} +4 -4
  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-3AHXV67U.js → chunk-YU56QGXX.js} +1 -1
  129. package/chunks/{chunk-5U27BZ72.js → chunk-YX4LLZ3D.js} +187 -75
  130. package/chunks/{chunk-ATAKVRIF.js → chunk-YYPXHMWO.js} +7 -7
  131. package/chunks/{chunk-XLA62MYB.js → chunk-ZKMGAFYV.js} +2 -2
  132. package/chunks/{chunk-UOZWKTQG.js → chunk-ZPAHLFZU.js} +2 -2
  133. package/chunks/{chunk-7PU4FYLG.js → chunk-ZQTZXVHP.js} +4 -4
  134. package/chunks/chunk-ZRKBI3DP.js +34 -0
  135. package/chunks/{computer-use-HM37RX6A.js → computer-use-IYTX45WA.js} +26 -26
  136. package/chunks/{config-utils-NV2SVGPB.js → config-utils-CFT33LTP.js} +3 -2
  137. package/chunks/{contextCommand-OF5SFGH2.js → contextCommand-272V77WU.js} +28 -28
  138. package/chunks/{create-sub-session-KPRT7ECJ.js → create-sub-session-CBJMQLYP.js} +26 -26
  139. package/chunks/{create-sub-session-INX7TXJI.js → create-sub-session-WNX2OQVX.js} +2 -2
  140. package/chunks/{cron-create-AMBKGZX6.js → cron-create-36TIFKRT.js} +4 -4
  141. package/chunks/{cron-delete-LRU4OJYG.js → cron-delete-OQD3WULU.js} +4 -4
  142. package/chunks/{cron-list-WVP2JXER.js → cron-list-4533T2FH.js} +4 -4
  143. package/chunks/{daemon-ARHTSTXP.js → daemon-RNGFPMAB.js} +575 -58
  144. package/chunks/{daemon-status-provider-B2UTZUJ2.js → daemon-status-provider-L4STG5VO.js} +36 -36
  145. package/chunks/{de-EBJN3OVN.js → de-2VCDRDGU.js} +4 -1
  146. package/chunks/{dist-VHV4EVHG.js → dist-3V3ZV6ML.js} +1 -1
  147. package/chunks/{dist-XKU3ABM5.js → dist-ERCPDVA6.js} +1 -1
  148. package/chunks/{dist-PNVLTKTL.js → dist-HNN7DR2L.js} +158 -4
  149. package/chunks/{dist-WKPOYU7O.js → dist-JZE7F6YR.js} +1 -1
  150. package/chunks/{dist-QYCAEZIT.js → dist-MOEC47TR.js} +5 -1
  151. package/chunks/{dist-R7LN5AZE.js → dist-PHEPJLXD.js} +2 -2
  152. package/chunks/{earlyInputCapture-3VTHRC4C.js → earlyInputCapture-EN4BRREQ.js} +27 -27
  153. package/chunks/{edit-VNI4NJ73.js → edit-OMAF2QDR.js} +27 -27
  154. package/chunks/{en-5A6LA7RK.js → en-NJCA3TAA.js} +5 -1
  155. package/chunks/{enter-worktree-IYYBKPZT.js → enter-worktree-BBZX52HG.js} +26 -26
  156. package/chunks/{enterPlanMode-GMC5FD5A.js → enterPlanMode-5NNFMBUY.js} +42 -27
  157. package/chunks/{environment-5HSSRMJ7.js → environment-7TEWMJYN.js} +30 -29
  158. package/chunks/{errors-HMFCJJ7P.js → errors-I4VKVX3F.js} +28 -28
  159. package/chunks/{exit-worktree-6BHCMP5G.js → exit-worktree-FUWRJI33.js} +26 -26
  160. package/chunks/{exitPlanMode-CJW7G74W.js → exitPlanMode-IHCJ5EEI.js} +26 -26
  161. package/chunks/{fast-path-FRDMDVHG.js → fast-path-ZA57TOH4.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-UOAKVXBG.js} +139 -76
  165. package/chunks/{geminiContentGenerator-J7YNZDYP.js → geminiContentGenerator-G6UCE6MW.js} +4 -4
  166. package/chunks/{glob-BRCSGFOT.js → glob-4GJQ2UFF.js} +28 -27
  167. package/chunks/{grep-EE2DUOSY.js → grep-5QSYXF2E.js} +26 -26
  168. package/chunks/{handleAutoUpdate-5NWTLR67.js → handleAutoUpdate-ULHNWL6R.js} +30 -30
  169. package/chunks/{i18n-BASPENNQ.js → i18n-CYDUTF6F.js} +27 -27
  170. package/chunks/initializer-NRFKUGIO.js +73 -0
  171. package/chunks/{installationInfo-W6V4DT7W.js → installationInfo-WELKRHHE.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-JVDXEG2E.js +76 -0
  175. package/chunks/loadedSettingsAdapter-WAM4VUTG.js +70 -0
  176. package/chunks/{loop-wakeup-WX7BLWWP.js → loop-wakeup-MVUKDVCP.js} +5 -5
  177. package/chunks/{ls-ZB2BDP6T.js → ls-RXNIAQDE.js} +4 -4
  178. package/chunks/{lsp-V5DN4YUJ.js → lsp-HB5LM5IL.js} +2 -2
  179. package/chunks/mcp-YHOZN3ZM.js +70 -0
  180. package/chunks/{monitor-X5Z3H4FY.js → monitor-R7XZPJHQ.js} +26 -26
  181. package/chunks/nonInteractiveCli-NSOB6D74.js +129 -0
  182. package/chunks/{notebook-edit-TRM2QIJK.js → notebook-edit-6RNKE2L2.js} +27 -27
  183. package/chunks/{openaiContentGenerator-AAYONPMF.js → openaiContentGenerator-XNS5S64I.js} +12 -12
  184. package/chunks/{pidfile-D4I4FTVA.js → pidfile-XE4RRR2P.js} +27 -27
  185. package/chunks/{pt-2C6YCSHL.js → pt-TFZO5Y6T.js} +4 -1
  186. package/chunks/{qwenContentGenerator-K3HZ2H76.js → qwenContentGenerator-APDPJ3VN.js} +28 -28
  187. package/chunks/{qwenOAuth2-PJQ27GSO.js → qwenOAuth2-LEYOU7RU.js} +5 -5
  188. package/chunks/{read-file-7SZSIZOL.js → read-file-XSUWXSR7.js} +8 -8
  189. package/chunks/{read-mcp-resource-SM5DA4RG.js → read-mcp-resource-6LRTZKXI.js} +2 -2
  190. package/chunks/{record-artifact-4XKZX3UW.js → record-artifact-PMDTY4OS.js} +2 -2
  191. package/chunks/{ripGrep-YNPFVCZP.js → ripGrep-APB3CDMU.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-NWTGPERT.js} +1232 -371
  194. package/chunks/{runtime-57WWRVHN.js → runtime-EIO3NQKR.js} +42 -37
  195. package/chunks/{scheduler-YBLGWSIL.js → scheduler-JJDZBDRN.js} +26 -26
  196. package/chunks/{send-message-F36YD6KQ.js → send-message-SR4WSXP2.js} +3 -3
  197. package/chunks/{serve-R63NK3CV.js → serve-WTIPB3EI.js} +36 -34
  198. package/chunks/{server-Z22GCAXP.js → server-NJPHQHLH.js} +5238 -1328
  199. package/chunks/{session-HKAAI7BN.js → session-O4AO7FTS.js} +298 -98
  200. package/chunks/{settings-3EYN66GK.js → settings-HQNDK7TG.js} +34 -32
  201. package/chunks/{shell-6YXINTWJ.js → shell-UIXM6PWG.js} +26 -26
  202. package/chunks/{skill-OO57P4X6.js → skill-3XMB4ULV.js} +10 -10
  203. package/chunks/{spawnChannel-JD7G4VU6.js → spawnChannel-3R632QRM.js} +28 -28
  204. package/chunks/{src-G5UPLZSZ.js → src-USZKPUOC.js} +85 -27
  205. package/chunks/{standalone-update-OB7F4JPZ.js → standalone-update-L5XW3D7K.js} +28 -28
  206. package/chunks/{startInteractiveUI-73EGLIIH.js → startInteractiveUI-CPZOL2WB.js} +730 -397
  207. package/chunks/{syntheticOutput-34H7LGA7.js → syntheticOutput-YKFNUQZD.js} +3 -3
  208. package/chunks/{task-create-FRGOEIKY.js → task-create-NUFOHU53.js} +8 -7
  209. package/chunks/{task-list-OW766BXZ.js → task-list-Z2IKQY3S.js} +6 -5
  210. package/chunks/{task-stop-SIR5SNBN.js → task-stop-KQFIVQTJ.js} +2 -2
  211. package/chunks/{task-update-YRA532MT.js → task-update-HKADXSTD.js} +8 -7
  212. package/chunks/{team-create-PECAAPXK.js → team-create-XXPRF3IQ.js} +26 -26
  213. package/chunks/{team-delete-6OSECUZC.js → team-delete-SDNTGZLG.js} +6 -5
  214. package/chunks/{team-plan-approval-L6F434RY.js → team-plan-approval-EOTTKHDW.js} +26 -26
  215. package/chunks/{theme-manager-ZG4RY6GU.js → theme-manager-P6UITO2L.js} +27 -27
  216. package/chunks/{todoWrite-YDMFEV4G.js → todoWrite-YNXB27GB.js} +4 -4
  217. package/chunks/{tool-search-THVIWAPB.js → tool-search-DDNGK2LR.js} +9 -9
  218. package/chunks/{total-session-admission-JOKNRIIA.js → total-session-admission-PL5N7DNY.js} +33 -33
  219. package/chunks/tree-sitter-YJVE2ZUK.js +2980 -0
  220. package/chunks/{trustedFolders-EOGT3UVS.js → trustedFolders-C5LMF3UR.js} +29 -28
  221. package/chunks/types-ML3TRJQ5.js +16 -0
  222. package/chunks/{updateCheck-2KYEYVSB.js → updateCheck-QTVVISH7.js} +29 -29
  223. package/chunks/{validateNonInterActiveAuth-EN6ZQSR2.js → validateNonInterActiveAuth-RY4RKBQG.js} +75 -71
  224. package/chunks/{version-3UEA6ZIR.js → version-U45RYOSD.js} +1 -1
  225. package/chunks/{web-fetch-PAAEQKBW.js → web-fetch-ZSPR3PRR.js} +5 -5
  226. package/chunks/{workflow-QCCCMYP3.js → workflow-TCIAQYOA.js} +27 -27
  227. package/chunks/workspace-providers-status-I3G2HYLY.js +73 -0
  228. package/chunks/workspace-registration-store-IH5GLZ6Y.js +27 -0
  229. package/chunks/{workspace-registry-24QFLQYH.js → workspace-registry-QEKBELIX.js} +33 -33
  230. package/chunks/workspace-service-ORKHGLP3.js +86 -0
  231. package/chunks/workspace-skills-status-D7QCNDYY.js +72 -0
  232. package/chunks/{write-file-I3MUDRIE.js → write-file-JGRQR5VM.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-CUeDlxvE.js} +1 -1
  247. package/web-shell/assets/{architectureDiagram-3BPJPVTR-B-At37J_.js → architectureDiagram-3BPJPVTR-PiUszkQA.js} +1 -1
  248. package/web-shell/assets/{blockDiagram-GPEHLZMM-B51wjcU7.js → blockDiagram-GPEHLZMM-s2wYSO7e.js} +1 -1
  249. package/web-shell/assets/{c4Diagram-AAUBKEIU-xBK7BAwN.js → c4Diagram-AAUBKEIU-DyLxZoz9.js} +1 -1
  250. package/web-shell/assets/channel-DkuJJ0qd.js +1 -0
  251. package/web-shell/assets/{chunk-2J33WTMH-xKmLg7Yr.js → chunk-2J33WTMH-Dsdai7Tk.js} +1 -1
  252. package/web-shell/assets/{chunk-4BX2VUAB-BfkdKZCM.js → chunk-4BX2VUAB-DEosOjV7.js} +1 -1
  253. package/web-shell/assets/{chunk-55IACEB6-DT713sZf.js → chunk-55IACEB6-sNsRLTXf.js} +1 -1
  254. package/web-shell/assets/{chunk-727SXJPM-CYEeAamv.js → chunk-727SXJPM-DkRNZzmh.js} +1 -1
  255. package/web-shell/assets/{chunk-AQP2D5EJ-DBN-5CFd.js → chunk-AQP2D5EJ-BrsRNpzd.js} +1 -1
  256. package/web-shell/assets/{chunk-FMBD7UC4-CGZKk4PH.js → chunk-FMBD7UC4-CI039lpl.js} +1 -1
  257. package/web-shell/assets/{chunk-ND2GUHAM-qQbC2O-y.js → chunk-ND2GUHAM-M-pkeIfu.js} +1 -1
  258. package/web-shell/assets/{chunk-QZHKN3VN-B3zeXwsX.js → chunk-QZHKN3VN-C4ckGNbH.js} +1 -1
  259. package/web-shell/assets/classDiagram-4FO5ZUOK-CwqHc0TB.js +1 -0
  260. package/web-shell/assets/classDiagram-v2-Q7XG4LA2-CwqHc0TB.js +1 -0
  261. package/web-shell/assets/{cose-bilkent-S5V4N54A-BKsl1Wvy.js → cose-bilkent-S5V4N54A-BciKUAFq.js} +1 -1
  262. package/web-shell/assets/{dagre-BM42HDAG-CuuuLiBK.js → dagre-BM42HDAG-C1nTSgU6.js} +1 -1
  263. package/web-shell/assets/{diagram-2AECGRRQ-CG4_eKiV.js → diagram-2AECGRRQ-BDPNWr1m.js} +1 -1
  264. package/web-shell/assets/{diagram-5GNKFQAL-DSFTmZB1.js → diagram-5GNKFQAL-CNFhTszL.js} +1 -1
  265. package/web-shell/assets/{diagram-KO2AKTUF-BxwlEHn8.js → diagram-KO2AKTUF-CjPa4p5a.js} +1 -1
  266. package/web-shell/assets/{diagram-LMA3HP47-BUAg-jMG.js → diagram-LMA3HP47-ZzPykSyG.js} +1 -1
  267. package/web-shell/assets/{diagram-OG6HWLK6-BFM2jlO5.js → diagram-OG6HWLK6-0UVtZ9A4.js} +1 -1
  268. package/web-shell/assets/{erDiagram-TEJ5UH35-CerbFPa2.js → erDiagram-TEJ5UH35-CajDZCat.js} +1 -1
  269. package/web-shell/assets/{flowDiagram-I6XJVG4X-BNeZz5Zz.js → flowDiagram-I6XJVG4X-BRuFBIvL.js} +1 -1
  270. package/web-shell/assets/{ganttDiagram-6RSMTGT7-CTOogLaM.js → ganttDiagram-6RSMTGT7-BevGmJqG.js} +3 -3
  271. package/web-shell/assets/{gitGraphDiagram-PVQCEYII-yxSFkXPj.js → gitGraphDiagram-PVQCEYII-DvPMpBMb.js} +1 -1
  272. package/web-shell/assets/index-Cnvv4VcI.css +5 -0
  273. package/web-shell/assets/index-D1Uyklxa.js +1088 -0
  274. package/web-shell/assets/index-DzHwQkQq.js +3 -0
  275. package/web-shell/assets/{infoDiagram-5YYISTIA-DYdAUevm.js → infoDiagram-5YYISTIA-Oixn7tA9.js} +1 -1
  276. package/web-shell/assets/{ishikawaDiagram-YF4QCWOH-CNuijZ90.js → ishikawaDiagram-YF4QCWOH-BgKpeg-j.js} +1 -1
  277. package/web-shell/assets/{journeyDiagram-JHISSGLW-BTyiuonf.js → journeyDiagram-JHISSGLW-74mwxIaA.js} +1 -1
  278. package/web-shell/assets/{kanban-definition-UN3LZRKU-DPJo0Uow.js → kanban-definition-UN3LZRKU-D4D6cEqA.js} +1 -1
  279. package/web-shell/assets/{linear-C8wKCbIC.js → linear-atZRE_L2.js} +1 -1
  280. package/web-shell/assets/{mermaid.core-BV5o7nW5.js → mermaid.core-KKudX-JC.js} +5 -5
  281. package/web-shell/assets/{mindmap-definition-RKZ34NQL-BtLcBmSt.js → mindmap-definition-RKZ34NQL-CMCej9yG.js} +1 -1
  282. package/web-shell/assets/{pieDiagram-4H26LBE5-C22J7A9Q.js → pieDiagram-4H26LBE5-nhx40X7q.js} +1 -1
  283. package/web-shell/assets/{quadrantDiagram-W4KKPZXB-DSL10wiL.js → quadrantDiagram-W4KKPZXB-CUmVcN3M.js} +1 -1
  284. package/web-shell/assets/{requirementDiagram-4Y6WPE33-feqh0UpX.js → requirementDiagram-4Y6WPE33-C_vyEwyy.js} +1 -1
  285. package/web-shell/assets/{sankeyDiagram-5OEKKPKP-Z4OVaWaZ.js → sankeyDiagram-5OEKKPKP-DU6G4VWR.js} +1 -1
  286. package/web-shell/assets/{sequenceDiagram-3UESZ5HK-DIluIcb1.js → sequenceDiagram-3UESZ5HK-DdeRR_KJ.js} +1 -1
  287. package/web-shell/assets/{stateDiagram-AJRCARHV-hlhnuoYH.js → stateDiagram-AJRCARHV-C6iCI8ps.js} +1 -1
  288. package/web-shell/assets/stateDiagram-v2-BHNVJYJU-C0_6nR6C.js +1 -0
  289. package/web-shell/assets/{timeline-definition-PNZ67QCA-Dqf_CqgL.js → timeline-definition-PNZ67QCA-B_Ea8Cb7.js} +1 -1
  290. package/web-shell/assets/{vennDiagram-CIIHVFJN-DD2QhaTX.js → vennDiagram-CIIHVFJN-BPUVZEJA.js} +1 -1
  291. package/web-shell/assets/{wardley-L42UT6IY-B2uI85U_.js → wardley-L42UT6IY-BWEj0lKY.js} +1 -1
  292. package/web-shell/assets/{wardleyDiagram-YWT4CUSO-U1aJX71g.js → wardleyDiagram-YWT4CUSO-BvDsdIQw.js} +1 -1
  293. package/web-shell/assets/{xychartDiagram-2RQKCTM6-C0ODHUee.js → xychartDiagram-2RQKCTM6-crz0QhF_.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-WIASPMLX.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-X362TMXZ.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-YX4LLZ3D.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-CEW4HDPK.js";
34
29
  import {
35
30
  getCommandSubcommandNames
36
- } from "./chunk-AURZZYMD.js";
37
- import "./chunk-JZETEN3Z.js";
31
+ } from "./chunk-XXJKGHZV.js";
32
+ import "./chunk-422XAKCK.js";
38
33
  import {
39
34
  getEffectiveSupportedModes
40
- } from "./chunk-GWLSNBG4.js";
35
+ } from "./chunk-DK33QJ3V.js";
36
+ import "./chunk-K4PZ5F5T.js";
37
+ import "./chunk-5DTTYNB7.js";
38
+ import {
39
+ collectContextData,
40
+ formatContextUsageText
41
+ } from "./chunk-B5I2IIWY.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-EQY6POVO.js";
49
+ import "./chunk-7L4XBYVW.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-6W6DI34P.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-4FMG7EDJ.js";
72
+ import "./chunk-SPUYQB4T.js";
73
+ import "./chunk-WTSXKLG5.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-WDW64OW3.js";
81
+ import "./chunk-6H67XLET.js";
82
+ import "./chunk-L62SEJWY.js";
83
+ import "./chunk-65N2J6V2.js";
84
+ import "./chunk-WDWJ4OQJ.js";
85
+ import "./chunk-E5Z2AVNV.js";
86
+ import {
87
+ formatAcpModelId,
88
+ parseAcpBaseModelId,
89
+ parseAcpModelOption,
90
+ sanitizeProviderBaseUrl
91
+ } from "./chunk-GGJII3FM.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-N6FXRR6P.js";
81
102
  import {
82
103
  MAX_AUDIO_BYTES,
83
104
  sanitizeVoiceErrorMessage,
84
105
  transcribeVoiceAudio
85
- } from "./chunk-PDZ7MBDG.js";
106
+ } from "./chunk-FXMC7SL2.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-DPFBNG72.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-Q5GLXH5Q.js";
125
+ import "./chunk-AAR5SGMD.js";
126
+ import "./chunk-57OAHC2Y.js";
127
+ import "./chunk-OATTJGPJ.js";
128
+ import "./chunk-ZRKBI3DP.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-W34A5MJH.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-CUUXANEQ.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-BBNVFRGD.js";
151
+ import "./chunk-SXU3KKNI.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-YYPXHMWO.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-6GETGQWP.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-RDRVMDWV.js";
160
175
  import {
161
176
  findEnvFiles,
162
177
  preResolveHomeEnvOverrides,
163
178
  reloadEnvironment
164
- } from "./chunk-SCGXUJBT.js";
179
+ } from "./chunk-5EBKKSBX.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-4YWLED2A.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-YU56QGXX.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-K7CRWKOE.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-E67NFMF4.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-6OATMEYN.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-TXY2C3D2.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-P6LART6G.js";
358
367
  import "./chunk-4WKAA4KS.js";
359
368
  import "./chunk-CR3C7WXL.js";
360
369
  import "./chunk-CARU2RR2.js";
@@ -362,44 +371,44 @@ 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-WX6SD4IQ.js";
368
377
  import {
369
378
  ToolConfirmationOutcome,
370
379
  ToolNames
371
- } from "./chunk-B5ORX3FG.js";
380
+ } from "./chunk-2UUAIFQO.js";
372
381
  import {
373
382
  clearCachedCredentialFile,
374
383
  qwenOAuth2Events
375
- } from "./chunk-BZIFY5TF.js";
376
- import "./chunk-UOZWKTQG.js";
384
+ } from "./chunk-OKAIGAYW.js";
385
+ import "./chunk-ZPAHLFZU.js";
377
386
  import "./chunk-JESCGQM3.js";
378
- import "./chunk-ZLXQN2QS.js";
387
+ import "./chunk-WIEO4CWB.js";
379
388
  import "./chunk-XVNQMZ2I.js";
380
389
  import {
381
390
  DEFAULT_TOKEN_LIMIT,
382
391
  tokenLimit
383
- } from "./chunk-524RQP4Q.js";
384
- import "./chunk-JSG7ZSBC.js";
392
+ } from "./chunk-B7NUUEXC.js";
393
+ import "./chunk-TQBODCFD.js";
385
394
  import "./chunk-A4UCTEB5.js";
386
395
  import "./chunk-XWRJCPHC.js";
387
396
  import "./chunk-4LD5APFL.js";
388
397
  import "./chunk-TYAMGABM.js";
389
398
  import "./chunk-FCMNKVXT.js";
390
399
  import "./chunk-DJ2GSRLV.js";
391
- import "./chunk-4ZVWQHEQ.js";
400
+ import "./chunk-LQIDP6K5.js";
392
401
  import {
393
402
  Storage,
394
403
  createDebugLogger,
395
404
  getErrorMessage,
396
405
  getErrorStatus,
397
406
  isSubpath
398
- } from "./chunk-J4TSQ5EQ.js";
399
- import "./chunk-CCDMCZPP.js";
407
+ } from "./chunk-7NFB7LBQ.js";
408
+ import "./chunk-XLIRF7IK.js";
400
409
  import {
401
410
  runExitCleanup
402
- } from "./chunk-ECNYL4AA.js";
411
+ } from "./chunk-TISZXPAX.js";
403
412
  import "./chunk-75DOP5OR.js";
404
413
  import "./chunk-DMTGGOSA.js";
405
414
  import "./chunk-YQ3U5MUC.js";
@@ -1337,7 +1346,12 @@ ${inputText}
1337
1346
  ${rewritten}
1338
1347
  ---`
1339
1348
  );
1340
- this.outputHistory.push(rewritten);
1349
+ if (this.contextTurns > 0) {
1350
+ this.outputHistory.push(rewritten);
1351
+ if (Number.isFinite(this.contextTurns) && this.outputHistory.length > this.contextTurns) {
1352
+ this.outputHistory = this.outputHistory.slice(-this.contextTurns);
1353
+ }
1354
+ }
1341
1355
  return rewritten;
1342
1356
  } catch (error) {
1343
1357
  debugLogger4.warn(
@@ -1387,6 +1401,9 @@ var MessageRewriteMiddleware = class {
1387
1401
  const content = updateRecord["content"];
1388
1402
  const text = content?.["text"] ?? "";
1389
1403
  await this.sendUpdate(update);
1404
+ if (updateType === "agent_message_chunk" && updateRecord["_meta"]?.["source"] === "slash_command") {
1405
+ return;
1406
+ }
1390
1407
  let didAccumulate = false;
1391
1408
  if (updateType === "agent_thought_chunk") {
1392
1409
  if (this.target === "thought" || this.target === "all") {
@@ -1473,9 +1490,10 @@ var MessageRewriteMiddleware = class {
1473
1490
  * Call this before session ends to ensure all rewrites are flushed.
1474
1491
  */
1475
1492
  async waitForPendingRewrites() {
1476
- if (this.pendingRewrites.length > 0) {
1477
- await Promise.allSettled(this.pendingRewrites);
1493
+ while (this.pendingRewrites.length > 0) {
1494
+ const inFlight = this.pendingRewrites;
1478
1495
  this.pendingRewrites = [];
1496
+ await Promise.allSettled(inFlight);
1479
1497
  }
1480
1498
  }
1481
1499
  };
@@ -2022,6 +2040,7 @@ var Session = class {
2022
2040
  // or session reload), which would otherwise execute orphaned cron prompts
2023
2041
  // on a session whose registries are already unregistered.
2024
2042
  disposed = false;
2043
+ unsubscribeChatRecordingFailure;
2025
2044
  // Modular components
2026
2045
  historyReplayer;
2027
2046
  toolCallEmitter;
@@ -2131,6 +2150,8 @@ var Session = class {
2131
2150
  this.config.getMonitorRegistry().setNotificationCallback(void 0);
2132
2151
  this.config.getBackgroundShellRegistry().setNotificationCallback(void 0);
2133
2152
  this.config.getChatRecordingService()?.setTitleRecordedCallback(void 0);
2153
+ this.unsubscribeChatRecordingFailure?.();
2154
+ this.unsubscribeChatRecordingFailure = void 0;
2134
2155
  this.config.setSubSessionSpawner(void 0);
2135
2156
  clearGoalTerminalObserver(this.sessionId);
2136
2157
  }
@@ -2389,16 +2410,18 @@ var Session = class {
2389
2410
  return { accepted: false, interruption: "none" };
2390
2411
  }
2391
2412
  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") {
2413
+ const recoveryPlan = buildSessionRecoveryPlanFromApiHistory({
2414
+ sessionId: this.sessionId,
2415
+ apiHistory: chat.getHistoryTailShallow?.(TURN_INTERRUPTION_HISTORY_TAIL_COUNT) ?? chat.getHistoryTail(TURN_INTERRUPTION_HISTORY_TAIL_COUNT)
2416
+ });
2417
+ if (!recoveryPlan.continuation) {
2396
2418
  return { accepted: false, interruption: "none" };
2397
2419
  }
2420
+ const interruption = recoveryPlan.kind === "interrupted_prompt" ? "interrupted_prompt" : "interrupted_turn";
2398
2421
  if (this.pendingPrompt && !this.pendingPrompt.signal.aborted) {
2399
- return { accepted: false, interruption: detection.kind };
2422
+ return { accepted: false, interruption };
2400
2423
  }
2401
- return { accepted: true, interruption: detection.kind };
2424
+ return { accepted: true, interruption };
2402
2425
  }
2403
2426
  /**
2404
2427
  * Generate a server-side follow-up suggestion for the just-completed
@@ -2522,10 +2545,11 @@ var Session = class {
2522
2545
  let strippedOrphanEntries = null;
2523
2546
  let orphanPushCountSnapshot = 0;
2524
2547
  if (isContinue) {
2525
- const detection = detectTurnInterruption(
2526
- this.#getCurrentChat().getHistory()
2527
- );
2528
- if (detection.kind === "none") {
2548
+ const recoveryPlan = buildSessionRecoveryPlanFromApiHistory({
2549
+ sessionId: this.sessionId,
2550
+ apiHistory: this.#getCurrentChat().getHistory()
2551
+ });
2552
+ if (!recoveryPlan.continuation) {
2529
2553
  debugLogger6.warn(
2530
2554
  `[Session] continue ${promptId}: no interrupted turn on re-detection, nothing to continue`
2531
2555
  );
@@ -2538,15 +2562,12 @@ var Session = class {
2538
2562
  );
2539
2563
  return { stopReason: "end_turn" };
2540
2564
  }
2541
- if (detection.kind === "interrupted_prompt") {
2565
+ if (recoveryPlan.continuation.mode === "retry_user_parts") {
2542
2566
  strippedOrphanEntries = this.#getCurrentChat().stripOrphanedUserEntriesFromHistory() ?? null;
2543
2567
  orphanPushCountSnapshot = this.#getCurrentChat().getUserContentPushCount?.() ?? 0;
2544
- continuationParts = detection.parts;
2568
+ continuationParts = recoveryPlan.continuation.parts;
2545
2569
  } else {
2546
- continuationParts = buildSyntheticToolResponseParts(
2547
- detection.danglingCalls,
2548
- ORPHAN_TOOL_USE_REPAIR_REASON
2549
- );
2570
+ continuationParts = recoveryPlan.continuation.parts;
2550
2571
  }
2551
2572
  }
2552
2573
  if (isContinue) {
@@ -2579,7 +2600,8 @@ var Session = class {
2579
2600
  } else {
2580
2601
  parts = await this.#resolvePrompt(
2581
2602
  params.prompt,
2582
- pendingSend.signal
2603
+ pendingSend.signal,
2604
+ { promptLast: true }
2583
2605
  );
2584
2606
  }
2585
2607
  const hooksEnabled = !this.config.getDisableAllHooks?.();
@@ -2656,6 +2678,9 @@ ${this.pendingWorktreeNotice}
2656
2678
  const functionCalls = [];
2657
2679
  let usageMetadata = null;
2658
2680
  const streamStartTime = Date.now();
2681
+ const messageDisplay = this.#createMessageDisplayDispatcher(
2682
+ pendingSend.signal
2683
+ );
2659
2684
  try {
2660
2685
  const sendResult = await this.#sendMessageStreamWithAutoCompression(
2661
2686
  promptId,
@@ -2686,6 +2711,9 @@ ${this.pendingWorktreeNotice}
2686
2711
  "assistant",
2687
2712
  part.thought
2688
2713
  );
2714
+ if (!part.thought) {
2715
+ messageDisplay?.addChunk(part.text);
2716
+ }
2689
2717
  }
2690
2718
  }
2691
2719
  if (resp.type === "chunk" /* CHUNK */ && resp.value.usageMetadata) {
@@ -2728,6 +2756,8 @@ ${this.pendingWorktreeNotice}
2728
2756
  );
2729
2757
  }
2730
2758
  throw error;
2759
+ } finally {
2760
+ await messageDisplay?.finish();
2731
2761
  }
2732
2762
  if (usageMetadata) {
2733
2763
  this.#recordPromptTokenCount(usageMetadata);
@@ -2876,6 +2906,9 @@ ${this.pendingWorktreeNotice}
2876
2906
  const functionCalls = [];
2877
2907
  let usageMetadata = null;
2878
2908
  const streamStartTime = Date.now();
2909
+ const messageDisplay = this.#createMessageDisplayDispatcher(
2910
+ pendingSend.signal
2911
+ );
2879
2912
  try {
2880
2913
  const continueSendResult = await this.#sendMessageStreamWithAutoCompression(
2881
2914
  promptId + "_stop_hook_" + stopHookIterationCount,
@@ -2905,6 +2938,9 @@ ${this.pendingWorktreeNotice}
2905
2938
  "assistant",
2906
2939
  part.thought
2907
2940
  );
2941
+ if (!part.thought) {
2942
+ messageDisplay?.addChunk(part.text);
2943
+ }
2908
2944
  }
2909
2945
  }
2910
2946
  if (resp.type === "chunk" /* CHUNK */ && resp.value.usageMetadata) {
@@ -2938,6 +2974,8 @@ ${this.pendingWorktreeNotice}
2938
2974
  );
2939
2975
  }
2940
2976
  throw error;
2977
+ } finally {
2978
+ await messageDisplay?.finish();
2941
2979
  }
2942
2980
  if (usageMetadata) {
2943
2981
  this.#recordPromptTokenCount(usageMetadata);
@@ -2993,6 +3031,28 @@ ${this.pendingWorktreeNotice}
2993
3031
  * stop reason when the provider send should be skipped because the request
2994
3032
  * was cancelled or the session token limit was exceeded.
2995
3033
  */
3034
+ /**
3035
+ * Create the MessageDisplay hook dispatcher for one model call's streamed
3036
+ * reply, or null when the hook isn't registered (the common case — keeps
3037
+ * the streaming loops zero-cost). The ACP surface consumes GeminiChat's
3038
+ * raw stream directly rather than going through
3039
+ * GeminiClient.sendMessageStream, so it has to fire this hook itself —
3040
+ * with the same contract as the terminal UI path in client.ts: debounced
3041
+ * cumulative text, one message_id per model call, and an is_final firing
3042
+ * on every non-aborted exit (delivered by awaiting `finish()` in a
3043
+ * finally around each streaming loop).
3044
+ */
3045
+ #createMessageDisplayDispatcher(signal) {
3046
+ const messageBus = this.config.getMessageBus?.();
3047
+ if (this.config.getDisableAllHooks?.() || !messageBus || !this.config.hasHooksForEvent?.("MessageDisplay")) {
3048
+ return null;
3049
+ }
3050
+ return new MessageDisplayDispatcher(
3051
+ messageBus,
3052
+ signal,
3053
+ (message) => debugLogger6.warn(message)
3054
+ );
3055
+ }
2996
3056
  async #sendMessageStreamWithAutoCompression(promptId, message, abortSignal, options = {}) {
2997
3057
  const geminiClient = this.config.getGeminiClient();
2998
3058
  let compressionDiagnostic = null;
@@ -3519,28 +3579,38 @@ ${this.pendingWorktreeNotice}
3519
3579
  this.loopTickResolver?.markDelivered();
3520
3580
  }
3521
3581
  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
- );
3582
+ const messageDisplay = this.#createMessageDisplayDispatcher(
3583
+ ac.signal
3584
+ );
3585
+ try {
3586
+ for await (const resp of responseStream) {
3587
+ if (ac.signal.aborted) return;
3588
+ if (resp.type === "chunk" /* CHUNK */ && resp.value.candidates && resp.value.candidates.length > 0) {
3589
+ const candidate = resp.value.candidates[0];
3590
+ for (const part of candidate.content?.parts ?? []) {
3591
+ if (!part.text) continue;
3592
+ this.messageEmitter.emitMessage(
3593
+ part.text,
3594
+ "assistant",
3595
+ part.thought
3596
+ );
3597
+ if (!part.thought) {
3598
+ messageDisplay?.addChunk(part.text);
3599
+ }
3600
+ }
3601
+ }
3602
+ if (resp.type === "chunk" /* CHUNK */ && resp.value.usageMetadata) {
3603
+ usageMetadata = resp.value.usageMetadata;
3604
+ }
3605
+ if (resp.type === "chunk" /* CHUNK */ && resp.value.functionCalls) {
3606
+ functionCalls.push(...resp.value.functionCalls);
3607
+ }
3608
+ if (resp.type === "model_fallback" /* MODEL_FALLBACK */) {
3609
+ functionCalls.length = 0;
3533
3610
  }
3534
3611
  }
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
- }
3612
+ } finally {
3613
+ await messageDisplay?.finish();
3544
3614
  }
3545
3615
  if (usageMetadata) {
3546
3616
  this.#recordPromptTokenCount(usageMetadata);
@@ -3649,15 +3719,27 @@ ${this.pendingWorktreeNotice}
3649
3719
  kind: "shell"
3650
3720
  });
3651
3721
  });
3652
- this.config.getChatRecordingService()?.setTitleRecordedCallback((customTitle, titleSource) => {
3722
+ this.config.getChatRecordingService()?.setTitleRecordedCallback((customTitle, titleSource, sessionId) => {
3653
3723
  void this.client.extNotification("qwen/notify/session/title-update", {
3654
3724
  v: 1,
3655
- sessionId: this.sessionId,
3725
+ sessionId,
3656
3726
  title: customTitle,
3657
3727
  titleSource
3658
3728
  }).catch(() => {
3659
3729
  });
3660
3730
  });
3731
+ if (typeof this.config.onChatRecordingFailure === "function") {
3732
+ this.unsubscribeChatRecordingFailure = this.config.onChatRecordingFailure(
3733
+ (event) => this.client.extNotification(
3734
+ "qwen/notify/session/recording-degraded",
3735
+ {
3736
+ v: 1,
3737
+ sessionId: event.sessionId,
3738
+ reason: "write_failed"
3739
+ }
3740
+ )
3741
+ );
3742
+ }
3661
3743
  }
3662
3744
  #enqueueBackgroundNotification(item) {
3663
3745
  while (this.notificationQueue.length >= MAX_NOTIFICATION_QUEUE) {
@@ -3746,35 +3828,43 @@ ${this.pendingWorktreeNotice}
3746
3828
  }
3747
3829
  const responseStream = sendResult.responseStream;
3748
3830
  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;
3831
+ const messageDisplay = this.#createMessageDisplayDispatcher(
3832
+ ac.signal
3833
+ );
3834
+ try {
3835
+ for await (const resp of responseStream) {
3836
+ if (ac.signal.aborted) {
3837
+ await this.#emitBackgroundNotificationEndTurn("cancelled");
3838
+ return;
3839
+ }
3840
+ if (resp.type === "chunk" /* CHUNK */ && resp.value.candidates && resp.value.candidates.length > 0) {
3841
+ const candidate = resp.value.candidates[0];
3842
+ for (const part of candidate.content?.parts ?? []) {
3843
+ if (!part.text) continue;
3844
+ if (part.thought) {
3845
+ await this.messageEmitter.emitMessage(
3846
+ part.text,
3847
+ "assistant",
3848
+ true
3849
+ );
3850
+ } else {
3851
+ responseText += part.text;
3852
+ messageDisplay?.addChunk(part.text);
3853
+ }
3766
3854
  }
3767
3855
  }
3856
+ if (resp.type === "chunk" /* CHUNK */ && resp.value.usageMetadata) {
3857
+ usageMetadata = resp.value.usageMetadata;
3858
+ }
3859
+ if (resp.type === "chunk" /* CHUNK */ && resp.value.functionCalls) {
3860
+ functionCalls.push(...resp.value.functionCalls);
3861
+ }
3862
+ if (resp.type === "model_fallback" /* MODEL_FALLBACK */) {
3863
+ functionCalls.length = 0;
3864
+ }
3768
3865
  }
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
- }
3866
+ } finally {
3867
+ await messageDisplay?.finish();
3778
3868
  }
3779
3869
  if (responseText.length > 0) {
3780
3870
  await this.#emitBackgroundNotificationResponse(
@@ -3901,26 +3991,54 @@ ${this.pendingWorktreeNotice}
3901
3991
  }
3902
3992
  async sendAvailableCommandsUpdate() {
3903
3993
  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);
3994
+ await this.sendAvailableCommandsUpdateOrThrow();
3920
3995
  } catch (error) {
3921
3996
  debugLogger6.error("Error sending available commands update:", error);
3922
3997
  }
3923
3998
  }
3999
+ async refreshSkillsFromSettings() {
4000
+ this.settings.reloadScopeFromDisk("Workspace" /* Workspace */);
4001
+ const skillManager = this.config.getSkillManager();
4002
+ let updateFailed = false;
4003
+ let updateError;
4004
+ try {
4005
+ await this.sendAvailableCommandsUpdateOrThrow();
4006
+ } catch (error) {
4007
+ updateFailed = true;
4008
+ updateError = error;
4009
+ }
4010
+ if (skillManager) {
4011
+ try {
4012
+ skillManager.suppressNextSlashReload();
4013
+ await skillManager.notifyConfigChanged();
4014
+ } catch (error) {
4015
+ if (!updateFailed) throw error;
4016
+ debugLogger6.error(
4017
+ "SkillManager refresh failed after command update failure:",
4018
+ error
4019
+ );
4020
+ }
4021
+ }
4022
+ if (updateFailed) throw updateError;
4023
+ }
4024
+ async sendAvailableCommandsUpdateOrThrow() {
4025
+ const { availableCommands, availableSkills, availableSkillDetails } = await buildAvailableCommandsSnapshot(
4026
+ this.config,
4027
+ void 0,
4028
+ this.settings
4029
+ );
4030
+ const update = {
4031
+ sessionUpdate: "available_commands_update",
4032
+ availableCommands,
4033
+ ...availableSkills !== void 0 ? {
4034
+ _meta: {
4035
+ availableSkills,
4036
+ ...availableSkillDetails ? { availableSkillDetails } : {}
4037
+ }
4038
+ } : {}
4039
+ };
4040
+ await this.sendUpdate(update);
4041
+ }
3924
4042
  /**
3925
4043
  * Requests permission from the client for a tool call.
3926
4044
  * Used by SubAgentTracker for sub-agent approval requests.
@@ -4212,6 +4330,17 @@ ${this.pendingWorktreeNotice}
4212
4330
  parts2.push(await recordSkippedToolCall(remainingCall, message));
4213
4331
  }
4214
4332
  }, "appendSkippedAfter");
4333
+ const memoryWriteCandidates = [];
4334
+ const collectMemoryWriteCandidates = /* @__PURE__ */ __name((result) => {
4335
+ if (result.memoryWriteCandidates) {
4336
+ memoryWriteCandidates.push(...result.memoryWriteCandidates);
4337
+ }
4338
+ }, "collectMemoryWriteCandidates");
4339
+ const refreshMemoryIfNeeded = /* @__PURE__ */ __name(async () => {
4340
+ await refreshMemoryAfterManagedWrite(this.config, memoryWriteCandidates, {
4341
+ logContext: `ACP session ${this.sessionId} memory tool batch`
4342
+ });
4343
+ }, "refreshMemoryIfNeeded");
4215
4344
  const runBounded = /* @__PURE__ */ __name(async (calls, runAbortSignal, onStopAfterPermissionCancel, onStopAfterLoopDetected, shouldSkipUnstarted) => {
4216
4345
  const configuredMaxConcurrency = parsePositiveIntegerEnv(
4217
4346
  process.env["QWEN_CODE_MAX_TOOL_CONCURRENCY"],
@@ -4325,103 +4454,117 @@ ${this.pendingWorktreeNotice}
4325
4454
  return results;
4326
4455
  }, "runBounded");
4327
4456
  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
- };
4457
+ try {
4458
+ for (const batch of batches) {
4459
+ if (batch.kind === "duplicate") {
4460
+ await emitDuplicateBatch(batch);
4461
+ parts.push(...batch.response.responseParts);
4462
+ continue;
4389
4463
  }
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);
4464
+ if (batch.concurrent && batch.calls.length > 1) {
4465
+ const batchAbortController = new AbortController();
4466
+ let batchStopAfterPermissionCancel = false;
4467
+ const propagateAbort = /* @__PURE__ */ __name(() => {
4468
+ batchAbortController.abort(abortSignal.reason);
4469
+ }, "propagateAbort");
4470
+ if (abortSignal.aborted) {
4471
+ propagateAbort();
4472
+ } else {
4473
+ abortSignal.addEventListener("abort", propagateAbort, {
4474
+ once: true
4475
+ });
4476
+ }
4477
+ const stopBatchAfterPermissionCancel = /* @__PURE__ */ __name(() => {
4478
+ batchStopAfterPermissionCancel = true;
4479
+ batchAbortController.abort(USER_CANCEL_ABORT_REASON);
4480
+ }, "stopBatchAfterPermissionCancel");
4481
+ let results;
4482
+ try {
4483
+ results = await runBounded(
4484
+ batch.calls,
4485
+ batchAbortController.signal,
4486
+ stopBatchAfterPermissionCancel,
4487
+ () => batchAbortController.abort("loop_detected"),
4488
+ () => batchStopAfterPermissionCancel
4489
+ );
4490
+ } finally {
4491
+ abortSignal.removeEventListener("abort", propagateAbort);
4492
+ }
4493
+ let shouldStop = false;
4494
+ let shouldStopForLoop = false;
4495
+ for (const r of results) {
4496
+ parts.push(...r.parts);
4497
+ collectMemoryWriteCandidates(r);
4498
+ shouldStop ||= r.stopAfterPermissionCancel;
4499
+ shouldStopForLoop ||= r.loopDetected === true;
4500
+ }
4501
+ if (shouldStopForLoop) {
4502
+ await appendSkippedAfter(
4503
+ parts,
4504
+ batch.calls[batch.calls.length - 1],
4505
+ LOOP_DETECTED_SKIP_MESSAGE
4506
+ );
4403
4507
  return {
4404
4508
  parts,
4405
4509
  stopAfterPermissionCancel: false,
4406
- loopDetected: true
4510
+ loopDetected: true,
4511
+ memoryWriteCandidates
4407
4512
  };
4408
4513
  }
4409
- if (r.stopAfterPermissionCancel) {
4410
- await appendSkippedAfter(parts, fc);
4514
+ if (shouldStop) {
4515
+ await appendSkippedAfter(
4516
+ parts,
4517
+ batch.calls[batch.calls.length - 1]
4518
+ );
4411
4519
  return {
4412
4520
  parts,
4413
4521
  stopAfterPermissionCancel: true,
4414
- repeatedDuplicateProviderToolCall: false
4522
+ repeatedDuplicateProviderToolCall: false,
4523
+ memoryWriteCandidates
4415
4524
  };
4416
4525
  }
4526
+ } else {
4527
+ for (const fc of batch.calls) {
4528
+ const r = await this.runTool(
4529
+ abortSignal,
4530
+ promptId,
4531
+ fc,
4532
+ void 0,
4533
+ toolLoopState,
4534
+ recordSkippedToolCall
4535
+ );
4536
+ parts.push(...r.parts);
4537
+ collectMemoryWriteCandidates(r);
4538
+ if (r.loopDetected) {
4539
+ await appendSkippedAfter(parts, fc, LOOP_DETECTED_SKIP_MESSAGE);
4540
+ return {
4541
+ parts,
4542
+ stopAfterPermissionCancel: false,
4543
+ loopDetected: true,
4544
+ memoryWriteCandidates
4545
+ };
4546
+ }
4547
+ if (r.stopAfterPermissionCancel) {
4548
+ await appendSkippedAfter(parts, fc);
4549
+ return {
4550
+ parts,
4551
+ stopAfterPermissionCancel: true,
4552
+ repeatedDuplicateProviderToolCall: false,
4553
+ memoryWriteCandidates
4554
+ };
4555
+ }
4556
+ }
4417
4557
  }
4418
4558
  }
4559
+ return {
4560
+ parts,
4561
+ stopAfterPermissionCancel: false,
4562
+ repeatedDuplicateProviderToolCall: false,
4563
+ memoryWriteCandidates
4564
+ };
4565
+ } finally {
4566
+ await refreshMemoryIfNeeded();
4419
4567
  }
4420
- return {
4421
- parts,
4422
- stopAfterPermissionCancel: false,
4423
- repeatedDuplicateProviderToolCall: false
4424
- };
4425
4568
  }
4426
4569
  /**
4427
4570
  * Assemble the per-turn system reminders the model needs to see at the
@@ -5082,7 +5225,14 @@ ${this.pendingWorktreeNotice}
5082
5225
  }
5083
5226
  return {
5084
5227
  parts: responseParts,
5085
- stopAfterPermissionCancel: nestedPermissionCancelled
5228
+ stopAfterPermissionCancel: nestedPermissionCancelled,
5229
+ memoryWriteCandidates: status === "success" ? [
5230
+ {
5231
+ toolName,
5232
+ args,
5233
+ status
5234
+ }
5235
+ ] : void 0
5086
5236
  };
5087
5237
  } catch (e) {
5088
5238
  cleanupAgentToolResources();
@@ -5203,7 +5353,7 @@ ${this.pendingWorktreeNotice}
5203
5353
  throw new Error(result.content || "Slash command failed.");
5204
5354
  }
5205
5355
  const rendered = (result.content || "").replace(/\n/g, " \n");
5206
- await this.messageEmitter.emitAgentMessage(rendered);
5356
+ await this.messageEmitter.emitSlashCommandOutput(rendered);
5207
5357
  this.config.getChatRecordingService()?.recordSlashCommand({
5208
5358
  phase: "result",
5209
5359
  rawCommand: originalPrompt.filter((b) => b.type === "text").map((b) => b.type === "text" ? b.text : "").join(" "),
@@ -5219,7 +5369,7 @@ ${this.pendingWorktreeNotice}
5219
5369
  if (msg.messageType === "error") {
5220
5370
  throw new Error(msg.content || "Slash command failed.");
5221
5371
  }
5222
- await this.messageEmitter.emitAgentMessage(
5372
+ await this.messageEmitter.emitSlashCommandOutput(
5223
5373
  (msg.content || "").replace(/\n/g, " \n")
5224
5374
  );
5225
5375
  chunks.push(msg.content || "");
@@ -5242,7 +5392,8 @@ ${this.pendingWorktreeNotice}
5242
5392
  case "no_command":
5243
5393
  return this.#resolvePrompt(
5244
5394
  originalPrompt,
5245
- new AbortController().signal
5395
+ new AbortController().signal,
5396
+ { promptLast: true }
5246
5397
  );
5247
5398
  default: {
5248
5399
  const _exhaustive = result;
@@ -5251,7 +5402,7 @@ ${this.pendingWorktreeNotice}
5251
5402
  }
5252
5403
  }
5253
5404
  }
5254
- async #resolvePrompt(message, abortSignal) {
5405
+ async #resolvePrompt(message, abortSignal, options = {}) {
5255
5406
  const FILE_URI_SCHEME = "file://";
5256
5407
  const embeddedContext = [];
5257
5408
  const extensionMentions = /* @__PURE__ */ new Map();
@@ -5341,7 +5492,7 @@ ${this.pendingWorktreeNotice}
5341
5492
  initialQueryText += `@${pathName}`;
5342
5493
  }
5343
5494
  }
5344
- const processedQueryParts = [];
5495
+ const referenceParts = [...extensionParts, ...mcpServerParts];
5345
5496
  if (pathSpecsToRead.length > 0) {
5346
5497
  const readResult = await readManyFiles(this.config, {
5347
5498
  paths: pathSpecsToRead,
@@ -5349,26 +5500,19 @@ ${this.pendingWorktreeNotice}
5349
5500
  ...preserveUnsupportedImageForBridge ? { preserveUnsupportedImageForBridge } : {}
5350
5501
  });
5351
5502
  const contentParts = Array.isArray(readResult.contentParts) ? readResult.contentParts : [readResult.contentParts];
5352
- processedQueryParts.push({ text: initialQueryText });
5353
- processedQueryParts.push(...extensionParts);
5354
- processedQueryParts.push(...mcpServerParts);
5355
5503
  for (const part of contentParts) {
5356
5504
  if (typeof part === "string") {
5357
- processedQueryParts.push({ text: part });
5505
+ referenceParts.push({ text: part });
5358
5506
  } else if (preserveUnsupportedImageForBridge && hasImageParts([part])) {
5359
- processedQueryParts.push(part);
5507
+ referenceParts.push(part);
5360
5508
  } else {
5361
- processedQueryParts.push(clampInlineMediaPart(part));
5509
+ referenceParts.push(clampInlineMediaPart(part));
5362
5510
  }
5363
5511
  }
5364
- } else {
5365
- processedQueryParts.push({ text: initialQueryText.trim() });
5366
- processedQueryParts.push(...extensionParts);
5367
- processedQueryParts.push(...mcpServerParts);
5368
5512
  }
5369
5513
  for (const contextPart of embeddedContext) {
5370
5514
  if ("text" in contextPart && contextPart.text) {
5371
- processedQueryParts.push({
5515
+ referenceParts.push({
5372
5516
  text: `File: ${contextPart.uri}
5373
5517
  ${contextPart.text}`
5374
5518
  });
@@ -5380,11 +5524,14 @@ ${contextPart.text}`
5380
5524
  data: contextPart.blob
5381
5525
  }
5382
5526
  };
5383
- processedQueryParts.push(
5527
+ referenceParts.push(
5384
5528
  preserveUnsupportedImageForBridge && hasImageParts([inlinePart]) ? inlinePart : clampInlineMediaPart(inlinePart)
5385
5529
  );
5386
5530
  }
5387
5531
  }
5532
+ const promptText = pathSpecsToRead.length > 0 ? initialQueryText : initialQueryText.trim();
5533
+ const promptPart = { text: promptText };
5534
+ const processedQueryParts = options.promptLast ? [...referenceParts, promptPart] : [promptPart, ...referenceParts];
5388
5535
  return this.#applyBridgeConversionsIfNeeded(
5389
5536
  processedQueryParts,
5390
5537
  abortSignal
@@ -5830,132 +5977,6 @@ function isBulkLoadReplayRequest(params) {
5830
5977
  return meta?.[LOAD_REPLAY_MODE_META_KEY] === LOAD_REPLAY_BULK_MODE;
5831
5978
  }
5832
5979
  __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
5980
  function createHiddenWorkspaceMemoryConfig(config) {
5960
5981
  return new Proxy(config, {
5961
5982
  get(target, prop) {
@@ -7809,7 +7830,7 @@ var QwenAgent = class {
7809
7830
  async initialize(args) {
7810
7831
  this.clientCapabilities = args.clientCapabilities;
7811
7832
  const authMethods = buildAuthMethods();
7812
- const version = "0.19.9";
7833
+ const version = "0.19.10";
7813
7834
  return {
7814
7835
  protocolVersion: PROTOCOL_VERSION,
7815
7836
  agentInfo: {
@@ -7933,9 +7954,10 @@ var QwenAgent = class {
7933
7954
  config,
7934
7955
  records,
7935
7956
  gaps: sessionData?.historyGaps,
7936
- cumulativeUsage: replayUsage
7957
+ cumulativeUsage: replayUsage,
7958
+ logger: debugLogger7
7937
7959
  });
7938
- replayUpdates = liftSessionUpdateTimestamps(replay.updates);
7960
+ replayUpdates = replay.updates;
7939
7961
  copyCumulativeUsage(session.cumulativeUsage, replayUsage);
7940
7962
  if (replay.replayError !== void 0) {
7941
7963
  replayEnvelope = {
@@ -9191,6 +9213,19 @@ var QwenAgent = class {
9191
9213
  }
9192
9214
  return session;
9193
9215
  }
9216
+ async refreshLiveSessionMemoryInstructions(logContext) {
9217
+ const sessions = [...this.sessions.values()];
9218
+ if (sessions.length === 0) {
9219
+ return;
9220
+ }
9221
+ await Promise.all(
9222
+ sessions.map(
9223
+ (session) => refreshMemoryInstruction(session.getConfig(), {
9224
+ logContext: `${logContext} session ${session.getId()}`
9225
+ })
9226
+ )
9227
+ );
9228
+ }
9194
9229
  buildSessionContextStatus(sessionId) {
9195
9230
  const session = this.sessionOrThrow(sessionId);
9196
9231
  const config = session.getConfig();
@@ -10041,43 +10076,25 @@ var QwenAgent = class {
10041
10076
  ...typeof rawLimit === "number" ? { limit: rawLimit } : {}
10042
10077
  });
10043
10078
  const config = await this.getTranscriptReplayConfig(cwd, settings);
10044
- const replayState = parseTranscriptReplayState(page.replay);
10045
- const replay = await collectHistoryReplayUpdatesPage({
10079
+ const replay = await replayTranscriptRecordPage({
10046
10080
  sessionId,
10081
+ page,
10047
10082
  config,
10048
- records: page.records,
10049
- gaps: page.gaps,
10050
- cumulativeUsage: replayState.cumulativeUsage,
10051
- pendingToolCalls: replayState.pendingToolCalls,
10052
- finalizeDangling: !page.hasMore
10083
+ encodeCursor: /* @__PURE__ */ __name((state) => encodeSessionTranscriptCursor(state, cwd), "encodeCursor"),
10084
+ logger: debugLogger7
10053
10085
  });
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
10086
  return {
10070
10087
  v: 1,
10071
10088
  sessionId,
10072
- events: updates.map((update) => ({
10089
+ events: replay.updates.map((update) => ({
10073
10090
  v: 1,
10074
10091
  type: "session_update",
10075
10092
  data: update
10076
10093
  })),
10077
- ...nextCursor !== void 0 ? { nextCursor } : {},
10078
- hasMore: page.hasMore,
10079
- startTime: page.startTime,
10080
- lastUpdated: page.lastUpdated,
10094
+ ...replay.nextCursor !== void 0 ? { nextCursor: replay.nextCursor } : {},
10095
+ hasMore: replay.hasMore,
10096
+ startTime: replay.startTime,
10097
+ lastUpdated: replay.lastUpdated,
10081
10098
  ...replay.replayError !== void 0 ? { partial: true, replayError: replay.replayError } : {}
10082
10099
  };
10083
10100
  });
@@ -10228,6 +10245,11 @@ var QwenAgent = class {
10228
10245
  contextMode,
10229
10246
  abortSignal: childSignal
10230
10247
  });
10248
+ if (result.filesTouched.length > 0) {
10249
+ await this.refreshLiveSessionMemoryInstructions(
10250
+ "workspace memory remember"
10251
+ );
10252
+ }
10231
10253
  return result;
10232
10254
  } catch (err) {
10233
10255
  if (err instanceof RequestError) {
@@ -10806,8 +10828,7 @@ var QwenAgent = class {
10806
10828
  const recording = session.getConfig().getChatRecordingService();
10807
10829
  let ok = false;
10808
10830
  if (recording) {
10809
- ok = recording.recordCustomTitle(displayName, source);
10810
- await recording.flush();
10831
+ ok = await recording.recordCustomTitle(displayName, source);
10811
10832
  }
10812
10833
  return { sessionId, displayName, titleSource: source, persisted: ok };
10813
10834
  }
@@ -11506,28 +11527,33 @@ ${outputText}
11506
11527
  case SERVE_CONTROL_EXT_METHODS.workspaceExtensionsRefresh: {
11507
11528
  const sessionId = params["sessionId"];
11508
11529
  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)}`
11530
+ const config = session.getConfig();
11531
+ const extensionManager = config.getExtensionManager();
11532
+ const errors = [];
11533
+ const runRefresh = /* @__PURE__ */ __name(async (refresh) => {
11534
+ try {
11535
+ await refresh();
11536
+ } catch (error) {
11537
+ errors.push(error);
11538
+ }
11539
+ }, "runRefresh");
11540
+ await runRefresh(async () => await extensionManager.refreshCache());
11541
+ await runRefresh(async () => await extensionManager.refreshTools());
11542
+ await runRefresh(
11543
+ async () => await config.getGeminiClient()?.refreshSystemInstruction()
11544
+ );
11545
+ await runRefresh(
11546
+ async () => await session.sendAvailableCommandsUpdate()
11547
+ );
11548
+ if (errors.length > 0) {
11549
+ const details = errors.map(
11550
+ (error) => error instanceof Error ? error.message : String(error)
11551
+ ).join("; ");
11552
+ throw new AggregateError(
11553
+ errors,
11554
+ `Extension runtime refresh failed: ${details}`
11528
11555
  );
11529
11556
  }
11530
- await session.sendAvailableCommandsUpdate();
11531
11557
  return { ok: true };
11532
11558
  }
11533
11559
  case "deleteSession": {
@@ -11571,8 +11597,7 @@ ${outputText}
11571
11597
  }
11572
11598
  const liveRecording = this.sessions.get(sessionId)?.getConfig().getChatRecordingService();
11573
11599
  if (liveRecording) {
11574
- const ok = liveRecording.recordCustomTitle(title, "manual");
11575
- await liveRecording.flush();
11600
+ const ok = await liveRecording.recordCustomTitle(title, "manual");
11576
11601
  return { success: ok };
11577
11602
  }
11578
11603
  const success = await runWithAcpRuntimeOutputDir(
@@ -11706,9 +11731,10 @@ ${outputText}
11706
11731
  };
11707
11732
  }
11708
11733
  } catch (err) {
11709
- artifactSnapshotUnavailable = err instanceof Error ? err.message : String(err);
11734
+ const reason = err instanceof Error ? err.message : String(err);
11735
+ artifactSnapshotUnavailable = "artifact snapshot unavailable after rewind";
11710
11736
  debugLogger7.warn(
11711
- `[ACP] Failed to rebuild artifact snapshot after rewind for session=${sessionId}: ${artifactSnapshotUnavailable}`
11737
+ `[ACP] Failed to rebuild artifact snapshot after rewind for session=${sessionId}: ${reason}`
11712
11738
  );
11713
11739
  }
11714
11740
  return {
@@ -11745,10 +11771,11 @@ ${outputText}
11745
11771
  config: this.config,
11746
11772
  records: sessionData.conversation.messages,
11747
11773
  gaps: sessionData.historyGaps,
11748
- cumulativeUsage: createReplayCumulativeUsage()
11774
+ cumulativeUsage: createReplayCumulativeUsage(),
11775
+ logger: debugLogger7
11749
11776
  });
11750
11777
  return {
11751
- updates: liftSessionUpdateTimestamps(replay.updates),
11778
+ updates: replay.updates,
11752
11779
  startTime: sessionData.conversation.startTime,
11753
11780
  lastUpdated: sessionData.conversation.lastUpdated,
11754
11781
  // Signal to the client that replay aborted partway so it doesn't
@@ -12166,6 +12193,29 @@ ${outputText}
12166
12193
  sessionsSkipped: skipped
12167
12194
  };
12168
12195
  }
12196
+ case SERVE_CONTROL_EXT_METHODS.workspaceSkillsRefresh: {
12197
+ this.settings.reloadScopeFromDisk("Workspace" /* Workspace */);
12198
+ const sessions = this.getActiveSessions();
12199
+ const results = await Promise.allSettled(
12200
+ sessions.map((session) => session.refreshSkillsFromSettings())
12201
+ );
12202
+ for (let i = 0; i < results.length; i++) {
12203
+ if (results[i].status === "rejected") {
12204
+ const reason = results[i].reason;
12205
+ debugLogger7.warn(
12206
+ `Session ${sessions[i].getId()} skill refresh failed: ${reason}`
12207
+ );
12208
+ }
12209
+ }
12210
+ return {
12211
+ sessionsRefreshed: results.filter(
12212
+ (result) => result.status === "fulfilled"
12213
+ ).length,
12214
+ sessionsFailed: results.filter(
12215
+ (result) => result.status === "rejected"
12216
+ ).length
12217
+ };
12218
+ }
12169
12219
  default:
12170
12220
  throw RequestError.methodNotFound(method);
12171
12221
  }