惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

B
Blog RSS Feed
Jina AI
Jina AI
雷峰网
雷峰网
Blog — PlanetScale
Blog — PlanetScale
Hugging Face - Blog
Hugging Face - Blog
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Last Week in AI
Last Week in AI
博客园 - 司徒正美
罗磊的独立博客
J
Java Code Geeks
Engineering at Meta
Engineering at Meta
WordPress大学
WordPress大学
Vercel News
Vercel News
A
About on SuperTechFans
I
InfoQ
D
DataBreaches.Net
爱范儿
爱范儿
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
U
Unit 42
aimingoo的专栏
aimingoo的专栏
宝玉的分享
宝玉的分享
P
Proofpoint News Feed
Microsoft Azure Blog
Microsoft Azure Blog
美团技术团队

Recent Commits to openclaw:main

test: merge chat side-result checks · openclaw/openclaw@ddd2c2a test: merge cron history checks · openclaw/openclaw@f7eb746 test: merge responsive navigation shell checks · openclaw/openclaw@c2e4b47 docs(changelog): add codex oauth fixes · openclaw/openclaw@628e6cd test: merge navigation routing cases · openclaw/openclaw@5d8cecb Tests: mock channel registry bundled fallback · openclaw/openclaw@2b08233 Secrets: avoid broad web search discovery for single plugin config · openclaw/openclaw@a464f59 test: merge config view browser checks · openclaw/openclaw@20cf511 fix(status): align oauth health with runtime · openclaw/openclaw@eed7116 feat: add macOS screen snapshots for monitor preview (#67954) thanks … · openclaw/openclaw@f377db1 fix: report shared auth scopes in hello-ok (#67810) thanks @BunsDev · openclaw/openclaw@0b6c39b Auto-reply: avoid eager bundled route fallback · openclaw/openclaw@3ea1bf4 Tests: narrow session binding contract setup · openclaw/openclaw@54e4e16 fix(macOS): enable undo/redo in webchat composer text input (#34962) · openclaw/openclaw@00951dc Tests: speed up channel setup promotion · openclaw/openclaw@82b529a Docs: refresh agent instructions · openclaw/openclaw@5775fe2 fix(auth): serialize OAuth refresh across agents to fix #26322 (#67876) · openclaw/openclaw@8e79080 test: allow ollama public surface boundary test · openclaw/openclaw@7d4f1a6 Docs: add test performance guardrails · openclaw/openclaw@89706d3 Tests: restore context-engine usage proof · openclaw/openclaw@e4c4f95 Tests: slim context engine runtime coverage · openclaw/openclaw@74c198f ci: retry failed custom checkouts · openclaw/openclaw@0ee5baf test: trim duplicate provider auth onboarding cases · openclaw/openclaw@1ffc02e matrix: fix sessions_spawn --thread subagent session spawning (#67643) · openclaw/openclaw@1ce2596 test: reduce auth choice fixture churn · openclaw/openclaw@857b9cd test: mock health status config boundaries · openclaw/openclaw@9d5ab4a test: mock onboard config io boundary · openclaw/openclaw@299694d test: mock legacy state plugin boundaries · openclaw/openclaw@2713089 test: mock channel install boundaries · openclaw/openclaw@b945248 test: mock doctor preview channel boundaries · openclaw/openclaw@b1a3ad4
fix(plugins): cache cli registration entries · openclaw/o...
steipete · 2026-05-02 · via Recent Commits to openclaw:main
Original file line numberDiff line numberDiff line change

@@ -30,6 +30,7 @@ Docs: https://docs.openclaw.ai

3030
3131

### Fixes

3232
33+

- Plugins/CLI: cache plugin CLI registration entries per command program so completion state generation does not repeat the full plugin sweep in one invocation. Thanks @ScientificProgrammer.

3334

- Plugins: reuse gateway-bindable plugin loader cache entries for later default-mode loads without serving default-built registries to gateway-bound requests, reducing repeated plugin registration during dispatch. Refs #61756. Thanks @DmitryPogodaev.

3435

- Gateway/secrets: include the caught error message in `secrets.reload` and `secrets.resolve` warning logs while keeping RPC errors generic, so operators can diagnose reload and permission failures. Thanks @davidangularme.

3536

- Anthropic-compatible streams: recover text deltas that arrive before their matching content block, so Kimi Code and similar providers do not finish as empty `incomplete_result` replies. Fixes #76007. Thanks @vliuyt.

Original file line numberDiff line numberDiff line change

@@ -197,6 +197,26 @@ describe("registerPluginCliCommands", () => {

197197

);

198198

});

