@qwen-code/qwen-code 0.19.10 → 0.19.11-nightly.20260718.767a32484

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 (307) hide show
  1. package/bundled/qc-helper/docs/configuration/model-providers.md +11 -0
  2. package/bundled/qc-helper/docs/configuration/settings.md +15 -14
  3. package/bundled/qc-helper/docs/features/approval-mode.md +2 -2
  4. package/bundled/qc-helper/docs/features/channels/dingtalk.md +30 -0
  5. package/bundled/qc-helper/docs/features/channels/overview.md +66 -17
  6. package/bundled/qc-helper/docs/features/channels/wecom.md +8 -7
  7. package/bundled/qc-helper/docs/features/sandbox.md +2 -0
  8. package/bundled/qc-helper/docs/qwen-serve-deploy-local.md +42 -7
  9. package/bundled/qc-helper/docs/qwen-serve.md +77 -46
  10. package/bundled/qc-helper/docs/reference/keyboard-shortcuts.md +1 -1
  11. package/bundled/review/SKILL.md +163 -403
  12. package/chunks/{MaxSizedBox-67ODZ4SZ.js → MaxSizedBox-ZFHA4QEQ.js} +30 -30
  13. package/chunks/{StandaloneSessionPicker-SIPBQT5Z.js → StandaloneSessionPicker-YRWOQVQA.js} +44 -44
  14. package/chunks/{acpAgent-VPZJXLFX.js → acpAgent-U2P2IESZ.js} +1423 -487
  15. package/chunks/{agent-Z7NWL6XL.js → agent-GQXX6X5Y.js} +26 -26
  16. package/chunks/{agent-headless-73HZ6ROQ.js → agent-headless-3572NBCK.js} +26 -26
  17. package/chunks/{anthropicContentGenerator-56U3YCP2.js → anthropicContentGenerator-Y65DMM64.js} +103 -18
  18. package/chunks/{artifact-tool-BWZZJ42H.js → artifact-tool-WR7I2XON.js} +2 -2
  19. package/chunks/{askUserQuestion-WU3S5A5T.js → askUserQuestion-B4FUTPHD.js} +2 -44
  20. package/chunks/{bridge-XFKW6S7Q.js → bridge-N5RMGD7G.js} +31 -33
  21. package/chunks/{ca-C2JTT2N5.js → ca-M3GQQ26D.js} +7 -2
  22. package/chunks/channel-worker-group-HZVJKLGX.js +21 -0
  23. package/chunks/{channel-worker-manager-5RWKSGEU.js → channel-worker-manager-3WDK4HNS.js} +34 -10
  24. package/chunks/{channel-worker-supervisor-PCDAZN4D.js → channel-worker-supervisor-U2W6Q5F7.js} +6 -4
  25. package/chunks/{chunk-YYPXHMWO.js → chunk-2XRGFF5K.js} +6 -6
  26. package/chunks/{chunk-ZKMGAFYV.js → chunk-2YSZE74N.js} +2 -2
  27. package/chunks/{chunk-L5U3ELZX.js → chunk-335ECZTA.js} +1 -1
  28. package/chunks/{chunk-5EBKKSBX.js → chunk-336KPNNV.js} +2 -2
  29. package/chunks/{chunk-Q5GLXH5Q.js → chunk-3CL5SEDT.js} +6 -6
  30. package/chunks/{chunk-2FO5GFKZ.js → chunk-3DJY4IFO.js} +1 -1
  31. package/chunks/{chunk-CJFNEBYB.js → chunk-3NWYQ7FX.js} +2 -2
  32. package/chunks/{chunk-WIASPMLX.js → chunk-3X2CFOUM.js} +358 -298
  33. package/chunks/{chunk-K7CRWKOE.js → chunk-3YJZ6WNY.js} +5812 -4520
  34. package/chunks/{chunk-Y66VOBRP.js → chunk-4CA4WUMS.js} +2 -2
  35. package/chunks/{chunk-LQIDP6K5.js → chunk-4CHDYDG3.js} +1 -1
  36. package/chunks/{chunk-TISZXPAX.js → chunk-4HCYNDMG.js} +1 -1
  37. package/chunks/chunk-4JBTZBCW.js +140 -0
  38. package/chunks/{chunk-TV6K2FB4.js → chunk-4RPARQ5D.js} +2 -2
  39. package/chunks/{chunk-RCEEXIOO.js → chunk-4XCVGEEX.js} +3 -3
  40. package/chunks/{chunk-N6FXRR6P.js → chunk-57RWF6R7.js} +1 -1
  41. package/chunks/chunk-5O34IMY5.js +59 -0
  42. package/chunks/{chunk-5LROA5W4.js → chunk-5QRK2VZG.js} +8 -8
  43. package/chunks/{chunk-7L4XBYVW.js → chunk-632KROVU.js} +10 -3
  44. package/chunks/{chunk-65N2J6V2.js → chunk-64XGKNSI.js} +3 -3
  45. package/chunks/{chunk-P6LART6G.js → chunk-66IT3EY2.js} +1059 -129
  46. package/chunks/{chunk-FXMC7SL2.js → chunk-6ITLKEOZ.js} +3 -3
  47. package/chunks/{chunk-F7NXQH4Y.js → chunk-6YIRYY3P.js} +1 -1
  48. package/chunks/{chunk-GGJII3FM.js → chunk-6Z5NRZVU.js} +92 -3
  49. package/chunks/{chunk-DPFBNG72.js → chunk-AEKYFMYE.js} +1 -1
  50. package/chunks/{chunk-2UUAIFQO.js → chunk-ANRANWVE.js} +9 -1
  51. package/chunks/{chunk-SXU3KKNI.js → chunk-ATJ7H5AS.js} +419 -76
  52. package/chunks/{chunk-6GETGQWP.js → chunk-C5NSOSF4.js} +64 -18
  53. package/chunks/{chunk-TQBODCFD.js → chunk-CMVFTMRD.js} +251 -3
  54. package/chunks/{chunk-DK33QJ3V.js → chunk-CZSAIBUB.js} +733 -14
  55. package/chunks/{chunk-3MX7D6QN.js → chunk-DASWPKXR.js} +32 -4
  56. package/chunks/{chunk-JSJFKYWT.js → chunk-DPSHAB47.js} +2 -2
  57. package/chunks/{chunk-7MJAZMXK.js → chunk-ECZFTRTP.js} +29 -78
  58. package/chunks/{chunk-H3FQOPPS.js → chunk-EKG3BHQY.js} +4 -4
  59. package/chunks/{chunk-FSA7ERJ2.js → chunk-F2RR4HO2.js} +1 -1
  60. package/chunks/{chunk-EQY6POVO.js → chunk-F5XYN5VF.js} +2 -2
  61. package/chunks/chunk-FEOZBUMT.js +77 -0
  62. package/chunks/{chunk-L62SEJWY.js → chunk-FHUXCRAF.js} +4 -4
  63. package/chunks/{chunk-OFEVHGVU.js → chunk-FSJGBUQI.js} +818 -31
  64. package/chunks/{chunk-FBU7WRZI.js → chunk-FUTHTZVV.js} +1 -1
  65. package/chunks/{chunk-ZRKBI3DP.js → chunk-FZRES4GK.js} +1 -1
  66. package/chunks/{chunk-OKAIGAYW.js → chunk-G274ETR6.js} +3 -3
  67. package/chunks/{chunk-6GKMJPOC.js → chunk-GA3WUOO7.js} +5 -5
  68. package/chunks/{chunk-X362TMXZ.js → chunk-GAQOQMHY.js} +8 -6
  69. package/chunks/{chunk-WLXYAKV7.js → chunk-GG6RSNWS.js} +9 -4
  70. package/chunks/{chunk-CEW4HDPK.js → chunk-GUNTLALV.js} +2484 -362
  71. package/chunks/{chunk-LXLTBIDP.js → chunk-HCCR43AY.js} +1 -1
  72. package/chunks/{chunk-RDRVMDWV.js → chunk-HIMIG6PI.js} +11 -11
  73. package/chunks/{chunk-MO7O5722.js → chunk-HQXQCIT2.js} +45 -5
  74. package/chunks/{chunk-LTNI523B.js → chunk-HT7L5FCZ.js} +28 -5
  75. package/chunks/{chunk-7NAWTFVY.js → chunk-IENO2YAT.js} +3 -3
  76. package/chunks/{chunk-3XJFUTNM.js → chunk-IK5TYYVR.js} +59 -12
  77. package/chunks/{chunk-AAR5SGMD.js → chunk-IVKLDHU6.js} +7 -5
  78. package/chunks/{chunk-6W6DI34P.js → chunk-IX7O5WI3.js} +180 -8
  79. package/chunks/{chunk-SPJQO2CE.js → chunk-J2MKYJKZ.js} +2 -2
  80. package/chunks/{chunk-SPUYQB4T.js → chunk-JBAQ5BYX.js} +1 -1
  81. package/chunks/{chunk-TYLOFD2U.js → chunk-JCJPZMJV.js} +1 -1
  82. package/chunks/chunk-JDIUK2Y3.js +226 -0
  83. package/chunks/{chunk-L37RC7MQ.js → chunk-JUVTV4NF.js} +1 -1
  84. package/chunks/{chunk-WDWJ4OQJ.js → chunk-K2GBHL73.js} +4 -4
  85. package/chunks/{chunk-HHEFI4RP.js → chunk-KEVDWH3U.js} +857 -137
  86. package/chunks/{chunk-YU56QGXX.js → chunk-KTKETHMY.js} +1 -1
  87. package/chunks/{chunk-WDW64OW3.js → chunk-LGY7PG7Q.js} +5 -5
  88. package/chunks/{chunk-E67NFMF4.js → chunk-LKR7QQ63.js} +37 -3
  89. package/chunks/{chunk-4YWLED2A.js → chunk-LSFVUGXT.js} +9 -6
  90. package/chunks/{chunk-W34A5MJH.js → chunk-LTD3CHGS.js} +1 -1
  91. package/chunks/chunk-LXXMOYPL.js +22 -0
  92. package/chunks/{chunk-BBNVFRGD.js → chunk-MI2V6IWU.js} +1 -1
  93. package/chunks/{chunk-UFOKA4PR.js → chunk-O2K6BLPZ.js} +114 -4
  94. package/chunks/{chunk-B5I2IIWY.js → chunk-OBYAX5QZ.js} +6 -6
  95. package/chunks/{chunk-V7EQTZYR.js → chunk-OCQ2QTFJ.js} +203 -47
  96. package/chunks/{chunk-VBRRNQB7.js → chunk-OPVIKLKK.js} +112 -25
  97. package/chunks/{chunk-2Z5UX4KI.js → chunk-OSSDHJDU.js} +1 -1
  98. package/chunks/{chunk-TTUO4DNG.js → chunk-OXOEOOQU.js} +126 -734
  99. package/chunks/{chunk-4FMG7EDJ.js → chunk-PWYLF7SS.js} +79 -16
  100. package/chunks/chunk-QFEY6OXH.js +45 -0
  101. package/chunks/{chunk-YX4LLZ3D.js → chunk-QPRDXJIC.js} +115 -40
  102. package/chunks/{chunk-7R4DPSRA.js → chunk-R3VWUU2E.js} +1 -1
  103. package/chunks/{chunk-XLIRF7IK.js → chunk-S4N3G4BB.js} +1 -1
  104. package/chunks/{chunk-ARKANCNX.js → chunk-SGPFJMRP.js} +1 -1
  105. package/chunks/{chunk-WTSXKLG5.js → chunk-SUARMD4Q.js} +1 -1
  106. package/chunks/{chunk-PZL23GTM.js → chunk-T3W4SDRB.js} +2 -0
  107. package/chunks/chunk-T4TZQJ7W.js +48 -0
  108. package/chunks/{chunk-K4PZ5F5T.js → chunk-TVYM3Q3J.js} +101 -8
  109. package/chunks/{chunk-4LD5APFL.js → chunk-TYQMGACW.js} +1 -0
  110. package/chunks/{chunk-6OATMEYN.js → chunk-U2LNTX56.js} +12 -4
  111. package/chunks/{chunk-422XAKCK.js → chunk-U2XBPBO3.js} +4 -3
  112. package/chunks/{chunk-LNUXFLLJ.js → chunk-U4FJ26D2.js} +54 -6
  113. package/chunks/{chunk-ZQTZXVHP.js → chunk-U6OPT4H2.js} +4 -18
  114. package/chunks/{chunk-7NFB7LBQ.js → chunk-UE5TZ55T.js} +8 -0
  115. package/chunks/{chunk-CUUXANEQ.js → chunk-URP6O2PP.js} +6 -1
  116. package/chunks/{chunk-GDQQRV43.js → chunk-V2FRLYHN.js} +3 -3
  117. package/chunks/{chunk-WIEO4CWB.js → chunk-VAJS2E2D.js} +1 -1
  118. package/chunks/{chunk-TXY2C3D2.js → chunk-VNN3JNYT.js} +1 -1
  119. package/chunks/{chunk-YHN5SUIJ.js → chunk-W7H223ZZ.js} +1 -1
  120. package/chunks/{chunk-WX6SD4IQ.js → chunk-WEPXQKGP.js} +1 -1
  121. package/chunks/{chunk-KSO42X3Z.js → chunk-X6YQWCIJ.js} +21 -2
  122. package/chunks/{chunk-URU5UEK6.js → chunk-XA7OKDWM.js} +135 -68
  123. package/chunks/{chunk-Q6TUALBE.js → chunk-XAAEDML2.js} +1 -1
  124. package/chunks/{chunk-KKRTYONM.js → chunk-XSPFQQRE.js} +3 -3
  125. package/chunks/{chunk-OATTJGPJ.js → chunk-Y72B36CP.js} +7 -7
  126. package/chunks/{chunk-ZPAHLFZU.js → chunk-Z2LBNX3R.js} +2 -2
  127. package/chunks/{chunk-XXJKGHZV.js → chunk-ZTSDZQZO.js} +131 -4
  128. package/chunks/{computer-use-IYTX45WA.js → computer-use-UIFBH25Y.js} +26 -26
  129. package/chunks/{config-utils-CFT33LTP.js → config-utils-2LHI7JXU.js} +3 -3
  130. package/chunks/{contextCommand-272V77WU.js → contextCommand-VGZHKEH2.js} +28 -28
  131. package/chunks/{create-sub-session-WNX2OQVX.js → create-sub-session-DIJOV6HV.js} +2 -2
  132. package/chunks/{create-sub-session-CBJMQLYP.js → create-sub-session-OFVI4H6I.js} +26 -26
  133. package/chunks/{cron-create-36TIFKRT.js → cron-create-34GVLSW5.js} +4 -4
  134. package/chunks/{cron-delete-OQD3WULU.js → cron-delete-NMVKUL45.js} +4 -4
  135. package/chunks/{cron-list-4533T2FH.js → cron-list-277ZOR7L.js} +4 -4
  136. package/chunks/{daemon-RNGFPMAB.js → daemon-72MEV3TY.js} +361 -84
  137. package/chunks/daemon-status-provider-ZJJ6AOG2.js +75 -0
  138. package/chunks/{de-2VCDRDGU.js → de-56TMDIKS.js} +7 -2
  139. package/chunks/{dist-3V3ZV6ML.js → dist-4W3UGU2A.js} +1 -1
  140. package/chunks/{dist-HNN7DR2L.js → dist-G6QCGO2K.js} +58 -30
  141. package/chunks/{dist-ERCPDVA6.js → dist-ILVRL322.js} +4 -51
  142. package/chunks/{dist-PHEPJLXD.js → dist-KEZ5JWH4.js} +2 -2
  143. package/chunks/{dist-JZE7F6YR.js → dist-LQHDHBPP.js} +1 -1
  144. package/chunks/{dist-MOEC47TR.js → dist-SVHAGOLN.js} +1 -1
  145. package/chunks/{earlyInputCapture-EN4BRREQ.js → earlyInputCapture-NPF4PVUE.js} +27 -27
  146. package/chunks/{edit-OMAF2QDR.js → edit-F7CT6NZH.js} +27 -27
  147. package/chunks/{en-NJCA3TAA.js → en-AXS2N62H.js} +12 -3
  148. package/chunks/{enter-worktree-BBZX52HG.js → enter-worktree-Z4ET3MZL.js} +26 -26
  149. package/chunks/{enterPlanMode-5NNFMBUY.js → enterPlanMode-VYR7T5NX.js} +27 -29
  150. package/chunks/{environment-7TEWMJYN.js → environment-MBTXL57Q.js} +28 -28
  151. package/chunks/{errors-I4VKVX3F.js → errors-HN36J4FR.js} +28 -28
  152. package/chunks/{exit-worktree-FUWRJI33.js → exit-worktree-RU7JYFMF.js} +26 -26
  153. package/chunks/exitPlanMode-LUBAWMZQ.js +390 -0
  154. package/chunks/{fast-path-ZA57TOH4.js → fast-path-RFT3CDNZ.js} +2 -2
  155. package/chunks/{fr-5F3E7WKD.js → fr-ZJPE5OVN.js} +7 -2
  156. package/chunks/{gemini-UOAKVXBG.js → gemini-37NTNKZF.js} +215 -231
  157. package/chunks/{geminiContentGenerator-G6UCE6MW.js → geminiContentGenerator-76HNOYNQ.js} +5 -5
  158. package/chunks/{glob-4GJQ2UFF.js → glob-DWD7JCZE.js} +32 -27
  159. package/chunks/{grep-5QSYXF2E.js → grep-NJRXFV5C.js} +32 -27
  160. package/chunks/{handleAutoUpdate-ULHNWL6R.js → handleAutoUpdate-7GBDXW6U.js} +30 -30
  161. package/chunks/{i18n-CYDUTF6F.js → i18n-MYD5VGED.js} +27 -27
  162. package/chunks/{initializer-NRFKUGIO.js → initializer-4DHPNAZG.js} +32 -32
  163. package/chunks/{installationInfo-WELKRHHE.js → installationInfo-RWOW6BZO.js} +27 -27
  164. package/chunks/{ja-66J6B53L.js → ja-57GG4QSL.js} +7 -2
  165. package/chunks/{keychain-token-storage-AU22CQI6.js → keychain-token-storage-K23CFKGN.js} +2 -2
  166. package/chunks/{list-JVDXEG2E.js → list-MMCNNHE7.js} +34 -34
  167. package/chunks/{loadedSettingsAdapter-WAM4VUTG.js → loadedSettingsAdapter-UK4JWPYU.js} +31 -31
  168. package/chunks/{loop-wakeup-MVUKDVCP.js → loop-wakeup-KCLY4XQM.js} +5 -5
  169. package/chunks/{ls-RXNIAQDE.js → ls-UNI4LAJ3.js} +4 -4
  170. package/chunks/{lsp-HB5LM5IL.js → lsp-HPACPJAN.js} +2 -2
  171. package/chunks/{mcp-YHOZN3ZM.js → mcp-AFCVA4UV.js} +31 -31
  172. package/chunks/{monitor-R7XZPJHQ.js → monitor-RK637BNO.js} +28 -27
  173. package/chunks/nonInteractiveCli-OUGWLHNV.js +129 -0
  174. package/chunks/{notebook-edit-6RNKE2L2.js → notebook-edit-LY2X3CMF.js} +27 -27
  175. package/chunks/{openaiContentGenerator-XNS5S64I.js → openaiContentGenerator-MDYDW7IA.js} +14 -14
  176. package/chunks/{pidfile-XE4RRR2P.js → pidfile-2NUYRLKB.js} +27 -27
  177. package/chunks/processUtils-7QH3VBVN.js +29 -0
  178. package/chunks/{pt-TFZO5Y6T.js → pt-MCGZ3RZ4.js} +7 -2
  179. package/chunks/{qwenContentGenerator-APDPJ3VN.js → qwenContentGenerator-3HT4TVDL.js} +28 -28
  180. package/chunks/{qwenOAuth2-LEYOU7RU.js → qwenOAuth2-3A4TJVZT.js} +5 -5
  181. package/chunks/{read-file-XSUWXSR7.js → read-file-NE4FREFR.js} +10 -10
  182. package/chunks/{read-mcp-resource-6LRTZKXI.js → read-mcp-resource-C6NT52T6.js} +2 -2
  183. package/chunks/{record-artifact-PMDTY4OS.js → record-artifact-ENCU7QCL.js} +2 -2
  184. package/chunks/{ripGrep-APB3CDMU.js → ripGrep-DBLXWQCJ.js} +26 -26
  185. package/chunks/{ru-4L4LFHIT.js → ru-GA3NZW5Q.js} +7 -2
  186. package/chunks/{run-qwen-serve-NWTGPERT.js → run-qwen-serve-3NOCI6IL.js} +63 -39
  187. package/chunks/{runtime-EIO3NQKR.js → runtime-ZI7DSZSS.js} +35 -35
  188. package/chunks/{scheduler-JJDZBDRN.js → scheduler-SOVEP5K7.js} +26 -26
  189. package/chunks/{send-message-SR4WSXP2.js → send-message-5IFPZTPE.js} +3 -3
  190. package/chunks/{serve-WTIPB3EI.js → serve-DB6OCXIA.js} +31 -31
  191. package/chunks/{server-NJPHQHLH.js → server-LDY4YVU4.js} +2257 -648
  192. package/chunks/{session-O4AO7FTS.js → session-D6OG5SKX.js} +99 -72
  193. package/chunks/{settings-HQNDK7TG.js → settings-L52ZV5LO.js} +30 -30
  194. package/chunks/{shell-UIXM6PWG.js → shell-IU27OY3Q.js} +28 -26
  195. package/chunks/{skill-3XMB4ULV.js → skill-BSOJT7LE.js} +12 -12
  196. package/chunks/{spawnChannel-3R632QRM.js → spawnChannel-HQAM25DD.js} +28 -29
  197. package/chunks/{src-USZKPUOC.js → src-7ZBIMTJZ.js} +130 -51
  198. package/chunks/{standalone-update-L5XW3D7K.js → standalone-update-77457VVK.js} +28 -28
  199. package/chunks/{startInteractiveUI-CPZOL2WB.js → startInteractiveUI-S7WC6EZG.js} +2310 -1835
  200. package/chunks/{syntheticOutput-YKFNUQZD.js → syntheticOutput-ULOVVLY4.js} +3 -3
  201. package/chunks/{task-create-NUFOHU53.js → task-create-V2DCDSET.js} +7 -7
  202. package/chunks/{task-list-Z2IKQY3S.js → task-list-DPL5ZN55.js} +5 -5
  203. package/chunks/{task-stop-KQFIVQTJ.js → task-stop-CPEQWOT6.js} +2 -2
  204. package/chunks/{task-update-HKADXSTD.js → task-update-ZR45M5Q7.js} +7 -7
  205. package/chunks/{team-create-XXPRF3IQ.js → team-create-CO7HSUON.js} +26 -26
  206. package/chunks/{team-delete-SDNTGZLG.js → team-delete-HIWXCWJU.js} +5 -5
  207. package/chunks/{team-plan-approval-EOTTKHDW.js → team-plan-approval-QDZF5YZY.js} +26 -26
  208. package/chunks/{theme-manager-P6UITO2L.js → theme-manager-UTUT3I4P.js} +27 -27
  209. package/chunks/todoWrite-HK6B3RHJ.js +358 -0
  210. package/chunks/{tool-search-DDNGK2LR.js → tool-search-2UUORA35.js} +11 -11
  211. package/chunks/{total-session-admission-PL5N7DNY.js → total-session-admission-NTWG6G3F.js} +32 -34
  212. package/chunks/{trustedFolders-C5LMF3UR.js → trustedFolders-YF37ZCN5.js} +27 -27
  213. package/chunks/update-relaunch-QFNHPMZZ.js +87 -0
  214. package/chunks/{updateCheck-QTVVISH7.js → updateCheck-B6O42VMD.js} +30 -28
  215. package/chunks/{validateNonInterActiveAuth-RY4RKBQG.js → validateNonInterActiveAuth-SCIWJ4CX.js} +65 -65
  216. package/chunks/{version-U45RYOSD.js → version-7DA6LAI3.js} +1 -1
  217. package/chunks/{web-fetch-ZSPR3PRR.js → web-fetch-B62SJXM2.js} +5 -6
  218. package/chunks/{workflow-TCIAQYOA.js → workflow-Q5WG4THP.js} +27 -27
  219. package/chunks/{workspace-providers-status-I3G2HYLY.js → workspace-providers-status-WWLAGWQW.js} +34 -34
  220. package/chunks/{workspace-registration-store-IH5GLZ6Y.js → workspace-registration-store-BVYQVY2H.js} +1 -1
  221. package/chunks/{workspace-registry-QEKBELIX.js → workspace-registry-OD7ACADD.js} +32 -34
  222. package/chunks/{workspace-service-ORKHGLP3.js → workspace-service-4LYJWS63.js} +37 -38
  223. package/chunks/{workspace-skills-status-D7QCNDYY.js → workspace-skills-status-P2AQLZZS.js} +32 -32
  224. package/chunks/{write-file-JGRQR5VM.js → write-file-TEPGXNM3.js} +60 -27
  225. package/chunks/{zh-FSAH32JB.js → zh-E34DZ2S3.js} +12 -3
  226. package/chunks/{zh-TW-D2YIE2LO.js → zh-TW-PEI2ZWUR.js} +12 -3
  227. package/cli-entry.js +92 -8
  228. package/cli.js +11 -11
  229. package/locales/ca.js +12 -2
  230. package/locales/de.js +12 -2
  231. package/locales/en.js +20 -5
  232. package/locales/fr.js +12 -2
  233. package/locales/ja.js +12 -2
  234. package/locales/pt.js +12 -2
  235. package/locales/ru.js +12 -2
  236. package/locales/zh-TW.js +19 -3
  237. package/locales/zh.js +19 -3
  238. package/package.json +3 -3
  239. package/web-shell/assets/{arc-CUeDlxvE.js → arc-Dh-N5oEG.js} +1 -1
  240. package/web-shell/assets/{architectureDiagram-3BPJPVTR-PiUszkQA.js → architectureDiagram-3BPJPVTR-DBOQgtfF.js} +1 -1
  241. package/web-shell/assets/{blockDiagram-GPEHLZMM-s2wYSO7e.js → blockDiagram-GPEHLZMM-Dyxbuyju.js} +1 -1
  242. package/web-shell/assets/{c4Diagram-AAUBKEIU-DyLxZoz9.js → c4Diagram-AAUBKEIU-DCJR5HPT.js} +1 -1
  243. package/web-shell/assets/channel-DY0fkcKT.js +1 -0
  244. package/web-shell/assets/{chunk-2J33WTMH-Dsdai7Tk.js → chunk-2J33WTMH-BkMUcy3O.js} +1 -1
  245. package/web-shell/assets/{chunk-4BX2VUAB-DEosOjV7.js → chunk-4BX2VUAB-BSm4pLQk.js} +1 -1
  246. package/web-shell/assets/{chunk-55IACEB6-sNsRLTXf.js → chunk-55IACEB6-CuRr-XgW.js} +1 -1
  247. package/web-shell/assets/{chunk-727SXJPM-DkRNZzmh.js → chunk-727SXJPM-CLv7-w3t.js} +1 -1
  248. package/web-shell/assets/{chunk-AQP2D5EJ-BrsRNpzd.js → chunk-AQP2D5EJ-Cz_n3-JW.js} +1 -1
  249. package/web-shell/assets/{chunk-FMBD7UC4-CI039lpl.js → chunk-FMBD7UC4-CFT_62Hq.js} +1 -1
  250. package/web-shell/assets/{chunk-ND2GUHAM-M-pkeIfu.js → chunk-ND2GUHAM-DWz6DOZ6.js} +1 -1
  251. package/web-shell/assets/{chunk-QZHKN3VN-C4ckGNbH.js → chunk-QZHKN3VN-C-mRhUzw.js} +1 -1
  252. package/web-shell/assets/classDiagram-4FO5ZUOK-DBvJ6PZo.js +1 -0
  253. package/web-shell/assets/classDiagram-v2-Q7XG4LA2-DBvJ6PZo.js +1 -0
  254. package/web-shell/assets/{cose-bilkent-S5V4N54A-BciKUAFq.js → cose-bilkent-S5V4N54A-BqCZS3i1.js} +1 -1
  255. package/web-shell/assets/{dagre-BM42HDAG-C1nTSgU6.js → dagre-BM42HDAG-BGasdP8i.js} +1 -1
  256. package/web-shell/assets/{diagram-2AECGRRQ-BDPNWr1m.js → diagram-2AECGRRQ-BSyLDkMy.js} +1 -1
  257. package/web-shell/assets/{diagram-5GNKFQAL-CNFhTszL.js → diagram-5GNKFQAL-CM-ZJxWC.js} +1 -1
  258. package/web-shell/assets/{diagram-KO2AKTUF-CjPa4p5a.js → diagram-KO2AKTUF-wJdzt_C5.js} +1 -1
  259. package/web-shell/assets/{diagram-LMA3HP47-ZzPykSyG.js → diagram-LMA3HP47-DiH2fhpL.js} +1 -1
  260. package/web-shell/assets/{diagram-OG6HWLK6-0UVtZ9A4.js → diagram-OG6HWLK6-BZ9z1ZBl.js} +1 -1
  261. package/web-shell/assets/{erDiagram-TEJ5UH35-CajDZCat.js → erDiagram-TEJ5UH35-BsyWDziR.js} +1 -1
  262. package/web-shell/assets/{flowDiagram-I6XJVG4X-BRuFBIvL.js → flowDiagram-I6XJVG4X-CzdkxIrq.js} +1 -1
  263. package/web-shell/assets/{ganttDiagram-6RSMTGT7-BevGmJqG.js → ganttDiagram-6RSMTGT7-javIv2r2.js} +1 -1
  264. package/web-shell/assets/{gitGraphDiagram-PVQCEYII-DvPMpBMb.js → gitGraphDiagram-PVQCEYII-CjHstylC.js} +1 -1
  265. package/web-shell/assets/{index-DzHwQkQq.js → index-BnJGxpah.js} +1 -1
  266. package/web-shell/assets/index-DhXB9nTa.js +1161 -0
  267. package/web-shell/assets/index-vYHgZ7bL.css +5 -0
  268. package/web-shell/assets/{infoDiagram-5YYISTIA-Oixn7tA9.js → infoDiagram-5YYISTIA-yXuQsomo.js} +1 -1
  269. package/web-shell/assets/{ishikawaDiagram-YF4QCWOH-BgKpeg-j.js → ishikawaDiagram-YF4QCWOH-a85JhE6F.js} +1 -1
  270. package/web-shell/assets/{journeyDiagram-JHISSGLW-74mwxIaA.js → journeyDiagram-JHISSGLW-Dak_4BVj.js} +1 -1
  271. package/web-shell/assets/{kanban-definition-UN3LZRKU-D4D6cEqA.js → kanban-definition-UN3LZRKU-COA-LuCV.js} +1 -1
  272. package/web-shell/assets/{linear-atZRE_L2.js → linear-DNAAAQWq.js} +1 -1
  273. package/web-shell/assets/{mermaid.core-KKudX-JC.js → mermaid.core-7Ff3aIUD.js} +5 -5
  274. package/web-shell/assets/{mindmap-definition-RKZ34NQL-CMCej9yG.js → mindmap-definition-RKZ34NQL-_rCOIODU.js} +1 -1
  275. package/web-shell/assets/{pieDiagram-4H26LBE5-nhx40X7q.js → pieDiagram-4H26LBE5-C9QCQ8EW.js} +1 -1
  276. package/web-shell/assets/{quadrantDiagram-W4KKPZXB-CUmVcN3M.js → quadrantDiagram-W4KKPZXB-CsaE4FA8.js} +1 -1
  277. package/web-shell/assets/{requirementDiagram-4Y6WPE33-C_vyEwyy.js → requirementDiagram-4Y6WPE33-tV78naTg.js} +1 -1
  278. package/web-shell/assets/{sankeyDiagram-5OEKKPKP-DU6G4VWR.js → sankeyDiagram-5OEKKPKP-Dk3Rw7BZ.js} +1 -1
  279. package/web-shell/assets/{sequenceDiagram-3UESZ5HK-DdeRR_KJ.js → sequenceDiagram-3UESZ5HK-BGsAWcMX.js} +1 -1
  280. package/web-shell/assets/{stateDiagram-AJRCARHV-C6iCI8ps.js → stateDiagram-AJRCARHV-zSxdtdoB.js} +1 -1
  281. package/web-shell/assets/stateDiagram-v2-BHNVJYJU-vLEEtDpO.js +1 -0
  282. package/web-shell/assets/{timeline-definition-PNZ67QCA-B_Ea8Cb7.js → timeline-definition-PNZ67QCA-j0BQh9Go.js} +1 -1
  283. package/web-shell/assets/{vennDiagram-CIIHVFJN-BPUVZEJA.js → vennDiagram-CIIHVFJN-CRaUFFIu.js} +1 -1
  284. package/web-shell/assets/{wardley-L42UT6IY-BWEj0lKY.js → wardley-L42UT6IY-D7Py_ofm.js} +1 -1
  285. package/web-shell/assets/{wardleyDiagram-YWT4CUSO-BvDsdIQw.js → wardleyDiagram-YWT4CUSO-BrDIAZcp.js} +1 -1
  286. package/web-shell/assets/{xychartDiagram-2RQKCTM6-crz0QhF_.js → xychartDiagram-2RQKCTM6-Cecdw-w2.js} +1 -1
  287. package/web-shell/index.html +2 -2
  288. package/chunks/channel-worker-group-K7QKH6IG.js +0 -13
  289. package/chunks/chunk-2HRYPZT5.js +0 -25
  290. package/chunks/chunk-B7NUUEXC.js +0 -311
  291. package/chunks/chunk-CARU2RR2.js +0 -24
  292. package/chunks/chunk-GYTKQYDB.js +0 -23
  293. package/chunks/chunk-LQU7EVFA.js +0 -30
  294. package/chunks/chunk-OCPBI7J5.js +0 -18
  295. package/chunks/chunk-OJAMDVF5.js +0 -66
  296. package/chunks/chunk-QAW7PIHT.js +0 -168
  297. package/chunks/chunk-TEGEBB2I.js +0 -122
  298. package/chunks/daemon-status-provider-L4STG5VO.js +0 -76
  299. package/chunks/exitPlanMode-IHCJ5EEI.js +0 -909
  300. package/chunks/nonInteractiveCli-NSOB6D74.js +0 -129
  301. package/chunks/todoWrite-YNXB27GB.js +0 -531
  302. package/web-shell/assets/channel-DkuJJ0qd.js +0 -1
  303. package/web-shell/assets/classDiagram-4FO5ZUOK-CwqHc0TB.js +0 -1
  304. package/web-shell/assets/classDiagram-v2-Q7XG4LA2-CwqHc0TB.js +0 -1
  305. package/web-shell/assets/index-Cnvv4VcI.css +0 -5
  306. package/web-shell/assets/index-D1Uyklxa.js +0 -1088
  307. package/web-shell/assets/stateDiagram-v2-BHNVJYJU-C0_6nR6C.js +0 -1
