@qwen-code/qwen-code 0.21.7 → 0.21.8-nightly.20260810.55e20db328

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 (334) hide show
  1. package/README.md +2 -0
  2. package/bundled/qc-helper/docs/configuration/settings.md +73 -59
  3. package/bundled/qc-helper/docs/extension/introduction.md +15 -1
  4. package/bundled/qc-helper/docs/features/channels/dingtalk.md +40 -2
  5. package/bundled/qc-helper/docs/features/channels/feishu.md +13 -2
  6. package/bundled/qc-helper/docs/features/channels/github.md +13 -11
  7. package/bundled/qc-helper/docs/features/channels/gitlab.md +13 -11
  8. package/bundled/qc-helper/docs/features/channels/overview.md +49 -31
  9. package/bundled/qc-helper/docs/features/channels/plugins.md +2 -2
  10. package/bundled/qc-helper/docs/features/channels/qqbot.md +4 -2
  11. package/bundled/qc-helper/docs/features/channels/telegram.md +4 -2
  12. package/bundled/qc-helper/docs/features/channels/wecom.md +1 -1
  13. package/bundled/qc-helper/docs/features/code-review.md +4 -0
  14. package/bundled/qc-helper/docs/features/commands.md +1 -1
  15. package/bundled/qc-helper/docs/features/hooks.md +52 -0
  16. package/bundled/qc-helper/docs/integration-jetbrains.md +1 -0
  17. package/bundled/qc-helper/docs/qwen-serve-deploy-local.md +1 -1
  18. package/bundled/qc-helper/docs/qwen-serve.md +10 -5
  19. package/bundled/qc-helper/docs/reference/keyboard-shortcuts.md +50 -36
  20. package/bundled/review/SKILL.md +32 -5
  21. package/chunks/{MaxSizedBox-ANWZBPTS.js → MaxSizedBox-A52T4GEU.js} +29 -25
  22. package/chunks/{StandaloneSessionPicker-XKS3VU3A.js → StandaloneSessionPicker-4J654SOB.js} +48 -44
  23. package/chunks/{acp-startup-profiler-ORIQ2CCQ.js → acp-startup-profiler-B5BYAMYQ.js} +2 -2
  24. package/chunks/{acpAgent-KUAZ3GCZ.js → acpAgent-65AM4AOR.js} +1833 -843
  25. package/chunks/{agent-T6PTGX5R.js → agent-SVQ7U7NJ.js} +28 -24
  26. package/chunks/{agent-headless-PR7YCB7S.js → agent-headless-XXGY2SQO.js} +28 -24
  27. package/chunks/{artifact-tool-U4VOZIK5.js → artifact-tool-N652YE4L.js} +1 -1
  28. package/chunks/{askUserQuestion-XOBQLPFA.js → askUserQuestion-ONW74PKJ.js} +1 -1
  29. package/chunks/{bridge-NU6YEEHK.js → bridge-Y32B5S3G.js} +34 -30
  30. package/chunks/{ca-NYKNH222.js → ca-ZLKAB4K3.js} +6 -0
  31. package/chunks/{channel-management-service-FSQ7SHYI.js → channel-management-service-PHELKOW2.js} +19 -10
  32. package/chunks/{channel-settings-store-35VQVUVV.js → channel-settings-store-OW43U6VB.js} +36 -32
  33. package/chunks/{channel-worker-group-JWQK224X.js → channel-worker-group-MSHT6CWR.js} +7 -7
  34. package/chunks/{channel-worker-manager-77E3OXRQ.js → channel-worker-manager-XXD3GDSK.js} +7 -7
  35. package/chunks/{channel-worker-supervisor-62YWUGP2.js → channel-worker-supervisor-IVSDIMI4.js} +4 -4
  36. package/chunks/{chunk-HYRDKNUY.js → chunk-2545EHZR.js} +1 -1
  37. package/chunks/{chunk-SPMY6CX6.js → chunk-2ASQDZSJ.js} +3 -3
  38. package/chunks/{chunk-CJXIIILK.js → chunk-2FRY5CRX.js} +1 -1
  39. package/chunks/{chunk-CNIID3TV.js → chunk-2UUMVNYT.js} +1 -1
  40. package/chunks/{chunk-KXSDEOFU.js → chunk-3KJQZEN3.js} +1 -1
  41. package/chunks/{chunk-22NBYCPD.js → chunk-3P2LV43B.js} +1 -1
  42. package/chunks/{chunk-Y7E5LNLO.js → chunk-47ZUMGGY.js} +2634 -2114
  43. package/chunks/{chunk-LA7YLSR6.js → chunk-4EOURKA4.js} +839 -153
  44. package/chunks/chunk-4JRM2BSM.js +48 -0
  45. package/chunks/{chunk-BGG4MBYD.js → chunk-4PYCZH2V.js} +4 -187
  46. package/chunks/{chunk-L4N6TIP7.js → chunk-4TRQPFDP.js} +4 -2
  47. package/chunks/{chunk-6XJMFJ4D.js → chunk-5WZL724W.js} +177 -120
  48. package/chunks/{chunk-23RZCH76.js → chunk-5ZTS3OQ3.js} +3 -3
  49. package/chunks/{chunk-VWOVHOTT.js → chunk-67EWJE77.js} +1 -1
  50. package/chunks/{chunk-3K7FH2KQ.js → chunk-67N6HB5H.js} +1310 -171
  51. package/chunks/{chunk-CXE7E23H.js → chunk-6Q5ABMTU.js} +45 -17
  52. package/chunks/{chunk-NG2R4N5O.js → chunk-6ZRFAKXK.js} +1 -1
  53. package/chunks/{chunk-RERATVSK.js → chunk-7XX5IBXL.js} +145 -10
  54. package/chunks/{chunk-S7CV4KO6.js → chunk-AKJQSWV4.js} +4 -4
  55. package/chunks/{chunk-5KH532V7.js → chunk-AUWN7BAG.js} +1 -1
  56. package/chunks/{chunk-DBOFL3LQ.js → chunk-BL65MO72.js} +10 -10
  57. package/chunks/{chunk-AKA24BGO.js → chunk-BT6GQIEJ.js} +1 -1
  58. package/chunks/{chunk-W7U4ESW2.js → chunk-CG3WBKJK.js} +1 -1
  59. package/chunks/{chunk-2M5N3DHY.js → chunk-CMOBWHWW.js} +1 -1
  60. package/chunks/chunk-COBO5EBO.js +135 -0
  61. package/chunks/chunk-CPG6P4GG.js +82 -0
  62. package/chunks/{chunk-3NB7TSE2.js → chunk-D2D7J3EW.js} +1 -1
  63. package/chunks/{chunk-NLREQJFK.js → chunk-DA4HRSBW.js} +15 -0
  64. package/chunks/{chunk-RNVQB725.js → chunk-DPMJLKUP.js} +2 -2
  65. package/chunks/{chunk-DIEFUBV6.js → chunk-DX3RGJMS.js} +218 -37
  66. package/chunks/{chunk-33ACCIIY.js → chunk-DZUO626D.js} +1 -1
  67. package/chunks/chunk-E2FPSSKP.js +244 -0
  68. package/chunks/{chunk-72LNFGUY.js → chunk-E2N554HK.js} +3 -3
  69. package/chunks/{chunk-6EOI4HOK.js → chunk-E2T7FLDU.js} +12 -17
  70. package/chunks/{chunk-EUQTXRKZ.js → chunk-EISUQQPS.js} +6 -6
  71. package/chunks/{chunk-H2UQ2M5Z.js → chunk-EUVOKP6Y.js} +96 -22
  72. package/chunks/{chunk-RMH5OWLD.js → chunk-F3II4BTZ.js} +1 -1
  73. package/chunks/{chunk-P3LEG54R.js → chunk-F6TUUA2U.js} +3 -3
  74. package/chunks/chunk-F6WFNA7U.js +22 -0
  75. package/chunks/{chunk-RZHU3ILK.js → chunk-FAD7OC7V.js} +4 -4
  76. package/chunks/{chunk-OMKQH5C5.js → chunk-FWWQIFDT.js} +6 -23
  77. package/chunks/{chunk-TLV2IMHR.js → chunk-FYB4GIDW.js} +3 -3
  78. package/chunks/{chunk-ZJ3VGYHK.js → chunk-GY24H6IA.js} +40 -22
  79. package/chunks/{chunk-P2AJ7FTI.js → chunk-H4JC7LZX.js} +1 -1
  80. package/chunks/{chunk-55LYDVPU.js → chunk-HDYQYYWB.js} +1 -1
  81. package/chunks/{chunk-PQBHU2IA.js → chunk-HKI3KHAO.js} +11 -11
  82. package/chunks/{chunk-Y4NGLFGJ.js → chunk-HUWENAHO.js} +1 -1
  83. package/chunks/{chunk-3ULCB3NE.js → chunk-HV76SFIA.js} +1 -1
  84. package/chunks/{chunk-CSZEXZBE.js → chunk-HWXGX534.js} +3 -3
  85. package/chunks/{chunk-E33LOKRA.js → chunk-I5VM3SKY.js} +22 -5
  86. package/chunks/{chunk-LZC3B5N2.js → chunk-IA7TGCN2.js} +2 -2
  87. package/chunks/{chunk-RGSBTHSU.js → chunk-KMS57JDD.js} +137 -7
  88. package/chunks/{chunk-VOARQPTA.js → chunk-KP25NJNM.js} +65 -21
  89. package/chunks/{chunk-6M26GBKX.js → chunk-L2AFWWJE.js} +42 -3
  90. package/chunks/{chunk-ZXU5UHMI.js → chunk-LHEC5V6G.js} +2 -2
  91. package/chunks/{chunk-J26HHFI5.js → chunk-LP2QGNSP.js} +32 -2
  92. package/chunks/{chunk-R574ATRM.js → chunk-M2PNLYGY.js} +41 -0
  93. package/chunks/{chunk-MKVZE4ZJ.js → chunk-MFDYOYZZ.js} +3 -2
  94. package/chunks/{chunk-ALGGS7UH.js → chunk-NPQ5ZKRP.js} +82 -1
  95. package/chunks/{chunk-YHEEE624.js → chunk-NV3F44FL.js} +7 -3
  96. package/chunks/{chunk-6GONZVLS.js → chunk-NZMXUSKS.js} +1 -1
  97. package/chunks/{chunk-HQB2KUAN.js → chunk-O277O7U6.js} +1 -1
  98. package/chunks/{chunk-Y4EWSQF7.js → chunk-OBP6QWD5.js} +2 -2
  99. package/chunks/{chunk-CYR3HI5X.js → chunk-OQTXYMKW.js} +2 -2
  100. package/chunks/{chunk-TYKC75AX.js → chunk-OR6R3IUW.js} +2 -2
  101. package/chunks/{chunk-TRLYP7OF.js → chunk-OSVH4SMN.js} +16 -141
  102. package/chunks/{chunk-FPM27XN4.js → chunk-OW2BWT2P.js} +4 -4
  103. package/chunks/{chunk-TDXGKHDN.js → chunk-P5ULXPK5.js} +2 -2
  104. package/chunks/{chunk-24ER7UV4.js → chunk-PBRVUF5B.js} +1 -1
  105. package/chunks/{chunk-LKRMNRSN.js → chunk-PDPFQ2FO.js} +2 -0
  106. package/chunks/{chunk-2VSTGY6M.js → chunk-PJRW65JO.js} +1 -1
  107. package/chunks/{chunk-6HVUFDS2.js → chunk-PNVPFARW.js} +22 -13
  108. package/chunks/{chunk-IC4Z6LX6.js → chunk-PYQADEFD.js} +5 -0
  109. package/chunks/chunk-R4ZA6GBK.js +208 -0
  110. package/chunks/{chunk-KR4ZSC7K.js → chunk-RMPLEWF3.js} +3 -3
  111. package/chunks/{chunk-EORNAQDT.js → chunk-RQ6U2JJQ.js} +1 -1
  112. package/chunks/{chunk-AE77C5ZU.js → chunk-RYQMJCUO.js} +1 -1
  113. package/chunks/{chunk-6UWFTUQL.js → chunk-S5CULOHB.js} +75 -31
  114. package/chunks/{chunk-7UFKAV7Y.js → chunk-S6HYI3MF.js} +2 -2
  115. package/chunks/chunk-SAH4BD2J.js +92 -0
  116. package/chunks/chunk-SR7RZ4MS.js +202 -0
  117. package/chunks/{chunk-QETYKPMG.js → chunk-T2O6NIOY.js} +1 -1
  118. package/chunks/chunk-TQOF5KBL.js +71 -0
  119. package/chunks/{chunk-OHJLEW5J.js → chunk-TWFFY5BP.js} +4 -4
  120. package/chunks/{chunk-SCI7K3GM.js → chunk-TXO5BMR2.js} +19 -10
  121. package/chunks/{chunk-YJQCUTT2.js → chunk-UAB6J2IE.js} +4 -4
  122. package/chunks/{chunk-OFI7IGST.js → chunk-UGUKH3SU.js} +10 -10
  123. package/chunks/{chunk-SHZYHGQH.js → chunk-V2226RFW.js} +1 -1
  124. package/chunks/{chunk-KKJJB5X6.js → chunk-V47QNK5W.js} +1526 -833
  125. package/chunks/{chunk-W4B7UBUS.js → chunk-VHXPSL57.js} +6 -6
  126. package/chunks/{chunk-WUC6ZFXO.js → chunk-VKJ4KTPJ.js} +1 -1
  127. package/chunks/{chunk-MAJS7AT4.js → chunk-VNNWAZSI.js} +2 -2
  128. package/chunks/{chunk-BVWVWGLE.js → chunk-WAUGQKUU.js} +4 -64
  129. package/chunks/{chunk-OH2VKQXH.js → chunk-WH6QMLUW.js} +37 -30
  130. package/chunks/{chunk-PJOBIWUG.js → chunk-WQYWK4DG.js} +1 -1
  131. package/chunks/{chunk-LEMXGVEP.js → chunk-YFRFZCIP.js} +3 -3
  132. package/chunks/{chunk-2U3WZGZG.js → chunk-YGT2AUJ7.js} +103 -135
  133. package/chunks/{chunk-6XU3PH66.js → chunk-YR7ZQ4RD.js} +22 -69
  134. package/chunks/{chunk-OA4JVLSA.js → chunk-Z7VOMGDC.js} +22 -1
  135. package/chunks/{chunk-RUL4S3K3.js → chunk-ZCJBCKL5.js} +175 -60
  136. package/chunks/{chunk-GSS34377.js → chunk-ZI5IH2HP.js} +2 -2
  137. package/chunks/{chunk-CB2464BK.js → chunk-ZIKTCMQF.js} +117 -10
  138. package/chunks/chunk-ZLBIFIMV.js +1099 -0
  139. package/chunks/{chunk-D3UEZIQH.js → chunk-ZSNBQXMZ.js} +48 -55
  140. package/chunks/{chunk-FZBZSYKU.js → chunk-ZV7LTLFE.js} +1 -1
  141. package/chunks/{computer-use-KEAPATUY.js → computer-use-SLN7DV2E.js} +28 -24
  142. package/chunks/{config-utils-K7SCOWHD.js → config-utils-ULCSRMWD.js} +4 -4
  143. package/chunks/{contextCommand-ZJA6A5K5.js → contextCommand-EHFYX6FW.js} +30 -26
  144. package/chunks/{core-runtime-QMJPWHCI.js → core-runtime-FBSP5IIG.js} +33 -29
  145. package/chunks/{create-sub-session-E4PBYXV5.js → create-sub-session-QIDZUOPU.js} +1 -1
  146. package/chunks/{create-sub-session-DJE6XICH.js → create-sub-session-WC7YGVSL.js} +29 -25
  147. package/chunks/{cron-create-GRBWYMIJ.js → cron-create-VONA5JYY.js} +1 -1
  148. package/chunks/{cron-delete-4CMKBR2M.js → cron-delete-5JXSP2MI.js} +1 -1
  149. package/chunks/{cron-list-W7K4ASOA.js → cron-list-KE4F2CIR.js} +1 -1
  150. package/chunks/{daemon-SCTQMM7Z.js → daemon-VSX3FHTY.js} +119 -4
  151. package/chunks/{daemon-status-provider-FSWDPE2G.js → daemon-status-provider-WW2AD2T7.js} +39 -35
  152. package/chunks/{daemon-trust-policy-P5L5VFAY.js → daemon-trust-policy-E4MAYWPI.js} +35 -31
  153. package/chunks/{daemon-trust-policy-monitor-73JYN6ET.js → daemon-trust-policy-monitor-XVIDV6T4.js} +35 -31
  154. package/chunks/{de-VL76CPLV.js → de-LIW4XVLN.js} +5 -0
  155. package/chunks/{deferred-core-runtime-BWRCCFTE.js → deferred-core-runtime-5SVUC6UC.js} +28 -24
  156. package/chunks/{display-image-O2XFPQTC.js → display-image-NQRSIBXM.js} +2 -2
  157. package/chunks/{dist-HVBMEYWK.js → dist-3NTTUAHT.js} +1 -1
  158. package/chunks/{dist-7JGAAQSC.js → dist-6BMOAE3Z.js} +2 -2
  159. package/chunks/{dist-3BMEUGTG.js → dist-B2CGTW6T.js} +1 -1
  160. package/chunks/{dist-C5U4LJKW.js → dist-EWW3J4HQ.js} +5 -4
  161. package/chunks/{dist-K4WWQBHS.js → dist-EZE3V3Q7.js} +55 -15
  162. package/chunks/{dist-DPPHJAVL.js → dist-J47AXBZC.js} +918 -142
  163. package/chunks/{dist-SFQ34F4M.js → dist-OTUO3AS2.js} +8 -1091
  164. package/chunks/{dist-KS4O2NKE.js → dist-Z3CS4OVP.js} +14 -8
  165. package/chunks/{earlyInputCapture-L5ST23A6.js → earlyInputCapture-72FYHYRD.js} +28 -24
  166. package/chunks/{edit-LHHRFNFK.js → edit-SWVVWHXW.js} +28 -24
  167. package/chunks/{en-IRJ2WN5T.js → en-SY5GTIGX.js} +6 -0
  168. package/chunks/{enter-worktree-6NXCRZPF.js → enter-worktree-2HF6WQEO.js} +28 -24
  169. package/chunks/{enterPlanMode-ZVQT4U7D.js → enterPlanMode-OW6S7L4P.js} +28 -24
  170. package/chunks/{environment-GJ2HWJOS.js → environment-LRTBTDXH.js} +32 -28
  171. package/chunks/{errors-6RLH3XXC.js → errors-4CO2DME6.js} +30 -26
  172. package/chunks/{exit-worktree-I2YLUHHY.js → exit-worktree-GHJEIRGL.js} +28 -24
  173. package/chunks/{exitPlanMode-7CCWKO7I.js → exitPlanMode-JVP4FNNK.js} +28 -24
  174. package/chunks/{fast-path-DVFD4HQD.js → fast-path-HCCY7GR2.js} +24 -3
  175. package/chunks/{fast-path-settings-WQJU2LAT.js → fast-path-settings-MN5QQQET.js} +6 -3
  176. package/chunks/{fr-GK3HQYVB.js → fr-RQFO7U4P.js} +5 -0
  177. package/chunks/{gemini-7FWGOYD4.js → gemini-V3YVRKXU.js} +85 -72
  178. package/chunks/{geminiContentGenerator-V2WVLIXU.js → geminiContentGenerator-LVPMQUWX.js} +1 -1
  179. package/chunks/{glob-3N6GGI75.js → glob-7HRXHYDR.js} +28 -24
  180. package/chunks/{goal-tools-APOW6UXL.js → goal-tools-PXWN5VK3.js} +4 -2
  181. package/chunks/{grep-V43ILZVX.js → grep-BITQUON5.js} +28 -24
  182. package/chunks/{handleAutoUpdate-A5WFVWIA.js → handleAutoUpdate-DKFY454S.js} +32 -28
  183. package/chunks/{i18n-PLVQ4FBZ.js → i18n-53BQIQSH.js} +29 -25
  184. package/chunks/{image-gen-7C6IK6DC.js → image-gen-H62FLDFB.js} +7 -5
  185. package/chunks/{initializer-CVAIKZYL.js → initializer-Q7NUQRSU.js} +35 -31
  186. package/chunks/{installationInfo-J6QDHNTK.js → installationInfo-BWFHT7WU.js} +29 -25
  187. package/chunks/{ja-3FA46IKD.js → ja-KOZKHJHZ.js} +5 -0
  188. package/chunks/{list-ZZ4OUUWV.js → list-OWQKR6JK.js} +38 -34
  189. package/chunks/{list-agents-KFFIIS2G.js → list-agents-Z4WABFDZ.js} +1 -1
  190. package/chunks/{loadedSettingsAdapter-QRYRJSWL.js → loadedSettingsAdapter-HNPKQMFA.js} +35 -31
  191. package/chunks/{loggingContentGenerator-OJCO75HM.js → loggingContentGenerator-A5I3VQUC.js} +10 -8
  192. package/chunks/{loop-wakeup-TLMJPMMP.js → loop-wakeup-UZ5RL5Y2.js} +2 -2
  193. package/chunks/{ls-UVVE2XGE.js → ls-TVHDGIES.js} +1 -1
  194. package/chunks/{lsp-QMEA2VLB.js → lsp-CVN6OQPI.js} +1 -1
  195. package/chunks/main-PXAUXNF2.js +8 -0
  196. package/chunks/{managed-npm-update-PCOSCP2N.js → managed-npm-update-CUUJGUTV.js} +29 -25
  197. package/chunks/{mcp-M3WKKWKY.js → mcp-GJSC7ZPO.js} +35 -31
  198. package/chunks/{monitor-GN24FH6C.js → monitor-TZ2II7JM.js} +38 -30
  199. package/chunks/{nonInteractiveCli-KPTU3VSQ.js → nonInteractiveCli-22RS4EVH.js} +72 -66
  200. package/chunks/{notebook-edit-4YM65BBO.js → notebook-edit-YZC3YPY2.js} +36 -24
  201. package/chunks/{openaiContentGenerator-EDQT6GTV.js → openaiContentGenerator-OIGO5XNF.js} +21 -11
  202. package/chunks/{pidfile-JOIIRN2C.js → pidfile-QJQ65RJ2.js} +28 -24
  203. package/chunks/{process-registry-2CHQBXH5.js → process-registry-PMJOA5CO.js} +15 -0
  204. package/chunks/{processUtils-5SV4MX3Q.js → processUtils-V5VSDIKS.js} +2 -2
  205. package/chunks/{pt-3AOBKPIJ.js → pt-U6AOCTMF.js} +5 -0
  206. package/chunks/{qwenContentGenerator-ODRJSUGR.js → qwenContentGenerator-HXM25BGB.js} +35 -30
  207. package/chunks/{qwenOAuth2-NESCMZ47.js → qwenOAuth2-7MTMS2Z5.js} +7 -5
  208. package/chunks/{read-file-HPSODLPK.js → read-file-PMGXB3ZB.js} +8 -6
  209. package/chunks/{read-mcp-resource-2TNSJTC3.js → read-mcp-resource-PZ4ZF6YL.js} +1 -1
  210. package/chunks/{record-artifact-RAON52FC.js → record-artifact-P4HFMS7X.js} +2 -2
  211. package/chunks/{resumeHistoryUtils-TXCOFFMQ.js → resumeHistoryUtils-YUTPLHUH.js} +33 -29
  212. package/chunks/{ripGrep-ZKQGTQAO.js → ripGrep-XUS66YIV.js} +28 -24
  213. package/chunks/{ru-VJRAMC4W.js → ru-CMX4UMYP.js} +5 -0
  214. package/chunks/{run-qwen-serve-ZPKPKECF.js → run-qwen-serve-4NVSU75L.js} +261 -62
  215. package/chunks/{runtime-2FLNNM36.js → runtime-QLRVP6HM.js} +40 -36
  216. package/chunks/{scheduler-365PJHNR.js → scheduler-PBB2NSOP.js} +28 -24
  217. package/chunks/{sdk-exporters-http-KHAB5JSD.js → sdk-exporters-http-XVTZQRCE.js} +2 -2
  218. package/chunks/{sdk-impl-KD7FSTC3.js → sdk-impl-7W7AKCS4.js} +7 -3
  219. package/chunks/{send-message-ZM7MRUGP.js → send-message-CAMSLG2L.js} +4 -3
  220. package/chunks/{serve-QD2RNLKJ.js → serve-BWKTRX72.js} +37 -31
  221. package/chunks/{server-XLJVLTYM.js → server-E7CH7WPK.js} +1437 -593
  222. package/chunks/{session-3VTUHH4Q.js → session-QEKSJ6YU.js} +166 -105
  223. package/chunks/{settings-KULVPCQC.js → settings-BRAOSJIM.js} +34 -30
  224. package/chunks/{shell-3SWW22MH.js → shell-OF3CK4AT.js} +28 -24
  225. package/chunks/{skill-KDHWYS7W.js → skill-HLH2NO2H.js} +9 -7
  226. package/chunks/{skill-settings-NMY4JEJC.js → skill-settings-DRPU7YI5.js} +34 -30
  227. package/chunks/{spawnChannel-ZKS4Q5OU.js → spawnChannel-4KO7YTFM.js} +31 -27
  228. package/chunks/{standalone-update-7CXPGAQ4.js → standalone-update-DJN2R3YW.js} +30 -26
  229. package/chunks/{startInteractiveUI-2QQLEKM6.js → startInteractiveUI-O3WQQ2WC.js} +384 -173
  230. package/chunks/{syntheticOutput-ZLCUTKO2.js → syntheticOutput-PEBJQYJV.js} +2 -2
  231. package/chunks/{task-create-CQP5UEA3.js → task-create-5NWCQSJF.js} +5 -4
  232. package/chunks/{task-list-XLEZOJXP.js → task-list-53265TRZ.js} +1 -1
  233. package/chunks/{task-stop-7ZQM5CFF.js → task-stop-FPCOIRYX.js} +1 -1
  234. package/chunks/{task-update-JA75U2SN.js → task-update-5HN577LS.js} +5 -4
  235. package/chunks/{team-create-2WTNGAOX.js → team-create-2E4ACBJD.js} +28 -24
  236. package/chunks/{team-delete-MHY3UZGY.js → team-delete-MMQB4OSC.js} +1 -1
  237. package/chunks/{team-plan-approval-LZTYLEG4.js → team-plan-approval-LWIDXYOA.js} +28 -24
  238. package/chunks/{terminal-image-renderer-R5HHAFJN.js → terminal-image-renderer-PJM7663W.js} +30 -26
  239. package/chunks/{theme-manager-PAUCSJFF.js → theme-manager-FDQTM3RP.js} +28 -24
  240. package/chunks/{todoWrite-UPVOHYGD.js → todoWrite-JGV6VLOX.js} +1 -1
  241. package/chunks/{tool-search-2BFCGLI6.js → tool-search-TL5ZXBF4.js} +11 -8
  242. package/chunks/{total-session-admission-MK4SINFK.js → total-session-admission-LS6EY5KT.js} +37 -32
  243. package/chunks/{trustedFolders-TJ5S26N7.js → trustedFolders-5RWP5OB7.js} +32 -26
  244. package/chunks/{types-ML3TRJQ5.js → types-WYCFCEHR.js} +5 -3
  245. package/chunks/{update-relaunch-N7AYLARF.js → update-relaunch-HWQ4USKY.js} +5 -5
  246. package/chunks/{updateCheck-QRZ3DVT5.js → updateCheck-EZMBTEIR.js} +31 -27
  247. package/chunks/{useAutoAcceptIndicator-DBJ7Y5AF.js → useAutoAcceptIndicator-JDMI627A.js} +37 -33
  248. package/chunks/{validateNonInterActiveAuth-6ZQWUDS3.js → validateNonInterActiveAuth-RRUHC5RO.js} +67 -63
  249. package/chunks/{version-AJQGQWXC.js → version-XS4UTKUX.js} +1 -1
  250. package/chunks/{web-fetch-QWJYRXFL.js → web-fetch-2JV7H6OM.js} +14 -10
  251. package/chunks/{web-search-2AOXJGHU.js → web-search-RCTN2GAM.js} +10 -7
  252. package/chunks/{workflow-ERH3SJG2.js → workflow-6MKLKQ6R.js} +909 -273
  253. package/chunks/{workspace-providers-status-HZ474RA4.js → workspace-providers-status-YZ2IJ4DK.js} +38 -34
  254. package/chunks/{workspace-registration-store-6EUP4JXG.js → workspace-registration-store-IYN72LBS.js} +1 -1
  255. package/chunks/{workspace-registry-R4APRRNC.js → workspace-registry-7LFBZQLT.js} +37 -32
  256. package/chunks/{workspace-service-HFIFDMU7.js → workspace-service-2EHSPRJB.js} +45 -39
  257. package/chunks/{workspace-skills-status-HAHEIHGK.js → workspace-skills-status-5VJ2D5HN.js} +36 -32
  258. package/chunks/{workspace-trust-reconciler-65GTAGDK.js → workspace-trust-reconciler-X2LZ6XCI.js} +44 -39
  259. package/chunks/{write-file-B34CDELV.js → write-file-CJK6SCCF.js} +28 -24
  260. package/chunks/{zh-ARWDLDLR.js → zh-AGL2FVBI.js} +6 -0
  261. package/chunks/{zh-TW-Y4RGI3P7.js → zh-TW-KI66MHQY.js} +6 -0
  262. package/chunks/{zoom-image-HPRBZHSS.js → zoom-image-BVW4RFYW.js} +8 -6
  263. package/cli.js +13 -13
  264. package/locales/ca.js +10 -0
  265. package/locales/de.js +9 -0
  266. package/locales/en.js +10 -0
  267. package/locales/fr.js +9 -0
  268. package/locales/ja.js +9 -0
  269. package/locales/pt.js +9 -0
  270. package/locales/ru.js +9 -0
  271. package/locales/zh-TW.js +10 -0
  272. package/locales/zh.js +10 -0
  273. package/package.json +3 -3
  274. package/web-shell/assets/{arc-Ip-FFDJ0.js → arc-DDtoJrAW.js} +1 -1
  275. package/web-shell/assets/{architectureDiagram-3BPJPVTR-CChqgwIb.js → architectureDiagram-3BPJPVTR-BAInIW4O.js} +1 -1
  276. package/web-shell/assets/{blockDiagram-GPEHLZMM-BHN-Tfss.js → blockDiagram-GPEHLZMM-ChPDk7fP.js} +1 -1
  277. package/web-shell/assets/{c4Diagram-AAUBKEIU-BhyjzDjN.js → c4Diagram-AAUBKEIU-Cd9BJuUy.js} +1 -1
  278. package/web-shell/assets/channel-0OQklTfP.js +1 -0
  279. package/web-shell/assets/{chunk-2J33WTMH-BB9eyHrx.js → chunk-2J33WTMH-COQkLp56.js} +1 -1
  280. package/web-shell/assets/{chunk-4BX2VUAB-BeV7ce_J.js → chunk-4BX2VUAB-GUJshQ_l.js} +1 -1
  281. package/web-shell/assets/{chunk-55IACEB6-DO7kXDiV.js → chunk-55IACEB6-Boaa7c10.js} +1 -1
  282. package/web-shell/assets/{chunk-727SXJPM-B27MPznD.js → chunk-727SXJPM-CcRXaly2.js} +1 -1
  283. package/web-shell/assets/{chunk-AQP2D5EJ-DHIjqjD_.js → chunk-AQP2D5EJ-BY0OARHh.js} +1 -1
  284. package/web-shell/assets/{chunk-FMBD7UC4-DabMqyN2.js → chunk-FMBD7UC4-DLFQfv0S.js} +1 -1
  285. package/web-shell/assets/{chunk-ND2GUHAM-Dw7Nnnxc.js → chunk-ND2GUHAM-C_S0u-D2.js} +1 -1
  286. package/web-shell/assets/{chunk-QZHKN3VN-DdaZew1Q.js → chunk-QZHKN3VN-DP9m64hw.js} +1 -1
  287. package/web-shell/assets/classDiagram-4FO5ZUOK-CZ4-apsu.js +1 -0
  288. package/web-shell/assets/classDiagram-v2-Q7XG4LA2-CZ4-apsu.js +1 -0
  289. package/web-shell/assets/{cose-bilkent-S5V4N54A-CgBpCYH5.js → cose-bilkent-S5V4N54A-CGY6zGE1.js} +1 -1
  290. package/web-shell/assets/{dagre-BM42HDAG-BB4IU8G0.js → dagre-BM42HDAG-yB7whKNn.js} +1 -1
  291. package/web-shell/assets/{diagram-2AECGRRQ-BcUTHU37.js → diagram-2AECGRRQ-Bdlc59La.js} +1 -1
  292. package/web-shell/assets/{diagram-5GNKFQAL-B6Lyihyv.js → diagram-5GNKFQAL-BUClP18L.js} +1 -1
  293. package/web-shell/assets/{diagram-KO2AKTUF-CRIJOjpG.js → diagram-KO2AKTUF-aZm08kjn.js} +1 -1
  294. package/web-shell/assets/{diagram-LMA3HP47-DdNiwWWT.js → diagram-LMA3HP47-7DGwEkxC.js} +1 -1
  295. package/web-shell/assets/{diagram-OG6HWLK6-Dz4b32Do.js → diagram-OG6HWLK6-CAGKayxx.js} +1 -1
  296. package/web-shell/assets/{erDiagram-TEJ5UH35-D-8NGw77.js → erDiagram-TEJ5UH35-CptoHHQi.js} +1 -1
  297. package/web-shell/assets/{flowDiagram-I6XJVG4X-Dun26LyM.js → flowDiagram-I6XJVG4X-CNOH0s7Q.js} +1 -1
  298. package/web-shell/assets/{ganttDiagram-6RSMTGT7-F10Hu1Gc.js → ganttDiagram-6RSMTGT7-CCQuCU3y.js} +1 -1
  299. package/web-shell/assets/{gitGraphDiagram-PVQCEYII-Bf8Ez6-D.js → gitGraphDiagram-PVQCEYII-B7gv9f4E.js} +1 -1
  300. package/web-shell/assets/{index-BXqw-nGq.js → index-BoUPVvpf.js} +1 -1
  301. package/web-shell/assets/index-D1YQXYsB.css +5 -0
  302. package/web-shell/assets/index-J4N7zCmU.js +1768 -0
  303. package/web-shell/assets/{infoDiagram-5YYISTIA-DVgTMLvj.js → infoDiagram-5YYISTIA-Bb3KYEbR.js} +1 -1
  304. package/web-shell/assets/{ishikawaDiagram-YF4QCWOH-uT-KepvK.js → ishikawaDiagram-YF4QCWOH-DWEzbAGi.js} +1 -1
  305. package/web-shell/assets/{journeyDiagram-JHISSGLW-Vg_XadQf.js → journeyDiagram-JHISSGLW-CmxwEqeb.js} +1 -1
  306. package/web-shell/assets/{kanban-definition-UN3LZRKU-Dyv1ESBE.js → kanban-definition-UN3LZRKU-Ci0gDD8O.js} +1 -1
  307. package/web-shell/assets/{linear-BMIepYX3.js → linear-BqxZqGhS.js} +1 -1
  308. package/web-shell/assets/{mermaid.core-zA8pJ9ag.js → mermaid.core-BDAFffHv.js} +5 -5
  309. package/web-shell/assets/{mindmap-definition-RKZ34NQL-BCW_BZ_5.js → mindmap-definition-RKZ34NQL-Btvx-xvS.js} +1 -1
  310. package/web-shell/assets/{pieDiagram-4H26LBE5-DseNEGp2.js → pieDiagram-4H26LBE5-CKAg7yG7.js} +1 -1
  311. package/web-shell/assets/{quadrantDiagram-W4KKPZXB-6Z7wr1Fi.js → quadrantDiagram-W4KKPZXB-DIt8E1mC.js} +1 -1
  312. package/web-shell/assets/{requirementDiagram-4Y6WPE33-CVOlCRPf.js → requirementDiagram-4Y6WPE33-BA7mQWQJ.js} +1 -1
  313. package/web-shell/assets/{sankeyDiagram-5OEKKPKP-CGhgrUJZ.js → sankeyDiagram-5OEKKPKP-D0JppnVU.js} +1 -1
  314. package/web-shell/assets/{sequenceDiagram-3UESZ5HK-dlqmpLuQ.js → sequenceDiagram-3UESZ5HK-29DIQFjB.js} +1 -1
  315. package/web-shell/assets/{stateDiagram-AJRCARHV-B9EW10Xb.js → stateDiagram-AJRCARHV-iiXMdK--.js} +1 -1
  316. package/web-shell/assets/stateDiagram-v2-BHNVJYJU-CEGK3l80.js +1 -0
  317. package/web-shell/assets/{timeline-definition-PNZ67QCA-BBRh0mgZ.js → timeline-definition-PNZ67QCA-CeF7ngSW.js} +1 -1
  318. package/web-shell/assets/{vennDiagram-CIIHVFJN-B8Gs-REP.js → vennDiagram-CIIHVFJN-Beilq8D6.js} +1 -1
  319. package/web-shell/assets/{wardley-L42UT6IY-D_y80Ur7.js → wardley-L42UT6IY-DOYjY4zO.js} +1 -1
  320. package/web-shell/assets/{wardleyDiagram-YWT4CUSO-D-CNfHJ-.js → wardleyDiagram-YWT4CUSO-Dtqp8o18.js} +1 -1
  321. package/web-shell/assets/{xychartDiagram-2RQKCTM6-DQ5CvELo.js → xychartDiagram-2RQKCTM6-cdAc0Dfv.js} +1 -1
  322. package/web-shell/index.html +2 -2
  323. package/chunks/chunk-6PEXNQTX.js +0 -68
  324. package/chunks/chunk-IUFV6FYU.js +0 -81
  325. package/chunks/chunk-RXFQM6FQ.js +0 -42
  326. package/web-shell/assets/channel-Cu8qd6OB.js +0 -1
  327. package/web-shell/assets/classDiagram-4FO5ZUOK-BI3KrXhq.js +0 -1
  328. package/web-shell/assets/classDiagram-v2-Q7XG4LA2-BI3KrXhq.js +0 -1
  329. package/web-shell/assets/index-QQlUCJGg.css +0 -5
  330. package/web-shell/assets/index-hcgjV7vS.js +0 -1768
  331. package/web-shell/assets/stateDiagram-v2-BHNVJYJU-CJTZJJ5X.js +0 -1
  332. package/chunks/{anthropicContentGenerator-DTMVEL5M.js → anthropicContentGenerator-SSFE2753.js} +9 -9
  333. /package/chunks/{chunk-VXZBKKQR.js → chunk-NTTBXH7U.js} +0 -0
  334. /package/chunks/{chunk-GRC5HGPI.js → chunk-OIBUG24X.js} +0 -0
