Skip to content

feat: add whitelist support for site commands#1618

Open
l5oo00 wants to merge 1 commit into
jackwener:mainfrom
l5oo00:feat-whitelist
Open

feat: add whitelist support for site commands#1618
l5oo00 wants to merge 1 commit into
jackwener:mainfrom
l5oo00:feat-whitelist

Conversation

@l5oo00
Copy link
Copy Markdown

@l5oo00 l5oo00 commented May 16, 2026

Introduce a whitelist mechanism that controls both visibility and executability of built-in commands. Commands not in the whitelist are hidden from opencli list and cannot be run.

  • Add whitelist module with YAML array config (site name or site: cmd1, cmd2 format), parsed into Sets for O(1) lookup
  • Skip site registration when no commands are whitelisted, producing unknown command for non-whitelisted sites
  • Add opencli list --all to bypass whitelist for display
  • Document whitelist config, behavior, and --all flag

Description

Related issue:

Type of Change

  • 🐛 Bug fix
  • ✨ New feature
  • 🌐 New site adapter
  • 📝 Documentation
  • ♻️ Refactor
  • 🔧 CI / build / tooling

Screenshots / Output

image image

Introduce a whitelist mechanism that controls both visibility and
executability of built-in commands. Commands not in the whitelist
are hidden from `opencli list` and cannot be run.

- Add whitelist module with YAML array config (site name or
  site: cmd1, cmd2 format), parsed into Sets for O(1) lookup
- Skip site registration when no commands are whitelisted,
  producing `unknown command` for non-whitelisted sites
- Add `opencli list --all` to bypass whitelist for display
- Drop WhitelistConfig type, only array format supported
- Document whitelist config, behavior, and `--all` flag
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