@qwen-code/qwen-code 0.19.2 → 0.19.3-nightly.20260701.a974594d7

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 (291) hide show
  1. package/bundled/extension-creator/SKILL.md +357 -0
  2. package/bundled/loop/SKILL.md +34 -10
  3. package/bundled/loop/SKILL.test.ts +52 -0
  4. package/bundled/loop/autonomous-loop.test.ts +59 -0
  5. package/bundled/loop/autonomous-loop.ts +102 -0
  6. package/bundled/loop/loop-task-file.test.ts +1064 -0
  7. package/bundled/loop/loop-task-file.ts +404 -0
  8. package/bundled/loop/loop-tick-resolver.test.ts +864 -0
  9. package/bundled/loop/loop-tick-resolver.ts +416 -0
  10. package/bundled/qc-helper/SKILL.md +26 -19
  11. package/bundled/qc-helper/docs/configuration/auth.md +11 -11
  12. package/bundled/qc-helper/docs/configuration/model-providers.md +13 -13
  13. package/bundled/qc-helper/docs/configuration/settings.md +77 -75
  14. package/bundled/qc-helper/docs/features/channels/plugins.md +1 -1
  15. package/bundled/qc-helper/docs/features/commands.md +108 -77
  16. package/bundled/qc-helper/docs/features/hooks.md +6 -1
  17. package/bundled/qc-helper/docs/features/memory.md +53 -1
  18. package/bundled/qc-helper/docs/features/status-line.md +3 -3
  19. package/bundled/qc-helper/docs/ide-integration/ide-integration.md +4 -4
  20. package/bundled/qc-helper/docs/qwen-serve.md +24 -2
  21. package/bundled/qc-helper/docs/support/tos-privacy.md +16 -3
  22. package/bundled/qc-helper/docs/support/troubleshooting.md +6 -0
  23. package/chunks/{MaxSizedBox-7RERNLFK.js → MaxSizedBox-UZHJ73JB.js} +29 -27
  24. package/chunks/{StandaloneSessionPicker-S22XBSN6.js → StandaloneSessionPicker-GGUIZWCE.js} +42 -37
  25. package/chunks/{acpAgent-4MCETHF2.js → acpAgent-QYZFICEZ.js} +1292 -332
  26. package/chunks/{agent-K3ENVYSB.js → agent-2EN7YNSW.js} +24 -23
  27. package/chunks/{agent-headless-HO3V3A3A.js → agent-headless-SLTEZ5LV.js} +24 -23
  28. package/chunks/{anthropicContentGenerator-E3TQ5XJJ.js → anthropicContentGenerator-CA3JTAMO.js} +33 -12
  29. package/chunks/{artifact-tool-QA4KRO3B.js → artifact-tool-RM7WINJO.js} +3 -3
  30. package/chunks/{askUserQuestion-HMWXW6VN.js → askUserQuestion-J3P6QAJ7.js} +2 -2
  31. package/chunks/{bridge-4LV2HBH2.js → bridge-HZVAUTMX.js} +29 -28
  32. package/chunks/{ca-7WC7ELX6.js → ca-RYOETBUW.js} +10 -9
  33. package/chunks/{chunk-JXQ23SNT.js → chunk-2JKEQWDZ.js} +623 -78
  34. package/chunks/chunk-32MCHZQC.js +73 -0
  35. package/chunks/{chunk-PXFFKNCO.js → chunk-35FH347N.js} +5308 -2500
  36. package/chunks/{chunk-5JZLXFPD.js → chunk-3O2BJMFW.js} +11 -11
  37. package/chunks/{chunk-2JD55C6G.js → chunk-3TK7FSCP.js} +2 -2
  38. package/chunks/{chunk-USGMPVOY.js → chunk-4722VFFU.js} +19 -10
  39. package/chunks/chunk-6FIWYVN4.js +4932 -0
  40. package/chunks/{chunk-I2RFAW6Q.js → chunk-7SP275SH.js} +7 -5
  41. package/chunks/{chunk-5R4SBCX6.js → chunk-AIBPG5MB.js} +3 -3
  42. package/chunks/{chunk-C4K3FEQ2.js → chunk-AVQDCKNF.js} +124 -21
  43. package/chunks/{chunk-OTBK43JR.js → chunk-B236XPGF.js} +1 -1
  44. package/chunks/{chunk-WA5OJGFL.js → chunk-B5MPZI4K.js} +458 -125
  45. package/chunks/{chunk-5DWXLGOM.js → chunk-BJBWRCSK.js} +1 -1
  46. package/chunks/{chunk-4W4T77MO.js → chunk-BLAE2TCO.js} +109 -6
  47. package/chunks/chunk-BMFMJINR.js +45 -0
  48. package/chunks/{chunk-T2VDEFUU.js → chunk-BZHLWC6T.js} +2 -2
  49. package/chunks/{chunk-XU5P23GN.js → chunk-CA4ML3VH.js} +3 -3
  50. package/chunks/{chunk-WGAEWQTF.js → chunk-DBR7PF4B.js} +1 -2
  51. package/chunks/{chunk-S566HKUS.js → chunk-DHXWNSJA.js} +15 -1
  52. package/chunks/{chunk-LLFFKXZZ.js → chunk-DJ25MIU2.js} +167 -43
  53. package/chunks/{chunk-KBXLIVWQ.js → chunk-DX3TKXNT.js} +2 -2
  54. package/chunks/{chunk-OIC6S73E.js → chunk-E5I6YSNO.js} +1 -1
  55. package/chunks/{chunk-TXVGVZYR.js → chunk-ESVSWG6Z.js} +3 -3
  56. package/chunks/{chunk-EX4W6ZYG.js → chunk-EUURTJY7.js} +1 -1
  57. package/chunks/{chunk-QBZ22PQX.js → chunk-EWALXUAD.js} +3 -1
  58. package/chunks/{chunk-F6XNTYNE.js → chunk-FQDMX5IL.js} +30 -307
  59. package/chunks/{chunk-3QFE4OTE.js → chunk-FR3II765.js} +4 -4
  60. package/chunks/{chunk-VYFMN7C6.js → chunk-FV4SQ54H.js} +382 -55
  61. package/chunks/{chunk-ZD3NW5KL.js → chunk-FZY7NH37.js} +63 -9
  62. package/chunks/{chunk-CI5O6SQL.js → chunk-G525INVW.js} +4 -4
  63. package/chunks/{chunk-CGOMICBE.js → chunk-GDIG7TMG.js} +34 -1
  64. package/chunks/{chunk-R2BXK7SX.js → chunk-GHOTR7HL.js} +6 -1
  65. package/chunks/{chunk-TZM5JIAX.js → chunk-GZKQ36JS.js} +10 -7
  66. package/chunks/{chunk-BS64PXY3.js → chunk-HIYUAXBG.js} +1 -1
  67. package/chunks/{chunk-TMBPDHXD.js → chunk-HTWHAN44.js} +1 -1
  68. package/chunks/{chunk-EL5IHQON.js → chunk-HUGAEYZR.js} +6 -27
  69. package/chunks/{chunk-2BIF2NVV.js → chunk-HWG4XLD7.js} +2 -2
  70. package/chunks/{chunk-I5T6PIBQ.js → chunk-I4MXURND.js} +1076 -954
  71. package/chunks/{chunk-JTYRZODB.js → chunk-IBEM64M4.js} +39 -11
  72. package/chunks/{chunk-XKBP7M7A.js → chunk-IKO44NAT.js} +149 -31
  73. package/chunks/{chunk-2BAQ3ACS.js → chunk-JERW36RG.js} +404 -4
  74. package/chunks/{chunk-TOEGRAVX.js → chunk-JV7A66DR.js} +28 -16
  75. package/chunks/{chunk-3RJ3ZPPR.js → chunk-KKQWC6WS.js} +7 -7
  76. package/chunks/{chunk-EXMX5YHG.js → chunk-KXVVXAAC.js} +1 -1
  77. package/chunks/{chunk-Z7XXFPGP.js → chunk-LDWTYE33.js} +1 -1
  78. package/chunks/{chunk-X6EDWN44.js → chunk-LWGLBVWA.js} +1 -1
  79. package/chunks/{chunk-NYOHZYHM.js → chunk-LXEW6BHF.js} +45 -3
  80. package/chunks/{chunk-BGUDAULQ.js → chunk-LXGWLOCM.js} +5 -5
  81. package/chunks/{chunk-ZUAXI2OA.js → chunk-M2U5NM24.js} +188 -11366
  82. package/chunks/{chunk-BNXANYLH.js → chunk-MOUXUCXQ.js} +81 -1
  83. package/chunks/{chunk-FPACXT7T.js → chunk-MTJVHQDP.js} +534 -164
  84. package/chunks/{chunk-UAARJR2G.js → chunk-N4V4VBP6.js} +2 -2
  85. package/chunks/chunk-NIOPRZNN.js +27 -0
  86. package/chunks/{chunk-2TJ3YN6Q.js → chunk-NOYV2NXI.js} +517 -490
  87. package/chunks/{chunk-PRYMDRBV.js → chunk-NPQWQYU6.js} +1 -1
  88. package/chunks/{chunk-J6AW7O5D.js → chunk-NVTRORSK.js} +2 -2
  89. package/chunks/{chunk-PF523XJX.js → chunk-OE5J6UA7.js} +1 -1
  90. package/chunks/{chunk-RS4HRC75.js → chunk-OEY3YAL2.js} +99 -8
  91. package/chunks/{chunk-R36VMVEP.js → chunk-PLQTLKMR.js} +5 -5
  92. package/chunks/{chunk-UN3C6GOR.js → chunk-PPFWEV7G.js} +10 -108
  93. package/chunks/chunk-Q3JOGB4U.js +481 -0
  94. package/chunks/{chunk-HG6YKEBI.js → chunk-Q7TDHJ2G.js} +192 -30
  95. package/chunks/{chunk-EW6C27XX.js → chunk-QHHNFG22.js} +9 -3
  96. package/chunks/chunk-QYUE6W3T.js +123 -0
  97. package/chunks/{chunk-GZCJS5WH.js → chunk-SJBIFVD2.js} +2 -2
  98. package/chunks/{chunk-3UALQ56H.js → chunk-T42ACHFI.js} +1 -1
  99. package/chunks/chunk-T44AF4I6.js +690 -0
  100. package/chunks/{chunk-DBZUXSSV.js → chunk-TMILTLP3.js} +6 -6
  101. package/chunks/{chunk-EEEZIVFJ.js → chunk-TOAUDIS7.js} +1 -1
  102. package/chunks/chunk-UAKXW3DN.js +30 -0
  103. package/chunks/{chunk-VQRYPFCV.js → chunk-V5YJAUHW.js} +10 -460
  104. package/chunks/{chunk-D5E5TMYH.js → chunk-VHRREANT.js} +16 -2
  105. package/chunks/{chunk-5RVSM6NW.js → chunk-VN4CKYUW.js} +1 -1
  106. package/chunks/chunk-VXGPYF7U.js +37 -0
  107. package/chunks/{chunk-UAARVVBI.js → chunk-WGY3GIPP.js} +1 -1
  108. package/chunks/{chunk-GYZQA2FO.js → chunk-WJAY4WXR.js} +1 -1
  109. package/chunks/chunk-XKSCTXPK.js +167 -0
  110. package/chunks/chunk-YCEHOJZJ.js +840 -0
  111. package/chunks/{chunk-BG4BIP7F.js → chunk-YCRTJYSQ.js} +4 -2
  112. package/chunks/{chunk-CGEGHF2C.js → chunk-YPCPZSZB.js} +1 -1
  113. package/chunks/chunk-YTFBURQD.js +313 -0
  114. package/chunks/{chunk-HGNSRCRB.js → chunk-YXK4GPYO.js} +1 -1
  115. package/chunks/{chunk-OQHQHJRK.js → chunk-Z34RYLRO.js} +151 -4775
  116. package/chunks/chunk-ZGSV5ORL.js +11273 -0
  117. package/chunks/{computer-use-6BBRNT6S.js → computer-use-FCNWHVPW.js} +103 -49
  118. package/chunks/{contextCommand-UJAJ6N57.js → contextCommand-FVFMZZEU.js} +26 -25
  119. package/chunks/{cron-create-4KQE6YLH.js → cron-create-IY5NMIHQ.js} +4 -4
  120. package/chunks/{cron-delete-THME66UP.js → cron-delete-OLNEQWKO.js} +6 -6
  121. package/chunks/{cron-list-7A54SJ5N.js → cron-list-YAUAUV24.js} +5 -5
  122. package/chunks/{daemon-status-provider-CSL3BUOY.js → daemon-status-provider-42JEXENZ.js} +32 -32
  123. package/chunks/{de-ACHALDED.js → de-HB5NJXGB.js} +10 -9
  124. package/chunks/{dist-BD27IA3L.js → dist-4FCNM6KJ.js} +2 -2
  125. package/chunks/{dist-OD2FY543.js → dist-K4XZILIO.js} +1 -1
  126. package/chunks/{dist-BOOH5JWN.js → dist-SU6L7ZNJ.js} +114 -9
  127. package/chunks/{dist-QHJRBCMP.js → dist-UKPWQJCL.js} +44 -2
  128. package/chunks/{dist-QFFZWACU.js → dist-VD7HXTML.js} +20 -9
  129. package/chunks/{earlyInputCapture-X6KMCSHD.js → earlyInputCapture-FFFEC6P4.js} +25 -24
  130. package/chunks/{edit-7J6WXARF.js → edit-32ILSGZY.js} +72 -30
  131. package/chunks/{en-NCUBOJOY.js → en-U3LWGSFX.js} +19 -9
  132. package/chunks/{enter-worktree-KULCKJPJ.js → enter-worktree-XWZKIN6A.js} +24 -23
  133. package/chunks/{enterPlanMode-H2CIOLMH.js → enterPlanMode-LPFFY7BJ.js} +24 -23
  134. package/chunks/{errors-6G2JYR54.js → errors-UXBPYPI2.js} +26 -25
  135. package/chunks/{exit-worktree-ECBWBVC5.js → exit-worktree-IBS4UIU7.js} +24 -23
  136. package/chunks/{exitPlanMode-DQV56GTW.js → exitPlanMode-JA72YHII.js} +24 -23
  137. package/chunks/{fast-path-35JJFS3C.js → fast-path-7UU67Y2W.js} +30 -13
  138. package/chunks/{fast-path-settings-TSVI53EB.js → fast-path-settings-UQLRFDQP.js} +3 -2
  139. package/chunks/{fr-GVKZ27MF.js → fr-XY3NQFCM.js} +10 -9
  140. package/chunks/{gemini-NDTG7WAX.js → gemini-GMVKJNMX.js} +211 -105
  141. package/chunks/{geminiContentGenerator-XTG6SFLA.js → geminiContentGenerator-7NIFF2L4.js} +4 -4
  142. package/chunks/{glob-SJ2JBZK4.js → glob-4NJCW5HI.js} +24 -23
  143. package/chunks/{grep-BRMWFEWR.js → grep-PAIMLQEL.js} +24 -23
  144. package/chunks/{initializer-P5AXF7PV.js → initializer-R6KU4VYM.js} +31 -28
  145. package/chunks/{ja-FKZ2WZ4D.js → ja-J7YAG7SA.js} +10 -9
  146. package/chunks/{keychain-token-storage-CSYMNRPP.js → keychain-token-storage-GPAKRDKQ.js} +2 -2
  147. package/chunks/{list-6COK34BP.js → list-H7LXAO64.js} +32 -29
  148. package/chunks/{loadedSettingsAdapter-XIUTN245.js → loadedSettingsAdapter-H27JMTLU.js} +30 -27
  149. package/chunks/{loop-wakeup-33GPXJLA.js → loop-wakeup-Y3OIRQFM.js} +7 -7
  150. package/chunks/{ls-BYQY7RVV.js → ls-TVJEYS7O.js} +4 -4
  151. package/chunks/{lsp-X54RO4IV.js → lsp-JZSDVR3F.js} +2 -2
  152. package/chunks/{monitor-DH7KFSJV.js → monitor-JSIHDPXP.js} +24 -23
  153. package/chunks/nonInteractiveCli-Y4CHOETG.js +100 -0
  154. package/chunks/{notebook-edit-D4R4ZLMA.js → notebook-edit-SHRNL2UM.js} +52 -23
  155. package/chunks/{openaiContentGenerator-F74IPQ6E.js → openaiContentGenerator-ORZZ7VFO.js} +13 -12
  156. package/chunks/{pt-SY5NCFGR.js → pt-6RTAA6SS.js} +10 -9
  157. package/chunks/{qwenContentGenerator-ATTK5P4D.js → qwenContentGenerator-H643PL2G.js} +26 -25
  158. package/chunks/{qwenOAuth2-K4AASPCV.js → qwenOAuth2-OI2B7PES.js} +5 -4
  159. package/chunks/{read-file-767G23OY.js → read-file-5PRNPTTY.js} +8 -8
  160. package/chunks/{read-mcp-resource-I5HCZJ6X.js → read-mcp-resource-QTXGKTEV.js} +2 -2
  161. package/chunks/{ripGrep-4OMMGSWX.js → ripGrep-JIKZMABJ.js} +24 -23
  162. package/chunks/{ru-FWNXJG4F.js → ru-AUBGJ2C4.js} +10 -9
  163. package/chunks/{run-qwen-serve-REKSTYRA.js → run-qwen-serve-PQV7QOHZ.js} +284 -52
  164. package/chunks/{scheduler-UNTFDQLG.js → scheduler-OS3R5MGU.js} +24 -23
  165. package/chunks/{send-message-2DAFXEYP.js → send-message-DKGHWSTF.js} +2 -2
  166. package/chunks/{serve-KZ56QB5S.js → serve-LVYZDKCZ.js} +31 -29
  167. package/chunks/{server-BV5TZUMU.js → server-P4YIH35I.js} +11458 -8447
  168. package/chunks/{session-OIBXFSGD.js → session-DE4TZBKH.js} +195 -58
  169. package/chunks/{settings-WJTCBIRA.js → settings-DFTYMJYF.js} +30 -27
  170. package/chunks/{shell-WC52IBHW.js → shell-3GNQLNV7.js} +24 -23
  171. package/chunks/{skill-U7F7JR4M.js → skill-NCNG4KKZ.js} +38 -11
  172. package/chunks/{spawnChannel-EI2E5BCW.js → spawnChannel-DHRIMDVL.js} +26 -25
  173. package/chunks/{src-4F6FBZFI.js → src-PNZYGM3R.js} +104 -28
  174. package/chunks/{startInteractiveUI-SFRVB3CE.js → startInteractiveUI-P6GZBFQW.js} +2817 -2500
  175. package/chunks/{syntheticOutput-PPS3HDVA.js → syntheticOutput-X7L5HWLN.js} +3 -3
  176. package/chunks/{task-create-OUYCA553.js → task-create-AWEUI4GI.js} +6 -6
  177. package/chunks/{task-list-WAX7I2IA.js → task-list-KZ3VJLDU.js} +5 -5
  178. package/chunks/{task-stop-CAIL6FNH.js → task-stop-GUNOZKJ5.js} +2 -2
  179. package/chunks/{task-update-AHEO5OUT.js → task-update-Y56GP6DU.js} +6 -6
  180. package/chunks/{team-create-3WC7CIIW.js → team-create-6JMW3KQK.js} +24 -23
  181. package/chunks/{team-delete-HGHFG23B.js → team-delete-6AFRGDJY.js} +5 -5
  182. package/chunks/{theme-manager-DICFCT3P.js → theme-manager-FEHQO22G.js} +25 -24
  183. package/chunks/{todoWrite-IFBMN3FH.js → todoWrite-JRS6NOEU.js} +4 -4
  184. package/chunks/{tool-search-L5K7HLER.js → tool-search-IXAEKS7J.js} +101 -16
  185. package/chunks/trustedFolders-SJRXNHZE.js +76 -0
  186. package/chunks/types-QX5C3CHJ.js +12 -0
  187. package/chunks/{validateNonInterActiveAuth-GCH4Z6KI.js → validateNonInterActiveAuth-HCH7OBDH.js} +56 -51
  188. package/chunks/{web-fetch-B5IIQ5TT.js → web-fetch-RELNL37A.js} +29 -15
  189. package/chunks/{workflow-OB3AND7I.js → workflow-M2COBI7R.js} +38 -32
  190. package/chunks/{workspace-providers-status-ZIR5EPOO.js → workspace-providers-status-GOCWYDMK.js} +32 -29
  191. package/chunks/workspace-service-34C7SUBU.js +75 -0
  192. package/chunks/{write-file-SEXBNDZM.js → write-file-E52WRXZL.js} +67 -31
  193. package/chunks/{zh-RBEGQVQT.js → zh-F5T4WWZO.js} +19 -9
  194. package/chunks/{zh-TW-QGAVRXT3.js → zh-TW-LKLBTZHE.js} +19 -9
  195. package/cli-entry.js +20 -9
  196. package/cli.js +6 -6
  197. package/locales/ca.js +15 -13
  198. package/locales/de.js +15 -13
  199. package/locales/en.js +31 -13
  200. package/locales/fr.js +16 -14
  201. package/locales/ja.js +15 -14
  202. package/locales/pt.js +15 -13
  203. package/locales/ru.js +15 -13
  204. package/locales/zh-TW.js +28 -12
  205. package/locales/zh.js +28 -12
  206. package/node_modules/@qwen-code/audio-capture/dist/index.d.ts +35 -0
  207. package/node_modules/@qwen-code/audio-capture/dist/index.js +48 -0
  208. package/node_modules/@qwen-code/audio-capture/dist/index.js.map +1 -0
  209. package/node_modules/@qwen-code/audio-capture/dist/platform.d.ts +7 -0
  210. package/node_modules/@qwen-code/audio-capture/dist/platform.js +18 -0
  211. package/node_modules/@qwen-code/audio-capture/dist/platform.js.map +1 -0
  212. package/node_modules/@qwen-code/audio-capture/node_modules/node-gyp-build/LICENSE +21 -0
  213. package/node_modules/@qwen-code/audio-capture/node_modules/node-gyp-build/README.md +58 -0
  214. package/node_modules/@qwen-code/audio-capture/node_modules/node-gyp-build/SECURITY.md +5 -0
  215. package/node_modules/@qwen-code/audio-capture/node_modules/node-gyp-build/bin.js +84 -0
  216. package/node_modules/@qwen-code/audio-capture/node_modules/node-gyp-build/build-test.js +19 -0
  217. package/node_modules/@qwen-code/audio-capture/node_modules/node-gyp-build/index.js +6 -0
  218. package/node_modules/@qwen-code/audio-capture/node_modules/node-gyp-build/node-gyp-build.js +207 -0
  219. package/node_modules/@qwen-code/audio-capture/node_modules/node-gyp-build/optional.js +7 -0
  220. package/node_modules/@qwen-code/audio-capture/node_modules/node-gyp-build/package.json +43 -0
  221. package/node_modules/@qwen-code/audio-capture/package.json +30 -0
  222. package/node_modules/@qwen-code/audio-capture/prebuilds/darwin-arm64/@qwen-code+audio-capture.node +0 -0
  223. package/node_modules/@qwen-code/audio-capture/prebuilds/darwin-x64/@qwen-code+audio-capture.node +0 -0
  224. package/node_modules/@qwen-code/audio-capture/prebuilds/linux-arm64/@qwen-code+audio-capture.node +0 -0
  225. package/node_modules/@qwen-code/audio-capture/prebuilds/linux-x64/@qwen-code+audio-capture.node +0 -0
  226. package/node_modules/@qwen-code/audio-capture/prebuilds/win32-x64/@qwen-code+audio-capture.node +0 -0
  227. package/package.json +18 -6
  228. package/patches/chrome-devtools-mcp+1.4.0.patch +31 -0
  229. package/postinstall.js +50 -0
  230. package/web-shell/assets/{arc-D_ae_Y9k.js → arc-C2DILvUl.js} +1 -1
  231. package/web-shell/assets/{architectureDiagram-3BPJPVTR-BMLRjppa.js → architectureDiagram-3BPJPVTR-b8gZ2cNw.js} +1 -1
  232. package/web-shell/assets/{blockDiagram-GPEHLZMM-qVDQC8KL.js → blockDiagram-GPEHLZMM-BuRpghMj.js} +1 -1
  233. package/web-shell/assets/{c4Diagram-AAUBKEIU-CxWS6MBd.js → c4Diagram-AAUBKEIU-2ItdhFmE.js} +1 -1
  234. package/web-shell/assets/channel-eRvn2UA3.js +1 -0
  235. package/web-shell/assets/{chunk-2J33WTMH-BtNuY5Yp.js → chunk-2J33WTMH-B1QXa0q3.js} +1 -1
  236. package/web-shell/assets/{chunk-4BX2VUAB-BU-x368d.js → chunk-4BX2VUAB-DXfhKlNq.js} +1 -1
  237. package/web-shell/assets/{chunk-55IACEB6-DRgTLvBu.js → chunk-55IACEB6-ClSNjxLo.js} +1 -1
  238. package/web-shell/assets/{chunk-727SXJPM-D2aElv7q.js → chunk-727SXJPM-Dsh2wisB.js} +1 -1
  239. package/web-shell/assets/{chunk-AQP2D5EJ-BwHCMRQ0.js → chunk-AQP2D5EJ-C1TkY5AR.js} +1 -1
  240. package/web-shell/assets/{chunk-FMBD7UC4-BMyPH-ku.js → chunk-FMBD7UC4-CGtN9XR6.js} +1 -1
  241. package/web-shell/assets/{chunk-ND2GUHAM-BNKTstUf.js → chunk-ND2GUHAM-BHiPi1SS.js} +1 -1
  242. package/web-shell/assets/{chunk-QZHKN3VN-gD3vsFId.js → chunk-QZHKN3VN-CzG3I5o1.js} +1 -1
  243. package/web-shell/assets/classDiagram-4FO5ZUOK-YZNwy1rx.js +1 -0
  244. package/web-shell/assets/classDiagram-v2-Q7XG4LA2-YZNwy1rx.js +1 -0
  245. package/web-shell/assets/{cose-bilkent-S5V4N54A-BG9FAsXE.js → cose-bilkent-S5V4N54A-EgrIoH_K.js} +1 -1
  246. package/web-shell/assets/{dagre-BM42HDAG-Cy1sR7om.js → dagre-BM42HDAG-BUnpdX8S.js} +1 -1
  247. package/web-shell/assets/default-aEtf0G7-.svg +1 -0
  248. package/web-shell/assets/{diagram-2AECGRRQ-Bxi1I_Vu.js → diagram-2AECGRRQ-BlLUCVYu.js} +1 -1
  249. package/web-shell/assets/{diagram-5GNKFQAL-BGCJjO6y.js → diagram-5GNKFQAL-FG-enmjQ.js} +1 -1
  250. package/web-shell/assets/{diagram-KO2AKTUF-CMTeLXp7.js → diagram-KO2AKTUF-BlzmTONk.js} +1 -1
  251. package/web-shell/assets/{diagram-LMA3HP47-BN1wyAGh.js → diagram-LMA3HP47-CoBQ8mIx.js} +1 -1
  252. package/web-shell/assets/{diagram-OG6HWLK6-UYSG_zcp.js → diagram-OG6HWLK6-DvxV6sX8.js} +1 -1
  253. package/web-shell/assets/{erDiagram-TEJ5UH35-DqXL08lw.js → erDiagram-TEJ5UH35-Jq1tpAoj.js} +1 -1
  254. package/web-shell/assets/{flowDiagram-I6XJVG4X-BPJ9SFji.js → flowDiagram-I6XJVG4X-CbtYOry5.js} +1 -1
  255. package/web-shell/assets/{ganttDiagram-6RSMTGT7-BEd9Pnms.js → ganttDiagram-6RSMTGT7-ZEn2VEKR.js} +1 -1
  256. package/web-shell/assets/{gitGraphDiagram-PVQCEYII-DrNRH3oi.js → gitGraphDiagram-PVQCEYII-BZh-LkhJ.js} +1 -1
  257. package/web-shell/assets/index-5FhE0ORO.css +5 -0
  258. package/web-shell/assets/index-CDTGmqVm.js +720 -0
  259. package/web-shell/assets/{infoDiagram-5YYISTIA-CFYBrkVI.js → infoDiagram-5YYISTIA-B9HuZygK.js} +1 -1
  260. package/web-shell/assets/insert-DmRbh9Rv.svg +1 -0
  261. package/web-shell/assets/{ishikawaDiagram-YF4QCWOH-Dxsddth7.js → ishikawaDiagram-YF4QCWOH-D76cNpYG.js} +1 -1
  262. package/web-shell/assets/{journeyDiagram-JHISSGLW-DxaDK80t.js → journeyDiagram-JHISSGLW-6bGo7P1t.js} +1 -1
  263. package/web-shell/assets/{kanban-definition-UN3LZRKU-Q0jQCOct.js → kanban-definition-UN3LZRKU-DuYyRBvB.js} +1 -1
  264. package/web-shell/assets/{linear-DGGM2kcP.js → linear-CpdSW1BC.js} +1 -1
  265. package/web-shell/assets/{mermaid.core-ByoxnWut.js → mermaid.core-s5xbZMMj.js} +5 -5
  266. package/web-shell/assets/{mindmap-definition-RKZ34NQL-C0ZseHsi.js → mindmap-definition-RKZ34NQL-go01fZ2y.js} +1 -1
  267. package/web-shell/assets/{pieDiagram-4H26LBE5-MQXNhl5A.js → pieDiagram-4H26LBE5-BfuZiEHO.js} +1 -1
  268. package/web-shell/assets/{quadrantDiagram-W4KKPZXB-DIR4ee2A.js → quadrantDiagram-W4KKPZXB-DsoINqV6.js} +1 -1
  269. package/web-shell/assets/queue-DWpnpFgW.svg +1 -0
  270. package/web-shell/assets/{requirementDiagram-4Y6WPE33-BTR0UdYQ.js → requirementDiagram-4Y6WPE33-B7FU4LiU.js} +1 -1
  271. package/web-shell/assets/{sankeyDiagram-5OEKKPKP-sfnhMELN.js → sankeyDiagram-5OEKKPKP-BEDjFnGB.js} +1 -1
  272. package/web-shell/assets/{sequenceDiagram-3UESZ5HK-DXczHOHH.js → sequenceDiagram-3UESZ5HK-gzmmL5tK.js} +1 -1
  273. package/web-shell/assets/{stateDiagram-AJRCARHV-DdE_KQFH.js → stateDiagram-AJRCARHV-BtHD4IN_.js} +1 -1
  274. package/web-shell/assets/stateDiagram-v2-BHNVJYJU-DFy6gLDd.js +1 -0
  275. package/web-shell/assets/{timeline-definition-PNZ67QCA-DIc61uE8.js → timeline-definition-PNZ67QCA-T_8gmMCf.js} +1 -1
  276. package/web-shell/assets/{vennDiagram-CIIHVFJN-BF7ODmxB.js → vennDiagram-CIIHVFJN-DdjuqnjO.js} +1 -1
  277. package/web-shell/assets/{wardley-L42UT6IY-3pc1MEaw.js → wardley-L42UT6IY-Cgtrvb37.js} +1 -1
  278. package/web-shell/assets/{wardleyDiagram-YWT4CUSO-9jnPcZuP.js → wardleyDiagram-YWT4CUSO-BW3f3-yW.js} +1 -1
  279. package/web-shell/assets/{xychartDiagram-2RQKCTM6-DcthaZK6.js → xychartDiagram-2RQKCTM6-BUS9IKkc.js} +1 -1
  280. package/web-shell/index.html +2 -2
  281. package/chunks/chunk-B6HQGTYR.js +0 -410
  282. package/chunks/chunk-RKIZXJMB.js +0 -13
  283. package/chunks/headlessSafetyWarnings-LJ6FJX77.js +0 -57
  284. package/chunks/nonInteractiveCli-7575LBXP.js +0 -91
  285. package/chunks/workspace-service-OM5D4OI2.js +0 -60
  286. package/web-shell/assets/channel-DYPNiTww.js +0 -1
  287. package/web-shell/assets/classDiagram-4FO5ZUOK-p_g25Tni.js +0 -1
  288. package/web-shell/assets/classDiagram-v2-Q7XG4LA2-p_g25Tni.js +0 -1
  289. package/web-shell/assets/index-CpOXWDPh.js +0 -714
  290. package/web-shell/assets/index-oVK7qhre.css +0 -5
  291. package/web-shell/assets/stateDiagram-v2-BHNVJYJU-BHUSEndU.js +0 -1
