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

推荐订阅源

D
Docker
B
Blog RSS Feed
Microsoft Security Blog
Microsoft Security Blog
Y
Y Combinator Blog
N
Netflix TechBlog - Medium
M
MIT News - Artificial intelligence
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
B
Blog
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
C
Check Point Blog
The GitHub Blog
The GitHub Blog
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
P
Proofpoint News Feed
Martin Fowler
Martin Fowler
大猫的无限游戏
大猫的无限游戏
GbyAI
GbyAI
博客园_首页
A
About on SuperTechFans
Blog — PlanetScale
Blog — PlanetScale
人人都是产品经理
人人都是产品经理
T
Tailwind CSS Blog
aimingoo的专栏
aimingoo的专栏
T
The Blog of Author Tim Ferriss
The Cloudflare 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
perf: skip unnecessary setup auth fallback · openclaw/ope...
steipete · 2026-05-31 · via Recent Commits to openclaw:main
1+

import { normalizeProviderId } from "@openclaw/model-catalog-core/provider-id";

12

import { resolveProviderAuthAliasMap } from "../agents/provider-auth-aliases.js";

23

import type { OpenClawConfig } from "../config/types.openclaw.js";

34

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

@@ -12,6 +13,7 @@ import {

1213

loadPluginMetadataSnapshot,

1314

type PluginMetadataSnapshot,

1415

} from "../plugins/plugin-metadata-snapshot.js";

16+

import { listSetupProviderIds } from "../plugins/setup-descriptors.js";

1517

import { hasKind } from "../plugins/slots.js";

1618

import { uniqueStrings } from "../shared/string-normalization.js";

1719

@@ -52,6 +54,7 @@ export type ProviderAuthLookupMaps = {

5254

aliasMap: Readonly<Record<string, string>>;

5355

envCandidateMap: Readonly<Record<string, readonly string[]>>;

5456

authEvidenceMap: Readonly<Record<string, readonly ProviderAuthEvidence[]>>;

57+

setupProviderFallbackRefs: readonly string[];

5558

};

56595760

function isWorkspacePluginTrustedForProviderEnvVars(

@@ -129,6 +132,13 @@ function appendUniqueAuthEvidence(

129132

}

130133

}

131134135+

function appendUniqueProviderRef(target: Set<string>, providerId: string): void {

136+

const normalized = normalizeProviderId(providerId);

137+

if (normalized) {

138+

target.add(normalized);

139+

}

140+

}

141+132142

function resolveProviderMetadataSnapshot(

133143

params?: ProviderEnvVarLookupParams,

134144

): PluginMetadataSnapshot {

@@ -260,6 +270,37 @@ function resolveManifestProviderAuthEvidenceFromSnapshot(

260270

return evidenceByProvider;

261271

}

262272273+

function resolveManifestSetupProviderFallbackRefsFromSnapshot(

274+

params: ProviderEnvVarLookupParams | undefined,

275+

snapshot: PluginMetadataSnapshot,

276+

aliases: Readonly<Record<string, string>>,

277+

): string[] {

278+

const refs = new Set<string>();

279+

for (const plugin of snapshot.plugins) {

280+

if (

281+

snapshot.index.plugins.length > 0 &&

282+

!isInstalledPluginEnabled(snapshot.index, plugin.id, params?.config)

283+

) {

284+

continue;

285+

}

286+

if (plugin.setup?.requiresRuntime === false) {

287+

continue;

288+

}

289+

if (plugin.setup?.providers === undefined && plugin.providers === undefined) {

290+

continue;

291+

}

292+

for (const providerId of listSetupProviderIds(plugin)) {

293+

appendUniqueProviderRef(refs, providerId);

294+

}

295+

}

296+

for (const [alias, target] of Object.entries(aliases)) {

297+

if (refs.has(target)) {

298+

appendUniqueProviderRef(refs, alias);

299+

}

300+

}

301+

return [...refs].toSorted((a, b) => a.localeCompare(b));

302+

}

303+263304

export function resolveProviderAuthEnvVarCandidates(

264305

params?: ProviderEnvVarLookupParams,

265306

): Record<string, readonly string[]> {

@@ -291,6 +332,11 @@ export function resolveProviderAuthLookupMaps(

291332

...CORE_PROVIDER_AUTH_ENV_VAR_CANDIDATES,

292333

},

293334

authEvidenceMap: resolveManifestProviderAuthEvidenceFromSnapshot(params, snapshot, aliasMap),

335+

setupProviderFallbackRefs: resolveManifestSetupProviderFallbackRefsFromSnapshot(

336+

params,

337+

snapshot,

338+

aliasMap,

339+

),

294340

};

295341

}

296342