@@ -771,7 +771,8 @@ var DaemonChannelBridge = class extends EventEmitter2 {
771
771
  workspaceCwd: cwd || this.options.cwd,
772
772
  modelServiceId: this.options.modelServiceId,
773
773
  sessionScope: this.options.sessionScope ?? "thread",
774
- ...options?.approvalMode ? { approvalMode: options.approvalMode } : {}
774
+ ...options?.approvalMode ? { approvalMode: options.approvalMode } : {},
775
+ ...options?.sourceId ? { sourceId: options.sourceId } : {}
775
776
  });
776
777
  if (lifecycleGeneration !== this.lifecycleGeneration) {
777
778
  await this.rejectStaleSession(session);
@@ -1080,6 +1081,10 @@ var DaemonChannelBridge = class extends EventEmitter2 {
1080
1081
  case "tool_call_update": {
1081
1082
  const toolCallId = getString(update["toolCallId"]);
1082
1083
  const kind = getString(update["kind"]);
1084
+ const meta = isRecord(update["_meta"]) ? update["_meta"] : void 0;
1085
+ if (!kind && toolCallId && getString(update["status"]) === "in_progress" && meta?.["shellProgress"] !== void 0) {
1086
+ break;
1087
+ }
1083
1088
  if (!toolCallId || !kind) {
1084
1089
  this.emitProtocolError(`Malformed daemon ${type} event`, update);
1085
1090
  break;
@@ -1996,7 +2001,7 @@ var SessionRouter = class {
1996
2001
  async createAndStoreSession(key, input, operation) {
1997
2002
  const loadWindow = this.beginSessionLoad();
1998
2003
  try {
1999
- const sessionId = await this.createLiveSession(input.cwd, loadWindow, key, this.sessionOptions(input.channelName), operation);
2004
+ const sessionId = await this.createLiveSession(input.cwd, loadWindow, key, this.sessionOptions(input.channelName), operation, input.channelName);
2000
2005
  try {
2001
2006
  this.assertOperationCurrent(operation);
2002
2007
  } catch (error) {
@@ -2052,7 +2057,7 @@ var SessionRouter = class {
2052
2057
  } catch (loadError) {
2053
2058
  this.assertOperationCurrent(operation);
2054
2059
  try {
2055
- const replacement = await this.createLiveSession(input.cwd, loadWindow, key, this.sessionOptions(input.channelName), operation);
2060
+ const replacement = await this.createLiveSession(input.cwd, loadWindow, key, this.sessionOptions(input.channelName), operation, input.channelName);
2056
2061
  try {
2057
2062
  this.assertOperationCurrent(operation);
2058
2063
  } catch (error) {
@@ -2418,11 +2423,11 @@ var SessionRouter = class {
2418
2423
  }
2419
2424
  }
2420
2425
  }
2421
- async createLiveSession(cwd, loadWindow, routingKey, options, operation) {
2426
+ async createLiveSession(cwd, loadWindow, routingKey, options, operation, sourceId) {
2422
2427
  const maxAttempts = 2;
2423
2428
  let lastDeadSessionId;
2424
2429
  for (let attempt = 0; attempt < maxAttempts; attempt++) {
2425
- const sessionId = await this.bridge.newSession(cwd, options, operation);
2430
+ const sessionId = await this.bridge.newSession(cwd, { ...options, sourceId }, operation);
2426
2431
  try {
2427
2432
  this.assertOperationCurrent(operation);
2428
2433
  } catch (error) {
@@ -2879,6 +2884,29 @@ var LIST_PATTERNS = [
2879
2884
  /^这个聊天你记住了什么[??]?$/u,
2880
2885
  /^what do you remember[??]?$/iu
2881
2886
  ];
2887
+ var LIST_PAGE_PATTERNS = [
2888
+ /^查看第\s*(\d+)\s*页记忆$/u,
2889
+ /^show memory page\s+(\d+)$/iu
2890
+ ];
2891
+ var INSPECT_PATTERNS = [
2892
+ /^查看记忆\s+(\S+)$/u,
2893
+ /^show memory\s+(\S+)$/iu
2894
+ ];
2895
+ var REMOVE_PATTERNS = [
2896
+ /^忘掉\s+(\S+)$/u,
2897
+ /^删除\s+(\S+)$/u,
2898
+ /^删掉\s+(\S+)$/u,
2899
+ /^forget\s+(\S+)$/iu,
2900
+ /^delete\s+(\S+)$/iu,
2901
+ /^remove\s+(\S+)$/iu
2902
+ ];
2903
+ var UPDATE_PATTERNS = [
2904
+ /^把\s+(\S+)\s+改成\s*(.+)$/su,
2905
+ /^更新\s+(\S+)\s+为\s*(.+)$/su,
2906
+ /^update\s+(\S+)\s+to\s+(.+)$/isu,
2907
+ /^change\s+(\S+)\s+to\s+(.+)$/isu
2908
+ ];
2909
+ var MEMORY_ID_PATTERN = /^m-[a-f0-9]{12}$/u;
2882
2910
  var CLEAR_REQUEST_PATTERNS = [
2883
2911
  /^清空记忆$/u,
2884
2912
  /^清除记忆$/u,
@@ -2891,31 +2919,76 @@ var CLEAR_CONFIRM_PATTERNS = [
2891
2919
  /^确认清除记忆$/u,
2892
2920
  /^confirm clear memory$/iu
2893
2921
  ];
2922
+ var UPDATE_CONFIRM_PATTERNS = [
2923
+ /^确认更新记忆$/u,
2924
+ /^confirm memory update$/iu
2925
+ ];
2926
+ var REMOVE_CONFIRM_PATTERNS = [
2927
+ /^确认删除记忆$/u,
2928
+ /^confirm memory removal$/iu
2929
+ ];
2894
2930
  function parseChannelMemoryIntent(text) {
2895
2931
  const trimmed = text.replace(PROMPT_UNSAFE_INVISIBLES, "").trim();
2896
2932
  if (!trimmed || trimmed.startsWith("/")) {
2897
2933
  return null;
2898
2934
  }
2935
+ for (const pattern of UPDATE_CONFIRM_PATTERNS) {
2936
+ if (pattern.test(trimmed)) {
2937
+ return { kind: "update_confirm" };
2938
+ }
2939
+ }
2940
+ for (const pattern of REMOVE_CONFIRM_PATTERNS) {
2941
+ if (pattern.test(trimmed)) {
2942
+ return { kind: "remove_confirm" };
2943
+ }
2944
+ }
2899
2945
  for (const pattern of CLEAR_CONFIRM_PATTERNS) {
2900
2946
  if (pattern.test(trimmed)) {
2901
2947
  return { kind: "clear_confirm" };
2902
2948
  }
2903
2949
  }
2950
+ for (const pattern of REMOVE_PATTERNS) {
2951
+ const match = trimmed.match(pattern);
2952
+ if (match?.[1] && MEMORY_ID_PATTERN.test(match[1])) {
2953
+ return { kind: "remove", id: match[1] };
2954
+ }
2955
+ }
2956
+ for (const pattern of UPDATE_PATTERNS) {
2957
+ const match = trimmed.match(pattern);
2958
+ const id = match?.[1];
2959
+ const updated = match?.[2]?.trim();
2960
+ if (id && updated && MEMORY_ID_PATTERN.test(id)) {
2961
+ return { kind: "update", id, text: updated };
2962
+ }
2963
+ }
2904
2964
  for (const pattern of CLEAR_REQUEST_PATTERNS) {
2905
2965
  if (pattern.test(trimmed)) {
2906
2966
  return { kind: "clear_request" };
2907
2967
  }
2908
2968
  }
2969
+ for (const pattern of INSPECT_PATTERNS) {
2970
+ const match = trimmed.match(pattern);
2971
+ if (match?.[1] && MEMORY_ID_PATTERN.test(match[1])) {
2972
+ return { kind: "inspect", id: match[1] };
2973
+ }
2974
+ }
2975
+ for (const pattern of LIST_PAGE_PATTERNS) {
2976
+ const match = trimmed.match(pattern);
2977
+ if (match?.[1]) {
2978
+ const page = Number(match[1]);
2979
+ return Number.isSafeInteger(page) && page > 0 ? { kind: "list", page } : null;
2980
+ }
2981
+ }
2909
2982
  for (const pattern of LIST_PATTERNS) {
2910
2983
  if (pattern.test(trimmed)) {
2911
- return { kind: "list" };
2984
+ return { kind: "list", page: 1 };
2912
2985
  }
2913
2986
  }
2914
2987
  for (const pattern of REMEMBER_PATTERNS) {
2915
2988
  const match = trimmed.match(pattern);
2916
2989
  const remembered = match?.[1]?.replace(PROMPT_UNSAFE_INVISIBLES, "").trim();
2917
2990
  if (remembered) {
2918
- return { kind: "remember", text: remembered };
2991
+ return { kind: "remember", texts: [remembered] };
2919
2992
  }
2920
2993
  }
2921
2994
  return null;
@@ -2930,8 +3003,10 @@ var GROUP_HISTORY_ENTRY_TEXT_LIMIT = 1e3;
2930
3003
  var GROUP_HISTORY_ENTRY_METADATA_LIMIT = 256;
2931
3004
  var LOOP_CANCEL_GRACE_MS = 5e3;
2932
3005
  var CHANNEL_MEMORY_PROMPT_CODE_POINT_LIMIT = 12e3;
3006
+ var CHANNEL_MEMORY_PAGE_SIZE = 20;
3007
+ var CHANNEL_MEMORY_PREVIEW_CODE_POINT_LIMIT = 160;
2933
3008
  var CHANNEL_MEMORY_CLASSIFIER_MIN_CONFIDENCE = 0.7;
2934
- var CHANNEL_MEMORY_CLASSIFIER_TRIGGER_RE = /(记住|记得|记一下|记忆|忘掉|忘记|清空|清除|删除|保存|remember|memory|forget)/iu;
3009
+ var CHANNEL_MEMORY_CLASSIFIER_TRIGGER_RE = /(?:记住|记得|记一下|记忆|忘掉|忘记|清空|清除|删除|删掉|改成|更新|刚才那条|保存|(?:只|仅)(?:看|列出)[\p{Script=Han}\s]{0,12}(?:偏好|习惯)|\b(?:remember|memory|forget|delete|remove|update|change)\b)/iu;
2935
3010
  var LOOP_TIMED_OUT_MESSAGE = "loop timed out";
2936
3011
  var DEBUG_PAYLOAD_ENV = "QWEN_CHANNEL_DEBUG_PAYLOAD";
2937
3012
  var DEBUG_PAYLOAD_LIMIT = 12e3;
@@ -3008,7 +3083,8 @@ var ChannelBase = class {
3008
3083
  * so a cleared session can't be resurrected by an already-queued prompt.
3009
3084
  */
3010
3085
  sessionGenerations = /* @__PURE__ */ new Map();
3011
- pendingClears = /* @__PURE__ */ new Map();
3086
+ pendingChannelMemoryMutations = /* @__PURE__ */ new Map();
3087
+ pendingChannelMemoryMutationDeliveries = /* @__PURE__ */ new Map();
3012
3088
  /** Per-session active prompt tracking for dispatch modes. */
3013
3089
  activePrompts = /* @__PURE__ */ new Map();
3014
3090
  /** Per-session message buffer for collect mode. */
@@ -3253,6 +3329,9 @@ var ChannelBase = class {
3253
3329
  supportsProactiveTarget(target) {
3254
3330
  return target.threadId === void 0;
3255
3331
  }
3332
+ supportsProactiveWebhookTarget(target) {
3333
+ return this.supportsProactiveTarget(target);
3334
+ }
3256
3335
  async pushProactive(target, text) {
3257
3336
  if (target.threadId) {
3258
3337
  throw new Error("Channel does not support proactive loop messages for threaded targets.");
@@ -3538,7 +3617,7 @@ ${sanitizePromptText(job.prompt)}`;
3538
3617
  throw new Error(`Unknown webhook source "${task.source}".`);
3539
3618
  }
3540
3619
  const target = resolveChannelWebhookTarget(this.name, this.config.webhooks, task.source, task.targetRef);
3541
- if (!this.supportsProactiveTarget(target)) {
3620
+ if (!this.supportsProactiveWebhookTarget(target)) {
3542
3621
  throw new Error("Channel does not support proactive webhook messages for this chat target.");
3543
3622
  }
3544
3623
  return target;
@@ -4169,30 +4248,6 @@ ${requestList}`);
4169
4248
  this.registerCommand("approve", (envelope, args) => this.handlePermissionResponseCommand(envelope, args, "approve"));
4170
4249
  this.registerCommand("approve-always", (envelope, args) => this.handlePermissionResponseCommand(envelope, args, "approve-always"));
4171
4250
  this.registerCommand("deny", (envelope, args) => this.handlePermissionResponseCommand(envelope, args, "deny"));
4172
- this.registerCommand("remember-channel", async (envelope, args) => {
4173
- const text = args.trim();
4174
- if (text === "") {
4175
- await this.sendMessage(envelope.chatId, "Usage: /remember-channel <text>");
4176
- return true;
4177
- }
4178
- await this.handleChannelMemoryIntent(envelope, {
4179
- kind: "remember",
4180
- text
4181
- });
4182
- return true;
4183
- });
4184
- this.registerCommand("channel-memory", async (envelope) => {
4185
- await this.handleChannelMemoryIntent(envelope, { kind: "list" });
4186
- return true;
4187
- });
4188
- this.registerCommand("forget-channel", async (envelope, args) => {
4189
- if (args.toLowerCase() !== "confirm") {
4190
- await this.sendMessage(envelope.chatId, 'This clears channel memory for this chat. Re-send with "confirm" (e.g. /forget-channel confirm) to proceed.');
4191
- return true;
4192
- }
4193
- await this.handleChannelMemoryIntent(envelope, { kind: "clear_confirm" }, { skipPendingClear: true });
4194
- return true;
4195
- });
4196
4251
  this.registerCommand("who", async (envelope) => {
4197
4252
  if (!this.isAuthorizedForSharedSession(envelope)) {
4198
4253
  await this.sendMessage(envelope.chatId, "Only authorized members can view this shared session.");
@@ -4647,10 +4702,126 @@ ${requestList}`);
4647
4702
  }
4648
4703
  return this.channelMemory;
4649
4704
  }
4650
- async handleChannelMemoryIntent(envelope, intent, options = {}) {
4705
+ entriesForChannelMemoryIds(entries, ids) {
4706
+ const selected = new Set(ids);
4707
+ return entries.filter((entry) => selected.has(entry.id));
4708
+ }
4709
+ renderChannelMemoryCandidate(entry) {
4710
+ const preview = truncateCodePoints(sanitizePromptText(entry.text).replace(/[\r\n]+/gu, " ").trim(), CHANNEL_MEMORY_PREVIEW_CODE_POINT_LIMIT);
4711
+ return `${entry.id} ${preview}`;
4712
+ }
4713
+ renderChannelMemoryCandidates(entries) {
4714
+ return entries.map((entry) => this.renderChannelMemoryCandidate(entry));
4715
+ }
4716
+ async handleChannelMemoryIntent(envelope, intent) {
4717
+ if (intent.kind === "no_match") {
4718
+ await this.sendMessage(envelope.chatId, "No matching channel memory entry.");
4719
+ return;
4720
+ }
4721
+ if (intent.kind === "ambiguous") {
4722
+ const channelMemory2 = await this.getChannelMemory(envelope);
4723
+ if (!channelMemory2)
4724
+ return;
4725
+ let entries;
4726
+ try {
4727
+ entries = await channelMemory2.listChannelMemoryEntries(this.channelMemoryTarget(envelope));
4728
+ } catch (error) {
4729
+ this.logChannelMemoryError("read", envelope, this.channelMemoryErrorMessage(error));
4730
+ await this.sendMessage(envelope.chatId, `Failed to read channel memory: ${this.channelMemoryUserErrorMessage()}`);
4731
+ return;
4732
+ }
4733
+ const selected = this.entriesForChannelMemoryIds(entries, intent.ids);
4734
+ await this.sendMessage(envelope.chatId, [
4735
+ "Multiple channel memory entries match:",
4736
+ ...this.renderChannelMemoryCandidates(selected)
4737
+ ].join("\n"));
4738
+ return;
4739
+ }
4740
+ if (intent.kind === "list_matches") {
4741
+ const channelMemory2 = await this.getChannelMemory(envelope);
4742
+ if (!channelMemory2)
4743
+ return;
4744
+ let entries;
4745
+ try {
4746
+ entries = await channelMemory2.listChannelMemoryEntries(this.channelMemoryTarget(envelope));
4747
+ } catch (error) {
4748
+ this.logChannelMemoryError("read", envelope, this.channelMemoryErrorMessage(error));
4749
+ await this.sendMessage(envelope.chatId, `Failed to read channel memory: ${this.channelMemoryUserErrorMessage()}`);
4750
+ return;
4751
+ }
4752
+ const selected = this.entriesForChannelMemoryIds(entries, intent.ids);
4753
+ await this.sendMessage(envelope.chatId, [
4754
+ "Channel memory (page 1/1):",
4755
+ ...this.renderChannelMemoryCandidates(selected)
4756
+ ].join("\n"));
4757
+ return;
4758
+ }
4651
4759
  if (intent.kind === "clear_request") {
4652
- this.setPendingClear(this.clearPendingKey(envelope));
4653
- await this.sendMessage(envelope.chatId, 'This clears channel memory for this chat. Say "\u786E\u8BA4\u6E05\u7A7A\u8BB0\u5FC6" or "confirm clear memory" to proceed.');
4760
+ await this.deliverPendingChannelMemoryMutation(envelope, { kind: "clear" }, 'This clears channel memory for this chat. Say "\u786E\u8BA4\u6E05\u7A7A\u8BB0\u5FC6" or "confirm clear memory" to proceed.');
4761
+ return;
4762
+ }
4763
+ if (intent.kind === "update_confirm" || intent.kind === "remove_confirm") {
4764
+ const pending = intent.kind === "update_confirm" ? this.takePendingChannelMemoryMutation(envelope, "update") : this.takePendingChannelMemoryMutation(envelope, "remove");
4765
+ if (!pending) {
4766
+ await this.sendMessage(envelope.chatId, intent.kind === "update_confirm" ? "No pending channel memory update. Start a new update request first." : "No pending channel memory removal. Start a new removal request first.");
4767
+ return;
4768
+ }
4769
+ const channelMemory2 = await this.getChannelMemory(envelope);
4770
+ if (!channelMemory2)
4771
+ return;
4772
+ const isUpdate = pending.kind === "update";
4773
+ let changed;
4774
+ try {
4775
+ if (isUpdate) {
4776
+ ({ changed } = await channelMemory2.updateChannelMemoryEntry(this.channelMemoryTarget(envelope), {
4777
+ id: pending.id,
4778
+ text: pending.proposedText,
4779
+ expectedText: pending.expectedText
4780
+ }));
4781
+ } else {
4782
+ ({ changed } = await channelMemory2.removeChannelMemoryEntries(this.channelMemoryTarget(envelope), {
4783
+ ids: [pending.id],
4784
+ expectedTextById: { [pending.id]: pending.expectedText }
4785
+ }));
4786
+ }
4787
+ } catch (error) {
4788
+ const message = this.channelMemoryErrorMessage(error);
4789
+ this.logChannelMemoryError(isUpdate ? "update" : "remove", envelope, message);
4790
+ await this.sendMessage(envelope.chatId, message === "Channel memory entry changed" ? "That channel memory entry changed since it was selected. View channel memory and start the operation again." : `Failed to ${isUpdate ? "update" : "remove"} channel memory: ${this.channelMemoryUserErrorMessage()}`);
4791
+ return;
4792
+ }
4793
+ if (!changed) {
4794
+ await this.sendMessage(envelope.chatId, `No channel memory entry ${pending.id}.`);
4795
+ return;
4796
+ }
4797
+ this.invalidateSessionContext(envelope);
4798
+ await this.sendMessage(envelope.chatId, `Channel memory ${pending.id} ${isUpdate ? "updated" : "removed"}.`);
4799
+ return;
4800
+ }
4801
+ if (intent.kind === "natural_update") {
4802
+ await this.deliverPendingChannelMemoryMutation(envelope, {
4803
+ kind: "update",
4804
+ id: intent.id,
4805
+ expectedText: intent.expectedText,
4806
+ proposedText: intent.text
4807
+ }, [
4808
+ `Update channel memory ${intent.id}?`,
4809
+ `Before: ${sanitizePromptText(intent.expectedText).trim()}`,
4810
+ `After: ${sanitizePromptText(intent.text).trim()}`,
4811
+ 'Say "\u786E\u8BA4\u66F4\u65B0\u8BB0\u5FC6" or "confirm memory update" within 60 seconds.'
4812
+ ].join("\n"));
4813
+ return;
4814
+ }
4815
+ if (intent.kind === "natural_remove") {
4816
+ await this.deliverPendingChannelMemoryMutation(envelope, {
4817
+ kind: "remove",
4818
+ id: intent.id,
4819
+ expectedText: intent.expectedText
4820
+ }, [
4821
+ `Remove channel memory ${intent.id}?`,
4822
+ sanitizePromptText(intent.expectedText).trim(),
4823
+ 'Say "\u786E\u8BA4\u5220\u9664\u8BB0\u5FC6" or "confirm memory removal" within 60 seconds.'
4824
+ ].join("\n"));
4654
4825
  return;
4655
4826
  }
4656
4827
  const channelMemory = await this.getChannelMemory(envelope);
@@ -4658,40 +4829,87 @@ ${requestList}`);
4658
4829
  return;
4659
4830
  }
4660
4831
  if (intent.kind === "remember") {
4832
+ let result;
4661
4833
  try {
4662
- await channelMemory.appendChannelMemory(this.channelMemoryTarget(envelope), intent.text);
4834
+ result = await channelMemory.addChannelMemoryEntries(this.channelMemoryTarget(envelope), intent.texts, envelope.senderId);
4663
4835
  } catch (error) {
4664
4836
  const message = this.channelMemoryErrorMessage(error);
4665
4837
  this.logChannelMemoryError("save", envelope, message);
4666
4838
  await this.sendMessage(envelope.chatId, `Failed to save channel memory: ${this.channelMemoryUserErrorMessage()}`);
4667
4839
  return;
4668
4840
  }
4669
- this.invalidateSessionContext(envelope);
4670
- await this.sendMessage(envelope.chatId, "Channel memory updated.");
4841
+ if (result.changed) {
4842
+ this.invalidateSessionContext(envelope);
4843
+ }
4844
+ if (result.added.length > 0) {
4845
+ const ids = result.added.map((entry) => entry.id);
4846
+ await this.sendMessage(envelope.chatId, result.duplicateIds.length > 0 ? `Channel memory saved: ${ids.join(", ")}. Skipped duplicates: ${result.duplicateIds.join(", ")}.` : ids.length === 1 ? `Channel memory ${ids[0]} saved.` : `Channel memory saved: ${ids.join(", ")}.`);
4847
+ } else if (result.duplicateIds.length > 0) {
4848
+ await this.sendMessage(envelope.chatId, `Channel memory already contains ${result.duplicateIds.join(", ")}.`);
4849
+ } else {
4850
+ await this.sendMessage(envelope.chatId, "Channel memory updated.");
4851
+ }
4671
4852
  return;
4672
4853
  }
4673
- if (intent.kind === "list") {
4674
- let text;
4854
+ if (intent.kind === "list" || intent.kind === "inspect") {
4855
+ let entries;
4675
4856
  try {
4676
- text = (await channelMemory.readChannelMemory(this.channelMemoryTarget(envelope))).trim();
4857
+ entries = await channelMemory.listChannelMemoryEntries(this.channelMemoryTarget(envelope));
4677
4858
  } catch (error) {
4678
4859
  const message = this.channelMemoryErrorMessage(error);
4679
4860
  this.logChannelMemoryError("read", envelope, message);
4680
4861
  await this.sendMessage(envelope.chatId, `Failed to read channel memory: ${this.channelMemoryUserErrorMessage()}`);
4681
4862
  return;
4682
4863
  }
4683
- await this.sendMessage(envelope.chatId, text === "" ? "No channel memory saved." : sanitizePromptText(text));
4864
+ if (intent.kind === "inspect") {
4865
+ const entry = entries.find((candidate) => candidate.id === intent.id);
4866
+ await this.sendMessage(envelope.chatId, entry ? `Channel memory ${entry.id}:
4867
+ ${sanitizePromptText(entry.text).trim()}` : `No channel memory entry ${intent.id}.`);
4868
+ return;
4869
+ }
4870
+ const totalPages = Math.max(1, Math.ceil(entries.length / CHANNEL_MEMORY_PAGE_SIZE));
4871
+ if (intent.page > totalPages) {
4872
+ await this.sendMessage(envelope.chatId, `Channel memory page ${intent.page} does not exist.`);
4873
+ return;
4874
+ }
4875
+ if (entries.length === 0) {
4876
+ await this.sendMessage(envelope.chatId, "No channel memory saved.");
4877
+ return;
4878
+ }
4879
+ const pageStart = (intent.page - 1) * CHANNEL_MEMORY_PAGE_SIZE;
4880
+ const lines = entries.slice(pageStart, pageStart + CHANNEL_MEMORY_PAGE_SIZE).map((entry) => this.renderChannelMemoryCandidate(entry));
4881
+ await this.sendMessage(envelope.chatId, [`Channel memory (page ${intent.page}/${totalPages}):`, ...lines].join("\n"));
4684
4882
  return;
4685
4883
  }
4686
- if (intent.kind === "clear_confirm") {
4687
- if (!options.skipPendingClear) {
4688
- const pendingKey = this.clearPendingKey(envelope);
4689
- const expiresAt = this.pendingClears.get(pendingKey);
4690
- this.pendingClears.delete(pendingKey);
4691
- if (expiresAt === void 0 || expiresAt < Date.now()) {
4692
- await this.sendMessage(envelope.chatId, 'No pending clear request. Say "\u6E05\u7A7A\u8BB0\u5FC6" first.');
4693
- return;
4884
+ if (intent.kind === "update" || intent.kind === "remove") {
4885
+ let changed;
4886
+ const isUpdate = intent.kind === "update";
4887
+ const id = intent.id;
4888
+ try {
4889
+ if (isUpdate) {
4890
+ ({ changed } = await channelMemory.updateChannelMemoryEntry(this.channelMemoryTarget(envelope), { id: intent.id, text: intent.text }));
4891
+ } else {
4892
+ ({ changed } = await channelMemory.removeChannelMemoryEntries(this.channelMemoryTarget(envelope), { ids: [intent.id] }));
4694
4893
  }
4894
+ } catch (error) {
4895
+ const message = this.channelMemoryErrorMessage(error);
4896
+ this.logChannelMemoryError(isUpdate ? "update" : "remove", envelope, message);
4897
+ await this.sendMessage(envelope.chatId, `Failed to ${isUpdate ? "update" : "remove"} channel memory: ${this.channelMemoryUserErrorMessage()}`);
4898
+ return;
4899
+ }
4900
+ if (!changed) {
4901
+ await this.sendMessage(envelope.chatId, `No channel memory entry ${id}.`);
4902
+ return;
4903
+ }
4904
+ this.invalidateSessionContext(envelope);
4905
+ await this.sendMessage(envelope.chatId, `Channel memory ${id} ${isUpdate ? "updated" : "removed"}.`);
4906
+ return;
4907
+ }
4908
+ if (intent.kind === "clear_confirm") {
4909
+ const pending = this.takePendingChannelMemoryMutation(envelope, "clear");
4910
+ if (!pending) {
4911
+ await this.sendMessage(envelope.chatId, 'No pending clear request. Say "\u6E05\u7A7A\u8BB0\u5FC6" first.');
4912
+ return;
4695
4913
  }
4696
4914
  let result;
4697
4915
  try {
@@ -4702,7 +4920,9 @@ ${requestList}`);
4702
4920
  await this.sendMessage(envelope.chatId, `Failed to clear channel memory: ${this.channelMemoryUserErrorMessage()}`);
4703
4921
  return;
4704
4922
  }
4705
- this.invalidateSessionContext(envelope);
4923
+ if (result.changed) {
4924
+ this.invalidateSessionContext(envelope);
4925
+ }
4706
4926
  await this.sendMessage(envelope.chatId, result.changed ? "Channel memory cleared." : "No channel memory saved.");
4707
4927
  return;
4708
4928
  }
@@ -4713,44 +4933,164 @@ ${requestList}`);
4713
4933
  const normalized = text.replace(PROMPT_UNSAFE_INVISIBLES, "").trim();
4714
4934
  return this.channelMemory !== void 0 && this.memoryIntentClassifier !== void 0 && !normalized.startsWith("/") && CHANNEL_MEMORY_CLASSIFIER_TRIGGER_RE.test(normalized);
4715
4935
  }
4716
- clearPendingKey(envelope) {
4717
- return `${this.name}:${envelope.chatId}:${envelope.threadId ?? ""}:${envelope.senderId ?? ""}`;
4936
+ channelMemoryPendingKey(envelope) {
4937
+ return JSON.stringify([
4938
+ this.name,
4939
+ envelope.chatId,
4940
+ envelope.threadId ?? null,
4941
+ envelope.senderId ?? null
4942
+ ]);
4718
4943
  }
4719
- setPendingClear(key) {
4944
+ async deliverPendingChannelMemoryMutation(envelope, mutation, message) {
4720
4945
  const now = Date.now();
4721
- for (const [pendingKey, expiresAt] of this.pendingClears) {
4722
- if (expiresAt < now) {
4723
- this.pendingClears.delete(pendingKey);
4946
+ for (const [pendingKey, pending] of this.pendingChannelMemoryMutations) {
4947
+ if (pending.expiresAt < now) {
4948
+ this.pendingChannelMemoryMutations.delete(pendingKey);
4949
+ }
4950
+ }
4951
+ this.deletePendingChannelMemoryMutation(envelope);
4952
+ const key = this.channelMemoryPendingKey(envelope);
4953
+ this.pendingChannelMemoryMutationDeliveries.set(key, mutation);
4954
+ try {
4955
+ await this.sendMessage(envelope.chatId, message);
4956
+ } catch (error) {
4957
+ if (this.pendingChannelMemoryMutationDeliveries.get(key) === mutation) {
4958
+ this.pendingChannelMemoryMutationDeliveries.delete(key);
4724
4959
  }
4960
+ throw error;
4961
+ }
4962
+ if (this.pendingChannelMemoryMutationDeliveries.get(key) !== mutation) {
4963
+ return;
4964
+ }
4965
+ this.pendingChannelMemoryMutationDeliveries.delete(key);
4966
+ this.pendingChannelMemoryMutations.set(key, {
4967
+ ...mutation,
4968
+ expiresAt: Date.now() + 6e4
4969
+ });
4970
+ }
4971
+ takePendingChannelMemoryMutation(envelope, kind) {
4972
+ const key = this.channelMemoryPendingKey(envelope);
4973
+ const pending = this.pendingChannelMemoryMutations.get(key);
4974
+ if (!pending) {
4975
+ return void 0;
4725
4976
  }
4726
- this.pendingClears.set(key, now + 6e4);
4977
+ if (pending.expiresAt < Date.now()) {
4978
+ this.pendingChannelMemoryMutations.delete(key);
4979
+ return void 0;
4980
+ }
4981
+ if (pending.kind !== kind) {
4982
+ return void 0;
4983
+ }
4984
+ this.pendingChannelMemoryMutations.delete(key);
4985
+ return pending;
4986
+ }
4987
+ deletePendingChannelMemoryMutation(envelope) {
4988
+ const key = this.channelMemoryPendingKey(envelope);
4989
+ this.pendingChannelMemoryMutations.delete(key);
4990
+ this.pendingChannelMemoryMutationDeliveries.delete(key);
4727
4991
  }
4728
- async classifyChannelMemoryIntent(text) {
4729
- if (!this.memoryIntentClassifier) {
4992
+ async classifyChannelMemoryIntent(envelope) {
4993
+ if (!this.memoryIntentClassifier || !this.channelMemory) {
4994
+ return null;
4995
+ }
4996
+ let entries;
4997
+ try {
4998
+ entries = await this.channelMemory.listChannelMemoryEntries(this.channelMemoryTarget(envelope));
4999
+ } catch (error) {
5000
+ this.logChannelMemoryError("read", envelope, this.channelMemoryErrorMessage(error));
4730
5001
  return null;
4731
5002
  }
4732
5003
  let classified;
4733
5004
  try {
4734
- classified = await this.memoryIntentClassifier.classifyChannelMemoryIntent(text);
5005
+ classified = await this.memoryIntentClassifier.classifyChannelMemoryIntent(envelope.text, entries);
4735
5006
  } catch (error) {
4736
5007
  process.stderr.write(`[${this.name}] channel memory intent classifier failed: ${sanitizeLogText(this.channelMemoryErrorMessage(error), 200)}
4737
5008
  `);
4738
5009
  return null;
4739
5010
  }
4740
- if (classified.confidence < CHANNEL_MEMORY_CLASSIFIER_MIN_CONFIDENCE) {
5011
+ try {
5012
+ if (typeof classified !== "object" || classified === null)
5013
+ return null;
5014
+ const result = classified;
5015
+ const confidence = result.confidence;
5016
+ if (typeof confidence !== "number" || !Number.isFinite(confidence) || confidence < 0 || confidence > 1 || confidence < CHANNEL_MEMORY_CLASSIFIER_MIN_CONFIDENCE) {
5017
+ return null;
5018
+ }
5019
+ const intent = result.intent;
5020
+ if (intent === "remember") {
5021
+ const hasMemory = Object.prototype.hasOwnProperty.call(result, "memory");
5022
+ const hasMemories = Object.prototype.hasOwnProperty.call(result, "memories");
5023
+ if (hasMemory === hasMemories)
5024
+ return null;
5025
+ let texts = [];
5026
+ if (hasMemory) {
5027
+ const memory2 = result.memory;
5028
+ texts = typeof memory2 === "string" ? [memory2.trim()] : [];
5029
+ } else {
5030
+ const memories = result.memories;
5031
+ if (Array.isArray(memories)) {
5032
+ const snapshot = Array.from(memories);
5033
+ if (snapshot.every((memory2) => typeof memory2 === "string")) {
5034
+ texts = snapshot.map((memory2) => memory2.trim());
5035
+ }
5036
+ }
5037
+ }
5038
+ return texts.length >= 1 && texts.length <= 10 && texts.every((text2) => text2.length > 0) ? { kind: "remember", texts } : null;
5039
+ }
5040
+ if (intent === "clear_all")
5041
+ return { kind: "clear_request" };
5042
+ if (intent !== "list" && intent !== "inspect" && intent !== "update" && intent !== "remove") {
5043
+ return null;
5044
+ }
5045
+ const targetIds = result.targetIds;
5046
+ if (intent === "list" && targetIds === void 0) {
5047
+ return { kind: "list", page: 1 };
5048
+ }
5049
+ if (!Array.isArray(targetIds))
5050
+ return null;
5051
+ const targetIdSnapshot = Array.from(targetIds);
5052
+ const entryById = new Map(entries.map((entry2) => [entry2.id, entry2]));
5053
+ if (!targetIdSnapshot.every((id) => typeof id === "string" && entryById.has(id)) || new Set(targetIdSnapshot).size !== targetIdSnapshot.length) {
5054
+ return null;
5055
+ }
5056
+ const resolvedEntries = this.entriesForChannelMemoryIds(entries, targetIdSnapshot);
5057
+ if (intent === "list") {
5058
+ return resolvedEntries.length === 0 ? { kind: "no_match" } : {
5059
+ kind: "list_matches",
5060
+ ids: resolvedEntries.map((entry2) => entry2.id)
5061
+ };
5062
+ }
5063
+ if (resolvedEntries.length === 0)
5064
+ return { kind: "no_match" };
5065
+ if (resolvedEntries.length > 1) {
5066
+ return {
5067
+ kind: "ambiguous",
5068
+ ids: resolvedEntries.map((entry2) => entry2.id)
5069
+ };
5070
+ }
5071
+ const entry = resolvedEntries[0];
5072
+ if (intent === "inspect")
5073
+ return { kind: "inspect", id: entry.id };
5074
+ if (intent === "remove") {
5075
+ return {
5076
+ kind: "natural_remove",
5077
+ id: entry.id,
5078
+ expectedText: entry.text
5079
+ };
5080
+ }
5081
+ const memory = result.memory;
5082
+ const text = typeof memory === "string" ? memory.trim() : "";
5083
+ return text ? {
5084
+ kind: "natural_update",
5085
+ id: entry.id,
5086
+ text,
5087
+ expectedText: entry.text
5088
+ } : null;
5089
+ } catch (error) {
5090
+ process.stderr.write(`[${this.name}] channel memory intent validation failed: ${sanitizeLogText(this.channelMemoryErrorMessage(error), 200)}
5091
+ `);
4741
5092
  return null;
4742
5093
  }
4743
- if (classified.intent === "remember") {
4744
- const memory = classified.memory?.trim();
4745
- return memory ? { kind: "remember", text: memory } : null;
4746
- }
4747
- if (classified.intent === "list") {
4748
- return { kind: "list" };
4749
- }
4750
- if (classified.intent === "clear_all") {
4751
- return { kind: "clear_request" };
4752
- }
4753
- return null;
4754
5094
  }
4755
5095
  channelMemoryErrorMessage(error) {
4756
5096
  return error instanceof Error ? error.message : String(error);
@@ -5080,8 +5420,11 @@ ${promptText}`;
5080
5420
  throw new Error("processInbound called without a successful preflightInbound check.");
5081
5421
  }
5082
5422
  let memoryIntent = parseChannelMemoryIntent(envelope.text);
5423
+ if (memoryIntent?.kind === "update" || memoryIntent?.kind === "remove") {
5424
+ this.deletePendingChannelMemoryMutation(envelope);
5425
+ }
5083
5426
  if (!memoryIntent && this.shouldClassifyChannelMemoryIntent(envelope.text)) {
5084
- memoryIntent = await this.classifyChannelMemoryIntent(envelope.text);
5427
+ memoryIntent = await this.classifyChannelMemoryIntent(envelope);
5085
5428
  }
5086
5429
  if (memoryIntent) {
5087
5430
  await this.handleChannelMemoryIntent(envelope, memoryIntent);