@@ -26,6 +26,19 @@ var BridgeTimeoutError = class extends Error {
26
26
  this.timeoutMs = timeoutMs;
27
27
  }
28
28
  };
29
+ var SessionRestoreTimeoutError = class extends BridgeTimeoutError {
30
+ static {
31
+ __name(this, "SessionRestoreTimeoutError");
32
+ }
33
+ sessionId;
34
+ action;
35
+ constructor(sessionId, action, timeoutMs) {
36
+ super(`session/${action}`, timeoutMs);
37
+ this.name = "SessionRestoreTimeoutError";
38
+ this.sessionId = sessionId;
39
+ this.action = action;
40
+ }
41
+ };
29
42
  var BridgeChannelClosedError = class extends Error {
30
43
  static {
31
44
  __name(this, "BridgeChannelClosedError");
@@ -335,6 +348,7 @@ var MODEL_CONFIG_ERROR_NAMES = /* @__PURE__ */ new Set([
335
348
  "MissingAnthropicBaseUrlEnvError"
336
349
  ]);
337
350
  function mapDomainErrorToErrorKind(err) {
351
+ if (err instanceof SessionRestoreTimeoutError) return "restore_timeout";
338
352
  if (err instanceof BridgeTimeoutError) return "init_timeout";
339
353
  if (err instanceof BridgeChannelClosedError) return "protocol_error";
340
354
  if (err instanceof MissingCliEntryError) return "missing_binary";
@@ -359,6 +373,7 @@ __name(mapDomainErrorToErrorKind, "mapDomainErrorToErrorKind");
359
373
  export {
360
374
  STATUS_SCHEMA_VERSION,
361
375
  BridgeTimeoutError,
376
+ SessionRestoreTimeoutError,
362
377
  BridgeChannelClosedError,
363
378
  MissingCliEntryError,
364
379
  SERVE_STATUS_EXT_METHODS,
@@ -5,12 +5,12 @@ import {
5
5
  } from "./chunk-4NFY2S7N.js";
6
6
  import {
7
7
  t
8
- } from "./chunk-DBOFL3LQ.js";
8
+ } from "./chunk-BL65MO72.js";
9
9
  import {
10
10
  fetchGitDiff,
11
11
  findProviderByCredentials,
12
12
  resolveMetadataKey
13
- } from "./chunk-Y7E5LNLO.js";
13
+ } from "./chunk-47ZUMGGY.js";
14
14
  import {
15
15
  init_esbuild_shims
16
16
  } from "./chunk-5O2XNYP6.js";
@@ -71,6 +71,7 @@ var PairingStore = class {
71
71
  dir;
72
72
  pendingPath;
73
73
  allowlistPath;
74
+ groupAllowlistPath;
74
75
  migratedSentinelPath;
75
76
  /**
76
77
  * @param channelName Channel name the state is keyed by.
@@ -88,6 +89,7 @@ var PairingStore = class {
88
89
  const safeChannelName = encodeURIComponent(channelName);
89
90
  this.pendingPath = path2.join(this.dir, `${safeChannelName}-pairing.json`);
90
91
  this.allowlistPath = path2.join(this.dir, `${safeChannelName}-allowlist.json`);
92
+ this.groupAllowlistPath = path2.join(this.dir, `${safeChannelName}-groups.json`);
91
93
  this.migratedSentinelPath = path2.join(this.dir, `${safeChannelName}.migrated`);
92
94
  if (workspaceCwd) {
93
95
  this.migrateLegacyState(channelsRoot, channelName);
@@ -131,6 +133,10 @@ var PairingStore = class {
131
133
  [
132
134
  path2.join(channelsRoot, `${channelName}-allowlist.json`),
133
135
  this.allowlistPath
136
+ ],
137
+ [
138
+ path2.join(channelsRoot, `${channelName}-groups.json`),
139
+ this.groupAllowlistPath
134
140
  ]
135
141
  ];
136
142
  this.ensureDir();
@@ -164,30 +170,44 @@ var PairingStore = class {
164
170
  const list = this.readAllowlist();
165
171
  return list.includes(senderId);
166
172
  }
173
+ isGroupApproved(groupId) {
174
+ return this.readGroupAllowlist().includes(groupId);
175
+ }
167
176
  /**
168
177
  * Create a pairing request for an unknown sender.
169
- * Returns the code if created, or null if the pending cap is reached.
170
- * If the sender already has a non-expired pending request, returns that code.
178
+ * Returns the code if created; if the subject already has a non-expired
179
+ * pending request, returns that code. Rejects with `sender_pending` when
180
+ * the sender already holds a request for another subject, or
181
+ * `cap_reached` when the pending cap is reached.
171
182
  */
172
183
  createRequest(senderId, senderName) {
184
+ return this.createSubjectRequest({ type: "user", id: senderId, name: senderName }, senderId, senderName);
185
+ }
186
+ createGroupRequest(groupId, groupName, senderId, senderName) {
187
+ return this.createSubjectRequest({ type: "group", id: groupId, name: groupName }, senderId, senderName);
188
+ }
189
+ createSubjectRequest(subject, senderId, senderName) {
173
190
  const pending = this.readPending();
174
191
  const now = Date.now();
175
192
  const active = pending.filter((r) => now - r.createdAt < EXPIRY_MS);
176
- const existing = active.find((r) => r.senderId === senderId);
193
+ const existing = active.find((request) => request.subject.type === subject.type && request.subject.id === subject.id);
177
194
  if (existing) {
178
- return existing.code;
195
+ return { code: existing.code };
196
+ }
197
+ if (active.some((request) => request.senderId === senderId)) {
198
+ return { rejected: "sender_pending" };
179
199
  }
180
200
  if (active.length >= MAX_PENDING) {
181
- return null;
201
+ return { rejected: "cap_reached" };
182
202
  }
183
203
  const code = generateCode();
184
- active.push({ senderId, senderName, code, createdAt: now });
204
+ active.push({ senderId, senderName, subject, code, createdAt: now });
185
205
  this.writePending(active);
186
- return code;
206
+ return { code };
187
207
  }
188
208
  /**
189
209
  * Approve a pairing request by code.
190
- * Returns the sender ID if found, or null if not found / expired.
210
+ * Returns the request if found, or null if not found / expired.
191
211
  */
192
212
  approve(code) {
193
213
  const pending = this.readPending();
@@ -196,13 +216,21 @@ var PairingStore = class {
196
216
  if (idx === -1)
197
217
  return null;
198
218
  const request = pending[idx];
219
+ if (request.subject.type === "group") {
220
+ const groups = this.readGroupAllowlist(true);
221
+ if (!groups.includes(request.subject.id)) {
222
+ groups.push(request.subject.id);
223
+ this.writeGroupAllowlist(groups);
224
+ }
225
+ } else {
226
+ const users = this.readAllowlist();
227
+ if (!users.includes(request.subject.id)) {
228
+ users.push(request.subject.id);
229
+ this.writeAllowlist(users);
230
+ }
231
+ }
199
232
  pending.splice(idx, 1);
200
233
  this.writePending(pending);
201
- const list = this.readAllowlist();
202
- if (!list.includes(request.senderId)) {
203
- list.push(request.senderId);
204
- this.writeAllowlist(list);
205
- }
206
234
  return request;
207
235
  }
208
236
  listPending() {
@@ -213,6 +241,9 @@ var PairingStore = class {
213
241
  getAllowlist() {
214
242
  return this.readAllowlist();
215
243
  }
244
+ getGroupAllowlist() {
245
+ return this.readGroupAllowlist();
246
+ }
216
247
  revoke(senderId) {
217
248
  const list = this.readAllowlist();
218
249
  const next = list.filter((id) => id !== senderId);
@@ -222,6 +253,15 @@ var PairingStore = class {
222
253
  this.writeAllowlist(next);
223
254
  return true;
224
255
  }
256
+ revokeGroup(groupId) {
257
+ const list = this.readGroupAllowlist();
258
+ const next = list.filter((id) => id !== groupId);
259
+ if (next.length === list.length) {
260
+ return false;
261
+ }
262
+ this.writeGroupAllowlist(next);
263
+ return true;
264
+ }
225
265
  ensureDir() {
226
266
  if (!fs2.existsSync(this.dir)) {
227
267
  fs2.mkdirSync(this.dir, { recursive: true });
@@ -230,7 +270,15 @@ var PairingStore = class {
230
270
  readPending() {
231
271
  try {
232
272
  const data = fs2.readFileSync(this.pendingPath, "utf-8");
233
- return JSON.parse(data);
273
+ const requests = JSON.parse(data);
274
+ return requests.map((request) => ({
275
+ ...request,
276
+ subject: request.subject ?? {
277
+ type: "user",
278
+ id: request.senderId,
279
+ name: request.senderName
280
+ }
281
+ }));
234
282
  } catch {
235
283
  return [];
236
284
  }
@@ -251,6 +299,28 @@ var PairingStore = class {
251
299
  this.ensureDir();
252
300
  fs2.writeFileSync(this.allowlistPath, JSON.stringify(list, null, 2));
253
301
  }
302
+ readGroupAllowlist(strict = false) {
303
+ try {
304
+ const data = fs2.readFileSync(this.groupAllowlistPath, "utf-8");
305
+ return JSON.parse(data);
306
+ } catch (err) {
307
+ const exists = fs2.existsSync(this.groupAllowlistPath);
308
+ if (strict && exists) {
309
+ throw new Error(`refusing to rewrite unreadable group allowlist "${path2.basename(this.groupAllowlistPath)}": ${err?.message}`);
310
+ }
311
+ if (exists) {
312
+ process.stderr.write(`[PairingStore] group allowlist "${path2.basename(this.groupAllowlistPath)}" is unreadable (${err?.message}); treating as empty \u2014 stored group approvals are not in effect and will be lost on the next approve
313
+ `);
314
+ }
315
+ return [];
316
+ }
317
+ }
318
+ writeGroupAllowlist(list) {
319
+ this.ensureDir();
320
+ const tmpPath = `${this.groupAllowlistPath}.${process.pid}.tmp`;
321
+ fs2.writeFileSync(tmpPath, JSON.stringify(list, null, 2));
322
+ fs2.renameSync(tmpPath, this.groupAllowlistPath);
323
+ }
254
324
  };
255
325
  function generateCode() {
256
326
  let code = "";
@@ -457,6 +527,12 @@ import { spawn } from "node:child_process";
457
527
  import { randomUUID } from "node:crypto";
458
528
  import { Readable, Writable } from "node:stream";
459
529
  import { EventEmitter } from "node:events";
530
+
531
+ // packages/channels/base/dist/ChannelAgentBridge.js
532
+ init_esbuild_shims();
533
+ var CHANNEL_PROMPT_META_KEY = "qwen.channel.prompt";
534
+
535
+ // packages/channels/base/dist/AcpBridge.js
460
536
  var MID_TURN_QUEUE_DRAIN_METHOD = "craft/drainMidTurnQueue";
461
537
  var TODO_STOP_GUARD_CONTINUATION_CLAIM_METHOD = "craft/claimTodoStopGuardContinuation";
462
538
  var ACP_EVENT_LOOP_STALL_RESTART_MS = 5 * 60 * 1e3;
@@ -624,7 +700,8 @@ var AcpBridge = class extends EventEmitter {
624
700
  try {
625
701
  await conn.prompt({
626
702
  sessionId,
627
- prompt
703
+ prompt,
704
+ _meta: { [CHANNEL_PROMPT_META_KEY]: true }
628
705
  });
629
706
  } finally {
630
707
  this.off("textChunk", onChunk);
@@ -1066,21 +1143,28 @@ var GroupGate = class {
1066
1143
  }
1067
1144
  policy;
1068
1145
  groups;
1069
- constructor(policy = "disabled", groups = {}) {
1146
+ pairingStore;
1147
+ constructor(policy = "disabled", groups = {}, pairingStore) {
1070
1148
  this.policy = policy;
1071
1149
  this.groups = groups;
1150
+ this.pairingStore = pairingStore ?? null;
1072
1151
  }
1073
1152
  /**
1074
- * Full group check: policy + allowlist + mention gating.
1153
+ * Full group check: policy + allowlist + pairing + mention gating.
1075
1154
  * Evaluation order:
1076
1155
  * 1. groupPolicy (disabled → drop)
1077
1156
  * 2. group allowlist (allowlist mode, no match → drop)
1078
- * 3. mention gating (requireMention + not mentioned → drop silently)
1157
+ * 3. group pairing (pairing mode, group not approved → drop; an explicit
1158
+ * mention or reply creates or returns a pending pairing request unless
1159
+ * `options.createPairingRequest` is false)
1160
+ * 4. mention gating (requireMention + not mentioned → drop silently)
1079
1161
  *
1080
- * Mention gating runs before sender gate so that unmentioned messages
1081
- * in groups don't trigger pairing flows.
1162
+ * Under the pairing policy the pairing step itself drops ambient
1163
+ * (unmentioned, non-reply) messages before any request is created. Mention
1164
+ * gating then runs before the sender gate so unmentioned messages in
1165
+ * approved groups don't trigger sender pairing flows.
1082
1166
  */
1083
- check(envelope) {
1167
+ check(envelope, options = {}) {
1084
1168
  if (!envelope.isGroup) {
1085
1169
  return { allowed: true };
1086
1170
  }
@@ -1092,6 +1176,17 @@ var GroupGate = class {
1092
1176
  return { allowed: false, reason: "not_allowlisted" };
1093
1177
  }
1094
1178
  }
1179
+ if (this.policy === "pairing" && !this.pairingStore?.isGroupApproved(envelope.chatId)) {
1180
+ if (options.createPairingRequest === false || !envelope.isMentioned && !envelope.isReplyToBot) {
1181
+ return { allowed: false, reason: "pairing_trigger_required" };
1182
+ }
1183
+ const result = this.pairingStore?.createGroupRequest(envelope.chatId, envelope.chatName || envelope.chatId, envelope.senderId, envelope.senderName);
1184
+ return {
1185
+ allowed: false,
1186
+ reason: "pairing_required",
1187
+ pairing: result ?? { rejected: "cap_reached" }
1188
+ };
1189
+ }
1095
1190
  const groupConfig = this.groups[envelope.chatId] || this.groups["*"] || {};
1096
1191
  const requireMention = groupConfig.requireMention ?? true;
1097
1192
  if (requireMention && !envelope.isMentioned && !envelope.isReplyToBot) {
@@ -1099,6 +1194,9 @@ var GroupGate = class {
1099
1194
  }
1100
1195
  return { allowed: true };
1101
1196
  }
1197
+ isGroupApproved(groupId) {
1198
+ return this.pairingStore?.isGroupApproved(groupId) ?? false;
1199
+ }
1102
1200
  };
1103
1201
 
1104
1202
  // packages/channels/base/dist/DmGate.js
@@ -1410,8 +1508,11 @@ var SenderGate = class {
1410
1508
  if (this.pairingStore?.isApproved(senderId)) {
1411
1509
  return { allowed: true };
1412
1510
  }
1413
- const code = this.pairingStore?.createRequest(senderId, senderName || senderId);
1414
- return { allowed: false, pairingCode: code ?? null };
1511
+ const result = this.pairingStore?.createRequest(senderId, senderName || senderId);
1512
+ return {
1513
+ allowed: false,
1514
+ pairing: result ?? { rejected: "cap_reached" }
1515
+ };
1415
1516
  }
1416
1517
  default:
1417
1518
  throw new Error(`Unknown sender policy: ${this.policy}`);
@@ -2766,6 +2867,11 @@ var ChannelBase = class {
2766
2867
  memoryIntentClassifier;
2767
2868
  channelMemoryRecallObserver;
2768
2869
  groupHistory;
2870
+ // Tracks the pairing code already announced per group so repeated triggers
2871
+ // of the same pending request (extra mentions, parallel notification lanes)
2872
+ // post the public notification once. In-memory by design: a restart can
2873
+ // re-post once per still-pending request, but never per trigger.
2874
+ groupPairingNotified = /* @__PURE__ */ new Map();
2769
2875
  loopController;
2770
2876
  observedContacts;
2771
2877
  observedContactEnvelopes = /* @__PURE__ */ new WeakSet();
@@ -3068,9 +3174,9 @@ var ChannelBase = class {
3068
3174
  this.loopController = options?.loopController;
3069
3175
  this.observedContacts = options?.observedContacts;
3070
3176
  this.bridgeRecovery = options?.bridgeRecovery;
3071
- this.groupGate = new GroupGate(config.groupPolicy, config.groups);
3177
+ const pairingStore = config.senderPolicy === "pairing" || config.groupPolicy === "pairing" ? new PairingStore(name, config.cwd) : void 0;
3178
+ this.groupGate = new GroupGate(config.groupPolicy, config.groups, pairingStore);
3072
3179
  this.dmGate = new DmGate(config.dmPolicy);
3073
- const pairingStore = config.senderPolicy === "pairing" ? new PairingStore(name, config.cwd) : void 0;
3074
3180
  this.gate = new SenderGate(config.senderPolicy, config.allowedUsers, pairingStore);
3075
3181
  this.router = options?.router || new SessionRouter(bridge, config.cwd, config.sessionScope);
3076
3182
  this.registerSharedCommands();
@@ -3457,6 +3563,7 @@ var ChannelBase = class {
3457
3563
  text: coalesced,
3458
3564
  alreadyPrefixed: true,
3459
3565
  referencedText: void 0,
3566
+ mentionedMemberIds: void 0,
3460
3567
  attachments: void 0,
3461
3568
  metadata: void 0,
3462
3569
  imageBase64: void 0,
@@ -4841,7 +4948,7 @@ ${requestList}`);
4841
4948
  isMentioned: true,
4842
4949
  isReplyToBot: true
4843
4950
  };
4844
- return this.groupGate.check(envelope).allowed && this.dmGate.check(envelope).allowed && this.gate.isAllowed(normalizedTarget.senderId) && this.isAuthorizedForSharedSession(envelope);
4951
+ return this.groupGate.check(envelope, { createPairingRequest: false }).allowed && this.dmGate.check(envelope).allowed && (normalizedTarget.isGroup && this.config.groupPolicy === "pairing" ? true : this.gate.isAllowed(normalizedTarget.senderId)) && this.isAuthorizedForSharedSession(envelope);
4845
4952
  }
4846
4953
  /** Check if a message text matches a registered local command. */
4847
4954
  isLocalCommand(text) {
@@ -5511,7 +5618,7 @@ ${sanitizePromptText(entry.text).trim()}` : `No channel memory entry ${intent.id
5511
5618
  return;
5512
5619
  }
5513
5620
  const senderId = truncateGroupHistoryField(envelope.senderId);
5514
- if (!this.gate.isAllowed(senderId)) {
5621
+ if (this.config.groupPolicy !== "pairing" && !this.gate.isAllowed(senderId)) {
5515
5622
  return;
5516
5623
  }
5517
5624
  const entry = {
@@ -5534,7 +5641,11 @@ ${sanitizePromptText(entry.text).trim()}` : `No channel memory entry ${intent.id
5534
5641
  return [];
5535
5642
  }
5536
5643
  try {
5537
- return this.groupHistory.drain(this.groupHistoryKey(envelope), limit);
5644
+ const entries = this.groupHistory.drain(this.groupHistoryKey(envelope), limit);
5645
+ if (this.config.groupPolicy === "pairing" && !this.groupGate.isGroupApproved(envelope.chatId)) {
5646
+ return [];
5647
+ }
5648
+ return entries;
5538
5649
  } catch (err) {
5539
5650
  process.stderr.write(`[${this.name}] failed to drain group history for chat ${sanitizeLogText(envelope.chatId, 64)}: ${err instanceof Error ? err.message : err}
5540
5651
  `);
@@ -5560,7 +5671,7 @@ ${sanitizePromptText(entry.text).trim()}` : `No channel memory entry ${intent.id
5560
5671
  if (entries.length === 0) {
5561
5672
  return promptText;
5562
5673
  }
5563
- const lines = entries.filter((entry) => this.gate.isAllowed(entry.senderId));
5674
+ const lines = this.config.groupPolicy === "pairing" ? entries : entries.filter((entry) => this.gate.isAllowed(entry.senderId));
5564
5675
  if (lines.length === 0) {
5565
5676
  return promptText;
5566
5677
  }
@@ -5578,8 +5689,18 @@ ${promptText}`;
5578
5689
  preflightInbound(envelope) {
5579
5690
  const groupResult = this.groupGate.check(envelope);
5580
5691
  if (!groupResult.allowed) {
5692
+ if (groupResult.pairing !== void 0) {
5693
+ this.logPreflightRejected("group_pairing_required");
5694
+ return this.onGroupPairingRequired(envelope.chatId, groupResult.pairing, envelope.threadId).then(() => false).catch((err) => {
5695
+ process.stderr.write(`[Channel:${this.name}] group pairing notification failed: ${sanitizeLogText(err instanceof Error ? err.message : String(err), 200)}
5696
+ `);
5697
+ return false;
5698
+ });
5699
+ }
5581
5700
  if (groupResult.reason === "mention_required") {
5582
5701
  this.recordPendingGroupHistory(envelope);
5702
+ } else if (groupResult.reason === "pairing_trigger_required") {
5703
+ return false;
5583
5704
  } else {
5584
5705
  this.logPreflightRejected(`group_${groupResult.reason ?? "denied"}`);
5585
5706
  }
@@ -5590,11 +5711,15 @@ ${promptText}`;
5590
5711
  this.logPreflightRejected(`dm_${dmResult.reason ?? "denied"}`);
5591
5712
  return false;
5592
5713
  }
5714
+ if (envelope.isGroup && this.config.groupPolicy === "pairing") {
5715
+ this.markPreflighted(envelope);
5716
+ return true;
5717
+ }
5593
5718
  const result = this.gate.check(envelope.senderId, envelope.senderName);
5594
5719
  if (!result.allowed) {
5595
- if (result.pairingCode !== void 0) {
5720
+ if (result.pairing !== void 0) {
5596
5721
  this.logPreflightRejected("sender_pairing_required");
5597
- return this.onPairingRequired(envelope.chatId, result.pairingCode, envelope.threadId).then(() => false).catch((err) => {
5722
+ return this.onPairingRequired(envelope.chatId, result.pairing, envelope.threadId).then(() => false).catch((err) => {
5598
5723
  process.stderr.write(`[Channel:${this.name}] pairing notification failed: ${sanitizeLogText(err instanceof Error ? err.message : String(err), 200)}
5599
5724
  `);
5600
5725
  return false;
@@ -5654,6 +5779,27 @@ ${promptText}`;
5654
5779
  `);
5655
5780
  }
5656
5781
  }
5782
+ onObservedContact(_envelope) {
5783
+ }
5784
+ /**
5785
+ * Observations persisted for this channel, when a read path is configured.
5786
+ * Adapters hydrate label caches from it after a restart so known labels are
5787
+ * not reverted to raw IDs by the next initial write.
5788
+ */
5789
+ persistedObservedContacts() {
5790
+ const list = this.observedContacts?.list;
5791
+ if (!list)
5792
+ return void 0;
5793
+ try {
5794
+ const graph = list();
5795
+ return {
5796
+ users: graph.users.filter((user) => user.channelName === this.name),
5797
+ groups: graph.groups.filter((group) => group.channelName === this.name)
5798
+ };
5799
+ } catch {
5800
+ return void 0;
5801
+ }
5802
+ }
5657
5803
  markPreflighted(envelope) {
5658
5804
  this.preflightedEnvelopes.add(envelope);
5659
5805
  }
@@ -5683,6 +5829,7 @@ ${promptText}`;
5683
5829
  if (this.observedContacts && !this.observedContactEnvelopes.has(envelope)) {
5684
5830
  this.observedContactEnvelopes.add(envelope);
5685
5831
  await this.recordObservedContact(envelope);
5832
+ this.onObservedContact(envelope);
5686
5833
  }
5687
5834
  let memoryIntent = parseChannelMemoryIntent(envelope.text);
5688
5835
  let memoryIntentFromClassifier = false;
@@ -5755,6 +5902,15 @@ ${output}${exitLine}`);
5755
5902
  if ((envelope.isGroup || this.config.sessionScope === "single") && !envelope.alreadyPrefixed && !recognizedSlashCommand) {
5756
5903
  const who = sanitizeSenderName(envelope.senderName || envelope.senderId || "unknown");
5757
5904
  promptText = `[${who}] ${sanitizePromptText(promptText)}`;
5905
+ if (envelope.mentionedMemberIds?.length) {
5906
+ const ids = envelope.mentionedMemberIds.map((id) => sanitizeQuotedText(id, 64).trim()).filter((id) => id.length > 0 && id !== "\u2026");
5907
+ if (ids.length > 0) {
5908
+ const memberLabel = ids.length === 1 ? "member" : "members";
5909
+ promptText = `[Mentioned ${ids.length} other group ${memberLabel}: ${ids.join(", ")}]
5910
+
5911
+ ${promptText}`;
5912
+ }
5913
+ }
5758
5914
  }
5759
5915
  if (envelope.referencedText) {
5760
5916
  const quoted = sanitizeQuotedText(envelope.referencedText, 500);
@@ -6081,6 +6237,7 @@ ${promptToSend}`;
6081
6237
  alreadyPrefixed: true,
6082
6238
  // Clear attachments/references — already resolved in original text
6083
6239
  referencedText: void 0,
6240
+ mentionedMemberIds: void 0,
6084
6241
  attachments: void 0,
6085
6242
  metadata: void 0,
6086
6243
  imageBase64: void 0,
@@ -6098,14 +6255,34 @@ ${promptToSend}`;
6098
6255
  }));
6099
6256
  await current;
6100
6257
  }
6101
- async onPairingRequired(chatId, code, threadId) {
6102
- if (code) {
6103
- await this.sendThreadMessage(chatId, threadId, `Your pairing code is: ${code}
6258
+ pairingRejectionMessage(rejected) {
6259
+ return rejected === "sender_pending" ? "You already have a pending pairing request. It must be approved or expire before another can be created." : "Too many pending pairing requests. Please try again later.";
6260
+ }
6261
+ groupPairingRejectionMessage(rejected) {
6262
+ return rejected === "sender_pending" ? "A pairing request cannot be created right now. Another member can mention the bot to start group approval, or try again later." : "Too many pending pairing requests. Please try again later.";
6263
+ }
6264
+ async onPairingRequired(chatId, result, threadId) {
6265
+ if ("code" in result) {
6266
+ await this.sendThreadMessage(chatId, threadId, `Your pairing code is: ${result.code}
6104
6267
 
6105
6268
  Ask the bot operator to approve you with:
6106
- qwen channel pairing approve ${this.name} ${code}`);
6269
+ qwen channel pairing approve ${this.name} ${result.code}`);
6107
6270
  } else {
6108
- await this.sendThreadMessage(chatId, threadId, "Too many pending pairing requests. Please try again later.");
6271
+ await this.sendThreadMessage(chatId, threadId, this.pairingRejectionMessage(result.rejected));
6272
+ }
6273
+ }
6274
+ async onGroupPairingRequired(chatId, result, threadId) {
6275
+ if ("code" in result) {
6276
+ if (this.groupPairingNotified.get(chatId) === result.code) {
6277
+ return;
6278
+ }
6279
+ await this.sendThreadMessage(chatId, threadId, `This group requires approval. Its pairing code is: ${result.code}
6280
+
6281
+ Ask the bot operator to approve the group with:
6282
+ qwen channel pairing approve ${this.name} ${result.code}`);
6283
+ this.groupPairingNotified.set(chatId, result.code);
6284
+ } else {
6285
+ await this.sendThreadMessage(chatId, threadId, this.groupPairingRejectionMessage(result.rejected));
6109
6286
  }
6110
6287
  }
6111
6288
  };
@@ -6470,7 +6647,10 @@ var DaemonChannelBridge = class extends EventEmitter2 {
6470
6647
  }
6471
6648
  prompt.push({ type: "text", text });
6472
6649
  try {
6473
- const result = await session.prompt({ prompt }, controller.signal);
6650
+ const result = await session.prompt({
6651
+ prompt,
6652
+ _meta: { [CHANNEL_PROMPT_META_KEY]: true }
6653
+ }, controller.signal);
6474
6654
  await Promise.race([
6475
6655
  turnBarrier,
6476
6656
  new Promise((resolve3) => setTimeout(resolve3, 0))
@@ -7141,6 +7321,7 @@ export {
7141
7321
  ChannelLoopScheduler,
7142
7322
  ChannelBase,
7143
7323
  PollingChannelBase,
7324
+ CHANNEL_PROMPT_META_KEY,
7144
7325
  CHANNEL_LOOP_MCP_SERVER_NAME,
7145
7326
  ACP_EVENT_LOOP_STALL_RESTART_MS,
7146
7327
  AcpBridge,
@@ -5,7 +5,7 @@ import {
5
5
  } from "./chunk-M6HMMKVG.js";
6
6
  import {
7
7
  isInternalPromptId
8
- } from "./chunk-2U3WZGZG.js";
8
+ } from "./chunk-YGT2AUJ7.js";
9
9
  import {
10
10
  createDebugLogger
11
11
  } from "./chunk-OIVKILPI.js";