@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
@@ -0,0 +1,30 @@
1
+ /**
2
+ * WeCom plugin: registers the managed wecom-cli and its authorization with `ctx.cliAccounts`, which tells the model the
3
+ * CLI's absolute path and shows the authorization on the Plugins page, and registers the `wecom` entry skill with
4
+ * `ctx.upstreamSkills`, which downloads the upstream guides it indexes. The CLI's authorization is shared with the
5
+ * user's own terminal.
6
+ * @module @deepseek-ai/dsh-wecom
7
+ */
8
+ import type { Context } from '@deepseek-ai/cordis';
9
+ import z from '@deepseek-ai/schemastery';
10
+ /** Plugin name. */
11
+ export declare const name = "wecom";
12
+ /** Services the CLI's authorization and the entry skill register with. */
13
+ export declare const inject: string[];
14
+ /** Where wecom-cli and the upstream guides are. */
15
+ export interface Config {
16
+ /** Absolute directory holding the `wecom-cli` executable; defaults to the installed platform package of `@wecom/cli`. */
17
+ binDir?: string;
18
+ /** Absolute directory holding the upstream guides at their repository paths; when set, nothing is downloaded. */
19
+ skillsDir?: string;
20
+ }
21
+ /** Validates {@link Config}. */
22
+ export declare const Config: z<Config>;
23
+ /**
24
+ * Register the entry skill, and the CLI with its authorization, whose view follows the guides' download.
25
+ * @param ctx - Context carrying the CLI account Service and the upstream skills Service.
26
+ * @param config - CLI location and the guides' directory.
27
+ * @throws when `wecom-cli` is not executable or `skillsDir` is not a directory.
28
+ */
29
+ export declare function apply(ctx: Context, config: Config): void;
30
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAClD,OAAO,CAAC,MAAM,0BAA0B,CAAA;AAUxC,mBAAmB;AACnB,eAAO,MAAM,IAAI,UAAU,CAAA;AAG3B,0EAA0E;AAC1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AKG;AACH,MAAM,UAAU,KAAK,CAAC,GAAY,EAAE,MAAc;IAChD,MAAM,UAAU,GAAG,oBAAoB,CAAC,MAAM,CAAC,MAAM,CAAC,CAAA;IACtD,MAAM,MAAM,GAAG,GAAG,CAAC,cAAc,CAAC,QAAQ,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,CAAC,SAAS,EAAE,CAAC,CAAA;IAClH,MAAM,OAAO,GAAG,GAAG,CAAC,WAAW,CAAC,QAAQ,CAAgF;QACtH,IAAI;QACJ,WAAW,EAAE,aAAa;QAC1B,GAAG,EAAE,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,IAAI,EAAE;QACtE,OAAO,EAAE,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,CAAC,KAAK,EAAE;QACrD,KAAK,EAAE,OAAO;QACd,WAAW,EAAE,CAAC,aAAa,CAAC;QAC5B,kBAAkB,EAAE,CAAC,oBAAoB,CAAC;QAC1C,OAAO,EAAE,WAAW,CAAC,MAAM,CAAC;QAC5B,YAAY;QACZ,UAAU;QACV,IAAI;QACJ,OAAO,EAAE,cAAc;KACxB,CAAC,CAAA;IACF,GAAG,CAAC,MAAM,CAAC,GAAG,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,MAAM,EAAE,EAAE,GAAG,OAAO,CAAC,OAAO,CAAC,EAAE,GAAG,OAAO,CAAC,QAAQ,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,CAAC,CAAA,CAAC,CAAC,CAAC,EAAE,eAAe,CAAC,CAAA;AAC7H,CAAC;AACD,sBAAsB"}
@@ -0,0 +1,93 @@
1
+ /** The WeCom text the Plugins page shows; the browser resolves it in its active language. */
2
+ /** Chinese dictionary and key source. */
3
+ export declare const zh: {
4
+ 'section.title': string;
5
+ 'status.checking': string;
6
+ 'status.disconnected': string;
7
+ 'status.unavailable': string;
8
+ 'status.connected': string;
9
+ 'step.authorizing': string;
10
+ 'step.connecting': string;
11
+ 'detail.disconnected': string;
12
+ 'detail.unavailable': string;
13
+ 'detail.connected': string;
14
+ 'detail.authorizing': string;
15
+ 'skills.downloading': string;
16
+ 'skills.failed': string;
17
+ hint: string;
18
+ failed: string;
19
+ 'action.connect': string;
20
+ 'action.rebind': string;
21
+ 'rebind.title': string;
22
+ 'rebind.body': string;
23
+ 'bot.bound': string;
24
+ 'action.open': string;
25
+ 'action.cancel': string;
26
+ 'action.retry': string;
27
+ 'badge.connected': string;
28
+ 'badge.disconnected': string;
29
+ 'badge.connecting': string;
30
+ 'badge.unavailable': string;
31
+ 'activation.title': string;
32
+ 'activation.body': string;
33
+ 'notice.connected': string;
34
+ };
35
+ /** Every key of the WeCom text. */
36
+ export type WecomTextKey = keyof typeof zh;
37
+ /** English dictionary. */
38
+ export declare const en: Record<WecomTextKey, string>;
39
+ /** Japanese dictionary. */
40
+ export declare const ja: Record<WecomTextKey, string>;
41
+ /** Spanish dictionary. */
42
+ export declare const es: Record<WecomTextKey, string>;
43
+ /** French dictionary. */
44
+ export declare const fr: Record<WecomTextKey, string>;
45
+ /** German dictionary. */
46
+ export declare const de: Record<WecomTextKey, string>;
47
+ /** Russian dictionary. */
48
+ export declare const ru: Record<WecomTextKey, string>;
49
+ /** Portuguese dictionary. */
50
+ export declare const pt: Record<WecomTextKey, string>;
51
+ /** The dictionary of every shipped language. */
52
+ export declare const dictionaries: {
53
+ zh: {
54
+ 'section.title': string;
55
+ 'status.checking': string;
56
+ 'status.disconnected': string;
57
+ 'status.unavailable': string;
58
+ 'status.connected': string;
59
+ 'step.authorizing': string;
60
+ 'step.connecting': string;
61
+ 'detail.disconnected': string;
62
+ 'detail.unavailable': string;
63
+ 'detail.connected': string;
64
+ 'detail.authorizing': string;
65
+ 'skills.downloading': string;
66
+ 'skills.failed': string;
67
+ hint: string;
68
+ failed: string;
69
+ 'action.connect': string;
70
+ 'action.rebind': string;
71
+ 'rebind.title': string;
72
+ 'rebind.body': string;
73
+ 'bot.bound': string;
74
+ 'action.open': string;
75
+ 'action.cancel': string;
76
+ 'action.retry': string;
77
+ 'badge.connected': string;
78
+ 'badge.disconnected': string;
79
+ 'badge.connecting': string;
80
+ 'badge.unavailable': string;
81
+ 'activation.title': string;
82
+ 'activation.body': string;
83
+ 'notice.connected': string;
84
+ };
85
+ en: Record<"failed" | "section.title" | "status.checking" | "status.disconnected" | "status.unavailable" | "status.connected" | "step.authorizing" | "step.connecting" | "detail.disconnected" | "detail.unavailable" | "detail.connected" | "detail.authorizing" | "skills.downloading" | "skills.failed" | "hint" | "action.connect" | "action.rebind" | "rebind.title" | "rebind.body" | "bot.bound" | "action.open" | "action.cancel" | "action.retry" | "badge.connected" | "badge.disconnected" | "badge.connecting" | "badge.unavailable" | "activation.title" | "activation.body" | "notice.connected", string>;
86
+ ja: Record<"failed" | "section.title" | "status.checking" | "status.disconnected" | "status.unavailable" | "status.connected" | "step.authorizing" | "step.connecting" | "detail.disconnected" | "detail.unavailable" | "detail.connected" | "detail.authorizing" | "skills.downloading" | "skills.failed" | "hint" | "action.connect" | "action.rebind" | "rebind.title" | "rebind.body" | "bot.bound" | "action.open" | "action.cancel" | "action.retry" | "badge.connected" | "badge.disconnected" | "badge.connecting" | "badge.unavailable" | "activation.title" | "activation.body" | "notice.connected", string>;
87
+ es: Record<"failed" | "section.title" | "status.checking" | "status.disconnected" | "status.unavailable" | "status.connected" | "step.authorizing" | "step.connecting" | "detail.disconnected" | "detail.unavailable" | "detail.connected" | "detail.authorizing" | "skills.downloading" | "skills.failed" | "hint" | "action.connect" | "action.rebind" | "rebind.title" | "rebind.body" | "bot.bound" | "action.open" | "action.cancel" | "action.retry" | "badge.connected" | "badge.disconnected" | "badge.connecting" | "badge.unavailable" | "activation.title" | "activation.body" | "notice.connected", string>;
88
+ fr: Record<"failed" | "section.title" | "status.checking" | "status.disconnected" | "status.unavailable" | "status.connected" | "step.authorizing" | "step.connecting" | "detail.disconnected" | "detail.unavailable" | "detail.connected" | "detail.authorizing" | "skills.downloading" | "skills.failed" | "hint" | "action.connect" | "action.rebind" | "rebind.title" | "rebind.body" | "bot.bound" | "action.open" | "action.cancel" | "action.retry" | "badge.connected" | "badge.disconnected" | "badge.connecting" | "badge.unavailable" | "activation.title" | "activation.body" | "notice.connected", string>;
89
+ de: Record<"failed" | "section.title" | "status.checking" | "status.disconnected" | "status.unavailable" | "status.connected" | "step.authorizing" | "step.connecting" | "detail.disconnected" | "detail.unavailable" | "detail.connected" | "detail.authorizing" | "skills.downloading" | "skills.failed" | "hint" | "action.connect" | "action.rebind" | "rebind.title" | "rebind.body" | "bot.bound" | "action.open" | "action.cancel" | "action.retry" | "badge.connected" | "badge.disconnected" | "badge.connecting" | "badge.unavailable" | "activation.title" | "activation.body" | "notice.connected", string>;
90
+ ru: Record<"failed" | "section.title" | "status.checking" | "status.disconnected" | "status.unavailable" | "status.connected" | "step.authorizing" | "step.connecting" | "detail.disconnected" | "detail.unavailable" | "detail.connected" | "detail.authorizing" | "skills.downloading" | "skills.failed" | "hint" | "action.connect" | "action.rebind" | "rebind.title" | "rebind.body" | "bot.bound" | "action.open" | "action.cancel" | "action.retry" | "badge.connected" | "badge.disconnected" | "badge.connecting" | "badge.unavailable" | "activation.title" | "activation.body" | "notice.connected", string>;
91
+ pt: Record<"failed" | "section.title" | "status.checking" | "status.disconnected" | "status.unavailable" | "status.connected" | "step.authorizing" | "step.connecting" | "detail.disconnected" | "detail.unavailable" | "detail.connected" | "detail.authorizing" | "skills.downloading" | "skills.failed" | "hint" | "action.connect" | "action.rebind" | "rebind.title" | "rebind.body" | "bot.bound" | "action.open" | "action.cancel" | "action.retry" | "badge.connected" | "badge.disconnected" | "badge.connecting" | "badge.unavailable" | "activation.title" | "activation.body" | "notice.connected", string>;
92
+ };
93
+ //# sourceMappingURL=locales.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"locales.d.ts","sourceRoot":"","sources":["../../src/locales.ts"],"names":[],"mappings":"AAAA,6FAA6F;AAE7F,yCAAyC;AACzC,eAAO,MAAM,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+Bd,CAAA;AAED,mCAAmC;AACnC,MAAM,MAAM,YAAY,GAAG,MAAM,OAAO,EAAE,CAAA;AAE1C,0BAA0B;AAC1B,eAAO,MAAM,EAAE,EAAE,MAAM,CAAC,YAAY,EAAE,MAAM,CA+B3C,CAAA;AAED,2BAA2B;AAC3B,eAAO,MAAM,EAAE,EAAE,MAAM,CAAC,YAAY,EAAE,MAAM,CA+B3C,CAAA;AAED,0BAA0B;AAC1B,eAAO,MAAM,EAAE,EAAE,MAAM,CAAC,YAAY,EAAE,MAAM,CA+B3C,CAAA;AAED,yBAAyB;AACzB,eAAO,MAAM,EAAE,EAAE,MAAM,CAAC,YAAY,EAAE,MAAM,CA+B3C,CAAA;AAED,yBAAyB;AACzB,eAAO,MAAM,EAAE,EAAE,MAAM,CAAC,YAAY,EAAE,MAAM,CA+B3C,CAAA;AAED,0BAA0B;AAC1B,eAAO,MAAM,EAAE,EAAE,MAAM,CAAC,YAAY,EAAE,MAAM,CA+B3C,CAAA;AAED,6BAA6B;AAC7B,eAAO,MAAM,EAAE,EAAE,MAAM,CAAC,YAAY,EAAE,MAAM,CA+B3C,CAAA;AAED,gDAAgD;AAChD,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAAqC,CAAA"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"locales.js","sourceRoot":"","sources":["../../src/locales.ts"],"names":[],"mappings":"AAAA,6FAA6F;AAE7F,yCAAyC;AACzC,MAAM,CAAC,MAAM,EAAE,GAAG;IAChB,eAAe,EAAE,QAAQ;IACzB,iBAAiB,EAAE,QAAQ;IAC3B,qBAAqB,EAAE,KAAK;IAC5B,oBAAoB,EAAE,YAAY;IAClC,kBAAkB,EAAE,KAAK;IACzB,kBAAkB,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AA2B;IAC9C,qBAAqB,EAAE,gBAAgB;IACvC,oBAAoB,EAAE,6CAA6C;IACnE,kBAAkB,EAAE,YAAY;IAChC,kBAAkB,EAAE,mCAAmC;IACvD,iBAAiB,EAAE,2BAA2B;IAC9C,qBAAqB,EAAE,8NAA8N;IACrP,oBAAoB,EAAE,8EAA8E;IACpG,kBAAkB,EAAE,6DAA6D;IACjF,oBAAoB,EAAE,yKAAyK;IAC/L,oBAAoB,EAAE,gHAAgH;IACtI,eAAe,EAAE,kLAAkL;IACnM,IAAI,EAAE,8GAA8G;IACpH,MAAM,EAAE,4CAA4C;IACpD,gBAAgB,EAAE,gBAAgB;IAClC,eAAe,EAAE,YAAY;IAC7B,cAAc,EAAE,eAAe;IAC/B,aAAa,EAAE,mLAAmL;IAClM,WAAW,EAAE,qBAAqB;IAClC,aAAa,EAAE,2BAA2B;IAC1C,eAAe,EAAE,UAAU;IAC3B,cAAc,EAAE,kBAAkB;IAClC,iBAAiB,EAAE,YAAY;IAC/B,oBAAoB,EAAE,gBAAgB;IACtC,kBAAkB,EAAE,aAAa;IACjC,mBAAmB,EAAE,gBAAgB;IACrC,kBAAkB,EAAE,gBAAgB;IACpC,iBAAiB,EAAE,kGAAkG;IACrH,kBAAkB,EAAE,kBAAkB;CACvC,CAAA;AAED,gDAAgD;AAChD,MAAM,CAAC,MAAM,YAAY,GAAG,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,CAAA"}
@@ -0,0 +1,29 @@
1
+ /** The WeCom authorization section the Plugins page shows for each Host view. */
2
+ import type { CliAccountText } from '@deepseek-ai/dsh-cli-account/types';
3
+ import type { ConnectorAccountCopy, ConnectorAccountDisplay, ConnectorAccountOperation } from '@deepseek-ai/dsh-client-ui-connector-account/types';
4
+ import type { WecomTextKey } from './locales.ts';
5
+ import type { WecomOperationKind, WecomState } from './types.ts';
6
+ type Text = CliAccountText<WecomTextKey>;
7
+ /** The npm package whose bundle page carries the authorization section. */
8
+ export declare const WECOM_PACKAGE = "@deepseek-ai/dsh-wecom";
9
+ /**
10
+ * List the operations the section's buttons start; binding a bot reports a notice in the browser that started it.
11
+ * @param text - writes a key of the WeCom text in every shipped language.
12
+ * @returns the operations with their notices.
13
+ */
14
+ export declare function operations(text: Text): readonly ConnectorAccountOperation<WecomOperationKind>[];
15
+ /**
16
+ * Write the section's title and hint, and the prompt after the bundle is switched on while unauthorized.
17
+ * @param text - writes a key of the WeCom text in every shipped language.
18
+ * @returns the section's fixed text.
19
+ */
20
+ export declare function copy(text: Text): ConnectorAccountCopy;
21
+ /**
22
+ * The authorization section for one Host view.
23
+ * @param view - the authorization, the operation in progress, and the last result.
24
+ * @param text - writes a key of the WeCom text in every shipped language.
25
+ * @returns the phase, status, tag, buttons, detail, bound-bot and guide download rows, and failure guidance.
26
+ */
27
+ export declare function presentAccount(view: WecomState, text: Text): ConnectorAccountDisplay;
28
+ export {};
29
+ //# sourceMappingURL=presentation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"presentation.d.ts","sourceRoot":"","sources":["../../src/presentation.ts"],"names":[],"mappings":"AAAA,iFAAiF;AACjF,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAA;AACxE,OAAO,KAAK,EACc,oBAAoB,EAAE,uBAAuB,EACrE,yBAAyB,EAC1B,MAAM,oDAAoD,CAAA;AAG3D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,cAAc,CAAA;AAChD,OAAO,KAAK,EAAE,kBAAkB,EAAE,UAAU,EAAE,MAAM,YAAY,CAAA;AAEhE,KAAK,IAAI,GAAG,cAAc,CAAC,YAAY,CAAC,CAAA;AAExC,2EAA2E;AAC3E,eAAO,MAAM,aAAa,2BAA2B,CAAA;AAGrD;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,IAAI,EAAE,IAAI,GAAG,SAAS,yBAAyB,CAAC,kBAAkB,CAAC,EAAE,C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AAE,CAAC,EAAE,GAAG,KAAK,CAAC;gBACvH,GAAG,OAAO;aACX,CAAA;QACH,kDAAkD;QAClD,OAAO,CAAC,CAAC,OAAO,WAAW,CAAC,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAA;IACjD,CAAC;AACH,CAAC"}
@@ -0,0 +1,7 @@
1
+ /** The packaged `wecom` entry skill and the upstream guides it indexes. */
2
+ import type { UpstreamSkillSet } from '@deepseek-ai/dsh-upstream-skills';
3
+ /** The packaged entry, whose index names each guide by its repository path `skills/<guide>/SKILL.md`. */
4
+ export declare const ENTRY: string;
5
+ /** Every skill of the official WeCom CLI repository, at the commit the entry's index and guidance were verified with. */
6
+ export declare const WECOM_SKILLS: UpstreamSkillSet;
7
+ //# sourceMappingURL=skills.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"skills.d.ts","sourceRoot":"","sources":["../../src/skills.ts"],"names":[],"mappings":"AAAA,2EAA2E;AAG3E,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAA;AAExE,yGAAyG;AACzG,eAAO,MAAM,KAAK,QAAsE,CAAA;AAExF,yHAAyH;AACzH,eAAO,MAAM,YAAY,EAAE,gBAQ1B,CAAA"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"skills.js","sourceRoot":"","sources":["../../src/skills.ts"],"names":[],"mappings":"AAAA,2EAA2E;AAE3E,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AAGxC,yGAAyG;AACzG,MAAM,CAAC,MAAM,KAAK,GAAG,aAAa,CAAC,IAAI,GAAG,CAAC,0BAA0B,EAAE,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAA;AAExF,yHAAyH;AACzH,MAAM,CAAC,MAAM,YAAY,GAAqB;IAC5C,UAAU,EAAE,qBAAqB;IACjC,MAAM,EAAE,0CAA0C;IAClD,SAAS,EAAE,QAAQ;IACnB,OAAO,EAAE,EAAE;IACX,OAAO,EAAE,SAAS;IAClB,KAAK,EAAE,SAAS;IAChB,MAAM,EAAE,kEAAkE;CAC3E,CAAA"}
@@ -0,0 +1,20 @@
1
+ /** Credential-free WeCom authorization and operation views the Plugins page presenter reads. */
2
+ import type { CliAccountView } from '@deepseek-ai/dsh-cli-account/types';
3
+ import type { UpstreamSkillsState } from '@deepseek-ai/dsh-upstream-skills/types';
4
+ /** The CLI's authorization as the latest `auth show` reported it, and where the upstream guides stand. */
5
+ export interface WecomAccountState {
6
+ readonly state: 'unchecked' | 'unauthorized' | 'authorized';
7
+ /** The bound bot's id, when the CLI reports one with an authorized state. */
8
+ readonly botId?: string;
9
+ /** Whether the guides the `wecom` skill indexes are in place, downloading, or unavailable until a check retries them. */
10
+ readonly skills: UpstreamSkillsState;
11
+ }
12
+ /** The operations the Plugins page starts. */
13
+ export type WecomOperationKind = 'check' | 'connect';
14
+ /** The WeCom step of an operation, besides the Service's `checking` and `cancelling`. */
15
+ export type WecomPhase = 'authorizing';
16
+ /** The wecom-cli commands an operation runs; a failed operation reports its last one with that command's exit code. */
17
+ export type WecomCommand = 'auth-init' | 'auth-status';
18
+ /** The complete WeCom view the presenter reads after each change. */
19
+ export type WecomState = CliAccountView<WecomAccountState, WecomOperationKind, WecomPhase, WecomCommand>;
20
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAAA,gGAAgG;AAEhG,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAA;AACxE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,wCAAwC,CAAA;AAEjF,0GAA0G;AAC1G,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,KAAK,EAAE,WAAW,GAAG,cAAc,GAAG,YAAY,CAAA;IAC3D,6EAA6E;IAC7E,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAA;IACvB,yHAAyH;IACzH,QAAQ,CAAC,MAAM,EAAE,mBAAmB,CAAA;CACrC;AAED,8CAA8C;AAC9C,MAAM,MAAM,kBAAkB,GAAG,OAAO,GAAG,SAAS,CAAA;AAEpD,yFAAyF;AACzF,MAAM,MAAM,UAAU,GAAG,aAAa,CAAA;AAEtC,uHAAuH;AACvH,MAAM,MAAM,YAAY,GAAG,WAAW,GAAG,aAAa,CAAA;AAEtD,qEAAqE;AACrE,MAAM,MAAM,UAAU,GAAG,cAAc,CAAC,iBAAiB,EAAE,kBAAkB,EAAE,UAAU,EAAE,YAAY,CAAC,CAAA"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAAA,gGAAgG"}
package/locale/de.json ADDED
@@ -0,0 +1,7 @@
1
+ {
2
+ "meta": {
3
+ "title": "WeCom-Plugin",
4
+ "description": "Verwenden Sie Dokumente, Kalender, Besprechungen, Aufgaben und Nachrichten von WeCom in Unterhaltungen.",
5
+ "detail": "docs/DETAIL.md"
6
+ }
7
+ }
package/locale/en.json ADDED
@@ -0,0 +1,7 @@
1
+ {
2
+ "meta": {
3
+ "title": "WeCom plugin",
4
+ "description": "Use WeCom docs, calendar, meetings, to-dos, and messages in conversations.",
5
+ "detail": "docs/DETAIL.md"
6
+ }
7
+ }
package/locale/es.json ADDED
@@ -0,0 +1,7 @@
1
+ {
2
+ "meta": {
3
+ "title": "Complemento de WeCom",
4
+ "description": "Use documentos, calendario, reuniones, tareas pendientes y mensajes de WeCom en las conversaciones.",
5
+ "detail": "docs/DETAIL.md"
6
+ }
7
+ }
package/locale/fr.json ADDED
@@ -0,0 +1,7 @@
1
+ {
2
+ "meta": {
3
+ "title": "Plugin WeCom",
4
+ "description": "Utilisez les documents, le calendrier, les réunions, les tâches et les messages de WeCom dans les conversations.",
5
+ "detail": "docs/DETAIL.md"
6
+ }
7
+ }
package/locale/ja.json ADDED
@@ -0,0 +1,7 @@
1
+ {
2
+ "meta": {
3
+ "title": "WeCom プラグイン",
4
+ "description": "会話の中で WeCom のドキュメント、カレンダー、会議、ToDo、メッセージを使用します。",
5
+ "detail": "docs/DETAIL.md"
6
+ }
7
+ }
package/locale/pt.json ADDED
@@ -0,0 +1,7 @@
1
+ {
2
+ "meta": {
3
+ "title": "Plugin do WeCom",
4
+ "description": "Use documentos, agenda, reuniões, tarefas e mensagens do WeCom nas conversas.",
5
+ "detail": "docs/DETAIL.md"
6
+ }
7
+ }
package/locale/ru.json ADDED
@@ -0,0 +1,7 @@
1
+ {
2
+ "meta": {
3
+ "title": "Плагин WeCom",
4
+ "description": "Используйте документы, календарь, встречи, задачи и сообщения WeCom в беседах.",
5
+ "detail": "docs/DETAIL.md"
6
+ }
7
+ }
package/locale/zh.json ADDED
@@ -0,0 +1,7 @@
1
+ {
2
+ "meta": {
3
+ "title": "企业微信插件",
4
+ "description": "在对话中使用企业微信的文档、日程、会议、待办和消息。",
5
+ "detail": "docs/DETAIL.zh.md"
6
+ }
7
+ }
package/package.json CHANGED
@@ -1,6 +1,65 @@
1
1
  {
2
2
  "name": "@deepseek-ai/dsh-wecom",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
3
+ "description": "WeCom plugin: the official wecom-cli with its skills, and authorization from the Plugins page",
4
+ "version": "0.2.3-alpha.1",
5
+ "icon": "./icon.svg",
6
+ "publishConfig": {
7
+ "access": "public"
8
+ },
9
+ "repository": {
10
+ "type": "git",
11
+ "url": "git+https://github.com/deepseek-ai/deepseek-harness.git",
12
+ "directory": "packages/connector/wecom"
13
+ },
14
+ "type": "module",
15
+ "main": "lib/index.js",
16
+ "types": "lib/types/index.d.ts",
17
+ "exports": {
18
+ ".": {
19
+ "types": "./lib/types/index.d.ts",
20
+ "default": "./lib/index.js"
21
+ },
22
+ "./locale/*.json": "./locale/*.json",
23
+ "./src/*": "./src/*",
24
+ "./package.json": "./package.json",
25
+ "./cordis.patch.yml": "./cordis.patch.yml"
26
+ },
27
+ "files": [
28
+ "icon.svg",
29
+ "locale/*.json",
30
+ "docs",
31
+ "lib/index.js",
32
+ "cordis.patch.yml",
33
+ "skills",
34
+ "lib/types/**/*.d.ts",
35
+ "lib/types/**/*.d.ts.map",
36
+ "lib/**/*.js.map",
37
+ "src"
38
+ ],
39
+ "license": "MIT",
40
+ "dsh": {
41
+ "bundle": {
42
+ "patch": "./cordis.patch.yml"
43
+ }
44
+ },
45
+ "dependencies": {
46
+ "@deepseek-ai/dsh-util-values": "0.2.3-alpha.1",
47
+ "@deepseek-ai/schemastery": "~3.19.0",
48
+ "@wecom/cli": "1.3.4"
49
+ },
50
+ "peerDependencies": {
51
+ "@deepseek-ai/cordis": "~4.1.0",
52
+ "@deepseek-ai/dsh-cli-account": "0.2.3-alpha.1",
53
+ "@deepseek-ai/dsh-upstream-skills": "0.2.3-alpha.1"
54
+ },
55
+ "devDependencies": {
56
+ "@deepseek-ai/cordis": "~4.1.0",
57
+ "@deepseek-ai/dsh-cli-account": "0.2.3-alpha.1",
58
+ "@deepseek-ai/dsh-client-ui-connector-account": "0.2.3-alpha.1",
59
+ "@deepseek-ai/dsh-skill": "0.2.3-alpha.1",
60
+ "@deepseek-ai/dsh-subprocess": "0.2.3-alpha.1",
61
+ "@deepseek-ai/dsh-session-projection": "0.2.3-alpha.1",
62
+ "@deepseek-ai/dsh-system-prompt": "0.2.3-alpha.1",
63
+ "@deepseek-ai/dsh-upstream-skills": "0.2.3-alpha.1"
64
+ }
6
65
  }