199199
200+

it("reuses loaded plugin CLI entries on repeat calls for the same program", async () => {

201+

const program = createProgram();

202+
203+

await registerPluginCliCommands(program, {} as OpenClawConfig);

204+

await registerPluginCliCommands(program, {} as OpenClawConfig);

205+
206+

expect(mocks.loadOpenClawPlugins).toHaveBeenCalledTimes(1);

207+

});

208+
209+

it("reloads plugin CLI entries when the requested primary command changes", async () => {

210+

const program = createProgram();

211+
212+

await registerPluginCliCommands(program, {} as OpenClawConfig, undefined, undefined, {

213+

primary: "memory",

214+

});

215+

await registerPluginCliCommands(program, {} as OpenClawConfig);

216+
217+

expect(mocks.loadOpenClawPlugins).toHaveBeenCalledTimes(2);

218+

});

219+
200220

it("loads plugin CLI commands from the auto-enabled config snapshot", async () => {

201221

const { rawConfig, autoEnabledConfig } = createAutoEnabledCliFixture();

202222

mocks.applyPluginAutoEnable.mockReturnValue({

Original file line numberDiff line numberDiff line change

@@ -17,6 +17,19 @@ type RegisterPluginCliOptions = {

1717

primary?: string | null;

1818

};

1919
20+

type PluginCliRegistrationEntries = Awaited<

21+

ReturnType<typeof loadPluginCliRegistrationEntriesWithDefaults>

22+

>;

23+
24+

const PLUGIN_CLI_ENTRIES_CACHE_KEY = Symbol.for("openclaw.plugin-cli-registration-entries-cache");

25+
26+

interface ProgramWithEntriesCache {

27+

[PLUGIN_CLI_ENTRIES_CACHE_KEY]?: {

28+

primary: string | undefined;

29+

entries: PluginCliRegistrationEntries;

30+

};

31+

}

32+
2033

const logger = createPluginCliLogger();

2134
2235

export const loadValidatedConfigForPluginRegistration =

@@ -46,21 +59,27 @@ export async function registerPluginCliCommands(

4659

const mode = options?.mode ?? "eager";

4760

const primary = options?.primary ?? undefined;

4861
49-

await registerPluginCliCommandGroups(

50-

program,

51-

await loadPluginCliRegistrationEntriesWithDefaults({

62+

const programWithCache = program as Command & ProgramWithEntriesCache;

63+

const cached = programWithCache[PLUGIN_CLI_ENTRIES_CACHE_KEY];

64+

let entries: PluginCliRegistrationEntries;

65+

if (cached && cached.primary === primary) {

66+

entries = cached.entries;

67+

} else {

68+

entries = await loadPluginCliRegistrationEntriesWithDefaults({

5269

cfg,

5370

env,

5471

loaderOptions,

5572

primaryCommand: primary,

56-

}),

57-

{

58-

mode,

59-

primary,

60-

existingCommands: new Set(program.commands.map((cmd) => cmd.name())),

61-

logger,

62-

},

63-

);

73+

});

74+

programWithCache[PLUGIN_CLI_ENTRIES_CACHE_KEY] = { primary, entries };

75+

}

76+
77+

await registerPluginCliCommandGroups(program, entries, {

78+

mode,

79+

primary,

80+

existingCommands: new Set(program.commands.map((cmd) => cmd.name())),

81+

logger,

82+

});

6483

}

6584
6685

export async function registerPluginCliCommandsFromValidatedConfig(