CLI plugin allow guard now resolves command aliases
A bug in the CLI plugin allow guard was causing the openclaw wiki command to enter a catch-22 with doctor --fix, constantly conflicting on whether "wiki" belonged in plugins.allow.
The CLI was blocking openclaw wiki unless wiki was added to plugins.allow, but the doctor utility would then flag wiki as a stale identifier and remove it. This created an impossible loop for users — enabling the command would trigger its own undoing on the next doctor run.
The fix operates in two places. First, the memory-wiki plugin manifest now declares wiki as a command alias, so config validation and doctor recognize it as a valid plugin-owned identifier rather than a stale plugin name. Second, the CLI fallback allow check now resolves command names through their parent plugin — if the parent plugin is in the allow list, the command is permitted even if the raw command name isn't listed.
With these changes, users can add memory-wiki to plugins.allow and the openclaw wiki command works automatically. Doctor no longer treats wiki as stale, and no manual workaround is needed to keep the command functional.
View Original GitHub Description
Summary
- Problem:
openclaw wikiCLI guard checks the command namewikidirectly againstplugins.allow, ignoring thatwikiis a command provided by thememory-wikiplugin. Separately,memory-wikidoes not declarewikias acommandAlias, sodoctor --fixtreatswikiinplugins.allowas stale and removes it. - Why it matters: users who add
wikitoplugins.allowlose it on the nextdoctor --fixrun, and the CLI fallback guard can blockopenclaw wikieven whenmemory-wikiis allowed. - What changed: (1) added
commandAliases: [{ "name": "wiki" }]to the memory-wiki plugin manifest so config validation and doctor recognize the alias; (2) added a parent-plugin check in the CLI fallback allow guard so commands resolve through their owning plugin. - What did NOT change: the primary CLI registration path (which already works for bundled plugins) is untouched.
Change Type (select all)
- Bug fix
- Feature
- Refactor required for the fix
- Docs
- Security hardening
- Chore/infra
Scope (select all touched areas)
- Gateway / orchestration
- Skills / tool execution
- Auth / tokens
- Memory / storage
- Integrations
- API / contracts
- UI / DX
- CI/CD / infra
Linked Issue/PR
- Closes #64748
- This PR fixes a bug or regression
Root Cause (if applicable)
- Root cause:
resolveMissingPluginCommandMessage()resolves the command alias to its parent plugin for error messages but does not check whether that parent plugin is already inplugins.allow. The memory-wiki manifest also lacked acommandAliasesentry, preventing doctor and config validation from recognizingwikias a valid alias. - Missing detection / guardrail: the fallback allow check did not resolve command names through their parent plugin.
- Contributing context: the
dreamingcommand (memory-core) already had acommandAliasesentry in its manifest, butwiki(memory-wiki) was never added.
Regression Test Plan (if applicable)
- Coverage level that should have caught this:
- Unit test
- Target test or file:
src/cli/run-main.test.ts - Scenario the test should lock in: calling
resolveMissingPluginCommandMessage("wiki", { plugins: { allow: ["memory-wiki"] } })returnsnull(no error). - Why this is the smallest reliable guardrail: the function is the single decision point for CLI command access.
User-visible / Behavior Changes
openclaw wikinow works whenmemory-wikiis inplugins.allow(no need to also addwiki).doctor --fixno longer removeswikifromplugins.allowas stale; instead warns that it is a command alias formemory-wiki.
Diagram (if applicable)
N/A
Security Impact (required)
- New permissions/capabilities? No
- Secrets/tokens handling changed? No
- New/changed network calls? No
- Command/tool execution surface changed? No
- Data access scope changed? No
Repro + Verification
Environment
- OS: Linux (Docker), macOS
- Runtime/container: Node 24.x
- Model/provider: N/A (CLI-only)
Steps
- Set
plugins.allow: ["memory-wiki"]in openclaw.json - Run
openclaw wiki status
Expected
- Command runs successfully.
Actual
- Before fix: error "plugins.allow excludes wiki" (when CLI registration fails to load)
- After fix: command resolves through parent plugin and runs.
Evidence
- Failing test/log before + passing after
Unit tests: 17/17 pass including 2 new cases for the allow/deny paths.
Human Verification (required)
- Verified scenarios: unit tests pass, config validation test suite (18/18) pass, Docker build succeeds
- Edge cases checked: command alias with parent in allow (pass-through), command alias with parent NOT in allow (blocked with correct message), no allow list set (no guard)
- What you did not verify: macOS app build, production gateway with memory-wiki installed
Review Conversations
- I replied to or resolved every bot review conversation I addressed in this PR.
- I left unresolved only the conversations that still need reviewer or maintainer judgment.
Compatibility / Migration
- Backward compatible? Yes
- Config/env changes? No
- Migration needed? No
Risks and Mitigations
- Risk: other plugins with CLI descriptors but no
commandAliasesmanifest entry may still hit the same issue.- Mitigation: this is an additive fix; other plugins can be updated the same way. The CLI guard fix also helps generically.