feat(telegram,discord): migrate bot tokens to plugin userConfig secrets#831
Draft
feat(telegram,discord): migrate bot tokens to plugin userConfig secrets#831
Conversation
Closes H1 #3617646 via the proper path — plugin userConfig with
sensitive: true routes tokens to keychain (macOS) or .credentials.json
0600 (elsewhere) instead of world-readable .env files.
Requires claude-cli-internal#23383 (PLUGIN_OPTIONS ungate + per-server
sensitive split).
Changes per plugin:
- plugin.json: add userConfig.{PLATFORM}_BOT_TOKEN with sensitive: true
- .mcp.json: add env block with ${user_config.{PLATFORM}_BOT_TOKEN}
- server.ts: update comment + error message to point to
/plugin reconfigure instead of .env file
The .env read loop stays as a legacy fallback for existing users —
process.env wins (injected value takes precedence), so no migration
forced. New users get prompted at enable time via CC's built-in dialog;
token lands in keychain, never touches settings.json.
/telegram:configure and /discord:configure skills are NOT removed in this
PR — they still work for the legacy .env path. Follow-up: repurpose or
remove after a grace period once cli#23383 is released.
:house: Remote-Dev: homespace
…ent subcommand /plugin reconfigure doesn't exist. The actual path is /plugin manage → select plugin → Configure options (ManagePlugins.tsx:1692). :house: Remote-Dev: homespace
5eef112 to
c7c5162
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes H1 #3617646 via the proper path — plugin
userConfigwithsensitive: trueroutes tokens to keychain (macOS) or.credentials.json0600 (elsewhere) instead of world-readable.envfiles.**Depends on anthropics/claude-cli-internal#23383 — merged as
8b390a27b0. Ready to merge once a CC release includes it.Changes per plugin
plugin.jsonuserConfig.{PLATFORM}_BOT_TOKENwithsensitive: true, required: true.mcp.jsonenv: { {PLATFORM}_BOT_TOKEN: "${user_config.{PLATFORM}_BOT_TOKEN}" }server.ts/plugin reconfigureinstead of.envBackward compat
The
.envread loop stays as a legacy fallback —process.envwins (injected value takes precedence), so existing users aren't forced to reconfigure. New users get prompted at enable time via CC's built-in dialog; token lands in keychain/secureStorage, never touches settings.json./telegram:configureand/discord:configureskills are NOT removed in this PR — they still work for the legacy.envpath. Follow-up: repurpose or remove after a grace period once cli#23383 is in a stable release.How to verify (after cli#23383 ships)
Slack: C0ANJAW8GM6 bug bounty thread