@xmanrui/dsh-im 4.29.0 → 4.29.1

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/lib/client.js CHANGED
@@ -595,7 +595,8 @@ var React36 = __toESM(require("react"), 1);
595
595
  // package.json
596
596
  var package_default = {
597
597
  name: "@xmanrui/dsh-im",
598
- version: "4.29.0",
598
+ version: "4.29.1",
599
+ icon: "./assets/logo-plugin-message-link-gradient.webp",
599
600
  description: "\u628A\u5341\u4E8C\u79CD IM \u6E20\u9053\u548C\u516C\u7F51 AI Office \u63A5\u5165\u672C\u673A DeepSeek Harness\u3002 Connect twelve IM channels and a public AI Office to a local DeepSeek Harness.",
600
601
  keywords: [
601
602
  "deepseek-harness",
package/lib/index.js CHANGED
@@ -136,7 +136,7 @@ Reply with a number for a quick action:
136
136
  **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}
137
137
  **{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","/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:
138
138
  {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 oq={"\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 nq={"/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.","\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 sq={\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 cq={"\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\u5FEB\u6377\u6216\u81EA\u5B9A\u4E49\u8865\u5145\u6307\u4EE4\u3002":"Tasks: stop, compact, 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 Hm={"\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 gq={...Hm,"\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 lq={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 Iq={"\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 dq={"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 pq={"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 hq={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 uq={"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 Eq=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 Cq=Object.freeze(Object.assign({},Um,Fm,Aq,rq,iq,aq,oq,nq,sq,cq,gq,lq,Iq,dq,pq,hq,uq,Eq));var ZI="zh",xm=new Set;function q0(n){let A=typeof n=="string"?n.trim().toLowerCase():"";return A==="english"||/^en(?:[-_].*)?$/u.test(A)?"en":"zh"}function Bq(n){let A=q0(n);if(A===ZI)return ZI;let o=ZI;ZI=A;for(let a of[...xm])if(xm.has(a))try{a(A,o)}catch{}return ZI}function XI(){return ZI}function Km(n){if(typeof n!="function")throw new TypeError("onImHostLanguageChange requires a listener function");return xm.add(n),()=>{xm.delete(n)}}function S(n,A){if(typeof n!="string")return n;let o=ZI==="en"?Cq[n]??n:n;return A==null?o:o.replace(/\{(\w+)\}/g,(a,e)=>Object.hasOwn(A,e)?String(A[e]):a)}var z0=Object.freeze({version:1,bots:Object.freeze([])}),$fe=new Set(["clientId","secretRef","approvedSenders"]);function ys(n){return typeof n=="string"&&n.trim()?n.trim():null}function eye(n){return qfe("sha256").update(n).digest("hex")}function Qq(n){let A=ys(n);return A&&/^dt_[a-f0-9]{24}$/.test(A)?A:null}function tye(n){let A=ys(n);return A&&/^DSH_DINGTALK_BOT_SECRET_[A-F0-9]{24}$/.test(A)?A:null}function Aye(n){let A=ys(n);return A&&/^dt_sender_[a-f0-9]{32}$/.test(A)?A:null}function rye(n){let A=typeof n=="string"?{staffId:n}:n;if(!A||typeof A!="object"||Array.isArray(A))return null;let o=Aye(A.senderKey),a=ys(A.staffId);return!o||!a?null:Object.freeze({senderKey:o,staffId:a,displayName:ys(A.displayName),approvedAt:ys(A.approvedAt)})}function iye(n){if(!Array.isArray(n))return null;let A=n.map(rye);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 jm(n){let A=ys(n);if(!A)throw new TypeError("clientId is required");let o=eye(A).slice(0,24);return Object.freeze({botId:`dt_${o}`,secretRef:`DSH_DINGTALK_BOT_SECRET_${o.toUpperCase()}`})}function mq(){return`dt_sender_${yq().replaceAll("-","")}`}function W0(n){return ys(n)?S("\u8EAB\u4EFD\u5DF2\u9690\u85CF"):S("\u9489\u9489\u7528\u6237")}function V0(n){let A=ys(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 Sq(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=>!$fe.has(r)))return null;let o=ys(n.clientId),a=tye(n.secretRef),e=iye(n.approvedSenders??[]);if(!o||!a||!e)return null;let i=jm(o);return i.secretRef!==a||(n.botId===void 0?i.botId:Qq(n.botId))!==i.botId?null:Object.freeze({botId:i.botId,clientId:o,secretRef:a,approvedSenders:e})}function aye(n){if(!n||n.version!==1||!Array.isArray(n.bots))return null;let A=n.bots.map(i=>Sq(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 oye(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 Ym=class{#e;#t=z0;#A=Promise.resolve();constructor(A){if(!ys(A))throw new TypeError("config path is required");this.#e=A}async load(){try{let A=aye(JSON.parse(await Wfe(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=z0}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=Sq(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(!Qq(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 fq(this.#e)}catch(o){if(o?.code!=="ENOENT")throw o}this.#t=z0});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 zfe(Xfe(this.#e),{recursive:!0,mode:448});let o=`${this.#e}.${process.pid}.${yq()}.tmp`;try{await Zfe(o,`${JSON.stringify(oye(A),null,2)}
139
- `,{encoding:"utf8",flag:"wx",mode:384}),await Vfe(o,this.#e)}catch(a){try{await fq(o)}catch(e){if(e?.code!=="ENOENT")throw new AggregateError([a,e])}throw a}}};var Dq="https://oapi.dingtalk.com",nye="DING_DWS_CLAW";function Qs(n){return typeof n=="string"&&n.trim()?n.trim():null}function wq(n,A){let o=Number(n);return Number.isFinite(o)&&o>0?o:A}function sye(n){let A;try{A=new URL(Qs(n)??Dq)}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 cye(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 gye(n,A){if(!n||typeof n!="object"||Array.isArray(n))throw new ac("invalid-response",`DingTalk ${A} returned an invalid response`,A);if(Number(n.errcode)!==0)throw new ac("api-error",`DingTalk ${A} request was rejected`,A);return n}var ac=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)}},Jm=class{#e;#t;#A;#r;constructor({fetch:A=globalThis.fetch,clock:o=Date,baseUrl:a=Dq,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=sye(a),this.#r=e}async start({signal:A}={}){let o=await this.#a("/app/registration/init",{source:nye},"initialization",A),a=Qs(o.nonce);if(!a)throw new ac("missing-nonce","DingTalk registration initialization did not return a nonce","initialization");let e=await this.#a("/app/registration/begin",{nonce:a},"begin",A),i=Qs(e.device_code),t=Qs(e.verification_uri_complete);if(!i||!t)throw new ac("incomplete-registration","DingTalk registration did not return complete QR metadata","begin");let r=wq(e.expires_in,7200),s=wq(e.interval,5)*1e3;return Object.freeze({deviceCode:i,verificationUrl:t,verificationUri:Qs(e.verification_uri),userCode:Qs(e.user_code),expiresAt:cye(this.#t)+r*1e3,pollIntervalMs:s})}async poll(A){let o=Qs(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=Qs(e.status)?.toUpperCase(),t=["WAITING","SUCCESS","FAIL","EXPIRED"].includes(i)?i:"UNKNOWN";return Object.freeze({status:t,clientId:Qs(e.client_id),clientSecret:Qs(e.client_secret),failReason:Qs(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 ac("timeout",`DingTalk ${a} request timed out`,a,{cause:c,timeoutMs:this.#r}):c?.name==="AbortError"?c:new ac("network-error",`DingTalk ${a} request could not be completed`,a,{cause:c})}if(!i||i.ok===!1||typeof i.json!="function")throw new ac("http-error",`DingTalk ${a} request failed`,a,{status:i?.status});let s;try{s=await i.json()}catch(c){throw new ac("invalid-json",`DingTalk ${a} returned invalid JSON`,a,{cause:c})}return gye(s,a)}};import{randomUUID as Cye}from"node:crypto";var Xp={name:"@xmanrui/dsh-im",version:"4.29.0",description:"\u628A\u5341\u4E8C\u79CD IM \u6E20\u9053\u548C\u516C\u7F51 AI Office \u63A5\u5165\u672C\u673A DeepSeek Harness\u3002 Connect twelve IM channels and a public AI Office to a local DeepSeek Harness.",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)",contributors:[{name:"C3H3-AI",url:"https://github.com/C3H3-AI"},{name:"divingleee",url:"https://github.com/divingleee"},{name:"Chan-0312",url:"https://github.com/Chan-0312"},{name:"BuvkB",url:"https://github.com/BuvkB"},{name:"masucc",url:"https://github.com/masucc"},{name:"cherryFloris",url:"https://github.com/cherryFloris"},{name:"geekyfoxlab",url:"https://github.com/geekyfoxlab"},{name:"grloper",url:"https://github.com/grloper"},{name:"baijian",url:"https://github.com/baijian"},{name:"lyzhu86",url:"https://github.com/lyzhu86"},{name:"Librazy",url:"https://github.com/Librazy"},{name:"Johnslee1207",url:"https://github.com/johnslee1207-commits"},{name:"Dong09",url:"https://github.com/Dong09"},{name:"wings1848",url:"https://github.com/wings1848"},{name:"Zhe (Phil) Yang",url:"https://github.com/yangzhe1991"},{name:"Biertolovisk",url:"https://github.com/rosalynthompson32-a11y"}],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"},files:["assets","bin","cordis.patch.yml","lib","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.1.7-alpha.1",dshReleases:{"0.1.7-alpha.1":"compatible"},profiles:["web"]}},scripts:{build:"node plugin-src/client/build.mjs && node plugin-src/host/build.mjs",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.0"},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.4"}};var Iye=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"]),dye=new Set(["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"]),bq=new Set(["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"]),pye=new Set(["credential-store","account-config","account-state","workspace-config","workspace-directory"]),hye=new Set(["config.json","workspaces.json"]),qm=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"}),uye=/^(?:\$|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 ln(n){if(!n||typeof n!="object"||Array.isArray(n))return{};let A={};for(let[a,e]of[["operation",Iye],["stage",dye],["reason",bq],["resource",pye]])e.has(n[a])&&(A[a]=n[a]);if(Eye.includes(n.channel)&&(A.channel=n.channel),Array.isArray(n.reasons)){let a=[...new Set(n.reasons.filter(e=>bq.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]));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),hye.has(n.file)&&(A.file=n.file),typeof n.field=="string"&&uye.test(n.field)&&(A.field=n.field),typeof n.issue=="string"&&Object.hasOwn(qm,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 Eye=Object.freeze(["weixin","feishu","dingtalk","wecom","qq","slack","telegram","discord","whatsapp","wecom-app","imessage","email","office"]);function El(n){if(!n?.details)return{};let A=ln({...n?.details,referenceId:n?.details?.referenceId??n?.referenceId,hint:n?.details?.hint??n?.hint});return Object.keys(A).length?{details:A}:{}}var SC=new WeakMap,Mq=new WeakMap,Z0=new WeakMap,Bye={"connect-timeout":"timeout","telegram-timeout":"timeout","cli-timeout":"timeout","telegram-response-invalid":"invalid-response","office-protocol-mismatch":"invalid-response"},fye=new Set(["Error","TypeError","SyntaxError","AggregateError","DOMException","AxiosError","TimeoutError","AbortError"]),Oq={"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 zm(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 Dt(n){let{chain:A,truncated:o}=zm(n),a=A.map(s=>({type:fye.has(s.name)?s.name:"Error",...ln({reason:Bye[s.code]??s.code??(s.name==="TimeoutError"?"timeout":s instanceof SyntaxError?"invalid-json":void 0),httpStatus:s.status??s.statusCode??s.response?.status,providerCode:s.providerCode}),hasCause:!!(s.cause&&typeof s.cause=="object"),hasErrors:Array.isArray(s.errors)})),e=[...new Set(a.map(s=>s.reason).filter(s=>s&&!["unknown","multiple-causes"].includes(s)))],i=e.filter(s=>!["timeout","http-error","provider-rejected","invalid-response"].includes(s)),t=i.length?i:e,r=s=>A.map(c=>ln({[s]:c[s]})[s]).find(c=>c!==void 0);return{chain:A,errors:a,details:ln({reason:t.length>1?"multiple-causes":t[0]??"unknown",...t.length>1?{reasons:t}:{},httpStatus:a.find(s=>s.httpStatus!==void 0)?.httpStatus,providerCode:a.find(s=>s.providerCode!==void 0)?.providerCode,durationMs:r("durationMs"),timeoutMs:r("timeoutMs"),host:r("host"),truncated:o})}}async function de(n,A,o){try{return await A()}catch(a){throw wC(a,n,o)}}function wC(n,A,o){return(!n||typeof n!="object")&&(n=new Error("Operation failed")),Z0.has(n)||Z0.set(n,ln({stage:A,resource:o})),n}function X0(n){return zm(n).chain.map(A=>SC.get(A)??Mq.get(A)).find(Boolean)}function PA(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=X0(A)??n.report(A,{...a,publicError:o.error});return{...o,error:a?.untrustedPublicError?e.publicError:{...e.publicError,...o.error,details:e.publicError.details}}}function $0(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 yye(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(SC.has(g))return g;if(l.reuse&&X0(g))return X0(g);let d=Dt(g),u=d.chain.map(v=>SC.get(v)).find(Boolean);if(u)return u;let f=e?.(g,l,d)??{},y=d.chain.find(v=>Object.hasOwn(Oq,v.code??"")),Q=f.publicError??l.publicError??{};y&&!Q.code?.startsWith("stream-")&&(Q={...Q,code:y.code,message:S(Oq[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(v=>Z0.get(v)).find(Boolean)??{},b=ln({...d.details,...l,...Q.details,...f.details,...m,channel:n,stage:m.stage??f.details?.stage??Q.details?.stage??l.stage??yye(l.operation),pluginVersion:Xp.version,nodeVersion:process.versions.node,platform:process.platform}),M=Q.code??l.code??`${n}-operation-failed`,O=f.hint??Q.hint??Q.details?.hint??$0(b),k=S(Q.message)??S("\u64CD\u4F5C\u5931\u8D25\uFF0C\u8BF7\u67E5\u770B\u539F\u56E0\u548C\u8BCA\u65AD\u8BE6\u60C5\u3002"),G=JSON.stringify([l.botId,l.attemptId,b.operation,b.stage,M,b.reason,b.reasons,b.httpStatus,b.providerCode,b.resource,b.file,b.field,b.issue]),R=i.get(G),x=o(),K=v=>{let Y=new Error(v.message,{cause:g});return Y.code=v.code,Y.publicError=structuredClone(v),SC.set(Y,Y),g&&typeof g=="object"&&Mq.set(g,Y),Y};if(l.automatic&&R&&x-R.time<6e4)return R.retries+=1,K(R.publicError);R?.retries&&t("warn",{event:"connection-retries",referenceId:R.publicError.details.referenceId,retries:R.retries}),b.referenceId=ln({referenceId:Q.referenceId}).referenceId??`${a}-${Cye().replaceAll("-","").slice(0,8).toUpperCase()}`,b.occurredAt=new Date(x).toISOString(),b.hint=O;let P={code:M,message:k,details:b};return l.automatic&&(i.size>=128&&i.delete(i.keys().next().value),i.set(G,{time:x,publicError:P,retries:0,botId:l.botId})),t(l.warning?"warn":"error",{event:l.warning?"connection-warning":"connection-failure",code:M,...b,errors:d.errors,...ln({referenceId:l.parentReferenceId}).referenceId?{parentReferenceId:l.parentReferenceId}:{}}),K(P)}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){SC.has(g)&&ln({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 xye}from"node:crypto";var _q=new WeakMap,eR=Symbol("dsh-im.connection-test-state-identity");function Tq(n){return n?.[eR]??n}function Qye(n){return typeof n=="string"&&n.trim()?n.trim():null}function vo(n,A){if(!n||!A||typeof A!="object")return!1;try{return _q.set(Tq(n),structuredClone(A)),!0}catch{return!1}}function DC(n){let A=n?_q.get(Tq(n)):null;return A?structuredClone(A):null}function oi(n,A=S("\u673A\u5668\u4EBA")){let o=Qye(n)??A;return`${S("\u2705 DeepSeek Harness \u8FDE\u63A5\u6D4B\u8BD5\u6210\u529F")}
139
+ `,{encoding:"utf8",flag:"wx",mode:384}),await Vfe(o,this.#e)}catch(a){try{await fq(o)}catch(e){if(e?.code!=="ENOENT")throw new AggregateError([a,e])}throw a}}};var Dq="https://oapi.dingtalk.com",nye="DING_DWS_CLAW";function Qs(n){return typeof n=="string"&&n.trim()?n.trim():null}function wq(n,A){let o=Number(n);return Number.isFinite(o)&&o>0?o:A}function sye(n){let A;try{A=new URL(Qs(n)??Dq)}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 cye(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 gye(n,A){if(!n||typeof n!="object"||Array.isArray(n))throw new ac("invalid-response",`DingTalk ${A} returned an invalid response`,A);if(Number(n.errcode)!==0)throw new ac("api-error",`DingTalk ${A} request was rejected`,A);return n}var ac=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)}},Jm=class{#e;#t;#A;#r;constructor({fetch:A=globalThis.fetch,clock:o=Date,baseUrl:a=Dq,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=sye(a),this.#r=e}async start({signal:A}={}){let o=await this.#a("/app/registration/init",{source:nye},"initialization",A),a=Qs(o.nonce);if(!a)throw new ac("missing-nonce","DingTalk registration initialization did not return a nonce","initialization");let e=await this.#a("/app/registration/begin",{nonce:a},"begin",A),i=Qs(e.device_code),t=Qs(e.verification_uri_complete);if(!i||!t)throw new ac("incomplete-registration","DingTalk registration did not return complete QR metadata","begin");let r=wq(e.expires_in,7200),s=wq(e.interval,5)*1e3;return Object.freeze({deviceCode:i,verificationUrl:t,verificationUri:Qs(e.verification_uri),userCode:Qs(e.user_code),expiresAt:cye(this.#t)+r*1e3,pollIntervalMs:s})}async poll(A){let o=Qs(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=Qs(e.status)?.toUpperCase(),t=["WAITING","SUCCESS","FAIL","EXPIRED"].includes(i)?i:"UNKNOWN";return Object.freeze({status:t,clientId:Qs(e.client_id),clientSecret:Qs(e.client_secret),failReason:Qs(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 ac("timeout",`DingTalk ${a} request timed out`,a,{cause:c,timeoutMs:this.#r}):c?.name==="AbortError"?c:new ac("network-error",`DingTalk ${a} request could not be completed`,a,{cause:c})}if(!i||i.ok===!1||typeof i.json!="function")throw new ac("http-error",`DingTalk ${a} request failed`,a,{status:i?.status});let s;try{s=await i.json()}catch(c){throw new ac("invalid-json",`DingTalk ${a} returned invalid JSON`,a,{cause:c})}return gye(s,a)}};import{randomUUID as Cye}from"node:crypto";var Xp={name:"@xmanrui/dsh-im",version:"4.29.1",icon:"./assets/logo-plugin-message-link-gradient.webp",description:"\u628A\u5341\u4E8C\u79CD IM \u6E20\u9053\u548C\u516C\u7F51 AI Office \u63A5\u5165\u672C\u673A DeepSeek Harness\u3002 Connect twelve IM channels and a public AI Office to a local DeepSeek Harness.",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)",contributors:[{name:"C3H3-AI",url:"https://github.com/C3H3-AI"},{name:"divingleee",url:"https://github.com/divingleee"},{name:"Chan-0312",url:"https://github.com/Chan-0312"},{name:"BuvkB",url:"https://github.com/BuvkB"},{name:"masucc",url:"https://github.com/masucc"},{name:"cherryFloris",url:"https://github.com/cherryFloris"},{name:"geekyfoxlab",url:"https://github.com/geekyfoxlab"},{name:"grloper",url:"https://github.com/grloper"},{name:"baijian",url:"https://github.com/baijian"},{name:"lyzhu86",url:"https://github.com/lyzhu86"},{name:"Librazy",url:"https://github.com/Librazy"},{name:"Johnslee1207",url:"https://github.com/johnslee1207-commits"},{name:"Dong09",url:"https://github.com/Dong09"},{name:"wings1848",url:"https://github.com/wings1848"},{name:"Zhe (Phil) Yang",url:"https://github.com/yangzhe1991"},{name:"Biertolovisk",url:"https://github.com/rosalynthompson32-a11y"}],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"},files:["assets","bin","cordis.patch.yml","lib","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.1.7-alpha.1",dshReleases:{"0.1.7-alpha.1":"compatible"},profiles:["web"]}},scripts:{build:"node plugin-src/client/build.mjs && node plugin-src/host/build.mjs",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.0"},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.4"}};var Iye=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"]),dye=new Set(["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"]),bq=new Set(["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"]),pye=new Set(["credential-store","account-config","account-state","workspace-config","workspace-directory"]),hye=new Set(["config.json","workspaces.json"]),qm=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"}),uye=/^(?:\$|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 ln(n){if(!n||typeof n!="object"||Array.isArray(n))return{};let A={};for(let[a,e]of[["operation",Iye],["stage",dye],["reason",bq],["resource",pye]])e.has(n[a])&&(A[a]=n[a]);if(Eye.includes(n.channel)&&(A.channel=n.channel),Array.isArray(n.reasons)){let a=[...new Set(n.reasons.filter(e=>bq.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]));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),hye.has(n.file)&&(A.file=n.file),typeof n.field=="string"&&uye.test(n.field)&&(A.field=n.field),typeof n.issue=="string"&&Object.hasOwn(qm,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 Eye=Object.freeze(["weixin","feishu","dingtalk","wecom","qq","slack","telegram","discord","whatsapp","wecom-app","imessage","email","office"]);function El(n){if(!n?.details)return{};let A=ln({...n?.details,referenceId:n?.details?.referenceId??n?.referenceId,hint:n?.details?.hint??n?.hint});return Object.keys(A).length?{details:A}:{}}var SC=new WeakMap,Mq=new WeakMap,Z0=new WeakMap,Bye={"connect-timeout":"timeout","telegram-timeout":"timeout","cli-timeout":"timeout","telegram-response-invalid":"invalid-response","office-protocol-mismatch":"invalid-response"},fye=new Set(["Error","TypeError","SyntaxError","AggregateError","DOMException","AxiosError","TimeoutError","AbortError"]),Oq={"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 zm(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 Dt(n){let{chain:A,truncated:o}=zm(n),a=A.map(s=>({type:fye.has(s.name)?s.name:"Error",...ln({reason:Bye[s.code]??s.code??(s.name==="TimeoutError"?"timeout":s instanceof SyntaxError?"invalid-json":void 0),httpStatus:s.status??s.statusCode??s.response?.status,providerCode:s.providerCode}),hasCause:!!(s.cause&&typeof s.cause=="object"),hasErrors:Array.isArray(s.errors)})),e=[...new Set(a.map(s=>s.reason).filter(s=>s&&!["unknown","multiple-causes"].includes(s)))],i=e.filter(s=>!["timeout","http-error","provider-rejected","invalid-response"].includes(s)),t=i.length?i:e,r=s=>A.map(c=>ln({[s]:c[s]})[s]).find(c=>c!==void 0);return{chain:A,errors:a,details:ln({reason:t.length>1?"multiple-causes":t[0]??"unknown",...t.length>1?{reasons:t}:{},httpStatus:a.find(s=>s.httpStatus!==void 0)?.httpStatus,providerCode:a.find(s=>s.providerCode!==void 0)?.providerCode,durationMs:r("durationMs"),timeoutMs:r("timeoutMs"),host:r("host"),truncated:o})}}async function de(n,A,o){try{return await A()}catch(a){throw wC(a,n,o)}}function wC(n,A,o){return(!n||typeof n!="object")&&(n=new Error("Operation failed")),Z0.has(n)||Z0.set(n,ln({stage:A,resource:o})),n}function X0(n){return zm(n).chain.map(A=>SC.get(A)??Mq.get(A)).find(Boolean)}function PA(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=X0(A)??n.report(A,{...a,publicError:o.error});return{...o,error:a?.untrustedPublicError?e.publicError:{...e.publicError,...o.error,details:e.publicError.details}}}function $0(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 yye(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(SC.has(g))return g;if(l.reuse&&X0(g))return X0(g);let d=Dt(g),u=d.chain.map(v=>SC.get(v)).find(Boolean);if(u)return u;let f=e?.(g,l,d)??{},y=d.chain.find(v=>Object.hasOwn(Oq,v.code??"")),Q=f.publicError??l.publicError??{};y&&!Q.code?.startsWith("stream-")&&(Q={...Q,code:y.code,message:S(Oq[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(v=>Z0.get(v)).find(Boolean)??{},b=ln({...d.details,...l,...Q.details,...f.details,...m,channel:n,stage:m.stage??f.details?.stage??Q.details?.stage??l.stage??yye(l.operation),pluginVersion:Xp.version,nodeVersion:process.versions.node,platform:process.platform}),M=Q.code??l.code??`${n}-operation-failed`,O=f.hint??Q.hint??Q.details?.hint??$0(b),k=S(Q.message)??S("\u64CD\u4F5C\u5931\u8D25\uFF0C\u8BF7\u67E5\u770B\u539F\u56E0\u548C\u8BCA\u65AD\u8BE6\u60C5\u3002"),G=JSON.stringify([l.botId,l.attemptId,b.operation,b.stage,M,b.reason,b.reasons,b.httpStatus,b.providerCode,b.resource,b.file,b.field,b.issue]),R=i.get(G),x=o(),K=v=>{let Y=new Error(v.message,{cause:g});return Y.code=v.code,Y.publicError=structuredClone(v),SC.set(Y,Y),g&&typeof g=="object"&&Mq.set(g,Y),Y};if(l.automatic&&R&&x-R.time<6e4)return R.retries+=1,K(R.publicError);R?.retries&&t("warn",{event:"connection-retries",referenceId:R.publicError.details.referenceId,retries:R.retries}),b.referenceId=ln({referenceId:Q.referenceId}).referenceId??`${a}-${Cye().replaceAll("-","").slice(0,8).toUpperCase()}`,b.occurredAt=new Date(x).toISOString(),b.hint=O;let P={code:M,message:k,details:b};return l.automatic&&(i.size>=128&&i.delete(i.keys().next().value),i.set(G,{time:x,publicError:P,retries:0,botId:l.botId})),t(l.warning?"warn":"error",{event:l.warning?"connection-warning":"connection-failure",code:M,...b,errors:d.errors,...ln({referenceId:l.parentReferenceId}).referenceId?{parentReferenceId:l.parentReferenceId}:{}}),K(P)}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){SC.has(g)&&ln({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 xye}from"node:crypto";var _q=new WeakMap,eR=Symbol("dsh-im.connection-test-state-identity");function Tq(n){return n?.[eR]??n}function Qye(n){return typeof n=="string"&&n.trim()?n.trim():null}function vo(n,A){if(!n||!A||typeof A!="object")return!1;try{return _q.set(Tq(n),structuredClone(A)),!0}catch{return!1}}function DC(n){let A=n?_q.get(Tq(n)):null;return A?structuredClone(A):null}function oi(n,A=S("\u673A\u5668\u4EBA")){let o=Qye(n)??A;return`${S("\u2705 DeepSeek Harness \u8FDE\u63A5\u6D4B\u8BD5\u6210\u529F")}
140
140
  ${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 tr(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 Po({state:n,send:A,text:o,channelLabel:a}){let e=DC(n);if(!e)throw tr(a);return await A(e,o),{sent:!0}}function KA(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 mye}from"node:crypto";var Sye=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"}),wye=Object.freeze({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:"\u4EFB\u52A1\u6B63\u5728\u7B49\u5F85\u65E0\u6CD5\u5728\u5F53\u524D\u6E20\u9053\u5B8C\u6210\u7684\u64CD\u4F5C\u3002\u8BF7\u5728 DeepSeek Harness \u4E2D\u5904\u7406\u540E\u518D\u8BD5\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_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",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 Dye(n){if(n?.code!=="harness-turn-failed")return null;let A=n?.providerCode??n?.details?.providerCode;return typeof A!="string"?null:Sye[A.trim().toUpperCase()]??null}function bye(n){let A=typeof n?.code=="string"?n.code:"",o=Dye(n);if(o)return o;if(A==="harness-connect-failed")return["session.prompt","session.history"].includes(n?.method)?"HARNESS_RESULT_UNCERTAIN":"HARNESS_CONNECT";if(A==="harness-timeout")return["session.prompt","session.history"].includes(n?.method)?"HARNESS_RESULT_UNCERTAIN":"HARNESS_TIMEOUT";if(A==="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(A))return"HARNESS_ACCESS";if(["harness-api-not-found","harness-response-invalid"].includes(A))return"HARNESS_PROTOCOL";if(A==="harness-turn-failed")return"INTERNAL_UNKNOWN";if(["harness-http-failed","harness-rpc-rejected"].includes(A))return"HARNESS_SERVICE";if(A==="model-unavailable"||A==="session/model-unavailable")return"MODEL_UNAVAILABLE";if(A==="model-empty-response")return"MODEL_EMPTY_REPLY";if(A==="model-max-tokens")return"MODEL_OUTPUT_LIMIT";if(A==="turn-blocked")return"TURN_BLOCKED";if(["turn-interrupted","turn-aborted"].includes(A))return"TURN_INTERRUPTED";if(A==="session-not-found")return"SESSION_NOT_FOUND";if(A==="agent-busy")return"SESSION_BUSY";if(A==="workspace-session-stale")return"SESSION_STALE";if(A.startsWith("workspace-"))return"WORKSPACE_UNAVAILABLE";if(/^agent-preset[-/]/u.test(A))return"PRESET_UNAVAILABLE";if(A.startsWith("image-")||A.startsWith("inbound-file-")||A==="attachment-error")return"INPUT_INVALID";let a=Number(n?.status??n?.httpStatus);return a===401||a===403||["channel-permission","permission-required","artifact-permission-required","forbidden","stale-token"].includes(A)?"CHANNEL_PERMISSION":a===429||["channel-rate-limit","rate-limited","artifact-rate-limited"].includes(A)?"CHANNEL_RATE_LIMIT":["channel-delivery-uncertain","delivery-uncertain","artifact-delivery-uncertain"].includes(A)?"CHANNEL_DELIVERY_UNCERTAIN":A==="channel-delivery-failed"||A.startsWith("artifact-")||["network-error","timeout"].includes(A)?"CHANNEL_DELIVERY":"INTERNAL_UNKNOWN"}function Oye(n){return typeof n=="string"&&/^[A-Z0-9-]{6,40}$/u.test(n)?n:`MF-${mye().slice(0,8).toUpperCase()}`}function Nq(n){return typeof n!="string"||!/^[A-Za-z0-9_/-]{1,64}$/u.test(n)?null:n.toUpperCase().replace(/[-/]/gu,"_")}function Mye(n,{userMessage:A,reason:o,referenceId:a,at:e=Date.now()}={}){let i=Nq(o),t=bye(n),r=t==="INTERNAL_UNKNOWN"&&i&&typeof A=="string"&&A.trim()?"INPUT_INVALID":t,s=Dt(n).details;return Object.freeze({...r==="INTERNAL_UNKNOWN"||s.reason!=="unknown"||s.httpStatus||s.providerCode?{details:s}:{},code:r,reason:i??Nq(n?.code)??r,message:typeof A=="string"&&A.trim()?A.trim():S(wye[r]),referenceId:Oye(a),at:Number.isFinite(e)?e:Date.now()})}function rA(n){return`${n.message}
141
141
 
142
142
  ${S("\u9519\u8BEF\u7801\uFF1A{code}\uFF1B\u53C2\u8003\u53F7\uFF1A{referenceId}",n)}`}function Or(n,A){let o=Dt(n);return{code:A.code,reason:A.reason,referenceId:A.referenceId,details:o.details,errors:o.errors}}function Rt(n,A,o){let a=Mye(A,o);return n.lastMessageError=a,n.lastError=a.message,a}function Ma(n){n.lastMessageError=null}function Mr(n,{uncertain:A=!0}={}){let o=new Error("Channel message delivery failed",{cause:n}),a=Number(n?.status??n?.httpStatus);return o.code=a===401||a===403?"channel-permission":a===429?"channel-rate-limit":A?"channel-delivery-uncertain":"channel-delivery-failed",Number.isInteger(a)&&(o.status=a),o}function Lr(n){return!n||typeof n!="object"||typeof n.code!="string"||!n.code||typeof n.reason!="string"||!n.reason||typeof n.message!="string"||!n.message||typeof n.referenceId!="string"||!n.referenceId||!Number.isFinite(n.at)?null:{code:n.code.slice(0,64),reason:n.reason.slice(0,64),message:n.message.slice(0,500),referenceId:n.referenceId.slice(0,40),at:n.at,...n.details?El(n):{}}}import{randomUUID as _ye}from"node:crypto";import{createRequire as Rq}from"node:module";var Tye=Rq(import.meta.url),tR=new Set(["dingtalk-harness-connect-failed","dingtalk-runtime-prepare-failed","dingtalk-stream-client-load-failed","dingtalk-stream-listener-failed","dingtalk-stream-connect-failed"]),Nye=Object.freeze(["HTTPS_PROXY","https_proxy","HTTP_PROXY","http_proxy","ALL_PROXY","all_proxy"]),Rye=/^\d+\.\d+\.\d+(?:[-+][A-Za-z0-9.-]+)?$/,kye=/^DT-CONN-[A-F0-9]{8}$/,Wm;function oc(n,A=500){if(typeof n!="string")return null;let o=n.trim();return o?o.slice(0,A):null}function $p(n){let A=oc(n,80);return A&&Rye.test(A)?A:null}function Vm(n,A=Tye){try{let o=A.resolve(`${n}/package.json`);return{version:$p(A(o)?.version),require:Rq(o)}}catch{return null}}function vye(){if(Wm)return Wm;let n=Vm("dingtalk-stream"),A=n?Vm("axios",n.require):null,o=A?Vm("https-proxy-agent",A.require):null,a=o?Vm("agent-base",o.require):null;return Wm=Object.freeze({dingtalkStream:n?.version??null,axios:A?.version??null,httpsProxyAgent:o?.version??null,agentBase:a?.version??null}),Wm}function Pye(n){return zm(n).chain}function kq(n){return Number.isInteger(n?.status)?n.status:Number.isInteger(n?.statusCode)?n.statusCode:Number.isInteger(n?.response?.status)?n.response.status:null}function Lye(n){let A=oc(n?.providerCode??n?.response?.data?.code??n?.response?.data?.errorCode??n?.response?.data?.errcode,100);return A&&/^[A-Za-z0-9_.:-]+$/.test(A)?A:null}function Gye(n,A){let o=oc(n);if(!o)return null;for(let a of A){let e=oc(a,2048);e&&e.length>=4&&(o=o.replaceAll(e,"\u2022\u2022\u2022\u2022"))}return o.replace(/(https?:\/\/)[^/\s@]+@/giu,"$1\u2022\u2022\u2022\u2022@").replace(/([?&](?:appsecret|client_secret|clientsecret|access_token|token|password)=)[^&\s]*/giu,"$1\u2022\u2022\u2022\u2022").replace(/((?:app|client|access)[_-]?secret|authorization|password|token)\s*[=:]\s*[^\s,;,。]+/giu,"$1=\u2022\u2022\u2022\u2022").replace(/\b[A-Za-z0-9_.-]*secret[A-Za-z0-9_.-]*\b/giu,"\u2022\u2022\u2022\u2022").slice(0,500)}function Fye(n){let A=n&&typeof n=="object"?n:{};return{dingtalkStream:$p(A.dingtalkStream),axios:$p(A.axios),httpsProxyAgent:$p(A.httpsProxyAgent),agentBase:$p(A.agentBase)}}function Uye(n,A){return n.map(o=>{let a=oc(o?.name,80),e=oc(o?.code,100),i=kq(o),t=Lye(o),r=Gye(o?.message,A);return{...a?{name:a}:{},...e?{code:e}:{},...i!==null?{status:i}:{},...t?{providerCode:t}:{},...r?{message:r}:{}}})}function Hye(n){return kye.test(n??"")?n:`DT-CONN-${_ye().replaceAll("-","").slice(0,8).toUpperCase()}`}function Rn(n,A,o,a){return Object.freeze({code:n,message:S(A),hint:S(o),referenceId:a})}function eh(n,A){if(A?.name==="AbortError"||tR.has(A?.code))return A;let o=new Error(oc(A?.message)??"DingTalk runtime startup failed",{cause:A});return o.name="DingtalkRuntimeStartError",o.code=tR.has(n)?n:"dingtalk-runtime-prepare-failed",wC(o,{"dingtalk-harness-connect-failed":"harness.check","dingtalk-runtime-prepare-failed":"runtime.prepare","dingtalk-stream-client-load-failed":"sdk.load","dingtalk-stream-listener-failed":"runtime.prepare","dingtalk-stream-connect-failed":"connection.start"}[o.code])}function vq(n,{fallbackMessage:A="\u9489\u9489\u8FDE\u63A5\u672A\u5C31\u7EEA\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002",clientId:o,clientSecret:a,environment:e=process.env,dependencies:i=vye(),nodeVersion:t=process.versions.node,referenceId:r}={}){let s=Hye(r),c=Pye(n),g=new Set(c.map(k=>oc(k?.code,100)?.toUpperCase()).filter(Boolean)),l=c.map(k=>oc(k?.message)?.toLowerCase()).filter(Boolean),d=c.map(kq).filter(k=>k!==null),u=c.map(k=>k?.code).find(k=>tR.has(k))??null,f=Nye.filter(k=>oc(e?.[k],4096)),y=f.length>0,Q=Fye(i),m=k=>l.some(G=>k.test(G)),b=k=>[...g].some(G=>k.test(G)),M=d.includes(407)||b(/(?:PROXY|ERR_INVALID_PROTOCOL)/u)||m(/proxy|tunneling socket/u),O;return u==="dingtalk-stream-connect-failed"&&y&&Q.agentBase==="6.0.0"?O=Rn("stream-proxy-dependency-incompatible","\u9489\u9489 Stream \u8FDE\u63A5\u5931\u8D25\uFF1A\u68C0\u6D4B\u5230\u4EE3\u7406\u4F9D\u8D56 agent-base 6.0.0\u3002","\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",s):u==="dingtalk-harness-connect-failed"?O=Rn("harness-unavailable","\u63D2\u4EF6\u65E0\u6CD5\u8FDE\u63A5\u672C\u673A Harness\u3002","\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",s):u==="dingtalk-stream-client-load-failed"?O=Rn("stream-sdk-load-failed","\u9489\u9489 Stream SDK \u52A0\u8F7D\u5931\u8D25\u3002","\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",s):d.some(k=>k===401||k===403)?O=Rn("stream-credentials-rejected","\u9489\u9489\u62D2\u7EDD\u4E86\u5F53\u524D\u5E94\u7528\u51ED\u636E\u3002","\u8BF7\u6838\u5BF9 Client ID\u3001Client Secret \u548C\u673A\u5668\u4EBA\u6743\u9650\u540E\u91CD\u8BD5\u3002",s):b(/(?:TIMEOUT|ETIMEDOUT)/u)||m(/timed? out|timeout/u)?O=Rn("stream-handshake-timeout","\u8FDE\u63A5\u9489\u9489 Stream \u8D85\u65F6\u3002","\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",s):b(/^(?:ENOTFOUND|EAI_AGAIN)$/u)?O=Rn("stream-dns-failed","\u65E0\u6CD5\u89E3\u6790\u9489\u9489\u670D\u52A1\u5730\u5740\u3002","\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",s):b(/(?:CERT|TLS|SSL|UNABLE_TO_VERIFY)/u)?O=Rn("stream-tls-failed","\u9489\u9489 Stream \u7684 TLS \u8FDE\u63A5\u6821\u9A8C\u5931\u8D25\u3002","\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",s):u==="dingtalk-stream-connect-failed"&&M?O=Rn("stream-proxy-failed","\u9489\u9489 Stream \u65E0\u6CD5\u901A\u8FC7\u5F53\u524D\u4EE3\u7406\u5EFA\u7ACB\u8FDE\u63A5\u3002","\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",s):u==="dingtalk-stream-connect-failed"?O=Rn("stream-connect-failed","\u9489\u9489 Stream \u6D88\u606F\u8FDE\u63A5\u5EFA\u7ACB\u5931\u8D25\u3002","\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",s):u==="dingtalk-stream-listener-failed"?O=Rn("stream-listener-failed","\u9489\u9489 Stream \u6D88\u606F\u76D1\u542C\u521D\u59CB\u5316\u5931\u8D25\u3002","\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",s):u==="dingtalk-runtime-prepare-failed"?O=Rn("runtime-prepare-failed","\u9489\u9489\u673A\u5668\u4EBA\u8FD0\u884C\u73AF\u5883\u521D\u59CB\u5316\u5931\u8D25\u3002","\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",s):O=Rn("connection-failed",A,"\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",s),Object.freeze({publicError:O,diagnostic:Object.freeze({referenceId:s,category:O.code,stage:u,runtime:{node:$p(t)},proxy:{configured:y,variables:f},dependencies:Q,errors:Uye(c,[o,a])})})}function AR(n,A){let o=new Error(n.message,{cause:A});return o.name="DingtalkPublicConnectionError",o.code=n.code,o.publicError=structuredClone(n),o}var Pq=new Set(["starting","pending","connecting"]),Zm=new Set(["connected","expired","failed","cancelled"]);function Zi(n){return typeof n=="string"&&n.trim()?n.trim():null}function Cl(n,A){return Object.freeze({code:n,message:A})}function Fq(n){return typeof n?.now=="function"?n.now():n()}function Kye(n){return new Date(Fq(n)).toISOString()}function Bl(){return new DOMException("DingTalk provisioning was cancelled","AbortError")}function $I(n){return n?{attemptId:n.id,status:n.state,...n.verificationUrl?{verificationUrl:n.verificationUrl}:{},...n.expiresAt?{expiresAt:n.expiresAt}:{},...n.pollIntervalMs?{pollIntervalMs:n.pollIntervalMs}:{},...n.botId?{botId:n.botId}:{},...n.alreadyConnected?{alreadyConnected:!0}:{},...n.error?{error:structuredClone(n.error)}:{}}:null}function rR(n){if(!n)return{};let A=typeof n.status=="function"?n.status():n.status;return A&&typeof A=="object"&&!Array.isArray(A)?A:{}}function Lq(n,A){if(!n||A.connected===!1||A.ready===!1)return!1;let o=Zi(A.dingtalkStreamState??A.dingtalkConnectionState??A.connectionState??A.state)?.toLowerCase();return["failed","error","offline","disconnected","stopped"].includes(o)?!1:A.connected===!0||A.ready===!0||o==="connected"||o==="ready"}function Uq(n){if(!n||typeof n!="object"||Array.isArray(n))return null;let A=Zi(n.staffId??n.senderStaffId??n.senderId);if(!A)return null;let o=Zi(n.requestId),a=o&&/^ding_sender_[A-Za-z0-9_-]{1,100}$/.test(o)&&!o.includes(A)?o:null;return a?{requestId:a,staffId:A,displayName:Zi(n.displayName??n.senderName??n.senderNick)??S("\u9489\u9489\u7528\u6237"),requestedAt:Zi(n.requestedAt)}:null}function Gq(n){if(!Array.isArray(n.pendingSenders))return[];let A=new Set,o=[];for(let a of n.pendingSenders){let e=Uq(a);!e||A.has(e.staffId)||(A.add(e.staffId),o.push(e))}return o}function Yye(n){return{requestId:n.requestId,displayName:n.displayName,senderIdMasked:W0(n.staffId),requestedAt:n.requestedAt}}function jye(n){return{senderKey:n.senderKey,displayName:Zi(n.displayName)??S("\u9489\u9489\u7528\u6237"),senderIdMasked:W0(n.staffId),approvedAt:Zi(n.approvedAt)}}var bC=class{#e;#t;#A;#r;#a;#l;#c;#o;#i=new Map;#s=new Map;#I=new Map;#d=null;#n=new Map;#g=0;#p=!1;constructor({deviceAuth:A,credentials:o,configStore:a,createRuntime:e,deleteState:i=async()=>{},logger:t=console,clock:r=Date}){if(!A||typeof A.start!="function"||typeof A.poll!="function")throw new TypeError("DingtalkController requires a DingTalk device auth client");if(!o||typeof o.resolve!="function"||typeof o.set!="function"||typeof o.unset!="function")throw new TypeError("DingtalkController requires the DSH credential provider");if(!a||typeof a.list!="function"||typeof a.get!="function"||typeof a.getByClientId!="function"||typeof a.save!="function"||typeof a.remove!="function")throw new TypeError("DingtalkController requires a loaded config store");if(typeof e!="function")throw new TypeError("createRuntime is required");if(typeof i!="function")throw new TypeError("deleteState must be a function");if(typeof r!="function"&&typeof r?.now!="function")throw new TypeError("clock must be a function or expose now()");this.#e=A,this.#t=o,this.#A=a,this.#r=e,this.#a=i,this.#l=t,this.#c=st({channel:"dingtalk",prefix:"DT-CONN",logger:t}),this.#o=r}get diagnostics(){return this.#c}#h(A,o,a){let e=o.startsWith("poll-")?"qr.poll":o==="activation-failed"?"activation":"qr.begin";return this.#c.report(A,{reuse:!0,stage:e,publicError:{code:o,message:a}}).publicError}async initialize(){if(this.#p)return this.status();for(let A of this.#A.list()){let o=this.#i.get(A.botId);try{if(Lq(o,rR(o)))continue}catch{}await this.#_(A.botId,async()=>{let a=this.#A.get(A.botId);if(!a||this.#p)return;let e;try{if(e=await this.#S(a.secretRef),!e){this.#s.set(a.botId,Cl("missing-secret",S("\u9489\u9489\u673A\u5668\u4EBA\u51ED\u636E\u7F3A\u5931\uFF0C\u8BF7\u79FB\u9664\u540E\u91CD\u65B0\u626B\u7801\u3002"))),this.#M();return}await this.#f(a,e),this.#s.delete(a.botId)}catch(i){this.#B({config:a,clientSecret:e,error:i,fallbackMessage:"\u9489\u9489\u8FDE\u63A5\u672A\u5C31\u7EEA\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002",context:`bot ${a.botId} failed to initialize`})}this.#M()})}return this.status()}async startProvisioning({signal:A}={}){if(this.#p)throw new Error("dsh-dingtalk controller is closed");this.#d&&await this.cancelProvisioning(this.#d);let o={id:xye(),state:"starting",controller:new AbortController,deviceCode:null,verificationUrl:null,expiresAt:null,pollIntervalMs:null,pollTask:null,botId:null,alreadyConnected:!1,error:null};this.#I.set(o.id,o),this.#d=o.id,this.#M();let a=()=>o.controller.abort(A?.reason);A?.aborted?a():A?.addEventListener("abort",a,{once:!0});try{let e=await this.#e.start({signal:o.controller.signal});if(this.#O(o),o.deviceCode=Zi(e.deviceCode),o.verificationUrl=Zi(e.verificationUrl),o.expiresAt=Number(e.expiresAt),o.pollIntervalMs=Number(e.pollIntervalMs),!o.deviceCode||!o.verificationUrl||!Number.isFinite(o.expiresAt)||!Number.isFinite(o.pollIntervalMs)||o.pollIntervalMs<=0)throw new Error("DingTalk device auth returned incomplete registration metadata");return o.state="pending",this.#M(),$I(o)}catch(e){if(o.controller.signal.aborted||e?.name==="AbortError"?(o.state="cancelled",o.error=Cl("cancelled",S("\u626B\u7801\u63A5\u5165\u5DF2\u53D6\u6D88\u3002"))):(o.state="failed",o.error=this.#h(e,"qr-start-failed",S("\u65E0\u6CD5\u751F\u6210\u9489\u9489\u4E8C\u7EF4\u7801\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002"))),this.#d===o.id&&(this.#d=null),this.#M(),o.state==="failed")throw e;return $I(o)}finally{A?.removeEventListener("abort",a)}}async bindCredentials({clientId:A,clientSecret:o}={}){if(this.#p)throw new Error("dsh-dingtalk controller is closed");let a=Zi(A),e=Zi(o);if(!a||!e)throw new TypeError("DingTalk Client ID and Client Secret are required");if(this.#d&&await this.cancelProvisioning(this.#d),this.#p)throw new Error("dsh-dingtalk controller is closed");let i=jm(a);return await this.#_(i.botId,async()=>{if(this.#p)throw Bl();let t=this.#A.getByClientId(a),r=await de("credential.read",()=>this.#t.resolve(i.secretRef),"credential-store");if(this.#p)throw Bl();let s={botId:i.botId,clientId:a,secretRef:i.secretRef,approvedSenders:t?.approvedSenders??[]};await de("credential.save",()=>this.#t.set(i.secretRef,e),"credential-store");try{await de("account.save",()=>this.#A.save(s),"account-config")}catch(c){throw await this.#b(i.secretRef,r),c}try{await this.#f(s,e),this.#s.delete(i.botId)}catch(c){this.#B({config:s,clientSecret:e,error:c,fallbackMessage:"\u9489\u9489\u5DF2\u63A5\u5165\uFF0C\u4F46\u6D88\u606F\u8FDE\u63A5\u6682\u672A\u5C31\u7EEA\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002",context:`credential-bound bot ${i.botId} is not ready`})}this.#M()}),this.status()}async registrationStatus(A){let o=this.#I.get(A);if(!o)return null;if(Zm.has(o.state)||o.state==="starting")return $I(o);if(Fq(this.#o)>=o.expiresAt)return o.state="expired",o.error=Cl("expired",S("\u4E8C\u7EF4\u7801\u5DF2\u8FC7\u671F\uFF0C\u8BF7\u91CD\u65B0\u751F\u6210\u3002")),this.#d===o.id&&(this.#d=null),this.#M(),$I(o);if(!o.pollTask){let a=this.#u(o).finally(()=>{o.pollTask===a&&(o.pollTask=null)});o.pollTask=a}return await o.pollTask,$I(o)}async cancelProvisioning(A){let o=this.#I.get(A);return o?(Zm.has(o.state)||(o.controller.abort(),await o.pollTask?.catch(()=>{}),Zm.has(o.state)||(o.state="cancelled"),o.error??=Cl("cancelled",S("\u626B\u7801\u63A5\u5165\u5DF2\u53D6\u6D88\u3002"))),this.#d===o.id&&(this.#d=null),this.#M(),$I(o)):null}async reconnectBot(A){let o=this.#A.get(A);if(!o)throw new Error("Unknown DingTalk bot");return await this.#_(A,async()=>{let a=await this.#S(o.secretRef);if(!a)throw new Error("The DingTalk client secret is missing");try{await this.#f(o,a),this.#s.delete(A)}catch(e){let i=this.#B({config:o,clientSecret:a,error:e,fallbackMessage:"\u9489\u9489\u8FDE\u63A5\u4ECD\u672A\u5C31\u7EEA\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002",context:`bot ${A} failed to reconnect`});throw AR(i,e)}finally{this.#M()}}),this.status()}async sendConnectionTest(A){let o=this.#A.get(A);if(!o)throw new Error("Unknown DingTalk bot");return this.#_(A,async()=>{let a=this.#i.get(A);if(!a?.status?.ready||typeof a.sendConnectionTest!="function")throw tr(S("\u9489\u9489\u673A\u5668\u4EBA"));return a.sendConnectionTest(oi(S("\u9489\u9489\u673A\u5668\u4EBA\uFF08{clientId}\uFF09",{clientId:V0(o.clientId)})))})}async sendProactiveText(A,o,a,e={}){if(!this.#A.get(A))throw new Error("Unknown DingTalk bot");return this.#_(A,async()=>{let t=this.#i.get(A);if(!t?.status?.ready||typeof t.sendProactiveText!="function"){let r=new Error(S("\u9489\u9489\u6D88\u606F\u8FDE\u63A5\u5F53\u524D\u79BB\u7EBF"));throw r.code="bot-not-connected",r}return t.sendProactiveText(o,a,e)})}async deleteBot(A){let o=[],a=this.#A.get(A);if(!a)throw new Error("Unknown DingTalk bot");return await this.#_(A,async()=>{let e=await de("credential.read",()=>this.#t.resolve(a.secretRef),"credential-store");await this.#y(A);try{await de("credential.remove",()=>this.#t.unset(a.secretRef),"credential-store"),await de("account.remove",()=>this.#A.remove(A),"account-config")}catch(i){if(!this.#A.get(A))o.push(this.#c.report(i,{operation:"bot.delete",stage:"workspace.cleanup",warning:!0,publicError:{code:"workspace-cleanup-failed",message:"\u8D26\u53F7\u5DF2\u79FB\u9664\uFF0C\u4F46\u672C\u5730\u72B6\u6001\u6E05\u7406\u5931\u8D25\u3002"}}).publicError);else throw Zi(e?.value)&&(await de("credential.save",()=>this.#t.set(a.secretRef,e.value),"credential-store").catch(()=>{}),await this.#f(a,e.value).catch(()=>{})),new Error("Unable to remove the DingTalk bot safely.",{cause:i})}try{await this.#a({botId:A,config:a})}catch(i){o.push(this.#c.report(i,{reuse:!0,operation:"bot.delete",stage:"state.cleanup",warning:!0,publicError:{code:"cleanup-failed",message:"\u8D26\u53F7\u5DF2\u79FB\u9664\uFF0C\u4F46\u672C\u5730\u72B6\u6001\u6E05\u7406\u5931\u8D25\u3002"}}).publicError)}this.#s.delete(A),this.#M()}),{...this.status(),...o.length?{warnings:o}:{}}}async approveSender(A,o){let a=this.#A.get(A);if(!a)throw new Error("Unknown DingTalk bot");let e=this.#i.get(A),i=typeof e?.pendingSender=="function"?Uq(e.pendingSender(o)):null,t=Gq(rR(e)),r=i?.requestId===o?i:t.find(c=>c.requestId===o);if(!r)throw new Error("Unknown DingTalk sender approval request");if(a.approvedSenders.some(c=>c.staffId===r.staffId))return this.status();let s={...a,approvedSenders:[...a.approvedSenders,{senderKey:mq(),staffId:r.staffId,displayName:r.displayName,approvedAt:Kye(this.#o)}]};return await this.#E(a,s),this.status()}async revokeSender(A,o){let a=this.#A.get(A);if(!a)throw new Error("Unknown DingTalk bot");let e=a.approvedSenders.findIndex(t=>t.senderKey===o);if(e===-1)throw new Error("Unknown approved DingTalk sender");let i=[...a.approvedSenders];return i.splice(e,1),await this.#E(a,{...a,approvedSenders:i}),this.status()}status(){let A=this.#A.list().map(e=>{let i=this.#i.get(e.botId),t={};try{t=rR(i)}catch{t={state:"error"}}let r=Lq(i,t),s=t.error??this.#s.get(e.botId),c=r?"connected":s?"error":"offline",g=new Set(e.approvedSenders.map(d=>d.staffId)),l=Gq(t).filter(d=>!g.has(d.staffId)).map(Yye);return{botId:e.botId,state:c,connected:r,configured:!0,bot:{name:S("\u9489\u9489\u673A\u5668\u4EBA"),clientIdMasked:V0(e.clientId)},health:{status:r?"healthy":s?"error":"offline",summary:r?S("\u9489\u9489 Stream \u6D88\u606F\u8FDE\u63A5\u8FD0\u884C\u6B63\u5E38"):s?.message??S("\u9489\u9489\u6D88\u606F\u8FDE\u63A5\u5F53\u524D\u79BB\u7EBF"),lastCheckedAt:t.lastCheckedAt??null},stats:{messagesReceived:Number(t.messagesReceived)||0,messagesReplied:Number(t.messagesReplied)||0},lastMessageError:Lr(t.lastMessageError),senders:{pending:l,approved:e.approvedSenders.map(jye)},error:s?structuredClone(s):null}}),o=A.filter(e=>e.connected).length,a=this.#d?this.#I.get(this.#d):null;return{schemaVersion:1,revision:this.#g,state:a&&Pq.has(a.state)?"provisioning":A.length===0?"disconnected":o===A.length?"connected":o>0?"degraded":"offline",bots:A,totals:{configured:A.length,connected:o},...a&&Pq.has(a.state)?{provisioning:$I(a)}:{}}}async close(){this.#p||(this.#p=!0,this.#d&&await this.cancelProvisioning(this.#d),await Promise.allSettled([...this.#i.keys()].map(A=>this.#y(A))),await Promise.allSettled([...this.#n.values()]),await Promise.allSettled([...this.#i.keys()].map(A=>this.#y(A))))}async#u(A){try{this.#O(A);let o=await this.#e.poll({deviceCode:A.deviceCode,signal:A.controller.signal});this.#O(A);let a=Zi(o.status)?.toUpperCase();if(a==="WAITING")A.state="pending",A.error=null;else if(a==="SUCCESS"){let e=Zi(o.clientId),i=Zi(o.clientSecret);if(!e||!i)throw new Error("DingTalk returned incomplete credentials");A.state="connecting",A.error=null,this.#M();let t=await this.#C(A,{clientId:e,clientSecret:i});A.botId=t.botId,A.alreadyConnected=t.alreadyConnected,A.state="connected",this.#d===A.id&&(this.#d=null)}else a==="EXPIRED"?(A.state="expired",A.error=Cl("expired",S("\u4E8C\u7EF4\u7801\u5DF2\u8FC7\u671F\uFF0C\u8BF7\u91CD\u65B0\u751F\u6210\u3002")),this.#d===A.id&&(this.#d=null)):a==="FAIL"?(A.state="failed",A.error=Cl("authorization-failed",S("\u9489\u9489\u672A\u5B8C\u6210\u673A\u5668\u4EBA\u6388\u6743\uFF0C\u8BF7\u91CD\u65B0\u626B\u7801\u3002")),this.#d===A.id&&(this.#d=null)):(A.state="pending",A.error=Cl("poll-pending",S("\u9489\u9489\u6388\u6743\u72B6\u6001\u6682\u65F6\u4E0D\u53EF\u7528\uFF0C\u6B63\u5728\u91CD\u8BD5\u3002")))}catch(o){A.controller.signal.aborted||o?.name==="AbortError"?(A.state="cancelled",A.error=Cl("cancelled",S("\u626B\u7801\u63A5\u5165\u5DF2\u53D6\u6D88\u3002")),this.#d===A.id&&(this.#d=null)):A.state==="connecting"?(A.state="failed",A.error=this.#h(o,"activation-failed",S("\u9489\u9489\u5DF2\u6388\u6743\uFF0C\u4F46\u65E0\u6CD5\u5B89\u5168\u4FDD\u5B58\u63A5\u5165\u914D\u7F6E\u3002")),this.#d===A.id&&(this.#d=null),this.#l.error?.("[dsh-dingtalk] bot activation failed")):(A.state="pending",A.error=this.#h(o,"poll-failed",S("\u9489\u9489\u6388\u6743\u67E5\u8BE2\u6682\u65F6\u5931\u8D25\uFF0C\u6B63\u5728\u91CD\u8BD5\u3002")))}finally{this.#M(),this.#Q()}}async#C(A,{clientId:o,clientSecret:a}){let e=jm(o),i=this.#A.getByClientId(o),t=await de("credential.read",()=>this.#t.resolve(e.secretRef),"credential-store"),r={botId:e.botId,clientId:o,secretRef:e.secretRef,approvedSenders:i?.approvedSenders??[]};return this.#_(e.botId,async()=>{let s=async()=>{await this.#y(e.botId),i?await de("account.save",()=>this.#A.save(i),"account-config").catch(()=>{}):this.#A.get(e.botId)&&await de("account.remove",()=>this.#A.remove(e.botId),"account-config").catch(()=>null)&&await this.#a({botId:e.botId,config:r}).catch(g=>{this.#l.warn?.("[dsh-dingtalk] failed to clean up cancelled bot state:",Dt(g).details)}),await this.#b(e.secretRef,t),i&&Zi(t?.value)&&await this.#f(i,t.value).catch(()=>{})};await de("credential.save",()=>this.#t.set(e.secretRef,a),"credential-store");try{this.#O(A),await de("account.save",()=>this.#A.save(r),"account-config"),this.#O(A)}catch(c){throw await s(),c}try{await this.#f(r,a),this.#O(A),this.#s.delete(e.botId)}catch(c){if(A.controller.signal.aborted||this.#d!==A.id)throw await s(),Bl();this.#B({config:r,clientSecret:a,error:c,fallbackMessage:"\u9489\u9489\u5DF2\u63A5\u5165\uFF0C\u4F46\u6D88\u606F\u8FDE\u63A5\u6682\u672A\u5C31\u7EEA\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002",context:`authorized bot ${e.botId} is not ready`})}return{botId:e.botId,alreadyConnected:!!i}})}async#E(A,o){return this.#_(A.botId,async()=>{let a=await this.#S(A.secretRef);if(!a)throw new Error("The DingTalk client secret is missing");await de("account.save",()=>this.#A.save(o),"account-config");try{await this.#f(o,a),this.#s.delete(A.botId)}catch(e){await de("account.save",()=>this.#A.save(A),"account-config").catch(()=>{}),await this.#f(A,a).catch(()=>{});let i=this.#B({config:A,clientSecret:a,error:e,fallbackMessage:"\u9489\u9489\u8FDE\u63A5\u672A\u5C31\u7EEA\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002",context:`bot ${A.botId} failed to apply updated settings`});throw AR(i,e)}finally{this.#M()}})}async#f(A,o){if(this.#p||(await this.#y(A.botId),this.#p))throw Bl();let a;try{a=await de("runtime.prepare",()=>this.#r({botId:A.botId,config:structuredClone(A),clientSecret:o}))}catch(e){throw eh("dingtalk-runtime-prepare-failed",e)}if(!a||typeof a.start!="function"||typeof a.stop!="function")throw eh("dingtalk-runtime-prepare-failed",new TypeError("createRuntime returned an invalid DingTalk runtime"));if(this.#p)throw await a.stop().catch(()=>{}),Bl();this.#i.set(A.botId,a);try{if(await a.start(),this.#p)throw await a.stop().catch(()=>{}),Bl()}catch(e){throw this.#i.get(A.botId)===a&&this.#i.delete(A.botId),await a.stop().catch(()=>{}),eh("dingtalk-stream-connect-failed",e)}}#B({config:A,clientSecret:o,error:a,fallbackMessage:e,context:i}){let t=vq(a,{fallbackMessage:e,clientId:A.clientId,clientSecret:o}),r=this.#c.report(a,{reuse:!0,botId:A.botId,stage:"connection.start",publicError:{...t.publicError,details:{dependencies:t.diagnostic.dependencies,proxyConfigured:t.diagnostic.proxy.configured}}}).publicError,s={...t.publicError,details:r.details};return this.#s.set(A.botId,s),s}async#y(A){let o=this.#i.get(A);this.#i.delete(A),await o?.stop().catch(()=>{this.#l.warn?.(`[dsh-dingtalk] bot ${A} failed to stop cleanly`)})}async#S(A){let o=await de("credential.read",()=>this.#t.resolve(A),"credential-store");return Zi(o?.value)}async#b(A,o){try{Zi(o?.value)?await de("credential.save",()=>this.#t.set(A,o.value),"credential-store"):await de("credential.remove",()=>this.#t.unset(A),"credential-store")}catch{this.#l.error?.(`[dsh-dingtalk] failed to restore credential ${A}`)}}#O(A){if(A.controller.signal.aborted||this.#d!==A.id)throw Bl()}#_(A,o){if(this.#p)return Promise.reject(new Error("dsh-dingtalk controller is closed"));let i=(this.#n.get(A)??Promise.resolve()).catch(()=>{}).then(o).finally(()=>{this.#n.get(A)===i&&this.#n.delete(A)});return this.#n.set(A,i),i}#Q(){for(let[A,o]of this.#I)A!==this.#d&&Zm.has(o.state)&&this.#I.size>16&&this.#I.delete(A)}#M(){this.#g+=1}};import{randomUUID as Ah}from"node:crypto";import{extname as OQe}from"node:path";var xq=5*1024*1024,Jye=20,qye=20*1024*1024,zye="\u8BF7\u5206\u6790\u8FD9\u5F20\u56FE\u7247\u3002",Kq="\u5F53\u524D\u4F1A\u8BDD\u6A21\u578B\u4E0D\u652F\u6301\u76F4\u63A5\u63A5\u6536\u56FE\u7247\u8F93\u5165\u3002\u7528\u6237\u53D1\u9001\u7684\u56FE\u7247\u5DF2\u4F5C\u4E3A\u6587\u4EF6\u4FDD\u5B58\u5230\u5DE5\u4F5C\u533A\uFF08\u89C1\u4E0B\u65B9\u6587\u4EF6\u6E05\u5355\uFF09\u3002\u8BF7\u4F7F\u7528\u53EF\u7528\u5DE5\u5177\u5206\u6790\u8FD9\u4E9B\u56FE\u7247\u6587\u4EF6\u540E\u56DE\u7B54\uFF0C\u4F8B\u5982 run_code \u6216 pwsh \u8BFB\u53D6\u5B57\u8282\u3001\u89E3\u6790\u5143\u6570\u636E\u3001\u8C03\u7528\u56FE\u50CF\u5904\u7406\u6216 OCR \u5E93\uFF1B\u4E0D\u8981\u5047\u8BBE\u81EA\u5DF1\u80FD\u76F4\u63A5\u770B\u5230\u56FE\u7247\u5185\u5BB9\u3002";function ms(n){return S("\u56FE\u7247\u8D85\u8FC7\u539F\u56FE\u63A5\u6536\u4E0A\u9650 {maxMb} MB\uFF0C\u8BF7\u538B\u7F29\u540E\u91CD\u8BD5\uFF0C\u6216\u5728\u901A\u7528\u8BBE\u7F6E\u7684\u9644\u4EF6\u4E2D\u8C03\u6574\u4E0A\u9650\u3002",{maxMb:Math.round(n/(1024*1024)*100)/100})}var iA=class extends Error{constructor(A,o,a,e={}){super(o,e),this.name="ImagePromptError",this.code=A,this.userMessage=a}},Hq=Object.freeze({MODEL_DOES_NOT_SUPPORT_IMAGES:"\u5F53\u524D\u6A21\u578B\u4E0D\u652F\u6301\u56FE\u7247\uFF0C\u8BF7\u7528 /models \u67E5\u770B\u53EF\u7528\u6A21\u578B\uFF0C\u518D\u7528 /model <\u5E8F\u53F7> \u5207\u6362\u540E\u91CD\u53D1\u3002",IMAGE_TOO_LARGE:"\u56FE\u7247\u8D85\u8FC7\u5BBF\u4E3B\u5141\u8BB8\u7684\u5927\u5C0F\uFF0C\u8BF7\u538B\u7F29\u540E\u91CD\u8BD5\u3002",IMAGE_TOO_MANY_PIXELS:"\u56FE\u7247\u5206\u8FA8\u7387\u8FC7\u9AD8\uFF0C\u8BF7\u538B\u7F29\u540E\u91CD\u8BD5\u3002",INVALID_IMAGE:"\u56FE\u7247\u5185\u5BB9\u65E0\u6548\u6216\u683C\u5F0F\u4E0D\u53D7\u652F\u6301\uFF0C\u8BF7\u91CD\u65B0\u53D1\u9001\u3002",INVALID_IMAGE_BASE64:"\u672A\u80FD\u8BFB\u53D6\u56FE\u7247\u5185\u5BB9\uFF0C\u8BF7\u91CD\u65B0\u53D1\u9001\u3002",IMAGE_TYPE_MISMATCH:"\u56FE\u7247\u683C\u5F0F\u4E0E\u5B9E\u9645\u5185\u5BB9\u4E0D\u4E00\u81F4\uFF0C\u8BF7\u91CD\u65B0\u53D1\u9001\u3002",TOO_MANY_IMAGES:"\u4E00\u6B21\u53D1\u9001\u7684\u56FE\u7247\u6570\u91CF\u8D85\u8FC7\u5BBF\u4E3B\u9650\u5236\uFF0C\u8BF7\u51CF\u5C11\u540E\u91CD\u8BD5\u3002",IMAGES_TOO_LARGE:"\u56FE\u7247\u603B\u5927\u5C0F\u8D85\u8FC7\u5BBF\u4E3B\u9650\u5236\uFF0C\u8BF7\u51CF\u5C11\u56FE\u7247\u6216\u538B\u7F29\u540E\u91CD\u8BD5\u3002"});function Wye(n,A){let o=AbortSignal.timeout(A);return n?AbortSignal.any([n,o]):o}async function iR(n){try{await n?.body?.cancel?.()}catch{}}async function kn(n,{fetchImpl:A=fetch,headers:o,signal:a,maxBytes:e=xq,timeoutMs:i=15e3,allowedHosts:t}={}){let r=new URL(n);if(r.protocol!=="https:")throw new Error("Image download URL must use HTTPS");if(Array.isArray(t)&&!t.some(l=>typeof l=="string"&&(r.hostname===l||l.startsWith(".")&&(r.hostname===l.slice(1)||r.hostname.endsWith(l)))))throw new Error("Image download URL is not hosted by the messaging platform");let s=await A(r,{method:"GET",headers:o,signal:Wye(a,i),redirect:"manual"});if(Number.isInteger(s?.status)&&s.status>=300&&s.status<400)throw await iR(s),new iA("image-redirect-blocked",`Image download redirect was blocked (HTTP ${s.status})`,S("\u56FE\u7247\u4E0B\u8F7D\u5730\u5740\u53D1\u751F\u4E86\u91CD\u5B9A\u5411\uFF0C\u6682\u65F6\u65E0\u6CD5\u8BFB\u53D6\u3002"));if(!s?.ok)throw await iR(s),new iA("image-http-error",`Image download failed with HTTP ${s?.status??"unknown"}`,S("\u56FE\u7247\u4E0B\u8F7D\u5931\u8D25\uFF08HTTP {status}\uFF09\uFF0C\u8BF7\u91CD\u65B0\u53D1\u9001\u540E\u518D\u8BD5\u3002",{status:s?.status??"unknown"}));let c=Number(s.headers?.get?.("content-length"));if(Number.isFinite(c)&&c>e)throw await iR(s),new iA("image-too-large",`Image response declares ${c} bytes; the limit is ${e}`,ms(e));if(s.body?.[Symbol.asyncIterator]){let l=[],d=0;for await(let u of s.body){let f=Buffer.from(u);if(d+=f.length,d>e)throw await s.body.cancel?.().catch?.(()=>{}),new iA("image-too-large",`Image response exceeded ${e} bytes`,ms(e));l.push(f)}return Buffer.concat(l,d)}let g=Buffer.from(await s.arrayBuffer());if(g.length>e)throw new iA("image-too-large",`Image response contains ${g.length} bytes; the limit is ${e}`,ms(e));return g}function Vye(n){return typeof n=="string"?n.trim():""}function Yq(n){return Array.isArray(n?.images)?n.images.filter(Boolean):[]}function aR(n){return typeof n!="string"?void 0:n.replaceAll("\\","/").split("/").at(-1)?.replace(/[\u0000-\u001f\u007f]/g,"").trim().slice(0,255)||void 0}function oR(n){if(n.length>=8&&n[0]===137&&n[1]===80&&n[2]===78&&n[3]===71&&n[4]===13&&n[5]===10&&n[6]===26&&n[7]===10)return"image/png";if(n.length>=3&&n[0]===255&&n[1]===216&&n[2]===255)return"image/jpeg";if(n.length>=6){let A=n.subarray(0,6).toString("ascii");if(A==="GIF87a"||A==="GIF89a")return"image/gif"}return n.length>=12&&n.subarray(0,4).toString("ascii")==="RIFF"&&n.subarray(8,12).toString("ascii")==="WEBP"?"image/webp":null}function nR(n){if(Buffer.isBuffer(n)||n instanceof Uint8Array)return{data:Buffer.from(n)};let A=n?.data??n?.buffer;return Buffer.isBuffer(A)||A instanceof Uint8Array?{data:Buffer.from(A),name:n?.name??n?.filename}:null}function yA(n){return Yq(n).length>0}async function sR(n,{signal:A,deferImages:o=!1,maxImageBytes:a=xq,maxImages:e=Jye,maxTotalImageBytes:i=qye}={}){let t=Yq(n);if(!o&&t.length>e)throw new iA("too-many-images",`Image message contains ${t.length} images; the limit is ${e}`,S("\u4E00\u6B21\u6700\u591A\u53EA\u80FD\u5904\u7406 {maxImages} \u5F20\u56FE\u7247\u3002",{maxImages:e}));let r=Vye(n?.content),s=[],c=0;if(r?s.push({type:"text",text:r}):t.length>0&&s.push({type:"text",text:S(zye)}),o)return s;for(let[g,l]of t.entries()){if(A?.throwIfAborted(),Number.isFinite(l?.size)&&l.size>a)throw new iA("image-too-large",`Image ${g+1} declares ${l.size} bytes; the limit is ${a}`,S("\u56FE\u7247\u8D85\u8FC7 5 MB\uFF0C\u8BF7\u538B\u7F29\u540E\u91CD\u8BD5\u3002"));if(Number.isFinite(l?.size)&&c+l.size>i)throw new iA("images-too-large",`Images declare more than ${i} bytes in total`,S("\u4E00\u6B21\u53D1\u9001\u7684\u56FE\u7247\u603B\u5927\u5C0F\u8FC7\u5927\uFF0C\u8BF7\u51CF\u5C11\u56FE\u7247\u6570\u91CF\u6216\u538B\u7F29\u540E\u91CD\u8BD5\u3002"));let d;try{d=l?.data===void 0?await l?.load?.({signal:A,maxBytes:a}):l.data}catch(y){throw A?.aborted||y?.name==="AbortError"||y?.name==="TimeoutError"||y instanceof iA?y:new iA("image-download-failed",`Unable to download image ${g+1}: ${y?.message??String(y)}`,S("\u56FE\u7247\u4E0B\u8F7D\u5931\u8D25\uFF0C\u8BF7\u91CD\u65B0\u53D1\u9001\u540E\u518D\u8BD5\u3002"),{cause:y})}let u=nR(d);if(!u?.data.length)throw new iA("invalid-image-data",`Image ${g+1} returned no data`,S("\u672A\u80FD\u8BFB\u53D6\u56FE\u7247\u5185\u5BB9\uFF0C\u8BF7\u91CD\u65B0\u53D1\u9001\u3002"));if(u.data.length>a)throw new iA("image-too-large",`Image ${g+1} contains ${u.data.length} bytes; the limit is ${a}`,S("\u56FE\u7247\u8D85\u8FC7 5 MB\uFF0C\u8BF7\u538B\u7F29\u540E\u91CD\u8BD5\u3002"));if(c+u.data.length>i)throw new iA("images-too-large",`Images contain more than ${i} bytes in total`,S("\u4E00\u6B21\u53D1\u9001\u7684\u56FE\u7247\u603B\u5927\u5C0F\u8FC7\u5927\uFF0C\u8BF7\u51CF\u5C11\u56FE\u7247\u6570\u91CF\u6216\u538B\u7F29\u540E\u91CD\u8BD5\u3002"));c+=u.data.length;let f=oR(u.data);if(!f)throw new iA("unsupported-image-type",`Image ${g+1} is not JPEG, PNG, GIF, or WebP`,S("\u6682\u4E0D\u652F\u6301\u8BE5\u56FE\u7247\u683C\u5F0F\uFF0C\u8BF7\u53D1\u9001 JPEG\u3001PNG\u3001WebP \u6216 GIF \u56FE\u7247\u3002"));s.push({type:"image",mediaType:f,data:u.data.toString("base64"),...aR(u.name??l?.name)?{name:aR(u.name??l?.name)}:{}})}return s}function za(n){if(n instanceof iA)return{code:"image-prompt-error",reason:n.code,userMessage:n.userMessage};if(n?.code!=="attachment-error"||typeof n?.details?.reason!="string")return null;let A=n.details.reason,o=Object.hasOwn(Hq,A)?S(Hq[A]):null;return o?{code:"attachment-error",reason:A,userMessage:o}:null}function Lo(n){return za(n)?.userMessage??null}var Zye=new Map([["image/png",".png"],["image/jpeg",".jpg"],["image/gif",".gif"],["image/webp",".webp"]]),Xye=/\.(?:png|jpe?g|gif|webp)$/i;function Xm(n,A,o){let a=Zye.get(A)??".img",e=aR(n);return e&&Xye.test(e)?e:`${e??`image-${o+1}`}${a}`}function jq(n){return Array.isArray(n)?n.filter(A=>A?.type==="image").map((A,o)=>({name:Xm(A.name,A.mediaType,o),...typeof A.mediaType=="string"&&A.mediaType.trim()?{mediaType:A.mediaType.trim()}:{},data:Buffer.from(typeof A.data=="string"?A.data:"","base64")})):[]}function Jq(n){return Array.isArray(n)?n.filter(A=>A?.type!=="image"):n}function cR(n){return n?.code==="attachment-error"&&n?.details?.reason==="MODEL_DOES_NOT_SUPPORT_IMAGES"}import{randomUUID as bQe}from"node:crypto";import{realpath as $q,stat as e4}from"node:fs/promises";import{isAbsolute as t4,resolve as pQe}from"node:path";var gR=new WeakMap;function $ye(n){let A=gR.get(n);return A||(A=new Map,gR.set(n,A)),A}async function Ss(n,A,o){let a=typeof n;if(a!=="object"&&a!=="function"||n===null)throw new TypeError("state is required");if(typeof A!="string"||!A)throw new TypeError("conversation key is required");if(typeof o!="function")throw new TypeError("operation is required");let e=$ye(n),i=e.get(A)??Promise.resolve(),t,r=new Promise(s=>{t=s});e.set(A,r),await i;try{return await o()}finally{t(),e.get(A)===r&&(e.delete(A),e.size===0&&gR.delete(n))}}var eQe=/(?:\u001b\]|\u009d)(?:(?!\u0007|\u001b\\)[\s\S])*(?:\u0007|\u001b\\|$)/gu,tQe=/(?:\u001b\[|\u009b)[0-?]*[ -/]*[@-~]/gu,AQe=/\u001b[@-_]/gu,rQe=/[\u0000-\u0008\u000b\u000c\u000e-\u001f\u007f-\u009f]/gu,iQe=/[\u200b\u200e\u200f\u202a-\u202e\u2060-\u2064\u2066-\u206f\ufeff]/gu,aQe=/^(?:<dsh_im_source>[\s\S]*?<\/dsh_im_source>\s*)?(?:<dsh_im_source_guidance>[\s\S]*?<\/dsh_im_source_guidance>\s*)?(?:<dsh_im_reply_to>[\s\S]*?<\/dsh_im_reply_to>\s*)?/u,oQe=new Intl.Segmenter(void 0,{granularity:"grapheme"});function lR(n){return n.replace(eQe,"").replace(tQe,"").replace(AQe,"").replace(rQe,"").replace(iQe,"").replace(/\s+/gu," ").trim()}function IR(n,A=60){if(Buffer.byteLength(n,"utf8")<=A)return n;let o="\u2026",a=A-Buffer.byteLength(o,"utf8"),e="";for(let{segment:i}of oQe.segment(n)){if(Buffer.byteLength(e+i,"utf8")>a)break;e+=i}return`${e.trimEnd()}${o}`}function nQe(n){return typeof n=="string"?n:Array.isArray(n)?n.filter(A=>A?.type==="text"&&typeof A.text=="string").map(A=>A.text).join(`
package/package.json CHANGED
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "name": "@xmanrui/dsh-im",
3
- "version": "4.29.0",
3
+ "version": "4.29.1",
4
+ "icon": "./assets/logo-plugin-message-link-gradient.webp",
4
5
  "description": "把十二种 IM 渠道和公网 AI Office 接入本机 DeepSeek Harness。 Connect twelve IM channels and a public AI Office to a local DeepSeek Harness.",
5
6
  "keywords": [
6
7
  "deepseek-harness",