@qwen-code/qwen-code 0.24.5-preview.0 → 0.24.5

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 (353) hide show
  1. package/bundled/browser-use/SKILL.md +11 -10
  2. package/bundled/browser-use/runtime/index.js +70 -31
  3. package/bundled/browser-use/runtime/native-host.js +1 -0
  4. package/bundled/browser-use/runtime/scripts/native-host-setup.js +1 -0
  5. package/bundled/computer-use/SKILL.md +182 -224
  6. package/bundled/qc-helper/docs/configuration/model-providers.md +13 -2
  7. package/bundled/qc-helper/docs/conversations-recovery.md +10 -0
  8. package/bundled/qc-helper/docs/features/browser-use.md +22 -12
  9. package/bundled/qc-helper/docs/features/channels/dingtalk.md +2 -2
  10. package/bundled/qc-helper/docs/features/channels/dws.md +7 -7
  11. package/bundled/qc-helper/docs/features/channels/feishu.md +1 -1
  12. package/bundled/qc-helper/docs/features/channels/github.md +13 -9
  13. package/bundled/qc-helper/docs/features/channels/gitlab.md +12 -5
  14. package/bundled/qc-helper/docs/features/channels/overview.md +121 -46
  15. package/bundled/qc-helper/docs/features/channels/plugins.md +12 -12
  16. package/bundled/qc-helper/docs/features/channels/qqbot.md +5 -5
  17. package/bundled/qc-helper/docs/features/channels/telegram.md +5 -5
  18. package/bundled/qc-helper/docs/features/channels/wecom.md +5 -4
  19. package/bundled/qc-helper/docs/features/channels/weixin.md +3 -3
  20. package/bundled/qc-helper/docs/features/code-review.md +4 -0
  21. package/bundled/qc-helper/docs/features/computer-use.md +1 -1
  22. package/bundled/qc-helper/docs/quickstart.md +14 -14
  23. package/bundled/qc-helper/docs/qwen-serve.md +10 -4
  24. package/bundled/review/SKILL.md +44 -9
  25. package/bundled/review/references/persistence.md +3 -4
  26. package/chunks/{MaxSizedBox-3RXPTLCS.js → MaxSizedBox-4MLWQHF3.js} +33 -31
  27. package/chunks/{StandaloneSessionPicker-74775YBZ.js → StandaloneSessionPicker-PDNU6KJJ.js} +50 -48
  28. package/chunks/{acp-subagent-executor-OQXOMTFK.js → acp-subagent-executor-JB2J6N73.js} +35 -33
  29. package/chunks/{acpAgent-MD56LD7L.js → acpAgent-CAPZFZCW.js} +123 -97
  30. package/chunks/{agent-75EZNG2Q.js → agent-MTWGIPWC.js} +18 -16
  31. package/chunks/{agent-headless-TQ6MWUDT.js → agent-headless-Z27XJSXK.js} +18 -16
  32. package/chunks/{anthropicContentGenerator-DCDXTX3R.js → anthropicContentGenerator-VAFZRJWG.js} +3 -3
  33. package/chunks/{askUserQuestion-2NU6CXK2.js → askUserQuestion-V4OFZD5D.js} +1 -1
  34. package/chunks/{bridge-KGJYQUWD.js → bridge-BUCSJHCE.js} +35 -33
  35. package/chunks/{channel-management-service-YN4A3BJ6.js → channel-management-service-Q2B7WUPL.js} +27 -10
  36. package/chunks/{channel-settings-store-773UOD6B.js → channel-settings-store-U25CVEL6.js} +42 -40
  37. package/chunks/{channel-worker-group-AKPVHRUO.js → channel-worker-group-QNX4OIMZ.js} +5 -5
  38. package/chunks/{channel-worker-manager-TDAQSKWX.js → channel-worker-manager-IJCPV4WY.js} +24 -5
  39. package/chunks/{channel-worker-supervisor-PUMSN4J2.js → channel-worker-supervisor-ENJ2AE2N.js} +4 -4
  40. package/chunks/{chunk-OU4ZCLGJ.js → chunk-242INZ6Y.js} +1 -1
  41. package/chunks/{chunk-JOFZBTVL.js → chunk-245NB3M4.js} +1 -1
  42. package/chunks/{chunk-LISITUEH.js → chunk-26KGIWIW.js} +1 -1
  43. package/chunks/{chunk-WPHZEGFC.js → chunk-2RQEWY2P.js} +1 -1
  44. package/chunks/{chunk-DCTJ3GVF.js → chunk-2SCE6YR2.js} +3 -3
  45. package/chunks/{chunk-STKUN7BR.js → chunk-2XNGG7R3.js} +1 -1
  46. package/chunks/{chunk-OQE7AA2W.js → chunk-36ZMEEBW.js} +16 -12
  47. package/chunks/{chunk-Y53WH7VD.js → chunk-44K6Q5AW.js} +3 -3
  48. package/chunks/{chunk-N4VKU36J.js → chunk-465XOJLQ.js} +1 -1
  49. package/chunks/{chunk-HD4IXPPC.js → chunk-4A4XNQEZ.js} +3 -3
  50. package/chunks/{chunk-RXB6Y33E.js → chunk-4VULJ3LV.js} +1 -1
  51. package/chunks/{chunk-EBRC4GX2.js → chunk-4XXUGJJS.js} +1 -1
  52. package/chunks/{chunk-MVC4XLNM.js → chunk-53IRNMPU.js} +118 -5
  53. package/chunks/{chunk-VGLXXHTF.js → chunk-5BLOZPTW.js} +1 -1
  54. package/chunks/{chunk-3SK2A75W.js → chunk-5OJQLD3P.js} +3 -3
  55. package/chunks/{chunk-WVNCMGAO.js → chunk-6FURC4LI.js} +1 -1
  56. package/chunks/{chunk-WVTM33Q3.js → chunk-6KXQIDK2.js} +4 -4
  57. package/chunks/{chunk-ZKDUQHU4.js → chunk-7MNHZUTA.js} +35 -18
  58. package/chunks/{chunk-JEIPBSGX.js → chunk-7P5WZQXF.js} +7 -7
  59. package/chunks/{chunk-GGUOO2XC.js → chunk-7RCAMBLN.js} +1 -1
  60. package/chunks/{chunk-FBLGI2SO.js → chunk-AAOMFXVZ.js} +7 -7
  61. package/chunks/{chunk-JM76TMGV.js → chunk-ACLD6C3R.js} +8798 -7901
  62. package/chunks/{chunk-4FCWKBOC.js → chunk-ALTMZEBU.js} +6 -6
  63. package/chunks/{chunk-ZHQSWNO6.js → chunk-AN62TPO6.js} +1 -1
  64. package/chunks/{chunk-U5DPG7JW.js → chunk-AYTI24XN.js} +1 -1
  65. package/chunks/{chunk-B53FO7JN.js → chunk-AZN2GSLM.js} +2 -2
  66. package/chunks/{chunk-6KQQPPFF.js → chunk-B3J4BSPL.js} +1 -1
  67. package/chunks/{chunk-SLSH5TFD.js → chunk-BMCDSO77.js} +4 -4
  68. package/chunks/{chunk-DBYUN4U3.js → chunk-BUDUHXX3.js} +1 -1
  69. package/chunks/{chunk-TS4Y2MHO.js → chunk-CGREZDGO.js} +1 -1
  70. package/chunks/chunk-CLNDQINM.js +523 -0
  71. package/chunks/{chunk-LNUQA3OE.js → chunk-CVRZNFXO.js} +1 -1
  72. package/chunks/{chunk-3DBI3LLL.js → chunk-CWLTXYKP.js} +4 -4
  73. package/chunks/{chunk-B3XMX4SN.js → chunk-DACCX4JI.js} +4 -4
  74. package/chunks/{chunk-YWZOEHBT.js → chunk-DE2WI7RU.js} +192 -62
  75. package/chunks/{chunk-3TQVPDCN.js → chunk-DU53RB7A.js} +2 -2
  76. package/chunks/{chunk-2KZURPTB.js → chunk-DZCTQ2MF.js} +6 -1
  77. package/chunks/{chunk-35SABQFH.js → chunk-DZUNDX4M.js} +1 -1
  78. package/chunks/{chunk-4INF7OYV.js → chunk-ELY2U74S.js} +2 -2
  79. package/chunks/chunk-EMGHODF7.js +56 -0
  80. package/chunks/{chunk-5FZKG4JB.js → chunk-EMOTEATH.js} +1 -1
  81. package/chunks/{chunk-LW7WW3Z5.js → chunk-ERGQUKZ2.js} +1 -1
  82. package/chunks/{chunk-TNWJJEDT.js → chunk-ES6EQNGR.js} +6 -6
  83. package/chunks/{chunk-E3TLOFX7.js → chunk-EUHSEMO4.js} +62 -7
  84. package/chunks/{chunk-N25B6FZN.js → chunk-EYCDA5MN.js} +2 -0
  85. package/chunks/{chunk-GPTEZLRR.js → chunk-F4ERRMCO.js} +25 -23
  86. package/chunks/{chunk-SXFZ5P7F.js → chunk-FE7D3WKV.js} +1 -1
  87. package/chunks/{chunk-XEXNBTYX.js → chunk-FH45BQGZ.js} +3 -3
  88. package/chunks/{chunk-CAORZAZD.js → chunk-FLBUHGL4.js} +10 -10
  89. package/chunks/{chunk-X2R47SFR.js → chunk-FLVPNMCS.js} +1 -1
  90. package/chunks/{chunk-5SZSV2CK.js → chunk-FVIJFKEQ.js} +3 -3
  91. package/chunks/{chunk-KFLDZ3HB.js → chunk-G6XRNTXF.js} +1 -1
  92. package/chunks/{chunk-2JHQ2J3Y.js → chunk-G72UHXC3.js} +5 -5
  93. package/chunks/{chunk-4A255ZI6.js → chunk-GAHZJLQG.js} +2 -2
  94. package/chunks/{chunk-7IVZOKKW.js → chunk-GKJGKTWJ.js} +3 -3
  95. package/chunks/{chunk-KY4HZXLV.js → chunk-GLPNIOEV.js} +33 -2
  96. package/chunks/{chunk-6PRSQUPJ.js → chunk-GQZZGEMS.js} +1 -1
  97. package/chunks/{chunk-G2AE7GYZ.js → chunk-GRUASRWC.js} +1 -1
  98. package/chunks/{chunk-HH7R6RLK.js → chunk-GTQ35GRO.js} +1 -1
  99. package/chunks/{chunk-LWRJLRZS.js → chunk-GYLDOFLU.js} +3 -3
  100. package/chunks/{chunk-MZRJ2JJS.js → chunk-HDSI3RDN.js} +136 -9
  101. package/chunks/{chunk-RO5K7QUL.js → chunk-HHMJ5ONX.js} +45 -31
  102. package/chunks/{chunk-E4HNTYHK.js → chunk-HVVQYSBA.js} +32 -9
  103. package/chunks/{chunk-H2GVLBFU.js → chunk-I36GIR6K.js} +64 -2
  104. package/chunks/{chunk-VTFLRL55.js → chunk-IBRV4T3I.js} +2 -2
  105. package/chunks/{chunk-4VSTV4C2.js → chunk-IH22ZGZI.js} +53 -2
  106. package/chunks/{chunk-AOW7WIWE.js → chunk-IQH7Q5OP.js} +4 -4
  107. package/chunks/{chunk-OB444SG3.js → chunk-IYKGSUTA.js} +1 -1
  108. package/chunks/{chunk-HS5OZTQF.js → chunk-J2FLXQJM.js} +1 -1
  109. package/chunks/{chunk-BBCH7PBA.js → chunk-KACKEW2M.js} +2 -2
  110. package/chunks/{chunk-JE3J5HFM.js → chunk-KAOHUUM7.js} +62 -251
  111. package/chunks/{chunk-JCMDVGPR.js → chunk-KGLPVCX7.js} +2 -2
  112. package/chunks/{chunk-QKXZOHHQ.js → chunk-LDURD6EP.js} +15 -62
  113. package/chunks/{chunk-O4IH5UEC.js → chunk-LLIYDIGU.js} +20 -20
  114. package/chunks/{chunk-3XHMOJCP.js → chunk-MBC3PULP.js} +1 -1
  115. package/chunks/{chunk-SRZA7OU4.js → chunk-MMCGLNPP.js} +6 -6
  116. package/chunks/{chunk-3NG2ZQAJ.js → chunk-NZC74TT2.js} +1 -1
  117. package/chunks/{chunk-47C3HPMW.js → chunk-O5YL6KSX.js} +47 -18
  118. package/chunks/{chunk-EIHZ4FFM.js → chunk-O6PPYFQN.js} +3 -3
  119. package/chunks/{chunk-XCU752HT.js → chunk-OICDXWXP.js} +13 -19
  120. package/chunks/{chunk-VJCKLKZX.js → chunk-OOU7XOZF.js} +3 -3
  121. package/chunks/{chunk-OM5NSL25.js → chunk-P4P7CH7H.js} +38 -38
  122. package/chunks/{chunk-CIS4SY3R.js → chunk-PPBZHGEQ.js} +3 -3
  123. package/chunks/{chunk-PB7JBAHF.js → chunk-PVBIEIVZ.js} +0 -1
  124. package/chunks/{chunk-GG3MO6NO.js → chunk-PWGMHXIV.js} +2 -2
  125. package/chunks/{chunk-6N2PJAZG.js → chunk-PX2ZOOGQ.js} +1 -1
  126. package/chunks/{chunk-NNN2PKPV.js → chunk-PYYPSK6Q.js} +36 -495
  127. package/chunks/{chunk-TKOQGFRE.js → chunk-PZOWKCPJ.js} +1 -1
  128. package/chunks/{chunk-PJ546DX4.js → chunk-Q36IJ74U.js} +17 -11
  129. package/chunks/chunk-Q4FJVWI4.js +78 -0
  130. package/chunks/{chunk-PA4HU5IQ.js → chunk-QATPE3SN.js} +13 -7
  131. package/chunks/{chunk-MBUUQJPV.js → chunk-QGKAYDES.js} +5 -5
  132. package/chunks/{chunk-TFBQ5CKI.js → chunk-QNEBHC2E.js} +1 -1
  133. package/chunks/{chunk-6NA357SF.js → chunk-QTNSMJKU.js} +1 -1
  134. package/chunks/{chunk-TDLEDOJN.js → chunk-QU7VULWX.js} +5 -4
  135. package/chunks/{chunk-LOTGIM6V.js → chunk-R3IFSY55.js} +20 -20
  136. package/chunks/{chunk-ZX6EZ7EH.js → chunk-RBE3WRSN.js} +3 -3
  137. package/chunks/{chunk-YSZ2XZTG.js → chunk-RBKZ6SK4.js} +5 -5
  138. package/chunks/{chunk-FLRFAPDA.js → chunk-RCL6OXZC.js} +5 -5
  139. package/chunks/{chunk-H4W6TJFJ.js → chunk-RONRTFAQ.js} +1 -1
  140. package/chunks/{chunk-ZEGLZ3MN.js → chunk-SCYKHWRM.js} +5 -5
  141. package/chunks/{chunk-STUJ7IMZ.js → chunk-SI7XKACY.js} +56 -56
  142. package/chunks/{chunk-RL2HSTEB.js → chunk-SYZPPX3O.js} +1492 -1140
  143. package/chunks/{chunk-VUYJRNG5.js → chunk-T7TJPVTY.js} +3 -3
  144. package/chunks/{chunk-4V5YKOBI.js → chunk-TF7UC7F6.js} +3 -3
  145. package/chunks/{chunk-NXZD3VNX.js → chunk-TL7DSR47.js} +1 -1
  146. package/chunks/{chunk-BVFBDXI2.js → chunk-TPFV5YZK.js} +1 -1
  147. package/chunks/{chunk-YIHOHHJL.js → chunk-TZHXHWEW.js} +1 -1
  148. package/chunks/{chunk-3X5BDEXS.js → chunk-U6RMVE5X.js} +8 -8
  149. package/chunks/{chunk-HRVFPNGT.js → chunk-VFNKO4FK.js} +4 -4
  150. package/chunks/{chunk-VPALWDQL.js → chunk-VUIH3BQL.js} +31 -12
  151. package/chunks/{chunk-WVNML4HH.js → chunk-VW33WARJ.js} +1 -1
  152. package/chunks/{chunk-MICQVBPI.js → chunk-WCLHOKAZ.js} +1 -1
  153. package/chunks/{chunk-KMQ2ZH3Q.js → chunk-WVWCRZ6M.js} +2 -2
  154. package/chunks/{chunk-5NFAKADR.js → chunk-WZCVB2ER.js} +1 -36
  155. package/chunks/{chunk-JNQEW7B2.js → chunk-X3A72KX5.js} +6 -6
  156. package/chunks/{chunk-3JSIWFNA.js → chunk-XHHUGXYW.js} +527 -135
  157. package/chunks/{chunk-VIA4STCR.js → chunk-YCCBLTSL.js} +3 -3
  158. package/chunks/{chunk-Q5IEY2TN.js → chunk-Z3I5B4DH.js} +1 -1
  159. package/chunks/{chunk-O346IB64.js → chunk-ZAJNI63I.js} +1 -1
  160. package/chunks/{chunk-QR4U27UW.js → chunk-ZJFCDRVP.js} +4 -4
  161. package/chunks/{codex-subagent-executor-437LQYGM.js → codex-subagent-executor-IKWULWIZ.js} +35 -33
  162. package/chunks/{config-utils-CVLI36KM.js → config-utils-3IOTAFBG.js} +38 -34
  163. package/chunks/{contextCommand-2KSW7H5F.js → contextCommand-ZKG2JFCR.js} +33 -31
  164. package/chunks/{core-runtime-4IB27E7J.js → core-runtime-5CAK5DSM.js} +32 -30
  165. package/chunks/{create-sub-session-A73TQDAN.js → create-sub-session-DG4CVOQC.js} +33 -31
  166. package/chunks/{daemon-Y6AOK7LF.js → daemon-D4OAVQKB.js} +1 -1
  167. package/chunks/{daemon-git-worktree-guard-BTKVV3DZ.js → daemon-git-worktree-guard-S3SFT3H7.js} +32 -30
  168. package/chunks/{daemon-status-provider-ETDIOWMS.js → daemon-status-provider-GG64ZJR3.js} +40 -38
  169. package/chunks/{daemon-trust-policy-U5SPHJLP.js → daemon-trust-policy-XNWYLQ32.js} +38 -36
  170. package/chunks/{daemon-trust-policy-monitor-QKRCO5WI.js → daemon-trust-policy-monitor-DR5CRWMM.js} +38 -36
  171. package/chunks/{deferred-core-runtime-FRELZPIE.js → deferred-core-runtime-V4Q674KN.js} +32 -30
  172. package/chunks/{dist-54LGNLWW.js → dist-3M75XY4G.js} +1 -1
  173. package/chunks/{dist-YZBMQPNS.js → dist-6U5NQYA7.js} +5 -5
  174. package/chunks/{dist-FVMLRUVM.js → dist-AS2RPYOB.js} +1 -1
  175. package/chunks/{dist-HANHY2MK.js → dist-GFT4GU72.js} +2 -2
  176. package/chunks/{dist-Y5GP7SWL.js → dist-J7JK3GPY.js} +10 -9
  177. package/chunks/{dist-O723VE2K.js → dist-JTPRKF5H.js} +30 -27
  178. package/chunks/{dist-MGZKUISU.js → dist-MOO5VOC5.js} +7 -20
  179. package/chunks/{dist-IZ66D5A3.js → dist-NJ2L5QKL.js} +1 -1
  180. package/chunks/{dist-EI2XAB4W.js → dist-YC6LDCKH.js} +22 -28
  181. package/chunks/{edit-TQ3CABYP.js → edit-FPIWTN3L.js} +20 -18
  182. package/chunks/{enter-worktree-J46XVFRS.js → enter-worktree-55OWD4LT.js} +4 -3
  183. package/chunks/{enterPlanMode-JHOWELZO.js → enterPlanMode-GDZVXYB2.js} +18 -16
  184. package/chunks/{environment-LUM7XX27.js → environment-Q2BVTUQO.js} +36 -32
  185. package/chunks/{errors-SH32ID5I.js → errors-MZTLVUEM.js} +34 -32
  186. package/chunks/{execution-sandbox-settings-HIYVUBII.js → execution-sandbox-settings-3WJ67GX3.js} +3 -1
  187. package/chunks/{execution-tool-IIEL25CL.js → execution-tool-DZ4XSEFZ.js} +21 -19
  188. package/chunks/{execution-worker-NKKEZ4XF.js → execution-worker-L3TM3F5D.js} +24 -22
  189. package/chunks/{exit-worktree-BC4SDZCC.js → exit-worktree-MI6N4OUP.js} +4 -3
  190. package/chunks/{exitPlanMode-PUICCCQ5.js → exitPlanMode-VIGOD2KP.js} +18 -16
  191. package/chunks/{fast-path-QH3QTZZA.js → fast-path-JCKEFUUL.js} +4 -4
  192. package/chunks/{fast-path-settings-TQAYWLXR.js → fast-path-settings-VIYSH3SD.js} +2 -2
  193. package/chunks/{glob-OEB4WH3Z.js → glob-UOKQZHKL.js} +18 -16
  194. package/chunks/{goal-tools-KWGKFUSK.js → goal-tools-G4RIX4ER.js} +18 -16
  195. package/chunks/{handleAutoUpdate-KEA7JSUD.js → handleAutoUpdate-UZZEGL3N.js} +34 -32
  196. package/chunks/{i18n-AC3MUXKZ.js → i18n-IL33FVND.js} +32 -30
  197. package/chunks/{initializer-WBD32BEX.js → initializer-BCXBRM6Y.js} +38 -36
  198. package/chunks/{installationInfo-JRGFTKWY.js → installationInfo-V7OKUOJV.js} +32 -30
  199. package/chunks/{list-S7KW7NBX.js → list-LQHG6SXA.js} +41 -39
  200. package/chunks/{llm-E32WLISX.js → llm-JWCANCDC.js} +85 -74
  201. package/chunks/{llm-content-generator-OMKJHC5P.js → llm-content-generator-OXMMHUVK.js} +3 -3
  202. package/chunks/{loadedSettingsAdapter-5OSU3J46.js → loadedSettingsAdapter-EKXSRWMY.js} +38 -36
  203. package/chunks/{local-execution-environment-IQHCTUJ5.js → local-execution-environment-XIQLRMLF.js} +24 -22
  204. package/chunks/{loggingContentGenerator-JIYG3LJS.js → loggingContentGenerator-6KHNZDTZ.js} +20 -18
  205. package/chunks/{managed-npm-update-RKAT7AMQ.js → managed-npm-update-MBUH5TIX.js} +32 -30
  206. package/chunks/managed-runtime-attestation-worker-G23AEEMF.js +367 -0
  207. package/chunks/{mcp-SV72BZKG.js → mcp-AYVCEEN7.js} +38 -36
  208. package/chunks/{model-call-collection-PKDMVCZN.js → model-call-collection-OKUGOY4B.js} +1 -1
  209. package/chunks/{model-configuration-A52XMQW7.js → model-configuration-Q3MNGG3B.js} +38 -36
  210. package/chunks/{modelConfigUtils-7O4P3SLE.js → modelConfigUtils-WC5XDR34.js} +33 -31
  211. package/chunks/{monitor-ZXRV2DJB.js → monitor-7JUZXYZN.js} +18 -16
  212. package/chunks/{nonInteractiveCli-UPSGIYRC.js → nonInteractiveCli-B3GCZ6NJ.js} +74 -73
  213. package/chunks/{nonInteractiveToolExecutor-TDKVR43J.js → nonInteractiveToolExecutor-IUHO7PXG.js} +19 -17
  214. package/chunks/{notebook-edit-FBVHAHYM.js → notebook-edit-IYDACZDW.js} +19 -17
  215. package/chunks/{omni-3NREMV2Q.js → omni-DLBHISHC.js} +10 -7
  216. package/chunks/{openaiContentGenerator-EWPBZFIT.js → openaiContentGenerator-W5GN6H6Z.js} +12 -10
  217. package/chunks/{openaiResponsesContentGenerator-3CI3PINB.js → openaiResponsesContentGenerator-BXXRYJQQ.js} +5 -5
  218. package/chunks/{pidfile-BBUANGZX.js → pidfile-QIBF53CW.js} +32 -30
  219. package/chunks/{processUtils-6OHQLG7W.js → processUtils-2LU22KCR.js} +2 -2
  220. package/chunks/{prompt-terminal-ledger-ZBFYXJ4L.js → prompt-terminal-ledger-LXFVLR6C.js} +33 -31
  221. package/chunks/{qwenContentGenerator-62F5IKXJ.js → qwenContentGenerator-LYMLXBWI.js} +21 -19
  222. package/chunks/{reactive-degrade-URJMXJ7N.js → reactive-degrade-HPYBJHYA.js} +6 -6
  223. package/chunks/{read-file-IM4Q5TKI.js → read-file-SXS2MKDY.js} +6 -3
  224. package/chunks/{record-artifact-K4XSMW4X.js → record-artifact-XP3X7RE5.js} +3 -2
  225. package/chunks/{record-source-XZCI3IGU.js → record-source-2VBLKVIE.js} +2 -2
  226. package/chunks/{report-findings-MCGXBQFX.js → report-findings-D2QUYUOG.js} +4 -3
  227. package/chunks/{request-shutdown-TT62PREA.js → request-shutdown-R5SA5GE3.js} +1 -1
  228. package/chunks/{resumeHistoryUtils-O3NQMDVR.js → resumeHistoryUtils-UPGZGP5V.js} +35 -33
  229. package/chunks/{ripGrep-BG2FEVIV.js → ripGrep-X33VVIN5.js} +8 -5
  230. package/chunks/{run-qwen-serve-GMLWJITM.js → run-qwen-serve-CUB2NZ6P.js} +278 -79
  231. package/chunks/{runtime-SSGPOXRZ.js → runtime-2DAVBADX.js} +43 -41
  232. package/chunks/{sandboxConfig-ALYLLNWY.js → sandboxConfig-ESBH3F27.js} +34 -32
  233. package/chunks/{scheduled-tasks-QJTC5XQ7.js → scheduled-tasks-TGWYXZWW.js} +38 -36
  234. package/chunks/{scheduler-PEXTY7IG.js → scheduler-XGLZCXPN.js} +34 -32
  235. package/chunks/{send-message-3UM7XRTB.js → send-message-FBU6WDID.js} +1 -1
  236. package/chunks/{serve-OVAUTKXK.js → serve-7RX4AIID.js} +38 -36
  237. package/chunks/{server-3MMYOOJW.js → server-MJETIFJS.js} +1789 -375
  238. package/chunks/{session-PZBIKBQJ.js → session-7AVYU3TC.js} +75 -74
  239. package/chunks/{session-attachments-root-ESP5CNBV.js → session-attachments-root-RONFQ3D3.js} +32 -30
  240. package/chunks/{session-pr-refresh-B3N7PKUP.js → session-pr-refresh-ZPT6TAD4.js} +37 -35
  241. package/chunks/{settings-KSQ2DGPY.js → settings-FPMUAVWD.js} +37 -35
  242. package/chunks/{shell-3V26EVNC.js → shell-THD5EYOK.js} +18 -16
  243. package/chunks/{skill-XP7F3LBV.js → skill-2D6KXDC5.js} +52 -13
  244. package/chunks/{skill-settings-PDESL7S3.js → skill-settings-XW7X244B.js} +38 -36
  245. package/chunks/{spawnChannel-NVO7CCBW.js → spawnChannel-DBSAAUUT.js} +34 -32
  246. package/chunks/{standalone-update-FDWS2EGF.js → standalone-update-TFAWA676.js} +33 -31
  247. package/chunks/{start-opentui-ui-WIFFY5UD.js → start-opentui-ui-VYMAXPBH.js} +87 -86
  248. package/chunks/{startInteractiveUI-YBLIRIHD.js → startInteractiveUI-Z54XKH35.js} +1037 -966
  249. package/chunks/{task-create-PEI7AJLE.js → task-create-PVF66J3R.js} +2 -2
  250. package/chunks/{task-update-MQZRWBGK.js → task-update-RSIITTOK.js} +2 -2
  251. package/chunks/{team-create-Z5JUEMB7.js → team-create-TPCELNBJ.js} +18 -16
  252. package/chunks/{team-plan-approval-ZLLHMEQN.js → team-plan-approval-RUURGHQL.js} +18 -16
  253. package/chunks/{terminal-image-renderer-QFO2JTTT.js → terminal-image-renderer-SLJVUD4Z.js} +32 -30
  254. package/chunks/{theme-manager-N7ILUTRY.js → theme-manager-VBOIN2KT.js} +32 -30
  255. package/chunks/{tool-call-PLSQ34VE.js → tool-call-DUHP6UXC.js} +2 -2
  256. package/chunks/{tool-result-media-OAHUKGRK.js → tool-result-media-WU6QAREN.js} +10 -7
  257. package/chunks/{tool-search-534QKE2X.js → tool-search-ET4NH2LK.js} +7 -4
  258. package/chunks/{total-session-admission-EZJQKTPF.js → total-session-admission-UWMJWTWP.js} +35 -33
  259. package/chunks/{trustedFolders-4ZEV6RXD.js → trustedFolders-3WNZBUH7.js} +33 -31
  260. package/chunks/{update-relaunch-GB3SGRDP.js → update-relaunch-SHS3BD6V.js} +5 -5
  261. package/chunks/{updateCheck-DVAGAEQ4.js → updateCheck-MDF2FCRN.js} +32 -30
  262. package/chunks/{upload-config-DMZVTDH7.js → upload-config-LVVUIKA2.js} +4 -4
  263. package/chunks/{useAutoAcceptIndicator-PTQBS42B.js → useAutoAcceptIndicator-26OOM7OM.js} +41 -39
  264. package/chunks/{validateNonInterActiveAuth-DU3WXVSU.js → validateNonInterActiveAuth-TBCZCQIN.js} +72 -71
  265. package/chunks/{version-PNMZGKCV.js → version-MICV7I4Y.js} +1 -1
  266. package/chunks/{web-fetch-LMCOAHW6.js → web-fetch-3O2DFRE5.js} +13 -9
  267. package/chunks/{web-search-N7RR74LA.js → web-search-5FS3NB3D.js} +4 -4
  268. package/chunks/{web-shell-static-GI6FVIMI.js → web-shell-static-E3O6NW7Y.js} +4 -3
  269. package/chunks/{workflow-ZZPHI7FK.js → workflow-FRJO5ZUI.js} +19 -17
  270. package/chunks/{workspace-providers-status-TU73CNRF.js → workspace-providers-status-I5MO7Z2T.js} +43 -41
  271. package/chunks/{workspace-registration-store-743FRSOU.js → workspace-registration-store-CBHKV34L.js} +1 -1
  272. package/chunks/{workspace-registry-S7QTXFWM.js → workspace-registry-2UKNZO5M.js} +35 -33
  273. package/chunks/{workspace-runtime-coordinator-GWNDUIGO.js → workspace-runtime-coordinator-TKCI5WJW.js} +36 -34
  274. package/chunks/{workspace-service-CERZFJ3B.js → workspace-service-M3ZKR6WL.js} +40 -38
  275. package/chunks/{workspace-skills-status-5M3EIAUY.js → workspace-skills-status-OC3EYL7U.js} +41 -39
  276. package/chunks/{workspace-trust-reconciler-Q3LUKMQB.js → workspace-trust-reconciler-YQZSUOH4.js} +41 -39
  277. package/chunks/{write-file-CT54LXQL.js → write-file-BATJLBJX.js} +21 -19
  278. package/chunks/{zoom-image-EU3PGSZM.js → zoom-image-5I7DDLQE.js} +10 -6
  279. package/cli-entry.js +13 -0
  280. package/cli.js +24 -12
  281. package/execution-worker.js +1 -1
  282. package/export-transcript-document.css +1 -1
  283. package/export-transcript-document.js +104 -104
  284. package/package.json +3 -3
  285. package/web-shell/assets/{abnfDiagram-VCTEODGH-DDYEvG-M.js → abnfDiagram-VCTEODGH-DQHroFS1.js} +1 -1
  286. package/web-shell/assets/{arc-DQncKWFX.js → arc-BrOc_HVh.js} +1 -1
  287. package/web-shell/assets/{architectureDiagram-5GKGNRK7-C0-8u9zj.js → architectureDiagram-5GKGNRK7-DXce8IH6.js} +1 -1
  288. package/web-shell/assets/{blockDiagram-NRAW4CY4-Cpt59Ge5.js → blockDiagram-NRAW4CY4-96A3Q3-l.js} +1 -1
  289. package/web-shell/assets/{c4Diagram-UCG6FXSJ-BvESWh83.js → c4Diagram-UCG6FXSJ-CQBg2PSg.js} +1 -1
  290. package/web-shell/assets/channel-CBP6pwSs.js +1 -0
  291. package/web-shell/assets/{chunk-2Q5K7J3B-wKulGIU6.js → chunk-2Q5K7J3B-i_jhVz-t.js} +1 -1
  292. package/web-shell/assets/{chunk-5VM5RSS4-BX6kRoq7.js → chunk-5VM5RSS4-Cx3gMrWT.js} +1 -1
  293. package/web-shell/assets/{chunk-F27PBJKO-wA4IqTt-.js → chunk-F27PBJKO-B9WwW7C0.js} +1 -1
  294. package/web-shell/assets/{chunk-G27WJ6UU-B7hzevlb.js → chunk-G27WJ6UU-B8t0FNPI.js} +1 -1
  295. package/web-shell/assets/{chunk-JWPE2WC7-BdBg9pJg.js → chunk-JWPE2WC7-Dg0__6CF.js} +1 -1
  296. package/web-shell/assets/{chunk-LCL6LL3I-DghmF6LJ.js → chunk-LCL6LL3I-DUwE5g3m.js} +1 -1
  297. package/web-shell/assets/{chunk-POPQ4Y6H-BbReTOod.js → chunk-POPQ4Y6H-BirYW5iS.js} +1 -1
  298. package/web-shell/assets/{chunk-SVP7TREG-C1t0_19D.js → chunk-SVP7TREG-_ONJKtFF.js} +1 -1
  299. package/web-shell/assets/{chunk-XXDRQBXY-DQBby5mI.js → chunk-XXDRQBXY-DGi0chgj.js} +1 -1
  300. package/web-shell/assets/classDiagram-DTDB5LWJ-_4_fFrN3.js +1 -0
  301. package/web-shell/assets/classDiagram-v2-JRS7N3AN-_4_fFrN3.js +1 -0
  302. package/web-shell/assets/{cose-bilkent-JH36ORCC-CNrSyg7B.js → cose-bilkent-JH36ORCC-BSSFxREn.js} +1 -1
  303. package/web-shell/assets/{cynefin-OW5HDTMX-DoxgDRN-.js → cynefin-OW5HDTMX-h-oYVCez.js} +1 -1
  304. package/web-shell/assets/{cynefinDiagram-5FMLGOSQ-BmUwbS8Q.js → cynefinDiagram-5FMLGOSQ-CXj6T7Pm.js} +1 -1
  305. package/web-shell/assets/{dagre-3AP2YEHR-BJrOVIjc.js → dagre-3AP2YEHR-Ch9GIhJm.js} +1 -1
  306. package/web-shell/assets/{diagram-S7CK7UJ4-TDX4KU9V.js → diagram-S7CK7UJ4-Cq3W541T.js} +1 -1
  307. package/web-shell/assets/{diagram-UQ7AKVKN-D3VUQkGl.js → diagram-UQ7AKVKN-Bm1R5-sN.js} +1 -1
  308. package/web-shell/assets/{diagram-VSXAHHWV-CqCpgViy.js → diagram-VSXAHHWV-BW2qG6Vh.js} +1 -1
  309. package/web-shell/assets/{diagram-VX7I27RA-CthqfwCs.js → diagram-VX7I27RA-DN96PhRe.js} +1 -1
  310. package/web-shell/assets/{diagram-Z3DM3KII-BRY3Ahvu.js → diagram-Z3DM3KII-A8MnwaJr.js} +1 -1
  311. package/web-shell/assets/{ebnfDiagram-PWID7BFC-tJvTnIwp.js → ebnfDiagram-PWID7BFC-CZTpUypI.js} +1 -1
  312. package/web-shell/assets/{erDiagram-SSCWMZ5O-DT4b7w5B.js → erDiagram-SSCWMZ5O-CbxCRFru.js} +1 -1
  313. package/web-shell/assets/{flowDiagram-A5DVABFB-C5oirWSf.js → flowDiagram-A5DVABFB-Bt1PM2Dy.js} +1 -1
  314. package/web-shell/assets/{ganttDiagram-EL5Y4UJY-ZD3kNlO4.js → ganttDiagram-EL5Y4UJY-CTgim3LX.js} +1 -1
  315. package/web-shell/assets/{gitGraphDiagram-WWUBYQGX-Bp1sg_wH.js → gitGraphDiagram-WWUBYQGX-h4jX7S4l.js} +1 -1
  316. package/web-shell/assets/{index-DSIzVof7.js → index-BDxWHGNm.js} +1 -1
  317. package/web-shell/assets/index-Bd3iA5Er.js +2407 -0
  318. package/web-shell/assets/index-DuwfO01z.css +36 -0
  319. package/web-shell/assets/{infoDiagram-RXCK75RN-Btumz_CZ.js → infoDiagram-RXCK75RN-DsIsFmZ4.js} +1 -1
  320. package/web-shell/assets/{ishikawaDiagram-5VMMS53U-Dx8_uvso.js → ishikawaDiagram-5VMMS53U-BgF2V3rC.js} +1 -1
  321. package/web-shell/assets/{journeyDiagram-EYS64GPL-DS5spUhj.js → journeyDiagram-EYS64GPL-CJ2ibWhB.js} +1 -1
  322. package/web-shell/assets/{kanban-definition-3QL26DDD-DttC9d4D.js → kanban-definition-3QL26DDD-oqNfpjND.js} +1 -1
  323. package/web-shell/assets/{layout-BDOJQJbX.js → layout-DKF2f-UC.js} +1 -1
  324. package/web-shell/assets/{linear-BsUVMxld.js → linear-CadmYA8J.js} +1 -1
  325. package/web-shell/assets/{mermaid.core-De4-EW4Z.js → mermaid.core-BSD13L-h.js} +6 -6
  326. package/web-shell/assets/{mindmap-definition-FBJOCRG2-BsYY98Wv.js → mindmap-definition-FBJOCRG2-Cg3jlHzV.js} +1 -1
  327. package/web-shell/assets/{pegDiagram-XKGWAZYB-DXnnQrVY.js → pegDiagram-XKGWAZYB-BGzqlBWk.js} +1 -1
  328. package/web-shell/assets/{pieDiagram-E7YTZNPT-DGLAGUYR.js → pieDiagram-E7YTZNPT-BVDdPYnC.js} +1 -1
  329. package/web-shell/assets/{quadrantDiagram-AXDQQJYC-Y8DcMTa5.js → quadrantDiagram-AXDQQJYC-D7maRW6r.js} +1 -1
  330. package/web-shell/assets/{railroadDiagram-O6MQD6OU-ZgauslUZ.js → railroadDiagram-O6MQD6OU-C7J0Nnqc.js} +1 -1
  331. package/web-shell/assets/{requirementDiagram-EFPCY7ZU-Kxtu4twe.js → requirementDiagram-EFPCY7ZU-CDEpUB7S.js} +1 -1
  332. package/web-shell/assets/{sankeyDiagram-P5KCCOFB-BKsLF9EA.js → sankeyDiagram-P5KCCOFB-DoA0BWeR.js} +1 -1
  333. package/web-shell/assets/{sequenceDiagram-WJ2MYXX4-D8sCv1NK.js → sequenceDiagram-WJ2MYXX4-DlqRjDLl.js} +1 -1
  334. package/web-shell/assets/{sizeCapture-X5ZJPWSS-BX8sokZX.js → sizeCapture-X5ZJPWSS-3l2EJ1DB.js} +1 -1
  335. package/web-shell/assets/{stateDiagram-HBIQ2CUA-DFMl58kv.js → stateDiagram-HBIQ2CUA-Bdq0N6Lr.js} +1 -1
  336. package/web-shell/assets/stateDiagram-v2-4QOOHH4V-DtdYpKZp.js +1 -0
  337. package/web-shell/assets/{swimlanes-XN3QIQJK-BnMwURLN.js → swimlanes-XN3QIQJK-B4ArxdLV.js} +1 -1
  338. package/web-shell/assets/swimlanesDiagram-VK2B7HYN-B_iL0Dc4.js +8 -0
  339. package/web-shell/assets/{timeline-definition-24CTP7MA-C8y77DDz.js → timeline-definition-24CTP7MA-B_Ug6D_k.js} +1 -1
  340. package/web-shell/assets/{vennDiagram-4TSXK5OY-DOWQgX9u.js → vennDiagram-4TSXK5OY-BR9tvaDT.js} +1 -1
  341. package/web-shell/assets/{wardleyDiagram-VM6X3IG4-BM0AVIzE.js → wardleyDiagram-VM6X3IG4-BdGIt6qE.js} +1 -1
  342. package/web-shell/assets/{xychartDiagram-S5SC5T6Z-B18-YghG.js → xychartDiagram-S5SC5T6Z-NxS8XkXN.js} +1 -1
  343. package/web-shell/index.html +2 -2
  344. package/web-shell/sw.js +1 -1
  345. package/bundled/computer-use/references/macos.md +0 -208
  346. package/bundled/computer-use/references/windows-linux.md +0 -247
  347. package/web-shell/assets/channel-B88Zt8_x.js +0 -1
  348. package/web-shell/assets/classDiagram-DTDB5LWJ-Dp-7ruHm.js +0 -1
  349. package/web-shell/assets/classDiagram-v2-JRS7N3AN-Dp-7ruHm.js +0 -1
  350. package/web-shell/assets/index-CpxLhWqx.js +0 -2337
  351. package/web-shell/assets/index-mr0Sw0G-.css +0 -36
  352. package/web-shell/assets/stateDiagram-v2-4QOOHH4V-B3HSbbo2.js +0 -1
  353. package/web-shell/assets/swimlanesDiagram-VK2B7HYN-FnO0SUMi.js +0 -8
