@openclaw-china/wecom 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 +57 -0
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -5826,6 +5826,7 @@ var CHANNEL_ORDER = [
|
|
|
5826
5826
|
"qqbot",
|
|
5827
5827
|
"wecom",
|
|
5828
5828
|
"wecom-app",
|
|
5829
|
+
"wecom-kf",
|
|
5829
5830
|
"feishu-china"
|
|
5830
5831
|
];
|
|
5831
5832
|
var CHANNEL_DISPLAY_LABELS = {
|
|
@@ -5833,6 +5834,7 @@ var CHANNEL_DISPLAY_LABELS = {
|
|
|
5833
5834
|
"feishu-china": "Feishu\uFF08\u98DE\u4E66\uFF09",
|
|
5834
5835
|
wecom: "WeCom\uFF08\u4F01\u4E1A\u5FAE\u4FE1-\u667A\u80FD\u673A\u5668\u4EBA\uFF09",
|
|
5835
5836
|
"wecom-app": "WeCom App\uFF08\u81EA\u5EFA\u5E94\u7528-\u53EF\u63A5\u5165\u5FAE\u4FE1\uFF09",
|
|
5837
|
+
"wecom-kf": "WeCom KF\uFF08\u5FAE\u4FE1\u5BA2\u670D\uFF09",
|
|
5836
5838
|
qqbot: "QQBot\uFF08QQ \u673A\u5668\u4EBA\uFF09"
|
|
5837
5839
|
};
|
|
5838
5840
|
var CHANNEL_GUIDE_LINKS = {
|
|
@@ -5840,6 +5842,7 @@ var CHANNEL_GUIDE_LINKS = {
|
|
|
5840
5842
|
"feishu-china": "https://github.com/BytePioneer-AI/openclaw-china/blob/main/README.md",
|
|
5841
5843
|
wecom: `${GUIDES_BASE}/wecom/configuration.md`,
|
|
5842
5844
|
"wecom-app": `${GUIDES_BASE}/wecom-app/configuration.md`,
|
|
5845
|
+
"wecom-kf": "https://github.com/BytePioneer-AI/openclaw-china/blob/main/extensions/wecom-kf/README.md",
|
|
5843
5846
|
qqbot: `${GUIDES_BASE}/qqbot/configuration.md`
|
|
5844
5847
|
};
|
|
5845
5848
|
var CHINA_CLI_STATE_KEY = /* @__PURE__ */ Symbol.for("@openclaw-china/china-cli-state");
|
|
@@ -6048,6 +6051,8 @@ function isChannelConfigured(cfg, channelId) {
|
|
|
6048
6051
|
return hasWecomWsCredentialPair(channelCfg);
|
|
6049
6052
|
case "wecom-app":
|
|
6050
6053
|
return hasTokenPair(channelCfg);
|
|
6054
|
+
case "wecom-kf":
|
|
6055
|
+
return hasNonEmptyString(channelCfg.corpId) && hasNonEmptyString(channelCfg.corpSecret) && hasNonEmptyString(channelCfg.token) && hasNonEmptyString(channelCfg.encodingAESKey);
|
|
6051
6056
|
default:
|
|
6052
6057
|
return false;
|
|
6053
6058
|
}
|
|
@@ -6304,6 +6309,55 @@ async function configureWecomApp(prompter, cfg) {
|
|
|
6304
6309
|
patch.asr = asr;
|
|
6305
6310
|
return mergeChannelConfig(cfg, "wecom-app", patch);
|
|
6306
6311
|
}
|
|
6312
|
+
async function configureWecomKf(prompter, cfg) {
|
|
6313
|
+
section("\u914D\u7F6E WeCom KF\uFF08\u5FAE\u4FE1\u5BA2\u670D\uFF09");
|
|
6314
|
+
showGuideLink("wecom-kf");
|
|
6315
|
+
const existing = getChannelConfig(cfg, "wecom-kf");
|
|
6316
|
+
const webhookPath = await prompter.askText({
|
|
6317
|
+
label: "Webhook \u8DEF\u5F84\uFF08\u9ED8\u8BA4 /wecom-kf\uFF09",
|
|
6318
|
+
defaultValue: toTrimmedString(existing.webhookPath) ?? "/wecom-kf",
|
|
6319
|
+
required: true
|
|
6320
|
+
});
|
|
6321
|
+
const token = await prompter.askSecret({
|
|
6322
|
+
label: "\u5FAE\u4FE1\u5BA2\u670D\u56DE\u8C03 Token",
|
|
6323
|
+
existingValue: toTrimmedString(existing.token),
|
|
6324
|
+
required: true
|
|
6325
|
+
});
|
|
6326
|
+
const encodingAESKey = await prompter.askSecret({
|
|
6327
|
+
label: "\u5FAE\u4FE1\u5BA2\u670D\u56DE\u8C03 EncodingAESKey",
|
|
6328
|
+
existingValue: toTrimmedString(existing.encodingAESKey),
|
|
6329
|
+
required: true
|
|
6330
|
+
});
|
|
6331
|
+
const corpId = await prompter.askText({
|
|
6332
|
+
label: "corpId",
|
|
6333
|
+
defaultValue: toTrimmedString(existing.corpId),
|
|
6334
|
+
required: true
|
|
6335
|
+
});
|
|
6336
|
+
const corpSecret = await prompter.askSecret({
|
|
6337
|
+
label: "\u5FAE\u4FE1\u5BA2\u670D Secret",
|
|
6338
|
+
existingValue: toTrimmedString(existing.corpSecret),
|
|
6339
|
+
required: true
|
|
6340
|
+
});
|
|
6341
|
+
const openKfId = await prompter.askText({
|
|
6342
|
+
label: "open_kfid",
|
|
6343
|
+
defaultValue: toTrimmedString(existing.openKfId),
|
|
6344
|
+
required: true
|
|
6345
|
+
});
|
|
6346
|
+
const welcomeText = await prompter.askText({
|
|
6347
|
+
label: "\u6B22\u8FCE\u8BED\uFF08\u53EF\u9009\uFF09",
|
|
6348
|
+
defaultValue: toTrimmedString(existing.welcomeText),
|
|
6349
|
+
required: false
|
|
6350
|
+
});
|
|
6351
|
+
return mergeChannelConfig(cfg, "wecom-kf", {
|
|
6352
|
+
webhookPath,
|
|
6353
|
+
token,
|
|
6354
|
+
encodingAESKey,
|
|
6355
|
+
corpId,
|
|
6356
|
+
corpSecret,
|
|
6357
|
+
openKfId,
|
|
6358
|
+
welcomeText: welcomeText || void 0
|
|
6359
|
+
});
|
|
6360
|
+
}
|
|
6307
6361
|
async function configureQQBot(prompter, cfg) {
|
|
6308
6362
|
section("\u914D\u7F6E QQBot\uFF08QQ \u673A\u5668\u4EBA\uFF09");
|
|
6309
6363
|
showGuideLink("qqbot");
|
|
@@ -6360,6 +6414,8 @@ async function configureSingleChannel(channel, prompter, cfg) {
|
|
|
6360
6414
|
return configureWecom(prompter, cfg);
|
|
6361
6415
|
case "wecom-app":
|
|
6362
6416
|
return configureWecomApp(prompter, cfg);
|
|
6417
|
+
case "wecom-kf":
|
|
6418
|
+
return configureWecomKf(prompter, cfg);
|
|
6363
6419
|
case "qqbot":
|
|
6364
6420
|
return configureQQBot(prompter, cfg);
|
|
6365
6421
|
default:
|
|
@@ -6500,6 +6556,7 @@ var SUPPORTED_CHANNELS = [
|
|
|
6500
6556
|
"feishu-china",
|
|
6501
6557
|
"wecom",
|
|
6502
6558
|
"wecom-app",
|
|
6559
|
+
"wecom-kf",
|
|
6503
6560
|
"qqbot"
|
|
6504
6561
|
];
|
|
6505
6562
|
var CHINA_INSTALL_HINT_SHOWN_KEY = /* @__PURE__ */ Symbol.for("@openclaw-china/china-install-hint-shown");
|