Skip to content

feat(preset): expand ${VAR} in channel config fields and MCP URLs#23

Merged
liut merged 1 commit into
mainfrom
feat/preset-env-expansion
Jun 3, 2026
Merged

feat(preset): expand ${VAR} in channel config fields and MCP URLs#23
liut merged 1 commit into
mainfrom
feat/preset-env-expansion

Conversation

@liut

@liut liut commented Jun 3, 2026

Copy link
Copy Markdown
Owner

Preset YAML channel secrets now support ${VAR} env var expansion via os.ExpandEnv at consumer sites.

Design: Expand at consumer sites (InitChannels + adapter constructors), not at LoadPreset. Preset struct holds ${VAR} placeholders — no secrets in
memory/logs.

Usage:

  channels:
    wecom:
      config:
        bot_id: "${WECOM_BOT_ID}"
        bot_secret: "${WECOM_BOT_SECRET}"

Plain values (no ${) pass through unchanged — fully backward compatible.

Wrap bot_id, bot_secret, app_id, app_secret, corp_id, corp_secret,
agent_id, callback_token, callback_aes_key, encrypt_key, and MCP server
URLs with os.ExpandEnv at consumer sites. Preset struct holds ${VAR}
placeholders — no secrets in memory or logs.

Plain values pass through unchanged, fully backward compatible.
@liut liut merged commit 5ab440a into main Jun 3, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant