@botharness/im-provider 4.32.0-botharness.3

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 (412) hide show
  1. package/LICENSE +21 -0
  2. package/PROVENANCE.json +25 -0
  3. package/README.en.md +445 -0
  4. package/README.md +448 -0
  5. package/THIRD_PARTY_NOTICES.md +93 -0
  6. package/assets/dingtalk-menu-template.json +6 -0
  7. package/assets/logo-dsh-im-chinese-readme-3x2.png +0 -0
  8. package/assets/logo-dsh-im-connecting-readme-3x2.png +0 -0
  9. package/assets/logo-dsh-im-connecting-square-v4.png +0 -0
  10. package/assets/logo-icon.png +0 -0
  11. package/assets/logo-plugin-message-link-gradient.webp +0 -0
  12. package/assets/logo-plugin-phone.png +0 -0
  13. package/assets/logo.png +0 -0
  14. package/assets/logo_cn.png +0 -0
  15. package/assets/screenshot-menu-card.png +0 -0
  16. package/cordis.patch.yml +3 -0
  17. package/lib/client.js +20330 -0
  18. package/lib/index.js +602 -0
  19. package/locale/en.json +5 -0
  20. package/locale/zh.json +5 -0
  21. package/package.json +181 -0
  22. package/plugin-src/client/access-policy-settings.js +362 -0
  23. package/plugin-src/client/agent-preset.js +119 -0
  24. package/plugin-src/client/bot-alias.js +169 -0
  25. package/plugin-src/client/build.mjs +38 -0
  26. package/plugin-src/client/channel-card-meta.js +132 -0
  27. package/plugin-src/client/channel-logos.js +190 -0
  28. package/plugin-src/client/channels/dingtalk/api.js +267 -0
  29. package/plugin-src/client/channels/dingtalk/index.js +954 -0
  30. package/plugin-src/client/channels/dingtalk/styles.js +136 -0
  31. package/plugin-src/client/channels/discord/api.js +11 -0
  32. package/plugin-src/client/channels/discord/index.js +25 -0
  33. package/plugin-src/client/channels/discord/styles.js +19 -0
  34. package/plugin-src/client/channels/email/api.js +52 -0
  35. package/plugin-src/client/channels/email/index.js +728 -0
  36. package/plugin-src/client/channels/email/styles.js +51 -0
  37. package/plugin-src/client/channels/feishu/api.js +405 -0
  38. package/plugin-src/client/channels/feishu/group-settings.js +581 -0
  39. package/plugin-src/client/channels/feishu/index.js +1583 -0
  40. package/plugin-src/client/channels/feishu/slash-panel-settings.js +322 -0
  41. package/plugin-src/client/channels/feishu/styles.js +573 -0
  42. package/plugin-src/client/channels/feishu/voice-editor.js +115 -0
  43. package/plugin-src/client/channels/feishu/voice-settings.js +71 -0
  44. package/plugin-src/client/channels/imessage/api.js +12 -0
  45. package/plugin-src/client/channels/imessage/index.js +46 -0
  46. package/plugin-src/client/channels/imessage/styles.js +19 -0
  47. package/plugin-src/client/channels/matrix/api.js +11 -0
  48. package/plugin-src/client/channels/matrix/index.js +151 -0
  49. package/plugin-src/client/channels/matrix/styles.js +36 -0
  50. package/plugin-src/client/channels/office/api.js +46 -0
  51. package/plugin-src/client/channels/office/index.js +153 -0
  52. package/plugin-src/client/channels/office/styles.js +50 -0
  53. package/plugin-src/client/channels/qq/api.js +171 -0
  54. package/plugin-src/client/channels/qq/index.js +593 -0
  55. package/plugin-src/client/channels/qq/styles.js +19 -0
  56. package/plugin-src/client/channels/shared/collapsible-account.js +103 -0
  57. package/plugin-src/client/channels/shared/token-api.js +124 -0
  58. package/plugin-src/client/channels/shared/token-channel.js +495 -0
  59. package/plugin-src/client/channels/slack/api.js +11 -0
  60. package/plugin-src/client/channels/slack/index.js +131 -0
  61. package/plugin-src/client/channels/slack/styles.js +34 -0
  62. package/plugin-src/client/channels/telegram/api.js +11 -0
  63. package/plugin-src/client/channels/telegram/index.js +28 -0
  64. package/plugin-src/client/channels/telegram/styles.js +31 -0
  65. package/plugin-src/client/channels/telegram/thinking-traces.js +25 -0
  66. package/plugin-src/client/channels/wecom/api.js +160 -0
  67. package/plugin-src/client/channels/wecom/index.js +625 -0
  68. package/plugin-src/client/channels/wecom/styles.js +19 -0
  69. package/plugin-src/client/channels/wecom-app/api.js +132 -0
  70. package/plugin-src/client/channels/wecom-app/index.js +634 -0
  71. package/plugin-src/client/channels/wecom-app/styles.js +25 -0
  72. package/plugin-src/client/channels/weixin/api.js +211 -0
  73. package/plugin-src/client/channels/weixin/connection-error.js +1 -0
  74. package/plugin-src/client/channels/weixin/index.js +801 -0
  75. package/plugin-src/client/channels/weixin/styles.js +115 -0
  76. package/plugin-src/client/channels/whatsapp/api.js +152 -0
  77. package/plugin-src/client/channels/whatsapp/index.js +609 -0
  78. package/plugin-src/client/channels/whatsapp/styles.js +19 -0
  79. package/plugin-src/client/connection-error.js +87 -0
  80. package/plugin-src/client/context-enhancement.js +415 -0
  81. package/plugin-src/client/credential-binding.js +118 -0
  82. package/plugin-src/client/delivery-settings.js +905 -0
  83. package/plugin-src/client/global-settings.js +433 -0
  84. package/plugin-src/client/i18n.js +1314 -0
  85. package/plugin-src/client/index.js +624 -0
  86. package/plugin-src/client/interface-language.js +89 -0
  87. package/plugin-src/client/last-message-error.js +18 -0
  88. package/plugin-src/client/lifecycle.js +86 -0
  89. package/plugin-src/client/loopback-recovery.js +75 -0
  90. package/plugin-src/client/model-setting.js +172 -0
  91. package/plugin-src/client/panel-error-boundary.js +21 -0
  92. package/plugin-src/client/plugin-page.js +51 -0
  93. package/plugin-src/client/session-channel-logos.js +243 -0
  94. package/plugin-src/client/styles.js +770 -0
  95. package/plugin-src/client/update-panel.js +14 -0
  96. package/plugin-src/client/workspace-directory-picker.js +280 -0
  97. package/plugin-src/client/workspace-editor.js +69 -0
  98. package/plugin-src/client/workspace-snapshot-fence.js +28 -0
  99. package/plugin-src/host/build.mjs +52 -0
  100. package/plugin-src/host/channels/dingtalk/connection-supervisor.mjs +130 -0
  101. package/plugin-src/host/channels/dingtalk/index.mjs +35 -0
  102. package/plugin-src/host/channels/dingtalk/production.mjs +193 -0
  103. package/plugin-src/host/channels/dingtalk/rpc.mjs +359 -0
  104. package/plugin-src/host/channels/discord/index.mjs +33 -0
  105. package/plugin-src/host/channels/discord/production.mjs +17 -0
  106. package/plugin-src/host/channels/discord/rpc.mjs +21 -0
  107. package/plugin-src/host/channels/email/availability.mjs +60 -0
  108. package/plugin-src/host/channels/email/index.mjs +36 -0
  109. package/plugin-src/host/channels/email/production.mjs +58 -0
  110. package/plugin-src/host/channels/email/rpc.mjs +163 -0
  111. package/plugin-src/host/channels/feishu/connection-supervisor.mjs +167 -0
  112. package/plugin-src/host/channels/feishu/controller.mjs +172 -0
  113. package/plugin-src/host/channels/feishu/credential-store.mjs +84 -0
  114. package/plugin-src/host/channels/feishu/index.mjs +69 -0
  115. package/plugin-src/host/channels/feishu/production.mjs +318 -0
  116. package/plugin-src/host/channels/feishu/rpc.mjs +863 -0
  117. package/plugin-src/host/channels/imessage/index.mjs +21 -0
  118. package/plugin-src/host/channels/imessage/production.mjs +13 -0
  119. package/plugin-src/host/channels/imessage/rpc.mjs +78 -0
  120. package/plugin-src/host/channels/matrix/index.mjs +31 -0
  121. package/plugin-src/host/channels/matrix/production.mjs +241 -0
  122. package/plugin-src/host/channels/matrix/rpc.mjs +228 -0
  123. package/plugin-src/host/channels/office/index.mjs +14 -0
  124. package/plugin-src/host/channels/office/production.mjs +45 -0
  125. package/plugin-src/host/channels/office/rpc.mjs +51 -0
  126. package/plugin-src/host/channels/qq/connection-supervisor.mjs +124 -0
  127. package/plugin-src/host/channels/qq/index.mjs +28 -0
  128. package/plugin-src/host/channels/qq/production.mjs +181 -0
  129. package/plugin-src/host/channels/qq/rpc.mjs +250 -0
  130. package/plugin-src/host/channels/shared/access-policy-production.mjs +137 -0
  131. package/plugin-src/host/channels/shared/access-policy-rpc.mjs +17 -0
  132. package/plugin-src/host/channels/shared/agent-preset-rpc.mjs +25 -0
  133. package/plugin-src/host/channels/shared/bot-alias-rpc.mjs +15 -0
  134. package/plugin-src/host/channels/shared/connection-supervisor.mjs +133 -0
  135. package/plugin-src/host/channels/shared/context-enhancement-rpc.mjs +17 -0
  136. package/plugin-src/host/channels/shared/model-setting-rpc.mjs +18 -0
  137. package/plugin-src/host/channels/shared/production.mjs +237 -0
  138. package/plugin-src/host/channels/shared/rpc.mjs +226 -0
  139. package/plugin-src/host/channels/shared/startup-error.mjs +55 -0
  140. package/plugin-src/host/channels/shared/startup.mjs +76 -0
  141. package/plugin-src/host/channels/shared/thinking-traces-rpc.mjs +11 -0
  142. package/plugin-src/host/channels/shared/workspace-rpc.mjs +31 -0
  143. package/plugin-src/host/channels/slack/index.mjs +31 -0
  144. package/plugin-src/host/channels/slack/production.mjs +176 -0
  145. package/plugin-src/host/channels/slack/rpc.mjs +221 -0
  146. package/plugin-src/host/channels/telegram/index.mjs +33 -0
  147. package/plugin-src/host/channels/telegram/production.mjs +19 -0
  148. package/plugin-src/host/channels/telegram/rpc.mjs +22 -0
  149. package/plugin-src/host/channels/wecom/connection-supervisor.mjs +124 -0
  150. package/plugin-src/host/channels/wecom/index.mjs +34 -0
  151. package/plugin-src/host/channels/wecom/production.mjs +187 -0
  152. package/plugin-src/host/channels/wecom/rpc.mjs +255 -0
  153. package/plugin-src/host/channels/wecom-app/index.mjs +33 -0
  154. package/plugin-src/host/channels/wecom-app/production.mjs +221 -0
  155. package/plugin-src/host/channels/wecom-app/rpc.mjs +235 -0
  156. package/plugin-src/host/channels/weixin/connection-supervisor.mjs +139 -0
  157. package/plugin-src/host/channels/weixin/index.mjs +44 -0
  158. package/plugin-src/host/channels/weixin/production.mjs +257 -0
  159. package/plugin-src/host/channels/weixin/rpc.mjs +285 -0
  160. package/plugin-src/host/channels/whatsapp/index.mjs +33 -0
  161. package/plugin-src/host/channels/whatsapp/production.mjs +198 -0
  162. package/plugin-src/host/channels/whatsapp/rpc.mjs +242 -0
  163. package/plugin-src/host/delivery-adapter.mjs +388 -0
  164. package/plugin-src/host/delivery-http.mjs +132 -0
  165. package/plugin-src/host/delivery-rpc.mjs +173 -0
  166. package/plugin-src/host/delivery-service.mjs +552 -0
  167. package/plugin-src/host/delivery-suggestions.mjs +198 -0
  168. package/plugin-src/host/harness-command-executor.mjs +48 -0
  169. package/plugin-src/host/harness-connection.mjs +20 -0
  170. package/plugin-src/host/harness-session-coordinator.mjs +183 -0
  171. package/plugin-src/host/host-language-rpc.mjs +71 -0
  172. package/plugin-src/host/host-language.mjs +157 -0
  173. package/plugin-src/host/image-input-rpc.mjs +24 -0
  174. package/plugin-src/host/inbound-ttl-rpc.mjs +86 -0
  175. package/plugin-src/host/inbound-ttl-runtime.mjs +85 -0
  176. package/plugin-src/host/inbound-ttl-service.mjs +179 -0
  177. package/plugin-src/host/index.mjs +224 -0
  178. package/plugin-src/host/injected-context.mjs +104 -0
  179. package/plugin-src/host/lark-sdk-handshake-patch.mjs +181 -0
  180. package/plugin-src/host/modern-harness-api.mjs +738 -0
  181. package/plugin-src/host/rpc-authority.mjs +12 -0
  182. package/plugin-src/host/session-sync-coordinator.mjs +233 -0
  183. package/plugin-src/host/session-title-prefix.mjs +122 -0
  184. package/plugin-src/host/update-policy.mjs +31 -0
  185. package/plugin-src/host/update-rpc.mjs +16 -0
  186. package/plugin-src/host/update-runtime.mjs +339 -0
  187. package/plugin-src/host/update-service.mjs +392 -0
  188. package/plugin-src/management-rpc.mjs +87 -0
  189. package/src/channels/dingtalk/config-store.mjs +284 -0
  190. package/src/channels/dingtalk/connection-error.mjs +292 -0
  191. package/src/channels/dingtalk/device-auth.mjs +240 -0
  192. package/src/channels/dingtalk/dingtalk-api.mjs +1140 -0
  193. package/src/channels/dingtalk/dingtalk-bridge.mjs +1889 -0
  194. package/src/channels/dingtalk/dingtalk-card-stream.mjs +242 -0
  195. package/src/channels/dingtalk/dingtalk-controller.mjs +852 -0
  196. package/src/channels/dingtalk/dingtalk-menu.mjs +95 -0
  197. package/src/channels/dingtalk/dingtalk-runtime.mjs +482 -0
  198. package/src/channels/dingtalk/harness-client.mjs +19 -0
  199. package/src/channels/dingtalk/state-store.mjs +325 -0
  200. package/src/channels/discord/config-store.mjs +25 -0
  201. package/src/channels/discord/discord-api.mjs +347 -0
  202. package/src/channels/discord/discord-bridge.mjs +16 -0
  203. package/src/channels/discord/discord-controller.mjs +16 -0
  204. package/src/channels/discord/discord-runtime.mjs +974 -0
  205. package/src/channels/discord/harness-client.mjs +11 -0
  206. package/src/channels/discord/state-store.mjs +3 -0
  207. package/src/channels/email/config-store.mjs +194 -0
  208. package/src/channels/email/email-api.mjs +20 -0
  209. package/src/channels/email/email-bridge.mjs +17 -0
  210. package/src/channels/email/email-controller.mjs +824 -0
  211. package/src/channels/email/email-runtime.mjs +699 -0
  212. package/src/channels/email/harness-client.mjs +7 -0
  213. package/src/channels/email/mail-format.mjs +91 -0
  214. package/src/channels/email/state-store.mjs +176 -0
  215. package/src/channels/email/transport.mjs +64 -0
  216. package/src/channels/email/transports/agent-mail.mjs +604 -0
  217. package/src/channels/email/transports/agently-cli.mjs +288 -0
  218. package/src/channels/email/transports/imap-smtp.mjs +165 -0
  219. package/src/channels/feishu/bridge.mjs +6286 -0
  220. package/src/channels/feishu/config.mjs +71 -0
  221. package/src/channels/feishu/external-consumer.mjs +77 -0
  222. package/src/channels/feishu/external-files.mjs +111 -0
  223. package/src/channels/feishu/feishu-app.mjs +54 -0
  224. package/src/channels/feishu/feishu-cards.mjs +1285 -0
  225. package/src/channels/feishu/feishu-channel.mjs +651 -0
  226. package/src/channels/feishu/feishu-runtime.mjs +950 -0
  227. package/src/channels/feishu/group-message-permission-manager.mjs +72 -0
  228. package/src/channels/feishu/group-response-mode.mjs +15 -0
  229. package/src/channels/feishu/harness-client.mjs +19 -0
  230. package/src/channels/feishu/history-reader.mjs +77 -0
  231. package/src/channels/feishu/live-cot.mjs +260 -0
  232. package/src/channels/feishu/message-utils.mjs +613 -0
  233. package/src/channels/feishu/multi-bot-controller.mjs +1588 -0
  234. package/src/channels/feishu/nearby-history.mjs +72 -0
  235. package/src/channels/feishu/plugin-config-store.mjs +216 -0
  236. package/src/channels/feishu/plugin-controller.mjs +254 -0
  237. package/src/channels/feishu/registration-manager.mjs +349 -0
  238. package/src/channels/feishu/repair-manager.mjs +138 -0
  239. package/src/channels/feishu/reply-context.mjs +22 -0
  240. package/src/channels/feishu/slash-command-panel.mjs +155 -0
  241. package/src/channels/feishu/slash-command-registry.mjs +495 -0
  242. package/src/channels/feishu/state-store.mjs +214 -0
  243. package/src/channels/feishu/step-push-mode.mjs +25 -0
  244. package/src/channels/feishu/voice-config.mjs +34 -0
  245. package/src/channels/feishu/voice.mjs +134 -0
  246. package/src/channels/imessage/config-store.mjs +24 -0
  247. package/src/channels/imessage/controller.mjs +37 -0
  248. package/src/channels/imessage/harness-client.mjs +7 -0
  249. package/src/channels/imessage/imessage-api.mjs +194 -0
  250. package/src/channels/imessage/imessage-bridge.mjs +16 -0
  251. package/src/channels/imessage/runtime.mjs +102 -0
  252. package/src/channels/imessage/state-store.mjs +3 -0
  253. package/src/channels/matrix/matrix-api.mjs +696 -0
  254. package/src/channels/matrix/matrix-bridge.mjs +20 -0
  255. package/src/channels/matrix/matrix-config-store.mjs +368 -0
  256. package/src/channels/matrix/matrix-controller.mjs +404 -0
  257. package/src/channels/matrix/matrix-crypto-store.mjs +279 -0
  258. package/src/channels/matrix/matrix-crypto.mjs +1014 -0
  259. package/src/channels/matrix/matrix-harness-client.mjs +11 -0
  260. package/src/channels/matrix/matrix-normalize.mjs +357 -0
  261. package/src/channels/matrix/matrix-rich-text.mjs +313 -0
  262. package/src/channels/matrix/matrix-room-history.mjs +316 -0
  263. package/src/channels/matrix/matrix-runtime.mjs +1014 -0
  264. package/src/channels/office/config-store.mjs +107 -0
  265. package/src/channels/office/office-controller.mjs +178 -0
  266. package/src/channels/office/office-job-executor.mjs +391 -0
  267. package/src/channels/office/office-runtime.mjs +175 -0
  268. package/src/channels/office/office-transport.mjs +171 -0
  269. package/src/channels/office/protocol.mjs +43 -0
  270. package/src/channels/qq/config-store.mjs +173 -0
  271. package/src/channels/qq/harness-client.mjs +11 -0
  272. package/src/channels/qq/markdown-reply.mjs +446 -0
  273. package/src/channels/qq/qq-bridge.mjs +1507 -0
  274. package/src/channels/qq/qq-controller.mjs +514 -0
  275. package/src/channels/qq/qq-menu.mjs +208 -0
  276. package/src/channels/qq/qq-runtime.mjs +303 -0
  277. package/src/channels/qq/qr-auth.mjs +24 -0
  278. package/src/channels/qq/state-error.mjs +17 -0
  279. package/src/channels/qq/state-store.mjs +143 -0
  280. package/src/channels/shared/access-policy.mjs +210 -0
  281. package/src/channels/shared/agent-preset.mjs +76 -0
  282. package/src/channels/shared/batch-input.mjs +229 -0
  283. package/src/channels/shared/bot-alias.mjs +29 -0
  284. package/src/channels/shared/bot-workspace-store.mjs +2383 -0
  285. package/src/channels/shared/command-catalog.mjs +107 -0
  286. package/src/channels/shared/command-permission.mjs +32 -0
  287. package/src/channels/shared/compact-command.mjs +109 -0
  288. package/src/channels/shared/config-read-error.mjs +24 -0
  289. package/src/channels/shared/connection-error.mjs +191 -0
  290. package/src/channels/shared/connection-test.mjs +58 -0
  291. package/src/channels/shared/context-enhancement.mjs +372 -0
  292. package/src/channels/shared/control-command.mjs +111 -0
  293. package/src/channels/shared/conversation-state-store.mjs +165 -0
  294. package/src/channels/shared/default-workspace.mjs +31 -0
  295. package/src/channels/shared/deferred-delivery-coordinator.mjs +241 -0
  296. package/src/channels/shared/deferred-delivery.mjs +161 -0
  297. package/src/channels/shared/deferred-state.mjs +53 -0
  298. package/src/channels/shared/diagnostic-details.mjs +95 -0
  299. package/src/channels/shared/editable-message-stream.mjs +100 -0
  300. package/src/channels/shared/exclusive-inbound-consumers.mjs +71 -0
  301. package/src/channels/shared/file-download.mjs +64 -0
  302. package/src/channels/shared/harness-approval.mjs +508 -0
  303. package/src/channels/shared/harness-client.mjs +2143 -0
  304. package/src/channels/shared/harness-mux.mjs +123 -0
  305. package/src/channels/shared/harness-question.mjs +95 -0
  306. package/src/channels/shared/harness-session-binding.mjs +119 -0
  307. package/src/channels/shared/history-command.mjs +193 -0
  308. package/src/channels/shared/i18n-en/diagnostics.mjs +55 -0
  309. package/src/channels/shared/i18n-en/dingtalk.mjs +81 -0
  310. package/src/channels/shared/i18n-en/discord.mjs +10 -0
  311. package/src/channels/shared/i18n-en/email.mjs +25 -0
  312. package/src/channels/shared/i18n-en/feishu.mjs +404 -0
  313. package/src/channels/shared/i18n-en/image-input.mjs +18 -0
  314. package/src/channels/shared/i18n-en/matrix.mjs +85 -0
  315. package/src/channels/shared/i18n-en/office.mjs +23 -0
  316. package/src/channels/shared/i18n-en/qq.mjs +96 -0
  317. package/src/channels/shared/i18n-en/shared-a.mjs +241 -0
  318. package/src/channels/shared/i18n-en/shared-b.mjs +263 -0
  319. package/src/channels/shared/i18n-en/shared-c.mjs +203 -0
  320. package/src/channels/shared/i18n-en/slack.mjs +27 -0
  321. package/src/channels/shared/i18n-en/telegram.mjs +27 -0
  322. package/src/channels/shared/i18n-en/wecom-app.mjs +33 -0
  323. package/src/channels/shared/i18n-en/wecom.mjs +62 -0
  324. package/src/channels/shared/i18n-en/weixin.mjs +88 -0
  325. package/src/channels/shared/i18n-en/whatsapp.mjs +17 -0
  326. package/src/channels/shared/i18n-en.mjs +45 -0
  327. package/src/channels/shared/i18n.mjs +78 -0
  328. package/src/channels/shared/im-source-guidance.mjs +65 -0
  329. package/src/channels/shared/image-input-policy.mjs +35 -0
  330. package/src/channels/shared/image-input-settings-store.mjs +60 -0
  331. package/src/channels/shared/image-input.mjs +124 -0
  332. package/src/channels/shared/image-prompt.mjs +360 -0
  333. package/src/channels/shared/inbound-access.mjs +43 -0
  334. package/src/channels/shared/inbound-file.mjs +323 -0
  335. package/src/channels/shared/inbound-ttl-store.mjs +110 -0
  336. package/src/channels/shared/inbound-ttl.mjs +22 -0
  337. package/src/channels/shared/injected-context.mjs +362 -0
  338. package/src/channels/shared/interface-language-store.mjs +127 -0
  339. package/src/channels/shared/interface-language.mjs +51 -0
  340. package/src/channels/shared/message-failure.mjs +257 -0
  341. package/src/channels/shared/model-command.mjs +741 -0
  342. package/src/channels/shared/model-setting.mjs +145 -0
  343. package/src/channels/shared/preset-command.mjs +308 -0
  344. package/src/channels/shared/semantic/artifact-delivery.mjs +177 -0
  345. package/src/channels/shared/semantic/artifact.mjs +750 -0
  346. package/src/channels/shared/semantic/delivery.mjs +193 -0
  347. package/src/channels/shared/semantic/reply-reference.mjs +148 -0
  348. package/src/channels/shared/session-binding-lock.mjs +40 -0
  349. package/src/channels/shared/session-channel-labels.mjs +28 -0
  350. package/src/channels/shared/session-reply-recovery.mjs +104 -0
  351. package/src/channels/shared/session-sync-registry.mjs +22 -0
  352. package/src/channels/shared/session-title.mjs +74 -0
  353. package/src/channels/shared/status-reaction.mjs +107 -0
  354. package/src/channels/shared/text-harness-bridge.mjs +1623 -0
  355. package/src/channels/shared/token-bot-controller.mjs +417 -0
  356. package/src/channels/shared/token-config-store.mjs +208 -0
  357. package/src/channels/shared/workspace-command.mjs +532 -0
  358. package/src/channels/shared/workspace-session.mjs +196 -0
  359. package/src/channels/slack/config-store.mjs +177 -0
  360. package/src/channels/slack/external-consumer.mjs +80 -0
  361. package/src/channels/slack/external-files.mjs +90 -0
  362. package/src/channels/slack/harness-client.mjs +11 -0
  363. package/src/channels/slack/history-reader.mjs +203 -0
  364. package/src/channels/slack/manifest.mjs +37 -0
  365. package/src/channels/slack/slack-api.mjs +636 -0
  366. package/src/channels/slack/slack-bridge.mjs +20 -0
  367. package/src/channels/slack/slack-controller.mjs +468 -0
  368. package/src/channels/slack/slack-runtime.mjs +879 -0
  369. package/src/channels/slack/state-store.mjs +3 -0
  370. package/src/channels/telegram/config-store.mjs +89 -0
  371. package/src/channels/telegram/harness-client.mjs +11 -0
  372. package/src/channels/telegram/state-store.mjs +3 -0
  373. package/src/channels/telegram/telegram-api.mjs +486 -0
  374. package/src/channels/telegram/telegram-bridge.mjs +81 -0
  375. package/src/channels/telegram/telegram-controller.mjs +52 -0
  376. package/src/channels/telegram/telegram-http.mjs +21 -0
  377. package/src/channels/telegram/telegram-rich-message.mjs +149 -0
  378. package/src/channels/telegram/telegram-runtime.mjs +1471 -0
  379. package/src/channels/wecom/config-store.mjs +172 -0
  380. package/src/channels/wecom/harness-client.mjs +11 -0
  381. package/src/channels/wecom/qr-auth.mjs +95 -0
  382. package/src/channels/wecom/send-error.mjs +31 -0
  383. package/src/channels/wecom/state-store.mjs +107 -0
  384. package/src/channels/wecom/wecom-bridge.mjs +1833 -0
  385. package/src/channels/wecom/wecom-cards.mjs +101 -0
  386. package/src/channels/wecom/wecom-controller.mjs +530 -0
  387. package/src/channels/wecom/wecom-runtime.mjs +269 -0
  388. package/src/channels/wecom-app/callback-server.mjs +471 -0
  389. package/src/channels/wecom-app/config-store.mjs +242 -0
  390. package/src/channels/wecom-app/harness-client.mjs +11 -0
  391. package/src/channels/wecom-app/state-store.mjs +107 -0
  392. package/src/channels/wecom-app/wecom-app-api.mjs +432 -0
  393. package/src/channels/wecom-app/wecom-app-bridge.mjs +1072 -0
  394. package/src/channels/wecom-app/wecom-app-controller.mjs +453 -0
  395. package/src/channels/wecom-app/wecom-app-runtime.mjs +222 -0
  396. package/src/channels/weixin/config-store.mjs +192 -0
  397. package/src/channels/weixin/connection-error.en.mjs +137 -0
  398. package/src/channels/weixin/connection-error.mjs +153 -0
  399. package/src/channels/weixin/diagnostic-details.mjs +1 -0
  400. package/src/channels/weixin/harness-client.mjs +19 -0
  401. package/src/channels/weixin/state-store.mjs +291 -0
  402. package/src/channels/weixin/weixin-api.mjs +949 -0
  403. package/src/channels/weixin/weixin-bridge.mjs +1537 -0
  404. package/src/channels/weixin/weixin-controller.mjs +669 -0
  405. package/src/channels/weixin/weixin-runtime.mjs +416 -0
  406. package/src/channels/whatsapp/config-store.mjs +210 -0
  407. package/src/channels/whatsapp/harness-client.mjs +11 -0
  408. package/src/channels/whatsapp/state-store.mjs +3 -0
  409. package/src/channels/whatsapp/whatsapp-bridge.mjs +18 -0
  410. package/src/channels/whatsapp/whatsapp-controller.mjs +470 -0
  411. package/src/channels/whatsapp/whatsapp-runtime.mjs +917 -0
  412. package/src/channels/whatsapp/whatsapp-web-session.mjs +214 -0