@@ -0,0 +1,40 @@
1
+ ---
2
+ name: wecom
3
+ description: 企业微信插件:通过 wecom-cli 使用企业微信的通讯录、消息、日程、在线会议、待办、邮件、微盘、文档、在线表格、智能表格、智能文档和 PPT。用户提到企业微信或这些功能,或给出 doc.weixin.qq.com、drive.weixin.qq.com 链接时,先加载本技能,再按索引读取对应子指南。
4
+ ---
5
+
6
+ # 企业微信插件
7
+
8
+ ## DSH 指引
9
+
10
+ - 在面向用户的回复中,把这项集成称为“企业微信插件”。`wecom-cli` 由企业微信插件安装,按当前 runtime context 给出的绝对路径运行,不要直接按名称运行。不要执行 `npm install -g @wecom/cli`,也不要用其他方式另装或升级 `wecom-cli`。
11
+ - `wecom-cli` 的授权保存在这台电脑的默认配置目录,与用户自己终端里的 `wecom-cli` 共用。
12
+ - 首次运行业务命令前,先读 `wecomcli-shared` 子指南并按它检查授权。本节与该子指南冲突时以本节为准:它 Step 1 的版本检查不需要安装或升级;它 Step 3 的初始化改为下一条。
13
+ - 未授权时,先请用户在「插件」中打开企业微信插件页面,点击“连接企业微信”并用企业微信扫码授权;用户完成后重新检查授权。只有用户要求在本次对话中完成授权时,才执行 `wecom-cli auth init --noninteractive`:它会输出扫码链接和二维码,并最多等待 5 分钟扫码,把扫码链接告诉用户。它会把凭据写到工作区之外,保存被拒绝时这次扫码也会作废:第一次运行就把 Shell 工具的 `sandbox_permissions` 设为能写工作区之外的最窄模式,并填写 `justification`。
14
+ - 其他 `wecom-cli` 命令在现有沙箱中运行;只有凭据、缓存或日志写入被拒绝时,才设置 `sandbox_permissions`。
15
+ - 命令返回 `errcode` 853004,也就是 `cli token expired` 时,通常是 `wecom-cli` 换到了新 token,却写不进工作区之外的配置目录,于是返回了原错误:授权没有失效,也不需要升级。不要向用户转述返回里的 `help_message`,也不要请用户重新授权,设置 `sandbox_permissions` 和 `justification` 重跑同一条命令。重跑后仍返回 853004,才请用户在企业微信插件页面重新授权。
16
+ - 不要索取或输出 Bot Secret、token 等凭据。
17
+
18
+ ## 子指南索引
19
+
20
+ - `wecomcli-shared`:授权检查和所有子指南共用的输出约束(ID 类字段不外露);首次运行 `wecom-cli` 业务命令前先读。
21
+ - `wecomcli-contact`:按姓名、拼音、英文名或别名搜索通讯录,查询 userid、部门和职务。
22
+ - `wecomcli-message`:查询可以发消息的会话,向单聊或群聊发送文本、Markdown、图片、文件、语音或视频。
23
+ - `wecomcli-calendar`:不含在线会议链接的日程、会议室预订和查忙闲;用户只说“开会”“约个会”时,先按本指南或 `wecomcli-meeting` 的消歧流程追问,不要直接创建。
24
+ - `wecomcli-meeting`:含会议号或入会链接的在线会议的创建、查询、纪要、转写、更新和取消;消歧规则同上。
25
+ - `wecomcli-todo`:待办的创建、完成、查询筛选和修改。
26
+ - `wecomcli-email`:邮件的收发、搜索和详情;只有用户明确提到邮箱或邮件时,才用它发送日程或会议邀请。
27
+ - `wecomcli-disk`:微盘(网盘、共享空间)中文件的列出、搜索、元信息、位置、上传、下载和重命名;在线文档的内容读写交给对应的文档子指南。
28
+ - `wecomcli-media`:按 media_id 下载媒体文件,或上传本地文件换取 media_id;只搬运文件,不解析内容。
29
+ - `wecomcli-doc-manage`:各类文档的搜索(含最近浏览)、改名、成员权限和加入规则。
30
+ - `wecomcli-smartpage`:智能文档;用户只说“文档”“新建文档”“整理成文档”等未指定类型时使用,也负责把 .md 导入为文档。
31
+ - `wecomcli-doc`:doc 文档;仅当用户明确说 doc、docx、word、在线文档或 office 文档,或给出 `doc.weixin.qq.com/doc/` 链接时使用。
32
+ - `wecomcli-smartsheet`:智能表格的记录、字段、视图、图表和样式;用户没有明确说“在线表格”时默认使用。
33
+ - `wecomcli-sheet`:在线表格;用户明确说“在线表格”或“excel 表格”、要导入 CSV 或 Excel,或给出 `doc.weixin.qq.com/sheet/` 链接时使用。
34
+ - `wecomcli-pptx`:生成、编辑在线 PPT,或把本地 .ppt、.pptx 导入为在线文档;只读取本地 PPT 内容时改用 `wecomcli-media`。
35
+
36
+ ## 打开子指南
37
+
38
+ - 子指南不是独立的 skill,不要用 `skill` 工具加载;用文件读取工具打开本技能目录下的 `skills/<名字>/SKILL.md`。
39
+ - 子指南正文按名字提到的技能(例如“wecomcli-shared 技能”“改用 wecomcli-meeting 技能”)就是 `skills/<名字>/SKILL.md`,同样用文件读取工具打开。
40
+ - 子指南中的相对路径(例如 `references/...`、`../wecomcli-calendar/...`)相对该子指南自己的目录 `skills/<名字>/`。
package/src/account.ts ADDED
@@ -0,0 +1,69 @@
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
+
6
+ import type { CliOperationControl } from '@deepseek-ai/dsh-cli-account/types'
7
+ import type { UpstreamSkillsHandle } from '@deepseek-ai/dsh-upstream-skills/types'
8
+ import { assertNever } from '@deepseek-ai/dsh-util-values'
9
+ import type { WecomAccountState, WecomCommand, WecomOperationKind, WecomPhase } from './types.ts'
10
+
11
+ const AUTHORIZATION_LINK = /^\s*(https:\/\/\S+)\s*$/u
12
+ /** `auth show` prints `Status: authorized` or `Status: unauthorized`, then `Bot ID: <id>` when a bound bot gives the authorization. */
13
+ const STATUS_LINE = /^Status:[ \t]*(authorized|unauthorized)[ \t]*$/mu
14
+ const BOT_LINE = /^Bot ID:[ \t]*(\S+)[ \t]*$/mu
15
+
16
+ type Control = CliOperationControl<WecomAccountState, WecomPhase, WecomCommand>
17
+
18
+ /** The upstream guides whose state the account carries and whose failed download each check restarts. */
19
+ type Guides = Pick<UpstreamSkillsHandle, 'state' | 'retry'>
20
+
21
+ /* jscpd:ignore-start -- CLI app plugins with downloaded guides bind their operations to the guides alike. */
22
+ /**
23
+ * Bind the WeCom account operations to the upstream guides.
24
+ * @param guides - the registered upstream guides.
25
+ * @returns the function that carries out one operation with wecom-cli and publishes the authorization each check
26
+ * observes; it throws when a command fails, prints an unknown status, or leaves no authorization after a binding.
27
+ */
28
+ export function performWith(guides: Guides): (kind: WecomOperationKind, control: Control, signal: AbortSignal) => Promise<void> {
29
+ return async (kind, control, signal) => {
30
+ switch (kind) {
31
+ case 'check':
32
+ await check(guides, control, signal)
33
+ return
34
+ case 'connect': return connect(guides, control, signal)
35
+ /* v8 ignore next -- closed operation kind union */
36
+ default: return assertNever(kind)
37
+ }
38
+ }
39
+ }
40
+ /* jscpd:ignore-end */
41
+
42
+ /** Bind a bot through the CLI's QR-code page, then confirm the CLI reports it authorized. */
43
+ async function connect(guides: Guides, control: Control, signal: AbortSignal): Promise<void> {
44
+ control.stage('authorizing')
45
+ const init = await control.run('auth-init', ['auth', 'init', '--noninteractive', '--no-browser'], signal, {
46
+ awaitsUser: true,
47
+ onLine: (stream, line) => {
48
+ const link = stream === 'stdout' ? AUTHORIZATION_LINK.exec(line) : null
49
+ if (link !== null) control.offer(link[1] as string)
50
+ },
51
+ })
52
+ if (init.exitCode !== 0) throw new Error(`wecom: auth init exited with ${String(init.exitCode)}`)
53
+ control.stage('checking')
54
+ if ((await check(guides, control, signal)).state !== 'authorized') throw new Error('wecom: auth init left no authorization')
55
+ }
56
+
57
+ /** Restart a failed download of the guides without waiting for it, then read the authorization state, publish it, and return it. */
58
+ async function check(guides: Guides, control: Control, signal: AbortSignal): Promise<WecomAccountState> {
59
+ guides.retry()
60
+ const result = await control.run('auth-status', ['auth', 'show'], signal)
61
+ const state = STATUS_LINE.exec(result.stdout)?.[1]
62
+ if (result.exitCode !== 0 || (state !== 'authorized' && state !== 'unauthorized')) {
63
+ throw new Error(`wecom: auth show exited with ${String(result.exitCode)} or printed an unknown status`)
64
+ }
65
+ const botId = state === 'authorized' ? BOT_LINE.exec(result.stdout)?.[1] : undefined
66
+ const account: WecomAccountState = { state, ...botId === undefined ? {} : { botId }, skills: guides.state }
67
+ control.publish(account)
68
+ return account
69
+ }
@@ -0,0 +1,43 @@
1
+ /** Managed wecom-cli location: the platform binary package that `@wecom/cli` installs. */
2
+
3
+ import { accessSync, constants } from 'node:fs'
4
+ import { createRequire } from 'node:module'
5
+ import { dirname, join } from 'node:path'
6
+
7
+ /** The name wecom-cli's guides and scripts run it by. */
8
+ export const PROGRAM = 'wecom-cli'
9
+
10
+ /**
11
+ * Name the executable file as the platform package installs it.
12
+ * @param platform - the Host platform.
13
+ * @returns `wecom-cli`, or `wecom-cli.exe` on Windows.
14
+ */
15
+ export function executableFileName(platform: NodeJS.Platform): string {
16
+ return platform === 'win32' ? `${PROGRAM}.exe` : PROGRAM
17
+ }
18
+
19
+ function platformDirectory(): string {
20
+ const platformPackage = `@wecom/cli-${process.platform}-${process.arch}`
21
+ try {
22
+ const require = createRequire(import.meta.resolve('@wecom/cli/package.json'))
23
+ return join(dirname(require.resolve(`${platformPackage}/package.json`)), 'bin')
24
+ } catch (error) {
25
+ throw new Error(`wecom: ${platformPackage} is not installed; @wecom/cli has no binary for this platform, or set binDir`, { cause: error })
26
+ }
27
+ }
28
+
29
+ /**
30
+ * Locate the managed executable.
31
+ * @param binDir - absolute override; defaults to the `bin` of the installed `@wecom/cli-<platform>-<arch>` package.
32
+ * @returns the absolute path of the executable `wecom-cli`, `wecom-cli.exe` on Windows.
33
+ * @throws when the platform package is missing or the executable is not executable.
34
+ */
35
+ export function resolveCliExecutable(binDir: string | undefined): string {
36
+ const program = join(binDir ?? platformDirectory(), executableFileName(process.platform))
37
+ try {
38
+ accessSync(program, constants.X_OK)
39
+ } catch (error) {
40
+ throw new Error(`wecom: ${program} is not executable; reinstall the plugin or set binDir`, { cause: error })
41
+ }
42
+ return program
43
+ }
package/src/index.ts ADDED
@@ -0,0 +1,66 @@
1
+ /**
2
+ * WeCom plugin: registers the managed wecom-cli and its authorization with `ctx.cliAccounts`, which tells the model the
3
+ * CLI's absolute path and shows the authorization on the Plugins page, and registers the `wecom` entry skill with
4
+ * `ctx.upstreamSkills`, which downloads the upstream guides it indexes. The CLI's authorization is shared with the
5
+ * user's own terminal.
6
+ * @module @deepseek-ai/dsh-wecom
7
+ */
8
+
9
+ import type { Context } from '@deepseek-ai/cordis'
10
+ import z from '@deepseek-ai/schemastery'
11
+ import type {} from '@deepseek-ai/dsh-cli-account'
12
+ import type {} from '@deepseek-ai/dsh-upstream-skills'
13
+ import { performWith } from './account.ts'
14
+ import { PROGRAM, resolveCliExecutable } from './directory.ts'
15
+ import { dictionaries, type WecomTextKey } from './locales.ts'
16
+ import { copy, operations, presentAccount, WECOM_PACKAGE } from './presentation.ts'
17
+ import { ENTRY, WECOM_SKILLS } from './skills.ts'
18
+ import type { WecomAccountState, WecomCommand, WecomOperationKind, WecomPhase } from './types.ts'
19
+
20
+ /** Plugin name. */
21
+ export const name = 'wecom'
22
+
23
+ /* jscpd:ignore-start -- CLI app plugins with downloaded guides declare the same services, config, and registration. */
24
+ /** Services the CLI's authorization and the entry skill register with. */
25
+ export const inject = ['cliAccounts', 'upstreamSkills']
26
+
27
+ /** Where wecom-cli and the upstream guides are. */
28
+ export interface Config {
29
+ /** Absolute directory holding the `wecom-cli` executable; defaults to the installed platform package of `@wecom/cli`. */
30
+ binDir?: string
31
+ /** Absolute directory holding the upstream guides at their repository paths; when set, nothing is downloaded. */
32
+ skillsDir?: string
33
+ }
34
+
35
+ /** Validates {@link Config}. */
36
+ export const Config: z<Config> = z.object({
37
+ binDir: z.string().min(1),
38
+ skillsDir: z.string().min(1),
39
+ })
40
+
41
+ /**
42
+ * Register the entry skill, and the CLI with its authorization, whose view follows the guides' download.
43
+ * @param ctx - Context carrying the CLI account Service and the upstream skills Service.
44
+ * @param config - CLI location and the guides' directory.
45
+ * @throws when `wecom-cli` is not executable or `skillsDir` is not a directory.
46
+ */
47
+ export function apply(ctx: Context, config: Config): void {
48
+ const executable = resolveCliExecutable(config.binDir)
49
+ const guides = ctx.upstreamSkills.register({ name, entry: ENTRY, set: WECOM_SKILLS, skillsDir: config.skillsDir })
50
+ const account = ctx.cliAccounts.register<WecomAccountState, WecomOperationKind, WecomPhase, WecomCommand, WecomTextKey>({
51
+ name,
52
+ packageName: WECOM_PACKAGE,
53
+ cli: { product: 'WeCom', program: PROGRAM, executable, scripts: true },
54
+ account: { state: 'unchecked', skills: guides.state },
55
+ check: 'check',
56
+ cancellable: ['authorizing'],
57
+ authorizationHosts: ['work.weixin.qq.com'],
58
+ perform: performWith(guides),
59
+ dictionaries,
60
+ operations,
61
+ copy,
62
+ present: presentAccount,
63
+ })
64
+ ctx.effect(() => guides.watch((skills) => { account.publish({ ...account.snapshot().account, skills }) }), 'wecom: guides')
65
+ }
66
+ /* jscpd:ignore-end */