@@ -3,7 +3,7 @@
3
3
  import {
4
4
  captureRuntimeFileVersion,
5
5
  writeRuntimeFile
6
- } from "./chunk-WVNCMGAO.js";
6
+ } from "./chunk-6FURC4LI.js";
7
7
  import {
8
8
  checkTeamMemorySecrets
9
9
  } from "./chunk-6URMIIZO.js";
@@ -15,17 +15,17 @@ import {
15
15
  detectLineEnding,
16
16
  getDiffStat,
17
17
  needsUtf8Bom
18
- } from "./chunk-RL2HSTEB.js";
18
+ } from "./chunk-SYZPPX3O.js";
19
19
  import {
20
20
  FileOperationEvent,
21
21
  ReadFileTool,
22
22
  getLanguageFromFilePath,
23
23
  logFileOperation
24
- } from "./chunk-MZRJ2JJS.js";
24
+ } from "./chunk-HDSI3RDN.js";
25
25
  import {
26
26
  fileExists,
27
27
  getSpecificMimeType
28
- } from "./chunk-NNN2PKPV.js";
28
+ } from "./chunk-PYYPSK6Q.js";
29
29
  import {
30
30
  isAnyAutoMemPath,
31
31
  isTeamAutoMemPath
@@ -4,16 +4,16 @@ import {
4
4
  LoadedSettings,
5
5
  getNestedProperty,
6
6
  getPersistScopeForModelSelection
7
- } from "./chunk-OQE7AA2W.js";
7
+ } from "./chunk-36ZMEEBW.js";
8
8
  import {
9
9
  getHomeEnvFallbackVars
10
- } from "./chunk-2KZURPTB.js";
10
+ } from "./chunk-DZCTQ2MF.js";
11
11
  import {
12
12
  writeWithBackupSync
13
- } from "./chunk-JOFZBTVL.js";
13
+ } from "./chunk-245NB3M4.js";
14
14
  import {
15
15
  preserveModelProviderPlaceholders
16
- } from "./chunk-3JSIWFNA.js";
16
+ } from "./chunk-XHHUGXYW.js";
17
17
  import {
18
18
  resolveEnvVarsInObject
19
19
  } from "./chunk-7TK2HU3T.js";
@@ -13,6 +13,25 @@ import {
13
13
  __name
14
14
  } from "./chunk-J2S4EL5Y.js";
15
15
 
16
+ // packages/channels/base/dist/private-policy.js
17
+ init_esbuild_shims();
18
+ function resolvePrivatePolicy(config) {
19
+ const policy = config.privatePolicy !== void 0 ? config.privatePolicy : config.dmPolicy === "disabled" ? "disabled" : config.senderPolicy ?? "allowlist";
20
+ switch (policy) {
21
+ case "disabled":
22
+ return "disabled";
23
+ case "allowlist":
24
+ return "allowlist";
25
+ case "pairing":
26
+ return "pairing";
27
+ case "open":
28
+ return "open";
29
+ default:
30
+ throw new Error("Channel privatePolicy must be one of: disabled, allowlist, pairing, open.");
31
+ }
32
+ }
33
+ __name(resolvePrivatePolicy, "resolvePrivatePolicy");
34
+
16
35
  // packages/channels/base/dist/PairingStore.js
17
36
  init_esbuild_shims();
18
37
  import * as crypto2 from "node:crypto";
@@ -1372,8 +1391,7 @@ var GroupGate = class {
1372
1391
  pairing: result ?? { rejected: "cap_reached" }
1373
1392
  };
