diff --git a/CHANGELOG.md b/CHANGELOG.md index 23ccf79534d..ad3462ebd00 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -45,6 +45,7 @@ Docs: https://docs.openclaw.ai - CLI/secrets: turn offline Gateway reload failures into actionable recovery text. - CLI/channels: explain missing or ambiguous channel selections with next commands. - CLI/channels: defer guided channel status collection until a channel is selected, keeping `openclaw channels add` first screen quieter. +- Plugins/CLI: route disabled Matrix and LanceDB memory command roots to plugin-enable guidance instead of generic unknown-command errors. - Browser/Docker: detect Playwright-managed Chromium from `PLAYWRIGHT_BROWSERS_PATH` and the default Playwright cache on Linux, so Docker installs that persist `/home/node/.cache/ms-playwright` no longer need `browser.executablePath`. - Ollama: keep DeepSeek V4 cloud models thinking-capable even when Ollama Cloud `/api/show` omits the `thinking` capability, so `/think high` no longer rejects `ollama/deepseek-v4-*:cloud`. - ACPX/Claude ACP: keep foreground prompts waiting for their own result when autonomous task-notification results arrive during the same session, and retarget the patch for Claude Agent ACP `0.33.1`. diff --git a/extensions/matrix/openclaw.plugin.json b/extensions/matrix/openclaw.plugin.json index 636ae7d6e8d..e52d7b86e34 100644 --- a/extensions/matrix/openclaw.plugin.json +++ b/extensions/matrix/openclaw.plugin.json @@ -1,7 +1,9 @@ { "id": "matrix", + "commandAliases": [{ "name": "matrix" }], "activation": { - "onStartup": false + "onStartup": false, + "onCommands": ["matrix"] }, "channels": ["matrix"], "channelEnvVars": { diff --git a/extensions/memory-lancedb/openclaw.plugin.json b/extensions/memory-lancedb/openclaw.plugin.json index f1723fa1793..8ea654c439a 100644 --- a/extensions/memory-lancedb/openclaw.plugin.json +++ b/extensions/memory-lancedb/openclaw.plugin.json @@ -1,7 +1,9 @@ { "id": "memory-lancedb", + "commandAliases": [{ "name": "ltm" }], "activation": { - "onStartup": false + "onStartup": false, + "onCommands": ["ltm"] }, "kind": "memory", "contracts": { diff --git a/src/cli/run-main-policy.ts b/src/cli/run-main-policy.ts index bf3b17e606e..011486279b5 100644 --- a/src/cli/run-main-policy.ts +++ b/src/cli/run-main-policy.ts @@ -138,6 +138,13 @@ export function resolveMissingPluginCommandMessage( const parentPluginId = commandAlias?.pluginId; if (parentPluginId) { if (allow.length > 0 && !allow.includes(parentPluginId)) { + if (parentPluginId === normalizedPluginId) { + return ( + `The \`openclaw ${normalizedPluginId}\` command is unavailable because ` + + `\`plugins.allow\` excludes "${normalizedPluginId}". Add "${normalizedPluginId}" to ` + + `\`plugins.allow\` if you want that bundled plugin CLI surface.` + ); + } return ( `"${normalizedPluginId}" is not a plugin; it is a command provided by the ` + `"${parentPluginId}" plugin. Add "${parentPluginId}" to \`plugins.allow\` ` + diff --git a/src/plugins/manifest-command-aliases.test.ts b/src/plugins/manifest-command-aliases.test.ts index 65b8b56d4ec..17fb4697022 100644 --- a/src/plugins/manifest-command-aliases.test.ts +++ b/src/plugins/manifest-command-aliases.test.ts @@ -21,7 +21,7 @@ describe("manifest command aliases", () => { ]); }); - it("resolves aliases without treating plugin ids as command aliases", () => { + it("resolves explicit same-id aliases without treating other plugin ids as aliases", () => { const registry = { plugins: [ { @@ -33,6 +33,10 @@ describe("manifest command aliases", () => { enabledByDefault: true, commandAliases: [{ name: "legacy-memory" }], }, + { + id: "matrix", + commandAliases: [{ name: "matrix" }], + }, ], }; @@ -46,6 +50,12 @@ describe("manifest command aliases", () => { enabledByDefault: true, name: "legacy-memory", }); + expect( + resolveManifestCommandAliasOwnerInRegistry({ command: "matrix", registry }), + ).toMatchObject({ + pluginId: "matrix", + name: "matrix", + }); }); it("resolves agent tool owners from contracts.tools", () => { diff --git a/src/plugins/manifest-command-aliases.ts b/src/plugins/manifest-command-aliases.ts index b91a4770f97..6b9f152922d 100644 --- a/src/plugins/manifest-command-aliases.ts +++ b/src/plugins/manifest-command-aliases.ts @@ -115,15 +115,15 @@ export function resolveManifestCommandAliasOwnerInRegistry(params: { const commandIsPluginId = params.registry.plugins.some( (plugin) => normalizeOptionalLowercaseString(plugin.id) === normalizedCommand, ); - if (commandIsPluginId) { - return undefined; - } for (const plugin of params.registry.plugins) { const alias = plugin.commandAliases?.find( (entry) => normalizeOptionalLowercaseString(entry.name) === normalizedCommand, ); if (alias) { + if (commandIsPluginId && normalizeOptionalLowercaseString(plugin.id) !== normalizedCommand) { + continue; + } return { ...alias, pluginId: plugin.id,