@@ -6,8 +6,10 @@ import {
6
6
  require_proxy_from_env
7
7
  } from "./chunk-J37FGIOA.js";
8
8
  import {
9
- ChannelBase
10
- } from "./chunk-JXQ23SNT.js";
9
+ ChannelBase,
10
+ sanitizeLogText,
11
+ sanitizeSenderName
12
+ } from "./chunk-2JKEQWDZ.js";
11
13
  import "./chunk-7RYW5LQV.js";
12
14
  import "./chunk-UFC57OYT.js";
13
15
  import "./chunk-K5PGHDBN.js";
@@ -36,6 +38,7 @@ import { mkdirSync, writeFileSync } from "node:fs";
36
38
  import { randomUUID } from "node:crypto";
37
39
  import { basename, join } from "node:path";
38
40
  import { tmpdir } from "node:os";
41
+ import { Buffer as Buffer2 } from "node:buffer";
39
42
 
40
43
  // node_modules/dingtalk-stream-sdk-nodejs/dist/index.mjs
41
44
  init_esbuild_shims();
@@ -4485,7 +4488,7 @@ var ACK_REACTION_NAME = "\u{1F440}";
4485
4488
  var ACK_EMOTION_ID = "2659900";
4486
4489
  var ACK_EMOTION_BG_ID = "im_bg_1";
