@qwen-code/qwen-code 0.19.6-nightly.20260706.47f62a466 → 0.19.6-preview.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (213) hide show
  1. package/bundled/qc-helper/docs/features/channels/_meta.ts +1 -0
  2. package/bundled/qc-helper/docs/features/channels/overview.md +17 -9
  3. package/bundled/qc-helper/docs/features/channels/wecom.md +111 -0
  4. package/bundled/qc-helper/docs/features/code-review.md +16 -6
  5. package/bundled/qc-helper/docs/features/hooks.md +6 -0
  6. package/bundled/qc-helper/docs/integration-github-action.md +1 -1
  7. package/bundled/review/DESIGN.md +27 -18
  8. package/bundled/review/SKILL.md +37 -4
  9. package/chunks/{MaxSizedBox-JCOL4CAA.js → MaxSizedBox-2JOX4MMR.js} +11 -10
  10. package/chunks/{StandaloneSessionPicker-BLFN63BV.js → StandaloneSessionPicker-Z2G37ETA.js} +24 -22
  11. package/chunks/{acpAgent-3KQMM3LN.js → acpAgent-MQJT2H4Y.js} +103 -61
  12. package/chunks/{agent-3SQT4Q6F.js → agent-HEVJ76EO.js} +6 -7
  13. package/chunks/{agent-headless-XMYIIWGF.js → agent-headless-UNB5SWYC.js} +6 -7
  14. package/chunks/{anthropicContentGenerator-L7J7PVYL.js → anthropicContentGenerator-AKYPSZIV.js} +3 -3
  15. package/chunks/{artifact-tool-H2TNPNP5.js → artifact-tool-D233YJFH.js} +25 -6
  16. package/chunks/{bridge-VL53WCNP.js → bridge-GX2LGQDS.js} +11 -10
  17. package/chunks/{channel-worker-supervisor-B7MSMB5K.js → channel-worker-supervisor-CRCVYQIE.js} +1 -1
  18. package/chunks/{chunk-6T6SXQNR.js → chunk-27QGW3BK.js} +5 -5
  19. package/chunks/{chunk-YMVK4LS2.js → chunk-2D5Q33PT.js} +3 -3
  20. package/chunks/{chunk-IKCFWN3Y.js → chunk-2MDHTI6A.js} +2 -2
  21. package/chunks/{chunk-BBKXTYL6.js → chunk-2MJAXDFK.js} +6 -6
  22. package/chunks/{chunk-WSVZFWN4.js → chunk-2NPS2UDH.js} +305 -97
  23. package/chunks/{chunk-HALA655G.js → chunk-2X3ZVAAT.js} +2 -2
  24. package/chunks/chunk-332PWN27.js +19 -0
  25. package/chunks/{chunk-ACD5DFUY.js → chunk-3B26UVCX.js} +130 -24
  26. package/chunks/{chunk-Z7RPIVIC.js → chunk-43W4YSO6.js} +1 -12
  27. package/chunks/{chunk-3QAQS4IM.js → chunk-44NROQYV.js} +4 -2
  28. package/chunks/{chunk-N7K5TYQW.js → chunk-4XV2MRNK.js} +1 -1
  29. package/chunks/{chunk-VCHDUDLM.js → chunk-5HMMLTUD.js} +11 -11
  30. package/chunks/{chunk-JZLDAWNW.js → chunk-5IGNZP2J.js} +1 -1
  31. package/chunks/{chunk-NCFVPWRR.js → chunk-6GHEZDDX.js} +1 -1
  32. package/chunks/{chunk-AQOYX6KA.js → chunk-7O6DD2ES.js} +1 -1
  33. package/chunks/{chunk-SN3W7PFN.js → chunk-7R62CLMI.js} +4 -4
  34. package/chunks/{chunk-FB75L4ZI.js → chunk-7SAH6M3Y.js} +3 -3
  35. package/chunks/{chunk-RMIXI7TN.js → chunk-7VCI24VZ.js} +4 -107
  36. package/chunks/chunk-A2X3KLC3.js +3807 -0
  37. package/chunks/chunk-A3ZQMFO6.js +949 -0
  38. package/chunks/{chunk-B7E6VU5A.js → chunk-A7UKINBT.js} +7 -7
  39. package/chunks/{chunk-VDTH6RD3.js → chunk-ADO6IDOZ.js} +15 -9
  40. package/chunks/{chunk-FDVILPGP.js → chunk-AJ3CEJRJ.js} +10 -5
  41. package/chunks/{chunk-NCFY7PWS.js → chunk-CCGOFQV3.js} +51 -2
  42. package/chunks/{chunk-HSO66R46.js → chunk-DB7CZERZ.js} +1 -1
  43. package/chunks/{chunk-LAW3LHN6.js → chunk-DF74IL3R.js} +67 -42
  44. package/chunks/{chunk-U3RZKQXS.js → chunk-FCEHOKYP.js} +5 -5
  45. package/chunks/{chunk-OQLSVZAA.js → chunk-FRR5I3SQ.js} +1 -1
  46. package/chunks/{chunk-NFE3DQ4R.js → chunk-FV7425LN.js} +36 -1
  47. package/chunks/{chunk-NOAYCIDS.js → chunk-GPLKAQUX.js} +8 -8
  48. package/chunks/{chunk-VS64QG5I.js → chunk-GV2S4F6Q.js} +12 -4
  49. package/chunks/{chunk-ZNUVV3IQ.js → chunk-GW67O5SO.js} +1 -1
  50. package/chunks/{chunk-6QXGBCAH.js → chunk-HW4N45EE.js} +1 -45
  51. package/chunks/{chunk-OGC64RKC.js → chunk-IFDJAMJW.js} +484 -1222
  52. package/chunks/{chunk-7AEMHW7Y.js → chunk-ILFQAFWH.js} +1 -1
  53. package/chunks/chunk-JYFZFWSL.js +167 -0
  54. package/chunks/{chunk-JZGYH2ST.js → chunk-K56RTEBN.js} +1 -1
  55. package/chunks/chunk-LGFAYIKX.js +115 -0
  56. package/chunks/{chunk-QR2KK6CG.js → chunk-LLTFLVFK.js} +4 -4
  57. package/chunks/{chunk-654I2NBH.js → chunk-MZWODTEA.js} +5 -13
  58. package/chunks/{chunk-FCCBH56M.js → chunk-N33JAGJ7.js} +812 -78
  59. package/chunks/{chunk-K2KVPZM5.js → chunk-NVQVIJMO.js} +112 -42
  60. package/chunks/{chunk-LH6D765T.js → chunk-O6T7PBUM.js} +30 -6
  61. package/chunks/{chunk-QOKVIOLW.js → chunk-P452E6XF.js} +2 -2
  62. package/chunks/chunk-PS2NG7KU.js +262 -0
  63. package/chunks/{chunk-RG6ZAMMW.js → chunk-QM4FKX7H.js} +2 -2
  64. package/chunks/chunk-RODQXLGZ.js +28 -0
  65. package/chunks/{chunk-KSPVDFE4.js → chunk-SAIILPQ3.js} +0 -3
  66. package/chunks/{chunk-5QNTAU44.js → chunk-SJ3QRPN2.js} +14 -8
  67. package/chunks/{chunk-FTXYSZOJ.js → chunk-SKO6VJHG.js} +16 -4
  68. package/chunks/{chunk-66KNL43D.js → chunk-TBAZMRW3.js} +1 -1
  69. package/chunks/{chunk-KDCCKYPM.js → chunk-TPTG52XG.js} +1 -1
  70. package/chunks/chunk-UIDXQNMV.js +13 -0
  71. package/chunks/chunk-VP2FB7OC.js +8223 -0
  72. package/chunks/{chunk-QLEBY26M.js → chunk-WKBA74DD.js} +1 -1
  73. package/chunks/{chunk-XRKPKL3R.js → chunk-WKTLDGD6.js} +1 -1
  74. package/chunks/{chunk-O2I6MGPK.js → chunk-WRLMLPWI.js} +3 -3
  75. package/chunks/{chunk-PRO3AHV3.js → chunk-XXICIIS5.js} +5 -5
  76. package/chunks/{chunk-GIXLNFID.js → chunk-Y3QQV7WE.js} +2 -2
  77. package/chunks/{chunk-LTDPXBIJ.js → chunk-ZKX7IBXU.js} +4 -4
  78. package/chunks/{chunk-J7JIBDUN.js → chunk-ZOSL7K3L.js} +221 -42
  79. package/chunks/{chunk-4VVDPKQ6.js → chunk-ZWFS7YCB.js} +4941 -3908
  80. package/chunks/{computer-use-JZO5THQ4.js → computer-use-IQ46C3YP.js} +6 -7
  81. package/chunks/{contextCommand-B3US3GS2.js → contextCommand-TTT6AP2W.js} +10 -10
  82. package/chunks/{cron-create-O6ZHD3JN.js → cron-create-JSXEIPVS.js} +1 -1
  83. package/chunks/{cron-delete-BFD5B2XX.js → cron-delete-OIFVEPGU.js} +1 -1
  84. package/chunks/{cron-list-KI6FV4KN.js → cron-list-D4ZX4IOE.js} +8 -4
  85. package/chunks/{daemon-WQXSK7GF.js → daemon-F3I2RXP6.js} +59 -3
  86. package/chunks/{daemon-status-provider-FYMIAJ74.js → daemon-status-provider-5GAWK65R.js} +13 -13
  87. package/chunks/dist-573HNSVO.js +3217 -0
  88. package/chunks/{dist-VHBP2PIG.js → dist-FQ5WRJPL.js} +2 -2
  89. package/chunks/{dist-LPVU3L2M.js → dist-IMFFBMAT.js} +6 -3792
  90. package/chunks/{dist-7GU63KI5.js → dist-OT7G2WNM.js} +1 -1
  91. package/chunks/{dist-H4HHZYCI.js → dist-PKFTNUHO.js} +2 -2
  92. package/chunks/{dist-3UDX5T4T.js → dist-YTRKAVUB.js} +1 -1
  93. package/chunks/{earlyInputCapture-5GY56LUS.js → earlyInputCapture-LAGZUGGV.js} +6 -7
  94. package/chunks/{edit-A26XF3GQ.js → edit-Q5BUQC2S.js} +6 -7
  95. package/chunks/{en-AXARKOWO.js → en-GA2RMXY5.js} +5 -1
  96. package/chunks/{enter-worktree-LXWZ7LPU.js → enter-worktree-DC4FHMVF.js} +6 -7
  97. package/chunks/{enterPlanMode-OZPTJ4LY.js → enterPlanMode-5BGJBWIY.js} +6 -7
  98. package/chunks/{errors-HC6JMZ7A.js → errors-EGX5DECS.js} +8 -9
  99. package/chunks/{exit-worktree-5SMO7MH5.js → exit-worktree-2EOSZNZI.js} +6 -7
  100. package/chunks/{exitPlanMode-EFPLGAND.js → exitPlanMode-JAQ35ELJ.js} +6 -7
  101. package/chunks/{fast-path-TF2IF5WZ.js → fast-path-QEWDA6O6.js} +5 -2
  102. package/chunks/{fr-MBMNQSQ6.js → fr-GWNQG4XH.js} +4 -0
  103. package/chunks/{gemini-XTISXYIY.js → gemini-TQ5XANRS.js} +64 -188
  104. package/chunks/{geminiContentGenerator-5W62YCSD.js → geminiContentGenerator-DCM2XGDQ.js} +1 -1
  105. package/chunks/{glob-YVWLTWR4.js → glob-7JLTQ4IQ.js} +6 -7
  106. package/chunks/{grep-TMLRZONJ.js → grep-CAUXEO7Q.js} +6 -7
  107. package/chunks/handleAutoUpdate-XKXULZQX.js +65 -0
  108. package/chunks/{initializer-7SJAWILK.js → initializer-3NRWU5JV.js} +12 -11
  109. package/chunks/{ja-HFV5QCHR.js → ja-2HOTA47X.js} +4 -0
  110. package/chunks/{list-JE74WAG2.js → list-NWO6QBDQ.js} +12 -13
  111. package/chunks/{loadedSettingsAdapter-R3DCJQ5W.js → loadedSettingsAdapter-PJ77LGFS.js} +10 -11
  112. package/chunks/{loop-wakeup-CUVIY2JY.js → loop-wakeup-OHWEMFP5.js} +2 -2
  113. package/chunks/{mcp-AJ2ZHF2N.js → mcp-VFEHVF5A.js} +10 -11
  114. package/chunks/{monitor-UH6ORENE.js → monitor-FY2ITVSC.js} +14 -10
  115. package/chunks/{nonInteractiveCli-CCYM24DQ.js → nonInteractiveCli-KPCXTVWY.js} +41 -37
  116. package/chunks/{notebook-edit-VW6QKDC6.js → notebook-edit-BSJMXIWX.js} +6 -7
  117. package/chunks/{openaiContentGenerator-2HIY7ZUY.js → openaiContentGenerator-BA6NWY4S.js} +5 -6
  118. package/chunks/{pidfile-QGNMZ5SP.js → pidfile-WXMRN6QF.js} +6 -7
  119. package/chunks/{qwenContentGenerator-JFQNSKW4.js → qwenContentGenerator-U4ZSLGFN.js} +8 -9
  120. package/chunks/{read-file-LTJRKWK2.js → read-file-VMVHNOMA.js} +2 -2
  121. package/chunks/{ripGrep-X65NYSFJ.js → ripGrep-NC6MUWXN.js} +6 -7
  122. package/chunks/{run-qwen-serve-CLVQV6WU.js → run-qwen-serve-NQH6LQTH.js} +144 -27
  123. package/chunks/{scheduler-NUTJ4FRU.js → scheduler-35T3E2UQ.js} +6 -7
  124. package/chunks/{serve-4DVF5UCI.js → serve-C36LOB5N.js} +10 -11
  125. package/chunks/{server-ZFRDBIFR.js → server-TDFPIDC3.js} +1342 -160
  126. package/chunks/{session-YQPMXZCZ.js → session-STHNQGRJ.js} +42 -38
  127. package/chunks/{settings-2P6SMCR5.js → settings-GIE22AYF.js} +9 -10
  128. package/chunks/{shell-5V6CJVMZ.js → shell-JD52AIMU.js} +6 -7
  129. package/chunks/{skill-YCDQKIQQ.js → skill-L4IFKRQ5.js} +14 -4
  130. package/chunks/{spawnChannel-NEOZMKQL.js → spawnChannel-HGMOEPM7.js} +8 -9
  131. package/chunks/{src-OSBARWA7.js → src-3SNF3G3V.js} +40 -17
  132. package/chunks/{startInteractiveUI-YKNL25BC.js → startInteractiveUI-C7DCDHGF.js} +5011 -13181
  133. package/chunks/{team-create-DWR5UZIT.js → team-create-NYL7KAMA.js} +6 -7
  134. package/chunks/{team-plan-approval-IVROZF6V.js → team-plan-approval-LH65JBEH.js} +6 -7
  135. package/chunks/{theme-manager-C5E2HDJG.js → theme-manager-ANKQO5DR.js} +6 -7
  136. package/chunks/{tool-search-YX2YOBFJ.js → tool-search-WZEGJFO4.js} +4 -21
  137. package/chunks/{trustedFolders-7KI7ETLR.js → trustedFolders-HECAG3S3.js} +7 -8
  138. package/chunks/updateCheck-72BBAE5V.js +65 -0
  139. package/chunks/{validateNonInterActiveAuth-JUTUFRSI.js → validateNonInterActiveAuth-PDQCPSNA.js} +38 -34
  140. package/chunks/{version-4DEOOFHV.js → version-VSEUTPNM.js} +2 -1
  141. package/chunks/{workflow-FSJVAP5Q.js → workflow-DPF2CL7U.js} +7 -8
  142. package/chunks/{workspace-providers-status-YBIB2D77.js → workspace-providers-status-TQ23DQ2D.js} +12 -13
  143. package/chunks/{workspace-service-K27FZHY6.js → workspace-service-D34UDMEY.js} +14 -15
  144. package/chunks/{workspace-skills-status-QKXCNLVT.js → workspace-skills-status-4DR5UNNC.js} +11 -12
  145. package/chunks/{write-file-7XMET6EL.js → write-file-VFNAKGYM.js} +6 -7
  146. package/chunks/{zh-RS3HZHFH.js → zh-7XVVRTDH.js} +5 -1
  147. package/chunks/{zh-TW-L5GRQ4S4.js → zh-TW-DPH554OG.js} +5 -1
  148. package/cli.js +11 -11
  149. package/locales/en.js +8 -2
  150. package/locales/fr.js +6 -0
  151. package/locales/ja.js +6 -0
  152. package/locales/zh-TW.js +8 -2
  153. package/locales/zh.js +8 -2
  154. package/node_modules/@qwen-code/audio-capture/package.json +1 -1
  155. package/node_modules/@qwen-code/audio-capture/prebuilds/darwin-arm64/@qwen-code+audio-capture.node +0 -0
  156. package/node_modules/@qwen-code/audio-capture/prebuilds/darwin-x64/@qwen-code+audio-capture.node +0 -0
  157. package/node_modules/@qwen-code/audio-capture/prebuilds/win32-x64/@qwen-code+audio-capture.node +0 -0
  158. package/package.json +3 -3
  159. package/web-shell/assets/{arc-DsvupRmw.js → arc-C7hjaa7g.js} +1 -1
  160. package/web-shell/assets/{architectureDiagram-3BPJPVTR-BwogiDi8.js → architectureDiagram-3BPJPVTR-pm9KtMZY.js} +1 -1
  161. package/web-shell/assets/{blockDiagram-GPEHLZMM-BibxECWL.js → blockDiagram-GPEHLZMM-CApElKsU.js} +1 -1
  162. package/web-shell/assets/{c4Diagram-AAUBKEIU-7cCkrqli.js → c4Diagram-AAUBKEIU-BeDe0-9N.js} +1 -1
  163. package/web-shell/assets/channel-BNf1dW-j.js +1 -0
  164. package/web-shell/assets/{chunk-2J33WTMH-DVJvJrzC.js → chunk-2J33WTMH-DJEkmLdl.js} +1 -1
  165. package/web-shell/assets/{chunk-4BX2VUAB-BFd1gVwi.js → chunk-4BX2VUAB-DXX8gdpe.js} +1 -1
  166. package/web-shell/assets/{chunk-55IACEB6-BW2NnZiy.js → chunk-55IACEB6-DORmk1kQ.js} +1 -1
  167. package/web-shell/assets/{chunk-727SXJPM-FUpKPObH.js → chunk-727SXJPM-DWmO4mCZ.js} +1 -1
  168. package/web-shell/assets/{chunk-AQP2D5EJ-DqoSTkq2.js → chunk-AQP2D5EJ-C7LRaYw2.js} +1 -1
  169. package/web-shell/assets/{chunk-FMBD7UC4-D6Tt9URv.js → chunk-FMBD7UC4-CCdXgyC5.js} +1 -1
  170. package/web-shell/assets/{chunk-ND2GUHAM-B9pTpaYB.js → chunk-ND2GUHAM-SyL_xvWc.js} +1 -1
  171. package/web-shell/assets/{chunk-QZHKN3VN-KJs617M2.js → chunk-QZHKN3VN-BzOuCKxa.js} +1 -1
  172. package/web-shell/assets/classDiagram-4FO5ZUOK-uOIGlzgi.js +1 -0
  173. package/web-shell/assets/classDiagram-v2-Q7XG4LA2-uOIGlzgi.js +1 -0
  174. package/web-shell/assets/{cose-bilkent-S5V4N54A-B-pCB_lI.js → cose-bilkent-S5V4N54A-BMPWyDKc.js} +1 -1
  175. package/web-shell/assets/{dagre-BM42HDAG-pCqrm_dE.js → dagre-BM42HDAG-B_GnPWik.js} +1 -1
  176. package/web-shell/assets/{diagram-2AECGRRQ-CJd4RXQc.js → diagram-2AECGRRQ-fJqMc3S_.js} +1 -1
  177. package/web-shell/assets/{diagram-5GNKFQAL-CP0ntTEt.js → diagram-5GNKFQAL-ximV3O9D.js} +1 -1
  178. package/web-shell/assets/{diagram-KO2AKTUF-HKMjC8U_.js → diagram-KO2AKTUF-2vVyjzqw.js} +1 -1
  179. package/web-shell/assets/{diagram-LMA3HP47-BnUMTzxK.js → diagram-LMA3HP47-Dckcx1sT.js} +1 -1
  180. package/web-shell/assets/{diagram-OG6HWLK6-CY2kjke3.js → diagram-OG6HWLK6-BAVv47ga.js} +1 -1
  181. package/web-shell/assets/{erDiagram-TEJ5UH35-Q-P2C_2c.js → erDiagram-TEJ5UH35-Bn3nf5J0.js} +1 -1
  182. package/web-shell/assets/{flowDiagram-I6XJVG4X-D5dDqv6k.js → flowDiagram-I6XJVG4X-BIbGF9JT.js} +1 -1
  183. package/web-shell/assets/{ganttDiagram-6RSMTGT7-D6e_nLNG.js → ganttDiagram-6RSMTGT7-CDbhb3AH.js} +1 -1
  184. package/web-shell/assets/{gitGraphDiagram-PVQCEYII-Cagi_aG2.js → gitGraphDiagram-PVQCEYII-CbKG1a_w.js} +1 -1
  185. package/web-shell/assets/index-CnE2ur2L.js +779 -0
  186. package/web-shell/assets/index-hSKXrlSE.css +5 -0
  187. package/web-shell/assets/{infoDiagram-5YYISTIA-CCRsrfey.js → infoDiagram-5YYISTIA-DUFxTy8m.js} +1 -1
  188. package/web-shell/assets/{ishikawaDiagram-YF4QCWOH-o1nEXhOa.js → ishikawaDiagram-YF4QCWOH-D69hrBG8.js} +1 -1
  189. package/web-shell/assets/{journeyDiagram-JHISSGLW-yNY7DUDz.js → journeyDiagram-JHISSGLW-DsvEw51Y.js} +1 -1
  190. package/web-shell/assets/{kanban-definition-UN3LZRKU-C2CG5vmP.js → kanban-definition-UN3LZRKU-lFFjZEYd.js} +1 -1
  191. package/web-shell/assets/{linear-Jsjhveg2.js → linear-Bo5bWzvo.js} +1 -1
  192. package/web-shell/assets/{mermaid.core-CCrKRcoG.js → mermaid.core-C_HKMJx5.js} +5 -5
  193. package/web-shell/assets/{mindmap-definition-RKZ34NQL-C8yHT5I5.js → mindmap-definition-RKZ34NQL-DlV-NUTs.js} +1 -1
  194. package/web-shell/assets/{pieDiagram-4H26LBE5-BnVzUzO5.js → pieDiagram-4H26LBE5-B2e6FH2a.js} +1 -1
  195. package/web-shell/assets/{quadrantDiagram-W4KKPZXB-EP9K_nK2.js → quadrantDiagram-W4KKPZXB-D75kSk-b.js} +1 -1
  196. package/web-shell/assets/{requirementDiagram-4Y6WPE33-D_Q9FvKR.js → requirementDiagram-4Y6WPE33-CQ6xakhM.js} +1 -1
  197. package/web-shell/assets/{sankeyDiagram-5OEKKPKP-Bh08id0J.js → sankeyDiagram-5OEKKPKP-J_XTKrcY.js} +1 -1
  198. package/web-shell/assets/{sequenceDiagram-3UESZ5HK-Btm9ZGN_.js → sequenceDiagram-3UESZ5HK-D7jTcBtf.js} +1 -1
  199. package/web-shell/assets/{stateDiagram-AJRCARHV-CR9Ym-Fy.js → stateDiagram-AJRCARHV-CrlM_OT3.js} +1 -1
  200. package/web-shell/assets/stateDiagram-v2-BHNVJYJU-Bs4TK_84.js +1 -0
  201. package/web-shell/assets/{timeline-definition-PNZ67QCA-TUsY0ZLs.js → timeline-definition-PNZ67QCA-5oZi76Ef.js} +1 -1
  202. package/web-shell/assets/{vennDiagram-CIIHVFJN-DqzVmJAq.js → vennDiagram-CIIHVFJN-DO5YptPK.js} +1 -1
  203. package/web-shell/assets/{wardley-L42UT6IY-DlUQaEG_.js → wardley-L42UT6IY-4t1eJDvM.js} +1 -1
  204. package/web-shell/assets/{wardleyDiagram-YWT4CUSO-mvwPkaJp.js → wardleyDiagram-YWT4CUSO-DKZc661S.js} +1 -1
  205. package/web-shell/assets/{xychartDiagram-2RQKCTM6-CJfXdkkx.js → xychartDiagram-2RQKCTM6-su9hp08G.js} +1 -1
  206. package/web-shell/index.html +2 -2
  207. package/chunks/chunk-QT7XKZT7.js +0 -293
  208. package/web-shell/assets/channel-Bhs5kHEh.js +0 -1
  209. package/web-shell/assets/classDiagram-4FO5ZUOK-BGHJQZmo.js +0 -1
  210. package/web-shell/assets/classDiagram-v2-Q7XG4LA2-BGHJQZmo.js +0 -1
  211. package/web-shell/assets/index-DoGSgv5C.css +0 -5
  212. package/web-shell/assets/index-lWWJkqt9.js +0 -754
  213. package/web-shell/assets/stateDiagram-v2-BHNVJYJU-6aAMKcly.js +0 -1
@@ -2267,6 +2267,66 @@ function truncateError(message) {
2267
2267
  }
2268
2268
  __name(truncateError, "truncateError");
2269
2269
 
2270
+ // packages/channels/base/dist/channel-memory-intent.js
2271
+ init_esbuild_shims();
2272
+ var REMEMBER_PATTERNS = [
2273
+ /^记住[::]\s*(.+)$/su,
2274
+ /^记一下[::,,]?\s*(.+)$/su,
2275
+ /^帮我记一下[::,,]?\s*(.+)$/su,
2276
+ /^帮我记住[::,,]?\s*(.+)$/su,
2277
+ /^以后记住[::,,]?\s*(.+)$/su,
2278
+ /^remember:\s*(.+)$/isu
2279
+ ];
2280
+ var LIST_PATTERNS = [
2281
+ /^你现在记住了什么[??]?$/u,
2282
+ /^查看记忆$/u,
2283
+ /^当前记忆$/u,
2284
+ /^这个聊天你记住了什么[??]?$/u,
2285
+ /^what do you remember[??]?$/iu
2286
+ ];
2287
+ var CLEAR_REQUEST_PATTERNS = [
2288
+ /^清空记忆$/u,
2289
+ /^清除记忆$/u,
2290
+ /^忘掉这个聊天的所有记忆$/u,
2291
+ /^把.+的?记忆清空$/u,
2292
+ /^clear memory$/iu
2293
+ ];
2294
+ var CLEAR_CONFIRM_PATTERNS = [
2295
+ /^确认清空记忆$/u,
2296
+ /^确认清除记忆$/u,
2297
+ /^confirm clear memory$/iu
2298
+ ];
2299
+ function parseChannelMemoryIntent(text) {
2300
+ const trimmed = text.replace(PROMPT_UNSAFE_INVISIBLES, "").trim();
2301
+ if (!trimmed || trimmed.startsWith("/")) {
2302
+ return null;
2303
+ }
2304
+ for (const pattern of CLEAR_CONFIRM_PATTERNS) {
2305
+ if (pattern.test(trimmed)) {
2306
+ return { kind: "clear_confirm" };
2307
+ }
2308
+ }
2309
+ for (const pattern of CLEAR_REQUEST_PATTERNS) {
2310
+ if (pattern.test(trimmed)) {
2311
+ return { kind: "clear_request" };
2312
+ }
2313
+ }
2314
+ for (const pattern of LIST_PATTERNS) {
2315
+ if (pattern.test(trimmed)) {
2316
+ return { kind: "list" };
2317
+ }
2318
+ }
2319
+ for (const pattern of REMEMBER_PATTERNS) {
2320
+ const match = trimmed.match(pattern);
2321
+ const remembered = match?.[1]?.replace(PROMPT_UNSAFE_INVISIBLES, "").trim();
2322
+ if (remembered) {
2323
+ return { kind: "remember", text: remembered };
2324
+ }
2325
+ }
2326
+ return null;
2327
+ }
2328
+ __name(parseChannelMemoryIntent, "parseChannelMemoryIntent");
2329
+
2270
2330
  // packages/channels/base/dist/ChannelBase.js
