fix: reserve auth CLI root from plugin allowlist gating · openclaw/openclaw@7f83ba8
steipete
·
2026-05-03
·
via Recent Commits to openclaw:main
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|
@@ -12,6 +12,7 @@ Docs: https://docs.openclaw.ai
|
12 | 12 | |
13 | 13 | ### Fixes |
14 | 14 | |
| 15 | +- CLI/plugins: stop treating the non-plugin `auth` command root as a bundled plugin id, so restrictive `plugins.allow` configs no longer tell users to add stale `auth` plugin entries. |
15 | 16 | - Plugins/externalization: repair missing configured plugin installs from npm by default, reserve ClawHub downloads for explicit `clawhubSpec` metadata, and cover agent-runtime/env-selected plugin repair. Thanks @vincentkoc. |
16 | 17 | - Upgrade/config: validate configured web-search providers and statically suppressed model/provider pairs against the active plugin set at config load, so stale plugin state fails loud before runtime fallback. |
17 | 18 | - Status/update: resolve beta update-channel checks from the installed version when config still says `stable`, and let `status --deep` reuse live gateway channel credential state instead of warning on command-path-only token misses. |
|
Lines changed: 7 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|
@@ -50,6 +50,13 @@ describe("command-registration-policy", () => {
|
50 | 50 | hasBuiltinPrimary: false, |
51 | 51 | }), |
52 | 52 | ).toBe(false); |
| 53 | +expect( |
| 54 | +shouldSkipPluginCommandRegistration({ |
| 55 | +argv: ["node", "openclaw", "auth", "login"], |
| 56 | +primary: "auth", |
| 57 | +hasBuiltinPrimary: false, |
| 58 | +}), |
| 59 | +).toBe(true); |
53 | 60 | expect( |
54 | 61 | shouldSkipPluginCommandRegistration({ |
55 | 62 | argv: ["node", "openclaw", "tool", "image_generate"], |
|
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change |
|---|
|
1 | 1 | import { isTruthyEnvValue } from "../infra/env.js"; |
2 | 2 | import { resolveCliArgvInvocation } from "./argv-invocation.js"; |
3 | 3 | |
4 | | -const RESERVED_NON_PLUGIN_COMMAND_ROOTS = new Set(["tool", "tools"]); |
| 4 | +const RESERVED_NON_PLUGIN_COMMAND_ROOTS = new Set(["auth", "tool", "tools"]); |
5 | 5 | |
6 | 6 | export function isReservedNonPluginCommandRoot(primary: string | null | undefined): boolean { |
7 | 7 | return typeof primary === "string" && RESERVED_NON_PLUGIN_COMMAND_ROOTS.has(primary); |
|
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|
@@ -400,6 +400,7 @@ describe("runCli exit behavior", () => {
|
400 | 400 | }); |
401 | 401 | |
402 | 402 | it.each([ |
| 403 | +["auth", ["node", "openclaw", "auth", "--help"]], |
403 | 404 | ["tool", ["node", "openclaw", "tool", "image_generate"]], |
404 | 405 | ["tools", ["node", "openclaw", "tools", "effective"]], |
405 | 406 | ])("keeps reserved %s command roots out of plugin command discovery", async (_name, argv) => { |
|
Lines changed: 8 additions & 6 deletions
| Original file line number | Diff line number | Diff line change |
|---|
@@ -214,12 +214,14 @@ describe("resolveMissingPluginCommandMessage", () => {
|
214 | 214 | }); |
215 | 215 | |
216 | 216 | it("does not classify reserved non-plugin command roots as plugin allowlist misses", () => { |
217 | | -const message = resolveMissingPluginCommandMessage("tool", { |
218 | | -plugins: { |
219 | | -allow: ["browser"], |
220 | | -}, |
221 | | -}); |
222 | | -expect(message).toBeNull(); |
| 217 | +for (const root of ["auth", "tool"]) { |
| 218 | +const message = resolveMissingPluginCommandMessage(root, { |
| 219 | +plugins: { |
| 220 | +allow: ["browser"], |
| 221 | +}, |
| 222 | +}); |
| 223 | +expect(message).toBeNull(); |
| 224 | +} |
223 | 225 | }); |
224 | 226 | |
225 | 227 | it("explains that dreaming is a runtime slash command, not a CLI command", () => { |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。