4487
4490
  var EMOTION_API = "https://api.dingtalk.com/v1.0/robot/emotion";
4488
- var DingtalkChannel = class extends ChannelBase {
4491
+ var DingtalkChannel = class _DingtalkChannel extends ChannelBase {
4489
4492
  static {
4490
4493
  __name(this, "DingtalkChannel");
4491
4494
  }
@@ -4503,6 +4506,86 @@ var DingtalkChannel = class extends ChannelBase {
4503
4506
  clientId: config.clientId,
4504
4507
  clientSecret: config.clientSecret
4505
4508
  });
4509
+ this.installStructuredDownstreamHandler();
4510
+ }
4511
+ installStructuredDownstreamHandler() {
4512
+ const client = this.client;
4513
+ client.debug = false;
4514
+ client.onDownStream = (raw) => {
4515
+ this.onDownStream(raw, client);
4516
+ };
4517
+ }
4518
+ onDownStream(raw, client) {
4519
+ const decoded = this.decodeDownStream(raw);
4520
+ let msg;
4521
+ try {
4522
+ const parsed = JSON.parse(decoded.text);
4523
+ if (!parsed || typeof parsed !== "object" || Array.isArray(parsed)) {
4524
+ process.stderr.write(`[DingTalk:${this.name}] downstream parsed to non-object, ignoring.
4525
+ `);
4526
+ return;
4527
+ }
4528
+ msg = parsed;
4529
+ } catch (err) {
4530
+ process.stderr.write(`[DingTalk:${this.name}] Failed to parse downstream: ${sanitizeLogText(String(err), 200)}
4531
+ `);
4532
+ return;
4533
+ }
4534
+ const headers = msg.headers && typeof msg.headers === "object" ? msg.headers : {};
4535
+ const type = typeof msg.type === "string" ? msg.type : "";
4536
+ const topic = typeof headers["topic"] === "string" ? headers["topic"] : "";
4537
+ const messageId = typeof headers["messageId"] === "string" ? headers["messageId"] : "";
4538
+ process.stderr.write(`[DingTalk:${this.name}] downstream type=${sanitizeLogText(type, 40)} topic=${sanitizeLogText(topic, 80)} messageId=${sanitizeLogText(messageId, 80)} bytes=${decoded.bytes}
4539
+ `);
4540
+ if ((type === "CALLBACK" || type === "EVENT") && (!topic || !messageId)) {
4541
+ process.stderr.write(`[DingTalk:${this.name}] Ignoring downstream with invalid routing headers.
4542
+ `);
4543
+ return;
4544
+ }
4545
+ const normalizedMsg = {
4546
+ ...msg,
4547
+ headers: { ...headers, topic, messageId }
4548
+ };
4549
+ switch (type) {
4550
+ case "SYSTEM":
4551
+ this.callDownStreamHandler(client, "onSystem", normalizedMsg);
4552
+ break;
4553
+ case "EVENT":
4554
+ this.callDownStreamHandler(client, "onEvent", normalizedMsg);
4555
+ break;
4556
+ case "CALLBACK":
4557
+ this.callDownStreamHandler(client, "onCallback", normalizedMsg);
4558
+ break;
4559
+ default:
4560
+ process.stderr.write(`[DingTalk:${this.name}] Ignoring downstream type ${sanitizeLogText(type || "unknown", 40)}.
4561
+ `);
4562
+ }
4563
+ }
4564
+ callDownStreamHandler(client, method, msg) {
4565
+ try {
4566
+ client[method](msg);
4567
+ } catch (err) {
4568
+ process.stderr.write(`[DingTalk:${this.name}] ${method} failed: ${sanitizeLogText(String(err), 200)}
4569
+ `);
4570
+ }
4571
+ }
4572
+ decodeDownStream(raw) {
4573
+ if (typeof raw === "string") {
4574
+ return { text: raw, bytes: Buffer2.byteLength(raw) };
4575
+ }
4576
+ if (Buffer2.isBuffer(raw)) {
4577
+ return { text: raw.toString("utf8"), bytes: raw.length };
4578
+ }
4579
+ if (raw instanceof Uint8Array) {
4580
+ return { text: Buffer2.from(raw).toString("utf8"), bytes: raw.byteLength };
4581
+ }
4582
+ if (raw instanceof ArrayBuffer) {
4583
+ return {
4584
+ text: Buffer2.from(raw).toString("utf8"),
4585
+ bytes: raw.byteLength
4586
+ };
4587
+ }
4588
+ return { text: String(raw), bytes: Buffer2.byteLength(String(raw)) };
4506
4589
  }
