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

推荐订阅源

T
The Blog of Author Tim Ferriss
Hugging Face - Blog
Hugging Face - Blog
F
Fortinet All Blogs
B
Blog
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Microsoft Security Blog
Microsoft Security Blog
Blog — PlanetScale
Blog — PlanetScale
月光博客
月光博客
腾讯CDC
小众软件
小众软件
G
Google Developers Blog
V
Visual Studio Blog
罗磊的独立博客
GbyAI
GbyAI
V
V2EX
大猫的无限游戏
大猫的无限游戏
H
Help Net Security
L
LangChain Blog
Engineering at Meta
Engineering at Meta
量子位
The GitHub Blog
The GitHub Blog
博客园 - 司徒正美
WordPress大学
WordPress大学
B
Blog RSS Feed

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
perf(gateway): reuse metadata for startup warnings · open...
steipete · 2026-05-27 · via Recent Commits to openclaw:main

@@ -3,22 +3,65 @@ import type { OpenClawConfig } from "../config/types.openclaw.js";

33

import {

44

collectPluginConfigContractMatches,

55

resolvePluginConfigContractsById,

6+

type PluginConfigContractMetadata,

67

} from "../plugins/config-contracts.js";

8+

import { getCurrentPluginMetadataSnapshot } from "../plugins/current-plugin-metadata-snapshot.js";

79

import { isRecord } from "../utils.js";

810

import { collectEnabledInsecureOrDangerousFlagsFromContracts } from "./dangerous-config-flags-core.js";

91110-

export function collectEnabledInsecureOrDangerousFlags(cfg: OpenClawConfig): string[] {

12+

function resolveCurrentPluginConfigContractsById(params: {

13+

cfg: OpenClawConfig;

14+

pluginIds: readonly string[];

15+

}): ReadonlyMap<string, PluginConfigContractMetadata> | undefined {

16+

// Gateway startup already owns this metadata snapshot; reuse it here so

17+

// warning logs do not reload plugin manifests on the ready path.

18+

const snapshot = getCurrentPluginMetadataSnapshot({

19+

config: params.cfg,

20+

env: process.env,

21+

allowWorkspaceScopedSnapshot: true,

22+

});

23+

if (!snapshot) {

24+

return undefined;

25+

}

26+27+

const contractsById = new Map<string, PluginConfigContractMetadata>();

28+

for (const pluginId of params.pluginIds) {

29+

const normalizedPluginId = snapshot.normalizePluginId(pluginId);

30+

const plugin = snapshot.byPluginId.get(pluginId) ?? snapshot.byPluginId.get(normalizedPluginId);

31+

if (!plugin) {

32+

return undefined;

33+

}

34+

if (!plugin.configContracts) {

35+

continue;

36+

}

37+

contractsById.set(pluginId, {

38+

origin: plugin.origin,

39+

configContracts: plugin.configContracts,

40+

});

41+

}

42+

return contractsById;

43+

}

44+45+

export function collectEnabledInsecureOrDangerousFlags(

46+

cfg: OpenClawConfig,

47+

options: { preferCurrentPluginMetadataSnapshot?: boolean } = {},

48+

): string[] {

1149

const pluginEntries = cfg.plugins?.entries;

1250

if (!isRecord(pluginEntries)) {

1351

return collectEnabledInsecureOrDangerousFlagsFromContracts(cfg);

1452

}

53+

const pluginIds = Object.keys(pluginEntries);

155416-

const configContracts = resolvePluginConfigContractsById({

17-

config: cfg,

18-

workspaceDir: resolveAgentWorkspaceDir(cfg, resolveDefaultAgentId(cfg)),

19-

env: process.env,

20-

pluginIds: Object.keys(pluginEntries),

21-

});

55+

const configContracts =

56+

(options.preferCurrentPluginMetadataSnapshot

57+

? resolveCurrentPluginConfigContractsById({ cfg, pluginIds })

58+

: undefined) ??

59+

resolvePluginConfigContractsById({

60+

config: cfg,

61+

workspaceDir: resolveAgentWorkspaceDir(cfg, resolveDefaultAgentId(cfg)),

62+

env: process.env,

63+

pluginIds,

64+

});

2265

return collectEnabledInsecureOrDangerousFlagsFromContracts(cfg, {

2366

collectPluginConfigContractMatches,

2467

configContractsById: configContracts,