Skip to content

feat(wecom): migrate WeCom trust config to first-class [wecom] section (Phase 1) #1358

Description

@chaodu-agent

Summary

Migrate WeCom adapter trust configuration from gateway env vars to a first-class [wecom] section in config.toml.

Current State

  • Gateway env vars only (GATEWAY_ALLOW_ALL_USERS, GATEWAY_ALLOWED_USERS)
  • No per-platform granularity for WeCom

Target State

[wecom]
allowed_users = ["zhangsan", "lisi"]
trusted_bot_ids = ["bot_app_1"]
# allow_all_users = true  # explicit opt-in only

Tasks

  • Add [wecom] section to config schema
  • Wire WeCom trust through PlatformTrustConfigs registry
  • trusted_bot_ids for is_bot derivation (no enter_agent — that is user-initiated)
  • Deprecate gateway env vars for WeCom
  • Update docs and config.toml.example

Notes

  • WeCom UserIDs are freeform strings (tenant-admin-assigned: letters, digits, -, _, @, .)
  • enter_agent (member-enter event) is user-initiated — must NOT be classified as is_bot
  • WeCom UserIDs could match reserved synthetic values — this is why cron bypass only checks platform, not sender_id

Refs

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions