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

推荐订阅源

Martin Fowler
Martin Fowler
A
About on SuperTechFans
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
aimingoo的专栏
aimingoo的专栏
T
The Blog of Author Tim Ferriss
IT之家
IT之家
罗磊的独立博客
博客园_首页
月光博客
月光博客
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
Last Week in AI
Last Week in AI
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
量子位
Hugging Face - Blog
Hugging Face - Blog
G
Google Developers Blog
博客园 - 叶小钗
H
Help Net Security
N
Netflix TechBlog - Medium
B
Blog
Engineering at Meta
Engineering at Meta
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
V
V2EX
Vercel News
Vercel News
博客园 - 三生石上(FineUI控件)

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
refactor: derive CLI web credential targets · openclaw/op...
steipete · 2026-04-22 · via Recent Commits to openclaw:main

@@ -30,16 +30,6 @@ const STATIC_AGENT_RUNTIME_BASE_TARGET_IDS = [

3030

"messages.tts.providers.*.apiKey",

3131

"skills.entries.*.apiKey",

3232

"tools.web.search.apiKey",

33-

"plugins.entries.brave.config.webSearch.apiKey",

34-

"plugins.entries.google.config.webSearch.apiKey",

35-

"plugins.entries.exa.config.webSearch.apiKey",

36-

"plugins.entries.xai.config.webSearch.apiKey",

37-

"plugins.entries.moonshot.config.webSearch.apiKey",

38-

"plugins.entries.perplexity.config.webSearch.apiKey",

39-

"plugins.entries.firecrawl.config.webSearch.apiKey",

40-

"plugins.entries.firecrawl.config.webFetch.apiKey",

41-

"plugins.entries.tavily.config.webSearch.apiKey",

42-

"plugins.entries.minimax.config.webSearch.apiKey",

4333

] as const;

4434

const STATIC_STATUS_TARGET_IDS = [

4535

"agents.defaults.memorySearch.remote.apiKey",

@@ -67,13 +57,34 @@ type CommandSecretTargets = {

6757

};

68586959

let cachedCommandSecretTargets: CommandSecretTargets | undefined;

60+

let cachedAgentRuntimeBaseTargetIds: string[] | undefined;

7061

let cachedChannelSecretTargetIds: string[] | undefined;

71627263

function getChannelSecretTargetIds(): string[] {

7364

cachedChannelSecretTargetIds ??= idsByPrefix(["channels."]);

7465

return cachedChannelSecretTargetIds;

7566

}

766768+

function isPluginWebCredentialTargetId(id: string): boolean {

69+

const segments = id.split(".");

70+

if (segments[0] !== "plugins" || segments[1] !== "entries" || segments[3] !== "config") {

71+

return false;

72+

}

73+

const configPath = segments.slice(4).join(".");

74+

return configPath === "webSearch.apiKey" || configPath === "webFetch.apiKey";

75+

}

76+77+

function getAgentRuntimeBaseTargetIds(): string[] {

78+

cachedAgentRuntimeBaseTargetIds ??= [

79+

...STATIC_AGENT_RUNTIME_BASE_TARGET_IDS,

80+

...listSecretTargetRegistryEntries()

81+

.map((entry) => entry.id)

82+

.filter(isPluginWebCredentialTargetId)

83+

.toSorted(),

84+

];

85+

return cachedAgentRuntimeBaseTargetIds;

86+

}

87+7788

function isScopedChannelSecretTargetEntry(params: {

7889

entry: {

7990

id: string;

@@ -120,7 +131,7 @@ function buildCommandSecretTargets(): CommandSecretTargets {

120131

const channelTargetIds = getChannelSecretTargetIds();

121132

return {

122133

channels: channelTargetIds,

123-

agentRuntime: [...STATIC_AGENT_RUNTIME_BASE_TARGET_IDS, ...channelTargetIds],

134+

agentRuntime: [...getAgentRuntimeBaseTargetIds(), ...channelTargetIds],

124135

status: [...STATIC_STATUS_TARGET_IDS, ...channelTargetIds],

125136

securityAudit: [...STATIC_SECURITY_AUDIT_TARGET_IDS, ...channelTargetIds],

126137

};

@@ -213,7 +224,7 @@ export function getAgentRuntimeCommandSecretTargetIds(params?: {

213224

includeChannelTargets?: boolean;

214225

}): Set<string> {

215226

if (params?.includeChannelTargets !== true) {

216-

return toTargetIdSet(STATIC_AGENT_RUNTIME_BASE_TARGET_IDS);

227+

return toTargetIdSet(getAgentRuntimeBaseTargetIds());

217228

}

218229

return toTargetIdSet(getCommandSecretTargets().agentRuntime);

219230

}