dsh-a2a-im 0.1.0 → 0.1.2

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.
package/README.en.md CHANGED
@@ -115,7 +115,7 @@ After the model calls the file-return tool, the plugin hands the specified file
115
115
  Install the published stable release from npm (recommended):
116
116
 
117
117
  ```sh
118
- dsh plugin --profile web add -w @xmanrui/dsh-im
118
+ dsh plugin --profile web add -w dsh-a2a-im
119
119
  ```
120
120
 
121
121
  Restart `dsh web`, refresh the browser, then open **Settings → IM Bot**. The top-level IM Bot entry uses `order: 21` to follow **Agent Presets**, and the Plugins page no longer retains the old entry. Upgrading preserves existing bots, credentials, workspaces, Agent Presets, and Session bindings.
package/README.md CHANGED
@@ -118,7 +118,7 @@ Matrix 加密目前仅供非敏感测试:默认 optional 模式尝试启动加
118
118
  推荐从 npm 安装已发布的稳定版本:
119
119
 
120
120
  ```sh
121
- dsh plugin --profile web add -w @xmanrui/dsh-im
121
+ dsh plugin --profile web add -w dsh-a2a-im
122
122
  ```
123
123
 
124
124
  重启 `dsh web`、刷新浏览器,然后打开「设置 → IM机器人」。IM机器人使用 `order: 21`,尽量排在一级设置菜单的「Agent 预设」之后;插件页面不再保留旧入口。从旧版升级不会改变已有机器人、凭据、工作区、Agent Preset 或会话绑定。
package/bin/dsh-im.mjs CHANGED
@@ -5,7 +5,7 @@ import { homedir, tmpdir } from 'node:os';
5
5
  import { isAbsolute, join, resolve } from 'node:path';
6
6
  import { spawnSync } from 'node:child_process';
7
7
 
8
- const PACKAGE_NAME = '@xmanrui/dsh-im';
8
+ const PACKAGE_NAME = 'dsh-a2a-im';
9
9
  const DEFAULT_SOURCE = 'github:xmanrui/dsh-im';
10
10
  const LEGACY_PACKAGES = [
11
11
  '@xmanrui/dsh-feishu',
package/cordis.patch.yml CHANGED
@@ -1,3 +1,3 @@
1
1
  - insert:
2
- - id: dsh-a2a-collab-im
3
- name: 'dsh-a2a-collab-im'
2
+ - id: dsh-a2a-im
3
+ name: 'dsh-a2a-im'
package/lib/client.js CHANGED
@@ -1,5 +1,5 @@
1
1
  window.__ModuleLoader__.load({
2
- id: "@xmanrui/dsh-im",
2
+ id: "dsh-a2a-im",
3
3
  factory: (require) => {
4
4
  var module = { exports: {} };
5
5
  var exports = module.exports;
@@ -595,7 +595,7 @@ var React40 = __toESM(require("react"), 1);
595
595
  // package.json
596
596
  var package_default = {
597
597
  name: "dsh-a2a-im",
598
- version: "0.1.0",
598
+ version: "0.1.2",
599
599
  icon: "./assets/logo-plugin-message-link-gradient.webp",
600
600
  description: "\u628A\u5FAE\u4FE1\u3001\u98DE\u4E66\u3001\u4F01\u5FAE\u3001\u9489\u9489\u3001QQ\u3001Telegram\u3001WhatsApp\u3001Slack\u3001Discord\u3001Matrix\u63A5\u5165DSH\u3002 Connect Telegram, WhatsApp, Slack, Discord, Matrix, WeChat, Feishu, WeCom, DingTalk, and QQ to DSH.",
601
601
  keywords: [
@@ -5555,7 +5555,7 @@ function installDingtalkStyles() {
5555
5555
  if (existing) return () => {
5556
5556
  };
5557
5557
  const style = document.createElement("style");
5558
- style.dataset.plugin = "@xmanrui/dsh-im";
5558
+ style.dataset.plugin = "dsh-a2a-im";
5559
5559
  style.dataset.pluginCss = DINGTALK_STYLE_ID;
5560
5560
  style.textContent = CSS;
5561
5561
  document.head.appendChild(style);
@@ -7252,7 +7252,7 @@ function installDiscordStyles() {
7252
7252
  if (existing) return () => {
7253
7253
  };
7254
7254
  const style = document.createElement("style");
7255
- style.dataset.plugin = "@xmanrui/dsh-im";
7255
+ style.dataset.plugin = "dsh-a2a-im";
7256
7256
  style.dataset.pluginCss = DISCORD_STYLE_ID;
7257
7257
  style.textContent = CSS2;
7258
7258
  document.head.appendChild(style);
@@ -9810,7 +9810,7 @@ function installFeishuStyles() {
9810
9810
  };
9811
9811
  }
9812
9812
  const style = document.createElement("style");
9813
- style.dataset.plugin = "@xmanrui/dsh-im";
9813
+ style.dataset.plugin = "dsh-a2a-im";
9814
9814
  style.dataset.pluginCss = FEISHU_STYLE_ID;
9815
9815
  style.textContent = CSS3;
9816
9816
  document.head.appendChild(style);
@@ -9984,7 +9984,7 @@ function installQqStyles() {
9984
9984
  if (existing) return () => {
9985
9985
  };
9986
9986
  const style = document.createElement("style");
9987
- style.dataset.plugin = "@xmanrui/dsh-im";
9987
+ style.dataset.plugin = "dsh-a2a-im";
9988
9988
  style.dataset.pluginCss = QQ_STYLE_ID;
9989
9989
  style.textContent = CSS4;
9990
9990
  document.head.appendChild(style);
@@ -11097,7 +11097,7 @@ function installSlackStyles() {
11097
11097
  if (existing) return () => {
11098
11098
  };
11099
11099
  const style = document.createElement("style");
11100
- style.dataset.plugin = "@xmanrui/dsh-im";
11100
+ style.dataset.plugin = "dsh-a2a-im";
11101
11101
  style.dataset.pluginCss = SLACK_STYLE_ID;
11102
11102
  style.textContent = CSS6;
11103
11103
  document.head.appendChild(style);
@@ -11313,7 +11313,7 @@ function installTelegramStyles() {
11313
11313
  if (existing) return () => {
11314
11314
  };
11315
11315
  const style = document.createElement("style");
11316
- style.dataset.plugin = "@xmanrui/dsh-im";
11316
+ style.dataset.plugin = "dsh-a2a-im";
11317
11317
  style.dataset.pluginCss = TELEGRAM_STYLE_ID;
11318
11318
  style.textContent = CSS7;
11319
11319
  document.head.appendChild(style);
@@ -11493,7 +11493,7 @@ function installWecomStyles() {
11493
11493
  if (existing) return () => {
11494
11494
  };
11495
11495
  const style = document.createElement("style");
11496
- style.dataset.plugin = "@xmanrui/dsh-im";
11496
+ style.dataset.plugin = "dsh-a2a-im";
11497
11497
  style.dataset.pluginCss = WECOM_STYLE_ID;
11498
11498
  style.textContent = CSS8;
11499
11499
  document.head.appendChild(style);
@@ -12347,7 +12347,7 @@ function installWecomAppStyles() {
12347
12347
  if (existing) return () => {
12348
12348
  };
12349
12349
  const style = document.createElement("style");
12350
- style.dataset.plugin = "@xmanrui/dsh-im";
12350
+ style.dataset.plugin = "dsh-a2a-im";
12351
12351
  style.dataset.pluginCss = WECOM_APP_STYLE_ID;
12352
12352
  style.textContent = CSS9;
12353
12353
  document.head.appendChild(style);
@@ -14251,7 +14251,7 @@ function installWeixinStyles() {
14251
14251
  if (existing) return () => {
14252
14252
  };
14253
14253
  const style = document.createElement("style");
14254
- style.dataset.plugin = "@xmanrui/dsh-im";
14254
+ style.dataset.plugin = "dsh-a2a-im";
14255
14255
  style.dataset.pluginCss = WEIXIN_STYLE_ID;
14256
14256
  style.textContent = CSS10;
14257
14257
  document.head.appendChild(style);
@@ -14406,7 +14406,7 @@ function installWhatsappStyles() {
14406
14406
  if (existing) return () => {
14407
14407
  };
14408
14408
  const style = document.createElement("style");
14409
- style.dataset.plugin = "@xmanrui/dsh-im";
14409
+ style.dataset.plugin = "dsh-a2a-im";
14410
14410
  style.dataset.pluginCss = WHATSAPP_STYLE_ID;
14411
14411
  style.textContent = CSS11;
14412
14412
  document.head.appendChild(style);
@@ -15195,7 +15195,7 @@ function installEmailStyles() {
15195
15195
  if (existing) return () => {
15196
15196
  };
15197
15197
  const style = document.createElement("style");
15198
- style.dataset.plugin = "@xmanrui/dsh-im";
15198
+ style.dataset.plugin = "dsh-a2a-im";
15199
15199
  style.dataset.pluginCss = EMAIL_STYLE_ID;
15200
15200
  style.textContent = CSS12;
15201
15201
  document.head.appendChild(style);
@@ -15935,7 +15935,7 @@ function installIMessageStyles() {
15935
15935
  if (existing) return () => {
15936
15936
  };
15937
15937
  const style = document.createElement("style");
15938
- style.dataset.plugin = "@xmanrui/dsh-im";
15938
+ style.dataset.plugin = "dsh-a2a-im";
15939
15939
  style.dataset.pluginCss = IMESSAGE_STYLE_ID;
15940
15940
  style.textContent = CSS13;
15941
15941
  document.head.appendChild(style);
@@ -16048,7 +16048,7 @@ function installMatrixStyles() {
16048
16048
  if (existing) return () => {
16049
16049
  };
16050
16050
  const style = document.createElement("style");
16051
- style.dataset.plugin = "@xmanrui/dsh-im";
16051
+ style.dataset.plugin = "dsh-a2a-im";
16052
16052
  style.dataset.pluginCss = MATRIX_STYLE_ID;
16053
16053
  style.textContent = CSS14;
16054
16054
  document.head.appendChild(style);
@@ -20332,7 +20332,7 @@ function installImStyles() {
20332
20332
  if (existing) return () => {
20333
20333
  };
20334
20334
  const style = document.createElement("style");
20335
- style.dataset.plugin = "@xmanrui/dsh-im";
20335
+ style.dataset.plugin = "dsh-a2a-im";
20336
20336
  style.dataset.pluginCss = IM_STYLE_ID;
20337
20337
  style.textContent = CSS15;
20338
20338
  document.head.appendChild(style);
@@ -20681,7 +20681,7 @@ function manualUpdateCommand(snapshot) {
20681
20681
  snapshot.job?.state !== "completed" && !snapshot.job?.recoverable ? snapshot.job?.targetVersion : null
20682
20682
  ].filter(validVersion);
20683
20683
  const version = targets.length ? [...targets, snapshot.runningVersion, snapshot.installedVersion].filter(validVersion).sort(import_rcompare.default)[0] : "latest";
20684
- return `dsh plugin --profile ${profileArgument} add -w @xmanrui/dsh-im@${version}`;
20684
+ return `dsh plugin --profile ${profileArgument} add -w dsh-a2a-im@${version}`;
20685
20685
  }
20686
20686
  function ManualUpdateCommand({ command, disabled, sourceInstall, desktop }) {
20687
20687
  const [copyState, setCopyState] = React37.useState("idle");
@@ -20762,7 +20762,7 @@ function ManualUpdateCommand({ command, disabled, sourceInstall, desktop }) {
20762
20762
  h2("path", { d: "M5 13H3.5A1.5 1.5 0 0 1 2 11.5v-8A1.5 1.5 0 0 1 3.5 2h8A1.5 1.5 0 0 1 13 3.5V5" })
20763
20763
  )))
20764
20764
  ),
20765
- command.endsWith("@xmanrui/dsh-im@latest") ? h2(
20765
+ command.endsWith("dsh-a2a-im@latest") ? h2(
20766
20766
  "p",
20767
20767
  { className: "dim-updateManualHint" },
20768
20768
  "\u5C1A\u672A\u786E\u8BA4\u76EE\u6807\u7248\u672C\uFF0C\u6B64\u547D\u4EE4\u5B89\u88C5\u6267\u884C\u65F6 npm \u7684 latest \u7248\u672C\u3002"
package/lib/index.js CHANGED
@@ -137,7 +137,7 @@ Reply with a number for a quick action:
137
137
  **4** Status \xB7 **5** Complete permissions \xB7 **6** Help`,"\u4ECE\u4E0B\u65B9\u4E0B\u62C9\u9009\u62E9\u8865\u5145\u6307\u4EE4\uFF1B\u6700\u540E\u4E00\u9879\u53EF\u81EA\u5B9A\u4E49\u8F93\u5165\u3002":"Choose an instruction below; the last option lets you enter a custom one.","\u5F53\u524D\u6CA1\u6709\u7ED1\u5B9A\u4F1A\u8BDD\uFF0C\u8BF7\u5148\u7ED1\u5B9A\u4F1A\u8BDD\u518D\u8865\u5145\u6307\u4EE4\u3002":"No session is bound. Bind one before steering the task.","\u2795 \u8865\u5145\u6307\u4EE4":"\u2795 Steer task","\u8F93\u5165\u8865\u5145\u6307\u4EE4\u540E\u70B9\u300C\u63D0\u4EA4\u300D\uFF0C\u53D1\u9001\u7ED9\u5F53\u524D\u8FD0\u884C\u7684\u4EFB\u52A1\u3002":"Enter an instruction and press Submit to send it to the running task.",\u8F93\u5165\u4F60\u7684\u8865\u5145\u6307\u4EE4:"Enter your instruction",\u63D0\u4EA4:"Submit","\u2795 \u81EA\u5B9A\u4E49\u6307\u4EE4":"\u2795 Custom instruction","\u{1F916} \u52A9\u624B\u83DC\u5355":"\u{1F916} Assistant menu","**\u70B9\u51FB\u6309\u94AE\u6216\u76F4\u63A5\u56DE\u590D\u6570\u5B57**":"**Tap a button or reply with a number**","1 \xB7 \u4F1A\u8BDD\u5217\u8868":"1 \xB7 Sessions","2 \xB7 \u5DE5\u4F5C\u533A":"2 \xB7 Workspace","3 \xB7 \u65B0\u4F1A\u8BDD":"3 \xB7 New session","4 \xB7 \u72B6\u6001":"4 \xB7 Status","5 \xB7 \u5E2E\u52A9":"5 \xB7 Help","**6 \xB7 \u8865\u5168\u6743\u9650**\uFF08\u8BF7\u76F4\u63A5\u56DE\u590D\u6570\u5B57 **6**\uFF09":"**6 \xB7 Complete permissions** (reply with the number **6**)","7 \xB7 \u5173\u6CE8\u5217\u8868":"7 \xB7 Watch list","\u{1F9EA} \u9A8C\u8BC1\u5361\u7247\u6309\u94AE":"\u{1F9EA} Verify card buttons","\u6388\u6743\u5DF2\u63D0\u4EA4\u3002\u8BF7\u70B9\u51FB\u4E0B\u65B9\u6309\u94AE\uFF1B\u673A\u5668\u4EBA\u771F\u5B9E\u6536\u5230\u56DE\u8C03\u540E\u624D\u4F1A\u5224\u5B9A\u4FEE\u590D\u6210\u529F\u3002":"Authorization submitted. Tap the button below; the repair is confirmed only after the bot receives the real callback.",\u5B8C\u6210\u9A8C\u8BC1:"Finish verification","**\u5DE5\u4F5C\u533A**\uFF1A{workspace}\n\u5171 **{total}** \u4E2A\u4F1A\u8BDD{paging}":`**Workspace**: {workspace}
138
138
  **{total}** sessions in total{paging}`,"\uFF08\u7B2C {page}/{pageCount} \u9875\uFF09":" (page {page}/{pageCount})","\u2B50\u53D6\u5173":"\u2B50 Unwatch","\u2B50\u5173\u6CE8":"\u2B50 Watch","\u25C0 \u4E0A\u4E00\u9875":"\u25C0 Previous","\u4E0B\u4E00\u9875 \u25B6":"Next \u25B6","\u56DE\u590D\u6570\u5B57\uFF081~N\uFF09\u7ED1\u5B9A\u672C\u9875\u4F1A\u8BDD\u3002":"Reply with a number (1\u2013N) to bind a session on this page.","\u{1F4C2} \u4F1A\u8BDD\u5217\u8868":"\u{1F4C2} Session list","\u5F53\u524D Host \u4E0A\u6CA1\u6709\u5DF2\u767B\u8BB0\u7684\u5DE5\u4F5C\u533A\u3002":"No workspaces are registered on the current Host.","\u56DE\u590D\u6570\u5B57\u5207\u6362\u5DE5\u4F5C\u533A\uFF0C\u6216\u70B9\u51FB\u6309\u94AE\uFF1A":"Reply with a number to switch workspaces, or tap a button:","\u{1F5C2} \u5DE5\u4F5C\u533A":"\u{1F5C2} Workspace","\u{1F916} \u52A9\u624B\u83DC\u5355\uFF08\u56DE\u590D\u6570\u5B57\u5373\u53EF\uFF0C\u65E0\u9700\u8BB0\u547D\u4EE4\uFF09":"\u{1F916} Assistant menu (reply with a number \u2014 no need to memorize commands)","1 \xB7 /sessionlist \u5217\u51FA\u4F1A\u8BDD\uFF08\u56DE\u590D\u6570\u5B57\u7ED1\u5B9A\uFF09":"1 \xB7 /sessionlist List sessions (reply with a number to bind)","2 \xB7 /workspacelist \u5217\u51FA\u5DE5\u4F5C\u533A\uFF08\u56DE\u590D\u6570\u5B57\u5207\u6362\uFF09":"2 \xB7 /workspacelist List workspaces (reply with a number to switch)","3 \xB7 /new \u5F00\u542F\u65B0\u4F1A\u8BDD":"3 \xB7 /new Start a new session","4 \xB7 /status \u8FDE\u63A5\u72B6\u6001":"4 \xB7 /status Connection status","5 \xB7 /help \u672C\u5E2E\u52A9":"5 \xB7 /help This help","6 \xB7 /repair \u8865\u5168\u6743\u9650\u4E0E\u56DE\u8C03\uFF08\u8BF7\u56DE\u590D\u6570\u5B57 6\uFF09":"6 \xB7 /repair Complete permissions and callback (reply with the number 6)","7 \xB7 /watchlist \u5173\u6CE8\u5217\u8868":"7 \xB7 /watchlist Watch list","\u76F4\u63A5\u53D1\u9001\u6587\u5B57/\u56FE\u7247\u5373\u7EE7\u7EED\u5F53\u524D\u4F1A\u8BDD\u3002":"Send text or an image directly to continue the current session.","/session ID \u6216\u5E8F\u53F7 \u7ED1\u5B9A\u5DF2\u6709\u4F1A\u8BDD":"/session ID or index Bind an existing session","/watch ID \u6216\u5E8F\u53F7 \u5173\u6CE8\u4F1A\u8BDD\uFF08\u5B8C\u6210\u540E\u63A8\u9001\uFF09":"/watch ID or index Watch a session (push when done)","/compact \u538B\u7F29\u4E0A\u4E0B\u6587":"/compact Compact the context","\u{1F9F9} \u6E05\u7A7A\u4E0A\u4E0B\u6587":"\u{1F9F9} Clear context",\u6E05\u7A7A\u5F53\u524D\u4F1A\u8BDD\u4E0A\u4E0B\u6587\u5E76\u4FDD\u7559\u7ED1\u5B9A\u548C\u5386\u53F2\u8BB0\u5F55:"Clear the current session context while keeping the binding and history","/workspace \u7EDD\u5BF9\u8DEF\u5F84 \u5207\u6362\u5DE5\u4F5C\u533A":"/workspace <absolute path> Switch workspace","/presetlist \u5217\u51FA\u53EF\u7528 Agent Preset":"/presetlist List available Agent Presets","\u4EFB\u52A1\u5B8C\u6210\u4F1A\u81EA\u52A8\u63A8\u9001\uFF0C\u56DE\u590D\u6570\u5B57\u6216\u70B9\u6309\u94AE\u53D6\u6D88\u5173\u6CE8\uFF1A":"Completion is pushed automatically. Reply with a number or tap a button to unwatch:","\u{1F441} \u5173\u6CE8\u5217\u8868":"\u{1F441} Watch list","\u2B50 \u53D6\u6D88\u5173\u6CE8":"\u2B50 Unwatch","\u2606 \u5173\u6CE8":"\u2606 Watch","\u{1F50D} \u5173\u6CE8\u5217\u8868":"\u{1F50D} Watch list",\u52FE\u9009\u8981\u5173\u6CE8\u7684\u4F1A\u8BDD:"Select sessions to watch",\u52FE\u9009\u8981\u53D6\u6D88\u5173\u6CE8\u7684\u4F1A\u8BDD:"Select sessions to unwatch","\u5F53\u524D\u6CA1\u6709\u5173\u6CE8\u7684\u4F1A\u8BDD\u3002\u4EFB\u52A1\u5B8C\u6210\u4F1A\u81EA\u52A8\u63A8\u9001\u7ED3\u679C\u3002":"No sessions are being watched. Results are pushed automatically when tasks complete.","\u5F53\u524D\u5173\u6CE8 **{count}** \u4E2A\u4F1A\u8BDD\uFF1A":"Currently watching **{count}** sessions:","**\u2795 \u6DFB\u52A0\u5173\u6CE8**\uFF08\u591A\u9009\u4E0B\u62C9\u52FE\u9009\uFF09":"**\u2795 Add watch** (select from the multi-select dropdown)","**\u2796 \u53D6\u6D88\u5173\u6CE8**\uFF08\u591A\u9009\u4E0B\u62C9\u52FE\u9009\uFF09":"**\u2796 Remove watch** (select from the multi-select dropdown)","\u{1F4CB} \u4F1A\u8BDD\u5217\u8868":"\u{1F4CB} Session list","\u{1F519} \u8FD4\u56DE\u83DC\u5355":"\u{1F519} Back to menu",\u5DF2\u5B8C\u6210:"Completed",\u5DF2\u505C\u6B62:"Stopped",\u8FD0\u884C\u4E2D:"Running","\u2699\uFE0F \u4EFB\u52A1\u8FC7\u7A0B":"\u2699\uFE0F Task progress","\u{1F4CB} \u8FC7\u7A0B\u8BE6\u60C5":"\u{1F4CB} Process details","\u{1F6E0}\uFE0F \u5DE5\u5177\u6458\u8981\uFF08{count}\uFF09":"\u{1F6E0}\uFE0F Tool summary ({count})","\u{1F4AD} \u601D\u8003\u8FC7\u7A0B\uFF08{count}\uFF09":"\u{1F4AD} Thinking ({count})","\u{1F6E0}\uFE0F \u5DE5\u5177":"\u{1F6E0}\uFE0F Tools","\u{1F4AD} \u601D\u8003":"\u{1F4AD} Thinking","\u{1F4CB} \u8FC7\u7A0B\u8BE6\u60C5\uFF08\u5DE5\u5177 {tools} \xB7 \u601D\u8003 {notes}\uFF09":"\u{1F4CB} Process details (tools {tools} \xB7 thinking {notes})",\u5DF2\u4E2D\u6B62:"Aborted",\u5DF2\u53D6\u6D88:"Cancelled",\u5DF2\u7ED3\u675F:"Ended","\u2705 \u4EFB\u52A1\u5B8C\u6210":"\u2705 Task complete","**\u72B6\u6001**\uFF1A{reason}":"**Status**: {reason}",\u6253\u5F00\u4F1A\u8BDD\u5217\u8868:"Open session list",\u5DE5\u4F5C\u533A:"Workspace","\u7ED1\u5B9A\u8BE5\u4F1A\u8BDD\u540E\u53EF\u7EE7\u7EED\u8FFD\u95EE\uFF0C\u8F93\u5165\u6587\u5B57\u5373\u53EF\u3002":"After binding this session you can keep asking; just type a message.","\u5F53\u524D\u6CA1\u6709\u5173\u6CE8\u7684\u4F1A\u8BDD\u3002\n`/watch <ID|\u5E8F\u53F7>` \u5173\u6CE8\u540E\uFF0C\u4EFB\u52A1\u5B8C\u6210\u4F1A\u81EA\u52A8\u63A8\u9001\u3002":"No sessions are being watched.\nWatch one with `/watch <ID|index>` and completion is pushed automatically.","\u6B63\u5728\u751F\u6210\u2026":"Generating\u2026","\u2935\uFE0F \u6700\u7EC8\u7ED3\u679C\u89C1\u4E0B\u65B9":"\u2935\uFE0F Final result below",\u56DE\u7B54\u5B8C\u6210:"Answer complete","\u5185\u5BB9\u8F83\u957F\uFF0C\u751F\u6210\u5B8C\u6210\u540E\u5C06\u5206\u6BB5\u53D1\u9001\u5B8C\u6574\u56DE\u7B54\u3002":"This response is long. The complete answer will be sent in parts when generation finishes.",\u98DE\u4E66\u673A\u5668\u4EBA:"Feishu bot","\u98DE\u4E66\u673A\u5668\u4EBA\u7F3A\u5C11\u56FE\u7247\u8BFB\u53D6\u6743\u9650 im:message:readonly\uFF08\u98DE\u4E66\u663E\u793A\u4E3A\u201C\u83B7\u53D6\u5355\u804A\u3001\u7FA4\u7EC4\u6D88\u606F\u201D\uFF09\u3002\u8BF7\u79C1\u804A\u673A\u5668\u4EBA\u6267\u884C /repair \u547D\u4EE4\uFF0C\u6216\u8005\u5728\u300CIM\u673A\u5668\u4EBA\u300D\u8BBE\u7F6E\u9875\u70B9\u51FB\u201C\u8865\u5168\u6743\u9650\u201D\u6309\u94AE\u5E76\u626B\u7801\u3002\u6309\u98DE\u4E66\u63D0\u793A\u53D1\u5E03\u65B0\u7248\u672C\u3001\u5B8C\u6210\u5FC5\u8981\u5BA1\u6279\u540E\uFF0C\u518D\u91CD\u65B0\u53D1\u9001\u56FE\u7247\u3002":"The Feishu bot is missing the image-read scope im:message:readonly, shown by Feishu as \u201CRead direct and group messages.\u201D Run /repair in a direct chat with the bot, or click the \u201CComplete permissions\u201D button on the IM Bot settings page and scan the QR code. Publish a new version and complete any approval requested by Feishu, then resend the image.","\u2705 \u4FEE\u590D\u5B8C\u6210\uFF1A\u5DF2\u5B9E\u6D4B\u6536\u5230 card.action.trigger\uFF0C\u83DC\u5355\u6309\u94AE\u73B0\u5728\u53EF\u7528\u3002":"\u2705 Repair complete: card.action.trigger was received in a real test; the menu buttons now work.","\u26A0\uFE0F \u4FEE\u590D\u9A8C\u8BC1\u8D85\u65F6\uFF1A\u672A\u6536\u5230\u6D4B\u8BD5\u5361\u6309\u94AE\u7684 card.action.trigger\uFF0C\u4E0D\u80FD\u786E\u8BA4\u6309\u94AE\u5DF2\u4FEE\u590D\u3002\u8BF7\u4E0D\u8981\u91CD\u590D\u6388\u6743\uFF1B\u5148\u68C0\u67E5\u98DE\u4E66\u5F00\u653E\u5E73\u53F0\u7684\u5361\u7247\u56DE\u8C03\u914D\u7F6E\uFF0C\u786E\u8BA4\u540E\u518D\u53D1\u9001 /repair\u3002":"\u26A0\uFE0F Repair verification timed out: no card.action.trigger from the test card button was received, so the buttons cannot be confirmed repaired. Do not authorize again; check the card-callback configuration in Feishu Open Platform first, then send /repair.","\u26A0\uFE0F \u4FEE\u590D\u9A8C\u8BC1\u5931\u8D25\uFF1A\u65E0\u6CD5\u53D1\u9001\u4E13\u7528\u6D4B\u8BD5\u5361\uFF0C\u4E0D\u80FD\u786E\u8BA4 card.action.trigger \u5DF2\u6062\u590D\u3002\u8BF7\u4E0D\u8981\u91CD\u590D\u6388\u6743\uFF1B\u5148\u68C0\u67E5\u673A\u5668\u4EBA\u6D88\u606F\u6743\u9650\u548C\u8FDE\u63A5\u72B6\u6001\u3002":"\u26A0\uFE0F Repair verification failed: the dedicated test card could not be sent, so card.action.trigger cannot be confirmed restored. Do not authorize again; check the bot message permission and connection status first.","\u26A0\uFE0F \u4FEE\u590D\u9A8C\u8BC1\u4E2D\u65AD\uFF1ARuntime \u5DF2\u505C\u6B62\uFF0C\u672A\u5B8C\u6210 card.action.trigger \u5B9E\u6D4B\uFF0C\u4E0D\u80FD\u786E\u8BA4\u4FEE\u590D\u6210\u529F\u3002\u8BF7\u4E0D\u8981\u91CD\u590D\u6388\u6743\uFF1B\u5148\u7B49\u5F85\u673A\u5668\u4EBA\u6062\u590D\u8FDE\u63A5\u3002":"\u26A0\uFE0F Repair verification interrupted: the Runtime stopped before the card.action.trigger test completed, so the repair cannot be confirmed. Do not authorize again; wait for the bot to reconnect.","\u8BE5\u5BA1\u6279\u5DF2\u5904\u7406\u6216\u4E0D\u5B58\u5728\uFF0C\u65E0\u9700\u91CD\u590D\u64CD\u4F5C\u3002":"This approval has already been processed or does not exist; no need to repeat the action.","\u64CD\u4F5C\u53C2\u6570\uFF1A\n{operation}":`Operation parameters:
139
139
  {operation}`,"\u2705 \u6279\u51C6":"\u2705 Approve","\u274C \u62D2\u7EDD":"\u274C Reject","\u{1F510} \u5DE5\u5177\u5BA1\u6279":"\u{1F510} Tool approval","\u2753 \u8BF7\u8865\u5145\u4FE1\u606F{progress}":"\u2753 Please provide more information{progress}","\u540E\u53F0\u4EFB\u52A1\u5DF2\u7ED3\u675F\uFF08{reason}\uFF09\uFF0C\u6CA1\u6709\u53EF\u63A8\u9001\u7684\u6700\u7EC8\u7ED3\u679C\u3002":"The background task has finished ({reason}); there is no final result to deliver.","\u5DF2\u8BF7\u6C42\u505C\u6B62\u540E\u53F0\u4EFB\u52A1\u3002":"Requested to stop the background task.","\u65E0\u6CD5\u5B89\u5168\u505C\u6B62\u540E\u53F0\u4EFB\u52A1\uFF0C\u8BF7\u5728 Harness \u4E2D\u67E5\u770B\u5E76\u505C\u6B62\u5BF9\u5E94\u4EFB\u52A1\u3002":"Unable to safely stop the background task. Please inspect and stop the matching task in Harness.",\u4EFB\u52A1\u5931\u8D25:"Failed","\u{1F4CE} \u5DF2\u6CE8\u5165\u4F1A\u8BDD\u4E0A\u4E0B\u6587":"\u{1F4CE} Context injected","\u270F\uFE0F \u5176\u4ED6\u7B54\u6848\u2026":"\u270F\uFE0F Other answer\u2026","\u2705 \u5DF2\u56DE\u7B54{progress}":"\u2705 Answered{progress}","\u2705 \u5DF2\u9009\u62E9\uFF1A{label}":"\u2705 Selected: {label}","\u56DE\u7B54\u5DF2\u63D0\u4EA4\uFF0C\u5BF9\u8BDD\u5C06\u7EE7\u7EED\u3002":"Answer submitted. The conversation will continue.","\u8FD9\u4E2A\u95EE\u9898\u5DF2\u7ECF\u56DE\u7B54\u8FC7\u4E86\u3002":"This question has already been answered.","\u60F3\u81EA\u5B9A\u4E49\u7B54\u6848\uFF1F\u76F4\u63A5\u53D1\u9001\u6587\u5B57\u6D88\u606F\u5373\u53EF\uFF0C\u5C06\u4F5C\u4E3A\u672C\u9898\u7B54\u6848\u63D0\u4EA4\u3002":"Want a custom answer? Just send a text message and it will be submitted as your answer.","\u23F3 \u6B63\u5728\u601D\u8003\u4E2D\u2026\uFF08\u5DF2\u8FD0\u884C {elapsed}\uFF09":"\u23F3 Thinking\u2026 (elapsed {elapsed})","\u23F3 \u6B63\u5728\u601D\u8003\u4E2D\u2026":"\u23F3 Thinking\u2026"};var H4={"\u5DF2\u8FDE\u63A5 DeepSeek Harness\uFF0C\u6B63\u5728\u601D\u8003\u2026":"Connected to DeepSeek Harness, thinking\u2026","\u9489\u9489\u673A\u5668\u4EBA\u5DF2\u8FDE\u63A5 DeepSeek Harness\u3002":"The DingTalk bot is connected to DeepSeek Harness.","/m \u6216 /menu \u6253\u5F00\u4E0B\u62C9\u64CD\u4F5C\u83DC\u5355":"/m or /menu Open the dropdown action menu","\u4F1A\u8BDD\u6216\u5DE5\u4F5C\u533A\u5DF2\u53D8\u5316\uFF0C\u8BF7\u91CD\u65B0\u53D1\u9001 /m\u3002":"The session or workspace changed. Send /m again.","\u4F1A\u8BDD\u6216\u5DE5\u4F5C\u533A\u5DF2\u53D8\u5316\uFF0C\u83DC\u5355\u5DF2\u5237\u65B0\uFF0C\u8BF7\u91CD\u65B0\u9009\u62E9\u3002":"The session or workspace changed. The menu was refreshed; please select again.","\u5F53\u524D\u4EFB\u52A1\u5C1A\u672A\u7ED3\u675F\uFF0C\u8BF7\u5148\u505C\u6B62\u4EFB\u52A1\u6216\u7B49\u5F85\u5B8C\u6210\u540E\u518D\u64CD\u4F5C\u3002":"A task is still running. Stop it or wait until it finishes before making changes.","\u64CD\u4F5C\u672A\u5B8C\u6210\uFF0C\u8BF7\u91CD\u65B0\u53D1\u9001 /m \u540E\u91CD\u8BD5\u3002":"The action did not complete. Send /m again and retry.","\u9489\u9489\u672A\u80FD\u6362\u53D6\u56FE\u7247\u4E0B\u8F7D\u5730\u5740\uFF0C\u8BF7\u91CD\u65B0\u53D1\u9001\uFF1B\u82E5\u6301\u7EED\u5931\u8D25\uFF0C\u8BF7\u68C0\u67E5\u673A\u5668\u4EBA\u7684\u201C\u4F01\u4E1A\u5185\u673A\u5668\u4EBA\u53D1\u9001\u6D88\u606F\u6743\u9650\u201D\u3002":`DingTalk could not provide the image download address. Please resend; if it keeps failing, check the bot's "Send messages as an internal robot" permission.`,"\u9489\u9489\u6CA1\u6709\u8FD4\u56DE\u56FE\u7247\u4E0B\u8F7D\u5730\u5740\uFF0C\u8BF7\u91CD\u65B0\u53D1\u9001\u3002":"DingTalk did not return an image download address. Please resend.","\u9489\u9489\u672A\u63D0\u4F9B\u5F15\u7528\u9644\u4EF6\u7684\u4E0B\u8F7D\u4FE1\u606F\uFF0C\u65E0\u6CD5\u8BFB\u53D6\u539F\u9644\u4EF6\u3002\u8BF7\u76F4\u63A5\u91CD\u65B0\u53D1\u9001\u9644\u4EF6\u540E\u518D\u63D0\u95EE\u3002":"DingTalk did not provide download information for the quoted attachment, so it cannot be read. Please resend the attachment directly with your question.","\u9489\u9489\u8FD4\u56DE\u7684\u56FE\u7247\u4E34\u65F6\u5730\u5740\u65E0\u6CD5\u8BFB\u53D6\uFF0C\u8BF7\u91CD\u65B0\u53D1\u9001\u3002":"The temporary image address returned by DingTalk could not be read. Please resend.","\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u53D1\u9001\u7ED3\u679C\u672A\u80FD\u786E\u8BA4\uFF0C\u8BF7\u5148\u68C0\u67E5\u804A\u5929\u5185\u662F\u5426\u5DF2\u6536\u5230\uFF0C\u4E0D\u8981\u7ACB\u5373\u91CD\u8BD5\u3002":'Delivery of the result file "{name}" could not be confirmed. Please check whether it already arrived in the chat before retrying.',"\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u5DF2\u751F\u6210\uFF0C\u4F46\u9489\u9489\u5E94\u7528\u6216\u673A\u5668\u4EBA\u7F3A\u5C11\u6587\u4EF6\u6D88\u606F\u6743\u9650\u3002\u8BF7\u5F00\u901A\u5E94\u7528 qyapi_base \u6743\u9650\uFF0C\u5E76\u786E\u8BA4\u673A\u5668\u4EBA\u5177\u5907\u6587\u4EF6\u6D88\u606F\u53D1\u9001\u80FD\u529B\u3002":`Result file "{name}" was generated, but the DingTalk app or bot lacks file message permission. Enable the app's qyapi_base permission and make sure the bot can send file messages.`,"\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u8D85\u8FC7\u5F53\u524D\u9489\u9489\u673A\u5668\u4EBA\u53EF\u53D1\u9001\u7684\u6587\u4EF6\u5927\u5C0F\uFF0C\u672A\u53D1\u9001\u3002":'Result file "{name}" exceeds the file size limit of the current DingTalk bot and was not sent.',"\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u6682\u65F6\u88AB\u9489\u9489\u9650\u6D41\uFF0C\u672A\u80FD\u53D1\u9001\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002":'Result file "{name}" was rate-limited by DingTalk and could not be sent. Please try again later.',"\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u5DF2\u751F\u6210\uFF0C\u4F46\u9489\u9489\u62D2\u7EDD\u4E86\u8BE5\u6587\u4EF6\u6D88\u606F\uFF0C\u8BF7\u68C0\u67E5\u6587\u4EF6\u7C7B\u578B\u548C\u673A\u5668\u4EBA\u6587\u4EF6\u6D88\u606F\u914D\u7F6E\u3002":`Result file "{name}" was generated, but DingTalk rejected the file message. Check the file type and the bot's file message configuration.`,"\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u5DF2\u751F\u6210\uFF0C\u4F46\u6682\u65F6\u672A\u80FD\u901A\u8FC7\u9489\u9489\u53D1\u9001\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002":'Result file "{name}" was generated but could not be sent via DingTalk right now. Please try again later.',"\u7ED3\u679C\u6587\u4EF6\u5DF2\u751F\u6210\u3002":"The result file has been generated.","\u9489\u9489\u673A\u5668\u4EBA\u4E0E DeepSeek Harness \u8FDE\u63A5\u6B63\u5E38\u3002":"The DingTalk bot is connected to DeepSeek Harness normally.","\u9489\u9489\u547D\u4EE4\u5904\u7406\u5931\u8D25\u3002":"Failed to process the DingTalk command.","\u9489\u9489\u6D88\u606F\u6CA1\u6709\u5B89\u5168\u7684\u56DE\u590D\u5730\u5740\u3002":"The DingTalk message has no safe reply address.","\u9489\u9489\u5BA1\u6279\u5904\u7406\u5931\u8D25\u3002":"Failed to process the DingTalk approval.","\u9489\u9489\u6D88\u606F\u5904\u7406\u5931\u8D25\u3002":"Failed to process the DingTalk message.","\u9489\u9489\u6D88\u606F\u683C\u5F0F\u65E0\u6548\u3002":"Invalid DingTalk message format.","\u9489\u9489\u4EA4\u4E92\u95EE\u9898\u53D1\u9001\u5931\u8D25\u3002":"Failed to send the DingTalk interaction question.",\u9489\u9489\u7528\u6237:"DingTalk user",\u9489\u9489\u673A\u5668\u4EBA:"DingTalk bot",\u8EAB\u4EFD\u5DF2\u9690\u85CF:"Identity hidden","\u9489\u9489\u673A\u5668\u4EBA\u51ED\u636E\u7F3A\u5931\uFF0C\u8BF7\u79FB\u9664\u540E\u91CD\u65B0\u626B\u7801\u3002":"The DingTalk bot credentials are missing. Remove the bot and scan the QR code again.","\u9489\u9489\u8FDE\u63A5\u672A\u5C31\u7EEA\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002":"The DingTalk connection is not ready. Please try again later.","\u9489\u9489\u8FDE\u63A5\u4ECD\u672A\u5C31\u7EEA\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002":"The DingTalk connection is still not ready. Please try again later.","\u9489\u9489 Stream \u8FDE\u63A5\u5931\u8D25\uFF1A\u68C0\u6D4B\u5230\u4EE3\u7406\u4F9D\u8D56 agent-base 6.0.0\u3002":"The DingTalk Stream connection failed because proxy dependency agent-base 6.0.0 was detected.","\u8BF7\u5C06 DSH profile \u4E2D\u7684 agent-base@6 \u56FA\u5B9A\u4E3A 6.0.2 \u540E\u91CD\u65B0\u5B89\u88C5\u4F9D\u8D56\uFF0C\u6216\u5347\u7EA7 pnpm \u540E\u91CD\u65B0\u89E3\u6790 lockfile\u3002":"Pin agent-base@6 to 6.0.2 in the DSH profile and reinstall dependencies, or upgrade pnpm and re-resolve the lockfile.","\u63D2\u4EF6\u65E0\u6CD5\u8FDE\u63A5\u672C\u673A Harness\u3002":"The plugin could not connect to the local Harness.","\u8BF7\u786E\u8BA4 dsh web \u6B63\u5E38\u8FD0\u884C\uFF0C\u5E76\u67E5\u770B dsh web \u65E5\u5FD7\u4E2D\u76F8\u540C\u53C2\u8003\u53F7\u5BF9\u5E94\u7684\u8BCA\u65AD\u4FE1\u606F\u3002":"Make sure dsh web is running, then find the matching reference in the dsh web log.","\u9489\u9489 Stream SDK \u52A0\u8F7D\u5931\u8D25\u3002":"The DingTalk Stream SDK could not be loaded.","\u8BF7\u91CD\u65B0\u5B89\u88C5\u5F53\u524D DSH profile \u7684\u63D2\u4EF6\u4F9D\u8D56\uFF0C\u5E76\u67E5\u770B dsh web \u65E5\u5FD7\u4E2D\u76F8\u540C\u53C2\u8003\u53F7\u5BF9\u5E94\u7684\u8BCA\u65AD\u4FE1\u606F\u3002":"Reinstall plugin dependencies in the current DSH profile, then find the matching reference in the dsh web log.","\u9489\u9489\u62D2\u7EDD\u4E86\u5F53\u524D\u5E94\u7528\u51ED\u636E\u3002":"DingTalk rejected the current app credentials.","\u8BF7\u6838\u5BF9 Client ID\u3001Client Secret \u548C\u673A\u5668\u4EBA\u6743\u9650\u540E\u91CD\u8BD5\u3002":"Verify the app credentials and bot permissions, then try again.","\u8FDE\u63A5\u9489\u9489 Stream \u8D85\u65F6\u3002":"The DingTalk Stream connection timed out.","\u8BF7\u68C0\u67E5\u7F51\u7EDC\u3001\u4EE3\u7406\u548C\u9632\u706B\u5899\u540E\u91CD\u8BD5\uFF1B\u8BE6\u7EC6\u539F\u56E0\u53EF\u5728 dsh web \u65E5\u5FD7\u4E2D\u6309\u53C2\u8003\u53F7\u67E5\u627E\u3002":"Check the network, proxy, and firewall, then try again. Find details in the dsh web log using the reference.","\u65E0\u6CD5\u89E3\u6790\u9489\u9489\u670D\u52A1\u5730\u5740\u3002":"The DingTalk service address could not be resolved.","\u8BF7\u68C0\u67E5 DNS\u3001\u7F51\u7EDC\u548C\u4EE3\u7406\u8BBE\u7F6E\uFF1B\u8BE6\u7EC6\u539F\u56E0\u53EF\u5728 dsh web \u65E5\u5FD7\u4E2D\u6309\u53C2\u8003\u53F7\u67E5\u627E\u3002":"Check DNS, network, and proxy settings. Find details in the dsh web log using the reference.","\u9489\u9489 Stream \u7684 TLS \u8FDE\u63A5\u6821\u9A8C\u5931\u8D25\u3002":"TLS validation failed for the DingTalk Stream connection.","\u8BF7\u68C0\u67E5\u7CFB\u7EDF\u8BC1\u4E66\u3001\u4EE3\u7406\u8BC1\u4E66\u6216 HTTPS \u4E2D\u95F4\u4EE3\u7406\uFF1B\u8BE6\u7EC6\u539F\u56E0\u53EF\u5728 dsh web \u65E5\u5FD7\u4E2D\u6309\u53C2\u8003\u53F7\u67E5\u627E\u3002":"Check system certificates, proxy certificates, or the HTTPS interception proxy. Find details in the dsh web log using the reference.","\u9489\u9489 Stream \u65E0\u6CD5\u901A\u8FC7\u5F53\u524D\u4EE3\u7406\u5EFA\u7ACB\u8FDE\u63A5\u3002":"DingTalk Stream could not connect through the current proxy.","\u8BF7\u68C0\u67E5 HTTP_PROXY\u3001HTTPS_PROXY\u3001NO_PROXY \u548C\u4EE3\u7406\u8FDE\u901A\u6027\uFF1B\u8BE6\u7EC6\u539F\u56E0\u53EF\u5728 dsh web \u65E5\u5FD7\u4E2D\u6309\u53C2\u8003\u53F7\u67E5\u627E\u3002":"Check HTTP_PROXY, HTTPS_PROXY, NO_PROXY, and proxy connectivity. Find details in the dsh web log using the reference.","\u9489\u9489 Stream \u6D88\u606F\u8FDE\u63A5\u5EFA\u7ACB\u5931\u8D25\u3002":"The DingTalk Stream message connection could not be established.","\u8BF7\u68C0\u67E5\u7F51\u7EDC\u548C\u673A\u5668\u4EBA\u914D\u7F6E\uFF1B\u8BE6\u7EC6\u539F\u56E0\u53EF\u5728 dsh web \u65E5\u5FD7\u4E2D\u6309\u53C2\u8003\u53F7\u67E5\u627E\u3002":"Check the network and bot configuration. Find details in the dsh web log using the reference.","\u9489\u9489 Stream \u6D88\u606F\u76D1\u542C\u521D\u59CB\u5316\u5931\u8D25\u3002":"DingTalk Stream message-listener initialization failed.","\u8BF7\u786E\u8BA4 dsh-im \u4E0E dingtalk-stream \u7248\u672C\u517C\u5BB9\uFF0C\u5E76\u6309\u53C2\u8003\u53F7\u67E5\u770B dsh web \u65E5\u5FD7\u3002":"Make sure dsh-im and dingtalk-stream are compatible, then inspect the dsh web log using the reference.","\u9489\u9489\u673A\u5668\u4EBA\u8FD0\u884C\u73AF\u5883\u521D\u59CB\u5316\u5931\u8D25\u3002":"The DingTalk bot runtime could not be initialized.","\u8BF7\u68C0\u67E5 DSH \u6570\u636E\u76EE\u5F55\u3001\u5DE5\u4F5C\u533A\u548C\u63D2\u4EF6\u4F9D\u8D56\uFF0C\u5E76\u6309\u53C2\u8003\u53F7\u67E5\u770B dsh web \u65E5\u5FD7\u3002":"Check the DSH data directory, workspace, and plugin dependencies, then inspect the dsh web log using the reference.","\u8BF7\u5728 dsh web \u65E5\u5FD7\u4E2D\u67E5\u627E\u76F8\u540C\u53C2\u8003\u53F7\uFF0C\u4EE5\u83B7\u53D6\u5DF2\u8131\u654F\u7684\u5177\u4F53\u9519\u8BEF\u3002":"Find the matching reference in the dsh web log for the redacted error details.","\u626B\u7801\u63A5\u5165\u5DF2\u53D6\u6D88\u3002":"QR code setup has been cancelled.","\u65E0\u6CD5\u751F\u6210\u9489\u9489\u4E8C\u7EF4\u7801\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002":"Could not generate the DingTalk QR code. Please try again later.","\u4E8C\u7EF4\u7801\u5DF2\u8FC7\u671F\uFF0C\u8BF7\u91CD\u65B0\u751F\u6210\u3002":"The QR code has expired. Generate a new one.","\u9489\u9489\u5DF2\u63A5\u5165\uFF0C\u4F46\u6D88\u606F\u8FDE\u63A5\u6682\u672A\u5C31\u7EEA\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002":"DingTalk is connected, but the message connection is not ready yet. Please try again later.","\u9489\u9489\u672A\u5B8C\u6210\u673A\u5668\u4EBA\u6388\u6743\uFF0C\u8BF7\u91CD\u65B0\u626B\u7801\u3002":"DingTalk did not complete the bot authorization. Please scan the QR code again.","\u9489\u9489\u6388\u6743\u72B6\u6001\u6682\u65F6\u4E0D\u53EF\u7528\uFF0C\u6B63\u5728\u91CD\u8BD5\u3002":"The DingTalk authorization status is temporarily unavailable. Retrying.","\u9489\u9489\u5DF2\u6388\u6743\uFF0C\u4F46\u65E0\u6CD5\u5B89\u5168\u4FDD\u5B58\u63A5\u5165\u914D\u7F6E\u3002":"DingTalk authorization succeeded, but the configuration could not be saved safely.","\u9489\u9489\u6388\u6743\u67E5\u8BE2\u6682\u65F6\u5931\u8D25\uFF0C\u6B63\u5728\u91CD\u8BD5\u3002":"The DingTalk authorization query failed temporarily. Retrying.","\u9489\u9489\u673A\u5668\u4EBA\uFF08{clientId}\uFF09":"DingTalk bot ({clientId})","\u9489\u9489 Stream \u6D88\u606F\u8FDE\u63A5\u8FD0\u884C\u6B63\u5E38":"The DingTalk Stream message connection is running normally",\u9489\u9489\u6D88\u606F\u8FDE\u63A5\u5F53\u524D\u79BB\u7EBF:"The DingTalk message connection is currently offline"};var x4={"/menu \u6216 /m \u6253\u5F00\u53EF\u70B9\u51FB\u7684\u529F\u80FD\u83DC\u5355":"/menu or /m Open the interactive menu",\u4FDD\u6301\u5F53\u524D:"Keep current",\u4F1A\u8BDD:"Session",\u6A21\u578B:"Model",\u9884\u8BBE:"Preset",\u8DDF\u968F\u9ED8\u8BA4\u6A21\u578B:"Default model","\u8DDF\u968F Host \u9ED8\u8BA4":"Follow Host default",\u65B0\u4F1A\u8BDD:"New session",\u4E0A\u4E00\u9875:"Previous",\u4E0B\u4E00\u9875:"Next",\u8FD4\u56DE:"Back","\u66F4\u591A\u9009\u9879\u2026":"More options\u2026","\u9009\u62E9\u4F1A\u8BDD\u3001\u6A21\u578B\u6216\u9884\u8BBE\u540E\uFF0C\u70B9\u51FB\u5E94\u7528\u8BBE\u7F6E\u3002":"Choose a session, model or preset, then apply settings.",\u5E94\u7528\u8BBE\u7F6E:"Apply settings",\u5DE5\u4F5C\u533A\u4E0E\u4EFB\u52A1:"Workspace & tasks",\u5E94\u7528\u9009\u62E9:"Apply selection","\u8BF7\u9009\u62E9\u4E00\u4E2A\u9009\u9879\u540E\u518D\u5E94\u7528\u3002":"Select one option before applying.","\u8BBE\u7F6E\u672A\u6539\u53D8\u3002":"Settings unchanged.","\u5DF2\u6536\u5230\u64CD\u4F5C\uFF0C\u8BF7\u67E5\u770B\u4E0B\u65B9\u7ED3\u679C\u3002":"Action received. See the result below.",\u91CD\u65B0\u6253\u5F00\u83DC\u5355:"Reopen menu","\u6682\u65E0\u53EF\u7528\u9009\u9879\u3002":"No options are available.","\u9884\u8BBE\u4EC5\u7528\u4E8E\u4E4B\u540E\u7684\u65B0\u4F1A\u8BDD\u3002":"Presets apply to future new sessions.","\u90E8\u5206\u6A21\u578B\u6682\u4E0D\u53EF\u7528\uFF0C\u53EF\u7A0D\u540E\u91CD\u8BD5\u3002":"Some models are unavailable. Try again later.","\u5DE5\u4F5C\u533A\u5DF2\u53D8\u5316\uFF0C\u8BF7\u53D1\u9001 /m \u91CD\u65B0\u6253\u5F00\u83DC\u5355\u540E\u9009\u62E9\u3002":"The workspace changed. Send /m to reopen the menu and select again.","\u4F01\u4E1A\u5FAE\u4FE1\u673A\u5668\u4EBA\u5DF2\u8FDE\u63A5 DeepSeek Harness\u3002":"The Enterprise WeChat bot is connected to DeepSeek Harness.","\u5F53\u524D\u5F85\u5904\u7406\u56FE\u7247\u8F83\u591A\uFF0C\u8BF7\u7A0D\u540E\u91CD\u65B0\u53D1\u9001\u3002":"Too many images are pending. Please send them again later.","\u56FE\u7247 {indexes} \u6765\u81EA\u5F53\u524D\u6D88\u606F\u3002":"Images {indexes} are from the current message.","\u56FE\u7247 {indexes} \u6765\u81EA\u88AB\u5F15\u7528\u6D88\u606F\u3002\u56FE\u7247\u5E8F\u53F7\u4E0E\u672C\u8F6E\u9644\u4EF6\u6E05\u5355\u4E00\u81F4\u3002":"Images {indexes} are from the quoted message. Image numbers match the attachment list for this turn.","\u6709 {count} \u5F20\u5F15\u7528\u56FE\u7247\u672A\u63D0\u4F9B\u53EF\u4E0B\u8F7D\u8D44\u6E90\uFF0C\u672A\u9644\u4E0A\u8FD9\u4E9B\u56FE\u7247\uFF1B\u9700\u8981\u770B\u56FE\u65F6\u8BF7\u7528\u6237\u91CD\u65B0\u53D1\u9001\u3002":"{count} quoted images have no downloadable resource and are not attached. Ask the user to send them again if needed.","\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u5DF2\u751F\u6210\uFF0C\u4F46\u4F01\u4E1A\u5FAE\u4FE1\u667A\u80FD\u673A\u5668\u4EBA\u7F3A\u5C11\u7D20\u6750\u4E0A\u4F20\u6216\u6587\u4EF6\u6D88\u606F\u80FD\u529B\uFF0C\u8BF7\u68C0\u67E5\u673A\u5668\u4EBA\u6743\u9650\u3002":'The result file "{name}" was generated, but the Enterprise WeChat bot lacks media upload or file message capability. Please check the bot permissions.',"\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u8D85\u8FC7\u5F53\u524D\u4F01\u4E1A\u5FAE\u4FE1\u673A\u5668\u4EBA\u53EF\u53D1\u9001\u7684\u6587\u4EF6\u5927\u5C0F\uFF0C\u672A\u53D1\u9001\u3002":'The result file "{name}" exceeds the file size this Enterprise WeChat bot can send and was not sent.',"\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u4E3A\u7A7A\uFF0C\u4F01\u4E1A\u5FAE\u4FE1\u4E0D\u5141\u8BB8\u53D1\u9001\u7A7A\u6587\u4EF6\u3002":'The result file "{name}" is empty. Enterprise WeChat does not allow sending empty files.',"\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u6682\u65F6\u88AB\u4F01\u4E1A\u5FAE\u4FE1\u9650\u6D41\uFF0C\u672A\u80FD\u53D1\u9001\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002":'The result file "{name}" was rate-limited by Enterprise WeChat and could not be sent. Please try again later.',"\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u5DF2\u751F\u6210\uFF0C\u4F46\u4F01\u4E1A\u5FAE\u4FE1\u62D2\u7EDD\u4E86\u8BE5\u6587\u4EF6\u6216\u6587\u4EF6\u6D88\u606F\u3002":'The result file "{name}" was generated, but Enterprise WeChat rejected the file or file message.',"\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u5DF2\u751F\u6210\uFF0C\u4F46\u6682\u65F6\u672A\u80FD\u901A\u8FC7\u4F01\u4E1A\u5FAE\u4FE1\u53D1\u9001\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002":'The result file "{name}" was generated but could not be sent via Enterprise WeChat right now. Please try again later.',"\u4EFB\u52A1\u5DF2\u5B8C\u6210\uFF0C\u4F46\u6CA1\u6709\u751F\u6210\u53EF\u663E\u793A\u7684\u6587\u672C\u3002":"The task completed, but no displayable text was generated.","\u76EE\u524D\u652F\u6301\u6587\u5B57\u3001\u56FE\u7247\u548C\u8BED\u97F3\u8F6C\u5199\u6D88\u606F\u3002":"Currently only text, images, and voice transcription messages are supported.","\u4F01\u4E1A\u5FAE\u4FE1\u673A\u5668\u4EBA\u4E0E DeepSeek Harness \u8FDE\u63A5\u6B63\u5E38\u3002":"The connection between the Enterprise WeChat bot and DeepSeek Harness is working.","\u6B63\u5728\u601D\u8003\u4E2D\u2026":"Thinking\u2026","\u4F01\u4E1A\u5FAE\u4FE1\u4EA4\u4E92\u95EE\u9898\u53D1\u9001\u5931\u8D25\u3002":"Failed to send the Enterprise WeChat interaction question.","\u4F01\u4E1A\u5FAE\u4FE1\u673A\u5668\u4EBA\u51ED\u636E\u7F3A\u5931\uFF0C\u8BF7\u79FB\u9664\u540E\u91CD\u65B0\u626B\u7801\u3002":"The Enterprise WeChat bot credentials are missing. Please remove the bot and scan the QR code again.","\u4F01\u4E1A\u5FAE\u4FE1\u8FDE\u63A5\u672A\u5C31\u7EEA\uFF0C\u63D2\u4EF6\u4F1A\u81EA\u52A8\u91CD\u8BD5\u3002":"The Enterprise WeChat connection is not ready. The plugin will retry automatically.","\u626B\u7801\u7ED1\u5B9A\u5DF2\u53D6\u6D88\u3002":"QR code binding has been cancelled.","\u65E0\u6CD5\u751F\u6210\u4F01\u4E1A\u5FAE\u4FE1\u4E8C\u7EF4\u7801\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002":"Unable to generate the Enterprise WeChat QR code. Please try again later.","\u4F01\u4E1A\u5FAE\u4FE1\u4E8C\u7EF4\u7801\u5DF2\u8FC7\u671F\uFF0C\u8BF7\u91CD\u65B0\u751F\u6210\u3002":"The Enterprise WeChat QR code has expired. Please generate a new one.","\u4F01\u4E1A\u5FAE\u4FE1\u673A\u5668\u4EBA\u5DF2\u7ED1\u5B9A\uFF0C\u6D88\u606F\u8FDE\u63A5\u6682\u672A\u5C31\u7EEA\u3002":"The Enterprise WeChat bot is bound, but the message connection is not ready yet.","\u4F01\u4E1A\u5FAE\u4FE1\u8FDE\u63A5\u4ECD\u672A\u5C31\u7EEA\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002":"The Enterprise WeChat connection is still not ready. Please try again later.","\u4F01\u4E1A\u5FAE\u4FE1\u626B\u7801\u6CA1\u6709\u5B8C\u6210\uFF0C\u8BF7\u91CD\u65B0\u751F\u6210\u4E8C\u7EF4\u7801\u3002":"The Enterprise WeChat QR scan was not completed. Please generate a new QR code.","\u4F01\u4E1A\u5FAE\u4FE1\u626B\u7801\u670D\u52A1\u6682\u65F6\u4E0D\u53EF\u7528\uFF0C\u8BF7\u91CD\u65B0\u751F\u6210\u4E8C\u7EF4\u7801\u3002":"The Enterprise WeChat QR service is temporarily unavailable. Please generate a new QR code.","\u4F01\u4E1A\u5FAE\u4FE1\u5DF2\u6388\u6743\uFF0C\u4F46\u65E0\u6CD5\u5B89\u5168\u4FDD\u5B58\u63A5\u5165\u914D\u7F6E\u3002":"Enterprise WeChat authorization succeeded, but the connection configuration could not be saved safely.",\u4F01\u4E1A\u5FAE\u4FE1\u673A\u5668\u4EBA:"Enterprise WeChat bot","\u4F01\u4E1A\u5FAE\u4FE1\u673A\u5668\u4EBA\uFF08{botId}\uFF09":"Enterprise WeChat bot ({botId})","\u4F01\u4E1A\u5FAE\u4FE1 WebSocket \u957F\u8FDE\u63A5\u8FD0\u884C\u6B63\u5E38":"The Enterprise WeChat WebSocket long connection is running normally","\u4F01\u4E1A\u5FAE\u4FE1\u8FDE\u63A5\u672A\u5C31\u7EEA\uFF0C\u63D2\u4EF6\u4F1A\u81EA\u52A8\u91CD\u8BD5":"The Enterprise WeChat connection is not ready. The plugin will retry automatically",\u4F01\u4E1A\u5FAE\u4FE1\u8FDE\u63A5\u5F53\u524D\u79BB\u7EBF:"The Enterprise WeChat connection is currently offline"};var K4={\u4F01\u4E1A\u5FAE\u4FE1\u5E94\u7528:"WeCom app","\u4F01\u4E1A\u5FAE\u4FE1\u5E94\u7528\u51ED\u636E\u7F3A\u5931\uFF0C\u8BF7\u91CD\u65B0\u7ED1\u5B9A\u3002":"WeCom app credentials are missing; please bind the app again.","\u4F01\u4E1A\u5FAE\u4FE1\u5E94\u7528\u51ED\u636E\u4E0D\u5B8C\u6574\uFF0C\u8BF7\u91CD\u65B0\u7ED1\u5B9A\u3002":"WeCom app credentials are incomplete; please bind the app again.","\u4F01\u4E1A\u5FAE\u4FE1\u5E94\u7528\u8FDE\u63A5\u672A\u5C31\u7EEA\uFF0C\u63D2\u4EF6\u4F1A\u81EA\u52A8\u91CD\u8BD5\u3002":"The WeCom app connection is not ready; the plugin will retry automatically.","\u4F01\u4E1A\u5FAE\u4FE1\u5E94\u7528\u8FDE\u63A5\u672A\u5C31\u7EEA\uFF0C\u63D2\u4EF6\u4F1A\u81EA\u52A8\u91CD\u8BD5":"The WeCom app connection is not ready; the plugin will retry automatically","\u4F01\u4E1A\u5FAE\u4FE1\u5E94\u7528\u5DF2\u7ED1\u5B9A\uFF0C\u4F46\u5C1A\u672A\u5C31\u7EEA\u3002":"The WeCom app is bound but not ready yet.","\u4F01\u4E1A\u5FAE\u4FE1\u5E94\u7528\u5DF2\u66F4\u65B0\uFF0C\u4F46\u5C1A\u672A\u5C31\u7EEA\u3002":"The WeCom app settings were saved, but the connection is not ready yet.","\u4F01\u4E1A\u5FAE\u4FE1\u5E94\u7528\u4ECD\u672A\u5C31\u7EEA\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002":"The WeCom app is still not ready; please try again later.",\u4F01\u4E1A\u5FAE\u4FE1\u5E94\u7528\u5F53\u524D\u79BB\u7EBF:"The WeCom app is currently offline",\u4F01\u4E1A\u5FAE\u4FE1\u5E94\u7528\u56DE\u8C03\u901A\u9053\u5C31\u7EEA:"The WeCom app callback channel is ready","\u4F01\u4E1A\u5FAE\u4FE1\u5E94\u7528\uFF08{corpId}\uFF09":"WeCom app ({corpId})","\u8BF7\u8F93\u5165\u6B63\u786E\u7684\u4F01\u4E1A ID\uFF08\u4F8B\u5982 ww1234567890abcdef\uFF09\u3002":"Enter a valid corp ID (for example ww1234567890abcdef).","\u8BF7\u8F93\u5165\u6B63\u786E\u7684\u5E94\u7528 AgentId\uFF08\u7EAF\u6570\u5B57\uFF09\u3002":"Enter a valid AgentId (digits only).","\u5E94\u7528 Secret \u683C\u5F0F\u4E0D\u6B63\u786E\u3002":"The app Secret format is invalid.","\u56DE\u8C03 Token \u683C\u5F0F\u4E0D\u6B63\u786E\u3002":"The callback Token format is invalid.","EncodingAESKey \u5FC5\u987B\u662F 43 \u4F4D\u5B57\u6BCD\u6216\u6570\u5B57\u3002":"EncodingAESKey must be 43 alphanumeric characters.","\u4EE3\u7406\u5730\u5740\u5FC5\u987B\u662F http(s) \u5730\u5740":"The API proxy address must be an http(s) URL","\u4EE3\u7406\u5730\u5740\u5FC5\u987B\u662F http(s) \u5730\u5740\u3002":"The API proxy address must be an http(s) URL.","\u56DE\u8C03\u57FA\u5740\u5FC5\u987B\u662F http(s) \u5730\u5740":"The callback base URL must be an http(s) URL","\u56DE\u8C03\u57FA\u5740\u5FC5\u987B\u662F http(s) \u5730\u5740\u3002":"The callback base URL must be an http(s) URL.","\u56DE\u8C03\u5BC6\u94A5\u5DF2\u91CD\u7F6E\uFF0C\u4F46\u673A\u5668\u4EBA\u91CD\u542F\u5931\u8D25\uFF0C\u8BF7\u624B\u52A8\u91CD\u8FDE\u3002":"The callback secret was reset, but the bot failed to restart; please reconnect manually.","\u4F01\u4E1A\u5FAE\u4FE1\u5E94\u7528\u4EA4\u4E92\u95EE\u9898\u53D1\u9001\u5931\u8D25\u3002":"Failed to send the WeCom app interaction question.","\u4F01\u4E1A\u5FAE\u4FE1\u5E94\u7528\u76EE\u524D\u652F\u6301\u6587\u5B57\u548C\u56FE\u7247\u6D88\u606F\u3002":"The WeCom app currently supports text and image messages.","\u4F01\u4E1A\u5FAE\u4FE1\u5E94\u7528\u5DF2\u8FDE\u63A5 DeepSeek Harness\uFF0C\u53EF\u5728\u5FAE\u4FE1\u4E2D\u76F4\u63A5\u4F7F\u7528\u3002":"The WeCom app is connected to DeepSeek Harness and works directly inside WeChat.","\u4F01\u4E1A\u5FAE\u4FE1\u5E94\u7528\u5DF2\u8FDE\u63A5 DeepSeek Harness\u3002\u76F4\u63A5\u53D1\u9001\u6587\u5B57\u6216\u56FE\u7247\u5373\u53EF\u5F00\u59CB\uFF0C\u53D1\u9001 /help \u67E5\u770B\u53EF\u7528\u547D\u4EE4\u3002":"The WeCom app is connected to DeepSeek Harness. Send text or images to start, or send /help for available commands.","\u4F01\u4E1A\u5FAE\u4FE1\u5E94\u7528\u4E0E DeepSeek Harness \u8FDE\u63A5\u6B63\u5E38\u3002":"The WeCom app and DeepSeek Harness are connected.","\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u5DF2\u751F\u6210\uFF0C\u4F46\u4F01\u4E1A\u5FAE\u4FE1\u5E94\u7528\u5F53\u524D\u6CA1\u6709\u6587\u4EF6\u6D88\u606F\u53D1\u9001\u6743\u9650\uFF0C\u8BF7\u68C0\u67E5\u5E94\u7528\u7684\u6587\u4EF6\u53D1\u9001\u80FD\u529B\u3002":'The result file "{name}" was generated, but the WeCom app currently lacks file-message permission; check the app file capability.',"\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u8D85\u8FC7\u4F01\u4E1A\u5FAE\u4FE1\u53EF\u53D1\u9001\u7684\u6587\u4EF6\u5927\u5C0F\uFF0C\u672A\u53D1\u9001\u3002":'The result file "{name}" exceeds the WeCom file size limit and was not sent.',"\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u5DF2\u751F\u6210\uFF0C\u4F46\u4F01\u4E1A\u5FAE\u4FE1\u62D2\u7EDD\u4E86\u8BE5\u6587\u4EF6\u6D88\u606F\u3002":'The result file "{name}" was generated, but WeCom rejected the file message.',"\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u53D1\u9001\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002":'The result file "{name}" failed to send; please try again later.'};var Y4={"\u65E0\u6CD5\u8BFB\u53D6 QQ \u672C\u5730\u72B6\u6001\uFF0C\u8BF7\u68C0\u67E5\u6570\u636E\u76EE\u5F55\u53CA\u8BBF\u95EE\u6743\u9650\u3002":"Unable to read local QQ state. Check the data directory and access permissions.","QQ \u672C\u5730\u72B6\u6001\u5DF2\u635F\u574F\uFF0C\u4F46\u65E0\u6CD5\u5907\u4EFD\uFF0C\u539F\u6587\u4EF6\u5DF2\u4FDD\u7559\u3002":"Local QQ state is corrupt and could not be backed up. The original file has been preserved.","\u65E0\u6CD5\u4FDD\u5B58 QQ \u672C\u5730\u72B6\u6001\uFF0C\u8BF7\u68C0\u67E5\u78C1\u76D8\u7A7A\u95F4\u53CA\u76EE\u5F55\u5199\u5165\u6743\u9650\u3002":"Unable to save local QQ state. Check disk space and directory write permissions.",\u8FD4\u56DE\u4E3B\u83DC\u5355:"Back to main menu","\u6A21\u5F0F\uFF0F\u9884\u8BBE":"Mode / preset",\u5F52\u6863\u663E\u793A:"Archived sessions","\u7B2C {page} / {pages} \u9875":"Page {page} / {pages}","\u5F53\u524D\u4F1A\u8BDD\uFF1A{session}":"Current session: {session}","\u6A21\u5F0F\uFF0F\u9884\u8BBE\uFF1A{preset}":"Mode / preset: {preset}","\u5F53\u524D\u6A21\u578B\uFF1A{model}":"Current model: {model}",\u6682\u4E0D\u53EF\u7528:"Unavailable","\u5F52\u6863\u4F1A\u8BDD\uFF1A{state}":"Archived sessions: {state}",\u663E\u793A:"Shown",\u9690\u85CF:"Hidden","\u4EFB\u52A1\u72B6\u6001\uFF1A{state}":"Task status: {state}",\u5904\u7406\u4E2D:"Processing",\u7A7A\u95F2:"Idle","\u90E8\u5206\u8BBE\u7F6E\u6682\u672A\u52A0\u8F7D\uFF0C\u53EF\u8FDB\u5165\u5BF9\u5E94\u5217\u8868\u91CD\u8BD5\u3002":"Some settings could not be loaded. Open the corresponding list to retry.","\u{1F4AC} \u4F1A\u8BDD\u9009\u62E9":"\u{1F4AC} Select session","\u{1F4C1} \u5DE5\u4F5C\u533A":"\u{1F4C1} Workspace","\u{1F916} \u6A21\u5F0F\uFF0F\u9884\u8BBE":"\u{1F916} Mode / preset","\u{1F9E0} \u6A21\u578B":"\u{1F9E0} Model","\u{1F4AC} \u8865\u5145\u6307\u4EE4":"\u{1F4AC} Steer task","\u7ED9\u5F53\u524D\u6B63\u5728\u8FD0\u884C\u7684\u4EFB\u52A1\u8865\u5145\u6307\u4EE4\u3002":"Send an additional instruction to the running task.",\u81EA\u5B9A\u4E49\u6307\u4EE4:"Custom instruction","\u8BF7\u53D1\u9001 /steer \u4F60\u7684\u8865\u5145\u6307\u4EE4\u3002":"Send /steer followed by your instruction.","\u53D1\u9001 /m \u6253\u5F00\u52A9\u624B\u4E2D\u5FC3\uFF0C\u70B9\u51FB\u6309\u94AE\u6216\u56DE\u590D\u5F53\u524D\u5217\u8868\u7684\u6570\u5B57\u9009\u62E9\u3002":"Send /m to open the assistant menu. Click a button or reply with a number from the current list.","\u8BBE\u7F6E\uFF1A\u4F1A\u8BDD\u3001\u5DE5\u4F5C\u533A\u3001\u6A21\u5F0F\uFF0F\u9884\u8BBE\u3001\u6A21\u578B\u3002":"Settings: session, workspace, mode / preset, model.","\u4F1A\u8BDD\uFF1A\u65B0\u4F1A\u8BDD\u3001\u4F1A\u8BDD\u5217\u8868\u3001\u5F52\u6863\u663E\u793A\u5207\u6362\u3002":"Sessions: new session, session list, show or hide archived sessions.","\u4EFB\u52A1\uFF1A\u505C\u6B62\u3001\u538B\u7F29\u3001\u6E05\u7A7A\u4E0A\u4E0B\u6587\u3001\u5FEB\u6377\u6216\u81EA\u5B9A\u4E49\u8865\u5145\u6307\u4EE4\u3002":"Tasks: stop, compact, clear context, quick or custom steering instructions.","\u4FE1\u606F\uFF1A\u72B6\u6001\u3001\u5E2E\u52A9\u3002":"Information: status, help.","\u83DC\u5355\u6709\u6548\u671F\u4E3A 15 \u5206\u949F\uFF1B\u53D1\u9001\u666E\u901A\u6D88\u606F\u4F1A\u9000\u51FA\u6570\u5B57\u9009\u62E9\u3002":"Menus expire after 15 minutes. Sending an ordinary message exits number selection.","\u56DE\u7B54\u95EE\u9898\u3001\u5BA1\u6279\u548C\u6279\u91CF\u8F93\u5165\u65F6\uFF0C\u6570\u5B57\u4F18\u5148\u7528\u4E8E\u5F53\u524D\u4EA4\u4E92\u3002":"During questions, approvals and batch input, numbers belong to that interaction.","\u5B8C\u6574\u547D\u4EE4\u8BF4\u660E\uFF1A/help":"Full command reference: /help","\u5F53\u524D\u65E0\u6CD5\u5C55\u793A\u6309\u94AE\uFF0C\u8BF7\u56DE\u590D\u6570\u5B57\u9009\u62E9\u3002":"Buttons are unavailable. Reply with a number to select.","\u70B9\u51FB\u6309\u94AE\u6216\u56DE\u590D\u6570\u5B57\u9009\u62E9\uFF0C/m \u8FD4\u56DE\u4E3B\u83DC\u5355\u3002":"Click a button or reply with a number. Send /m for the main menu.","\u56DE\u7B54\u95EE\u9898\u3001\u5BA1\u6279\u548C\u6279\u91CF\u8F93\u5165\u65F6\uFF0C\u8BF7\u5148\u5B8C\u6210\u5F53\u524D\u4EA4\u4E92\u3002":"Finish any pending question, approval or batch input before replying with a menu number.",\u5DF2\u9009\u62E9:"Selected","\u8BF7\u56DE\u590D\u6570\u5B57\u9009\u62E9\uFF0C\u6216\u53D1\u9001 /m \u91CD\u65B0\u6253\u5F00\u83DC\u5355\u3002":"Reply with a number or send /m to reopen the menu.","\u5F53\u524D\u6B63\u5728\u6279\u91CF\u8F93\u5165\uFF0C\u8BF7\u5148\u53D1\u9001 /send \u6216 /cancel\uFF0C\u518D\u6253\u5F00\u83DC\u5355\u3002":"Batch input is active. Send /send or /cancel before opening the menu.","\u83DC\u5355\u547D\u4EE4\u65E0\u6548\uFF0C\u8BF7\u53D1\u9001 /m \u91CD\u65B0\u6253\u5F00\u3002":"Invalid menu command. Send /m to reopen the menu.","\u5F53\u524D\u4EFB\u52A1\u4ECD\u5728\u8FD0\u884C\uFF0C\u8BF7\u5148\u505C\u6B62\u4EFB\u52A1\u6216\u7B49\u5F85\u4EFB\u52A1\u5B8C\u6210\u540E\u518D\u6267\u884C\u6B64\u64CD\u4F5C\u3002":"A task is still running. Stop it or wait for it to finish before performing this action.","QQ \u673A\u5668\u4EBA\u5DF2\u8FDE\u63A5 DeepSeek Harness\u3002":"The QQ bot is connected to DeepSeek Harness.","\u56DE\u7B54\u8F83\u957F\uFF0C\u540E\u7EED\u5185\u5BB9\u672A\u80FD\u901A\u8FC7 QQ \u5B8C\u6574\u53D1\u9001\uFF0C\u8BF7\u56DE\u590D\u201C\u7EE7\u7EED\u201D\u3002":"The answer is long and the rest could not be sent fully through QQ. Reply \u201C\u7EE7\u7EED\u201D (continue) to receive it.","\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u5DF2\u751F\u6210\uFF0C\u4F46 QQ \u4ECA\u65E5\u6587\u4EF6\u4E0A\u4F20\u989D\u5EA6\u5DF2\u7528\u5B8C\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002":`The result file "{name}" was generated, but QQ's daily file upload quota is used up. Please try again later.`,"\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u5DF2\u751F\u6210\uFF0C\u4F46\u5F53\u524D QQ \u673A\u5668\u4EBA\u6CA1\u6709\u6587\u4EF6\u6D88\u606F\u6743\u9650\u3002":'The result file "{name}" was generated, but the current QQ bot does not have file message permission.',"\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u8D85\u8FC7\u5F53\u524D QQ \u673A\u5668\u4EBA\u53EF\u53D1\u9001\u7684\u6587\u4EF6\u5927\u5C0F\uFF0C\u672A\u53D1\u9001\u3002":'The result file "{name}" exceeds the file size the current QQ bot can send and was not sent.',"\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u4E3A\u7A7A\uFF0CQQ \u4E0D\u5141\u8BB8\u53D1\u9001\u7A7A\u6587\u4EF6\u3002":'The result file "{name}" is empty, and QQ does not allow sending empty files.',"\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u6682\u65F6\u88AB QQ \u9650\u6D41\uFF0C\u672A\u80FD\u53D1\u9001\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002":'The result file "{name}" was temporarily rate-limited by QQ and was not sent. Please try again later.',"\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u5DF2\u751F\u6210\uFF0C\u4F46 QQ \u62D2\u7EDD\u4E86\u8BE5\u6587\u4EF6\u6216\u6587\u4EF6\u6D88\u606F\u3002":'The result file "{name}" was generated, but QQ rejected the file or file message.',"\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u5DF2\u751F\u6210\uFF0C\u4F46\u6682\u65F6\u672A\u80FD\u901A\u8FC7 QQ \u53D1\u9001\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002":'The result file "{name}" was generated but could not be sent via QQ right now. Please try again later.',"QQ \u673A\u5668\u4EBA\u4E0E DeepSeek Harness \u8FDE\u63A5\u6B63\u5E38\u3002":"The QQ bot is connected to DeepSeek Harness normally.","QQ \u4EA4\u4E92\u95EE\u9898\u53D1\u9001\u5931\u8D25\u3002":"Failed to send the QQ interaction question.","QQ \u673A\u5668\u4EBA\u51ED\u636E\u7F3A\u5931\uFF0C\u8BF7\u79FB\u9664\u540E\u91CD\u65B0\u626B\u7801\u3002":"The QQ bot credentials are missing. Remove the bot and scan the QR code again.","QQ \u8FDE\u63A5\u672A\u5C31\u7EEA\uFF0C\u63D2\u4EF6\u4F1A\u81EA\u52A8\u91CD\u8BD5\u3002":"The QQ connection is not ready; the plugin will retry automatically.","QQ \u626B\u7801\u670D\u52A1\u6682\u65F6\u4E0D\u53EF\u7528\uFF0C\u8BF7\u91CD\u65B0\u751F\u6210\u4E8C\u7EF4\u7801\u3002":"The QQ QR service is temporarily unavailable. Please generate a new QR code.","\u65E0\u6CD5\u751F\u6210 QQ \u4E8C\u7EF4\u7801\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002":"Unable to generate the QQ QR code. Please try again later.","QQ \u673A\u5668\u4EBA\u5DF2\u7ED1\u5B9A\uFF0C\u6D88\u606F\u8FDE\u63A5\u6682\u672A\u5C31\u7EEA\u3002":"The QQ bot is bound, but the message connection is not ready yet.","QQ \u8FDE\u63A5\u4ECD\u672A\u5C31\u7EEA\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002":"The QQ connection is still not ready. Please try again later.",QQ\u673A\u5668\u4EBA\u5C1A\u672A\u8FDE\u63A5:"The QQ bot is not connected yet","QQ \u673A\u5668\u4EBA\uFF08{appId}\uFF09":"QQ bot ({appId})",QQ\u673A\u5668\u4EBA:"QQ bot","QQ WebSocket \u957F\u8FDE\u63A5\u8FD0\u884C\u6B63\u5E38":"The QQ WebSocket long connection is running normally","QQ \u8FDE\u63A5\u672A\u5C31\u7EEA\uFF0C\u63D2\u4EF6\u4F1A\u81EA\u52A8\u91CD\u8BD5":"The QQ connection is not ready; the plugin will retry automatically","QQ \u8FDE\u63A5\u5F53\u524D\u79BB\u7EBF":"The QQ connection is currently offline","QQ \u5DF2\u6388\u6743\uFF0C\u4F46\u65E0\u6CD5\u5B89\u5168\u4FDD\u5B58\u63A5\u5165\u914D\u7F6E\u3002":"QQ authorization succeeded, but the connection configuration could not be saved safely."};var OS={"\u5FAE\u4FE1\u914D\u7F6E\u683C\u5F0F\u9519\u8BEF\uFF1A{file}\u3002\u8BF7\u67E5\u770B\u8BCA\u65AD\u8BE6\u60C5\uFF0C\u4FEE\u590D\u540E\u91CD\u542F DSH\u3002":"The WeChat configuration is invalid: {file}. See the diagnostic details, fix the file, and restart DSH.",\u914D\u7F6E\u6587\u4EF6:"Configuration file",\u914D\u7F6E\u5B57\u6BB5:"Configuration field",\u6821\u9A8C\u539F\u56E0:"Validation issue","\u5E94\u4E3A JSON \u5BF9\u8C61\u3002":"Expected a JSON object.","\u5E94\u4E3A JSON \u6570\u7EC4\u3002":"Expected a JSON array.","\u914D\u7F6E\u7248\u672C\u7F3A\u5931\u6216\u4E0D\u53D7\u5F53\u524D\u63D2\u4EF6\u652F\u6301\u3002":"The configuration version is missing or unsupported by this plugin.","\u5B57\u6BB5\u7F3A\u5931\u6216\u4E0D\u662F\u975E\u7A7A\u5B57\u7B26\u4E32\u3002":"The field is missing or is not a non-empty string.","\u6807\u8BC6\u7B26\u683C\u5F0F\u4E0D\u7B26\u5408\u8981\u6C42\u3002":"The identifier has an invalid format.","\u6807\u8BC6\u7B26\u4E0E accountId \u6D3E\u751F\u7ED3\u679C\u4E0D\u4E00\u81F4\u3002":"The identifier does not match the value derived from accountId.","\u8D26\u53F7\u6807\u8BC6\u91CD\u590D\u3002":"The account identifier is duplicated.","\u5FAE\u4FE1\u670D\u52A1\u5730\u5740\u4E0D\u662F\u6709\u6548 URL\u3002":"The WeChat service address is not a valid URL.","\u5FAE\u4FE1\u670D\u52A1\u5730\u5740\u5FC5\u987B\u4F7F\u7528\u53D7\u4FE1\u4EFB\u7684 HTTPS \u57DF\u540D\u548C\u7AEF\u53E3\u3002":"The WeChat service address must use a trusted HTTPS domain and port.","\u5DE5\u4F5C\u533A\u8DEF\u5F84\u5FC5\u987B\u662F\u5F53\u524D\u64CD\u4F5C\u7CFB\u7EDF\u7684\u7EDD\u5BF9\u8DEF\u5F84\u3002":"The workspace path must be absolute on the current operating system.","Agent Preset \u6807\u8BC6\u65E0\u6548\u3002":"The Agent Preset identifier is invalid.","\u6A21\u578B\u8BBE\u7F6E\u987B\u5305\u542B\u6709\u6548\u7684 provider\u3001model \u548C\u53EF\u9009 reasoningEffort\u3002":"Model settings require valid provider and model fields, with an optional valid reasoningEffort.","\u6295\u9012\u76EE\u6807\u7684\u6807\u8BC6\u3001\u7ED3\u6784\u6216\u8DEF\u7531\u4E0D\u7B26\u5408\u5F53\u524D\u914D\u7F6E\u7248\u672C\u8981\u6C42\u3002":"The delivery target identifier, structure or route is invalid for this configuration version.","\u5F53\u524D\u914D\u7F6E\u7248\u672C\u4E0D\u5141\u8BB8\u6B64\u5B57\u6BB5\u3002":"This field is not allowed in this configuration version.","JSON \u8BED\u6CD5\u65E0\u6548\u3002":"The JSON syntax is invalid.","\u8BF7\u68C0\u67E5\u5FAE\u4FE1\u6E20\u9053\u6570\u636E\u76EE\u5F55\u4E2D\u7684 {file}\uFF0C\u4FEE\u590D\u540E\u91CD\u542F DSH\uFF1B\u201C\u91CD\u65B0\u8BFB\u53D6\u201D\u4E0D\u4F1A\u91CD\u65B0\u52A0\u8F7D\u914D\u7F6E\u3002":"Check {file} in the WeChat channel data directory, fix it, and restart DSH; refreshing the status does not reload configuration.","\u5B57\u6BB5\u4F4D\u7F6E\u4E2D\u7684\u5E8F\u53F7\u4ECE 0 \u5F00\u59CB\uFF0C\u6309\u6587\u4EF6\u4E2D\u7684\u6761\u76EE\u987A\u5E8F\u8BA1\u6570\uFF0C\u4E0D\u5305\u542B\u771F\u5B9E\u8D26\u53F7\u6807\u8BC6\u3002":"Field positions use zero-based entry order in the file without including actual account identifiers.",\u63D2\u4EF6\u7248\u672C:"Plugin version","DSH \u5FAE\u4FE1\u7BA1\u7406\u63A5\u53E3\u8FD4\u56DE\u4E86\u65E0\u6CD5\u8BC6\u522B\u7684\u54CD\u5E94\uFF0C\u8BF7\u91CD\u65B0\u8BFB\u53D6\u72B6\u6001\u3002":"The DSH WeChat management endpoint returned an invalid response. Refresh the status.","\u65E0\u6CD5\u8BFB\u53D6\u73B0\u6709\u767B\u5F55\u51ED\u636E\u3002\u8BF7\u68C0\u67E5 DSH \u51ED\u636E\u5B58\u50A8\u3002":"Could not read the saved login credential. Check the DSH credential store.","\u767B\u5F55\u51ED\u636E\u65E0\u6CD5\u5199\u5165 DSH \u51ED\u636E\u5B58\u50A8\u3002\u8BF7\u68C0\u67E5\u51ED\u636E\u5B58\u50A8\u662F\u5426\u53EF\u5199\u3002":"Could not save the login credential to DSH. Check whether the credential store is writable.","\u8D26\u53F7\u914D\u7F6E\u65E0\u6CD5\u5199\u5165\u672C\u673A\u3002\u8BF7\u68C0\u67E5 DSH_HOME \u76EE\u5F55\u6743\u9650\u3002":"Could not save the account configuration. Check permissions on DSH_HOME.","\u65E0\u6CD5\u521D\u59CB\u5316\u8D26\u53F7\u72B6\u6001\u6216\u5DE5\u4F5C\u533A\u3002\u8BF7\u68C0\u67E5 DSH_HOME \u548C\u5DE5\u4F5C\u533A\u76EE\u5F55\u3002":"Could not prepare the account state or workspace. Check DSH_HOME and the workspace directory.","\u63D2\u4EF6\u65E0\u6CD5\u8FDE\u63A5\u5F53\u524D Harness\uFF0C\u8BF7\u68C0\u67E5\u5BBF\u4E3B\u662F\u5426\u5DF2\u5C31\u7EEA\u3002":"The plugin could not connect to this Harness. Check whether the host is ready.","Harness \u5065\u5EB7\u68C0\u67E5\u8D85\u65F6\u3002\u8BF7\u786E\u8BA4 dsh web \u672A\u963B\u585E\u3002":"The Harness health check timed out. Check whether the host is responsive.","Harness \u5065\u5EB7\u68C0\u67E5\u9700\u8981\u8EAB\u4EFD\u8BA4\u8BC1\u3002\u8BF7\u68C0\u67E5\u4EE3\u7406\u3001\u7F51\u5173\u6216\u81EA\u5B9A\u4E49\u9274\u6743\u914D\u7F6E\u3002":"The Harness health check requires authentication. Check proxy, gateway or custom authentication settings.","\u672C\u673A Harness \u8BF7\u6C42\u88AB\u4EE3\u7406\u8981\u6C42\u8BA4\u8BC1\u3002\u8BF7\u8BA9\u56DE\u73AF\u5730\u5740\u7ED5\u8FC7\u4EE3\u7406\uFF0C\u5E76\u68C0\u67E5 NO_PROXY \u914D\u7F6E\u3002":"The proxy requires authentication for the local Harness request. Bypass the proxy for loopback addresses and check NO_PROXY.","Harness \u5F02\u5E38\u62D2\u7EDD\u4E86\u56DE\u73AF\u5730\u5740\u7684\u5065\u5EB7\u68C0\u67E5\u3002\u8BF7\u68C0\u67E5 HTTP \u4EE3\u7406\u3001Harness \u6E90\u7801\u7248\u672C\u548C\u6784\u5EFA\u4EA7\u7269\u3002":"Harness rejected a loopback health check. Check the HTTP proxy and the running Harness build.","Harness \u7684 Host \u4FE1\u4EFB\u68C0\u67E5\u62D2\u7EDD\u4E86\u975E\u56DE\u73AF\u5730\u5740\u8BF7\u6C42\u3002\u8BF7\u68C0\u67E5 harnessBaseUrl \u4E0E trustedHosts \u914D\u7F6E\u3002":"Harness rejected the non-loopback Host. Check harnessBaseUrl and trustedHosts.","\u5065\u5EB7\u68C0\u67E5\u6536\u5230\u4E86\u975E Harness \u6807\u51C6\u7684 403 \u62D2\u7EDD\u54CD\u5E94\u3002\u8BF7\u68C0\u67E5\u4EE3\u7406\u6216\u7F51\u5173\u914D\u7F6E\u3002":"The health check received a non-standard HTTP 403 response. Check proxy or gateway settings.","\u627E\u4E0D\u5230 Harness \u5065\u5EB7\u68C0\u67E5\u63A5\u53E3\u3002\u8BF7\u786E\u8BA4 Harness \u4E0E\u63D2\u4EF6\u7248\u672C\u517C\u5BB9\u3002":"The Harness health check endpoint was not found. Check Harness and plugin compatibility.","Harness \u5065\u5EB7\u68C0\u67E5\u8FD4\u56DE\u670D\u52A1\u9519\u8BEF\u3002\u8BF7\u67E5\u770B DSH \u65E5\u5FD7\u3002":"The Harness health check returned a service error. Check the DSH logs.","Harness \u8FD4\u56DE\u4E86\u65E0\u6CD5\u8BC6\u522B\u7684\u54CD\u5E94\u3002\u8BF7\u786E\u8BA4 Harness \u4E0E\u63D2\u4EF6\u7248\u672C\u517C\u5BB9\u3002":"Harness returned an unrecognized response. Check Harness and plugin compatibility.","Harness \u62D2\u7EDD\u4E86\u5065\u5EB7\u68C0\u67E5\u8BF7\u6C42\u3002\u8BF7\u67E5\u770B DSH \u65E5\u5FD7\u3002":"Harness rejected the health check. Check the DSH logs.","Harness \u5065\u5EB7\u68C0\u67E5\u53D1\u751F\u672A\u77E5\u9519\u8BEF\u3002\u8BF7\u67E5\u770B DSH \u65E5\u5FD7\u3002":"The Harness health check failed with an unknown error. Check the DSH logs.","\u6D88\u606F\u8FDE\u63A5\u521D\u59CB\u5316\u5931\u8D25\u3002\u8BF7\u67E5\u770B DSH \u65E5\u5FD7\u540E\u91CD\u8BD5\u3002":"The message connection could not start. Check the DSH logs and retry.","\u6682\u65F6\u65E0\u6CD5\u8BBF\u95EE\u5FAE\u4FE1\u670D\u52A1\u3002":"The WeChat service is temporarily unreachable.","\u5FAE\u4FE1\u670D\u52A1\u8BF7\u6C42\u8D85\u65F6\u3002":"The WeChat service request timed out.","\u5FAE\u4FE1\u670D\u52A1\u8BF7\u6C42\u5931\u8D25\uFF08HTTP {status}\uFF09\u3002":"The WeChat service request failed (HTTP {status}).","\u5FAE\u4FE1\u670D\u52A1\u8FD4\u56DE\u4E86\u65E0\u6CD5\u89E3\u6790\u7684\u54CD\u5E94\u3002":"The WeChat service returned an unparseable response.","\u5FAE\u4FE1\u670D\u52A1\u6CA1\u6709\u8FD4\u56DE\u6709\u6548\u4E8C\u7EF4\u7801\u3002":"The WeChat service did not return a valid QR code.","\u5FAE\u4FE1\u670D\u52A1\u8FD4\u56DE\u4E86\u4E0D\u53D7\u4FE1\u4EFB\u7684\u626B\u7801\u5730\u5740\u3002":"The WeChat service returned an untrusted QR-code URL.","\u5FAE\u4FE1\u670D\u52A1\u8FD4\u56DE\u4E86\u65E0\u6548\u7684\u8FDE\u63A5\u5730\u5740\u3002":"The WeChat service returned an invalid connection URL.","\u5FAE\u4FE1\u670D\u52A1\u8FD4\u56DE\u4E86\u4E0D\u53D7\u4FE1\u4EFB\u7684\u8FDE\u63A5\u5730\u5740\u3002":"The WeChat service returned an untrusted connection URL.","\u62D2\u7EDD\u8BBF\u95EE\u4E0D\u53D7\u4FE1\u4EFB\u7684\u5FAE\u4FE1\u670D\u52A1\u5730\u5740\u3002":"Refusing to access an untrusted WeChat service URL.","\u5FAE\u4FE1\u670D\u52A1\u8FD4\u56DE\u4E86\u65E0\u6CD5\u8BC6\u522B\u7684\u626B\u7801\u72B6\u6001\u3002":"The WeChat service returned an unrecognized QR-code status.","\u5FAE\u4FE1\u6388\u6743\u6210\u529F\uFF0C\u4F46\u8FD4\u56DE\u7684\u8D26\u53F7\u51ED\u636E\u4E0D\u5B8C\u6574\u3002":"WeChat authorized the account but returned incomplete credentials.","\u5FAE\u4FE1\u670D\u52A1\u62D2\u7EDD\u4E86\u4E8C\u7EF4\u7801\u7533\u8BF7\u3002":"The WeChat service rejected the QR-code request.","\u5DF2\u53D6\u5F97\u626B\u7801\u5730\u5740\uFF0C\u4F46\u672C\u673A\u4E8C\u7EF4\u7801\u56FE\u7247\u751F\u6210\u5931\u8D25\u3002":"The login URL was obtained, but the QR-code image could not be generated locally.","\u65E0\u6CD5\u751F\u6210\u5FAE\u4FE1\u4E8C\u7EF4\u7801\u3002":"Could not generate a WeChat QR code.","\u8FD9\u6B21\u5FAE\u4FE1\u7ED1\u5B9A\u4EFB\u52A1\u5DF2\u4E0D\u5B58\u5728\uFF0C\u8BF7\u91CD\u65B0\u8BFB\u53D6\u72B6\u6001\u6216\u751F\u6210\u4E8C\u7EF4\u7801\u3002":"This WeChat setup attempt no longer exists. Refresh the status or generate a new QR code.","\u8FD9\u6B21\u5FAE\u4FE1\u7ED1\u5B9A\u4EFB\u52A1\u5F53\u524D\u4E0D\u80FD\u63D0\u4EA4\u914D\u5BF9\u7801\uFF0C\u8BF7\u91CD\u65B0\u8BFB\u53D6\u72B6\u6001\u3002":"This setup attempt is not waiting for a pairing code. Refresh the status.","\u767B\u5F55\u51ED\u636E\u7F3A\u5931\uFF0C\u8BF7\u79FB\u9664\u8D26\u53F7\u540E\u91CD\u65B0\u626B\u7801\u3002":"The login credential is missing. Remove the account and scan a new QR code.","\u5FAE\u4FE1\u767B\u5F55\u51ED\u636E\u5DF2\u5931\u6548\uFF0C\u8BF7\u79FB\u9664\u8D26\u53F7\u540E\u91CD\u65B0\u626B\u7801\u3002":"The WeChat login credential has expired. Remove the account and scan a new QR code.","\u65E0\u6CD5\u4ECE DSH \u51ED\u636E\u5B58\u50A8\u79FB\u9664\u5FAE\u4FE1\u767B\u5F55\u51ED\u636E\u3002":"Could not remove the WeChat login credential from the DSH credential store.","\u5FAE\u4FE1\u8D26\u53F7\u914D\u7F6E\u79FB\u9664\u5931\u8D25\u3002":"Could not remove the WeChat account configuration.","\u65E0\u6CD5\u8BFB\u53D6\u5FAE\u4FE1\u8D26\u53F7\u72B6\u6001\u6587\u4EF6\u3002":"Could not read the WeChat account state file.","\u65E0\u6CD5\u4FDD\u5B58\u5FAE\u4FE1\u8D26\u53F7\u72B6\u6001\u6587\u4EF6\u3002":"Could not save the WeChat account state file.","\u5FAE\u4FE1\u8D26\u53F7\u5DF2\u79FB\u9664\uFF0C\u4F46\u672C\u673A\u72B6\u6001\u6587\u4EF6\u6E05\u7406\u5931\u8D25\u3002":"The WeChat account was removed, but its local state file could not be cleaned up.","\u65E0\u6CD5\u4FDD\u5B58\u5FAE\u4FE1\u5DE5\u4F5C\u533A\u8BBE\u7F6E\u3002":"Could not save the WeChat workspace settings.","\u5FAE\u4FE1\u8D26\u53F7\u5DF2\u79FB\u9664\uFF0C\u4F46\u5DE5\u4F5C\u533A\u8BBE\u7F6E\u6E05\u7406\u5931\u8D25\u3002":"The WeChat account was removed, but its workspace settings could not be cleaned up.","\u5FAE\u4FE1\u8D26\u53F7\u8FDE\u63A5\u542F\u52A8\u5931\u8D25\u3002":"The WeChat account connection could not start.","\u5FAE\u4FE1\u6D88\u606F\u540C\u6B65\u8BF7\u6C42\u88AB\u62D2\u7EDD\u3002":"WeChat rejected the message sync request.","\u5FAE\u4FE1\u670D\u52A1\u672A\u786E\u8BA4\u505C\u6B62\u901A\u77E5\u3002":"WeChat did not confirm the stop notification.","\u5FAE\u4FE1\u6D88\u606F\u8FDE\u63A5\u505C\u6B62\u65F6\u53D1\u751F\u9519\u8BEF\u3002":"An error occurred while stopping the WeChat connection.","\u65E0\u6CD5\u8BFB\u53D6\u5FAE\u4FE1\u8FDE\u63A5\u72B6\u6001\uFF0C\u8BF7\u91CD\u65B0\u8BFB\u53D6\uFF1B\u4E4B\u524D\u7684\u64CD\u4F5C\u53EF\u80FD\u5DF2\u5B8C\u6210\u3002":"Could not read the WeChat connection status. Refresh it; the previous operation may have completed.","\u5FAE\u4FE1\u6FC0\u6D3B\u8FC7\u7A0B\u4E2D\u53D1\u751F\u672A\u77E5\u9519\u8BEF\u3002":"An unknown error occurred while activating the WeChat account.","\u5FAE\u4FE1\u64CD\u4F5C\u53D1\u751F\u672A\u77E5\u9519\u8BEF\u3002":"The WeChat operation failed with an unknown error.","\u5FAE\u4FE1\u914D\u7F6E\u683C\u5F0F\u9519\u8BEF\uFF0C\u8BF7\u68C0\u67E5 config.json \u548C workspaces.json \u540E\u91CD\u542F DSH\u3002":"The WeChat configuration is invalid. Check config.json and workspaces.json, then restart DSH.","\u5FAE\u4FE1\u914D\u7F6E\u8BBF\u95EE\u6743\u9650\u4E0D\u8DB3\uFF0C\u8BF7\u68C0\u67E5\u6570\u636E\u76EE\u5F55\u6743\u9650\u540E\u91CD\u542F DSH\u3002":"The WeChat configuration could not be accessed. Check the data directory permissions and restart DSH.","\u5FAE\u4FE1\u521D\u59CB\u5316\u5931\u8D25\uFF0C\u8BF7\u67E5\u770B DSH \u542F\u52A8\u65E5\u5FD7\u3002":"WeChat initialization failed. Check the DSH startup logs.","\u5FAE\u4FE1\u8FDE\u63A5\u672A\u5C31\u7EEA\u3002":"The WeChat connection is not ready.","\u5FAE\u4FE1\u64CD\u4F5C\u5931\u8D25\u540E\uFF0C\u539F\u8D26\u53F7\u72B6\u6001\u6062\u590D\u5931\u8D25\u3002":"The previous account state could not be restored after the failed WeChat operation.","\u539F\u8D26\u53F7\u72B6\u6001\u5C1A\u672A\u786E\u8BA4\uFF0C\u8BF7\u91CD\u65B0\u8BFB\u53D6\u72B6\u6001\uFF0C\u5E76\u53CD\u9988\u8BCA\u65AD\u4FE1\u606F\u3002":"The previous account state has not been confirmed. Refresh the status and share the diagnostic information.","\u64CD\u4F5C\u672A\u5B8C\u6210\uFF0C\u5DF2\u6062\u590D\u4E4B\u524D\u7684\u672C\u673A\u72B6\u6001\u3002\u8BF7\u5904\u7406\u4E0A\u8FF0\u95EE\u9898\u540E\u91CD\u8BD5\u3002":"The operation did not complete. The previous local state was restored. Resolve the problem above before retrying.","\u51ED\u636E\u7531\u53EA\u8BFB\u6765\u6E90\u63D0\u4F9B\uFF0C\u8BF7\u5728\u542F\u52A8 DSH \u7684\u914D\u7F6E\u4E2D\u68C0\u67E5\u8BE5\u6765\u6E90\u3002":"The credential comes from a read-only source. Check that source in the configuration used to launch DSH.","\u5FAE\u4FE1\u670D\u52A1\u57DF\u540D\u89E3\u6790\u5931\u8D25\uFF0C\u8BF7\u68C0\u67E5\u8FD0\u884C DSH \u7684\u673A\u5668\u7684\u7F51\u7EDC\u548C DNS \u8BBE\u7F6E\u540E\u91CD\u8BD5\u3002":"The WeChat service domain could not be resolved. Check the network and DNS settings on the machine running DSH and retry.","\u8BF7\u68C0\u67E5 DSH \u6570\u636E\u76EE\u5F55\u548C\u5BF9\u5E94\u6587\u4EF6\u7684\u8BFB\u5199\u6743\u9650\u3002":"Check read and write permissions on the DSH data directory and the affected file.","\u78C1\u76D8\u7A7A\u95F4\u4E0D\u8DB3\uFF0C\u8BF7\u91CA\u653E\u7A7A\u95F4\u540E\u91CD\u8BD5\u3002":"The disk is full. Free up space and retry.","\u672C\u673A\u6587\u4EF6\u683C\u5F0F\u65E0\u6548\uFF0C\u8BF7\u68C0\u67E5\u5BF9\u5E94\u914D\u7F6E\u6216\u72B6\u6001\u6587\u4EF6\uFF1B\u4E0D\u8981\u6E05\u7A7A\u767B\u5F55\u51ED\u636E\u3002":"The local file format is invalid. Check the affected configuration or state file; do not clear login credentials.","\u8BF7\u68C0\u67E5\u8FD0\u884C DSH \u7684\u673A\u5668\u7684\u7CFB\u7EDF\u65F6\u95F4\u3001\u8BC1\u4E66\u548C\u7F51\u7EDC\u8BBE\u7F6E\u3002":"Check the system time, certificates and network settings on the machine running DSH.","\u8BF7\u79FB\u9664\u5931\u6548\u63A5\u5165\u5E76\u91CD\u65B0\u626B\u7801\u7ED1\u5B9A\u3002":"Remove the invalid connection and scan a new QR code to connect.","\u8BF7\u786E\u8BA4\u5F53\u524D DSH \u5BBF\u4E3B\u5DF2\u5C31\u7EEA\uFF0C\u5E76\u68C0\u67E5 Harness \u4E0E\u63D2\u4EF6\u5B9E\u9645\u8FD0\u884C\u7248\u672C\u53CA\u5BBF\u4E3B\u65E5\u5FD7\u3002":"Check that this DSH host is ready, and check the running Harness and plugin versions and the host logs.","\u5FAE\u4FE1\u670D\u52A1\u9650\u6D41\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002":"The WeChat service is rate-limiting requests. Try again later.","\u8BBF\u95EE\u88AB\u62D2\u7EDD\uFF0C\u8BF7\u68C0\u67E5\u670D\u52A1\u8BBF\u95EE\u9650\u5236\uFF1BHTTP \u72B6\u6001\u672C\u8EAB\u4E0D\u80FD\u786E\u8BA4\u767B\u5F55\u51ED\u636E\u5DF2\u5931\u6548\u3002":"Access was denied. Check service access restrictions; the HTTP status alone does not establish that the login credential expired.","\u8BF7\u68C0\u67E5\u8FD0\u884C DSH \u7684\u673A\u5668\u80FD\u5426\u8BBF\u95EE\u5FAE\u4FE1\u670D\u52A1\uFF0C\u7136\u540E\u91CD\u8BD5\u3002":"Check whether the machine running DSH can access the WeChat service, then retry.","\u8BF7\u6309\u53C2\u8003\u53F7\u67E5\u770B DSH \u65E5\u5FD7\uFF0C\u5E76\u590D\u5236\u8BCA\u65AD\u4FE1\u606F\u53CD\u9988\u3002":"Find this reference in the DSH logs and copy the diagnostic information when reporting the issue.","\u65E0\u6CD5\u5B8C\u6210\u5FAE\u4FE1\u7BA1\u7406\u8BF7\u6C42\uFF0C\u8BF7\u68C0\u67E5 DSH \u8FDE\u63A5\u540E\u91CD\u65B0\u8BFB\u53D6\u72B6\u6001\u3002":"The WeChat management request could not be completed. Check the DSH connection and refresh the status.",\u67E5\u8BE2\u5FAE\u4FE1\u626B\u7801\u72B6\u6001\u5931\u8D25:"Could not query WeChat QR-code status",\u65E0\u6CD5\u5B8C\u6210\u5FAE\u4FE1\u7BA1\u7406\u8BF7\u6C42:"Could not complete the WeChat management request",\u65E0\u6CD5\u751F\u6210\u5FAE\u4FE1\u4E8C\u7EF4\u7801:"Could not generate a WeChat QR code","\u72B6\u6001\u8BFB\u53D6\u5931\u8D25\uFF0C\u4EE5\u4E0B\u662F\u4E0A\u6B21\u8BFB\u53D6\u7684\u72B6\u6001\u3002":"Status refresh failed. The last known status is shown below.",\u8BCA\u65AD\u8BE6\u60C5:"Diagnostic details",\u8BCA\u65AD\u4FE1\u606F:"Diagnostic information",\u590D\u5236\u8BCA\u65AD\u4FE1\u606F:"Copy diagnostic information",\u8BCA\u65AD\u4FE1\u606F\u5DF2\u590D\u5236:"Diagnostic information copied","\u672A\u53D6\u5F97 Host \u8BCA\u65AD\u53C2\u8003\u53F7\u3002":"No diagnostic reference was received from the host.","\u65E0\u6CD5\u8BBF\u95EE\u526A\u8D34\u677F\uFF0C\u8BF7\u9009\u62E9\u5E76\u590D\u5236\u4EE5\u4E0B\u8BCA\u65AD\u4FE1\u606F\u3002":"Clipboard access is unavailable. Select and copy the diagnostic information below.",\u9519\u8BEF\u7801:"Error code",\u5931\u8D25\u9636\u6BB5:"Failed step",\u5E95\u5C42\u539F\u56E0:"Underlying cause","HTTP \u72B6\u6001":"HTTP status",\u5FAE\u4FE1\u8FD4\u56DE\u7801:"WeChat return code",\u53C2\u8003\u53F7:"Reference",\u53D1\u751F\u65F6\u95F4:"Time",\u52A0\u8F7D\u5FAE\u4FE1\u914D\u7F6E:"Load WeChat configuration",\u7533\u8BF7\u4E8C\u7EF4\u7801:"Request QR code",\u751F\u6210\u4E8C\u7EF4\u7801\u56FE\u7247:"Generate QR-code image",\u67E5\u8BE2\u626B\u7801\u72B6\u6001:"Query QR-code status",\u63D0\u4EA4\u914D\u5BF9\u7801:"Submit pairing code",\u53D6\u6D88\u7ED1\u5B9A:"Cancel setup",\u8BFB\u53D6\u767B\u5F55\u51ED\u636E:"Read login credential",\u4FDD\u5B58\u767B\u5F55\u51ED\u636E:"Save login credential",\u79FB\u9664\u767B\u5F55\u51ED\u636E:"Remove login credential",\u4FDD\u5B58\u8D26\u53F7\u914D\u7F6E:"Save account configuration",\u79FB\u9664\u8D26\u53F7\u914D\u7F6E:"Remove account configuration",\u8BFB\u53D6\u8D26\u53F7\u72B6\u6001:"Read account state",\u4FDD\u5B58\u8D26\u53F7\u72B6\u6001:"Save account state",\u6E05\u7406\u8D26\u53F7\u72B6\u6001:"Clean up account state",\u4FDD\u5B58\u5DE5\u4F5C\u533A\u8BBE\u7F6E:"Save workspace settings",\u6E05\u7406\u5DE5\u4F5C\u533A\u8BBE\u7F6E:"Clean up workspace settings",\u51C6\u5907\u6D88\u606F\u8FDE\u63A5:"Prepare message connection",\u6FC0\u6D3B\u5FAE\u4FE1\u8D26\u53F7:"Activate WeChat account","\u68C0\u67E5 DSH \u5BBF\u4E3B":"Check DSH host",\u542F\u52A8\u5FAE\u4FE1\u8FDE\u63A5:"Start WeChat connection",\u540C\u6B65\u5FAE\u4FE1\u6D88\u606F:"Sync WeChat messages",\u505C\u6B62\u5FAE\u4FE1\u8FDE\u63A5:"Stop WeChat connection",\u8BFB\u53D6\u8FDE\u63A5\u72B6\u6001:"Read connection status",\u6062\u590D\u539F\u8D26\u53F7\u72B6\u6001:"Restore previous account state","\u8BBF\u95EE DSH \u7BA1\u7406\u63A5\u53E3":"Access DSH management API"};var j4={...OS,"\u5FAE\u4FE1\u5DF2\u8FDE\u63A5 DeepSeek Harness\u3002":"WeChat is connected to DeepSeek Harness.","\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u5DF2\u751F\u6210\uFF0C\u4F46\u5FAE\u4FE1\u673A\u5668\u4EBA\u5F53\u524D\u6CA1\u6709\u6587\u4EF6\u6D88\u606F\u53D1\u9001\u6743\u9650\uFF0C\u8BF7\u68C0\u67E5\u673A\u5668\u4EBA\u6587\u4EF6\u6D88\u606F\u80FD\u529B\u3002":`The result file "{name}" was generated, but the WeChat bot currently has no permission to send file messages. Please check the bot's file messaging capability.`,"\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u8D85\u8FC7\u5F53\u524D\u5FAE\u4FE1\u4F1A\u8BDD\u53EF\u53D1\u9001\u7684\u6587\u4EF6\u5927\u5C0F\uFF0C\u672A\u53D1\u9001\u3002":'The result file "{name}" exceeds the file size limit of the current WeChat conversation and was not sent.',"\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u4E0A\u4F20\u5FAE\u4FE1\u65F6\u957F\u65F6\u95F4\u6CA1\u6709\u8FDB\u5C55\uFF0C\u5DF2\u8D85\u65F6\uFF0C\u6587\u4EF6\u5C1A\u672A\u53D1\u9001\u3002\u8BF7\u68C0\u67E5\u7F51\u7EDC\u540E\u91CD\u8BD5\uFF0C\u6216\u538B\u7F29\u3001\u62C6\u5206\u6587\u4EF6\u540E\u53D1\u9001\u3002":'The upload of "{name}" to WeChat stalled and timed out. The file has not been sent. Check your network and retry, or compress or split the file before sending.',"\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u6682\u65F6\u88AB\u5FAE\u4FE1\u9650\u6D41\uFF0C\u672A\u80FD\u53D1\u9001\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002":'The result file "{name}" was temporarily rate-limited by WeChat and was not sent. Please try again later.',"\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u5DF2\u751F\u6210\uFF0C\u4F46\u5FAE\u4FE1\u62D2\u7EDD\u4E86\u8BE5\u6587\u4EF6\u6D88\u606F\u3002":'The result file "{name}" was generated, but WeChat rejected the file message.',"\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u5DF2\u751F\u6210\uFF0C\u4F46\u6682\u65F6\u672A\u80FD\u901A\u8FC7\u5FAE\u4FE1\u53D1\u9001\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002":'The result file "{name}" was generated but could not be sent via WeChat right now. Please try again later.',"\u76EE\u524D\u652F\u6301\u6587\u5B57\u3001\u56FE\u7247\uFF0C\u4EE5\u53CA\u5FAE\u4FE1\u5DF2\u8F6C\u6210\u6587\u5B57\u7684\u8BED\u97F3\u6D88\u606F\u3002":"Currently supports text, images, and voice messages that WeChat has converted to text.","\u5FAE\u4FE1\u4E0E DeepSeek Harness \u8FDE\u63A5\u6B63\u5E38\u3002":"WeChat is connected to DeepSeek Harness normally.","\u5FAE\u4FE1\u4EA4\u4E92\u95EE\u9898\u53D1\u9001\u5931\u8D25\u3002":"Failed to send the WeChat interaction question.","\u56DE\u590D\u5DF2\u7ECF\u751F\u6210\uFF0C\u4F46\u5FAE\u4FE1\u53D1\u9001\u5931\u8D25\uFF0C\u53EF\u80FD\u53EA\u6536\u5230\u90E8\u5206\u5185\u5BB9\u3002\u8BF7\u5C06\u4E0B\u9762\u7684\u8BCA\u65AD\u4FE1\u606F\u5B8C\u6574\u53CD\u9988\u7ED9\u7BA1\u7406\u5458\u3002":"The reply was generated, but WeChat delivery failed and only part of it may have arrived. Please send the complete diagnostic below to the administrator.","\u5FAE\u4FE1\u53D1\u9001\u8BCA\u65AD\uFF1A{diagnostic}":"WeChat delivery diagnostic: {diagnostic}","\u5FAE\u4FE1\u4E3B\u52A8\u6D88\u606F\u53D1\u9001\u5931\u8D25\u3002\u957F\u8F6E\u8BE2\u5728\u7EBF\u4E0D\u4EE3\u8868\u6D88\u606F\u53EF\u4EE5\u53D1\u9001\u3002":"WeChat outbound delivery failed. Healthy long polling does not guarantee messages can be sent.","iLink \u62D2\u7EDD\u53D1\u9001\uFF0C\u53EF\u80FD\u6D89\u53CA\u4F1A\u8BDD\u6709\u6548\u671F\u3001\u53D1\u9001\u989D\u5EA6\u6216\u6D88\u606F\u5185\u5BB9\u3002\u53EF\u8BA9\u63A5\u6536\u8005\u53D1\u4E00\u6761\u6D88\u606F\u540E\u91CD\u8BD5\uFF1B\u4E0D\u8981\u901A\u8FC7\u53CD\u590D\u53D1\u9001\u5FC3\u8DF3\u5C1D\u8BD5\u7EED\u671F\u3002":"iLink rejected the message; conversation lifetime, sending quota, or message content may be involved. Ask the recipient to send a message before retrying. Repeated heartbeat messages do not renew the conversation.","\u5FAE\u4FE1\u5DF2\u6388\u6743\uFF0C\u4F46\u65E0\u6CD5\u8BFB\u53D6\u73B0\u6709\u767B\u5F55\u51ED\u636E\u3002\u8BF7\u68C0\u67E5 DSH \u51ED\u636E\u5B58\u50A8\u3002":"WeChat was authorized, but the existing login credential could not be read. Please check the DSH credential store.","\u5FAE\u4FE1\u5DF2\u6388\u6743\uFF0C\u4F46\u767B\u5F55\u51ED\u636E\u65E0\u6CD5\u5199\u5165 DSH \u51ED\u636E\u5B58\u50A8\u3002\u8BF7\u68C0\u67E5\u51ED\u636E\u5B58\u50A8\u662F\u5426\u53EF\u5199\u3002":"WeChat was authorized, but the login credential could not be written to the DSH credential store. Please check that the credential store is writable.","\u5FAE\u4FE1\u5DF2\u6388\u6743\uFF0C\u4F46\u8D26\u53F7\u914D\u7F6E\u65E0\u6CD5\u5199\u5165\u672C\u673A\u3002\u8BF7\u68C0\u67E5 DSH_HOME \u76EE\u5F55\u6743\u9650\u3002":"WeChat was authorized, but the account configuration could not be written locally. Please check the DSH_HOME directory permissions.","\u5FAE\u4FE1\u5DF2\u6388\u6743\uFF0C\u4F46\u65E0\u6CD5\u521D\u59CB\u5316\u8D26\u53F7\u72B6\u6001\u6216\u5DE5\u4F5C\u533A\u3002\u8BF7\u68C0\u67E5 DSH_HOME \u548C\u5DE5\u4F5C\u533A\u76EE\u5F55\u3002":"WeChat was authorized, but the account state or workspace could not be initialized. Please check DSH_HOME and the workspace directories.","\u5FAE\u4FE1\u5DF2\u6388\u6743\uFF0C\u4F46\u63D2\u4EF6\u65E0\u6CD5\u8FDE\u63A5\u672C\u673A Harness\u3002\u8BF7\u68C0\u67E5 dsh web \u5730\u5740\u548C\u7AEF\u53E3\u3002":"WeChat was authorized, but the plugin could not connect to the local Harness. Please check the dsh web address and port.","\u5FAE\u4FE1\u5DF2\u6388\u6743\uFF0C\u4F46 Harness \u5065\u5EB7\u68C0\u67E5\u8D85\u65F6\u3002\u8BF7\u786E\u8BA4 dsh web \u672A\u963B\u585E\u3002":"WeChat was authorized, but the Harness health check timed out. Please confirm dsh web is not blocked.","\u5FAE\u4FE1\u5DF2\u6388\u6743\uFF0C\u4F46 Harness \u5065\u5EB7\u68C0\u67E5\u9700\u8981\u8EAB\u4EFD\u8BA4\u8BC1\u3002\u8BF7\u68C0\u67E5\u4EE3\u7406\u3001\u7F51\u5173\u6216\u81EA\u5B9A\u4E49\u9274\u6743\u914D\u7F6E\u3002":"WeChat was authorized, but the Harness health check requires authentication. Please check proxy, gateway, or custom auth configuration.","\u5FAE\u4FE1\u5DF2\u6388\u6743\uFF0C\u4F46\u672C\u673A Harness \u8BF7\u6C42\u88AB\u4EE3\u7406\u8981\u6C42\u8BA4\u8BC1\u3002\u8BF7\u8BA9\u56DE\u73AF\u5730\u5740\u7ED5\u8FC7\u4EE3\u7406\uFF0C\u5E76\u68C0\u67E5 NO_PROXY \u914D\u7F6E\u3002":"WeChat was authorized, but the local Harness request was challenged for proxy authentication. Please bypass the proxy for loopback addresses and check the NO_PROXY configuration.","\u5FAE\u4FE1\u5DF2\u6388\u6743\uFF0C\u4F46 Harness \u5F02\u5E38\u62D2\u7EDD\u4E86\u56DE\u73AF\u5730\u5740\u7684\u5065\u5EB7\u68C0\u67E5\u3002\u8BF7\u68C0\u67E5 HTTP \u4EE3\u7406\u3001Harness \u6E90\u7801\u7248\u672C\u548C\u6784\u5EFA\u4EA7\u7269\u3002":"WeChat was authorized, but Harness unexpectedly rejected the health check from a loopback address. Please check the HTTP proxy, Harness source version, and build artifacts.","\u5FAE\u4FE1\u5DF2\u6388\u6743\uFF0C\u4F46 Harness \u7684 Host \u4FE1\u4EFB\u68C0\u67E5\u62D2\u7EDD\u4E86\u975E\u56DE\u73AF\u5730\u5740\u8BF7\u6C42\u3002\u8BF7\u68C0\u67E5 harnessBaseUrl \u4E0E trustedHosts \u914D\u7F6E\u3002":"WeChat was authorized, but the Harness Host trust check rejected a non-loopback request. Please check the harnessBaseUrl and trustedHosts configuration.","\u5FAE\u4FE1\u5DF2\u6388\u6743\uFF0C\u4F46\u5065\u5EB7\u68C0\u67E5\u6536\u5230\u4E86\u975E Harness \u6807\u51C6\u7684 403 \u62D2\u7EDD\u54CD\u5E94\u3002\u8BF7\u68C0\u67E5\u4EE3\u7406\u6216\u7F51\u5173\u914D\u7F6E\u3002":"WeChat was authorized, but the health check received a non-standard Harness 403 rejection. Please check the proxy or gateway configuration.","\u5FAE\u4FE1\u5DF2\u6388\u6743\uFF0C\u4F46\u627E\u4E0D\u5230 Harness \u5065\u5EB7\u68C0\u67E5\u63A5\u53E3\u3002\u8BF7\u786E\u8BA4 Harness \u4E0E\u63D2\u4EF6\u7248\u672C\u517C\u5BB9\u3002":"WeChat was authorized, but the Harness health check endpoint was not found. Please confirm the Harness and plugin versions are compatible.","\u5FAE\u4FE1\u5DF2\u6388\u6743\uFF0C\u4F46 Harness \u5065\u5EB7\u68C0\u67E5\u8FD4\u56DE\u670D\u52A1\u9519\u8BEF\u3002\u8BF7\u67E5\u770B dsh web \u65E5\u5FD7\u3002":"WeChat was authorized, but the Harness health check returned a server error. Please check the dsh web logs.","\u5FAE\u4FE1\u5DF2\u6388\u6743\uFF0C\u4F46 Harness \u8FD4\u56DE\u4E86\u65E0\u6CD5\u8BC6\u522B\u7684\u54CD\u5E94\u3002\u8BF7\u786E\u8BA4 Harness \u4E0E\u63D2\u4EF6\u7248\u672C\u517C\u5BB9\u3002":"WeChat was authorized, but Harness returned an unrecognized response. Please confirm the Harness and plugin versions are compatible.","\u5FAE\u4FE1\u5DF2\u6388\u6743\uFF0C\u4F46 Harness \u62D2\u7EDD\u4E86\u5065\u5EB7\u68C0\u67E5\u8BF7\u6C42\u3002\u8BF7\u67E5\u770B dsh web \u65E5\u5FD7\u3002":"WeChat was authorized, but Harness rejected the health check request. Please check the dsh web logs.","\u5FAE\u4FE1\u5DF2\u6388\u6743\uFF0C\u4F46 Harness \u5065\u5EB7\u68C0\u67E5\u53D1\u751F\u672A\u77E5\u9519\u8BEF\u3002\u8BF7\u67E5\u770B dsh web \u65E5\u5FD7\u3002":"WeChat was authorized, but the Harness health check failed with an unknown error. Please check the dsh web logs.","\u5FAE\u4FE1\u5DF2\u6388\u6743\uFF0C\u4F46\u6D88\u606F\u8FDE\u63A5\u521D\u59CB\u5316\u5931\u8D25\u3002\u8BF7\u67E5\u770B dsh web \u65E5\u5FD7\u540E\u91CD\u8BD5\u3002":"WeChat was authorized, but the message connection failed to initialize. Please check the dsh web logs and try again.","\u5FAE\u4FE1\u5DF2\u6388\u6743\uFF0C\u4F46\u6FC0\u6D3B\u8FC7\u7A0B\u4E2D\u53D1\u751F\u672A\u77E5\u9519\u8BEF\u3002\u8BF7\u67E5\u770B dsh web \u65E5\u5FD7\u3002":"WeChat was authorized, but an unknown error occurred during activation. Please check the dsh web logs.","\u767B\u5F55\u51ED\u636E\u7F3A\u5931\uFF0C\u8BF7\u79FB\u9664\u8D26\u53F7\u540E\u91CD\u65B0\u626B\u7801\u3002":"The login credential is missing. Please remove the account and scan the QR code again.","\u5FAE\u4FE1\u8FDE\u63A5\u672A\u5C31\u7EEA\uFF0C\u63D2\u4EF6\u4F1A\u81EA\u52A8\u91CD\u8BD5\u3002":"The WeChat connection is not ready; the plugin will retry automatically.","\u5FAE\u4FE1\u8FDE\u63A5\u672A\u5C31\u7EEA\uFF0C\u63D2\u4EF6\u4F1A\u81EA\u52A8\u91CD\u8BD5":"The WeChat connection is not ready; the plugin will retry automatically","\u65E0\u6CD5\u751F\u6210\u5FAE\u4FE1\u4E8C\u7EF4\u7801\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002":"Unable to generate the WeChat QR code. Please try again later.","\u5FAE\u4FE1\u8FDE\u63A5\u4ECD\u672A\u5C31\u7EEA\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002":"The WeChat connection is still not ready. Please try again later.",\u5FAE\u4FE1\u673A\u5668\u4EBA:"WeChat Bot","\u5FAE\u4FE1\u673A\u5668\u4EBA\uFF08{name}\uFF09":"WeChat Bot ({name})",\u5FAE\u4FE1\u6D88\u606F\u957F\u8F6E\u8BE2\u8FD0\u884C\u6B63\u5E38:"WeChat message long-polling is running normally",\u5FAE\u4FE1\u8FDE\u63A5\u5F53\u524D\u79BB\u7EBF:"The WeChat connection is currently offline","\u914D\u5BF9\u7801\u591A\u6B21\u9519\u8BEF\uFF0C\u8BF7\u91CD\u65B0\u751F\u6210\u4E8C\u7EF4\u7801\u3002":"The pairing code was entered incorrectly too many times. Please generate a new QR code.","\u8BE5\u5FAE\u4FE1\u8D26\u53F7\u5DF2\u7ED1\u5B9A\uFF0C\u4F46\u672C\u673A\u6CA1\u6709\u53EF\u6062\u590D\u7684\u51ED\u636E\u3002":"This WeChat account is already bound, but no recoverable credential exists on this machine.","\u5FAE\u4FE1\u6388\u6743\u6210\u529F\uFF0C\u4F46\u8FD4\u56DE\u7684\u8D26\u53F7\u51ED\u636E\u4E0D\u5B8C\u6574\u3002":"WeChat authorization succeeded, but the returned account credential is incomplete.","\u5FAE\u4FE1\u767B\u5F55\u51ED\u636E\u5DF2\u5931\u6548\uFF0C\u8BF7\u79FB\u9664\u8D26\u53F7\u540E\u91CD\u65B0\u626B\u7801\u3002":"The WeChat login credential has expired. Please remove the account and scan the QR code again.","\u5FAE\u4FE1\u6D88\u606F\u540C\u6B65\u8BF7\u6C42\u88AB\u62D2\u7EDD\u3002":"The WeChat message sync request was rejected.","\u5FAE\u4FE1\u56FE\u7247\u7684\u52A0\u5BC6\u5BC6\u94A5\u65E0\u6548\u3002":"The encryption key of the WeChat image is invalid.","\u5FAE\u4FE1\u56FE\u7247\u7684\u52A0\u5BC6\u6570\u636E\u65E0\u6548\u3002":"The encrypted data of the WeChat image is invalid.","\u5FAE\u4FE1\u56FE\u7247\u89E3\u5BC6\u5931\u8D25\u3002":"Failed to decrypt the WeChat image.","\u5FAE\u4FE1\u56FE\u7247\u6CA1\u6709\u53EF\u7528\u7684\u4E0B\u8F7D\u5730\u5740\u3002":"The WeChat image has no usable download URL.","\u5FAE\u4FE1\u56FE\u7247\u7684\u4E0B\u8F7D\u5730\u5740\u65E0\u6548\u3002":"The download URL of the WeChat image is invalid.","\u5FAE\u4FE1\u56FE\u7247\u7684\u4E0B\u8F7D\u5730\u5740\u4E0D\u53D7\u4FE1\u4EFB\u3002":"The download URL of the WeChat image is not trusted.","\u5FAE\u4FE1\u670D\u52A1\u8FD4\u56DE\u4E86\u65E0\u6548\u7684\u8FDE\u63A5\u5730\u5740\u3002":"The WeChat service returned an invalid connection URL.","\u5FAE\u4FE1\u670D\u52A1\u8FD4\u56DE\u4E86\u4E0D\u53D7\u4FE1\u4EFB\u7684\u8FDE\u63A5\u5730\u5740\u3002":"The WeChat service returned an untrusted connection URL.","\u5FAE\u4FE1\u670D\u52A1\u6CA1\u6709\u8FD4\u56DE\u626B\u7801\u5730\u5740\u3002":"The WeChat service did not return a QR-code URL.","\u5FAE\u4FE1\u670D\u52A1\u8FD4\u56DE\u4E86\u65E0\u6548\u7684\u626B\u7801\u5730\u5740\u3002":"The WeChat service returned an invalid QR-code URL.","\u5FAE\u4FE1\u670D\u52A1\u8FD4\u56DE\u4E86\u4E0D\u53D7\u4FE1\u4EFB\u7684\u626B\u7801\u5730\u5740\u3002":"The WeChat service returned an untrusted QR-code URL.","\u5FAE\u4FE1\u670D\u52A1\u8FD4\u56DE\u4E86\u65E0\u6548\u7684\u6587\u4EF6\u4E0A\u4F20\u5730\u5740\u3002":"The WeChat service returned an invalid file upload URL.","\u5FAE\u4FE1\u670D\u52A1\u8FD4\u56DE\u4E86\u4E0D\u53D7\u4FE1\u4EFB\u7684\u6587\u4EF6\u4E0A\u4F20\u5730\u5740\u3002":"The WeChat service returned an untrusted file upload URL.","\u5FAE\u4FE1\u670D\u52A1\u6CA1\u6709\u8FD4\u56DE\u6587\u4EF6\u4E0A\u4F20\u5730\u5740\u3002":"The WeChat service did not return a file upload URL.","\u5FAE\u4FE1\u6587\u4EF6\u4E0A\u4F20\u88AB\u62D2\u7EDD\uFF08HTTP {status}\uFF09\u3002":"The WeChat file upload was rejected (HTTP {status}).","\u5FAE\u4FE1\u6587\u4EF6\u4E0A\u4F20\u5931\u8D25\uFF08HTTP {status}\uFF09\u3002":"The WeChat file upload failed (HTTP {status}).","\u5FAE\u4FE1\u6587\u4EF6\u4E0A\u4F20\u54CD\u5E94\u7F3A\u5C11\u4E0B\u8F7D\u53C2\u6570\u3002":"The WeChat file upload response is missing the download parameter.","\u5FAE\u4FE1\u6587\u4EF6\u4E0A\u4F20\u5931\u8D25\u3002":"The WeChat file upload failed.","\u5FAE\u4FE1\u6587\u4EF6\u4E0A\u4F20\u957F\u65F6\u95F4\u6CA1\u6709\u8FDB\u5C55\uFF0C\u5DF2\u8D85\u65F6\u3002":"The WeChat file upload stalled and timed out.","\u62D2\u7EDD\u8BBF\u95EE\u4E0D\u53D7\u4FE1\u4EFB\u7684\u5FAE\u4FE1\u670D\u52A1\u5730\u5740\u3002":"Refusing to access an untrusted WeChat service URL.","\u5FAE\u4FE1\u670D\u52A1\u8BF7\u6C42\u5931\u8D25\uFF08HTTP {status}\uFF09\u3002":"The WeChat service request failed (HTTP {status}).","\u5FAE\u4FE1\u670D\u52A1\u8FD4\u56DE\u4E86\u65E0\u6CD5\u89E3\u6790\u7684\u54CD\u5E94\u3002":"The WeChat service returned an unparseable response.","\u5FAE\u4FE1\u670D\u52A1\u8BF7\u6C42\u8D85\u65F6\u3002":"The WeChat service request timed out.","\u6682\u65F6\u65E0\u6CD5\u8BBF\u95EE\u5FAE\u4FE1\u670D\u52A1\u3002":"The WeChat service is temporarily unreachable.","\u5FAE\u4FE1\u670D\u52A1\u8FD4\u56DE\u4E86\u65E0\u6CD5\u8BC6\u522B\u7684\u626B\u7801\u72B6\u6001\u3002":"The WeChat service returned an unrecognized QR-code status.","\u5FAE\u4FE1\u670D\u52A1\u6CA1\u6709\u8FD4\u56DE\u4E8C\u7EF4\u7801\u4EE4\u724C\u3002":"The WeChat service did not return a QR-code token.","\u5FAE\u4FE1\u670D\u52A1\u62D2\u7EDD\u4E86\u56DE\u590D\u6D88\u606F\u3002":"The WeChat service rejected the reply message.","\u5FAE\u4FE1\u670D\u52A1\u62D2\u7EDD\u4E86\u6587\u4EF6\u4E0A\u4F20\u8BF7\u6C42\u3002":"The WeChat service rejected the file upload request.","\u5FAE\u4FE1\u670D\u52A1\u62D2\u7EDD\u4E86\u6587\u4EF6\u6D88\u606F\u3002":"The WeChat service rejected the file message.","\u5FAE\u4FE1\u8D26\u53F7\u8FDE\u63A5\u542F\u52A8\u5931\u8D25\u3002":"Failed to start the WeChat account connection."};var J4={Slack\u673A\u5668\u4EBA:"Slack bot","Slack\u673A\u5668\u4EBA\u51ED\u636E\u7F3A\u5931\uFF0C\u8BF7\u79FB\u9664\u540E\u91CD\u65B0\u63A5\u5165\u3002":"Slack bot credentials are missing. Remove the bot and connect it again.","Slack Socket Mode \u8FDE\u63A5\u672A\u5C31\u7EEA\uFF0C\u63D2\u4EF6\u4F1A\u81EA\u52A8\u91CD\u8BD5\u3002":"The Slack Socket Mode connection is not ready yet. The plugin will retry automatically.","Slack\u673A\u5668\u4EBA\u5DF2\u63A5\u5165\uFF0CSocket Mode \u8FDE\u63A5\u6682\u672A\u5C31\u7EEA\u3002":"The Slack bot is connected, but the Socket Mode connection is not ready yet.","Slack Socket Mode \u8FDE\u63A5\u4ECD\u672A\u5C31\u7EEA\uFF0C\u8BF7\u68C0\u67E5\u4E24\u4E2A Token\u3002":"The Slack Socket Mode connection is still not ready. Check both tokens.",Slack\u673A\u5668\u4EBA\u5C1A\u672A\u8FDE\u63A5:"The Slack bot is not connected yet","Slack Socket Mode \u957F\u8FDE\u63A5\u8FD0\u884C\u6B63\u5E38":"The Slack Socket Mode long-lived connection is running normally","Slack\u8FDE\u63A5\u672A\u5C31\u7EEA\uFF0C\u63D2\u4EF6\u4F1A\u81EA\u52A8\u91CD\u8BD5":"The Slack connection is not ready. The plugin will retry automatically",Slack\u8FDE\u63A5\u5F53\u524D\u79BB\u7EBF:"The Slack connection is currently offline","Slack \u672A\u6388\u6743\u673A\u5668\u4EBA\u8BFB\u53D6\u8BE5\u6587\u4EF6\u3002\u8BF7\u4E3A\u5E94\u7528\u6DFB\u52A0 files:read \u540E\u91CD\u65B0\u5B89\u88C5\uFF0C\u518D\u91CD\u65B0\u53D1\u9001\u56FE\u7247\u3002":"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.","Slack Bot Token \u5FC5\u987B\u4EE5 xoxb- \u5F00\u5934\u3002":"The Slack Bot Token must start with xoxb-.","Slack App Token \u5FC5\u987B\u4EE5 xapp- \u5F00\u5934\u3002":"The Slack App Token must start with xapp-.","Slack Bot Token \u6CA1\u6709\u8FD4\u56DE\u5B8C\u6574\u7684\u673A\u5668\u4EBA\u8EAB\u4EFD\u3002":"The Slack Bot Token did not return a complete bot identity.","Slack App Token \u65E0\u6CD5\u521B\u5EFA Socket Mode \u8FDE\u63A5\uFF0C\u8BF7\u786E\u8BA4\u5DF2\u542F\u7528 Socket Mode \u548C connections:write\u3002":"The Slack App Token could not create a Socket Mode connection. Make sure Socket Mode and connections:write are enabled."};var q4={"\u56DE\u590D\u5DF2\u53D1\u9001\u3002":"The reply was sent.","\u56DE\u590D\u53D1\u9001\u7ED3\u679C\u672A\u80FD\u786E\u8BA4\u3002":"The reply delivery result could not be confirmed.","\u6D88\u606F\u53D1\u9001\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002":"The message could not be sent. Try again later.",\u5F00\u542F\u4E00\u4E2A\u5168\u65B0\u4F1A\u8BDD:"Start a brand-new Session",\u538B\u7F29\u5F53\u524D\u4F1A\u8BDD\u7684\u8F83\u65E9\u4E0A\u4E0B\u6587:"Compact the earlier context of the current Session",\u5207\u6362\u5DE5\u4F5C\u533A:"Switch Workspace",\u5217\u51FA\u5DE5\u4F5C\u533A\u7EDD\u5BF9\u8DEF\u5F84:"List Workspace absolute paths","\u5217\u51FA\u4F1A\u8BDD ID \u548C\u6807\u9898":"List Session IDs and titles",\u5C06\u5F53\u524D\u804A\u5929\u7ED1\u5B9A\u5230\u6307\u5B9A\u4F1A\u8BDD:"Bind the current chat to a specific Session",\u6309\u5E8F\u53F7\u5217\u51FA\u6240\u6709\u53EF\u7528\u6A21\u578B:"List all available models by number",\u67E5\u770B\u6216\u5207\u6362\u5F53\u524D\u4F1A\u8BDD\u6A21\u578B:"View or switch the model of the current Session","\u5217\u51FA\u53EF\u7528 Agent Preset":"List available Agent Presets","\u67E5\u770B\u6216\u8BBE\u7F6E\u65B0\u4F1A\u8BDD Agent Preset":"View or set the Agent Preset for new Sessions",\u505C\u6B62\u5F53\u524D\u4EFB\u52A1:"Stop the current task",\u7EA0\u504F\u5F53\u524D\u4EFB\u52A1:"Steer the current task",\u68C0\u67E5\u8FDE\u63A5\u72B6\u6001:"Check connection status",\u67E5\u770B\u63D2\u4EF6\u7248\u672C:"Show plugin version",\u663E\u793A\u5E2E\u52A9:"Show help","\u8BE5 Telegram \u673A\u5668\u4EBA\u5DF2\u914D\u7F6E Webhook\uFF0C\u8BF7\u5148\u5728\u539F\u670D\u52A1\u4E2D\u79FB\u9664 Webhook \u540E\u91CD\u8BD5\u3002":"This Telegram bot already has a Webhook configured. Remove the Webhook from the original service and try again.",Telegram\u673A\u5668\u4EBA:"Telegram Bot"," Bot API \u957F\u8F6E\u8BE2":" Bot API long polling"};var z4={"Discord Bot Token \u65E0\u6548\uFF0C\u8BF7\u91CD\u65B0\u586B\u5199\u3002":"The Discord Bot Token is invalid. Please enter it again.","Discord Gateway Intents \u914D\u7F6E\u4E0D\u6B63\u786E\uFF0C\u8BF7\u68C0\u67E5 Developer Portal \u7684 Bot \u8BBE\u7F6E\u3002":"The Discord Gateway Intents are misconfigured. Please check the Bot settings in the Developer Portal.",Discord\u673A\u5668\u4EBA:"Discord Bot"," Gateway \u957F\u8FDE\u63A5":" Gateway long-lived connection","Thread \u521B\u5EFA\u7ED3\u679C\u6682\u65F6\u65E0\u6CD5\u786E\u8BA4\u3002\u82E5\u5DF2\u521B\u5EFA\uFF0C\u8BF7\u5728\u5BF9\u5E94 Thread \u4E2D\u91CD\u8BD5\uFF1B\u82E5\u672A\u521B\u5EFA\uFF0C\u8BF7\u7A0D\u540E\u91CD\u65B0 @\u673A\u5668\u4EBA\u3002":"The Thread creation result cannot be confirmed yet. If the Thread was created, retry inside it; if it was not, mention the bot again shortly."};var W4={"WhatsApp \u5173\u8054\u8BBE\u5907\u5DF2\u5931\u6548\uFF0C\u8BF7\u79FB\u9664\u540E\u91CD\u65B0\u626B\u7801\u3002":"The WhatsApp linked device is no longer valid. Remove it and scan the QR code again.","WhatsApp \u8FDE\u63A5\u672A\u5C31\u7EEA\uFF0C\u63D2\u4EF6\u4F1A\u81EA\u52A8\u91CD\u8BD5\u3002":"The WhatsApp connection is not ready yet; the plugin will retry automatically.","WhatsApp \u8FDE\u63A5\u4ECD\u672A\u5C31\u7EEA\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002":"The WhatsApp connection is still not ready. Please try again later.",WhatsApp\u673A\u5668\u4EBA\u5C1A\u672A\u8FDE\u63A5:"The WhatsApp bot is not connected yet",WhatsApp\u673A\u5668\u4EBA:"WhatsApp bot","WhatsApp Web \u5173\u8054\u8BBE\u5907\u8FD0\u884C\u6B63\u5E38":"The WhatsApp Web linked device is working normally","WhatsApp \u8FDE\u63A5\u672A\u5C31\u7EEA":"The WhatsApp connection is not ready","WhatsApp \u8FDE\u63A5\u5F53\u524D\u79BB\u7EBF":"The WhatsApp connection is currently offline","WhatsApp \u5DF2\u7ED1\u5B9A\uFF0C\u6D88\u606F\u8FDE\u63A5\u6682\u672A\u5C31\u7EEA\u3002":"WhatsApp is linked, but the messaging connection is not ready yet.","WhatsApp \u5DF2\u626B\u7801\uFF0C\u4F46\u65E0\u6CD5\u4FDD\u5B58\u5173\u8054\u8BBE\u5907\u3002":"The QR code was scanned, but the linked device could not be saved.","\u65E0\u6CD5\u8FDE\u63A5 WhatsApp\uFF0C\u8BF7\u91CD\u65B0\u751F\u6210\u4E8C\u7EF4\u7801\u3002":"Unable to connect to WhatsApp. Please generate a new QR code.",WhatsApp\u8D26\u53F7:"WhatsApp account"," Web \u5173\u8054\u8BBE\u5907":" Web linked device"};var V4={Matrix\u673A\u5668\u4EBA:"Matrix bot","Matrix\u673A\u5668\u4EBA\u51ED\u636E\u7F3A\u5931\uFF0C\u8BF7\u79FB\u9664\u540E\u91CD\u65B0\u63A5\u5165\u3002":"Matrix bot credentials are missing. Remove the bot and connect it again.","Matrix\u673A\u5668\u4EBA\u51ED\u636E\u7F3A\u5931\uFF0C\u8BF7\u91CD\u65B0\u8F93\u5165\u51ED\u636E\u3002":"Matrix bot credentials are missing. Enter the credentials again.","Matrix \u8FDE\u63A5\u672A\u5C31\u7EEA\uFF0C\u63D2\u4EF6\u4F1A\u81EA\u52A8\u91CD\u8BD5\u3002":"The Matrix connection is not ready yet. The plugin will retry automatically.","Matrix \u957F\u8F6E\u8BE2\u63A5\u6536\u548C Harness \u56DE\u590D\u5168\u90E8\u6B63\u5E38\u3002":"Matrix long polling and Harness replies are all working.","Matrix \u8FDE\u63A5\u5F53\u524D\u79BB\u7EBF\u3002":"The Matrix connection is currently offline.","\u3010\u7FA4\u804A\u80CC\u666F\u3011\u4EE5\u4E0B\u5404\u6761\u662F\u7FA4\u91CC\u5176\u4ED6\u6210\u5458\u4E4B\u95F4\u7684\u53D1\u8A00\uFF0C\u5747\u672A\u6307\u5411\u4F60\u3002":"[Room background] The lines below are messages other members exchanged among themselves; none of them was addressed to you.","\u8FD9\u4E9B\u5185\u5BB9\u53EA\u7528\u6765\u4E86\u89E3\u73B0\u573A\u53D1\u751F\u8FC7\u4EC0\u4E48\u3002\u8BF7\u52FF\u9010\u6761\u56DE\u5E94\u3001\u590D\u8FF0\u3001\u7FFB\u8BD1\u6216\u603B\u7ED3\u5B83\u4EEC\uFF0C\u4E5F\u4E0D\u8981\u56E0\u4E3A\u5B83\u4EEC\u800C\u6539\u53D8\u4E0B\u9762\u90A3\u6761\u63D0\u95EE\u7684\u56DE\u7B54\u3002":"This only tells you what happened in the room. Do not answer, restate, translate or summarise these lines one by one, and do not let them change how you answer the question below.","\u2014\u2014 \u80CC\u666F\u5F00\u59CB \u2014\u2014":"--- background begins ---","\u2014\u2014 \u80CC\u666F\u7ED3\u675F\uFF08\u4EE5\u4E0A\u65E0\u9700\u56DE\u5E94\uFF09 \u2014\u2014":"--- background ends (nothing above needs a reply) ---","\u3010\u4E0B\u9762\u8FD9\u6761\u624D\u662F\u5BF9\u4F60\u7684\u63D0\u95EE\uFF0C\u8BF7\u53EA\u56DE\u7B54\u5B83\u3011":"[The line below is the question put to you: answer only this]","Matrix \u957F\u8F6E\u8BE2\u5C1A\u672A\u5EFA\u7ACB\uFF0C\u8BF7\u68C0\u67E5 homeserver \u4E0E\u51ED\u636E\u3002":"The Matrix long poll has not been established. Check the homeserver URL and the credentials.","Matrix \u6B63\u5728\u5904\u7406\u6D88\u606F\uFF1B\u5F53\u524D\u5B58\u5728\u672A\u6062\u590D\u7684\u8FDE\u63A5\u3002":"Matrix is processing messages; some connections have not recovered yet.","Matrix homeserver \u5730\u5740\u65E0\u6548\uFF0C\u8BF7\u586B\u5199 https:// \u6216 http:// \u5F00\u5934\u7684\u5B8C\u6574\u5730\u5740\u3002":"The Matrix homeserver URL is invalid. Enter a full URL starting with https:// or http://.","Matrix \u51ED\u636E\u4E0D\u5B8C\u6574\uFF1A\u8BF7\u63D0\u4F9B\u8BBF\u95EE\u4EE4\u724C\uFF0C\u6216\u7528\u6237 ID \u4E0E\u5BC6\u7801\u7684\u7EC4\u5408\u3002":"Incomplete Matrix credentials: provide an access token, or a user id together with a password.","Matrix \u7528\u6237 ID \u65E0\u6548\uFF0C\u8BF7\u4F7F\u7528 @user:server \u5F62\u5F0F\u3002":"The Matrix user id is invalid. Use the @user:server form.","Matrix \u8BBF\u95EE\u4EE4\u724C\u65E0\u6548\u6216\u5DF2\u5931\u6548\uFF0C\u8BF7\u5728 homeserver \u91CD\u65B0\u7B7E\u53D1\u540E\u91CD\u8BD5\u3002":"The Matrix access token is invalid or expired. Issue a new one on the homeserver and try again.","Matrix homeserver \u6682\u65F6\u65E0\u6CD5\u8BBF\u95EE\uFF0C\u8BF7\u786E\u8BA4\u7F51\u7EDC\u4E0E\u5730\u5740\u540E\u91CD\u8BD5\u3002":"The Matrix homeserver is temporarily unreachable. Check the network and the URL, then retry.","Matrix whoami \u672A\u8FD4\u56DE\u7528\u6237\u8EAB\u4EFD\uFF0C\u8BF7\u6539\u7528\u7528\u6237 ID \u4E0E\u5BC6\u7801\u63A5\u5165\u3002":"The Matrix whoami call returned no user identity. Connect with a user id and password instead.","Matrix \u7528\u6237\u540D\u6216\u5BC6\u7801\u4E0D\u6B63\u786E\uFF0C\u8BF7\u6838\u5BF9\u540E\u91CD\u8BD5\u3002":"The Matrix user id or password is incorrect. Verify it and try again.","Matrix homeserver \u6682\u4E0D\u652F\u6301\u5BC6\u7801\u767B\u5F55\uFF0C\u8BF7\u6539\u7528\u8BBF\u95EE\u4EE4\u724C\u63A5\u5165\u3002":"The Matrix homeserver does not support password login. Connect with an access token instead.","Matrix \u914D\u7F6E\u7684 device_id \u4E0E\u670D\u52A1\u7AEF\u5B9E\u9645\u8BBE\u5907\u4E0D\u4E00\u81F4\uFF0C\u4EE5\u670D\u52A1\u7AEF\u8BBE\u5907\u4E3A\u51C6\u3002":"The configured Matrix device_id differs from the actual server-side device; the server device wins.","Matrix whoami \u8FD4\u56DE\u7684\u7528\u6237 {verified} \u4E0E\u914D\u7F6E\u7684\u7528\u6237 {configured} \u4E0D\u4E00\u81F4\uFF0C\u4EE5 whoami \u7ED3\u679C\u4E3A\u51C6\u3002":"The user {verified} returned by Matrix whoami differs from the configured user {configured}; the whoami result wins.","Matrix \u914D\u7F6E\u7684 device_id {configured} \u4E0E\u4EE4\u724C\u7ED1\u5B9A\u8BBE\u5907 {verified} \u4E0D\u4E00\u81F4\uFF0C\u4EE4\u724C\u4EC5\u80FD\u4E3A\u5176\u8BBE\u5907\u5171\u4EAB\u5BC6\u94A5\uFF0C\u4EE5\u4EE4\u724C\u8BBE\u5907\u4E3A\u51C6\u3002":"The configured device_id {configured} differs from the device {verified} bound to the token. A token can share keys only for its own device; the token device wins.","\u7AEF\u5230\u7AEF\u52A0\u5BC6\u6A21\u5F0F\u4E3A required\uFF0C\u4F46\u672A\u914D\u7F6E\u52A0\u5BC6\u72B6\u6001\u5B58\u50A8\uFF0C\u5DF2\u62D2\u7EDD\u5EFA\u7ACB\u52A0\u5BC6\u8FDE\u63A5\u3002":"End-to-end encryption mode is required, but no crypto state storage is configured, so the encrypted connection was refused.","Matrix \u7AEF\u5230\u7AEF\u52A0\u5BC6\u672A\u914D\u7F6E\u72B6\u6001\u5B58\u50A8\uFF0C\u52A0\u5BC6\u623F\u95F4\u6D88\u606F\u5C06\u660E\u786E\u964D\u7EA7\u8DF3\u8FC7\u3002":"Matrix end-to-end encryption has no crypto state storage configured; encrypted room messages will be visibly skipped.","\u7AEF\u5230\u7AEF\u52A0\u5BC6\u6A21\u5F0F\u4E3A required\uFF0C\u4F46\u52A0\u5BC6\u5F15\u64CE\u542F\u52A8\u5931\u8D25\uFF0C\u5DF2\u62D2\u7EDD\u5EFA\u7ACB\u52A0\u5BC6\u8FDE\u63A5\uFF1A{reason}":"End-to-end encryption mode is required, but the crypto engine failed to start, so the encrypted connection was refused: {reason}","Matrix \u7AEF\u5230\u7AEF\u52A0\u5BC6\u5F15\u64CE\u542F\u52A8\u5931\u8D25\uFF0C\u52A0\u5BC6\u623F\u95F4\u6D88\u606F\u5C06\u660E\u786E\u964D\u7EA7\u8DF3\u8FC7\u3002":"The Matrix crypto engine failed to start; encrypted room messages will be visibly skipped.","Matrix \u7AEF\u5230\u7AEF\u52A0\u5BC6\u5F15\u64CE\u5DF2\u5C31\u7EEA\uFF0C\u8BBE\u5907\u5BC6\u94A5\u4E0E\u4E00\u6B21\u6027\u5BC6\u94A5\u5DF2\u6CE8\u518C\u3002":"The Matrix crypto engine is ready; device keys and one-time keys are registered.","\u7AEF\u5230\u7AEF\u52A0\u5BC6\u672A\u542F\u7528\u6216\u4E0D\u53EF\u7528\uFF0C\u52A0\u5BC6\u623F\u95F4 {room} \u7684\u5BC6\u6587\u4F1A\u88AB\u660E\u786E\u964D\u7EA7\u8DF3\u8FC7\u3002":"End-to-end encryption is off or unavailable; ciphertext from the encrypted room {room} is visibly skipped.","Matrix \u52A0\u5BC6\u72B6\u6001\u7ED1\u5B9A\u4E8E\u8BBE\u5907 {stored}\uFF0C\u4E0E\u5F53\u524D\u4EE4\u724C\u8BBE\u5907 {active} \u4E0D\u7B26\uFF1B\u8BF7\u5148\u4FEE\u590D\u8BBE\u5907\u914D\u7F6E\uFF0C\u5207\u52FF\u5220\u9664\u52A0\u5BC6\u72B6\u6001\u6587\u4EF6\u540E\u9759\u9ED8\u91CD\u5EFA\u8BBE\u5907\u3002":"The Matrix crypto state is bound to device {stored}, which differs from the current token device {active}; fix the device configuration first. Do not silently rebuild the device by deleting the crypto state file.","Matrix \u8BBE\u5907\u52A0\u5BC6\u8EAB\u4EFD\u4E0D\u5B8C\u6574\uFF0C\u65E0\u6CD5\u5EFA\u7ACB\u7AEF\u5230\u7AEF\u52A0\u5BC6\u4F1A\u8BDD\u3002":"The Matrix device encryption identity is incomplete; an end-to-end encryption session cannot be established.","Matrix \u52A0\u5BC6\u5F15\u64CE\u5C1A\u672A\u5C31\u7EEA\u3002":"The Matrix crypto engine is not ready yet.","Matrix \u6536\u5230\u7684\u65F6\u95F4\u6233\u6301\u7EED\u8FDC\u843D\u540E\u4E8E\u672C\u673A\u65F6\u95F4\uFF0C\u68C0\u6D4B\u5230\u672C\u673A\u65F6\u949F\u8D85\u524D\uFF0C\u8BF7\u6821\u51C6\u7CFB\u7EDF\u65F6\u95F4\u540E\u91CD\u542F\u673A\u5668\u4EBA\u3002":"Matrix event timestamps keep lagging far behind the local clock; the local clock is ahead. Calibrate the system time and restart the bot.","Matrix \u62D2\u7EDD\u4E86\u6765\u81EA\u672A\u6388\u6743\u7528\u6237 {inviter} \u7684\u5165\u623F\u9080\u8BF7 {room}\u3002":"Matrix declined the room invite {room} from the unauthorized user {inviter}.","Matrix \u5DF2\u6309\u6388\u6743\u9080\u8BF7\u52A0\u5165\u623F\u95F4 {room}\u3002":"Matrix joined room {room} after an authorized invite.","Matrix \u5DF2\u5A49\u62D2\u5931\u6548\u623F\u95F4\u7684\u9057\u7559\u9080\u8BF7 {room}\u3002":"Matrix declined the stale invite for the dead room {room}.","Matrix \u65E0\u6CD5\u4E3A\u8BE5\u7528\u6237\u521B\u5EFA\u79C1\u804A\u623F\u95F4\u3002":"Matrix could not create a private chat room for this user.","\u7ED3\u679C\u6587\u4EF6\u5185\u5BB9\u4E3A\u7A7A\u6216\u4E0B\u8F7D\u5931\u8D25\u3002":"The result file is empty or failed to download.","\u7ED3\u679C\u6587\u4EF6\u8D85\u8FC7 Matrix \u5A92\u4F53\u5927\u5C0F\u4E0A\u9650\u3002":"The result file exceeds the Matrix media size limit.","Matrix \u5A92\u4F53\u4E0A\u4F20\u5931\u8D25\u3002":"The Matrix media upload failed.","Matrix \u6587\u4EF6\u6D88\u606F\u53D1\u9001\u5931\u8D25\u3002":"The Matrix file message could not be sent.","\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u5DF2\u751F\u6210\uFF0C\u4F46 Matrix homeserver \u62D2\u7EDD\u4E86\u5A92\u4F53\u4E0A\u4F20\uFF0C\u8BF7\u68C0\u67E5\u5176\u5A92\u4F53\u5927\u5C0F\u9650\u5236\u4E0E\u4E0A\u4F20\u6743\u9650\u3002":"The result file \u201C{name}\u201D was produced, but the Matrix homeserver rejected the media upload. Check its media size limit and upload permissions."};var Z4={"AI Office \u62D2\u7EDD\u4E86 Device Token\u3002":"AI Office rejected the Device Token.","AI Office Connector Hook \u5C1A\u672A\u5C31\u7EEA\u3002":"The AI Office Connector Hook is not ready yet.","AI Office Connector \u534F\u8BAE\u7248\u672C\u4E0D\u517C\u5BB9\u3002":"The AI Office Connector protocol version is incompatible.","\u672C\u673A\u6682\u65F6\u65E0\u6CD5\u8BBF\u95EE AI Office\u3002":"This machine cannot reach AI Office right now.","AI Office \u8FDE\u63A5\u5DF2\u4E2D\u65AD\u3002":"The AI Office connection was interrupted.","\u672C\u673A Harness \u5DF2\u505C\u6B62\u8FD9\u6B21\u6267\u884C\u3002":"The local Harness stopped this run.","Office Job \u5DF2\u88AB\u9886\u53D6\u3001\u53D6\u6D88\u6216\u7ED3\u675F\u3002":"The Office Job has already been claimed, cancelled, or finished.","\u672C\u673A Harness \u672A\u80FD\u5B8C\u6210\u4EFB\u52A1\uFF1B\u8BF7\u68C0\u67E5 Harness \u4F1A\u8BDD\u540E\u91CD\u8BD5\u3002":"The local Harness could not complete the task; check the Harness Session and try again.","Office Job \u5F15\u7528\u4E86\u672C\u673A\u672A\u914D\u7F6E\u7684 Workspace/Preset alias\u3002":"The Office Job references a Workspace/Preset alias that is not configured locally.","\u4F60\u6B63\u5728\u672C\u673A DeepSeek Harness \u4E2D\u7EE7\u7EED\u4E00\u4E2A\u6765\u81EA AI Office \u7684\u4EFB\u52A1\u3002":"You are continuing an AI Office task inside the local DeepSeek Harness.","\u53EA\u5728\u5F53\u524D Workspace \u5185\u884C\u52A8\u3002\u5B8C\u6210\u540E\u5FC5\u987B\u8FD4\u56DE\uFF1A\u7ED3\u679C\u6458\u8981\u3001\u6539\u52A8\u6587\u4EF6\u3001\u9A8C\u8BC1\u8BC1\u636E\u3001\u672A\u89E3\u51B3\u98CE\u9669\u3002":"Act only within the current Workspace. When finished you must return: a result summary, changed files, verification evidence, and unresolved risks.","## \u672C\u673A Instruction Preset":"## Local Instruction Preset","## \u672C\u8F6E\u8865\u5145\u6307\u4EE4":"## Additional Instructions for This Round","## Office \u65F6\u95F4\u7EBF":"## Office Timeline","\u6279\u51C6 {tool}":"Approve {tool}","Harness \u5DE5\u5177":"Harness tool","Harness \u9700\u8981 {count} \u9879\u8865\u5145\u4FE1\u606F":"Harness needs {count} pieces of additional information","\u5DF2\u9886\u53D6 Job\uFF0C\u51C6\u5907 Workspace alias\uFF1A{alias}":"Job claimed; preparing Workspace alias: {alias}","Harness Session \u5DF2\u521B\u5EFA\u3002":"Harness Session created.","\u6B63\u5728\u4F7F\u7528 {tool}\u2026":"Using {tool}\u2026"};var X4=Object.freeze({\u90AE\u7BB1:"Email",\u90AE\u7BB1\u5730\u5740\u683C\u5F0F\u4E0D\u6B63\u786E:"The email address format is invalid",\u90AE\u7BB1\u5730\u5740\u4E0E\u5E94\u7528\u5BC6\u7801\u5747\u4E3A\u5FC5\u586B:"Both the email address and the app password are required","\u8BF7\u9009\u62E9\u90AE\u7BB1\u670D\u52A1\u5546\u6216\u586B\u5199 IMAP/SMTP \u670D\u52A1\u5668\u5730\u5740":"Choose a mail provider or fill in the IMAP/SMTP server addresses",\u5FC5\u987B\u81F3\u5C11\u914D\u7F6E\u4E00\u4E2A\u5141\u8BB8\u53D1\u4EF6\u4EBA:"At least one allowed sender must be configured","\u90AE\u7BB1\u8FDE\u63A5\u5931\u8D25\uFF0C\u8BF7\u68C0\u67E5\u5730\u5740\u3001\u5E94\u7528\u5BC6\u7801\u4E0E\u670D\u52A1\u5668\u8BBE\u7F6E":"Could not connect to the mailbox; check the address, app password, and server settings",\u672A\u627E\u5230\u8BE5\u90AE\u7BB1\u914D\u7F6E:"No mailbox configuration was found","\u90AE\u7BB1\u51ED\u636E\u5DF2\u4E22\u5931\uFF0C\u8BF7\u91CD\u65B0\u7ED1\u5B9A":"The mailbox credential is missing; please bind the mailbox again",\u90AE\u7BB1\u5C1A\u672A\u8FDE\u63A5:"The mailbox is not connected yet","\u90AE\u7BB1\u901A\u9053\u8FDE\u63A5\u6B63\u5E38\u3002":"The Email channel is connected.",\u90AE\u7BB1\u901A\u9053\u8FD0\u884C\u6B63\u5E38:"The Email channel is running normally",\u90AE\u7BB1\u901A\u9053\u5C1A\u672A\u8FDE\u63A5:"The Email channel is not connected yet","\u90AE\u7BB1\u8BBF\u95EE\u7B56\u7565\u540C\u6B65\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5":"Failed to sync the mailbox access policy; please retry",\u5F53\u524D\u73AF\u5883\u4E0D\u652F\u6301\u4F1A\u8BDD\u7ED1\u5B9A:"Session binding is not supported in this environment",\u8BE5\u63A5\u5165\u65B9\u5F0F\u4E0D\u9700\u8981\u626B\u7801\u6388\u6743:"This access method does not use QR authorization","\u6388\u6743\u4FE1\u606F\u7F3A\u5931\uFF0C\u8BF7\u91CD\u65B0\u626B\u7801\u6388\u6743":"The authorization is missing; please scan again",\u626B\u7801\u6388\u6743\u5C1A\u672A\u5F00\u59CB:"QR authorization has not been started","\u626B\u7801\u6388\u6743\u5DF2\u8D85\u65F6\uFF0C\u8BF7\u91CD\u65B0\u53D1\u8D77":"QR authorization timed out; please start it again"});var $4=Object.freeze(Object.assign({},bS,DS,P4,L4,F4,G4,U4,H4,x4,K4,Y4,j4,J4,q4,z4,W4,V4,Z4,X4));var Od="zh",MS=new Set;function tk(n){let A=typeof n=="string"?n.trim().toLowerCase():"";return A==="english"||/^en(?:[-_].*)?$/u.test(A)?"en":"zh"}function e8(n){let A=tk(n);if(A===Od)return Od;let o=Od;Od=A;for(let a of[...MS])if(MS.has(a))try{a(A,o)}catch{}return Od}function Yl(){return Od}function _S(n){if(typeof n!="function")throw new TypeError("onImHostLanguageChange requires a listener function");return MS.add(n),()=>{MS.delete(n)}}function S(n,A){if(typeof n!="string")return n;let o=Od==="en"?$4[n]??n:n;return A==null?o:o.replace(/\{(\w+)\}/g,(a,e)=>Object.hasOwn(A,e)?String(A[e]):a)}var Ak=Object.freeze({version:1,bots:Object.freeze([])}),Sme=new Set(["clientId","secretRef","approvedSenders"]);function js(n){return typeof n=="string"&&n.trim()?n.trim():null}function wme(n){return Cme("sha256").update(n).digest("hex")}function r8(n){let A=js(n);return A&&/^dt_[a-f0-9]{24}$/.test(A)?A:null}function Dme(n){let A=js(n);return A&&/^DSH_DINGTALK_BOT_SECRET_[A-F0-9]{24}$/.test(A)?A:null}function bme(n){let A=js(n);return A&&/^dt_sender_[a-f0-9]{32}$/.test(A)?A:null}function Ome(n){let A=typeof n=="string"?{staffId:n}:n;if(!A||typeof A!="object"||Array.isArray(A))return null;let o=bme(A.senderKey),a=js(A.staffId);return!o||!a?null:Object.freeze({senderKey:o,staffId:a,displayName:js(A.displayName),approvedAt:js(A.approvedAt)})}function Mme(n){if(!Array.isArray(n))return null;let A=n.map(Ome);if(A.some(e=>e===null))return null;let o=new Set,a=new Set;for(let e of A){if(o.has(e.staffId)||a.has(e.senderKey))return null;o.add(e.staffId),a.add(e.senderKey)}return Object.freeze(A)}function NS(n){let A=js(n);if(!A)throw new TypeError("clientId is required");let o=wme(A).slice(0,24);return Object.freeze({botId:`dt_${o}`,secretRef:`DSH_DINGTALK_BOT_SECRET_${o.toUpperCase()}`})}function i8(){return`dt_sender_${A8().replaceAll("-","")}`}function rk(n){return js(n)?S("\u8EAB\u4EFD\u5DF2\u9690\u85CF"):S("\u9489\u9489\u7528\u6237")}function ik(n){let A=js(n);return A?A.length<=8?`${A.slice(0,2)}\u2022\u2022\u2022\u2022`:`${A.slice(0,4)}\u2022\u2022\u2022\u2022${A.slice(-4)}`:S("\u9489\u9489\u673A\u5668\u4EBA")}function a8(n,{stored:A=!1}={}){if(!n||typeof n!="object"||Array.isArray(n)||"clientSecret"in n||"client_secret"in n||"deviceCode"in n||A&&Object.keys(n).some(r=>!Sme.has(r)))return null;let o=js(n.clientId),a=Dme(n.secretRef),e=Mme(n.approvedSenders??[]);if(!o||!a||!e)return null;let i=NS(o);return i.secretRef!==a||(n.botId===void 0?i.botId:r8(n.botId))!==i.botId?null:Object.freeze({botId:i.botId,clientId:o,secretRef:a,approvedSenders:e})}function _me(n){if(!n||n.version!==1||!Array.isArray(n.bots))return null;let A=n.bots.map(i=>a8(i,{stored:!0}));if(A.some(i=>i===null))return null;let o=new Set,a=new Set,e=new Set;for(let i of A){if(o.has(i.botId)||a.has(i.clientId)||e.has(i.secretRef))return null;o.add(i.botId),a.add(i.clientId),e.add(i.secretRef)}return Object.freeze({version:1,bots:Object.freeze(A)})}function Tme(n){return{version:1,bots:n.bots.map(A=>({clientId:A.clientId,secretRef:A.secretRef,approvedSenders:A.approvedSenders.map(o=>({senderKey:o.senderKey,staffId:o.staffId,displayName:o.displayName,approvedAt:o.approvedAt}))}))}}var TS=class{#e;#t=Ak;#A=Promise.resolve();constructor(A){if(!js(A))throw new TypeError("config path is required");this.#e=A}async load(){try{let A=_me(JSON.parse(await Bme(this.#e,"utf8")));if(!A)throw new Error("dsh-dingtalk config contains invalid bot data");this.#t=A}catch(A){if(A?.code!=="ENOENT")throw A;this.#t=Ak}return this}list(){return structuredClone(this.#t.bots)}get(A){let o=this.#t.bots.find(a=>a.botId===A);return o?structuredClone(o):null}getByClientId(A){let o=this.#t.bots.find(a=>a.clientId===A);return o?structuredClone(o):null}async save(A){let o=a8(A);if(!o)throw new Error("Refusing to persist invalid dsh-dingtalk bot data");return this.#r(a=>{if(a.find(t=>(t.clientId===o.clientId||t.secretRef===o.secretRef)&&t.botId!==o.botId))throw new Error("Duplicate DingTalk bot identity");let i=a.findIndex(t=>t.botId===o.botId);return i===-1?a.push(o):a[i]=o,structuredClone(o)})}async remove(A){if(!r8(A))throw new TypeError("Invalid DingTalk bot id");return this.#r(o=>{let a=o.findIndex(i=>i.botId===A);if(a===-1)return null;let[e]=o.splice(a,1);return structuredClone(e)})}async clear(){let A=this.#A.then(async()=>{try{await t8(this.#e)}catch(o){if(o?.code!=="ENOENT")throw o}this.#t=Ak});this.#A=A.then(()=>{},()=>{}),await A}async#r(A){let o,a=this.#A.then(async()=>{let e=[...this.#t.bots];o=A(e);let i=Object.freeze({version:1,bots:Object.freeze(e)});await this.#a(i),this.#t=i});return this.#A=a.then(()=>{},()=>{}),await a,o}async#a(A){await fme(mme(this.#e),{recursive:!0,mode:448});let o=`${this.#e}.${process.pid}.${A8()}.tmp`;try{await Qme(o,`${JSON.stringify(Tme(A),null,2)}
140
- `,{encoding:"utf8",flag:"wx",mode:384}),await yme(o,this.#e)}catch(a){try{await t8(o)}catch(e){if(e?.code!=="ENOENT")throw new AggregateError([a,e])}throw a}}};var n8="https://oapi.dingtalk.com",Nme="DING_DWS_CLAW";function Js(n){return typeof n=="string"&&n.trim()?n.trim():null}function o8(n,A){let o=Number(n);return Number.isFinite(o)&&o>0?o:A}function Rme(n){let A;try{A=new URL(Js(n)??n8)}catch{throw new TypeError("DingTalk registration base URL must be a valid HTTPS URL")}let o=A.hostname==="dingtalk.com"||A.hostname.endsWith(".dingtalk.com");if(A.protocol!=="https:"||A.port||!o||A.username||A.password||A.search||A.hash)throw new TypeError("DingTalk registration base URL must be a valid HTTPS URL");return A.pathname=A.pathname.replace(/\/+$/,""),A.href.replace(/\/$/,"")}function kme(n){let A=typeof n?.now=="function"?n.now():n();if(!Number.isFinite(A))throw new TypeError("clock must return a finite timestamp");return A}function vme(n,A){if(!n||typeof n!="object"||Array.isArray(n))throw new Rc("invalid-response",`DingTalk ${A} returned an invalid response`,A);if(Number(n.errcode)!==0)throw new Rc("api-error",`DingTalk ${A} request was rejected`,A);return n}var Rc=class extends Error{constructor(A,o,a,e={}){super(o,e),this.name="DingtalkDeviceAuthError",this.code=A,this.action=a,Number.isInteger(e.status)&&(this.status=e.status),Number.isFinite(e.timeoutMs)&&(this.timeoutMs=e.timeoutMs)}},RS=class{#e;#t;#A;#r;constructor({fetch:A=globalThis.fetch,clock:o=Date,baseUrl:a=n8,timeoutMs:e=15e3}={}){if(typeof A!="function")throw new TypeError("fetch is required");if(typeof o!="function"&&typeof o?.now!="function")throw new TypeError("clock must be a function or expose now()");if(!Number.isFinite(e)||e<=0)throw new TypeError("timeoutMs must be a positive number");this.#e=A,this.#t=o,this.#A=Rme(a),this.#r=e}async start({signal:A}={}){let o=await this.#a("/app/registration/init",{source:Nme},"initialization",A),a=Js(o.nonce);if(!a)throw new Rc("missing-nonce","DingTalk registration initialization did not return a nonce","initialization");let e=await this.#a("/app/registration/begin",{nonce:a},"begin",A),i=Js(e.device_code),t=Js(e.verification_uri_complete);if(!i||!t)throw new Rc("incomplete-registration","DingTalk registration did not return complete QR metadata","begin");let r=o8(e.expires_in,7200),s=o8(e.interval,5)*1e3;return Object.freeze({deviceCode:i,verificationUrl:t,verificationUri:Js(e.verification_uri),userCode:Js(e.user_code),expiresAt:kme(this.#t)+r*1e3,pollIntervalMs:s})}async poll(A){let o=Js(typeof A=="string"?A:A?.deviceCode),a=typeof A=="object"?A?.signal:void 0;if(!o)throw new TypeError("deviceCode is required");let e=await this.#a("/app/registration/poll",{device_code:o},"poll",a),i=Js(e.status)?.toUpperCase(),t=["WAITING","SUCCESS","FAIL","EXPIRED"].includes(i)?i:"UNKNOWN";return Object.freeze({status:t,clientId:Js(e.client_id),clientSecret:Js(e.client_secret),failReason:Js(e.fail_reason)})}async#a(A,o,a,e){let i,t=AbortSignal.timeout(this.#r),r=e?AbortSignal.any([e,t]):t;try{i=await this.#e(`${this.#A}${A}`,{method:"POST",headers:{accept:"application/json","content-type":"application/json"},body:JSON.stringify(o),redirect:"error",signal:r})}catch(c){throw e?.aborted?e.reason??c:t.aborted?new Rc("timeout",`DingTalk ${a} request timed out`,a,{cause:c,timeoutMs:this.#r}):c?.name==="AbortError"?c:new Rc("network-error",`DingTalk ${a} request could not be completed`,a,{cause:c})}if(!i||i.ok===!1||typeof i.json!="function")throw new Rc("http-error",`DingTalk ${a} request failed`,a,{status:i?.status});let s;try{s=await i.json()}catch(c){throw new Rc("invalid-json",`DingTalk ${a} returned invalid JSON`,a,{cause:c})}return vme(s,a)}};import{randomUUID as Jme}from"node:crypto";var vh={name:"dsh-a2a-im",version:"0.1.0",icon:"./assets/logo-plugin-message-link-gradient.webp",description:"\u628A\u5FAE\u4FE1\u3001\u98DE\u4E66\u3001\u4F01\u5FAE\u3001\u9489\u9489\u3001QQ\u3001Telegram\u3001WhatsApp\u3001Slack\u3001Discord\u3001Matrix\u63A5\u5165DSH\u3002 Connect Telegram, WhatsApp, Slack, Discord, Matrix, WeChat, Feishu, WeCom, DingTalk, and QQ to DSH.",keywords:["deepseek-harness","dsh","dsh-plugin","ai-agent","im","instant-messaging","chatbot","feishu","lark","wechat","wecom","dingtalk","qq","slack","telegram","discord","whatsapp","imessage","matrix","ai-office"],author:"xmanrui (https://github.com/xmanrui)",license:"MIT",type:"module",repository:{type:"git",url:"git+https://github.com/xmanrui/dsh-im.git"},homepage:"https://github.com/xmanrui/dsh-im#readme",bugs:{url:"https://github.com/xmanrui/dsh-im/issues"},publishConfig:{access:"public"},bin:{"dsh-im":"bin/dsh-im.mjs"},main:"./lib/index.js",exports:{".":"./lib/index.js","./client":"./lib/client.js","./package.json":"./package.json","./locale/*.json":"./locale/*.json"},files:["assets","bin","cordis.patch.yml","lib","locale/*.json","plugin-src","scripts/verify-interface-language.mjs","scripts/verify-injected-context.mjs","scripts/verify-lan-management.mjs","scripts/verify-model-setting.mjs","scripts/verify-package.mjs","scripts/verify-session-channel-logos.mjs","scripts/verify-session-title-prefix.mjs","src","PROACTIVE_DELIVERY.md","PROACTIVE_DELIVERY.en.md","docs/client-integration.md","LICENSE","README.md","README.en.md","THIRD_PARTY_NOTICES.md"],dsh:{bundle:{patch:"./cordis.patch.yml"},client:{inject:["@deepseek-ai/dsh-client-connection","@deepseek-ai/dsh-client-runtime","@deepseek-ai/dsh-client-ui-settings","@deepseek-ai/dsh-client-ui-slots","@deepseek-ai/dsh-client-locale"],platform:"web"},compatibility:{dsh:"0.2.0-rc.2",dshReleases:{"0.2.0-rc.2":"compatible"},profiles:["web"]}},scripts:{build:"node plugin-src/client/build.mjs && node plugin-src/host/build.mjs",prepack:"npm run build",test:"node --test test/*.test.mjs test/channels/*/*.test.mjs",check:"npm run build && npm test && node scripts/verify-package.mjs"},engines:{node:">=22.19"},dependencies:{"@matrix-org/olm":"3.2.15","@tencent-connect/qqbot-connector":"1.2.0","@tencent-connect/qqbot-nodejs":"1.0.4","@wecom/aibot-node-sdk":"1.0.7","dingtalk-stream":"2.1.4",imapflow:"^2.0.5",mailparser:"^3.9.28",nodemailer:"^10.0.10",qrcode:"1.5.4",undici:"7.29.1"},devDependencies:{"@deepseek-ai/cordis":"4.0.1","@larksuiteoapi/node-sdk":"1.73.0","@whiskeysockets/baileys":"7.0.0-rc14",esbuild:"0.25.9","https-proxy-agent":"5.0.1",react:"18.3.1","react-dom":"18.3.1","react-test-renderer":"18.3.1",semver:"7.8.5"},directories:{doc:"docs",lib:"lib",test:"test"},optionalDependencies:{"@tencent-qqmail/agently-cli":"^1.0.18",sharp:"0.35.5"}};var Lme=new Set(["bot.bind-credentials","bot.bind-native","bot.bind-mailbox","bot.mailbox.update","bot.auth.start","bot.auth.poll","permissions.status","bot.session-binding.get","bot.session-binding.set","bot.session.list","connection.test","message.receive","message.send","connector.configure","connector.reconnect","connector.test","connector.remove","startup","connection.restore","connection.monitor","connection.close","connection.status","provision.begin","provision.poll","provision.verify","provision.cancel","bot.reconnect","bot.delete","bot.workspace.set","bot.model.set","bot.agent-preset.set","bot.context-enhancement.set","bot.access-policy.set","bot.alias.set"]),Fme=new Set(["session.prepare","prompt.prepare","interaction.open","prompt.submit","reply.wait","credential.verify","permission.check","sdk.load","operation","message.receive","message.send","connection.test","startup.load","qr.begin","qr.encode","qr.poll","qr.verify","qr.cancel","credential.read","credential.save","credential.remove","account.save","account.remove","state.load","state.write","state.cleanup","workspace.write","workspace.cleanup","runtime.prepare","activation","harness.check","connection.start","connection.poll","connection.stop","status.read","rollback","management.request"]),ak=new Set(["stream-closed-before-open","stream-failed-before-open","stream-failed","ENOTFOUND","EAI_AGAIN","ECONNREFUSED","ECONNRESET","EHOSTUNREACH","ENETUNREACH","ETIMEDOUT","EPIPE","UND_ERR_CONNECT_TIMEOUT","UND_ERR_HEADERS_TIMEOUT","UND_ERR_BODY_TIMEOUT","UND_ERR_SOCKET","CERT_HAS_EXPIRED","CERT_NOT_YET_VALID","DEPTH_ZERO_SELF_SIGNED_CERT","SELF_SIGNED_CERT_IN_CHAIN","UNABLE_TO_VERIFY_LEAF_SIGNATURE","UNABLE_TO_GET_ISSUER_CERT_LOCALLY","ERR_TLS_CERT_ALTNAME_INVALID","ERR_SSL_WRONG_VERSION_NUMBER","ENOENT","EACCES","EPERM","ENOSPC","EROFS","ENOTDIR","EISDIR","EBUSY","EIO","EXDEV","EMFILE","ENFILE","EEXIST","unknown","multiple-causes","timeout","http-error","provider-rejected","invalid-response","ERR_PROXY_CONNECTION_FAILED","ERR_TLS_HANDSHAKE_TIMEOUT","ERR_SSL_TLSV1_ALERT_INTERNAL_ERROR","ERR_NETWORK_ACCESS_DENIED","AUTHENTICATIONFAILED","EAUTH","invalid-json","invalid-config","read-only"]),Gme=new Set(["credential-store","account-config","account-state","workspace-config","workspace-directory"]),Ume=new Set(["host.describe","workspace.list","workspace.create","session.list","session.create","session.history","session.prompt","session.rename","session.cancel","session.models","session.permissions","session.selectModel","llm.models"]),Hme=new Set(["host-api","http","websocket"]),xme=new Set(["not-submitted","accepted","unknown"]),Kme=new Set(["config.json","workspaces.json"]),kS=Object.freeze({"expected-object":"\u5E94\u4E3A JSON \u5BF9\u8C61\u3002","expected-array":"\u5E94\u4E3A JSON \u6570\u7EC4\u3002","unsupported-version":"\u914D\u7F6E\u7248\u672C\u7F3A\u5931\u6216\u4E0D\u53D7\u5F53\u524D\u63D2\u4EF6\u652F\u6301\u3002","invalid-string":"\u5B57\u6BB5\u7F3A\u5931\u6216\u4E0D\u662F\u975E\u7A7A\u5B57\u7B26\u4E32\u3002","invalid-identifier":"\u6807\u8BC6\u7B26\u683C\u5F0F\u4E0D\u7B26\u5408\u8981\u6C42\u3002","identity-mismatch":"\u6807\u8BC6\u7B26\u4E0E accountId \u6D3E\u751F\u7ED3\u679C\u4E0D\u4E00\u81F4\u3002","duplicate-identity":"\u8D26\u53F7\u6807\u8BC6\u91CD\u590D\u3002","invalid-api-url":"\u5FAE\u4FE1\u670D\u52A1\u5730\u5740\u4E0D\u662F\u6709\u6548 URL\u3002","untrusted-api-url":"\u5FAE\u4FE1\u670D\u52A1\u5730\u5740\u5FC5\u987B\u4F7F\u7528\u53D7\u4FE1\u4EFB\u7684 HTTPS \u57DF\u540D\u548C\u7AEF\u53E3\u3002","invalid-workspace-path":"\u5DE5\u4F5C\u533A\u8DEF\u5F84\u5FC5\u987B\u662F\u5F53\u524D\u64CD\u4F5C\u7CFB\u7EDF\u7684\u7EDD\u5BF9\u8DEF\u5F84\u3002","invalid-agent-preset":"Agent Preset \u6807\u8BC6\u65E0\u6548\u3002","invalid-model-selection":"\u6A21\u578B\u8BBE\u7F6E\u987B\u5305\u542B\u6709\u6548\u7684 provider\u3001model \u548C\u53EF\u9009 reasoningEffort\u3002","invalid-delivery-target":"\u6295\u9012\u76EE\u6807\u7684\u6807\u8BC6\u3001\u7ED3\u6784\u6216\u8DEF\u7531\u4E0D\u7B26\u5408\u5F53\u524D\u914D\u7F6E\u7248\u672C\u8981\u6C42\u3002","unexpected-field":"\u5F53\u524D\u914D\u7F6E\u7248\u672C\u4E0D\u5141\u8BB8\u6B64\u5B57\u6BB5\u3002"}),Yme=/^(?:\$|version|accounts(?:\[\d{1,10}\](?:\.(?:accountId|ownerUserId|botId|tokenRef|baseUrl))?)?|(?:workspaces|agentPresets|models)(?:\[\d{1,10}\]\.(?:key|value))?|deliveryTargets(?:\[\d{1,10}\]\.(?:key|targets(?:\[\d{1,10}\])?))?)$/;function zo(n){if(!n||typeof n!="object"||Array.isArray(n))return{};let A={};for(let[a,e]of[["operation",Lme],["stage",Fme],["reason",ak],["resource",Gme],["method",Ume],["transport",Hme],["submissionState",xme],["lastFailureReason",ak]])e.has(n[a])&&(A[a]=n[a]);if(jme.includes(n.channel)&&(A.channel=n.channel),Array.isArray(n.reasons)){let a=[...new Set(n.reasons.filter(e=>ak.has(e)&&!["unknown","multiple-causes"].includes(e)))].slice(0,16);a.length&&(A.reasons=a)}for(let a of["durationMs","timeoutMs"])Number.isFinite(n[a])&&n[a]>=0&&(A[a]=Math.round(n[a]));Number.isSafeInteger(n.attempts)&&n.attempts>=0&&(A.attempts=n.attempts);for(let a of["nodeVersion","dshVersion"])typeof n[a]=="string"&&/^\d+\.\d+\.\d+(?:-[A-Za-z0-9.-]+)?$/.test(n[a])&&n[a].length<80&&(A[a]=n[a]);if(["darwin","linux","win32","freebsd"].includes(n.platform)&&(A.platform=n.platform),["ilinkai.weixin.qq.com","oapi.dingtalk.com","api.dingtalk.com","api.telegram.org","discord.com","slack.com","open.feishu.cn","qyapi.weixin.qq.com"].includes(n.host)&&(A.host=n.host),n.dependencies&&typeof n.dependencies=="object"){let a={};for(let e of["dingtalkStream","axios","httpsProxyAgent","agentBase"]){let i=n.dependencies[e];typeof i=="string"&&/^\d+\.\d+\.\d+(?:[-+][A-Za-z0-9.-]+)?$/.test(i)&&i.length<=80&&(a[e]=i)}Object.keys(a).length&&(A.dependencies=a)}typeof n.proxyConfigured=="boolean"&&(A.proxyConfigured=n.proxyConfigured),n.truncated===!0&&(A.truncated=!0),Kme.has(n.file)&&(A.file=n.file),typeof n.field=="string"&&Yme.test(n.field)&&(A.field=n.field),typeof n.issue=="string"&&Object.hasOwn(kS,n.issue)&&(A.issue=n.issue),/^(?:(?:WX|DT|IM)-CONN|MF)-[A-F0-9]{8}$/.test(n.referenceId??"")&&(A.referenceId=n.referenceId),typeof n.occurredAt=="string"&&/^\d{4}-\d\d-\d\dT\d\d:\d\d:\d\d\.\d{3}Z$/.test(n.occurredAt)&&Number.isFinite(Date.parse(n.occurredAt))&&(A.occurredAt=n.occurredAt),Number.isInteger(n.httpStatus)&&n.httpStatus>=100&&n.httpStatus<=599&&(A.httpStatus=n.httpStatus);let o=typeof n.providerCode=="number"&&Number.isSafeInteger(n.providerCode)?String(n.providerCode):n.providerCode;return typeof o=="string"&&/^-?\d{1,12}$/.test(o)&&(A.providerCode=o),typeof n.pluginVersion=="string"&&/^\d+\.\d+\.\d+(?:-[A-Za-z0-9.-]+)?$/.test(n.pluginVersion)&&n.pluginVersion.length<=64&&(A.pluginVersion=n.pluginVersion),["succeeded","failed","not-attempted","unknown"].includes(n.rollback)&&(A.rollback=n.rollback),typeof n.hint=="string"&&n.hint.trim()&&(A.hint=n.hint.trim().slice(0,500)),A}var jme=Object.freeze(["weixin","feishu","dingtalk","wecom","qq","slack","telegram","discord","whatsapp","wecom-app","imessage","email","office"]);function jl(n){if(!n?.details)return{};let A=zo({...n?.details,referenceId:n?.details?.referenceId??n?.referenceId,hint:n?.details?.hint??n?.hint});return Object.keys(A).length?{details:A}:{}}var df=new WeakMap,c8=new WeakMap,Md=new WeakMap,qme={"harness-interaction-timeout":"timeout","harness-response-invalid":"invalid-response","connect-timeout":"timeout","telegram-timeout":"timeout","cli-timeout":"timeout","provider-timeout":"timeout","telegram-response-invalid":"invalid-response","office-protocol-mismatch":"invalid-response"},zme=new Set(["Error","TypeError","SyntaxError","AggregateError","DOMException","AxiosError","TimeoutError","AbortError"]),s8={"discord-401":"Discord Bot Token \u65E0\u6548\uFF0C\u8BF7\u91CD\u65B0\u586B\u5199\u3002","discord-intents":"Discord Gateway Intents \u914D\u7F6E\u4E0D\u6B63\u786E\uFF0C\u8BF7\u68C0\u67E5 Developer Portal \u7684 Bot \u8BBE\u7F6E\u3002","webhook-configured":"\u8BE5 Telegram \u673A\u5668\u4EBA\u5DF2\u914D\u7F6E Webhook\uFF0C\u8BF7\u5148\u5728\u539F\u670D\u52A1\u4E2D\u79FB\u9664 Webhook \u540E\u91CD\u8BD5\u3002","invalid-device-token":"AI Office Device Token \u65E0\u6548\u3002","office-hook-unavailable":"AI Office Hook \u5C1A\u672A\u4E0A\u7EBF\u6216\u5730\u5740\u4E0D\u6B63\u786E\u3002","messages-database-permission-required":"\u8BF7\u5728 macOS \u7CFB\u7EDF\u8BBE\u7F6E\u4E2D\u6388\u4E88 DSH \u5B8C\u5168\u78C1\u76D8\u8BBF\u95EE\u6743\u9650\uFF0C\u4EE5\u8BFB\u53D6 Messages \u6570\u636E\u5E93\u3002","messages-automation-permission-required":"\u8BF7\u5728 macOS \u7CFB\u7EDF\u8BBE\u7F6E\u4E2D\u5141\u8BB8 DSH \u81EA\u52A8\u63A7\u5236 Messages\u3002","messages-permission-required":"\u5148\u5728 macOS \u7CFB\u7EDF\u8BBE\u7F6E\u4E2D\u6388\u4E88 Messages \u6743\u9650\u3002"};function vS(n){let A=[n],o=new Set,a=[];for(;A.length&&a.length<16;){let e=A.shift();!e||typeof e!="object"||o.has(e)||(o.add(e),a.push(e),e.cause&&typeof e.cause=="object"&&A.push(e.cause),Array.isArray(e.errors)&&A.push(...e.errors.slice(0,16)))}return{chain:a,truncated:A.some(e=>e&&typeof e=="object"&&!o.has(e))||a.some(e=>Array.isArray(e.errors)&&e.errors.length>16)}}function ft(n){let{chain:A,truncated:o}=vS(n),a=A.map(c=>({type:zme.has(c.name)?c.name:"Error",...zo({reason:c.details?.reason,reasons:c.details?.reasons,httpStatus:c.details?.httpStatus,providerCode:c.details?.providerCode}),...zo({reason:qme[c.code]??(c.name==="TimeoutError"?"timeout":c.code??(c instanceof SyntaxError?"invalid-json":void 0)),httpStatus:c.status??c.statusCode??c.response?.status,providerCode:c.providerCode}),hasCause:!!(c.cause&&typeof c.cause=="object"),hasErrors:Array.isArray(c.errors)})),e=[...new Set(a.flatMap(c=>c.reason==="multiple-causes"?c.reasons??[]:[c.reason]).filter(c=>c&&!["unknown","multiple-causes"].includes(c)))],i=e.filter(c=>!["timeout","http-error","provider-rejected","invalid-response"].includes(c)),t=i.length?i:e,r=c=>A.map(g=>zo({[c]:Md.get(g)?.[c]??g[c]??g.details?.[c]})[c]).find(g=>g!==void 0),s={};for(let c of["sessionId","promptRpcId"]){let g=A.map(l=>Md.get(l)?.[c]).find(l=>l!==void 0);typeof g=="string"&&/^[A-Za-z0-9_-]{1,256}$/u.test(g)&&(s[c]=g)}return{chain:A,errors:a,correlation:s,details:zo({reason:t.length>1?"multiple-causes":t[0]??"unknown",...t.length>1?{reasons:t}:{},httpStatus:a.find(c=>c.httpStatus!==void 0)?.httpStatus,providerCode:a.find(c=>c.providerCode!==void 0)?.providerCode,method:r("method"),transport:r("transport"),stage:r("stage"),submissionState:r("submissionState"),attempts:r("attempts"),lastFailureReason:r("lastFailureReason"),durationMs:r("durationMs"),timeoutMs:r("timeoutMs"),host:r("host"),truncated:o})}}function _d(n,A){if(n?.name==="AbortError")return n;let o=n&&typeof n=="object"?n:new Error("Message processing failed"),a=o instanceof DOMException?Object.defineProperties(new DOMException(o.message,o.name),Object.getOwnPropertyDescriptors(o)):Object.defineProperties(Object.setPrototypeOf(o instanceof Error?new Error:{},Object.getPrototypeOf(o)),Object.getOwnPropertyDescriptors(o));return Md.set(a,{...A,...Md.get(o)}),a}function nk(){return{pluginVersion:vh.version,nodeVersion:process.versions.node,platform:process.platform}}async function pe(n,A,o){try{return await A()}catch(a){throw pf(a,n,o)}}function pf(n,A,o){return(!n||typeof n!="object")&&(n=new Error("Operation failed")),Md.has(n)||Md.set(n,zo({stage:A,resource:o})),n}function ok(n){return vS(n).chain.map(A=>df.get(A)??c8.get(A)).find(Boolean)}function FA(n,A,o,a){if(A?.name==="AbortError")return{ok:!1,error:{code:"cancelled",message:S("\u64CD\u4F5C\u5DF2\u53D6\u6D88\u3002"),details:{}}};if(o?.ok!==!1||["cancelled","bad-request"].includes(o.error?.code))return o;let e=ok(A)??n.report(A,{...a,publicError:o.error});return{...o,error:a?.untrustedPublicError?e.publicError:{...e.publicError,...o.error,details:e.publicError.details}}}function hf(n){let A=n.reason;return A==="multiple-causes"?S("\u68C0\u6D4B\u5230\u591A\u4E2A\u5E95\u5C42\u539F\u56E0\uFF0C\u8BF7\u5C55\u5F00\u8BCA\u65AD\u8BE6\u60C5\u9010\u9879\u68C0\u67E5\u3002"):["ENOTFOUND","EAI_AGAIN"].includes(A)?S("\u670D\u52A1\u57DF\u540D\u89E3\u6790\u5931\u8D25\uFF0C\u8BF7\u68C0\u67E5\u8FD0\u884C DSH \u7684\u673A\u5668\u7684 DNS \u548C\u7F51\u7EDC\u8BBE\u7F6E\u3002"):A==="ECONNREFUSED"?S("\u76EE\u6807\u62D2\u7EDD\u8FDE\u63A5\uFF0C\u8BF7\u68C0\u67E5\u670D\u52A1\u5730\u5740\u3001\u7AEF\u53E3\u548C\u8BBF\u95EE\u9650\u5236\u3002"):["ECONNRESET","EPIPE","UND_ERR_SOCKET"].includes(A)?S("\u8FDE\u63A5\u5DF2\u4E2D\u65AD\uFF0C\u8BF7\u68C0\u67E5\u7F51\u7EDC\u548C\u76EE\u6807\u670D\u52A1\u72B6\u6001\u3002"):["ENETUNREACH","EHOSTUNREACH","ERR_NETWORK_ACCESS_DENIED"].includes(A)?S("\u76EE\u6807\u7F51\u7EDC\u4E0D\u53EF\u8FBE\uFF0C\u8BF7\u68C0\u67E5\u8FD0\u884C DSH \u7684\u673A\u5668\u7684\u7F51\u7EDC\u51FA\u53E3\u548C\u8BBF\u95EE\u9650\u5236\u3002"):/CERT|TLS|SSL|ISSUER|SIGNATURE/.test(A??"")?S("TLS \u6216\u8BC1\u4E66\u6821\u9A8C\u5931\u8D25\uFF0C\u8BF7\u68C0\u67E5\u7CFB\u7EDF\u65F6\u95F4\u3001\u8BC1\u4E66\u94FE\u548C\u7F51\u7EDC\u8BBE\u7F6E\u3002"):/TIMEOUT/.test(A??"")||A==="ETIMEDOUT"||A==="timeout"?S("\u8BF7\u6C42\u8D85\u65F6\uFF0C\u8BF7\u68C0\u67E5\u76EE\u6807\u670D\u52A1\u548C\u7F51\u7EDC\uFF1B\u8BCA\u65AD\u8BE6\u60C5\u4E2D\u53EF\u67E5\u770B\u5DF2\u77E5\u7684\u8017\u65F6\u3002"):A==="ERR_PROXY_CONNECTION_FAILED"||n.httpStatus===407?S("\u4EE3\u7406\u8FDE\u63A5\u6216\u8BA4\u8BC1\u5931\u8D25\uFF0C\u8BF7\u68C0\u67E5 DSH \u8FDB\u7A0B\u4F7F\u7528\u7684\u4EE3\u7406\u914D\u7F6E\u3002"):["EAUTH","AUTHENTICATIONFAILED"].includes(A)?S("\u670D\u52A1\u8BA4\u8BC1\u5931\u8D25\uFF0C\u8BF7\u68C0\u67E5\u8D26\u53F7\u548C\u6388\u6743\u4FE1\u606F\u3002"):["EACCES","EPERM","EROFS"].includes(A)?S("\u64CD\u4F5C\u6743\u9650\u4E0D\u8DB3\uFF0C\u8BF7\u68C0\u67E5\u5BF9\u5E94\u8D44\u6E90\u7684\u8BBF\u95EE\u6743\u9650\u3002"):A==="ENOSPC"?S("\u78C1\u76D8\u7A7A\u95F4\u4E0D\u8DB3\uFF0C\u8BF7\u91CA\u653E\u7A7A\u95F4\u540E\u91CD\u8BD5\u3002"):A==="ENOENT"?S("\u6240\u9700\u6587\u4EF6\u6216\u672C\u5730\u5DE5\u5177\u4E0D\u5B58\u5728\uFF0C\u8BF7\u68C0\u67E5\u5B89\u88C5\u548C\u914D\u7F6E\u3002"):A==="invalid-json"||A==="invalid-response"?S("\u6570\u636E\u683C\u5F0F\u65E0\u6548\uFF0C\u8BF7\u6309\u5931\u8D25\u9636\u6BB5\u68C0\u67E5\u670D\u52A1\u54CD\u5E94\u6216\u672C\u5730\u914D\u7F6E\u3002"):n.httpStatus===429?S("\u670D\u52A1\u6B63\u5728\u9650\u6D41\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002"):[401,403].includes(n.httpStatus)?S("\u670D\u52A1\u62D2\u7EDD\u4E86\u8BF7\u6C42\uFF0C\u8BF7\u68C0\u67E5\u51ED\u636E\u3001\u6743\u9650\u6216\u8BBF\u95EE\u9650\u5236\uFF1BHTTP \u72B6\u6001\u672C\u8EAB\u4E0D\u80FD\u786E\u8BA4\u767B\u5F55\u5931\u6548\u3002"):n.httpStatus>=500?S("\u76EE\u6807\u670D\u52A1\u6682\u65F6\u5F02\u5E38\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002"):n.httpStatus?S("\u76EE\u6807\u670D\u52A1\u8FD4\u56DE\u4E86 HTTP \u9519\u8BEF\uFF0C\u8BF7\u67E5\u770B\u8BCA\u65AD\u8BE6\u60C5\u3002"):S("\u6682\u672A\u8BC6\u522B\u5177\u4F53\u539F\u56E0\uFF0C\u8BF7\u590D\u5236\u8BCA\u65AD\u4FE1\u606F\uFF0C\u5E76\u67E5\u770B\u76F8\u540C\u53C2\u8003\u53F7\u7684 DSH \u65E5\u5FD7\u3002")}function Wme(n){return{"connector.test":"connection.test","connector.configure":"credential.verify","connector.reconnect":"connection.start","connector.remove":"account.remove",startup:"startup.load","connection.restore":"connection.start","connection.monitor":"connection.poll","connection.status":"status.read","connection.close":"connection.stop","provision.begin":"qr.begin","provision.poll":"qr.poll","provision.verify":"qr.verify","bot.auth.start":"qr.begin","bot.auth.poll":"qr.poll","bot.reconnect":"connection.start","bot.delete":"account.remove","permissions.status":"permission.check","bot.bind-credentials":"credential.verify","bot.bind-mailbox":"credential.verify","bot.bind-native":"permission.check","connection.test":"connection.test","message.send":"message.send","message.receive":"message.receive"}[n]??"operation"}function st({channel:n,logger:A=console,now:o=Date.now,prefix:a="IM-CONN",describe:e}={}){let i=new Map,t=(g,l)=>{try{A[g]?.(`[dsh-${n}] ${JSON.stringify(l)}`)}catch{}};function r(g,l={}){if(df.has(g))return g;if(l.reuse&&ok(g))return ok(g);let d=ft(g),u=d.chain.map(k=>df.get(k)).find(Boolean);if(u)return u;let B=e?.(g,l,d)??{},y=d.chain.find(k=>Object.hasOwn(s8,k.code??"")),Q=B.publicError??l.publicError??{};y&&!Q.code?.startsWith("stream-")&&(Q={...Q,code:y.code,message:S(s8[y.code])}),["email","imessage","office"].includes(n)&&!y&&l.untrustedPublicError&&(Q={code:`${n}-operation-failed`,message:S("\u64CD\u4F5C\u5931\u8D25\uFF0C\u8BF7\u67E5\u770B\u539F\u56E0\u548C\u8BCA\u65AD\u8BE6\u60C5\u3002")});let m=d.chain.map(k=>Md.get(k)).find(Boolean)??{},D=zo({...d.details,...l,...Q.details,...B.details,...m,channel:n,stage:m.stage??B.details?.stage??Q.details?.stage??l.stage??Wme(l.operation),...nk()}),M=Q.code??l.code??`${n}-operation-failed`,O=B.hint??Q.hint??Q.details?.hint??hf(D),R=S(Q.message)??S("\u64CD\u4F5C\u5931\u8D25\uFF0C\u8BF7\u67E5\u770B\u539F\u56E0\u548C\u8BCA\u65AD\u8BE6\u60C5\u3002"),F=JSON.stringify([l.botId,l.attemptId,D.operation,D.stage,M,D.reason,D.reasons,D.httpStatus,D.providerCode,D.resource,D.file,D.field,D.issue]),v=i.get(F),L=o(),U=k=>{let x=new Error(k.message,{cause:g});return x.code=k.code,x.publicError=structuredClone(k),df.set(x,x),g&&typeof g=="object"&&c8.set(g,x),x};if(l.automatic&&v&&L-v.time<6e4)return v.retries+=1,U(v.publicError);v?.retries&&t("warn",{event:"connection-retries",referenceId:v.publicError.details.referenceId,retries:v.retries}),D.referenceId=zo({referenceId:Q.referenceId}).referenceId??`${a}-${Jme().replaceAll("-","").slice(0,8).toUpperCase()}`,D.occurredAt=new Date(L).toISOString(),D.hint=O;let G={code:M,message:R,details:D};return l.automatic&&(i.size>=128&&i.delete(i.keys().next().value),i.set(F,{time:L,publicError:G,retries:0,botId:l.botId})),t(l.warning?"warn":"error",{event:l.warning?"connection-warning":"connection-failure",code:M,...D,errors:d.errors,...zo({referenceId:l.parentReferenceId}).referenceId?{parentReferenceId:l.parentReferenceId}:{}}),U(G)}function s(g){for(let[l,d]of i)g!==void 0&&d.botId!==g||(d.retries&&t("info",{event:"connection-retries",referenceId:d.publicError.details.referenceId,retries:d.retries}),i.delete(l))}function c(g,l){df.has(g)&&zo({rollback:l}).rollback&&(g.publicError.details.rollback=l,g.publicError.details.hint=l==="succeeded"?S("\u64CD\u4F5C\u672A\u5B8C\u6210\uFF0C\u5DF2\u6062\u590D\u4E4B\u524D\u7684\u672C\u673A\u72B6\u6001\u3002\u8BF7\u5904\u7406\u4E0A\u8FF0\u95EE\u9898\u540E\u91CD\u8BD5\u3002"):S("\u539F\u8D26\u53F7\u72B6\u6001\u5C1A\u672A\u786E\u8BA4\uFF0C\u8BF7\u91CD\u65B0\u8BFB\u53D6\u72B6\u6001\uFF0C\u5E76\u53CD\u9988\u8BCA\u65AD\u4FE1\u606F\u3002"),t("info",{event:"connection-outcome",referenceId:g.publicError.details.referenceId,rollback:l}))}return{report:r,clear:s,outcome:c}}import{randomUUID as ESe}from"node:crypto";var g8=new WeakMap,sk=Symbol("dsh-im.connection-test-state-identity");function l8(n){return n?.[sk]??n}function Vme(n){return typeof n=="string"&&n.trim()?n.trim():null}function Wo(n,A){if(!n||!A||typeof A!="object")return!1;try{return g8.set(l8(n),structuredClone(A)),!0}catch{return!1}}function uf(n){let A=n?g8.get(l8(n)):null;return A?structuredClone(A):null}function ni(n,A=S("\u673A\u5668\u4EBA")){let o=Vme(n)??A;return`${S("\u2705 DeepSeek Harness \u8FDE\u63A5\u6D4B\u8BD5\u6210\u529F")}
140
+ `,{encoding:"utf8",flag:"wx",mode:384}),await yme(o,this.#e)}catch(a){try{await t8(o)}catch(e){if(e?.code!=="ENOENT")throw new AggregateError([a,e])}throw a}}};var n8="https://oapi.dingtalk.com",Nme="DING_DWS_CLAW";function Js(n){return typeof n=="string"&&n.trim()?n.trim():null}function o8(n,A){let o=Number(n);return Number.isFinite(o)&&o>0?o:A}function Rme(n){let A;try{A=new URL(Js(n)??n8)}catch{throw new TypeError("DingTalk registration base URL must be a valid HTTPS URL")}let o=A.hostname==="dingtalk.com"||A.hostname.endsWith(".dingtalk.com");if(A.protocol!=="https:"||A.port||!o||A.username||A.password||A.search||A.hash)throw new TypeError("DingTalk registration base URL must be a valid HTTPS URL");return A.pathname=A.pathname.replace(/\/+$/,""),A.href.replace(/\/$/,"")}function kme(n){let A=typeof n?.now=="function"?n.now():n();if(!Number.isFinite(A))throw new TypeError("clock must return a finite timestamp");return A}function vme(n,A){if(!n||typeof n!="object"||Array.isArray(n))throw new Rc("invalid-response",`DingTalk ${A} returned an invalid response`,A);if(Number(n.errcode)!==0)throw new Rc("api-error",`DingTalk ${A} request was rejected`,A);return n}var Rc=class extends Error{constructor(A,o,a,e={}){super(o,e),this.name="DingtalkDeviceAuthError",this.code=A,this.action=a,Number.isInteger(e.status)&&(this.status=e.status),Number.isFinite(e.timeoutMs)&&(this.timeoutMs=e.timeoutMs)}},RS=class{#e;#t;#A;#r;constructor({fetch:A=globalThis.fetch,clock:o=Date,baseUrl:a=n8,timeoutMs:e=15e3}={}){if(typeof A!="function")throw new TypeError("fetch is required");if(typeof o!="function"&&typeof o?.now!="function")throw new TypeError("clock must be a function or expose now()");if(!Number.isFinite(e)||e<=0)throw new TypeError("timeoutMs must be a positive number");this.#e=A,this.#t=o,this.#A=Rme(a),this.#r=e}async start({signal:A}={}){let o=await this.#a("/app/registration/init",{source:Nme},"initialization",A),a=Js(o.nonce);if(!a)throw new Rc("missing-nonce","DingTalk registration initialization did not return a nonce","initialization");let e=await this.#a("/app/registration/begin",{nonce:a},"begin",A),i=Js(e.device_code),t=Js(e.verification_uri_complete);if(!i||!t)throw new Rc("incomplete-registration","DingTalk registration did not return complete QR metadata","begin");let r=o8(e.expires_in,7200),s=o8(e.interval,5)*1e3;return Object.freeze({deviceCode:i,verificationUrl:t,verificationUri:Js(e.verification_uri),userCode:Js(e.user_code),expiresAt:kme(this.#t)+r*1e3,pollIntervalMs:s})}async poll(A){let o=Js(typeof A=="string"?A:A?.deviceCode),a=typeof A=="object"?A?.signal:void 0;if(!o)throw new TypeError("deviceCode is required");let e=await this.#a("/app/registration/poll",{device_code:o},"poll",a),i=Js(e.status)?.toUpperCase(),t=["WAITING","SUCCESS","FAIL","EXPIRED"].includes(i)?i:"UNKNOWN";return Object.freeze({status:t,clientId:Js(e.client_id),clientSecret:Js(e.client_secret),failReason:Js(e.fail_reason)})}async#a(A,o,a,e){let i,t=AbortSignal.timeout(this.#r),r=e?AbortSignal.any([e,t]):t;try{i=await this.#e(`${this.#A}${A}`,{method:"POST",headers:{accept:"application/json","content-type":"application/json"},body:JSON.stringify(o),redirect:"error",signal:r})}catch(c){throw e?.aborted?e.reason??c:t.aborted?new Rc("timeout",`DingTalk ${a} request timed out`,a,{cause:c,timeoutMs:this.#r}):c?.name==="AbortError"?c:new Rc("network-error",`DingTalk ${a} request could not be completed`,a,{cause:c})}if(!i||i.ok===!1||typeof i.json!="function")throw new Rc("http-error",`DingTalk ${a} request failed`,a,{status:i?.status});let s;try{s=await i.json()}catch(c){throw new Rc("invalid-json",`DingTalk ${a} returned invalid JSON`,a,{cause:c})}return vme(s,a)}};import{randomUUID as Jme}from"node:crypto";var vh={name:"dsh-a2a-im",version:"0.1.2",icon:"./assets/logo-plugin-message-link-gradient.webp",description:"\u628A\u5FAE\u4FE1\u3001\u98DE\u4E66\u3001\u4F01\u5FAE\u3001\u9489\u9489\u3001QQ\u3001Telegram\u3001WhatsApp\u3001Slack\u3001Discord\u3001Matrix\u63A5\u5165DSH\u3002 Connect Telegram, WhatsApp, Slack, Discord, Matrix, WeChat, Feishu, WeCom, DingTalk, and QQ to DSH.",keywords:["deepseek-harness","dsh","dsh-plugin","ai-agent","im","instant-messaging","chatbot","feishu","lark","wechat","wecom","dingtalk","qq","slack","telegram","discord","whatsapp","imessage","matrix","ai-office"],author:"xmanrui (https://github.com/xmanrui)",license:"MIT",type:"module",repository:{type:"git",url:"git+https://github.com/xmanrui/dsh-im.git"},homepage:"https://github.com/xmanrui/dsh-im#readme",bugs:{url:"https://github.com/xmanrui/dsh-im/issues"},publishConfig:{access:"public"},bin:{"dsh-im":"bin/dsh-im.mjs"},main:"./lib/index.js",exports:{".":"./lib/index.js","./client":"./lib/client.js","./package.json":"./package.json","./locale/*.json":"./locale/*.json"},files:["assets","bin","cordis.patch.yml","lib","locale/*.json","plugin-src","scripts/verify-interface-language.mjs","scripts/verify-injected-context.mjs","scripts/verify-lan-management.mjs","scripts/verify-model-setting.mjs","scripts/verify-package.mjs","scripts/verify-session-channel-logos.mjs","scripts/verify-session-title-prefix.mjs","src","PROACTIVE_DELIVERY.md","PROACTIVE_DELIVERY.en.md","docs/client-integration.md","LICENSE","README.md","README.en.md","THIRD_PARTY_NOTICES.md"],dsh:{bundle:{patch:"./cordis.patch.yml"},client:{inject:["@deepseek-ai/dsh-client-connection","@deepseek-ai/dsh-client-runtime","@deepseek-ai/dsh-client-ui-settings","@deepseek-ai/dsh-client-ui-slots","@deepseek-ai/dsh-client-locale"],platform:"web"},compatibility:{dsh:"0.2.0-rc.2",dshReleases:{"0.2.0-rc.2":"compatible"},profiles:["web"]}},scripts:{build:"node plugin-src/client/build.mjs && node plugin-src/host/build.mjs",prepack:"npm run build",test:"node --test test/*.test.mjs test/channels/*/*.test.mjs",check:"npm run build && npm test && node scripts/verify-package.mjs"},engines:{node:">=22.19"},dependencies:{"@matrix-org/olm":"3.2.15","@tencent-connect/qqbot-connector":"1.2.0","@tencent-connect/qqbot-nodejs":"1.0.4","@wecom/aibot-node-sdk":"1.0.7","dingtalk-stream":"2.1.4",imapflow:"^2.0.5",mailparser:"^3.9.28",nodemailer:"^10.0.10",qrcode:"1.5.4",undici:"7.29.1"},devDependencies:{"@deepseek-ai/cordis":"4.0.1","@larksuiteoapi/node-sdk":"1.73.0","@whiskeysockets/baileys":"7.0.0-rc14",esbuild:"0.25.9","https-proxy-agent":"5.0.1",react:"18.3.1","react-dom":"18.3.1","react-test-renderer":"18.3.1",semver:"7.8.5"},directories:{doc:"docs",lib:"lib",test:"test"},optionalDependencies:{"@tencent-qqmail/agently-cli":"^1.0.18",sharp:"0.35.5"}};var Lme=new Set(["bot.bind-credentials","bot.bind-native","bot.bind-mailbox","bot.mailbox.update","bot.auth.start","bot.auth.poll","permissions.status","bot.session-binding.get","bot.session-binding.set","bot.session.list","connection.test","message.receive","message.send","connector.configure","connector.reconnect","connector.test","connector.remove","startup","connection.restore","connection.monitor","connection.close","connection.status","provision.begin","provision.poll","provision.verify","provision.cancel","bot.reconnect","bot.delete","bot.workspace.set","bot.model.set","bot.agent-preset.set","bot.context-enhancement.set","bot.access-policy.set","bot.alias.set"]),Fme=new Set(["session.prepare","prompt.prepare","interaction.open","prompt.submit","reply.wait","credential.verify","permission.check","sdk.load","operation","message.receive","message.send","connection.test","startup.load","qr.begin","qr.encode","qr.poll","qr.verify","qr.cancel","credential.read","credential.save","credential.remove","account.save","account.remove","state.load","state.write","state.cleanup","workspace.write","workspace.cleanup","runtime.prepare","activation","harness.check","connection.start","connection.poll","connection.stop","status.read","rollback","management.request"]),ak=new Set(["stream-closed-before-open","stream-failed-before-open","stream-failed","ENOTFOUND","EAI_AGAIN","ECONNREFUSED","ECONNRESET","EHOSTUNREACH","ENETUNREACH","ETIMEDOUT","EPIPE","UND_ERR_CONNECT_TIMEOUT","UND_ERR_HEADERS_TIMEOUT","UND_ERR_BODY_TIMEOUT","UND_ERR_SOCKET","CERT_HAS_EXPIRED","CERT_NOT_YET_VALID","DEPTH_ZERO_SELF_SIGNED_CERT","SELF_SIGNED_CERT_IN_CHAIN","UNABLE_TO_VERIFY_LEAF_SIGNATURE","UNABLE_TO_GET_ISSUER_CERT_LOCALLY","ERR_TLS_CERT_ALTNAME_INVALID","ERR_SSL_WRONG_VERSION_NUMBER","ENOENT","EACCES","EPERM","ENOSPC","EROFS","ENOTDIR","EISDIR","EBUSY","EIO","EXDEV","EMFILE","ENFILE","EEXIST","unknown","multiple-causes","timeout","http-error","provider-rejected","invalid-response","ERR_PROXY_CONNECTION_FAILED","ERR_TLS_HANDSHAKE_TIMEOUT","ERR_SSL_TLSV1_ALERT_INTERNAL_ERROR","ERR_NETWORK_ACCESS_DENIED","AUTHENTICATIONFAILED","EAUTH","invalid-json","invalid-config","read-only"]),Gme=new Set(["credential-store","account-config","account-state","workspace-config","workspace-directory"]),Ume=new Set(["host.describe","workspace.list","workspace.create","session.list","session.create","session.history","session.prompt","session.rename","session.cancel","session.models","session.permissions","session.selectModel","llm.models"]),Hme=new Set(["host-api","http","websocket"]),xme=new Set(["not-submitted","accepted","unknown"]),Kme=new Set(["config.json","workspaces.json"]),kS=Object.freeze({"expected-object":"\u5E94\u4E3A JSON \u5BF9\u8C61\u3002","expected-array":"\u5E94\u4E3A JSON \u6570\u7EC4\u3002","unsupported-version":"\u914D\u7F6E\u7248\u672C\u7F3A\u5931\u6216\u4E0D\u53D7\u5F53\u524D\u63D2\u4EF6\u652F\u6301\u3002","invalid-string":"\u5B57\u6BB5\u7F3A\u5931\u6216\u4E0D\u662F\u975E\u7A7A\u5B57\u7B26\u4E32\u3002","invalid-identifier":"\u6807\u8BC6\u7B26\u683C\u5F0F\u4E0D\u7B26\u5408\u8981\u6C42\u3002","identity-mismatch":"\u6807\u8BC6\u7B26\u4E0E accountId \u6D3E\u751F\u7ED3\u679C\u4E0D\u4E00\u81F4\u3002","duplicate-identity":"\u8D26\u53F7\u6807\u8BC6\u91CD\u590D\u3002","invalid-api-url":"\u5FAE\u4FE1\u670D\u52A1\u5730\u5740\u4E0D\u662F\u6709\u6548 URL\u3002","untrusted-api-url":"\u5FAE\u4FE1\u670D\u52A1\u5730\u5740\u5FC5\u987B\u4F7F\u7528\u53D7\u4FE1\u4EFB\u7684 HTTPS \u57DF\u540D\u548C\u7AEF\u53E3\u3002","invalid-workspace-path":"\u5DE5\u4F5C\u533A\u8DEF\u5F84\u5FC5\u987B\u662F\u5F53\u524D\u64CD\u4F5C\u7CFB\u7EDF\u7684\u7EDD\u5BF9\u8DEF\u5F84\u3002","invalid-agent-preset":"Agent Preset \u6807\u8BC6\u65E0\u6548\u3002","invalid-model-selection":"\u6A21\u578B\u8BBE\u7F6E\u987B\u5305\u542B\u6709\u6548\u7684 provider\u3001model \u548C\u53EF\u9009 reasoningEffort\u3002","invalid-delivery-target":"\u6295\u9012\u76EE\u6807\u7684\u6807\u8BC6\u3001\u7ED3\u6784\u6216\u8DEF\u7531\u4E0D\u7B26\u5408\u5F53\u524D\u914D\u7F6E\u7248\u672C\u8981\u6C42\u3002","unexpected-field":"\u5F53\u524D\u914D\u7F6E\u7248\u672C\u4E0D\u5141\u8BB8\u6B64\u5B57\u6BB5\u3002"}),Yme=/^(?:\$|version|accounts(?:\[\d{1,10}\](?:\.(?:accountId|ownerUserId|botId|tokenRef|baseUrl))?)?|(?:workspaces|agentPresets|models)(?:\[\d{1,10}\]\.(?:key|value))?|deliveryTargets(?:\[\d{1,10}\]\.(?:key|targets(?:\[\d{1,10}\])?))?)$/;function zo(n){if(!n||typeof n!="object"||Array.isArray(n))return{};let A={};for(let[a,e]of[["operation",Lme],["stage",Fme],["reason",ak],["resource",Gme],["method",Ume],["transport",Hme],["submissionState",xme],["lastFailureReason",ak]])e.has(n[a])&&(A[a]=n[a]);if(jme.includes(n.channel)&&(A.channel=n.channel),Array.isArray(n.reasons)){let a=[...new Set(n.reasons.filter(e=>ak.has(e)&&!["unknown","multiple-causes"].includes(e)))].slice(0,16);a.length&&(A.reasons=a)}for(let a of["durationMs","timeoutMs"])Number.isFinite(n[a])&&n[a]>=0&&(A[a]=Math.round(n[a]));Number.isSafeInteger(n.attempts)&&n.attempts>=0&&(A.attempts=n.attempts);for(let a of["nodeVersion","dshVersion"])typeof n[a]=="string"&&/^\d+\.\d+\.\d+(?:-[A-Za-z0-9.-]+)?$/.test(n[a])&&n[a].length<80&&(A[a]=n[a]);if(["darwin","linux","win32","freebsd"].includes(n.platform)&&(A.platform=n.platform),["ilinkai.weixin.qq.com","oapi.dingtalk.com","api.dingtalk.com","api.telegram.org","discord.com","slack.com","open.feishu.cn","qyapi.weixin.qq.com"].includes(n.host)&&(A.host=n.host),n.dependencies&&typeof n.dependencies=="object"){let a={};for(let e of["dingtalkStream","axios","httpsProxyAgent","agentBase"]){let i=n.dependencies[e];typeof i=="string"&&/^\d+\.\d+\.\d+(?:[-+][A-Za-z0-9.-]+)?$/.test(i)&&i.length<=80&&(a[e]=i)}Object.keys(a).length&&(A.dependencies=a)}typeof n.proxyConfigured=="boolean"&&(A.proxyConfigured=n.proxyConfigured),n.truncated===!0&&(A.truncated=!0),Kme.has(n.file)&&(A.file=n.file),typeof n.field=="string"&&Yme.test(n.field)&&(A.field=n.field),typeof n.issue=="string"&&Object.hasOwn(kS,n.issue)&&(A.issue=n.issue),/^(?:(?:WX|DT|IM)-CONN|MF)-[A-F0-9]{8}$/.test(n.referenceId??"")&&(A.referenceId=n.referenceId),typeof n.occurredAt=="string"&&/^\d{4}-\d\d-\d\dT\d\d:\d\d:\d\d\.\d{3}Z$/.test(n.occurredAt)&&Number.isFinite(Date.parse(n.occurredAt))&&(A.occurredAt=n.occurredAt),Number.isInteger(n.httpStatus)&&n.httpStatus>=100&&n.httpStatus<=599&&(A.httpStatus=n.httpStatus);let o=typeof n.providerCode=="number"&&Number.isSafeInteger(n.providerCode)?String(n.providerCode):n.providerCode;return typeof o=="string"&&/^-?\d{1,12}$/.test(o)&&(A.providerCode=o),typeof n.pluginVersion=="string"&&/^\d+\.\d+\.\d+(?:-[A-Za-z0-9.-]+)?$/.test(n.pluginVersion)&&n.pluginVersion.length<=64&&(A.pluginVersion=n.pluginVersion),["succeeded","failed","not-attempted","unknown"].includes(n.rollback)&&(A.rollback=n.rollback),typeof n.hint=="string"&&n.hint.trim()&&(A.hint=n.hint.trim().slice(0,500)),A}var jme=Object.freeze(["weixin","feishu","dingtalk","wecom","qq","slack","telegram","discord","whatsapp","wecom-app","imessage","email","office"]);function jl(n){if(!n?.details)return{};let A=zo({...n?.details,referenceId:n?.details?.referenceId??n?.referenceId,hint:n?.details?.hint??n?.hint});return Object.keys(A).length?{details:A}:{}}var df=new WeakMap,c8=new WeakMap,Md=new WeakMap,qme={"harness-interaction-timeout":"timeout","harness-response-invalid":"invalid-response","connect-timeout":"timeout","telegram-timeout":"timeout","cli-timeout":"timeout","provider-timeout":"timeout","telegram-response-invalid":"invalid-response","office-protocol-mismatch":"invalid-response"},zme=new Set(["Error","TypeError","SyntaxError","AggregateError","DOMException","AxiosError","TimeoutError","AbortError"]),s8={"discord-401":"Discord Bot Token \u65E0\u6548\uFF0C\u8BF7\u91CD\u65B0\u586B\u5199\u3002","discord-intents":"Discord Gateway Intents \u914D\u7F6E\u4E0D\u6B63\u786E\uFF0C\u8BF7\u68C0\u67E5 Developer Portal \u7684 Bot \u8BBE\u7F6E\u3002","webhook-configured":"\u8BE5 Telegram \u673A\u5668\u4EBA\u5DF2\u914D\u7F6E Webhook\uFF0C\u8BF7\u5148\u5728\u539F\u670D\u52A1\u4E2D\u79FB\u9664 Webhook \u540E\u91CD\u8BD5\u3002","invalid-device-token":"AI Office Device Token \u65E0\u6548\u3002","office-hook-unavailable":"AI Office Hook \u5C1A\u672A\u4E0A\u7EBF\u6216\u5730\u5740\u4E0D\u6B63\u786E\u3002","messages-database-permission-required":"\u8BF7\u5728 macOS \u7CFB\u7EDF\u8BBE\u7F6E\u4E2D\u6388\u4E88 DSH \u5B8C\u5168\u78C1\u76D8\u8BBF\u95EE\u6743\u9650\uFF0C\u4EE5\u8BFB\u53D6 Messages \u6570\u636E\u5E93\u3002","messages-automation-permission-required":"\u8BF7\u5728 macOS \u7CFB\u7EDF\u8BBE\u7F6E\u4E2D\u5141\u8BB8 DSH \u81EA\u52A8\u63A7\u5236 Messages\u3002","messages-permission-required":"\u5148\u5728 macOS \u7CFB\u7EDF\u8BBE\u7F6E\u4E2D\u6388\u4E88 Messages \u6743\u9650\u3002"};function vS(n){let A=[n],o=new Set,a=[];for(;A.length&&a.length<16;){let e=A.shift();!e||typeof e!="object"||o.has(e)||(o.add(e),a.push(e),e.cause&&typeof e.cause=="object"&&A.push(e.cause),Array.isArray(e.errors)&&A.push(...e.errors.slice(0,16)))}return{chain:a,truncated:A.some(e=>e&&typeof e=="object"&&!o.has(e))||a.some(e=>Array.isArray(e.errors)&&e.errors.length>16)}}function ft(n){let{chain:A,truncated:o}=vS(n),a=A.map(c=>({type:zme.has(c.name)?c.name:"Error",...zo({reason:c.details?.reason,reasons:c.details?.reasons,httpStatus:c.details?.httpStatus,providerCode:c.details?.providerCode}),...zo({reason:qme[c.code]??(c.name==="TimeoutError"?"timeout":c.code??(c instanceof SyntaxError?"invalid-json":void 0)),httpStatus:c.status??c.statusCode??c.response?.status,providerCode:c.providerCode}),hasCause:!!(c.cause&&typeof c.cause=="object"),hasErrors:Array.isArray(c.errors)})),e=[...new Set(a.flatMap(c=>c.reason==="multiple-causes"?c.reasons??[]:[c.reason]).filter(c=>c&&!["unknown","multiple-causes"].includes(c)))],i=e.filter(c=>!["timeout","http-error","provider-rejected","invalid-response"].includes(c)),t=i.length?i:e,r=c=>A.map(g=>zo({[c]:Md.get(g)?.[c]??g[c]??g.details?.[c]})[c]).find(g=>g!==void 0),s={};for(let c of["sessionId","promptRpcId"]){let g=A.map(l=>Md.get(l)?.[c]).find(l=>l!==void 0);typeof g=="string"&&/^[A-Za-z0-9_-]{1,256}$/u.test(g)&&(s[c]=g)}return{chain:A,errors:a,correlation:s,details:zo({reason:t.length>1?"multiple-causes":t[0]??"unknown",...t.length>1?{reasons:t}:{},httpStatus:a.find(c=>c.httpStatus!==void 0)?.httpStatus,providerCode:a.find(c=>c.providerCode!==void 0)?.providerCode,method:r("method"),transport:r("transport"),stage:r("stage"),submissionState:r("submissionState"),attempts:r("attempts"),lastFailureReason:r("lastFailureReason"),durationMs:r("durationMs"),timeoutMs:r("timeoutMs"),host:r("host"),truncated:o})}}function _d(n,A){if(n?.name==="AbortError")return n;let o=n&&typeof n=="object"?n:new Error("Message processing failed"),a=o instanceof DOMException?Object.defineProperties(new DOMException(o.message,o.name),Object.getOwnPropertyDescriptors(o)):Object.defineProperties(Object.setPrototypeOf(o instanceof Error?new Error:{},Object.getPrototypeOf(o)),Object.getOwnPropertyDescriptors(o));return Md.set(a,{...A,...Md.get(o)}),a}function nk(){return{pluginVersion:vh.version,nodeVersion:process.versions.node,platform:process.platform}}async function pe(n,A,o){try{return await A()}catch(a){throw pf(a,n,o)}}function pf(n,A,o){return(!n||typeof n!="object")&&(n=new Error("Operation failed")),Md.has(n)||Md.set(n,zo({stage:A,resource:o})),n}function ok(n){return vS(n).chain.map(A=>df.get(A)??c8.get(A)).find(Boolean)}function FA(n,A,o,a){if(A?.name==="AbortError")return{ok:!1,error:{code:"cancelled",message:S("\u64CD\u4F5C\u5DF2\u53D6\u6D88\u3002"),details:{}}};if(o?.ok!==!1||["cancelled","bad-request"].includes(o.error?.code))return o;let e=ok(A)??n.report(A,{...a,publicError:o.error});return{...o,error:a?.untrustedPublicError?e.publicError:{...e.publicError,...o.error,details:e.publicError.details}}}function hf(n){let A=n.reason;return A==="multiple-causes"?S("\u68C0\u6D4B\u5230\u591A\u4E2A\u5E95\u5C42\u539F\u56E0\uFF0C\u8BF7\u5C55\u5F00\u8BCA\u65AD\u8BE6\u60C5\u9010\u9879\u68C0\u67E5\u3002"):["ENOTFOUND","EAI_AGAIN"].includes(A)?S("\u670D\u52A1\u57DF\u540D\u89E3\u6790\u5931\u8D25\uFF0C\u8BF7\u68C0\u67E5\u8FD0\u884C DSH \u7684\u673A\u5668\u7684 DNS \u548C\u7F51\u7EDC\u8BBE\u7F6E\u3002"):A==="ECONNREFUSED"?S("\u76EE\u6807\u62D2\u7EDD\u8FDE\u63A5\uFF0C\u8BF7\u68C0\u67E5\u670D\u52A1\u5730\u5740\u3001\u7AEF\u53E3\u548C\u8BBF\u95EE\u9650\u5236\u3002"):["ECONNRESET","EPIPE","UND_ERR_SOCKET"].includes(A)?S("\u8FDE\u63A5\u5DF2\u4E2D\u65AD\uFF0C\u8BF7\u68C0\u67E5\u7F51\u7EDC\u548C\u76EE\u6807\u670D\u52A1\u72B6\u6001\u3002"):["ENETUNREACH","EHOSTUNREACH","ERR_NETWORK_ACCESS_DENIED"].includes(A)?S("\u76EE\u6807\u7F51\u7EDC\u4E0D\u53EF\u8FBE\uFF0C\u8BF7\u68C0\u67E5\u8FD0\u884C DSH \u7684\u673A\u5668\u7684\u7F51\u7EDC\u51FA\u53E3\u548C\u8BBF\u95EE\u9650\u5236\u3002"):/CERT|TLS|SSL|ISSUER|SIGNATURE/.test(A??"")?S("TLS \u6216\u8BC1\u4E66\u6821\u9A8C\u5931\u8D25\uFF0C\u8BF7\u68C0\u67E5\u7CFB\u7EDF\u65F6\u95F4\u3001\u8BC1\u4E66\u94FE\u548C\u7F51\u7EDC\u8BBE\u7F6E\u3002"):/TIMEOUT/.test(A??"")||A==="ETIMEDOUT"||A==="timeout"?S("\u8BF7\u6C42\u8D85\u65F6\uFF0C\u8BF7\u68C0\u67E5\u76EE\u6807\u670D\u52A1\u548C\u7F51\u7EDC\uFF1B\u8BCA\u65AD\u8BE6\u60C5\u4E2D\u53EF\u67E5\u770B\u5DF2\u77E5\u7684\u8017\u65F6\u3002"):A==="ERR_PROXY_CONNECTION_FAILED"||n.httpStatus===407?S("\u4EE3\u7406\u8FDE\u63A5\u6216\u8BA4\u8BC1\u5931\u8D25\uFF0C\u8BF7\u68C0\u67E5 DSH \u8FDB\u7A0B\u4F7F\u7528\u7684\u4EE3\u7406\u914D\u7F6E\u3002"):["EAUTH","AUTHENTICATIONFAILED"].includes(A)?S("\u670D\u52A1\u8BA4\u8BC1\u5931\u8D25\uFF0C\u8BF7\u68C0\u67E5\u8D26\u53F7\u548C\u6388\u6743\u4FE1\u606F\u3002"):["EACCES","EPERM","EROFS"].includes(A)?S("\u64CD\u4F5C\u6743\u9650\u4E0D\u8DB3\uFF0C\u8BF7\u68C0\u67E5\u5BF9\u5E94\u8D44\u6E90\u7684\u8BBF\u95EE\u6743\u9650\u3002"):A==="ENOSPC"?S("\u78C1\u76D8\u7A7A\u95F4\u4E0D\u8DB3\uFF0C\u8BF7\u91CA\u653E\u7A7A\u95F4\u540E\u91CD\u8BD5\u3002"):A==="ENOENT"?S("\u6240\u9700\u6587\u4EF6\u6216\u672C\u5730\u5DE5\u5177\u4E0D\u5B58\u5728\uFF0C\u8BF7\u68C0\u67E5\u5B89\u88C5\u548C\u914D\u7F6E\u3002"):A==="invalid-json"||A==="invalid-response"?S("\u6570\u636E\u683C\u5F0F\u65E0\u6548\uFF0C\u8BF7\u6309\u5931\u8D25\u9636\u6BB5\u68C0\u67E5\u670D\u52A1\u54CD\u5E94\u6216\u672C\u5730\u914D\u7F6E\u3002"):n.httpStatus===429?S("\u670D\u52A1\u6B63\u5728\u9650\u6D41\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002"):[401,403].includes(n.httpStatus)?S("\u670D\u52A1\u62D2\u7EDD\u4E86\u8BF7\u6C42\uFF0C\u8BF7\u68C0\u67E5\u51ED\u636E\u3001\u6743\u9650\u6216\u8BBF\u95EE\u9650\u5236\uFF1BHTTP \u72B6\u6001\u672C\u8EAB\u4E0D\u80FD\u786E\u8BA4\u767B\u5F55\u5931\u6548\u3002"):n.httpStatus>=500?S("\u76EE\u6807\u670D\u52A1\u6682\u65F6\u5F02\u5E38\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002"):n.httpStatus?S("\u76EE\u6807\u670D\u52A1\u8FD4\u56DE\u4E86 HTTP \u9519\u8BEF\uFF0C\u8BF7\u67E5\u770B\u8BCA\u65AD\u8BE6\u60C5\u3002"):S("\u6682\u672A\u8BC6\u522B\u5177\u4F53\u539F\u56E0\uFF0C\u8BF7\u590D\u5236\u8BCA\u65AD\u4FE1\u606F\uFF0C\u5E76\u67E5\u770B\u76F8\u540C\u53C2\u8003\u53F7\u7684 DSH \u65E5\u5FD7\u3002")}function Wme(n){return{"connector.test":"connection.test","connector.configure":"credential.verify","connector.reconnect":"connection.start","connector.remove":"account.remove",startup:"startup.load","connection.restore":"connection.start","connection.monitor":"connection.poll","connection.status":"status.read","connection.close":"connection.stop","provision.begin":"qr.begin","provision.poll":"qr.poll","provision.verify":"qr.verify","bot.auth.start":"qr.begin","bot.auth.poll":"qr.poll","bot.reconnect":"connection.start","bot.delete":"account.remove","permissions.status":"permission.check","bot.bind-credentials":"credential.verify","bot.bind-mailbox":"credential.verify","bot.bind-native":"permission.check","connection.test":"connection.test","message.send":"message.send","message.receive":"message.receive"}[n]??"operation"}function st({channel:n,logger:A=console,now:o=Date.now,prefix:a="IM-CONN",describe:e}={}){let i=new Map,t=(g,l)=>{try{A[g]?.(`[dsh-${n}] ${JSON.stringify(l)}`)}catch{}};function r(g,l={}){if(df.has(g))return g;if(l.reuse&&ok(g))return ok(g);let d=ft(g),u=d.chain.map(k=>df.get(k)).find(Boolean);if(u)return u;let B=e?.(g,l,d)??{},y=d.chain.find(k=>Object.hasOwn(s8,k.code??"")),Q=B.publicError??l.publicError??{};y&&!Q.code?.startsWith("stream-")&&(Q={...Q,code:y.code,message:S(s8[y.code])}),["email","imessage","office"].includes(n)&&!y&&l.untrustedPublicError&&(Q={code:`${n}-operation-failed`,message:S("\u64CD\u4F5C\u5931\u8D25\uFF0C\u8BF7\u67E5\u770B\u539F\u56E0\u548C\u8BCA\u65AD\u8BE6\u60C5\u3002")});let m=d.chain.map(k=>Md.get(k)).find(Boolean)??{},D=zo({...d.details,...l,...Q.details,...B.details,...m,channel:n,stage:m.stage??B.details?.stage??Q.details?.stage??l.stage??Wme(l.operation),...nk()}),M=Q.code??l.code??`${n}-operation-failed`,O=B.hint??Q.hint??Q.details?.hint??hf(D),R=S(Q.message)??S("\u64CD\u4F5C\u5931\u8D25\uFF0C\u8BF7\u67E5\u770B\u539F\u56E0\u548C\u8BCA\u65AD\u8BE6\u60C5\u3002"),F=JSON.stringify([l.botId,l.attemptId,D.operation,D.stage,M,D.reason,D.reasons,D.httpStatus,D.providerCode,D.resource,D.file,D.field,D.issue]),v=i.get(F),L=o(),U=k=>{let x=new Error(k.message,{cause:g});return x.code=k.code,x.publicError=structuredClone(k),df.set(x,x),g&&typeof g=="object"&&c8.set(g,x),x};if(l.automatic&&v&&L-v.time<6e4)return v.retries+=1,U(v.publicError);v?.retries&&t("warn",{event:"connection-retries",referenceId:v.publicError.details.referenceId,retries:v.retries}),D.referenceId=zo({referenceId:Q.referenceId}).referenceId??`${a}-${Jme().replaceAll("-","").slice(0,8).toUpperCase()}`,D.occurredAt=new Date(L).toISOString(),D.hint=O;let G={code:M,message:R,details:D};return l.automatic&&(i.size>=128&&i.delete(i.keys().next().value),i.set(F,{time:L,publicError:G,retries:0,botId:l.botId})),t(l.warning?"warn":"error",{event:l.warning?"connection-warning":"connection-failure",code:M,...D,errors:d.errors,...zo({referenceId:l.parentReferenceId}).referenceId?{parentReferenceId:l.parentReferenceId}:{}}),U(G)}function s(g){for(let[l,d]of i)g!==void 0&&d.botId!==g||(d.retries&&t("info",{event:"connection-retries",referenceId:d.publicError.details.referenceId,retries:d.retries}),i.delete(l))}function c(g,l){df.has(g)&&zo({rollback:l}).rollback&&(g.publicError.details.rollback=l,g.publicError.details.hint=l==="succeeded"?S("\u64CD\u4F5C\u672A\u5B8C\u6210\uFF0C\u5DF2\u6062\u590D\u4E4B\u524D\u7684\u672C\u673A\u72B6\u6001\u3002\u8BF7\u5904\u7406\u4E0A\u8FF0\u95EE\u9898\u540E\u91CD\u8BD5\u3002"):S("\u539F\u8D26\u53F7\u72B6\u6001\u5C1A\u672A\u786E\u8BA4\uFF0C\u8BF7\u91CD\u65B0\u8BFB\u53D6\u72B6\u6001\uFF0C\u5E76\u53CD\u9988\u8BCA\u65AD\u4FE1\u606F\u3002"),t("info",{event:"connection-outcome",referenceId:g.publicError.details.referenceId,rollback:l}))}return{report:r,clear:s,outcome:c}}import{randomUUID as ESe}from"node:crypto";var g8=new WeakMap,sk=Symbol("dsh-im.connection-test-state-identity");function l8(n){return n?.[sk]??n}function Vme(n){return typeof n=="string"&&n.trim()?n.trim():null}function Wo(n,A){if(!n||!A||typeof A!="object")return!1;try{return g8.set(l8(n),structuredClone(A)),!0}catch{return!1}}function uf(n){let A=n?g8.get(l8(n)):null;return A?structuredClone(A):null}function ni(n,A=S("\u673A\u5668\u4EBA")){let o=Vme(n)??A;return`${S("\u2705 DeepSeek Harness \u8FDE\u63A5\u6D4B\u8BD5\u6210\u529F")}
141
141
  ${S("\u8FD9\u6761\u6D88\u606F\u7531\u300CIM\u673A\u5668\u4EBA\u300D\u8BBE\u7F6E\u9875\u4E2D\u7684\u201C{name}\u201D\u673A\u5668\u4EBA\u5361\u7247\u53D1\u51FA\u3002",{name:o})}`}function nr(n=S("\u673A\u5668\u4EBA")){let A=new Error(S("{channelLabel}\u5C1A\u672A\u6536\u5230\u53EF\u7528\u4E8E\u6D4B\u8BD5\u7684\u79C1\u804A\u6D88\u606F\u3002",{channelLabel:n}));return A.code="test-target-unavailable",A}async function Vo({state:n,send:A,text:o,channelLabel:a}){let e=uf(n);if(!e)throw nr(a);return await A(e,o),{sent:!0}}function YA(n,{diagnostics:A,botId:o}={}){return Object.freeze(n?{sent:!1,code:n?.code==="test-target-unavailable"?"test-target-unavailable":"test-message-failed",...A&&n?.code!=="test-target-unavailable"?{error:A.report(n,{operation:"connection.test",stage:"connection.test",botId:o}).publicError}:{}}:{sent:!0})}import{randomUUID as Zme}from"node:crypto";var Xme=Object.freeze({AUTH:"MODEL_AUTH",MISSING_CREDENTIAL:"MODEL_AUTH",INVALID_CREDENTIAL:"MODEL_AUTH",QUOTA:"MODEL_QUOTA",RATE_LIMIT:"MODEL_RATE_LIMIT",CONTEXT_WINDOW_EXCEEDED:"MODEL_CONTEXT_LIMIT",UNKNOWN_MODEL:"MODEL_UNAVAILABLE",NO_ADAPTER:"MODEL_UNAVAILABLE",UNSUPPORTED_OPTION:"MODEL_CONFIG",UNSUPPORTED_REASONING_EFFORT:"MODEL_CONFIG",TIMEOUT:"MODEL_TIMEOUT",TRANSPORT:"MODEL_TRANSPORT",SERVER:"MODEL_SERVICE",STREAM_CLOSED:"MODEL_STREAM",MALFORMED_RESPONSE:"MODEL_STREAM",EMPTY_RESPONSE:"MODEL_EMPTY_REPLY",CONTENT_FILTER:"MODEL_CONTENT_REJECTED",UNSUPPORTED_CONTENT:"MODEL_CONFIG"}),$me=Object.freeze({HARNESS_INTERACTION_TIMEOUT:"\u4E0E DSH \u7684\u4EA4\u4E92\u901A\u9053\u5728 30 \u79D2\u5185\u672A\u5C31\u7EEA\uFF0C\u672C\u6761\u6D88\u606F\u5C1A\u672A\u63D0\u4EA4\u6267\u884C\u3002\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002",HARNESS_CONNECT:"\u65E0\u6CD5\u8FDE\u63A5\u5904\u7406\u670D\u52A1\uFF0C\u6D88\u606F\u5C1A\u672A\u63D0\u4EA4\u3002\u8BF7\u786E\u8BA4 DeepSeek Harness \u6B63\u5728\u8FD0\u884C\u540E\u91CD\u8BD5\u3002",HARNESS_TIMEOUT:"\u5904\u7406\u670D\u52A1\u54CD\u5E94\u8D85\u65F6\uFF0C\u6D88\u606F\u5C1A\u672A\u5F00\u59CB\u5904\u7406\u3002\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002",HARNESS_RESULT_UNCERTAIN:"\u6682\u65F6\u65E0\u6CD5\u786E\u8BA4\u4EFB\u52A1\u72B6\u6001\uFF0C\u4EFB\u52A1\u53EF\u80FD\u5DF2\u7ECF\u5F00\u59CB\u3002\u8BF7\u5148\u7B49\u5F85\u6216\u53D1\u9001 /stop\uFF0C\u4E0D\u8981\u7ACB\u5373\u91CD\u590D\u63D0\u4EA4\u3002",HARNESS_ACCESS:"\u5904\u7406\u670D\u52A1\u62D2\u7EDD\u4E86\u673A\u5668\u4EBA\u8FDE\u63A5\u3002\u8BF7\u7BA1\u7406\u5458\u68C0\u67E5 Harness \u5730\u5740\u3001\u4EE3\u7406\u6216\u8BBF\u95EE\u914D\u7F6E\u540E\u91CD\u8BD5\u3002",HARNESS_PROTOCOL:"\u673A\u5668\u4EBA\u4E0E DeepSeek Harness \u7684\u63A5\u53E3\u4E0D\u517C\u5BB9\u3002\u8BF7\u7BA1\u7406\u5458\u68C0\u67E5 Harness \u5730\u5740\u5E76\u66F4\u65B0\u76F8\u5173\u7248\u672C\u3002",HARNESS_SERVICE:"DeepSeek Harness \u6682\u65F6\u65E0\u6CD5\u5B8C\u6210\u8BF7\u6C42\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002",MODEL_REPLY_TIMEOUT:"\u7B49\u5F85\u6A21\u578B\u56DE\u590D\u8D85\u65F6\uFF0C\u4EFB\u52A1\u53EF\u80FD\u4ECD\u5728\u8FD0\u884C\u3002\u8BF7\u5148\u7B49\u5F85\u6216\u53D1\u9001 /stop\uFF0C\u4E0D\u8981\u7ACB\u5373\u91CD\u590D\u63D0\u4EA4\u3002",MODEL_AUTH:"\u6A21\u578B\u51ED\u636E\u7F3A\u5931\u6216\u5DF2\u5931\u6548\u3002\u8BF7\u7BA1\u7406\u5458\u68C0\u67E5\u6A21\u578B\u914D\u7F6E\u540E\u91CD\u8BD5\u3002",MODEL_QUOTA:"\u6A21\u578B\u989D\u5EA6\u6216\u4F59\u989D\u4E0D\u8DB3\uFF0C\u672C\u6B21\u4EFB\u52A1\u672A\u5B8C\u6210\u3002\u8BF7\u7BA1\u7406\u5458\u8865\u5145\u989D\u5EA6\u6216\u5207\u6362\u6A21\u578B\u540E\u91CD\u8BD5\u3002",MODEL_RATE_LIMIT:"\u6A21\u578B\u670D\u52A1\u6B63\u5728\u9650\u6D41\uFF0C\u672C\u6B21\u4EFB\u52A1\u672A\u5B8C\u6210\u3002\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002",MODEL_CONTEXT_LIMIT:"\u5F53\u524D\u4F1A\u8BDD\u5185\u5BB9\u8D85\u8FC7\u6A21\u578B\u4E0A\u4E0B\u6587\u4E0A\u9650\u3002\u8BF7\u53D1\u9001 /compact \u6216 /new \u540E\u91CD\u8BD5\u3002",MODEL_UNAVAILABLE:"\u5F53\u524D\u6A21\u578B\u4E0D\u5B58\u5728\u6216\u4E0D\u652F\u6301\u6240\u9009\u914D\u7F6E\u3002\u8BF7\u53D1\u9001 /models\uFF0C\u518D\u7528 /model <\u5E8F\u53F7> \u4E3A\u5F53\u524D\u804A\u5929\u91CD\u65B0\u9009\u62E9\u3002\u82E5\u8981\u4FEE\u6539\u540E\u7EED\u65B0\u4F1A\u8BDD\u7684\u9ED8\u8BA4\u6A21\u578B\uFF0C\u8BF7\u5230 DSH \u8BBE\u7F6E \u2192 IM\u673A\u5668\u4EBA \u2192 \u5BF9\u5E94\u673A\u5668\u4EBA\u5361\u7247\u4FEE\u6539\u3002",MODEL_CONFIG:"\u5F53\u524D\u6A21\u578B\u4E0D\u652F\u6301\u8FD9\u7C7B\u5185\u5BB9\u6216\u6240\u9009\u914D\u7F6E\u3002\u8BF7\u8C03\u6574\u5185\u5BB9\u3001\u6A21\u578B\u6216\u63A8\u7406\u7B49\u7EA7\u540E\u91CD\u8BD5\u3002",MODEL_TIMEOUT:"\u6A21\u578B\u670D\u52A1\u54CD\u5E94\u8D85\u65F6\uFF0C\u672C\u6B21\u4EFB\u52A1\u672A\u5B8C\u6210\u3002\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002",MODEL_TRANSPORT:"\u6682\u65F6\u65E0\u6CD5\u8FDE\u63A5\u6A21\u578B\u670D\u52A1\uFF0C\u672C\u6B21\u4EFB\u52A1\u672A\u5B8C\u6210\u3002\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002",MODEL_SERVICE:"\u6A21\u578B\u670D\u52A1\u6682\u65F6\u5F02\u5E38\uFF0C\u672C\u6B21\u4EFB\u52A1\u672A\u5B8C\u6210\u3002\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002",MODEL_STREAM:"\u6A21\u578B\u56DE\u590D\u4E2D\u65AD\u6216\u683C\u5F0F\u5F02\u5E38\uFF0C\u672C\u6B21\u4EFB\u52A1\u672A\u5B8C\u6210\u3002\u8BF7\u91CD\u8BD5\u3002",MODEL_EMPTY_REPLY:"\u6A21\u578B\u6CA1\u6709\u8FD4\u56DE\u53EF\u663E\u793A\u7684\u5185\u5BB9\u3002\u8BF7\u91CD\u8BD5\uFF1B\u82E5\u6301\u7EED\u53D1\u751F\uFF0C\u8BF7\u5207\u6362\u6A21\u578B\u3002",MODEL_CONTENT_REJECTED:"\u6A21\u578B\u62D2\u7EDD\u5904\u7406\u5F53\u524D\u5185\u5BB9\u3002\u8BF7\u8C03\u6574\u95EE\u9898\u5185\u5BB9\u540E\u91CD\u8BD5\u3002",MODEL_OUTPUT_LIMIT:"\u6A21\u578B\u8FBE\u5230\u8F93\u51FA\u957F\u5EA6\u4E0A\u9650\uFF0C\u4F46\u6CA1\u6709\u751F\u6210\u53EF\u663E\u793A\u7684\u7ED3\u679C\u3002\u8BF7\u7F29\u5C0F\u4EFB\u52A1\u8303\u56F4\u540E\u91CD\u8BD5\u3002",TURN_BLOCKED:"\u672C\u8F6E\u5904\u7406\u88AB\u963B\u6B62\uFF0C\u672A\u80FD\u5B8C\u6210\u3002\u8BF7\u5728 DSH \u4E2D\u67E5\u770B\u4F1A\u8BDD\u72B6\u6001\u548C\u76F8\u5173\u63D0\u793A\u3002",TURN_INTERRUPTED:"\u4EFB\u52A1\u88AB\u610F\u5916\u4E2D\u65AD\uFF0C\u672C\u6B21\u672A\u5B8C\u6210\u3002\u8BF7\u91CD\u8BD5\u3002",SESSION_NOT_FOUND:"\u5F53\u524D\u4F1A\u8BDD\u5DF2\u4E0D\u5B58\u5728\u3002\u8BF7\u53D1\u9001 /new \u521B\u5EFA\u65B0\u4F1A\u8BDD\u540E\u91CD\u8BD5\u3002",SESSION_ARCHIVED:"\u5F53\u524D\u4F1A\u8BDD\u5DF2\u5F52\u6863\uFF0C\u65E0\u6CD5\u7EE7\u7EED\u5904\u7406\u3002\u8BF7\u5728 DSH \u4E2D\u53D6\u6D88\u5F52\u6863\uFF0C\u6216\u53D1\u9001 /new \u521B\u5EFA\u65B0\u4F1A\u8BDD\u3002",SESSION_BUSY:"\u5F53\u524D\u4F1A\u8BDD\u4ECD\u5728\u5904\u7406\u4E0A\u4E00\u9879\u4EFB\u52A1\u3002\u8BF7\u7B49\u5F85\u5B8C\u6210\uFF0C\u6216\u53D1\u9001 /stop \u540E\u91CD\u8BD5\u3002",SESSION_STALE:"\u5DE5\u4F5C\u533A\u6216\u4F1A\u8BDD\u72B6\u6001\u521A\u521A\u53D1\u751F\u53D8\u5316\u3002\u8BF7\u91CD\u65B0\u53D1\u9001\u8FD9\u6761\u6D88\u606F\u3002",WORKSPACE_UNAVAILABLE:"\u5F53\u524D\u5DE5\u4F5C\u533A\u4E0D\u5B58\u5728\u6216\u6682\u4E0D\u53EF\u7528\u3002\u8BF7\u91CD\u65B0\u9009\u62E9\u5DE5\u4F5C\u533A\u540E\u91CD\u8BD5\u3002",PRESET_UNAVAILABLE:"\u5F53\u524D Agent Preset \u65E0\u6CD5\u4F7F\u7528\u3002\u8BF7\u53D1\u9001 /presetlist \u67E5\u770B\u53EF\u7528\u9879\uFF0C\u4F7F\u7528 /preset <\u5E8F\u53F7\u6216 ID> \u91CD\u65B0\u9009\u62E9\uFF0C\u518D\u53D1\u9001 /new \u521B\u5EFA\u65B0\u4F1A\u8BDD\u540E\u91CD\u8BD5\u3002\u5982\u9700\u7EE7\u7EED\u539F\u4F1A\u8BDD\uFF0C\u8BF7\u8054\u7CFB\u7BA1\u7406\u5458\u6062\u590D\u539F Preset\u3002",CHANNEL_PERMISSION:"\u56DE\u590D\u5DF2\u7ECF\u751F\u6210\uFF0C\u4F46\u673A\u5668\u4EBA\u6CA1\u6709\u53D1\u9001\u6743\u9650\u3002\u8BF7\u8054\u7CFB\u7BA1\u7406\u5458\u68C0\u67E5\u6E20\u9053\u6743\u9650\u6216\u91CD\u65B0\u7ED1\u5B9A\u673A\u5668\u4EBA\u3002",CHANNEL_RATE_LIMIT:"\u56DE\u590D\u5DF2\u7ECF\u751F\u6210\uFF0C\u4F46\u5F53\u524D\u6E20\u9053\u6B63\u5728\u9650\u6D41\uFF0C\u6682\u65F6\u65E0\u6CD5\u53D1\u9001\u3002\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002",CHANNEL_DELIVERY_UNCERTAIN:"\u56DE\u590D\u53D1\u9001\u7ED3\u679C\u672A\u80FD\u786E\u8BA4\u3002\u8BF7\u5148\u68C0\u67E5\u804A\u5929\u5185\u662F\u5426\u5DF2\u7ECF\u6536\u5230\uFF0C\u4E0D\u8981\u7ACB\u5373\u91CD\u590D\u63D0\u4EA4\u3002",CHANNEL_DELIVERY:"\u56DE\u590D\u5DF2\u7ECF\u751F\u6210\uFF0C\u4F46\u5F53\u524D\u6E20\u9053\u6682\u65F6\u65E0\u6CD5\u53D1\u9001\u3002\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002",INPUT_INVALID:"\u5F53\u524D\u6D88\u606F\u5305\u542B\u65E0\u6CD5\u5904\u7406\u7684\u56FE\u7247\u6216\u6587\u4EF6\u3002\u8BF7\u8C03\u6574\u540E\u91CD\u65B0\u53D1\u9001\u3002",REQUEST_TIMEOUT:"\u8BF7\u6C42\u8D85\u65F6\uFF0C\u5F53\u524D\u64CD\u4F5C\u7ED3\u679C\u5C1A\u672A\u786E\u8BA4\u3002\u8BF7\u5148\u68C0\u67E5\u4EFB\u52A1\u72B6\u6001\u6216\u804A\u5929\u8BB0\u5F55\uFF0C\u4E0D\u8981\u7ACB\u5373\u91CD\u590D\u63D0\u4EA4\u3002",NETWORK_ERROR:"\u7F51\u7EDC\u8BF7\u6C42\u5931\u8D25\uFF0C\u5F53\u524D\u64CD\u4F5C\u7ED3\u679C\u5C1A\u672A\u786E\u8BA4\u3002\u8BF7\u5148\u68C0\u67E5\u4EFB\u52A1\u72B6\u6001\u6216\u804A\u5929\u8BB0\u5F55\uFF0C\u4E0D\u8981\u7ACB\u5373\u91CD\u590D\u63D0\u4EA4\u3002",INTERNAL_UNKNOWN:"\u4EFB\u52A1\u672A\u5B8C\u6210\uFF0C\u6682\u65F6\u65E0\u6CD5\u786E\u5B9A\u539F\u56E0\u3002\u8BF7\u91CD\u8BD5\uFF1B\u82E5\u6301\u7EED\u53D1\u751F\uFF0C\u8BF7\u5C06\u53C2\u8003\u53F7\u63D0\u4F9B\u7ED9\u7BA1\u7406\u5458\u3002"});function eSe(n){if(n?.code!=="harness-turn-failed")return null;let A=n?.providerCode??n?.details?.providerCode;return typeof A!="string"?null:Xme[A.trim().toUpperCase()]??null}function tSe(n,A){let o=typeof n?.code=="string"?n.code:"",a=eSe(n);if(a)return a;if(o==="harness-interaction-timeout")return"HARNESS_INTERACTION_TIMEOUT";let e=A.submissionState===void 0?["session.prompt","session.history"].includes(n?.method):A.submissionState!=="not-submitted";if(o==="harness-connect-failed")return e?"HARNESS_RESULT_UNCERTAIN":"HARNESS_CONNECT";if(o==="harness-timeout")return e?"HARNESS_RESULT_UNCERTAIN":"HARNESS_TIMEOUT";if(o==="harness-reply-timeout")return"MODEL_REPLY_TIMEOUT";if(["harness-auth-required","harness-proxy-auth-required","harness-loopback-forbidden","harness-host-untrusted","harness-request-forbidden"].includes(o))return"HARNESS_ACCESS";if(["harness-api-not-found","harness-response-invalid","gateway/input-invalid"].includes(o))return"HARNESS_PROTOCOL";if(o==="harness-turn-failed")return"INTERNAL_UNKNOWN";if(["harness-http-failed","harness-rpc-rejected"].includes(o))return"HARNESS_SERVICE";if(o==="model-unavailable"||o==="session/model-unavailable")return"MODEL_UNAVAILABLE";if(o==="model-empty-response")return"MODEL_EMPTY_REPLY";if(o==="model-max-tokens")return"MODEL_OUTPUT_LIMIT";if(o==="turn-blocked")return"TURN_BLOCKED";if(["turn-interrupted","turn-aborted"].includes(o))return"TURN_INTERRUPTED";if(o==="session-not-found")return"SESSION_NOT_FOUND";if(o==="session-archived")return"SESSION_ARCHIVED";if(o==="agent-busy")return"SESSION_BUSY";if(o==="workspace-session-stale")return"SESSION_STALE";if(o.startsWith("workspace-"))return"WORKSPACE_UNAVAILABLE";if(/^agent-preset[-/]/u.test(o))return"PRESET_UNAVAILABLE";if(o.startsWith("image-")||o.startsWith("inbound-file-")||o==="attachment-error")return"INPUT_INVALID";let i=Number(n?.status??n?.httpStatus);return i===401||i===403||["channel-permission","permission-required","artifact-permission-required","forbidden","stale-token"].includes(o)?"CHANNEL_PERMISSION":i===429||["channel-rate-limit","rate-limited","artifact-rate-limited"].includes(o)?"CHANNEL_RATE_LIMIT":["channel-delivery-uncertain","delivery-uncertain","artifact-delivery-uncertain"].includes(o)||n?.deliveryOutcome==="unknown"?"CHANNEL_DELIVERY_UNCERTAIN":o==="channel-delivery-failed"||o.startsWith("artifact-")||o==="network-error"?"CHANNEL_DELIVERY":"INTERNAL_UNKNOWN"}function ASe(n,A){if(n?.name==="AbortError"||n?.code==="cancelled")return"INTERNAL_UNKNOWN";let o=A.reason==="multiple-causes"?A.reasons:[A.reason],a=i=>i==="timeout"||i==="ETIMEDOUT"||/_TIMEOUT$/u.test(i);if(o?.length&&o.every(a))return"REQUEST_TIMEOUT";let e=i=>a(i)||["ENOTFOUND","EAI_AGAIN","ECONNREFUSED","ECONNRESET","EPIPE","UND_ERR_SOCKET","ENETUNREACH","EHOSTUNREACH","ERR_NETWORK_ACCESS_DENIED","ERR_PROXY_CONNECTION_FAILED"].includes(i)||/CERT|TLS|SSL|ISSUER|SIGNATURE/u.test(i);return o?.length&&o.every(e)?"NETWORK_ERROR":"INTERNAL_UNKNOWN"}function rSe(n){return typeof n=="string"&&/^[A-Z0-9-]{6,40}$/u.test(n)?n:`MF-${Zme().slice(0,8).toUpperCase()}`}function I8(n){return typeof n!="string"||!/^[A-Za-z0-9_/-]{1,64}$/u.test(n)?null:n.toUpperCase().replace(/[-/]/gu,"_")}function iSe(n,{userMessage:A,reason:o,referenceId:a,at:e=Date.now()}={}){let i=I8(o),t=ft(n).details,r=tSe(n,t),s=r==="INTERNAL_UNKNOWN"&&i&&typeof A=="string"&&A.trim()?"INPUT_INVALID":r,c=s==="INTERNAL_UNKNOWN"?ASe(n,t):s;(c==="REQUEST_TIMEOUT"||c==="NETWORK_ERROR")&&(t.hint=hf(t)),(t.stage||t.submissionState)&&Object.assign(t,nk());let g=$me[c];return["INTERNAL_UNKNOWN","REQUEST_TIMEOUT","NETWORK_ERROR"].includes(c)&&(t.submissionState==="not-submitted"?g=c==="REQUEST_TIMEOUT"?"\u6D88\u606F\u63D0\u4EA4\u524D\u7684\u64CD\u4F5C\u8D85\u65F6\uFF0C\u672C\u6761\u6D88\u606F\u5C1A\u672A\u63D0\u4EA4\u6267\u884C\u3002\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002":c==="NETWORK_ERROR"?"\u6D88\u606F\u63D0\u4EA4\u524D\u7684\u7F51\u7EDC\u8BF7\u6C42\u5931\u8D25\uFF0C\u672C\u6761\u6D88\u606F\u5C1A\u672A\u63D0\u4EA4\u6267\u884C\u3002\u8BF7\u68C0\u67E5\u8FDE\u63A5\u540E\u91CD\u8BD5\u3002":"\u6D88\u606F\u5728\u63D0\u4EA4\u524D\u5904\u7406\u5931\u8D25\uFF0C\u5C1A\u672A\u63D0\u4EA4\u6267\u884C\u3002\u8BF7\u91CD\u8BD5\uFF1B\u82E5\u6301\u7EED\u53D1\u751F\uFF0C\u8BF7\u5C06\u53C2\u8003\u53F7\u63D0\u4F9B\u7ED9\u7BA1\u7406\u5458\u3002":t.submissionState&&(g="\u6D88\u606F\u5DF2\u5C1D\u8BD5\u63D0\u4EA4\uFF0C\u4F46\u4EFB\u52A1\u7ED3\u679C\u5C1A\u672A\u786E\u8BA4\u3002\u8BF7\u5148\u5230 DSH \u67E5\u770B\u72B6\u6001\uFF0C\u4E0D\u8981\u7ACB\u5373\u91CD\u590D\u63D0\u4EA4\uFF1B\u82E5\u6301\u7EED\u53D1\u751F\uFF0C\u8BF7\u5C06\u53C2\u8003\u53F7\u63D0\u4F9B\u7ED9\u7BA1\u7406\u5458\u3002")),Object.freeze({...c==="INTERNAL_UNKNOWN"||t.reason!=="unknown"||t.httpStatus||t.providerCode||t.method||t.stage||t.submissionState?{details:t}:{},code:c,reason:i??I8(n?.code)??c,message:typeof A=="string"&&A.trim()?A.trim():S(g)+(c==="SESSION_ARCHIVED"&&n?.promptAccepted===!0?`
142
142
  ${S("\u672C\u6761\u6D88\u606F\u53EF\u80FD\u4ECD\u5728\u4F1A\u8BDD\u961F\u5217\u4E2D\uFF0C\u8BF7\u5148\u5230 DSH \u67E5\u770B\u72B6\u6001\uFF0C\u907F\u514D\u91CD\u590D\u63D0\u4EA4\u3002")}`:""),referenceId:rSe(a),at:Number.isFinite(e)?e:Date.now()})}function Wt(n){return`${n.message}
143
143
 
@@ -539,7 +539,7 @@ ${t.content}`}}}else this.#Ke(t,{kind:"human",injected:!1});Promise.resolve(this
539
539
  `):process.stderr.write(`[dsh-im] ignored ${d} failure (${M.channel}/${M.botId}/${M.targetId}) [${Q.reason?.code??Q.reason?.name??"unknown-error"}] ${Q.reason?.message??""}
540
540
  `)})},r=async(c,g)=>{if(a||!g||typeof g!="object"||g.type!=="user/message"||g.surfaceOp!=="append"||!Tct(g))return;let l=Array.isArray(g.data?.content)?g.data.content:[],d=Gd(l),u=_ct(l);if(!d&&u.length===0)return;let B;try{B=await n.listSessionSyncTargets(c)}catch(y){e("lookup",null,y);return}if(B.length===0){process.stderr.write(`[dsh-im] collab relay mirrored to 0 targets: no IM delivery target has \u4F1A\u8BDD\u53CC\u5411\u540C\u6B65 bound to this Session \u2014 enable it on the delivery target in the plugin settings to mirror coworker messages and files
541
541
  `);return}d&&await i(c,B,d,"collab delivery"),await t(c,B,u,"collab file delivery")};return Object.freeze({enqueue:(c,g)=>{if(a||typeof c!="string"||!c)return Promise.resolve();let u=(o.get(c)??Promise.resolve()).then(()=>r(c,g),()=>r(c,g)).catch(B=>e("event handling",null,B)).finally(()=>{o.get(c)===u&&o.delete(c)});return o.set(c,u),u},async whenIdle(){for(;o.size>0;)await Promise.allSettled([...o.values()])},close(){a=!0,o.clear()}})}function SBe(n,A,{logger:o=console}={}){if(typeof n?.on!="function")throw new TypeError("Session sync requires Host session events");let a=Rct({deliveryService:A,logger:o});process.stderr.write(`[dsh-im] session sync: remote-control mode active (collab relay text + file mirroring)
542
- `);let e=n.on("session/event",(r,s)=>{let c=Nct(r);c&&a.enqueue(c,s)},{global:!0}),i=!1,t=()=>{i||(i=!0,e?.(),a.close())};return typeof n.effect=="function"&&n.effect(()=>t,"dsh-im: Session sync coordinator"),Object.freeze({...a,close:t})}var wR=Object.freeze(Object.fromEntries(Object.entries({weixin:["\u5FAE\u4FE1","WeChat"],feishu:["\u98DE\u4E66","Feishu"],dingtalk:["\u9489\u9489","DingTalk"],wecom:["\u4F01\u4E1A\u5FAE\u4FE1","WeCom"],qq:["QQ","QQ"],slack:["Slack","Slack"],telegram:["Telegram","Telegram"],discord:["Discord","Discord"],whatsapp:["WhatsApp","WhatsApp"],imessage:["iMessage","iMessage"],matrix:["Matrix","Matrix"],office:["AI Office","AI Office"]}).map(([n,A])=>[n,Object.freeze(A)])));var kct="[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}",wBe=new RegExp(`^(${Object.keys(wR).join("|")})-(?:steer-)?${kct}$`,"u"),vct=new RegExp(`^(${Object.keys(wR).join("|")})-.+`,"u");function Pct(n){let A=typeof n?.snapshotEvents=="function"?n.snapshotEvents():n?.events;return Array.isArray(A)?A:[]}function Lct(n,A){let o=n.inheritedEventCount;if(n.header?.parentSession&&!Number.isSafeInteger(o))return null;for(let a of A){if(Number.isSafeInteger(o)&&a.seq<o||a.type!=="user/message"||a.data?.source?.kind!=="user")continue;let e=wBe.exec(a.data.source.rpcId)?.[1];if(e)return e}return n.header?.parentSession?null:vct.exec(n.id??n.sessionId)?.[1]??null}function Fct(n,A,o=Yl()){let a=wR[A];return!a||typeof n!="string"||!n.trim()||a.some(e=>n.startsWith(`${e} \xB7 `))?n:`${a[o==="en"?1:0]} \xB7 ${n}`}function Gct(n){return typeof n?.title!="string"||!n.title.trim()||!Array.isArray(n.messageSeqs)?!1:n.source?.kind==="user"?n.messageSeqs.length===0:!["fallback","provider"].includes(n.source?.kind)||n.messageSeqs.length===0||n.messageSeqs.some(A=>!Number.isSafeInteger(A)||A<0)?!1:n.source.kind!=="provider"||typeof n.source.provider=="string"&&!!n.source.provider}function DBe(n,{logger:A=console}={}){if(typeof n?.on!="function"||typeof n?.sessions?.get!="function"||typeof n?.sessions?.list!="function")throw new TypeError("Session title prefixes require Host sessions and events");let o=new Map,a=!1,e=c=>{if(a||n.sessions.get(c.id??c.sessionId)!==c||typeof c.append!="function")return;let g=Pct(c),l=Lct(c,g);if(!l)return;let d=g.findLast(B=>B.type==="session/title");if(!Gct(d?.data))return;let u=Fct(d.data.title,l);u!==d.data.title&&c.append("session/title",{...structuredClone(d.data),title:u})},i=c=>{if(a||o.has(c))return;let g=Promise.resolve().then(()=>{o.delete(c),e(c)}).catch(l=>{A.warn?.("[dsh-im] unable to add Session channel prefix:",l?.message??l)}).finally(()=>{o.get(c)===g&&o.delete(c)});o.set(c,g)},t=n.on("session/event",(c,g)=>{(g?.type==="session/title"||g?.type==="user/message"&&wBe.test(g.data?.source?.rpcId))&&i(c)},{global:!0}),r=n.on("session/created",i,{global:!0}),s=()=>{a||(a=!0,t?.(),r?.())};typeof n.effect=="function"&&n.effect(()=>s,"dsh-im: Session title channel prefixes");for(let c of n.sessions.list())i(c);return Object.freeze({close:s,async whenIdle(){for(;o.size;)await Promise.allSettled([...o.values()])}})}var lS=At(r4(),1);import{createHash as qIt}from"node:crypto";import{readFile as fQe,realpath as Tc,stat as zIt}from"node:fs/promises";import{homedir as WIt}from"node:os";import{basename as VIt,dirname as a4,isAbsolute as s4,join as Kl,relative as ZIt,resolve as GR,sep as XIt}from"node:path";import{fileURLToPath as $It}from"node:url";var Dd="@xmanrui/dsh-im",IS="https://registry.npmjs.org/",edt=15*6e4,tdt=1e4,EQe=16*1024;function Nc(n,A={}){return Object.assign(new Error(n),{code:n,...A})}function FR(n,A){return typeof n?.get=="function"?n.get(A):n?.[A]}function o4(n,A){let o=ZIt(n,A);return o!==".."&&!o.startsWith(`..${XIt}`)&&!s4(o)}async function Adt(n){try{return await fQe(n,"utf8")}catch(A){if(A.code==="ENOENT")return"";throw A}}async function n4(n){let A=await fQe(Kl(n,"package.json"),"utf8");return{directory:await Tc(n),manifest:JSON.parse(A),contents:A}}async function i4(n,A){let o=a4(await Tc(n));for(;;){try{let e=await n4(o);return e.manifest?.name===A?e:null}catch(e){if(e.code!=="ENOENT")throw e}let a=a4(o);if(a===o)return null;o=a}}function rdt(n){return typeof n=="string"&&n.length>0&&Buffer.byteLength(n)<=255&&!n.startsWith("-")&&![".","..","node_modules"].includes(n)&&!/[\\/\x00-\x1f\x7f<>:"|?*]/u.test(n)}function idt(n){if(n[0]==="web")return"web";let A;for(let o=0;o<n.length;o+=1){let a=n[o];if(a==="--profile")A=n[++o];else if(a.startsWith("--profile="))A=a.slice(10);else if(a==="--patch")o+=1;else if(!a.startsWith("--patch="))break}return A}function adt(n,A){let o=n.DSH_HOME?.trim()?n.DSH_HOME:Kl(A,".dsh");return o==="~"?o=A:/^~[\\/]/u.test(o)&&(o=Kl(A,o.slice(2))),GR(o)}function odt(n){return typeof n=="string"&&n.trim().length>0&&(lS.default.validRange(n)!==null||/^[A-Za-z][A-Za-z0-9._-]*$/u.test(n))}async function ndt(n){if(n.manifest?.name!==Dd||lS.default.valid(n.manifest.version)===null)return!1;let A=[n.manifest.main,n.manifest.exports?.["./client"],n.manifest.dsh?.bundle?.patch];for(let o of A){if(typeof o!="string"||!o||s4(o)||o.includes("\0"))return!1;let a=GR(n.directory,o);if(!o4(n.directory,a)||!o4(n.directory,await Tc(a))||!(await zIt(a)).isFile())return!1}return!0}function sdt(n){if(n==null||n==="")return!0;if(typeof n!="string")return!1;try{return new URL(n).href===IS}catch{return!1}}async function CQe(n,{signal:A,timeoutMs:o,errorCode:a,capture:e=!1}){if(A?.aborted)throw Nc("install-interrupted");let i=new AbortController,t,r,s=u=>{t??=u,i.abort(),r?.cancel?.()},c=()=>s("install-interrupted");A?.addEventListener("abort",c,{once:!0});let g=setTimeout(()=>s("install-timeout"),o),l="",d="";try{r=n(i.signal),r.stdout?.on("data",B=>{e&&(l=(l+B.toString()).slice(-EQe))}),r.stderr?.on("data",B=>{d=(d+B.toString()).slice(-EQe)}),r.stdout?.on("error",()=>s(a)),r.stderr?.on("error",()=>s(a));let u=await r.done;if(t)throw Nc(t);if(u.exitCode!==0||u.signal)throw Nc(a,{exitCode:u.exitCode,diagnosticCode:d.match(/\bERR_PNPM_[A-Z0-9_]+\b/u)?.[0]});return{exitCode:0,signal:null,...e?{stdout:l}:{}}}catch(u){throw t?Nc(t):u.code===a?u:Nc(a)}finally{clearTimeout(g),A?.removeEventListener("abort",c)}}function BQe(n={}){let A=n.ctx,o=n.env??process.env,a=n.argv??process.argv,e=n.execArgv??process.execArgv,i=n.execPath??process.execPath,t=n.cwd??process.cwd(),r=n.platform??process.platform,s=n.osHome??WIt(),c=n.electron??process.versions.electron,g=n.moduleUrl??import.meta.url,l=i4($It(g),Dd).catch(()=>null),d;async function u(){let D=FR(A,"desktopProfiles"),M=FR(A,"desktopPnpm"),O=FR(A,"desktopPnpmBootstrap"),R=!!(c||D||M||O),F=D?.current,v=R?F?.name:idt(a.slice(2)),L=R&&O?.homeDir?GR(O.homeDir):adt(o,s),U={environmentKind:R?"desktop":"cli",homeDir:L,profileName:v};if(!rdt(v))return{...U,blockedReason:"unknown-profile"};let G=await Tc(Kl(L,"profiles",v)),k=await Tc(L),x={...U,homeDir:k,profileDir:G};if(R)try{if(typeof M?.runPlugin!="function"||typeof M?.run!="function"||!O||!F?.dir||O.activeProfileName!==v||await Tc(F.dir)!==G||await Tc(O.activeProfileDir)!==G||await Tc(O.appExecutable)!==await Tc(i))return{...x,blockedReason:"executor-unavailable"};let _=await i4(O.dshBootstrapPath,"dsh-plugin-desktop");return!_||VIt(O.dshBootstrapPath)!=="desktop-cli.js"||a4(await Tc(O.dshBootstrapPath))!==Kl(_.directory,"lib")?{...x,blockedReason:"executor-unavailable"}:{...x,desktop:M,executable:i,cliEntry:O.dshBootstrapPath}}catch{return{...x,blockedReason:"executor-unavailable"}}let H=FR(A,"subprocess");if(typeof H?.spawn!="function"||typeof a[1]!="string"||!s4(a[1])||r==="win32")return{...x,blockedReason:"executor-unavailable"};try{let _=await i4(a[1],"@deepseek-ai/dsh");if(!_)return{...x,blockedReason:"executor-unavailable"};let P=await Tc(a[1]),q=typeof _.manifest.bin=="string"?_.manifest.bin:_.manifest.bin?.dsh,Z=typeof q=="string"?GR(_.directory,q):"";return P!==Z&&P!==Kl(_.directory,"src","bin.ts")?{...x,blockedReason:"executor-unavailable"}:{...x,subprocess:H,executable:i,cliEntry:P}}catch{return{...x,blockedReason:"executor-unavailable"}}}function B(D,M,O,R=!1){let F=D.subprocess.spawn({argv:R?["pnpm",...M]:[i,...e,D.cliEntry,...M],cwd:R?D.profileDir:t,env:{DSH_HOME:D.homeDir,CI:"true"},stdio:{stdin:"ignore",stdout:"pipe",stderr:"pipe"},graceMs:3e3,signal:O});return{stdout:F.stdout,stderr:F.stderr,cancel:()=>F.terminate(),done:(async()=>{try{return await F.done}finally{await F.waitForExit()}})()}}async function y(D,M){let O=["config","get","@xmanrui:registry","--json"],F=(await CQe(L=>D.desktop?D.desktop.run(O,L):B(D,O,L,!0),{signal:M,timeoutMs:n.configTimeoutMs??tdt,errorCode:"registry-check-failed",capture:!0})).stdout.trim(),v;try{v=F===""||F==="undefined"?void 0:JSON.parse(F)}catch{throw Nc("registry-check-failed")}if(!sdt(v))throw Nc("registry-conflict")}async function Q({preflight:D=!1}={}){let M,O={installedVersion:null,packageValid:!1,eligible:!1,installationKey:null};try{M=await u();for(let k of["homeDir","profileDir","profileName","environmentKind","executable","cliEntry"])O[k]=M[k]??null;if(!M.profileDir)return{...O,blockedReason:M.blockedReason??"unknown-profile"};let R=await n4(M.profileDir),F=await n4(Kl(M.profileDir,"node_modules",Dd));O.sourceInstall=!odt(R.manifest.dependencies?.[Dd])||!o4(Kl(M.profileDir,"node_modules"),F.directory),O.installedVersion=typeof F.manifest.version=="string"?F.manifest.version:null,O.packageValid=await ndt(F);let v=await l,L=`${M.homeDir}\0${M.profileDir}\0${M.profileName}`,U=v?.directory===F.directory&&v?.manifest.version===F.manifest.version;d===void 0&&U&&O.packageValid&&(d=L);let G=await Promise.all(["pnpm-lock.yaml","pnpm-workspace.yaml","package-lock.json"].map(k=>Adt(Kl(M.profileDir,k))));return O.installationKey=qIt("sha256").update(JSON.stringify([L,R.contents,F.directory,F.contents,M.cliEntry,M.executable,...G])).digest("hex"),d!==void 0&&d!==L||!U&&d===void 0?O.blockedReason="installation-changed":O.packageValid?O.sourceInstall?O.blockedReason="source-install":M.blockedReason?O.blockedReason=M.blockedReason:U?D&&await y(M):O.blockedReason="pending-restart":O.blockedReason="invalid-installation",O.eligible=!O.blockedReason,{...O,blockedReason:O.blockedReason??null}}catch(R){return{...O,blockedReason:["registry-conflict","registry-check-failed","install-timeout","install-interrupted"].includes(R.code)?R.code:M?.profileDir?"invalid-installation":"unknown-profile"}}}async function m(D,{signal:M,expectedInstallationKey:O}={}){if(lS.default.valid(D)!==D||lS.default.prerelease(D))throw Nc("invalid-version");let R=await Q();if(O!==void 0&&R.installationKey!==O)throw Nc("installation-changed");if(!R.eligible)throw Nc(R.blockedReason);let F=await u();await y(F,M);let v=await Q();if(!v.eligible||v.installationKey!==R.installationKey)throw Nc("installation-changed");let L=["add","-w","--save-exact",`${Dd}@${D}`,`--registry=${IS}`];return CQe(U=>F.desktop?F.desktop.runPlugin(L,F.profileDir,U):B(F,["plugin","--profile",F.profileName,...L],U),{signal:M,timeoutMs:n.installTimeoutMs??edt,errorCode:"install-failed"})}return Object.freeze({inspect:Q,install:m})}var bd=At(r4(),1);import{createHash as cdt,randomUUID as g4}from"node:crypto";import{mkdir as gdt,open as ldt,readFile as wQe,rename as Idt,stat as DQe,unlink as bQe,writeFile as ddt}from"node:fs/promises";import{isAbsolute as yQe,join as hS}from"node:path";var uS=new Set(["installing","verifying"]),pdt=new Set([...uS,"restart-required","completed","failed","interrupted"]),QQe=256*1024,hdt=["package.json","pnpm-lock.yaml","pnpm-workspace.yaml"],dS=Symbol("no update lock");function KA(n){return Object.assign(new Error(n),{code:n})}async function mQe(n=globalThis.fetch,A=1e4){let o;try{if(o=await n(`${IS}${encodeURIComponent(Dd)}/latest`,{headers:{accept:"application/json"},redirect:"error",signal:AbortSignal.timeout(A)}),!o.ok)throw KA("check-failed");if(Number(o.headers.get("content-length"))>QQe)throw KA("invalid-release");let a=[],e=0;for await(let g of o.body){if(e+=g.byteLength,e>QQe)throw KA("invalid-release");a.push(Buffer.from(g))}let i=JSON.parse(Buffer.concat(a).toString("utf8")),t=i.version;if(i.name!==Dd||typeof t!="string"||bd.default.valid(t)!==t||bd.default.prerelease(t))throw KA("invalid-release");let r=i.engines?.node;if(r!==void 0&&(typeof r!="string"||!bd.default.validRange(r)))throw KA("invalid-release");let s=new URL(i.dist?.tarball),c=i.dist?.integrity;if(s.origin!==new URL(IS).origin||s.username||s.password||s.search||s.hash||s.pathname!==`/@xmanrui/dsh-im/-/dsh-im-${t}.tgz`||typeof c!="string"||!/^sha512-[A-Za-z0-9+/]{86}==$/.test(c))throw KA("invalid-release");return{version:t,nodeRange:r??"*",integrity:c,tarball:s.href}}catch(a){throw a?.code==="invalid-release"||a instanceof SyntaxError||a instanceof TypeError&&o?.ok?KA("invalid-release"):KA("check-failed")}}function SQe(n){if(!yQe(n.homeDir??"")||!yQe(n.profileDir??""))return null;let A=cdt("sha256").update(n.profileDir).digest("hex").slice(0,24),o=hS(n.homeDir,"updates","dsh-im",A);return{directory:o,state:hS(o,"state.json"),lock:hS(o,"install.lock"),backup:hS(o,"before.json")}}async function c4(n,A=null){try{if((await DQe(n)).size>10*1024*1024)throw KA("state-unavailable");return JSON.parse(await wQe(n,"utf8"))}catch(o){if(o.code==="ENOENT")return A;throw KA("state-unavailable")}}async function pS(n,A){let o=`${n}.${g4()}.tmp`;try{await ddt(o,`${JSON.stringify(A,null,2)}
542
+ `);let e=n.on("session/event",(r,s)=>{let c=Nct(r);c&&a.enqueue(c,s)},{global:!0}),i=!1,t=()=>{i||(i=!0,e?.(),a.close())};return typeof n.effect=="function"&&n.effect(()=>t,"dsh-im: Session sync coordinator"),Object.freeze({...a,close:t})}var wR=Object.freeze(Object.fromEntries(Object.entries({weixin:["\u5FAE\u4FE1","WeChat"],feishu:["\u98DE\u4E66","Feishu"],dingtalk:["\u9489\u9489","DingTalk"],wecom:["\u4F01\u4E1A\u5FAE\u4FE1","WeCom"],qq:["QQ","QQ"],slack:["Slack","Slack"],telegram:["Telegram","Telegram"],discord:["Discord","Discord"],whatsapp:["WhatsApp","WhatsApp"],imessage:["iMessage","iMessage"],matrix:["Matrix","Matrix"],office:["AI Office","AI Office"]}).map(([n,A])=>[n,Object.freeze(A)])));var kct="[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}",wBe=new RegExp(`^(${Object.keys(wR).join("|")})-(?:steer-)?${kct}$`,"u"),vct=new RegExp(`^(${Object.keys(wR).join("|")})-.+`,"u");function Pct(n){let A=typeof n?.snapshotEvents=="function"?n.snapshotEvents():n?.events;return Array.isArray(A)?A:[]}function Lct(n,A){let o=n.inheritedEventCount;if(n.header?.parentSession&&!Number.isSafeInteger(o))return null;for(let a of A){if(Number.isSafeInteger(o)&&a.seq<o||a.type!=="user/message"||a.data?.source?.kind!=="user")continue;let e=wBe.exec(a.data.source.rpcId)?.[1];if(e)return e}return n.header?.parentSession?null:vct.exec(n.id??n.sessionId)?.[1]??null}function Fct(n,A,o=Yl()){let a=wR[A];return!a||typeof n!="string"||!n.trim()||a.some(e=>n.startsWith(`${e} \xB7 `))?n:`${a[o==="en"?1:0]} \xB7 ${n}`}function Gct(n){return typeof n?.title!="string"||!n.title.trim()||!Array.isArray(n.messageSeqs)?!1:n.source?.kind==="user"?n.messageSeqs.length===0:!["fallback","provider"].includes(n.source?.kind)||n.messageSeqs.length===0||n.messageSeqs.some(A=>!Number.isSafeInteger(A)||A<0)?!1:n.source.kind!=="provider"||typeof n.source.provider=="string"&&!!n.source.provider}function DBe(n,{logger:A=console}={}){if(typeof n?.on!="function"||typeof n?.sessions?.get!="function"||typeof n?.sessions?.list!="function")throw new TypeError("Session title prefixes require Host sessions and events");let o=new Map,a=!1,e=c=>{if(a||n.sessions.get(c.id??c.sessionId)!==c||typeof c.append!="function")return;let g=Pct(c),l=Lct(c,g);if(!l)return;let d=g.findLast(B=>B.type==="session/title");if(!Gct(d?.data))return;let u=Fct(d.data.title,l);u!==d.data.title&&c.append("session/title",{...structuredClone(d.data),title:u})},i=c=>{if(a||o.has(c))return;let g=Promise.resolve().then(()=>{o.delete(c),e(c)}).catch(l=>{A.warn?.("[dsh-im] unable to add Session channel prefix:",l?.message??l)}).finally(()=>{o.get(c)===g&&o.delete(c)});o.set(c,g)},t=n.on("session/event",(c,g)=>{(g?.type==="session/title"||g?.type==="user/message"&&wBe.test(g.data?.source?.rpcId))&&i(c)},{global:!0}),r=n.on("session/created",i,{global:!0}),s=()=>{a||(a=!0,t?.(),r?.())};typeof n.effect=="function"&&n.effect(()=>s,"dsh-im: Session title channel prefixes");for(let c of n.sessions.list())i(c);return Object.freeze({close:s,async whenIdle(){for(;o.size;)await Promise.allSettled([...o.values()])}})}var lS=At(r4(),1);import{createHash as qIt}from"node:crypto";import{readFile as fQe,realpath as Tc,stat as zIt}from"node:fs/promises";import{homedir as WIt}from"node:os";import{basename as VIt,dirname as a4,isAbsolute as s4,join as Kl,relative as ZIt,resolve as GR,sep as XIt}from"node:path";import{fileURLToPath as $It}from"node:url";var Dd="dsh-a2a-im",IS="https://registry.npmjs.org/",edt=15*6e4,tdt=1e4,EQe=16*1024;function Nc(n,A={}){return Object.assign(new Error(n),{code:n,...A})}function FR(n,A){return typeof n?.get=="function"?n.get(A):n?.[A]}function o4(n,A){let o=ZIt(n,A);return o!==".."&&!o.startsWith(`..${XIt}`)&&!s4(o)}async function Adt(n){try{return await fQe(n,"utf8")}catch(A){if(A.code==="ENOENT")return"";throw A}}async function n4(n){let A=await fQe(Kl(n,"package.json"),"utf8");return{directory:await Tc(n),manifest:JSON.parse(A),contents:A}}async function i4(n,A){let o=a4(await Tc(n));for(;;){try{let e=await n4(o);return e.manifest?.name===A?e:null}catch(e){if(e.code!=="ENOENT")throw e}let a=a4(o);if(a===o)return null;o=a}}function rdt(n){return typeof n=="string"&&n.length>0&&Buffer.byteLength(n)<=255&&!n.startsWith("-")&&![".","..","node_modules"].includes(n)&&!/[\\/\x00-\x1f\x7f<>:"|?*]/u.test(n)}function idt(n){if(n[0]==="web")return"web";let A;for(let o=0;o<n.length;o+=1){let a=n[o];if(a==="--profile")A=n[++o];else if(a.startsWith("--profile="))A=a.slice(10);else if(a==="--patch")o+=1;else if(!a.startsWith("--patch="))break}return A}function adt(n,A){let o=n.DSH_HOME?.trim()?n.DSH_HOME:Kl(A,".dsh");return o==="~"?o=A:/^~[\\/]/u.test(o)&&(o=Kl(A,o.slice(2))),GR(o)}function odt(n){return typeof n=="string"&&n.trim().length>0&&(lS.default.validRange(n)!==null||/^[A-Za-z][A-Za-z0-9._-]*$/u.test(n))}async function ndt(n){if(n.manifest?.name!==Dd||lS.default.valid(n.manifest.version)===null)return!1;let A=[n.manifest.main,n.manifest.exports?.["./client"],n.manifest.dsh?.bundle?.patch];for(let o of A){if(typeof o!="string"||!o||s4(o)||o.includes("\0"))return!1;let a=GR(n.directory,o);if(!o4(n.directory,a)||!o4(n.directory,await Tc(a))||!(await zIt(a)).isFile())return!1}return!0}function sdt(n){if(n==null||n==="")return!0;if(typeof n!="string")return!1;try{return new URL(n).href===IS}catch{return!1}}async function CQe(n,{signal:A,timeoutMs:o,errorCode:a,capture:e=!1}){if(A?.aborted)throw Nc("install-interrupted");let i=new AbortController,t,r,s=u=>{t??=u,i.abort(),r?.cancel?.()},c=()=>s("install-interrupted");A?.addEventListener("abort",c,{once:!0});let g=setTimeout(()=>s("install-timeout"),o),l="",d="";try{r=n(i.signal),r.stdout?.on("data",B=>{e&&(l=(l+B.toString()).slice(-EQe))}),r.stderr?.on("data",B=>{d=(d+B.toString()).slice(-EQe)}),r.stdout?.on("error",()=>s(a)),r.stderr?.on("error",()=>s(a));let u=await r.done;if(t)throw Nc(t);if(u.exitCode!==0||u.signal)throw Nc(a,{exitCode:u.exitCode,diagnosticCode:d.match(/\bERR_PNPM_[A-Z0-9_]+\b/u)?.[0]});return{exitCode:0,signal:null,...e?{stdout:l}:{}}}catch(u){throw t?Nc(t):u.code===a?u:Nc(a)}finally{clearTimeout(g),A?.removeEventListener("abort",c)}}function BQe(n={}){let A=n.ctx,o=n.env??process.env,a=n.argv??process.argv,e=n.execArgv??process.execArgv,i=n.execPath??process.execPath,t=n.cwd??process.cwd(),r=n.platform??process.platform,s=n.osHome??WIt(),c=n.electron??process.versions.electron,g=n.moduleUrl??import.meta.url,l=i4($It(g),Dd).catch(()=>null),d;async function u(){let D=FR(A,"desktopProfiles"),M=FR(A,"desktopPnpm"),O=FR(A,"desktopPnpmBootstrap"),R=!!(c||D||M||O),F=D?.current,v=R?F?.name:idt(a.slice(2)),L=R&&O?.homeDir?GR(O.homeDir):adt(o,s),U={environmentKind:R?"desktop":"cli",homeDir:L,profileName:v};if(!rdt(v))return{...U,blockedReason:"unknown-profile"};let G=await Tc(Kl(L,"profiles",v)),k=await Tc(L),x={...U,homeDir:k,profileDir:G};if(R)try{if(typeof M?.runPlugin!="function"||typeof M?.run!="function"||!O||!F?.dir||O.activeProfileName!==v||await Tc(F.dir)!==G||await Tc(O.activeProfileDir)!==G||await Tc(O.appExecutable)!==await Tc(i))return{...x,blockedReason:"executor-unavailable"};let _=await i4(O.dshBootstrapPath,"dsh-plugin-desktop");return!_||VIt(O.dshBootstrapPath)!=="desktop-cli.js"||a4(await Tc(O.dshBootstrapPath))!==Kl(_.directory,"lib")?{...x,blockedReason:"executor-unavailable"}:{...x,desktop:M,executable:i,cliEntry:O.dshBootstrapPath}}catch{return{...x,blockedReason:"executor-unavailable"}}let H=FR(A,"subprocess");if(typeof H?.spawn!="function"||typeof a[1]!="string"||!s4(a[1])||r==="win32")return{...x,blockedReason:"executor-unavailable"};try{let _=await i4(a[1],"@deepseek-ai/dsh");if(!_)return{...x,blockedReason:"executor-unavailable"};let P=await Tc(a[1]),q=typeof _.manifest.bin=="string"?_.manifest.bin:_.manifest.bin?.dsh,Z=typeof q=="string"?GR(_.directory,q):"";return P!==Z&&P!==Kl(_.directory,"src","bin.ts")?{...x,blockedReason:"executor-unavailable"}:{...x,subprocess:H,executable:i,cliEntry:P}}catch{return{...x,blockedReason:"executor-unavailable"}}}function B(D,M,O,R=!1){let F=D.subprocess.spawn({argv:R?["pnpm",...M]:[i,...e,D.cliEntry,...M],cwd:R?D.profileDir:t,env:{DSH_HOME:D.homeDir,CI:"true"},stdio:{stdin:"ignore",stdout:"pipe",stderr:"pipe"},graceMs:3e3,signal:O});return{stdout:F.stdout,stderr:F.stderr,cancel:()=>F.terminate(),done:(async()=>{try{return await F.done}finally{await F.waitForExit()}})()}}async function y(D,M){let O=["config","get","@xmanrui:registry","--json"],F=(await CQe(L=>D.desktop?D.desktop.run(O,L):B(D,O,L,!0),{signal:M,timeoutMs:n.configTimeoutMs??tdt,errorCode:"registry-check-failed",capture:!0})).stdout.trim(),v;try{v=F===""||F==="undefined"?void 0:JSON.parse(F)}catch{throw Nc("registry-check-failed")}if(!sdt(v))throw Nc("registry-conflict")}async function Q({preflight:D=!1}={}){let M,O={installedVersion:null,packageValid:!1,eligible:!1,installationKey:null};try{M=await u();for(let k of["homeDir","profileDir","profileName","environmentKind","executable","cliEntry"])O[k]=M[k]??null;if(!M.profileDir)return{...O,blockedReason:M.blockedReason??"unknown-profile"};let R=await n4(M.profileDir),F=await n4(Kl(M.profileDir,"node_modules",Dd));O.sourceInstall=!odt(R.manifest.dependencies?.[Dd])||!o4(Kl(M.profileDir,"node_modules"),F.directory),O.installedVersion=typeof F.manifest.version=="string"?F.manifest.version:null,O.packageValid=await ndt(F);let v=await l,L=`${M.homeDir}\0${M.profileDir}\0${M.profileName}`,U=v?.directory===F.directory&&v?.manifest.version===F.manifest.version;d===void 0&&U&&O.packageValid&&(d=L);let G=await Promise.all(["pnpm-lock.yaml","pnpm-workspace.yaml","package-lock.json"].map(k=>Adt(Kl(M.profileDir,k))));return O.installationKey=qIt("sha256").update(JSON.stringify([L,R.contents,F.directory,F.contents,M.cliEntry,M.executable,...G])).digest("hex"),d!==void 0&&d!==L||!U&&d===void 0?O.blockedReason="installation-changed":O.packageValid?O.sourceInstall?O.blockedReason="source-install":M.blockedReason?O.blockedReason=M.blockedReason:U?D&&await y(M):O.blockedReason="pending-restart":O.blockedReason="invalid-installation",O.eligible=!O.blockedReason,{...O,blockedReason:O.blockedReason??null}}catch(R){return{...O,blockedReason:["registry-conflict","registry-check-failed","install-timeout","install-interrupted"].includes(R.code)?R.code:M?.profileDir?"invalid-installation":"unknown-profile"}}}async function m(D,{signal:M,expectedInstallationKey:O}={}){if(lS.default.valid(D)!==D||lS.default.prerelease(D))throw Nc("invalid-version");let R=await Q();if(O!==void 0&&R.installationKey!==O)throw Nc("installation-changed");if(!R.eligible)throw Nc(R.blockedReason);let F=await u();await y(F,M);let v=await Q();if(!v.eligible||v.installationKey!==R.installationKey)throw Nc("installation-changed");let L=["add","-w","--save-exact",`${Dd}@${D}`,`--registry=${IS}`];return CQe(U=>F.desktop?F.desktop.runPlugin(L,F.profileDir,U):B(F,["plugin","--profile",F.profileName,...L],U),{signal:M,timeoutMs:n.installTimeoutMs??edt,errorCode:"install-failed"})}return Object.freeze({inspect:Q,install:m})}var bd=At(r4(),1);import{createHash as cdt,randomUUID as g4}from"node:crypto";import{mkdir as gdt,open as ldt,readFile as wQe,rename as Idt,stat as DQe,unlink as bQe,writeFile as ddt}from"node:fs/promises";import{isAbsolute as yQe,join as hS}from"node:path";var uS=new Set(["installing","verifying"]),pdt=new Set([...uS,"restart-required","completed","failed","interrupted"]),QQe=256*1024,hdt=["package.json","pnpm-lock.yaml","pnpm-workspace.yaml"],dS=Symbol("no update lock");function KA(n){return Object.assign(new Error(n),{code:n})}async function mQe(n=globalThis.fetch,A=1e4){let o;try{if(o=await n(`${IS}${encodeURIComponent(Dd)}/latest`,{headers:{accept:"application/json"},redirect:"error",signal:AbortSignal.timeout(A)}),!o.ok)throw KA("check-failed");if(Number(o.headers.get("content-length"))>QQe)throw KA("invalid-release");let a=[],e=0;for await(let g of o.body){if(e+=g.byteLength,e>QQe)throw KA("invalid-release");a.push(Buffer.from(g))}let i=JSON.parse(Buffer.concat(a).toString("utf8")),t=i.version;if(i.name!==Dd||typeof t!="string"||bd.default.valid(t)!==t||bd.default.prerelease(t))throw KA("invalid-release");let r=i.engines?.node;if(r!==void 0&&(typeof r!="string"||!bd.default.validRange(r)))throw KA("invalid-release");let s=new URL(i.dist?.tarball),c=i.dist?.integrity;if(s.origin!==new URL(IS).origin||s.username||s.password||s.search||s.hash||s.pathname!==`/dsh-a2a-im/-/dsh-a2a-im-${t}.tgz`||typeof c!="string"||!/^sha512-[A-Za-z0-9+/]{86}==$/.test(c))throw KA("invalid-release");return{version:t,nodeRange:r??"*",integrity:c,tarball:s.href}}catch(a){throw a?.code==="invalid-release"||a instanceof SyntaxError||a instanceof TypeError&&o?.ok?KA("invalid-release"):KA("check-failed")}}function SQe(n){if(!yQe(n.homeDir??"")||!yQe(n.profileDir??""))return null;let A=cdt("sha256").update(n.profileDir).digest("hex").slice(0,24),o=hS(n.homeDir,"updates","dsh-im",A);return{directory:o,state:hS(o,"state.json"),lock:hS(o,"install.lock"),backup:hS(o,"before.json")}}async function c4(n,A=null){try{if((await DQe(n)).size>10*1024*1024)throw KA("state-unavailable");return JSON.parse(await wQe(n,"utf8"))}catch(o){if(o.code==="ENOENT")return A;throw KA("state-unavailable")}}async function pS(n,A){let o=`${n}.${g4()}.tmp`;try{await ddt(o,`${JSON.stringify(A,null,2)}
543
543
  `,{mode:384,flag:"wx"}),await Idt(o,n)}catch{throw KA("state-unavailable")}finally{await bQe(o).catch(a=>{if(a.code!=="ENOENT")throw KA("state-unavailable")})}}function udt(n){if(!Number.isSafeInteger(n)||n<=0)return!1;try{return process.kill(n,0),!0}catch(A){return A.code!=="ESRCH"}}function Edt(n){if(!n)return null;let{id:A,state:o,targetVersion:a,message:e}=n;return{id:A,state:o,targetVersion:a,message:e,recoverable:n.recoverable===!0}}function OQe({runtime:n,runningVersion:A=vh.version,nodeVersion:o=process.versions.node,fetchImpl:a=globalThis.fetch,now:e=Date.now,checkTimeoutMs:i=1e4,confirmationTtlMs:t=10*6e4,installTimeoutMs:r=15*6e4}={}){let s={},c=null,g=null,l=-1/0,d=null,u=null,B=null,y=null,Q=!1;function m(){if(Q)throw KA("disposed")}async function D(x){let H=SQe(x);if(!H)return null;if(y?.statePath===H.state)return y.job;let _=await c4(H.state),P=await c4(H.lock,dS);if(!_)return P!==dS?{id:"locked",state:"interrupted",message:"recovery-required",targetVersion:null}:null;if(!pdt.has(_.state)||typeof _.id!="string"||!bd.default.valid(_.targetVersion))throw KA("state-unavailable");_={..._,recoverable:!1};let q=_.id!==d?.id;return uS.has(_.state)&&q&&(P===dS||P?.id!==_.id||!udt(P?.pid))&&(_={..._,state:"interrupted",message:"recovery-required"}),q&&!uS.has(_.state)&&P!==dS?{..._,state:"interrupted",message:"recovery-required"}:((_.state==="restart-required"||_.state==="completed")&&(x.installedVersion!==_.targetVersion||x.packageValid!==!0?_={..._,state:"interrupted",message:"installation-changed"}:_={..._,state:A===_.targetVersion?"completed":"restart-required"}),q&&P===dS&&["failed","interrupted"].includes(_.state)&&x.packageValid===!0&&x.eligible===!0&&x.installedVersion===A&&!x.blockedReason?_.targetVersion===A?{..._,state:"completed",message:"recovered"}:{..._,recoverable:!0}:_)}function M(x,H){let _=x.blockedReason??c?.blockedReason??null;H?.state==="interrupted"&&!H.recoverable||H?.state==="failed"&&x.installedVersion!==A?_="recovery-required":(H?.state==="restart-required"||x.installedVersion&&x.installedVersion!==A)&&(_="pending-restart");let P=uS.has(H?.state),q=!!(x.eligible&&!_&&!P&&c?.checkId&&e()<c.expiresAt&&c.installationKey===x.installationKey&&bd.default.valid(A)&&bd.default.gt(c.release.version,A));return{runningVersion:A,installedVersion:x.installedVersion??null,latestVersion:c?.release.version??null,profileName:x.profileName??null,environmentKind:x.environmentKind??"cli",sourceInstall:x.sourceInstall===!0||x.blockedReason==="source-install",canInstall:q,blockedReason:_,checkedAt:c?.checkedAt??null,checkId:q?c.checkId:null,job:Edt(H)}}async function O(){m();let x=await n.inspect();return M(x,await D(x))}async function R(){return m(),g||(c?.checkId&&e()-l<2e3?O():(l=e(),g=(async()=>{try{let x=await n.inspect({preflight:!0}),H=await mQe(a,i);return m(),c={release:H,checkId:g4(),checkedAt:e(),expiresAt:e()+t,installationKey:x.installationKey,profileDir:x.profileDir,blockedReason:x.blockedReason??(bd.default.satisfies(o,H.nodeRange)?null:"incompatible-node")},M(x,await D(x))}catch(x){throw c&&(c={...c,checkId:null,expiresAt:0}),x}finally{g=null}})(),g))}async function F(x,H){(await c4(x.lock))?.id===H&&await bQe(x.lock)}async function v(x,H,_){let P={};for(let q of hdt)try{let Z=hS(x.profileDir,q);if((await DQe(Z)).size>3*1024*1024)throw KA("state-unavailable");P[q]=await wQe(Z,"utf8")}catch(Z){if(Z.code!=="ENOENT")throw KA("state-unavailable")}await pS(H.backup,{jobId:_.id,previousVersion:_.previousVersion,files:P})}function L(x){d={...d,state:"interrupted",message:"state-unavailable"},y={statePath:x.state,job:d}}async function U(x,H,_){let P=AbortSignal.timeout(r);try{if(await n.install(H.targetVersion,{signal:AbortSignal.any([B.signal,P]),expectedInstallationKey:_.installationKey}),Q)throw KA("interrupted");d={...d,state:"verifying",updatedAt:e()},await pS(x.state,d);let q=await n.inspect();if(q.homeDir!==_.homeDir||q.profileDir!==_.profileDir||q.profileName!==_.profileName||q.blockedReason==="installation-changed")throw KA("installation-changed");if(q.installedVersion!==H.targetVersion||q.packageValid!==!0||q.blockedReason&&q.blockedReason!=="pending-restart")throw KA("verify-failed");d={...d,state:"restart-required",message:null,updatedAt:e()},await pS(x.state,d)}catch(q){let Z=P.aborted||q.code==="install-timeout",X=Q||B.signal.aborted||!Z&&["interrupted","install-interrupted"].includes(q.code);d={...d,state:X?"interrupted":"failed",message:X?"interrupted":Z?"install-timeout":["verify-failed","state-unavailable","installation-changed","registry-conflict"].includes(q.code)?q.code:"install-failed",updatedAt:e()};try{await pS(x.state,d)}catch{L(x);return}}await F(x,H.id)}function G({checkId:x,requestId:H}){return On(s,"install",async()=>{m();let _=await n.inspect({preflight:!0}),P=await D(_);if(P?.requestId===H)return M(_,P);if(uS.has(P?.state)||P?.state==="restart-required")throw KA("update-busy");let q=c;if(!q||!x||q.checkId!==x||e()>=q.expiresAt)throw KA("check-expired");if(_.profileDir!==q.profileDir||_.installationKey!==q.installationKey)throw KA("installation-changed");if(!M(_,P).canInstall)throw KA(_.blockedReason??"update-busy");let Z=SQe(_);if(!Z)throw KA("state-unavailable");let X={id:g4(),requestId:H,state:"installing",message:null,targetVersion:q.release.version,previousVersion:_.installedVersion,startedAt:e(),updatedAt:e()},ae=!1;try{await gdt(Z.directory,{recursive:!0,mode:448});let W=await ldt(Z.lock,"wx",384);ae=!0;try{await W.writeFile(JSON.stringify({id:X.id,pid:process.pid,startedAt:e()}))}finally{await W.close()}let te=await mQe(a,i);if(JSON.stringify(te)!==JSON.stringify(q.release))throw KA("check-expired");if(_=await n.inspect({preflight:!0}),_.profileDir!==q.profileDir||_.installationKey!==q.installationKey)throw KA("installation-changed");if(!_.eligible||_.blockedReason)throw KA(_.blockedReason??"update-busy");m(),await v(_,Z,X),await pS(Z.state,X),m()}catch(W){throw ae&&await F(Z,X.id),W.code==="EEXIST"?KA("update-busy"):W.code?.startsWith("E")?KA("state-unavailable"):W}return d=X,B=new AbortController,u=U(Z,X,_).catch(()=>{L(Z)}),M(_,X)})}async function k(){Q=!0,B?.abort(),u&&await u}return Object.freeze({status:O,check:R,install:G,close:k})}var Cdt="/dsh-im",fdt=Object.freeze(["update.status","update.check","update.install"]);function Bdt(n,A){if(A===null||typeof A!="object"||Array.isArray(A))return!1;let o=Object.keys(A);return n!=="update.install"?o.length===0:o.length===2&&o.every(a=>a==="checkId"||a==="requestId")&&["checkId","requestId"].every(a=>typeof A[a]=="string"&&/^[A-Za-z0-9_-]{1,128}$/.test(A[a]))}var ydt=new Set(["check-failed","invalid-release","check-expired","installation-changed","update-busy","install-failed","verify-failed","state-unavailable","interrupted","disposed","source-install","unknown-profile","unsupported-runtime","registry-conflict","incompatible-node","pending-restart","recovery-required","executor-unavailable","invalid-installation","registry-check-failed","install-timeout","install-interrupted","invalid-version"]);function Qdt(n){return async(A,o,a)=>{if(!fdt.includes(A)||!Bdt(A,o))return{ok:!1,error:{code:"bad-request",message:"Invalid update request."}};if(a?.aborted)return{ok:!1,error:{code:"cancelled",message:"Request cancelled."}};try{return{ok:!0,value:A==="update.install"?await n.install(o):A==="update.check"?await n.check():await n.status()}}catch(e){let i=ydt.has(e?.code)?e.code:"update-failed";return{ok:!1,error:{code:i,message:i}}}}}function MQe(n,A={}){let o=A.runtime??BQe({ctx:n,moduleUrl:import.meta.url}),a=A.service??OQe({runtime:o}),e=pA(n,Cdt,Qdt(a),{authority:"loopback"});return n.effect(()=>()=>a.close(),"dsh-im: close update installer"),e}var _Qe="dsh-im-host",mdt={connection:{required:!0},credentials:{required:!0},typertGateway:{required:!0},workspaceRegistry:{required:!1},permissionPresets:{required:!1}};function Sdt(n,A,o){let a=n[A]??{},e=n.rpcAuthority===void 0?a:{...a,rpcAuthority:n.rpcAuthority};return A==="office"?e:{...e,deliveryService:o}}function wdt(n={}){let A=n.installHostLanguage??cBe,o=n.installHostLanguageRpc??gBe,a=n.installUpdateRpc??MQe,e=n.installInboundTtlRpc??BBe,i=n.installInjectedContext??yBe,t=n.installDeliveryRpc??IBe,r=n.installDeliveryHttp??hBe,s=n.installSessionSyncCoordinator??SBe,c=n.createDeliveryService??CBe,g=n.applyFeishu??die,l=n.applyWeixin??woe,d=n.applyDingtalk??PV,u=n.applyWecom??Rae,B=n.applyWecomApp??Yae,y=n.applyQq??Rie,Q=n.applySlack??qie,m=n.applyTelegram??Iae,D=n.applyDiscord??l6,M=n.applyOffice??E6,O=n.applyWhatsapp??iCe,R=n.applyIMessage??uCe,F=n.applyEmail??UCe,v=n.applyMatrix??ABe,L=[["feishu",g],["weixin",l],["dingtalk",d],["wecom",u],["wecomApp",B],["qq",y],["slack",Q],["telegram",m],["discord",D],["whatsapp",O],["imessage",R],["email",F],["matrix",v],["office",M]];return Object.freeze({name:_Qe,inject:mdt,async apply(G,k={}){let x=L.map(([P])=>P).filter(P=>P!=="office"&&k[P]?.harnessBaseUrl!==void 0),H=c({unavailableSessionSyncChannels:x});typeof G?.provide=="function"&&G.provide("dshIm",Object.freeze({contractVersion:1,receiptVersion:1,inboundVersion:1,consumeInbound:(P,q)=>H.consumeInbound(P,q),historyChecked:(P,q,Z,X)=>H.historyChecked(P,q,Z,X),replyChecked:(P,q,Z,X)=>H.replyChecked(P,q,Z,X),describeBot:P=>H.describeBot(P),sendChecked:(P,q,Z,X)=>H.sendChecked(P,q,Z,X),send:(P,q,Z,X)=>H.send(P,q,Z,X),listTargets:async P=>(await H.listTargets(P)).targets,listBots:()=>H.listBots()}));let _=async P=>{await U(P,k,H)};if(typeof G?.inject=="function"){await G.inject(["sessionController","workspaceController"],_),G.inject(["webServer"],P=>{r(P,H)});return}await _(G),G?.webServer?.register&&typeof G?.effect=="function"&&r(G,H)}});async function U(G,k,x){let H=A(G,k);await H?.ready;let _=Z=>{DBe(Z,{logger:typeof Z?.logger=="function"?Z.logger("dsh-im:session-title"):Z?.logger??console})};typeof G?.inject=="function"?G.inject(["sessions"],_):G?.sessions&&typeof G.on=="function"&&_(G),typeof G?.inject=="function"?G.inject(["tools","systemPrompt"],Z=>{gv(Z)}):gv(G);let P=typeof G?.logger=="function"?G.logger(_Qe):G?.logger??console;try{i(G,{logger:P})}catch(Z){P.error?.("[dsh-im] failed to activate injected-context pairing; prompts keep the inline prefix",Z)}if(G?.connection?.fetch){if(H)try{o(G,H,k.rpcAuthority)}catch(Z){P.error?.("[dsh-im] failed to activate interface language mirroring; continuing with channels",Z)}try{a(G)}catch(Z){P.error?.("[dsh-im] failed to activate update management; continuing with channels",Z)}try{e(G,{config:k})}catch(Z){P.error?.("[dsh-im] failed to activate inbound TTL settings; continuing with channels",Z)}try{t(G,x,{authority:k.rpcAuthority})}catch(Z){P.error?.("[dsh-im] failed to activate delivery management; continuing with channels",Z)}}let q=[];if(await Promise.all(L.map(async([Z,X])=>{try{await X(G,Sdt(k,Z,x))}catch(ae){q.push(ae),P.error?.(`[dsh-im] failed to activate ${Z}; continuing with the remaining channels`,ae)}})),q.length===L.length)throw new AggregateError(q,"dsh-im failed to activate every channel");if(typeof G?.on=="function")try{s(G,x,{logger:P,inputScope:G.root??G})}catch(Z){P.error?.("[dsh-im] failed to activate Session sync; continuing with channels",Z)}}}async function wnA(n,A={}){return wdt().apply(n,A)}export{wnA as apply,wdt as createImHostPlugin,mdt as inject,_Qe as name};
544
544
  /*! Bundled license information:
545
545
 
package/locale/en.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "meta": {
3
- "title": "IM bots (dsh-im)",
4
- "description": "Connect Telegram, WhatsApp, Slack, Discord, Matrix, WeChat, Feishu, WeCom, DingTalk, and QQ to DSH."
3
+ "title": "IM bots",
4
+ "description": "Connect WeChat, Feishu, DingTalk to DSH."
5
5
  }
6
- }
6
+ }
package/locale/zh.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "meta": {
3
- "title": "IM 机器人 (dsh-im)",
4
- "description": "把微信、飞书、企微、钉钉、QQ、Telegram、WhatsApp、Slack、Discord、Matrix接入DSH。"
3
+ "title": "IM 机器人",
4
+ "description": "把微信、飞书、钉钉接入DSH。"
5
5
  }
6
6
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-a2a-im",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
4
4
  "icon": "./assets/logo-plugin-message-link-gradient.webp",
5
5
  "description": "把微信、飞书、企微、钉钉、QQ、Telegram、WhatsApp、Slack、Discord、Matrix接入DSH。 Connect Telegram, WhatsApp, Slack, Discord, Matrix, WeChat, Feishu, WeCom, DingTalk, and QQ to DSH.",
6
6
  "keywords": [
@@ -1,4 +1,4 @@
1
- import { mkdir, writeFile } from 'node:fs/promises';
1
+ import { mkdir, readFile, writeFile } from 'node:fs/promises';
2
2
  import { dirname, resolve } from 'node:path';
3
3
  import { fileURLToPath } from 'node:url';
4
4
 
@@ -7,7 +7,11 @@ import { build } from 'esbuild';
7
7
  const sourceDirectory = dirname(fileURLToPath(import.meta.url));
8
8
  const packageRoot = resolve(sourceDirectory, '../..');
9
9
  const outputPath = resolve(packageRoot, 'lib/client.js');
10
- const loaderId = process.env.DSH_IM_CLIENT_ID ?? '@xmanrui/dsh-im';
10
+ // 注册 id 必须等于 package.json name:client-modules 图行/工厂/查找全按包名做键,
11
+ // 硬编码后包改名即失配(loaded without registering / duplicate registration,
12
+ // 2026-10-22 @xmanrui/dsh-im→dsh-a2a-im 改名实测),故默认动态读包名,env 仅作显式覆盖
13
+ const packageManifest = JSON.parse(await readFile(resolve(packageRoot, 'package.json'), 'utf8'));
14
+ const loaderId = process.env.DSH_IM_CLIENT_ID ?? packageManifest.name;
11
15
 
12
16
  const result = await build({
13
17
  entryPoints: [resolve(sourceDirectory, 'index.js')],
@@ -128,7 +128,7 @@ export function installDingtalkStyles() {
128
128
  const existing = document.querySelector(`style[data-plugin-css="${DINGTALK_STYLE_ID}"]`);
129
129
  if (existing) return () => {};
130
130
  const style = document.createElement('style');
131
- style.dataset.plugin = '@xmanrui/dsh-im';
131
+ style.dataset.plugin = 'dsh-a2a-im';
132
132
  style.dataset.pluginCss = DINGTALK_STYLE_ID;
133
133
  style.textContent = CSS;
134
134
  document.head.appendChild(style);
@@ -11,7 +11,7 @@ export function installDiscordStyles() {
11
11
  const existing = document.querySelector(`style[data-plugin-css="${DISCORD_STYLE_ID}"]`);
12
12
  if (existing) return () => {};
13
13
  const style = document.createElement('style');
14
- style.dataset.plugin = '@xmanrui/dsh-im';
14
+ style.dataset.plugin = 'dsh-a2a-im';
15
15
  style.dataset.pluginCss = DISCORD_STYLE_ID;
16
16
  style.textContent = CSS;
17
17
  document.head.appendChild(style);
@@ -45,7 +45,7 @@ export function installEmailStyles() {
45
45
  if (typeof document === 'undefined') return () => {};
46
46
  const existing = document.querySelector(`style[data-plugin-css="${EMAIL_STYLE_ID}"]`);
47
47
  if (existing) return () => {};
48
- const style = document.createElement('style'); style.dataset.plugin = '@xmanrui/dsh-im';
48
+ const style = document.createElement('style'); style.dataset.plugin = 'dsh-a2a-im';
49
49
  style.dataset.pluginCss = EMAIL_STYLE_ID; style.textContent = CSS; document.head.appendChild(style);
50
50
  return () => style.remove();
51
51
  }
@@ -562,7 +562,7 @@ export function installFeishuStyles() {
562
562
  }
563
563
 
564
564
  const style = document.createElement("style");
565
- style.dataset.plugin = "@xmanrui/dsh-im";
565
+ style.dataset.plugin = "dsh-a2a-im";
566
566
  style.dataset.pluginCss = FEISHU_STYLE_ID;
567
567
  style.textContent = CSS;
568
568
  document.head.appendChild(style);
@@ -13,7 +13,7 @@ export function installIMessageStyles() {
13
13
  if (typeof document === 'undefined') return () => {};
14
14
  const existing = document.querySelector(`style[data-plugin-css="${IMESSAGE_STYLE_ID}"]`);
15
15
  if (existing) return () => {};
16
- const style = document.createElement('style'); style.dataset.plugin = '@xmanrui/dsh-im';
16
+ const style = document.createElement('style'); style.dataset.plugin = 'dsh-a2a-im';
17
17
  style.dataset.pluginCss = IMESSAGE_STYLE_ID; style.textContent = CSS; document.head.appendChild(style);
18
18
  return () => style.remove();
19
19
  }
@@ -28,7 +28,7 @@ export function installMatrixStyles() {
28
28
  const existing = document.querySelector(`style[data-plugin-css="${MATRIX_STYLE_ID}"]`);
29
29
  if (existing) return () => {};
30
30
  const style = document.createElement('style');
31
- style.dataset.plugin = '@xmanrui/dsh-im';
31
+ style.dataset.plugin = 'dsh-a2a-im';
32
32
  style.dataset.pluginCss = MATRIX_STYLE_ID;
33
33
  style.textContent = CSS;
34
34
  document.head.appendChild(style);
@@ -11,7 +11,7 @@ export function installQqStyles() {
11
11
  const existing = document.querySelector(`style[data-plugin-css="${QQ_STYLE_ID}"]`);
12
12
  if (existing) return () => {};
13
13
  const style = document.createElement('style');
14
- style.dataset.plugin = '@xmanrui/dsh-im';
14
+ style.dataset.plugin = 'dsh-a2a-im';
15
15
  style.dataset.pluginCss = QQ_STYLE_ID;
16
16
  style.textContent = CSS;
17
17
  document.head.appendChild(style);
@@ -26,7 +26,7 @@ export function installSlackStyles() {
26
26
  const existing = document.querySelector(`style[data-plugin-css="${SLACK_STYLE_ID}"]`);
27
27
  if (existing) return () => {};
28
28
  const style = document.createElement('style');
29
- style.dataset.plugin = '@xmanrui/dsh-im';
29
+ style.dataset.plugin = 'dsh-a2a-im';
30
30
  style.dataset.pluginCss = SLACK_STYLE_ID;
31
31
  style.textContent = CSS;
32
32
  document.head.appendChild(style);
@@ -23,7 +23,7 @@ export function installTelegramStyles() {
23
23
  const existing = document.querySelector(`style[data-plugin-css="${TELEGRAM_STYLE_ID}"]`);
24
24
  if (existing) return () => {};
25
25
  const style = document.createElement('style');
26
- style.dataset.plugin = '@xmanrui/dsh-im';
26
+ style.dataset.plugin = 'dsh-a2a-im';
27
27
  style.dataset.pluginCss = TELEGRAM_STYLE_ID;
28
28
  style.textContent = CSS;
29
29
  document.head.appendChild(style);
@@ -11,7 +11,7 @@ export function installWecomStyles() {
11
11
  const existing = document.querySelector(`style[data-plugin-css="${WECOM_STYLE_ID}"]`);
12
12
  if (existing) return () => {};
13
13
  const style = document.createElement('style');
14
- style.dataset.plugin = '@xmanrui/dsh-im';
14
+ style.dataset.plugin = 'dsh-a2a-im';
15
15
  style.dataset.pluginCss = WECOM_STYLE_ID;
16
16
  style.textContent = CSS;
17
17
  document.head.appendChild(style);
@@ -17,7 +17,7 @@ export function installWecomAppStyles() {
17
17
  const existing = document.querySelector(`style[data-plugin-css="${WECOM_APP_STYLE_ID}"]`);
18
18
  if (existing) return () => {};
19
19
  const style = document.createElement('style');
20
- style.dataset.plugin = '@xmanrui/dsh-im';
20
+ style.dataset.plugin = 'dsh-a2a-im';
21
21
  style.dataset.pluginCss = WECOM_APP_STYLE_ID;
22
22
  style.textContent = CSS;
23
23
  document.head.appendChild(style);
@@ -107,7 +107,7 @@ export function installWeixinStyles() {
107
107
  const existing = document.querySelector(`style[data-plugin-css="${WEIXIN_STYLE_ID}"]`);
108
108
  if (existing) return () => {};
109
109
  const style = document.createElement('style');
110
- style.dataset.plugin = '@xmanrui/dsh-im';
110
+ style.dataset.plugin = 'dsh-a2a-im';
111
111
  style.dataset.pluginCss = WEIXIN_STYLE_ID;
112
112
  style.textContent = CSS;
113
113
  document.head.appendChild(style);
@@ -11,7 +11,7 @@ export function installWhatsappStyles() {
11
11
  const existing = document.querySelector(`style[data-plugin-css="${WHATSAPP_STYLE_ID}"]`);
12
12
  if (existing) return () => {};
13
13
  const style = document.createElement('style');
14
- style.dataset.plugin = '@xmanrui/dsh-im';
14
+ style.dataset.plugin = 'dsh-a2a-im';
15
15
  style.dataset.pluginCss = WHATSAPP_STYLE_ID;
16
16
  style.textContent = CSS;
17
17
  document.head.appendChild(style);
@@ -786,7 +786,7 @@ export function installImStyles() {
786
786
  const existing = document.querySelector(`style[data-plugin-css="${IM_STYLE_ID}"]`);
787
787
  if (existing) return () => {};
788
788
  const style = document.createElement('style');
789
- style.dataset.plugin = '@xmanrui/dsh-im';
789
+ style.dataset.plugin = 'dsh-a2a-im';
790
790
  style.dataset.pluginCss = IM_STYLE_ID;
791
791
  style.textContent = CSS;
792
792
  document.head.appendChild(style);
@@ -112,7 +112,7 @@ function manualUpdateCommand(snapshot) {
112
112
  ? [...targets, snapshot.runningVersion, snapshot.installedVersion]
113
113
  .filter(validVersion).sort(compareVersionsDescending)[0]
114
114
  : 'latest';
115
- return `dsh plugin --profile ${profileArgument} add -w @xmanrui/dsh-im@${version}`;
115
+ return `dsh plugin --profile ${profileArgument} add -w dsh-a2a-im@${version}`;
116
116
  }
117
117
 
118
118
  function ManualUpdateCommand({ command, disabled, sourceInstall, desktop }) {
@@ -170,7 +170,7 @@ function ManualUpdateCommand({ command, disabled, sourceInstall, desktop }) {
170
170
  : h(React.Fragment, null,
171
171
  h('rect', { x: 7, y: 7, width: 10, height: 11, rx: 1.5 }),
172
172
  h('path', { d: 'M5 13H3.5A1.5 1.5 0 0 1 2 11.5v-8A1.5 1.5 0 0 1 3.5 2h8A1.5 1.5 0 0 1 13 3.5V5' }))))),
173
- command.endsWith('@xmanrui/dsh-im@latest') ? h('p', { className: 'dim-updateManualHint' },
173
+ command.endsWith('dsh-a2a-im@latest') ? h('p', { className: 'dim-updateManualHint' },
174
174
  '尚未确认目标版本,此命令安装执行时 npm 的 latest 版本。') : null,
175
175
  h('p', { className: 'dim-updateManualHint' }, desktop
176
176
  ? '请在当前 Desktop 的内置终端执行,完成后手动重启。'
@@ -6,7 +6,7 @@ import { fileURLToPath } from 'node:url';
6
6
 
7
7
  import semver from 'semver';
8
8
 
9
- export const PACKAGE_NAME = '@xmanrui/dsh-im';
9
+ export const PACKAGE_NAME = 'dsh-a2a-im';
10
10
  export const NPM_REGISTRY = 'https://registry.npmjs.org/';
11
11
 
12
12
  const INSTALL_TIMEOUT_MS = 15 * 60_000;
@@ -51,7 +51,7 @@ export async function fetchNpmRelease(fetchImpl = globalThis.fetch, timeoutMs =
51
51
  const integrity = value.dist?.integrity;
52
52
  if (tarball.origin !== new URL(NPM_REGISTRY).origin || tarball.username || tarball.password
53
53
  || tarball.search || tarball.hash
54
- || tarball.pathname !== `/@xmanrui/dsh-im/-/dsh-im-${version}.tgz`
54
+ || tarball.pathname !== `/dsh-a2a-im/-/dsh-a2a-im-${version}.tgz`
55
55
  || typeof integrity !== 'string' || !/^sha512-[A-Za-z0-9+/]{86}==$/.test(integrity)) {
56
56
  throw updateError('invalid-release');
57
57
  }
@@ -197,7 +197,7 @@ try {
197
197
  const packages = {
198
198
  '@deepseek-ai/dsh-base': harness.base,
199
199
  '@deepseek-ai/dsh-web-app': harness.webApp,
200
- '@xmanrui/dsh-im': pluginRoot,
200
+ 'dsh-a2a-im': pluginRoot,
201
201
  };
202
202
  for (const [name, path] of Object.entries(packages)) {
203
203
  const target = join(profile, 'node_modules', name);
@@ -137,7 +137,7 @@ try {
137
137
  const packages = {
138
138
  '@deepseek-ai/dsh-base': resolve(harnessRoot, 'packages/bundle/base'),
139
139
  '@deepseek-ai/dsh-web-app': resolve(harnessRoot, 'packages/bundle/web-app'),
140
- '@xmanrui/dsh-im': pluginRoot,
140
+ 'dsh-a2a-im': pluginRoot,
141
141
  };
142
142
  for (const [name, path] of Object.entries(packages)) {
143
143
  const target = join(profile, 'node_modules', name);
@@ -123,7 +123,7 @@ if (forbiddenDshLockPaths.length > 0) {
123
123
  );
124
124
  }
125
125
 
126
- if (!/\bid\s*:\s*["']@xmanrui\/dsh-im["']/u.test(client)) {
126
+ if (!/\bid\s*:\s*["']dsh-a2a-im["']/u.test(client)) {
127
127
  throw new Error('client bundle does not register the dsh-im loader id');
128
128
  }
129
129
  const sourceSectionMarkers = [
@@ -210,7 +210,7 @@ if (/@xmanrui\/dsh-(?:feishu|weixin|dingtalk)/.test(
210
210
  )) {
211
211
  throw new Error('source or package metadata still depends on an external channel plugin');
212
212
  }
213
- if (!patch.includes("name: '@xmanrui/dsh-im'") || /dsh-(?:feishu|weixin|dingtalk)/.test(patch)) {
213
+ if (!patch.includes("name: 'dsh-a2a-im'") || /dsh-(?:feishu|weixin|dingtalk)/.test(patch)) {
214
214
  throw new Error('bundle patch must activate only dsh-im');
215
215
  }
216
216
  for (const name of ['@xmanrui/dsh-feishu', '@xmanrui/dsh-weixin', '@xmanrui/dsh-dingtalk']) {