@@ -0,0 +1,263 @@
1
+ // English translations (shared-b area). Keys are exact Chinese literals passed to t().
2
+ export default {
3
+ // workspace-command.mjs
4
+ '用法:/session Session ID 或当前工作区序号(/session N)':
5
+ 'Usage: /session Session ID or the session index in the current Workspace (/session N)',
6
+ '用法:\n/sessionlist 列出当前工作区会话\n/sessionlist --limit N 列出当前工作区前 N 个会话(N 为正整数)\n/sessionlist 工作区序号 按 /workspacelist 序号列出会话\n/sessionlist 工作区绝对路径 列出指定工作区会话':
7
+ 'Usage:\n/sessionlist List Sessions in the current Workspace\n/sessionlist --limit N List the first N Sessions in the current Workspace (N must be a positive integer)\n/sessionlist Workspace index List Sessions by /workspacelist index\n/sessionlist Workspace absolute path List Sessions in the given Workspace',
8
+ '工作区必须是绝对路径。\n{usage}': 'The Workspace must be an absolute path.\n{usage}',
9
+ '工作区路径包含不支持的字符或长度超过限制。\n{usage}':
10
+ 'The Workspace path contains unsupported characters or exceeds the length limit.\n{usage}',
11
+ '工作区路径不存在。\n{usage}': 'The Workspace path does not exist.\n{usage}',
12
+ '工作区路径必须指向一个目录。\n{usage}': 'The Workspace path must point to a directory.\n{usage}',
13
+ '用法:/workspacelist': 'Usage: /workspacelist',
14
+ '当前机器人暂不支持列出工作区。': 'This bot does not support listing Workspaces yet.',
15
+ '当前 Harness Host 上没有仍然存在的已登记工作区。':
16
+ 'No registered Workspaces still exist on the current Harness Host.',
17
+ '当前 Harness Host 上存在的工作区({count}):':
18
+ 'Workspaces on the current Harness Host ({count}):',
19
+ '(当前)': '(current)',
20
+ '切换用法:/workspace 工作区序号或绝对路径':
21
+ 'To switch: /workspace Workspace index or absolute path',
22
+ '查看会话:/sessionlist 工作区序号或绝对路径':
23
+ 'To view Sessions: /sessionlist Workspace index or absolute path',
24
+ '机器人正在移除或已重新接入,无法列出原会话的工作区。':
25
+ 'The bot is being removed or has been reconnected; cannot list Workspaces of the original Session.',
26
+ '暂时无法获取工作区列表,请稍后重试。':
27
+ 'Unable to get the Workspace list right now; please try again later.',
28
+ '当前机器人没有可用的工作区。': 'This bot has no available Workspace.',
29
+ '当前机器人暂不支持按序号选择工作区。':
30
+ 'This bot does not support selecting a Workspace by index yet.',
31
+ '工作区序号不存在,请先执行 /workspacelist。':
32
+ 'The Workspace index does not exist; please run /workspacelist first.',
33
+ '今天 {time}': 'Today {time}',
34
+ '昨天 {time}': 'Yesterday {time}',
35
+ '前天 {time}': 'The day before yesterday {time}',
36
+ '{month}月{day}日 {time}': '{month}/{day} {time}',
37
+ '{year}年{month}月{day}日': '{year}-{month}-{day}',
38
+ '标题暂不可用': 'Title unavailable',
39
+ '暂无标题': 'No title',
40
+ '(已归档)': '(archived)',
41
+ '工作区:{workspace}\n该工作区暂无会话。': 'Workspace: {workspace}\nThis Workspace has no Sessions yet.',
42
+ '工作区:{workspace}': 'Workspace: {workspace}',
43
+ '会话({count}):': 'Sessions ({count}):',
44
+ '绑定用法:/session Session ID 或当前工作区序号(/session N)':
45
+ 'To bind: /session Session ID or the Session index in the current Workspace (/session N)',
46
+ '绑定用法:/session Session ID\n提示:/session N 只按机器人当前工作区的序号绑定。':
47
+ "To bind: /session Session ID\nNote: /session N binds by index within the bot's current Workspace only.",
48
+ '当前机器人暂不支持列出工作区会话。':
49
+ 'This bot does not support listing Workspace Sessions yet.',
50
+ '机器人正在移除或已重新接入,无法列出原会话的工作区会话。':
51
+ 'The bot is being removed or has been reconnected; cannot list Workspace Sessions of the original Session.',
52
+ '暂时无法获取工作区会话列表,请稍后重试。':
53
+ 'Unable to get the Workspace Session list right now; please try again later.',
54
+ 'Session ID 格式无效。\n{usage}': 'Invalid Session ID format.\n{usage}',
55
+ '未找到该会话,请先执行 /sessionlist 确认 Session ID。':
56
+ 'Session not found; please run /sessionlist to confirm the Session ID.',
57
+ '子代理会话不能绑定到机器人对话,请选择普通会话。':
58
+ 'Sub-agent Sessions cannot be bound to a bot conversation; please choose a regular Session.',
59
+ '该会话的工作区归属不明确,暂时无法绑定。':
60
+ "The Session's Workspace ownership is ambiguous; cannot bind it right now.",
61
+ '暂时无法读取该会话的信息,请稍后重试。':
62
+ 'Unable to read the Session info right now; please try again later.',
63
+ '机器人正在移除或已重新接入,无法绑定原对话的会话。':
64
+ 'The bot is being removed or has been reconnected; cannot bind the Session of the original conversation.',
65
+ '工作区或会话状态已发生变化,请重试。':
66
+ 'The Workspace or Session state has changed; please try again.',
67
+ '暂时无法绑定会话,请稍后重试。': 'Unable to bind the Session right now; please try again later.',
68
+ '当前机器人暂不支持按序号绑定,请使用 /session Session ID。':
69
+ 'This bot does not support binding by index yet; please use /session Session ID.',
70
+ '会话序号不存在,请先执行 /sessionlist 查看序号。':
71
+ 'The Session index does not exist; please run /sessionlist to see the indexes.',
72
+ '暂时无法获取会话列表,请稍后重试。':
73
+ 'Unable to get the Session list right now; please try again later.',
74
+ '当前机器人暂不支持绑定已有会话。':
75
+ 'This bot does not support binding existing Sessions yet.',
76
+ '当前消息缺少可绑定的会话上下文。':
77
+ 'The current message lacks a conversation context to bind to.',
78
+ '当前聊天已绑定会话:': 'This chat is now bound to the Session:',
79
+ '发送 /history 查看最近对话。': 'Send /history to preview recent conversation messages.',
80
+ '标题:{title}': 'Title: {title}',
81
+ '归档:{archived}': 'Archived: {archived}',
82
+ '是': 'Yes',
83
+ '否': 'No',
84
+ '用法:/workspace 工作区序号或绝对路径':
85
+ 'Usage: /workspace Workspace index or absolute path',
86
+ '当前机器人暂不支持切换工作区。': 'This bot does not support switching Workspaces yet.',
87
+ '工作区已切换为:{workspace}': 'Workspace switched to: {workspace}',
88
+ '{message}\n用法:/workspace 工作区序号或绝对路径':
89
+ '{message}\nUsage: /workspace Workspace index or absolute path',
90
+ '机器人正在移除或已重新接入,无法切换原会话的工作区。':
91
+ 'The bot is being removed or has been reconnected; cannot switch the Workspace of the original Session.',
92
+
93
+ // preset-command.mjs
94
+ '用法:/presetlist(不带参数)': 'Usage: /presetlist (no arguments)',
95
+ '用法:\n/preset 查看当前设置\n/preset <序号> 按最近一次 /presetlist 的序号选择\n/preset <ID> 按 Agent Preset ID 选择\n/preset id:<纯数字 ID> 选择纯数字 ID\n/preset --default 跟随 Host 默认':
96
+ 'Usage:\n/preset Show current settings\n/preset <index> Select by index from the latest /presetlist\n/preset <ID> Select by Agent Preset ID\n/preset id:<numeric ID> Select a purely numeric ID\n/preset --default Follow the Host default',
97
+ '未设置或当前不可用': 'Not set or currently unavailable',
98
+ '{id}(当前不可用)': '{id} (currently unavailable)',
99
+ '跟随 Host 默认:{preset}': 'Following Host default: {preset}',
100
+ '跟随 Host 默认(Host 默认当前不可用)': 'Following Host default (Host default currently unavailable)',
101
+ '{id}(已不可用)': '{id} (no longer available)',
102
+ '当前机器人用于新会话的 Agent Preset:': 'Agent Preset this bot uses for new Sessions:',
103
+ '已有会话不会受此设置影响。': 'Existing Sessions are not affected by this setting.',
104
+ '查看可用项:/presetlist': 'See available options: /presetlist',
105
+ '恢复跟随 Host 默认:/preset --default': 'Restore following Host default: /preset --default',
106
+ 'Host 默认:{preset}': 'Host default: {preset}',
107
+ '可用 Agent Preset({count}):': 'Available Agent Presets ({count}):',
108
+ '当前没有可用 Agent Preset。': 'No Agent Presets are currently available.',
109
+ 'Host 默认': 'Host default',
110
+ '当前选择': 'current selection',
111
+ '当前生效': 'currently in effect',
112
+ '选择:/preset <序号或 ID>': 'To select: /preset <index or ID>',
113
+ '当前机器人用于新会话的 Agent Preset 已设置为:':
114
+ 'The Agent Preset this bot uses for new Sessions is now set to:',
115
+ '已有会话不变。若当前聊天已有会话,请先发送 /new,再发送普通消息,才会使用新设置创建会话。':
116
+ 'Existing Sessions are unchanged. If this chat already has a Session, send /new first, then a regular message, to create a Session with the new setting.',
117
+ 'Agent Preset 序号无效,请先执行 /presetlist。':
118
+ 'Invalid Agent Preset index; please run /presetlist first.',
119
+ '请先执行 /presetlist,再按列表序号选择 Agent Preset。':
120
+ 'Please run /presetlist first, then select an Agent Preset by list index.',
121
+ 'Agent Preset 序号不存在,请重新执行 /presetlist。':
122
+ 'The Agent Preset index does not exist; please run /presetlist again.',
123
+ 'Agent Preset ID 格式无效。\n{usage}': 'Invalid Agent Preset ID format.\n{usage}',
124
+ 'Agent Preset 不存在或当前不可用,请重新执行 /presetlist。':
125
+ 'The Agent Preset does not exist or is currently unavailable; please run /presetlist again.',
126
+ '工作区或机器人状态已发生变化,请重试。':
127
+ 'The Workspace or bot state has changed; please try again.',
128
+ '获取 Agent Preset 列表已取消。': 'Fetching the Agent Preset list was cancelled.',
129
+ '获取 Agent Preset 设置已取消。': 'Fetching the Agent Preset settings was cancelled.',
130
+ 'Agent Preset 修改已取消。': 'The Agent Preset change was cancelled.',
131
+ '暂时无法获取 Agent Preset 列表,请稍后重试。':
132
+ 'Unable to get the Agent Preset list right now; please try again later.',
133
+ '暂时无法获取 Agent Preset 设置,请稍后重试。':
134
+ 'Unable to get the Agent Preset settings right now; please try again later.',
135
+ 'Agent Preset 修改失败,请稍后重试。': 'Failed to change the Agent Preset; please try again later.',
136
+ 'Agent Preset 命令仅支持纯文字,请移除图片后重试。':
137
+ 'Agent Preset commands support text only; please remove images and try again.',
138
+
139
+ // model-command.mjs
140
+ '用法:/model <序号> 或 /model <provider>/<model>': 'Usage: /model <index> or /model <provider>/<model>',
141
+ '用法:/model <序号或 provider/model> [推理等级ID]':
142
+ 'Usage: /model <index or provider/model> [reasoning effort ID]',
143
+ '用法:/models(不带参数)': 'Usage: /models (no arguments)',
144
+ '用法:/reasoning [序号、等级ID或 --default]':
145
+ 'Usage: /reasoning [index, effort ID, or --default]',
146
+ '用法:/reasoninglist 或 /reasonings(不带参数)':
147
+ 'Usage: /reasoninglist or /reasonings (no arguments)',
148
+ '模型序号无效:{input}': 'Invalid model index: {input}',
149
+ '请发送 /models 查看并输入有效的正整数序号。':
150
+ 'Please send /models to view the list and enter a valid positive integer index.',
151
+ '推理等级序号无效:{input}': 'Invalid reasoning effort index: {input}',
152
+ '请发送 /reasoninglist 查看并输入有效的正整数序号。':
153
+ 'Please send /reasoninglist and enter a valid positive integer index.',
154
+ '可用模型:': 'Available models:',
155
+ '可用推理等级:': 'Available reasoning efforts:',
156
+ '可用推理等级:{efforts}': 'Available reasoning efforts: {efforts}',
157
+ '当前没有可用模型。': 'No models are currently available.',
158
+ '以下模型提供方暂时不可用:': 'The following model providers are temporarily unavailable:',
159
+ '切换模型:/model <序号>': 'To switch models: /model <index>',
160
+ '切换模型:/model <序号> [推理等级ID]':
161
+ 'Switch model: /model <index> [reasoning effort ID]',
162
+ '当前模型:': 'Current model:',
163
+ '当前推理等级:{effort}': 'Current reasoning effort: {effort}',
164
+ 'Default(由模型或 Provider 决定)': 'Default (determined by the model or Provider)',
165
+ '(当前、默认)': ' (current, default)',
166
+ '(默认)': ' (default)',
167
+ '查看全部模型:/models': 'See all models: /models',
168
+ '查看可用推理等级:/reasoninglist': 'See reasoning efforts: /reasoninglist',
169
+ '切换推理等级:/reasoning <序号或等级ID>':
170
+ 'Switch reasoning effort: /reasoning <index or effort ID>',
171
+ '恢复默认等级:/reasoning --default': 'Restore the default effort: /reasoning --default',
172
+ '当前聊天还没有会话。': 'This chat has no Session yet.',
173
+ '请先发送一条普通消息创建会话。': 'Send a regular message first to create a Session.',
174
+ '查看模型:/models': 'View models: /models',
175
+ '选择模型:/model <序号>': 'Select a model: /model <index>',
176
+ '当前任务正在运行,请等待完成或先发送 /stop。':
177
+ 'A task is currently running; please wait for it to finish or send /stop first.',
178
+ '当前聊天绑定的会话已不存在,请重试。':
179
+ 'The Session bound to this chat no longer exists; please try again.',
180
+ '无法切换到该模型。模型当前不可用,或不支持当前会话中的图片。':
181
+ 'Cannot switch to that model. It is currently unavailable, or does not support the images in this Session.',
182
+ '无法切换推理等级。当前模型或推理等级不可用。':
183
+ 'Cannot switch the reasoning effort. The current model or effort is unavailable.',
184
+ '当前聊天绑定的会话已发生变化,请重试。':
185
+ 'The Session bound to this chat has changed; please try again.',
186
+ '获取模型列表已取消。': 'Fetching the model list was cancelled.',
187
+ '获取推理等级列表已取消。': 'Fetching the reasoning effort list was cancelled.',
188
+ '模型切换已取消。': 'The model switch was cancelled.',
189
+ '推理等级切换已取消。': 'The reasoning effort switch was cancelled.',
190
+ '暂时无法获取模型列表,请稍后重试。':
191
+ 'Unable to get the model list right now; please try again later.',
192
+ '暂时无法获取推理等级,请稍后重试。':
193
+ 'Unable to get reasoning efforts right now; please try again later.',
194
+ '模型切换失败,请稍后重试。': 'Failed to switch the model; please try again later.',
195
+ '推理等级切换失败,请稍后重试。':
196
+ 'Failed to switch the reasoning effort; please try again later.',
197
+ '模型命令仅支持纯文字,请移除图片后重试。':
198
+ 'Model commands support text only; please remove images and try again.',
199
+ '模型和推理等级命令仅支持纯文字,请移除图片后重试。':
200
+ 'Model and reasoning effort commands support text only; please remove images and try again.',
201
+ '当前任务正在等待你的回答或审批。': 'The current task is waiting for your answer or approval.',
202
+ '请先处理当前请求,或者发送 /stop 停止任务。':
203
+ 'Please handle the current request first, or send /stop to stop the task.',
204
+ '没有找到模型:{model}': 'Model not found: {model}',
205
+ '请发送 /models 查看可用模型。': 'Please send /models to view available models.',
206
+ '模型不支持推理等级:{effort}': 'The model does not support reasoning effort: {effort}',
207
+ '该模型不提供可切换的推理等级。':
208
+ 'This model does not provide switchable reasoning efforts.',
209
+ '模型已切换为:\n{model}\n\n后续消息将使用该模型。':
210
+ 'Model switched to:\n{model}\n\nSubsequent messages will use this model.',
211
+ '模型已切换为:\n{model}\n推理等级:{effort}\n\n后续消息将使用该模型和推理等级。':
212
+ 'Model switched to:\n{model}\nReasoning effort: {effort}\n\nSubsequent messages will use this model and reasoning effort.',
213
+ '推理等级已切换为:\n{effort}\n\n当前模型:{model}\n后续消息将使用该推理等级。':
214
+ 'Reasoning effort switched to:\n{effort}\n\nCurrent model: {model}\nSubsequent messages will use this reasoning effort.',
215
+
216
+ // compact-command.mjs
217
+ '用法:/compact(不带参数)': 'Usage: /compact (no arguments)',
218
+ '暂无可压缩的历史记录。': 'No compactable history yet.',
219
+ '当前会话正在生成回复或执行压缩,请稍后重试。':
220
+ 'The current Session is generating a reply or compacting; please try again later.',
221
+ '上下文压缩已取消。': 'Context compaction was cancelled.',
222
+ '压缩期间会话历史发生变化,本次未修改会话,请重试。':
223
+ 'The Session history changed during compaction; the Session was not modified this time, please try again.',
224
+ '未能生成有效的压缩摘要,本次未修改会话。':
225
+ 'Could not produce a useful compaction summary; the Session was not modified this time.',
226
+ '上下文压缩未正常完成,部分会话历史可能已变化,请检查会话后再重试。':
227
+ 'Context compaction did not finish cleanly; some Session history may have changed. Please inspect the Session before retrying.',
228
+ '上下文已压缩,但会话保存失败。': 'Context was compacted, but saving the Session failed.',
229
+ '已压缩 {count} 条历史记录(约 {tokens} 个 token)。':
230
+ 'Compacted {count} history items (~{tokens} tokens).',
231
+ '上下文压缩完成。': 'Context compaction completed.',
232
+ '上下文压缩失败。': 'Context compaction failed.',
233
+ '当前聊天绑定的会话已不存在,请发送新消息开启会话。':
234
+ 'The Session bound to this chat no longer exists; please send a new message to start a Session.',
235
+ '当前会话正在生成回复,请稍后重试。':
236
+ 'The current Session is generating a reply; please try again later.',
237
+ '当前 Harness 暂不支持从机器人执行上下文压缩。':
238
+ 'The current Harness does not support running context compaction from a bot yet.',
239
+ '上下文压缩失败,请稍后重试。': 'Context compaction failed; please try again later.',
240
+ '当前机器人没有可用的会话状态。': 'This bot has no available Session state.',
241
+ '当前聊天还没有可压缩的会话,请先发送一条消息。':
242
+ 'This chat has no Session to compact yet; please send a message first.',
243
+ '当前机器人暂不支持上下文压缩。': 'This bot does not support context compaction yet.',
244
+ '当前 Harness 未注册 /compact 命令,请确认上下文压缩组件已启用。':
245
+ 'The current Harness has not registered the /compact command; please make sure the context compaction component is enabled.',
246
+
247
+ // control-command.mjs
248
+ '用法:/stop(不带参数)': 'Usage: /stop (no arguments)',
249
+ '用法:/version(不带参数)': 'Usage: /version (no arguments)',
250
+ '用法:/steer <补充指令>': 'Usage: /steer <additional instruction>',
251
+ '控制命令仅支持纯文字,请移除图片后重试。':
252
+ 'Control commands support text only; please remove images and try again.',
253
+ '当前聊天没有正在运行的任务。': 'This chat has no running task.',
254
+ '已请求停止当前任务。': 'Stop requested for the current task.',
255
+ '当前聊天没有正在运行的任务,请直接发送普通消息。':
256
+ 'This chat has no running task; just send a regular message.',
257
+ '当前聊天没有绑定会话,无法补充指令。请先绑定会话。':
258
+ 'No session is bound to this chat, so an additional instruction cannot be given. Bind a session first.',
259
+ '任务已结束,没有正在运行的任务,无法补充指令。请直接发送消息开始新任务。':
260
+ 'The task has ended and there is no running task to steer. Send a message to start a new task.',
261
+ '已提交补充指令,Agent 会在下一步读取。':
262
+ 'Additional instruction submitted; the Agent will read it at the next step.',
263
+ };
@@ -0,0 +1,203 @@
1
+ // English translations (shared-c area). Keys are exact Chinese literals passed to t().
2
+ export default {
3
+ '微信': 'Weixin',
4
+ '飞书': 'Feishu',
5
+ '钉钉': 'DingTalk',
6
+ '企业微信': 'Enterprise WeChat',
7
+ '{channel}正在初始化,请稍后重新读取。': '{channel} is initializing. Please reload shortly.',
8
+ '{channel}配置格式错误。请检查其数据目录中的 config.json 和 workspaces.json,修复后重启 DSH。详细原因请查看启动日志。': 'The {channel} configuration is invalid. Check config.json and workspaces.json in its data directory, then restart DSH. See the startup log for details.',
9
+ '{channel}配置格式错误。请检查其数据目录中的 config.json,修复后重启 DSH。详细原因请查看启动日志。': 'The {channel} configuration is invalid. Check config.json in its data directory, then restart DSH. See the startup log for details.',
10
+ '无法读取或写入{channel}配置。请检查其数据目录的访问权限,修复后重启 DSH。详细原因请查看启动日志。': 'The {channel} configuration could not be read or written. Check access to its data directory, then restart DSH. See the startup log for details.',
11
+ '{channel}初始化失败。请展开诊断详情,并通过参考号查找 DSH 启动日志,修复后重启 DSH。': '{channel} initialization failed. Expand the diagnostic details and find the reference in the DSH startup log, fix the issue, then restart DSH.',
12
+ // history-command.mjs / command help
13
+ '/history [数量] 查看最近历史消息(默认 3 条,最多 5 条)':
14
+ '/history [count] Preview recent messages (default 3, maximum 5)',
15
+ '用法:/history [数量](默认 3 条,最多 5 条)':
16
+ 'Usage: /history [count] (default 3, maximum 5)',
17
+ '[图片]': '[Image]',
18
+ '[文件]': '[File]',
19
+ '本条没有可预览的文字。': 'This message has no text to preview.',
20
+ '(已截断)': ' (truncated)',
21
+ '会话历史|{session}|最近 {count} 条':
22
+ 'Session history | {session} | Recent messages: {count}',
23
+ '以上为历史记录,不是本次新回复。':
24
+ 'These are history records, not a new reply.',
25
+ '本次有限读取中仅找到 {count} 条可预览消息。':
26
+ 'Messages available to preview within this bounded read: {count}.',
27
+ '当前会话仅有 {count} 条可预览消息。':
28
+ 'Messages available to preview in this Session: {count}.',
29
+ '用户': 'User',
30
+ '助手': 'Assistant',
31
+ '当前聊天绑定的会话已不存在,请重新绑定会话。':
32
+ 'The Session bound to this chat no longer exists. Please bind a Session again.',
33
+ '会话、工作区或机器人状态已发生变化,请重新执行 /history。':
34
+ 'The Session, workspace, or bot state has changed. Please run /history again.',
35
+ '当前 Harness 暂不支持读取会话历史。':
36
+ 'This Harness does not support reading Session history.',
37
+ '历史读取已取消。': 'History reading was cancelled.',
38
+ '读取历史超时,请稍后重试。': 'Reading history timed out. Please try again later.',
39
+ '暂时无法读取会话历史,请稍后重试。':
40
+ 'Unable to read Session history right now. Please try again later.',
41
+ '请在与机器人的私聊中使用 /history。':
42
+ 'Please use /history in a direct chat with the bot.',
43
+ '/history 仅支持文字命令,请移除图片或文件后重试。':
44
+ '/history supports text commands only. Remove images or files and try again.',
45
+ '当前聊天尚未绑定会话,请先发送消息或使用 /session 绑定会话。':
46
+ 'This chat has no bound Session. Send a message or use /session to bind one first.',
47
+ '本次有限读取中未找到可预览的历史消息。':
48
+ 'No history messages were available to preview within this bounded read.',
49
+ '当前会话暂无可预览的历史消息。':
50
+ 'This Session has no history messages available to preview yet.',
51
+
52
+ // harness-approval.mjs
53
+ '请精准回复「批准」或「拒绝」(也支持:同意 / 不同意 / yes / no)。':
54
+ 'Please reply exactly with 「批准」 (approve) or 「拒绝」 (reject). Also accepted: 同意 / 不同意 / yes / no.',
55
+ '请先完成当前问题,再精准回复「批准」或「拒绝」。':
56
+ 'Please finish the current question first, then reply exactly with 「批准」 (approve) or 「拒绝」 (reject).',
57
+ '该审批已处理,无需再次回复。':
58
+ 'This approval has already been handled; no need to reply again.',
59
+ 'DeepSeek Harness 需要你的审批:':
60
+ 'DeepSeek Harness needs your approval:',
61
+ '工具:{tool}': 'Tool: {tool}',
62
+ '操作参数:': 'Operation parameters:',
63
+ '原因:{reason}': 'Reason: {reason}',
64
+ '群聊中请 @机器人 后发送审批决定。':
65
+ 'In group chats, please @ the bot before sending your approval decision.',
66
+ '只有发起当前任务的用户可以处理这条审批。':
67
+ 'Only the user who started the current task can handle this approval.',
68
+ '审批决定正在提交,请稍候。':
69
+ 'Your approval decision is being submitted; please wait.',
70
+ '已批准,仅对本次操作有效。':
71
+ 'Approved — valid for this operation only.',
72
+ '已拒绝此次操作。': 'This operation was rejected.',
73
+ '无法完整展示这次操作,已安全拒绝此次审批。':
74
+ 'The operation could not be displayed in full, so this approval was safely rejected.',
75
+ '审批提交失败,请重新回复「批准」或「拒绝」。':
76
+ 'Failed to submit the approval; please reply with 「批准」 (approve) or 「拒绝」 (reject) again.',
77
+
78
+ // harness-question.mjs
79
+ 'DeepSeek Harness 需要你补充信息{progress}:':
80
+ 'DeepSeek Harness needs more information{progress}:',
81
+ '请输入你的回答。': 'Please enter your answer.',
82
+ '请回复选项序号或文字;多选用逗号分隔,也可补充其他内容。':
83
+ 'Reply with option numbers or text; separate multiple choices with commas, or add anything else.',
84
+ '请回复一个选项序号或文字,也可直接输入其他答案。':
85
+ 'Reply with an option number or its text, or type your own answer directly.',
86
+ '请点击下方按钮选择,也可直接回复文字。':
87
+ 'Tap a button below to choose, or reply with text directly.',
88
+ '请直接回复你的答案。': 'Please reply with your answer directly.',
89
+ '群聊中请 @机器人 后发送答案。':
90
+ 'In group chats, please @ the bot before sending your answer.',
91
+
92
+ // image-prompt.mjs
93
+ '当前模型不支持图片,请用 /models 查看可用模型,再用 /model <序号> 切换后重发。':
94
+ 'The current model does not support images. Use /models to list available models, switch with /model <number>, then resend.',
95
+ '当前会话模型不支持直接接收图片输入。用户发送的图片已作为文件保存到工作区(见下方文件清单)。请使用可用工具分析这些图片文件后回答,例如 run_code 或 pwsh 读取字节、解析元数据、调用图像处理或 OCR 库;不要假设自己能直接看到图片内容。':
96
+ 'The current session model does not accept direct image input. The images sent by the user were saved into the workspace as files (see the file manifest below). Answer by analyzing those image files with the available tools — for example run_code or pwsh to read bytes, parse metadata, or call image-processing or OCR libraries — and do not assume you can see the images directly.',
97
+ '图片超过宿主允许的大小,请压缩后重试。':
98
+ 'The image exceeds the size allowed by the host; compress it and try again.',
99
+ '图片分辨率过高,请压缩后重试。':
100
+ 'The image resolution is too high; compress it and try again.',
101
+ '图片内容无效或格式不受支持,请重新发送。':
102
+ 'The image content is invalid or its format is unsupported; please resend it.',
103
+ '未能读取图片内容,请重新发送。':
104
+ 'Could not read the image content; please resend it.',
105
+ '图片格式与实际内容不一致,请重新发送。':
106
+ 'The image format does not match its actual content; please resend it.',
107
+ '一次发送的图片数量超过宿主限制,请减少后重试。':
108
+ 'The number of images sent at once exceeds the host limit; send fewer and try again.',
109
+ '图片总大小超过宿主限制,请减少图片或压缩后重试。':
110
+ 'The total image size exceeds the host limit; send fewer images or compress them and try again.',
111
+ '图片下载地址发生了重定向,暂时无法读取。':
112
+ 'The image download URL redirected and cannot be read right now.',
113
+ '图片下载失败(HTTP {status}),请重新发送后再试。':
114
+ 'Image download failed (HTTP {status}); please resend it and try again.',
115
+ '图片超过 5 MB,请压缩后重试。':
116
+ 'The image is larger than 5 MB; compress it and try again.',
117
+ '一次最多只能处理 {maxImages} 张图片。':
118
+ 'At most {maxImages} images can be processed at once.',
119
+ '一次发送的图片总大小过大,请减少图片数量或压缩后重试。':
120
+ 'The total size of the images sent is too large; send fewer images or compress them and try again.',
121
+ '图片下载失败,请重新发送后再试。':
122
+ 'Image download failed; please resend it and try again.',
123
+ '暂不支持该图片格式,请发送 JPEG、PNG、WebP 或 GIF 图片。':
124
+ 'This image format is not supported yet; please send a JPEG, PNG, WebP, or GIF image.',
125
+
126
+ // connection-test.mjs
127
+ '✅ DeepSeek Harness 连接测试成功':
128
+ '✅ DeepSeek Harness connection test succeeded',
129
+ '这条消息由「IM机器人」设置页中的“{name}”机器人卡片发出。':
130
+ 'This message was sent from the "{name}" bot card on the IM Bot settings page.',
131
+ '{channelLabel}尚未收到可用于测试的私聊消息。':
132
+ 'The {channelLabel} has not received a direct message that can be used for testing yet.',
133
+ '机器人': 'bot',
134
+
135
+ // editable-message-stream.mjs / harness-client.mjs / progress text
136
+ '正在处理…': 'Processing…',
137
+ '处理完成。': 'Processing complete.',
138
+ '工具': 'tool',
139
+ '正在整理结果…': 'Gathering results…',
140
+ '_正在搜索网络并整理信息…_': '_Searching the web and gathering information…_',
141
+ '_正在使用 {name}…_': '_Using {name}…_',
142
+
143
+ // image-prompt.mjs
144
+ '请分析这张图片。': 'Analyze this image.',
145
+
146
+ // inbound-file.mjs
147
+ '文件接收失败,请重新发送后再试。': 'File reception failed. Please resend it.',
148
+ '文件下载失败,请重新发送后再试。': 'File download failed. Please resend it.',
149
+
150
+ // agent-preset.mjs
151
+ 'Agent Preset 无效。': 'Invalid Agent Preset.',
152
+
153
+ // batch-input.mjs
154
+ '/batch 开始批量输入(仅私聊,最多 10 条文字)':
155
+ '/batch Start batch input (direct messages only, up to 10 text messages)',
156
+ '/send 提交当前批次': '/send Submit the current batch',
157
+ '/cancel 取消当前批次': '/cancel Cancel the current batch',
158
+ '开始批量输入(仅私聊)': 'Start batch input (direct messages only)',
159
+ '提交当前批次': 'Submit the current batch',
160
+ '取消当前批次': 'Cancel the current batch',
161
+ '当前已处于批量输入模式,已收集 {count}/{limit} 条。\n请发送 /send 提交或 /cancel 取消。':
162
+ 'Batch input is already active with {count}/{limit} messages collected.\nSend /send to submit or /cancel to cancel.',
163
+ '当前已处于批量输入模式,已收集 {count}/{limit} 条。\n完成后发送 /send,取消请发送 /cancel。':
164
+ 'Batch input is already active with {count}/{limit} messages collected.\nSend /send when finished or /cancel to cancel.',
165
+ '[消息 {index}]': '[Message {index}]',
166
+ '以下是用户通过批量输入模式发送的多条内容,请按顺序作为同一次输入统一处理。':
167
+ 'The user sent the following messages in batch input mode. Process them in order as one input.',
168
+ '批量输入模式仅支持私聊,请在与机器人的私聊中使用。':
169
+ 'Batch input is available only in direct messages. Please use it in a direct chat with the bot.',
170
+ '当前聊天有正在运行的任务、待回答问题或待审批请求。\n请先完成当前交互或发送 /stop,再使用 /batch。':
171
+ 'This chat has a running task, unanswered question, or pending approval.\nFinish the current interaction or send /stop before using /batch.',
172
+ '用法:/{command}(不带参数)': 'Usage: /{command} (without arguments)',
173
+ '批量输入命令仅支持纯文字,请移除图片、文件或引用消息后重试。':
174
+ 'Batch input commands support text only. Remove the image, file, or quoted message and try again.',
175
+ '当前没有待提交的批量内容,请先发送 /batch。':
176
+ 'There is no batch to submit. Send /batch first.',
177
+ '当前没有正在进行的批量输入。': 'There is no active batch input.',
178
+ '已进入批量输入模式,最多可发送 {limit} 条文字。\n完成后发送 /send,取消请发送 /cancel。':
179
+ 'Batch input started. You can send up to {limit} text messages.\nSend /send when finished or /cancel to cancel.',
180
+ '批量输入模式目前仅支持文字,不支持图片、文件或引用消息,这条消息未收录。\n请继续发送文字,或使用 /send、/cancel。':
181
+ 'Batch input currently supports text only, not images, files, or quoted messages, so this message was not collected.\nContinue with text, or use /send or /cancel.',
182
+ '当前批次正在提交,请勿重复发送 /send。':
183
+ 'The current batch is being submitted. Do not send /send again.',
184
+ '批量内容已经提交,无法取消。\n如需停止当前任务,请发送 /stop。':
185
+ 'The batch has already been submitted and cannot be cancelled.\nSend /stop if you need to stop the current task.',
186
+ '当前批次正在提交,请等待处理完成后再开启新批次。':
187
+ 'The current batch is being submitted. Wait for it to finish before starting another batch.',
188
+ '已取消批量输入。': 'Batch input cancelled.',
189
+ '已取消批量输入,共丢弃 {count} 条消息。':
190
+ 'Batch input cancelled; {count} messages were discarded.',
191
+ '当前批次还没有内容,请先发送文字,或使用 /cancel 取消。':
192
+ 'The current batch is empty. Send some text first or use /cancel.',
193
+ '当前正在批量输入,请先发送 /send 提交或 /cancel 取消。':
194
+ 'Batch input is active. Send /send to submit or /cancel to cancel first.',
195
+ '当前批次已满,这条消息未收录。\n请先发送 /send 提交或 /cancel 取消,然后重新发送这条消息。':
196
+ 'The current batch is full, so this message was not collected.\nSend /send or /cancel first, then resend this message.',
197
+ '已收集 {count}/{limit} 条,当前批次已满,请发送 /send 提交或 /cancel 取消。':
198
+ 'Collected {count}/{limit} messages. The batch is full; send /send or /cancel.',
199
+ '批量内容提交失败,已保留 {count} 条消息。\n请再次发送 /send 重试或 /cancel 取消。':
200
+ 'Batch submission failed; {count} messages were retained.\nSend /send to retry or /cancel to cancel.',
201
+ '你可以发送普通消息,但没有执行命令的权限。':
202
+ 'You can send regular messages, but you do not have permission to run commands.',
203
+ };
@@ -0,0 +1,27 @@
1
+ // English translations (slack area). Keys are exact Chinese literals passed to t().
2
+ export default {
3
+ 'Slack机器人': 'Slack bot',
4
+ 'Slack机器人凭据缺失,请移除后重新接入。':
5
+ 'Slack bot credentials are missing. Remove the bot and connect it again.',
6
+ 'Slack Socket Mode 连接未就绪,插件会自动重试。':
7
+ 'The Slack Socket Mode connection is not ready yet. The plugin will retry automatically.',
8
+ 'Slack机器人已接入,Socket Mode 连接暂未就绪。':
9
+ 'The Slack bot is connected, but the Socket Mode connection is not ready yet.',
10
+ 'Slack Socket Mode 连接仍未就绪,请检查两个 Token。':
11
+ 'The Slack Socket Mode connection is still not ready. Check both tokens.',
12
+ 'Slack机器人尚未连接': 'The Slack bot is not connected yet',
13
+ 'Slack Socket Mode 长连接运行正常':
14
+ 'The Slack Socket Mode long-lived connection is running normally',
15
+ 'Slack连接未就绪,插件会自动重试':
16
+ 'The Slack connection is not ready. The plugin will retry automatically',
17
+ 'Slack连接当前离线': 'The Slack connection is currently offline',
18
+
19
+ 'Slack 未授权机器人读取该文件。请为应用添加 files:read 后重新安装,再重新发送图片。':
20
+ 'Slack has not granted the bot access to this file. Add the files:read scope to the app, reinstall it, then send the image again.',
21
+ 'Slack Bot Token 必须以 xoxb- 开头。': 'The Slack Bot Token must start with xoxb-.',
22
+ 'Slack App Token 必须以 xapp- 开头。': 'The Slack App Token must start with xapp-.',
23
+ 'Slack Bot Token 没有返回完整的机器人身份。':
24
+ 'The Slack Bot Token did not return a complete bot identity.',
25
+ 'Slack App Token 无法创建 Socket Mode 连接,请确认已启用 Socket Mode 和 connections:write。':
26
+ 'The Slack App Token could not create a Socket Mode connection. Make sure Socket Mode and connections:write are enabled.',
27
+ };
@@ -0,0 +1,27 @@
1
+ // English translations (telegram area). Keys are exact Chinese literals passed to t().
2
+ export default {
3
+ // Terminal status written back over a placeholder whose in-place edit was
4
+ // rejected, so it is the last thing a reader sees on a degraded reply.
5
+ '回复已发送。': 'The reply was sent.',
6
+ '回复发送结果未能确认。': 'The reply delivery result could not be confirmed.',
7
+ '消息发送失败,请稍后重试。': 'The message could not be sent. Try again later.',
8
+ '开启一个全新会话': 'Start a brand-new Session',
9
+ '压缩当前会话的较早上下文': 'Compact the earlier context of the current Session',
10
+ '切换工作区': 'Switch Workspace',
11
+ '列出工作区绝对路径': 'List Workspace absolute paths',
12
+ '列出会话 ID 和标题': 'List Session IDs and titles',
13
+ '将当前聊天绑定到指定会话': 'Bind the current chat to a specific Session',
14
+ '按序号列出所有可用模型': 'List all available models by number',
15
+ '查看或切换当前会话模型': 'View or switch the model of the current Session',
16
+ '列出可用 Agent Preset': 'List available Agent Presets',
17
+ '查看或设置新会话 Agent Preset': 'View or set the Agent Preset for new Sessions',
18
+ '停止当前任务': 'Stop the current task',
19
+ '纠偏当前任务': 'Steer the current task',
20
+ '检查连接状态': 'Check connection status',
21
+ '查看插件版本': 'Show plugin version',
22
+ '显示帮助': 'Show help',
23
+ '该 Telegram 机器人已配置 Webhook,请先在原服务中移除 Webhook 后重试。':
24
+ 'This Telegram bot already has a Webhook configured. Remove the Webhook from the original service and try again.',
25
+ 'Telegram机器人': 'Telegram Bot',
26
+ ' Bot API 长轮询': ' Bot API long polling',
27
+ };
@@ -0,0 +1,33 @@
1
+ // English translations (wecom-app area). Keys are exact Chinese literals passed to t().
2
+ export default {
3
+ '企业微信应用': 'WeCom app',
4
+ '企业微信应用凭据缺失,请重新绑定。': 'WeCom app credentials are missing; please bind the app again.',
5
+ '企业微信应用凭据不完整,请重新绑定。': 'WeCom app credentials are incomplete; please bind the app again.',
6
+ '企业微信应用连接未就绪,插件会自动重试。': 'The WeCom app connection is not ready; the plugin will retry automatically.',
7
+ '企业微信应用连接未就绪,插件会自动重试': 'The WeCom app connection is not ready; the plugin will retry automatically',
8
+ '企业微信应用已绑定,但尚未就绪。': 'The WeCom app is bound but not ready yet.',
9
+ '企业微信应用已更新,但尚未就绪。': 'The WeCom app settings were saved, but the connection is not ready yet.',
10
+ '企业微信应用仍未就绪,请稍后重试。': 'The WeCom app is still not ready; please try again later.',
11
+ '企业微信应用当前离线': 'The WeCom app is currently offline',
12
+ '企业微信应用回调通道就绪': 'The WeCom app callback channel is ready',
13
+ '企业微信应用({corpId})': 'WeCom app ({corpId})',
14
+ '请输入正确的企业 ID(例如 ww1234567890abcdef)。': 'Enter a valid corp ID (for example ww1234567890abcdef).',
15
+ '请输入正确的应用 AgentId(纯数字)。': 'Enter a valid AgentId (digits only).',
16
+ '应用 Secret 格式不正确。': 'The app Secret format is invalid.',
17
+ '回调 Token 格式不正确。': 'The callback Token format is invalid.',
18
+ 'EncodingAESKey 必须是 43 位字母或数字。': 'EncodingAESKey must be 43 alphanumeric characters.',
19
+ '代理地址必须是 http(s) 地址': 'The API proxy address must be an http(s) URL',
20
+ '代理地址必须是 http(s) 地址。': 'The API proxy address must be an http(s) URL.',
21
+ '回调基址必须是 http(s) 地址': 'The callback base URL must be an http(s) URL',
22
+ '回调基址必须是 http(s) 地址。': 'The callback base URL must be an http(s) URL.',
23
+ '回调密钥已重置,但机器人重启失败,请手动重连。': 'The callback secret was reset, but the bot failed to restart; please reconnect manually.',
24
+ '企业微信应用交互问题发送失败。': 'Failed to send the WeCom app interaction question.',
25
+ '企业微信应用目前支持文字和图片消息。': 'The WeCom app currently supports text and image messages.',
26
+ '企业微信应用已连接 DeepSeek Harness,可在微信中直接使用。': 'The WeCom app is connected to DeepSeek Harness and works directly inside WeChat.',
27
+ '企业微信应用已连接 DeepSeek Harness。直接发送文字或图片即可开始,发送 /help 查看可用命令。': 'The WeCom app is connected to DeepSeek Harness. Send text or images to start, or send /help for available commands.',
28
+ '企业微信应用与 DeepSeek Harness 连接正常。': 'The WeCom app and DeepSeek Harness are connected.',
29
+ '结果文件「{name}」已生成,但企业微信应用当前没有文件消息发送权限,请检查应用的文件发送能力。': 'The result file "{name}" was generated, but the WeCom app currently lacks file-message permission; check the app file capability.',
30
+ '结果文件「{name}」超过企业微信可发送的文件大小,未发送。': 'The result file "{name}" exceeds the WeCom file size limit and was not sent.',
31
+ '结果文件「{name}」已生成,但企业微信拒绝了该文件消息。': 'The result file "{name}" was generated, but WeCom rejected the file message.',
32
+ '结果文件「{name}」发送失败,请稍后重试。': 'The result file "{name}" failed to send; please try again later.',
33
+ };