@deepseek-ai/dsh-wecom 0.0.0-stage → 0.2.3-alpha.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.
Files changed (49) hide show
  1. package/LICENSE +21 -0
  2. package/README.i18n.yaml +88 -0
  3. package/README.md +177 -2
  4. package/README.zh.md +178 -0
  5. package/cordis.patch.yml +3 -0
  6. package/docs/DETAIL.md +1 -0
  7. package/docs/DETAIL.zh.md +1 -0
  8. package/docs/preview.svg +1 -0
  9. package/docs/preview.zh.svg +1 -0
  10. package/icon.svg +1 -0
  11. package/lib/index.js +590 -0
  12. package/lib/types/account.d.ts +19 -0
  13. package/lib/types/account.d.ts.map +1 -0
  14. package/lib/types/account.js.map +1 -0
  15. package/lib/types/directory.d.ts +17 -0
  16. package/lib/types/directory.d.ts.map +1 -0
  17. package/lib/types/directory.js.map +1 -0
  18. package/lib/types/index.d.ts +30 -0
  19. package/lib/types/index.d.ts.map +1 -0
  20. package/lib/types/index.js.map +1 -0
  21. package/lib/types/locales.d.ts +93 -0
  22. package/lib/types/locales.d.ts.map +1 -0
  23. package/lib/types/locales.js.map +1 -0
  24. package/lib/types/presentation.d.ts +29 -0
  25. package/lib/types/presentation.d.ts.map +1 -0
  26. package/lib/types/presentation.js.map +1 -0
  27. package/lib/types/skills.d.ts +7 -0
  28. package/lib/types/skills.d.ts.map +1 -0
  29. package/lib/types/skills.js.map +1 -0
  30. package/lib/types/types.d.ts +20 -0
  31. package/lib/types/types.d.ts.map +1 -0
  32. package/lib/types/types.js.map +1 -0
  33. package/locale/de.json +7 -0
  34. package/locale/en.json +7 -0
  35. package/locale/es.json +7 -0
  36. package/locale/fr.json +7 -0
  37. package/locale/ja.json +7 -0
  38. package/locale/pt.json +7 -0
  39. package/locale/ru.json +7 -0
  40. package/locale/zh.json +7 -0
  41. package/package.json +62 -3
  42. package/skills/wecom/SKILL.md +40 -0
  43. package/src/account.ts +69 -0
  44. package/src/directory.ts +43 -0
  45. package/src/index.ts +66 -0
  46. package/src/locales.ts +279 -0
  47. package/src/presentation.ts +116 -0
  48. package/src/skills.ts +18 -0
  49. package/src/types.ts +25 -0