2271
2331
  var CLEAR_CANCEL_TIMEOUT_MS = 3e3;
2272
2332
  var GROUP_HISTORY_CONTEXT_MARKER = "[Chat messages since your last reply - for context]";
@@ -2274,6 +2334,8 @@ var CURRENT_MESSAGE_MARKER = "[Current message - respond to this]";
2274
2334
  var GROUP_HISTORY_ENTRY_TEXT_LIMIT = 1e3;
2275
2335
  var GROUP_HISTORY_ENTRY_METADATA_LIMIT = 256;
2276
2336
  var LOOP_CANCEL_GRACE_MS = 5e3;
2337
+ var CHANNEL_MEMORY_CLASSIFIER_MIN_CONFIDENCE = 0.7;
2338
+ var CHANNEL_MEMORY_CLASSIFIER_TRIGGER_RE = /(记住|记得|记一下|记忆|忘掉|忘记|清空|清除|删除|保存|remember|memory|forget)/iu;
2277
2339
  var LOOP_TIMED_OUT_MESSAGE = "loop timed out";
2278
2340
  var COMMAND_TOKEN_CHARS = "a-zA-Z0-9_:-";
2279
2341
  var PARSE_COMMAND_RE = new RegExp(`^\\/([${COMMAND_TOKEN_CHARS}]+)(?:@\\S+)?\\s*(.*)`, "s");
