@openclaw-china/wecom-app 2026.3.9 → 2026.3.10

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
@@ -5763,6 +5763,13 @@ function getChannelConfig(cfg, channelId) {
5763
5763
  const existing = channels[channelId];
5764
5764
  return isRecord(existing) ? existing : {};
5765
5765
  }
5766
+ function getGatewayAuthToken(cfg) {
5767
+ if (!isRecord(cfg.gateway)) {
5768
+ return void 0;
5769
+ }
5770
+ const auth = isRecord(cfg.gateway.auth) ? cfg.gateway.auth : void 0;
5771
+ return toTrimmedString(auth?.token);
5772
+ }
5766
5773
  function getPreferredAccountConfig(channelCfg) {
5767
5774
  const accounts = channelCfg.accounts;
5768
5775
  if (!isRecord(accounts)) {
@@ -5924,11 +5931,22 @@ async function configureDingtalk(prompter, cfg) {
5924
5931
  "\u542F\u7528 AI Card \u6D41\u5F0F\u56DE\u590D\uFF08\u63A8\u8350\u5173\u95ED\uFF0C\u4F7F\u7528\u975E\u6D41\u5F0F\uFF09",
5925
5932
  toBoolean(existing.enableAICard, false)
5926
5933
  );
5927
- return mergeChannelConfig(cfg, "dingtalk", {
5934
+ const patch = {
5928
5935
  clientId,
5929
5936
  clientSecret,
5930
5937
  enableAICard
5931
- });
5938
+ };
5939
+ if (enableAICard) {
5940
+ const gatewayToken = await prompter.askSecret({
5941
+ label: "OpenClaw Gateway Token\uFF08\u6D41\u5F0F\u8F93\u51FA\u5FC5\u9700\uFF1B\u7559\u7A7A\u5219\u4F7F\u7528\u5168\u5C40 gateway.auth.token\uFF09",
5942
+ existingValue: toTrimmedString(existing.gatewayToken) ?? getGatewayAuthToken(cfg),
5943
+ required: false
5944
+ });
5945
+ if (gatewayToken.trim()) {
5946
+ patch.gatewayToken = gatewayToken;
5947
+ }
5948
+ }
5949
+ return mergeChannelConfig(cfg, "dingtalk", patch);
5932
5950
  }
5933
5951
  async function configureFeishu(prompter, cfg) {
5934
5952
  section("\u914D\u7F6E Feishu\uFF08\u98DE\u4E66\uFF09");