package/lib/index.js ADDED
@@ -0,0 +1,590 @@
1
+ import { createRequire } from "node:module";
2
+ import z from "@deepseek-ai/schemastery";
3
+ import { assertNever } from "@deepseek-ai/dsh-util-values";
4
+ import { accessSync, constants } from "node:fs";
5
+ import { dirname, join } from "node:path";
6
+ import { fileURLToPath } from "node:url";
7
+ //#region lib/types/account.js
8
+ /**
9
+ * Check and QR-code binding of the wecom-cli bot that the user's terminal shares, as the operations `ctx.cliAccounts`
10
+ * runs; binding again replaces it.
11
+ */
12
+ const AUTHORIZATION_LINK = /^\s*(https:\/\/\S+)\s*$/u;
13
+ /** `auth show` prints `Status: authorized` or `Status: unauthorized`, then `Bot ID: <id>` when a bound bot gives the authorization. */
14
+ const STATUS_LINE = /^Status:[ \t]*(authorized|unauthorized)[ \t]*$/mu;
15
+ const BOT_LINE = /^Bot ID:[ \t]*(\S+)[ \t]*$/mu;
16
+ /**
17
+ * Bind the WeCom account operations to the upstream guides.
18
+ * @param guides - the registered upstream guides.
19
+ * @returns the function that carries out one operation with wecom-cli and publishes the authorization each check
20
+ * observes; it throws when a command fails, prints an unknown status, or leaves no authorization after a binding.
21
+ */
22
+ function performWith(guides) {
23
+ return async (kind, control, signal) => {
24
+ switch (kind) {
25
+ case "check":
26
+ await check(guides, control, signal);
27
+ return;
28
+ case "connect": return connect(guides, control, signal);
29
+ /* v8 ignore next -- closed operation kind union */
30
+ default: return assertNever(kind);
31
+ }
32
+ };
33
+ }
34
+ /** Bind a bot through the CLI's QR-code page, then confirm the CLI reports it authorized. */
35
+ async function connect(guides, control, signal) {
36
+ control.stage("authorizing");
37
+ const init = await control.run("auth-init", [
38
+ "auth",
39
+ "init",
40
+ "--noninteractive",
41
+ "--no-browser"
42
+ ], signal, {
43
+ awaitsUser: true,
44
+ onLine: (stream, line) => {
45
+ const link = stream === "stdout" ? AUTHORIZATION_LINK.exec(line) : null;
46
+ if (link !== null) control.offer(link[1]);
47
+ }
48
+ });
49
+ if (init.exitCode !== 0) throw new Error(`wecom: auth init exited with ${String(init.exitCode)}`);
50
+ control.stage("checking");
51
+ if ((await check(guides, control, signal)).state !== "authorized") throw new Error("wecom: auth init left no authorization");
52
+ }
53
+ /** Restart a failed download of the guides without waiting for it, then read the authorization state, publish it, and return it. */
54
+ async function check(guides, control, signal) {
55
+ guides.retry();
56
+ const result = await control.run("auth-status", ["auth", "show"], signal);
57
+ const state = STATUS_LINE.exec(result.stdout)?.[1];
58
+ if (result.exitCode !== 0 || state !== "authorized" && state !== "unauthorized") throw new Error(`wecom: auth show exited with ${String(result.exitCode)} or printed an unknown status`);
59
+ const botId = state === "authorized" ? BOT_LINE.exec(result.stdout)?.[1] : void 0;
60
+ const account = {
61
+ state,
62
+ ...botId === void 0 ? {} : { botId },
63
+ skills: guides.state
64
+ };
65
+ control.publish(account);
66
+ return account;
67
+ }
68
+ //#endregion
69
+ //#region lib/types/directory.js
70
+ /** Managed wecom-cli location: the platform binary package that `@wecom/cli` installs. */
71
+ /** The name wecom-cli's guides and scripts run it by. */
72
+ const PROGRAM = "wecom-cli";
73
+ /**
74
+ * Name the executable file as the platform package installs it.
75
+ * @param platform - the Host platform.
76
+ * @returns `wecom-cli`, or `wecom-cli.exe` on Windows.
77
+ */
78
+ function executableFileName(platform) {
79
+ return platform === "win32" ? `${PROGRAM}.exe` : PROGRAM;
80
+ }
81
+ function platformDirectory() {
82
+ const platformPackage = `@wecom/cli-${process.platform}-${process.arch}`;
83
+ try {
84
+ return join(dirname(createRequire(import.meta.resolve("@wecom/cli/package.json")).resolve(`${platformPackage}/package.json`)), "bin");
85
+ } catch (error) {
86
+ throw new Error(`wecom: ${platformPackage} is not installed; @wecom/cli has no binary for this platform, or set binDir`, { cause: error });
87
+ }
88
+ }
89
+ /**
90
+ * Locate the managed executable.
91
+ * @param binDir - absolute override; defaults to the `bin` of the installed `@wecom/cli-<platform>-<arch>` package.
92
+ * @returns the absolute path of the executable `wecom-cli`, `wecom-cli.exe` on Windows.
93
+ * @throws when the platform package is missing or the executable is not executable.
94
+ */
95
+ function resolveCliExecutable(binDir) {
96
+ const program = join(binDir ?? platformDirectory(), executableFileName(process.platform));
97
+ try {
98
+ accessSync(program, constants.X_OK);
99
+ } catch (error) {
100
+ throw new Error(`wecom: ${program} is not executable; reinstall the plugin or set binDir`, { cause: error });
101
+ }
102
+ return program;
103
+ }
104
+ /** The dictionary of every shipped language. */
105
+ const dictionaries = {
106
+ zh: {
107
+ "section.title": "企业微信授权",
108
+ "status.checking": "正在检查授权",
109
+ "status.disconnected": "未授权",
110
+ "status.unavailable": "暂时无法读取授权状态",
111
+ "status.connected": "已授权",
112
+ "step.authorizing": "等待扫码授权",
113
+ "step.connecting": "正在确认授权",
114
+ "detail.disconnected": "用企业微信扫码绑定一个智能机器人。授权后,可以在对话中通过这个机器人使用企业微信的文档、日程、会议、待办和消息等功能。",
115
+ "detail.unavailable": "没能读取 wecom-cli 的授权状态,可以稍后重试。",
116
+ "detail.connected": "可以在对话中直接请 Agent 使用企业微信。",
117
+ "detail.authorizing": "在打开的页面中用企业微信扫码并确认,完成后回到这里查看结果。页面没有打开时,点击“打开扫码页面”。",
118
+ "skills.downloading": "正在从 GitHub 下载企业微信技能,下载完成后即可在对话中使用。",
119
+ "skills.failed": "企业微信技能没能下载,Agent 暂时用不了企业微信的子指南。请确认这台电脑能访问 GitHub,然后重试。",
120
+ hint: "授权与这台电脑终端里的 wecom-cli 共用;关闭插件不会解除授权。",
121
+ failed: "操作未完成,请重试",
122
+ "action.connect": "连接企业微信",
123
+ "action.rebind": "更换机器人",
124
+ "rebind.title": "更换机器人?",
125
+ "rebind.body": "将重新扫码绑定一个智能机器人,替换这台电脑上 wecom-cli 当前绑定的机器人,终端里的 wecom-cli 也一起更换。",
126
+ "bot.bound": "已绑定机器人:{id}",
127
+ "action.open": "打开扫码页面",
128
+ "action.cancel": "取消",
129
+ "action.retry": "重试",
130
+ "badge.connected": "已授权",
131
+ "badge.disconnected": "未授权",
132
+ "badge.connecting": "授权中",
133
+ "badge.unavailable": "待确认",
134
+ "activation.title": "连接企业微信",
135
+ "activation.body": "企业微信插件已开启。扫码授权后,就可以在对话中使用它。",
136
+ "notice.connected": "企业微信已授权"
137
+ },
138
+ en: {
139
+ "section.title": "WeCom authorization",
140
+ "status.checking": "Checking authorization",
141
+ "status.disconnected": "Not authorized",
142
+ "status.unavailable": "Cannot read authorization right now",
143
+ "status.connected": "Authorized",
144
+ "step.authorizing": "Waiting for the QR code scan",
145
+ "step.connecting": "Confirming authorization",
146
+ "detail.disconnected": "Scan a QR code with WeCom to bind a smart bot. After that, you can use WeCom docs, calendar, meetings, to-dos, messages, and other features through this bot in conversations.",
147
+ "detail.unavailable": "The wecom-cli authorization could not be read. Try again later.",
148
+ "detail.connected": "Ask the agent to use WeCom directly in a conversation.",
149
+ "detail.authorizing": "Scan the QR code with WeCom on the page that opened and confirm, then come back here to see the result. If the page did not open, select Open QR code page.",
150
+ "skills.downloading": "Downloading the WeCom skills from GitHub. They become available in conversations when the download finishes.",
151
+ "skills.failed": "The WeCom skills could not be downloaded, so the agent cannot use the WeCom guides yet. Check that this computer can reach GitHub, then retry.",
152
+ hint: "The authorization is shared with wecom-cli in this computer's terminal. Turning the plugin off does not revoke it.",
153
+ failed: "The action did not finish. Try again.",
154
+ "action.connect": "Connect WeCom",
155
+ "action.rebind": "Change bot",
156
+ "rebind.title": "Change the bot?",
157
+ "rebind.body": "You will scan a QR code to bind another smart bot. It replaces the bot that wecom-cli on this computer is bound to, including the wecom-cli in your terminal.",
158
+ "bot.bound": "Bound bot: {id}",
159
+ "action.open": "Open QR code page",
160
+ "action.cancel": "Cancel",
161
+ "action.retry": "Retry",
162
+ "badge.connected": "Authorized",
163
+ "badge.disconnected": "Not authorized",
164
+ "badge.connecting": "Authorizing",
165
+ "badge.unavailable": "Unconfirmed",
166
+ "activation.title": "Connect WeCom",
167
+ "activation.body": "The WeCom plugin is on. Scan a QR code to authorize it, then use it in conversations.",
168
+ "notice.connected": "WeCom authorized"
169
+ },
170
+ ja: {
171
+ "section.title": "WeCom の認可",
172
+ "status.checking": "認可を確認中",
173
+ "status.disconnected": "未認可",
174
+ "status.unavailable": "現在認可状態を読み取れません",
175
+ "status.connected": "認可済み",
176
+ "step.authorizing": "QR コードのスキャン待ち",
177
+ "step.connecting": "認可を確定中",
178
+ "detail.disconnected": "WeCom で QR コードをスキャンしてスマートボットを紐付けます。その後、会話の中でこのボットを通じて WeCom のドキュメント、カレンダー、会議、ToDo、メッセージなどの機能を使用できます。",
179
+ "detail.unavailable": "wecom-cli の認可状態を読み取れませんでした。しばらくしてから再試行してください。",
180
+ "detail.connected": "会話の中でエージェントに WeCom の使用を直接依頼できます。",
181
+ "detail.authorizing": "開いたページで WeCom を使って QR コードをスキャンして確定し、完了したらここに戻って結果を確認してください。ページが開かない場合は、「QR コードページを開く」を選択してください。",
182
+ "skills.downloading": "GitHub から WeCom のスキルをダウンロードしています。ダウンロードが完了すると、会話の中で使用できます。",
183
+ "skills.failed": "WeCom のスキルをダウンロードできなかったため、エージェントはまだ WeCom のガイドを使用できません。このコンピューターから GitHub にアクセスできることを確認してから、再試行してください。",
184
+ hint: "認可は、このコンピューターのターミナルにある wecom-cli と共有されます。プラグインをオフにしても認可は解除されません。",
185
+ failed: "操作が完了しませんでした。もう一度お試しください。",
186
+ "action.connect": "WeCom を接続",
187
+ "action.rebind": "ボットを変更",
188
+ "rebind.title": "ボットを変更しますか?",
189
+ "rebind.body": "QR コードを再度スキャンして別のスマートボットをバインドします。このコンピューター上の wecom-cli が現在バインドしているボットは、ターミナルの wecom-cli も含めて置き換えられます。",
190
+ "bot.bound": "バインド済みボット:{id}",
191
+ "action.open": "QR コードページを開く",
192
+ "action.cancel": "キャンセル",
193
+ "action.retry": "再試行",
194
+ "badge.connected": "認可済み",
195
+ "badge.disconnected": "未認可",
196
+ "badge.connecting": "認可中",
197
+ "badge.unavailable": "未確認",
198
+ "activation.title": "WeCom を接続",
199
+ "activation.body": "WeCom プラグインがオンになりました。QR コードをスキャンして認可すると、会話の中で使用できます。",
200
+ "notice.connected": "WeCom を認可しました"
201
+ },
202
+ es: {
203
+ "section.title": "Autorización de WeCom",
204
+ "status.checking": "Comprobando la autorización",
205
+ "status.disconnected": "Sin autorizar",
206
+ "status.unavailable": "No se puede leer la autorización en este momento",
207
+ "status.connected": "Autorizado",
208
+ "step.authorizing": "Esperando el escaneo del código QR",
209
+ "step.connecting": "Confirmando la autorización",
210
+ "detail.disconnected": "Escanee un código QR con WeCom para vincular un bot inteligente. Después, podrá usar en las conversaciones, a través de este bot, los documentos, el calendario, las reuniones, las tareas pendientes, los mensajes y otras funciones de WeCom.",
211
+ "detail.unavailable": "No se pudo leer la autorización de wecom-cli. Inténtelo de nuevo más tarde.",
212
+ "detail.connected": "Pida al agente que use WeCom directamente en una conversación.",
213
+ "detail.authorizing": "Escanee el código QR con WeCom en la página que se abrió y confirme; luego vuelva aquí para ver el resultado. Si la página no se abrió, seleccione “Abrir página del código QR”.",
214
+ "skills.downloading": "Descargando las habilidades de WeCom desde GitHub. Estarán disponibles en las conversaciones cuando termine la descarga.",
215
+ "skills.failed": "No se pudieron descargar las habilidades de WeCom, por lo que el agente aún no puede usar las guías de WeCom. Compruebe que esta computadora puede acceder a GitHub y vuelva a intentarlo.",
216
+ hint: "La autorización se comparte con wecom-cli en la terminal de esta computadora. Desactivar el complemento no la revoca.",
217
+ failed: "La acción no se completó. Inténtelo de nuevo.",
218
+ "action.connect": "Conectar WeCom",
219
+ "action.rebind": "Cambiar bot",
220
+ "rebind.title": "¿Cambiar el bot?",
221
+ "rebind.body": "Escaneará un código QR para vincular otro bot inteligente. Sustituye al bot al que está vinculado wecom-cli en este equipo, incluido el wecom-cli de su terminal.",
222
+ "bot.bound": "Bot vinculado: {id}",
223
+ "action.open": "Abrir página del código QR",
224
+ "action.cancel": "Cancelar",
225
+ "action.retry": "Reintentar",
226
+ "badge.connected": "Autorizado",
227
+ "badge.disconnected": "Sin autorizar",
228
+ "badge.connecting": "Autorizando",
229
+ "badge.unavailable": "Sin confirmar",
230
+ "activation.title": "Conectar WeCom",
231
+ "activation.body": "El complemento de WeCom está activado. Escanee un código QR para autorizarlo y luego úselo en las conversaciones.",
232
+ "notice.connected": "WeCom autorizado"
233
+ },
234
+ fr: {
235
+ "section.title": "Autorisation WeCom",
236
+ "status.checking": "Vérification de l’autorisation",
237
+ "status.disconnected": "Non autorisé",
238
+ "status.unavailable": "Impossible de lire l’autorisation pour le moment",
239
+ "status.connected": "Autorisé",
240
+ "step.authorizing": "En attente du scan du code QR",
241
+ "step.connecting": "Confirmation de l’autorisation",
242
+ "detail.disconnected": "Scannez un code QR avec WeCom pour lier un bot intelligent. Vous pourrez ensuite utiliser dans les conversations, via ce bot, les documents, le calendrier, les réunions, les tâches, les messages et les autres fonctionnalités de WeCom.",
243
+ "detail.unavailable": "Impossible de lire l’autorisation de wecom-cli. Réessayez plus tard.",
244
+ "detail.connected": "Demandez à l’agent d’utiliser WeCom directement dans une conversation.",
245
+ "detail.authorizing": "Scannez le code QR avec WeCom sur la page qui s’est ouverte et confirmez, puis revenez ici pour voir le résultat. Si la page ne s’est pas ouverte, sélectionnez «\xA0Ouvrir la page du code QR\xA0».",
246
+ "skills.downloading": "Téléchargement des compétences WeCom depuis GitHub. Elles seront disponibles dans les conversations une fois le téléchargement terminé.",
247
+ "skills.failed": "Les compétences WeCom n’ont pas pu être téléchargées\xA0: l’agent ne peut donc pas encore utiliser les guides WeCom. Vérifiez que cet ordinateur peut accéder à GitHub, puis réessayez.",
248
+ hint: "L’autorisation est partagée avec wecom-cli dans le terminal de cet ordinateur. Désactiver le plugin ne la révoque pas.",
249
+ failed: "L’action n’a pas abouti. Réessayez.",
250
+ "action.connect": "Connecter WeCom",
251
+ "action.rebind": "Changer de bot",
252
+ "rebind.title": "Changer de bot ?",
253
+ "rebind.body": "Vous scannerez un QR code pour lier un autre bot intelligent. Il remplace le bot auquel wecom-cli est lié sur cet ordinateur, y compris le wecom-cli de votre terminal.",
254
+ "bot.bound": "Bot lié : {id}",
255
+ "action.open": "Ouvrir la page du code QR",
256
+ "action.cancel": "Annuler",
257
+ "action.retry": "Réessayer",
258
+ "badge.connected": "Autorisé",
259
+ "badge.disconnected": "Non autorisé",
260
+ "badge.connecting": "Autorisation en cours",
261
+ "badge.unavailable": "Non confirmé",
262
+ "activation.title": "Connecter WeCom",
263
+ "activation.body": "Le plugin WeCom est activé. Scannez un code QR pour l’autoriser, puis utilisez-le dans les conversations.",
264
+ "notice.connected": "WeCom autorisé"
265
+ },
266
+ de: {
267
+ "section.title": "WeCom-Autorisierung",
268
+ "status.checking": "Autorisierung wird geprüft",
269
+ "status.disconnected": "Nicht autorisiert",
270
+ "status.unavailable": "Autorisierung kann gerade nicht gelesen werden",
271
+ "status.connected": "Autorisiert",
272
+ "step.authorizing": "Warten auf das Scannen des QR-Codes",
273
+ "step.connecting": "Autorisierung wird bestätigt",
274
+ "detail.disconnected": "Scannen Sie mit WeCom einen QR-Code, um einen smarten Bot zu verknüpfen. Danach können Sie über diesen Bot Dokumente, Kalender, Besprechungen, Aufgaben, Nachrichten und weitere Funktionen von WeCom in Unterhaltungen verwenden.",
275
+ "detail.unavailable": "Die Autorisierung von wecom-cli konnte nicht gelesen werden. Versuchen Sie es später erneut.",
276
+ "detail.connected": "Bitten Sie den Agenten, WeCom direkt in einer Unterhaltung zu verwenden.",
277
+ "detail.authorizing": "Scannen Sie auf der geöffneten Seite den QR-Code mit WeCom, bestätigen Sie und kehren Sie dann hierher zurück, um das Ergebnis zu sehen. Falls sich die Seite nicht geöffnet hat, wählen Sie „QR-Code-Seite öffnen“.",
278
+ "skills.downloading": "Die Fertigkeiten von WeCom werden von GitHub heruntergeladen. Sie stehen in Unterhaltungen zur Verfügung, sobald der Download abgeschlossen ist.",
279
+ "skills.failed": "Die Fertigkeiten von WeCom konnten nicht heruntergeladen werden, daher kann der Agent die WeCom-Anleitungen noch nicht verwenden. Prüfen Sie, ob dieser Computer GitHub erreichen kann, und versuchen Sie es dann erneut.",
280
+ hint: "Die Autorisierung wird mit wecom-cli im Terminal dieses Computers geteilt. Wenn Sie das Plugin deaktivieren, wird sie nicht widerrufen.",
281
+ failed: "Die Aktion wurde nicht abgeschlossen. Versuchen Sie es erneut.",
282
+ "action.connect": "WeCom verbinden",
283
+ "action.rebind": "Bot wechseln",
284
+ "rebind.title": "Bot wechseln?",
285
+ "rebind.body": "Sie scannen einen QR-Code, um einen anderen Smart-Bot zu binden. Er ersetzt den Bot, an den wecom-cli auf diesem Computer gebunden ist, einschließlich des wecom-cli in Ihrem Terminal.",
286
+ "bot.bound": "Gebundener Bot: {id}",
287
+ "action.open": "QR-Code-Seite öffnen",
288
+ "action.cancel": "Abbrechen",
289
+ "action.retry": "Erneut versuchen",
290
+ "badge.connected": "Autorisiert",
291
+ "badge.disconnected": "Nicht autorisiert",
292
+ "badge.connecting": "Wird autorisiert",
293
+ "badge.unavailable": "Unbestätigt",
294
+ "activation.title": "WeCom verbinden",
295
+ "activation.body": "Das WeCom-Plugin ist aktiviert. Scannen Sie einen QR-Code, um es zu autorisieren, und verwenden Sie es dann in Unterhaltungen.",
296
+ "notice.connected": "WeCom autorisiert"
297
+ },
298
+ ru: {
299
+ "section.title": "Авторизация WeCom",
300
+ "status.checking": "Проверка авторизации",
301
+ "status.disconnected": "Не авторизовано",
302
+ "status.unavailable": "Сейчас не удаётся прочитать состояние авторизации",
303
+ "status.connected": "Авторизовано",
304
+ "step.authorizing": "Ожидание сканирования QR-кода",
305
+ "step.connecting": "Подтверждение авторизации",
306
+ "detail.disconnected": "Отсканируйте QR-код в WeCom, чтобы привязать умного бота. После этого в беседах через этого бота можно будет использовать документы, календарь, встречи, задачи, сообщения и другие функции WeCom.",
307
+ "detail.unavailable": "Не удалось прочитать авторизацию wecom-cli. Повторите попытку позже.",
308
+ "detail.connected": "Попросите агента использовать WeCom прямо в беседе.",
309
+ "detail.authorizing": "Отсканируйте QR-код в WeCom на открывшейся странице и подтвердите, затем вернитесь сюда, чтобы увидеть результат. Если страница не открылась, нажмите «Открыть страницу с QR-кодом».",
310
+ "skills.downloading": "Навыки WeCom загружаются с GitHub. Они станут доступны в беседах, когда загрузка завершится.",
311
+ "skills.failed": "Не удалось загрузить навыки WeCom, поэтому агент пока не может использовать руководства WeCom. Убедитесь, что этот компьютер может подключиться к GitHub, затем повторите попытку.",
312
+ hint: "Авторизация общая с wecom-cli в терминале этого компьютера. Отключение плагина её не отменяет.",
313
+ failed: "Действие не завершено. Повторите попытку.",
314
+ "action.connect": "Подключить WeCom",
315
+ "action.rebind": "Сменить бота",
316
+ "rebind.title": "Сменить бота?",
317
+ "rebind.body": "Вы отсканируете QR-код, чтобы привязать другого умного бота. Он заменит бота, к которому привязан wecom-cli на этом компьютере, включая wecom-cli в вашем терминале.",
318
+ "bot.bound": "Привязанный бот: {id}",
319
+ "action.open": "Открыть страницу с QR-кодом",
320
+ "action.cancel": "Отмена",
321
+ "action.retry": "Повторить",
322
+ "badge.connected": "Авторизовано",
323
+ "badge.disconnected": "Не авторизовано",
324
+ "badge.connecting": "Авторизация",
325
+ "badge.unavailable": "Не подтверждено",
326
+ "activation.title": "Подключить WeCom",
327
+ "activation.body": "Плагин WeCom включён. Отсканируйте QR-код, чтобы авторизовать его, и используйте его в беседах.",
328
+ "notice.connected": "WeCom авторизован"
329
+ },
330
+ pt: {
331
+ "section.title": "Autorização do WeCom",
332
+ "status.checking": "Verificando a autorização",
333
+ "status.disconnected": "Não autorizado",
334
+ "status.unavailable": "Não é possível ler a autorização no momento",
335
+ "status.connected": "Autorizado",
336
+ "step.authorizing": "Aguardando a leitura do código QR",
337
+ "step.connecting": "Confirmando a autorização",
338
+ "detail.disconnected": "Leia um código QR com o WeCom para vincular um bot inteligente. Depois disso, você poderá usar nas conversas, por meio desse bot, os documentos, a agenda, as reuniões, as tarefas, as mensagens e outros recursos do WeCom.",
339
+ "detail.unavailable": "Não foi possível ler a autorização do wecom-cli. Tente novamente mais tarde.",
340
+ "detail.connected": "Peça ao agente que use o WeCom diretamente em uma conversa.",
341
+ "detail.authorizing": "Leia o código QR com o WeCom na página que foi aberta e confirme; depois volte aqui para ver o resultado. Se a página não abriu, selecione “Abrir página do código QR”.",
342
+ "skills.downloading": "Baixando as habilidades do WeCom do GitHub. Elas ficarão disponíveis nas conversas quando o download terminar.",
343
+ "skills.failed": "Não foi possível baixar as habilidades do WeCom, então o agente ainda não pode usar os guias do WeCom. Verifique se este computador consegue acessar o GitHub e tente novamente.",
344
+ hint: "A autorização é compartilhada com o wecom-cli no terminal deste computador. Desativar o plugin não a revoga.",
345
+ failed: "A ação não foi concluída. Tente novamente.",
346
+ "action.connect": "Conectar WeCom",
347
+ "action.rebind": "Trocar bot",
348
+ "rebind.title": "Trocar o bot?",
349
+ "rebind.body": "Você vai escanear um QR code para vincular outro bot inteligente. Ele substitui o bot ao qual o wecom-cli está vinculado neste computador, incluindo o wecom-cli do seu terminal.",
350
+ "bot.bound": "Bot vinculado: {id}",
351
+ "action.open": "Abrir página do código QR",
352
+ "action.cancel": "Cancelar",
353
+ "action.retry": "Tentar novamente",
354
+ "badge.connected": "Autorizado",
355
+ "badge.disconnected": "Não autorizado",
356
+ "badge.connecting": "Autorizando",
357
+ "badge.unavailable": "Não confirmado",
358
+ "activation.title": "Conectar WeCom",
359
+ "activation.body": "O plugin do WeCom está ativado. Leia um código QR para autorizá-lo e depois use-o nas conversas.",
360
+ "notice.connected": "WeCom autorizado"
361
+ }
362
+ };
363
+ //#endregion
364
+ //#region lib/types/presentation.js
365
+ /** The npm package whose bundle page carries the authorization section. */
366
+ const WECOM_PACKAGE = "@deepseek-ai/dsh-wecom";
367
+ /**
368
+ * List the operations the section's buttons start; binding a bot reports a notice in the browser that started it.
369
+ * @param text - writes a key of the WeCom text in every shipped language.
370
+ * @returns the operations with their notices.
371
+ */
372
+ function operations(text) {
373
+ return [{ kind: "check" }, {
374
+ kind: "connect",
375
+ notice: text("notice.connected")
376
+ }];
377
+ }
378
+ /**
379
+ * Write the section's title and hint, and the prompt after the bundle is switched on while unauthorized.
380
+ * @param text - writes a key of the WeCom text in every shipped language.
381
+ * @returns the section's fixed text.
382
+ */
383
+ function copy(text) {
384
+ return {
385
+ title: text("section.title"),
386
+ hint: text("hint"),
387
+ activation: {
388
+ title: text("activation.title"),
389
+ body: text("activation.body"),
390
+ connect: text("action.connect")
391
+ }
392
+ };
393
+ }
394
+ const CHECK = {
395
+ kind: "start",
396
+ operation: "check"
397
+ };
398
+ const CONNECT = {
399
+ kind: "start",
400
+ operation: "connect"
401
+ };
402
+ /** The row that reports guides that are not in place yet; a failed download offers a check, which restarts it. */
403
+ function skillsNotes(skills, text) {
404
+ switch (skills) {
405
+ case "installed": return [];
406
+ case "downloading": return [{ text: text("skills.downloading") }];
407
+ case "failed": return [{
408
+ text: text("skills.failed"),
409
+ button: {
410
+ label: text("action.retry"),
411
+ command: CHECK
412
+ }
413
+ }];
414
+ /* v8 ignore next -- closed skills state union */
415
+ default: return assertNever(skills);
416
+ }
417
+ }
418
+ /** The bound bot's QR-code page and the operation's cancel, while an authorization runs. */
419
+ function connectingButtons(operation, text) {
420
+ const buttons = [];
421
+ if (operation.authorizationUrl !== void 0) buttons.push({
422
+ label: text("action.open"),
423
+ command: { kind: "open" },
424
+ variant: "primary"
425
+ });
426
+ if (operation.cancellable) buttons.push({
427
+ label: text("action.cancel"),
428
+ command: { kind: "cancel" },
429
+ variant: "ghost"
430
+ });
431
+ return buttons;
432
+ }
433
+ /**
434
+ * The authorization section for one Host view.
435
+ * @param view - the authorization, the operation in progress, and the last result.
436
+ * @param text - writes a key of the WeCom text in every shipped language.
437
+ * @returns the phase, status, tag, buttons, detail, bound-bot and guide download rows, and failure guidance.
438
+ */
439
+ function presentAccount(view, text) {
440
+ const notes = skillsNotes(view.account.skills, text);
441
+ const { operation } = view;
442
+ if (operation?.kind === "check") return {
443
+ phase: "checking",
444
+ status: text("status.checking"),
445
+ buttons: [],
446
+ notes
447
+ };
448
+ if (operation !== void 0) return {
449
+ phase: "connecting",
450
+ status: text(operation.phase === "authorizing" ? "step.authorizing" : "step.connecting"),
451
+ badge: text("badge.connecting"),
452
+ buttons: connectingButtons(operation, text),
453
+ notes,
454
+ ...operation.authorizationUrl === void 0 ? {} : { detail: text("detail.authorizing") }
455
+ };
456
+ const failed = view.result?.outcome === "failed";
457
+ const failure = failed ? { failure: { text: text("failed") } } : {};
458
+ switch (view.account.state) {
459
+ case "unchecked":
460
+ if (!failed) return {
461
+ phase: "checking",
462
+ status: text("status.checking"),
463
+ buttons: [],
464
+ notes
465
+ };
466
+ return {
467
+ phase: "unavailable",
468
+ status: text("status.unavailable"),
469
+ badge: text("badge.unavailable"),
470
+ buttons: [{
471
+ label: text("action.retry"),
472
+ command: CHECK
473
+ }],
474
+ detail: text("detail.unavailable"),
475
+ notes,
476
+ ...failure
477
+ };
478
+ case "unauthorized": return {
479
+ phase: "disconnected",
480
+ status: text("status.disconnected"),
481
+ badge: text("badge.disconnected"),
482
+ buttons: [{
483
+ label: text("action.connect"),
484
+ command: CONNECT,
485
+ variant: "primary"
486
+ }],
487
+ connect: CONNECT,
488
+ detail: text("detail.disconnected"),
489
+ notes,
490
+ ...failure
491
+ };
492
+ case "authorized": return {
493
+ phase: "connected",
494
+ status: text("status.connected"),
495
+ badge: text("badge.connected"),
496
+ buttons: [{
497
+ label: text("action.rebind"),
498
+ command: CONNECT,
499
+ confirm: {
500
+ title: text("rebind.title"),
501
+ body: text("rebind.body"),
502
+ label: text("action.rebind")
503
+ }
504
+ }],
505
+ detail: text("detail.connected"),
506
+ notes: [...view.account.botId === void 0 ? [] : [{ text: text("bot.bound", { id: view.account.botId }) }], ...notes],
507
+ ...failure
508
+ };
509
+ /* v8 ignore next -- closed account state union */
510
+ default: return assertNever(view.account.state);
511
+ }
512
+ }
513
+ //#endregion
514
+ //#region lib/types/skills.js
515
+ /** The packaged `wecom` entry skill and the upstream guides it indexes. */
516
+ /** The packaged entry, whose index names each guide by its repository path `skills/<guide>/SKILL.md`. */
517
+ const ENTRY = fileURLToPath(new URL("../skills/wecom/SKILL.md", import.meta.url));
518
+ /** Every skill of the official WeCom CLI repository, at the commit the entry's index and guidance were verified with. */
519
+ const WECOM_SKILLS = {
520
+ repository: "WecomTeam/wecom-cli",
521
+ commit: "4c74ff28838d8fba267eaab5179d9d56f9ca61ae",
522
+ directory: "skills",
523
+ exclude: [],
524
+ license: "LICENSE",
525
+ bytes: 1754686,
526
+ sha256: "c75045cc5297d5886c8a7ff01c993a782e50cbd4aa6f6559394b695157d52e10"
527
+ };
528
+ //#endregion
529
+ //#region lib/types/index.js
530
+ /**
531
+ * WeCom plugin: registers the managed wecom-cli and its authorization with `ctx.cliAccounts`, which tells the model the
532
+ * CLI's absolute path and shows the authorization on the Plugins page, and registers the `wecom` entry skill with
533
+ * `ctx.upstreamSkills`, which downloads the upstream guides it indexes. The CLI's authorization is shared with the
534
+ * user's own terminal.
535
+ * @module @deepseek-ai/dsh-wecom
536
+ */
537
+ /** Plugin name. */
538
+ const name = "wecom";
539
+ /** Services the CLI's authorization and the entry skill register with. */
540
+ const inject = ["cliAccounts", "upstreamSkills"];
541
+ /** Validates {@link Config}. */
542
+ const Config = z.object({
543
+ binDir: z.string().min(1),
544
+ skillsDir: z.string().min(1)
545
+ });
546
+ /**
547
+ * Register the entry skill, and the CLI with its authorization, whose view follows the guides' download.
548
+ * @param ctx - Context carrying the CLI account Service and the upstream skills Service.
549
+ * @param config - CLI location and the guides' directory.
550
+ * @throws when `wecom-cli` is not executable or `skillsDir` is not a directory.
551
+ */
552
+ function apply(ctx, config) {
553
+ const executable = resolveCliExecutable(config.binDir);
554
+ const guides = ctx.upstreamSkills.register({
555
+ name,
556
+ entry: ENTRY,
557
+ set: WECOM_SKILLS,
558
+ skillsDir: config.skillsDir
559
+ });
560
+ const account = ctx.cliAccounts.register({
561
+ name,
562
+ packageName: WECOM_PACKAGE,
563
+ cli: {
564
+ product: "WeCom",
565
+ program: PROGRAM,
566
+ executable,
567
+ scripts: true
568
+ },
569
+ account: {
570
+ state: "unchecked",
571
+ skills: guides.state
572
+ },
573
+ check: "check",
574
+ cancellable: ["authorizing"],
575
+ authorizationHosts: ["work.weixin.qq.com"],
576
+ perform: performWith(guides),
577
+ dictionaries,
578
+ operations,
579
+ copy,
580
+ present: presentAccount
581
+ });
582
+ ctx.effect(() => guides.watch((skills) => {
583
+ account.publish({
584
+ ...account.snapshot().account,
585
+ skills
586
+ });
587
+ }), "wecom: guides");
588
+ }
589
+ //#endregion
590
+ export { Config, apply, inject, name };
@@ -0,0 +1,19 @@
1
+ /**
2
+ * Check and QR-code binding of the wecom-cli bot that the user's terminal shares, as the operations `ctx.cliAccounts`
3
+ * runs; binding again replaces it.
4
+ */
5
+ import type { CliOperationControl } from '@deepseek-ai/dsh-cli-account/types';
6
+ import type { UpstreamSkillsHandle } from '@deepseek-ai/dsh-upstream-skills/types';
7
+ import type { WecomAccountState, WecomCommand, WecomOperationKind, WecomPhase } from './types.ts';
8
+ type Control = CliOperationControl<WecomAccountState, WecomPhase, WecomCommand>;
9
+ /** The upstream guides whose state the account carries and whose failed download each check restarts. */
10
+ type Guides = Pick<UpstreamSkillsHandle, 'state' | 'retry'>;
11
+ /**
12
+ * Bind the WeCom account operations to the upstream guides.
13
+ * @param guides - the registered upstream guides.
14
+ * @returns the function that carries out one operation with wecom-cli and publishes the authorization each check
15
+ * observes; it throws when a command fails, prints an unknown status, or leaves no authorization after a binding.
16
+ */
17
+ export declare function performWith(guides: Guides): (kind: WecomOperationKind, control: Control, signal: AbortSignal) => Promise<void>;
18
+ export {};
19
+ //# sourceMappingURL=account.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"account.d.ts","sourceRoot":"","sources":["../../src/account.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,oCAAoC,CAAA;AAC7E,OAAO,KAAK,E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,WAAW,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC,CAAA;IAClD,IAAI,MAAM,CAAC,QAAQ,KAAK,CAAC,IAAI,CAAC,KAAK,KAAK,YAAY,IAAI,KAAK,KAAK,cAAc,CAAC,EAAE,CAAC;QAClF,MAAM,IAAI,KAAK,CAAC,gCAAgC,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,+BAA+B,CAAC,CAAA;IACzG,CAAC;IACD,MAAM,KAAK,GAAG,KAAK,KAAK,YAAY,CAAC,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAA;IACpF,MAAM,OAAO,GAAsB,EAAE,KAAK,EAAE,GAAG,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,MAAM,EAAE,MAAM,CAAC,KAAK,EAAE,CAAA;IAC3G,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC,CAAA;IACxB,OAAO,OAAO,CAAA;AAChB,CAAC"}
@@ -0,0 +1,17 @@
1
+ /** Managed wecom-cli location: the platform binary package that `@wecom/cli` installs. */
2
+ /** The name wecom-cli's guides and scripts run it by. */
3
+ export declare const PROGRAM = "wecom-cli";
4
+ /**
5
+ * Name the executable file as the platform package installs it.
6
+ * @param platform - the Host platform.
7
+ * @returns `wecom-cli`, or `wecom-cli.exe` on Windows.
8
+ */
9
+ export declare function executableFileName(platform: NodeJS.Platform): string;
10
+ /**
11
+ * Locate the managed executable.
12
+ * @param binDir - absolute override; defaults to the `bin` of the installed `@wecom/cli-<platform>-<arch>` package.
13
+ * @returns the absolute path of the executable `wecom-cli`, `wecom-cli.exe` on Windows.
14
+ * @throws when the platform package is missing or the executable is not executable.
15
+ */
16
+ export declare function resolveCliExecutable(binDir: string | undefined): string;
17
+ //# sourceMappingURL=directory.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"directory.d.ts","sourceRoot":"","sources":["../../src/directory.ts"],"names":[],"mappings":"AAAA,0FAA0F;AAM1F,yDAAyD;AACzD,eAAO,MAAM,OAAO,cAAc,CAAA;AAElC;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,MAAM,CAAC,QAAQ,GAAG,MAAM,CAEpE;AAYD;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,CAQvE"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"directory.js","sourceRoot":"","sources":["../../src/directory.ts"],"names":[],"mappings":"AAAA,0FAA0F;AAE1F,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,SAAS,CAAA;AAC/C,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAA;AAC3C,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAEzC,yDAAyD;AACzD,MAAM,CAAC,MAAM,OAAO,GAAG,WAAW,CAAA;AAElC;;;;GAIG;AACH,MAAM,UAAU,kBAAkB,CAAC,QAAyB;IAC1D,OAAO,QAAQ,KAAK,OAAO,CAAC,CAAC,CAAC,GAAG,OAAO,MAAM,CAAC,CAAC,CAAC,OAAO,CAAA;AAC1D,CAAC;AAED,SAAS,iBAAiB;IACxB,MAAM,eAAe,GAAG,cAAc,OAAO,CAAC,QAAQ,IAAI,OAAO,CAAC,IAAI,EAAE,CAAA;IACxE,IAAI,CAAC;QACH,MAAM,OAAO,GAAG,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,yBAAyB,CAAC,CAAC,CAAA;QAC7E,OAAO,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,eAAe,eAAe,CAAC,CAAC,EAAE,KAAK,CAAC,CAAA;IACjF,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,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