@xmanrui/dsh-im 5.0.0 → 5.0.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 +5 -11
- package/lib/index.js +2 -2
- package/package.json +1 -1
- package/plugin-src/client/i18n.js +2 -3
- package/plugin-src/client/update-panel.js +2 -4
package/lib/index.js
CHANGED
|
@@ -137,7 +137,7 @@ Reply with a number for a quick action:
|
|
|
137
137
|
**4** Status \xB7 **5** Complete permissions \xB7 **6** Help`,"\u4ECE\u4E0B\u65B9\u4E0B\u62C9\u9009\u62E9\u8865\u5145\u6307\u4EE4\uFF1B\u6700\u540E\u4E00\u9879\u53EF\u81EA\u5B9A\u4E49\u8F93\u5165\u3002":"Choose an instruction below; the last option lets you enter a custom one.","\u5F53\u524D\u6CA1\u6709\u7ED1\u5B9A\u4F1A\u8BDD\uFF0C\u8BF7\u5148\u7ED1\u5B9A\u4F1A\u8BDD\u518D\u8865\u5145\u6307\u4EE4\u3002":"No session is bound. Bind one before steering the task.","\u2795 \u8865\u5145\u6307\u4EE4":"\u2795 Steer task","\u8F93\u5165\u8865\u5145\u6307\u4EE4\u540E\u70B9\u300C\u63D0\u4EA4\u300D\uFF0C\u53D1\u9001\u7ED9\u5F53\u524D\u8FD0\u884C\u7684\u4EFB\u52A1\u3002":"Enter an instruction and press Submit to send it to the running task.",\u8F93\u5165\u4F60\u7684\u8865\u5145\u6307\u4EE4:"Enter your instruction",\u63D0\u4EA4:"Submit","\u2795 \u81EA\u5B9A\u4E49\u6307\u4EE4":"\u2795 Custom instruction","\u{1F916} \u52A9\u624B\u83DC\u5355":"\u{1F916} Assistant menu","**\u70B9\u51FB\u6309\u94AE\u6216\u76F4\u63A5\u56DE\u590D\u6570\u5B57**":"**Tap a button or reply with a number**","1 \xB7 \u4F1A\u8BDD\u5217\u8868":"1 \xB7 Sessions","2 \xB7 \u5DE5\u4F5C\u533A":"2 \xB7 Workspace","3 \xB7 \u65B0\u4F1A\u8BDD":"3 \xB7 New session","4 \xB7 \u72B6\u6001":"4 \xB7 Status","5 \xB7 \u5E2E\u52A9":"5 \xB7 Help","**6 \xB7 \u8865\u5168\u6743\u9650**\uFF08\u8BF7\u76F4\u63A5\u56DE\u590D\u6570\u5B57 **6**\uFF09":"**6 \xB7 Complete permissions** (reply with the number **6**)","7 \xB7 \u5173\u6CE8\u5217\u8868":"7 \xB7 Watch list","\u{1F9EA} \u9A8C\u8BC1\u5361\u7247\u6309\u94AE":"\u{1F9EA} Verify card buttons","\u6388\u6743\u5DF2\u63D0\u4EA4\u3002\u8BF7\u70B9\u51FB\u4E0B\u65B9\u6309\u94AE\uFF1B\u673A\u5668\u4EBA\u771F\u5B9E\u6536\u5230\u56DE\u8C03\u540E\u624D\u4F1A\u5224\u5B9A\u4FEE\u590D\u6210\u529F\u3002":"Authorization submitted. Tap the button below; the repair is confirmed only after the bot receives the real callback.",\u5B8C\u6210\u9A8C\u8BC1:"Finish verification","**\u5DE5\u4F5C\u533A**\uFF1A{workspace}\n\u5171 **{total}** \u4E2A\u4F1A\u8BDD{paging}":`**Workspace**: {workspace}
|
|
138
138
|
**{total}** sessions in total{paging}`,"\uFF08\u7B2C {page}/{pageCount} \u9875\uFF09":" (page {page}/{pageCount})","\u2B50\u53D6\u5173":"\u2B50 Unwatch","\u2B50\u5173\u6CE8":"\u2B50 Watch","\u25C0 \u4E0A\u4E00\u9875":"\u25C0 Previous","\u4E0B\u4E00\u9875 \u25B6":"Next \u25B6","\u56DE\u590D\u6570\u5B57\uFF081~N\uFF09\u7ED1\u5B9A\u672C\u9875\u4F1A\u8BDD\u3002":"Reply with a number (1\u2013N) to bind a session on this page.","\u{1F4C2} \u4F1A\u8BDD\u5217\u8868":"\u{1F4C2} Session list","\u5F53\u524D Host \u4E0A\u6CA1\u6709\u5DF2\u767B\u8BB0\u7684\u5DE5\u4F5C\u533A\u3002":"No workspaces are registered on the current Host.","\u56DE\u590D\u6570\u5B57\u5207\u6362\u5DE5\u4F5C\u533A\uFF0C\u6216\u70B9\u51FB\u6309\u94AE\uFF1A":"Reply with a number to switch workspaces, or tap a button:","\u{1F5C2} \u5DE5\u4F5C\u533A":"\u{1F5C2} Workspace","\u{1F916} \u52A9\u624B\u83DC\u5355\uFF08\u56DE\u590D\u6570\u5B57\u5373\u53EF\uFF0C\u65E0\u9700\u8BB0\u547D\u4EE4\uFF09":"\u{1F916} Assistant menu (reply with a number \u2014 no need to memorize commands)","1 \xB7 /sessionlist \u5217\u51FA\u4F1A\u8BDD\uFF08\u56DE\u590D\u6570\u5B57\u7ED1\u5B9A\uFF09":"1 \xB7 /sessionlist List sessions (reply with a number to bind)","2 \xB7 /workspacelist \u5217\u51FA\u5DE5\u4F5C\u533A\uFF08\u56DE\u590D\u6570\u5B57\u5207\u6362\uFF09":"2 \xB7 /workspacelist List workspaces (reply with a number to switch)","3 \xB7 /new \u5F00\u542F\u65B0\u4F1A\u8BDD":"3 \xB7 /new Start a new session","4 \xB7 /status \u8FDE\u63A5\u72B6\u6001":"4 \xB7 /status Connection status","5 \xB7 /help \u672C\u5E2E\u52A9":"5 \xB7 /help This help","6 \xB7 /repair \u8865\u5168\u6743\u9650\u4E0E\u56DE\u8C03\uFF08\u8BF7\u56DE\u590D\u6570\u5B57 6\uFF09":"6 \xB7 /repair Complete permissions and callback (reply with the number 6)","7 \xB7 /watchlist \u5173\u6CE8\u5217\u8868":"7 \xB7 /watchlist Watch list","\u76F4\u63A5\u53D1\u9001\u6587\u5B57/\u56FE\u7247\u5373\u7EE7\u7EED\u5F53\u524D\u4F1A\u8BDD\u3002":"Send text or an image directly to continue the current session.","/session ID \u6216\u5E8F\u53F7 \u7ED1\u5B9A\u5DF2\u6709\u4F1A\u8BDD":"/session ID or index Bind an existing session","/watch ID \u6216\u5E8F\u53F7 \u5173\u6CE8\u4F1A\u8BDD\uFF08\u5B8C\u6210\u540E\u63A8\u9001\uFF09":"/watch ID or index Watch a session (push when done)","/compact \u538B\u7F29\u4E0A\u4E0B\u6587":"/compact Compact the context","\u{1F9F9} \u6E05\u7A7A\u4E0A\u4E0B\u6587":"\u{1F9F9} Clear context",\u6E05\u7A7A\u5F53\u524D\u4F1A\u8BDD\u4E0A\u4E0B\u6587\u5E76\u4FDD\u7559\u7ED1\u5B9A\u548C\u5386\u53F2\u8BB0\u5F55:"Clear the current session context while keeping the binding and history","/workspace \u7EDD\u5BF9\u8DEF\u5F84 \u5207\u6362\u5DE5\u4F5C\u533A":"/workspace <absolute path> Switch workspace","/presetlist \u5217\u51FA\u53EF\u7528 Agent Preset":"/presetlist List available Agent Presets","\u4EFB\u52A1\u5B8C\u6210\u4F1A\u81EA\u52A8\u63A8\u9001\uFF0C\u56DE\u590D\u6570\u5B57\u6216\u70B9\u6309\u94AE\u53D6\u6D88\u5173\u6CE8\uFF1A":"Completion is pushed automatically. Reply with a number or tap a button to unwatch:","\u{1F441} \u5173\u6CE8\u5217\u8868":"\u{1F441} Watch list","\u2B50 \u53D6\u6D88\u5173\u6CE8":"\u2B50 Unwatch","\u2606 \u5173\u6CE8":"\u2606 Watch","\u{1F50D} \u5173\u6CE8\u5217\u8868":"\u{1F50D} Watch list",\u52FE\u9009\u8981\u5173\u6CE8\u7684\u4F1A\u8BDD:"Select sessions to watch",\u52FE\u9009\u8981\u53D6\u6D88\u5173\u6CE8\u7684\u4F1A\u8BDD:"Select sessions to unwatch","\u5F53\u524D\u6CA1\u6709\u5173\u6CE8\u7684\u4F1A\u8BDD\u3002\u4EFB\u52A1\u5B8C\u6210\u4F1A\u81EA\u52A8\u63A8\u9001\u7ED3\u679C\u3002":"No sessions are being watched. Results are pushed automatically when tasks complete.","\u5F53\u524D\u5173\u6CE8 **{count}** \u4E2A\u4F1A\u8BDD\uFF1A":"Currently watching **{count}** sessions:","**\u2795 \u6DFB\u52A0\u5173\u6CE8**\uFF08\u591A\u9009\u4E0B\u62C9\u52FE\u9009\uFF09":"**\u2795 Add watch** (select from the multi-select dropdown)","**\u2796 \u53D6\u6D88\u5173\u6CE8**\uFF08\u591A\u9009\u4E0B\u62C9\u52FE\u9009\uFF09":"**\u2796 Remove watch** (select from the multi-select dropdown)","\u{1F4CB} \u4F1A\u8BDD\u5217\u8868":"\u{1F4CB} Session list","\u{1F519} \u8FD4\u56DE\u83DC\u5355":"\u{1F519} Back to menu",\u5DF2\u5B8C\u6210:"Completed",\u5DF2\u505C\u6B62:"Stopped",\u8FD0\u884C\u4E2D:"Running","\u2699\uFE0F \u4EFB\u52A1\u8FC7\u7A0B":"\u2699\uFE0F Task progress","\u{1F4CB} \u8FC7\u7A0B\u8BE6\u60C5":"\u{1F4CB} Process details","\u{1F6E0}\uFE0F \u5DE5\u5177\u6458\u8981\uFF08{count}\uFF09":"\u{1F6E0}\uFE0F Tool summary ({count})","\u{1F4AD} \u601D\u8003\u8FC7\u7A0B\uFF08{count}\uFF09":"\u{1F4AD} Thinking ({count})","\u{1F6E0}\uFE0F \u5DE5\u5177":"\u{1F6E0}\uFE0F Tools","\u{1F4AD} \u601D\u8003":"\u{1F4AD} Thinking","\u{1F4CB} \u8FC7\u7A0B\u8BE6\u60C5\uFF08\u5DE5\u5177 {tools} \xB7 \u601D\u8003 {notes}\uFF09":"\u{1F4CB} Process details (tools {tools} \xB7 thinking {notes})",\u5DF2\u4E2D\u6B62:"Aborted",\u5DF2\u53D6\u6D88:"Cancelled",\u5DF2\u7ED3\u675F:"Ended","\u2705 \u4EFB\u52A1\u5B8C\u6210":"\u2705 Task complete","**\u72B6\u6001**\uFF1A{reason}":"**Status**: {reason}",\u6253\u5F00\u4F1A\u8BDD\u5217\u8868:"Open session list",\u5DE5\u4F5C\u533A:"Workspace","\u7ED1\u5B9A\u8BE5\u4F1A\u8BDD\u540E\u53EF\u7EE7\u7EED\u8FFD\u95EE\uFF0C\u8F93\u5165\u6587\u5B57\u5373\u53EF\u3002":"After binding this session you can keep asking; just type a message.","\u5F53\u524D\u6CA1\u6709\u5173\u6CE8\u7684\u4F1A\u8BDD\u3002\n`/watch <ID|\u5E8F\u53F7>` \u5173\u6CE8\u540E\uFF0C\u4EFB\u52A1\u5B8C\u6210\u4F1A\u81EA\u52A8\u63A8\u9001\u3002":"No sessions are being watched.\nWatch one with `/watch <ID|index>` and completion is pushed automatically.","\u6B63\u5728\u751F\u6210\u2026":"Generating\u2026","\u2935\uFE0F \u6700\u7EC8\u7ED3\u679C\u89C1\u4E0B\u65B9":"\u2935\uFE0F Final result below",\u56DE\u7B54\u5B8C\u6210:"Answer complete","\u5185\u5BB9\u8F83\u957F\uFF0C\u751F\u6210\u5B8C\u6210\u540E\u5C06\u5206\u6BB5\u53D1\u9001\u5B8C\u6574\u56DE\u7B54\u3002":"This response is long. The complete answer will be sent in parts when generation finishes.",\u98DE\u4E66\u673A\u5668\u4EBA:"Feishu bot","\u98DE\u4E66\u673A\u5668\u4EBA\u7F3A\u5C11\u56FE\u7247\u8BFB\u53D6\u6743\u9650 im:message:readonly\uFF08\u98DE\u4E66\u663E\u793A\u4E3A\u201C\u83B7\u53D6\u5355\u804A\u3001\u7FA4\u7EC4\u6D88\u606F\u201D\uFF09\u3002\u8BF7\u79C1\u804A\u673A\u5668\u4EBA\u6267\u884C /repair \u547D\u4EE4\uFF0C\u6216\u8005\u5728\u300CIM\u673A\u5668\u4EBA\u300D\u8BBE\u7F6E\u9875\u70B9\u51FB\u201C\u8865\u5168\u6743\u9650\u201D\u6309\u94AE\u5E76\u626B\u7801\u3002\u6309\u98DE\u4E66\u63D0\u793A\u53D1\u5E03\u65B0\u7248\u672C\u3001\u5B8C\u6210\u5FC5\u8981\u5BA1\u6279\u540E\uFF0C\u518D\u91CD\u65B0\u53D1\u9001\u56FE\u7247\u3002":"The Feishu bot is missing the image-read scope im:message:readonly, shown by Feishu as \u201CRead direct and group messages.\u201D Run /repair in a direct chat with the bot, or click the \u201CComplete permissions\u201D button on the IM Bot settings page and scan the QR code. Publish a new version and complete any approval requested by Feishu, then resend the image.","\u2705 \u4FEE\u590D\u5B8C\u6210\uFF1A\u5DF2\u5B9E\u6D4B\u6536\u5230 card.action.trigger\uFF0C\u83DC\u5355\u6309\u94AE\u73B0\u5728\u53EF\u7528\u3002":"\u2705 Repair complete: card.action.trigger was received in a real test; the menu buttons now work.","\u26A0\uFE0F \u4FEE\u590D\u9A8C\u8BC1\u8D85\u65F6\uFF1A\u672A\u6536\u5230\u6D4B\u8BD5\u5361\u6309\u94AE\u7684 card.action.trigger\uFF0C\u4E0D\u80FD\u786E\u8BA4\u6309\u94AE\u5DF2\u4FEE\u590D\u3002\u8BF7\u4E0D\u8981\u91CD\u590D\u6388\u6743\uFF1B\u5148\u68C0\u67E5\u98DE\u4E66\u5F00\u653E\u5E73\u53F0\u7684\u5361\u7247\u56DE\u8C03\u914D\u7F6E\uFF0C\u786E\u8BA4\u540E\u518D\u53D1\u9001 /repair\u3002":"\u26A0\uFE0F Repair verification timed out: no card.action.trigger from the test card button was received, so the buttons cannot be confirmed repaired. Do not authorize again; check the card-callback configuration in Feishu Open Platform first, then send /repair.","\u26A0\uFE0F \u4FEE\u590D\u9A8C\u8BC1\u5931\u8D25\uFF1A\u65E0\u6CD5\u53D1\u9001\u4E13\u7528\u6D4B\u8BD5\u5361\uFF0C\u4E0D\u80FD\u786E\u8BA4 card.action.trigger \u5DF2\u6062\u590D\u3002\u8BF7\u4E0D\u8981\u91CD\u590D\u6388\u6743\uFF1B\u5148\u68C0\u67E5\u673A\u5668\u4EBA\u6D88\u606F\u6743\u9650\u548C\u8FDE\u63A5\u72B6\u6001\u3002":"\u26A0\uFE0F Repair verification failed: the dedicated test card could not be sent, so card.action.trigger cannot be confirmed restored. Do not authorize again; check the bot message permission and connection status first.","\u26A0\uFE0F \u4FEE\u590D\u9A8C\u8BC1\u4E2D\u65AD\uFF1ARuntime \u5DF2\u505C\u6B62\uFF0C\u672A\u5B8C\u6210 card.action.trigger \u5B9E\u6D4B\uFF0C\u4E0D\u80FD\u786E\u8BA4\u4FEE\u590D\u6210\u529F\u3002\u8BF7\u4E0D\u8981\u91CD\u590D\u6388\u6743\uFF1B\u5148\u7B49\u5F85\u673A\u5668\u4EBA\u6062\u590D\u8FDE\u63A5\u3002":"\u26A0\uFE0F Repair verification interrupted: the Runtime stopped before the card.action.trigger test completed, so the repair cannot be confirmed. Do not authorize again; wait for the bot to reconnect.","\u8BE5\u5BA1\u6279\u5DF2\u5904\u7406\u6216\u4E0D\u5B58\u5728\uFF0C\u65E0\u9700\u91CD\u590D\u64CD\u4F5C\u3002":"This approval has already been processed or does not exist; no need to repeat the action.","\u64CD\u4F5C\u53C2\u6570\uFF1A\n{operation}":`Operation parameters:
|
|
139
139
|
{operation}`,"\u2705 \u6279\u51C6":"\u2705 Approve","\u274C \u62D2\u7EDD":"\u274C Reject","\u{1F510} \u5DE5\u5177\u5BA1\u6279":"\u{1F510} Tool approval","\u2753 \u8BF7\u8865\u5145\u4FE1\u606F{progress}":"\u2753 Please provide more information{progress}","\u540E\u53F0\u4EFB\u52A1\u5DF2\u7ED3\u675F\uFF08{reason}\uFF09\uFF0C\u6CA1\u6709\u53EF\u63A8\u9001\u7684\u6700\u7EC8\u7ED3\u679C\u3002":"The background task has finished ({reason}); there is no final result to deliver.","\u5DF2\u8BF7\u6C42\u505C\u6B62\u540E\u53F0\u4EFB\u52A1\u3002":"Requested to stop the background task.","\u65E0\u6CD5\u5B89\u5168\u505C\u6B62\u540E\u53F0\u4EFB\u52A1\uFF0C\u8BF7\u5728 Harness \u4E2D\u67E5\u770B\u5E76\u505C\u6B62\u5BF9\u5E94\u4EFB\u52A1\u3002":"Unable to safely stop the background task. Please inspect and stop the matching task in Harness.",\u4EFB\u52A1\u5931\u8D25:"Failed","\u{1F4CE} \u5DF2\u6CE8\u5165\u4F1A\u8BDD\u4E0A\u4E0B\u6587":"\u{1F4CE} Context injected","\u270F\uFE0F \u5176\u4ED6\u7B54\u6848\u2026":"\u270F\uFE0F Other answer\u2026","\u2705 \u5DF2\u56DE\u7B54{progress}":"\u2705 Answered{progress}","\u2705 \u5DF2\u9009\u62E9\uFF1A{label}":"\u2705 Selected: {label}","\u56DE\u7B54\u5DF2\u63D0\u4EA4\uFF0C\u5BF9\u8BDD\u5C06\u7EE7\u7EED\u3002":"Answer submitted. The conversation will continue.","\u8FD9\u4E2A\u95EE\u9898\u5DF2\u7ECF\u56DE\u7B54\u8FC7\u4E86\u3002":"This question has already been answered.","\u60F3\u81EA\u5B9A\u4E49\u7B54\u6848\uFF1F\u76F4\u63A5\u53D1\u9001\u6587\u5B57\u6D88\u606F\u5373\u53EF\uFF0C\u5C06\u4F5C\u4E3A\u672C\u9898\u7B54\u6848\u63D0\u4EA4\u3002":"Want a custom answer? Just send a text message and it will be submitted as your answer.","\u23F3 \u6B63\u5728\u601D\u8003\u4E2D\u2026\uFF08\u5DF2\u8FD0\u884C {elapsed}\uFF09":"\u23F3 Thinking\u2026 (elapsed {elapsed})","\u23F3 \u6B63\u5728\u601D\u8003\u4E2D\u2026":"\u23F3 Thinking\u2026"};var z4={"\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 W4={"/menu \u6216 /m \u6253\u5F00\u53EF\u70B9\u51FB\u7684\u529F\u80FD\u83DC\u5355":"/menu or /m Open the interactive menu",\u4FDD\u6301\u5F53\u524D:"Keep current",\u4F1A\u8BDD:"Session",\u6A21\u578B:"Model",\u9884\u8BBE:"Preset",\u8DDF\u968F\u9ED8\u8BA4\u6A21\u578B:"Default model","\u8DDF\u968F Host \u9ED8\u8BA4":"Follow Host default",\u65B0\u4F1A\u8BDD:"New session",\u4E0A\u4E00\u9875:"Previous",\u4E0B\u4E00\u9875:"Next",\u8FD4\u56DE:"Back","\u66F4\u591A\u9009\u9879\u2026":"More options\u2026","\u9009\u62E9\u4F1A\u8BDD\u3001\u6A21\u578B\u6216\u9884\u8BBE\u540E\uFF0C\u70B9\u51FB\u5E94\u7528\u8BBE\u7F6E\u3002":"Choose a session, model or preset, then apply settings.",\u5E94\u7528\u8BBE\u7F6E:"Apply settings",\u5DE5\u4F5C\u533A\u4E0E\u4EFB\u52A1:"Workspace & tasks",\u5E94\u7528\u9009\u62E9:"Apply selection","\u8BF7\u9009\u62E9\u4E00\u4E2A\u9009\u9879\u540E\u518D\u5E94\u7528\u3002":"Select one option before applying.","\u8BBE\u7F6E\u672A\u6539\u53D8\u3002":"Settings unchanged.","\u5DF2\u6536\u5230\u64CD\u4F5C\uFF0C\u8BF7\u67E5\u770B\u4E0B\u65B9\u7ED3\u679C\u3002":"Action received. See the result below.",\u91CD\u65B0\u6253\u5F00\u83DC\u5355:"Reopen menu","\u6682\u65E0\u53EF\u7528\u9009\u9879\u3002":"No options are available.","\u9884\u8BBE\u4EC5\u7528\u4E8E\u4E4B\u540E\u7684\u65B0\u4F1A\u8BDD\u3002":"Presets apply to future new sessions.","\u90E8\u5206\u6A21\u578B\u6682\u4E0D\u53EF\u7528\uFF0C\u53EF\u7A0D\u540E\u91CD\u8BD5\u3002":"Some models are unavailable. Try again later.","\u5DE5\u4F5C\u533A\u5DF2\u53D8\u5316\uFF0C\u8BF7\u53D1\u9001 /m \u91CD\u65B0\u6253\u5F00\u83DC\u5355\u540E\u9009\u62E9\u3002":"The workspace changed. Send /m to reopen the menu and select again.","\u4F01\u4E1A\u5FAE\u4FE1\u673A\u5668\u4EBA\u5DF2\u8FDE\u63A5 DeepSeek Harness\u3002":"The Enterprise WeChat bot is connected to DeepSeek Harness.","\u5F53\u524D\u5F85\u5904\u7406\u56FE\u7247\u8F83\u591A\uFF0C\u8BF7\u7A0D\u540E\u91CD\u65B0\u53D1\u9001\u3002":"Too many images are pending. Please send them again later.","\u56FE\u7247 {indexes} \u6765\u81EA\u5F53\u524D\u6D88\u606F\u3002":"Images {indexes} are from the current message.","\u56FE\u7247 {indexes} \u6765\u81EA\u88AB\u5F15\u7528\u6D88\u606F\u3002\u56FE\u7247\u5E8F\u53F7\u4E0E\u672C\u8F6E\u9644\u4EF6\u6E05\u5355\u4E00\u81F4\u3002":"Images {indexes} are from the quoted message. Image numbers match the attachment list for this turn.","\u6709 {count} \u5F20\u5F15\u7528\u56FE\u7247\u672A\u63D0\u4F9B\u53EF\u4E0B\u8F7D\u8D44\u6E90\uFF0C\u672A\u9644\u4E0A\u8FD9\u4E9B\u56FE\u7247\uFF1B\u9700\u8981\u770B\u56FE\u65F6\u8BF7\u7528\u6237\u91CD\u65B0\u53D1\u9001\u3002":"{count} quoted images have no downloadable resource and are not attached. Ask the user to send them again if needed.","\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u5DF2\u751F\u6210\uFF0C\u4F46\u4F01\u4E1A\u5FAE\u4FE1\u667A\u80FD\u673A\u5668\u4EBA\u7F3A\u5C11\u7D20\u6750\u4E0A\u4F20\u6216\u6587\u4EF6\u6D88\u606F\u80FD\u529B\uFF0C\u8BF7\u68C0\u67E5\u673A\u5668\u4EBA\u6743\u9650\u3002":'The result file "{name}" was generated, but the Enterprise WeChat bot lacks media upload or file message capability. Please check the bot permissions.',"\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u8D85\u8FC7\u5F53\u524D\u4F01\u4E1A\u5FAE\u4FE1\u673A\u5668\u4EBA\u53EF\u53D1\u9001\u7684\u6587\u4EF6\u5927\u5C0F\uFF0C\u672A\u53D1\u9001\u3002":'The result file "{name}" exceeds the file size this Enterprise WeChat bot can send and was not sent.',"\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u4E3A\u7A7A\uFF0C\u4F01\u4E1A\u5FAE\u4FE1\u4E0D\u5141\u8BB8\u53D1\u9001\u7A7A\u6587\u4EF6\u3002":'The result file "{name}" is empty. Enterprise WeChat does not allow sending empty files.',"\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u6682\u65F6\u88AB\u4F01\u4E1A\u5FAE\u4FE1\u9650\u6D41\uFF0C\u672A\u80FD\u53D1\u9001\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002":'The result file "{name}" was rate-limited by Enterprise WeChat and could not be sent. Please try again later.',"\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u5DF2\u751F\u6210\uFF0C\u4F46\u4F01\u4E1A\u5FAE\u4FE1\u62D2\u7EDD\u4E86\u8BE5\u6587\u4EF6\u6216\u6587\u4EF6\u6D88\u606F\u3002":'The result file "{name}" was generated, but Enterprise WeChat rejected the file or file message.',"\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u5DF2\u751F\u6210\uFF0C\u4F46\u6682\u65F6\u672A\u80FD\u901A\u8FC7\u4F01\u4E1A\u5FAE\u4FE1\u53D1\u9001\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002":'The result file "{name}" was generated but could not be sent via Enterprise WeChat right now. Please try again later.',"\u4EFB\u52A1\u5DF2\u5B8C\u6210\uFF0C\u4F46\u6CA1\u6709\u751F\u6210\u53EF\u663E\u793A\u7684\u6587\u672C\u3002":"The task completed, but no displayable text was generated.","\u76EE\u524D\u652F\u6301\u6587\u5B57\u3001\u56FE\u7247\u548C\u8BED\u97F3\u8F6C\u5199\u6D88\u606F\u3002":"Currently only text, images, and voice transcription messages are supported.","\u4F01\u4E1A\u5FAE\u4FE1\u673A\u5668\u4EBA\u4E0E DeepSeek Harness \u8FDE\u63A5\u6B63\u5E38\u3002":"The connection between the Enterprise WeChat bot and DeepSeek Harness is working.","\u6B63\u5728\u601D\u8003\u4E2D\u2026":"Thinking\u2026","\u4F01\u4E1A\u5FAE\u4FE1\u4EA4\u4E92\u95EE\u9898\u53D1\u9001\u5931\u8D25\u3002":"Failed to send the Enterprise WeChat interaction question.","\u4F01\u4E1A\u5FAE\u4FE1\u673A\u5668\u4EBA\u51ED\u636E\u7F3A\u5931\uFF0C\u8BF7\u79FB\u9664\u540E\u91CD\u65B0\u626B\u7801\u3002":"The Enterprise WeChat bot credentials are missing. Please remove the bot and scan the QR code again.","\u4F01\u4E1A\u5FAE\u4FE1\u8FDE\u63A5\u672A\u5C31\u7EEA\uFF0C\u63D2\u4EF6\u4F1A\u81EA\u52A8\u91CD\u8BD5\u3002":"The Enterprise WeChat connection is not ready. The plugin will retry automatically.","\u626B\u7801\u7ED1\u5B9A\u5DF2\u53D6\u6D88\u3002":"QR code binding has been cancelled.","\u65E0\u6CD5\u751F\u6210\u4F01\u4E1A\u5FAE\u4FE1\u4E8C\u7EF4\u7801\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002":"Unable to generate the Enterprise WeChat QR code. Please try again later.","\u4F01\u4E1A\u5FAE\u4FE1\u4E8C\u7EF4\u7801\u5DF2\u8FC7\u671F\uFF0C\u8BF7\u91CD\u65B0\u751F\u6210\u3002":"The Enterprise WeChat QR code has expired. Please generate a new one.","\u4F01\u4E1A\u5FAE\u4FE1\u673A\u5668\u4EBA\u5DF2\u7ED1\u5B9A\uFF0C\u6D88\u606F\u8FDE\u63A5\u6682\u672A\u5C31\u7EEA\u3002":"The Enterprise WeChat bot is bound, but the message connection is not ready yet.","\u4F01\u4E1A\u5FAE\u4FE1\u8FDE\u63A5\u4ECD\u672A\u5C31\u7EEA\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002":"The Enterprise WeChat connection is still not ready. Please try again later.","\u4F01\u4E1A\u5FAE\u4FE1\u626B\u7801\u6CA1\u6709\u5B8C\u6210\uFF0C\u8BF7\u91CD\u65B0\u751F\u6210\u4E8C\u7EF4\u7801\u3002":"The Enterprise WeChat QR scan was not completed. Please generate a new QR code.","\u4F01\u4E1A\u5FAE\u4FE1\u626B\u7801\u670D\u52A1\u6682\u65F6\u4E0D\u53EF\u7528\uFF0C\u8BF7\u91CD\u65B0\u751F\u6210\u4E8C\u7EF4\u7801\u3002":"The Enterprise WeChat QR service is temporarily unavailable. Please generate a new QR code.","\u4F01\u4E1A\u5FAE\u4FE1\u5DF2\u6388\u6743\uFF0C\u4F46\u65E0\u6CD5\u5B89\u5168\u4FDD\u5B58\u63A5\u5165\u914D\u7F6E\u3002":"Enterprise WeChat authorization succeeded, but the connection configuration could not be saved safely.",\u4F01\u4E1A\u5FAE\u4FE1\u673A\u5668\u4EBA:"Enterprise WeChat bot","\u4F01\u4E1A\u5FAE\u4FE1\u673A\u5668\u4EBA\uFF08{botId}\uFF09":"Enterprise WeChat bot ({botId})","\u4F01\u4E1A\u5FAE\u4FE1 WebSocket \u957F\u8FDE\u63A5\u8FD0\u884C\u6B63\u5E38":"The Enterprise WeChat WebSocket long connection is running normally","\u4F01\u4E1A\u5FAE\u4FE1\u8FDE\u63A5\u672A\u5C31\u7EEA\uFF0C\u63D2\u4EF6\u4F1A\u81EA\u52A8\u91CD\u8BD5":"The Enterprise WeChat connection is not ready. The plugin will retry automatically",\u4F01\u4E1A\u5FAE\u4FE1\u8FDE\u63A5\u5F53\u524D\u79BB\u7EBF:"The Enterprise WeChat connection is currently offline"};var V4={\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 Z4={"\u65E0\u6CD5\u8BFB\u53D6 QQ \u672C\u5730\u72B6\u6001\uFF0C\u8BF7\u68C0\u67E5\u6570\u636E\u76EE\u5F55\u53CA\u8BBF\u95EE\u6743\u9650\u3002":"Unable to read local QQ state. Check the data directory and access permissions.","QQ \u672C\u5730\u72B6\u6001\u5DF2\u635F\u574F\uFF0C\u4F46\u65E0\u6CD5\u5907\u4EFD\uFF0C\u539F\u6587\u4EF6\u5DF2\u4FDD\u7559\u3002":"Local QQ state is corrupt and could not be backed up. The original file has been preserved.","\u65E0\u6CD5\u4FDD\u5B58 QQ \u672C\u5730\u72B6\u6001\uFF0C\u8BF7\u68C0\u67E5\u78C1\u76D8\u7A7A\u95F4\u53CA\u76EE\u5F55\u5199\u5165\u6743\u9650\u3002":"Unable to save local QQ state. Check disk space and directory write permissions.",\u8FD4\u56DE\u4E3B\u83DC\u5355:"Back to main menu","\u6A21\u5F0F\uFF0F\u9884\u8BBE":"Mode / preset",\u5F52\u6863\u663E\u793A:"Archived sessions","\u7B2C {page} / {pages} \u9875":"Page {page} / {pages}","\u5F53\u524D\u4F1A\u8BDD\uFF1A{session}":"Current session: {session}","\u6A21\u5F0F\uFF0F\u9884\u8BBE\uFF1A{preset}":"Mode / preset: {preset}","\u5F53\u524D\u6A21\u578B\uFF1A{model}":"Current model: {model}",\u6682\u4E0D\u53EF\u7528:"Unavailable","\u5F52\u6863\u4F1A\u8BDD\uFF1A{state}":"Archived sessions: {state}",\u663E\u793A:"Shown",\u9690\u85CF:"Hidden","\u4EFB\u52A1\u72B6\u6001\uFF1A{state}":"Task status: {state}",\u5904\u7406\u4E2D:"Processing",\u7A7A\u95F2:"Idle","\u90E8\u5206\u8BBE\u7F6E\u6682\u672A\u52A0\u8F7D\uFF0C\u53EF\u8FDB\u5165\u5BF9\u5E94\u5217\u8868\u91CD\u8BD5\u3002":"Some settings could not be loaded. Open the corresponding list to retry.","\u{1F4AC} \u4F1A\u8BDD\u9009\u62E9":"\u{1F4AC} Select session","\u{1F4C1} \u5DE5\u4F5C\u533A":"\u{1F4C1} Workspace","\u{1F916} \u6A21\u5F0F\uFF0F\u9884\u8BBE":"\u{1F916} Mode / preset","\u{1F9E0} \u6A21\u578B":"\u{1F9E0} Model","\u{1F4AC} \u8865\u5145\u6307\u4EE4":"\u{1F4AC} Steer task","\u7ED9\u5F53\u524D\u6B63\u5728\u8FD0\u884C\u7684\u4EFB\u52A1\u8865\u5145\u6307\u4EE4\u3002":"Send an additional instruction to the running task.",\u81EA\u5B9A\u4E49\u6307\u4EE4:"Custom instruction","\u8BF7\u53D1\u9001 /steer \u4F60\u7684\u8865\u5145\u6307\u4EE4\u3002":"Send /steer followed by your instruction.","\u53D1\u9001 /m \u6253\u5F00\u52A9\u624B\u4E2D\u5FC3\uFF0C\u70B9\u51FB\u6309\u94AE\u6216\u56DE\u590D\u5F53\u524D\u5217\u8868\u7684\u6570\u5B57\u9009\u62E9\u3002":"Send /m to open the assistant menu. Click a button or reply with a number from the current list.","\u8BBE\u7F6E\uFF1A\u4F1A\u8BDD\u3001\u5DE5\u4F5C\u533A\u3001\u6A21\u5F0F\uFF0F\u9884\u8BBE\u3001\u6A21\u578B\u3002":"Settings: session, workspace, mode / preset, model.","\u4F1A\u8BDD\uFF1A\u65B0\u4F1A\u8BDD\u3001\u4F1A\u8BDD\u5217\u8868\u3001\u5F52\u6863\u663E\u793A\u5207\u6362\u3002":"Sessions: new session, session list, show or hide archived sessions.","\u4EFB\u52A1\uFF1A\u505C\u6B62\u3001\u538B\u7F29\u3001\u6E05\u7A7A\u4E0A\u4E0B\u6587\u3001\u5FEB\u6377\u6216\u81EA\u5B9A\u4E49\u8865\u5145\u6307\u4EE4\u3002":"Tasks: stop, compact, clear context, quick or custom steering instructions.","\u4FE1\u606F\uFF1A\u72B6\u6001\u3001\u5E2E\u52A9\u3002":"Information: status, help.","\u83DC\u5355\u6709\u6548\u671F\u4E3A 15 \u5206\u949F\uFF1B\u53D1\u9001\u666E\u901A\u6D88\u606F\u4F1A\u9000\u51FA\u6570\u5B57\u9009\u62E9\u3002":"Menus expire after 15 minutes. Sending an ordinary message exits number selection.","\u56DE\u7B54\u95EE\u9898\u3001\u5BA1\u6279\u548C\u6279\u91CF\u8F93\u5165\u65F6\uFF0C\u6570\u5B57\u4F18\u5148\u7528\u4E8E\u5F53\u524D\u4EA4\u4E92\u3002":"During questions, approvals and batch input, numbers belong to that interaction.","\u5B8C\u6574\u547D\u4EE4\u8BF4\u660E\uFF1A/help":"Full command reference: /help","\u5F53\u524D\u65E0\u6CD5\u5C55\u793A\u6309\u94AE\uFF0C\u8BF7\u56DE\u590D\u6570\u5B57\u9009\u62E9\u3002":"Buttons are unavailable. Reply with a number to select.","\u70B9\u51FB\u6309\u94AE\u6216\u56DE\u590D\u6570\u5B57\u9009\u62E9\uFF0C/m \u8FD4\u56DE\u4E3B\u83DC\u5355\u3002":"Click a button or reply with a number. Send /m for the main menu.","\u56DE\u7B54\u95EE\u9898\u3001\u5BA1\u6279\u548C\u6279\u91CF\u8F93\u5165\u65F6\uFF0C\u8BF7\u5148\u5B8C\u6210\u5F53\u524D\u4EA4\u4E92\u3002":"Finish any pending question, approval or batch input before replying with a menu number.",\u5DF2\u9009\u62E9:"Selected","\u8BF7\u56DE\u590D\u6570\u5B57\u9009\u62E9\uFF0C\u6216\u53D1\u9001 /m \u91CD\u65B0\u6253\u5F00\u83DC\u5355\u3002":"Reply with a number or send /m to reopen the menu.","\u5F53\u524D\u6B63\u5728\u6279\u91CF\u8F93\u5165\uFF0C\u8BF7\u5148\u53D1\u9001 /send \u6216 /cancel\uFF0C\u518D\u6253\u5F00\u83DC\u5355\u3002":"Batch input is active. Send /send or /cancel before opening the menu.","\u83DC\u5355\u547D\u4EE4\u65E0\u6548\uFF0C\u8BF7\u53D1\u9001 /m \u91CD\u65B0\u6253\u5F00\u3002":"Invalid menu command. Send /m to reopen the menu.","\u5F53\u524D\u4EFB\u52A1\u4ECD\u5728\u8FD0\u884C\uFF0C\u8BF7\u5148\u505C\u6B62\u4EFB\u52A1\u6216\u7B49\u5F85\u4EFB\u52A1\u5B8C\u6210\u540E\u518D\u6267\u884C\u6B64\u64CD\u4F5C\u3002":"A task is still running. Stop it or wait for it to finish before performing this action.","QQ \u673A\u5668\u4EBA\u5DF2\u8FDE\u63A5 DeepSeek Harness\u3002":"The QQ bot is connected to DeepSeek Harness.","\u56DE\u7B54\u8F83\u957F\uFF0C\u540E\u7EED\u5185\u5BB9\u672A\u80FD\u901A\u8FC7 QQ \u5B8C\u6574\u53D1\u9001\uFF0C\u8BF7\u56DE\u590D\u201C\u7EE7\u7EED\u201D\u3002":"The answer is long and the rest could not be sent fully through QQ. Reply \u201C\u7EE7\u7EED\u201D (continue) to receive it.","\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u5DF2\u751F\u6210\uFF0C\u4F46 QQ \u4ECA\u65E5\u6587\u4EF6\u4E0A\u4F20\u989D\u5EA6\u5DF2\u7528\u5B8C\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002":`The result file "{name}" was generated, but QQ's daily file upload quota is used up. Please try again later.`,"\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u5DF2\u751F\u6210\uFF0C\u4F46\u5F53\u524D QQ \u673A\u5668\u4EBA\u6CA1\u6709\u6587\u4EF6\u6D88\u606F\u6743\u9650\u3002":'The result file "{name}" was generated, but the current QQ bot does not have file message permission.',"\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u8D85\u8FC7\u5F53\u524D QQ \u673A\u5668\u4EBA\u53EF\u53D1\u9001\u7684\u6587\u4EF6\u5927\u5C0F\uFF0C\u672A\u53D1\u9001\u3002":'The result file "{name}" exceeds the file size the current QQ bot can send and was not sent.',"\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u4E3A\u7A7A\uFF0CQQ \u4E0D\u5141\u8BB8\u53D1\u9001\u7A7A\u6587\u4EF6\u3002":'The result file "{name}" is empty, and QQ does not allow sending empty files.',"\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u6682\u65F6\u88AB QQ \u9650\u6D41\uFF0C\u672A\u80FD\u53D1\u9001\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002":'The result file "{name}" was temporarily rate-limited by QQ and was not sent. Please try again later.',"\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u5DF2\u751F\u6210\uFF0C\u4F46 QQ \u62D2\u7EDD\u4E86\u8BE5\u6587\u4EF6\u6216\u6587\u4EF6\u6D88\u606F\u3002":'The result file "{name}" was generated, but QQ rejected the file or file message.',"\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u5DF2\u751F\u6210\uFF0C\u4F46\u6682\u65F6\u672A\u80FD\u901A\u8FC7 QQ \u53D1\u9001\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002":'The result file "{name}" was generated but could not be sent via QQ right now. Please try again later.',"QQ \u673A\u5668\u4EBA\u4E0E DeepSeek Harness \u8FDE\u63A5\u6B63\u5E38\u3002":"The QQ bot is connected to DeepSeek Harness normally.","QQ \u4EA4\u4E92\u95EE\u9898\u53D1\u9001\u5931\u8D25\u3002":"Failed to send the QQ interaction question.","QQ \u673A\u5668\u4EBA\u51ED\u636E\u7F3A\u5931\uFF0C\u8BF7\u79FB\u9664\u540E\u91CD\u65B0\u626B\u7801\u3002":"The QQ bot credentials are missing. Remove the bot and scan the QR code again.","QQ \u8FDE\u63A5\u672A\u5C31\u7EEA\uFF0C\u63D2\u4EF6\u4F1A\u81EA\u52A8\u91CD\u8BD5\u3002":"The QQ connection is not ready; the plugin will retry automatically.","QQ \u626B\u7801\u670D\u52A1\u6682\u65F6\u4E0D\u53EF\u7528\uFF0C\u8BF7\u91CD\u65B0\u751F\u6210\u4E8C\u7EF4\u7801\u3002":"The QQ QR service is temporarily unavailable. Please generate a new QR code.","\u65E0\u6CD5\u751F\u6210 QQ \u4E8C\u7EF4\u7801\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002":"Unable to generate the QQ QR code. Please try again later.","QQ \u673A\u5668\u4EBA\u5DF2\u7ED1\u5B9A\uFF0C\u6D88\u606F\u8FDE\u63A5\u6682\u672A\u5C31\u7EEA\u3002":"The QQ bot is bound, but the message connection is not ready yet.","QQ \u8FDE\u63A5\u4ECD\u672A\u5C31\u7EEA\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002":"The QQ connection is still not ready. Please try again later.",QQ\u673A\u5668\u4EBA\u5C1A\u672A\u8FDE\u63A5:"The QQ bot is not connected yet","QQ \u673A\u5668\u4EBA\uFF08{appId}\uFF09":"QQ bot ({appId})",QQ\u673A\u5668\u4EBA:"QQ bot","QQ WebSocket \u957F\u8FDE\u63A5\u8FD0\u884C\u6B63\u5E38":"The QQ WebSocket long connection is running normally","QQ \u8FDE\u63A5\u672A\u5C31\u7EEA\uFF0C\u63D2\u4EF6\u4F1A\u81EA\u52A8\u91CD\u8BD5":"The QQ connection is not ready; the plugin will retry automatically","QQ \u8FDE\u63A5\u5F53\u524D\u79BB\u7EBF":"The QQ connection is currently offline","QQ \u5DF2\u6388\u6743\uFF0C\u4F46\u65E0\u6CD5\u5B89\u5168\u4FDD\u5B58\u63A5\u5165\u914D\u7F6E\u3002":"QQ authorization succeeded, but the connection configuration could not be saved safely."};var bS={"\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 X4={...bS,"\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 $4={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 e8={"\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 t8={"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 A8={"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 r8={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 i8={"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 a8=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 o8=Object.freeze(Object.assign({},DS,wS,K4,Y4,j4,J4,q4,z4,W4,V4,Z4,X4,$4,e8,t8,A8,r8,i8,a8));var Md="zh",OS=new Set;function Ak(n){let A=typeof n=="string"?n.trim().toLowerCase():"";return A==="english"||/^en(?:[-_].*)?$/u.test(A)?"en":"zh"}function n8(n){let A=Ak(n);if(A===Md)return Md;let o=Md;Md=A;for(let a of[...OS])if(OS.has(a))try{a(A,o)}catch{}return Md}function Yl(){return Md}function MS(n){if(typeof n!="function")throw new TypeError("onImHostLanguageChange requires a listener function");return OS.add(n),()=>{OS.delete(n)}}function S(n,A){if(typeof n!="string")return n;let o=Md==="en"?o8[n]??n:n;return A==null?o:o.replace(/\{(\w+)\}/g,(a,e)=>Object.hasOwn(A,e)?String(A[e]):a)}var rk=Object.freeze({version:1,bots:Object.freeze([])}),Nme=new Set(["clientId","secretRef","approvedSenders"]);function Ys(n){return typeof n=="string"&&n.trim()?n.trim():null}function Rme(n){return Dme("sha256").update(n).digest("hex")}function g8(n){let A=Ys(n);return A&&/^dt_[a-f0-9]{24}$/.test(A)?A:null}function kme(n){let A=Ys(n);return A&&/^DSH_DINGTALK_BOT_SECRET_[A-F0-9]{24}$/.test(A)?A:null}function vme(n){let A=Ys(n);return A&&/^dt_sender_[a-f0-9]{32}$/.test(A)?A:null}function Pme(n){let A=typeof n=="string"?{staffId:n}:n;if(!A||typeof A!="object"||Array.isArray(A))return null;let o=vme(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 Lme(n){if(!Array.isArray(n))return null;let A=n.map(Pme);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 TS(n){let A=Ys(n);if(!A)throw new TypeError("clientId is required");let o=Rme(A).slice(0,24);return Object.freeze({botId:`dt_${o}`,secretRef:`DSH_DINGTALK_BOT_SECRET_${o.toUpperCase()}`})}function l8(){return`dt_sender_${c8().replaceAll("-","")}`}function ik(n){return Ys(n)?S("\u8EAB\u4EFD\u5DF2\u9690\u85CF"):S("\u9489\u9489\u7528\u6237")}function ak(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 I8(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=>!Nme.has(r)))return null;let o=Ys(n.clientId),a=kme(n.secretRef),e=Lme(n.approvedSenders??[]);if(!o||!a||!e)return null;let i=TS(o);return i.secretRef!==a||(n.botId===void 0?i.botId:g8(n.botId))!==i.botId?null:Object.freeze({botId:i.botId,clientId:o,secretRef:a,approvedSenders:e})}function Fme(n){if(!n||n.version!==1||!Array.isArray(n.bots))return null;let A=n.bots.map(i=>I8(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 Gme(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 _S=class{#e;#t=rk;#A=Promise.resolve();constructor(A){if(!Ys(A))throw new TypeError("config path is required");this.#e=A}async load(){try{let A=Fme(JSON.parse(await Ome(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=rk}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=I8(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(!g8(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 s8(this.#e)}catch(o){if(o?.code!=="ENOENT")throw o}this.#t=rk});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 bme(Tme(this.#e),{recursive:!0,mode:448});let o=`${this.#e}.${process.pid}.${c8()}.tmp`;try{await _me(o,`${JSON.stringify(Gme(A),null,2)}
|
|
140
|
-
`,{encoding:"utf8",flag:"wx",mode:384}),await Mme(o,this.#e)}catch(a){try{await s8(o)}catch(e){if(e?.code!=="ENOENT")throw new AggregateError([a,e])}throw a}}};var p8="https://oapi.dingtalk.com",Ume="DING_DWS_CLAW";function js(n){return typeof n=="string"&&n.trim()?n.trim():null}function d8(n,A){let o=Number(n);return Number.isFinite(o)&&o>0?o:A}function Hme(n){let A;try{A=new URL(js(n)??p8)}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 xme(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 Kme(n,A){if(!n||typeof n!="object"||Array.isArray(n))throw new Nc("invalid-response",`DingTalk ${A} returned an invalid response`,A);if(Number(n.errcode)!==0)throw new Nc("api-error",`DingTalk ${A} request was rejected`,A);return n}var Nc=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)}},NS=class{#e;#t;#A;#r;constructor({fetch:A=globalThis.fetch,clock:o=Date,baseUrl:a=p8,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=Hme(a),this.#r=e}async start({signal:A}={}){let o=await this.#a("/app/registration/init",{source:Ume},"initialization",A),a=js(o.nonce);if(!a)throw new Nc("missing-nonce","DingTalk registration initialization did not return a nonce","initialization");let e=await this.#a("/app/registration/begin",{nonce:a},"begin",A),i=js(e.device_code),t=js(e.verification_uri_complete);if(!i||!t)throw new Nc("incomplete-registration","DingTalk registration did not return complete QR metadata","begin");let r=d8(e.expires_in,7200),s=d8(e.interval,5)*1e3;return Object.freeze({deviceCode:i,verificationUrl:t,verificationUri:js(e.verification_uri),userCode:js(e.user_code),expiresAt:xme(this.#t)+r*1e3,pollIntervalMs:s})}async poll(A){let o=js(typeof A=="string"?A:A?.deviceCode),a=typeof A=="object"?A?.signal:void 0;if(!o)throw new TypeError("deviceCode is required");let e=await this.#a("/app/registration/poll",{device_code:o},"poll",a),i=js(e.status)?.toUpperCase(),t=["WAITING","SUCCESS","FAIL","EXPIRED"].includes(i)?i:"UNKNOWN";return Object.freeze({status:t,clientId:js(e.client_id),clientSecret:js(e.client_secret),failReason:js(e.fail_reason)})}async#a(A,o,a,e){let i,t=AbortSignal.timeout(this.#r),r=e?AbortSignal.any([e,t]):t;try{i=await this.#e(`${this.#A}${A}`,{method:"POST",headers:{accept:"application/json","content-type":"application/json"},body:JSON.stringify(o),redirect:"error",signal:r})}catch(c){throw e?.aborted?e.reason??c:t.aborted?new Nc("timeout",`DingTalk ${a} request timed out`,a,{cause:c,timeoutMs:this.#r}):c?.name==="AbortError"?c:new Nc("network-error",`DingTalk ${a} request could not be completed`,a,{cause:c})}if(!i||i.ok===!1||typeof i.json!="function")throw new Nc("http-error",`DingTalk ${a} request failed`,a,{status:i?.status});let s;try{s=await i.json()}catch(c){throw new Nc("invalid-json",`DingTalk ${a} returned invalid JSON`,a,{cause:c})}return Kme(s,a)}};import{randomUUID as eSe}from"node:crypto";var vh={name:"@xmanrui/dsh-im",version:"5.0.0",icon:"./assets/logo-plugin-message-link-gradient.webp",description:"\u628A\u5FAE\u4FE1\u3001\u98DE\u4E66\u3001\u4F01\u5FAE\u3001\u9489\u9489\u3001QQ\u3001Telegram\u3001WhatsApp\u3001Slack\u3001Discord\u3001Matrix\u63A5\u5165DSH\u3002 Connect Telegram, WhatsApp, Slack, Discord, Matrix, WeChat, Feishu, WeCom, DingTalk, and QQ to DSH.",keywords:["deepseek-harness","dsh","dsh-plugin","ai-agent","im","instant-messaging","chatbot","feishu","lark","wechat","wecom","dingtalk","qq","slack","telegram","discord","whatsapp","imessage","matrix","ai-office"],author:"xmanrui (https://github.com/xmanrui)",license:"MIT",type:"module",repository:{type:"git",url:"git+https://github.com/xmanrui/dsh-im.git"},homepage:"https://github.com/xmanrui/dsh-im#readme",bugs:{url:"https://github.com/xmanrui/dsh-im/issues"},publishConfig:{access:"public"},bin:{"dsh-im":"bin/dsh-im.mjs"},main:"./lib/index.js",exports:{".":"./lib/index.js","./client":"./lib/client.js","./package.json":"./package.json","./locale/*.json":"./locale/*.json"},files:["assets","bin","cordis.patch.yml","lib","locale/*.json","plugin-src","scripts/verify-interface-language.mjs","scripts/verify-injected-context.mjs","scripts/verify-lan-management.mjs","scripts/verify-model-setting.mjs","scripts/verify-package.mjs","scripts/verify-session-channel-logos.mjs","scripts/verify-session-title-prefix.mjs","src","PROACTIVE_DELIVERY.md","PROACTIVE_DELIVERY.en.md","docs/client-integration.md","LICENSE","README.md","README.en.md","THIRD_PARTY_NOTICES.md"],dsh:{bundle:{patch:"./cordis.patch.yml"},client:{inject:["@deepseek-ai/dsh-client-connection","@deepseek-ai/dsh-client-runtime","@deepseek-ai/dsh-client-ui-settings","@deepseek-ai/dsh-client-ui-slots","@deepseek-ai/dsh-client-locale"],platform:"web"},compatibility:{dsh:"0.2.1-rc.2",dshReleases:{"0.2.0-rc.2":"compatible","0.2.1-rc.2":"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.1"},devDependencies:{"@deepseek-ai/cordis":"4.0.1","@larksuiteoapi/node-sdk":"1.73.0","@whiskeysockets/baileys":"7.0.0-rc14",esbuild:"0.25.9","https-proxy-agent":"5.0.1",react:"18.3.1","react-dom":"18.3.1","react-test-renderer":"18.3.1",semver:"7.8.5"},directories:{doc:"docs",lib:"lib",test:"test"},optionalDependencies:{"@tencent-qqmail/agently-cli":"^1.0.18",sharp:"0.35.5"}};var jme=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"]),Jme=new Set(["session.prepare","prompt.prepare","interaction.open","prompt.submit","reply.wait","credential.verify","permission.check","sdk.load","operation","message.receive","message.send","connection.test","startup.load","qr.begin","qr.encode","qr.poll","qr.verify","qr.cancel","credential.read","credential.save","credential.remove","account.save","account.remove","state.load","state.write","state.cleanup","workspace.write","workspace.cleanup","runtime.prepare","activation","harness.check","connection.start","connection.poll","connection.stop","status.read","rollback","management.request"]),ok=new Set(["stream-closed-before-open","stream-failed-before-open","stream-failed","ENOTFOUND","EAI_AGAIN","ECONNREFUSED","ECONNRESET","EHOSTUNREACH","ENETUNREACH","ETIMEDOUT","EPIPE","UND_ERR_CONNECT_TIMEOUT","UND_ERR_HEADERS_TIMEOUT","UND_ERR_BODY_TIMEOUT","UND_ERR_SOCKET","CERT_HAS_EXPIRED","CERT_NOT_YET_VALID","DEPTH_ZERO_SELF_SIGNED_CERT","SELF_SIGNED_CERT_IN_CHAIN","UNABLE_TO_VERIFY_LEAF_SIGNATURE","UNABLE_TO_GET_ISSUER_CERT_LOCALLY","ERR_TLS_CERT_ALTNAME_INVALID","ERR_SSL_WRONG_VERSION_NUMBER","ENOENT","EACCES","EPERM","ENOSPC","EROFS","ENOTDIR","EISDIR","EBUSY","EIO","EXDEV","EMFILE","ENFILE","EEXIST","unknown","multiple-causes","timeout","http-error","provider-rejected","invalid-response","ERR_PROXY_CONNECTION_FAILED","ERR_TLS_HANDSHAKE_TIMEOUT","ERR_SSL_TLSV1_ALERT_INTERNAL_ERROR","ERR_NETWORK_ACCESS_DENIED","AUTHENTICATIONFAILED","EAUTH","invalid-json","invalid-config","read-only"]),qme=new Set(["credential-store","account-config","account-state","workspace-config","workspace-directory"]),zme=new Set(["host.describe","workspace.list","workspace.create","session.list","session.create","session.history","session.prompt","session.rename","session.cancel","session.models","session.permissions","session.selectModel","llm.models"]),Wme=new Set(["host-api","http","websocket"]),Vme=new Set(["not-submitted","accepted","unknown"]),Zme=new Set(["config.json","workspaces.json"]),RS=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"}),Xme=/^(?:\$|version|accounts(?:\[\d{1,10}\](?:\.(?:accountId|ownerUserId|botId|tokenRef|baseUrl))?)?|(?:workspaces|agentPresets|models)(?:\[\d{1,10}\]\.(?:key|value))?|deliveryTargets(?:\[\d{1,10}\]\.(?:key|targets(?:\[\d{1,10}\])?))?)$/;function zo(n){if(!n||typeof n!="object"||Array.isArray(n))return{};let A={};for(let[a,e]of[["operation",jme],["stage",Jme],["reason",ok],["resource",qme],["method",zme],["transport",Wme],["submissionState",Vme],["lastFailureReason",ok]])e.has(n[a])&&(A[a]=n[a]);if($me.includes(n.channel)&&(A.channel=n.channel),Array.isArray(n.reasons)){let a=[...new Set(n.reasons.filter(e=>ok.has(e)&&!["unknown","multiple-causes"].includes(e)))].slice(0,16);a.length&&(A.reasons=a)}for(let a of["durationMs","timeoutMs"])Number.isFinite(n[a])&&n[a]>=0&&(A[a]=Math.round(n[a]));Number.isSafeInteger(n.attempts)&&n.attempts>=0&&(A.attempts=n.attempts);for(let a of["nodeVersion","dshVersion"])typeof n[a]=="string"&&/^\d+\.\d+\.\d+(?:-[A-Za-z0-9.-]+)?$/.test(n[a])&&n[a].length<80&&(A[a]=n[a]);if(["darwin","linux","win32","freebsd"].includes(n.platform)&&(A.platform=n.platform),["ilinkai.weixin.qq.com","oapi.dingtalk.com","api.dingtalk.com","api.telegram.org","discord.com","slack.com","open.feishu.cn","qyapi.weixin.qq.com"].includes(n.host)&&(A.host=n.host),n.dependencies&&typeof n.dependencies=="object"){let a={};for(let e of["dingtalkStream","axios","httpsProxyAgent","agentBase"]){let i=n.dependencies[e];typeof i=="string"&&/^\d+\.\d+\.\d+(?:[-+][A-Za-z0-9.-]+)?$/.test(i)&&i.length<=80&&(a[e]=i)}Object.keys(a).length&&(A.dependencies=a)}typeof n.proxyConfigured=="boolean"&&(A.proxyConfigured=n.proxyConfigured),n.truncated===!0&&(A.truncated=!0),Zme.has(n.file)&&(A.file=n.file),typeof n.field=="string"&&Xme.test(n.field)&&(A.field=n.field),typeof n.issue=="string"&&Object.hasOwn(RS,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 $me=Object.freeze(["weixin","feishu","dingtalk","wecom","qq","slack","telegram","discord","whatsapp","wecom-app","imessage","email","office"]);function jl(n){if(!n?.details)return{};let A=zo({...n?.details,referenceId:n?.details?.referenceId??n?.referenceId,hint:n?.details?.hint??n?.hint});return Object.keys(A).length?{details:A}:{}}var df=new WeakMap,u8=new WeakMap,_d=new WeakMap,tSe={"harness-interaction-timeout":"timeout","harness-response-invalid":"invalid-response","connect-timeout":"timeout","telegram-timeout":"timeout","cli-timeout":"timeout","provider-timeout":"timeout","telegram-response-invalid":"invalid-response","office-protocol-mismatch":"invalid-response"},ASe=new Set(["Error","TypeError","SyntaxError","AggregateError","DOMException","AxiosError","TimeoutError","AbortError"]),h8={"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 kS(n){let A=[n],o=new Set,a=[];for(;A.length&&a.length<16;){let e=A.shift();!e||typeof e!="object"||o.has(e)||(o.add(e),a.push(e),e.cause&&typeof e.cause=="object"&&A.push(e.cause),Array.isArray(e.errors)&&A.push(...e.errors.slice(0,16)))}return{chain:a,truncated:A.some(e=>e&&typeof e=="object"&&!o.has(e))||a.some(e=>Array.isArray(e.errors)&&e.errors.length>16)}}function ft(n){let{chain:A,truncated:o}=kS(n),a=A.map(c=>({type:ASe.has(c.name)?c.name:"Error",...zo({reason:c.details?.reason,reasons:c.details?.reasons,httpStatus:c.details?.httpStatus,providerCode:c.details?.providerCode}),...zo({reason:tSe[c.code]??(c.name==="TimeoutError"?"timeout":c.code??(c instanceof SyntaxError?"invalid-json":void 0)),httpStatus:c.status??c.statusCode??c.response?.status,providerCode:c.providerCode}),hasCause:!!(c.cause&&typeof c.cause=="object"),hasErrors:Array.isArray(c.errors)})),e=[...new Set(a.flatMap(c=>c.reason==="multiple-causes"?c.reasons??[]:[c.reason]).filter(c=>c&&!["unknown","multiple-causes"].includes(c)))],i=e.filter(c=>!["timeout","http-error","provider-rejected","invalid-response"].includes(c)),t=i.length?i:e,r=c=>A.map(g=>zo({[c]:_d.get(g)?.[c]??g[c]??g.details?.[c]})[c]).find(g=>g!==void 0),s={};for(let c of["sessionId","promptRpcId"]){let g=A.map(l=>_d.get(l)?.[c]).find(l=>l!==void 0);typeof g=="string"&&/^[A-Za-z0-9_-]{1,256}$/u.test(g)&&(s[c]=g)}return{chain:A,errors:a,correlation:s,details:zo({reason:t.length>1?"multiple-causes":t[0]??"unknown",...t.length>1?{reasons:t}:{},httpStatus:a.find(c=>c.httpStatus!==void 0)?.httpStatus,providerCode:a.find(c=>c.providerCode!==void 0)?.providerCode,method:r("method"),transport:r("transport"),stage:r("stage"),submissionState:r("submissionState"),attempts:r("attempts"),lastFailureReason:r("lastFailureReason"),durationMs:r("durationMs"),timeoutMs:r("timeoutMs"),host:r("host"),truncated:o})}}function Td(n,A){if(n?.name==="AbortError")return n;let o=n&&typeof n=="object"?n:new Error("Message processing failed"),a=o instanceof DOMException?Object.defineProperties(new DOMException(o.message,o.name),Object.getOwnPropertyDescriptors(o)):Object.defineProperties(Object.setPrototypeOf(o instanceof Error?new Error:{},Object.getPrototypeOf(o)),Object.getOwnPropertyDescriptors(o));return _d.set(a,{...A,..._d.get(o)}),a}function sk(){return{pluginVersion:vh.version,nodeVersion:process.versions.node,platform:process.platform}}async function de(n,A,o){try{return await A()}catch(a){throw pf(a,n,o)}}function pf(n,A,o){return(!n||typeof n!="object")&&(n=new Error("Operation failed")),_d.has(n)||_d.set(n,zo({stage:A,resource:o})),n}function nk(n){return kS(n).chain.map(A=>df.get(A)??u8.get(A)).find(Boolean)}function FA(n,A,o,a){if(A?.name==="AbortError")return{ok:!1,error:{code:"cancelled",message:S("\u64CD\u4F5C\u5DF2\u53D6\u6D88\u3002"),details:{}}};if(o?.ok!==!1||["cancelled","bad-request"].includes(o.error?.code))return o;let e=nk(A)??n.report(A,{...a,publicError:o.error});return{...o,error:a?.untrustedPublicError?e.publicError:{...e.publicError,...o.error,details:e.publicError.details}}}function hf(n){let A=n.reason;return A==="multiple-causes"?S("\u68C0\u6D4B\u5230\u591A\u4E2A\u5E95\u5C42\u539F\u56E0\uFF0C\u8BF7\u5C55\u5F00\u8BCA\u65AD\u8BE6\u60C5\u9010\u9879\u68C0\u67E5\u3002"):["ENOTFOUND","EAI_AGAIN"].includes(A)?S("\u670D\u52A1\u57DF\u540D\u89E3\u6790\u5931\u8D25\uFF0C\u8BF7\u68C0\u67E5\u8FD0\u884C DSH \u7684\u673A\u5668\u7684 DNS \u548C\u7F51\u7EDC\u8BBE\u7F6E\u3002"):A==="ECONNREFUSED"?S("\u76EE\u6807\u62D2\u7EDD\u8FDE\u63A5\uFF0C\u8BF7\u68C0\u67E5\u670D\u52A1\u5730\u5740\u3001\u7AEF\u53E3\u548C\u8BBF\u95EE\u9650\u5236\u3002"):["ECONNRESET","EPIPE","UND_ERR_SOCKET"].includes(A)?S("\u8FDE\u63A5\u5DF2\u4E2D\u65AD\uFF0C\u8BF7\u68C0\u67E5\u7F51\u7EDC\u548C\u76EE\u6807\u670D\u52A1\u72B6\u6001\u3002"):["ENETUNREACH","EHOSTUNREACH","ERR_NETWORK_ACCESS_DENIED"].includes(A)?S("\u76EE\u6807\u7F51\u7EDC\u4E0D\u53EF\u8FBE\uFF0C\u8BF7\u68C0\u67E5\u8FD0\u884C DSH \u7684\u673A\u5668\u7684\u7F51\u7EDC\u51FA\u53E3\u548C\u8BBF\u95EE\u9650\u5236\u3002"):/CERT|TLS|SSL|ISSUER|SIGNATURE/.test(A??"")?S("TLS \u6216\u8BC1\u4E66\u6821\u9A8C\u5931\u8D25\uFF0C\u8BF7\u68C0\u67E5\u7CFB\u7EDF\u65F6\u95F4\u3001\u8BC1\u4E66\u94FE\u548C\u7F51\u7EDC\u8BBE\u7F6E\u3002"):/TIMEOUT/.test(A??"")||A==="ETIMEDOUT"||A==="timeout"?S("\u8BF7\u6C42\u8D85\u65F6\uFF0C\u8BF7\u68C0\u67E5\u76EE\u6807\u670D\u52A1\u548C\u7F51\u7EDC\uFF1B\u8BCA\u65AD\u8BE6\u60C5\u4E2D\u53EF\u67E5\u770B\u5DF2\u77E5\u7684\u8017\u65F6\u3002"):A==="ERR_PROXY_CONNECTION_FAILED"||n.httpStatus===407?S("\u4EE3\u7406\u8FDE\u63A5\u6216\u8BA4\u8BC1\u5931\u8D25\uFF0C\u8BF7\u68C0\u67E5 DSH \u8FDB\u7A0B\u4F7F\u7528\u7684\u4EE3\u7406\u914D\u7F6E\u3002"):["EAUTH","AUTHENTICATIONFAILED"].includes(A)?S("\u670D\u52A1\u8BA4\u8BC1\u5931\u8D25\uFF0C\u8BF7\u68C0\u67E5\u8D26\u53F7\u548C\u6388\u6743\u4FE1\u606F\u3002"):["EACCES","EPERM","EROFS"].includes(A)?S("\u64CD\u4F5C\u6743\u9650\u4E0D\u8DB3\uFF0C\u8BF7\u68C0\u67E5\u5BF9\u5E94\u8D44\u6E90\u7684\u8BBF\u95EE\u6743\u9650\u3002"):A==="ENOSPC"?S("\u78C1\u76D8\u7A7A\u95F4\u4E0D\u8DB3\uFF0C\u8BF7\u91CA\u653E\u7A7A\u95F4\u540E\u91CD\u8BD5\u3002"):A==="ENOENT"?S("\u6240\u9700\u6587\u4EF6\u6216\u672C\u5730\u5DE5\u5177\u4E0D\u5B58\u5728\uFF0C\u8BF7\u68C0\u67E5\u5B89\u88C5\u548C\u914D\u7F6E\u3002"):A==="invalid-json"||A==="invalid-response"?S("\u6570\u636E\u683C\u5F0F\u65E0\u6548\uFF0C\u8BF7\u6309\u5931\u8D25\u9636\u6BB5\u68C0\u67E5\u670D\u52A1\u54CD\u5E94\u6216\u672C\u5730\u914D\u7F6E\u3002"):n.httpStatus===429?S("\u670D\u52A1\u6B63\u5728\u9650\u6D41\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002"):[401,403].includes(n.httpStatus)?S("\u670D\u52A1\u62D2\u7EDD\u4E86\u8BF7\u6C42\uFF0C\u8BF7\u68C0\u67E5\u51ED\u636E\u3001\u6743\u9650\u6216\u8BBF\u95EE\u9650\u5236\uFF1BHTTP \u72B6\u6001\u672C\u8EAB\u4E0D\u80FD\u786E\u8BA4\u767B\u5F55\u5931\u6548\u3002"):n.httpStatus>=500?S("\u76EE\u6807\u670D\u52A1\u6682\u65F6\u5F02\u5E38\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002"):n.httpStatus?S("\u76EE\u6807\u670D\u52A1\u8FD4\u56DE\u4E86 HTTP \u9519\u8BEF\uFF0C\u8BF7\u67E5\u770B\u8BCA\u65AD\u8BE6\u60C5\u3002"):S("\u6682\u672A\u8BC6\u522B\u5177\u4F53\u539F\u56E0\uFF0C\u8BF7\u590D\u5236\u8BCA\u65AD\u4FE1\u606F\uFF0C\u5E76\u67E5\u770B\u76F8\u540C\u53C2\u8003\u53F7\u7684 DSH \u65E5\u5FD7\u3002")}function rSe(n){return{"connector.test":"connection.test","connector.configure":"credential.verify","connector.reconnect":"connection.start","connector.remove":"account.remove",startup:"startup.load","connection.restore":"connection.start","connection.monitor":"connection.poll","connection.status":"status.read","connection.close":"connection.stop","provision.begin":"qr.begin","provision.poll":"qr.poll","provision.verify":"qr.verify","bot.auth.start":"qr.begin","bot.auth.poll":"qr.poll","bot.reconnect":"connection.start","bot.delete":"account.remove","permissions.status":"permission.check","bot.bind-credentials":"credential.verify","bot.bind-mailbox":"credential.verify","bot.bind-native":"permission.check","connection.test":"connection.test","message.send":"message.send","message.receive":"message.receive"}[n]??"operation"}function st({channel:n,logger:A=console,now:o=Date.now,prefix:a="IM-CONN",describe:e}={}){let i=new Map,t=(g,l)=>{try{A[g]?.(`[dsh-${n}] ${JSON.stringify(l)}`)}catch{}};function r(g,l={}){if(df.has(g))return g;if(l.reuse&&nk(g))return nk(g);let d=ft(g),u=d.chain.map(k=>df.get(k)).find(Boolean);if(u)return u;let B=e?.(g,l,d)??{},y=d.chain.find(k=>Object.hasOwn(h8,k.code??"")),Q=B.publicError??l.publicError??{};y&&!Q.code?.startsWith("stream-")&&(Q={...Q,code:y.code,message:S(h8[y.code])}),["email","imessage","office"].includes(n)&&!y&&l.untrustedPublicError&&(Q={code:`${n}-operation-failed`,message:S("\u64CD\u4F5C\u5931\u8D25\uFF0C\u8BF7\u67E5\u770B\u539F\u56E0\u548C\u8BCA\u65AD\u8BE6\u60C5\u3002")});let m=d.chain.map(k=>_d.get(k)).find(Boolean)??{},D=zo({...d.details,...l,...Q.details,...B.details,...m,channel:n,stage:m.stage??B.details?.stage??Q.details?.stage??l.stage??rSe(l.operation),...sk()}),M=Q.code??l.code??`${n}-operation-failed`,O=B.hint??Q.hint??Q.details?.hint??hf(D),R=S(Q.message)??S("\u64CD\u4F5C\u5931\u8D25\uFF0C\u8BF7\u67E5\u770B\u539F\u56E0\u548C\u8BCA\u65AD\u8BE6\u60C5\u3002"),F=JSON.stringify([l.botId,l.attemptId,D.operation,D.stage,M,D.reason,D.reasons,D.httpStatus,D.providerCode,D.resource,D.file,D.field,D.issue]),v=i.get(F),L=o(),H=k=>{let Y=new Error(k.message,{cause:g});return Y.code=k.code,Y.publicError=structuredClone(k),df.set(Y,Y),g&&typeof g=="object"&&u8.set(g,Y),Y};if(l.automatic&&v&&L-v.time<6e4)return v.retries+=1,H(v.publicError);v?.retries&&t("warn",{event:"connection-retries",referenceId:v.publicError.details.referenceId,retries:v.retries}),D.referenceId=zo({referenceId:Q.referenceId}).referenceId??`${a}-${eSe().replaceAll("-","").slice(0,8).toUpperCase()}`,D.occurredAt=new Date(L).toISOString(),D.hint=O;let G={code:M,message:R,details:D};return l.automatic&&(i.size>=128&&i.delete(i.keys().next().value),i.set(F,{time:L,publicError:G,retries:0,botId:l.botId})),t(l.warning?"warn":"error",{event:l.warning?"connection-warning":"connection-failure",code:M,...D,errors:d.errors,...zo({referenceId:l.parentReferenceId}).referenceId?{parentReferenceId:l.parentReferenceId}:{}}),H(G)}function s(g){for(let[l,d]of i)g!==void 0&&d.botId!==g||(d.retries&&t("info",{event:"connection-retries",referenceId:d.publicError.details.referenceId,retries:d.retries}),i.delete(l))}function c(g,l){df.has(g)&&zo({rollback:l}).rollback&&(g.publicError.details.rollback=l,g.publicError.details.hint=l==="succeeded"?S("\u64CD\u4F5C\u672A\u5B8C\u6210\uFF0C\u5DF2\u6062\u590D\u4E4B\u524D\u7684\u672C\u673A\u72B6\u6001\u3002\u8BF7\u5904\u7406\u4E0A\u8FF0\u95EE\u9898\u540E\u91CD\u8BD5\u3002"):S("\u539F\u8D26\u53F7\u72B6\u6001\u5C1A\u672A\u786E\u8BA4\uFF0C\u8BF7\u91CD\u65B0\u8BFB\u53D6\u72B6\u6001\uFF0C\u5E76\u53CD\u9988\u8BCA\u65AD\u4FE1\u606F\u3002"),t("info",{event:"connection-outcome",referenceId:g.publicError.details.referenceId,rollback:l}))}return{report:r,clear:s,outcome:c}}import{randomUUID as wSe}from"node:crypto";var E8=new WeakMap,ck=Symbol("dsh-im.connection-test-state-identity");function C8(n){return n?.[ck]??n}function iSe(n){return typeof n=="string"&&n.trim()?n.trim():null}function Wo(n,A){if(!n||!A||typeof A!="object")return!1;try{return E8.set(C8(n),structuredClone(A)),!0}catch{return!1}}function uf(n){let A=n?E8.get(C8(n)):null;return A?structuredClone(A):null}function ni(n,A=S("\u673A\u5668\u4EBA")){let o=iSe(n)??A;return`${S("\u2705 DeepSeek Harness \u8FDE\u63A5\u6D4B\u8BD5\u6210\u529F")}
|
|
140
|
+
`,{encoding:"utf8",flag:"wx",mode:384}),await Mme(o,this.#e)}catch(a){try{await s8(o)}catch(e){if(e?.code!=="ENOENT")throw new AggregateError([a,e])}throw a}}};var p8="https://oapi.dingtalk.com",Ume="DING_DWS_CLAW";function js(n){return typeof n=="string"&&n.trim()?n.trim():null}function d8(n,A){let o=Number(n);return Number.isFinite(o)&&o>0?o:A}function Hme(n){let A;try{A=new URL(js(n)??p8)}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 xme(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 Kme(n,A){if(!n||typeof n!="object"||Array.isArray(n))throw new Nc("invalid-response",`DingTalk ${A} returned an invalid response`,A);if(Number(n.errcode)!==0)throw new Nc("api-error",`DingTalk ${A} request was rejected`,A);return n}var Nc=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)}},NS=class{#e;#t;#A;#r;constructor({fetch:A=globalThis.fetch,clock:o=Date,baseUrl:a=p8,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=Hme(a),this.#r=e}async start({signal:A}={}){let o=await this.#a("/app/registration/init",{source:Ume},"initialization",A),a=js(o.nonce);if(!a)throw new Nc("missing-nonce","DingTalk registration initialization did not return a nonce","initialization");let e=await this.#a("/app/registration/begin",{nonce:a},"begin",A),i=js(e.device_code),t=js(e.verification_uri_complete);if(!i||!t)throw new Nc("incomplete-registration","DingTalk registration did not return complete QR metadata","begin");let r=d8(e.expires_in,7200),s=d8(e.interval,5)*1e3;return Object.freeze({deviceCode:i,verificationUrl:t,verificationUri:js(e.verification_uri),userCode:js(e.user_code),expiresAt:xme(this.#t)+r*1e3,pollIntervalMs:s})}async poll(A){let o=js(typeof A=="string"?A:A?.deviceCode),a=typeof A=="object"?A?.signal:void 0;if(!o)throw new TypeError("deviceCode is required");let e=await this.#a("/app/registration/poll",{device_code:o},"poll",a),i=js(e.status)?.toUpperCase(),t=["WAITING","SUCCESS","FAIL","EXPIRED"].includes(i)?i:"UNKNOWN";return Object.freeze({status:t,clientId:js(e.client_id),clientSecret:js(e.client_secret),failReason:js(e.fail_reason)})}async#a(A,o,a,e){let i,t=AbortSignal.timeout(this.#r),r=e?AbortSignal.any([e,t]):t;try{i=await this.#e(`${this.#A}${A}`,{method:"POST",headers:{accept:"application/json","content-type":"application/json"},body:JSON.stringify(o),redirect:"error",signal:r})}catch(c){throw e?.aborted?e.reason??c:t.aborted?new Nc("timeout",`DingTalk ${a} request timed out`,a,{cause:c,timeoutMs:this.#r}):c?.name==="AbortError"?c:new Nc("network-error",`DingTalk ${a} request could not be completed`,a,{cause:c})}if(!i||i.ok===!1||typeof i.json!="function")throw new Nc("http-error",`DingTalk ${a} request failed`,a,{status:i?.status});let s;try{s=await i.json()}catch(c){throw new Nc("invalid-json",`DingTalk ${a} returned invalid JSON`,a,{cause:c})}return Kme(s,a)}};import{randomUUID as eSe}from"node:crypto";var vh={name:"@xmanrui/dsh-im",version:"5.0.1",icon:"./assets/logo-plugin-message-link-gradient.webp",description:"\u628A\u5FAE\u4FE1\u3001\u98DE\u4E66\u3001\u4F01\u5FAE\u3001\u9489\u9489\u3001QQ\u3001Telegram\u3001WhatsApp\u3001Slack\u3001Discord\u3001Matrix\u63A5\u5165DSH\u3002 Connect Telegram, WhatsApp, Slack, Discord, Matrix, WeChat, Feishu, WeCom, DingTalk, and QQ to DSH.",keywords:["deepseek-harness","dsh","dsh-plugin","ai-agent","im","instant-messaging","chatbot","feishu","lark","wechat","wecom","dingtalk","qq","slack","telegram","discord","whatsapp","imessage","matrix","ai-office"],author:"xmanrui (https://github.com/xmanrui)",license:"MIT",type:"module",repository:{type:"git",url:"git+https://github.com/xmanrui/dsh-im.git"},homepage:"https://github.com/xmanrui/dsh-im#readme",bugs:{url:"https://github.com/xmanrui/dsh-im/issues"},publishConfig:{access:"public"},bin:{"dsh-im":"bin/dsh-im.mjs"},main:"./lib/index.js",exports:{".":"./lib/index.js","./client":"./lib/client.js","./package.json":"./package.json","./locale/*.json":"./locale/*.json"},files:["assets","bin","cordis.patch.yml","lib","locale/*.json","plugin-src","scripts/verify-interface-language.mjs","scripts/verify-injected-context.mjs","scripts/verify-lan-management.mjs","scripts/verify-model-setting.mjs","scripts/verify-package.mjs","scripts/verify-session-channel-logos.mjs","scripts/verify-session-title-prefix.mjs","src","PROACTIVE_DELIVERY.md","PROACTIVE_DELIVERY.en.md","docs/client-integration.md","LICENSE","README.md","README.en.md","THIRD_PARTY_NOTICES.md"],dsh:{bundle:{patch:"./cordis.patch.yml"},client:{inject:["@deepseek-ai/dsh-client-connection","@deepseek-ai/dsh-client-runtime","@deepseek-ai/dsh-client-ui-settings","@deepseek-ai/dsh-client-ui-slots","@deepseek-ai/dsh-client-locale"],platform:"web"},compatibility:{dsh:"0.2.1-rc.2",dshReleases:{"0.2.0-rc.2":"compatible","0.2.1-rc.2":"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.1"},devDependencies:{"@deepseek-ai/cordis":"4.0.1","@larksuiteoapi/node-sdk":"1.73.0","@whiskeysockets/baileys":"7.0.0-rc14",esbuild:"0.25.9","https-proxy-agent":"5.0.1",react:"18.3.1","react-dom":"18.3.1","react-test-renderer":"18.3.1",semver:"7.8.5"},directories:{doc:"docs",lib:"lib",test:"test"},optionalDependencies:{"@tencent-qqmail/agently-cli":"^1.0.18",sharp:"0.35.5"}};var jme=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"]),Jme=new Set(["session.prepare","prompt.prepare","interaction.open","prompt.submit","reply.wait","credential.verify","permission.check","sdk.load","operation","message.receive","message.send","connection.test","startup.load","qr.begin","qr.encode","qr.poll","qr.verify","qr.cancel","credential.read","credential.save","credential.remove","account.save","account.remove","state.load","state.write","state.cleanup","workspace.write","workspace.cleanup","runtime.prepare","activation","harness.check","connection.start","connection.poll","connection.stop","status.read","rollback","management.request"]),ok=new Set(["stream-closed-before-open","stream-failed-before-open","stream-failed","ENOTFOUND","EAI_AGAIN","ECONNREFUSED","ECONNRESET","EHOSTUNREACH","ENETUNREACH","ETIMEDOUT","EPIPE","UND_ERR_CONNECT_TIMEOUT","UND_ERR_HEADERS_TIMEOUT","UND_ERR_BODY_TIMEOUT","UND_ERR_SOCKET","CERT_HAS_EXPIRED","CERT_NOT_YET_VALID","DEPTH_ZERO_SELF_SIGNED_CERT","SELF_SIGNED_CERT_IN_CHAIN","UNABLE_TO_VERIFY_LEAF_SIGNATURE","UNABLE_TO_GET_ISSUER_CERT_LOCALLY","ERR_TLS_CERT_ALTNAME_INVALID","ERR_SSL_WRONG_VERSION_NUMBER","ENOENT","EACCES","EPERM","ENOSPC","EROFS","ENOTDIR","EISDIR","EBUSY","EIO","EXDEV","EMFILE","ENFILE","EEXIST","unknown","multiple-causes","timeout","http-error","provider-rejected","invalid-response","ERR_PROXY_CONNECTION_FAILED","ERR_TLS_HANDSHAKE_TIMEOUT","ERR_SSL_TLSV1_ALERT_INTERNAL_ERROR","ERR_NETWORK_ACCESS_DENIED","AUTHENTICATIONFAILED","EAUTH","invalid-json","invalid-config","read-only"]),qme=new Set(["credential-store","account-config","account-state","workspace-config","workspace-directory"]),zme=new Set(["host.describe","workspace.list","workspace.create","session.list","session.create","session.history","session.prompt","session.rename","session.cancel","session.models","session.permissions","session.selectModel","llm.models"]),Wme=new Set(["host-api","http","websocket"]),Vme=new Set(["not-submitted","accepted","unknown"]),Zme=new Set(["config.json","workspaces.json"]),RS=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"}),Xme=/^(?:\$|version|accounts(?:\[\d{1,10}\](?:\.(?:accountId|ownerUserId|botId|tokenRef|baseUrl))?)?|(?:workspaces|agentPresets|models)(?:\[\d{1,10}\]\.(?:key|value))?|deliveryTargets(?:\[\d{1,10}\]\.(?:key|targets(?:\[\d{1,10}\])?))?)$/;function zo(n){if(!n||typeof n!="object"||Array.isArray(n))return{};let A={};for(let[a,e]of[["operation",jme],["stage",Jme],["reason",ok],["resource",qme],["method",zme],["transport",Wme],["submissionState",Vme],["lastFailureReason",ok]])e.has(n[a])&&(A[a]=n[a]);if($me.includes(n.channel)&&(A.channel=n.channel),Array.isArray(n.reasons)){let a=[...new Set(n.reasons.filter(e=>ok.has(e)&&!["unknown","multiple-causes"].includes(e)))].slice(0,16);a.length&&(A.reasons=a)}for(let a of["durationMs","timeoutMs"])Number.isFinite(n[a])&&n[a]>=0&&(A[a]=Math.round(n[a]));Number.isSafeInteger(n.attempts)&&n.attempts>=0&&(A.attempts=n.attempts);for(let a of["nodeVersion","dshVersion"])typeof n[a]=="string"&&/^\d+\.\d+\.\d+(?:-[A-Za-z0-9.-]+)?$/.test(n[a])&&n[a].length<80&&(A[a]=n[a]);if(["darwin","linux","win32","freebsd"].includes(n.platform)&&(A.platform=n.platform),["ilinkai.weixin.qq.com","oapi.dingtalk.com","api.dingtalk.com","api.telegram.org","discord.com","slack.com","open.feishu.cn","qyapi.weixin.qq.com"].includes(n.host)&&(A.host=n.host),n.dependencies&&typeof n.dependencies=="object"){let a={};for(let e of["dingtalkStream","axios","httpsProxyAgent","agentBase"]){let i=n.dependencies[e];typeof i=="string"&&/^\d+\.\d+\.\d+(?:[-+][A-Za-z0-9.-]+)?$/.test(i)&&i.length<=80&&(a[e]=i)}Object.keys(a).length&&(A.dependencies=a)}typeof n.proxyConfigured=="boolean"&&(A.proxyConfigured=n.proxyConfigured),n.truncated===!0&&(A.truncated=!0),Zme.has(n.file)&&(A.file=n.file),typeof n.field=="string"&&Xme.test(n.field)&&(A.field=n.field),typeof n.issue=="string"&&Object.hasOwn(RS,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 $me=Object.freeze(["weixin","feishu","dingtalk","wecom","qq","slack","telegram","discord","whatsapp","wecom-app","imessage","email","office"]);function jl(n){if(!n?.details)return{};let A=zo({...n?.details,referenceId:n?.details?.referenceId??n?.referenceId,hint:n?.details?.hint??n?.hint});return Object.keys(A).length?{details:A}:{}}var df=new WeakMap,u8=new WeakMap,_d=new WeakMap,tSe={"harness-interaction-timeout":"timeout","harness-response-invalid":"invalid-response","connect-timeout":"timeout","telegram-timeout":"timeout","cli-timeout":"timeout","provider-timeout":"timeout","telegram-response-invalid":"invalid-response","office-protocol-mismatch":"invalid-response"},ASe=new Set(["Error","TypeError","SyntaxError","AggregateError","DOMException","AxiosError","TimeoutError","AbortError"]),h8={"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 kS(n){let A=[n],o=new Set,a=[];for(;A.length&&a.length<16;){let e=A.shift();!e||typeof e!="object"||o.has(e)||(o.add(e),a.push(e),e.cause&&typeof e.cause=="object"&&A.push(e.cause),Array.isArray(e.errors)&&A.push(...e.errors.slice(0,16)))}return{chain:a,truncated:A.some(e=>e&&typeof e=="object"&&!o.has(e))||a.some(e=>Array.isArray(e.errors)&&e.errors.length>16)}}function ft(n){let{chain:A,truncated:o}=kS(n),a=A.map(c=>({type:ASe.has(c.name)?c.name:"Error",...zo({reason:c.details?.reason,reasons:c.details?.reasons,httpStatus:c.details?.httpStatus,providerCode:c.details?.providerCode}),...zo({reason:tSe[c.code]??(c.name==="TimeoutError"?"timeout":c.code??(c instanceof SyntaxError?"invalid-json":void 0)),httpStatus:c.status??c.statusCode??c.response?.status,providerCode:c.providerCode}),hasCause:!!(c.cause&&typeof c.cause=="object"),hasErrors:Array.isArray(c.errors)})),e=[...new Set(a.flatMap(c=>c.reason==="multiple-causes"?c.reasons??[]:[c.reason]).filter(c=>c&&!["unknown","multiple-causes"].includes(c)))],i=e.filter(c=>!["timeout","http-error","provider-rejected","invalid-response"].includes(c)),t=i.length?i:e,r=c=>A.map(g=>zo({[c]:_d.get(g)?.[c]??g[c]??g.details?.[c]})[c]).find(g=>g!==void 0),s={};for(let c of["sessionId","promptRpcId"]){let g=A.map(l=>_d.get(l)?.[c]).find(l=>l!==void 0);typeof g=="string"&&/^[A-Za-z0-9_-]{1,256}$/u.test(g)&&(s[c]=g)}return{chain:A,errors:a,correlation:s,details:zo({reason:t.length>1?"multiple-causes":t[0]??"unknown",...t.length>1?{reasons:t}:{},httpStatus:a.find(c=>c.httpStatus!==void 0)?.httpStatus,providerCode:a.find(c=>c.providerCode!==void 0)?.providerCode,method:r("method"),transport:r("transport"),stage:r("stage"),submissionState:r("submissionState"),attempts:r("attempts"),lastFailureReason:r("lastFailureReason"),durationMs:r("durationMs"),timeoutMs:r("timeoutMs"),host:r("host"),truncated:o})}}function Td(n,A){if(n?.name==="AbortError")return n;let o=n&&typeof n=="object"?n:new Error("Message processing failed"),a=o instanceof DOMException?Object.defineProperties(new DOMException(o.message,o.name),Object.getOwnPropertyDescriptors(o)):Object.defineProperties(Object.setPrototypeOf(o instanceof Error?new Error:{},Object.getPrototypeOf(o)),Object.getOwnPropertyDescriptors(o));return _d.set(a,{...A,..._d.get(o)}),a}function sk(){return{pluginVersion:vh.version,nodeVersion:process.versions.node,platform:process.platform}}async function de(n,A,o){try{return await A()}catch(a){throw pf(a,n,o)}}function pf(n,A,o){return(!n||typeof n!="object")&&(n=new Error("Operation failed")),_d.has(n)||_d.set(n,zo({stage:A,resource:o})),n}function nk(n){return kS(n).chain.map(A=>df.get(A)??u8.get(A)).find(Boolean)}function FA(n,A,o,a){if(A?.name==="AbortError")return{ok:!1,error:{code:"cancelled",message:S("\u64CD\u4F5C\u5DF2\u53D6\u6D88\u3002"),details:{}}};if(o?.ok!==!1||["cancelled","bad-request"].includes(o.error?.code))return o;let e=nk(A)??n.report(A,{...a,publicError:o.error});return{...o,error:a?.untrustedPublicError?e.publicError:{...e.publicError,...o.error,details:e.publicError.details}}}function hf(n){let A=n.reason;return A==="multiple-causes"?S("\u68C0\u6D4B\u5230\u591A\u4E2A\u5E95\u5C42\u539F\u56E0\uFF0C\u8BF7\u5C55\u5F00\u8BCA\u65AD\u8BE6\u60C5\u9010\u9879\u68C0\u67E5\u3002"):["ENOTFOUND","EAI_AGAIN"].includes(A)?S("\u670D\u52A1\u57DF\u540D\u89E3\u6790\u5931\u8D25\uFF0C\u8BF7\u68C0\u67E5\u8FD0\u884C DSH \u7684\u673A\u5668\u7684 DNS \u548C\u7F51\u7EDC\u8BBE\u7F6E\u3002"):A==="ECONNREFUSED"?S("\u76EE\u6807\u62D2\u7EDD\u8FDE\u63A5\uFF0C\u8BF7\u68C0\u67E5\u670D\u52A1\u5730\u5740\u3001\u7AEF\u53E3\u548C\u8BBF\u95EE\u9650\u5236\u3002"):["ECONNRESET","EPIPE","UND_ERR_SOCKET"].includes(A)?S("\u8FDE\u63A5\u5DF2\u4E2D\u65AD\uFF0C\u8BF7\u68C0\u67E5\u7F51\u7EDC\u548C\u76EE\u6807\u670D\u52A1\u72B6\u6001\u3002"):["ENETUNREACH","EHOSTUNREACH","ERR_NETWORK_ACCESS_DENIED"].includes(A)?S("\u76EE\u6807\u7F51\u7EDC\u4E0D\u53EF\u8FBE\uFF0C\u8BF7\u68C0\u67E5\u8FD0\u884C DSH \u7684\u673A\u5668\u7684\u7F51\u7EDC\u51FA\u53E3\u548C\u8BBF\u95EE\u9650\u5236\u3002"):/CERT|TLS|SSL|ISSUER|SIGNATURE/.test(A??"")?S("TLS \u6216\u8BC1\u4E66\u6821\u9A8C\u5931\u8D25\uFF0C\u8BF7\u68C0\u67E5\u7CFB\u7EDF\u65F6\u95F4\u3001\u8BC1\u4E66\u94FE\u548C\u7F51\u7EDC\u8BBE\u7F6E\u3002"):/TIMEOUT/.test(A??"")||A==="ETIMEDOUT"||A==="timeout"?S("\u8BF7\u6C42\u8D85\u65F6\uFF0C\u8BF7\u68C0\u67E5\u76EE\u6807\u670D\u52A1\u548C\u7F51\u7EDC\uFF1B\u8BCA\u65AD\u8BE6\u60C5\u4E2D\u53EF\u67E5\u770B\u5DF2\u77E5\u7684\u8017\u65F6\u3002"):A==="ERR_PROXY_CONNECTION_FAILED"||n.httpStatus===407?S("\u4EE3\u7406\u8FDE\u63A5\u6216\u8BA4\u8BC1\u5931\u8D25\uFF0C\u8BF7\u68C0\u67E5 DSH \u8FDB\u7A0B\u4F7F\u7528\u7684\u4EE3\u7406\u914D\u7F6E\u3002"):["EAUTH","AUTHENTICATIONFAILED"].includes(A)?S("\u670D\u52A1\u8BA4\u8BC1\u5931\u8D25\uFF0C\u8BF7\u68C0\u67E5\u8D26\u53F7\u548C\u6388\u6743\u4FE1\u606F\u3002"):["EACCES","EPERM","EROFS"].includes(A)?S("\u64CD\u4F5C\u6743\u9650\u4E0D\u8DB3\uFF0C\u8BF7\u68C0\u67E5\u5BF9\u5E94\u8D44\u6E90\u7684\u8BBF\u95EE\u6743\u9650\u3002"):A==="ENOSPC"?S("\u78C1\u76D8\u7A7A\u95F4\u4E0D\u8DB3\uFF0C\u8BF7\u91CA\u653E\u7A7A\u95F4\u540E\u91CD\u8BD5\u3002"):A==="ENOENT"?S("\u6240\u9700\u6587\u4EF6\u6216\u672C\u5730\u5DE5\u5177\u4E0D\u5B58\u5728\uFF0C\u8BF7\u68C0\u67E5\u5B89\u88C5\u548C\u914D\u7F6E\u3002"):A==="invalid-json"||A==="invalid-response"?S("\u6570\u636E\u683C\u5F0F\u65E0\u6548\uFF0C\u8BF7\u6309\u5931\u8D25\u9636\u6BB5\u68C0\u67E5\u670D\u52A1\u54CD\u5E94\u6216\u672C\u5730\u914D\u7F6E\u3002"):n.httpStatus===429?S("\u670D\u52A1\u6B63\u5728\u9650\u6D41\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002"):[401,403].includes(n.httpStatus)?S("\u670D\u52A1\u62D2\u7EDD\u4E86\u8BF7\u6C42\uFF0C\u8BF7\u68C0\u67E5\u51ED\u636E\u3001\u6743\u9650\u6216\u8BBF\u95EE\u9650\u5236\uFF1BHTTP \u72B6\u6001\u672C\u8EAB\u4E0D\u80FD\u786E\u8BA4\u767B\u5F55\u5931\u6548\u3002"):n.httpStatus>=500?S("\u76EE\u6807\u670D\u52A1\u6682\u65F6\u5F02\u5E38\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002"):n.httpStatus?S("\u76EE\u6807\u670D\u52A1\u8FD4\u56DE\u4E86 HTTP \u9519\u8BEF\uFF0C\u8BF7\u67E5\u770B\u8BCA\u65AD\u8BE6\u60C5\u3002"):S("\u6682\u672A\u8BC6\u522B\u5177\u4F53\u539F\u56E0\uFF0C\u8BF7\u590D\u5236\u8BCA\u65AD\u4FE1\u606F\uFF0C\u5E76\u67E5\u770B\u76F8\u540C\u53C2\u8003\u53F7\u7684 DSH \u65E5\u5FD7\u3002")}function rSe(n){return{"connector.test":"connection.test","connector.configure":"credential.verify","connector.reconnect":"connection.start","connector.remove":"account.remove",startup:"startup.load","connection.restore":"connection.start","connection.monitor":"connection.poll","connection.status":"status.read","connection.close":"connection.stop","provision.begin":"qr.begin","provision.poll":"qr.poll","provision.verify":"qr.verify","bot.auth.start":"qr.begin","bot.auth.poll":"qr.poll","bot.reconnect":"connection.start","bot.delete":"account.remove","permissions.status":"permission.check","bot.bind-credentials":"credential.verify","bot.bind-mailbox":"credential.verify","bot.bind-native":"permission.check","connection.test":"connection.test","message.send":"message.send","message.receive":"message.receive"}[n]??"operation"}function st({channel:n,logger:A=console,now:o=Date.now,prefix:a="IM-CONN",describe:e}={}){let i=new Map,t=(g,l)=>{try{A[g]?.(`[dsh-${n}] ${JSON.stringify(l)}`)}catch{}};function r(g,l={}){if(df.has(g))return g;if(l.reuse&&nk(g))return nk(g);let d=ft(g),u=d.chain.map(k=>df.get(k)).find(Boolean);if(u)return u;let B=e?.(g,l,d)??{},y=d.chain.find(k=>Object.hasOwn(h8,k.code??"")),Q=B.publicError??l.publicError??{};y&&!Q.code?.startsWith("stream-")&&(Q={...Q,code:y.code,message:S(h8[y.code])}),["email","imessage","office"].includes(n)&&!y&&l.untrustedPublicError&&(Q={code:`${n}-operation-failed`,message:S("\u64CD\u4F5C\u5931\u8D25\uFF0C\u8BF7\u67E5\u770B\u539F\u56E0\u548C\u8BCA\u65AD\u8BE6\u60C5\u3002")});let m=d.chain.map(k=>_d.get(k)).find(Boolean)??{},D=zo({...d.details,...l,...Q.details,...B.details,...m,channel:n,stage:m.stage??B.details?.stage??Q.details?.stage??l.stage??rSe(l.operation),...sk()}),M=Q.code??l.code??`${n}-operation-failed`,O=B.hint??Q.hint??Q.details?.hint??hf(D),R=S(Q.message)??S("\u64CD\u4F5C\u5931\u8D25\uFF0C\u8BF7\u67E5\u770B\u539F\u56E0\u548C\u8BCA\u65AD\u8BE6\u60C5\u3002"),F=JSON.stringify([l.botId,l.attemptId,D.operation,D.stage,M,D.reason,D.reasons,D.httpStatus,D.providerCode,D.resource,D.file,D.field,D.issue]),v=i.get(F),L=o(),H=k=>{let Y=new Error(k.message,{cause:g});return Y.code=k.code,Y.publicError=structuredClone(k),df.set(Y,Y),g&&typeof g=="object"&&u8.set(g,Y),Y};if(l.automatic&&v&&L-v.time<6e4)return v.retries+=1,H(v.publicError);v?.retries&&t("warn",{event:"connection-retries",referenceId:v.publicError.details.referenceId,retries:v.retries}),D.referenceId=zo({referenceId:Q.referenceId}).referenceId??`${a}-${eSe().replaceAll("-","").slice(0,8).toUpperCase()}`,D.occurredAt=new Date(L).toISOString(),D.hint=O;let G={code:M,message:R,details:D};return l.automatic&&(i.size>=128&&i.delete(i.keys().next().value),i.set(F,{time:L,publicError:G,retries:0,botId:l.botId})),t(l.warning?"warn":"error",{event:l.warning?"connection-warning":"connection-failure",code:M,...D,errors:d.errors,...zo({referenceId:l.parentReferenceId}).referenceId?{parentReferenceId:l.parentReferenceId}:{}}),H(G)}function s(g){for(let[l,d]of i)g!==void 0&&d.botId!==g||(d.retries&&t("info",{event:"connection-retries",referenceId:d.publicError.details.referenceId,retries:d.retries}),i.delete(l))}function c(g,l){df.has(g)&&zo({rollback:l}).rollback&&(g.publicError.details.rollback=l,g.publicError.details.hint=l==="succeeded"?S("\u64CD\u4F5C\u672A\u5B8C\u6210\uFF0C\u5DF2\u6062\u590D\u4E4B\u524D\u7684\u672C\u673A\u72B6\u6001\u3002\u8BF7\u5904\u7406\u4E0A\u8FF0\u95EE\u9898\u540E\u91CD\u8BD5\u3002"):S("\u539F\u8D26\u53F7\u72B6\u6001\u5C1A\u672A\u786E\u8BA4\uFF0C\u8BF7\u91CD\u65B0\u8BFB\u53D6\u72B6\u6001\uFF0C\u5E76\u53CD\u9988\u8BCA\u65AD\u4FE1\u606F\u3002"),t("info",{event:"connection-outcome",referenceId:g.publicError.details.referenceId,rollback:l}))}return{report:r,clear:s,outcome:c}}import{randomUUID as wSe}from"node:crypto";var E8=new WeakMap,ck=Symbol("dsh-im.connection-test-state-identity");function C8(n){return n?.[ck]??n}function iSe(n){return typeof n=="string"&&n.trim()?n.trim():null}function Wo(n,A){if(!n||!A||typeof A!="object")return!1;try{return E8.set(C8(n),structuredClone(A)),!0}catch{return!1}}function uf(n){let A=n?E8.get(C8(n)):null;return A?structuredClone(A):null}function ni(n,A=S("\u673A\u5668\u4EBA")){let o=iSe(n)??A;return`${S("\u2705 DeepSeek Harness \u8FDE\u63A5\u6D4B\u8BD5\u6210\u529F")}
|
|
141
141
|
${S("\u8FD9\u6761\u6D88\u606F\u7531\u300CIM\u673A\u5668\u4EBA\u300D\u8BBE\u7F6E\u9875\u4E2D\u7684\u201C{name}\u201D\u673A\u5668\u4EBA\u5361\u7247\u53D1\u51FA\u3002",{name:o})}`}function nr(n=S("\u673A\u5668\u4EBA")){let A=new Error(S("{channelLabel}\u5C1A\u672A\u6536\u5230\u53EF\u7528\u4E8E\u6D4B\u8BD5\u7684\u79C1\u804A\u6D88\u606F\u3002",{channelLabel:n}));return A.code="test-target-unavailable",A}async function Vo({state:n,send:A,text:o,channelLabel:a}){let e=uf(n);if(!e)throw nr(a);return await A(e,o),{sent:!0}}function YA(n,{diagnostics:A,botId:o}={}){return Object.freeze(n?{sent:!1,code:n?.code==="test-target-unavailable"?"test-target-unavailable":"test-message-failed",...A&&n?.code!=="test-target-unavailable"?{error:A.report(n,{operation:"connection.test",stage:"connection.test",botId:o}).publicError}:{}}:{sent:!0})}import{randomUUID as aSe}from"node:crypto";var oSe=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"}),nSe=Object.freeze({HARNESS_INTERACTION_TIMEOUT:"\u4E0E DSH \u7684\u4EA4\u4E92\u901A\u9053\u5728 30 \u79D2\u5185\u672A\u5C31\u7EEA\uFF0C\u672C\u6761\u6D88\u606F\u5C1A\u672A\u63D0\u4EA4\u6267\u884C\u3002\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002",HARNESS_CONNECT:"\u65E0\u6CD5\u8FDE\u63A5\u5904\u7406\u670D\u52A1\uFF0C\u6D88\u606F\u5C1A\u672A\u63D0\u4EA4\u3002\u8BF7\u786E\u8BA4 DeepSeek Harness \u6B63\u5728\u8FD0\u884C\u540E\u91CD\u8BD5\u3002",HARNESS_TIMEOUT:"\u5904\u7406\u670D\u52A1\u54CD\u5E94\u8D85\u65F6\uFF0C\u6D88\u606F\u5C1A\u672A\u5F00\u59CB\u5904\u7406\u3002\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002",HARNESS_RESULT_UNCERTAIN:"\u6682\u65F6\u65E0\u6CD5\u786E\u8BA4\u4EFB\u52A1\u72B6\u6001\uFF0C\u4EFB\u52A1\u53EF\u80FD\u5DF2\u7ECF\u5F00\u59CB\u3002\u8BF7\u5148\u7B49\u5F85\u6216\u53D1\u9001 /stop\uFF0C\u4E0D\u8981\u7ACB\u5373\u91CD\u590D\u63D0\u4EA4\u3002",HARNESS_ACCESS:"\u5904\u7406\u670D\u52A1\u62D2\u7EDD\u4E86\u673A\u5668\u4EBA\u8FDE\u63A5\u3002\u8BF7\u7BA1\u7406\u5458\u68C0\u67E5 Harness \u5730\u5740\u3001\u4EE3\u7406\u6216\u8BBF\u95EE\u914D\u7F6E\u540E\u91CD\u8BD5\u3002",HARNESS_PROTOCOL:"\u673A\u5668\u4EBA\u4E0E DeepSeek Harness \u7684\u63A5\u53E3\u4E0D\u517C\u5BB9\u3002\u8BF7\u7BA1\u7406\u5458\u68C0\u67E5 Harness \u5730\u5740\u5E76\u66F4\u65B0\u76F8\u5173\u7248\u672C\u3002",HARNESS_SERVICE:"DeepSeek Harness \u6682\u65F6\u65E0\u6CD5\u5B8C\u6210\u8BF7\u6C42\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002",MODEL_REPLY_TIMEOUT:"\u7B49\u5F85\u6A21\u578B\u56DE\u590D\u8D85\u65F6\uFF0C\u4EFB\u52A1\u53EF\u80FD\u4ECD\u5728\u8FD0\u884C\u3002\u8BF7\u5148\u7B49\u5F85\u6216\u53D1\u9001 /stop\uFF0C\u4E0D\u8981\u7ACB\u5373\u91CD\u590D\u63D0\u4EA4\u3002",MODEL_AUTH:"\u6A21\u578B\u51ED\u636E\u7F3A\u5931\u6216\u5DF2\u5931\u6548\u3002\u8BF7\u7BA1\u7406\u5458\u68C0\u67E5\u6A21\u578B\u914D\u7F6E\u540E\u91CD\u8BD5\u3002",MODEL_QUOTA:"\u6A21\u578B\u989D\u5EA6\u6216\u4F59\u989D\u4E0D\u8DB3\uFF0C\u672C\u6B21\u4EFB\u52A1\u672A\u5B8C\u6210\u3002\u8BF7\u7BA1\u7406\u5458\u8865\u5145\u989D\u5EA6\u6216\u5207\u6362\u6A21\u578B\u540E\u91CD\u8BD5\u3002",MODEL_RATE_LIMIT:"\u6A21\u578B\u670D\u52A1\u6B63\u5728\u9650\u6D41\uFF0C\u672C\u6B21\u4EFB\u52A1\u672A\u5B8C\u6210\u3002\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002",MODEL_CONTEXT_LIMIT:"\u5F53\u524D\u4F1A\u8BDD\u5185\u5BB9\u8D85\u8FC7\u6A21\u578B\u4E0A\u4E0B\u6587\u4E0A\u9650\u3002\u8BF7\u53D1\u9001 /compact \u6216 /new \u540E\u91CD\u8BD5\u3002",MODEL_UNAVAILABLE:"\u5F53\u524D\u6A21\u578B\u4E0D\u5B58\u5728\u6216\u4E0D\u652F\u6301\u6240\u9009\u914D\u7F6E\u3002\u8BF7\u53D1\u9001 /models\uFF0C\u518D\u7528 /model <\u5E8F\u53F7> \u4E3A\u5F53\u524D\u804A\u5929\u91CD\u65B0\u9009\u62E9\u3002\u82E5\u8981\u4FEE\u6539\u540E\u7EED\u65B0\u4F1A\u8BDD\u7684\u9ED8\u8BA4\u6A21\u578B\uFF0C\u8BF7\u5230 DSH \u8BBE\u7F6E \u2192 IM\u673A\u5668\u4EBA \u2192 \u5BF9\u5E94\u673A\u5668\u4EBA\u5361\u7247\u4FEE\u6539\u3002",MODEL_CONFIG:"\u5F53\u524D\u6A21\u578B\u4E0D\u652F\u6301\u8FD9\u7C7B\u5185\u5BB9\u6216\u6240\u9009\u914D\u7F6E\u3002\u8BF7\u8C03\u6574\u5185\u5BB9\u3001\u6A21\u578B\u6216\u63A8\u7406\u7B49\u7EA7\u540E\u91CD\u8BD5\u3002",MODEL_TIMEOUT:"\u6A21\u578B\u670D\u52A1\u54CD\u5E94\u8D85\u65F6\uFF0C\u672C\u6B21\u4EFB\u52A1\u672A\u5B8C\u6210\u3002\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002",MODEL_TRANSPORT:"\u6682\u65F6\u65E0\u6CD5\u8FDE\u63A5\u6A21\u578B\u670D\u52A1\uFF0C\u672C\u6B21\u4EFB\u52A1\u672A\u5B8C\u6210\u3002\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002",MODEL_SERVICE:"\u6A21\u578B\u670D\u52A1\u6682\u65F6\u5F02\u5E38\uFF0C\u672C\u6B21\u4EFB\u52A1\u672A\u5B8C\u6210\u3002\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002",MODEL_STREAM:"\u6A21\u578B\u56DE\u590D\u4E2D\u65AD\u6216\u683C\u5F0F\u5F02\u5E38\uFF0C\u672C\u6B21\u4EFB\u52A1\u672A\u5B8C\u6210\u3002\u8BF7\u91CD\u8BD5\u3002",MODEL_EMPTY_REPLY:"\u6A21\u578B\u6CA1\u6709\u8FD4\u56DE\u53EF\u663E\u793A\u7684\u5185\u5BB9\u3002\u8BF7\u91CD\u8BD5\uFF1B\u82E5\u6301\u7EED\u53D1\u751F\uFF0C\u8BF7\u5207\u6362\u6A21\u578B\u3002",MODEL_CONTENT_REJECTED:"\u6A21\u578B\u62D2\u7EDD\u5904\u7406\u5F53\u524D\u5185\u5BB9\u3002\u8BF7\u8C03\u6574\u95EE\u9898\u5185\u5BB9\u540E\u91CD\u8BD5\u3002",MODEL_OUTPUT_LIMIT:"\u6A21\u578B\u8FBE\u5230\u8F93\u51FA\u957F\u5EA6\u4E0A\u9650\uFF0C\u4F46\u6CA1\u6709\u751F\u6210\u53EF\u663E\u793A\u7684\u7ED3\u679C\u3002\u8BF7\u7F29\u5C0F\u4EFB\u52A1\u8303\u56F4\u540E\u91CD\u8BD5\u3002",TURN_BLOCKED:"\u672C\u8F6E\u5904\u7406\u88AB\u963B\u6B62\uFF0C\u672A\u80FD\u5B8C\u6210\u3002\u8BF7\u5728 DSH \u4E2D\u67E5\u770B\u4F1A\u8BDD\u72B6\u6001\u548C\u76F8\u5173\u63D0\u793A\u3002",TURN_INTERRUPTED:"\u4EFB\u52A1\u88AB\u610F\u5916\u4E2D\u65AD\uFF0C\u672C\u6B21\u672A\u5B8C\u6210\u3002\u8BF7\u91CD\u8BD5\u3002",SESSION_NOT_FOUND:"\u5F53\u524D\u4F1A\u8BDD\u5DF2\u4E0D\u5B58\u5728\u3002\u8BF7\u53D1\u9001 /new \u521B\u5EFA\u65B0\u4F1A\u8BDD\u540E\u91CD\u8BD5\u3002",SESSION_ARCHIVED:"\u5F53\u524D\u4F1A\u8BDD\u5DF2\u5F52\u6863\uFF0C\u65E0\u6CD5\u7EE7\u7EED\u5904\u7406\u3002\u8BF7\u5728 DSH \u4E2D\u53D6\u6D88\u5F52\u6863\uFF0C\u6216\u53D1\u9001 /new \u521B\u5EFA\u65B0\u4F1A\u8BDD\u3002",SESSION_BUSY:"\u5F53\u524D\u4F1A\u8BDD\u4ECD\u5728\u5904\u7406\u4E0A\u4E00\u9879\u4EFB\u52A1\u3002\u8BF7\u7B49\u5F85\u5B8C\u6210\uFF0C\u6216\u53D1\u9001 /stop \u540E\u91CD\u8BD5\u3002",SESSION_STALE:"\u5DE5\u4F5C\u533A\u6216\u4F1A\u8BDD\u72B6\u6001\u521A\u521A\u53D1\u751F\u53D8\u5316\u3002\u8BF7\u91CD\u65B0\u53D1\u9001\u8FD9\u6761\u6D88\u606F\u3002",WORKSPACE_UNAVAILABLE:"\u5F53\u524D\u5DE5\u4F5C\u533A\u4E0D\u5B58\u5728\u6216\u6682\u4E0D\u53EF\u7528\u3002\u8BF7\u91CD\u65B0\u9009\u62E9\u5DE5\u4F5C\u533A\u540E\u91CD\u8BD5\u3002",PRESET_UNAVAILABLE:"\u5F53\u524D Agent Preset \u65E0\u6CD5\u4F7F\u7528\u3002\u8BF7\u53D1\u9001 /presetlist \u67E5\u770B\u53EF\u7528\u9879\uFF0C\u4F7F\u7528 /preset <\u5E8F\u53F7\u6216 ID> \u91CD\u65B0\u9009\u62E9\uFF0C\u518D\u53D1\u9001 /new \u521B\u5EFA\u65B0\u4F1A\u8BDD\u540E\u91CD\u8BD5\u3002\u5982\u9700\u7EE7\u7EED\u539F\u4F1A\u8BDD\uFF0C\u8BF7\u8054\u7CFB\u7BA1\u7406\u5458\u6062\u590D\u539F Preset\u3002",CHANNEL_PERMISSION:"\u56DE\u590D\u5DF2\u7ECF\u751F\u6210\uFF0C\u4F46\u673A\u5668\u4EBA\u6CA1\u6709\u53D1\u9001\u6743\u9650\u3002\u8BF7\u8054\u7CFB\u7BA1\u7406\u5458\u68C0\u67E5\u6E20\u9053\u6743\u9650\u6216\u91CD\u65B0\u7ED1\u5B9A\u673A\u5668\u4EBA\u3002",CHANNEL_RATE_LIMIT:"\u56DE\u590D\u5DF2\u7ECF\u751F\u6210\uFF0C\u4F46\u5F53\u524D\u6E20\u9053\u6B63\u5728\u9650\u6D41\uFF0C\u6682\u65F6\u65E0\u6CD5\u53D1\u9001\u3002\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002",CHANNEL_DELIVERY_UNCERTAIN:"\u56DE\u590D\u53D1\u9001\u7ED3\u679C\u672A\u80FD\u786E\u8BA4\u3002\u8BF7\u5148\u68C0\u67E5\u804A\u5929\u5185\u662F\u5426\u5DF2\u7ECF\u6536\u5230\uFF0C\u4E0D\u8981\u7ACB\u5373\u91CD\u590D\u63D0\u4EA4\u3002",CHANNEL_DELIVERY:"\u56DE\u590D\u5DF2\u7ECF\u751F\u6210\uFF0C\u4F46\u5F53\u524D\u6E20\u9053\u6682\u65F6\u65E0\u6CD5\u53D1\u9001\u3002\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002",INPUT_INVALID:"\u5F53\u524D\u6D88\u606F\u5305\u542B\u65E0\u6CD5\u5904\u7406\u7684\u56FE\u7247\u6216\u6587\u4EF6\u3002\u8BF7\u8C03\u6574\u540E\u91CD\u65B0\u53D1\u9001\u3002",REQUEST_TIMEOUT:"\u8BF7\u6C42\u8D85\u65F6\uFF0C\u5F53\u524D\u64CD\u4F5C\u7ED3\u679C\u5C1A\u672A\u786E\u8BA4\u3002\u8BF7\u5148\u68C0\u67E5\u4EFB\u52A1\u72B6\u6001\u6216\u804A\u5929\u8BB0\u5F55\uFF0C\u4E0D\u8981\u7ACB\u5373\u91CD\u590D\u63D0\u4EA4\u3002",NETWORK_ERROR:"\u7F51\u7EDC\u8BF7\u6C42\u5931\u8D25\uFF0C\u5F53\u524D\u64CD\u4F5C\u7ED3\u679C\u5C1A\u672A\u786E\u8BA4\u3002\u8BF7\u5148\u68C0\u67E5\u4EFB\u52A1\u72B6\u6001\u6216\u804A\u5929\u8BB0\u5F55\uFF0C\u4E0D\u8981\u7ACB\u5373\u91CD\u590D\u63D0\u4EA4\u3002",INTERNAL_UNKNOWN:"\u4EFB\u52A1\u672A\u5B8C\u6210\uFF0C\u6682\u65F6\u65E0\u6CD5\u786E\u5B9A\u539F\u56E0\u3002\u8BF7\u91CD\u8BD5\uFF1B\u82E5\u6301\u7EED\u53D1\u751F\uFF0C\u8BF7\u5C06\u53C2\u8003\u53F7\u63D0\u4F9B\u7ED9\u7BA1\u7406\u5458\u3002"});function sSe(n){if(n?.code!=="harness-turn-failed")return null;let A=n?.providerCode??n?.details?.providerCode;return typeof A!="string"?null:oSe[A.trim().toUpperCase()]??null}function cSe(n,A){let o=typeof n?.code=="string"?n.code:"",a=sSe(n);if(a)return a;if(o==="harness-interaction-timeout")return"HARNESS_INTERACTION_TIMEOUT";let e=A.submissionState===void 0?["session.prompt","session.history"].includes(n?.method):A.submissionState!=="not-submitted";if(o==="harness-connect-failed")return e?"HARNESS_RESULT_UNCERTAIN":"HARNESS_CONNECT";if(o==="harness-timeout")return e?"HARNESS_RESULT_UNCERTAIN":"HARNESS_TIMEOUT";if(o==="harness-reply-timeout")return"MODEL_REPLY_TIMEOUT";if(["harness-auth-required","harness-proxy-auth-required","harness-loopback-forbidden","harness-host-untrusted","harness-request-forbidden"].includes(o))return"HARNESS_ACCESS";if(["harness-api-not-found","harness-response-invalid","gateway/input-invalid"].includes(o))return"HARNESS_PROTOCOL";if(o==="harness-turn-failed")return"INTERNAL_UNKNOWN";if(["harness-http-failed","harness-rpc-rejected"].includes(o))return"HARNESS_SERVICE";if(o==="model-unavailable"||o==="session/model-unavailable")return"MODEL_UNAVAILABLE";if(o==="model-empty-response")return"MODEL_EMPTY_REPLY";if(o==="model-max-tokens")return"MODEL_OUTPUT_LIMIT";if(o==="turn-blocked")return"TURN_BLOCKED";if(["turn-interrupted","turn-aborted"].includes(o))return"TURN_INTERRUPTED";if(o==="session-not-found")return"SESSION_NOT_FOUND";if(o==="session-archived")return"SESSION_ARCHIVED";if(o==="agent-busy")return"SESSION_BUSY";if(o==="workspace-session-stale")return"SESSION_STALE";if(o.startsWith("workspace-"))return"WORKSPACE_UNAVAILABLE";if(/^agent-preset[-/]/u.test(o))return"PRESET_UNAVAILABLE";if(o.startsWith("image-")||o.startsWith("inbound-file-")||o==="attachment-error")return"INPUT_INVALID";let i=Number(n?.status??n?.httpStatus);return i===401||i===403||["channel-permission","permission-required","artifact-permission-required","forbidden","stale-token"].includes(o)?"CHANNEL_PERMISSION":i===429||["channel-rate-limit","rate-limited","artifact-rate-limited"].includes(o)?"CHANNEL_RATE_LIMIT":["channel-delivery-uncertain","delivery-uncertain","artifact-delivery-uncertain"].includes(o)||n?.deliveryOutcome==="unknown"?"CHANNEL_DELIVERY_UNCERTAIN":o==="channel-delivery-failed"||o.startsWith("artifact-")||o==="network-error"?"CHANNEL_DELIVERY":"INTERNAL_UNKNOWN"}function gSe(n,A){if(n?.name==="AbortError"||n?.code==="cancelled")return"INTERNAL_UNKNOWN";let o=A.reason==="multiple-causes"?A.reasons:[A.reason],a=i=>i==="timeout"||i==="ETIMEDOUT"||/_TIMEOUT$/u.test(i);if(o?.length&&o.every(a))return"REQUEST_TIMEOUT";let e=i=>a(i)||["ENOTFOUND","EAI_AGAIN","ECONNREFUSED","ECONNRESET","EPIPE","UND_ERR_SOCKET","ENETUNREACH","EHOSTUNREACH","ERR_NETWORK_ACCESS_DENIED","ERR_PROXY_CONNECTION_FAILED"].includes(i)||/CERT|TLS|SSL|ISSUER|SIGNATURE/u.test(i);return o?.length&&o.every(e)?"NETWORK_ERROR":"INTERNAL_UNKNOWN"}function lSe(n){return typeof n=="string"&&/^[A-Z0-9-]{6,40}$/u.test(n)?n:`MF-${aSe().slice(0,8).toUpperCase()}`}function f8(n){return typeof n!="string"||!/^[A-Za-z0-9_/-]{1,64}$/u.test(n)?null:n.toUpperCase().replace(/[-/]/gu,"_")}function ISe(n,{userMessage:A,reason:o,referenceId:a,at:e=Date.now()}={}){let i=f8(o),t=ft(n).details,r=cSe(n,t),s=r==="INTERNAL_UNKNOWN"&&i&&typeof A=="string"&&A.trim()?"INPUT_INVALID":r,c=s==="INTERNAL_UNKNOWN"?gSe(n,t):s;(c==="REQUEST_TIMEOUT"||c==="NETWORK_ERROR")&&(t.hint=hf(t)),(t.stage||t.submissionState)&&Object.assign(t,sk());let g=nSe[c];return["INTERNAL_UNKNOWN","REQUEST_TIMEOUT","NETWORK_ERROR"].includes(c)&&(t.submissionState==="not-submitted"?g=c==="REQUEST_TIMEOUT"?"\u6D88\u606F\u63D0\u4EA4\u524D\u7684\u64CD\u4F5C\u8D85\u65F6\uFF0C\u672C\u6761\u6D88\u606F\u5C1A\u672A\u63D0\u4EA4\u6267\u884C\u3002\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002":c==="NETWORK_ERROR"?"\u6D88\u606F\u63D0\u4EA4\u524D\u7684\u7F51\u7EDC\u8BF7\u6C42\u5931\u8D25\uFF0C\u672C\u6761\u6D88\u606F\u5C1A\u672A\u63D0\u4EA4\u6267\u884C\u3002\u8BF7\u68C0\u67E5\u8FDE\u63A5\u540E\u91CD\u8BD5\u3002":"\u6D88\u606F\u5728\u63D0\u4EA4\u524D\u5904\u7406\u5931\u8D25\uFF0C\u5C1A\u672A\u63D0\u4EA4\u6267\u884C\u3002\u8BF7\u91CD\u8BD5\uFF1B\u82E5\u6301\u7EED\u53D1\u751F\uFF0C\u8BF7\u5C06\u53C2\u8003\u53F7\u63D0\u4F9B\u7ED9\u7BA1\u7406\u5458\u3002":t.submissionState&&(g="\u6D88\u606F\u5DF2\u5C1D\u8BD5\u63D0\u4EA4\uFF0C\u4F46\u4EFB\u52A1\u7ED3\u679C\u5C1A\u672A\u786E\u8BA4\u3002\u8BF7\u5148\u5230 DSH \u67E5\u770B\u72B6\u6001\uFF0C\u4E0D\u8981\u7ACB\u5373\u91CD\u590D\u63D0\u4EA4\uFF1B\u82E5\u6301\u7EED\u53D1\u751F\uFF0C\u8BF7\u5C06\u53C2\u8003\u53F7\u63D0\u4F9B\u7ED9\u7BA1\u7406\u5458\u3002")),Object.freeze({...c==="INTERNAL_UNKNOWN"||t.reason!=="unknown"||t.httpStatus||t.providerCode||t.method||t.stage||t.submissionState?{details:t}:{},code:c,reason:i??f8(n?.code)??c,message:typeof A=="string"&&A.trim()?A.trim():S(g)+(c==="SESSION_ARCHIVED"&&n?.promptAccepted===!0?`
|
|
142
142
|
${S("\u672C\u6761\u6D88\u606F\u53EF\u80FD\u4ECD\u5728\u4F1A\u8BDD\u961F\u5217\u4E2D\uFF0C\u8BF7\u5148\u5230 DSH \u67E5\u770B\u72B6\u6001\uFF0C\u907F\u514D\u91CD\u590D\u63D0\u4EA4\u3002")}`:""),referenceId:lSe(a),at:Number.isFinite(e)?e:Date.now()})}function Wt(n){return`${n.message}
|
|
143
143
|
|
|
@@ -426,7 +426,7 @@ ID\uFF1A{id}`,{title:r,id:t?.sessionId??a}),S("\u53D1\u9001 /history \u67E5\u770
|
|
|
426
426
|
\u25B8 ${i}`:e}}async#dt(A,o,a,e,i=null,{billable:t=!0}={}){let r=this.#V.get(o)??{lastSentAt:0,count:0,breakerLogged:!1};if(this.#V.set(o,r),await this.#AA(r),t&&r.count>=cre){r.breakerLogged||(r.breakerLogged=!0,this.#w.warn?.(`[dsh-feishu] step push hit ${cre} messages for this turn; staying silent until it ends`)),r.silenceSince=this.#J.now(),r.activitySeq=(r.activitySeq??0)+1;return}this.#m?.throwIfAborted();let s=r.lastSentAt+Nje-this.#J.now();s>0&&await this.#J.delay(s),this.#m?.throwIfAborted(),r.lastSentAt=this.#J.now(),r.silenceSince=r.lastSentAt,r.activitySeq=(r.activitySeq??0)+1,t&&(r.count+=1),this.#S.streamUpdates=(this.#S.streamUpdates??0)+1,await this.#Tt(A,i,a,e)}#tt(A,o,a){let e=this.#x.get(A);return e||(e={blocks:[],messageId:null,chatId:o,replyToMessageId:a,broken:!1,lastRenderAt:0,renderQueued:!1,renderChain:null,chunkCount:1,cardIds:[],activeCardStart:0,renderedCardContents:new Map,answerStart:null,answerEnd:null,answerVersion:0,renderedAnswerVersion:0},this.#x.set(A,e)),e}async#At(A,o,a,e,{billable:i=!0}={}){let t=this.#tt(A,o,a);if(t.broken)return;let r=t.blocks[t.blocks.length-1];if((e.kind==="tools"||e.kind==="notes")&&r?.kind===e.kind)for(let s of e.lines)this.#zt(r,s);else t.blocks.push(e);i&&(this.#S.streamUpdates=(this.#S.streamUpdates??0)+1),this.#Mt(A,o)}#zt(A,o){Array.isArray(A.lines)||(A.lines=[]),A.omitted=Number(A.omitted)||0;let a=Buffer.byteLength(A.lines.join(`
|
|
427
427
|
`),"utf8"),e=Buffer.byteLength(o,"utf8");for(;A.lines.length>0&&a+e>Yje;){let i=A.lines.shift();A.omitted+=1,a-=Buffer.byteLength(`${i}
|
|
428
428
|
`,"utf8")}A.lines.push(o)}#Wt(A,o,a,e){let i=this.#tt(A,o,a);if(i.broken)return;let t=String(e??"");t.trim()&&(this.#Vt(i,t),this.#Mt(A,o))}#Vt(A,o){let e=(Buffer.byteLength(JSON.stringify(o),"utf8")+128<=Ire?[o]:Js(o,Math.floor((Ire-128)/6))).map(i=>({kind:"message",text:i}));A.answerStart!==null?A.blocks.splice(A.answerStart,A.answerEnd-A.answerStart+1,...e):A.blocks.push(...e),A.answerStart=A.blocks.length-e.length,A.answerEnd=A.blocks.length-1,A.answerVersion=(A.answerVersion??0)+1}#Zt(A,o){let a=this.#x.get(A);if(!a||a.broken)return;let e=String(o??"");if(!e.trim())return;a.answerStart!==null&&(a.blocks.splice(a.answerStart,a.answerEnd-a.answerStart+1),a.answerStart=null,a.answerEnd=null);let i=e.length>dre?`${e.slice(0,dre)}\u2026`:e,t=a.blocks[a.blocks.length-1];t?.kind==="notes"?this.#zt(t,i):a.blocks.push({kind:"notes",lines:[i],omitted:0}),this.#Mt(A,a.chatId)}#Mt(A,o){let a=this.#x.get(A);if(!a||a.broken||a.renderQueued)return;a.renderQueued=!0;let e=Math.max(0,a.lastRenderAt+Hje-this.#J.now()),i=a.renderChain??Promise.resolve();a.renderChain=i.catch(()=>{}).then(()=>this.#J.delay(e)).then(()=>this.#KA(o,a)).finally(()=>{a.renderQueued=!1})}async#xA(A,o,a,e){let i=A.sessionSyncSessionId;!i||typeof this.#r.setMirror!="function"||await this.#r.setMirror(A.sessionSyncKey,{sessionId:i,turn:A.sessionSyncTurn,targetId:A.sessionSyncTargetId,chatId:A.chatId,cardIds:[...A.cardIds],claimedAt:Date.now(),lastContent:rO(o,{status:a,stepCardPanels:e}),blocks:structuredClone(A.blocks),answerStart:A.answerStart,answerEnd:A.answerEnd,lastSeq:this.#oe.get(A.sessionSyncKey)?.lastSeq??-1,pendingStep:this.#oe.get(A.sessionSyncKey)?.pendingStep??null})}async#_t(A,o,a,e){let i=A.answerVersion??0,t=A.cardIds.slice(A.activeCardStart),r=o.length?[...o]:[[]];for(;r.length<t.length;)r.unshift([{kind:"message",text:S("\u5185\u5BB9\u5DF2\u5408\u5E76\u81F3\u540E\u7EED\u6D88\u606F\u3002")}]);let s=r.map((c,g)=>rO(c,{status:g===r.length-1?a:"sealed",stepCardPanels:e}));for(let c=0;c<s.length;c+=1){let g=t[c],l=s[c];g?A.renderedCardContents.get(g)!==l&&await this.#$t(g,l):(g=await this.#ne(A.chatId,l,A.deliveryViaOpenId?{receiveIdType:"open_id"}:{replyTo:A.replyToMessageId}),A.cardIds.push(g),t.push(g)),A.renderedCardContents.set(g,l)}A.messageId=t.at(-1),A.chunkCount=t.length,A.renderedAnswerVersion=i}async#KA(A,o){if(o.broken)return;let a=this.#W,e=iO(o.blocks,void 0,void 0,a);if(!e.length&&o.messageId===null)return;let i=e[e.length-1]??[];try{await this.#_t(o,e,"running",a),await this.#xA(o,i,"running",a),o.lastRenderAt=this.#J.now()}catch(t){o.broken=!0,o.lastError=t,this.#w.warn?.("[dsh-feishu] step streaming card render failed; the turn continues without it:",yy(t)),o.deliveryViaOpenId&&this.#w.warn?.("[dsh-feishu] session-sync mirror card render failed:",yy(t),{sessionId:o.sessionSyncSessionId,turn:o.sessionSyncTurn})}}async#rt(A,{stopped:o=!1,answerText:a=null}={}){let e=this.#x.get(A);if(this.#x.delete(A),!e)return null;try{await e.renderChain?.catch?.(()=>{})}catch{}if(e.broken)return{ok:!1,error:e.lastError};let i=o?"stopped":"completed",t=typeof a=="string"?a:"",r=e.answerStart!==null;t.trim()&&this.#Vt(e,t);let s=this.#W,c=iO(e.blocks,void 0,void 0,s);try{return await this.#_t(e,c,i,s),{ok:!0,cardIds:e.cardIds}}catch(g){return e.messageId!==null&&t.trim()&&(e.renderedAnswerVersion??0)===(e.answerVersion??0)&&r?(this.#w.warn?.("[dsh-feishu] step streaming card seal failed; the delivered answer stays visible:",g?.message??String(g)),{ok:!0,cardIds:e.cardIds}):(this.#w.warn?.("[dsh-feishu] step streaming card finish failed:",yy(g),{sessionId:e.sessionSyncSessionId,turn:e.sessionSyncTurn}),{ok:!1,error:g})}}#Xt(A){let o=this.#qt(A.arguments);return{kind:"tools",lines:[`\u2705 ${fy(A.name)||S("\u5DE5\u5177")}${o?` \u2014 ${o}`:""}`],omitted:0}}#YA(A){let o=this.#U.get(A);o&&(o.requested=!0)}async#jA(A){let o=this.#x.get(A);if(!(!o||o.broken)&&(await o.renderChain?.catch?.(()=>{}),!o.broken&&o.messageId!==null)){try{let a=this.#W,e=iO(o.blocks,void 0,void 0,a);await this.#_t(o,e,"sealed",a)}catch(a){this.#w.warn?.("[dsh-feishu] step streaming card rotate seal failed:",a?.message??String(a))}o.activeCardStart=o.cardIds.length,o.renderedCardContents.clear(),o.blocks=[],o.messageId=null,o.chunkCount=1,o.answerStart=null,o.answerEnd=null,o.lastRenderAt=0}}async#$t(A,o){let a=await this.#Xe("step card patch",()=>this.#e.im.v1.message.patch({path:{message_id:A},data:{content:o}}));if(a?.code&&a.code!==0){let e=new Error(`Feishu step card patch failed: ${a.msg||a.code}`);throw e.code=a.code,e.feishuCode=a.code,e}}async#Tt(A,o,a,e){let i=JSON.stringify({zh_cn:{content:a}});if(!o){let s=await this.#k(A,e);return{ok:!0,messageId:typeof s=="string"?s:null}}let t=this.#Ie(o),r=null;for(let s=0;s<3;s+=1)try{let c=await this.#eA(A,o,"post",i,t);return{ok:!0,messageId:Ve(c?.data?.message_id)??null}}catch(c){if(r=c,s<2&&this.#JA(c)){await new Promise(g=>setTimeout(g,300*(s+1)));continue}break}try{let s=await this.#eA(A,o,"text",JSON.stringify({text:e}),t);return{ok:!0,messageId:Ve(s?.data?.message_id)??null}}catch(s){r=r??s}this.#w.warn?.("[dsh-feishu] step push post failed; falling back to main chat text:",r?.message??String(r));try{let s=await this.#k(A,e);return{ok:!0,messageId:typeof s=="string"?s:null}}catch(s){return this.#w.warn?.("[dsh-feishu] step push send failed:",s?.message??String(s)),{ok:!1,error:r??s}}}async#eA(A,o,a,e,i){let t=await this.#e.im.v1.message.reply({path:{message_id:o},data:{msg_type:a,content:e,...i?{reply_in_thread:!0}:{}}});if(t?.code&&t.code!==0){let r=new Error(`Feishu reply failed: ${t.msg||t.code}`);throw r.code=t.code,r.feishuCode=t.code,r}return await this.#Ce(o,A,t?.data?.thread_id),t}#JA(A){return[A?.code,A?.feishuCode,A?.response?.data?.code].map(a=>String(a??"")).some(a=>a==="230020"||a==="230006")||/230020|230006/.test(A?.message??"")}#tA(A){let o=Math.max(0,Math.floor(A/1e3));return`${Math.floor(o/60)}:${String(o%60).padStart(2,"0")}`}async#AA(A){let o=[];for(let e of A.pendingRecallIds??[]){let i=!1;try{i=await this.#t?.recallMessage?.(e.id)===!0}catch(r){this.#w.warn?.("[dsh-feishu] heartbeat recall failed:",r?.message??String(r))}if(i)continue;let t=(e.attempts??0)+1;if(t>=Gje){this.#w.warn?.(`[dsh-feishu] heartbeat recall gave up after ${t} attempts: ${e.id}`);continue}o.push({id:e.id,attempts:t})}A.pendingRecallIds=o;let a=A.heartbeatMessageId;a&&!o.some(e=>e.id===a)&&(A.heartbeatMessageId=null)}async#rA(A,o){let a=!1;try{a=await this.#t?.recallMessage?.(o)===!0}catch(e){this.#w.warn?.("[dsh-feishu] late heartbeat recall failed:",e?.message??String(e))}a||(A.pendingRecallIds=[...A.pendingRecallIds??[],{id:o,attempts:1}])}#qA(A,o,a){let e=this.#V.get(A);if(!e)return{stop:async()=>{}};e.heartbeatStopped=!1,e.heartbeatMessageId=null,e.heartbeatNextAttemptAt=0;let i={stopped:!1};return(async()=>{try{for(;!i.stopped&&!this.#m?.aborted&&!e.heartbeatStopped;){if(await new Promise(l=>setTimeout(l,10)),i.stopped||this.#m?.aborted||e.heartbeatStopped)return;let t=this.#J.now(),r=t-(e.silenceSince??e.turnStartedAt??t);if(e.heartbeatMessageId){if(t-(e.heartbeatUpdatedAt??0)<Lje)continue;let l=this.#tA(t-(e.heartbeatShownAt??e.heartbeatUpdatedAt));if(e.heartbeatUpdatedAt=this.#J.now(),e.heartbeatUpdates=(e.heartbeatUpdates??0)+1,e.heartbeatUpdates>Fje){e.heartbeatStopped=!0;continue}try{let d=await this.#e.im.v1.message.update({path:{message_id:e.heartbeatMessageId},data:{msg_type:"post",content:JSON.stringify({zh_cn:{content:[[{tag:"text",text:S("\u23F3 \u6B63\u5728\u601D\u8003\u4E2D\u2026\uFF08\u5DF2\u8FD0\u884C {elapsed}\uFF09",{elapsed:l})}]]}})}});d?.code&&d.code!==0&&this.#w.warn?.("[dsh-feishu] heartbeat update failed:",d.msg||d.code)}catch(d){this.#w.warn?.("[dsh-feishu] heartbeat update failed:",d.message)}continue}if(t<(e.heartbeatNextAttemptAt??0)||r<Pje)continue;let s=e.activitySeq??0,c=t,g=await this.#Tt(o,a,[[{tag:"text",text:S("\u23F3 \u6B63\u5728\u601D\u8003\u4E2D\u2026\uFF08\u5DF2\u8FD0\u884C {elapsed}\uFF09",{elapsed:this.#tA(0)})}]],S("\u23F3 \u6B63\u5728\u601D\u8003\u4E2D\u2026"));if(i.stopped||this.#m?.aborted){g.ok&&g.messageId&&await this.#rA(e,g.messageId);return}if((e.activitySeq??0)!==s){g.ok&&g.messageId&&await this.#rA(e,g.messageId);continue}g.ok?(e.heartbeatMessageId=g.messageId??null,e.pendingRecallIds=[...e.pendingRecallIds??[],{id:g.messageId,attempts:0}],e.heartbeatShownAt=c,e.heartbeatUpdatedAt=c):e.heartbeatNextAttemptAt=t+5e3}}catch(t){this.#m?.aborted||this.#w.warn?.("[dsh-feishu] thinking status watchdog failed:",t.message)}})(),{stop:async()=>{i.stopped=!0,await this.#AA(e)}}}async#iA(A,o,a){let e=this.#g.get(A.message.message_id),i=async d=>{let u=cA(d)||rr(d),B=u?await nn(d,{signal:this.#m,deferImages:!0}):d.content,y=Ua(B,e,()=>({channel:"feishu",senderId:sc(A),chatId:A.message.chat_id,threadId:A.message.thread_id}));return{content:u||y!==B?y:void 0,contextEnhanced:y!==B,sourceGuidance:e?.config?.guidance}},t=Ve(A.message.root_id);if(!(A.message.chat_type==="group"&&Ve(A.message.thread_id)&&t&&a.replyTo?.messageId===t&&(Ve(a.content)||cA(a)||aA(a))))return i(a);let s={...a};delete s.replyTo;let c=await i(s),g,l=!1;return{...c,prepareContent:async({sessionId:d})=>{g=d,l=!1;let u=this.#j.get(o);return u?.sessionId===d&&u.rootMessageId===t?c.content??a.content:(await i({...a,replyTo:{...a.replyTo,load:async y=>{let Q=await a.replyTo.load(y);return l=!Q?.unavailableReason&&!!(Ve(Q?.content)||Q?.attachments?.length),Q}}})).content},onAskComplete:d=>{!l||d!==g||(!this.#j.has(o)&&this.#j.size>=dje&&this.#j.delete(this.#j.keys().next().value),this.#j.set(o,{sessionId:d,rootMessageId:t}))}}}async#zA(A,o,a,{onAskComplete:e}={}){this.#Ht(o);let i=A.message.chat_id,t=A.message.message_id,r=a.content,s=!1,c=_=>{s||(s=!0,g.onAskComplete?.(_),this.#xt(o),e?.())},g=await this.#iA(A,o,a),{content:l,contextEnhanced:d}=g,u=this.#V.get(o);if(this.#V.size>=qje&&!u){let _=this.#V.keys().next().value;_!==void 0&&this.#V.delete(_)}this.#V.set(o,{silenceSince:this.#J.now(),turnStartedAt:this.#J.now(),lastSentAt:u?.lastSentAt??0,pendingRecallIds:u?.pendingRecallIds??[],activitySeq:0,count:0,breakerLogged:!1});let B=this.#z===ko.LIVE_COT&&this.#Ie(t),y=this.#z===ko.STREAMING_CARD||B,Q=this.#z===ko.LIVE_COT&&!B&&typeof this.#t?.createCot=="function"&&typeof this.#t?.writeCotEvents=="function",m=Q?new sO(this.#t,i,{replyTo:t,hidden:!1,onFailure:_=>this.#w.warn?.("[dsh-feishu] native live process failed; final answer will continue:",_?.message??String(_))}):null;y&&(this.#x.has(o)&&await this.#rt(o),this.#tt(o,i,t));let D=y?{requested:!1}:null;y&&this.#U.set(o,D);let M=this.#It(A,o,a.files,a.images);(d||l)&&(y?await this.#At(o,i,t,{kind:"message",text:S("\u{1F4CE} \u5DF2\u6CE8\u5165\u4F1A\u8BDD\u4E0A\u4E0B\u6587")},{billable:!1}):await this.#dt(i,o,[[{tag:"text",text:S("\u{1F4CE} \u5DF2\u6CE8\u5165\u4F1A\u8BDD\u4E0A\u4E0B\u6587")}]],S("\u{1F4CE} \u5DF2\u6CE8\u5165\u4F1A\u8BDD\u4E0A\u4E0B\u6587"),t,{billable:!1}));let O=null,R=async()=>{if(!O)return;let _=O;if(O=null,y){this.#Zt(o,_.text);return}await this.#dt(i,o,[[{tag:"md",text:`\u{1F4AC} ${_.text}`}]],`\u{1F4AC} ${_.text}`,t)},F=y||Q?null:this.#qA(o,i,t),v;try{v=await Fa({deferredDelivery:()=>({coordinator:this.#re,chatId:i,replyToMessageId:t}),harness:this.#A,state:this.#r,key:o,text:r,content:l,titleText:A.batchSubmission?.title,sourceGuidance:g.sourceGuidance,prepareContent:g.prepareContent,contextEnhanced:d,createOptions:{signal:this.#m},existsOptions:{signal:this.#m},askOptions:{...M,progressMode:Q?"live":"all",...y?{onInteraction:async _=>{(_?.kind==="question"||_?.kind==="approval")&&await this.#jA(o),await M.onInteraction?.(_)}}:{},onUpdate:async _=>{if(Q){await m.handle(_),_.type==="assistant-message"?O=_:_.type==="tool"&&(O=null);return}if(_.type==="assistant-message"){O&&Number(_.step)>Number(O.step)&&await R(),O=_,y&&this.#Wt(o,i,t,_.text);return}if(_.type==="tool"){if(await R(),y){await this.#At(o,i,t,this.#Xt(_));return}let{paragraphs:P,fallbackText:q}=this.#HA(_);await this.#dt(i,o,P,q,t);return}if(_.type==="status"&&_.error){let P=fy(_.toolName)||S("\u5DE5\u5177"),q=fy(_.error).slice(0,vje);if(y){await this.#At(o,i,t,{kind:"message",text:`\u26A0\uFE0F **${P}** \u2014 ${q}`});return}await this.#dt(i,o,[[{tag:"md",text:`\u26A0\uFE0F **${P}** \u2014 ${q}`}]],`\u26A0\uFE0F ${P} \u2014 ${q}`,t)}}}})}catch(_){throw await m?.finish(_),y&&(this.#U.delete(o),await this.#rt(o,{stopped:!0})),_}finally{await F?.stop()}c(v.sessionId),await m?.finish();let L=O?O.text:null;O=null;let H=typeof L=="string"&&L.trim()?L:v.answer,G=rg(H,v.artifacts??[]);if(y){let _=await this.#rt(o,{answerText:G,stopped:D?.requested===!0});if(this.#U.delete(o),_?.ok){let P=HA({deliveryId:t,presentation:"feishu-step-push-card",providerMessageIds:_.cardIds});return this.#S.streamResponses=(this.#S.streamResponses??0)+1,await this.#we(o,i,G,t),{...await this.#Me(i,t,v.artifacts??[],P),textDeliveryErrors:0}}}let k,Y=null;try{let _=[],P=jje(G),q=-1;for(let Z=0;Z<P.length;Z+=1){let X=P[Z],Ae=await this.#Tt(i,t,[[{tag:"md",text:X}]],X);if(!Ae.ok){Y??=new Error(Ae.error?.message??"step push post delivery failed",{cause:Ae.error}),q=Z;break}Ae.messageId&&_.push(Ae.messageId)}if(Y)throw Y.failedChunkIndex=q,Y.providerMessageIds=_,Y.remainingChunks=P.slice(q),Y;k=HA({deliveryId:t,presentation:Q?"feishu-live-cot-answer":"feishu-step-push-post",providerMessageIds:_}),this.#S.streamResponses=(this.#S.streamResponses??0)+1,await this.#we(o,i,G,t)}catch(_){this.#S.streamErrors=(this.#S.streamErrors??0)+1,this.#w.warn?.("[dsh-feishu] step push post failed; sending final text:",_.message);let P=null,q=Array.isArray(_?.providerMessageIds)?[..._.providerMessageIds]:[],Z=Array.isArray(_?.remainingChunks)?_.remainingChunks:[G];for(let W of Z)try{let ee=await this.#et(i,W,{deliveryId:t,presentation:"feishu-step-push-text",replyTo:t});q.push(...ee.providerMessageIds)}catch(ee){P=Rr(ee),this.#w.warn?.("[dsh-feishu] fallback text delivery failed; continuing with result files:",ee);break}k=q.length>0?HA({deliveryId:t,presentation:"feishu-step-push-post-and-text",providerMessageIds:q}):void 0;let X=await this.#Me(i,t,v.artifacts??[],k),Ae=X.receipt.artifacts.some(({outcome:W})=>W==="sent"||W==="unknown");if(P&&!Ae&&!X.failureNoticeVisible)throw P;return P&&X.artifactSendErrors===0&&_t(this.#S,P),this.#S.streamFallbacks=(this.#S.streamFallbacks??0)+1,await this.#we(o,i,G,t),{...X,textDeliveryErrors:P?1:0}}return await this.#we(o,i,G,t),{...await this.#Me(i,t,v.artifacts??[],k),textDeliveryErrors:0}}async#WA(A,o,a,{onAskComplete:e}={}){this.#Ht(o);let i=A.message.chat_id,t=A.message.message_id,r=a.content,s=!1,c=D=>{s||(s=!0,g.onAskComplete?.(D),this.#xt(o),e?.())};if(this.#Y&&this.#t?.stream)return this.#zA(A,o,a,{onAskComplete:e});let g=await this.#iA(A,o,a),{content:l,contextEnhanced:d}=g;if(!this.#t?.stream){let{sessionId:D,answer:M,artifacts:O=[]}=await Fa({deferredDelivery:()=>({coordinator:this.#re,chatId:i,replyToMessageId:t}),harness:this.#A,state:this.#r,key:o,text:r,content:l,titleText:A.batchSubmission?.title,sourceGuidance:g.sourceGuidance,prepareContent:g.prepareContent,contextEnhanced:d,createOptions:{signal:this.#m},existsOptions:{signal:this.#m},askOptions:this.#It(A,o,a.files,a.images)});c(D);let R,F=null;try{R=await this.#et(i,rg(M,O),{deliveryId:t,presentation:"feishu-text",replyTo:t})}catch(H){F=Rr(H),this.#w.warn?.("[dsh-feishu] final text delivery failed; continuing with result files:",H)}await this.#we(o,i,rg(M,O),t);let v=await this.#Me(i,t,O,R),L=v.receipt.artifacts.some(({outcome:H})=>H==="sent"||H==="unknown");if(F&&!L&&!v.failureNoticeVisible)throw F;return F&&v.artifactSendErrors===0&&_t(this.#S,F),this.#S.streamFallbacks=(this.#S.streamFallbacks??0)+1,{...v,textDeliveryErrors:F?1:0}}let u=!1,B="",y=[],Q;try{Q=await this.#t.stream(i,{markdown:async D=>{u=!0;let M=this.#It(A,o,a.files,a.images),O={...M,onInteraction:async F=>{try{(F?.kind==="question"||F?.kind==="approval")&&typeof D?.rotate=="function"&&await D.rotate(),await M.onInteraction(F)}finally{D?.interactionPresented?.()}},onUpdate:async F=>{await D.setContent(this.#er(F),{transient:F.type!=="text"}),this.#S.streamUpdates=(this.#S.streamUpdates??0)+1}},R=await Fa({deferredDelivery:()=>({coordinator:this.#re,chatId:i,replyToMessageId:t}),harness:this.#A,state:this.#r,key:o,text:r,content:l,titleText:A.batchSubmission?.title,sourceGuidance:g.sourceGuidance,prepareContent:g.prepareContent,contextEnhanced:d,createOptions:{signal:this.#m},existsOptions:{signal:this.#m},askOptions:O});c(R.sessionId),B=R.answer,y=R.artifacts??[],await D.setContent(rg(B,y)),await this.#we(o,i,rg(B,y),t)}},{replyTo:t,...this.#Ie(t)?{replyInThread:!0,onReplyThreadId:async D=>this.#Ce(t,i,D)}:{}})}catch(D){if(this.#S.streamErrors=(this.#S.streamErrors??0)+1,B||y.length>0){this.#w.warn?.("[dsh-feishu] native stream failed after generation; sending final text:",D.message);let G,k=null;try{G=await this.#et(i,rg(B,y),{deliveryId:t,presentation:"feishu-text-fallback",replyTo:t})}catch(_){k=Rr(_),this.#w.warn?.("[dsh-feishu] fallback text delivery failed; continuing with result files:",_)}await this.#we(o,i,rg(B,y),t);let Y=await this.#Me(i,t,y,G),U=Y.receipt.artifacts.some(({outcome:_})=>_==="sent"||_==="unknown");if(k&&!U&&!Y.failureNoticeVisible)throw k;return k&&Y.artifactSendErrors===0&&_t(this.#S,k),this.#S.streamFallbacks=(this.#S.streamFallbacks??0)+1,{...Y,textDeliveryErrors:k?1:0}}if(u)throw D;this.#w.warn?.("[dsh-feishu] native stream unavailable; using text fallback:",D.message);let{sessionId:M,answer:O,artifacts:R=[]}=await Fa({deferredDelivery:()=>({coordinator:this.#re,chatId:i,replyToMessageId:t}),harness:this.#A,state:this.#r,key:o,text:r,content:l,titleText:A.batchSubmission?.title,sourceGuidance:g.sourceGuidance,prepareContent:g.prepareContent,contextEnhanced:d,createOptions:{signal:this.#m},existsOptions:{signal:this.#m},askOptions:this.#It(A,o,a.files,a.images)});c(M);let F,v=null;try{F=await this.#et(i,rg(O,R),{deliveryId:t,presentation:"feishu-text-fallback",replyTo:t})}catch(G){v=Rr(G),this.#w.warn?.("[dsh-feishu] fallback text delivery failed; continuing with result files:",G)}await this.#we(o,i,rg(O,R),t);let L=await this.#Me(i,t,R,F),H=L.receipt.artifacts.some(({outcome:G})=>G==="sent"||G==="unknown");if(v&&!H&&!L.failureNoticeVisible)throw v;return v&&L.artifactSendErrors===0&&_t(this.#S,v),this.#S.streamFallbacks=(this.#S.streamFallbacks??0)+1,{...L,textDeliveryErrors:v?1:0}}let m=await this.#Me(i,t,y,HA({deliveryId:t,presentation:"feishu-cardkit",providerMessageIds:Ai(Q)}));return this.#S.streamResponses=(this.#S.streamResponses??0)+1,m}async#VA(A,o,a,e,i){this.#m?.throwIfAborted();let t=this.#c.get(a),r=e.claimedReplyMessageId===o;if(!t||t!==e||t.submitting)return this.#Nt(A,a)?this.#Rt(A,o):r&&(!t||t!==e)?this.#Rt(A,o):this.#me(A,o,a,i,{releaseMessageId:!1,finalize:!1});if(this.#r.hasSeen(o))return;await this.#r.markSeen(o),this.#S.lastMessageAt=new Date().toISOString(),this.#S.messagesReceived+=1;let s=Bp(A);if(!s){await this.#k(A.message.chat_id,S("\u8BF7\u7528\u6587\u5B57\u56DE\u7B54\u5F53\u524D\u95EE\u9898\u3002"));return}let c=this.#c.get(a);if(!c||c!==e||c.submitting){if(this.#Nt(A,a)){await this.#k(A.message.chat_id,Qp(),{replyTo:A.message.message_id}).catch(()=>{});return}if(r&&(!c||c!==e)){await this.#k(A.message.chat_id,Qp(),{replyTo:A.message.message_id});return}return this.#me(A,o,a,i,{releaseMessageId:!1,alreadyRecorded:!0,finalize:!1})}if(c.chatId=A.message.chat_id,c.needsPresentation){try{await this.#pt(c)}catch{this.#S.lastError="\u98DE\u4E66\u4EA4\u4E92\u95EE\u9898\u53D1\u9001\u5931\u8D25\u3002",this.#w.error?.("[dsh-feishu] failed to retry an interaction question"),c.interaction.reconnect?.()}return}c.questions[c.index]&&await this.#aA(c,s,{chatId:A.message.chat_id,messageId:o,questionMessageId:c.questionCardMessageId})}async#ZA(A,o,a){if(this.#m?.aborted||this.#c.get(o)!==a)return;let e=a.questions[a.index],i=a.questionCardMessageId,t=a.index,r=a.submitting;a.submitting=!0;try{await Ui("/stop",this.#A,this.#r,o,{signal:this.#m,control:{owner:this,key:o}})}catch(c){this.#c.get(o)===a&&(a.submitting=r),this.#w.warn?.("[dsh-feishu] could not stop the question turn for an image:",c.message),await this.#k(A.message.chat_id,S("\u56FE\u7247\u5DF2\u6392\u961F\uFF0C\u4F46\u6682\u65F6\u65E0\u6CD5\u7ED3\u675F\u5F53\u524D\u63D0\u95EE\u3002\u8BF7\u5148\u56DE\u7B54\u95EE\u9898\u6216\u53D1\u9001 /stop\uFF0C\u7ED3\u675F\u540E\u4F1A\u7EE7\u7EED\u5904\u7406\u56FE\u7247\u3002"),{replyTo:A.message.message_id}).catch(()=>{});return}await this.#ht(o,a.interactionId);let s=S("\u5DF2\u7ED3\u675F\u672C\u8F6E\u63D0\u95EE\uFF0C\u5C06\u5728\u5F53\u524D\u4F1A\u8BDD\u4E2D\u7EE7\u7EED\u5904\u7406\u56FE\u7247\u3002");i&&await this.#Ze(A.message.chat_id,i,VH({...e,interactionId:a.interactionId,index:t,total:a.questions.length,resolvedText:s})),await this.#k(A.message.chat_id,s,{replyTo:A.message.message_id}).catch(()=>{})}async#aA(A,o,{chatId:a,messageId:e,questionMessageId:i}={}){let t=A.questions[A.index];if(!t)return;A.chatId=a??A.chatId;let r=A.index,s=are({interactionId:A.interactionId,question:t.question,header:t.header,detail:t.detail,options:Array.isArray(t?.options)?t.options:[],chosen:o,index:r,total:A.questions.length}),c=()=>this.#Ze(A.chatId,i??A.questionCardMessageId,s);if(A.answers.push(ho(t,o)),A.index+=1,A.index<A.questions.length){A.claimedReplyMessageId===e&&(A.claimedReplyMessageId=null),A.needsPresentation=!0,await c();try{await this.#pt(A)}catch{this.#S.lastError="\u98DE\u4E66\u4EA4\u4E92\u95EE\u9898\u53D1\u9001\u5931\u8D25\u3002",this.#w.error?.("[dsh-feishu] failed to send the next interaction question"),A.interaction.reconnect?.()}return}A.submitting=!0;let g=A.key;try{await A.interaction.respond({ok:!0,value:{sessionId:A.sessionId,answer:{answers:A.answers}}}),await c(),this.#s.set(A.interactionId,Date.now()+nre),this.#it(g,A),this.#kt(g,A.interactionId),this.#S.lastError=null}catch(l){if(this.#m?.aborted||this.#c.get(g)!==A)return;if(l?.code==="interaction-not-pending"){this.#it(g,A),this.#kt(g,A.interactionId),a&&e&&await this.#k(a,Qp(),{replyTo:e}).catch(()=>{});return}A.submitting=!1,A.answers.pop(),A.index-=1,this.#S.lastError="\u56DE\u7B54\u63D0\u4EA4\u5931\u8D25\u3002",this.#w.error?.("[dsh-feishu] failed to answer a Harness interaction"),a&&await this.#k(a,S("\u56DE\u7B54\u63D0\u4EA4\u5931\u8D25\uFF0C\u8BF7\u91CD\u65B0\u53D1\u9001\u5F53\u524D\u95EE\u9898\u7684\u7B54\u6848\u3002")).catch(()=>{})}}#oA({key:A,actor:o,chatId:a,requiresMention:e,replyToMessageId:i,receiveIdType:t,validate:r,send:s=c=>this.#k(a,c,{replyTo:i})}){let c=null,g=null;return{key:A,actor:o,requiresMention:e,send:s,validate:r,...this.#xe?{render:async l=>{g={toolName:l.toolCall?.name??l.interaction.payload.toolName,operation:Wje(l.toolCall),reason:l.interaction.payload.reason,approvalId:l.approvalId},c=await this.#ne(a,zH(g),{key:A,replyTo:i,receiveIdType:t}).catch(async()=>(await s(l.text),null))},onResolved:async l=>{if(!c)return;if(!await this.#Ze(a,c,zH({...g,resolvedText:l})))throw new Error("Approval card update failed")}}:{}}}async presentSessionSyncApproval(A,o,a={}){return this.#M.handleSessionSyncRequested(A,this.#oA(o),{...a,runtimeSignal:this.#m,accessPolicy:this.#l})}async#XA(A,{key:o,actor:a,chatId:e,requiresMention:i,replyToMessageId:t}){if(await this.#M.handleRequested(A,this.#oA({key:o,actor:a,chatId:e,requiresMention:i,replyToMessageId:t}))||A?.kind!=="question")return;let r=A?.payload?.questions,s=typeof A?.interactionId=="string"?A.interactionId:A?.rpcId;if(typeof A.rpcId!="string"||typeof s!="string"||typeof A.sessionId!="string"||!Array.isArray(r)||r.length===0||r.some(l=>!po(l))){this.#w.warn?.("[dsh-feishu] ignored an invalid Harness question interaction");return}if(A.recovered===!0){await A.respond({ok:!1,error:{code:"cancelled",message:"Feishu safely cancelled an interaction left by an earlier client.",details:{}}}),await this.#k(e,S("\u68C0\u6D4B\u5230\u8FD9\u4E2A Session \u4E2D\u9057\u7559\u7684\u5F85\u56DE\u7B54\u95EE\u9898\uFF0C\u5DF2\u5B89\u5168\u53D6\u6D88\u5E76\u7EE7\u7EED\u5904\u7406\u4F60\u521A\u624D\u7684\u6D88\u606F\u3002"),{replyTo:t}).catch(()=>{});return}let c=this.#c.get(o);if(c?.interactionId===s){c.interaction=A,c.needsPresentation&&await this.#pt(c);return}if(this.#I.has(s))return;if(c){await A.respond({ok:!1,error:{code:"cancelled",message:"Feishu is already handling another user interaction.",details:{}}});return}let g={kind:"question",interactionId:s,sessionId:A.sessionId,interaction:A,key:o,actor:a,requiresMention:i,questions:r,answers:[],index:0,chatId:e,replyToMessageId:t,queue:null,claimedReplyMessageId:null,submitting:!1,needsPresentation:!0,questionMessageIds:new Set,questionCardMessageId:null,inactive:!1};this.#c.set(o,g),this.#I.set(g.interactionId,o),await this.#pt(g)}async#$A(A){if(await this.#M.handleResolved(A))return;let o=A?.interactionId;if(A?.kind!=="question"||typeof o!="string")return;let a=this.#I.get(o);if(!a)return;let e=this.#c.get(a);e&&this.#it(a,e),this.#kt(a,o)}async#pt(A){let o=A.questions[A.index];if(!o)return;let a=Array.isArray(o?.options)?o.options:[],e=this.#xe&&a.length>0&&o.multiSelect!==!0,i,t=!1;A.questionCardMessageId=null,e?i=await this.#ne(A.chatId,VH({interactionId:A.interactionId,header:o.header,question:o.question,detail:o.detail,options:a,index:A.index,total:A.questions.length}),{key:A.key,replyTo:A.replyToMessageId}).then(r=>(t=!0,r)).catch(async()=>this.#k(A.chatId,Yi(o,A.index,A.questions.length,{requiresMention:A.requiresMention}),{replyTo:A.replyToMessageId})):i=await this.#k(A.chatId,Yi(o,A.index,A.questions.length,{requiresMention:A.requiresMention}),{replyTo:A.replyToMessageId}),i&&(A.questionMessageIds.add(i),t&&(A.questionCardMessageId=i),A.inactive&&this.#it(A.key,A)),A.needsPresentation=!1}#nA(A){let o=Date.now();for(let[a,e]of this.#s)e<=o&&this.#s.delete(a);return this.#s.has(A)}#it(A,o){let a=Date.now()+nre;for(let e of o.questionMessageIds??[])this.#d.set(e,{key:A,expiresAt:a})}#Nt(A,o){let a=Date.now();for(let[e,i]of this.#d)i.expiresAt<=a&&this.#d.delete(e);for(let e of[A?.message?.parent_id,A?.message?.root_id]){let i=this.#d.get(e);if(i?.key===o&&i.expiresAt>a)return!0}return!1}async#Rt(A,o){this.#r.hasSeen(o)||(await this.#r.markSeen(o),this.#S.lastMessageAt=new Date().toISOString(),this.#S.messagesReceived+=1,await this.#k(A.message.chat_id,Qp(),{replyTo:A.message.message_id}).catch(()=>{}))}#sA(A,o){let a=this.#c.get(A);return!a||o!==void 0&&a.interactionId!==o?null:(this.#c.delete(A),this.#I.delete(a.interactionId),a.inactive=!0,a)}#kt(A,o){return this.#sA(A,o)!==null}async#ht(A,o){let a=this.#sA(A,o);if(!(!a||a.kind!=="question")){this.#it(A,a);try{await a.interaction.respond({ok:!1,error:{code:"cancelled",message:"The Feishu interaction ended before the user answered.",details:{}}},{signal:AbortSignal.timeout(5e3)})}catch(e){e?.code!=="interaction-not-pending"&&this.#w.warn?.("[dsh-feishu] failed to cancel a pending Harness interaction")}}}#er(A){return A.type==="text"&&A.text?A.text:A.type==="tool"?A.name==="web_search"?S("_\u6B63\u5728\u641C\u7D22\u7F51\u7EDC\u5E76\u6574\u7406\u4FE1\u606F\u2026_"):S("_\u6B63\u5728\u4F7F\u7528 {name}\u2026_",{name:A.name||S("\u5DE5\u5177")}):S("_{text}_",{text:A.text||S("\u6B63\u5728\u5904\u7406\u2026")})}#tr(A){return _w({adapter:this.#t,target:A,reactions:{processing:"OnIt",success:"DONE",error:"ERROR"},status:this.#S,logger:this.#w,label:"feishu"})}#cA(A,o){o.clear()}#Se(A,o,a){a==="ERROR"?o.error():o.success()}async#k(A,o,{replyTo:a}={}){let e=JSON.stringify({text:o});if(a)try{let t=await this.#e.im.v1.message.reply({path:{message_id:a},data:{msg_type:"text",content:e,...this.#Ie(a)?{reply_in_thread:!0}:{}}});if(t?.code&&t.code!==0)throw new Error(`Feishu reply failed: ${t.msg||t.code}`);return await this.#Qe(a,A,t),Ve(t?.data?.message_id)}catch(t){this.#w.warn?.("[dsh-feishu] threaded reply failed; falling back to a plain message:",t?.message??String(t)),this.#ke(a)}let i=await this.#e.im.v1.message.create({params:{receive_id_type:"chat_id"},data:{receive_id:A,msg_type:"text",content:e}});if(i?.code&&i.code!==0)throw new Error(`Feishu send failed: ${i.msg||i.code}`);return Ve(i?.data?.message_id)}};import{spawn as sJe}from"node:child_process";import{randomUUID as ix}from"node:crypto";import{mkdirSync as Sre,readFileSync as ax,rmSync as ox,writeFileSync as wre}from"node:fs";import{tmpdir as nx}from"node:os";import{join as mp}from"node:path";var rJe="https://dashscope.aliyuncs.com/compatible-mode/v1",iJe="qwen3-asr-flash",aJe="qwen3-tts-flash",oJe="Momo",mre="https://dashscope.aliyuncs.com/api/v1/services/aigc/multimodal-generation/generation";function IE(n){return typeof n=="string"&&n.trim()?n.trim():null}function cc(n){if(n==null||typeof n!="object"||n.enabled!==!0)return null;let A=IE(n.secretRef);return!A||!/^[A-Za-z_][A-Za-z0-9_]*$/.test(A)?null:Object.freeze({enabled:!0,secretRef:A,asrModel:IE(n.asrModel)??iJe,ttsModel:IE(n.ttsModel)??aJe,ttsVoice:IE(n.ttsVoice)??oJe,asrBaseUrl:IE(n.asrBaseUrl)??rJe,ffmpeg:IE(n.ffmpeg)})}function Dre(n,A){return new Promise((o,a)=>{let e=sJe(n,["-hide_banner","-loglevel","error","-y",...A]),i="";e.stderr.on("data",t=>{i+=t,i.length>2e3&&(i=i.slice(-2e3))}),e.on("error",a),e.on("close",t=>t===0?o():a(new Error(`ffmpeg exit ${t}: ${i.slice(-300)}`)))})}async function cJe(n){if(typeof n?.writeFile=="function"){let A=mp(nx(),`dsh-voice-in-${ix()}.opus`);await n.writeFile(A);let o=ax(A);return ox(A,{force:!0}),o}if(n?.getReadableStream){let A=[];for await(let o of n.getReadableStream())A.push(Buffer.isBuffer(o)?o:Buffer.from(o));return Buffer.concat(A)}throw new Error("\u6D88\u606F\u8D44\u6E90\u65E0\u53EF\u7528\u8BFB\u53D6\u63A5\u53E3")}function sx({settings:n,secret:A,logger:o}={}){let a=cc(n),e=typeof A=="string"&&A.trim()?A.trim():null;if(!a||!e)return a&&o?.warn?.("[dsh-feishu-voice] \u8BED\u97F3\u51ED\u636E\u7F3A\u5931,\u8BED\u97F3\u5DF2\u7981\u7528"),Object.freeze({enabled:!1});let i=Object.freeze({apiKey:e,asrBaseUrl:a.asrBaseUrl,asrModel:a.asrModel,ttsModel:a.ttsModel,ttsVoice:a.ttsVoice,ffmpeg:a.ffmpeg??"ffmpeg"});async function t(s,c){let g=JSON.parse(s.message.content).file_key;if(!g)return null;let l=await c.im.v1.messageResource.get({params:{type:"file"},path:{message_id:s.message.message_id,file_key:g}}),d=await cJe(l),u=mp(nx(),`dsh-voice-${ix()}`);Sre(u,{recursive:!0});try{let B=mp(u,"in.opus"),y=mp(u,"in.wav");wre(B,d),await Dre(i.ffmpeg,["-i",B,"-ar","16000","-ac","1",y]);let Q=ax(y).toString("base64"),m=await fetch(`${i.asrBaseUrl}/chat/completions`,{method:"POST",headers:{Authorization:`Bearer ${i.apiKey}`,"Content-Type":"application/json"},body:JSON.stringify({model:i.asrModel,messages:[{role:"user",content:[{type:"input_audio",input_audio:{data:`data:audio/wav;base64,${Q}`}}]}]})}),D=await m.text();if(!m.ok)throw new Error(`dashscope ASR ${m.status}: ${D.slice(0,200)}`);let O=JSON.parse(D)?.choices?.[0]?.message?.content;if(typeof O!="string"||!O.trim())throw new Error("ASR \u65E0\u6587\u672C\u8F93\u51FA");return O.trim()}finally{ox(u,{recursive:!0,force:!0})}}async function r(s){let c=String(s??"").replace(/\s+/g," ").trim().slice(0,600);if(!c)return null;let g=await fetch(mre,{method:"POST",headers:{Authorization:`Bearer ${i.apiKey}`,"Content-Type":"application/json"},body:JSON.stringify({model:i.ttsModel,input:{text:c,voice:i.ttsVoice}})}),l=await g.json().catch(()=>null),d=l?.output?.audio?.url;if(!d)throw new Error(`TTS \u65E0\u97F3\u9891:${g.status} ${JSON.stringify(l??{}).slice(0,160)}`);let u=await fetch(d);if(!u.ok)throw new Error(`TTS \u97F3\u9891\u4E0B\u8F7D ${u.status}`);let B=mp(nx(),`dsh-voice-${ix()}`);Sre(B,{recursive:!0});try{let y=mp(B,"out.wav"),Q=mp(B,"out.opus");return wre(y,Buffer.from(await u.arrayBuffer())),await Dre(i.ffmpeg,["-i",y,"-c:a","libopus","-b:a","48k",Q]),ax(Q)}finally{ox(B,{recursive:!0,force:!0})}}return Object.freeze({enabled:!0,transcribeIncoming:t,synthesize:r})}var Ore="ai-agent_outlined",dE=Object.freeze([{command:"menu",icon:"skill_outlined",default:"\u6253\u5F00\u529F\u80FD\u83DC\u5355",en_us:"Open the feature menu"},{command:"new",icon:"ai-deepthink_outlined",default:"\u5F00\u542F\u5168\u65B0\u4F1A\u8BDD",en_us:"Start a fresh session"},{command:"help",icon:"promptword_outlined",default:"\u67E5\u770B\u5E2E\u52A9",en_us:"Show help"},{command:"status",icon:"ai-functions_outlined",default:"\u67E5\u770B\u673A\u5668\u4EBA\u72B6\u6001",en_us:"Show bot status"},{command:"compact",icon:"ai-block_outlined",default:"\u538B\u7F29\u5F53\u524D\u4F1A\u8BDD\u4E0A\u4E0B\u6587",en_us:"Compact the current session"},{command:"clear",icon:"clear_outlined",default:"\u6E05\u7A7A\u5F53\u524D\u4F1A\u8BDD\u4E0A\u4E0B\u6587",en_us:"Clear the current session context"},{command:"sessionlist",icon:"chat-ai_outlined",default:"\u5217\u51FA\u4F1A\u8BDD",en_us:"List sessions"},{command:"workspacelist",icon:"folder_outlined",default:"\u5217\u51FA\u5DE5\u4F5C\u533A",en_us:"List workspaces"},{command:"workspaces",icon:"folder_outlined",default:"\u5217\u51FA\u5DE5\u4F5C\u533A",en_us:"List workspaces"},{command:"wsl",icon:"folder_outlined",default:"\u5217\u51FA\u5DE5\u4F5C\u533A",en_us:"List workspaces"},{command:"ws",icon:"folder_outlined",default:"\u5207\u6362\u5DE5\u4F5C\u533A",en_us:"Switch workspace"},{command:"watch",icon:"flag_outlined",default:"\u5173\u6CE8\u4E00\u4E2A\u4F1A\u8BDD",en_us:"Watch a session"},{command:"unwatch",icon:"clear_outlined",default:"\u53D6\u6D88\u5173\u6CE8\u4F1A\u8BDD",en_us:"Unwatch a session"},{command:"watchlist",icon:"flag_outlined",default:"\u67E5\u770B\u5173\u6CE8\u5217\u8868",en_us:"List watched sessions"},{command:"archived",icon:"folder_outlined",default:"\u8BBE\u7F6E\u5F52\u6863\u4F1A\u8BDD\u663E\u9690\uFF08on/off\uFF09",en_us:"Show or hide archived sessions (on/off)"},{command:"history",icon:"chat-ai_outlined",default:"\u67E5\u770B\u6700\u8FD1\u5386\u53F2\u6D88\u606F\uFF08\u4EC5\u79C1\u804A\uFF09",en_us:"Show recent history (private chats only)"},{command:"workspace",icon:"folder_outlined",default:"\u5207\u6362\u5DE5\u4F5C\u533A",en_us:"Switch workspace"},{command:"conv",icon:"folder_outlined",default:"\u8BBE\u7F6E\u5F53\u524D\u5BF9\u8BDD\u4E13\u5C5E\u5DE5\u4F5C\u533A",en_us:"Set the workspace for this conversation"},{command:"session",icon:"chat-ai_outlined",default:"\u7ED1\u5B9A\u5DF2\u6709\u4F1A\u8BDD",en_us:"Bind an existing session"},{command:"models",icon:"ai-functions_outlined",default:"\u5217\u51FA\u53EF\u7528\u6A21\u578B",en_us:"List available models"},{command:"model",icon:"ai-agent_outlined",default:"\u67E5\u770B\u6216\u5207\u6362\u5F53\u524D\u6A21\u578B",en_us:"Show or switch the current model"},{command:"reasoninglist",icon:"ai-deepthink_outlined",default:"\u5217\u51FA\u53EF\u7528\u63A8\u7406\u7B49\u7EA7",en_us:"List available reasoning efforts"},{command:"reasoning",icon:"ai-deepthink_outlined",default:"\u67E5\u770B\u6216\u5207\u6362\u63A8\u7406\u7B49\u7EA7",en_us:"Show or switch the reasoning effort"},{command:"presetlist",icon:"skill_outlined",default:"\u5217\u51FA\u53EF\u7528 Agent \u9884\u8BBE",en_us:"List available Agent Presets"},{command:"preset",icon:"skill_outlined",default:"\u67E5\u770B\u6216\u5207\u6362 Agent \u9884\u8BBE",en_us:"Show or switch the Agent Preset"},{command:"permissionlist",icon:"skill_outlined",default:"\u6309\u5E8F\u53F7\u5217\u51FA\u6743\u9650\u6863\u4F4D",en_us:"List numbered permission presets"},{command:"permission",icon:"skill_outlined",default:"\u67E5\u770B\u6216\u5207\u6362\u5F53\u524D\u4F1A\u8BDD\u6743\u9650",en_us:"Show or switch current session permissions"},{command:"stop",icon:"clear_outlined",default:"\u505C\u6B62\u5F53\u524D\u4EFB\u52A1",en_us:"Stop the current task"},{command:"steer",icon:"promptword_outlined",default:"\u7ED9\u5F53\u524D\u4EFB\u52A1\u8865\u5145\u6307\u4EE4",en_us:"Send additional instructions to the current task"},{command:"batch",icon:"chat-ai_outlined",default:"\u5F00\u59CB\u6279\u91CF\u8F93\u5165\uFF08\u4EC5\u79C1\u804A\uFF09",en_us:"Start batch input (private chats only)"},{command:"send",icon:"chat-ai_outlined",default:"\u63D0\u4EA4\u5F53\u524D\u6279\u6B21\uFF08\u4EC5\u79C1\u804A\uFF09",en_us:"Submit the current batch (private chats only)"},{command:"cancel",icon:"clear_outlined",default:"\u53D6\u6D88\u5F53\u524D\u6279\u6B21\uFF08\u4EC5\u79C1\u804A\uFF09",en_us:"Cancel the current batch (private chats only)"},{command:"version",icon:"ai-functions_outlined",default:"\u67E5\u770B\u63D2\u4EF6\u7248\u672C",en_us:"Show the plugin version"},{command:"repair",icon:"ai-functions_outlined",default:"\u8865\u5168\u98DE\u4E66\u6743\u9650\u4E0E\u5361\u7247\u56DE\u8C03\uFF08\u4EC5\u79C1\u804A\uFF09",en_us:"Complete Feishu permissions and card callbacks (private chats only)"}]),Sp=Object.freeze({DEFAULT:"default",CUSTOM:"custom"}),bre=Object.freeze({mode:Sp.DEFAULT,order:Object.freeze([])}),Mre=100;function _re(n){return typeof n!="string"?null:n.trim().replace(/^\//u,"").toLowerCase()||null}function Tre(n){return dE.some(A=>A.command===n)}function Kn(n){if(!n||typeof n!="object"||Array.isArray(n)||n.mode!==Sp.CUSTOM)return bre;let A=[],o=new Set;for(let a of Array.isArray(n.order)?n.order:[]){let e=_re(a);if(!(!e||o.has(e)||!Tre(e))&&(o.add(e),A.push(e),A.length>=Mre))break}return Object.freeze({mode:Sp.CUSTOM,order:Object.freeze(A)})}function pO(n){if(!n||typeof n!="object"||Array.isArray(n))return!1;let A=Reflect.ownKeys(n);return A.length!==2||!A.includes("mode")||!A.includes("order")||!Array.isArray(n.order)||n.order.length>Mre?!1:n.mode===Sp.DEFAULT?n.order.length===0:n.mode!==Sp.CUSTOM||new Set(n.order).size!==n.order.length?!1:n.order.every(o=>_re(o)===o&&Tre(o))}function Nre(n){return Kn(n).mode===Sp.CUSTOM}function cx(n,A=dE){let o=Kn(n);if(o.mode!==Sp.CUSTOM)return A;let a=new Map(A.map(e=>[e.command,e]));return o.order.map(e=>a.get(e)).filter(Boolean)}var lx="/open-apis/application/v7/app_slash_commands",Rre=new Set(["99991640","99991672"]),hO=Object.freeze(["application:app_slash_command:read","application:app_slash_command:write"]),gx=Ore,gJe=1100;function uO(n,A){let o=n==="lark"?"https://open.larksuite.com":"https://open.feishu.cn";return new URL(A,o)}function kre(n,A){if(!n||typeof n!="object"||Array.isArray(n))throw new Error(`${A} returned a non-JSON response`);if(n.code!==0){let o=new Error(`${A} failed: ${n.msg||`code ${n.code}`}`);throw o.code=String(n.code),o.msg=n.msg,o}return n}function EO(n,A){let o=AbortSignal.timeout(A);return n?AbortSignal.any([n,o]):o}async function CO(n,A,o){try{return kre(await n.request(A),o)}catch(a){let e=a?.response?.data;if(e&&typeof e=="object"&&!Array.isArray(e)&&Object.hasOwn(e,"code"))return kre(e,o);throw a}}async function lJe({appId:n,appSecret:A,domain:o,httpInstance:a,timeoutMs:e,signal:i}){if(!n||!A)throw new Error("Feishu slash registration requires app credentials");if(!a||typeof a.request!="function")throw new TypeError("Feishu slash registration requires an HTTP instance");let t=await CO(a,{method:"POST",url:uO(o,"/open-apis/auth/v3/tenant_access_token/internal").href,headers:{"content-type":"application/json; charset=utf-8"},data:{app_id:n,app_secret:A},signal:EO(i,e),timeout:e},"Feishu authentication");if(!t.tenant_access_token)throw new Error("Feishu authentication returned no tenant access token");return t.tenant_access_token}async function IJe({tenantAccessToken:n,domain:A,httpInstance:o,timeoutMs:a,signal:e}){let i=await CO(o,{method:"GET",url:uO(A,lx).href,headers:{authorization:`Bearer ${n}`,"content-type":"application/json; charset=utf-8"},signal:EO(e,a),timeout:a},"Feishu slash command list");return Array.isArray(i.data?.items)?i.data.items:[]}async function vre({tenantAccessToken:n,domain:A,httpInstance:o,timeoutMs:a,signal:e,command:i,description:t,icon:r=gx}){let s={command:i};return t&&(t.default_value||t.i18n)?s.description=t:typeof t=="string"&&t.trim()&&(s.description={default_value:t.trim()}),r&&(s.description={...s.description??{},icon:{icon_key:r}}),(await CO(o,{method:"POST",url:uO(A,lx).href,headers:{authorization:`Bearer ${n}`,"content-type":"application/json; charset=utf-8"},data:s,signal:EO(e,a),timeout:a},`Feishu slash command create (/${i})`)).data?.command_id??null}async function dJe({tenantAccessToken:n,domain:A,httpInstance:o,timeoutMs:a,signal:e,commandId:i}){await CO(o,{method:"DELETE",url:uO(A,`${lx}/${i}`).href,headers:{authorization:`Bearer ${n}`},signal:EO(e,a),timeout:a},"Feishu slash command delete")}function pJe(n,A){return new Promise(o=>{let a=setTimeout(o,n);A?.addEventListener("abort",()=>{clearTimeout(a),o()},{once:!0})})}function ig(n){return typeof n?.command=="string"&&n.command?n.command:null}function hJe(n,A){return n.map((o,a)=>({item:o,index:a})).filter(({item:o})=>A.has(ig(o))).sort((o,a)=>{let e=Number(o.item.create_time),i=Number(a.item.create_time);if(Number.isFinite(e)&&Number.isFinite(i)&&e!==i)return i-e;let t=Number(o.item.command_id),r=Number(a.item.command_id);return Number.isFinite(t)&&Number.isFinite(r)&&t!==r?r-t:o.index-a.index}).map(({item:o})=>ig(o)).filter(Boolean)}function Pre(n,A){return{default_value:n.default??n.en_us??A,i18n:{zh_cn:n.default??A,en_us:n.en_us??n.default??A}}}async function Lre({appId:n,appSecret:A,domain:o="feishu",httpInstance:a,timeoutMs:e=15e3,signal:i,manifest:t=dE,config:r=null,intervalMs:s=gJe,wait:c=pJe}){let g=()=>i?.aborted===!0,l=await lJe({appId:n,appSecret:A,domain:o,httpInstance:a,timeoutMs:e,signal:i}),d=await IJe({tenantAccessToken:l,domain:o,httpInstance:a,timeoutMs:e,signal:i}),u=new Set(t.map(v=>ig(v)).filter(Boolean)),B=d.map(v=>ig(v)).filter(v=>v&&!u.has(v)),y=new Set(d.map(v=>ig(v)).filter(Boolean));if(!Nre(r)){let v=[],L=[];for(let H of cx(r,t)){if(g())break;let G=ig(H);if(!(!G||y.has(G)))try{let k=await vre({tenantAccessToken:l,domain:o,httpInstance:a,timeoutMs:e,signal:i,command:G,description:Pre(H,G),icon:H.icon??gx});v.push({command:G,command_id:k}),y.add(G)}catch(k){if(g())break;if(k?.code==="40000000"&&/already exists/i.test(k?.msg??"")){y.add(G);continue}if(L.push({command:G,error:k?.message??String(k)}),Rre.has(k?.code)||/(?:lacks permission|access denied)/i.test(k?.msg??""))break}}return{created:v,deleted:[],existing:[...y].filter(Boolean),external:B,failed:L,changed:v.length>0,superseded:g()}}let Q=hJe(d,u),m=cx(r,t).filter(v=>ig(v)),D=m.map(v=>ig(v));if(Q.length===D.length&&D.every((v,L)=>v===Q[L]))return{created:[],deleted:[],existing:Q,external:B,failed:[],changed:!1};if(g())return{created:[],deleted:[],existing:Q,external:B,failed:[],changed:!1,superseded:!0};let M=new Map(d.map(v=>[ig(v),v]).filter(([v])=>v&&u.has(v))),O=[],R=[];for(let v of Q){if(g())break;let L=M.get(v);if(!L?.command_id){R.push({command:v,error:"the registered command reports no command_id"});continue}try{await dJe({tenantAccessToken:l,domain:o,httpInstance:a,timeoutMs:e,signal:i,commandId:L.command_id}),O.push(v)}catch(H){if(g())break;R.push({command:v,error:H?.message??String(H)})}}if(g())return{created:[],deleted:O,existing:Q,external:B,failed:R,changed:O.length>0,superseded:!0};if(R.length>0)return{created:[],deleted:O,existing:Q,external:B,failed:R,changed:O.length>0};let F=[];for(let[v,L]of[...m].reverse().entries()){if(g())break;let H=ig(L);try{if(v>0&&(await c(s,i),g()))break;let G=await vre({tenantAccessToken:l,domain:o,httpInstance:a,timeoutMs:e,signal:i,command:H,description:Pre(L,H),icon:L.icon??gx});F.push({command:H,command_id:G})}catch(G){if(g()||(R.push({command:H,error:G?.message??String(G)}),Rre.has(G?.code)||/(?:lacks permission|access denied)/i.test(G?.msg??"")))break}}return{created:F,deleted:O,existing:[],external:B,failed:R,changed:F.length>0||O.length>0,superseded:g()}}var EJe=15e3,CJe="\u2705 \u4FEE\u590D\u5B8C\u6210\uFF1A\u5DF2\u5B9E\u6D4B\u6536\u5230 card.action.trigger\uFF0C\u83DC\u5355\u6309\u94AE\u73B0\u5728\u53EF\u7528\u3002",fJe="\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",Ix="\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",BJe="\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",yJe=new Set(["connected","connecting","reconnecting"]);function gc(n){return typeof n=="string"&&n.trim()?n.trim():null}function QJe(n){return gc(n?.operator?.open_id)??gc(n?.operator?.operator_id?.open_id)}function mJe(n,A){try{let o=n?.getConnectionStatus?.()?.state;return typeof o=="string"&&o?o:A}catch{return A}}function pE(n,A){let o=new Error(A);return o.code=n,o}function SJe(n,A){if(!n||typeof n.request!="function")return;let o=a=>({...a??{},timeout:a?.timeout??A});return{request:a=>n.request(o(a)),get:(a,e)=>n.get(a,o(e)),delete:(a,e)=>n.delete(a,o(e)),head:(a,e)=>n.head(a,o(e)),options:(a,e)=>n.options(a,o(e)),post:(a,e,i)=>n.post(a,e,o(i)),put:(a,e,i)=>n.put(a,e,o(i)),patch:(a,e,i)=>n.patch(a,e,o(i))}}function wJe({allowedSenderCount:n=1}={}){return{startedAt:null,ready:!1,feishuLongConnectionState:"idle",harnessReachable:!1,messagesReceived:0,messagesReplied:0,messagesRejected:0,reactionsAdded:0,reactionsRemoved:0,reactionErrors:0,streamResponses:0,streamUpdates:0,streamFallbacks:0,streamErrors:0,cardActionsReceived:0,cardActionProbesVerified:0,lastMessageAt:null,lastReplyAt:null,lastRejectedAt:null,lastCardActionAt:null,lastError:null,agentPreset:"standard",authorizationMode:"sender-open-id-allowlist",allowedSenderCount:n,slashCommandRegistration:"idle",slashCommandsRegistered:0,slashCommandsExisting:0,slashCommandsFailed:0,slashCommandsRemoved:0,slashCommandsError:null}}var fO=class{#e;#t;#A;#r;#a;#l;#n;#o;#i;#c;#I;#d=null;#s;#g;#p;#h;#u;#E;#C;#f;#Q;#B;#y;#O;#b;#_=null;#M=null;#S;#T;#v=null;#w=null;#m=null;#P=null;#L=new Map;#D;#G=!0;#R=null;#N=null;#F=0;#Y=null;#z=Promise.resolve();constructor({lark:A,consumerMode:o="standalone",acceptExternal:a,botId:e,appId:i,appSecret:t,domain:r="feishu",botOpenId:s,groupResponseMode:c,mentionTopicReply:g=!0,stepPush:l=!1,stepPushMode:d="post",stepCardPanels:u,voice:B=null,sessionSyncTargetsFor:y=null,ownerOpenId:Q,ownerOpenIds:m,harness:D,state:M,contextEnhancement:O,accessPolicy:R,repair:F,replyTimeoutMs:v=6e5,connectTimeoutMs:L=15e3,requestTimeoutMs:H=EJe,slashCommands:G=!0,slashPanel:k=null,wsAgent:Y,logger:U=console}){if(!A)throw new Error("FeishuRuntime requires the Feishu SDK");if(!i||!t)throw new Error("FeishuRuntime requires app credentials");let _=Array.isArray(m)?m:[Q],P=[...new Set(_.filter(q=>typeof q=="string"&&q))];if(P.length===0)throw new Error("FeishuRuntime requires at least one owner open_id");if(!D)throw new Error("FeishuRuntime requires a Harness client");if(!M)throw new Error("FeishuRuntime requires a state store");if(F!=null&&!gc(e))throw new TypeError("FeishuRuntime repair capability requires a botId");if(!Number.isFinite(H)||H<=0)throw new TypeError("FeishuRuntime requestTimeoutMs must be a positive number");this.#S=o,this.#T=a,this.#e=A,this.#t=gc(e),this.#A=i,this.#r=t,this.#a=r,this.#l=gc(s),this.#n=Hn(c),this.#o=g!==!1,this.#i=l===!0,this.#c=hn(d),this.#I=So(u),this.#d=B==null?null:sx({settings:B.config,secret:B.secret,logger:U}),this.#s=typeof y=="function"?y:null,this.#g=P,this.#p=D,this.#h=M,this.#u=O,this.#E=R,this.#b=F??null,this.#C=v,this.#f=L,this.#Q=H,this.#G=o!=="external-consumer"&&!!G,this.#R=Kn(k),this.#B=Y,this.#y=U,this.#O=st({channel:"feishu",logger:U}),this.#D=wJe({allowedSenderCount:P.length})}get status(){return structuredClone(this.#D)}setGroupResponseMode(A){this.#n=Hn(A),this.#M?.setGroupResponseMode(this.#n)}setMentionTopicReply(A){this.#o=A!==!1,this.#M?.setMentionTopicReply(this.#o)}setStepPush(A){this.#i=A===!0,this.#M?.setStepPush(this.#i)}setStepPushMode(A){this.#c=hn(A),this.#M?.setStepPushMode(this.#c)}setStepCardPanels(A){this.#I=So(A),this.#M?.setStepCardPanels(this.#I)}setVoice(A){this.#d=A==null?null:sx({settings:A.config,secret:A.secret,logger:this.#y}),this.#M?.setVoice(this.#d)}setSlashPanel(A){this.#R=Kn(A),this.#F+=1,this.#U()}async start(){for(;;){for(;this.#m;)await this.#m;if(this.#w)return this.#w;let o=this.#v;if(o){let a=mJe(o,this.#D.feishuLongConnectionState);if(yJe.has(a))return this.status;await this.stop({preserveError:a==="failed"});continue}if(this.#_||this.#M||this.#P){await this.stop({preserveError:this.#D.feishuLongConnectionState==="failed"});continue}break}let A;return A=this.#W().finally(()=>{this.#w===A&&(this.#w=null)}),this.#w=A,A}async#W(){let A=new AbortController;this.#P=A;let{signal:o}=A,a=()=>o.reason??new DOMException("Feishu runtime stopped","AbortError"),e=()=>!o.aborted&&this.#P===A,i=()=>{if(!e())throw a()};this.#D.startedAt=new Date().toISOString(),this.#D.feishuLongConnectionState="connecting",this.#D.lastError=null,this.#D.error=null,this.#O.clear();try{await de("harness.check",()=>this.#p.ensureRunning({signal:o})),i(),this.#D.harnessReachable=!0;let t=this.#a==="lark"?this.#e.Domain.Lark:this.#e.Domain.Feishu,r={appId:this.#A,appSecret:this.#r,domain:t},s=SJe(this.#e.defaultHttpInstance,this.#Q);s&&(r.httpInstance=s);let c=new this.#e.Client(r);this.#_=c;let g=new xb({client:c,initialText:S("\u5DF2\u8FDE\u63A5 DeepSeek Harness\uFF0C\u6B63\u5728\u601D\u8003\u2026")}),l=this.#S==="external-consumer"?null:new dO({client:c,channel:g,harness:this.#p,state:this.#h,contextEnhancement:this.#u,accessPolicy:this.#E,status:this.#D,allowedSenderOpenIds:new Set(this.#g),botId:this.#t,appId:this.#A,botOpenId:this.#l,groupResponseMode:this.#n,mentionTopicReply:this.#o,stepPush:this.#i,stepPushMode:this.#c,stepCardPanels:this.#I,voice:this.#d,sessionSyncTargetsFor:this.#s,repair:this.#b,requestTimeoutMs:this.#Q,replyTimeoutMs:this.#C,interactionCards:!["0","false","no","off"].includes(String(process.env.DSH_IM_INTERACTION_CARDS??"").trim().toLowerCase()),signal:o,logger:this.#y});this.#M=l;let d=new this.#e.EventDispatcher({}).register({"im.message.receive_v1":D=>{if(this.#S==="external-consumer"){if(i(),typeof this.#T!="function")throw Object.assign(new Error("consumer-unavailable"),{code:"consumer-unavailable"});return this.#T(D,{signal:o})}e()&&l.accept(D)},"im.message.reaction.created_v1":()=>{},"im.message.reaction.deleted_v1":()=>{},"card.action.trigger":D=>{!e()||this.#S==="external-consumer"||(this.#D.cardActionsReceived+=1,this.#D.lastCardActionAt=new Date().toISOString(),this.#V(D)||l.onCardAction(D))}}),u,B,y=new Promise((D,M)=>{let O=!1,R=()=>{B(a())},F=(L,H)=>{O||(O=!0,clearTimeout(v),o.removeEventListener("abort",R),L(H))},v=setTimeout(()=>{F(M,new Error(`Feishu WebSocket handshake timed out after ${this.#f}ms`))},this.#f);u=()=>{F(D)},B=L=>{F(M,L)},o.addEventListener("abort",R,{once:!0}),o.aborted&&R()});y.catch(()=>{});let Q=new this.#e.WSClient({...r,...this.#B?{agent:this.#B}:{},loggerLevel:this.#e.LoggerLevel.info,handshakeTimeoutMs:this.#f,onReady:()=>{e()&&(this.#D.feishuLongConnectionState="connected",this.#D.ready=!0,this.#D.lastError=null,this.#D.error=null,this.#O.clear(),u())},onError:D=>{e()&&(this.#D.feishuLongConnectionState="failed",this.#D.ready=!1,this.#D.error=this.#O.report(D,{operation:"connection.monitor",botId:this.#t,automatic:!0}).publicError,this.#D.lastError=this.#D.error.message,B(D))},onReconnecting:()=>{e()&&(this.#D.feishuLongConnectionState="reconnecting",this.#D.ready=!1)},onReconnected:()=>{e()&&(this.#D.feishuLongConnectionState="connected",this.#D.ready=!0,this.#D.lastError=null,this.#D.error=null,this.#O.clear())}});this.#v=Q;let m=Promise.resolve().then(()=>Q.start({eventDispatcher:d})).catch(D=>{throw B(D),D});return await Promise.all([m,y]),i(),this.#G&&s&&(this.#N=s,this.#U()),this.status}catch(t){throw o.aborted||(this.#D.ready=!1,this.#D.feishuLongConnectionState="failed",this.#D.error=this.#O.report(t,{operation:"connection.restore",reuse:!0,botId:this.#t,automatic:!0}).publicError,this.#D.lastError=this.#D.error.message,await this.#H({preserveError:!0,abortController:A})),t}}async beginCardActionProbe({expectedOperatorOpenId:A,timeoutMs:o=9e4}={}){if(!this.#D.ready||!this.#_)throw pE("card_action_probe_unavailable","\u98DE\u4E66\u673A\u5668\u4EBA\u5C1A\u672A\u8FDE\u63A5");let a=gc(A);if(!a||a==="*")throw new TypeError("A precise Feishu operator open_id is required");if(!Number.isFinite(o)||o<=0||o>10*6e4)throw new TypeError("Card-action probe timeout must be between 1 and 600000ms");let e=uJe().replaceAll("-",""),i;try{i=await this.#_.im.v1.message.create({params:{receive_id_type:"open_id"},data:{receive_id:a,msg_type:"interactive",content:VAe(e)}})}catch{throw this.#x(a,S(Ix),"failure"),pE("card_action_probe_send_failed","\u65E0\u6CD5\u53D1\u9001\u98DE\u4E66\u5361\u7247\u56DE\u8C03\u6D4B\u8BD5")}if(i?.code&&i.code!==0)throw this.#x(a,S(Ix),"failure"),pE("card_action_probe_send_failed","\u65E0\u6CD5\u53D1\u9001\u98DE\u4E66\u5361\u7247\u56DE\u8C03\u6D4B\u8BD5");let t=gc(i?.data?.message_id)??gc(i?.message_id);if(!t)throw this.#x(a,S(Ix),"failure"),pE("card_action_probe_send_failed","\u98DE\u4E66\u672A\u8FD4\u56DE\u6D4B\u8BD5\u5361\u7247\u7684\u6D88\u606F ID");return new Promise((r,s)=>{let c=setTimeout(()=>{let g=this.#L.get(t);!g||g.nonce!==e||(this.#L.delete(t),this.#x(a,S(fJe),"timeout"),s(pE("card_action_probe_timeout","\u5728\u89C4\u5B9A\u65F6\u95F4\u5185\u672A\u6536\u5230\u98DE\u4E66\u5361\u7247\u6309\u94AE\u56DE\u8C03")))},o);c.unref?.(),this.#L.set(t,{messageId:t,nonce:e,expectedOperatorOpenId:a,timeout:c,resolve:r,reject:s})})}#V(A){let o=gc(A?.context?.open_message_id);if(!o)return!1;let a=this.#L.get(o);if(!a)return!1;let e=A?.action?.value,i=QJe(A);return e?.action!=="repair_verify"||e?.nonce!==a.nonce||i!==a.expectedOperatorOpenId?!1:(clearTimeout(a.timeout),this.#L.delete(o),this.#D.cardActionProbesVerified+=1,this.#x(i,S(CJe),"success").finally(()=>{a.resolve({verified:!0,messageId:o,operatorOpenId:i})}),!0)}#x(A,o,a){let e=this.#_;return e?Promise.resolve().then(async()=>{let i=await e.im.v1.message.create({params:{receive_id_type:"open_id"},data:{receive_id:A,msg_type:"text",content:JSON.stringify({text:o})}});if(i?.code&&i.code!==0)throw new Error("Feishu callback repair notice failed");return!0}).catch(()=>(this.#y.warn?.(`[dsh-feishu] unable to send the callback repair ${a} notice`),!1)):(this.#y.warn?.(`[dsh-feishu] unable to send the callback repair ${a} notice`),Promise.resolve(!1))}async sendConnectionTest(A){if(!this.#D.ready||!this.#_){let e=new Error("\u98DE\u4E66\u673A\u5668\u4EBA\u5C1A\u672A\u8FDE\u63A5");throw e.code="test-target-unavailable",e}if(typeof A!="string"||!A.trim())throw new TypeError("Feishu connection test text is required");let o=async(e,i,t)=>{let r=await this.#_.im.v1.message.create({params:{receive_id_type:e},data:{receive_id:i,msg_type:"text",content:JSON.stringify({text:t})}});if(r?.code&&r.code!==0)throw new Error(`Feishu connection test failed: ${r.msg||r.code}`)},a=this.#g.find(e=>e!=="*");return a?(await o("open_id",a,A),{sent:!0}):Vo({state:this.#h,text:A,channelLabel:S("\u98DE\u4E66\u673A\u5668\u4EBA"),send:async(e,i)=>{let t=typeof e?.chatId=="string"?e.chatId.trim():"";if(!t)throw nr(S("\u98DE\u4E66\u673A\u5668\u4EBA"));await o("chat_id",t,i)}})}async presentSessionSyncApproval(A,o,a={}){if(!this.#D.ready||!this.#M)return!1;let e=typeof A?.route?.openId=="string"?A.route.openId.trim():"";return e?this.#M.presentSessionSyncApproval(o,{key:a.key,actor:e,validate:a.validate,chatId:e,receiveIdType:"open_id",send:i=>this.sendProactiveText(A,i)},a):!1}async sendProactiveText(A,o,{signal:a,format:e="plain",receipt:i=!1}={}){if(!this.#D.ready||!this.#_){let u=new Error("\u98DE\u4E66\u673A\u5668\u4EBA\u5C1A\u672A\u8FDE\u63A5");throw u.code="bot-not-connected",u}let t=A?.kind==="user"?"open_id":A?.kind==="group"?"chat_id":null,r=A?.kind==="user"?gc(A?.route?.openId):A?.kind==="group"?gc(A?.route?.chatId):null;if(!t||!r){let u=new TypeError("Invalid Feishu proactive delivery target");throw u.code="invalid-target",u}if(e!=="plain"&&e!=="markdown"){let u=new TypeError("Message format must be plain or markdown");throw u.code="bad-request",u}if(typeof i!="boolean"||i&&A.kind!=="group")throw Object.assign(new Error("capability-unavailable"),{code:"capability-unavailable"});a?.throwIfAborted();let s=e==="markdown"?{schema:"2.0",body:{elements:[{tag:"markdown",content:o}]}}:{text:o},c=a?AbortSignal.any([a,this.#P.signal]):this.#P.signal,g=await uy(()=>this.#_.im.v1.message.create({params:{receive_id_type:t},data:{receive_id:r,msg_type:e==="markdown"?"interactive":"text",content:JSON.stringify(s)}}),{signal:c,timeoutMs:this.#Q,stage:`proactive text send (${this.#Q}ms)`});if(g?.code&&g.code!==0){let u=new Error(`Feishu proactive delivery failed: ${g.msg||g.code}`);throw u.code="target-rejected",u}if(!i)return{sent:!0};let l=g?.data?.message_id,d=g?.data?.chat_id;if(typeof l!="string"||!l||l.length>512||d!==r)throw Object.assign(new Error("send-result-unknown"),{code:"send-result-unknown"});return{sent:!0,receipt:{version:1,messageId:l,conversationId:d}}}async historyChecked(A,o,a,{signal:e}={}){let i=this.#_;if(!i||this.#S!=="external-consumer")throw Object.assign(new Error("bot-not-connected"),{code:"bot-not-connected"});let t=await fAe(i,A,o,a,e);if(e?.throwIfAborted(),this.#_!==i)throw Object.assign(new Error("bot-not-connected"),{code:"bot-not-connected"});return t}async replyChecked(A,o,{signal:a}={}){if(!A||typeof A.messageId!="string"||typeof A.conversationId!="string"||typeof A.actorId!="string"||typeof o!="string"||!o.trim()||o.length>4e3)throw Object.assign(new Error("bad-request"),{code:"bad-request"});let e=this.#_;if(!e||this.#S!=="external-consumer")throw Object.assign(new Error("bot-not-connected"),{code:"bot-not-connected"});a?.throwIfAborted();let i=await e.im.v1.message.get({path:{message_id:A.messageId}}),t=i?.data?.items?.find(c=>c.message_id===A.messageId);if(i?.code||!t||t.deleted===!0||t.chat_id!==A.conversationId||t.sender?.sender_type!=="user"||t.sender?.id_type!=="open_id"||t.sender?.id!==A.actorId||(t.thread_id||void 0)!==A.threadId||(t.root_id||void 0)!==A.rootId||(t.parent_id||void 0)!==A.parentId)throw Object.assign(new Error("stale-route"),{code:"stale-route"});if(a?.throwIfAborted(),this.#_!==e)throw Object.assign(new Error("bot-not-connected"),{code:"bot-not-connected"});let r;try{r=await e.im.v1.message.reply({path:{message_id:A.messageId},data:{msg_type:"text",content:JSON.stringify({text:o}),reply_in_thread:!!A.threadId}})}catch(c){throw Object.assign(new Error("reply-result-unknown",{cause:c}),{code:"reply-result-unknown"})}let s=r?.data?.message_id;if(r?.code||typeof s!="string"||!s)throw Object.assign(new Error("reply-result-unknown"),{code:"reply-result-unknown"});return{sent:!0,messageId:s}}#U(){let A=this.#N,o=this.#P?.signal;if(!this.#G||!A||!o||o.aborted)return;let a=this.#F;this.#Y?.();let e=new AbortController,i=()=>e.abort(),t=()=>i();this.#Y=i,o.addEventListener("abort",t,{once:!0}),o.aborted&&i();let s=this.#z.then(()=>this.#J(A,()=>!o.aborted&&this.#P?.signal===o,e.signal,a)).then(()=>{},()=>{});this.#z=s,s.then(()=>{o.removeEventListener("abort",t),this.#Y===i&&(this.#Y=null)})}async#J(A,o,a,e=this.#F){this.#D.slashCommandRegistration="registering",this.#D.slashCommandsError=null;try{let i=await Lre({appId:this.#A,appSecret:this.#r,domain:this.#a,httpInstance:A,signal:a,manifest:dE,config:this.#R});if(!o()||e!==this.#F||i.superseded===!0)return;this.#D.slashCommandRegistration="done",this.#D.slashCommandsRegistered=i.created.length,this.#D.slashCommandsExisting=i.existing.length,this.#D.slashCommandsFailed=i.failed.length,this.#D.slashCommandsRemoved=i.deleted.length,this.#D.slashCommandsError=i.failed.length>0?i.failed.map(t=>`/${t.command}: ${t.error?.message??String(t.error)}`).join("; "):null,(i.created.length>0||i.deleted.length>0)&&this.#y.info?.(`[dsh-feishu] slash panel synced: ${i.created.length} added, ${i.deleted.length} removed`),i.failed.length>0&&this.#y.warn?.(`[dsh-feishu] ${i.failed.length} slash command(s) failed to register: ${this.#D.slashCommandsError}`)}catch(i){if(!o())return;this.#D.slashCommandRegistration="failed",this.#D.slashCommandsError=i?.message??String(i),this.#y.warn?.(`[dsh-feishu] slash command registration skipped: ${this.#D.slashCommandsError}`)}}stop(A={}){if(this.#m)return this.#m;let o;return o=this.#K(A).finally(()=>{this.#m===o&&(this.#m=null)}),this.#m=o,o}async#K({preserveError:A=!1}={}){let o=this.#P;this.#P===o&&(this.#P=null),o?.abort(new DOMException("Feishu runtime stopped","AbortError"));let a=this.#w;return a&&await a.catch(()=>{}),this.#H({preserveError:A,abortController:o})}async#H({preserveError:A=!1,abortController:o}={}){let a=A?this.#D.lastError:null,e=A?this.#D.error:null;this.#P===o&&(this.#P=null),o?.abort(new DOMException("Feishu runtime stopped","AbortError"));for(let r of this.#L.values())clearTimeout(r.timeout),this.#x(r.expectedOperatorOpenId,S(BJe),"abort"),r.reject(pE("abort","\u98DE\u4E66\u8FD0\u884C\u65F6\u5DF2\u505C\u6B62"));this.#L.clear(),this.#D.ready=!1;let i=this.#v;this.#v=null,i?.close({force:!0});let t=this.#M;return this.#M=null,t&&await t.waitForIdle(),this.#_=null,this.#D.feishuLongConnectionState=A?"failed":"idle",this.#D.slashCommandRegistration="idle",this.#D.error=e,this.#D.lastError=a,A||this.#O.clear(),this.status}};var BO=class extends UA{constructor(A){super({...A,rpcIdPrefix:"feishu",logPrefix:"dsh-feishu"})}};import{createHash as DJe}from"node:crypto";import{mkdir as bJe,readFile as OJe,rename as MJe,unlink as _Je,writeFile as TJe}from"node:fs/promises";import{dirname as NJe}from"node:path";var mO="DSH_FEISHU_APP_SECRET";function ag(n){return typeof n=="string"&&n.trim()?n.trim():null}function Fre(n){let A=ag(n);return A&&/^[A-Za-z0-9_-]{1,128}$/.test(A)?A:null}function Gre(n){return`bot_${DJe("sha256").update(n).digest("hex").slice(0,24)}`}function RJe(n){let A=Array.isArray(n.ownerOpenIds)?n.ownerOpenIds:[n.ownerOpenId];return[...new Set(A.map(ag).filter(Boolean))]}function yO(n,{legacy:A=!1}={}){if(!n||typeof n!="object")return null;let o=ag(n.appId),a=RJe(n);if(!o||a.length===0)return null;let e=Fre(n.id)??(A?Gre(o):null),i=ag(n.secretRef)??(A?mO:null);if(!e||!i||!/^[A-Za-z_][A-Za-z0-9_]*$/.test(i))return null;let t=n.domain==="lark"?"lark":"feishu";return Object.freeze({id:e,consumerMode:n.consumerMode==="external-consumer"?"external-consumer":"standalone",appId:o,secretRef:i,ownerOpenIds:Object.freeze(a),domain:t,botName:ag(n.botName),botOpenId:ag(n.botOpenId),activated:n.activated??null,groupResponseMode:Hn(n.groupResponseMode),mentionTopicReply:n.mentionTopicReply!==!1,stepPush:n.stepPush===!0,stepPushMode:hn(n.stepPushMode),stepCardPanels:So(n.stepCardPanels),voice:cc(n.voice),slashPanel:Kn(n.slashPanel),groupMessagePermissionGranted:n.groupMessagePermissionGranted===!0,deletionPending:n.deletionPending===!0,connectedAt:ag(n.connectedAt),createdAt:ag(n.createdAt)??ag(n.connectedAt)})}function kJe(n){if(!n||typeof n!="object")return null;if(n.version===2&&Array.isArray(n.bots)){let o=n.bots.map(t=>yO(t));if(o.some(t=>t===null))throw new Error("dsh-feishu config contains an invalid bot entry");let a=new Set,e=new Set,i=new Set;for(let t of o){if(a.has(t.id)||e.has(t.secretRef)||i.has(t.appId))throw new Error("dsh-feishu config contains duplicate bot identities");a.add(t.id),e.add(t.secretRef),i.add(t.appId)}return{value:Object.freeze({version:2,bots:Object.freeze(o)}),migrated:!1}}let A=yO(n,{legacy:!0});return A?{value:Object.freeze({version:2,bots:Object.freeze([A])}),migrated:!0}:null}var QO=class{#e;#t=Object.freeze({version:2,bots:Object.freeze([])});#A=Promise.resolve();constructor(A){this.#e=A}async load(){try{let A=JSON.parse(await OJe(this.#e,"utf8")),o=kJe(A);if(!o)throw new Error("dsh-feishu config is incomplete or invalid");this.#t=o.value,o.migrated&&await this.#l(this.#t)}catch(A){if(A?.code!=="ENOENT")throw A;this.#t=Object.freeze({version:2,bots:Object.freeze([])})}return this}get(){let A=this.#t.bots[0];if(!A)return null;let o=structuredClone(A);return o.ownerOpenId=o.ownerOpenIds[0],o}list(){return structuredClone(this.#t.bots)}getBot(A){let o=this.#t.bots.find(a=>a.id===A);return o?structuredClone(o):null}async save(A){let o={...A};o.id||(o.id=Gre(ag(o.appId)??"invalid")),o.secretRef||(o.secretRef=mO);let a=yO(o);if(!a)throw new Error("Refusing to persist incomplete dsh-feishu configuration");return await this.#r([a]),this.get()}async saveBot(A){let o=yO(A);if(!o)throw new Error("Refusing to persist incomplete dsh-feishu bot configuration");return this.#a(a=>{if(a.find(r=>r.secretRef===o.secretRef&&r.id!==o.id))throw new Error("Refusing to share a credential reference between Feishu bots");if(a.find(r=>r.appId===o.appId&&r.id!==o.id))throw new Error("Refusing to persist the same Feishu app twice");let t=a.findIndex(r=>r.id===o.id);return t===-1?a.push(o):a[t]=o,structuredClone(o)})}async removeBot(A){if(!Fre(A))throw new TypeError("Invalid Feishu bot id");return this.#a(o=>{let a=o.findIndex(i=>i.id===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 _Je(this.#e)}catch(o){if(o?.code!=="ENOENT")throw o}this.#t=Object.freeze({version:2,bots:Object.freeze([])})});this.#A=A.then(()=>{},()=>{}),await A}async#r(A){let o=Object.freeze({version:2,bots:Object.freeze([...A])}),a=this.#A.then(async()=>{await this.#l(o),this.#t=o});this.#A=a.then(()=>{},()=>{}),await a}async#a(A){let o,a=this.#A.then(async()=>{let e=[...this.#t.bots];o=A(e);let i=Object.freeze({version:2,bots:Object.freeze(e)});await this.#l(i),this.#t=i});return this.#A=a.then(()=>{},()=>{}),await a,o}async#l(A){await bJe(NJe(this.#e),{recursive:!0,mode:448});let o=`${this.#e}.tmp`;await TJe(o,`${JSON.stringify(A,null,2)}
|
|
429
|
-
`,{encoding:"utf8",mode:384}),await MJe(o,this.#e)}};import{createHash as qJe,randomUUID as Jre}from"node:crypto";var dx=new Set(["starting","qr_ready","polling","slow_down","domain_switched","saving"]),vJe=new Set(["polling","slow_down","domain_switched"]),un=Object.freeze({IDLE:"idle",STARTING:"starting",QR_READY:"qr_ready",POLLING:"polling",SLOW_DOWN:"slow_down",DOMAIN_SWITCHED:"domain_switched",SAVING:"saving",SUCCEEDED:"succeeded",EXPIRED:"expired",CANCELLED:"cancelled",ERROR:"error"});function Ure(n){return["access_denied","expired_token","abort"].includes(n?.code)?n.code:"registration_failed"}function px(n){let A=Ure(n);return{code:A,message:{access_denied:"Registration was denied.",abort:"Registration was cancelled.",expired_token:"The registration QR code expired."}[A]??"Unable to register the Feishu app."}}function PJe(n){let A=Number(n);if(!Number.isFinite(A)||A<=0)throw new TypeError("registerApp onQRCodeReady returned an invalid expireIn");return A}function LJe(n){if(n!==void 0){if(n===null||typeof n!="object"||Array.isArray(n))throw new TypeError("registerApp returned invalid user_info");return{...n}}}var pl=class{#e;#t;#A;#r;#a;#l;#n=0;#o=null;#i;constructor({registerApp:A,onCredentials:o,diagnostics:a=st({channel:"feishu"}),now:e=Date.now,setTimeout:i=globalThis.setTimeout,clearTimeout:t=globalThis.clearTimeout}={}){if(typeof A!="function")throw new TypeError("RegistrationManager requires a registerApp function");if(typeof o!="function")throw new TypeError("RegistrationManager requires an onCredentials function");if(typeof e!="function"||typeof i!="function"||typeof t!="function")throw new TypeError("RegistrationManager clock dependencies must be functions");this.#e=a,this.#t=A,this.#A=o,this.#r=e,this.#a=i,this.#l=t,this.#i=this.#I(null,un.IDLE)}start(A={}){if(A===null||typeof A!="object"||Array.isArray(A))throw new TypeError("Registration options must be an object");this.#Q();let o={id:++this.#n,controller:new AbortController,qrCodeUrl:null,expiresAt:null,pollIntervalSeconds:null,expiryTimer:null};this.#o=o,this.#i=this.#I(o,un.STARTING);let a={...A,signal:o.controller.signal,onQRCodeReady:i=>this.#s(o,i),onStatusChange:i=>this.#g(o,i)};return Promise.resolve().then(()=>this.#t(a)).then(i=>this.#p(o,i),i=>this.#h(o,i)),this.status()}status(){this.#u();let A={...this.#i};A.error&&(A.error={...A.error});let o=this.#o;return o&&o.expiresAt!==null&&dx.has(A.state)&&(A.remainingSeconds=Math.max(0,Math.ceil((o.expiresAt-this.#r())/1e3))),A}cancel(){let A=this.#o;return A?(this.#C(A,un.CANCELLED,{error:{code:"abort",message:"Registration was cancelled."}}),A.controller.abort(),this.status()):this.status()}#c(A){return this.#o===A}#I(A,o,a={}){let e={state:o,attempt:A?.id??this.#n,updatedAt:this.#r(),...a};return A?.qrCodeUrl&&dx.has(o)&&(e.qrCodeUrl=A.qrCodeUrl,e.expiresAt=A.expiresAt),A?.pollIntervalSeconds!==null&&dx.has(o)&&(e.pollIntervalSeconds=A.pollIntervalSeconds),e}#d(A,o,a={}){this.#c(A)&&(this.#i=this.#I(A,o,a))}#s(A,o){if(!this.#c(A))return;if(typeof o?.url!="string"||!o.url)throw new TypeError("registerApp onQRCodeReady returned an invalid URL");let a=PJe(o.expireIn);A.qrCodeUrl=o.url,A.expiresAt=this.#r()+a*1e3,this.#f(A),A.expiryTimer=this.#a(()=>this.#E(A),a*1e3),A.expiryTimer?.unref?.(),this.#d(A,un.QR_READY)}#g(A,o){!this.#c(A)||!vJe.has(o?.status)||(o.status===un.SLOW_DOWN&&Number.isFinite(Number(o.interval))&&(A.pollIntervalSeconds=Number(o.interval)),this.#d(A,o.status))}async#p(A,o){if(!this.#c(A))return;let a=o?.client_id,e=o?.client_secret;if(typeof a!="string"||!a||typeof e!="string"||!e){this.#C(A,un.ERROR,{error:{code:"invalid_credentials",message:"Feishu registration returned invalid credentials."}});return}let i;try{i=LJe(o.user_info)}catch{this.#C(A,un.ERROR,{error:{code:"invalid_credentials",message:"Feishu registration returned invalid credentials."}});return}this.#f(A),A.qrCodeUrl=null,A.expiresAt=null,A.pollIntervalSeconds=null,this.#d(A,un.SAVING);try{await this.#A({client_id:a,client_secret:e,user_info:i})}catch(t){this.#c(A)&&this.#C(A,un.ERROR,{error:this.#e.report(t,{operation:"provision.poll",stage:"activation",publicError:{code:"credentials_callback_failed",message:"Unable to store the Feishu credentials."}}).publicError});return}this.#c(A)&&this.#C(A,un.SUCCEEDED)}#h(A,o){if(!this.#c(A))return;let a=Ure(o);if(a==="expired_token"){this.#C(A,un.EXPIRED,{error:px(o)});return}if(a==="abort"){this.#C(A,un.CANCELLED,{error:px(o)});return}this.#C(A,un.ERROR,{error:this.#e.report(o,{operation:A.qrCodeUrl?"provision.poll":"provision.begin",publicError:px(o)}).publicError})}#u(){let A=this.#o;A&&A.expiresAt!==null&&this.#r()>=A.expiresAt&&this.#E(A)}#E(A){this.#c(A)&&(this.#C(A,un.EXPIRED,{error:{code:"expired_token",message:"The registration QR code expired."}}),A.controller.abort())}#C(A,o,a={}){this.#c(A)&&(this.#f(A),this.#i=this.#I(A,o,a),this.#o=null)}#f(A){A.expiryTimer!==null&&(this.#l(A.expiryTimer),A.expiryTimer=null)}#Q(){let A=this.#o;A&&(this.#f(A),this.#o=null,A.controller.abort())}};var FJe="card.action.trigger",GJe="im:message:readonly",UJe="im:resource",my="callback_repair";function HJe(n){return n==="lark"?"accounts.larksuite.com":"accounts.feishu.cn"}function xJe(n){return n==="lark"?"open.larksuite.com":"open.feishu.cn"}function hx(n,A,o="feishu",a="Feishu app update"){let e;try{e=new URL(n)}catch{throw new Error(`${a} returned an invalid verification URL`)}let i=o==="feishu"||o==="lark",t=e.searchParams.getAll("clientID"),r=e.searchParams.getAll("tp"),s=e.searchParams.getAll("addons"),c=String(A).includes("{{")||String(A).includes("}}")||[...e.searchParams.values()].some(g=>g.includes("{{")||g.includes("}}"));if(!i||e.protocol!=="https:"||e.hostname!==xJe(o)||e.port!==""||e.username!==""||e.password!==""||r.length!==1||r[0]!=="sdk"||t.length!==1||t[0]!==A||e.searchParams.has("createOnly")||s.length!==1||!s[0]?.trim()||c)throw new Error(`${a} returned an unsafe verification URL`);return e.toString()}function KJe(n,A,o="feishu"){return hx(n,A,o,"Feishu callback repair")}var SO=class{#e;#t;#A;constructor({registerApp:A,onCredentials:o,appId:a,domain:e="feishu",diagnostics:i}={}){if(typeof A!="function")throw new TypeError("registerApp is required");if(typeof o!="function")throw new TypeError("onCredentials is required");if(typeof a!="string"||!a.trim())throw new TypeError("appId is required");if(e!=="feishu"&&e!=="lark")throw new TypeError("domain is invalid");this.#t=a.trim(),this.#A=e,this.#e=new pl({diagnostics:i,registerApp:t=>A({...t,onQRCodeReady:r=>{KJe(r?.url,this.#t,this.#A),t.onQRCodeReady(r)}}),onCredentials:o})}start(){return this.#e.start({source:"deepseek-harness-card-action-repair",domain:HJe(this.#A),appId:this.#t,addons:{preset:!1,scopes:{tenant:[GJe,UJe,"im:message.group_at_msg.include_bot:readonly",...hO]},callbacks:{items:[FJe]}}})}status(){return this.#e.status()}cancel(){return this.#e.cancel()}};var YJe="im:message.group_msg",DO="group_message_permission";function jJe(n){return n==="lark"?"accounts.larksuite.com":"accounts.feishu.cn"}function JJe(n,A,o="feishu"){return hx(n,A,o,"Feishu group message permission update")}var wO=class{#e;#t;#A;constructor({registerApp:A,onCredentials:o,appId:a,domain:e="feishu",diagnostics:i}={}){if(typeof A!="function")throw new TypeError("registerApp is required");if(typeof o!="function")throw new TypeError("onCredentials is required");if(typeof a!="string"||!a.trim())throw new TypeError("appId is required");if(e!=="feishu"&&e!=="lark")throw new TypeError("domain is invalid");this.#t=a.trim(),this.#A=e,this.#e=new pl({diagnostics:i,registerApp:t=>A({...t,onQRCodeReady:r=>{JJe(r?.url,this.#t,this.#A),t.onQRCodeReady(r)}}),onCredentials:o})}start(){return this.#e.start({source:"deepseek-harness-group-message-permission",domain:jJe(this.#A),appId:this.#t,addons:{preset:!1,scopes:{tenant:[YJe]}}})}status(){return this.#e.status()}cancel(){return this.#e.cancel()}};var Hre=Object.freeze(["im:message.p2p_msg:readonly","im:message.group_at_msg:readonly","im:message.group_at_msg.include_bot:readonly","im:message:readonly","im:message:send_as_bot","im:message.reactions:write_only","im:message:recall","im:resource","cardkit:card:write",...hO]);var ux=new Set(["starting","qr_ready","polling","slow_down","domain_switched"]),bO=new Set([...ux,"saving"]),xre=new Set([my,DO]),Kre="*",zJe=12e4,WJe=6e5;function qre(){return{ready:!1,feishuLongConnectionState:"idle",harnessReachable:!1}}function og(n){return n?n.status:qre()}function hl(n){return n.ready===!0&&n.feishuLongConnectionState==="connected"&&n.harnessReachable===!0}function zre(n){return n.length>12?`${n.slice(0,8)}\u2022\u2022\u2022\u2022${n.slice(-4)}`:"cli_\u2022\u2022\u2022\u2022"}function VJe(n){return{name:n.botName,appIdMasked:zre(n.appId),activated:n.activated,domain:n.domain}}function ZJe({connected:n,error:A,connection:o}){return n?"connected":A||o.feishuLongConnectionState==="failed"?"error":"disconnected"}function XJe(){return`bot_${Jre().replaceAll("-","")}`}function $Je(){return`reg_${Jre().replaceAll("-","")}`}function Yre(n){return`DSH_FEISHU_APP_SECRET_${n.slice(4).toUpperCase()}`}function OO(n){return JSON.stringify({id:n.id,consumerMode:n.consumerMode??"standalone",appId:n.appId,secretRef:n.secretRef,ownerOpenIds:n.ownerOpenIds,domain:n.domain,botName:n.botName,botOpenId:n.botOpenId,activated:n.activated,groupResponseMode:Hn(n.groupResponseMode),mentionTopicReply:n.mentionTopicReply!==!1,stepPush:n.stepPush===!0,stepPushMode:hn(n.stepPushMode),stepCardPanels:So(n.stepCardPanels),voice:n.voice,slashPanel:Kn(n.slashPanel),groupMessagePermissionGranted:n.groupMessagePermissionGranted===!0,deletionPending:n.deletionPending===!0,connectedAt:n.connectedAt??null,createdAt:n.createdAt??null})}function jre(n){return JSON.stringify({id:n.id,consumerMode:n.consumerMode??"standalone",appId:n.appId,secretRef:n.secretRef,ownerOpenIds:n.ownerOpenIds,domain:n.domain,botOpenId:n.botOpenId,deletionPending:n.deletionPending===!0})}function MO(n){return typeof n=="string"&&n.trim()?n.trim():null}var Sy=class{#e;#t;#A;#r;#a;#l;#n;#o;#i;#c=new Map;#I=new Fb;#d=new Map;#s=new Map;#g=new Map;#p=new Map;#h=null;#u=Promise.resolve();#E=new Map;#C=1;#f;#Q=!1;constructor({registerApp:A,verifyApp:o,logger:a=console,credentials:e,configStore:i,createRuntime:t,deleteState:r=async()=>{},createBotId:s=XJe,createRegistrationId:c=$Je,callbackProbeTimeoutMs:g=zJe}){if(typeof A!="function")throw new Error("registerApp is required");if(typeof o!="function")throw new Error("verifyApp is required");if(!e)throw new Error("credentials service is required");if(!i||typeof i.list!="function")throw new Error("multi-bot config store is required");if(typeof t!="function")throw new Error("createRuntime is required");if(typeof r!="function")throw new Error("deleteState must be a function");if(!Number.isFinite(g)||g<=0||g>WJe)throw new TypeError("callbackProbeTimeoutMs must be between 1 and 600000ms");this.#e=st({channel:"feishu",logger:a}),this.#t=A,this.#A=o,this.#r=e,this.#a=i,this.#l=t,this.#n=r,this.#o=s,this.#i=c,this.#f=g}async initialize(){if(this.#Q)return this.status();let A=this.#a.list(),o=!1;return await Promise.allSettled(A.map(a=>this.#R(a.id,async()=>{let e=og(this.#c.get(a.id));if(hl(e)||e.feishuLongConnectionState==="connecting"||e.feishuLongConnectionState==="reconnecting")return;if(o=!0,a.deletionPending){this.#d.set(a.id,{code:"deletion_pending",message:"\u673A\u5668\u4EBA\u6B63\u5728\u7B49\u5F85\u5B8C\u6210\u672C\u5730\u5220\u9664\uFF0C\u8BF7\u91CD\u8BD5\u79FB\u9664\u3002"});return}let i;try{i=await de("credential.read",()=>this.#r.resolve(a.secretRef),"credential-store")}catch(t){this.#d.set(a.id,this.#e.report(t,{reuse:!0,botId:a.id,publicError:{code:"missing_credentials",message:"\u65E0\u6CD5\u8BFB\u53D6\u673A\u5668\u4EBA\u51ED\u636E\uFF0C\u8BF7\u68C0\u67E5\u51ED\u636E\u5B58\u50A8\u3002"}}).publicError);return}if(!i?.value){this.#d.set(a.id,{code:"missing_credentials",message:"\u673A\u5668\u4EBA\u51ED\u636E\u7F3A\u5931\uFF0C\u8BF7\u5220\u9664\u540E\u91CD\u65B0\u626B\u7801\u63A5\u5165\u3002"});return}try{await this.#T(a,i.value),this.#d.delete(a.id)}catch(t){this.#d.set(a.id,this.#e.report(t,{reuse:!0,botId:a.id,stage:"connection.start",publicError:{code:"connection_failed",message:"\u673A\u5668\u4EBA\u6682\u65F6\u65E0\u6CD5\u8FDE\u63A5\u98DE\u4E66\uFF0C\u8BF7\u91CD\u8BD5\u3002"}}).publicError)}}))),o&&this.#F(),this.status()}startRegistration(){this.#D();let A=this.#i();if(typeof A!="string"||!/^[A-Za-z0-9_-]{1,128}$/.test(A)||this.#s.has(A))throw new Error("Registration id generator returned an invalid or duplicate id");let o={id:A,manager:null,botId:null,createdNew:!1,cancelled:!1};return o.manager=new pl({diagnostics:this.#e,registerApp:this.#t,onCredentials:a=>this.#G(()=>this.#S(o,a))}),this.#s.set(A,o),this.#h=A,this.#N(),o.manager.start({source:"deepseek-harness",createOnly:!0,appPreset:{name:"{user} \u7684\u5317\u6C47\u661F\u6CB3 AI \u52A9\u624B",desc:"\u8FDE\u63A5\u98DE\u4E66\u4E0E DeepSeek Harness\uFF0C\u5728\u804A\u5929\u4E2D\u4F7F\u7528\u4F01\u4E1A AI \u52A9\u624B\u3002"},addons:{preset:!1,scopes:{tenant:[...Hre]},events:{items:{tenant:["im.message.receive_v1"]}},callbacks:{items:["card.action.trigger"]}}}),this.#F(),this.registrationStatus(A)}startCallbackRepair(A,{actorOpenId:o,chatId:a}={}){this.#D();let e=this.#L(A);if(e.deletionPending)throw new Error("Cannot repair a Feishu bot pending deletion");let i=this.#g.get(A),t=i?this.#s.get(i):null;if(t&&bO.has(t.manager.status().state)){if(t.operation!==my)throw new Error("Another Feishu app update is already active for this bot");return this.registrationStatus(t.id)}this.#g.delete(A);let r=this.#i();if(typeof r!="string"||!/^[A-Za-z0-9_-]{1,128}$/.test(r)||this.#s.has(r))throw new Error("Registration id generator returned an invalid or duplicate id");let s={id:r,operation:my,manager:null,botId:A,createdNew:!1,cancelled:!1,remoteCommitted:!1,processing:null,publicError:null,stage:"authorizing",target:structuredClone(e),targetFingerprint:OO(e),initiator:{actorOpenId:MO(o),chatId:MO(a)}};return s.manager=new SO({diagnostics:this.#e,registerApp:this.#t,appId:e.appId,domain:e.domain,onCredentials:c=>{s.remoteCommitted=!0;let l=this.#_(s,c).finally(()=>{s.processing===l&&(s.processing=null)});return s.processing=l,l}}),this.#s.set(r,s),this.#g.set(A,r),this.#h=r,this.#N(),s.manager.start(),this.#F(),this.registrationStatus(r)}startGroupMessagePermission(A){this.#D();let o=this.#L(A);if(o.deletionPending)throw new Error("Cannot update permissions for a Feishu bot pending deletion");let a=this.#g.get(A),e=a?this.#s.get(a):null;if(e&&bO.has(e.manager.status().state)){if(e.operation!==DO)throw new Error("Another Feishu app update is already active for this bot");return this.registrationStatus(e.id)}this.#g.delete(A);let i=this.#i();if(typeof i!="string"||!/^[A-Za-z0-9_-]{1,128}$/.test(i)||this.#s.has(i))throw new Error("Registration id generator returned an invalid or duplicate id");let t={id:i,operation:DO,manager:null,botId:A,createdNew:!1,cancelled:!1,remoteCommitted:!1,processing:null,publicError:null,stage:"authorizing",target:structuredClone(o),targetFingerprint:OO(o),initiator:{actorOpenId:null,chatId:null}};return t.manager=new wO({diagnostics:this.#e,registerApp:this.#t,appId:o.appId,domain:o.domain,onCredentials:r=>{t.remoteCommitted=!0;let c=this.#b(t,r).finally(()=>{t.processing===c&&(t.processing=null)});return t.processing=c,c}}),this.#s.set(i,t),this.#g.set(A,i),this.#h=i,this.#N(),t.manager.start(),this.#F(),this.registrationStatus(i)}hasRegistration(A){return this.#s.has(A)}registrationStatus(A){let o=this.#s.get(A);return o?this.#y({registration:o,selectedBotId:o.botId}):null}async cancelRegistration(A=this.#h){let o=this.#s.get(A);if(!o)return this.status();let a=o.manager.status().state;return xre.has(o.operation)&&a==="saving"?this.registrationStatus(A):bO.has(a)?(o.cancelled=!0,o.manager.cancel(),await this.#G(async()=>{o.createdNew&&o.botId&&this.#p.get(o.botId)===o.id&&this.#a.getBot(o.botId)&&await this.#R(o.botId,()=>this.#m(o.botId))}),this.#F(),this.registrationStatus(A)??this.status()):this.registrationStatus(A)}get diagnostics(){return this.#e}status(A){return this.#y({registration:this.#s.get(this.#h)??null,selectedBotId:A})}async bindCredentials({appId:A,appSecret:o,domain:a="feishu"}={}){this.#D();let e=typeof A=="string"?A.trim():"",i=typeof o=="string"?o.trim():"",t=a==="lark"?"lark":"feishu";if(!e||!i)throw new TypeError("Feishu App ID and App Secret are required");return this.#G(async()=>{this.#D();let r=await this.#A({appId:e,appSecret:i,domain:t});this.#D();let s=this.#a.list().find(B=>B.appId===e),c=s?.id??this.#o();if(typeof c!="string"||!/^[A-Za-z0-9_-]{1,128}$/.test(c)||!s&&this.#a.getBot(c))throw new Error("Bot id generator returned an invalid or duplicate id");let g=s?.secretRef??Yre(c),l=await de("credential.read",()=>this.#r.resolve(g),"credential-store").catch(()=>{}),d={...s,id:c,appId:e,secretRef:g,ownerOpenIds:s?.ownerOpenIds?.length?s.ownerOpenIds:[Kre],domain:t,botName:r.name,botOpenId:r.openId,activated:r.activated,stepPush:s?.stepPush??!0,stepPushMode:s?.stepPushMode??jH,deletionPending:!1,connectedAt:new Date().toISOString(),createdAt:s?.createdAt??new Date().toISOString()};await de("credential.save",()=>this.#r.set(g,i),"credential-store");let u;try{u=await this.#a.saveBot(d)}catch(B){throw await this.#P(g,l),B}return await this.#R(c,async()=>{try{await this.#T(u,i),this.#d.delete(c)}catch(B){this.#d.set(c,this.#e.report(B,{reuse:!0,botId:c,publicError:{code:"connection_failed",message:"\u673A\u5668\u4EBA\u5DF2\u7ECF\u7ED1\u5B9A\uFF0C\u4F46\u957F\u8FDE\u63A5\u672A\u5C31\u7EEA\uFF0C\u8BF7\u70B9\u51FB\u91CD\u8BD5\u3002"}}).publicError)}}),this.#F(),this.status(c)})}async reconnectBot(A){return this.#D(),this.#R(A,async()=>{let o=this.#L(A);if(o.deletionPending)return this.#d.set(A,{code:"deletion_pending",message:"\u673A\u5668\u4EBA\u6B63\u5728\u7B49\u5F85\u5B8C\u6210\u672C\u5730\u5220\u9664\uFF0C\u8BF7\u91CD\u8BD5\u79FB\u9664\u3002"}),this.status(A);if(hl(og(this.#c.get(A))))return this.status(A);let a;try{a=await de("credential.read",()=>this.#r.resolve(o.secretRef),"credential-store")}catch{a=null}if(!a?.value)return this.#d.set(A,{code:"missing_credentials",message:"\u673A\u5668\u4EBA\u51ED\u636E\u7F3A\u5931\uFF0C\u8BF7\u5220\u9664\u540E\u91CD\u65B0\u626B\u7801\u63A5\u5165\u3002"}),this.#F(),this.status(A);try{await this.#T(o,a.value),this.#d.delete(A)}catch(e){this.#d.set(A,this.#e.report(e,{reuse:!0,botId:A,stage:"connection.start",publicError:{code:"connection_failed",message:"\u673A\u5668\u4EBA\u6682\u65F6\u65E0\u6CD5\u8FDE\u63A5\u98DE\u4E66\uFF0C\u8BF7\u91CD\u8BD5\u3002"}}).publicError)}return this.#F(),this.status(A)})}async sendConnectionTest(A){return this.#D(),this.#R(A,async()=>{let o=this.#L(A),a=this.#c.get(A);if(!hl(og(a))||typeof a.sendConnectionTest!="function"){let e=new Error("\u98DE\u4E66\u673A\u5668\u4EBA\u5C1A\u672A\u8FDE\u63A5");throw e.code="test-target-unavailable",e}return a.sendConnectionTest(ni(`${o.botName}\uFF08${zre(o.appId)}\uFF09`,"\u98DE\u4E66\u673A\u5668\u4EBA"))})}async#B(A){let o;try{let e=await this.#r.resolve(A.secretRef);if(!e?.value)throw new Error("Account credentials unavailable");o=await this.#A({appId:A.appId,appSecret:e.value,domain:A.domain})}catch(e){let i=new Error("Account credentials could not be verified",{cause:e});throw i.code="account-unverified",i}if(!o?.openId||o.openId!==A.botOpenId){let e=new Error("Authenticated account identity changed");throw e.code="account-changed",e}return{fingerprint:qJe("sha256").update(JSON.stringify({provider:"feishu",domain:A.domain,appId:A.appId,botOpenId:o.openId})).digest("hex"),...o.name?{name:o.name}:{}}}async describeDeliveryAccount(A){return this.#D("capability-unavailable"),this.#R(A,async()=>{this.#D("capability-unavailable");let o=this.#L(A),a=await this.#B(o);return this.#D("capability-unavailable"),{version:1,botId:A,channel:"feishu",account:a,connected:hl(og(this.#c.get(A))),capabilities:["proactive-text-checked","proactive-receipt-checked","exclusive-text-consumer","reply-text-checked","history-text-checked","thread-history-text-checked"]}})}async consumeInbound(A,{expectedFingerprint:o,onEvent:a,signal:e}={}){return this.#D(),this.#G(()=>this.#R(A,async()=>{this.#D(),e?.throwIfAborted();let i=this.#L(A),t=await this.#B(i);if(this.#D("capability-unavailable"),e?.throwIfAborted(),t.fingerprint!==o)throw Object.assign(new Error("account-changed"),{code:"account-changed"});let r=this.#I.register(A,{fingerprint:o,onEvent:a,signal:e});try{let s=await this.#a.saveBot({...i,consumerMode:"external-consumer"});this.#D("capability-unavailable"),e?.throwIfAborted();let c=await this.#r.resolve(s.secretRef);if(this.#D("capability-unavailable"),e?.throwIfAborted(),!c?.value)throw Object.assign(new Error("account-unverified"),{code:"account-unverified"});return await this.#T(s,c.value),e?.throwIfAborted(),this.#F(),r}catch(s){throw r(),s}}))}async historyChecked(A,o,a,{expectedFingerprint:e,signal:i}={}){return this.#D("capability-unavailable"),this.#R(A,async()=>{this.#D("capability-unavailable"),i?.throwIfAborted();let t=this.#L(A),r=await this.#B(t);if(this.#D("capability-unavailable"),i?.throwIfAborted(),r.fingerprint!==e)throw Object.assign(new Error("account-changed"),{code:"account-changed"});let s=this.#c.get(A);if(t.consumerMode!=="external-consumer"||!hl(og(s))||typeof s.historyChecked!="function")throw Object.assign(new Error("capability-unavailable"),{code:"capability-unavailable"});let c=this.#I.signalFor(A,e),g=i?AbortSignal.any([i,c]):c,l=await s.historyChecked({botId:A,appId:t.appId,botOpenId:t.botOpenId,fingerprint:r.fingerprint},o,a,{signal:g});return this.#D("capability-unavailable"),g.throwIfAborted(),l})}async replyChecked(A,o,a,{expectedFingerprint:e,signal:i}={}){return this.#D(),this.#R(A,async()=>{this.#D();let t=this.#L(A),r=await this.#B(t);if(this.#D("capability-unavailable"),i?.throwIfAborted(),r.fingerprint!==e)throw Object.assign(new Error("account-changed"),{code:"account-changed"});i?.throwIfAborted();let s=this.#c.get(A);if(t.consumerMode!=="external-consumer"||!hl(og(s))||typeof s.replyChecked!="function")throw Object.assign(new Error("capability-unavailable"),{code:"capability-unavailable"});return s.replyChecked(o,a,{signal:i})})}async sendProactiveText(A,o,a,e={}){let i=e.expectedFingerprint!==void 0;return this.#D(i?"capability-unavailable":void 0),this.#R(A,async()=>{this.#D(i?"capability-unavailable":void 0);let t=this.#L(A);if(i){if((await this.#B(t)).fingerprint!==e.expectedFingerprint){let c=new Error("Authenticated account identity changed");throw c.code="account-changed",c}e.beforeSend?.(),this.#D("capability-unavailable"),e.signal?.throwIfAborted()}let r=this.#c.get(A);if(!hl(og(r))||typeof r.sendProactiveText!="function"){let s=new Error("\u98DE\u4E66\u673A\u5668\u4EBA\u5C1A\u672A\u8FDE\u63A5");throw s.code="bot-not-connected",s}return r.sendProactiveText(o,a,e)})}async presentSessionSyncApproval(A,o,a,e={}){return this.#D(),this.#R(A,async()=>{this.#D(),this.#L(A);let i=this.#c.get(A);return!hl(og(i))||typeof i.presentSessionSyncApproval!="function"?!1:i.presentSessionSyncApproval(o,a,e)})}async disconnectBot(A){return this.#D(),this.#R(A,async()=>(this.#L(A),await this.#w(A),this.#d.delete(A),this.#F(),this.status(A)))}async updateGroupResponseMode(A,o){if(this.#D(),!nO(o))throw new TypeError("Invalid Feishu group response mode");return this.#G(()=>this.#R(A,async()=>{let a=this.#L(A);if(o==="all"&&a.groupMessagePermissionGranted!==!0){let i=new Error("Authorize im:message.group_msg before enabling all group messages");throw i.code="group_message_permission_required",i}let e=await this.#a.saveBot({...a,groupResponseMode:o});return this.#c.get(A)?.setGroupResponseMode?.(e.groupResponseMode),this.#F(),this.status(A)}))}async updateMentionTopicReply(A,o){if(this.#D(),typeof o!="boolean")throw new TypeError("Invalid Feishu mention topic reply flag");return this.#G(()=>this.#R(A,async()=>{let a=this.#L(A),e=await this.#a.saveBot({...a,mentionTopicReply:o});return this.#c.get(A)?.setMentionTopicReply?.(e.mentionTopicReply),this.#F(),this.status(A)}))}async updateSlashPanel(A,o){if(this.#D(),!pO(o))throw new TypeError("Invalid Feishu slash panel config");return this.#G(()=>this.#R(A,async()=>{let a=this.#L(A),e=await this.#a.saveBot({...a,slashPanel:o});return this.#c.get(A)?.setSlashPanel?.(e.slashPanel),this.#F(),this.status(A)}))}async updateStepPush(A,o){if(this.#D(),typeof o!="boolean")throw new TypeError("Invalid Feishu step push flag");return this.#G(()=>this.#R(A,async()=>{let a=this.#L(A),e=await this.#a.saveBot({...a,stepPush:o});return this.#c.get(A)?.setStepPush?.(e.stepPush),this.#F(),this.status(A)}))}async updateStepPushMode(A,o){if(this.#D(),!Zb(o))throw new TypeError("Invalid Feishu step push mode");return this.#G(()=>this.#R(A,async()=>{let a=this.#L(A),e=await this.#a.saveBot({...a,stepPushMode:o});return this.#c.get(A)?.setStepPushMode?.(e.stepPushMode),this.#F(),this.status(A)}))}async updateStepCardPanels(A,o){if(this.#D(),!Vb(o))throw new TypeError("Invalid Feishu step card panels");return this.#G(()=>this.#R(A,async()=>{let a=this.#L(A),e=await this.#a.saveBot({...a,stepCardPanels:o});return this.#c.get(A)?.setStepCardPanels?.(e.stepCardPanels),this.#F(),this.status(A)}))}async updateVoice(A,o){if(this.#D(),o!==null&&(typeof o!="object"||Array.isArray(o)))throw new TypeError("Invalid Feishu voice configuration");let a=cc(o);return this.#G(()=>this.#R(A,async()=>{let e=this.#L(A),i=await this.#a.saveBot({...e,voice:a}),t=a?await de("credential.read",()=>this.#r.resolve(a.secretRef),"credential-store").catch(()=>null):null;return this.#c.get(A)?.setVoice?.({config:a,secret:t?.value??null}),this.#F(),this.status(A)}))}async deleteBot(A){return this.#D(),this.#G(()=>this.#R(A,async()=>(this.#L(A),await this.#m(A),this.#F(),this.status())))}async reconnect(){let A=this.#a.list()[0];return A?this.reconnectBot(A.id):this.status()}async disconnect(){let A=this.#a.list()[0];return A?this.deleteBot(A.id):this.status()}async close(){if(this.#Q)return;this.#Q=!0,this.#I.close();let A=[];for(let o of this.#s.values()){let a=o.manager.status().state;xre.has(o.operation)&&a==="saving"?(o.manager.cancel(),o.processing&&A.push(o.processing)):bO.has(a)&&(o.cancelled=!0,o.manager.cancel())}await this.#u,await Promise.allSettled([...this.#E.values()]),await Promise.allSettled([...this.#c.keys()].map(o=>this.#w(o))),await Promise.allSettled(A),await this.#u,await Promise.allSettled([...this.#E.values()]),await Promise.allSettled([...this.#c.keys()].map(o=>this.#w(o)))}#y({registration:A,selectedBotId:o}={}){let a=this.#a.list().map(l=>{let d=og(this.#c.get(l.id)),u=hl(d),B=og(this.#c.get(l.id)).error??this.#d.get(l.id)??null;return{botId:l.id,phase:ZJe({connected:u,error:B,connection:d}),connected:u,configured:!0,groupResponseMode:Hn(l.groupResponseMode),mentionTopicReply:l.mentionTopicReply!==!1,stepPush:l.stepPush===!0,stepPushMode:hn(l.stepPushMode),stepCardPanels:So(l.stepCardPanels),voice:cc(l.voice),slashPanel:Kn(l.slashPanel),groupMessagePermissionGranted:l.groupMessagePermissionGranted===!0,bot:VJe(l),connection:d,lastMessageError:Kr(d.lastMessageError),error:B}}),e=A?this.#O(A):{state:"idle",attempt:0,updatedAt:Date.now()},i=ux.has(e.state),t=e.state==="saving",r=!!A&&(i||t),s=a.find(l=>l.botId===o)??(r?null:a[0]??null),c=a.some(l=>l.connected),g=s?.phase??"unconfigured";return i?g="registering":t?g="connecting":e.state==="error"&&!s&&(g="error"),{schemaVersion:2,revision:this.#C,phase:g,connected:s?.connected??!1,configured:a.length>0,bot:s?.bot??null,connection:s?.connection??qre(),error:s?.error??e.error??null,registration:e,bots:a,totals:{configured:a.length,connected:a.filter(l=>l.connected).length},anyConnected:c}}#O(A){let o=A.manager.status();return{...o,attempt:A.id,...A.botId?{botId:A.botId}:{},...A.operation?{operation:A.operation}:{},...A.stage?{stage:A.stage}:{},...o.state==="error"&&A.publicError?{error:{...A.publicError}}:{}}}async#b(A,o){let a=o.client_id,e=o.client_secret,i=MO(o.user_info?.open_id),t=o.user_info?.tenant_brand,r=A.target;if(A.cancelled)throw this.#M(A,"abort","Group message permission update was cancelled before local activation.");if(a!==r.appId)throw this.#M(A,"repair_app_mismatch","Feishu returned credentials for a different app.");if(!i)throw this.#M(A,"repair_owner_missing","Feishu returned no permission operator identity.");if(t!==void 0&&t!==r.domain)throw this.#M(A,"repair_domain_mismatch","Feishu returned credentials for a different account domain.");if(!r.ownerOpenIds.includes(Kre)&&!r.ownerOpenIds.includes(i))throw this.#M(A,"repair_owner_mismatch","The Feishu permission operator is not an owner of this configured bot.");A.stage="verifying_identity";let s;try{s=await this.#A({appId:a,appSecret:e,domain:r.domain})}catch(c){throw this.#M(A,"repair_credentials_invalid","Feishu could not verify the updated app credentials.",c)}if(r.botOpenId&&s?.openId!==r.botOpenId)throw this.#M(A,"repair_bot_mismatch","The updated Feishu app belongs to a different bot identity.");await this.#G(()=>this.#R(A.botId,async()=>{let c=this.#a.getBot(A.botId);if(!c||c.deletionPending||OO(c)!==A.targetFingerprint)throw this.#M(A,"repair_target_changed","The Feishu bot changed while its permission update was in progress.");let g;try{g=await de("credential.read",()=>this.#r.resolve(c.secretRef),"credential-store")}catch(d){throw this.#M(A,"credential_update_failed","Unable to read the current Feishu credential.",d)}if(g?.value!==e){A.stage="persisting_secret";try{await de("credential.save",()=>this.#r.set(c.secretRef,e),"credential-store")}catch(u){if((await de("credential.read",()=>this.#r.resolve(c.secretRef),"credential-store").catch(()=>null))?.value!==e)throw this.#M(A,"credential_update_failed","Unable to store the updated Feishu credential.",u)}if((await de("credential.read",()=>this.#r.resolve(c.secretRef),"credential-store").catch(()=>null))?.value!==e)throw this.#M(A,"credential_state_unknown","The updated Feishu credential could not be confirmed after writing.")}A.stage="enabling_all_messages";let l;try{l=await this.#a.saveBot({...c,groupMessagePermissionGranted:!0,groupResponseMode:"all"})}catch(d){throw this.#M(A,"group_message_permission_save_failed","The permission was accepted, but all-message mode could not be saved.",d)}A.stage="restarting";try{await this.#T(l,e)}catch(d){throw this.#d.set(A.botId,this.#e.report(d,{reuse:!0,botId:A.botId,stage:"connection.start",publicError:{code:"connection_failed",message:"\u7FA4\u6D88\u606F\u6743\u9650\u5DF2\u5F00\u901A\uFF0C\u4F46\u673A\u5668\u4EBA\u957F\u8FDE\u63A5\u672A\u5C31\u7EEA\uFF0C\u8BF7\u70B9\u51FB\u91CD\u8BD5\u3002"}}).publicError),this.#F(),this.#M(A,"group_message_permission_connection_failed","The permission was accepted, but the Feishu runtime could not restart.",d)}this.#d.delete(A.botId),A.stage="verified",A.publicError=null,this.#F()}))}async#_(A,o){let a=o.client_id,e=o.client_secret,i=MO(o.user_info?.open_id),t=o.user_info?.tenant_brand,r=A.target;if(A.cancelled)throw this.#M(A,"abort","Callback repair was cancelled before local activation.");if(a!==r.appId)throw this.#M(A,"repair_app_mismatch","Feishu returned credentials for a different app.");if(!i)throw this.#M(A,"repair_owner_missing","Feishu returned no repair operator identity.");if(t!==void 0&&t!==r.domain)throw this.#M(A,"repair_domain_mismatch","Feishu returned credentials for a different account domain.");A.stage="verifying_identity";let s;try{s=await this.#A({appId:a,appSecret:e,domain:r.domain})}catch(g){throw this.#M(A,"repair_credentials_invalid","Feishu could not verify the repaired app credentials.",g)}if(r.botOpenId&&s?.openId!==r.botOpenId)throw this.#M(A,"repair_bot_mismatch","The repaired Feishu app belongs to a different bot identity.");let c=await this.#G(()=>this.#R(A.botId,async()=>{let g=this.#a.getBot(A.botId);if(!g||g.deletionPending||OO(g)!==A.targetFingerprint)throw this.#M(A,"repair_target_changed","The Feishu bot changed while its callback repair was in progress.");let l;try{l=await de("credential.read",()=>this.#r.resolve(g.secretRef),"credential-store")}catch(B){throw this.#M(A,"credential_update_failed","Unable to read the current Feishu credential.",B)}if(l?.value!==e){A.stage="persisting_secret";try{await de("credential.save",()=>this.#r.set(g.secretRef,e),"credential-store")}catch(y){if((await de("credential.read",()=>this.#r.resolve(g.secretRef),"credential-store").catch(()=>null))?.value!==e)throw this.#M(A,"credential_update_failed","Unable to store the repaired Feishu credential.",y)}if((await de("credential.read",()=>this.#r.resolve(g.secretRef),"credential-store").catch(()=>null))?.value!==e)throw this.#M(A,"credential_state_unknown","The repaired Feishu credential could not be confirmed after writing.")}let u;A.stage="restarting";try{await this.#T(g,e),u=this.#c.get(A.botId)}catch(B){throw this.#d.set(A.botId,this.#e.report(B,{reuse:!0,botId:A.botId,publicError:{code:"connection_failed",message:"\u673A\u5668\u4EBA\u56DE\u8C03\u4FEE\u590D\u5DF2\u4FDD\u5B58\uFF0C\u4F46\u957F\u8FDE\u63A5\u672A\u5C31\u7EEA\uFF0C\u8BF7\u70B9\u51FB\u91CD\u8BD5\u3002"}}).publicError),this.#F(),this.#M(A,"repair_connection_failed","The repaired Feishu runtime could not be started.",B)}if(!u)throw this.#M(A,"repair_connection_failed","The repaired Feishu runtime is unavailable.");return this.#d.delete(A.botId),this.#F(),u}));if(typeof c.beginCardActionProbe!="function")throw this.#M(A,"card_action_probe_unavailable","The Feishu runtime cannot verify card callbacks.");A.stage="awaiting_callback";try{if((await c.beginCardActionProbe({expectedOperatorOpenId:A.initiator.actorOpenId??i,timeoutMs:this.#f,...A.initiator.chatId?{chatId:A.initiator.chatId}:{}}))?.verified!==!0){let l=new Error("Feishu runtime returned no callback proof");throw l.code="card_action_probe_failed",l}}catch(g){let l=g?.code==="card_action_probe_timeout"?"card_action_probe_timeout":g?.code==="card_action_probe_unavailable"?"card_action_probe_unavailable":g?.code==="card_action_probe_send_failed"?"card_action_probe_send_failed":"card_action_probe_failed";throw this.#M(A,l,l==="card_action_probe_timeout"?"Timed out waiting for the Feishu callback verification button.":"The Feishu card callback probe failed.",g)}A.stage="verified",A.publicError=null,this.#F()}#M(A,o,a,e){A.publicError={code:o,message:a};let i=new Error(a,e?{cause:e}:void 0);return i.code=o,i}async#S(A,o){if(A.cancelled)throw new Error("Registration was cancelled");let a=o.client_id,e=o.client_secret,i=o.user_info?.open_id,t=o.user_info?.tenant_brand==="lark"?"lark":"feishu";if(!i)throw new Error("Feishu registration returned no owner open_id");let r=await this.#A({appId:a,appSecret:e,domain:t});if(A.cancelled)throw new Error("Registration was cancelled");let s=this.#a.list().find(y=>y.appId===a),c=s?.id??this.#o();if(typeof c!="string"||!/^[A-Za-z0-9_-]{1,128}$/.test(c)||!s&&this.#a.getBot(c))throw new Error("Bot id generator returned an invalid or duplicate id");let g=s?.secretRef??Yre(c),l=this.#p.get(c),d=await de("credential.read",()=>this.#r.resolve(g),"credential-store").catch(()=>{});await de("credential.save",()=>this.#r.set(g,e),"credential-store");let u;try{u=await this.#a.saveBot({...s,id:c,appId:a,secretRef:g,ownerOpenIds:[...new Set([...s?.ownerOpenIds??[],i])],domain:t,botName:r.name,botOpenId:r.openId,activated:r.activated,stepPush:s?.stepPush??!0,stepPushMode:s?.stepPushMode??jH,deletionPending:!1,connectedAt:new Date().toISOString(),createdAt:s?.createdAt??new Date().toISOString()}),A.botId=c,A.createdNew=!s,this.#p.set(c,A.id)}catch(y){try{await this.#P(g,d)}catch(Q){throw new Error("Unable to restore the Feishu credential after a config failure.",{cause:Q})}throw y}if(A.cancelled)throw A.createdNew?await this.#R(c,()=>this.#m(c)):(await this.#a.saveBot(s),await this.#P(g,d),l?this.#p.set(c,l):this.#p.delete(c)),new Error("Registration was cancelled");let B=!1;try{if(await this.#R(c,()=>this.#T(u,e)),A.cancelled)throw A.createdNew?await this.#R(c,()=>this.#m(c)):(await this.#a.saveBot(s),await this.#P(g,d),l?this.#p.set(c,l):this.#p.delete(c),d?.value&&!s.deletionPending?await this.#R(c,()=>this.#T(s,d.value)):await this.#R(c,()=>this.#w(c))),B=!0,new Error("Registration was cancelled");this.#d.delete(c),this.#F()}catch(y){if(A.cancelled)throw!B&&A.createdNew&&this.#a.getBot(c)?await this.#R(c,()=>this.#m(c)):!B&&s&&(await this.#a.saveBot(s),await this.#P(g,d),l?this.#p.set(c,l):this.#p.delete(c),!this.#Q&&d?.value&&!s.deletionPending?await this.#R(c,()=>this.#T(s,d.value)):await this.#R(c,()=>this.#w(c))),this.#F(),y;if(s&&d?.value)try{throw await this.#a.saveBot(s),await this.#P(g,d),l?this.#p.set(c,l):this.#p.delete(c),s.deletionPending?(await this.#R(c,()=>this.#w(c)),this.#d.set(c,this.#e.report(y,{reuse:!0,botId:c,publicError:{code:"deletion_pending",message:"\u673A\u5668\u4EBA\u6B63\u5728\u7B49\u5F85\u5B8C\u6210\u672C\u5730\u5220\u9664\uFF0C\u8BF7\u91CD\u8BD5\u79FB\u9664\u3002"}}).publicError)):(await this.#R(c,()=>this.#T(s,d.value)),this.#d.delete(c)),this.#F(),y}catch(Q){throw Q===y?y:(this.#d.set(c,this.#e.report(Q,{reuse:!0,botId:c,publicError:{code:"connection_failed",message:"\u673A\u5668\u4EBA\u8FDE\u63A5\u66F4\u65B0\u5931\u8D25\uFF0C\u4E14\u539F\u8FDE\u63A5\u65E0\u6CD5\u6062\u590D\uFF0C\u8BF7\u91CD\u8BD5\u3002"}}).publicError),this.#F(),new Error("Unable to restore the previous Feishu bot connection.",{cause:Q}))}throw this.#d.set(c,this.#e.report(y,{reuse:!0,botId:c,publicError:{code:"connection_failed",message:"\u673A\u5668\u4EBA\u5DF2\u7ECF\u521B\u5EFA\uFF0C\u4F46\u957F\u8FDE\u63A5\u672A\u5C31\u7EEA\uFF0C\u8BF7\u70B9\u51FB\u91CD\u8BD5\u3002"}}).publicError),this.#F(),y}}async#T(A,o){await this.#w(A.id);let a;a=await de("runtime.prepare",()=>this.#l({botId:A.id,config:A,appSecret:o,repair:this.#v(A.id),acceptExternal:async(e,{signal:i}={})=>{let t=()=>{if(this.#D("capability-unavailable"),i?.throwIfAborted(),this.#c.get(A.id)!==a)throw Object.assign(new Error("consumer-unavailable"),{code:"consumer-unavailable"});let c=this.#L(A.id);if(c.consumerMode!=="external-consumer"||jre(c)!==jre(A))throw Object.assign(new Error("account-changed"),{code:"account-changed"});return c},r=await this.#R(A.id,async()=>{let c=t(),g=await this.#B(c);return t(),Gb(e,{botId:c.id,appId:c.appId,botOpenId:c.botOpenId,fingerprint:g.fingerprint})});if(t(),r===null)return{accepted:!0,ignored:!0};let s=await this.#I.accept(A.id,r,i);return t(),s}})),this.#c.set(A.id,a);try{await a.start()}catch(e){throw this.#c.get(A.id)===a&&this.#c.delete(A.id),await a.stop({preserveError:!0}).catch(()=>{}),e}}#v(A){let o=a=>{let e=this.#s.get(a);return e?.operation===my&&e.botId===A?e:null};return Object.freeze({start:({actorOpenId:a,chatId:e}={})=>this.startCallbackRepair(A,{actorOpenId:a,chatId:e}),status:({attemptId:a}={})=>o(a)?this.registrationStatus(a):null,cancel:async({attemptId:a}={})=>o(a)?this.cancelRegistration(a):this.status(A)})}async#w(A){let o=this.#c.get(A);this.#c.delete(A),o&&await o.stop()}async#m(A){let o=this.#a.getBot(A);if(o){this.#I.remove(A),o.deletionPending||(o=await this.#a.saveBot({...o,deletionPending:!0})),await this.#w(A);try{await de("credential.remove",()=>this.#r.unset(o.secretRef),"credential-store")}catch(a){throw this.#d.set(A,this.#e.report(a,{reuse:!0,botId:A,publicError:{code:"credential_removal_failed",message:"\u65E0\u6CD5\u5220\u9664\u673A\u5668\u4EBA\u51ED\u636E\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002"}}).publicError),new Error("Unable to remove the Feishu credential.",{cause:a})}try{await this.#n({botId:A,config:o})}catch(a){throw this.#d.set(A,this.#e.report(a,{reuse:!0,botId:A,publicError:{code:"state_cleanup_failed",message:"\u65E0\u6CD5\u5220\u9664\u673A\u5668\u4EBA\u7684\u672C\u5730\u4F1A\u8BDD\u6570\u636E\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002"}}).publicError),new Error("Unable to remove the Feishu bot session state.",{cause:a})}await this.#a.removeBot(A),this.#d.delete(A),this.#p.delete(A)}}async#P(A,o){o?.value?await de("credential.save",()=>this.#r.set(A,o.value),"credential-store"):await de("credential.remove",()=>this.#r.unset(A),"credential-store")}#L(A){let o=this.#a.getBot(A);if(!o)throw new Error("Unknown Feishu bot");return o}#D(A){if(this.#Q){let o=new Error("The Feishu controller is closed");throw A&&(o.code=A),o}}#G(A){let o=this.#u.then(A,A);return this.#u=o.then(()=>{},()=>{}),o}#R(A,o){let e=(this.#E.get(A)??Promise.resolve()).then(o,o),i=e.then(()=>{},()=>{});return this.#E.set(A,i),i.finally(()=>{this.#E.get(A)===i&&this.#E.delete(A)}),e}#N(){if(!(this.#s.size<=32))for(let[A,o]of this.#s){if(A===this.#h)continue;let a=o.manager.status().state;if(!ux.has(a)&&a!=="saving"&&this.#s.delete(A),this.#s.size<=32)break}}#F(){this.#C+=1}};var Aqe=["open.feishu.cn","open.larksuite.com"];function rqe(n,A){if(A==="*")return!0;let o=A.startsWith(".")?A.slice(1):A;return o?n===o||n.endsWith(`.${o}`):!1}function iqe(n){for(let A of["no_proxy","NO_PROXY"]){let o=n?.[A];if(typeof o!="string"||!o.trim())continue;let a=o.split(",").map(e=>e.trim().toLowerCase()).filter(Boolean);if(Aqe.some(e=>a.some(i=>rqe(e,i))))return!0}return!1}function aqe(n){if(!iqe(n))for(let A of["https_proxy","HTTPS_PROXY","http_proxy","HTTP_PROXY"]){let o=n?.[A];if(typeof o=="string"&&o.trim())return o.trim()}}function oqe(n,A=o=>new Wre.default(o)){let o=aqe(n);return o?A(o):void 0}function nqe(n){let A=wp(n.dshHome??process.env.DSH_HOME??hE(eqe(),".dsh")),o=wp(n.dataDir??hE(A,"integrations","dsh-feishu"));return{root:o,config:wp(n.configPath??hE(o,"config.json")),legacyState:wp(n.statePath??hE(o,"state.json")),bots:wp(n.botsDir??hE(o,"bots")),workspaces:wp(n.workspacesPath??hE(o,"workspaces.json"))}}async function Ex(n,A={},o={}){if(!n?.credentials)throw new TypeError("dsh-feishu requires ctx.credentials");let a=Jr(n,A,{competitiveApprovals:!0}),e=o.lark??TH,i=o.Controller??Sy,t=o.ConfigStore??QO,r=o.StateStore??aO,s=o.HarnessClient??BO,c=o.FeishuRuntime??fO,g=o.verifyFeishuApp??hAe,l=fe=>g({...fe,httpInstance:e.defaultHttpInstance}),d=o.createConnectionSupervisor??NH,u=typeof n.logger=="function"?n.logger("dsh-feishu"):n.logger??console,B=()=>si(n),y=nqe(A),Q=await new t(y.config).load(),{defaultWorkspace:m,ungroupedWorkspace:D}=await pa(A),M=o.WorkspaceStore??jr,O=o.workspaces??await new M(y.workspaces,{defaultWorkspace:m,ungroupedWorkspace:D}).load(),R=typeof Q.list=="function",F=()=>R?Q.list():[],v=F();R&&await O.reconcile(v.map(fe=>fe.id)),await Promise.all(v.map(fe=>O.ensure(fe.id,{defaultAgentPreset:A.agentPreset,initialAccessPolicy:WA("feishu",fe)})));let L=typeof Q.removeBot=="function"?di(Q,{workspaces:O,method:"removeBot",botIdFromRemoved:fe=>fe.id,saveMethod:"saveBot",botIdFromSave:fe=>fe?.id}):Q,H=new Map,G=fe=>!fe.id||!fe.secretRef||fe.secretRef===mO?y.legacyState:wp(y.bots,fe.id,"state.json"),k=async fe=>{let le=fe.id??"__legacy__",Ie=H.get(le);return Ie||(Ie=await new r(G(fe)).load(),H.set(le,Ie)),Ie},Y=async fe=>{let le=F().find(Ie=>Ie.id===fe);if(!le)throw new Error("Unknown Feishu bot");return k(le)},U=async fe=>{if(typeof O.listSessionSyncTargets!="function")return[];let le=[];for(let Ie of O.listSessionSyncTargets()){let Be;try{Be=await Y(Ie.botId)}catch{continue}if(Be?.snapshot?.().sessions?.[Ie.conversationKey]!==fe)continue;let tt=O.deliveryTargetFor(Ie.botId,Ie.targetId)?.route?.openId;tt&&le.push({openId:tt,botId:Ie.botId,targetId:Ie.targetId})}return le},_=Ei(n,o.commandExecutor),P=o.inboundTtl??qr(n,A),q=P?.service??P;fi(n,q,{workspaces:O,configStore:L,defaultWorkspace:m,botIdFrom:fe=>fe?.id});let{controlExecutor:Z,sessionMaintenanceExecutor:X,fileIngressExecutor:Ae}=Ci(n,{controlExecutor:o.controlExecutor,sessionMaintenanceExecutor:o.sessionMaintenanceExecutor,fileIngressExecutor:o.fileIngressExecutor,inboundTtlService:q}),W=new s({...a,workspace:m,ungroupedWorkspace:D,autostart:!1,dshBin:A.dshBin??"dsh",..._?{commandExecutor:_}:{},...Z?{controlExecutor:Z}:{},...X?{sessionMaintenanceExecutor:X}:{},...Ae?{fileIngressExecutor:Ae}:{},imageInputPolicy:()=>oi(A).get()}),ee=o.proxyEnv??process.env,ce=oqe(ee,o.createProxyAgent),me=fe=>li(W,fe),Se=new i({logger:u,registerApp:fe=>e.registerApp(fe),verifyApp:l,credentials:n.credentials,configStore:L,createRuntime:async({botId:fe,config:le,appSecret:Ie,repair:Be,acceptExternal:se})=>{let ue=await k(le),tt=fe??le.id??le.appId;await O.ensure(tt,{defaultAgentPreset:A.agentPreset,initialAccessPolicy:mw("feishu",le)});let it=pi(W,{botId:tt,workspaces:O,state:ue,agentPresetCatalog:B}),We=null;if(le.voice)try{let xe=await n.credentials.resolve(le.voice.secretRef);xe?.value&&(We={config:le.voice,secret:xe.value})}catch(xe){u.warn?.("[dsh-feishu-voice] \u8BED\u97F3\u51ED\u636E\u8BFB\u53D6\u5931\u8D25,\u8BED\u97F3\u5DF2\u7981\u7528:",xe?.message??String(xe))}return new c({lark:e,consumerMode:le.consumerMode,acceptExternal:se,botId:tt,repair:Be,appId:le.appId,appSecret:Ie,domain:le.domain,botOpenId:le.botOpenId,groupResponseMode:le.groupResponseMode,mentionTopicReply:le.mentionTopicReply,stepPush:le.stepPush,stepPushMode:le.stepPushMode,stepCardPanels:le.stepCardPanels,voice:We,sessionSyncTargetsFor:U,ownerOpenIds:le.ownerOpenIds??[le.ownerOpenId],harness:it.harness,state:it.state,contextEnhancement:{botId:tt,getSettings:()=>O.contextEnhancementFor(tt)},accessPolicy:Bi(O,tt,{channel:"feishu",config:le}),replyTimeoutMs:A.replyTimeoutMs??6e5,slashCommands:A.slashCommands!==!1,slashPanel:le.slashPanel,...ce?{wsAgent:ce}:{},logger:{error:(...xe)=>u.error?.(`[${fe??le.id}]`,...xe),warn:(...xe)=>u.warn?.(`[${fe??le.id}]`,...xe),info:(...xe)=>u.info?.(`[${fe??le.id}]`,...xe),debug:(...xe)=>u.debug?.(`[${fe??le.id}]`,...xe)}})},deleteState:async({botId:fe,config:le})=>{H.delete(fe);try{await tqe(G(le))}catch(Ie){if(Ie?.code!=="ENOENT")throw Ie}}}),Fe=hi(Se,{workspaces:O,stateFor:Y,agentPresetCatalog:B,modelCatalog:me,validateAccessPolicyForBot(fe,le){let Ie=Q.getBot(fe)?.botOpenId;if(Ie&&[le.direct,le.group].some(Be=>Be.mode==="allowlist"&&Be.allowlist.users.some(se=>se.id===Ie))){let Be=new TypeError(S("\u8FD9\u91CC\u9700\u8981\u586B\u5199\u7528\u6237\u7684 Open ID\uFF0C\u4E0D\u80FD\u586B\u5199\u673A\u5668\u4EBA\u81EA\u5DF1\u7684 Open ID\u3002"));throw Be.code="access-policy-invalid",Be}}}),ge=d({controller:Fe,harness:W,logger:u,retryDelaysMs:A.retryDelaysMs,healthyIntervalMs:A.healthyIntervalMs}).start();return{controller:Fe,deliveryAdapter:ui({channel:"feishu",workspaces:O,coreController:Se,stateFor:Y}),ready:ge.ready,async close(){await ge.close(),await Fe.close(),W.stopManagedProcess(),ce?.destroy?.()}}}import bqe from"qrcode";var EE=At(kO(),1);var mqe=At(kO(),1);var Sqe=Object.freeze({...bS,...DS,...wS,$locale:"en",\u4FEE\u6539\u522B\u540D:"Edit alias",\u5173\u95ED\u4FEE\u6539\u522B\u540D:"Close alias editor",\u539F\u540D\u79F0:"Original name",\u522B\u540D:"Alias",\u6062\u590D\u539F\u540D\u79F0:"Restore original name","\u4F8B\u5982\uFF1A\u5BA2\u670D\u52A9\u624B":"e.g. Customer support","\u4EC5\u66F4\u6539\u663E\u793A\u540D\u79F0\uFF0C\u7559\u7A7A\u5219\u663E\u793A\u539F\u540D\u79F0\u3002":"Only changes the display name. Leave blank to use the original name.","\u522B\u540D\u4FDD\u5B58\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5\u3002":"Could not save the alias. Try again.","\u522B\u540D\u4E0D\u80FD\u5305\u542B\u6362\u884C\u6216\u63A7\u5236\u5B57\u7B26\uFF0C\u4E14\u6700\u591A 80 \u4E2A\u5B57\u7B26\u3002":"Use at most 80 characters without line breaks or control characters.","\u8BF7\u8F93\u5165\u6709\u6548\u7684\u522B\u540D\uFF08\u6700\u591A 80 \u4E2A\u5B57\u7B26\uFF09\u3002":"Enter a valid alias (up to 80 characters)."," macOS Messages \u8FDE\u63A5":" macOS Messages connection","\u63A5\u5165 iMessage":"Connect iMessage","\u5148\u5728 macOS \u7CFB\u7EDF\u8BBE\u7F6E\u4E2D\u6388\u4E88 Messages \u6743\u9650\u3002":"Grant Messages permissions in macOS System Settings first.","\u914D\u7F6E macOS Messages \u6743\u9650":"Configure macOS Messages permissions",\u914D\u7F6E\u672C\u673A\u6743\u9650:"Configure local permissions","\u542F\u7528 macOS \u539F\u751F iMessage":"Enable native macOS iMessage","\u652F\u6301\u540C\u8D26\u53F7\u81EA\u804A\uFF1A\u5728 iPhone \u6216 Mac \u4E0A\u7ED9\u81EA\u5DF1\u5DF2\u767B\u5F55\u7684 iMessage \u90AE\u7BB1\u6216\u53F7\u7801\u53D1\u6307\u4EE4\u3002AI \u56DE\u590D\u4EE5 \u{1F916} DSH \u5F00\u5934\uFF0C\u4E0D\u4F1A\u518D\u6B21\u89E6\u53D1\u673A\u5668\u4EBA\u3002":"Self-chat is supported: send instructions from your iPhone or Mac to your signed-in iMessage email or phone number. AI replies start with \u{1F916} DSH and do not trigger the bot again.",\u68C0\u67E5\u6743\u9650\u5E76\u542F\u7528:"Check permissions and enable","DeepSeek Harness \u901A\u8FC7 macOS Messages.app \u6536\u53D1\u6587\u672C\u6D88\u606F\u3002\u9996\u6B21\u4F7F\u7528\u9700\u8981\u6388\u4E88\u4EE5\u4E0B\u6743\u9650\uFF1A":"DeepSeek Harness sends and receives messages through macOS Messages.app. The following permissions are required the first time:","\u2713 \u5B8C\u5168\u78C1\u76D8\u8BBF\u95EE\u6743\u9650\u5DF2\u6388\u4E88":"\u2713 Full Disk Access granted","1. \u6388\u4E88\u5B8C\u5168\u78C1\u76D8\u8BBF\u95EE\u6743\u9650":"1. Grant Full Disk Access","\u5728\u201C\u7CFB\u7EDF\u8BBE\u7F6E \u2192 \u9690\u79C1\u4E0E\u5B89\u5168\u6027 \u2192 \u5B8C\u5168\u78C1\u76D8\u8BBF\u95EE\u6743\u9650\u201D\u4E2D\uFF0C\u6253\u5F00\u8FD0\u884C DeepSeek Harness \u7684\u7EC8\u7AEF\u6216\u5E94\u7528\u3002":"In System Settings \u2192 Privacy & Security \u2192 Full Disk Access, enable the terminal or app running DeepSeek Harness.",\u6253\u5F00\u5B8C\u5168\u78C1\u76D8\u8BBF\u95EE\u6743\u9650\u8BBE\u7F6E:"Open Full Disk Access settings","\u2713 Messages \u81EA\u52A8\u5316\u6743\u9650\u5DF2\u6388\u4E88":"\u2713 Messages automation granted","2. \u5141\u8BB8\u81EA\u52A8\u5316\u63A7\u5236 Messages":"2. Allow automation control of Messages","\u5728\u201C\u7CFB\u7EDF\u8BBE\u7F6E \u2192 \u9690\u79C1\u4E0E\u5B89\u5168\u6027 \u2192 \u81EA\u52A8\u5316\u201D\u4E2D\uFF0C\u5141\u8BB8\u8FD0\u884C DeepSeek Harness \u7684\u5E94\u7528\u63A7\u5236 Messages\u3002":"In System Settings \u2192 Privacy & Security \u2192 Automation, allow the app running DeepSeek Harness to control Messages.",\u6253\u5F00\u81EA\u52A8\u5316\u8BBE\u7F6E:"Open Automation settings","\u6B63\u5728\u68C0\u67E5\u2026":"Checking\u2026","\u63A5\u5165 macOS \u539F\u751F iMessage":"Connect native macOS iMessage","\u65E0\u9700\u5B89\u88C5\u7B2C\u4E09\u65B9\u670D\u52A1\uFF1B\u8BF7\u6309\u6307\u5F15\u6388\u4E88 macOS Messages \u8BBF\u95EE\u6743\u9650\u3002":"No third-party service is required; follow the guide to grant macOS Messages access.","macOS Messages \u6743\u9650":"macOS Messages permissions",IM\u673A\u5668\u4EBA:"IM bots","\u6253\u5F00 IM\u673A\u5668\u4EBA":"Open IM bots",\u8FD4\u56DE\u63D2\u4EF6\u8BE6\u60C5:"Back to plugin details",IM\u673A\u5668\u4EBA\u8BBE\u7F6E:"IM bot settings","IM \u9762\u677F\u52A0\u8F7D\u5931\u8D25":"Could not load the IM panel",\u66F4\u591A\u673A\u5668\u4EBA\u8BBE\u7F6E:"More bot settings",\u66F4\u591A\u8BBE\u7F6E:"More settings",\u5411\u5DE6\u6EDA\u52A8\u8BBE\u7F6E\u9875\u7B7E:"Scroll settings tabs left",\u5411\u53F3\u6EDA\u52A8\u8BBE\u7F6E\u9875\u7B7E:"Scroll settings tabs right",\u5E38\u7528\u914D\u7F6E:"Common settings",\u673A\u5668\u4EBA\u8BBE\u7F6E:"Bot settings",\u673A\u5668\u4EBA\u8BBE\u7F6E\u9875\u7B7E:"Bot settings tabs",\u6295\u9012\u8BBE\u7F6E:"Delivery settings",\u8BBF\u95EE\u8BBE\u7F6E:"Access settings",\u67E5\u770B\u8BBF\u95EE\u6743\u9650\u8BF4\u660E:"View access permission details",\u5141\u8BB8\u6240\u6709\u7528\u6237:"Allow all users",\u4EC5\u767D\u540D\u5355\u7528\u6237:"Allowlisted users only",\u9ED8\u8BA4\u547D\u4EE4\u6743\u9650:"Default command permission",\u547D\u4EE4\u6743\u9650:"Command permission",\u53EF\u4EE5\u6267\u884C\u547D\u4EE4:"Can run commands",\u4E0D\u53EF\u4EE5\u6267\u884C\u547D\u4EE4:"Cannot run commands",\u767D\u540D\u5355\u7528\u6237:"Allowlisted users",\u67E5\u770B\u767D\u540D\u5355\u8BF4\u660E:"View allowlist details",\u547D\u4EE4\u6743\u9650\u4F8B\u5916:"Command permission exceptions","\u5F53\u524D\u6CA1\u6709\u767D\u540D\u5355\u7528\u6237\uFF0C\u4FDD\u5B58\u540E\u666E\u901A\u7528\u6237\u5C06\u65E0\u6CD5\u4F7F\u7528\u673A\u5668\u4EBA\u3002":"There are currently no allowlisted users. After saving, regular users will not be able to use the bot.",\u65B0\u589E\u7528\u6237:"Add user",\u5C1A\u672A\u6DFB\u52A0\u7528\u6237:"No users added",\u5F53\u524D\u6E20\u9053\u4E0D\u652F\u6301\u7FA4\u804A:"Group chat is not supported by this channel","\u539F\u6240\u6709\u8005\u6216\u626B\u7801\u63A5\u5165\u8005\u59CB\u7EC8\u53EF\u4EE5\u8BBF\u95EE\u5E76\u6267\u884C\u547D\u4EE4\uFF1B\u4EE5\u4E0B\u8BBE\u7F6E\u4EC5\u7EA6\u675F\u5176\u4ED6\u7528\u6237\u3002":"The original owner or QR-code operator can always access the bot and run commands; the settings below apply only to other users.","\u5DF2\u7531\u63A5\u5165\u6D41\u7A0B\u786E\u8BA4\u7684\u6240\u6709\u8005\u53EF\u4EE5\u8BBF\u95EE\u5E76\u6267\u884C\u547D\u4EE4\uFF0C\u4E0D\u53D7\u672C\u9875\u9650\u5236\u3002\u672A\u8BC6\u522B\u5230\u6240\u6709\u8005\u8EAB\u4EFD\u65F6\uFF0C\u6309\u672C\u9875\u8BBF\u95EE\u8BBE\u7F6E\u6267\u884C\u3002":"Owners confirmed during connection setup can access the bot and run commands regardless of these settings. When no owner has been identified, these access settings apply.","\u767D\u540D\u5355\u8BF7\u586B\u5199\u4F7F\u7528\u8005\u7684 Open ID\uFF0C\u4E0D\u662F\u673A\u5668\u4EBA\u7684 Open ID\u3002\u4EC5\u4FDD\u5B58\u901A\u914D\u7B26\u7684\u63A5\u5165\u914D\u7F6E\u4E0D\u5305\u542B\u6240\u6709\u8005\u8EAB\u4EFD\u3002":"Enter the user\u2019s Open ID in the allowlist, not the bot\u2019s Open ID. A connection configured with only a wildcard has no identified owner.","\u626B\u7801\u83B7\u5F97\u7684\u662F\u79C1\u804A\u8EAB\u4EFD\uFF0C\u7FA4\u804A\u53EA\u6709\u5339\u914D\u5DF2\u786E\u8BA4\u7684\u6240\u6709\u8005\u8EAB\u4EFD\u65F6\u624D\u8C41\u514D\uFF1B\u5176\u4ED6\u6210\u5458\u6309\u7FA4\u804A\u767D\u540D\u5355\u8BBE\u7F6E\u6267\u884C\u3002":"QR setup identifies the owner for direct messages. In groups, only a matching confirmed owner identity is exempt; other members follow the group allowlist settings.","\u586B\u5199\u4F7F\u7528\u8005\u7684 Open ID\uFF08ou_xxx\uFF09\uFF0C\u4E0D\u662F\u673A\u5668\u4EBA ID":"Enter the user\u2019s Open ID (ou_xxx), not the bot ID","\u8FD9\u91CC\u9700\u8981\u586B\u5199\u7528\u6237\u7684 Open ID\uFF0C\u4E0D\u80FD\u586B\u5199\u673A\u5668\u4EBA\u81EA\u5DF1\u7684 Open ID\u3002":"Enter a user Open ID here, not the bot\u2019s own Open ID.","\u6B64\u533A\u57DF\u65E0\u9700\u914D\u7F6E\uFF0C\u4FDD\u5B58\u79C1\u804A\u8BBE\u7F6E\u65F6\u4F1A\u4FDD\u7559\u73B0\u6709\u7FA4\u804A\u7B56\u7565\u3002":"No setup is needed here. Saving direct-message settings keeps the existing group policy.","\u8BBF\u95EE\u8BBE\u7F6E\u5DF2\u4FDD\u5B58\u3002":"Access settings saved.","\u8BBF\u95EE\u8BBE\u7F6E\u6682\u4E0D\u53EF\u7528\u3002":"Access settings are currently unavailable.","\u8BBF\u95EE\u8BBE\u7F6E\u4FDD\u5B58\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002":"Could not save access settings. Try again later.","\u670D\u52A1\u6CA1\u6709\u8FD4\u56DE\u5DF2\u4FDD\u5B58\u7684\u8BBF\u95EE\u7B56\u7565\uFF0C\u8BF7\u5237\u65B0\u540E\u91CD\u8BD5\u3002":"The service did not return the saved access policy. Refresh and try again.","\u8BBF\u95EE\u7B56\u7565\u5C1A\u672A\u5C31\u7EEA\uFF0C\u8BF7\u8FD4\u56DE\u673A\u5668\u4EBA\u5217\u8868\u5237\u65B0\u540E\u91CD\u8BD5\u3002":"The access policy is not ready. Return to the bot list, refresh, and try again.","\u5F53\u524D\u6E20\u9053\u6682\u4E0D\u652F\u6301\u8BBF\u95EE\u8BBE\u7F6E\u3002":"Access settings are not supported by this channel yet.","\u7528\u6237\u6807\u8BC6\u65E0\u6548\u3002":"The user ID is invalid.","\u7528\u6237\u6807\u8BC6\u5FC5\u987B\u662F\u5B57\u7B26\u4E32\u3002":"The user ID must be a string.","\u7528\u6237\u6807\u8BC6\u4E0D\u80FD\u4E3A\u7A7A\u3001\u5305\u542B\u63A7\u5236\u5B57\u7B26\u6216\u8D85\u8FC7 256 \u4E2A\u5B57\u7B26\u3002":"The user ID cannot be empty, contain control characters, or exceed 256 characters.","\u7528\u6237\u6761\u76EE\u5FC5\u987B\u5305\u542B\u7528\u6237\u6807\u8BC6\u548C\u547D\u4EE4\u6743\u9650\u3002":"Each user entry must include a user ID and command permission.","\u547D\u4EE4\u6743\u9650\u5FC5\u987B\u662F\u5E03\u5C14\u503C\u3002":"Command permission must be a boolean.","\u8BBF\u95EE\u6A21\u5F0F\u53EA\u80FD\u662F open \u6216 allowlist\u3002":"Access mode must be open or allowlist.","\u5F00\u653E\u6A21\u5F0F\u8BBE\u7F6E\u5FC5\u987B\u5B8C\u6574\u3002":"Open-mode settings must be complete.","\u5F00\u653E\u6A21\u5F0F\u9ED8\u8BA4\u547D\u4EE4\u6743\u9650\u5FC5\u987B\u662F\u5E03\u5C14\u503C\u3002":"The open-mode default command permission must be a boolean.","\u5F00\u653E\u6A21\u5F0F\u547D\u4EE4\u6743\u9650\u8986\u76D6\u7528\u6237\u5FC5\u987B\u662F\u6570\u7EC4\u3002":"Open-mode command permission overrides must be an array.","\u5F00\u653E\u6A21\u5F0F\u547D\u4EE4\u6743\u9650\u8986\u76D6\u7528\u6237\u4E0D\u80FD\u5305\u542B\u91CD\u590D\u7684\u7528\u6237\u6807\u8BC6\u3002":"Open-mode command permission overrides cannot contain duplicate user IDs.","\u767D\u540D\u5355\u6A21\u5F0F\u8BBE\u7F6E\u5FC5\u987B\u5B8C\u6574\u3002":"Allowlist-mode settings must be complete.","\u767D\u540D\u5355\u6A21\u5F0F\u7528\u6237\u5FC5\u987B\u662F\u6570\u7EC4\u3002":"Allowlist-mode users must be an array.","\u767D\u540D\u5355\u6A21\u5F0F\u7528\u6237\u4E0D\u80FD\u5305\u542B\u91CD\u590D\u7684\u7528\u6237\u6807\u8BC6\u3002":"Allowlist-mode users cannot contain duplicate user IDs.","\u8BBF\u95EE\u573A\u666F\u8BBE\u7F6E\u5FC5\u987B\u540C\u65F6\u5305\u542B\u6A21\u5F0F\u3001\u5F00\u653E\u6A21\u5F0F\u8BBE\u7F6E\u548C\u767D\u540D\u5355\u6A21\u5F0F\u8BBE\u7F6E\u3002":"Each access context must include its mode, open-mode settings, and allowlist-mode settings.","\u8BF7\u540C\u65F6\u63D0\u4EA4\u5B8C\u6574\u7684\u79C1\u804A\u548C\u7FA4\u804A\u8BBF\u95EE\u8BBE\u7F6E\u3002":"Submit complete direct-message and group access settings together.","\u586B\u5199\u5FAE\u4FE1\u7528\u6237 ID":"Enter a WeChat user ID","\u98DE\u4E66 Open ID":"Feishu Open ID","\u7FA4\u6210\u5458 Open ID":"Group member Open ID","\u9489\u9489\u7528\u6237 ID":"DingTalk user ID","\u586B\u5199 senderStaffId \u6216 senderId":"Enter senderStaffId or senderId","\u7FA4\u6210\u5458\u7528\u6237 ID":"Group member user ID","\u4F01\u4E1A\u5FAE\u4FE1\u7528\u6237 ID":"WeCom user ID","\u586B\u5199 userid":"Enter userid","\u586B\u5199 member_openid":"Enter member_openid","QQ User Open ID":"QQ User Open ID","\u7FA4\u6210\u5458 User ID":"Group member User ID","\u586B\u5199\u6570\u5B57 User ID":"Enter a numeric user ID","WhatsApp \u7535\u8BDD\u53F7\u7801\u6216 JID":"WhatsApp phone number or JID","\u7FA4\u6210\u5458\u7535\u8BDD\u53F7\u7801\u6216 JID":"Group member phone number or JID","8613800000000 \u6216\u5B8C\u6574 JID":"8613800000000 or a full JID","IM \u6E20\u9053":"IM channels","\u8BA9 DeepSeek Harness \u89E6\u624B\u53EF\u53CA":"Connecting DeepSeek Harness",\u5F53\u524D\u7248\u672C:"Current version","DSH-IM \u66F4\u65B0":"DSH-IM update",\u68C0\u67E5\u66F4\u65B0:"Check for updates","DSH \u7248\u672C\u517C\u5BB9\u8BF4\u660E":"DSH version compatibility","dsh-im 4.25.0 \u652F\u6301\u5230 DSH v0.1.6-alpha.2\u3002":"dsh-im 4.25.0 supports DSH up to v0.1.6-alpha.2.","dsh-im 4.26.0 \u4EC5\u652F\u6301 DSH v0.1.7-alpha.1\u3002":"dsh-im 4.26.0 only supports DSH v0.1.7-alpha.1.","dsh-im 4.27.0 \u4EC5\u652F\u6301 DSH v0.1.7-alpha.1 \u53CA\u66F4\u65B0\u7248\u672C\u3002":"dsh-im 4.27.0 only supports DSH v0.1.7-alpha.1 and later.","\u5347\u7EA7\u5230 dsh-im 4.26.0 \u524D\uFF0C\u8BF7\u5148\u5C06 DSH \u5347\u7EA7\u5230 v0.1.7-alpha.1\uFF1B\u4F7F\u7528\u65E7\u7248 DSH \u8BF7\u4FDD\u7559 dsh-im 4.25.0\u3002":"Before updating to dsh-im 4.26.0, upgrade DSH to v0.1.7-alpha.1. If you use an older DSH version, stay on dsh-im 4.25.0.",\u91CD\u65B0\u68C0\u67E5:"Check again",\u5237\u65B0\u72B6\u6001:"Refresh status",\u624B\u5DE5\u66F4\u65B0:"Manual update",\u624B\u5DE5\u66F4\u65B0\u547D\u4EE4:"Manual update command",\u590D\u5236\u547D\u4EE4:"Copy command","\u590D\u5236\u4E2D\u2026":"Copying\u2026",\u5DF2\u590D\u5236:"Copied","\u547D\u4EE4\u5DF2\u590D\u5236\u3002":"Command copied.","\u590D\u5236\u5931\u8D25\uFF0C\u8BF7\u9009\u4E2D\u547D\u4EE4\u540E\u6309 Ctrl+C \u6216 \u2318C \u590D\u5236\u3002":"Copy failed. Select the command and press Ctrl+C or \u2318C to copy it.","\u81EA\u52A8\u66F4\u65B0\u5931\u8D25\u53EF\u4EE5\u4F7F\u7528\u547D\u4EE4\u66F4\u65B0\uFF1A":"If the automatic update fails, update with this command:","\u5C1A\u672A\u786E\u8BA4\u76EE\u6807\u7248\u672C\uFF0C\u6B64\u547D\u4EE4\u5B89\u88C5\u6267\u884C\u65F6 npm \u7684 latest \u7248\u672C\u3002":"No target version has been confirmed. This command installs the npm latest version available when you run it.","\u8BF7\u5728\u5F53\u524D Desktop \u7684\u5185\u7F6E\u7EC8\u7AEF\u6267\u884C\uFF0C\u5B8C\u6210\u540E\u624B\u52A8\u91CD\u542F\u3002":"Run this in the current Desktop\u2019s built-in terminal, then restart manually.","\u8BF7\u5728\u8FD0\u884C\u5F53\u524D Harness \u7684\u540C\u4E00\u73AF\u5883\u6267\u884C\uFF0C\u4FDD\u6301 DSH_HOME \u4E00\u81F4\uFF0C\u5B8C\u6210\u540E\u624B\u52A8\u91CD\u542F\u3002":"Run this in the same environment as the current Harness, with the same DSH_HOME, then restart manually.","\u8BF7\u7B49\u5F85\u5F53\u524D\u64CD\u4F5C\u7ED3\u675F\uFF0C\u786E\u8BA4\u6CA1\u6709\u5B89\u88C5\u8FDB\u7A0B\u8FD0\u884C\u540E\u518D\u6267\u884C\u547D\u4EE4\u3002":"Wait for the current operation to finish and confirm no installer is running before using this command.","\u6E90\u7801\u6216\u94FE\u63A5\u5B89\u88C5\u8BF7\u6309\u539F\u5B89\u88C5\u65B9\u5F0F\u66F4\u65B0\uFF0C\u4E0D\u63D0\u4F9B\u8986\u76D6\u6E90\u7801\u7684 npm \u547D\u4EE4\u3002":"Update source or linked installations using their original method. No npm command is provided to overwrite the source.","\u65E0\u6CD5\u5B89\u5168\u751F\u6210\u5F53\u524D profile \u7684\u547D\u4EE4\uFF0C\u8BF7\u5728\u7EC8\u7AEF\u4E2D\u624B\u52A8\u786E\u8BA4 profile \u540E\u66F4\u65B0\u3002":"A safe command cannot be generated for this profile. Confirm the profile in your terminal before updating manually.",\u66F4\u65B0\u81F3:"Update to",\u5B89\u88C5\u66F4\u65B0:"Install update","\u6B63\u5728\u66F4\u65B0\u2026":"Updating\u2026",\u5F85\u624B\u52A8\u91CD\u542F:"Restart needed",\u8FD0\u884C\u7248\u672C:"Running version",\u5DF2\u5B89\u88C5\u7248\u672C:"Installed version","\u76EE\u6807 profile":"Target profile",\u76EE\u6807\u7248\u672C:"Target version",\u6700\u65B0\u7248\u672C:"Latest version",\u4E0A\u6B21\u66F4\u65B0\u76EE\u6807:"Previous update target",\u65E0\u6CD5\u786E\u8BA4:"Unknown",\u53D1\u73B0\u65B0\u7248\u672C:"Update available",\u5DF2\u662F\u6700\u65B0\u7248\u672C:"Up to date",\u5F53\u524D\u7248\u672C\u65E0\u9700\u66F4\u65B0:"No newer version available","\u5DF2\u83B7\u53D6 npm \u6700\u65B0\u7248\u672C":"Latest npm version retrieved","\u68C0\u67E5 npm \u6700\u65B0\u7248\u672C\uFF0C\u4E0D\u4F1A\u81EA\u52A8\u5B89\u88C5\u3002":"Check the latest npm version. Nothing is installed automatically.","\u6B63\u5728\u4ECE npm \u68C0\u67E5\u6700\u65B0\u7248\u672C\u2026":"Checking npm for the latest version\u2026","\u6B63\u5728\u5B89\u88C5\uFF0C\u8BF7\u7A0D\u5019\u2026":"Installing, please wait\u2026","\u6B63\u5728\u6821\u9A8C\u5B89\u88C5\u7ED3\u679C\u2026":"Verifying the installation\u2026","\u5DF2\u5B89\u88C5\uFF0C\u5F85\u624B\u52A8\u91CD\u542F":"Installed \u2014 manual restart needed",\u66F4\u65B0\u5DF2\u751F\u6548:"Updated version is active",\u66F4\u65B0\u5931\u8D25:"Update failed",\u66F4\u65B0\u8BF7\u6C42\u5931\u8D25:"Update request failed",\u6682\u65F6\u65E0\u6CD5\u5B89\u88C5\u66F4\u65B0:"Update installation is unavailable","\u4EC5\u66F4\u65B0 DSH-IM\u3002\u5B89\u88C5\u5B8C\u6210\u540E\u9700\u624B\u52A8\u91CD\u542F\u540E\u53F0\uFF1B\u672C\u529F\u80FD\u4E0D\u4F1A\u81EA\u52A8\u91CD\u542F\u6216\u4E3B\u52A8\u5237\u65B0\u9875\u9762\u3002":"Only DSH-IM will be updated. Restart the backend manually after installation. This feature does not automatically restart it or initiate a page refresh.","\u5F53\u524D\u662F\u6E90\u7801\u6216\u94FE\u63A5\u5B89\u88C5\uFF0C\u53EA\u80FD\u68C0\u67E5\u7248\u672C\uFF1B\u8BF7\u624B\u52A8\u66F4\u65B0\u6E90\u7801\uFF0C\u6216\u8FC1\u79FB\u5230 npm \u5B89\u88C5\u3002":"This is a source or linked installation. You can check versions, but must update the source manually or migrate to an npm installation.","\u65E0\u6CD5\u786E\u8BA4\u5F53\u524D profile\uFF0C\u8BF7\u5728\u5BF9\u5E94\u7684 Harness \u73AF\u5883\u4E2D\u624B\u52A8\u66F4\u65B0\u3002":"The current profile could not be identified. Update manually in the corresponding Harness environment.","\u5F53\u524D\u8FD0\u884C\u73AF\u5883\u4E0D\u652F\u6301\u6309\u94AE\u5B89\u88C5\uFF0C\u8BF7\u624B\u52A8\u66F4\u65B0\u63D2\u4EF6\u3002":"This runtime cannot install through this button. Update the plugin manually.","\u5F53\u524D npm \u6E90\u914D\u7F6E\u4E0E\u5B98\u65B9\u6E90\u4E0D\u4E00\u81F4\uFF0C\u8BF7\u5148\u68C0\u67E5 registry \u914D\u7F6E\u3002":"The npm registry configuration differs from the official registry. Check your registry settings first.","\u5F53\u524D Host \u7684 Node.js \u7248\u672C\u4E0D\u6EE1\u8DB3\u65B0\u7248\u8981\u6C42\uFF0C\u8BF7\u5148\u66F4\u65B0\u8FD0\u884C\u73AF\u5883\u3002":"The Host Node.js version does not meet the new version\u2019s requirements. Update the runtime first.","\u65B0\u7248\u672C\u5DF2\u5B89\u88C5\uFF0C\u8BF7\u5728\u65B9\u4FBF\u65F6\u624B\u52A8\u91CD\u542F\u5F53\u524D Harness \u6216 Desktop\u3002":"The new version is installed. Manually restart this Harness or Desktop when convenient.","\u4E0A\u6B21\u5B89\u88C5\u7ED3\u679C\u65E0\u6CD5\u786E\u8BA4\uFF0C\u8BF7\u5148\u68C0\u67E5\u6B64 profile \u7684\u63D2\u4EF6\u5B89\u88C5\u72B6\u6001\u3002":"The previous installation result is uncertain. Check this profile\u2019s plugin installation first.","\u65E0\u6CD5\u8BBF\u95EE npm \u6216\u8BF7\u6C42\u8D85\u65F6\uFF0C\u8BF7\u7A0D\u540E\u91CD\u65B0\u68C0\u67E5\u3002":"npm is unreachable or the request timed out. Check again later.","npm \u8FD4\u56DE\u7684\u7248\u672C\u4FE1\u606F\u65E0\u6548\uFF0C\u6682\u65F6\u65E0\u6CD5\u66F4\u65B0\u3002":"npm returned invalid release information. Updating is unavailable.","\u7248\u672C\u786E\u8BA4\u5DF2\u8FC7\u671F\uFF0C\u8BF7\u91CD\u65B0\u68C0\u67E5\u540E\u518D\u5B89\u88C5\u3002":"The version confirmation expired. Check again before installing.","\u63D2\u4EF6\u5B89\u88C5\u72B6\u6001\u5DF2\u53D1\u751F\u53D8\u5316\uFF0C\u8BF7\u91CD\u65B0\u68C0\u67E5\u3002":"The plugin installation changed. Check again.","\u6B64 profile \u6B63\u5728\u66F4\u65B0\uFF0C\u8BF7\u7A0D\u540E\u67E5\u770B\u72B6\u6001\u3002":"This profile is already updating. Check its status shortly.","\u5B89\u88C5\u5931\u8D25\uFF0C\u8BF7\u68C0\u67E5\u5F53\u524D\u5B89\u88C5\u72B6\u6001\u540E\u91CD\u8BD5\u3002":"Installation failed. Check the current installation before retrying.","\u5B89\u88C5\u7ED3\u679C\u6821\u9A8C\u5931\u8D25\uFF0C\u8BF7\u624B\u52A8\u68C0\u67E5\u63D2\u4EF6\u7248\u672C\u3002":"Installation verification failed. Check the plugin version manually.","\u65E0\u6CD5\u5B89\u5168\u4FDD\u5B58\u66F4\u65B0\u72B6\u6001\uFF0C\u8BF7\u5148\u68C0\u67E5\u5F53\u524D\u5B89\u88C5\u7ED3\u679C\u3002":"Update state could not be saved safely. Check the current installation result before retrying.","\u4E0A\u6B21\u66F4\u65B0\u5DF2\u4E2D\u65AD\uFF0C\u8BF7\u68C0\u67E5\u5B89\u88C5\u72B6\u6001\u540E\u91CD\u8BD5\u3002":"The previous update was interrupted. Check the installation before retrying.","\u66F4\u65B0\u670D\u52A1\u5DF2\u5173\u95ED\uFF0C\u8BF7\u624B\u52A8\u91CD\u65B0\u6253\u5F00\u8BBE\u7F6E\u9875\u3002":"The update service has closed. Reopen settings manually.","\u66F4\u65B0\u8BF7\u6C42\u65E0\u6548\uFF0C\u8BF7\u91CD\u65B0\u68C0\u67E5\u7248\u672C\u3002":"The update request is invalid. Check the version again.","\u5F53\u524D\u63D2\u4EF6\u5B89\u88C5\u4E0D\u5B8C\u6574\u6216\u4E0E profile \u4E0D\u7B26\uFF0C\u8BF7\u624B\u52A8\u68C0\u67E5\u5B89\u88C5\u914D\u7F6E\u3002":"The plugin installation is incomplete or does not match this profile. Check the installation configuration manually.","\u65E0\u6CD5\u786E\u8BA4\u5F53\u524D npm \u6E90\u914D\u7F6E\uFF0C\u6682\u65F6\u4E0D\u80FD\u5B89\u88C5\u66F4\u65B0\u3002":"The npm registry configuration could not be verified. Installation is unavailable.","\u5B89\u88C5\u8D85\u65F6\uFF0C\u8BF7\u5148\u786E\u8BA4\u5F53\u524D\u5B89\u88C5\u72B6\u6001\uFF0C\u518D\u51B3\u5B9A\u662F\u5426\u91CD\u8BD5\u3002":"Installation timed out. Check the current installation before retrying.","\u66F4\u65B0\u8BF7\u6C42\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5\u3002":"The update request failed. Try again.","\u66F4\u65B0\u670D\u52A1\u8FD4\u56DE\u4E86\u65E0\u6CD5\u8BC6\u522B\u7684\u54CD\u5E94\u3002":"The update service returned an unrecognized response.","\u5F53\u524D Host \u4E0D\u652F\u6301\u66F4\u65B0\u63A5\u53E3\uFF0C\u8BF7\u5148\u624B\u52A8\u66F4\u65B0\u63D2\u4EF6\u5E76\u91CD\u542F\u3002":"This Host does not support the update API. Update the plugin manually and restart first.","\u5173\u95ED\u7A97\u53E3\u4E0D\u4F1A\u53D6\u6D88\u5B89\u88C5\u3002\u8BF7\u52FF\u540C\u65F6\u5728\u5176\u4ED6\u7A97\u53E3\u7BA1\u7406\u6B64 profile \u7684\u63D2\u4EF6\u3002":"Closing this window does not cancel installation. Do not manage this profile\u2019s plugins in another window at the same time.","\u9875\u9762\u7248\u672C\u4E0E\u8FD0\u884C\u7248\u672C\u4E0D\u540C\uFF0C\u8BF7\u624B\u52A8\u5237\u65B0\u9875\u9762\uFF1B\u82E5\u4ECD\u4E0D\u4E00\u81F4\uFF0C\u8BF7\u624B\u52A8\u91CD\u542F Harness \u6216 Desktop\u3002":"The page and running versions differ. Refresh the page manually; if they still differ, manually restart Harness or Desktop.","\u8BF7\u5728\u673A\u5668\u4EBA\u7A7A\u95F2\u65F6\u5B89\u88C5\uFF1B\u5B89\u88C5\u4F1A\u4FEE\u6539\u5F53\u524D profile \u7684\u4F9D\u8D56\uFF0C\u5B8C\u6210\u540E\u9700\u624B\u52A8\u91CD\u542F\u3002":"Install while bots are idle. This changes the current profile\u2019s dependencies and requires a manual restart afterward.","AI Office":"AI Office","\uFF08\u5B9E\u9A8C\u529F\u80FD\uFF09":"(Experimental)","AI Office \u8BBE\u7F6E":"AI Office settings","AI Office \u8BBE\u7F6E\u9875\u7F3A\u5C11 RPC \u8FDE\u63A5":"AI Office settings are missing an RPC connection","\u6B63\u5728\u8BFB\u53D6 AI Office Connector\u2026":"Loading AI Office Connector\u2026","\u672C\u673A\u4E3B\u52A8\u8FDE\u63A5\u516C\u7F51 Office\uFF1BHarness \u4E0D\u5F00\u653E\u7AEF\u53E3\u3002\u534F\u8BAE Hook \u56FA\u5B9A\u4E3A ":"This machine connects outward to the public Office; Harness exposes no port. Protocol hooks: ",\u5C1A\u672A\u914D\u7F6E:"Not configured","\u5DF2\u8FDE\u63A5 Office":"Connected to Office",\u5DF2\u914D\u7F6E:"Configured",\u7B49\u5F85\u91CD\u8FDE:"Waiting to reconnect",\u51ED\u636E\u7F3A\u5931:"Credential missing",\u6700\u8FD1\u5FC3\u8DF3:"Last heartbeat",\u6700\u8FD1\u4E8B\u4EF6:"Last event",\u91CD\u8FDE\u6B21\u6570:"Reconnects","\u8FD0\u884C Job":"Running Jobs","\u5B8C\u6210 Job":"Completed Jobs",\u5C1A\u65E0:"None yet",\u8BBE\u5907\u8FDE\u63A5:"Device connection","Token \u53EA\u5199\u5165\u672C\u673A\u51ED\u636E\u5B58\u50A8":"Token is written only to the local credential store","\u7C98\u8D34 Office \u4E00\u6B21\u6027\u51ED\u636E":"Paste the one-time Office credential","\u5DF2\u5B89\u5168\u4FDD\u5B58\uFF1B\u7559\u7A7A\u4FDD\u6301\u4E0D\u53D8":"Stored securely; leave blank to keep it",\u6700\u5927\u5E76\u53D1:"Max concurrency","Heartbeat \u79D2\u6570":"Heartbeat seconds","Workspace \u6620\u5C04":"Workspace mappings","\u6BCF\u884C alias=/\u672C\u673A/\u7EDD\u5BF9\u8DEF\u5F84\uFF1BOffice \u53EA\u80FD\u770B\u5230 alias\u3002":"One alias=/local/absolute/path per line; Office sees only aliases.","Instruction Preset \u6620\u5C04":"Instruction preset mappings","\u6BCF\u884C alias=\u6307\u4EE4\uFF1B\u65B0\u589E preset \u4E0D\u9700\u8981\u6539 Office \u4EE3\u7801\u3002":"One alias=instruction per line; new presets require no Office code change.",\u4FDD\u5B58\u5E76\u8FDE\u63A5:"Save and connect",\u6D4B\u8BD5\u8FDE\u63A5:"Test connection","\u6D4B\u8BD5\u4E2D\u2026":"Testing\u2026",\u91CD\u65B0\u8FDE\u63A5:"Reconnect",\u79FB\u9664\u8FDE\u63A5:"Remove connection","\u8FDE\u63A5\u6D4B\u8BD5\u901A\u8FC7\u3002":"Connection test passed.","\u914D\u7F6E\u5DF2\u4FDD\u5B58\u3002":"Configuration saved.","\u534F\u8BAE Hook \u9884\u89C8":"Protocol hook preview","\u7531 Base URL \u81EA\u52A8\u6D3E\u751F\uFF0C\u4E0D\u5355\u72EC\u586B\u5199":"Derived from Base URL; no separate input","Base URL \u65E0\u6548":"Invalid Base URL","Office Hook \u5C1A\u672A\u90E8\u7F72\u65F6\uFF0C\u914D\u7F6E\u4F1A\u5B89\u5168\u4FDD\u5B58\u5E76\u81EA\u52A8\u91CD\u8BD5\uFF1B\u51FA\u73B0 HTTP 404 \u4EE3\u8868\u534F\u8BAE\u7AEF\u70B9\u5F85\u4E0A\u7EBF\uFF0C\u4E0D\u4EE3\u8868 Harness \u6545\u969C\u3002":"Configuration is saved and retried while Office hooks are unavailable; HTTP 404 means the protocol endpoint is pending, not a Harness failure.","Workspace \u6620\u5C04\u6BCF\u884C\u5FC5\u987B\u4F7F\u7528 alias=value":"Each workspace mapping must use alias=value","Instruction Preset \u6620\u5C04\u6BCF\u884C\u5FC5\u987B\u4F7F\u7528 alias=value":"Each instruction preset mapping must use alias=value","action-items=\u8F6C\u6362\u4E3A\u8D1F\u8D23\u4EBA\u3001\u622A\u6B62\u548C\u9A8C\u6536\u660E\u786E\u7684\u5DE5\u5355":"action-items=Turn this into accountable tasks with deadlines and acceptance criteria","AI Office \u62D2\u7EDD\u4E86 Device Token\u3002":"AI Office rejected the Device Token.","AI Office Connector Hook \u5C1A\u672A\u5C31\u7EEA\u3002":"AI Office Connector hooks are not available yet.","AI Office Connector \u534F\u8BAE\u7248\u672C\u4E0D\u517C\u5BB9\u3002":"The AI Office Connector protocol is incompatible.","\u672C\u673A\u6682\u65F6\u65E0\u6CD5\u8BBF\u95EE AI Office\u3002":"AI Office cannot currently be reached from this machine.","AI Office \u8FDE\u63A5\u5DF2\u4E2D\u65AD\u3002":"The AI Office connection was interrupted.","\u5E2E\u52A9\u4E0E\u53CD\u9988 \xB7 \u524D\u5F80 GitHub":"Help & feedback \xB7 Open GitHub","\u8BF7\u6539\u7528 localhost \u91CD\u65B0\u6253\u5F00":"Reopen with localhost","\u9875\u9762\u4F1A\u5728\u5F53\u524D\u7AEF\u53E3\u91CD\u65B0\u6253\u5F00\uFF0C\u673A\u5668\u4EBA\u914D\u7F6E\u4E0D\u4F1A\u6539\u53D8\u3002":"The page will reopen on the current port. Your bot configuration will not change.","\u4F7F\u7528 localhost \u91CD\u65B0\u6253\u5F00":"Reopen with localhost","\u5F53\u524D\u5730\u5740\u4E0E\u6D4F\u89C8\u5668\u7684\u672C\u673A\u8BF7\u6C42\u6821\u9A8C\u4E0D\u517C\u5BB9\u3002\u8BF7\u4F7F\u7528\u4E0A\u65B9\u6309\u94AE\u6539\u7528 localhost \u91CD\u65B0\u6253\u5F00\u3002":"This address is incompatible with the browser\u2019s local-request checks. Use the button above to reopen with localhost.",\u5FAE\u4FE1:"WeChat",\u98DE\u4E66:"Feishu",\u9489\u9489:"DingTalk",\u4F01\u4E1A\u5FAE\u4FE1:"WeCom",\u5FAE\u4FE1\u673A\u5668\u4EBA:"WeChat bot",\u98DE\u4E66\u673A\u5668\u4EBA:"Feishu bot",\u9489\u9489\u673A\u5668\u4EBA:"DingTalk bot",\u4F01\u4E1A\u5FAE\u4FE1\u673A\u5668\u4EBA:"WeCom bot",QQ\u673A\u5668\u4EBA:"QQ bot",WhatsApp\u673A\u5668\u4EBA:"WhatsApp bot",WhatsApp\u8D26\u53F7:"WhatsApp account",\u5FAE\u4FE1\u8BBE\u7F6E:"WeChat settings",\u98DE\u4E66\u673A\u5668\u4EBA\u8BBE\u7F6E:"Feishu bot settings",\u7FA4\u804A\u54CD\u5E94\u65B9\u5F0F:"Group response mode","\u4EC5\u5728 @\u673A\u5668\u4EBA\u65F6\u54CD\u5E94\uFF08\u63A8\u8350\uFF09":"Only respond when @mentioned (recommended)",\u54CD\u5E94\u6240\u6709\u7FA4\u6D88\u606F:"Respond to all group messages","\u54CD\u5E94\u6240\u6709\u7FA4\u6D88\u606F\uFF08\u9700\u98DE\u4E66\u654F\u611F\u6743\u9650\uFF09":"Respond to all group messages (requires a sensitive Feishu scope)",\u91CD\u65B0\u6388\u6743:"Reauthorize",\u53BB\u6388\u6743:"Authorize",\u91CD\u65B0\u6388\u6743\u7FA4\u6D88\u606F\u6743\u9650:"Reauthorize group-message permission",\u6388\u6743\u7FA4\u6D88\u606F\u6743\u9650:"Authorize group-message permission","\u6B63\u5728\u51C6\u5907\u6388\u6743\u2026":"Preparing authorization\u2026","\u6B63\u5728\u51C6\u5907\u2026":"Preparing\u2026","\u79C1\u804A\u59CB\u7EC8\u54CD\u5E94\uFF1B\u7FA4\u804A\u4EC5\u5904\u7406\u660E\u786E @\u5F53\u524D\u673A\u5668\u4EBA\u7684\u6D88\u606F\u3002\u7FA4\u6D88\u606F\u6743\u9650\u5DF2\u5F00\u901A\uFF0C\u518D\u6B21\u5207\u6362\u65E0\u9700\u6388\u6743\u3002":"Direct messages always work; group chats require an explicit @mention of this bot. The group-message permission is already granted, so switching again needs no authorization.","\u79C1\u804A\u59CB\u7EC8\u54CD\u5E94\uFF1B\u7FA4\u804A\u4EC5\u5904\u7406\u660E\u786E @\u5F53\u524D\u673A\u5668\u4EBA\u7684\u6D88\u606F\u3002\u9009\u62E9\u5168\u90E8\u6D88\u606F\u540E\u4F1A\u6253\u5F00\u98DE\u4E66\u5B98\u65B9\u6388\u6743\u6D41\u7A0B\u3002":"Direct messages always work; group chats require an explicit @mention of this bot. Selecting all messages opens the official Feishu authorization flow.","\u5DF2\u5F00\u901A\u201C\u83B7\u53D6\u7FA4\u7EC4\u4E2D\u6240\u6709\u6D88\u606F\u201D\u6743\u9650\uFF08im:message.group_msg\uFF09\uFF1B\u673A\u5668\u4EBA\u4F1A\u5904\u7406\u7FA4\u804A\u4E2D\u7684\u6240\u6709\u53EF\u89C1\u6D88\u606F\u3002":"The \u201CRead all messages in associated group chat\u201D scope (im:message.group_msg) is granted; the bot processes every visible group message.","\u5C1A\u672A\u786E\u8BA4\u201C\u83B7\u53D6\u7FA4\u7EC4\u4E2D\u6240\u6709\u6D88\u606F\u201D\u6743\u9650\uFF0C\u8BF7\u5B8C\u6210\u98DE\u4E66\u6388\u6743\u3002":"The \u201CRead all messages in associated group chat\u201D scope has not been confirmed. Complete Feishu authorization.","\u79C1\u804A\u59CB\u7EC8\u54CD\u5E94\uFF1B\u7FA4\u804A\u4EC5\u5904\u7406\u660E\u786E @\u5F53\u524D\u673A\u5668\u4EBA\u7684\u6D88\u606F\u3002":"Direct messages always work; group chats require an explicit @mention of this bot.","\u9700\u5728\u98DE\u4E66\u4E3A\u8BE5\u673A\u5668\u4EBA\u5F00\u901A\u201C\u83B7\u53D6\u7FA4\u7EC4\u4E2D\u6240\u6709\u6D88\u606F\u201D\u6743\u9650\uFF08im:message.group_msg\uFF09\uFF1B\u5F00\u901A\u540E\uFF0C\u673A\u5668\u4EBA\u4F1A\u5904\u7406\u7FA4\u804A\u4E2D\u7684\u6240\u6709\u53EF\u89C1\u6D88\u606F\u3002":"Grant this bot the \u201CRead all messages in associated group chat\u201D Feishu scope (im:message.group_msg); once granted, it will process every visible group message.","\u7FA4\u804A\u54CD\u5E94\u65B9\u5F0F\u4FEE\u6539\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5\u3002":"Could not update the group response mode. Try again.","\u7FA4\u6D88\u606F\u6743\u9650\u6388\u6743\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5\u3002":"Could not authorize group-message permission. Try again.","\u88AB @ \u65F6\u4EE5\u8BDD\u9898\u65B9\u5F0F\u56DE\u590D":"Reply as a Feishu topic when mentioned","\u4EE5\u8BDD\u9898\u65B9\u5F0F\u56DE\u590D\u8BBE\u7F6E\u4FDD\u5B58\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5\u3002":"Could not save the topic reply setting. Try again.","\u5173\u95ED\uFF08\u5728\u4F1A\u8BDD\u4E3B\u7A97\u53E3\u56DE\u590D\uFF09":"Off (reply in the chat feed)","\u5F00\u542F\uFF08\u81EA\u52A8\u5F00\u542F\u72EC\u7ACB\u98DE\u4E66\u8BDD\u9898\uFF09":"On (auto-open a dedicated Feishu topic)","\u5F00\u542F\u540E\uFF0C\u5728\u7FA4\u804A\u6216\u79C1\u804A\u91CC @\u673A\u5668\u4EBA \u63D0\u95EE\uFF0C\u673A\u5668\u4EBA\u4F1A\u5728\u90A3\u6761\u6D88\u606F\u4E0B\u65B0\u5EFA\u4E00\u4E2A\u98DE\u4E66\u8BDD\u9898\u5E76\u5728\u8BDD\u9898\u5185\u56DE\u7B54\uFF1B\u8BE5\u8BDD\u9898\u662F\u4E00\u6761\u72EC\u7ACB\u4F1A\u8BDD\uFF0C\u8BDD\u9898\u91CC\u7684\u540E\u7EED\u6D88\u606F\u90FD\u5C5E\u4E8E\u540C\u4E00\u4E2A\u4F1A\u8BDD\u3002\u53EA\u53D1\u4E00\u4E2A @\u673A\u5668\u4EBA\uFF08\u6253\u5F00\u83DC\u5355\uFF09\u4E0D\u4F1A\u65B0\u5EFA\u8BDD\u9898\uFF0C\u6CA1\u6709 @\u673A\u5668\u4EBA \u7684\u6D88\u606F\u4E5F\u7559\u5728\u539F\u6765\u7684\u4F1A\u8BDD\u91CC\u3002":`When enabled, mentioning the bot in a group or a private chat opens a dedicated Feishu topic under that message and the answer stays inside it. That topic is an independent conversation in dsh, and later messages in the topic belong to the same conversation. A bare "@bot" (which opens the menu) opens no topic, and messages without a mention stay in the chat's own conversation.`,\u5206\u6B65\u76F4\u63A8:"Step push",\u6307\u4EE4\u9762\u677F:"Command panel","\u4E2A\u5931\u8D25\u3002":"failed.","\u4E2A\u673A\u5668\u4EBA\uFF0C":"bots,","\u4E2A\u673A\u5668\u4EBA\u3002":"bots.",\u5DF2\u540C\u6B65\u5230:"Copied to","\u8FD9\u4E2A\u6E20\u9053\u6CA1\u6709\u5176\u4ED6\u98DE\u4E66\u673A\u5668\u4EBA\uFF0C\u4E0D\u7528\u540C\u6B65\u3002":"This channel has no other Feishu bots to copy to.","\u6B63\u5728\u540C\u6B65\u2026":"Copying\u2026",\u786E\u8BA4\u540C\u6B65:"Copy to all","\u4E2A\u98DE\u4E66\u673A\u5668\u4EBA\uFF0C\u5B83\u4EEC\u5404\u81EA\u7684\u9762\u677F\u8BBE\u7F6E\u4F1A\u88AB\u8986\u76D6\u3002":"other Feishu bots, overwriting their own panel settings.",\u5C06\u628A\u8FD9\u5957\u9762\u677F\u8BBE\u7F6E\u5199\u5165\u53E6\u5916:"This copies the panel to",\u4FDD\u5B58\u5E76\u540C\u6B65\u5230\u5176\u4ED6\u673A\u5668\u4EBA:"Save and copy to the other bots",\u6307\u4EE4\u9762\u677F\u8BBE\u7F6E:"Command panel settings",\u6307\u4EE4\u9762\u677F\u6A21\u5F0F:"Command panel mode","\u9762\u677F\u53EA\u51B3\u5B9A\u804A\u5929\u8F93\u5165\u6846\u91CC\u6253\u300C/\u300D\u65F6\u5217\u51FA\u7684\u6307\u4EE4\u548C\u987A\u5E8F\uFF1B\u88AB\u79FB\u9664\u7684\u6307\u4EE4\u4ECD\u53EF\u624B\u52A8\u8F93\u5165\uFF0C\u529F\u80FD\u4E0D\u53D7\u5F71\u54CD\u3002\u540C\u6B65\u7531\u673A\u5668\u4EBA\u540E\u53F0\u5B8C\u6210\uFF0C\u6307\u4EE4\u8F83\u591A\u65F6\u9700\u8981\u4E00\u70B9\u65F6\u95F4\u3002":'The panel only decides which commands the "/" list in the chat input offers, and in which order. A removed command can still be typed by hand and keeps working. The bot syncs the panel in the background; many commands take a moment.',"\u8DDF\u968F\u9ED8\u8BA4\uFF08\u968F\u63D2\u4EF6\u7248\u672C\u66F4\u65B0\uFF09":"Follow the default (updated with the plugin)","\u81EA\u5B9A\u4E49\uFF08\u81EA\u5DF1\u6311\u6307\u4EE4\u548C\u987A\u5E8F\uFF09":"Custom (choose the commands and their order)","\u5F53\u524D\u6CA1\u6709\u9009\u62E9\u4EFB\u4F55\u6307\u4EE4\uFF0C\u4FDD\u5B58\u540E\u300C/\u300D\u9762\u677F\u4F1A\u53D8\u6210\u7A7A\u7684\u3002":'No commands are selected; saving leaves the "/" panel empty.',\u6DFB\u52A0\u6307\u4EE4:"Add command",\u9009\u62E9\u8981\u52A0\u5165\u7684\u6307\u4EE4:"Choose a command to add",\u6307\u4EE4\u90FD\u5DF2\u52A0\u5165:"Every command is already listed",\u52A0\u5165:"Add",\u6062\u590D\u5168\u90E8:"Restore all",\u5168\u90E8\u79FB\u9664:"Remove all",\u79FB\u9664:"Remove",\u4E0A\u79FB:"Move up",\u4E0B\u79FB:"Move down",\u4FDD\u5B58:"Save","\u5DF2\u4FDD\u5B58\uFF0C\u9762\u677F\u7A0D\u540E\u540C\u6B65":"Saved; the panel syncs shortly","\u8BF7\u9009\u62E9\u9762\u677F\u8981\u663E\u793A\u7684\u6307\u4EE4\u4E0E\u987A\u5E8F\u3002":"Choose which commands the panel shows, and in what order.","\u98DE\u4E66\u6307\u4EE4\u9762\u677F\u8BBE\u7F6E\u6682\u4E0D\u53EF\u7528\u3002":"The Feishu command panel settings are unavailable right now.",\u67E5\u770B\u5206\u6B65\u76F4\u63A8\u8BF4\u660E:"View step push help",\u5F00\u542F\u540E\u9010\u6B65\u63A8\u9001\u5DE5\u5177\u8C03\u7528\u4E0E\u8FC7\u7A0B\u8BF4\u660E:"Push tool calls and process notes step by step",\u4EFB\u52A1\u8FC7\u7A0B\u5C55\u793A:"Task progress display","\u8BBE\u7F6E\u4EFB\u52A1\u6267\u884C\u8FC7\u7A0B\u7684\u5448\u73B0\u65B9\u5F0F\uFF1A\u4E0D\u663E\u793A\u3001\u539F\u751F\u76F4\u64AD\u3001\u5B9E\u65F6\u5361\u7247\u6216\u9010\u6B65\u6D88\u606F":"Choose how execution is presented: hidden, native live process, one live card, or step-by-step messages","\u4E0D\u663E\u793A\u8FC7\u7A0B\uFF08\u53EA\u53D1\u9001\u6700\u7EC8\u7B54\u6848\uFF09":"Hide the process (send the final answer only)","\u5B9E\u65F6\u76F4\u64AD\uFF08\u98DE\u4E66\u539F\u751F\u601D\u8003\u8FC7\u7A0B\uFF09":"Live process (native Feishu thinking process)","\u5B9E\u65F6\u8FC7\u7A0B\u5361\uFF08\u5168\u7A0B\u4E00\u5F20\u5361\u7247\u52A8\u6001\u66F4\u65B0\uFF09":"Live process card (one card updated throughout)","\u9010\u6B65\u76F4\u64AD\uFF08\u6BCF\u4E00\u6B65\u5355\u72EC\u53D1\u4E00\u6761\u6D88\u606F\uFF09":"Step-by-step feed (one message per step)","\u9002\u5408\u65E5\u5E38\u95EE\u7B54\uFF1A\u6267\u884C\u8FC7\u7A0B\u4E2D\u4E0D\u663E\u793A\u5DE5\u5177\u8C03\u7528\u7B49\u4E2D\u95F4\u6B65\u9AA4\uFF0C\u53EA\u56DE\u590D\u6700\u7EC8\u7ED3\u679C":"For everyday Q&A: tool calls and other interim steps stay hidden, only the final result is replied","\u4F7F\u7528\u98DE\u4E66\u539F\u751F\u601D\u8003\u8FC7\u7A0B\u5C55\u793A\u63A8\u7406\u3001\u5DE5\u5177\u8C03\u7528\u4E0E\u7ED3\u679C\uFF0C\u6700\u7EC8\u7B54\u6848\u5355\u72EC\u53D1\u9001":"Use Feishu\u2019s native thinking process for reasoning, tool calls, and results, then send the final answer separately","\u63A8\u8350\u957F\u4EFB\u52A1\u4F7F\u7528\uFF1A\u8FC7\u7A0B\u4E0E\u6700\u7EC8\u7B54\u6848\u90FD\u5728\u540C\u4E00\u5F20\u5361\u7247\u91CC\u5B9E\u65F6\u66F4\u65B0\uFF0C\u4E0D\u5237\u5C4F":"Recommended for long tasks: the process and the final answer update live in one card without flooding the chat","\u6BCF\u4E00\u6B65\u90FD\u5355\u72EC\u53D1\u4E00\u6761\u6D88\u606F\uFF08\u542B\u5DE5\u5177\u8C03\u7528\u548C\u8FC7\u7A0B\u8BF4\u660E\uFF09\uFF1B\u6CE8\u610F\u957F\u4EFB\u52A1\u4F1A\u8FDE\u7EED\u53D1\u9001\u8F83\u591A\u6D88\u606F":"Every step is sent as its own message (including tool calls and notes); long tasks may send many messages in a row","\u5206\u6B65\u76F4\u63A8\u8BBE\u7F6E\u4FDD\u5B58\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5\u3002":"Could not save the step push setting. Try again.",\u8BED\u97F3\u4EA4\u4E92:"Voice","\u6B63\u5728\u8BFB\u53D6\u8BED\u97F3\u8BBE\u7F6E\u2026":"Loading voice settings\u2026","\u98DE\u4E66\u8BED\u97F3\u8BBE\u7F6E\u6682\u4E0D\u53EF\u7528\u3002":"Feishu voice settings are unavailable.","\u672A\u627E\u5230\u5F53\u524D\u98DE\u4E66\u673A\u5668\u4EBA\uFF0C\u8BF7\u8FD4\u56DE\u5217\u8868\u540E\u91CD\u8BD5\u3002":"This Feishu bot was not found. Return to the bot list and try again.",\u67E5\u770B\u8BED\u97F3\u4EA4\u4E92\u8BF4\u660E:"View voice help",\u8BED\u97F3\u4EA4\u4E92\u5F00\u5173:"Voice on/off","\u5F00\u542F(\u8BED\u97F3\u63D0\u95EE\u4E0E\u8BED\u97F3\u56DE\u590D)":"On (voice questions and voice replies)","\u6536\u5230\u8BED\u97F3\u6D88\u606F\u65F6\u8F6C\u5199\u4E3A\u6587\u5B57\u5E76\u6309\u6587\u5B57\u6D41\u6C34\u7EBF\u5904\u7406,\u7B54\u6848\u540C\u65F6\u4EE5\u8BED\u97F3\u56DE\u590D;\u8F6C\u5199\u5931\u8D25\u65F6\u964D\u7EA7\u4E3A\u4EC5\u652F\u6301\u6587\u5B57/\u56FE\u7247/\u6587\u4EF6\u7684\u63D0\u793A\u3002\u51ED\u636E\u503C\u5728\u63D2\u4EF6\u51ED\u636E\u5E93\u91CC\u7BA1\u7406,\u8FD9\u91CC\u53EA\u5F15\u7528\u73AF\u5883\u53D8\u91CF\u540D\u3002":"Voice messages are transcribed to text and processed by the normal text pipeline; the answer is also sent as a voice reply. If transcription fails, the bot falls back to the text/image/file-only notice. The credential value lives in the plugin credential store; only the environment variable name is referenced here.","\u51ED\u636E\u5F15\u7528(\u73AF\u5883\u53D8\u91CF\u540D)":"Credential reference (environment variable name)","\u8F6C\u5199\u6A21\u578B(ASR)":"Transcription model (ASR)","\u5408\u6210\u6A21\u578B(TTS)":"Synthesis model (TTS)",\u56DE\u590D\u97F3\u8272:"Reply voice",'\u9700\u8981 DashScope \u5BC6\u94A5(\u51ED\u636E\u5E93\u4E2D\u4EE5"\u51ED\u636E\u5F15\u7528"\u4E3A\u540D\u7684\u73AF\u5883\u53D8\u91CF)\u4E0E\u53EF\u7528 ffmpeg;\u97F3\u8272\u652F\u6301 Cherry/Serena/Bella/Chelsie/Momo/Katerina \u7B49 qwen3-tts-flash \u5B98\u65B9\u97F3\u8272\u3002':"Requires a DashScope API key (the credential-store environment variable named by the credential reference above) and a working ffmpeg. Supported voices include the official qwen3-tts-flash voices Cherry/Serena/Bella/Chelsie/Momo/Katerina.",\u4FDD\u5B58\u8BED\u97F3\u8BBE\u7F6E:"Save voice settings","\u9ED8\u8BA4\u5173\u95ED;\u5F00\u542F\u540E\u673A\u5668\u4EBA\u53EF\u542C\u61C2\u8BED\u97F3\u6D88\u606F\u5E76\u4EE5\u8BED\u97F3\u56DE\u590D\u3002":"Off by default. When enabled, the bot understands voice messages and replies by voice.","\u8BED\u97F3\u8BBE\u7F6E\u4FDD\u5B58\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5\u3002":"Could not save the voice settings. Try again.",zcode\u8FC7\u7A0B\u5361\u6A21\u5F0F:"ZCode process-card mode","\u8FC7\u7A0B\u8BF4\u660E\u3001\u5DE5\u5177\u6458\u8981\u4E0E\u6700\u7EC8\u7B54\u6848\u90FD\u5728\u540C\u4E00\u5F20\u5361\u7247\u4E2D\u539F\u5730\u5237\u65B0":"Process notes, the tool summary, and the final answer refresh in place inside one card","\u601D\u8003\u4E0E\u5DE5\u5177\u6458\u8981\u6298\u53E0\u5C55\u793A\uFF0C\u6700\u7EC8\u7B54\u6848\u5728\u540C\u4E00\u5F20\u5361\u7247\u4E2D\u539F\u5730\u5237\u65B0":"Thinking and the tool summary stay folded; the final answer refreshes in place inside one card",\u9489\u9489\u8BBE\u7F6E:"DingTalk settings",\u4F01\u4E1A\u5FAE\u4FE1\u8BBE\u7F6E:"WeCom settings",\u626B\u7801\u63A5\u5165\u673A\u5668\u4EBA:"Scan QR code",\u6B63\u5728\u63A5\u5165:"Connecting",\u624B\u52A8\u63A5\u5165:"Manual setup",\u6536\u8D77\u51ED\u636E:"Hide credentials",\u6536\u8D77\u63A5\u5165:"Hide setup",\u5C55\u5F00\u8BE5\u8D26\u53F7\u7684\u8BBE\u7F6E:"Expand this account's settings",\u6536\u8D77\u8BE5\u8D26\u53F7\u7684\u8BBE\u7F6E:"Collapse this account's settings",\u63A5\u5165\u673A\u5668\u4EBA:"Connect bot",\u5F00\u59CB\u63A5\u5165:"Start setup",\u5728\u7EBF:"online",\u8FD0\u884C\u6B63\u5E38:"Connected",\u6B63\u5728\u8FDE\u63A5:"Connecting","\u6B63\u5728\u8FDE\u63A5\u2026":"Connecting\u2026",\u8FDE\u63A5\u672A\u5C31\u7EEA:"Not connected",\u8FDE\u63A5\u4E2D:"Connecting",\u8FDE\u63A5\u4E2D\u65AD:"Disconnected",\u9700\u8981\u5904\u7406:"Needs attention",\u72B6\u6001\u672A\u77E5:"Unknown status",\u79BB\u7EBF:"Offline",\u5DF2\u65AD\u5F00:"Disconnected",\u6D88\u606F\u901A\u9053:"Message channel",\u67E5\u770B\u6D88\u606F\u901A\u9053\u8BF4\u660E:"View message channel details",\u6700\u8FD1\u68C0\u67E5:"Last checked",\u6700\u8FD1\u4E00\u6761\u6D88\u606F\u5904\u7406\u5931\u8D25:"Latest message failed",\u9519\u8BEF\u7801:"Code",\u53C2\u8003\u53F7:"Reference",\u5F53\u524D\u5DE5\u4F5C\u533A:"Current workspace",\u9009\u62E9\u76EE\u5F55:"Choose folder",\u9009\u62E9\u673A\u5668\u4EBA\u5DE5\u4F5C\u533A\u76EE\u5F55:"Select bot workspace folder",\u5F53\u524D\u76EE\u5F55:"Current folder",\u4E3B\u76EE\u5F55:"Home",\u76F4\u63A5\u8F93\u5165\u8DEF\u5F84:"Enter a path directly","\u652F\u6301 Windows \u76D8\u7B26\u3001UNC \u4E0E POSIX \u7EDD\u5BF9\u8DEF\u5F84\u3002":"Supports Windows drives, UNC paths, and POSIX absolute paths.","\u8F93\u5165 Host \u4E0A\u7684\u5B8C\u6574\u7EDD\u5BF9\u8DEF\u5F84":"Enter a full absolute path on the Host",\u524D\u5F80:"Go","\u8BFB\u53D6\u4E2D\u2026":"Loading\u2026","\u6B63\u5728\u51C6\u5907\u76EE\u5F55\u9009\u62E9\u5668\u2026":"Preparing folder picker\u2026","\u6B63\u5728\u8BFB\u53D6\u76EE\u5F55\u2026":"Loading folders\u2026","\u8FD9\u4E2A\u76EE\u5F55\u4E2D\u6CA1\u6709\u5B50\u6587\u4EF6\u5939\u3002":"This folder has no subfolders.","\u6B64\u76EE\u5F55\u7684\u5B50\u6587\u4EF6\u5939\u8FC7\u591A\uFF0C\u4EC5\u663E\u793A\u524D\u4E00\u90E8\u5206\u3002":"This folder has too many subfolders; only the first group is shown.","\u65E0\u6CD5\u8BFB\u53D6\u76EE\u5F55\uFF0C\u8BF7\u91CD\u8BD5\u3002":"Could not load the folder. Try again.",\u91CD\u8BD5:"Retry",\u663E\u793A\u9690\u85CF\u6587\u4EF6\u5939:"Show hidden folders","\u5207\u6362\u540E\u4F1A\u6E05\u9664\u8FD9\u4E2A\u673A\u5668\u4EBA\u7684\u65E7\u4F1A\u8BDD\u6620\u5C04\u3002":"Switching clears this bot\u2019s previous session mappings.","\u5207\u6362\u4E2D\u2026":"Switching\u2026",\u9009\u62E9\u6B64\u76EE\u5F55:"Select this folder",\u5DE5\u4F5C\u533A\u7EDD\u5BF9\u8DEF\u5F84:"Absolute workspace path","/\u7EDD\u5BF9\u8DEF\u5F84/\u5230/\u5DE5\u4F5C\u533A":"/absolute/path/to/workspace",\u4FEE\u6539:"Change",\u4E0A\u4E0B\u6587\u589E\u5F3A:"Context enhancement",\u672A\u5F00\u542F:"Not enabled",\u4EC5\u7FA4\u804A:"Groups only",\u4EC5\u79C1\u804A:"Direct only",\u7FA4\u804A\u548C\u79C1\u804A:"Groups and direct",\u5173\u95ED\u5F39\u7A97:"Close dialog",\u67E5\u770B\u4E0A\u4E0B\u6587\u589E\u5F3A\u8BF4\u660E:"View context enhancement details",\u4E0A\u4E0B\u6587\u589E\u5F3A\u8303\u56F4:"Context enhancement scope",\u542F\u7528\u8303\u56F4:"Enable in",\u542F\u7528:"Enabled","\uFF08\u5F53\u524D\u6E20\u9053\u4E0D\u652F\u6301\u7FA4\u804A\uFF09":"(This channel does not support group chats)",\u6765\u6E90\u5B57\u6BB5:"Source fields",\u67E5\u770B\u6765\u6E90\u5B57\u6BB5\u8BF4\u660E:"View source field details",\u67E5\u770B\u7FA4\u804A\u6765\u6E90\u5B57\u6BB5\u8BF4\u660E:"View group source field details",\u67E5\u770B\u79C1\u804A\u6765\u6E90\u5B57\u6BB5\u8BF4\u660E:"View direct source field details",\u6E20\u9053:"Channel",\u4F1A\u8BDD\u7C7B\u578B:"Conversation type",\u53D1\u9001\u8005\u6807\u8BC6:"Sender ID",\u53D1\u9001\u8005\u6635\u79F0:"Sender name",\u67E5\u770B\u53D1\u9001\u8005\u6635\u79F0\u5B57\u6BB5\u8BF4\u660E:"View sender name field details",\u67E5\u770B\u7FA4\u804A\u53D1\u9001\u8005\u6635\u79F0\u5B57\u6BB5\u8BF4\u660E:"View group sender name field details",\u67E5\u770B\u79C1\u804A\u53D1\u9001\u8005\u6635\u79F0\u5B57\u6BB5\u8BF4\u660E:"View direct sender name field details","\u8BE5\u5B57\u6BB5\u4E0D\u662F\u6BCF\u4E2A\u6E20\u9053\u90FD\u80FD\u63D0\u4F9B\u3002\u5F53\u524D\u6D88\u606F\u6CA1\u6709\u53D1\u9001\u8005\u6635\u79F0\u65F6\uFF0C\u5373\u4F7F\u5DF2\u9009\u62E9\u8BE5\u5B57\u6BB5\uFF0C<dsh_im_source> \u4E2D\u4E5F\u4F1A\u7701\u7565 senderName\u3002":"This field is not available on every channel. If the current message has no sender name, <dsh_im_source> omits senderName even when the field is selected.",\u4F1A\u8BDD\u6807\u9898:"Conversation title",\u67E5\u770B\u7FA4\u804A\u4F1A\u8BDD\u6807\u9898\u5B57\u6BB5\u8BF4\u660E:"View group conversation title field details",\u67E5\u770B\u79C1\u804A\u4F1A\u8BDD\u6807\u9898\u5B57\u6BB5\u8BF4\u660E:"View direct conversation title field details","\u8BE5\u5B57\u6BB5\u4E0D\u662F\u6BCF\u4E2A\u6E20\u9053\u90FD\u80FD\u63D0\u4F9B\u3002\u9489\u9489\u7FA4\u804A\u4F1A\u5E26\u4E0A\u7FA4\u540D\u3002\u5F53\u524D\u6D88\u606F\u6CA1\u6709\u4F1A\u8BDD\u6807\u9898\u65F6\uFF0C\u5373\u4F7F\u5DF2\u9009\u62E9\u8BE5\u5B57\u6BB5\uFF0C<dsh_im_source> \u4E2D\u4E5F\u4F1A\u7701\u7565 conversationTitle\u3002":"This field is not available on every channel. DingTalk group chats include the group name. If the current message has no conversation title, <dsh_im_source> omits conversationTitle even when the field is selected.",\u4F1A\u8BDD\u6807\u8BC6:"Chat ID",\u67E5\u770B\u7FA4\u804A\u4F1A\u8BDD\u6807\u8BC6\u5B57\u6BB5\u8BF4\u660E:"View group chat ID field details",\u67E5\u770B\u79C1\u804A\u4F1A\u8BDD\u6807\u8BC6\u5B57\u6BB5\u8BF4\u660E:"View direct chat ID field details","\u8BE5\u5B57\u6BB5\u4E0D\u662F\u6BCF\u4E2A\u6E20\u9053\u90FD\u80FD\u63D0\u4F9B\u3002\u4F1A\u8BDD\u6807\u8BC6\u7528\u4E8E\u533A\u5206\u4E0D\u540C\u7684\u7FA4\u7EC4\u6216\u79C1\u804A\uFF0C\u98DE\u4E66\u7FA4\u804A\u4F1A\u5E26\u4E0A\u7FA4 ID\u3002\u5F53\u524D\u6D88\u606F\u6CA1\u6709\u4F1A\u8BDD\u6807\u8BC6\u65F6\uFF0C\u5373\u4F7F\u5DF2\u9009\u62E9\u8BE5\u5B57\u6BB5\uFF0C<dsh_im_source> \u4E2D\u4E5F\u4F1A\u7701\u7565 chatId\u3002":"This field is not available on every channel. The chat ID distinguishes different groups or direct chats, and Feishu group chats include the group ID. If the current message has no chat ID, <dsh_im_source> omits chatId even when the field is selected.",\u8BDD\u9898\u6807\u8BC6:"Topic ID",\u67E5\u770B\u7FA4\u804A\u8BDD\u9898\u6807\u8BC6\u5B57\u6BB5\u8BF4\u660E:"View group topic ID field details",\u67E5\u770B\u79C1\u804A\u8BDD\u9898\u6807\u8BC6\u5B57\u6BB5\u8BF4\u660E:"View direct topic ID field details","\u8BE5\u5B57\u6BB5\u4E0D\u662F\u6BCF\u4E2A\u6E20\u9053\u90FD\u80FD\u63D0\u4F9B\u3002\u98DE\u4E66\u8BDD\u9898\u7FA4\u7684\u6D88\u606F\u4F1A\u5E26\u4E0A\u8BDD\u9898 ID\uFF0C\u7528\u4E8E\u533A\u5206\u540C\u4E00\u7FA4\u7EC4\u5185\u7684\u4E0D\u540C\u8BDD\u9898\uFF1B\u5F53\u524D\u6D88\u606F\u4E0D\u5728\u8BDD\u9898\u4E2D\u65F6\uFF0C\u5373\u4F7F\u5DF2\u9009\u62E9\u8BE5\u5B57\u6BB5\uFF0C<dsh_im_source> \u4E2D\u4E5F\u4F1A\u7701\u7565 threadId\u3002":"This field is not available on every channel. Messages in a Feishu topic chat carry the topic ID, which distinguishes different topics inside the same group. If the current message is not inside a topic, <dsh_im_source> omits threadId even when the field is selected.",\u673A\u5668\u4EBA\u6807\u8BC6:"Bot ID",\u53D1\u9001\u65F6\u95F4:"Sent at",\u67E5\u770B\u7FA4\u804A\u53D1\u9001\u65F6\u95F4\u5B57\u6BB5\u8BF4\u660E:"View group sent-at field details",\u67E5\u770B\u79C1\u804A\u53D1\u9001\u65F6\u95F4\u5B57\u6BB5\u8BF4\u660E:"View direct sent-at field details","\u5F53\u524D\u6D88\u606F\u7684\u53D1\u9001\u65F6\u95F4\uFF0C\u683C\u5F0F\u4E3A YYYY-MM-DD HH:mm:ss\uFF08\u672C\u673A\u65F6\u533A\uFF09\u3002\u4F18\u5148\u4F7F\u7528\u5E73\u53F0\u7ED9\u51FA\u7684\u53D1\u9001\u65F6\u95F4\uFF1B\u5E73\u53F0\u672A\u63D0\u4F9B\u65F6\uFF0C\u4ECE\u5FAE\u4FE1\u6D88\u606F ID \u4E2D\u89E3\u6790\u51FA\u53D1\u9001\u65F6\u95F4\uFF1B\u4E24\u8005\u90FD\u4E0D\u53EF\u7528\u65F6\uFF0C\u5373\u4F7F\u5DF2\u9009\u62E9\u8BE5\u5B57\u6BB5\uFF0C<dsh_im_source> \u4E2D\u4E5F\u4F1A\u7701\u7565 sentAt\u3002\u76EE\u524D\u4EC5\u5FAE\u4FE1\u6E20\u9053\u63D0\u4F9B\uFF1B\u628A\u672C\u673A\u65F6\u533A\u5199\u8FDB\u589E\u5F3A\u63D0\u793A\u8BCD\uFF0C\u6A21\u578B\u5224\u65AD\u5148\u540E\u987A\u5E8F\u65F6\u66F4\u51C6\u786E\u3002":"When the current message was sent, as YYYY-MM-DD HH:mm:ss in the local time zone. The platform send time is used when available; otherwise the send time is decoded from the WeChat message ID. If neither is available, <dsh_im_source> omits sentAt even when the field is selected. WeChat is the only channel that provides it today. Naming your time zone in the guidance makes ordering judgements more accurate.",\u589E\u5F3A\u63D0\u793A\u8BCD:"Guidance",\u67E5\u770B\u589E\u5F3A\u63D0\u793A\u8BCD\u4F7F\u7528\u8BF4\u660E:"View guidance instructions",\u67E5\u770B\u7FA4\u804A\u589E\u5F3A\u63D0\u793A\u8BCD\u4F7F\u7528\u8BF4\u660E:"View group guidance instructions",\u67E5\u770B\u79C1\u804A\u589E\u5F3A\u63D0\u793A\u8BCD\u4F7F\u7528\u8BF4\u660E:"View direct guidance instructions",\u4F7F\u7528\u8BF4\u660E:"How to use","\u7528\u4E8E\u544A\u8BC9\u6A21\u578B\u5982\u4F55\u4F7F\u7528 <dsh_im_source> \u4E2D\u5DF2\u9009\u62E9\u7684\u6765\u6E90\u5B57\u6BB5\u3002\u53EA\u586B\u5199\u6B63\u6587\uFF0C\u63D2\u4EF6\u4F1A\u81EA\u52A8\u6DFB\u52A0 <dsh_im_source_guidance> \u6210\u5BF9\u6807\u7B7E\u3002":"Tell the model how to use the selected fields in <dsh_im_source>. Enter only the body; the plugin adds paired <dsh_im_source_guidance> tags.",\u751F\u6548\u89C4\u5219:"Behavior",\u9690\u79C1\u63D0\u793A:"Privacy",\u4F7F\u7528\u793A\u4F8B:"Example","\u4EC5\u4F9D\u636E\u5F53\u524D\u6D88\u606F\u7684 <dsh_im_source> \u4E2D\u5B9E\u9645\u63D0\u4F9B\u7684\u5B57\u6BB5\u7406\u89E3\u6765\u6E90\uFF1B\u6CA1\u6709\u63D0\u4F9B\u7684\u5B57\u6BB5\u4E0D\u8981\u731C\u6D4B\u6216\u8865\u5168\u3002\nconversationType\u662F\u7FA4\u804A\u65F6\u56DE\u590D\u4E25\u8083\u4E00\u70B9\uFF0CconversationType\u662F\u79C1\u804A\u65F6\u56DE\u590D\u4E00\u5B9A\u8981\u5E7D\u9ED8\u641E\u7B11\uFF0C\u50CF\u5468\u661F\u9A70\u7684\u7535\u5F71\u4E00\u6837\u641E\u7B11":`Understand the source only from fields actually present in <dsh_im_source> for the current message; do not guess or fill in missing fields.
|
|
429
|
+
`,{encoding:"utf8",mode:384}),await MJe(o,this.#e)}};import{createHash as qJe,randomUUID as Jre}from"node:crypto";var dx=new Set(["starting","qr_ready","polling","slow_down","domain_switched","saving"]),vJe=new Set(["polling","slow_down","domain_switched"]),un=Object.freeze({IDLE:"idle",STARTING:"starting",QR_READY:"qr_ready",POLLING:"polling",SLOW_DOWN:"slow_down",DOMAIN_SWITCHED:"domain_switched",SAVING:"saving",SUCCEEDED:"succeeded",EXPIRED:"expired",CANCELLED:"cancelled",ERROR:"error"});function Ure(n){return["access_denied","expired_token","abort"].includes(n?.code)?n.code:"registration_failed"}function px(n){let A=Ure(n);return{code:A,message:{access_denied:"Registration was denied.",abort:"Registration was cancelled.",expired_token:"The registration QR code expired."}[A]??"Unable to register the Feishu app."}}function PJe(n){let A=Number(n);if(!Number.isFinite(A)||A<=0)throw new TypeError("registerApp onQRCodeReady returned an invalid expireIn");return A}function LJe(n){if(n!==void 0){if(n===null||typeof n!="object"||Array.isArray(n))throw new TypeError("registerApp returned invalid user_info");return{...n}}}var pl=class{#e;#t;#A;#r;#a;#l;#n=0;#o=null;#i;constructor({registerApp:A,onCredentials:o,diagnostics:a=st({channel:"feishu"}),now:e=Date.now,setTimeout:i=globalThis.setTimeout,clearTimeout:t=globalThis.clearTimeout}={}){if(typeof A!="function")throw new TypeError("RegistrationManager requires a registerApp function");if(typeof o!="function")throw new TypeError("RegistrationManager requires an onCredentials function");if(typeof e!="function"||typeof i!="function"||typeof t!="function")throw new TypeError("RegistrationManager clock dependencies must be functions");this.#e=a,this.#t=A,this.#A=o,this.#r=e,this.#a=i,this.#l=t,this.#i=this.#I(null,un.IDLE)}start(A={}){if(A===null||typeof A!="object"||Array.isArray(A))throw new TypeError("Registration options must be an object");this.#Q();let o={id:++this.#n,controller:new AbortController,qrCodeUrl:null,expiresAt:null,pollIntervalSeconds:null,expiryTimer:null};this.#o=o,this.#i=this.#I(o,un.STARTING);let a={...A,signal:o.controller.signal,onQRCodeReady:i=>this.#s(o,i),onStatusChange:i=>this.#g(o,i)};return Promise.resolve().then(()=>this.#t(a)).then(i=>this.#p(o,i),i=>this.#h(o,i)),this.status()}status(){this.#u();let A={...this.#i};A.error&&(A.error={...A.error});let o=this.#o;return o&&o.expiresAt!==null&&dx.has(A.state)&&(A.remainingSeconds=Math.max(0,Math.ceil((o.expiresAt-this.#r())/1e3))),A}cancel(){let A=this.#o;return A?(this.#C(A,un.CANCELLED,{error:{code:"abort",message:"Registration was cancelled."}}),A.controller.abort(),this.status()):this.status()}#c(A){return this.#o===A}#I(A,o,a={}){let e={state:o,attempt:A?.id??this.#n,updatedAt:this.#r(),...a};return A?.qrCodeUrl&&dx.has(o)&&(e.qrCodeUrl=A.qrCodeUrl,e.expiresAt=A.expiresAt),A?.pollIntervalSeconds!==null&&dx.has(o)&&(e.pollIntervalSeconds=A.pollIntervalSeconds),e}#d(A,o,a={}){this.#c(A)&&(this.#i=this.#I(A,o,a))}#s(A,o){if(!this.#c(A))return;if(typeof o?.url!="string"||!o.url)throw new TypeError("registerApp onQRCodeReady returned an invalid URL");let a=PJe(o.expireIn);A.qrCodeUrl=o.url,A.expiresAt=this.#r()+a*1e3,this.#f(A),A.expiryTimer=this.#a(()=>this.#E(A),a*1e3),A.expiryTimer?.unref?.(),this.#d(A,un.QR_READY)}#g(A,o){!this.#c(A)||!vJe.has(o?.status)||(o.status===un.SLOW_DOWN&&Number.isFinite(Number(o.interval))&&(A.pollIntervalSeconds=Number(o.interval)),this.#d(A,o.status))}async#p(A,o){if(!this.#c(A))return;let a=o?.client_id,e=o?.client_secret;if(typeof a!="string"||!a||typeof e!="string"||!e){this.#C(A,un.ERROR,{error:{code:"invalid_credentials",message:"Feishu registration returned invalid credentials."}});return}let i;try{i=LJe(o.user_info)}catch{this.#C(A,un.ERROR,{error:{code:"invalid_credentials",message:"Feishu registration returned invalid credentials."}});return}this.#f(A),A.qrCodeUrl=null,A.expiresAt=null,A.pollIntervalSeconds=null,this.#d(A,un.SAVING);try{await this.#A({client_id:a,client_secret:e,user_info:i})}catch(t){this.#c(A)&&this.#C(A,un.ERROR,{error:this.#e.report(t,{operation:"provision.poll",stage:"activation",publicError:{code:"credentials_callback_failed",message:"Unable to store the Feishu credentials."}}).publicError});return}this.#c(A)&&this.#C(A,un.SUCCEEDED)}#h(A,o){if(!this.#c(A))return;let a=Ure(o);if(a==="expired_token"){this.#C(A,un.EXPIRED,{error:px(o)});return}if(a==="abort"){this.#C(A,un.CANCELLED,{error:px(o)});return}this.#C(A,un.ERROR,{error:this.#e.report(o,{operation:A.qrCodeUrl?"provision.poll":"provision.begin",publicError:px(o)}).publicError})}#u(){let A=this.#o;A&&A.expiresAt!==null&&this.#r()>=A.expiresAt&&this.#E(A)}#E(A){this.#c(A)&&(this.#C(A,un.EXPIRED,{error:{code:"expired_token",message:"The registration QR code expired."}}),A.controller.abort())}#C(A,o,a={}){this.#c(A)&&(this.#f(A),this.#i=this.#I(A,o,a),this.#o=null)}#f(A){A.expiryTimer!==null&&(this.#l(A.expiryTimer),A.expiryTimer=null)}#Q(){let A=this.#o;A&&(this.#f(A),this.#o=null,A.controller.abort())}};var FJe="card.action.trigger",GJe="im:message:readonly",UJe="im:resource",my="callback_repair";function HJe(n){return n==="lark"?"accounts.larksuite.com":"accounts.feishu.cn"}function xJe(n){return n==="lark"?"open.larksuite.com":"open.feishu.cn"}function hx(n,A,o="feishu",a="Feishu app update"){let e;try{e=new URL(n)}catch{throw new Error(`${a} returned an invalid verification URL`)}let i=o==="feishu"||o==="lark",t=e.searchParams.getAll("clientID"),r=e.searchParams.getAll("tp"),s=e.searchParams.getAll("addons"),c=String(A).includes("{{")||String(A).includes("}}")||[...e.searchParams.values()].some(g=>g.includes("{{")||g.includes("}}"));if(!i||e.protocol!=="https:"||e.hostname!==xJe(o)||e.port!==""||e.username!==""||e.password!==""||r.length!==1||r[0]!=="sdk"||t.length!==1||t[0]!==A||e.searchParams.has("createOnly")||s.length!==1||!s[0]?.trim()||c)throw new Error(`${a} returned an unsafe verification URL`);return e.toString()}function KJe(n,A,o="feishu"){return hx(n,A,o,"Feishu callback repair")}var SO=class{#e;#t;#A;constructor({registerApp:A,onCredentials:o,appId:a,domain:e="feishu",diagnostics:i}={}){if(typeof A!="function")throw new TypeError("registerApp is required");if(typeof o!="function")throw new TypeError("onCredentials is required");if(typeof a!="string"||!a.trim())throw new TypeError("appId is required");if(e!=="feishu"&&e!=="lark")throw new TypeError("domain is invalid");this.#t=a.trim(),this.#A=e,this.#e=new pl({diagnostics:i,registerApp:t=>A({...t,onQRCodeReady:r=>{KJe(r?.url,this.#t,this.#A),t.onQRCodeReady(r)}}),onCredentials:o})}start(){return this.#e.start({source:"deepseek-harness-card-action-repair",domain:HJe(this.#A),appId:this.#t,addons:{preset:!1,scopes:{tenant:[GJe,UJe,"im:message.group_at_msg.include_bot:readonly",...hO]},callbacks:{items:[FJe]}}})}status(){return this.#e.status()}cancel(){return this.#e.cancel()}};var YJe="im:message.group_msg",DO="group_message_permission";function jJe(n){return n==="lark"?"accounts.larksuite.com":"accounts.feishu.cn"}function JJe(n,A,o="feishu"){return hx(n,A,o,"Feishu group message permission update")}var wO=class{#e;#t;#A;constructor({registerApp:A,onCredentials:o,appId:a,domain:e="feishu",diagnostics:i}={}){if(typeof A!="function")throw new TypeError("registerApp is required");if(typeof o!="function")throw new TypeError("onCredentials is required");if(typeof a!="string"||!a.trim())throw new TypeError("appId is required");if(e!=="feishu"&&e!=="lark")throw new TypeError("domain is invalid");this.#t=a.trim(),this.#A=e,this.#e=new pl({diagnostics:i,registerApp:t=>A({...t,onQRCodeReady:r=>{JJe(r?.url,this.#t,this.#A),t.onQRCodeReady(r)}}),onCredentials:o})}start(){return this.#e.start({source:"deepseek-harness-group-message-permission",domain:jJe(this.#A),appId:this.#t,addons:{preset:!1,scopes:{tenant:[YJe]}}})}status(){return this.#e.status()}cancel(){return this.#e.cancel()}};var Hre=Object.freeze(["im:message.p2p_msg:readonly","im:message.group_at_msg:readonly","im:message.group_at_msg.include_bot:readonly","im:message:readonly","im:message:send_as_bot","im:message.reactions:write_only","im:message:recall","im:resource","cardkit:card:write",...hO]);var ux=new Set(["starting","qr_ready","polling","slow_down","domain_switched"]),bO=new Set([...ux,"saving"]),xre=new Set([my,DO]),Kre="*",zJe=12e4,WJe=6e5;function qre(){return{ready:!1,feishuLongConnectionState:"idle",harnessReachable:!1}}function og(n){return n?n.status:qre()}function hl(n){return n.ready===!0&&n.feishuLongConnectionState==="connected"&&n.harnessReachable===!0}function zre(n){return n.length>12?`${n.slice(0,8)}\u2022\u2022\u2022\u2022${n.slice(-4)}`:"cli_\u2022\u2022\u2022\u2022"}function VJe(n){return{name:n.botName,appIdMasked:zre(n.appId),activated:n.activated,domain:n.domain}}function ZJe({connected:n,error:A,connection:o}){return n?"connected":A||o.feishuLongConnectionState==="failed"?"error":"disconnected"}function XJe(){return`bot_${Jre().replaceAll("-","")}`}function $Je(){return`reg_${Jre().replaceAll("-","")}`}function Yre(n){return`DSH_FEISHU_APP_SECRET_${n.slice(4).toUpperCase()}`}function OO(n){return JSON.stringify({id:n.id,consumerMode:n.consumerMode??"standalone",appId:n.appId,secretRef:n.secretRef,ownerOpenIds:n.ownerOpenIds,domain:n.domain,botName:n.botName,botOpenId:n.botOpenId,activated:n.activated,groupResponseMode:Hn(n.groupResponseMode),mentionTopicReply:n.mentionTopicReply!==!1,stepPush:n.stepPush===!0,stepPushMode:hn(n.stepPushMode),stepCardPanels:So(n.stepCardPanels),voice:n.voice,slashPanel:Kn(n.slashPanel),groupMessagePermissionGranted:n.groupMessagePermissionGranted===!0,deletionPending:n.deletionPending===!0,connectedAt:n.connectedAt??null,createdAt:n.createdAt??null})}function jre(n){return JSON.stringify({id:n.id,consumerMode:n.consumerMode??"standalone",appId:n.appId,secretRef:n.secretRef,ownerOpenIds:n.ownerOpenIds,domain:n.domain,botOpenId:n.botOpenId,deletionPending:n.deletionPending===!0})}function MO(n){return typeof n=="string"&&n.trim()?n.trim():null}var Sy=class{#e;#t;#A;#r;#a;#l;#n;#o;#i;#c=new Map;#I=new Fb;#d=new Map;#s=new Map;#g=new Map;#p=new Map;#h=null;#u=Promise.resolve();#E=new Map;#C=1;#f;#Q=!1;constructor({registerApp:A,verifyApp:o,logger:a=console,credentials:e,configStore:i,createRuntime:t,deleteState:r=async()=>{},createBotId:s=XJe,createRegistrationId:c=$Je,callbackProbeTimeoutMs:g=zJe}){if(typeof A!="function")throw new Error("registerApp is required");if(typeof o!="function")throw new Error("verifyApp is required");if(!e)throw new Error("credentials service is required");if(!i||typeof i.list!="function")throw new Error("multi-bot config store is required");if(typeof t!="function")throw new Error("createRuntime is required");if(typeof r!="function")throw new Error("deleteState must be a function");if(!Number.isFinite(g)||g<=0||g>WJe)throw new TypeError("callbackProbeTimeoutMs must be between 1 and 600000ms");this.#e=st({channel:"feishu",logger:a}),this.#t=A,this.#A=o,this.#r=e,this.#a=i,this.#l=t,this.#n=r,this.#o=s,this.#i=c,this.#f=g}async initialize(){if(this.#Q)return this.status();let A=this.#a.list(),o=!1;return await Promise.allSettled(A.map(a=>this.#R(a.id,async()=>{let e=og(this.#c.get(a.id));if(hl(e)||e.feishuLongConnectionState==="connecting"||e.feishuLongConnectionState==="reconnecting")return;if(o=!0,a.deletionPending){this.#d.set(a.id,{code:"deletion_pending",message:"\u673A\u5668\u4EBA\u6B63\u5728\u7B49\u5F85\u5B8C\u6210\u672C\u5730\u5220\u9664\uFF0C\u8BF7\u91CD\u8BD5\u79FB\u9664\u3002"});return}let i;try{i=await de("credential.read",()=>this.#r.resolve(a.secretRef),"credential-store")}catch(t){this.#d.set(a.id,this.#e.report(t,{reuse:!0,botId:a.id,publicError:{code:"missing_credentials",message:"\u65E0\u6CD5\u8BFB\u53D6\u673A\u5668\u4EBA\u51ED\u636E\uFF0C\u8BF7\u68C0\u67E5\u51ED\u636E\u5B58\u50A8\u3002"}}).publicError);return}if(!i?.value){this.#d.set(a.id,{code:"missing_credentials",message:"\u673A\u5668\u4EBA\u51ED\u636E\u7F3A\u5931\uFF0C\u8BF7\u5220\u9664\u540E\u91CD\u65B0\u626B\u7801\u63A5\u5165\u3002"});return}try{await this.#T(a,i.value),this.#d.delete(a.id)}catch(t){this.#d.set(a.id,this.#e.report(t,{reuse:!0,botId:a.id,stage:"connection.start",publicError:{code:"connection_failed",message:"\u673A\u5668\u4EBA\u6682\u65F6\u65E0\u6CD5\u8FDE\u63A5\u98DE\u4E66\uFF0C\u8BF7\u91CD\u8BD5\u3002"}}).publicError)}}))),o&&this.#F(),this.status()}startRegistration(){this.#D();let A=this.#i();if(typeof A!="string"||!/^[A-Za-z0-9_-]{1,128}$/.test(A)||this.#s.has(A))throw new Error("Registration id generator returned an invalid or duplicate id");let o={id:A,manager:null,botId:null,createdNew:!1,cancelled:!1};return o.manager=new pl({diagnostics:this.#e,registerApp:this.#t,onCredentials:a=>this.#G(()=>this.#S(o,a))}),this.#s.set(A,o),this.#h=A,this.#N(),o.manager.start({source:"deepseek-harness",createOnly:!0,appPreset:{name:"{user} \u7684\u5317\u6C47\u661F\u6CB3 AI \u52A9\u624B",desc:"\u8FDE\u63A5\u98DE\u4E66\u4E0E DeepSeek Harness\uFF0C\u5728\u804A\u5929\u4E2D\u4F7F\u7528\u4F01\u4E1A AI \u52A9\u624B\u3002"},addons:{preset:!1,scopes:{tenant:[...Hre]},events:{items:{tenant:["im.message.receive_v1"]}},callbacks:{items:["card.action.trigger"]}}}),this.#F(),this.registrationStatus(A)}startCallbackRepair(A,{actorOpenId:o,chatId:a}={}){this.#D();let e=this.#L(A);if(e.deletionPending)throw new Error("Cannot repair a Feishu bot pending deletion");let i=this.#g.get(A),t=i?this.#s.get(i):null;if(t&&bO.has(t.manager.status().state)){if(t.operation!==my)throw new Error("Another Feishu app update is already active for this bot");return this.registrationStatus(t.id)}this.#g.delete(A);let r=this.#i();if(typeof r!="string"||!/^[A-Za-z0-9_-]{1,128}$/.test(r)||this.#s.has(r))throw new Error("Registration id generator returned an invalid or duplicate id");let s={id:r,operation:my,manager:null,botId:A,createdNew:!1,cancelled:!1,remoteCommitted:!1,processing:null,publicError:null,stage:"authorizing",target:structuredClone(e),targetFingerprint:OO(e),initiator:{actorOpenId:MO(o),chatId:MO(a)}};return s.manager=new SO({diagnostics:this.#e,registerApp:this.#t,appId:e.appId,domain:e.domain,onCredentials:c=>{s.remoteCommitted=!0;let l=this.#_(s,c).finally(()=>{s.processing===l&&(s.processing=null)});return s.processing=l,l}}),this.#s.set(r,s),this.#g.set(A,r),this.#h=r,this.#N(),s.manager.start(),this.#F(),this.registrationStatus(r)}startGroupMessagePermission(A){this.#D();let o=this.#L(A);if(o.deletionPending)throw new Error("Cannot update permissions for a Feishu bot pending deletion");let a=this.#g.get(A),e=a?this.#s.get(a):null;if(e&&bO.has(e.manager.status().state)){if(e.operation!==DO)throw new Error("Another Feishu app update is already active for this bot");return this.registrationStatus(e.id)}this.#g.delete(A);let i=this.#i();if(typeof i!="string"||!/^[A-Za-z0-9_-]{1,128}$/.test(i)||this.#s.has(i))throw new Error("Registration id generator returned an invalid or duplicate id");let t={id:i,operation:DO,manager:null,botId:A,createdNew:!1,cancelled:!1,remoteCommitted:!1,processing:null,publicError:null,stage:"authorizing",target:structuredClone(o),targetFingerprint:OO(o),initiator:{actorOpenId:null,chatId:null}};return t.manager=new wO({diagnostics:this.#e,registerApp:this.#t,appId:o.appId,domain:o.domain,onCredentials:r=>{t.remoteCommitted=!0;let c=this.#b(t,r).finally(()=>{t.processing===c&&(t.processing=null)});return t.processing=c,c}}),this.#s.set(i,t),this.#g.set(A,i),this.#h=i,this.#N(),t.manager.start(),this.#F(),this.registrationStatus(i)}hasRegistration(A){return this.#s.has(A)}registrationStatus(A){let o=this.#s.get(A);return o?this.#y({registration:o,selectedBotId:o.botId}):null}async cancelRegistration(A=this.#h){let o=this.#s.get(A);if(!o)return this.status();let a=o.manager.status().state;return xre.has(o.operation)&&a==="saving"?this.registrationStatus(A):bO.has(a)?(o.cancelled=!0,o.manager.cancel(),await this.#G(async()=>{o.createdNew&&o.botId&&this.#p.get(o.botId)===o.id&&this.#a.getBot(o.botId)&&await this.#R(o.botId,()=>this.#m(o.botId))}),this.#F(),this.registrationStatus(A)??this.status()):this.registrationStatus(A)}get diagnostics(){return this.#e}status(A){return this.#y({registration:this.#s.get(this.#h)??null,selectedBotId:A})}async bindCredentials({appId:A,appSecret:o,domain:a="feishu"}={}){this.#D();let e=typeof A=="string"?A.trim():"",i=typeof o=="string"?o.trim():"",t=a==="lark"?"lark":"feishu";if(!e||!i)throw new TypeError("Feishu App ID and App Secret are required");return this.#G(async()=>{this.#D();let r=await this.#A({appId:e,appSecret:i,domain:t});this.#D();let s=this.#a.list().find(B=>B.appId===e),c=s?.id??this.#o();if(typeof c!="string"||!/^[A-Za-z0-9_-]{1,128}$/.test(c)||!s&&this.#a.getBot(c))throw new Error("Bot id generator returned an invalid or duplicate id");let g=s?.secretRef??Yre(c),l=await de("credential.read",()=>this.#r.resolve(g),"credential-store").catch(()=>{}),d={...s,id:c,appId:e,secretRef:g,ownerOpenIds:s?.ownerOpenIds?.length?s.ownerOpenIds:[Kre],domain:t,botName:r.name,botOpenId:r.openId,activated:r.activated,stepPush:s?.stepPush??!0,stepPushMode:s?.stepPushMode??jH,deletionPending:!1,connectedAt:new Date().toISOString(),createdAt:s?.createdAt??new Date().toISOString()};await de("credential.save",()=>this.#r.set(g,i),"credential-store");let u;try{u=await this.#a.saveBot(d)}catch(B){throw await this.#P(g,l),B}return await this.#R(c,async()=>{try{await this.#T(u,i),this.#d.delete(c)}catch(B){this.#d.set(c,this.#e.report(B,{reuse:!0,botId:c,publicError:{code:"connection_failed",message:"\u673A\u5668\u4EBA\u5DF2\u7ECF\u7ED1\u5B9A\uFF0C\u4F46\u957F\u8FDE\u63A5\u672A\u5C31\u7EEA\uFF0C\u8BF7\u70B9\u51FB\u91CD\u8BD5\u3002"}}).publicError)}}),this.#F(),this.status(c)})}async reconnectBot(A){return this.#D(),this.#R(A,async()=>{let o=this.#L(A);if(o.deletionPending)return this.#d.set(A,{code:"deletion_pending",message:"\u673A\u5668\u4EBA\u6B63\u5728\u7B49\u5F85\u5B8C\u6210\u672C\u5730\u5220\u9664\uFF0C\u8BF7\u91CD\u8BD5\u79FB\u9664\u3002"}),this.status(A);if(hl(og(this.#c.get(A))))return this.status(A);let a;try{a=await de("credential.read",()=>this.#r.resolve(o.secretRef),"credential-store")}catch{a=null}if(!a?.value)return this.#d.set(A,{code:"missing_credentials",message:"\u673A\u5668\u4EBA\u51ED\u636E\u7F3A\u5931\uFF0C\u8BF7\u5220\u9664\u540E\u91CD\u65B0\u626B\u7801\u63A5\u5165\u3002"}),this.#F(),this.status(A);try{await this.#T(o,a.value),this.#d.delete(A)}catch(e){this.#d.set(A,this.#e.report(e,{reuse:!0,botId:A,stage:"connection.start",publicError:{code:"connection_failed",message:"\u673A\u5668\u4EBA\u6682\u65F6\u65E0\u6CD5\u8FDE\u63A5\u98DE\u4E66\uFF0C\u8BF7\u91CD\u8BD5\u3002"}}).publicError)}return this.#F(),this.status(A)})}async sendConnectionTest(A){return this.#D(),this.#R(A,async()=>{let o=this.#L(A),a=this.#c.get(A);if(!hl(og(a))||typeof a.sendConnectionTest!="function"){let e=new Error("\u98DE\u4E66\u673A\u5668\u4EBA\u5C1A\u672A\u8FDE\u63A5");throw e.code="test-target-unavailable",e}return a.sendConnectionTest(ni(`${o.botName}\uFF08${zre(o.appId)}\uFF09`,"\u98DE\u4E66\u673A\u5668\u4EBA"))})}async#B(A){let o;try{let e=await this.#r.resolve(A.secretRef);if(!e?.value)throw new Error("Account credentials unavailable");o=await this.#A({appId:A.appId,appSecret:e.value,domain:A.domain})}catch(e){let i=new Error("Account credentials could not be verified",{cause:e});throw i.code="account-unverified",i}if(!o?.openId||o.openId!==A.botOpenId){let e=new Error("Authenticated account identity changed");throw e.code="account-changed",e}return{fingerprint:qJe("sha256").update(JSON.stringify({provider:"feishu",domain:A.domain,appId:A.appId,botOpenId:o.openId})).digest("hex"),...o.name?{name:o.name}:{}}}async describeDeliveryAccount(A){return this.#D("capability-unavailable"),this.#R(A,async()=>{this.#D("capability-unavailable");let o=this.#L(A),a=await this.#B(o);return this.#D("capability-unavailable"),{version:1,botId:A,channel:"feishu",account:a,connected:hl(og(this.#c.get(A))),capabilities:["proactive-text-checked","proactive-receipt-checked","exclusive-text-consumer","reply-text-checked","history-text-checked","thread-history-text-checked"]}})}async consumeInbound(A,{expectedFingerprint:o,onEvent:a,signal:e}={}){return this.#D(),this.#G(()=>this.#R(A,async()=>{this.#D(),e?.throwIfAborted();let i=this.#L(A),t=await this.#B(i);if(this.#D("capability-unavailable"),e?.throwIfAborted(),t.fingerprint!==o)throw Object.assign(new Error("account-changed"),{code:"account-changed"});let r=this.#I.register(A,{fingerprint:o,onEvent:a,signal:e});try{let s=await this.#a.saveBot({...i,consumerMode:"external-consumer"});this.#D("capability-unavailable"),e?.throwIfAborted();let c=await this.#r.resolve(s.secretRef);if(this.#D("capability-unavailable"),e?.throwIfAborted(),!c?.value)throw Object.assign(new Error("account-unverified"),{code:"account-unverified"});return await this.#T(s,c.value),e?.throwIfAborted(),this.#F(),r}catch(s){throw r(),s}}))}async historyChecked(A,o,a,{expectedFingerprint:e,signal:i}={}){return this.#D("capability-unavailable"),this.#R(A,async()=>{this.#D("capability-unavailable"),i?.throwIfAborted();let t=this.#L(A),r=await this.#B(t);if(this.#D("capability-unavailable"),i?.throwIfAborted(),r.fingerprint!==e)throw Object.assign(new Error("account-changed"),{code:"account-changed"});let s=this.#c.get(A);if(t.consumerMode!=="external-consumer"||!hl(og(s))||typeof s.historyChecked!="function")throw Object.assign(new Error("capability-unavailable"),{code:"capability-unavailable"});let c=this.#I.signalFor(A,e),g=i?AbortSignal.any([i,c]):c,l=await s.historyChecked({botId:A,appId:t.appId,botOpenId:t.botOpenId,fingerprint:r.fingerprint},o,a,{signal:g});return this.#D("capability-unavailable"),g.throwIfAborted(),l})}async replyChecked(A,o,a,{expectedFingerprint:e,signal:i}={}){return this.#D(),this.#R(A,async()=>{this.#D();let t=this.#L(A),r=await this.#B(t);if(this.#D("capability-unavailable"),i?.throwIfAborted(),r.fingerprint!==e)throw Object.assign(new Error("account-changed"),{code:"account-changed"});i?.throwIfAborted();let s=this.#c.get(A);if(t.consumerMode!=="external-consumer"||!hl(og(s))||typeof s.replyChecked!="function")throw Object.assign(new Error("capability-unavailable"),{code:"capability-unavailable"});return s.replyChecked(o,a,{signal:i})})}async sendProactiveText(A,o,a,e={}){let i=e.expectedFingerprint!==void 0;return this.#D(i?"capability-unavailable":void 0),this.#R(A,async()=>{this.#D(i?"capability-unavailable":void 0);let t=this.#L(A);if(i){if((await this.#B(t)).fingerprint!==e.expectedFingerprint){let c=new Error("Authenticated account identity changed");throw c.code="account-changed",c}e.beforeSend?.(),this.#D("capability-unavailable"),e.signal?.throwIfAborted()}let r=this.#c.get(A);if(!hl(og(r))||typeof r.sendProactiveText!="function"){let s=new Error("\u98DE\u4E66\u673A\u5668\u4EBA\u5C1A\u672A\u8FDE\u63A5");throw s.code="bot-not-connected",s}return r.sendProactiveText(o,a,e)})}async presentSessionSyncApproval(A,o,a,e={}){return this.#D(),this.#R(A,async()=>{this.#D(),this.#L(A);let i=this.#c.get(A);return!hl(og(i))||typeof i.presentSessionSyncApproval!="function"?!1:i.presentSessionSyncApproval(o,a,e)})}async disconnectBot(A){return this.#D(),this.#R(A,async()=>(this.#L(A),await this.#w(A),this.#d.delete(A),this.#F(),this.status(A)))}async updateGroupResponseMode(A,o){if(this.#D(),!nO(o))throw new TypeError("Invalid Feishu group response mode");return this.#G(()=>this.#R(A,async()=>{let a=this.#L(A);if(o==="all"&&a.groupMessagePermissionGranted!==!0){let i=new Error("Authorize im:message.group_msg before enabling all group messages");throw i.code="group_message_permission_required",i}let e=await this.#a.saveBot({...a,groupResponseMode:o});return this.#c.get(A)?.setGroupResponseMode?.(e.groupResponseMode),this.#F(),this.status(A)}))}async updateMentionTopicReply(A,o){if(this.#D(),typeof o!="boolean")throw new TypeError("Invalid Feishu mention topic reply flag");return this.#G(()=>this.#R(A,async()=>{let a=this.#L(A),e=await this.#a.saveBot({...a,mentionTopicReply:o});return this.#c.get(A)?.setMentionTopicReply?.(e.mentionTopicReply),this.#F(),this.status(A)}))}async updateSlashPanel(A,o){if(this.#D(),!pO(o))throw new TypeError("Invalid Feishu slash panel config");return this.#G(()=>this.#R(A,async()=>{let a=this.#L(A),e=await this.#a.saveBot({...a,slashPanel:o});return this.#c.get(A)?.setSlashPanel?.(e.slashPanel),this.#F(),this.status(A)}))}async updateStepPush(A,o){if(this.#D(),typeof o!="boolean")throw new TypeError("Invalid Feishu step push flag");return this.#G(()=>this.#R(A,async()=>{let a=this.#L(A),e=await this.#a.saveBot({...a,stepPush:o});return this.#c.get(A)?.setStepPush?.(e.stepPush),this.#F(),this.status(A)}))}async updateStepPushMode(A,o){if(this.#D(),!Zb(o))throw new TypeError("Invalid Feishu step push mode");return this.#G(()=>this.#R(A,async()=>{let a=this.#L(A),e=await this.#a.saveBot({...a,stepPushMode:o});return this.#c.get(A)?.setStepPushMode?.(e.stepPushMode),this.#F(),this.status(A)}))}async updateStepCardPanels(A,o){if(this.#D(),!Vb(o))throw new TypeError("Invalid Feishu step card panels");return this.#G(()=>this.#R(A,async()=>{let a=this.#L(A),e=await this.#a.saveBot({...a,stepCardPanels:o});return this.#c.get(A)?.setStepCardPanels?.(e.stepCardPanels),this.#F(),this.status(A)}))}async updateVoice(A,o){if(this.#D(),o!==null&&(typeof o!="object"||Array.isArray(o)))throw new TypeError("Invalid Feishu voice configuration");let a=cc(o);return this.#G(()=>this.#R(A,async()=>{let e=this.#L(A),i=await this.#a.saveBot({...e,voice:a}),t=a?await de("credential.read",()=>this.#r.resolve(a.secretRef),"credential-store").catch(()=>null):null;return this.#c.get(A)?.setVoice?.({config:a,secret:t?.value??null}),this.#F(),this.status(A)}))}async deleteBot(A){return this.#D(),this.#G(()=>this.#R(A,async()=>(this.#L(A),await this.#m(A),this.#F(),this.status())))}async reconnect(){let A=this.#a.list()[0];return A?this.reconnectBot(A.id):this.status()}async disconnect(){let A=this.#a.list()[0];return A?this.deleteBot(A.id):this.status()}async close(){if(this.#Q)return;this.#Q=!0,this.#I.close();let A=[];for(let o of this.#s.values()){let a=o.manager.status().state;xre.has(o.operation)&&a==="saving"?(o.manager.cancel(),o.processing&&A.push(o.processing)):bO.has(a)&&(o.cancelled=!0,o.manager.cancel())}await this.#u,await Promise.allSettled([...this.#E.values()]),await Promise.allSettled([...this.#c.keys()].map(o=>this.#w(o))),await Promise.allSettled(A),await this.#u,await Promise.allSettled([...this.#E.values()]),await Promise.allSettled([...this.#c.keys()].map(o=>this.#w(o)))}#y({registration:A,selectedBotId:o}={}){let a=this.#a.list().map(l=>{let d=og(this.#c.get(l.id)),u=hl(d),B=og(this.#c.get(l.id)).error??this.#d.get(l.id)??null;return{botId:l.id,phase:ZJe({connected:u,error:B,connection:d}),connected:u,configured:!0,groupResponseMode:Hn(l.groupResponseMode),mentionTopicReply:l.mentionTopicReply!==!1,stepPush:l.stepPush===!0,stepPushMode:hn(l.stepPushMode),stepCardPanels:So(l.stepCardPanels),voice:cc(l.voice),slashPanel:Kn(l.slashPanel),groupMessagePermissionGranted:l.groupMessagePermissionGranted===!0,bot:VJe(l),connection:d,lastMessageError:Kr(d.lastMessageError),error:B}}),e=A?this.#O(A):{state:"idle",attempt:0,updatedAt:Date.now()},i=ux.has(e.state),t=e.state==="saving",r=!!A&&(i||t),s=a.find(l=>l.botId===o)??(r?null:a[0]??null),c=a.some(l=>l.connected),g=s?.phase??"unconfigured";return i?g="registering":t?g="connecting":e.state==="error"&&!s&&(g="error"),{schemaVersion:2,revision:this.#C,phase:g,connected:s?.connected??!1,configured:a.length>0,bot:s?.bot??null,connection:s?.connection??qre(),error:s?.error??e.error??null,registration:e,bots:a,totals:{configured:a.length,connected:a.filter(l=>l.connected).length},anyConnected:c}}#O(A){let o=A.manager.status();return{...o,attempt:A.id,...A.botId?{botId:A.botId}:{},...A.operation?{operation:A.operation}:{},...A.stage?{stage:A.stage}:{},...o.state==="error"&&A.publicError?{error:{...A.publicError}}:{}}}async#b(A,o){let a=o.client_id,e=o.client_secret,i=MO(o.user_info?.open_id),t=o.user_info?.tenant_brand,r=A.target;if(A.cancelled)throw this.#M(A,"abort","Group message permission update was cancelled before local activation.");if(a!==r.appId)throw this.#M(A,"repair_app_mismatch","Feishu returned credentials for a different app.");if(!i)throw this.#M(A,"repair_owner_missing","Feishu returned no permission operator identity.");if(t!==void 0&&t!==r.domain)throw this.#M(A,"repair_domain_mismatch","Feishu returned credentials for a different account domain.");if(!r.ownerOpenIds.includes(Kre)&&!r.ownerOpenIds.includes(i))throw this.#M(A,"repair_owner_mismatch","The Feishu permission operator is not an owner of this configured bot.");A.stage="verifying_identity";let s;try{s=await this.#A({appId:a,appSecret:e,domain:r.domain})}catch(c){throw this.#M(A,"repair_credentials_invalid","Feishu could not verify the updated app credentials.",c)}if(r.botOpenId&&s?.openId!==r.botOpenId)throw this.#M(A,"repair_bot_mismatch","The updated Feishu app belongs to a different bot identity.");await this.#G(()=>this.#R(A.botId,async()=>{let c=this.#a.getBot(A.botId);if(!c||c.deletionPending||OO(c)!==A.targetFingerprint)throw this.#M(A,"repair_target_changed","The Feishu bot changed while its permission update was in progress.");let g;try{g=await de("credential.read",()=>this.#r.resolve(c.secretRef),"credential-store")}catch(d){throw this.#M(A,"credential_update_failed","Unable to read the current Feishu credential.",d)}if(g?.value!==e){A.stage="persisting_secret";try{await de("credential.save",()=>this.#r.set(c.secretRef,e),"credential-store")}catch(u){if((await de("credential.read",()=>this.#r.resolve(c.secretRef),"credential-store").catch(()=>null))?.value!==e)throw this.#M(A,"credential_update_failed","Unable to store the updated Feishu credential.",u)}if((await de("credential.read",()=>this.#r.resolve(c.secretRef),"credential-store").catch(()=>null))?.value!==e)throw this.#M(A,"credential_state_unknown","The updated Feishu credential could not be confirmed after writing.")}A.stage="enabling_all_messages";let l;try{l=await this.#a.saveBot({...c,groupMessagePermissionGranted:!0,groupResponseMode:"all"})}catch(d){throw this.#M(A,"group_message_permission_save_failed","The permission was accepted, but all-message mode could not be saved.",d)}A.stage="restarting";try{await this.#T(l,e)}catch(d){throw this.#d.set(A.botId,this.#e.report(d,{reuse:!0,botId:A.botId,stage:"connection.start",publicError:{code:"connection_failed",message:"\u7FA4\u6D88\u606F\u6743\u9650\u5DF2\u5F00\u901A\uFF0C\u4F46\u673A\u5668\u4EBA\u957F\u8FDE\u63A5\u672A\u5C31\u7EEA\uFF0C\u8BF7\u70B9\u51FB\u91CD\u8BD5\u3002"}}).publicError),this.#F(),this.#M(A,"group_message_permission_connection_failed","The permission was accepted, but the Feishu runtime could not restart.",d)}this.#d.delete(A.botId),A.stage="verified",A.publicError=null,this.#F()}))}async#_(A,o){let a=o.client_id,e=o.client_secret,i=MO(o.user_info?.open_id),t=o.user_info?.tenant_brand,r=A.target;if(A.cancelled)throw this.#M(A,"abort","Callback repair was cancelled before local activation.");if(a!==r.appId)throw this.#M(A,"repair_app_mismatch","Feishu returned credentials for a different app.");if(!i)throw this.#M(A,"repair_owner_missing","Feishu returned no repair operator identity.");if(t!==void 0&&t!==r.domain)throw this.#M(A,"repair_domain_mismatch","Feishu returned credentials for a different account domain.");A.stage="verifying_identity";let s;try{s=await this.#A({appId:a,appSecret:e,domain:r.domain})}catch(g){throw this.#M(A,"repair_credentials_invalid","Feishu could not verify the repaired app credentials.",g)}if(r.botOpenId&&s?.openId!==r.botOpenId)throw this.#M(A,"repair_bot_mismatch","The repaired Feishu app belongs to a different bot identity.");let c=await this.#G(()=>this.#R(A.botId,async()=>{let g=this.#a.getBot(A.botId);if(!g||g.deletionPending||OO(g)!==A.targetFingerprint)throw this.#M(A,"repair_target_changed","The Feishu bot changed while its callback repair was in progress.");let l;try{l=await de("credential.read",()=>this.#r.resolve(g.secretRef),"credential-store")}catch(B){throw this.#M(A,"credential_update_failed","Unable to read the current Feishu credential.",B)}if(l?.value!==e){A.stage="persisting_secret";try{await de("credential.save",()=>this.#r.set(g.secretRef,e),"credential-store")}catch(y){if((await de("credential.read",()=>this.#r.resolve(g.secretRef),"credential-store").catch(()=>null))?.value!==e)throw this.#M(A,"credential_update_failed","Unable to store the repaired Feishu credential.",y)}if((await de("credential.read",()=>this.#r.resolve(g.secretRef),"credential-store").catch(()=>null))?.value!==e)throw this.#M(A,"credential_state_unknown","The repaired Feishu credential could not be confirmed after writing.")}let u;A.stage="restarting";try{await this.#T(g,e),u=this.#c.get(A.botId)}catch(B){throw this.#d.set(A.botId,this.#e.report(B,{reuse:!0,botId:A.botId,publicError:{code:"connection_failed",message:"\u673A\u5668\u4EBA\u56DE\u8C03\u4FEE\u590D\u5DF2\u4FDD\u5B58\uFF0C\u4F46\u957F\u8FDE\u63A5\u672A\u5C31\u7EEA\uFF0C\u8BF7\u70B9\u51FB\u91CD\u8BD5\u3002"}}).publicError),this.#F(),this.#M(A,"repair_connection_failed","The repaired Feishu runtime could not be started.",B)}if(!u)throw this.#M(A,"repair_connection_failed","The repaired Feishu runtime is unavailable.");return this.#d.delete(A.botId),this.#F(),u}));if(typeof c.beginCardActionProbe!="function")throw this.#M(A,"card_action_probe_unavailable","The Feishu runtime cannot verify card callbacks.");A.stage="awaiting_callback";try{if((await c.beginCardActionProbe({expectedOperatorOpenId:A.initiator.actorOpenId??i,timeoutMs:this.#f,...A.initiator.chatId?{chatId:A.initiator.chatId}:{}}))?.verified!==!0){let l=new Error("Feishu runtime returned no callback proof");throw l.code="card_action_probe_failed",l}}catch(g){let l=g?.code==="card_action_probe_timeout"?"card_action_probe_timeout":g?.code==="card_action_probe_unavailable"?"card_action_probe_unavailable":g?.code==="card_action_probe_send_failed"?"card_action_probe_send_failed":"card_action_probe_failed";throw this.#M(A,l,l==="card_action_probe_timeout"?"Timed out waiting for the Feishu callback verification button.":"The Feishu card callback probe failed.",g)}A.stage="verified",A.publicError=null,this.#F()}#M(A,o,a,e){A.publicError={code:o,message:a};let i=new Error(a,e?{cause:e}:void 0);return i.code=o,i}async#S(A,o){if(A.cancelled)throw new Error("Registration was cancelled");let a=o.client_id,e=o.client_secret,i=o.user_info?.open_id,t=o.user_info?.tenant_brand==="lark"?"lark":"feishu";if(!i)throw new Error("Feishu registration returned no owner open_id");let r=await this.#A({appId:a,appSecret:e,domain:t});if(A.cancelled)throw new Error("Registration was cancelled");let s=this.#a.list().find(y=>y.appId===a),c=s?.id??this.#o();if(typeof c!="string"||!/^[A-Za-z0-9_-]{1,128}$/.test(c)||!s&&this.#a.getBot(c))throw new Error("Bot id generator returned an invalid or duplicate id");let g=s?.secretRef??Yre(c),l=this.#p.get(c),d=await de("credential.read",()=>this.#r.resolve(g),"credential-store").catch(()=>{});await de("credential.save",()=>this.#r.set(g,e),"credential-store");let u;try{u=await this.#a.saveBot({...s,id:c,appId:a,secretRef:g,ownerOpenIds:[...new Set([...s?.ownerOpenIds??[],i])],domain:t,botName:r.name,botOpenId:r.openId,activated:r.activated,stepPush:s?.stepPush??!0,stepPushMode:s?.stepPushMode??jH,deletionPending:!1,connectedAt:new Date().toISOString(),createdAt:s?.createdAt??new Date().toISOString()}),A.botId=c,A.createdNew=!s,this.#p.set(c,A.id)}catch(y){try{await this.#P(g,d)}catch(Q){throw new Error("Unable to restore the Feishu credential after a config failure.",{cause:Q})}throw y}if(A.cancelled)throw A.createdNew?await this.#R(c,()=>this.#m(c)):(await this.#a.saveBot(s),await this.#P(g,d),l?this.#p.set(c,l):this.#p.delete(c)),new Error("Registration was cancelled");let B=!1;try{if(await this.#R(c,()=>this.#T(u,e)),A.cancelled)throw A.createdNew?await this.#R(c,()=>this.#m(c)):(await this.#a.saveBot(s),await this.#P(g,d),l?this.#p.set(c,l):this.#p.delete(c),d?.value&&!s.deletionPending?await this.#R(c,()=>this.#T(s,d.value)):await this.#R(c,()=>this.#w(c))),B=!0,new Error("Registration was cancelled");this.#d.delete(c),this.#F()}catch(y){if(A.cancelled)throw!B&&A.createdNew&&this.#a.getBot(c)?await this.#R(c,()=>this.#m(c)):!B&&s&&(await this.#a.saveBot(s),await this.#P(g,d),l?this.#p.set(c,l):this.#p.delete(c),!this.#Q&&d?.value&&!s.deletionPending?await this.#R(c,()=>this.#T(s,d.value)):await this.#R(c,()=>this.#w(c))),this.#F(),y;if(s&&d?.value)try{throw await this.#a.saveBot(s),await this.#P(g,d),l?this.#p.set(c,l):this.#p.delete(c),s.deletionPending?(await this.#R(c,()=>this.#w(c)),this.#d.set(c,this.#e.report(y,{reuse:!0,botId:c,publicError:{code:"deletion_pending",message:"\u673A\u5668\u4EBA\u6B63\u5728\u7B49\u5F85\u5B8C\u6210\u672C\u5730\u5220\u9664\uFF0C\u8BF7\u91CD\u8BD5\u79FB\u9664\u3002"}}).publicError)):(await this.#R(c,()=>this.#T(s,d.value)),this.#d.delete(c)),this.#F(),y}catch(Q){throw Q===y?y:(this.#d.set(c,this.#e.report(Q,{reuse:!0,botId:c,publicError:{code:"connection_failed",message:"\u673A\u5668\u4EBA\u8FDE\u63A5\u66F4\u65B0\u5931\u8D25\uFF0C\u4E14\u539F\u8FDE\u63A5\u65E0\u6CD5\u6062\u590D\uFF0C\u8BF7\u91CD\u8BD5\u3002"}}).publicError),this.#F(),new Error("Unable to restore the previous Feishu bot connection.",{cause:Q}))}throw this.#d.set(c,this.#e.report(y,{reuse:!0,botId:c,publicError:{code:"connection_failed",message:"\u673A\u5668\u4EBA\u5DF2\u7ECF\u521B\u5EFA\uFF0C\u4F46\u957F\u8FDE\u63A5\u672A\u5C31\u7EEA\uFF0C\u8BF7\u70B9\u51FB\u91CD\u8BD5\u3002"}}).publicError),this.#F(),y}}async#T(A,o){await this.#w(A.id);let a;a=await de("runtime.prepare",()=>this.#l({botId:A.id,config:A,appSecret:o,repair:this.#v(A.id),acceptExternal:async(e,{signal:i}={})=>{let t=()=>{if(this.#D("capability-unavailable"),i?.throwIfAborted(),this.#c.get(A.id)!==a)throw Object.assign(new Error("consumer-unavailable"),{code:"consumer-unavailable"});let c=this.#L(A.id);if(c.consumerMode!=="external-consumer"||jre(c)!==jre(A))throw Object.assign(new Error("account-changed"),{code:"account-changed"});return c},r=await this.#R(A.id,async()=>{let c=t(),g=await this.#B(c);return t(),Gb(e,{botId:c.id,appId:c.appId,botOpenId:c.botOpenId,fingerprint:g.fingerprint})});if(t(),r===null)return{accepted:!0,ignored:!0};let s=await this.#I.accept(A.id,r,i);return t(),s}})),this.#c.set(A.id,a);try{await a.start()}catch(e){throw this.#c.get(A.id)===a&&this.#c.delete(A.id),await a.stop({preserveError:!0}).catch(()=>{}),e}}#v(A){let o=a=>{let e=this.#s.get(a);return e?.operation===my&&e.botId===A?e:null};return Object.freeze({start:({actorOpenId:a,chatId:e}={})=>this.startCallbackRepair(A,{actorOpenId:a,chatId:e}),status:({attemptId:a}={})=>o(a)?this.registrationStatus(a):null,cancel:async({attemptId:a}={})=>o(a)?this.cancelRegistration(a):this.status(A)})}async#w(A){let o=this.#c.get(A);this.#c.delete(A),o&&await o.stop()}async#m(A){let o=this.#a.getBot(A);if(o){this.#I.remove(A),o.deletionPending||(o=await this.#a.saveBot({...o,deletionPending:!0})),await this.#w(A);try{await de("credential.remove",()=>this.#r.unset(o.secretRef),"credential-store")}catch(a){throw this.#d.set(A,this.#e.report(a,{reuse:!0,botId:A,publicError:{code:"credential_removal_failed",message:"\u65E0\u6CD5\u5220\u9664\u673A\u5668\u4EBA\u51ED\u636E\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002"}}).publicError),new Error("Unable to remove the Feishu credential.",{cause:a})}try{await this.#n({botId:A,config:o})}catch(a){throw this.#d.set(A,this.#e.report(a,{reuse:!0,botId:A,publicError:{code:"state_cleanup_failed",message:"\u65E0\u6CD5\u5220\u9664\u673A\u5668\u4EBA\u7684\u672C\u5730\u4F1A\u8BDD\u6570\u636E\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002"}}).publicError),new Error("Unable to remove the Feishu bot session state.",{cause:a})}await this.#a.removeBot(A),this.#d.delete(A),this.#p.delete(A)}}async#P(A,o){o?.value?await de("credential.save",()=>this.#r.set(A,o.value),"credential-store"):await de("credential.remove",()=>this.#r.unset(A),"credential-store")}#L(A){let o=this.#a.getBot(A);if(!o)throw new Error("Unknown Feishu bot");return o}#D(A){if(this.#Q){let o=new Error("The Feishu controller is closed");throw A&&(o.code=A),o}}#G(A){let o=this.#u.then(A,A);return this.#u=o.then(()=>{},()=>{}),o}#R(A,o){let e=(this.#E.get(A)??Promise.resolve()).then(o,o),i=e.then(()=>{},()=>{});return this.#E.set(A,i),i.finally(()=>{this.#E.get(A)===i&&this.#E.delete(A)}),e}#N(){if(!(this.#s.size<=32))for(let[A,o]of this.#s){if(A===this.#h)continue;let a=o.manager.status().state;if(!ux.has(a)&&a!=="saving"&&this.#s.delete(A),this.#s.size<=32)break}}#F(){this.#C+=1}};var Aqe=["open.feishu.cn","open.larksuite.com"];function rqe(n,A){if(A==="*")return!0;let o=A.startsWith(".")?A.slice(1):A;return o?n===o||n.endsWith(`.${o}`):!1}function iqe(n){for(let A of["no_proxy","NO_PROXY"]){let o=n?.[A];if(typeof o!="string"||!o.trim())continue;let a=o.split(",").map(e=>e.trim().toLowerCase()).filter(Boolean);if(Aqe.some(e=>a.some(i=>rqe(e,i))))return!0}return!1}function aqe(n){if(!iqe(n))for(let A of["https_proxy","HTTPS_PROXY","http_proxy","HTTP_PROXY"]){let o=n?.[A];if(typeof o=="string"&&o.trim())return o.trim()}}function oqe(n,A=o=>new Wre.default(o)){let o=aqe(n);return o?A(o):void 0}function nqe(n){let A=wp(n.dshHome??process.env.DSH_HOME??hE(eqe(),".dsh")),o=wp(n.dataDir??hE(A,"integrations","dsh-feishu"));return{root:o,config:wp(n.configPath??hE(o,"config.json")),legacyState:wp(n.statePath??hE(o,"state.json")),bots:wp(n.botsDir??hE(o,"bots")),workspaces:wp(n.workspacesPath??hE(o,"workspaces.json"))}}async function Ex(n,A={},o={}){if(!n?.credentials)throw new TypeError("dsh-feishu requires ctx.credentials");let a=Jr(n,A,{competitiveApprovals:!0}),e=o.lark??TH,i=o.Controller??Sy,t=o.ConfigStore??QO,r=o.StateStore??aO,s=o.HarnessClient??BO,c=o.FeishuRuntime??fO,g=o.verifyFeishuApp??hAe,l=fe=>g({...fe,httpInstance:e.defaultHttpInstance}),d=o.createConnectionSupervisor??NH,u=typeof n.logger=="function"?n.logger("dsh-feishu"):n.logger??console,B=()=>si(n),y=nqe(A),Q=await new t(y.config).load(),{defaultWorkspace:m,ungroupedWorkspace:D}=await pa(A),M=o.WorkspaceStore??jr,O=o.workspaces??await new M(y.workspaces,{defaultWorkspace:m,ungroupedWorkspace:D}).load(),R=typeof Q.list=="function",F=()=>R?Q.list():[],v=F();R&&await O.reconcile(v.map(fe=>fe.id)),await Promise.all(v.map(fe=>O.ensure(fe.id,{defaultAgentPreset:A.agentPreset,initialAccessPolicy:WA("feishu",fe)})));let L=typeof Q.removeBot=="function"?di(Q,{workspaces:O,method:"removeBot",botIdFromRemoved:fe=>fe.id,saveMethod:"saveBot",botIdFromSave:fe=>fe?.id}):Q,H=new Map,G=fe=>!fe.id||!fe.secretRef||fe.secretRef===mO?y.legacyState:wp(y.bots,fe.id,"state.json"),k=async fe=>{let le=fe.id??"__legacy__",Ie=H.get(le);return Ie||(Ie=await new r(G(fe)).load(),H.set(le,Ie)),Ie},Y=async fe=>{let le=F().find(Ie=>Ie.id===fe);if(!le)throw new Error("Unknown Feishu bot");return k(le)},U=async fe=>{if(typeof O.listSessionSyncTargets!="function")return[];let le=[];for(let Ie of O.listSessionSyncTargets()){let Be;try{Be=await Y(Ie.botId)}catch{continue}if(Be?.snapshot?.().sessions?.[Ie.conversationKey]!==fe)continue;let tt=O.deliveryTargetFor(Ie.botId,Ie.targetId)?.route?.openId;tt&&le.push({openId:tt,botId:Ie.botId,targetId:Ie.targetId})}return le},_=Ei(n,o.commandExecutor),P=o.inboundTtl??qr(n,A),q=P?.service??P;fi(n,q,{workspaces:O,configStore:L,defaultWorkspace:m,botIdFrom:fe=>fe?.id});let{controlExecutor:Z,sessionMaintenanceExecutor:X,fileIngressExecutor:Ae}=Ci(n,{controlExecutor:o.controlExecutor,sessionMaintenanceExecutor:o.sessionMaintenanceExecutor,fileIngressExecutor:o.fileIngressExecutor,inboundTtlService:q}),W=new s({...a,workspace:m,ungroupedWorkspace:D,autostart:!1,dshBin:A.dshBin??"dsh",..._?{commandExecutor:_}:{},...Z?{controlExecutor:Z}:{},...X?{sessionMaintenanceExecutor:X}:{},...Ae?{fileIngressExecutor:Ae}:{},imageInputPolicy:()=>oi(A).get()}),ee=o.proxyEnv??process.env,ce=oqe(ee,o.createProxyAgent),me=fe=>li(W,fe),Se=new i({logger:u,registerApp:fe=>e.registerApp(fe),verifyApp:l,credentials:n.credentials,configStore:L,createRuntime:async({botId:fe,config:le,appSecret:Ie,repair:Be,acceptExternal:se})=>{let ue=await k(le),tt=fe??le.id??le.appId;await O.ensure(tt,{defaultAgentPreset:A.agentPreset,initialAccessPolicy:mw("feishu",le)});let it=pi(W,{botId:tt,workspaces:O,state:ue,agentPresetCatalog:B}),We=null;if(le.voice)try{let xe=await n.credentials.resolve(le.voice.secretRef);xe?.value&&(We={config:le.voice,secret:xe.value})}catch(xe){u.warn?.("[dsh-feishu-voice] \u8BED\u97F3\u51ED\u636E\u8BFB\u53D6\u5931\u8D25,\u8BED\u97F3\u5DF2\u7981\u7528:",xe?.message??String(xe))}return new c({lark:e,consumerMode:le.consumerMode,acceptExternal:se,botId:tt,repair:Be,appId:le.appId,appSecret:Ie,domain:le.domain,botOpenId:le.botOpenId,groupResponseMode:le.groupResponseMode,mentionTopicReply:le.mentionTopicReply,stepPush:le.stepPush,stepPushMode:le.stepPushMode,stepCardPanels:le.stepCardPanels,voice:We,sessionSyncTargetsFor:U,ownerOpenIds:le.ownerOpenIds??[le.ownerOpenId],harness:it.harness,state:it.state,contextEnhancement:{botId:tt,getSettings:()=>O.contextEnhancementFor(tt)},accessPolicy:Bi(O,tt,{channel:"feishu",config:le}),replyTimeoutMs:A.replyTimeoutMs??6e5,slashCommands:A.slashCommands!==!1,slashPanel:le.slashPanel,...ce?{wsAgent:ce}:{},logger:{error:(...xe)=>u.error?.(`[${fe??le.id}]`,...xe),warn:(...xe)=>u.warn?.(`[${fe??le.id}]`,...xe),info:(...xe)=>u.info?.(`[${fe??le.id}]`,...xe),debug:(...xe)=>u.debug?.(`[${fe??le.id}]`,...xe)}})},deleteState:async({botId:fe,config:le})=>{H.delete(fe);try{await tqe(G(le))}catch(Ie){if(Ie?.code!=="ENOENT")throw Ie}}}),Fe=hi(Se,{workspaces:O,stateFor:Y,agentPresetCatalog:B,modelCatalog:me,validateAccessPolicyForBot(fe,le){let Ie=Q.getBot(fe)?.botOpenId;if(Ie&&[le.direct,le.group].some(Be=>Be.mode==="allowlist"&&Be.allowlist.users.some(se=>se.id===Ie))){let Be=new TypeError(S("\u8FD9\u91CC\u9700\u8981\u586B\u5199\u7528\u6237\u7684 Open ID\uFF0C\u4E0D\u80FD\u586B\u5199\u673A\u5668\u4EBA\u81EA\u5DF1\u7684 Open ID\u3002"));throw Be.code="access-policy-invalid",Be}}}),ge=d({controller:Fe,harness:W,logger:u,retryDelaysMs:A.retryDelaysMs,healthyIntervalMs:A.healthyIntervalMs}).start();return{controller:Fe,deliveryAdapter:ui({channel:"feishu",workspaces:O,coreController:Se,stateFor:Y}),ready:ge.ready,async close(){await ge.close(),await Fe.close(),W.stopManagedProcess(),ce?.destroy?.()}}}import bqe from"qrcode";var EE=At(kO(),1);var mqe=At(kO(),1);var Sqe=Object.freeze({...bS,...DS,...wS,$locale:"en",\u4FEE\u6539\u522B\u540D:"Edit alias",\u5173\u95ED\u4FEE\u6539\u522B\u540D:"Close alias editor",\u539F\u540D\u79F0:"Original name",\u522B\u540D:"Alias",\u6062\u590D\u539F\u540D\u79F0:"Restore original name","\u4F8B\u5982\uFF1A\u5BA2\u670D\u52A9\u624B":"e.g. Customer support","\u4EC5\u66F4\u6539\u663E\u793A\u540D\u79F0\uFF0C\u7559\u7A7A\u5219\u663E\u793A\u539F\u540D\u79F0\u3002":"Only changes the display name. Leave blank to use the original name.","\u522B\u540D\u4FDD\u5B58\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5\u3002":"Could not save the alias. Try again.","\u522B\u540D\u4E0D\u80FD\u5305\u542B\u6362\u884C\u6216\u63A7\u5236\u5B57\u7B26\uFF0C\u4E14\u6700\u591A 80 \u4E2A\u5B57\u7B26\u3002":"Use at most 80 characters without line breaks or control characters.","\u8BF7\u8F93\u5165\u6709\u6548\u7684\u522B\u540D\uFF08\u6700\u591A 80 \u4E2A\u5B57\u7B26\uFF09\u3002":"Enter a valid alias (up to 80 characters)."," macOS Messages \u8FDE\u63A5":" macOS Messages connection","\u63A5\u5165 iMessage":"Connect iMessage","\u5148\u5728 macOS \u7CFB\u7EDF\u8BBE\u7F6E\u4E2D\u6388\u4E88 Messages \u6743\u9650\u3002":"Grant Messages permissions in macOS System Settings first.","\u914D\u7F6E macOS Messages \u6743\u9650":"Configure macOS Messages permissions",\u914D\u7F6E\u672C\u673A\u6743\u9650:"Configure local permissions","\u542F\u7528 macOS \u539F\u751F iMessage":"Enable native macOS iMessage","\u652F\u6301\u540C\u8D26\u53F7\u81EA\u804A\uFF1A\u5728 iPhone \u6216 Mac \u4E0A\u7ED9\u81EA\u5DF1\u5DF2\u767B\u5F55\u7684 iMessage \u90AE\u7BB1\u6216\u53F7\u7801\u53D1\u6307\u4EE4\u3002AI \u56DE\u590D\u4EE5 \u{1F916} DSH \u5F00\u5934\uFF0C\u4E0D\u4F1A\u518D\u6B21\u89E6\u53D1\u673A\u5668\u4EBA\u3002":"Self-chat is supported: send instructions from your iPhone or Mac to your signed-in iMessage email or phone number. AI replies start with \u{1F916} DSH and do not trigger the bot again.",\u68C0\u67E5\u6743\u9650\u5E76\u542F\u7528:"Check permissions and enable","DeepSeek Harness \u901A\u8FC7 macOS Messages.app \u6536\u53D1\u6587\u672C\u6D88\u606F\u3002\u9996\u6B21\u4F7F\u7528\u9700\u8981\u6388\u4E88\u4EE5\u4E0B\u6743\u9650\uFF1A":"DeepSeek Harness sends and receives messages through macOS Messages.app. The following permissions are required the first time:","\u2713 \u5B8C\u5168\u78C1\u76D8\u8BBF\u95EE\u6743\u9650\u5DF2\u6388\u4E88":"\u2713 Full Disk Access granted","1. \u6388\u4E88\u5B8C\u5168\u78C1\u76D8\u8BBF\u95EE\u6743\u9650":"1. Grant Full Disk Access","\u5728\u201C\u7CFB\u7EDF\u8BBE\u7F6E \u2192 \u9690\u79C1\u4E0E\u5B89\u5168\u6027 \u2192 \u5B8C\u5168\u78C1\u76D8\u8BBF\u95EE\u6743\u9650\u201D\u4E2D\uFF0C\u6253\u5F00\u8FD0\u884C DeepSeek Harness \u7684\u7EC8\u7AEF\u6216\u5E94\u7528\u3002":"In System Settings \u2192 Privacy & Security \u2192 Full Disk Access, enable the terminal or app running DeepSeek Harness.",\u6253\u5F00\u5B8C\u5168\u78C1\u76D8\u8BBF\u95EE\u6743\u9650\u8BBE\u7F6E:"Open Full Disk Access settings","\u2713 Messages \u81EA\u52A8\u5316\u6743\u9650\u5DF2\u6388\u4E88":"\u2713 Messages automation granted","2. \u5141\u8BB8\u81EA\u52A8\u5316\u63A7\u5236 Messages":"2. Allow automation control of Messages","\u5728\u201C\u7CFB\u7EDF\u8BBE\u7F6E \u2192 \u9690\u79C1\u4E0E\u5B89\u5168\u6027 \u2192 \u81EA\u52A8\u5316\u201D\u4E2D\uFF0C\u5141\u8BB8\u8FD0\u884C DeepSeek Harness \u7684\u5E94\u7528\u63A7\u5236 Messages\u3002":"In System Settings \u2192 Privacy & Security \u2192 Automation, allow the app running DeepSeek Harness to control Messages.",\u6253\u5F00\u81EA\u52A8\u5316\u8BBE\u7F6E:"Open Automation settings","\u6B63\u5728\u68C0\u67E5\u2026":"Checking\u2026","\u63A5\u5165 macOS \u539F\u751F iMessage":"Connect native macOS iMessage","\u65E0\u9700\u5B89\u88C5\u7B2C\u4E09\u65B9\u670D\u52A1\uFF1B\u8BF7\u6309\u6307\u5F15\u6388\u4E88 macOS Messages \u8BBF\u95EE\u6743\u9650\u3002":"No third-party service is required; follow the guide to grant macOS Messages access.","macOS Messages \u6743\u9650":"macOS Messages permissions",IM\u673A\u5668\u4EBA:"IM bots","\u6253\u5F00 IM\u673A\u5668\u4EBA":"Open IM bots",\u8FD4\u56DE\u63D2\u4EF6\u8BE6\u60C5:"Back to plugin details",IM\u673A\u5668\u4EBA\u8BBE\u7F6E:"IM bot settings","IM \u9762\u677F\u52A0\u8F7D\u5931\u8D25":"Could not load the IM panel",\u66F4\u591A\u673A\u5668\u4EBA\u8BBE\u7F6E:"More bot settings",\u66F4\u591A\u8BBE\u7F6E:"More settings",\u5411\u5DE6\u6EDA\u52A8\u8BBE\u7F6E\u9875\u7B7E:"Scroll settings tabs left",\u5411\u53F3\u6EDA\u52A8\u8BBE\u7F6E\u9875\u7B7E:"Scroll settings tabs right",\u5E38\u7528\u914D\u7F6E:"Common settings",\u673A\u5668\u4EBA\u8BBE\u7F6E:"Bot settings",\u673A\u5668\u4EBA\u8BBE\u7F6E\u9875\u7B7E:"Bot settings tabs",\u6295\u9012\u8BBE\u7F6E:"Delivery settings",\u8BBF\u95EE\u8BBE\u7F6E:"Access settings",\u67E5\u770B\u8BBF\u95EE\u6743\u9650\u8BF4\u660E:"View access permission details",\u5141\u8BB8\u6240\u6709\u7528\u6237:"Allow all users",\u4EC5\u767D\u540D\u5355\u7528\u6237:"Allowlisted users only",\u9ED8\u8BA4\u547D\u4EE4\u6743\u9650:"Default command permission",\u547D\u4EE4\u6743\u9650:"Command permission",\u53EF\u4EE5\u6267\u884C\u547D\u4EE4:"Can run commands",\u4E0D\u53EF\u4EE5\u6267\u884C\u547D\u4EE4:"Cannot run commands",\u767D\u540D\u5355\u7528\u6237:"Allowlisted users",\u67E5\u770B\u767D\u540D\u5355\u8BF4\u660E:"View allowlist details",\u547D\u4EE4\u6743\u9650\u4F8B\u5916:"Command permission exceptions","\u5F53\u524D\u6CA1\u6709\u767D\u540D\u5355\u7528\u6237\uFF0C\u4FDD\u5B58\u540E\u666E\u901A\u7528\u6237\u5C06\u65E0\u6CD5\u4F7F\u7528\u673A\u5668\u4EBA\u3002":"There are currently no allowlisted users. After saving, regular users will not be able to use the bot.",\u65B0\u589E\u7528\u6237:"Add user",\u5C1A\u672A\u6DFB\u52A0\u7528\u6237:"No users added",\u5F53\u524D\u6E20\u9053\u4E0D\u652F\u6301\u7FA4\u804A:"Group chat is not supported by this channel","\u539F\u6240\u6709\u8005\u6216\u626B\u7801\u63A5\u5165\u8005\u59CB\u7EC8\u53EF\u4EE5\u8BBF\u95EE\u5E76\u6267\u884C\u547D\u4EE4\uFF1B\u4EE5\u4E0B\u8BBE\u7F6E\u4EC5\u7EA6\u675F\u5176\u4ED6\u7528\u6237\u3002":"The original owner or QR-code operator can always access the bot and run commands; the settings below apply only to other users.","\u5DF2\u7531\u63A5\u5165\u6D41\u7A0B\u786E\u8BA4\u7684\u6240\u6709\u8005\u53EF\u4EE5\u8BBF\u95EE\u5E76\u6267\u884C\u547D\u4EE4\uFF0C\u4E0D\u53D7\u672C\u9875\u9650\u5236\u3002\u672A\u8BC6\u522B\u5230\u6240\u6709\u8005\u8EAB\u4EFD\u65F6\uFF0C\u6309\u672C\u9875\u8BBF\u95EE\u8BBE\u7F6E\u6267\u884C\u3002":"Owners confirmed during connection setup can access the bot and run commands regardless of these settings. When no owner has been identified, these access settings apply.","\u767D\u540D\u5355\u8BF7\u586B\u5199\u4F7F\u7528\u8005\u7684 Open ID\uFF0C\u4E0D\u662F\u673A\u5668\u4EBA\u7684 Open ID\u3002\u4EC5\u4FDD\u5B58\u901A\u914D\u7B26\u7684\u63A5\u5165\u914D\u7F6E\u4E0D\u5305\u542B\u6240\u6709\u8005\u8EAB\u4EFD\u3002":"Enter the user\u2019s Open ID in the allowlist, not the bot\u2019s Open ID. A connection configured with only a wildcard has no identified owner.","\u626B\u7801\u83B7\u5F97\u7684\u662F\u79C1\u804A\u8EAB\u4EFD\uFF0C\u7FA4\u804A\u53EA\u6709\u5339\u914D\u5DF2\u786E\u8BA4\u7684\u6240\u6709\u8005\u8EAB\u4EFD\u65F6\u624D\u8C41\u514D\uFF1B\u5176\u4ED6\u6210\u5458\u6309\u7FA4\u804A\u767D\u540D\u5355\u8BBE\u7F6E\u6267\u884C\u3002":"QR setup identifies the owner for direct messages. In groups, only a matching confirmed owner identity is exempt; other members follow the group allowlist settings.","\u586B\u5199\u4F7F\u7528\u8005\u7684 Open ID\uFF08ou_xxx\uFF09\uFF0C\u4E0D\u662F\u673A\u5668\u4EBA ID":"Enter the user\u2019s Open ID (ou_xxx), not the bot ID","\u8FD9\u91CC\u9700\u8981\u586B\u5199\u7528\u6237\u7684 Open ID\uFF0C\u4E0D\u80FD\u586B\u5199\u673A\u5668\u4EBA\u81EA\u5DF1\u7684 Open ID\u3002":"Enter a user Open ID here, not the bot\u2019s own Open ID.","\u6B64\u533A\u57DF\u65E0\u9700\u914D\u7F6E\uFF0C\u4FDD\u5B58\u79C1\u804A\u8BBE\u7F6E\u65F6\u4F1A\u4FDD\u7559\u73B0\u6709\u7FA4\u804A\u7B56\u7565\u3002":"No setup is needed here. Saving direct-message settings keeps the existing group policy.","\u8BBF\u95EE\u8BBE\u7F6E\u5DF2\u4FDD\u5B58\u3002":"Access settings saved.","\u8BBF\u95EE\u8BBE\u7F6E\u6682\u4E0D\u53EF\u7528\u3002":"Access settings are currently unavailable.","\u8BBF\u95EE\u8BBE\u7F6E\u4FDD\u5B58\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002":"Could not save access settings. Try again later.","\u670D\u52A1\u6CA1\u6709\u8FD4\u56DE\u5DF2\u4FDD\u5B58\u7684\u8BBF\u95EE\u7B56\u7565\uFF0C\u8BF7\u5237\u65B0\u540E\u91CD\u8BD5\u3002":"The service did not return the saved access policy. Refresh and try again.","\u8BBF\u95EE\u7B56\u7565\u5C1A\u672A\u5C31\u7EEA\uFF0C\u8BF7\u8FD4\u56DE\u673A\u5668\u4EBA\u5217\u8868\u5237\u65B0\u540E\u91CD\u8BD5\u3002":"The access policy is not ready. Return to the bot list, refresh, and try again.","\u5F53\u524D\u6E20\u9053\u6682\u4E0D\u652F\u6301\u8BBF\u95EE\u8BBE\u7F6E\u3002":"Access settings are not supported by this channel yet.","\u7528\u6237\u6807\u8BC6\u65E0\u6548\u3002":"The user ID is invalid.","\u7528\u6237\u6807\u8BC6\u5FC5\u987B\u662F\u5B57\u7B26\u4E32\u3002":"The user ID must be a string.","\u7528\u6237\u6807\u8BC6\u4E0D\u80FD\u4E3A\u7A7A\u3001\u5305\u542B\u63A7\u5236\u5B57\u7B26\u6216\u8D85\u8FC7 256 \u4E2A\u5B57\u7B26\u3002":"The user ID cannot be empty, contain control characters, or exceed 256 characters.","\u7528\u6237\u6761\u76EE\u5FC5\u987B\u5305\u542B\u7528\u6237\u6807\u8BC6\u548C\u547D\u4EE4\u6743\u9650\u3002":"Each user entry must include a user ID and command permission.","\u547D\u4EE4\u6743\u9650\u5FC5\u987B\u662F\u5E03\u5C14\u503C\u3002":"Command permission must be a boolean.","\u8BBF\u95EE\u6A21\u5F0F\u53EA\u80FD\u662F open \u6216 allowlist\u3002":"Access mode must be open or allowlist.","\u5F00\u653E\u6A21\u5F0F\u8BBE\u7F6E\u5FC5\u987B\u5B8C\u6574\u3002":"Open-mode settings must be complete.","\u5F00\u653E\u6A21\u5F0F\u9ED8\u8BA4\u547D\u4EE4\u6743\u9650\u5FC5\u987B\u662F\u5E03\u5C14\u503C\u3002":"The open-mode default command permission must be a boolean.","\u5F00\u653E\u6A21\u5F0F\u547D\u4EE4\u6743\u9650\u8986\u76D6\u7528\u6237\u5FC5\u987B\u662F\u6570\u7EC4\u3002":"Open-mode command permission overrides must be an array.","\u5F00\u653E\u6A21\u5F0F\u547D\u4EE4\u6743\u9650\u8986\u76D6\u7528\u6237\u4E0D\u80FD\u5305\u542B\u91CD\u590D\u7684\u7528\u6237\u6807\u8BC6\u3002":"Open-mode command permission overrides cannot contain duplicate user IDs.","\u767D\u540D\u5355\u6A21\u5F0F\u8BBE\u7F6E\u5FC5\u987B\u5B8C\u6574\u3002":"Allowlist-mode settings must be complete.","\u767D\u540D\u5355\u6A21\u5F0F\u7528\u6237\u5FC5\u987B\u662F\u6570\u7EC4\u3002":"Allowlist-mode users must be an array.","\u767D\u540D\u5355\u6A21\u5F0F\u7528\u6237\u4E0D\u80FD\u5305\u542B\u91CD\u590D\u7684\u7528\u6237\u6807\u8BC6\u3002":"Allowlist-mode users cannot contain duplicate user IDs.","\u8BBF\u95EE\u573A\u666F\u8BBE\u7F6E\u5FC5\u987B\u540C\u65F6\u5305\u542B\u6A21\u5F0F\u3001\u5F00\u653E\u6A21\u5F0F\u8BBE\u7F6E\u548C\u767D\u540D\u5355\u6A21\u5F0F\u8BBE\u7F6E\u3002":"Each access context must include its mode, open-mode settings, and allowlist-mode settings.","\u8BF7\u540C\u65F6\u63D0\u4EA4\u5B8C\u6574\u7684\u79C1\u804A\u548C\u7FA4\u804A\u8BBF\u95EE\u8BBE\u7F6E\u3002":"Submit complete direct-message and group access settings together.","\u586B\u5199\u5FAE\u4FE1\u7528\u6237 ID":"Enter a WeChat user ID","\u98DE\u4E66 Open ID":"Feishu Open ID","\u7FA4\u6210\u5458 Open ID":"Group member Open ID","\u9489\u9489\u7528\u6237 ID":"DingTalk user ID","\u586B\u5199 senderStaffId \u6216 senderId":"Enter senderStaffId or senderId","\u7FA4\u6210\u5458\u7528\u6237 ID":"Group member user ID","\u4F01\u4E1A\u5FAE\u4FE1\u7528\u6237 ID":"WeCom user ID","\u586B\u5199 userid":"Enter userid","\u586B\u5199 member_openid":"Enter member_openid","QQ User Open ID":"QQ User Open ID","\u7FA4\u6210\u5458 User ID":"Group member User ID","\u586B\u5199\u6570\u5B57 User ID":"Enter a numeric user ID","WhatsApp \u7535\u8BDD\u53F7\u7801\u6216 JID":"WhatsApp phone number or JID","\u7FA4\u6210\u5458\u7535\u8BDD\u53F7\u7801\u6216 JID":"Group member phone number or JID","8613800000000 \u6216\u5B8C\u6574 JID":"8613800000000 or a full JID","IM \u6E20\u9053":"IM channels","\u8BA9 DeepSeek Harness \u89E6\u624B\u53EF\u53CA":"Connecting DeepSeek Harness",\u5F53\u524D\u7248\u672C:"Current version","DSH-IM \u66F4\u65B0":"DSH-IM update",\u68C0\u67E5\u66F4\u65B0:"Check for updates","DSH \u7248\u672C\u517C\u5BB9\u8BF4\u660E":"DSH version compatibility","dsh-im 4.25.0 \u652F\u6301\u5230 DSH v0.1.6-alpha.2\u3002":"dsh-im 4.25.0 supports DSH up to v0.1.6-alpha.2.","dsh-im 4.39.0 \u4EC5\u652F\u6301 DSH 0.2.0-rc.2\u3002":"dsh-im 4.39.0 only supports DSH 0.2.0-rc.2.","dsh-im 5.0.0 \u4EC5\u652F\u6301 DSH 0.2.1-rc.2\u3002":"dsh-im 5.0.0 only supports DSH 0.2.1-rc.2.",\u91CD\u65B0\u68C0\u67E5:"Check again",\u5237\u65B0\u72B6\u6001:"Refresh status",\u624B\u5DE5\u66F4\u65B0:"Manual update",\u624B\u5DE5\u66F4\u65B0\u547D\u4EE4:"Manual update command",\u590D\u5236\u547D\u4EE4:"Copy command","\u590D\u5236\u4E2D\u2026":"Copying\u2026",\u5DF2\u590D\u5236:"Copied","\u547D\u4EE4\u5DF2\u590D\u5236\u3002":"Command copied.","\u590D\u5236\u5931\u8D25\uFF0C\u8BF7\u9009\u4E2D\u547D\u4EE4\u540E\u6309 Ctrl+C \u6216 \u2318C \u590D\u5236\u3002":"Copy failed. Select the command and press Ctrl+C or \u2318C to copy it.","\u81EA\u52A8\u66F4\u65B0\u5931\u8D25\u53EF\u4EE5\u4F7F\u7528\u547D\u4EE4\u66F4\u65B0\uFF1A":"If the automatic update fails, update with this command:","\u5C1A\u672A\u786E\u8BA4\u76EE\u6807\u7248\u672C\uFF0C\u6B64\u547D\u4EE4\u5B89\u88C5\u6267\u884C\u65F6 npm \u7684 latest \u7248\u672C\u3002":"No target version has been confirmed. This command installs the npm latest version available when you run it.","\u8BF7\u5728\u5F53\u524D Desktop \u7684\u5185\u7F6E\u7EC8\u7AEF\u6267\u884C\uFF0C\u5B8C\u6210\u540E\u624B\u52A8\u91CD\u542F\u3002":"Run this in the current Desktop\u2019s built-in terminal, then restart manually.","\u8BF7\u5728\u8FD0\u884C\u5F53\u524D Harness \u7684\u540C\u4E00\u73AF\u5883\u6267\u884C\uFF0C\u4FDD\u6301 DSH_HOME \u4E00\u81F4\uFF0C\u5B8C\u6210\u540E\u624B\u52A8\u91CD\u542F\u3002":"Run this in the same environment as the current Harness, with the same DSH_HOME, then restart manually.","\u8BF7\u7B49\u5F85\u5F53\u524D\u64CD\u4F5C\u7ED3\u675F\uFF0C\u786E\u8BA4\u6CA1\u6709\u5B89\u88C5\u8FDB\u7A0B\u8FD0\u884C\u540E\u518D\u6267\u884C\u547D\u4EE4\u3002":"Wait for the current operation to finish and confirm no installer is running before using this command.","\u6E90\u7801\u6216\u94FE\u63A5\u5B89\u88C5\u8BF7\u6309\u539F\u5B89\u88C5\u65B9\u5F0F\u66F4\u65B0\uFF0C\u4E0D\u63D0\u4F9B\u8986\u76D6\u6E90\u7801\u7684 npm \u547D\u4EE4\u3002":"Update source or linked installations using their original method. No npm command is provided to overwrite the source.","\u65E0\u6CD5\u5B89\u5168\u751F\u6210\u5F53\u524D profile \u7684\u547D\u4EE4\uFF0C\u8BF7\u5728\u7EC8\u7AEF\u4E2D\u624B\u52A8\u786E\u8BA4 profile \u540E\u66F4\u65B0\u3002":"A safe command cannot be generated for this profile. Confirm the profile in your terminal before updating manually.",\u66F4\u65B0\u81F3:"Update to",\u5B89\u88C5\u66F4\u65B0:"Install update","\u6B63\u5728\u66F4\u65B0\u2026":"Updating\u2026",\u5F85\u624B\u52A8\u91CD\u542F:"Restart needed",\u8FD0\u884C\u7248\u672C:"Running version",\u5DF2\u5B89\u88C5\u7248\u672C:"Installed version","\u76EE\u6807 profile":"Target profile",\u76EE\u6807\u7248\u672C:"Target version",\u6700\u65B0\u7248\u672C:"Latest version",\u4E0A\u6B21\u66F4\u65B0\u76EE\u6807:"Previous update target",\u65E0\u6CD5\u786E\u8BA4:"Unknown",\u53D1\u73B0\u65B0\u7248\u672C:"Update available",\u5DF2\u662F\u6700\u65B0\u7248\u672C:"Up to date",\u5F53\u524D\u7248\u672C\u65E0\u9700\u66F4\u65B0:"No newer version available","\u5DF2\u83B7\u53D6 npm \u6700\u65B0\u7248\u672C":"Latest npm version retrieved","\u68C0\u67E5 npm \u6700\u65B0\u7248\u672C\uFF0C\u4E0D\u4F1A\u81EA\u52A8\u5B89\u88C5\u3002":"Check the latest npm version. Nothing is installed automatically.","\u6B63\u5728\u4ECE npm \u68C0\u67E5\u6700\u65B0\u7248\u672C\u2026":"Checking npm for the latest version\u2026","\u6B63\u5728\u5B89\u88C5\uFF0C\u8BF7\u7A0D\u5019\u2026":"Installing, please wait\u2026","\u6B63\u5728\u6821\u9A8C\u5B89\u88C5\u7ED3\u679C\u2026":"Verifying the installation\u2026","\u5DF2\u5B89\u88C5\uFF0C\u5F85\u624B\u52A8\u91CD\u542F":"Installed \u2014 manual restart needed",\u66F4\u65B0\u5DF2\u751F\u6548:"Updated version is active",\u66F4\u65B0\u5931\u8D25:"Update failed",\u66F4\u65B0\u8BF7\u6C42\u5931\u8D25:"Update request failed",\u6682\u65F6\u65E0\u6CD5\u5B89\u88C5\u66F4\u65B0:"Update installation is unavailable","\u4EC5\u66F4\u65B0 DSH-IM\u3002\u5B89\u88C5\u5B8C\u6210\u540E\u9700\u624B\u52A8\u91CD\u542F\u540E\u53F0\uFF1B\u672C\u529F\u80FD\u4E0D\u4F1A\u81EA\u52A8\u91CD\u542F\u6216\u4E3B\u52A8\u5237\u65B0\u9875\u9762\u3002":"Only DSH-IM will be updated. Restart the backend manually after installation. This feature does not automatically restart it or initiate a page refresh.","\u5F53\u524D\u662F\u6E90\u7801\u6216\u94FE\u63A5\u5B89\u88C5\uFF0C\u53EA\u80FD\u68C0\u67E5\u7248\u672C\uFF1B\u8BF7\u624B\u52A8\u66F4\u65B0\u6E90\u7801\uFF0C\u6216\u8FC1\u79FB\u5230 npm \u5B89\u88C5\u3002":"This is a source or linked installation. You can check versions, but must update the source manually or migrate to an npm installation.","\u65E0\u6CD5\u786E\u8BA4\u5F53\u524D profile\uFF0C\u8BF7\u5728\u5BF9\u5E94\u7684 Harness \u73AF\u5883\u4E2D\u624B\u52A8\u66F4\u65B0\u3002":"The current profile could not be identified. Update manually in the corresponding Harness environment.","\u5F53\u524D\u8FD0\u884C\u73AF\u5883\u4E0D\u652F\u6301\u6309\u94AE\u5B89\u88C5\uFF0C\u8BF7\u624B\u52A8\u66F4\u65B0\u63D2\u4EF6\u3002":"This runtime cannot install through this button. Update the plugin manually.","\u5F53\u524D npm \u6E90\u914D\u7F6E\u4E0E\u5B98\u65B9\u6E90\u4E0D\u4E00\u81F4\uFF0C\u8BF7\u5148\u68C0\u67E5 registry \u914D\u7F6E\u3002":"The npm registry configuration differs from the official registry. Check your registry settings first.","\u5F53\u524D Host \u7684 Node.js \u7248\u672C\u4E0D\u6EE1\u8DB3\u65B0\u7248\u8981\u6C42\uFF0C\u8BF7\u5148\u66F4\u65B0\u8FD0\u884C\u73AF\u5883\u3002":"The Host Node.js version does not meet the new version\u2019s requirements. Update the runtime first.","\u65B0\u7248\u672C\u5DF2\u5B89\u88C5\uFF0C\u8BF7\u5728\u65B9\u4FBF\u65F6\u624B\u52A8\u91CD\u542F\u5F53\u524D Harness \u6216 Desktop\u3002":"The new version is installed. Manually restart this Harness or Desktop when convenient.","\u4E0A\u6B21\u5B89\u88C5\u7ED3\u679C\u65E0\u6CD5\u786E\u8BA4\uFF0C\u8BF7\u5148\u68C0\u67E5\u6B64 profile \u7684\u63D2\u4EF6\u5B89\u88C5\u72B6\u6001\u3002":"The previous installation result is uncertain. Check this profile\u2019s plugin installation first.","\u65E0\u6CD5\u8BBF\u95EE npm \u6216\u8BF7\u6C42\u8D85\u65F6\uFF0C\u8BF7\u7A0D\u540E\u91CD\u65B0\u68C0\u67E5\u3002":"npm is unreachable or the request timed out. Check again later.","npm \u8FD4\u56DE\u7684\u7248\u672C\u4FE1\u606F\u65E0\u6548\uFF0C\u6682\u65F6\u65E0\u6CD5\u66F4\u65B0\u3002":"npm returned invalid release information. Updating is unavailable.","\u7248\u672C\u786E\u8BA4\u5DF2\u8FC7\u671F\uFF0C\u8BF7\u91CD\u65B0\u68C0\u67E5\u540E\u518D\u5B89\u88C5\u3002":"The version confirmation expired. Check again before installing.","\u63D2\u4EF6\u5B89\u88C5\u72B6\u6001\u5DF2\u53D1\u751F\u53D8\u5316\uFF0C\u8BF7\u91CD\u65B0\u68C0\u67E5\u3002":"The plugin installation changed. Check again.","\u6B64 profile \u6B63\u5728\u66F4\u65B0\uFF0C\u8BF7\u7A0D\u540E\u67E5\u770B\u72B6\u6001\u3002":"This profile is already updating. Check its status shortly.","\u5B89\u88C5\u5931\u8D25\uFF0C\u8BF7\u68C0\u67E5\u5F53\u524D\u5B89\u88C5\u72B6\u6001\u540E\u91CD\u8BD5\u3002":"Installation failed. Check the current installation before retrying.","\u5B89\u88C5\u7ED3\u679C\u6821\u9A8C\u5931\u8D25\uFF0C\u8BF7\u624B\u52A8\u68C0\u67E5\u63D2\u4EF6\u7248\u672C\u3002":"Installation verification failed. Check the plugin version manually.","\u65E0\u6CD5\u5B89\u5168\u4FDD\u5B58\u66F4\u65B0\u72B6\u6001\uFF0C\u8BF7\u5148\u68C0\u67E5\u5F53\u524D\u5B89\u88C5\u7ED3\u679C\u3002":"Update state could not be saved safely. Check the current installation result before retrying.","\u4E0A\u6B21\u66F4\u65B0\u5DF2\u4E2D\u65AD\uFF0C\u8BF7\u68C0\u67E5\u5B89\u88C5\u72B6\u6001\u540E\u91CD\u8BD5\u3002":"The previous update was interrupted. Check the installation before retrying.","\u66F4\u65B0\u670D\u52A1\u5DF2\u5173\u95ED\uFF0C\u8BF7\u624B\u52A8\u91CD\u65B0\u6253\u5F00\u8BBE\u7F6E\u9875\u3002":"The update service has closed. Reopen settings manually.","\u66F4\u65B0\u8BF7\u6C42\u65E0\u6548\uFF0C\u8BF7\u91CD\u65B0\u68C0\u67E5\u7248\u672C\u3002":"The update request is invalid. Check the version again.","\u5F53\u524D\u63D2\u4EF6\u5B89\u88C5\u4E0D\u5B8C\u6574\u6216\u4E0E profile \u4E0D\u7B26\uFF0C\u8BF7\u624B\u52A8\u68C0\u67E5\u5B89\u88C5\u914D\u7F6E\u3002":"The plugin installation is incomplete or does not match this profile. Check the installation configuration manually.","\u65E0\u6CD5\u786E\u8BA4\u5F53\u524D npm \u6E90\u914D\u7F6E\uFF0C\u6682\u65F6\u4E0D\u80FD\u5B89\u88C5\u66F4\u65B0\u3002":"The npm registry configuration could not be verified. Installation is unavailable.","\u5B89\u88C5\u8D85\u65F6\uFF0C\u8BF7\u5148\u786E\u8BA4\u5F53\u524D\u5B89\u88C5\u72B6\u6001\uFF0C\u518D\u51B3\u5B9A\u662F\u5426\u91CD\u8BD5\u3002":"Installation timed out. Check the current installation before retrying.","\u66F4\u65B0\u8BF7\u6C42\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5\u3002":"The update request failed. Try again.","\u66F4\u65B0\u670D\u52A1\u8FD4\u56DE\u4E86\u65E0\u6CD5\u8BC6\u522B\u7684\u54CD\u5E94\u3002":"The update service returned an unrecognized response.","\u5F53\u524D Host \u4E0D\u652F\u6301\u66F4\u65B0\u63A5\u53E3\uFF0C\u8BF7\u5148\u624B\u52A8\u66F4\u65B0\u63D2\u4EF6\u5E76\u91CD\u542F\u3002":"This Host does not support the update API. Update the plugin manually and restart first.","\u5173\u95ED\u7A97\u53E3\u4E0D\u4F1A\u53D6\u6D88\u5B89\u88C5\u3002\u8BF7\u52FF\u540C\u65F6\u5728\u5176\u4ED6\u7A97\u53E3\u7BA1\u7406\u6B64 profile \u7684\u63D2\u4EF6\u3002":"Closing this window does not cancel installation. Do not manage this profile\u2019s plugins in another window at the same time.","\u9875\u9762\u7248\u672C\u4E0E\u8FD0\u884C\u7248\u672C\u4E0D\u540C\uFF0C\u8BF7\u624B\u52A8\u5237\u65B0\u9875\u9762\uFF1B\u82E5\u4ECD\u4E0D\u4E00\u81F4\uFF0C\u8BF7\u624B\u52A8\u91CD\u542F Harness \u6216 Desktop\u3002":"The page and running versions differ. Refresh the page manually; if they still differ, manually restart Harness or Desktop.","\u8BF7\u5728\u673A\u5668\u4EBA\u7A7A\u95F2\u65F6\u5B89\u88C5\uFF1B\u5B89\u88C5\u4F1A\u4FEE\u6539\u5F53\u524D profile \u7684\u4F9D\u8D56\uFF0C\u5B8C\u6210\u540E\u9700\u624B\u52A8\u91CD\u542F\u3002":"Install while bots are idle. This changes the current profile\u2019s dependencies and requires a manual restart afterward.","AI Office":"AI Office","\uFF08\u5B9E\u9A8C\u529F\u80FD\uFF09":"(Experimental)","AI Office \u8BBE\u7F6E":"AI Office settings","AI Office \u8BBE\u7F6E\u9875\u7F3A\u5C11 RPC \u8FDE\u63A5":"AI Office settings are missing an RPC connection","\u6B63\u5728\u8BFB\u53D6 AI Office Connector\u2026":"Loading AI Office Connector\u2026","\u672C\u673A\u4E3B\u52A8\u8FDE\u63A5\u516C\u7F51 Office\uFF1BHarness \u4E0D\u5F00\u653E\u7AEF\u53E3\u3002\u534F\u8BAE Hook \u56FA\u5B9A\u4E3A ":"This machine connects outward to the public Office; Harness exposes no port. Protocol hooks: ",\u5C1A\u672A\u914D\u7F6E:"Not configured","\u5DF2\u8FDE\u63A5 Office":"Connected to Office",\u5DF2\u914D\u7F6E:"Configured",\u7B49\u5F85\u91CD\u8FDE:"Waiting to reconnect",\u51ED\u636E\u7F3A\u5931:"Credential missing",\u6700\u8FD1\u5FC3\u8DF3:"Last heartbeat",\u6700\u8FD1\u4E8B\u4EF6:"Last event",\u91CD\u8FDE\u6B21\u6570:"Reconnects","\u8FD0\u884C Job":"Running Jobs","\u5B8C\u6210 Job":"Completed Jobs",\u5C1A\u65E0:"None yet",\u8BBE\u5907\u8FDE\u63A5:"Device connection","Token \u53EA\u5199\u5165\u672C\u673A\u51ED\u636E\u5B58\u50A8":"Token is written only to the local credential store","\u7C98\u8D34 Office \u4E00\u6B21\u6027\u51ED\u636E":"Paste the one-time Office credential","\u5DF2\u5B89\u5168\u4FDD\u5B58\uFF1B\u7559\u7A7A\u4FDD\u6301\u4E0D\u53D8":"Stored securely; leave blank to keep it",\u6700\u5927\u5E76\u53D1:"Max concurrency","Heartbeat \u79D2\u6570":"Heartbeat seconds","Workspace \u6620\u5C04":"Workspace mappings","\u6BCF\u884C alias=/\u672C\u673A/\u7EDD\u5BF9\u8DEF\u5F84\uFF1BOffice \u53EA\u80FD\u770B\u5230 alias\u3002":"One alias=/local/absolute/path per line; Office sees only aliases.","Instruction Preset \u6620\u5C04":"Instruction preset mappings","\u6BCF\u884C alias=\u6307\u4EE4\uFF1B\u65B0\u589E preset \u4E0D\u9700\u8981\u6539 Office \u4EE3\u7801\u3002":"One alias=instruction per line; new presets require no Office code change.",\u4FDD\u5B58\u5E76\u8FDE\u63A5:"Save and connect",\u6D4B\u8BD5\u8FDE\u63A5:"Test connection","\u6D4B\u8BD5\u4E2D\u2026":"Testing\u2026",\u91CD\u65B0\u8FDE\u63A5:"Reconnect",\u79FB\u9664\u8FDE\u63A5:"Remove connection","\u8FDE\u63A5\u6D4B\u8BD5\u901A\u8FC7\u3002":"Connection test passed.","\u914D\u7F6E\u5DF2\u4FDD\u5B58\u3002":"Configuration saved.","\u534F\u8BAE Hook \u9884\u89C8":"Protocol hook preview","\u7531 Base URL \u81EA\u52A8\u6D3E\u751F\uFF0C\u4E0D\u5355\u72EC\u586B\u5199":"Derived from Base URL; no separate input","Base URL \u65E0\u6548":"Invalid Base URL","Office Hook \u5C1A\u672A\u90E8\u7F72\u65F6\uFF0C\u914D\u7F6E\u4F1A\u5B89\u5168\u4FDD\u5B58\u5E76\u81EA\u52A8\u91CD\u8BD5\uFF1B\u51FA\u73B0 HTTP 404 \u4EE3\u8868\u534F\u8BAE\u7AEF\u70B9\u5F85\u4E0A\u7EBF\uFF0C\u4E0D\u4EE3\u8868 Harness \u6545\u969C\u3002":"Configuration is saved and retried while Office hooks are unavailable; HTTP 404 means the protocol endpoint is pending, not a Harness failure.","Workspace \u6620\u5C04\u6BCF\u884C\u5FC5\u987B\u4F7F\u7528 alias=value":"Each workspace mapping must use alias=value","Instruction Preset \u6620\u5C04\u6BCF\u884C\u5FC5\u987B\u4F7F\u7528 alias=value":"Each instruction preset mapping must use alias=value","action-items=\u8F6C\u6362\u4E3A\u8D1F\u8D23\u4EBA\u3001\u622A\u6B62\u548C\u9A8C\u6536\u660E\u786E\u7684\u5DE5\u5355":"action-items=Turn this into accountable tasks with deadlines and acceptance criteria","AI Office \u62D2\u7EDD\u4E86 Device Token\u3002":"AI Office rejected the Device Token.","AI Office Connector Hook \u5C1A\u672A\u5C31\u7EEA\u3002":"AI Office Connector hooks are not available yet.","AI Office Connector \u534F\u8BAE\u7248\u672C\u4E0D\u517C\u5BB9\u3002":"The AI Office Connector protocol is incompatible.","\u672C\u673A\u6682\u65F6\u65E0\u6CD5\u8BBF\u95EE AI Office\u3002":"AI Office cannot currently be reached from this machine.","AI Office \u8FDE\u63A5\u5DF2\u4E2D\u65AD\u3002":"The AI Office connection was interrupted.","\u5E2E\u52A9\u4E0E\u53CD\u9988 \xB7 \u524D\u5F80 GitHub":"Help & feedback \xB7 Open GitHub","\u8BF7\u6539\u7528 localhost \u91CD\u65B0\u6253\u5F00":"Reopen with localhost","\u9875\u9762\u4F1A\u5728\u5F53\u524D\u7AEF\u53E3\u91CD\u65B0\u6253\u5F00\uFF0C\u673A\u5668\u4EBA\u914D\u7F6E\u4E0D\u4F1A\u6539\u53D8\u3002":"The page will reopen on the current port. Your bot configuration will not change.","\u4F7F\u7528 localhost \u91CD\u65B0\u6253\u5F00":"Reopen with localhost","\u5F53\u524D\u5730\u5740\u4E0E\u6D4F\u89C8\u5668\u7684\u672C\u673A\u8BF7\u6C42\u6821\u9A8C\u4E0D\u517C\u5BB9\u3002\u8BF7\u4F7F\u7528\u4E0A\u65B9\u6309\u94AE\u6539\u7528 localhost \u91CD\u65B0\u6253\u5F00\u3002":"This address is incompatible with the browser\u2019s local-request checks. Use the button above to reopen with localhost.",\u5FAE\u4FE1:"WeChat",\u98DE\u4E66:"Feishu",\u9489\u9489:"DingTalk",\u4F01\u4E1A\u5FAE\u4FE1:"WeCom",\u5FAE\u4FE1\u673A\u5668\u4EBA:"WeChat bot",\u98DE\u4E66\u673A\u5668\u4EBA:"Feishu bot",\u9489\u9489\u673A\u5668\u4EBA:"DingTalk bot",\u4F01\u4E1A\u5FAE\u4FE1\u673A\u5668\u4EBA:"WeCom bot",QQ\u673A\u5668\u4EBA:"QQ bot",WhatsApp\u673A\u5668\u4EBA:"WhatsApp bot",WhatsApp\u8D26\u53F7:"WhatsApp account",\u5FAE\u4FE1\u8BBE\u7F6E:"WeChat settings",\u98DE\u4E66\u673A\u5668\u4EBA\u8BBE\u7F6E:"Feishu bot settings",\u7FA4\u804A\u54CD\u5E94\u65B9\u5F0F:"Group response mode","\u4EC5\u5728 @\u673A\u5668\u4EBA\u65F6\u54CD\u5E94\uFF08\u63A8\u8350\uFF09":"Only respond when @mentioned (recommended)",\u54CD\u5E94\u6240\u6709\u7FA4\u6D88\u606F:"Respond to all group messages","\u54CD\u5E94\u6240\u6709\u7FA4\u6D88\u606F\uFF08\u9700\u98DE\u4E66\u654F\u611F\u6743\u9650\uFF09":"Respond to all group messages (requires a sensitive Feishu scope)",\u91CD\u65B0\u6388\u6743:"Reauthorize",\u53BB\u6388\u6743:"Authorize",\u91CD\u65B0\u6388\u6743\u7FA4\u6D88\u606F\u6743\u9650:"Reauthorize group-message permission",\u6388\u6743\u7FA4\u6D88\u606F\u6743\u9650:"Authorize group-message permission","\u6B63\u5728\u51C6\u5907\u6388\u6743\u2026":"Preparing authorization\u2026","\u6B63\u5728\u51C6\u5907\u2026":"Preparing\u2026","\u79C1\u804A\u59CB\u7EC8\u54CD\u5E94\uFF1B\u7FA4\u804A\u4EC5\u5904\u7406\u660E\u786E @\u5F53\u524D\u673A\u5668\u4EBA\u7684\u6D88\u606F\u3002\u7FA4\u6D88\u606F\u6743\u9650\u5DF2\u5F00\u901A\uFF0C\u518D\u6B21\u5207\u6362\u65E0\u9700\u6388\u6743\u3002":"Direct messages always work; group chats require an explicit @mention of this bot. The group-message permission is already granted, so switching again needs no authorization.","\u79C1\u804A\u59CB\u7EC8\u54CD\u5E94\uFF1B\u7FA4\u804A\u4EC5\u5904\u7406\u660E\u786E @\u5F53\u524D\u673A\u5668\u4EBA\u7684\u6D88\u606F\u3002\u9009\u62E9\u5168\u90E8\u6D88\u606F\u540E\u4F1A\u6253\u5F00\u98DE\u4E66\u5B98\u65B9\u6388\u6743\u6D41\u7A0B\u3002":"Direct messages always work; group chats require an explicit @mention of this bot. Selecting all messages opens the official Feishu authorization flow.","\u5DF2\u5F00\u901A\u201C\u83B7\u53D6\u7FA4\u7EC4\u4E2D\u6240\u6709\u6D88\u606F\u201D\u6743\u9650\uFF08im:message.group_msg\uFF09\uFF1B\u673A\u5668\u4EBA\u4F1A\u5904\u7406\u7FA4\u804A\u4E2D\u7684\u6240\u6709\u53EF\u89C1\u6D88\u606F\u3002":"The \u201CRead all messages in associated group chat\u201D scope (im:message.group_msg) is granted; the bot processes every visible group message.","\u5C1A\u672A\u786E\u8BA4\u201C\u83B7\u53D6\u7FA4\u7EC4\u4E2D\u6240\u6709\u6D88\u606F\u201D\u6743\u9650\uFF0C\u8BF7\u5B8C\u6210\u98DE\u4E66\u6388\u6743\u3002":"The \u201CRead all messages in associated group chat\u201D scope has not been confirmed. Complete Feishu authorization.","\u79C1\u804A\u59CB\u7EC8\u54CD\u5E94\uFF1B\u7FA4\u804A\u4EC5\u5904\u7406\u660E\u786E @\u5F53\u524D\u673A\u5668\u4EBA\u7684\u6D88\u606F\u3002":"Direct messages always work; group chats require an explicit @mention of this bot.","\u9700\u5728\u98DE\u4E66\u4E3A\u8BE5\u673A\u5668\u4EBA\u5F00\u901A\u201C\u83B7\u53D6\u7FA4\u7EC4\u4E2D\u6240\u6709\u6D88\u606F\u201D\u6743\u9650\uFF08im:message.group_msg\uFF09\uFF1B\u5F00\u901A\u540E\uFF0C\u673A\u5668\u4EBA\u4F1A\u5904\u7406\u7FA4\u804A\u4E2D\u7684\u6240\u6709\u53EF\u89C1\u6D88\u606F\u3002":"Grant this bot the \u201CRead all messages in associated group chat\u201D Feishu scope (im:message.group_msg); once granted, it will process every visible group message.","\u7FA4\u804A\u54CD\u5E94\u65B9\u5F0F\u4FEE\u6539\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5\u3002":"Could not update the group response mode. Try again.","\u7FA4\u6D88\u606F\u6743\u9650\u6388\u6743\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5\u3002":"Could not authorize group-message permission. Try again.","\u88AB @ \u65F6\u4EE5\u8BDD\u9898\u65B9\u5F0F\u56DE\u590D":"Reply as a Feishu topic when mentioned","\u4EE5\u8BDD\u9898\u65B9\u5F0F\u56DE\u590D\u8BBE\u7F6E\u4FDD\u5B58\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5\u3002":"Could not save the topic reply setting. Try again.","\u5173\u95ED\uFF08\u5728\u4F1A\u8BDD\u4E3B\u7A97\u53E3\u56DE\u590D\uFF09":"Off (reply in the chat feed)","\u5F00\u542F\uFF08\u81EA\u52A8\u5F00\u542F\u72EC\u7ACB\u98DE\u4E66\u8BDD\u9898\uFF09":"On (auto-open a dedicated Feishu topic)","\u5F00\u542F\u540E\uFF0C\u5728\u7FA4\u804A\u6216\u79C1\u804A\u91CC @\u673A\u5668\u4EBA \u63D0\u95EE\uFF0C\u673A\u5668\u4EBA\u4F1A\u5728\u90A3\u6761\u6D88\u606F\u4E0B\u65B0\u5EFA\u4E00\u4E2A\u98DE\u4E66\u8BDD\u9898\u5E76\u5728\u8BDD\u9898\u5185\u56DE\u7B54\uFF1B\u8BE5\u8BDD\u9898\u662F\u4E00\u6761\u72EC\u7ACB\u4F1A\u8BDD\uFF0C\u8BDD\u9898\u91CC\u7684\u540E\u7EED\u6D88\u606F\u90FD\u5C5E\u4E8E\u540C\u4E00\u4E2A\u4F1A\u8BDD\u3002\u53EA\u53D1\u4E00\u4E2A @\u673A\u5668\u4EBA\uFF08\u6253\u5F00\u83DC\u5355\uFF09\u4E0D\u4F1A\u65B0\u5EFA\u8BDD\u9898\uFF0C\u6CA1\u6709 @\u673A\u5668\u4EBA \u7684\u6D88\u606F\u4E5F\u7559\u5728\u539F\u6765\u7684\u4F1A\u8BDD\u91CC\u3002":`When enabled, mentioning the bot in a group or a private chat opens a dedicated Feishu topic under that message and the answer stays inside it. That topic is an independent conversation in dsh, and later messages in the topic belong to the same conversation. A bare "@bot" (which opens the menu) opens no topic, and messages without a mention stay in the chat's own conversation.`,\u5206\u6B65\u76F4\u63A8:"Step push",\u6307\u4EE4\u9762\u677F:"Command panel","\u4E2A\u5931\u8D25\u3002":"failed.","\u4E2A\u673A\u5668\u4EBA\uFF0C":"bots,","\u4E2A\u673A\u5668\u4EBA\u3002":"bots.",\u5DF2\u540C\u6B65\u5230:"Copied to","\u8FD9\u4E2A\u6E20\u9053\u6CA1\u6709\u5176\u4ED6\u98DE\u4E66\u673A\u5668\u4EBA\uFF0C\u4E0D\u7528\u540C\u6B65\u3002":"This channel has no other Feishu bots to copy to.","\u6B63\u5728\u540C\u6B65\u2026":"Copying\u2026",\u786E\u8BA4\u540C\u6B65:"Copy to all","\u4E2A\u98DE\u4E66\u673A\u5668\u4EBA\uFF0C\u5B83\u4EEC\u5404\u81EA\u7684\u9762\u677F\u8BBE\u7F6E\u4F1A\u88AB\u8986\u76D6\u3002":"other Feishu bots, overwriting their own panel settings.",\u5C06\u628A\u8FD9\u5957\u9762\u677F\u8BBE\u7F6E\u5199\u5165\u53E6\u5916:"This copies the panel to",\u4FDD\u5B58\u5E76\u540C\u6B65\u5230\u5176\u4ED6\u673A\u5668\u4EBA:"Save and copy to the other bots",\u6307\u4EE4\u9762\u677F\u8BBE\u7F6E:"Command panel settings",\u6307\u4EE4\u9762\u677F\u6A21\u5F0F:"Command panel mode","\u9762\u677F\u53EA\u51B3\u5B9A\u804A\u5929\u8F93\u5165\u6846\u91CC\u6253\u300C/\u300D\u65F6\u5217\u51FA\u7684\u6307\u4EE4\u548C\u987A\u5E8F\uFF1B\u88AB\u79FB\u9664\u7684\u6307\u4EE4\u4ECD\u53EF\u624B\u52A8\u8F93\u5165\uFF0C\u529F\u80FD\u4E0D\u53D7\u5F71\u54CD\u3002\u540C\u6B65\u7531\u673A\u5668\u4EBA\u540E\u53F0\u5B8C\u6210\uFF0C\u6307\u4EE4\u8F83\u591A\u65F6\u9700\u8981\u4E00\u70B9\u65F6\u95F4\u3002":'The panel only decides which commands the "/" list in the chat input offers, and in which order. A removed command can still be typed by hand and keeps working. The bot syncs the panel in the background; many commands take a moment.',"\u8DDF\u968F\u9ED8\u8BA4\uFF08\u968F\u63D2\u4EF6\u7248\u672C\u66F4\u65B0\uFF09":"Follow the default (updated with the plugin)","\u81EA\u5B9A\u4E49\uFF08\u81EA\u5DF1\u6311\u6307\u4EE4\u548C\u987A\u5E8F\uFF09":"Custom (choose the commands and their order)","\u5F53\u524D\u6CA1\u6709\u9009\u62E9\u4EFB\u4F55\u6307\u4EE4\uFF0C\u4FDD\u5B58\u540E\u300C/\u300D\u9762\u677F\u4F1A\u53D8\u6210\u7A7A\u7684\u3002":'No commands are selected; saving leaves the "/" panel empty.',\u6DFB\u52A0\u6307\u4EE4:"Add command",\u9009\u62E9\u8981\u52A0\u5165\u7684\u6307\u4EE4:"Choose a command to add",\u6307\u4EE4\u90FD\u5DF2\u52A0\u5165:"Every command is already listed",\u52A0\u5165:"Add",\u6062\u590D\u5168\u90E8:"Restore all",\u5168\u90E8\u79FB\u9664:"Remove all",\u79FB\u9664:"Remove",\u4E0A\u79FB:"Move up",\u4E0B\u79FB:"Move down",\u4FDD\u5B58:"Save","\u5DF2\u4FDD\u5B58\uFF0C\u9762\u677F\u7A0D\u540E\u540C\u6B65":"Saved; the panel syncs shortly","\u8BF7\u9009\u62E9\u9762\u677F\u8981\u663E\u793A\u7684\u6307\u4EE4\u4E0E\u987A\u5E8F\u3002":"Choose which commands the panel shows, and in what order.","\u98DE\u4E66\u6307\u4EE4\u9762\u677F\u8BBE\u7F6E\u6682\u4E0D\u53EF\u7528\u3002":"The Feishu command panel settings are unavailable right now.",\u67E5\u770B\u5206\u6B65\u76F4\u63A8\u8BF4\u660E:"View step push help",\u5F00\u542F\u540E\u9010\u6B65\u63A8\u9001\u5DE5\u5177\u8C03\u7528\u4E0E\u8FC7\u7A0B\u8BF4\u660E:"Push tool calls and process notes step by step",\u4EFB\u52A1\u8FC7\u7A0B\u5C55\u793A:"Task progress display","\u8BBE\u7F6E\u4EFB\u52A1\u6267\u884C\u8FC7\u7A0B\u7684\u5448\u73B0\u65B9\u5F0F\uFF1A\u4E0D\u663E\u793A\u3001\u539F\u751F\u76F4\u64AD\u3001\u5B9E\u65F6\u5361\u7247\u6216\u9010\u6B65\u6D88\u606F":"Choose how execution is presented: hidden, native live process, one live card, or step-by-step messages","\u4E0D\u663E\u793A\u8FC7\u7A0B\uFF08\u53EA\u53D1\u9001\u6700\u7EC8\u7B54\u6848\uFF09":"Hide the process (send the final answer only)","\u5B9E\u65F6\u76F4\u64AD\uFF08\u98DE\u4E66\u539F\u751F\u601D\u8003\u8FC7\u7A0B\uFF09":"Live process (native Feishu thinking process)","\u5B9E\u65F6\u8FC7\u7A0B\u5361\uFF08\u5168\u7A0B\u4E00\u5F20\u5361\u7247\u52A8\u6001\u66F4\u65B0\uFF09":"Live process card (one card updated throughout)","\u9010\u6B65\u76F4\u64AD\uFF08\u6BCF\u4E00\u6B65\u5355\u72EC\u53D1\u4E00\u6761\u6D88\u606F\uFF09":"Step-by-step feed (one message per step)","\u9002\u5408\u65E5\u5E38\u95EE\u7B54\uFF1A\u6267\u884C\u8FC7\u7A0B\u4E2D\u4E0D\u663E\u793A\u5DE5\u5177\u8C03\u7528\u7B49\u4E2D\u95F4\u6B65\u9AA4\uFF0C\u53EA\u56DE\u590D\u6700\u7EC8\u7ED3\u679C":"For everyday Q&A: tool calls and other interim steps stay hidden, only the final result is replied","\u4F7F\u7528\u98DE\u4E66\u539F\u751F\u601D\u8003\u8FC7\u7A0B\u5C55\u793A\u63A8\u7406\u3001\u5DE5\u5177\u8C03\u7528\u4E0E\u7ED3\u679C\uFF0C\u6700\u7EC8\u7B54\u6848\u5355\u72EC\u53D1\u9001":"Use Feishu\u2019s native thinking process for reasoning, tool calls, and results, then send the final answer separately","\u63A8\u8350\u957F\u4EFB\u52A1\u4F7F\u7528\uFF1A\u8FC7\u7A0B\u4E0E\u6700\u7EC8\u7B54\u6848\u90FD\u5728\u540C\u4E00\u5F20\u5361\u7247\u91CC\u5B9E\u65F6\u66F4\u65B0\uFF0C\u4E0D\u5237\u5C4F":"Recommended for long tasks: the process and the final answer update live in one card without flooding the chat","\u6BCF\u4E00\u6B65\u90FD\u5355\u72EC\u53D1\u4E00\u6761\u6D88\u606F\uFF08\u542B\u5DE5\u5177\u8C03\u7528\u548C\u8FC7\u7A0B\u8BF4\u660E\uFF09\uFF1B\u6CE8\u610F\u957F\u4EFB\u52A1\u4F1A\u8FDE\u7EED\u53D1\u9001\u8F83\u591A\u6D88\u606F":"Every step is sent as its own message (including tool calls and notes); long tasks may send many messages in a row","\u5206\u6B65\u76F4\u63A8\u8BBE\u7F6E\u4FDD\u5B58\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5\u3002":"Could not save the step push setting. Try again.",\u8BED\u97F3\u4EA4\u4E92:"Voice","\u6B63\u5728\u8BFB\u53D6\u8BED\u97F3\u8BBE\u7F6E\u2026":"Loading voice settings\u2026","\u98DE\u4E66\u8BED\u97F3\u8BBE\u7F6E\u6682\u4E0D\u53EF\u7528\u3002":"Feishu voice settings are unavailable.","\u672A\u627E\u5230\u5F53\u524D\u98DE\u4E66\u673A\u5668\u4EBA\uFF0C\u8BF7\u8FD4\u56DE\u5217\u8868\u540E\u91CD\u8BD5\u3002":"This Feishu bot was not found. Return to the bot list and try again.",\u67E5\u770B\u8BED\u97F3\u4EA4\u4E92\u8BF4\u660E:"View voice help",\u8BED\u97F3\u4EA4\u4E92\u5F00\u5173:"Voice on/off","\u5F00\u542F(\u8BED\u97F3\u63D0\u95EE\u4E0E\u8BED\u97F3\u56DE\u590D)":"On (voice questions and voice replies)","\u6536\u5230\u8BED\u97F3\u6D88\u606F\u65F6\u8F6C\u5199\u4E3A\u6587\u5B57\u5E76\u6309\u6587\u5B57\u6D41\u6C34\u7EBF\u5904\u7406,\u7B54\u6848\u540C\u65F6\u4EE5\u8BED\u97F3\u56DE\u590D;\u8F6C\u5199\u5931\u8D25\u65F6\u964D\u7EA7\u4E3A\u4EC5\u652F\u6301\u6587\u5B57/\u56FE\u7247/\u6587\u4EF6\u7684\u63D0\u793A\u3002\u51ED\u636E\u503C\u5728\u63D2\u4EF6\u51ED\u636E\u5E93\u91CC\u7BA1\u7406,\u8FD9\u91CC\u53EA\u5F15\u7528\u73AF\u5883\u53D8\u91CF\u540D\u3002":"Voice messages are transcribed to text and processed by the normal text pipeline; the answer is also sent as a voice reply. If transcription fails, the bot falls back to the text/image/file-only notice. The credential value lives in the plugin credential store; only the environment variable name is referenced here.","\u51ED\u636E\u5F15\u7528(\u73AF\u5883\u53D8\u91CF\u540D)":"Credential reference (environment variable name)","\u8F6C\u5199\u6A21\u578B(ASR)":"Transcription model (ASR)","\u5408\u6210\u6A21\u578B(TTS)":"Synthesis model (TTS)",\u56DE\u590D\u97F3\u8272:"Reply voice",'\u9700\u8981 DashScope \u5BC6\u94A5(\u51ED\u636E\u5E93\u4E2D\u4EE5"\u51ED\u636E\u5F15\u7528"\u4E3A\u540D\u7684\u73AF\u5883\u53D8\u91CF)\u4E0E\u53EF\u7528 ffmpeg;\u97F3\u8272\u652F\u6301 Cherry/Serena/Bella/Chelsie/Momo/Katerina \u7B49 qwen3-tts-flash \u5B98\u65B9\u97F3\u8272\u3002':"Requires a DashScope API key (the credential-store environment variable named by the credential reference above) and a working ffmpeg. Supported voices include the official qwen3-tts-flash voices Cherry/Serena/Bella/Chelsie/Momo/Katerina.",\u4FDD\u5B58\u8BED\u97F3\u8BBE\u7F6E:"Save voice settings","\u9ED8\u8BA4\u5173\u95ED;\u5F00\u542F\u540E\u673A\u5668\u4EBA\u53EF\u542C\u61C2\u8BED\u97F3\u6D88\u606F\u5E76\u4EE5\u8BED\u97F3\u56DE\u590D\u3002":"Off by default. When enabled, the bot understands voice messages and replies by voice.","\u8BED\u97F3\u8BBE\u7F6E\u4FDD\u5B58\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5\u3002":"Could not save the voice settings. Try again.",zcode\u8FC7\u7A0B\u5361\u6A21\u5F0F:"ZCode process-card mode","\u8FC7\u7A0B\u8BF4\u660E\u3001\u5DE5\u5177\u6458\u8981\u4E0E\u6700\u7EC8\u7B54\u6848\u90FD\u5728\u540C\u4E00\u5F20\u5361\u7247\u4E2D\u539F\u5730\u5237\u65B0":"Process notes, the tool summary, and the final answer refresh in place inside one card","\u601D\u8003\u4E0E\u5DE5\u5177\u6458\u8981\u6298\u53E0\u5C55\u793A\uFF0C\u6700\u7EC8\u7B54\u6848\u5728\u540C\u4E00\u5F20\u5361\u7247\u4E2D\u539F\u5730\u5237\u65B0":"Thinking and the tool summary stay folded; the final answer refreshes in place inside one card",\u9489\u9489\u8BBE\u7F6E:"DingTalk settings",\u4F01\u4E1A\u5FAE\u4FE1\u8BBE\u7F6E:"WeCom settings",\u626B\u7801\u63A5\u5165\u673A\u5668\u4EBA:"Scan QR code",\u6B63\u5728\u63A5\u5165:"Connecting",\u624B\u52A8\u63A5\u5165:"Manual setup",\u6536\u8D77\u51ED\u636E:"Hide credentials",\u6536\u8D77\u63A5\u5165:"Hide setup",\u5C55\u5F00\u8BE5\u8D26\u53F7\u7684\u8BBE\u7F6E:"Expand this account's settings",\u6536\u8D77\u8BE5\u8D26\u53F7\u7684\u8BBE\u7F6E:"Collapse this account's settings",\u63A5\u5165\u673A\u5668\u4EBA:"Connect bot",\u5F00\u59CB\u63A5\u5165:"Start setup",\u5728\u7EBF:"online",\u8FD0\u884C\u6B63\u5E38:"Connected",\u6B63\u5728\u8FDE\u63A5:"Connecting","\u6B63\u5728\u8FDE\u63A5\u2026":"Connecting\u2026",\u8FDE\u63A5\u672A\u5C31\u7EEA:"Not connected",\u8FDE\u63A5\u4E2D:"Connecting",\u8FDE\u63A5\u4E2D\u65AD:"Disconnected",\u9700\u8981\u5904\u7406:"Needs attention",\u72B6\u6001\u672A\u77E5:"Unknown status",\u79BB\u7EBF:"Offline",\u5DF2\u65AD\u5F00:"Disconnected",\u6D88\u606F\u901A\u9053:"Message channel",\u67E5\u770B\u6D88\u606F\u901A\u9053\u8BF4\u660E:"View message channel details",\u6700\u8FD1\u68C0\u67E5:"Last checked",\u6700\u8FD1\u4E00\u6761\u6D88\u606F\u5904\u7406\u5931\u8D25:"Latest message failed",\u9519\u8BEF\u7801:"Code",\u53C2\u8003\u53F7:"Reference",\u5F53\u524D\u5DE5\u4F5C\u533A:"Current workspace",\u9009\u62E9\u76EE\u5F55:"Choose folder",\u9009\u62E9\u673A\u5668\u4EBA\u5DE5\u4F5C\u533A\u76EE\u5F55:"Select bot workspace folder",\u5F53\u524D\u76EE\u5F55:"Current folder",\u4E3B\u76EE\u5F55:"Home",\u76F4\u63A5\u8F93\u5165\u8DEF\u5F84:"Enter a path directly","\u652F\u6301 Windows \u76D8\u7B26\u3001UNC \u4E0E POSIX \u7EDD\u5BF9\u8DEF\u5F84\u3002":"Supports Windows drives, UNC paths, and POSIX absolute paths.","\u8F93\u5165 Host \u4E0A\u7684\u5B8C\u6574\u7EDD\u5BF9\u8DEF\u5F84":"Enter a full absolute path on the Host",\u524D\u5F80:"Go","\u8BFB\u53D6\u4E2D\u2026":"Loading\u2026","\u6B63\u5728\u51C6\u5907\u76EE\u5F55\u9009\u62E9\u5668\u2026":"Preparing folder picker\u2026","\u6B63\u5728\u8BFB\u53D6\u76EE\u5F55\u2026":"Loading folders\u2026","\u8FD9\u4E2A\u76EE\u5F55\u4E2D\u6CA1\u6709\u5B50\u6587\u4EF6\u5939\u3002":"This folder has no subfolders.","\u6B64\u76EE\u5F55\u7684\u5B50\u6587\u4EF6\u5939\u8FC7\u591A\uFF0C\u4EC5\u663E\u793A\u524D\u4E00\u90E8\u5206\u3002":"This folder has too many subfolders; only the first group is shown.","\u65E0\u6CD5\u8BFB\u53D6\u76EE\u5F55\uFF0C\u8BF7\u91CD\u8BD5\u3002":"Could not load the folder. Try again.",\u91CD\u8BD5:"Retry",\u663E\u793A\u9690\u85CF\u6587\u4EF6\u5939:"Show hidden folders","\u5207\u6362\u540E\u4F1A\u6E05\u9664\u8FD9\u4E2A\u673A\u5668\u4EBA\u7684\u65E7\u4F1A\u8BDD\u6620\u5C04\u3002":"Switching clears this bot\u2019s previous session mappings.","\u5207\u6362\u4E2D\u2026":"Switching\u2026",\u9009\u62E9\u6B64\u76EE\u5F55:"Select this folder",\u5DE5\u4F5C\u533A\u7EDD\u5BF9\u8DEF\u5F84:"Absolute workspace path","/\u7EDD\u5BF9\u8DEF\u5F84/\u5230/\u5DE5\u4F5C\u533A":"/absolute/path/to/workspace",\u4FEE\u6539:"Change",\u4E0A\u4E0B\u6587\u589E\u5F3A:"Context enhancement",\u672A\u5F00\u542F:"Not enabled",\u4EC5\u7FA4\u804A:"Groups only",\u4EC5\u79C1\u804A:"Direct only",\u7FA4\u804A\u548C\u79C1\u804A:"Groups and direct",\u5173\u95ED\u5F39\u7A97:"Close dialog",\u67E5\u770B\u4E0A\u4E0B\u6587\u589E\u5F3A\u8BF4\u660E:"View context enhancement details",\u4E0A\u4E0B\u6587\u589E\u5F3A\u8303\u56F4:"Context enhancement scope",\u542F\u7528\u8303\u56F4:"Enable in",\u542F\u7528:"Enabled","\uFF08\u5F53\u524D\u6E20\u9053\u4E0D\u652F\u6301\u7FA4\u804A\uFF09":"(This channel does not support group chats)",\u6765\u6E90\u5B57\u6BB5:"Source fields",\u67E5\u770B\u6765\u6E90\u5B57\u6BB5\u8BF4\u660E:"View source field details",\u67E5\u770B\u7FA4\u804A\u6765\u6E90\u5B57\u6BB5\u8BF4\u660E:"View group source field details",\u67E5\u770B\u79C1\u804A\u6765\u6E90\u5B57\u6BB5\u8BF4\u660E:"View direct source field details",\u6E20\u9053:"Channel",\u4F1A\u8BDD\u7C7B\u578B:"Conversation type",\u53D1\u9001\u8005\u6807\u8BC6:"Sender ID",\u53D1\u9001\u8005\u6635\u79F0:"Sender name",\u67E5\u770B\u53D1\u9001\u8005\u6635\u79F0\u5B57\u6BB5\u8BF4\u660E:"View sender name field details",\u67E5\u770B\u7FA4\u804A\u53D1\u9001\u8005\u6635\u79F0\u5B57\u6BB5\u8BF4\u660E:"View group sender name field details",\u67E5\u770B\u79C1\u804A\u53D1\u9001\u8005\u6635\u79F0\u5B57\u6BB5\u8BF4\u660E:"View direct sender name field details","\u8BE5\u5B57\u6BB5\u4E0D\u662F\u6BCF\u4E2A\u6E20\u9053\u90FD\u80FD\u63D0\u4F9B\u3002\u5F53\u524D\u6D88\u606F\u6CA1\u6709\u53D1\u9001\u8005\u6635\u79F0\u65F6\uFF0C\u5373\u4F7F\u5DF2\u9009\u62E9\u8BE5\u5B57\u6BB5\uFF0C<dsh_im_source> \u4E2D\u4E5F\u4F1A\u7701\u7565 senderName\u3002":"This field is not available on every channel. If the current message has no sender name, <dsh_im_source> omits senderName even when the field is selected.",\u4F1A\u8BDD\u6807\u9898:"Conversation title",\u67E5\u770B\u7FA4\u804A\u4F1A\u8BDD\u6807\u9898\u5B57\u6BB5\u8BF4\u660E:"View group conversation title field details",\u67E5\u770B\u79C1\u804A\u4F1A\u8BDD\u6807\u9898\u5B57\u6BB5\u8BF4\u660E:"View direct conversation title field details","\u8BE5\u5B57\u6BB5\u4E0D\u662F\u6BCF\u4E2A\u6E20\u9053\u90FD\u80FD\u63D0\u4F9B\u3002\u9489\u9489\u7FA4\u804A\u4F1A\u5E26\u4E0A\u7FA4\u540D\u3002\u5F53\u524D\u6D88\u606F\u6CA1\u6709\u4F1A\u8BDD\u6807\u9898\u65F6\uFF0C\u5373\u4F7F\u5DF2\u9009\u62E9\u8BE5\u5B57\u6BB5\uFF0C<dsh_im_source> \u4E2D\u4E5F\u4F1A\u7701\u7565 conversationTitle\u3002":"This field is not available on every channel. DingTalk group chats include the group name. If the current message has no conversation title, <dsh_im_source> omits conversationTitle even when the field is selected.",\u4F1A\u8BDD\u6807\u8BC6:"Chat ID",\u67E5\u770B\u7FA4\u804A\u4F1A\u8BDD\u6807\u8BC6\u5B57\u6BB5\u8BF4\u660E:"View group chat ID field details",\u67E5\u770B\u79C1\u804A\u4F1A\u8BDD\u6807\u8BC6\u5B57\u6BB5\u8BF4\u660E:"View direct chat ID field details","\u8BE5\u5B57\u6BB5\u4E0D\u662F\u6BCF\u4E2A\u6E20\u9053\u90FD\u80FD\u63D0\u4F9B\u3002\u4F1A\u8BDD\u6807\u8BC6\u7528\u4E8E\u533A\u5206\u4E0D\u540C\u7684\u7FA4\u7EC4\u6216\u79C1\u804A\uFF0C\u98DE\u4E66\u7FA4\u804A\u4F1A\u5E26\u4E0A\u7FA4 ID\u3002\u5F53\u524D\u6D88\u606F\u6CA1\u6709\u4F1A\u8BDD\u6807\u8BC6\u65F6\uFF0C\u5373\u4F7F\u5DF2\u9009\u62E9\u8BE5\u5B57\u6BB5\uFF0C<dsh_im_source> \u4E2D\u4E5F\u4F1A\u7701\u7565 chatId\u3002":"This field is not available on every channel. The chat ID distinguishes different groups or direct chats, and Feishu group chats include the group ID. If the current message has no chat ID, <dsh_im_source> omits chatId even when the field is selected.",\u8BDD\u9898\u6807\u8BC6:"Topic ID",\u67E5\u770B\u7FA4\u804A\u8BDD\u9898\u6807\u8BC6\u5B57\u6BB5\u8BF4\u660E:"View group topic ID field details",\u67E5\u770B\u79C1\u804A\u8BDD\u9898\u6807\u8BC6\u5B57\u6BB5\u8BF4\u660E:"View direct topic ID field details","\u8BE5\u5B57\u6BB5\u4E0D\u662F\u6BCF\u4E2A\u6E20\u9053\u90FD\u80FD\u63D0\u4F9B\u3002\u98DE\u4E66\u8BDD\u9898\u7FA4\u7684\u6D88\u606F\u4F1A\u5E26\u4E0A\u8BDD\u9898 ID\uFF0C\u7528\u4E8E\u533A\u5206\u540C\u4E00\u7FA4\u7EC4\u5185\u7684\u4E0D\u540C\u8BDD\u9898\uFF1B\u5F53\u524D\u6D88\u606F\u4E0D\u5728\u8BDD\u9898\u4E2D\u65F6\uFF0C\u5373\u4F7F\u5DF2\u9009\u62E9\u8BE5\u5B57\u6BB5\uFF0C<dsh_im_source> \u4E2D\u4E5F\u4F1A\u7701\u7565 threadId\u3002":"This field is not available on every channel. Messages in a Feishu topic chat carry the topic ID, which distinguishes different topics inside the same group. If the current message is not inside a topic, <dsh_im_source> omits threadId even when the field is selected.",\u673A\u5668\u4EBA\u6807\u8BC6:"Bot ID",\u53D1\u9001\u65F6\u95F4:"Sent at",\u67E5\u770B\u7FA4\u804A\u53D1\u9001\u65F6\u95F4\u5B57\u6BB5\u8BF4\u660E:"View group sent-at field details",\u67E5\u770B\u79C1\u804A\u53D1\u9001\u65F6\u95F4\u5B57\u6BB5\u8BF4\u660E:"View direct sent-at field details","\u5F53\u524D\u6D88\u606F\u7684\u53D1\u9001\u65F6\u95F4\uFF0C\u683C\u5F0F\u4E3A YYYY-MM-DD HH:mm:ss\uFF08\u672C\u673A\u65F6\u533A\uFF09\u3002\u4F18\u5148\u4F7F\u7528\u5E73\u53F0\u7ED9\u51FA\u7684\u53D1\u9001\u65F6\u95F4\uFF1B\u5E73\u53F0\u672A\u63D0\u4F9B\u65F6\uFF0C\u4ECE\u5FAE\u4FE1\u6D88\u606F ID \u4E2D\u89E3\u6790\u51FA\u53D1\u9001\u65F6\u95F4\uFF1B\u4E24\u8005\u90FD\u4E0D\u53EF\u7528\u65F6\uFF0C\u5373\u4F7F\u5DF2\u9009\u62E9\u8BE5\u5B57\u6BB5\uFF0C<dsh_im_source> \u4E2D\u4E5F\u4F1A\u7701\u7565 sentAt\u3002\u76EE\u524D\u4EC5\u5FAE\u4FE1\u6E20\u9053\u63D0\u4F9B\uFF1B\u628A\u672C\u673A\u65F6\u533A\u5199\u8FDB\u589E\u5F3A\u63D0\u793A\u8BCD\uFF0C\u6A21\u578B\u5224\u65AD\u5148\u540E\u987A\u5E8F\u65F6\u66F4\u51C6\u786E\u3002":"When the current message was sent, as YYYY-MM-DD HH:mm:ss in the local time zone. The platform send time is used when available; otherwise the send time is decoded from the WeChat message ID. If neither is available, <dsh_im_source> omits sentAt even when the field is selected. WeChat is the only channel that provides it today. Naming your time zone in the guidance makes ordering judgements more accurate.",\u589E\u5F3A\u63D0\u793A\u8BCD:"Guidance",\u67E5\u770B\u589E\u5F3A\u63D0\u793A\u8BCD\u4F7F\u7528\u8BF4\u660E:"View guidance instructions",\u67E5\u770B\u7FA4\u804A\u589E\u5F3A\u63D0\u793A\u8BCD\u4F7F\u7528\u8BF4\u660E:"View group guidance instructions",\u67E5\u770B\u79C1\u804A\u589E\u5F3A\u63D0\u793A\u8BCD\u4F7F\u7528\u8BF4\u660E:"View direct guidance instructions",\u4F7F\u7528\u8BF4\u660E:"How to use","\u7528\u4E8E\u544A\u8BC9\u6A21\u578B\u5982\u4F55\u4F7F\u7528 <dsh_im_source> \u4E2D\u5DF2\u9009\u62E9\u7684\u6765\u6E90\u5B57\u6BB5\u3002\u53EA\u586B\u5199\u6B63\u6587\uFF0C\u63D2\u4EF6\u4F1A\u81EA\u52A8\u6DFB\u52A0 <dsh_im_source_guidance> \u6210\u5BF9\u6807\u7B7E\u3002":"Tell the model how to use the selected fields in <dsh_im_source>. Enter only the body; the plugin adds paired <dsh_im_source_guidance> tags.",\u751F\u6548\u89C4\u5219:"Behavior",\u9690\u79C1\u63D0\u793A:"Privacy",\u4F7F\u7528\u793A\u4F8B:"Example","\u4EC5\u4F9D\u636E\u5F53\u524D\u6D88\u606F\u7684 <dsh_im_source> \u4E2D\u5B9E\u9645\u63D0\u4F9B\u7684\u5B57\u6BB5\u7406\u89E3\u6765\u6E90\uFF1B\u6CA1\u6709\u63D0\u4F9B\u7684\u5B57\u6BB5\u4E0D\u8981\u731C\u6D4B\u6216\u8865\u5168\u3002\nconversationType\u662F\u7FA4\u804A\u65F6\u56DE\u590D\u4E25\u8083\u4E00\u70B9\uFF0CconversationType\u662F\u79C1\u804A\u65F6\u56DE\u590D\u4E00\u5B9A\u8981\u5E7D\u9ED8\u641E\u7B11\uFF0C\u50CF\u5468\u661F\u9A70\u7684\u7535\u5F71\u4E00\u6837\u641E\u7B11":`Understand the source only from fields actually present in <dsh_im_source> for the current message; do not guess or fill in missing fields.
|
|
430
430
|
When conversationType is group, reply more seriously. When conversationType is direct, make the reply humorous and funny.`,"\u4EC5\u4F9D\u636E\u5F53\u524D\u6D88\u606F\u7684 <dsh_im_source> \u4E2D\u5B9E\u9645\u63D0\u4F9B\u7684\u5B57\u6BB5\u7406\u89E3\u6765\u6E90\uFF1B\u6CA1\u6709\u63D0\u4F9B\u7684\u5B57\u6BB5\u4E0D\u8981\u731C\u6D4B\u6216\u8865\u5168\u3002\n\u5F53\u524D\u6D88\u606F\u6765\u81EA\u7FA4\u804A\uFF0C\u8BF7\u4F7F\u7528\u4E25\u8083\u3001\u514B\u5236\u3001\u7B80\u6D01\u7684\u8868\u8FBE\u65B9\u5F0F\u3002":`Understand the source only from fields actually present in <dsh_im_source> for the current message; do not guess or fill in missing fields.
|
|
431
431
|
This message is from a group chat. Use a serious, restrained, and concise style.`,"\u4EC5\u4F9D\u636E\u5F53\u524D\u6D88\u606F\u7684 <dsh_im_source> \u4E2D\u5B9E\u9645\u63D0\u4F9B\u7684\u5B57\u6BB5\u7406\u89E3\u6765\u6E90\uFF1B\u6CA1\u6709\u63D0\u4F9B\u7684\u5B57\u6BB5\u4E0D\u8981\u731C\u6D4B\u6216\u8865\u5168\u3002\n\u5F53\u524D\u6D88\u606F\u6765\u81EA\u79C1\u804A\uFF0C\u53EF\u4EE5\u4F7F\u7528\u66F4\u8F7B\u677E\u3001\u5E7D\u9ED8\u3001\u8BE6\u7EC6\u7684\u8868\u8FBE\u65B9\u5F0F\u3002":`Understand the source only from fields actually present in <dsh_im_source> for the current message; do not guess or fill in missing fields.
|
|
432
432
|
This message is from a direct chat. You may use a lighter, more humorous, and detailed style.`,\u586B\u5165\u793A\u4F8B:"Use example",\u6E05\u7A7A:"Clear","\u9009\u62E9\u5728\u54EA\u4E9B\u4F1A\u8BDD\u4E2D\u542F\u7528\u3001\u63D0\u4F9B\u54EA\u4E9B\u6765\u6E90\u5B57\u6BB5\uFF0C\u4EE5\u53CA\u5982\u4F55\u4F7F\u7528\u8FD9\u4E9B\u4FE1\u606F\u3002\u4EC5\u4F7F\u7528\u5DF2\u6709\u6D88\u606F\u5143\u6570\u636E\uFF0C\u4E0D\u67E5\u8BE2\u5E73\u53F0 API\u3002":"Choose which conversations to enhance, which source fields to include, and how to use them. Only existing message metadata is used; no platform APIs are queried.","\u589E\u5F3A\u63D0\u793A\u8BCD\u4E2D\u8BF7\u4F7F\u7528\u5B57\u6BB5\u540D\uFF08\u5982 senderId\u3001conversationType\uFF09\u5F15\u7528\u8FD9\u4E9B\u4FE1\u606F\u3002\u53EA\u53D1\u9001\u52FE\u9009\u4E14\u5F53\u524D\u6D88\u606F\u4E2D\u53EF\u7528\u7684\u5B57\u6BB5\uFF0C\u4E0D\u4F1A\u989D\u5916\u67E5\u8BE2\u6216\u8865\u5168\u3002":"Reference these values by field name (such as senderId or conversationType) in the guidance. Only selected fields available in the current message are sent; no extra lookups are made.","\u589E\u5F3A\u63D0\u793A\u8BCD\u4E2D\u8BF7\u4F7F\u7528\u5B57\u6BB5\u540D\uFF08\u5982 senderId\u3001conversationType\uFF09\u5F15\u7528\u8FD9\u4E9B\u4FE1\u606F\u3002\u53EA\u53D1\u9001\u5F53\u524D\u4F1A\u8BDD\u4E2D\u52FE\u9009\u4E14\u53EF\u7528\u7684\u5B57\u6BB5\uFF0C\u4E0D\u4F1A\u989D\u5916\u67E5\u8BE2\u6216\u8865\u5168\u3002":"Reference these values by field name (such as senderId or conversationType) in the guidance. Only fields selected and available in the current conversation are sent; no extra lookups are made.","\u7528\u4E8E\u544A\u8BC9\u6A21\u578B\u5982\u4F55\u4F7F\u7528\u5F53\u524D\u7FA4\u804A\u6D88\u606F\u7684 <dsh_im_source> \u6765\u6E90\u5B57\u6BB5\u3002\u53EA\u586B\u5199\u6B63\u6587\uFF0C\u63D2\u4EF6\u4F1A\u81EA\u52A8\u6DFB\u52A0 <dsh_im_source_guidance> \u6210\u5BF9\u6807\u7B7E\u3002":"Tell the model how to use <dsh_im_source> fields for the current group message. Enter only the body; the plugin adds paired <dsh_im_source_guidance> tags.","\u7528\u4E8E\u544A\u8BC9\u6A21\u578B\u5982\u4F55\u4F7F\u7528\u5F53\u524D\u79C1\u804A\u6D88\u606F\u7684 <dsh_im_source> \u6765\u6E90\u5B57\u6BB5\u3002\u53EA\u586B\u5199\u6B63\u6587\uFF0C\u63D2\u4EF6\u4F1A\u81EA\u52A8\u6DFB\u52A0 <dsh_im_source_guidance> \u6210\u5BF9\u6807\u7B7E\u3002":"Tell the model how to use <dsh_im_source> fields for the current direct message. Enter only the body; the plugin adds paired <dsh_im_source_guidance> tags.","\u4EC5\u5728\u7FA4\u804A\u5F00\u5173\u5F00\u542F\u65F6\u4F7F\u7528\u3002\u6E05\u7A7A\u5E76\u4FDD\u5B58\u540E\u4E0D\u518D\u9644\u52A0\u7FA4\u804A\u589E\u5F3A\u63D0\u793A\u8BCD\uFF1B\u6240\u9009\u6765\u6E90\u5B57\u6BB5\u4ECD\u6309\u5F53\u524D\u573A\u666F\u8BBE\u7F6E\u53D1\u9001\u3002":"Used only when group enhancement is enabled. Clear and save to omit group guidance; selected source fields still follow the group settings.","\u4EC5\u5728\u79C1\u804A\u5F00\u5173\u5F00\u542F\u65F6\u4F7F\u7528\u3002\u6E05\u7A7A\u5E76\u4FDD\u5B58\u540E\u4E0D\u518D\u9644\u52A0\u79C1\u804A\u589E\u5F3A\u63D0\u793A\u8BCD\uFF1B\u6240\u9009\u6765\u6E90\u5B57\u6BB5\u4ECD\u6309\u5F53\u524D\u573A\u666F\u8BBE\u7F6E\u53D1\u9001\u3002":"Used only when direct enhancement is enabled. Clear and save to omit direct guidance; selected source fields still follow the direct settings.","\u53EA\u9700\u586B\u5199\u6B63\u6587\uFF0C\u63D2\u4EF6\u81EA\u52A8\u6DFB\u52A0 <dsh_im_source_guidance> \u6210\u5BF9\u6807\u7B7E\u3002\u6E05\u7A7A\u5E76\u4FDD\u5B58\u540E\uFF0C\u4E0D\u518D\u9644\u52A0\u589E\u5F3A\u63D0\u793A\u8BCD\uFF0C\u5DF2\u9009\u6765\u6E90\u5B57\u6BB5\u4ECD\u6309\u5F00\u5173\u8BBE\u7F6E\u53D1\u9001\u3002":"Enter only the body; the plugin adds paired <dsh_im_source_guidance> tags. Clear and save to omit guidance. Selected source fields still follow the conversation switches.","\u53D1\u9001\u8005\u6807\u8BC6\u53EF\u80FD\u5305\u542B\u5E73\u53F0\u7528\u6237 ID \u6216\u7535\u8BDD\u53F7\u7801\u5F62\u5F0F\u7684\u6807\u8BC6\u3002\u5173\u95ED\u5F00\u5173\u4E0D\u4F1A\u5220\u9664\u5DF2\u7ECF\u5199\u5165\u4F1A\u8BDD\u5386\u53F2\u7684\u4FE1\u606F\u3002":"Sender IDs may contain platform user IDs or phone-number-like identifiers. Turning this off does not remove information already saved in conversation history.","\u4E0A\u4E0B\u6587\u589E\u5F3A\u4FDD\u5B58\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5\u3002":"Could not save context enhancement. Try again.","\u8BF7\u63D0\u4EA4\u5B8C\u6574\u7684\u4E0A\u4E0B\u6587\u589E\u5F3A\u8BBE\u7F6E\u3002":"Submit the complete context enhancement settings.","\u7FA4\u804A\u548C\u79C1\u804A\u5F00\u5173\u5FC5\u987B\u662F\u5E03\u5C14\u503C\u3002":"Group and direct switches must be booleans.","\u6765\u6E90\u5B57\u6BB5\u53EA\u80FD\u9009\u62E9\u5DF2\u5B9A\u4E49\u7684\u5B57\u6BB5\u3002":"Source fields must be chosen from the defined fields.","\u4FDD\u5B58\u4E2D\u2026":"Saving\u2026",\u672A\u8BBE\u7F6E:"Not set","\u5DE5\u4F5C\u533A\u4FEE\u6539\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5\u3002":"Could not update the workspace. Try again.","\u8BF7\u8F93\u5165\u5DE5\u4F5C\u533A\u7EDD\u5BF9\u8DEF\u5F84\u3002":"Enter an absolute workspace path.","\u5DE5\u4F5C\u533A\u5FC5\u987B\u662F\u7EDD\u5BF9\u8DEF\u5F84\u3002":"The workspace must be an absolute path.","\u5DE5\u4F5C\u533A\u8DEF\u5F84\u4E0D\u5B58\u5728\u3002":"The workspace path does not exist.","\u5DE5\u4F5C\u533A\u8DEF\u5F84\u5FC5\u987B\u6307\u5411\u4E00\u4E2A\u76EE\u5F55\u3002":"The workspace path must point to a directory.","\u627E\u4E0D\u5230\u8981\u4FEE\u6539\u7684\u673A\u5668\u4EBA\u3002":"The bot could not be found.","Agent Preset":"Agent Preset","\u67E5\u770B Agent Preset \u8BF4\u660E":"View Agent Preset help","\u8DDF\u968F Host \u9ED8\u8BA4":"Follow the Host default","\uFF08\u5DF2\u4E0D\u53EF\u7528\uFF09":" (unavailable)","\u53EA\u5F71\u54CD\u65B0\u5EFA\u4F1A\u8BDD\uFF1B\u82E5\u5F53\u524D\u804A\u5929\u5DF2\u6709\u4F1A\u8BDD\uFF0C\u5148\u53D1\u9001 /new\uFF0C\u518D\u53D1\u9001\u666E\u901A\u6D88\u606F\u751F\u6548\u3002":"This affects only new sessions. If the current chat already has a session, send /new, then send a regular message to apply it.","\u5F53\u524D Agent Preset \u5DF2\u4E0D\u53EF\u7528\uFF0C\u8BF7\u9009\u62E9\u5176\u4ED6 Preset \u6216\u8DDF\u968F Host \u9ED8\u8BA4\u3002":"The current Agent Preset is unavailable. Choose another preset or follow the Host default.","Agent Preset \u4FEE\u6539\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5\u3002":"Could not update the Agent Preset. Try again.","\u8BF7\u9009\u62E9 Agent Preset\u3002":"Choose an Agent Preset.","Agent Preset \u65E0\u6548\u3002":"The Agent Preset is invalid.","Agent Preset \u4E0D\u5B58\u5728\u6216\u4E0D\u53EF\u7528\u3002":"The Agent Preset does not exist or is unavailable.",\u6A21\u578B:"Model",\u6A21\u578B\u4E0E\u601D\u8003\u5F3A\u5EA6:"Model and reasoning effort",\u601D\u8003\u5F3A\u5EA6:"Reasoning effort",\u8DDF\u968F\u6A21\u578B\u9ED8\u8BA4:"Model default","\u5148\u9009\u62E9\u6A21\u578B\uFF0C\u518D\u8BBE\u7F6E\u601D\u8003\u5F3A\u5EA6\u3002":"Select a model to configure its reasoning effort.","\u8BE5\u6A21\u578B\u672A\u63D0\u4F9B\u53EF\u8C03\u8282\u7684\u601D\u8003\u5F3A\u5EA6\u3002":"This model does not provide adjustable reasoning effort.","\u5DF2\u4FDD\u5B58\u7684\u601D\u8003\u5F3A\u5EA6\u5DF2\u4E0D\u53EF\u7528\uFF0C\u8BF7\u9009\u62E9\u5176\u4ED6\u5F3A\u5EA6\u6216\u6062\u590D\u9ED8\u8BA4\u3002":"The saved reasoning effort is unavailable. Choose another effort or restore the default.","\u4F7F\u7528\u6A21\u578B\u6216\u670D\u52A1\u63D0\u4F9B\u65B9\u7684\u9ED8\u8BA4\u601D\u8003\u5F3A\u5EA6\u3002":"Use the default reasoning effort from the model or provider.","\u5F53\u524D\u6A21\u578B\u4E0D\u652F\u6301\u6240\u9009\u601D\u8003\u5F3A\u5EA6\uFF0C\u8BF7\u91CD\u65B0\u9009\u62E9\u3002":"This model does not support the selected reasoning effort. Choose another effort.",\u67E5\u770B\u6A21\u578B\u8BBE\u7F6E\u8BF4\u660E:"View model setting help",\u8DDF\u968F\u9ED8\u8BA4\u6A21\u578B:"Follow the default model","\u6A21\u578B\u4FEE\u6539\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5\u3002":"Could not update the model. Try again.","\u6A21\u578B\u65E0\u6548\u3002":"The model is invalid.","\u6A21\u578B\u4E0D\u5B58\u5728\u6216\u4E0D\u53EF\u7528\u3002":"The model does not exist or is unavailable.","\u5F53\u524D\u6A21\u578B\u5DF2\u4E0D\u53EF\u7528\uFF0C\u8BF7\u9009\u62E9\u5176\u4ED6\u6A21\u578B\u6216\u8DDF\u968F\u9ED8\u8BA4\u6A21\u578B\u3002":"The current model is unavailable. Choose another model or follow the default.",\u5C1A\u672A\u68C0\u67E5:"Not checked yet",\u521A\u521A:"Just now",\u68C0\u67E5\u8FDE\u63A5:"Check connection","\u68C0\u67E5\u4E2D\u2026":"Checking\u2026","\u8FDE\u63A5\u68C0\u67E5\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002":"Connection check failed. Try again later.","\u673A\u5668\u4EBA\u5DF2\u4FDD\u5B58\uFF0C\u4F46\u8FDE\u63A5\u672A\u5C31\u7EEA":"The bot was saved, but the connection is not ready",\u67E5\u770B\u5DF2\u4FDD\u5B58\u7684\u673A\u5668\u4EBA:"View saved bot","\u6D4B\u8BD5\u6D88\u606F\u5DF2\u53D1\u9001\uFF0C\u8BF7\u5230\u5BF9\u5E94\u673A\u5668\u4EBA\u4F1A\u8BDD\u4E2D\u786E\u8BA4\u3002":"Test message sent. Check the matching bot conversation.","\u8FDE\u63A5\u68C0\u67E5\u5B8C\u6210\u3002\u673A\u5668\u4EBA\u5C1A\u672A\u6536\u5230\u53EF\u7528\u4E8E\u6D4B\u8BD5\u7684\u79C1\u804A\u6D88\u606F\u3002":"Connection check completed. The bot has not received a direct message it can use for testing.","\u8FDE\u63A5\u68C0\u67E5\u5B8C\u6210\uFF0C\u4F46\u6D4B\u8BD5\u6D88\u606F\u53D1\u9001\u5931\u8D25\u3002":"Connection check completed, but the test message could not be sent.","\u6D4B\u8BD5\u6D88\u606F\u5DF2\u53D1\u9001\uFF0C\u8BF7\u5230\u98DE\u4E66\u4F1A\u8BDD\u4E2D\u786E\u8BA4\u3002":"Test message sent. Check the Feishu conversation.","\u6D4B\u8BD5\u6D88\u606F\u5DF2\u53D1\u9001\uFF0C\u8BF7\u5230 WhatsApp \u81EA\u804A\u4F1A\u8BDD\u4E2D\u786E\u8BA4\u3002":"Test message sent. Check the WhatsApp self-chat.","\u8FDE\u63A5\u68C0\u67E5\u5B8C\u6210\uFF0C\u4F46\u5F53\u524D\u6CA1\u6709\u53EF\u7528\u7684 WhatsApp \u81EA\u804A\u76EE\u6807\u3002":"Connection check completed, but no WhatsApp self-chat target is available.","\u9489\u9489\u8FDE\u63A5\u68C0\u67E5\u5B8C\u6210\uFF0C\u6D4B\u8BD5\u6D88\u606F\u5DF2\u53D1\u9001\u3002":"DingTalk connection check completed and the test message was sent.","\u9489\u9489\u8FDE\u63A5\u68C0\u67E5\u5B8C\u6210\uFF0C\u4F46\u6D4B\u8BD5\u6D88\u606F\u53D1\u9001\u5931\u8D25\u3002":"DingTalk connection check completed, but the test message could not be sent.","\u5FAE\u4FE1\u8FDE\u63A5\u68C0\u67E5\u5B8C\u6210\uFF0C\u6D4B\u8BD5\u6D88\u606F\u5DF2\u53D1\u9001\u3002":"WeChat connection check completed and the test message was sent.","\u5FAE\u4FE1\u8FDE\u63A5\u68C0\u67E5\u5B8C\u6210\uFF0C\u4F46\u6D4B\u8BD5\u6D88\u606F\u53D1\u9001\u5931\u8D25\u3002":"WeChat connection check completed, but the test message could not be sent.","\u4F01\u4E1A\u5FAE\u4FE1\u8FDE\u63A5\u68C0\u67E5\u5B8C\u6210\uFF0C\u6D4B\u8BD5\u6D88\u606F\u5DF2\u53D1\u9001\u3002":"WeCom connection check completed and the test message was sent.","\u4F01\u4E1A\u5FAE\u4FE1\u8FDE\u63A5\u68C0\u67E5\u5B8C\u6210\uFF0C\u4F46\u6D4B\u8BD5\u6D88\u606F\u53D1\u9001\u5931\u8D25\u3002":"WeCom connection check completed, but the test message could not be sent.",\u91CD\u8BD5\u8FDE\u63A5:"Reconnect","\u91CD\u8BD5\u4E2D\u2026":"Retrying\u2026",\u79FB\u9664\u63A5\u5165:"Remove connection",\u786E\u8BA4\u79FB\u9664\u63A5\u5165:"Remove connection",\u786E\u8BA4\u79FB\u9664:"Remove","\u6B63\u5728\u79FB\u9664\u2026":"Removing\u2026",\u4FDD\u7559\u673A\u5668\u4EBA:"Keep bot",\u4FDD\u7559\u8D26\u53F7:"Keep account",\u53D6\u6D88:"Cancel",\u5173\u95ED:"Close",\u7ACB\u5373\u91CD\u8BD5:"Retry now",\u91CD\u65B0\u8BFB\u53D6:"Reload",\u91CD\u65B0\u751F\u6210\u4E8C\u7EF4\u7801:"Generate a new QR code",\u91CD\u65B0\u751F\u6210\u4E8C\u7EF4\u7801\u540E\u7EE7\u7EED:"Generate a new QR code",\u5237\u65B0\u4E8C\u7EF4\u7801:"Refresh QR code","\u5237\u65B0\u4E2D\u2026":"Refreshing\u2026",\u6362\u4E00\u4E2A\u4E8C\u7EF4\u7801:"Get another QR code",\u7EE7\u7EED\u8FDE\u63A5:"Continue connecting",\u7ED1\u5B9A\u5E76\u8FDE\u63A5:"Connect","\u6B63\u5728\u7ED1\u5B9A\u2026":"Connecting\u2026",\u9A8C\u8BC1\u5E76\u8FDE\u63A5:"Verify and connect","\u6B63\u5728\u9A8C\u8BC1\u5E76\u8FDE\u63A5\u2026":"Verifying and connecting\u2026","\u6B63\u5728\u9A8C\u8BC1\u2026":"Verifying\u2026","\u64CD\u4F5C\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5":"The operation failed. Try again later.",\u8BF7\u7A0D\u540E\u91CD\u8BD5:"Try again later.",\u5F53\u524D\u4E8C\u7EF4\u7801\u6709\u6548\u65F6\u95F4:"QR code expires in",\u4E8C\u7EF4\u7801\u6709\u6548\u65F6\u95F4:"QR code expires in",\u4E8C\u7EF4\u7801\u5DF2\u8FC7\u671F:"QR code expired",\u4E8C\u7EF4\u7801\u5DF2\u5931\u6548:"QR code expired","\u4E8C\u7EF4\u7801\u5DF2\u8FC7\u671F\n\u8BF7\u91CD\u65B0\u751F\u6210":`QR code expired
|