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

推荐订阅源

Stack Overflow Blog
Stack Overflow Blog
J
Java Code Geeks
Last Week in AI
Last Week in AI
人人都是产品经理
人人都是产品经理
博客园 - 【当耐特】
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
C
Check Point Blog
月光博客
月光博客
腾讯CDC
Engineering at Meta
Engineering at Meta
博客园 - Franky
Vercel News
Vercel News
D
Docker
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
F
Fortinet All Blogs
Microsoft Security Blog
Microsoft Security Blog
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
雷峰网
雷峰网
Google DeepMind News
Google DeepMind News
Martin Fowler
Martin Fowler
GbyAI
GbyAI
B
Blog
Hugging Face - Blog
Hugging Face - Blog
T
Tailwind CSS 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): normalize startup config from registry · op...
vincentkoc · 2026-04-26 · via Recent Commits to openclaw:main

@@ -9,14 +9,13 @@ import {

99

} from "../memory-host-sdk/dreaming.js";

1010

import { normalizeOptionalLowercaseString } from "../shared/string-coerce.js";

1111

import { hasExplicitChannelConfig } from "./channel-presence-policy.js";

12-

import {

13-

createPluginActivationSource,

14-

normalizePluginId,

15-

normalizePluginsConfig,

16-

resolveEffectivePluginActivationState,

17-

} from "./config-state.js";

12+

import { resolveEffectivePluginActivationState } from "./config-state.js";

1813

import type { InstalledPluginIndexRecord } from "./installed-plugin-index.js";

19-

import { loadPluginRegistrySnapshot } from "./plugin-registry.js";

14+

import {

15+

createPluginRegistryIdNormalizer,

16+

loadPluginRegistrySnapshot,

17+

normalizePluginsConfigWithRegistry,

18+

} from "./plugin-registry.js";

20192120

function listDisabledChannelIds(config: OpenClawConfig): Set<string> {

2221

const channels = config.channels;

@@ -64,7 +63,10 @@ function resolveGatewayStartupDreamingPluginIds(config: OpenClawConfig): Set<str

6463

return new Set([DEFAULT_MEMORY_DREAMING_PLUGIN_ID, resolveMemoryDreamingPluginId(config)]);

6564

}

666567-

function resolveExplicitMemorySlotStartupPluginId(config: OpenClawConfig): string | undefined {

66+

function resolveExplicitMemorySlotStartupPluginId(

67+

config: OpenClawConfig,

68+

normalizePluginId: (pluginId: string) => string,

69+

): string | undefined {

6870

const configuredSlot = config.plugins?.slots?.memory?.trim();

6971

if (!configuredSlot || configuredSlot.toLowerCase() === "none") {

7072

return undefined;

@@ -101,8 +103,11 @@ function hasConfiguredStartupChannel(params: {

101103

function canStartConfiguredChannelPlugin(params: {

102104

plugin: InstalledPluginIndexRecord;

103105

config: OpenClawConfig;

104-

pluginsConfig: ReturnType<typeof normalizePluginsConfig>;

105-

activationSource: ReturnType<typeof createPluginActivationSource>;

106+

pluginsConfig: ReturnType<typeof normalizePluginsConfigWithRegistry>;

107+

activationSource: {

108+

plugins: ReturnType<typeof normalizePluginsConfigWithRegistry>;

109+

rootConfig?: OpenClawConfig;

110+

};

106111

}): boolean {

107112

if (!params.pluginsConfig.enabled) {

108113

return false;

@@ -166,15 +171,16 @@ export function resolveConfiguredDeferredChannelPluginIds(params: {

166171

if (configuredChannelIds.size === 0) {

167172

return [];

168173

}

169-

const pluginsConfig = normalizePluginsConfig(params.config.plugins);

170-

const activationSource = createPluginActivationSource({

171-

config: params.config,

172-

});

173174

const index = loadPluginRegistrySnapshot({

174175

config: params.config,

175176

workspaceDir: params.workspaceDir,

176177

env: params.env,

177178

});

179+

const pluginsConfig = normalizePluginsConfigWithRegistry(params.config.plugins, index);

180+

const activationSource = {

181+

plugins: pluginsConfig,

182+

rootConfig: params.config,

183+

};

178184

return index.plugins

179185

.filter(

180186

(plugin) =>

@@ -197,28 +203,28 @@ export function resolveGatewayStartupPluginIds(params: {

197203

env: NodeJS.ProcessEnv;

198204

}): string[] {

199205

const configuredChannelIds = new Set(listPotentialEnabledChannelIds(params.config, params.env));

200-

const pluginsConfig = normalizePluginsConfig(params.config.plugins);

206+

const index = loadPluginRegistrySnapshot({

207+

config: params.config,

208+

workspaceDir: params.workspaceDir,

209+

env: params.env,

210+

});

211+

const pluginsConfig = normalizePluginsConfigWithRegistry(params.config.plugins, index);

201212

// Startup must classify allowlist exceptions against the raw config snapshot,

202213

// not the auto-enabled effective snapshot, or configured-only channels can be

203214

// misclassified as explicit enablement.

204-

const activationSource = createPluginActivationSource({

205-

config: params.activationSourceConfig ?? params.config,

206-

});

215+

const activationSourceConfig = params.activationSourceConfig ?? params.config;

216+

const activationSource = {

217+

plugins: normalizePluginsConfigWithRegistry(activationSourceConfig.plugins, index),

218+

rootConfig: activationSourceConfig,

219+

};

207220

const requiredAgentHarnessRuntimes = new Set(

208-

collectConfiguredAgentHarnessRuntimes(

209-

params.activationSourceConfig ?? params.config,

210-

params.env,

211-

),

221+

collectConfiguredAgentHarnessRuntimes(activationSourceConfig, params.env),

212222

);

213223

const startupDreamingPluginIds = resolveGatewayStartupDreamingPluginIds(params.config);

214224

const explicitMemorySlotStartupPluginId = resolveExplicitMemorySlotStartupPluginId(

215-

params.activationSourceConfig ?? params.config,

225+

activationSourceConfig,

226+

createPluginRegistryIdNormalizer(index),

216227

);

217-

const index = loadPluginRegistrySnapshot({

218-

config: params.config,

219-

workspaceDir: params.workspaceDir,

220-

env: params.env,

221-

});

222228

return index.plugins

223229

.filter((plugin) => {

224230

if (hasConfiguredStartupChannel({ plugin, configuredChannelIds })) {