@@ -2306,6 +2368,7 @@ var ChannelBase = class {
2306
2368
  /** Resolved proxy URL, available to subclasses for adapter-specific clients. */
2307
2369
  proxy;
2308
2370
  channelMemory;
2371
+ memoryIntentClassifier;
2309
2372
  groupHistory;
2310
2373
  loopController;
2311
2374
  instructedSessions = /* @__PURE__ */ new Set();
@@ -2319,10 +2382,12 @@ var ChannelBase = class {
2319
2382
  * so a cleared session can't be resurrected by an already-queued prompt.
2320
2383
  */
2321
2384
  sessionGenerations = /* @__PURE__ */ new Map();
2385
+ pendingClears = /* @__PURE__ */ new Map();
2322
2386
  /** Per-session active prompt tracking for dispatch modes. */
2323
2387
  activePrompts = /* @__PURE__ */ new Map();
2324
2388
  /** Per-session message buffer for collect mode. */
2325
2389
  collectBuffers = /* @__PURE__ */ new Map();
2390
+ preflightedEnvelopes = /* @__PURE__ */ new WeakSet();
2326
2391
  bridgeToolCallListener = /* @__PURE__ */ __name((event) => {
2327
2392
  this.dispatchToolCall(event);
2328
2393
  }, "bridgeToolCallListener");
@@ -2366,6 +2431,7 @@ var ChannelBase = class {
2366
2431
  this.identity = Object.freeze(this.resolveIdentity(name, config));
2367
2432
  this.memoryScope = Object.freeze(this.resolveMemoryScope(name, config));
2368
2433
  this.channelMemory = options?.channelMemory;
2434
+ this.memoryIntentClassifier = options?.memoryIntentClassifier;
2369
2435
  this.groupHistory = new GroupHistoryStore(options?.groupHistoryPath ?? join4(getGlobalQwenDir(), "channels", `${encodeURIComponent(name)}-group-history.jsonl`));
2370
2436
  this.loopController = options?.loopController;
2371
2437
  this.groupGate = new GroupGate(config.groupPolicy, config.groups);
@@ -2701,6 +2767,7 @@ ${promptText}`;
2701
2767
  const lost = buffer.length;
2702
2768
  const coalesced = buffer.map((b) => b.text).join("\n\n");
2703
2769
  const lastEnvelope = buffer[buffer.length - 1].envelope;
2770
+ this.notifyPromptBufferDrained(lastEnvelope.chatId, sessionId, buffer);
2704
2771
  const syntheticEnvelope = {
2705
2772
  ...lastEnvelope,
2706
2773
  text: coalesced,
@@ -2710,7 +2777,8 @@ ${promptText}`;
2710
2777
  imageBase64: void 0,
2711
2778
  imageMimeType: void 0
2712
2779
  };
2713
- this.handleInbound(syntheticEnvelope).catch((err) => {
2780
+ this.markPreflighted(syntheticEnvelope);
2781
+ this.processInbound(syntheticEnvelope).catch((err) => {
2714
2782
  process.stderr.write(`[${this.name}] dropped ${lost} buffered message(s) after loop ${job.id} for session ${sessionId} (last sender ${lastEnvelope.senderId}): ${err instanceof Error ? err.message : String(err)}
2715
2783
  `);
2716
2784
  });
@@ -2800,11 +2868,39 @@ ${promptText}`;
2800
2868
  }
2801
2869
  active.cancelled = true;
2802
2870
  this.stopActiveStreaming(active, sessionId, reason);
2803
- this.collectBuffers.delete(sessionId);
2871
+ this.dropCollectBuffer(sessionId);
2804
2872
  this.emitTaskCancellation(active, sessionId, reason);
2805
2873
  return true;
2806
2874
  });
2807
2875
  }
2876
+ dropCollectBuffer(sessionId) {
2877
+ const buffer = this.collectBuffers.get(sessionId);
2878
+ if (!buffer)
2879
+ return;
2880
+ this.collectBuffers.delete(sessionId);
2881
+ const chatId = buffer[0]?.envelope.chatId ?? "";
2882
+ const messageIds = this.collectBufferMessageIds(buffer);
2883
+ try {
2884
+ this.onPromptBufferDropped(chatId, sessionId, messageIds);
2885
+ } catch (err) {
2886
+ process.stderr.write(`[${this.name}] onPromptBufferDropped threw for session ${sessionId}: ${err instanceof Error ? err.message : err}
2887
+ `);
2888
+ }
2889
+ }
2890
+ notifyPromptBufferDrained(chatId, sessionId, buffer) {
2891
+ const messageIds = this.collectBufferMessageIds(buffer);
2892
+ if (messageIds.length === 0)
2893
+ return;
2894
+ try {
2895
+ this.onPromptBufferDrained(chatId, sessionId, messageIds);
2896
+ } catch (err) {
2897
+ process.stderr.write(`[${this.name}] onPromptBufferDrained threw for session ${sessionId}: ${err instanceof Error ? err.message : err}
2898
+ `);
2899
+ }
2900
+ }
2901
+ collectBufferMessageIds(buffer) {
2902
+ return buffer.map((entry) => entry.envelope.messageId).filter((id) => typeof id === "string" && id.length > 0);
2903
+ }
2808
2904
  logCancelSessionFailure(sessionId, err) {
2809
2905
  process.stderr.write(`[${sanitizeLogText(this.name, 64)}] cancelSession failed for session=${sanitizeLogText(sessionId, 64)}: ${this.lifecycleError(err)}
2810
2906
  `);
@@ -2850,6 +2946,12 @@ ${promptText}`;
2850
2946
  */
2851
2947
  onPromptStart(_chatId, _sessionId, _messageId) {
2852
2948
  }
2949
+ onPromptBuffered(_chatId, _sessionId, _messageId) {
2950
+ }
2951
+ onPromptBufferDrained(_chatId, _sessionId, _messageIds) {
2952
+ }
2953
+ onPromptBufferDropped(_chatId, _sessionId, _messageIds) {
2954
+ }
2853
2955
  /**
2854
2956
  * Called when a prompt finishes (response sent or cancelled).
2855
2957
  * Override to hide the working indicator.
@@ -2914,7 +3016,7 @@ ${promptText}`;
2914
3016
  }
2915
3017
  this.sessionGenerations.set(id, (this.sessionGenerations.get(id) ?? 0) + 1);
2916
3018
  const active = this.activePrompts.get(id);
2917
- this.collectBuffers.delete(id);
3019
+ this.dropCollectBuffer(id);
2918
3020
  if (active) {
2919
3021
  const settled = await this.cancelAndAwaitActive(active, id);
2920
3022
  if (!settled) {
@@ -2966,77 +3068,20 @@ ${promptText}`;
2966
3068
  this.registerCommand("clear", clearHandler);
2967
3069
  this.registerCommand("reset", clearHandler);
2968
3070
  this.registerCommand("new", clearHandler);
2969
- this.registerCommand("who", async (envelope) => {
2970
- if (!this.isAuthorizedForSharedSession(envelope)) {
2971
- await this.sendMessage(envelope.chatId, "Only authorized members can view this shared session.");
2972
- return true;
2973
- }
2974
- const active = this.router.hasSession(this.name, envelope.senderId, envelope.chatId, envelope.threadId);
2975
- const scopeNote = this.config.sessionScope === "single" ? " (shared channel-wide)" : this.isSharedSession(envelope) ? envelope.isGroup ? " (shared by this group)" : "" : envelope.isGroup ? " (private to you)" : "";
2976
- await this.sendMessage(envelope.chatId, [
2977
- `Channel: ${this.name}`,
2978
- // Identity/memory lines only for channels that opted in — keep
2979
- // unconfigured channels' output unchanged.
2980
- ...this.shouldPrependChannelBoundaryPrompt() ? [
2981
- `Identity: ${sanitizeQuotedText(this.identity.displayName, 128)}`,
2982
- `Memory: ${sanitizeQuotedText(this.memoryScope.namespace, 128)}`
2983
- ] : [],
2984
- // Only the basename — don't leak the absolute cwd to group members.
2985
- `Workspace: ${basename(this.config.cwd)}`,
2986
- `Session: ${active ? "active" : "none"}${scopeNote}`
2987
- ].join("\n"));
2988
- return true;
2989
- });
2990
3071
  this.registerCommand("remember-channel", async (envelope, args) => {
2991
- if (!await this.ensureChannelMemoryAuthorized(envelope)) {
2992
- return true;
2993
- }
2994
- if (envelope.isGroup) {
2995
- await this.sendMessage(envelope.chatId, "Channel memory cannot be changed in group chats.");
2996
- return true;
2997
- }
2998
- if (args.trim() === "") {
3072
+ const text = args.trim();
3073
+ if (text === "") {
2999
3074
  await this.sendMessage(envelope.chatId, "Usage: /remember-channel <text>");
3000
3075
  return true;
3001
3076
  }
3002
- const channelMemory = await this.getChannelMemory(envelope);
3003
- if (!channelMemory) {
3004
- return true;
3005
- }
3006
- try {
3007
- await channelMemory.appendChannelMemory(this.channelMemoryTarget(envelope), args.trim());
3008
- } catch (error) {
3009
- const message = this.channelMemoryErrorMessage(error);
3010
- this.logChannelMemoryError("save", envelope, message);
3011
- await this.sendMessage(envelope.chatId, `Failed to save channel memory: ${this.channelMemoryUserErrorMessage()}`);
3012
- return true;
3013
- }
3014
- this.invalidateSessionContext(envelope);
3015
- await this.sendMessage(envelope.chatId, "Channel memory updated.");
3077
+ await this.handleChannelMemoryIntent(envelope, {
3078
+ kind: "remember",
3079
+ text
3080
+ });
3016
3081
  return true;
3017
3082
  });
3018
3083
  this.registerCommand("channel-memory", async (envelope) => {
3019
- if (!await this.ensureChannelMemoryAuthorized(envelope)) {
3020
- return true;
3021
- }
3022
- if (envelope.isGroup) {
3023
- await this.sendMessage(envelope.chatId, "Channel memory cannot be shown in group chats.");
3024
- return true;
3025
- }
3026
- const channelMemory = await this.getChannelMemory(envelope);
3027
- if (!channelMemory) {
3028
- return true;
3029
- }
3030
- let text;
3031
- try {
3032
- text = (await channelMemory.readChannelMemory(this.channelMemoryTarget(envelope))).trim();
3033
- } catch (error) {
3034
- const message = this.channelMemoryErrorMessage(error);
3035
- this.logChannelMemoryError("read", envelope, message);
3036
- await this.sendMessage(envelope.chatId, `Failed to read channel memory: ${this.channelMemoryUserErrorMessage()}`);
3037
- return true;
3038
- }
3039
- await this.sendMessage(envelope.chatId, text === "" ? "No channel memory saved." : sanitizePromptText(text));
3084
+ await this.handleChannelMemoryIntent(envelope, { kind: "list" });
3040
3085
  return true;
3041
3086
  });
3042
3087
  this.registerCommand("forget-channel", async (envelope, args) => {
@@ -3051,21 +3096,28 @@ ${promptText}`;
3051
3096
  await this.sendMessage(envelope.chatId, 'This clears channel memory for this chat. Re-send with "confirm" (e.g. /forget-channel confirm) to proceed.');
3052
3097
  return true;
3053
3098
  }
3054
- const channelMemory = await this.getChannelMemory(envelope);
3055
- if (!channelMemory) {
3056
- return true;
3057
- }
3058
- let result;
3059
- try {
3060
- result = await channelMemory.clearChannelMemory(this.channelMemoryTarget(envelope));
3061
- } catch (error) {
3062
- const message = this.channelMemoryErrorMessage(error);
3063
- this.logChannelMemoryError("clear", envelope, message);
3064
- await this.sendMessage(envelope.chatId, `Failed to clear channel memory: ${this.channelMemoryUserErrorMessage()}`);
3099
+ await this.handleChannelMemoryIntent(envelope, { kind: "clear_confirm" }, { skipPendingClear: true });
3100
+ return true;
3101
+ });
3102
+ this.registerCommand("who", async (envelope) => {
3103
+ if (!this.isAuthorizedForSharedSession(envelope)) {
3104
+ await this.sendMessage(envelope.chatId, "Only authorized members can view this shared session.");
3065
3105
  return true;
3066
3106
  }
3067
- this.invalidateSessionContext(envelope);
3068
- await this.sendMessage(envelope.chatId, result.changed ? "Channel memory cleared." : "No channel memory saved.");
3107
+ const active = this.router.hasSession(this.name, envelope.senderId, envelope.chatId, envelope.threadId);
3108
+ const scopeNote = this.config.sessionScope === "single" ? " (shared channel-wide)" : this.isSharedSession(envelope) ? envelope.isGroup ? " (shared by this group)" : "" : envelope.isGroup ? " (private to you)" : "";
3109
+ await this.sendMessage(envelope.chatId, [
3110
+ `Channel: ${this.name}`,
3111
+ // Identity/memory lines only for channels that opted in — keep
3112
+ // unconfigured channels' output unchanged.
3113
+ ...this.shouldPrependChannelBoundaryPrompt() ? [
3114
+ `Identity: ${sanitizeQuotedText(this.identity.displayName, 128)}`,
3115
+ `Memory: ${sanitizeQuotedText(this.memoryScope.namespace, 128)}`
3116
+ ] : [],
3117
+ // Only the basename — don't leak the absolute cwd to group members.
3118
+ `Workspace: ${basename(this.config.cwd)}`,
3119
+ `Session: ${active ? "active" : "none"}${scopeNote}`
3120
+ ].join("\n"));
3069
3121
  return true;
3070
3122
  });
3071
3123
  this.registerCommand("help", async (envelope) => {
@@ -3074,21 +3126,18 @@ ${promptText}`;
3074
3126
  "/help \u2014 Show this help",
3075
3127
  this.isSharedSession(envelope) ? "/clear confirm \u2014 Clear the shared session (aliases: /reset, /new)" : "/clear \u2014 Clear your session (aliases: /reset, /new)",
3076
3128
  "/who \u2014 Show current session & workspace",
3077
- "/status \u2014 Show session info",
3078
- "/remember-channel <text> \u2014 Save memory for this chat",
3079
- "/channel-memory \u2014 Show memory for this chat",
3080
- "/forget-channel confirm \u2014 Clear memory for this chat"
3129
+ "/status \u2014 Show session info"
3081
3130
  ];
3082
3131
  const sharedCmds = /* @__PURE__ */ new Set([
3083
3132
  "help",
3084
3133
  "clear",
3085
3134
  "reset",
3086
3135
  "new",
3087
- "who",
3088
- "status",
3089
3136
  "remember-channel",
3090
3137
  "channel-memory",
3091
- "forget-channel"
3138
+ "forget-channel",
3139
+ "who",
3140
+ "status"
3092
3141
  ]);
3093
3142
  const platformCmds = [...this.commands.keys()].filter((c) => !sharedCmds.has(c));
3094
3143
  if (platformCmds.length > 0) {
@@ -3486,6 +3535,118 @@ ${promptText}`;
3486
3535
  }
3487
3536
  return this.channelMemory;
3488
3537
  }
3538
+ async handleChannelMemoryIntent(envelope, intent, options = {}) {
3539
+ if (!await this.ensureChannelMemoryAuthorized(envelope)) {
3540
+ return;
3541
+ }
3542
+ if (envelope.isGroup && intent.kind !== "list") {
3543
+ await this.sendMessage(envelope.chatId, "Channel memory cannot be changed in group chats.");
3544
+ return;
3545
+ }
3546
+ if (intent.kind === "clear_request") {
3547
+ this.setPendingClear(this.clearPendingKey(envelope));
3548
+ 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.');
3549
+ return;
3550
+ }
3551
+ const channelMemory = await this.getChannelMemory(envelope);
3552
+ if (!channelMemory) {
3553
+ return;
3554
+ }
3555
+ if (intent.kind === "remember") {
3556
+ try {
3557
+ await channelMemory.appendChannelMemory(this.channelMemoryTarget(envelope), intent.text);
3558
+ } catch (error) {
3559
+ const message = this.channelMemoryErrorMessage(error);
3560
+ this.logChannelMemoryError("save", envelope, message);
3561
+ await this.sendMessage(envelope.chatId, `Failed to save channel memory: ${this.channelMemoryUserErrorMessage()}`);
3562
+ return;
3563
+ }
3564
+ this.invalidateSessionContext(envelope);
3565
+ await this.sendMessage(envelope.chatId, "Channel memory updated.");
3566
+ return;
3567
+ }
3568
+ if (intent.kind === "list") {
3569
+ let text;
3570
+ try {
3571
+ text = (await channelMemory.readChannelMemory(this.channelMemoryTarget(envelope))).trim();
3572
+ } catch (error) {
3573
+ const message = this.channelMemoryErrorMessage(error);
3574
+ this.logChannelMemoryError("read", envelope, message);
3575
+ await this.sendMessage(envelope.chatId, `Failed to read channel memory: ${this.channelMemoryUserErrorMessage()}`);
3576
+ return;
3577
+ }
3578
+ await this.sendMessage(envelope.chatId, text === "" ? "No channel memory saved." : sanitizePromptText(text));
3579
+ return;
3580
+ }
3581
+ if (intent.kind === "clear_confirm") {
3582
+ if (!options.skipPendingClear) {
3583
+ const pendingKey = this.clearPendingKey(envelope);
3584
+ const expiresAt = this.pendingClears.get(pendingKey);
3585
+ this.pendingClears.delete(pendingKey);
3586
+ if (expiresAt === void 0 || expiresAt < Date.now()) {
3587
+ await this.sendMessage(envelope.chatId, 'No pending clear request. Say "\u6E05\u7A7A\u8BB0\u5FC6" first.');
3588
+ return;
3589
+ }
3590
+ }
3591
+ let result;
3592
+ try {
3593
+ result = await channelMemory.clearChannelMemory(this.channelMemoryTarget(envelope));
3594
+ } catch (error) {
3595
+ const message = this.channelMemoryErrorMessage(error);
3596
+ this.logChannelMemoryError("clear", envelope, message);
3597
+ await this.sendMessage(envelope.chatId, `Failed to clear channel memory: ${this.channelMemoryUserErrorMessage()}`);
3598
+ return;
3599
+ }
3600
+ this.invalidateSessionContext(envelope);
3601
+ await this.sendMessage(envelope.chatId, result.changed ? "Channel memory cleared." : "No channel memory saved.");
3602
+ return;
3603
+ }
3604
+ const unhandled = intent;
3605
+ throw new Error(`Unhandled channel memory intent: ${JSON.stringify(unhandled)}`);
3606
+ }
3607
+ shouldClassifyChannelMemoryIntent(text) {
3608
+ const normalized = text.replace(PROMPT_UNSAFE_INVISIBLES, "").trim();
3609
+ return this.channelMemory !== void 0 && this.memoryIntentClassifier !== void 0 && !normalized.startsWith("/") && CHANNEL_MEMORY_CLASSIFIER_TRIGGER_RE.test(normalized);
3610
+ }
3611
+ clearPendingKey(envelope) {
3612
+ return `${this.name}:${envelope.chatId}:${envelope.threadId ?? ""}:${envelope.senderId ?? ""}`;
3613
+ }
3614
+ setPendingClear(key) {
3615
+ const now = Date.now();
3616
+ for (const [pendingKey, expiresAt] of this.pendingClears) {
3617
+ if (expiresAt < now) {
3618
+ this.pendingClears.delete(pendingKey);
3619
+ }
3620
+ }
3621
+ this.pendingClears.set(key, now + 6e4);
3622
+ }
3623
+ async classifyChannelMemoryIntent(text) {
3624
+ if (!this.memoryIntentClassifier) {
3625
+ return null;
3626
+ }
3627
+ let classified;
3628
+ try {
3629
+ classified = await this.memoryIntentClassifier.classifyChannelMemoryIntent(text);
3630
+ } catch (error) {
3631
+ process.stderr.write(`[${this.name}] channel memory intent classifier failed: ${sanitizeLogText(this.channelMemoryErrorMessage(error), 200)}
3632
+ `);
3633
+ return null;
3634
+ }
3635
+ if (classified.confidence < CHANNEL_MEMORY_CLASSIFIER_MIN_CONFIDENCE) {
3636
+ return null;
3637
+ }
3638
+ if (classified.intent === "remember") {
3639
+ const memory = classified.memory?.trim();
3640
+ return memory ? { kind: "remember", text: memory } : null;
3641
+ }
3642
+ if (classified.intent === "list") {
3643
+ return { kind: "list" };
3644
+ }
3645
+ if (classified.intent === "clear_all") {
3646
+ return { kind: "clear_request" };
3647
+ }
3648
+ return null;
3649
+ }
3489
3650
  channelMemoryErrorMessage(error) {
3490
3651
  return error instanceof Error ? error.message : String(error);
3491
3652
  }
@@ -3746,19 +3907,54 @@ ${formatted.join("\n")}
3746
3907
  ${CURRENT_MESSAGE_MARKER}
3747
3908
  ${promptText}`;
3748
3909
  }
3749
- async handleInbound(envelope) {
3910
+ preflightInbound(envelope) {
3750
3911
  const groupResult = this.groupGate.check(envelope);
3751
3912
  if (!groupResult.allowed) {
3752
3913
  if (groupResult.reason === "mention_required") {
3753
3914
  this.recordPendingGroupHistory(envelope);
3754
3915
  }
3755
- return;
3916
+ return false;
3756
3917
  }
3757
3918
  const result = this.gate.check(envelope.senderId, envelope.senderName);
3758
3919
  if (!result.allowed) {
3759
3920
  if (result.pairingCode !== void 0) {
3760
- await this.onPairingRequired(envelope.chatId, result.pairingCode);
3921
+ return this.onPairingRequired(envelope.chatId, result.pairingCode).then(() => false).catch((err) => {
3922
+ process.stderr.write(`[Channel:${this.name}] pairing notification failed: ${sanitizeLogText(err instanceof Error ? err.message : String(err), 200)}
3923
+ `);
3924
+ return false;
3925
+ });
3761
3926
  }
3927
+ return false;
3928
+ }
3929
+ this.markPreflighted(envelope);
3930
+ return true;
3931
+ }
3932
+ async handleInbound(envelope) {
3933
+ const preflight = this.preflightInbound(envelope);
3934
+ if (!(isPromiseLike(preflight) ? await preflight : preflight))
3935
+ return;
3936
+ await this.processInbound(envelope);
3937
+ }
3938
+ markPreflighted(envelope) {
3939
+ this.preflightedEnvelopes.add(envelope);
3940
+ }
3941
+ /**
3942
+ * Process an inbound message after preflight gates have passed.
3943
+ *
3944
+ * This method does not run group gating, sender allowlisting, or pairing
3945
+ * checks. Callers must run preflightInbound() first unless the envelope was
3946
+ * already preflighted, such as during collect-buffer drain.
3947
+ */
3948
+ async processInbound(envelope) {
3949
+ if (!this.preflightedEnvelopes.delete(envelope)) {
3950
+ throw new Error("processInbound called without a successful preflightInbound check.");
3951
+ }
3952
+ let memoryIntent = parseChannelMemoryIntent(envelope.text);
3953
+ if (!memoryIntent && this.shouldClassifyChannelMemoryIntent(envelope.text)) {
3954
+ memoryIntent = await this.classifyChannelMemoryIntent(envelope.text);
3955
+ }
3956
+ if (memoryIntent) {
3957
+ await this.handleChannelMemoryIntent(envelope, memoryIntent);
3762
3958
  return;
3763
3959
  }
3764
3960
  const parsed = this.parseCommand(envelope.text);
@@ -3792,14 +3988,14 @@ ${promptText}`;
3792
3988
  const bridgeShellCommand = this.bridge.shellCommand;
3793
3989
  if (cmd && bridgeShellCommand) {
3794
3990
  try {
3795
- const result2 = await bridgeShellCommand(sessionId, cmd);
3796
- const longestRun = Math.max(0, ...Array.from((result2.output || "").matchAll(/`+/g), (m) => m[0].length));
3991
+ const result = await bridgeShellCommand(sessionId, cmd);
3992
+ const longestRun = Math.max(0, ...Array.from((result.output || "").matchAll(/`+/g), (m) => m[0].length));
3797
3993
  const fence = "`".repeat(Math.max(3, longestRun + 1));
3798
- const output = result2.output ? `${fence}
3799
- ${result2.output}
3994
+ const output = result.output ? `${fence}
3995
+ ${result.output}
3800
3996
  ${fence}` : "(no output)";
3801
- const exitLine = result2.exitCode !== null && result2.exitCode !== 0 ? `
3802
- Exit code: ${result2.exitCode}` : "";
3997
+ const exitLine = result.exitCode !== null && result.exitCode !== 0 ? `
3998
+ Exit code: ${result.exitCode}` : "";
3803
3999
  await this.sendMessage(envelope.chatId, `$ ${cmd}
3804
4000
  ${output}${exitLine}`);
3805
4001
  } catch (error) {
@@ -3852,6 +4048,12 @@ ${promptText}`;
3852
4048
  this.collectBuffers.set(sessionId, buffer);
3853
4049
  }
3854
4050
  buffer.push({ text: promptText, envelope });
4051
+ try {
4052
+ this.onPromptBuffered(envelope.chatId, sessionId, envelope.messageId);
4053
+ } catch (err) {
4054
+ process.stderr.write(`[${this.name}] onPromptBuffered threw for session ${sessionId}: ${err instanceof Error ? err.message : err}
4055
+ `);
4056
+ }
3855
4057
  return;
3856
4058
  }
3857
4059
  case "steer": {
@@ -4064,6 +4266,7 @@ ${promptToSend}`;
4064
4266
  const lost = buffer.length;
4065
4267
  const coalesced = buffer.map((b) => b.text).join("\n\n");
4066
4268
  const lastEnvelope = buffer[buffer.length - 1].envelope;
4269
+ this.notifyPromptBufferDrained(lastEnvelope.chatId, sessionId, buffer);
4067
4270
  const syntheticEnvelope = {
4068
4271
  ...lastEnvelope,
4069
4272
  text: coalesced,
@@ -4075,7 +4278,8 @@ ${promptToSend}`;
4075
4278
  imageBase64: void 0,
4076
4279
  imageMimeType: void 0
4077
4280
  };
4078
- this.handleInbound(syntheticEnvelope).catch((err) => {
4281
+ this.markPreflighted(syntheticEnvelope);
4282
+ this.processInbound(syntheticEnvelope).catch((err) => {
4079
4283
  process.stderr.write(`[${this.name}] dropped ${lost} buffered message(s) on collect re-entry for session ${sessionId} (last sender ${lastEnvelope.senderId}): ${err instanceof Error ? err.message : String(err)}
4080
4284
  `);
4081
4285
  });
@@ -4101,6 +4305,10 @@ function truncateGroupHistoryField(value) {
4101
4305
  return value.slice(0, GROUP_HISTORY_ENTRY_METADATA_LIMIT);
4102
4306
  }
4103
4307
  __name(truncateGroupHistoryField, "truncateGroupHistoryField");
4308
+ function isPromiseLike(value) {
4309
+ return value !== null && (typeof value === "object" || typeof value === "function") && typeof value.then === "function";
4310
+ }
4311
+ __name(isPromiseLike, "isPromiseLike");
4104
4312
  function truncateLoopLabel(prompt) {
4105
4313
  const chars = Array.from(prompt);
4106
4314
  return chars.length > 60 ? `${chars.slice(0, 57).join("")}...` : prompt;
@@ -6,7 +6,7 @@ import {
6
6
  import {
7
7
  JsonFormatter,
8
8
  parseAndFormatApiError
9
- } from "./chunk-4VVDPKQ6.js";
9
+ } from "./chunk-ZWFS7YCB.js";
10
10
  import {
11
11
  FatalBudgetExceededError,
12
12
  FatalCancellationError,
@@ -15,7 +15,7 @@ import {
15
15
  } from "./chunk-22MNNNXE.js";
16
16
  import {
17
17
  runExitCleanup
18
- } from "./chunk-JZLDAWNW.js";
18
+ } from "./chunk-5IGNZP2J.js";
19
19
  import {
20
20
  init_esbuild_shims
21
21
  } from "./chunk-A4BMJM77.js";
@@ -0,0 +1,19 @@
1
+ // Force strict mode and setup for ESM
2
+ "use strict";
3
+ import {
4
+ init_esbuild_shims
5
+ } from "./chunk-A4BMJM77.js";
6
+
7
+ // packages/cli/src/patches/is-in-ci.ts
8
+ init_esbuild_shims();
9
+ var isInCi = false;
10
+ var is_in_ci_default = isInCi;
11
+
12
+ export {
13
+ is_in_ci_default
14
+ };
15
+ /**
16
+ * @license
17
+ * Copyright 2025 Google LLC
18
+ * SPDX-License-Identifier: Apache-2.0
19
+ */