@openclaw-china/dingtalk 2026.3.12 → 2026.3.18
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
|
@@ -6377,6 +6377,7 @@ var CHANNEL_ORDER = [
|
|
|
6377
6377
|
"qqbot",
|
|
6378
6378
|
"wecom",
|
|
6379
6379
|
"wecom-app",
|
|
6380
|
+
"wecom-kf",
|
|
6380
6381
|
"feishu-china"
|
|
6381
6382
|
];
|
|
6382
6383
|
var CHANNEL_DISPLAY_LABELS = {
|
|
@@ -6384,6 +6385,7 @@ var CHANNEL_DISPLAY_LABELS = {
|
|
|
6384
6385
|
"feishu-china": "Feishu\uFF08\u98DE\u4E66\uFF09",
|
|
6385
6386
|
wecom: "WeCom\uFF08\u4F01\u4E1A\u5FAE\u4FE1-\u667A\u80FD\u673A\u5668\u4EBA\uFF09",
|
|
6386
6387
|
"wecom-app": "WeCom App\uFF08\u81EA\u5EFA\u5E94\u7528-\u53EF\u63A5\u5165\u5FAE\u4FE1\uFF09",
|
|
6388
|
+
"wecom-kf": "WeCom KF\uFF08\u5FAE\u4FE1\u5BA2\u670D\uFF09",
|
|
6387
6389
|
qqbot: "QQBot\uFF08QQ \u673A\u5668\u4EBA\uFF09"
|
|
6388
6390
|
};
|
|
6389
6391
|
var CHANNEL_GUIDE_LINKS = {
|
|
@@ -6391,6 +6393,7 @@ var CHANNEL_GUIDE_LINKS = {
|
|
|
6391
6393
|
"feishu-china": "https://github.com/BytePioneer-AI/openclaw-china/blob/main/README.md",
|
|
6392
6394
|
wecom: `${GUIDES_BASE}/wecom/configuration.md`,
|
|
6393
6395
|
"wecom-app": `${GUIDES_BASE}/wecom-app/configuration.md`,
|
|
6396
|
+
"wecom-kf": "https://github.com/BytePioneer-AI/openclaw-china/blob/main/extensions/wecom-kf/README.md",
|
|
6394
6397
|
qqbot: `${GUIDES_BASE}/qqbot/configuration.md`
|
|
6395
6398
|
};
|
|
6396
6399
|
var CHINA_CLI_STATE_KEY = /* @__PURE__ */ Symbol.for("@openclaw-china/china-cli-state");
|
|
@@ -6599,6 +6602,8 @@ function isChannelConfigured(cfg, channelId) {
|
|
|
6599
6602
|
return hasWecomWsCredentialPair(channelCfg);
|
|
6600
6603
|
case "wecom-app":
|
|
6601
6604
|
return hasTokenPair(channelCfg);
|
|
6605
|
+
case "wecom-kf":
|
|
6606
|
+
return hasNonEmptyString(channelCfg.corpId) && hasNonEmptyString(channelCfg.corpSecret) && hasNonEmptyString(channelCfg.token) && hasNonEmptyString(channelCfg.encodingAESKey);
|
|
6602
6607
|
default:
|
|
6603
6608
|
return false;
|
|
6604
6609
|
}
|
|
@@ -6855,6 +6860,55 @@ async function configureWecomApp(prompter, cfg) {
|
|
|
6855
6860
|
patch.asr = asr;
|
|
6856
6861
|
return mergeChannelConfig(cfg, "wecom-app", patch);
|
|
6857
6862
|
}
|
|
6863
|
+
async function configureWecomKf(prompter, cfg) {
|
|
6864
|
+
section("\u914D\u7F6E WeCom KF\uFF08\u5FAE\u4FE1\u5BA2\u670D\uFF09");
|
|
6865
|
+
showGuideLink("wecom-kf");
|
|
6866
|
+
const existing = getChannelConfig(cfg, "wecom-kf");
|
|
6867
|
+
const webhookPath = await prompter.askText({
|
|
6868
|
+
label: "Webhook \u8DEF\u5F84\uFF08\u9ED8\u8BA4 /wecom-kf\uFF09",
|
|
6869
|
+
defaultValue: toTrimmedString2(existing.webhookPath) ?? "/wecom-kf",
|
|
6870
|
+
required: true
|
|
6871
|
+
});
|
|
6872
|
+
const token = await prompter.askSecret({
|
|
6873
|
+
label: "\u5FAE\u4FE1\u5BA2\u670D\u56DE\u8C03 Token",
|
|
6874
|
+
existingValue: toTrimmedString2(existing.token),
|
|
6875
|
+
required: true
|
|
6876
|
+
});
|
|
6877
|
+
const encodingAESKey = await prompter.askSecret({
|
|
6878
|
+
label: "\u5FAE\u4FE1\u5BA2\u670D\u56DE\u8C03 EncodingAESKey",
|
|
6879
|
+
existingValue: toTrimmedString2(existing.encodingAESKey),
|
|
6880
|
+
required: true
|
|
6881
|
+
});
|
|
6882
|
+
const corpId = await prompter.askText({
|
|
6883
|
+
label: "corpId",
|
|
6884
|
+
defaultValue: toTrimmedString2(existing.corpId),
|
|
6885
|
+
required: true
|
|
6886
|
+
});
|
|
6887
|
+
const corpSecret = await prompter.askSecret({
|
|
6888
|
+
label: "\u5FAE\u4FE1\u5BA2\u670D Secret",
|
|
6889
|
+
existingValue: toTrimmedString2(existing.corpSecret),
|
|
6890
|
+
required: true
|
|
6891
|
+
});
|
|
6892
|
+
const openKfId = await prompter.askText({
|
|
6893
|
+
label: "open_kfid",
|
|
6894
|
+
defaultValue: toTrimmedString2(existing.openKfId),
|
|
6895
|
+
required: true
|
|
6896
|
+
});
|
|
6897
|
+
const welcomeText = await prompter.askText({
|
|
6898
|
+
label: "\u6B22\u8FCE\u8BED\uFF08\u53EF\u9009\uFF09",
|
|
6899
|
+
defaultValue: toTrimmedString2(existing.welcomeText),
|
|
6900
|
+
required: false
|
|
6901
|
+
});
|
|
6902
|
+
return mergeChannelConfig(cfg, "wecom-kf", {
|
|
6903
|
+
webhookPath,
|
|
6904
|
+
token,
|
|
6905
|
+
encodingAESKey,
|
|
6906
|
+
corpId,
|
|
6907
|
+
corpSecret,
|
|
6908
|
+
openKfId,
|
|
6909
|
+
welcomeText: welcomeText || void 0
|
|
6910
|
+
});
|
|
6911
|
+
}
|
|
6858
6912
|
async function configureQQBot(prompter, cfg) {
|
|
6859
6913
|
section("\u914D\u7F6E QQBot\uFF08QQ \u673A\u5668\u4EBA\uFF09");
|
|
6860
6914
|
showGuideLink("qqbot");
|
|
@@ -6911,6 +6965,8 @@ async function configureSingleChannel(channel, prompter, cfg) {
|
|
|
6911
6965
|
return configureWecom(prompter, cfg);
|
|
6912
6966
|
case "wecom-app":
|
|
6913
6967
|
return configureWecomApp(prompter, cfg);
|
|
6968
|
+
case "wecom-kf":
|
|
6969
|
+
return configureWecomKf(prompter, cfg);
|
|
6914
6970
|
case "qqbot":
|
|
6915
6971
|
return configureQQBot(prompter, cfg);
|
|
6916
6972
|
default:
|
|
@@ -7051,6 +7107,7 @@ var SUPPORTED_CHANNELS = [
|
|
|
7051
7107
|
"feishu-china",
|
|
7052
7108
|
"wecom",
|
|
7053
7109
|
"wecom-app",
|
|
7110
|
+
"wecom-kf",
|
|
7054
7111
|
"qqbot"
|
|
7055
7112
|
];
|
|
7056
7113
|
var CHINA_INSTALL_HINT_SHOWN_KEY = /* @__PURE__ */ Symbol.for("@openclaw-china/china-install-hint-shown");
|