1374
1393
  }
1375
- const groupConfig = this.groups[envelope.chatId] || this.groups["*"] || {};
1376
- const requireMention = groupConfig.requireMention ?? true;
1394
+ const requireMention = this.groups[envelope.chatId]?.requireMention ?? this.groups["*"]?.requireMention ?? true;
1377
1395
  if (requireMention && !envelope.isMentioned && !envelope.isReplyToBot) {
1378
1396
  return { allowed: false, reason: "mention_required" };
1379
1397
  }
@@ -1383,6 +1401,14 @@ var GroupGate = class {
1383
1401
  return this.pairingStore?.isGroupApproved(groupId) ?? false;
1384
1402
  }
1385
1403
  };
1404
+ function lowercaseGroupAllowedUsers(groups) {
1405
+ for (const group of Object.values(groups)) {
1406
+ if (group.allowedUsers) {
1407
+ group.allowedUsers = group.allowedUsers.map((u) => u.toLowerCase());
1408
+ }
1409
+ }
1410
+ }
1411
+ __name(lowercaseGroupAllowedUsers, "lowercaseGroupAllowedUsers");
1386
1412
 
1387
1413
  // packages/channels/base/dist/DmGate.js
1388
1414
  init_esbuild_shims();
@@ -1692,6 +1718,8 @@ var SenderGate = class {
1692
1718
  }
