@openclaw-china/wecom-app 2026.3.12 → 2026.3.16

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/dist/index.js CHANGED
@@ -5668,6 +5668,7 @@ var CHANNEL_ORDER = [
5668
5668
  "qqbot",
5669
5669
  "wecom",
5670
5670
  "wecom-app",
5671
+ "wecom-kf",
5671
5672
  "feishu-china"
5672
5673
  ];
5673
5674
  var CHANNEL_DISPLAY_LABELS = {
@@ -5675,6 +5676,7 @@ var CHANNEL_DISPLAY_LABELS = {
5675
5676
  "feishu-china": "Feishu\uFF08\u98DE\u4E66\uFF09",
5676
5677
  wecom: "WeCom\uFF08\u4F01\u4E1A\u5FAE\u4FE1-\u667A\u80FD\u673A\u5668\u4EBA\uFF09",
5677
5678
  "wecom-app": "WeCom App\uFF08\u81EA\u5EFA\u5E94\u7528-\u53EF\u63A5\u5165\u5FAE\u4FE1\uFF09",
5679
+ "wecom-kf": "WeCom KF\uFF08\u5FAE\u4FE1\u5BA2\u670D\uFF09",
5678
5680
  qqbot: "QQBot\uFF08QQ \u673A\u5668\u4EBA\uFF09"
5679
5681
  };
5680
5682
  var CHANNEL_GUIDE_LINKS = {
@@ -5682,6 +5684,7 @@ var CHANNEL_GUIDE_LINKS = {
5682
5684
  "feishu-china": "https://github.com/BytePioneer-AI/openclaw-china/blob/main/README.md",
5683
5685
  wecom: `${GUIDES_BASE}/wecom/configuration.md`,
5684
5686
  "wecom-app": `${GUIDES_BASE}/wecom-app/configuration.md`,
5687
+ "wecom-kf": "https://github.com/BytePioneer-AI/openclaw-china/blob/main/extensions/wecom-kf/README.md",
5685
5688
  qqbot: `${GUIDES_BASE}/qqbot/configuration.md`
5686
5689
  };
5687
5690
  var CHINA_CLI_STATE_KEY = /* @__PURE__ */ Symbol.for("@openclaw-china/china-cli-state");
@@ -5890,6 +5893,8 @@ function isChannelConfigured(cfg, channelId) {
5890
5893
  return hasWecomWsCredentialPair(channelCfg);
5891
5894
  case "wecom-app":
5892
5895
  return hasTokenPair(channelCfg);
5896
+ case "wecom-kf":
5897
+ return hasNonEmptyString(channelCfg.corpId) && hasNonEmptyString(channelCfg.corpSecret) && hasNonEmptyString(channelCfg.token) && hasNonEmptyString(channelCfg.encodingAESKey);
5893
5898
  default:
5894
5899
  return false;
5895
5900
  }
@@ -6146,6 +6151,55 @@ async function configureWecomApp(prompter, cfg) {
6146
6151
  patch.asr = asr;
6147
6152
  return mergeChannelConfig(cfg, "wecom-app", patch);
6148
6153
  }
6154
+ async function configureWecomKf(prompter, cfg) {
6155
+ section("\u914D\u7F6E WeCom KF\uFF08\u5FAE\u4FE1\u5BA2\u670D\uFF09");
6156
+ showGuideLink("wecom-kf");
6157
+ const existing = getChannelConfig(cfg, "wecom-kf");
6158
+ const webhookPath = await prompter.askText({
6159
+ label: "Webhook \u8DEF\u5F84\uFF08\u9ED8\u8BA4 /wecom-kf\uFF09",
6160
+ defaultValue: toTrimmedString(existing.webhookPath) ?? "/wecom-kf",
6161
+ required: true
6162
+ });
6163
+ const token = await prompter.askSecret({
6164
+ label: "\u5FAE\u4FE1\u5BA2\u670D\u56DE\u8C03 Token",
6165
+ existingValue: toTrimmedString(existing.token),
6166
+ required: true
6167
+ });
6168
+ const encodingAESKey = await prompter.askSecret({
6169
+ label: "\u5FAE\u4FE1\u5BA2\u670D\u56DE\u8C03 EncodingAESKey",
6170
+ existingValue: toTrimmedString(existing.encodingAESKey),
6171
+ required: true
6172
+ });
6173
+ const corpId = await prompter.askText({
6174
+ label: "corpId",
6175
+ defaultValue: toTrimmedString(existing.corpId),
6176
+ required: true
6177
+ });
6178
+ const corpSecret = await prompter.askSecret({
6179
+ label: "\u5FAE\u4FE1\u5BA2\u670D Secret",
6180
+ existingValue: toTrimmedString(existing.corpSecret),
6181
+ required: true
6182
+ });
6183
+ const openKfId = await prompter.askText({
6184
+ label: "open_kfid",
6185
+ defaultValue: toTrimmedString(existing.openKfId),
6186
+ required: true
6187
+ });
6188
+ const welcomeText = await prompter.askText({
6189
+ label: "\u6B22\u8FCE\u8BED\uFF08\u53EF\u9009\uFF09",
6190
+ defaultValue: toTrimmedString(existing.welcomeText),
6191
+ required: false
6192
+ });
6193
+ return mergeChannelConfig(cfg, "wecom-kf", {
6194
+ webhookPath,
6195
+ token,
6196
+ encodingAESKey,
6197
+ corpId,
6198
+ corpSecret,
6199
+ openKfId,
6200
+ welcomeText: welcomeText || void 0
6201
+ });
6202
+ }
6149
6203
  async function configureQQBot(prompter, cfg) {
6150
6204
  section("\u914D\u7F6E QQBot\uFF08QQ \u673A\u5668\u4EBA\uFF09");
6151
6205
  showGuideLink("qqbot");
@@ -6202,6 +6256,8 @@ async function configureSingleChannel(channel, prompter, cfg) {
6202
6256
  return configureWecom(prompter, cfg);
6203
6257
  case "wecom-app":
6204
6258
  return configureWecomApp(prompter, cfg);
6259
+ case "wecom-kf":
6260
+ return configureWecomKf(prompter, cfg);
6205
6261
  case "qqbot":
6206
6262
  return configureQQBot(prompter, cfg);
6207
6263
  default:
@@ -6342,6 +6398,7 @@ var SUPPORTED_CHANNELS = [
6342
6398
  "feishu-china",
6343
6399
  "wecom",
6344
6400
  "wecom-app",
6401
+ "wecom-kf",
6345
6402
  "qqbot"
6346
6403
  ];
6347
6404
  var CHINA_INSTALL_HINT_SHOWN_KEY = /* @__PURE__ */ Symbol.for("@openclaw-china/china-install-hint-shown");