4507
4590
  async connect() {
4508
4591
  this.client.registerCallbackListener(TOPIC_ROBOT, (msg) => {
@@ -4524,6 +4607,14 @@ var DingtalkChannel = class extends ChannelBase {
4524
4607
  process.stderr.write(`[DingTalk:${this.name}] Connected via stream.
4525
4608
  `);
4526
4609
  }
4610
+ /**
4611
+ * A group message with no conversationId can't be routed to a stable shared
4612
+ * session (chatId would fall back to the expiring sessionWebhook), so it is
4613
+ * dropped on ingestion. Exposed for testing the drop rule.
4614
+ */
4615
+ static isUnroutableGroupMessage(isGroup, conversationId) {
4616
+ return isGroup && !conversationId;
4617
+ }
4527
4618
  async sendMessage(chatId, text) {
4528
4619
  const webhook = this.webhooks.get(chatId);
4529
4620
  if (!webhook) {
@@ -4798,7 +4889,9 @@ var DingtalkChannel = class extends ChannelBase {
4798
4889
  onMessage(downstream) {
4799
4890
  try {
4800
4891
  const data = typeof downstream.data === "string" ? JSON.parse(downstream.data) : downstream.data;
4801
- const msgId = data.msgId || downstream.headers.messageId;
4892
+ const dataMsgId = typeof data.msgId === "string" ? data.msgId : void 0;
4893
+ const headerMsgId = typeof downstream.headers.messageId === "string" ? downstream.headers.messageId : void 0;
4894
+ const msgId = dataMsgId || headerMsgId;
4802
4895
  if (msgId && this.seenMessages.has(msgId)) {
4803
4896
  return;
4804
4897
  }
@@ -4806,17 +4899,27 @@ var DingtalkChannel = class extends ChannelBase {
4806
4899
  this.seenMessages.set(msgId, Date.now());
4807
4900
  }
4808
4901
  const isGroup = data.conversationType === "2";
4809
- const sessionWebhook = data.sessionWebhook;
4810
- const conversationId = data.conversationId;
4902
+ const sessionWebhook = typeof data.sessionWebhook === "string" ? data.sessionWebhook : void 0;
4903
+ const conversationId = typeof data.conversationId === "string" ? data.conversationId : void 0;
4904
+ const isMentioned = Boolean(data.isInAtList);
4905
+ const senderNick = typeof data.senderNick === "string" ? data.senderNick : void 0;
4906
+ const senderStaffId = typeof data.senderStaffId === "string" ? data.senderStaffId : void 0;
4907
+ const senderIdValue = typeof data.senderId === "string" ? data.senderId : void 0;
4811
4908
  if (!sessionWebhook) {
4812
4909
  process.stderr.write(`[DingTalk:${this.name}] No sessionWebhook in message, skipping.
4910
+ `);
4911
+ return;
4912
+ }
4913
+ if (_DingtalkChannel.isUnroutableGroupMessage(isGroup, conversationId)) {
4914
+ process.stderr.write(`[DingTalk:${this.name}] Group message has no conversationId, skipping (msgId=${msgId || "unknown"}, sender=${sanitizeSenderName(senderNick || senderStaffId || "unknown")})
4813
4915
  `);
4814
4916
  return;
4815
4917
  }
4816
4918
  if (conversationId) {
4817
4919
  this.webhooks.set(conversationId, sessionWebhook);
4818
4920
  }
4819
- const isMentioned = Boolean(data.isInAtList);
4921
+ process.stderr.write(`[DingTalk:${this.name}] message msgId=${sanitizeLogText(msgId || "unknown", 80)} conversationId=${sanitizeLogText(conversationId || "", 120)} isGroup=${isGroup} isMentioned=${isMentioned} senderNick=${sanitizeLogText(senderNick || "", 80)} senderStaffId=${sanitizeLogText(senderStaffId || "", 80)} senderId=${sanitizeLogText(senderIdValue || "", 80)}
4922
+ `);
4820
4923
  const content = this.extractContent(data);
4821
4924
  let cleanText = content.text;
4822
4925
  if (isMentioned) {
@@ -4825,10 +4928,12 @@ var DingtalkChannel = class extends ChannelBase {
4825
4928
  const quoted = this.extractQuotedContext(data);
4826
4929
  const chatId = conversationId || sessionWebhook;
4827
4930
  const envelopeText = isMentioned ? cleanText : cleanText || content.text;
4931
+ const senderId = senderStaffId || senderIdValue || "";
4932
+ const senderName = senderNick || senderId || "Unknown";
4828
4933
  const envelope = {
4829
4934
  channelName: this.name,
4830
- senderId: data.senderStaffId || data.senderId || "",
4831
- senderName: data.senderNick || "Unknown",
4935
+ senderId,
4936
+ senderName,
4832
4937
  chatId,
4833
4938
  text: envelopeText,
4834
4939
  isGroup,
@@ -2,7 +2,7 @@
2
2
  "use strict";
3
3
  import {
4
4
  ChannelBase
5
- } from "./chunk-JXQ23SNT.js";
5
+ } from "./chunk-2JKEQWDZ.js";
6
6
  import "./chunk-UFC57OYT.js";
7
7
  import "./chunk-K5PGHDBN.js";
8
8
  import {
@@ -9658,6 +9658,21 @@ function splitHtmlForTelegram(text) {
9658
9658
  __name(splitHtmlForTelegram, "splitHtmlForTelegram");
9659
9659
 
9660
9660
  // packages/channels/telegram/dist/TelegramAdapter.js
9661
+ var TELEGRAM_BOT_COMMANDS = [
9662
+ { command: "start", description: "Show quick-start help" },
9663
+ { command: "help", description: "Show available commands" },
9664
+ { command: "new", description: "Start a fresh conversation" },
9665
+ { command: "cancel", description: "Cancel the running request" },
9666
+ { command: "status", description: "Show session info" }
9667
+ ];
9668
+ var TELEGRAM_START_MESSAGE = [
9669
+ "Qwen Code Telegram bot",
9670
+ "",
9671
+ "Send any message to chat with Qwen Code.",
9672
+ "Use /new to start a fresh conversation.",
9673
+ "Use /cancel to stop a running request.",
9674
+ "Use /help to see available commands."
9675
+ ].join("\n");
9661
9676
  var TelegramChannel = class extends ChannelBase {
9662
9677
  static {
9663
9678
  __name(this, "TelegramChannel");
@@ -9673,6 +9688,11 @@ var TelegramChannel = class extends ChannelBase {
9673
9688
  }
9674
9689
  } : void 0;
9675
9690
  this.bot = new import_grammy.Bot(config.token, botConfig);
9691
+ this.registerCommand("start", async (envelope) => {
9692
+ await this.sendMessage(envelope.chatId, TELEGRAM_START_MESSAGE);
9693
+ return true;
9694
+ });
9695
+ this.registerCancelCommand();
9676
9696
  }
9677
9697
  getFileUrl(filePath) {
9678
9698
  return `https://api.telegram.org/file/bot${this.bot.token}/${filePath}`;
@@ -9681,6 +9701,7 @@ var TelegramChannel = class extends ChannelBase {
9681
9701
  const botInfo = await this.bot.api.getMe();
9682
9702
  this.botId = botInfo.id;
9683
9703
  this.botUsername = botInfo.username ?? "";
9704
+ await this.registerBotCommands();
9684
9705
  this.bot.on("message:text", async (ctx) => {
9685
9706
  const msg = ctx.message;
9686
9707
  const text = msg.text;
@@ -9803,6 +9824,14 @@ var TelegramChannel = class extends ChannelBase {
9803
9824
  process.once("SIGINT", () => this.bot.stop());
9804
9825
  process.once("SIGTERM", () => this.bot.stop());
9805
9826
  }
9827
+ async registerBotCommands() {
9828
+ try {
9829
+ await this.bot.api.setMyCommands(TELEGRAM_BOT_COMMANDS);
9830
+ } catch (err) {
9831
+ process.stderr.write(`[Telegram:${this.name}] Failed to register bot commands: ${err instanceof Error ? err.message : err}
9832
+ `);
9833
+ }
9834
+ }
9806
9835
  /** Per-chat typing interval — repeats every 4s since Telegram expires it after 5s. */
9807
9836
  typingIntervals = /* @__PURE__ */ new Map();
9808
9837
  onPromptStart(chatId) {
@@ -9843,7 +9872,20 @@ var TelegramChannel = class extends ChannelBase {
9843
9872
  }
9844
9873
  buildEnvelope(msg, text, entities) {
9845
9874
  const isGroup = msg.chat.type === "group" || msg.chat.type === "supergroup";
9846
- const isMentioned = entities?.some((e) => e.type === "mention" && this.botUsername && text.slice(e.offset, e.offset + e.length).toLowerCase() === `@${this.botUsername.toLowerCase()}`) ?? false;
9875
+ const isMentioned = entities?.some((e) => {
9876
+ if (!this.botUsername)
9877
+ return false;
9878
+ const value = text.slice(e.offset, e.offset + e.length).toLowerCase();
9879
+ const username = this.botUsername.toLowerCase();
9880
+ if (e.type === "mention") {
9881
+ return value === `@${username}`;
9882
+ }
9883
+ if (e.type === "bot_command") {
9884
+ const mentionIndex = value.indexOf("@");
9885
+ return mentionIndex !== -1 && value.slice(mentionIndex + 1) === username;
9886
+ }
9887
+ return false;
9888
+ }) ?? false;
9847
9889
  const isReplyToBot = msg.reply_to_message?.from?.id === this.botId;
9848
9890
  let cleanText = text;
9849
9891
  if (isMentioned && this.botUsername) {
@@ -3,8 +3,11 @@
3
3
  import {
4
4
  ChannelBase,
5
5
  SessionRouter,
6
- getGlobalQwenDir
7
- } from "./chunk-JXQ23SNT.js";
6
+ getGlobalQwenDir,
7
+ sanitizeLogText,
8
+ sanitizePromptText,
9
+ sanitizeSenderName
10
+ } from "./chunk-2JKEQWDZ.js";
8
11
  import "./chunk-UFC57OYT.js";
9
12
  import "./chunk-K5PGHDBN.js";
10
13
  import {
@@ -1483,7 +1486,11 @@ var QQChannel = class extends ChannelBase {
1483
1486
  const sessionsPath = join2(stateDir, `${safeName}-sessions.json`);
1484
1487
  const hasExternalRouter = Boolean(options?.router);
1485
1488
  const router = options?.router ?? new SessionRouter(bridge, config.cwd, config.sessionScope, sessionsPath);
1486
- super(name, config, bridge, { ...options, router });
1489
+ super(name, config, bridge, {
1490
+ ...options,
1491
+ router,
1492
+ registerBridgeEvents: options?.registerBridgeEvents ?? !hasExternalRouter
1493
+ });
1487
1494
  this.qqConfig = config;
1488
1495
  this.qqStatePath = join2(stateDir, `${safeName}-state.json`);
1489
1496
  this.globalSessionsPath = hasExternalRouter ? join2(stateDir, "sessions.json") : sessionsPath;
@@ -1696,15 +1703,16 @@ var QQChannel = class extends ChannelBase {
1696
1703
  }
1697
1704
  }
1698
1705
  /**
1699
- * Workaround for SessionRouter.restoreSessions() storing undefined sessionIds
1700
- * when ACP bridge.loadSession() fails to return a session_id.
1706
+ * Compatibility repair for legacy restored session state where older router
1707
+ * code could keep an empty session id after bridge.loadSession() failed to
1708
+ * return a session_id.
1701
1709
  *
1702
1710
  * **Fragile**: accesses SessionRouter's private `toSession`/`toTarget`/`toCwd`
1703
1711
  * maps via type coercion. If SessionRouter internals change, this breaks
1704
1712
  * silently. The only signal will be cross-server conversations failing to
1705
1713
  * restore after daemon restart — no crash, no log.
1706
1714
  *
1707
- * If upstream SessionRouter adds a public fix for this, remove this method.
1715
+ * Keep this while old persisted files may still exist.
1708
1716
  */
1709
1717
  fixRestoredSessions() {
1710
1718
  try {
@@ -2095,11 +2103,13 @@ var QQChannel = class extends ChannelBase {
2095
2103
  if (!cleanText)
2096
2104
  return;
2097
2105
  const isSlash = cleanText.startsWith("/");
2106
+ const safeName = sanitizeSenderName(senderName);
2098
2107
  if (isSlash) {
2099
- process.stderr.write(`[QQ:${this.name}] Slash cmd from ${senderName} (${chatId}): ${cleanText}
2108
+ const loggedCmd = sanitizeLogText(cleanText, 80);
2109
+ process.stderr.write(`[QQ:${this.name}] Slash cmd from ${safeName} (${chatId}): ${loggedCmd}
2100
2110
  `);
2101
2111
  }
2102
- const text = isSlash ? cleanText : `[${senderName}]: ${cleanText}`;
2112
+ const text = isSlash ? cleanText : `[${safeName}]: ${sanitizePromptText(cleanText)}`;
2103
2113
  this.handleInbound({
2104
2114
  channelName: this.name,
2105
2115
  senderId: event.author.user_openid || event.author.id,
@@ -2111,7 +2121,8 @@ var QQChannel = class extends ChannelBase {
2111
2121
  isMentioned: true,
2112
2122
  // QQ Bot only receives group messages when explicitly @mentioned, so
2113
2123
  // every group message is semantically a reply to the bot.
2114
- isReplyToBot: true
2124
+ isReplyToBot: true,
2125
+ ...isSlash ? {} : { alreadyPrefixed: true }
2115
2126
  }).catch((e) => process.stderr.write(`[QQ:${this.name}] Group handler error: ${e}
2116
2127
  `));
2117
2128
  }
@@ -7,48 +7,49 @@ import {
7
7
  startEarlyInputCapture,
8
8
  stopAndGetCapturedInput,
9
9
  stopEarlyInputCapture
10
- } from "./chunk-X6EDWN44.js";
11
- import "./chunk-PXFFKNCO.js";
10
+ } from "./chunk-LWGLBVWA.js";
11
+ import "./chunk-35FH347N.js";
12
12
  import "./chunk-K5PGHDBN.js";
13
13
  import "./chunk-5P5XGNYH.js";
14
14
  import "./chunk-SKAZWEV5.js";
15
- import "./chunk-TXVGVZYR.js";
16
- import "./chunk-XU5P23GN.js";
17
- import "./chunk-2BIF2NVV.js";
18
- import "./chunk-BG4BIP7F.js";
19
- import "./chunk-ZD3NW5KL.js";
15
+ import "./chunk-ESVSWG6Z.js";
16
+ import "./chunk-CA4ML3VH.js";
17
+ import "./chunk-HWG4XLD7.js";
18
+ import "./chunk-YCRTJYSQ.js";
19
+ import "./chunk-FZY7NH37.js";
20
20
  import "./chunk-2MPVVENX.js";
21
21
  import "./chunk-ZTQ26VBE.js";
22
- import "./chunk-GZCJS5WH.js";
22
+ import "./chunk-SJBIFVD2.js";
23
23
  import "./chunk-MLZQVCF3.js";
24
24
  import "./chunk-LQ7TMOCE.js";
25
25
  import "./chunk-LD2XBG6Z.js";
26
- import "./chunk-OTBK43JR.js";
27
- import "./chunk-HGNSRCRB.js";
28
- import "./chunk-EEEZIVFJ.js";
29
- import "./chunk-PRYMDRBV.js";
30
- import "./chunk-WA5OJGFL.js";
26
+ import "./chunk-B236XPGF.js";
27
+ import "./chunk-YXK4GPYO.js";
28
+ import "./chunk-TOAUDIS7.js";
29
+ import "./chunk-NPQWQYU6.js";
30
+ import "./chunk-B5MPZI4K.js";
31
31
  import "./chunk-3PJXIDKI.js";
32
32
  import "./chunk-UWCTAVOD.js";
33
33
  import "./chunk-OFEVLU4C.js";
34
34
  import "./chunk-OMX7CUOE.js";
35
- import "./chunk-BNXANYLH.js";
36
- import "./chunk-T2VDEFUU.js";
37
- import "./chunk-OIC6S73E.js";
38
- import "./chunk-TOEGRAVX.js";
39
- import "./chunk-BGUDAULQ.js";
40
- import "./chunk-EW6C27XX.js";
35
+ import "./chunk-MOUXUCXQ.js";
36
+ import "./chunk-BZHLWC6T.js";
37
+ import "./chunk-E5I6YSNO.js";
38
+ import "./chunk-JV7A66DR.js";
39
+ import "./chunk-LXGWLOCM.js";
40
+ import "./chunk-QHHNFG22.js";
41
41
  import "./chunk-22IFUCVR.js";
42
- import "./chunk-64WXLC72.js";
43
- import "./chunk-3UALQ56H.js";
44
- import "./chunk-F6XNTYNE.js";
45
- import "./chunk-CGEGHF2C.js";
42
+ import "./chunk-T42ACHFI.js";
43
+ import "./chunk-YTFBURQD.js";
44
+ import "./chunk-YPCPZSZB.js";
46
45
  import "./chunk-IRJWHZWU.js";
47
46
  import "./chunk-SYCJMSIJ.js";
48
47
  import "./chunk-55ZMG67I.js";
49
48
  import "./chunk-H6BD2ELD.js";
50
49
  import "./chunk-5IFG2VC4.js";
51
- import "./chunk-C4K3FEQ2.js";
50
+ import "./chunk-64WXLC72.js";
51
+ import "./chunk-FQDMX5IL.js";
52
+ import "./chunk-AVQDCKNF.js";
52
53
  import "./chunk-ZERZSAZL.js";
53
54
  import "./chunk-QN5NZ3UQ.js";
54
55
  import "./chunk-BR4QREVK.js";
@@ -1,5 +1,8 @@
1
1
  // Force strict mode and setup for ESM
2
2
  "use strict";
3
+ import {
4
+ checkTeamMemorySecrets
5
+ } from "./chunk-XKSCTXPK.js";
3
6
  import {
4
7
  CommitAttributionService,
5
8
  DEFAULT_DIFF_OPTIONS,
@@ -11,25 +14,25 @@ import {
11
14
  getDiffStat,
12
15
  needsUtf8Bom,
13
16
  safeLiteralReplace
14
- } from "./chunk-PXFFKNCO.js";
17
+ } from "./chunk-35FH347N.js";
15
18
  import "./chunk-K5PGHDBN.js";
16
19
  import "./chunk-5P5XGNYH.js";
17
20
  import "./chunk-SKAZWEV5.js";
18
- import "./chunk-TXVGVZYR.js";
19
- import "./chunk-XU5P23GN.js";
20
- import "./chunk-2BIF2NVV.js";
21
- import "./chunk-BG4BIP7F.js";
22
- import "./chunk-ZD3NW5KL.js";
21
+ import "./chunk-ESVSWG6Z.js";
22
+ import "./chunk-CA4ML3VH.js";
23
+ import "./chunk-HWG4XLD7.js";
24
+ import "./chunk-YCRTJYSQ.js";
25
+ import "./chunk-FZY7NH37.js";
23
26
  import "./chunk-2MPVVENX.js";
24
27
  import "./chunk-ZTQ26VBE.js";
25
- import "./chunk-GZCJS5WH.js";
28
+ import "./chunk-SJBIFVD2.js";
26
29
  import "./chunk-MLZQVCF3.js";
27
30
  import "./chunk-LQ7TMOCE.js";
28
31
  import "./chunk-LD2XBG6Z.js";
29
- import "./chunk-OTBK43JR.js";
30
- import "./chunk-HGNSRCRB.js";
31
- import "./chunk-EEEZIVFJ.js";
32
- import "./chunk-PRYMDRBV.js";
32
+ import "./chunk-B236XPGF.js";
33
+ import "./chunk-YXK4GPYO.js";
34
+ import "./chunk-TOAUDIS7.js";
35
+ import "./chunk-NPQWQYU6.js";
33
36
  import {
34
37
  FileOperationEvent,
35
38
  ReadFileTool,
@@ -37,40 +40,43 @@ import {
37
40
  getLanguageFromFilePath,
38
41
  getSpecificMimeType,
39
42
  logFileOperation
40
- } from "./chunk-WA5OJGFL.js";
43
+ } from "./chunk-B5MPZI4K.js";
41
44
  import "./chunk-3PJXIDKI.js";
42
45
  import "./chunk-UWCTAVOD.js";
43
46
  import "./chunk-OFEVLU4C.js";
44
47
  import "./chunk-OMX7CUOE.js";
45
48
  import {
46
- isAnyAutoMemPath
47
- } from "./chunk-BNXANYLH.js";
48
- import "./chunk-T2VDEFUU.js";
49
- import "./chunk-OIC6S73E.js";
49
+ isAnyAutoMemPath,
50
+ isTeamAutoMemPath
51
+ } from "./chunk-MOUXUCXQ.js";
52
+ import "./chunk-BZHLWC6T.js";
53
+ import "./chunk-E5I6YSNO.js";
50
54
  import {
51
55
  BaseDeclarativeTool,
52
56
  ToolDisplayNames,
53
57
  ToolNames
54
- } from "./chunk-TOEGRAVX.js";
55
- import "./chunk-BGUDAULQ.js";
56
- import "./chunk-EW6C27XX.js";
58
+ } from "./chunk-JV7A66DR.js";
59
+ import "./chunk-LXGWLOCM.js";
60
+ import "./chunk-QHHNFG22.js";
57
61
  import "./chunk-22IFUCVR.js";
58
- import "./chunk-64WXLC72.js";
59
- import "./chunk-3UALQ56H.js";
60
- import "./chunk-F6XNTYNE.js";
61
- import "./chunk-CGEGHF2C.js";
62
+ import "./chunk-T42ACHFI.js";
63
+ import "./chunk-YTFBURQD.js";
64
+ import "./chunk-YPCPZSZB.js";
62
65
  import "./chunk-IRJWHZWU.js";
63
66
  import "./chunk-SYCJMSIJ.js";
64
67
  import "./chunk-55ZMG67I.js";
65
68
  import "./chunk-H6BD2ELD.js";
66
69
  import "./chunk-5IFG2VC4.js";
70
+ import "./chunk-64WXLC72.js";
71
+ import "./chunk-FQDMX5IL.js";
67
72
  import {
68
73
  createDebugLogger,
74
+ getErrorMessage,
69
75
  isNodeError,
70
76
  makeRelative,
71
77
  shortenPath,
72
78
  unescapePath
73
- } from "./chunk-C4K3FEQ2.js";
79
+ } from "./chunk-AVQDCKNF.js";
74
80
  import "./chunk-ZERZSAZL.js";
75
81
  import "./chunk-QN5NZ3UQ.js";
76
82
  import "./chunk-BR4QREVK.js";
@@ -565,6 +571,26 @@ var EditToolInvocation = class {
565
571
  type: "edit_no_change" /* EDIT_NO_CHANGE */
566
572
  };
567
573
  }
574
+ if (!error) {
575
+ const teamMemoryError = checkTeamMemorySecrets(
576
+ params.file_path,
577
+ newContent,
578
+ this.config.getProjectRoot()
579
+ );
580
+ if (teamMemoryError) {
581
+ const preExisting = currentContent !== null && checkTeamMemorySecrets(
582
+ params.file_path,
583
+ currentContent,
584
+ this.config.getProjectRoot()
585
+ ) !== null;
586
+ const message = preExisting ? `${teamMemoryError} Note: the secret already exists in the current file content, so removing it from your edit alone is not enough \u2014 delete the committed secret from the file.` : teamMemoryError;
587
+ error = {
588
+ display: message,
589
+ raw: message,
590
+ type: "invalid_tool_params" /* INVALID_TOOL_PARAMS */
591
+ };
592
+ }
593
+ }
568
594
  return {
569
595
  currentContent,
570
596
  newContent,
@@ -577,12 +603,20 @@ var EditToolInvocation = class {
577
603
  };
578
604
  }
579
605
  /**
580
- * Edit operations always need user confirmation, except for managed
581
- * auto-memory files which are written autonomously by the model.
606
+ * Edit operations always need user confirmation, except for the private
607
+ * managed auto-memory files (user/project) which are written autonomously.
608
+ * Team memory is shared and committed to the repo, so it is NOT auto-allowed
609
+ * like the private tiers — edits default to 'ask'. (In AUTO_EDIT/YOLO the user
610
+ * has globally opted into auto-approval; team writes still surface in the git
611
+ * diff for review before commit.)
582
612
  */
583
613
  async getDefaultPermission() {
584
614
  const projectRoot = this.config.getProjectRoot();
585
- if (isAnyAutoMemPath(path.resolve(this.params.file_path), projectRoot)) {
615
+ const filePath = path.resolve(this.params.file_path);
616
+ if (isTeamAutoMemPath(filePath, projectRoot)) {
617
+ return "ask";
618
+ }
619
+ if (isAnyAutoMemPath(filePath, projectRoot)) {
586
620
  return "allow";
587
621
  }
588
622
  return "ask";
@@ -598,7 +632,7 @@ var EditToolInvocation = class {
598
632
  if (abortSignal.aborted) {
599
633
  throw error;
600
634
  }
601
- const errorMsg = error instanceof Error ? error.message : String(error);
635
+ const errorMsg = getErrorMessage(error);
602
636
  throw new Error(`Error preparing edit: ${errorMsg}`);
603
637
  }
604
638
  if (editData.error) {
@@ -655,7 +689,7 @@ var EditToolInvocation = class {
655
689
  if (signal.aborted) {
656
690
  throw error;
657
691
  }
658
- const errorMsg = error instanceof Error ? error.message : String(error);
692
+ const errorMsg = getErrorMessage(error);
659
693
  return {
660
694
  llmContent: `Error preparing edit: ${errorMsg}`,
661
695
  returnDisplay: `Error preparing edit: ${errorMsg}`,
@@ -809,7 +843,7 @@ ${snippetResult.content}`;
809
843
  returnDisplay: displayResult
810
844
  };
811
845
  } catch (error) {
812
- const errorMsg = error instanceof Error ? error.message : String(error);
846
+ const errorMsg = getErrorMessage(error);
813
847
  return {
814
848
  llmContent: `Error executing edit: ${errorMsg}`,
815
849
  returnDisplay: `Error writing file: ${errorMsg}`,
@@ -889,6 +923,14 @@ Expectation for required parameters:
889
923
  if (!path.isAbsolute(params.file_path)) {
890
924
  return `File path must be absolute: ${params.file_path}`;
891
925
  }
926
+ const teamMemoryError = checkTeamMemorySecrets(
927
+ params.file_path,
928
+ params.new_string ?? "",
929
+ this.config.getProjectRoot()
930
+ );
931
+ if (teamMemoryError) {
932
+ return teamMemoryError;
933
+ }
892
934
  return null;
893
935
  }
894
936
  createInvocation(params) {