1693
1719
  isAllowed(senderId) {
1694
1720
  switch (this.policy) {
1721
+ case "disabled":
1722
+ return false;
1695
1723
  case "open":
1696
1724
  return true;
1697
1725
  case "allowlist":
@@ -1704,6 +1732,8 @@ var SenderGate = class {
1704
1732
  }
1705
1733
  check(senderId, senderName) {
1706
1734
  switch (this.policy) {
1735
+ case "disabled":
1736
+ return { allowed: false };
1707
1737
  case "open":
1708
1738
  return { allowed: true };
1709
1739
  case "allowlist":
@@ -1831,7 +1861,13 @@ var SessionRouter = class {
1831
1861
  this.channelsWithoutLoops.add(channelName);
1832
1862
  }
1833
1863
  }
1834
- routingKey(channelName, senderId, chatId, threadId) {
1864
+ routingKey(channelName, senderId, chatId, threadId, routeKey) {
1865
+ if (routeKey !== void 0) {
1866
+ return JSON.stringify([
1867
+ this.routingKey(channelName, senderId, chatId, threadId),
1868
+ routeKey
1869
+ ]);
1870
+ }
1835
1871
  const scope = this.channelScopes.get(channelName) || this.defaultScope;
1836
1872
  switch (scope) {
1837
1873
  case "thread":
@@ -1855,14 +1891,15 @@ var SessionRouter = class {
1855
1891
  };
1856
1892
  }
1857
1893
  async resolve(channelName, senderId, chatId, threadId, cwd, isGroup, options) {
1858
- const key = this.routingKey(channelName, senderId, chatId, options?.routingThreadId ?? threadId);
1894
+ const key = this.routingKey(channelName, senderId, chatId, options?.routingThreadId ?? threadId, options?.routeKey);
1859
1895
  const input = {
1860
1896
  channelName,
1861
1897
  senderId,
1862
1898
  chatId,
1863
1899
  threadId,
1864
1900
  cwd: cwd || this.defaultCwd,
1865
- isGroup
1901
+ isGroup,
1902
+ ...options?.routeKey !== void 0 ? { messageRoute: options.routeKey } : {}
1866
1903
  };
1867
1904
  let failedWaits = 0;
1868
1905
  for (; ; ) {
@@ -1902,7 +1939,8 @@ var SessionRouter = class {
1902
1939
  senderId: input.senderId,
1903
1940
  chatId: input.chatId,
1904
1941
  threadId: input.threadId,
1905
- isGroup: input.isGroup
1942
+ isGroup: input.isGroup,
1943
+ ...input.messageRoute !== void 0 ? { messageRoute: input.messageRoute } : {}
1906
1944
  }, (currentOperation) => existing ? this.loadOrReplaceSession(key, existing, input, currentOperation) : this.createAndStoreSession(key, input, currentOperation));
1907
1945
  this.creatingSessions.set(key, operation);
1908
1946
  try {
@@ -1942,7 +1980,8 @@ var SessionRouter = class {
1942
1980
  senderId: input.senderId,
1943
1981
  chatId: input.chatId,
1944
1982
  threadId: input.threadId,
1945
- isGroup: input.isGroup
1983
+ isGroup: input.isGroup,
1984
+ ...input.messageRoute !== void 0 ? { messageRoute: input.messageRoute } : {}
1946
1985
  });
1947
1986
  this.toCwd.set(sessionId, input.cwd);
1948
1987
  this.liveSessionIds.add(sessionId);
@@ -1999,7 +2038,8 @@ var SessionRouter = class {
1999
2038
  senderId: input.senderId,
2000
2039
  chatId: input.chatId,
2001
2040
  threadId: input.threadId,
2002
- isGroup: input.isGroup
2041
+ isGroup: input.isGroup,
2042
+ ...input.messageRoute !== void 0 ? { messageRoute: input.messageRoute } : {}
2003
2043
  });
2004
2044
  this.toCwd.set(replacement, input.cwd);
2005
2045
  this.liveSessionIds.add(replacement);
@@ -2024,13 +2064,13 @@ var SessionRouter = class {
2024
2064
  isSessionLive(sessionId) {
2025
2065
  return this.toTarget.has(sessionId) && this.isLive(sessionId);
2026
2066
  }
2027
- getSession(channelName, senderId, chatId, threadId) {
2028
- return this.toSession.get(this.routingKey(channelName, senderId, chatId, threadId));
2067
+ getSession(channelName, senderId, chatId, threadId, routeKey) {
2068
+ return this.toSession.get(this.routingKey(channelName, senderId, chatId, threadId, routeKey));
2029
2069
  }
2030
- hasSession(channelName, senderId, chatId, threadId) {
2070
+ hasSession(channelName, senderId, chatId, threadId, routeKey) {
2031
2071
  const scope = this.channelScopes.get(channelName) || this.defaultScope;
2032
2072
  if (chatId) {
2033
- return this.toSession.has(this.routingKey(channelName, senderId, chatId, threadId));
2073
+ return this.toSession.has(this.routingKey(channelName, senderId, chatId, threadId, routeKey));
2034
2074
  }
2035
2075
  if (scope === "single") {
2036
2076
  return false;
@@ -2292,11 +2332,11 @@ var SessionRouter = class {
2292
2332
  /**
2293
2333
  * Remove session(s) for the given sender. Returns the removed session IDs.
2294
2334
  */
2295
- removeSession(channelName, senderId, chatId, threadId) {
2335
+ removeSession(channelName, senderId, chatId, threadId, routeKey) {
2296
2336
  const removedIds = [];
2297
2337
  const scope = this.channelScopes.get(channelName) || this.defaultScope;
2298
2338
  if (chatId) {
2299
- const key = this.routingKey(channelName, senderId, chatId, threadId);
2339
+ const key = this.routingKey(channelName, senderId, chatId, threadId, routeKey);
2300
2340
  this.invalidateRouteOperation(key);
2301
2341
  const sessionId = this.deleteByKey(key);
2302
2342
  if (sessionId)
@@ -2597,7 +2637,7 @@ var SessionRouter = class {
2597
2637
  if (typeof target !== "object" || target === null)
2598
2638
  return false;
2599
2639
  const typedTarget = target;
2600
- const wellFormed = typeof entry["sessionId"] === "string" && entry["sessionId"].length > 0 && typeof entry["cwd"] === "string" && entry["cwd"].length > 0 && typeof typedTarget["channelName"] === "string" && typeof typedTarget["senderId"] === "string" && typeof typedTarget["chatId"] === "string" && (typedTarget["threadId"] === void 0 || typeof typedTarget["threadId"] === "string") && (typedTarget["isGroup"] === void 0 || typeof typedTarget["isGroup"] === "boolean");
2640
+ const wellFormed = typeof entry["sessionId"] === "string" && entry["sessionId"].length > 0 && typeof entry["cwd"] === "string" && entry["cwd"].length > 0 && typeof typedTarget["channelName"] === "string" && typeof typedTarget["senderId"] === "string" && typeof typedTarget["chatId"] === "string" && (typedTarget["messageRoute"] === void 0 || typeof typedTarget["messageRoute"] === "string") && (typedTarget["threadId"] === void 0 || typeof typedTarget["threadId"] === "string") && (typedTarget["isGroup"] === void 0 || typeof typedTarget["isGroup"] === "boolean");
2601
2641
  if (!wellFormed)
2602
2642
  return false;
2603
2643
  if (entry["isolation"] === void 0)
@@ -2755,6 +2795,35 @@ var SessionRouter = class {
2755
2795
  }
2756
2796
  };
2757
2797
 
2798
+ // packages/channels/base/dist/message-routes.js
2799
+ init_esbuild_shims();
2800
+ function matchMessageRoute(text, routes, defaultRoute) {
2801
+ for (const [prefix, instructions] of [...routes].sort(([a], [b]) => b.length - a.length)) {
2802
+ let candidate = text.trim();
2803
+ while (!(candidate.startsWith(prefix) && (candidate.length === prefix.length || /\s/u.test(candidate.charAt(prefix.length))))) {
2804
+ const mention = candidate.match(/^(?:@[^@\s]+|<@[^>]{1,64}>)\s+/u)?.[0];
2805
+ if (!mention)
2806
+ break;
2807
+ candidate = candidate.slice(mention.length);
2808
+ }
2809
+ if (candidate.startsWith(prefix) && /^\s+\S[\s\S]*$/u.test(candidate.slice(prefix.length))) {
2810
+ return {
2811
+ prefix,
2812
+ instructions,
2813
+ text: candidate.slice(prefix.length).trim()
2814
+ };
2815
+ }
2816
+ }
2817
+ if (defaultRoute !== void 0) {
2818
+ const instructions = routes.get(defaultRoute);
2819
+ if (instructions !== void 0) {
2820
+ return { prefix: defaultRoute, instructions, text };
2821
+ }
2822
+ }
2823
+ return void 0;
2824
+ }
2825
+ __name(matchMessageRoute, "matchMessageRoute");
2826
+
2758
2827
  // packages/channels/base/dist/named-session-manager.js
2759
2828
  init_esbuild_shims();
2760
2829
  import { randomUUID as randomUUID2 } from "node:crypto";
@@ -4276,7 +4345,10 @@ var ChannelBase = class {
4276
4345
  groupGate;
4277
4346
  dmGate;
4278
4347
  gate;
4348
+ privatePolicy;
4279
4349
  router;
4350
+ messageRoutes;
4351
+ routedEnvelopes = /* @__PURE__ */ new WeakSet();
4280
4352
  name;
4281
4353
  /** Resolved (defaulted + frozen) identity/scope — adapters should read these, not raw config. */
4282
4354
  identity;
@@ -4898,6 +4970,17 @@ No answer is available from the current conversation context.`;
4898
4970
  constructor(name, config, bridge, options) {
4899
4971
  this.name = name;
4900
4972
  this.config = config;
4973
+ this.messageRoutes = new Map(Object.entries(config.messageRoutes ?? {}));
4974
+ if (config.multiSession && this.messageRoutes.size > 0) {
4975
+ throw new Error("messageRoutes cannot be combined with multiSession.");
4976
+ }
4977
+ if ([...this.messageRoutes].some(([prefix, instructions]) => !prefix.trim() || prefix !== prefix.trim() || typeof instructions !== "string")) {
4978
+ throw new Error("Message routes require non-empty prefixes and string instructions.");
4979
+ }
4980
+ if (config.defaultMessageRoute !== void 0 && !this.messageRoutes.has(config.defaultMessageRoute)) {
4981
+ throw new Error("defaultMessageRoute must name a configured message route.");
4982
+ }
4983
+ this.privatePolicy = resolvePrivatePolicy(config);
4901
4984
  this.bridge = bridge;
4902
4985
  this.locale = options?.locale ?? "en";
4903
4986
  this.proxy = options?.proxy;
@@ -4911,10 +4994,10 @@ No answer is available from the current conversation context.`;
4911
4994
  this.loopController = options?.loopController;
4912
4995
  this.observedContacts = options?.observedContacts;
4913
4996
  this.bridgeRecovery = options?.bridgeRecovery;
4914
- const pairingStore = config.senderPolicy === "pairing" || config.groupPolicy === "pairing" ? new PairingStore(name, config.cwd) : void 0;
4997
+ const pairingStore = this.privatePolicy === "pairing" || config.groupPolicy === "pairing" ? new PairingStore(name, config.cwd) : void 0;
4915
4998
  this.groupGate = new GroupGate(config.groupPolicy, config.groups, pairingStore);
4916
- this.dmGate = new DmGate(config.dmPolicy);
4917
- this.gate = new SenderGate(config.senderPolicy, config.allowedUsers, pairingStore);
4999
+ this.dmGate = new DmGate(this.privatePolicy === "disabled" ? "disabled" : "open");
5000
+ this.gate = new SenderGate(this.privatePolicy, config.allowedUsers, pairingStore);
4918
5001
  this.router = options?.router || new SessionRouter(bridge, config.cwd, config.sessionScope);
4919
5002
  if (config.multiSession) {
4920
5003
  if (config.sessionScope !== "user") {
@@ -5182,6 +5265,9 @@ No answer is available from the current conversation context.`;
5182
5265
  if (this.config.instructions) {
5183
5266
  staticContext.push(this.config.instructions);
5184
5267
  }
5268
+ const routeInstructions = target.messageRoute === void 0 ? void 0 : this.messageRoutes.get(target.messageRoute);
5269
+ if (routeInstructions)
5270
+ staticContext.push(routeInstructions);
5185
5271
  if (this.shouldPrependChannelBoundaryPrompt()) {
5186
5272
  staticContext.push(this.channelBoundaryPrompt());
5187
5273
  }
@@ -5373,7 +5459,7 @@ No answer is available from the current conversation context.`;
5373
5459
  throw new Error(`Loop ${job.id} target is no longer authorized.`);
5374
5460
  }
5375
5461
  await this.waitForBridgeRecovery();
5376
- const sessionId = await this.router.resolve(this.name, job.target.senderId, job.target.chatId, job.target.threadId, job.cwd, job.target.isGroup);
5462
+ const sessionId = await this.router.resolve(this.name, job.target.senderId, job.target.chatId, job.target.threadId, job.cwd, job.target.isGroup, { routeKey: job.target.messageRoute });
5377
5463
  const label = sanitizeQuotedText(job.label || job.id, 80);
5378
5464
  const createdBy = sanitizeSenderName(job.createdBy || "unknown");
5379
5465
  const promptText = `[Loop "${label}" created by ${createdBy}] Scheduled task running unattended: no one is present to answer questions, and your final response is delivered to this chat automatically \u2014 do whatever work the task requires, then put the result in your final response instead of trying to deliver it to this chat yourself.
@@ -6384,7 +6470,7 @@ ${requestList}`);
6384
6470
  if (this.namedSessions) {
6385
6471
  return (await this.namedSessions.current(this.namedSessionOwner(envelope)))?.sessionId;
6386
6472
  }
6387
- return this.router.getSession(this.name, envelope.senderId, envelope.chatId, envelope.threadId);
6473
+ return this.router.getSession(this.name, envelope.senderId, envelope.chatId, envelope.threadId, envelope.messageRoute);
6388
6474
  }
6389
6475
  reserveQueuedTurn(sessionId) {
6390
6476
  this.queuedTurns.set(sessionId, (this.queuedTurns.get(sessionId) ?? 0) + 1);
@@ -6636,7 +6722,7 @@ ${requestList}`);
6636
6722
  let resetTaskName;
6637
6723
  let resetWorktreeKept = false;
6638
6724
  let removedIds;
6639
- const retiringSessionId = this.namedSessions ? void 0 : this.router.getSession(this.name, envelope.senderId, envelope.chatId, envelope.threadId);
6725
+ const retiringSessionId = this.namedSessions ? void 0 : this.router.getSession(this.name, envelope.senderId, envelope.chatId, envelope.threadId, envelope.messageRoute);
6640
6726
  if (retiringSessionId)
6641
6727
  this.onSessionRetiring(retiringSessionId);
6642
6728
  if (this.namedSessions) {
@@ -6659,7 +6745,7 @@ ${requestList}`);
6659
6745
  return;
6660
6746
  }
6661
6747
  } else {
6662
- removedIds = this.router.removeSession(this.name, envelope.senderId, envelope.chatId, envelope.threadId);
6748
+ removedIds = this.router.removeSession(this.name, envelope.senderId, envelope.chatId, envelope.threadId, envelope.messageRoute);
6663
6749
  }
6664
6750
  this.clearPendingGroupHistory(envelope);
6665
6751
  if (removedIds.length > 0) {
@@ -6743,7 +6829,7 @@ ${requestList}`);
6743
6829
  await this.sendThreadMessage(envelope.chatId, envelope.threadId, "Only authorized members can view this shared session.");
6744
6830
  return true;
6745
6831
  }
6746
- const active = this.namedSessions ? Boolean(await this.currentSessionId(envelope)) : this.router.hasSession(this.name, envelope.senderId, envelope.chatId, envelope.threadId);
6832
+ const active = this.namedSessions ? Boolean(await this.currentSessionId(envelope)) : this.router.hasSession(this.name, envelope.senderId, envelope.chatId, envelope.threadId, envelope.messageRoute);
6747
6833
  const scopeNote = this.config.sessionScope === "single" ? " (shared channel-wide)" : this.isSharedSession(envelope) ? envelope.isGroup ? " (shared by this group)" : "" : envelope.isGroup ? " (private to you)" : "";
6748
6834
  await this.sendThreadMessage(envelope.chatId, envelope.threadId, [
6749
6835
  `Channel: ${this.name}`,
@@ -6820,8 +6906,8 @@ ${requestList}`);
6820
6906
  await this.sendThreadMessage(envelope.chatId, envelope.threadId, "Only authorized members can view this shared session.");
6821
6907
  return true;
6822
6908
  }
6823
- const hasSession = this.namedSessions ? Boolean(await this.currentSessionId(envelope)) : this.router.hasSession(this.name, envelope.senderId, envelope.chatId, envelope.threadId);
6824
- const policy = this.config.senderPolicy;
6909
+ const hasSession = this.namedSessions ? Boolean(await this.currentSessionId(envelope)) : this.router.hasSession(this.name, envelope.senderId, envelope.chatId, envelope.threadId, envelope.messageRoute);
6910
+ const policy = envelope.isGroup && !this.isPersonalConversation(envelope) ? this.groupSendersFor(envelope) : this.privatePolicy;
6825
6911
  const lines = [
6826
6912
  `Session: ${hasSession ? "active" : "none"}`,
6827
6913
  `Access: ${policy}`,
@@ -7103,6 +7189,7 @@ ${requestList}`);
7103
7189
  loopTargetFromEnvelope(envelope) {
7104
7190
  return this.normalizeLoopTarget({
7105
7191
  channelName: this.name,
7192
+ ...envelope.messageRoute !== void 0 ? { messageRoute: envelope.messageRoute } : {},
7106
7193
  senderId: envelope.senderId,
7107
7194
  chatId: envelope.chatId,
7108
7195
  threadId: envelope.threadId,
@@ -7128,6 +7215,8 @@ ${requestList}`);
7128
7215
  return normalizedTarget;
7129
7216
  }
7130
7217
  isStoredLoopTargetAuthorized(target, senderName) {
7218
+ if (target.messageRoute !== void 0 && !this.messageRoutes.has(target.messageRoute))
7219
+ return false;
7131
7220
  const normalizedTarget = this.normalizeLoopTarget(target);
7132
7221
  const envelope = {
7133
7222
  channelName: this.name,
@@ -7140,7 +7229,7 @@ ${requestList}`);
7140
7229
  isMentioned: true,
7141
7230
  isReplyToBot: true
7142
7231
  };
7143
- 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);
7232
+ return this.groupGate.check(envelope, { createPairingRequest: false }).allowed && this.dmGate.check(envelope).allowed && this.senderGateFor(envelope).isAllowed(normalizedTarget.senderId) && this.isAuthorizedForSharedSession(envelope);
7144
7233
  }
7145
7234
  /** Check if a message text matches a registered local command. */
7146
7235
  isLocalCommand(text) {
@@ -7148,7 +7237,7 @@ ${requestList}`);
7148
7237
  return parsed !== null && this.commands.has(parsed.command);
7149
7238
  }
7150
7239
  findActiveSessionId(envelope) {
7151
- const sessionId = this.router.getSession(this.name, envelope.senderId, envelope.chatId, envelope.threadId);
7240
+ const sessionId = this.router.getSession(this.name, envelope.senderId, envelope.chatId, envelope.threadId, envelope.messageRoute);
7152
7241
  return sessionId && this.activePrompts.has(sessionId) ? sessionId : void 0;
7153
7242
  }
7154
7243
  async findNamedActiveSessionId(envelope) {
@@ -7202,7 +7291,7 @@ ${requestList}`);
7202
7291
  if (matched) {
7203
7292
  return;
7204
7293
  }
7205
- const sessionId = this.router.getSession(this.name, envelope.senderId, envelope.chatId, envelope.threadId);
7294
+ const sessionId = this.router.getSession(this.name, envelope.senderId, envelope.chatId, envelope.threadId, envelope.messageRoute);
7206
7295
  if (sessionId) {
7207
7296
  this.unattendedMemorySessions.delete(sessionId);
7208
7297
  }
@@ -7644,29 +7733,21 @@ ${sanitizePromptText(entry.text).trim()}` : `No channel memory entry ${intent.id
7644
7733
  return this.config.sessionScope === "single" || this.config.sessionScope === "chat_thread" || target.isGroup === true && this.config.sessionScope === "thread";
7645
7734
  }
7646
7735
  /**
7647
- * Whether `envelope.senderId` may act on the resolved session's destructive or
7648
- * workspace-leaking commands (/clear, /who). A SHARED session with a non-empty
7649
- * allowedUsers list is restricted to those members; a per-user session, or one
7650
- * with no allowlist, is unrestricted. Shared verbatim by /clear and /who so the
7651
- * gate can't drift; each caller sends its own rejection wording.
7736
+ * Whether `envelope.senderId` may operate the resolved session: answer its
7737
+ * permission prompts, steer it, or run /cancel, /clear, /who, /status, /loop
7738
+ * and /btw. Shared verbatim by every such command so the gate can't drift;
7739
+ * each caller sends its own rejection wording.
7652
7740
  */
7653
7741
  isAuthorizedForSharedSession(envelope) {
7654
- return this.isAuthorizedForSharedSessionTarget(envelope);
7655
- }
7656
- isAuthorizedForSharedSessionTarget(target) {
7657
- if (!this.isSharedSessionTarget(target))
7658
- return true;
7659
- const authorized = this.config.allowedUsers;
7660
- return authorized.length === 0 || authorized.includes(target.senderId);
7742
+ return this.isSharedSessionOperator(envelope, envelope.senderId);
7661
7743
  }
7662
7744
  isAuthorizedForSharedSessionToolCall(target, sessionId) {
7745
+ return this.isSharedSessionOperator(target, this.activePrompts.get(sessionId)?.senderId);
7746
+ }
7747
+ isSharedSessionOperator(target, senderId) {
7663
7748
  if (!this.isSharedSessionTarget(target))
7664
7749
  return true;
7665
- const authorized = this.config.allowedUsers;
7666
- if (authorized.length === 0)
7667
- return true;
7668
- const senderId = this.activePrompts.get(sessionId)?.senderId;
7669
- return senderId !== void 0 && authorized.includes(senderId);
7750
+ return senderId !== void 0 && this.config.operators?.includes(senderId) === true;
7670
7751
  }
7671
7752
  toolCallerName(sessionId, target) {
7672
7753
  const active = this.activePrompts.get(sessionId);
@@ -7784,7 +7865,8 @@ ${sanitizePromptText(entry.text).trim()}` : `No channel memory entry ${intent.id
7784
7865
  return JSON.stringify([
7785
7866
  this.name,
7786
7867
  envelope.chatId,
7787
- envelope.threadId ?? null
7868
+ envelope.threadId ?? null,
7869
+ ...envelope.messageRoute !== void 0 ? [envelope.messageRoute] : []
7788
7870
  ]);
7789
7871
  }
7790
7872
  groupHistoryLimit(envelope) {
@@ -7800,6 +7882,8 @@ ${sanitizePromptText(entry.text).trim()}` : `No channel memory entry ${intent.id
7800
7882
  return Math.floor(configured);
7801
7883
  }
7802
7884
  recordPendingGroupHistory(envelope) {
7885
+ if (!this.applyMessageRoute(envelope))
7886
+ return;
7803
7887
  const limit = this.groupHistoryLimit(envelope);
7804
7888
  if (limit <= 0 || envelope.text.trim().length === 0) {
7805
7889
  return;
@@ -7807,7 +7891,7 @@ ${sanitizePromptText(entry.text).trim()}` : `No channel memory entry ${intent.id
7807
7891
  if (envelope.syntheticText)
7808
7892
  return;
7809
7893
  const senderId = truncateGroupHistoryField(envelope.senderId);
7810
- if (this.config.groupPolicy !== "pairing" && !this.gate.isAllowed(senderId)) {
7894
+ if (!this.senderGateFor(envelope).isAllowed(senderId)) {
7811
7895
  return;
7812
7896
  }
7813
7897
  const entry = {
@@ -7866,11 +7950,12 @@ ${sanitizePromptText(entry.text).trim()}` : `No channel memory entry ${intent.id
7866
7950
  `);
7867
7951
  }
7868
7952
  }
7869
- prependGroupHistoryContext(promptText, entries) {
7953
+ prependGroupHistoryContext(envelope, promptText, entries) {
7870
7954
  if (entries.length === 0) {
7871
7955
  return promptText;
7872
7956
  }
7873
- const lines = this.config.groupPolicy === "pairing" ? entries : entries.filter((entry) => this.gate.isAllowed(entry.senderId));
7957
+ const senderGate = this.senderGateFor(envelope);
7958
+ const lines = entries.filter((entry) => senderGate.isAllowed(entry.senderId));
7874
7959
  if (lines.length === 0) {
7875
7960
  return promptText;
7876
7961
  }
@@ -7885,7 +7970,35 @@ ${formatted.join("\n")}
7885
7970
  ${CURRENT_MESSAGE_MARKER}
7886
7971
  ${promptText}`;
7887
7972
  }
7973
+ senderGateFor(target) {
7974
+ if (target.isGroup !== true || this.isPersonalConversation(target)) {
7975
+ return this.gate;
7976
+ }
7977
+ const senders = this.groupSendersFor(target);
7978
+ return new SenderGate(senders, senders === "allowlist" ? this.groupAllowedUsersFor(target.chatId) : []);
7979
+ }
7980
+ groupSendersFor(target) {
7981
+ return this.groupConfigFor(target.chatId)?.senders ?? this.groupConfigFor("*")?.senders ?? "open";
7982
+ }
7983
+ /**
7984
+ * Whether a group-shaped conversation acts on behalf of one person, such as
7985
+ * a document comment thread or a task. Its sender follows `privatePolicy`
7986
+ * like a direct message, and `groups` does not apply; its
7987
+ * group shape still decides routing, memory, and presentation.
7988
+ */
7989
+ isPersonalConversation(_target) {
7990
+ return false;
7991
+ }
7992
+ groupAllowedUsersFor(chatId) {
7993
+ return this.groupConfigFor(chatId)?.allowedUsers ?? this.groupConfigFor("*")?.allowedUsers ?? [];
7994
+ }
7995
+ groupConfigFor(key) {
7996
+ const groups = this.config.groups;
7997
+ return Object.hasOwn(groups, key) ? groups[key] : void 0;
7998
+ }
7888
7999
  preflightInbound(envelope, options = {}) {
8000
+ if (!this.applyMessageRoute(envelope))
8001
+ return false;
7889
8002
  const groupResult = this.groupGate.check(envelope, {
7890
8003
  createPairingRequest: !options.deferPairingRequests
7891
8004
  });
@@ -7913,15 +8026,12 @@ ${promptText}`;
7913
8026
  this.logPreflightRejected(`dm_${dmResult.reason ?? "denied"}`);
7914
8027
  return false;
7915
8028
  }
7916
- if (envelope.isGroup && this.config.groupPolicy === "pairing") {
7917
- this.markPreflighted(envelope);
7918
- return true;
7919
- }
7920
- if (options.deferPairingRequests === true && this.config.senderPolicy === "pairing" && !this.gate.isAllowed(envelope.senderId)) {
8029
+ const senderGate = this.senderGateFor(envelope);
8030
+ if (options.deferPairingRequests === true && senderGate === this.gate && this.privatePolicy === "pairing" && !senderGate.isAllowed(envelope.senderId)) {
7921
8031
  this.markPreflighted(envelope);
7922
8032
  return true;
7923
8033
  }
7924
- const result = this.gate.check(envelope.senderId, envelope.senderName);
8034
+ const result = senderGate.check(envelope.senderId, envelope.senderName);
7925
8035
  if (!result.allowed) {
7926
8036
  if (result.pairing !== void 0) {
7927
8037
  this.logPreflightRejected("sender_pairing_required");
@@ -7931,7 +8041,7 @@ ${promptText}`;
7931
8041
  return false;
7932
8042
  });
7933
8043
  }
7934
- this.logPreflightRejected("sender_denied");
8044
+ this.logPreflightRejected(senderGate === this.gate ? "sender_denied" : "group_sender_denied");
7935
8045
  return false;
7936
8046
  }
7937
8047
  this.markPreflighted(envelope);
@@ -8103,6 +8213,21 @@ ${text}`;
8103
8213
  markPreflighted(envelope) {
8104
8214
  this.preflightedEnvelopes.add(envelope);
8105
8215
  }
8216
+ applyMessageRoute(envelope) {
8217
+ if (this.routedEnvelopes.has(envelope))
8218
+ return true;
8219
+ if (this.messageRoutes.size === 0 || envelope.bypassMessageRoutes || envelope.syntheticText) {
8220
+ this.routedEnvelopes.add(envelope);
8221
+ return true;
8222
+ }
8223
+ const matched = matchMessageRoute(envelope.text, this.messageRoutes, this.config.defaultMessageRoute);
8224
+ if (!matched)
8225
+ return false;
8226
+ envelope.text = matched.text;
8227
+ envelope.messageRoute = matched.prefix;
8228
+ this.routedEnvelopes.add(envelope);
8229
+ return true;
8230
+ }
8106
8231
  /** Wait until the currently active bridge recovery, if any, has completed. */
8107
8232
  async waitForBridgeRecovery() {
8108
8233
  let completedRecovery;
@@ -8238,7 +8363,7 @@ ${text}`;
8238
8363
  return;
8239
8364
  }
8240
8365
  } else {
8241
- sessionId = await this.router.resolve(this.name, envelope.senderId, envelope.chatId, envelope.threadId, this.config.cwd, envelope.isGroup);
8366
+ sessionId = await this.router.resolve(this.name, envelope.senderId, envelope.chatId, envelope.threadId, this.config.cwd, envelope.isGroup, { routeKey: envelope.messageRoute });
8242
8367
  }
8243
8368
  const sourceLabel = this.namedSessions ? this.sourceLabelForTurn(sessionId, envelope) : void 0;
8244
8369
  if (this.namedSessions && !sourceLabel) {
@@ -8320,8 +8445,8 @@ ${promptText}`;
8320
8445
  if (envelope.metadata) {
8321
8446
  promptText = promptText + "\n\n" + sanitizePromptText(envelope.metadata);
8322
8447
  }
8323
- const groupCfg = envelope.isGroup ? this.config.groups[envelope.chatId] || this.config.groups["*"] : void 0;
8324
- const mode = groupCfg?.dispatchMode || this.config.dispatchMode || "steer";
8448
+ const groupMode = envelope.isGroup ? this.groupConfigFor(envelope.chatId)?.dispatchMode ?? this.groupConfigFor("*")?.dispatchMode : void 0;
8449
+ const mode = groupMode ?? this.config.dispatchMode ?? "steer";
8325
8450
  const active = this.activePrompts.get(sessionId);
8326
8451
  let steerWatchdog;
8327
8452
  if (active) {
@@ -8405,6 +8530,9 @@ ${promptText}`;
8405
8530
  if (this.config.instructions) {
8406
8531
  sessionContext.push(this.config.instructions);
8407
8532
  }
8533
+ const routeInstructions = envelope.messageRoute === void 0 ? void 0 : this.messageRoutes.get(envelope.messageRoute);
8534
+ if (routeInstructions)
8535
+ sessionContext.push(routeInstructions);
8408
8536
  if (this.shouldPrependChannelBoundaryPrompt()) {
8409
8537
  sessionContext.push(this.channelBoundaryPrompt());
8410
8538
  }
@@ -8441,7 +8569,7 @@ ${promptText}`;
8441
8569
  this.forgetPendingGroupHistory(envelope);
8442
8570
  }
8443
8571
  const groupHistoryEntries = recognizedSlashCommand ? [] : this.drainPendingGroupHistory(envelope);
8444
- let promptToSend = this.prependGroupHistoryContext(promptText, groupHistoryEntries);
8572
+ let promptToSend = this.prependGroupHistoryContext(envelope, promptText, groupHistoryEntries);
8445
8573
  const hiddenContext = [
8446
8574
  ...acceptedRecallContext ? [acceptedRecallContext] : [],
8447
8575
  ...sessionContext
@@ -9883,7 +10011,7 @@ var ChannelLoopStore = class {
9883
10011
  }
9884
10012
  };
9885
10013
  function sameTarget(a, b) {
9886
- return a.channelName === b.channelName && a.senderId === b.senderId && a.chatId === b.chatId && a.threadId === b.threadId;
10014
+ return a.channelName === b.channelName && a.senderId === b.senderId && a.chatId === b.chatId && a.threadId === b.threadId && a.messageRoute === b.messageRoute;
9887
10015
  }
9888
10016
  __name(sameTarget, "sameTarget");
9889
10017
  function normalizeTarget(target) {
@@ -9897,7 +10025,7 @@ function isSessionTarget(value) {
9897
10025
  if (typeof value !== "object" || value === null)
9898
10026
  return false;
9899
10027
  const target = value;
9900
- return typeof target["channelName"] === "string" && typeof target["senderId"] === "string" && typeof target["chatId"] === "string" && (target["threadId"] === void 0 || typeof target["threadId"] === "string") && (target["isGroup"] === void 0 || typeof target["isGroup"] === "boolean");
10028
+ return typeof target["channelName"] === "string" && typeof target["senderId"] === "string" && typeof target["chatId"] === "string" && (target["messageRoute"] === void 0 || typeof target["messageRoute"] === "string") && (target["threadId"] === void 0 || typeof target["threadId"] === "string") && (target["isGroup"] === void 0 || typeof target["isGroup"] === "boolean");
9901
10029
  }
9902
10030
  __name(isSessionTarget, "isSessionTarget");
9903
10031
  function isChannelLoop(value) {
@@ -10543,6 +10671,8 @@ export {
10543
10671
  getWorkspaceScopeDirName,
10544
10672
  ChannelProactiveDeliveryError,
10545
10673
  isChannelProactiveDeliveryError,
10674
+ lowercaseGroupAllowedUsers,
10675
+ resolvePrivatePolicy,
10546
10676
  PairingStore,
10547
10677
  truncateCodePoints,
10548
10678
  truncateUtf16Units,
@@ -5,7 +5,7 @@ import {
5
5
  } from "./chunk-A4MRRFBI.js";
6
6
  import {
7
7
  createStderrForwarder
8
- } from "./chunk-MICQVBPI.js";
8
+ } from "./chunk-WCLHOKAZ.js";
9
9
  import {
10
10
  ClientSideConnection,
11
11
  PROTOCOL_VERSION,
@@ -15,7 +15,7 @@ import {
15
15
  import {
16
16
  AgentEventEmitter,
17
17
  renderSubagentSystemPrompt
18
- } from "./chunk-RL2HSTEB.js";
18
+ } from "./chunk-SYZPPX3O.js";
19
19
  import {
20
20
  sanitizeChildEnv
21
21
  } from "./chunk-5ZPFMX67.js";