@openclaw-china/wecom 2026.3.9 → 2026.3.11

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
@@ -5994,6 +5994,13 @@ function getChannelConfig(cfg, channelId) {
5994
5994
  const existing = channels[channelId];
5995
5995
  return isRecord(existing) ? existing : {};
5996
5996
  }
5997
+ function getGatewayAuthToken(cfg) {
5998
+ if (!isRecord(cfg.gateway)) {
5999
+ return void 0;
6000
+ }
6001
+ const auth = isRecord(cfg.gateway.auth) ? cfg.gateway.auth : void 0;
6002
+ return toTrimmedString(auth?.token);
6003
+ }
5997
6004
  function getPreferredAccountConfig(channelCfg) {
5998
6005
  const accounts = channelCfg.accounts;
5999
6006
  if (!isRecord(accounts)) {
@@ -6155,11 +6162,22 @@ async function configureDingtalk(prompter, cfg) {
6155
6162
  "\u542F\u7528 AI Card \u6D41\u5F0F\u56DE\u590D\uFF08\u63A8\u8350\u5173\u95ED\uFF0C\u4F7F\u7528\u975E\u6D41\u5F0F\uFF09",
6156
6163
  toBoolean(existing.enableAICard, false)
6157
6164
  );
6158
- return mergeChannelConfig(cfg, "dingtalk", {
6165
+ const patch = {
6159
6166
  clientId,
6160
6167
  clientSecret,
6161
6168
  enableAICard
6162
- });
6169
+ };
6170
+ if (enableAICard) {
6171
+ const gatewayToken = await prompter.askSecret({
6172
+ label: "OpenClaw Gateway Token\uFF08\u6D41\u5F0F\u8F93\u51FA\u5FC5\u9700\uFF1B\u7559\u7A7A\u5219\u4F7F\u7528\u5168\u5C40 gateway.auth.token\uFF09",
6173
+ existingValue: toTrimmedString(existing.gatewayToken) ?? getGatewayAuthToken(cfg),
6174
+ required: false
6175
+ });
6176
+ if (gatewayToken.trim()) {
6177
+ patch.gatewayToken = gatewayToken;
6178
+ }
6179
+ }
6180
+ return mergeChannelConfig(cfg, "dingtalk", patch);
6163
6181
  }
6164
6182
  async function configureFeishu(prompter, cfg) {
6165
6183
  section("\u914D\u7F6E Feishu\uFF08\u98DE\u4E66\uFF09");