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

推荐订阅源

N
Netflix TechBlog - Medium
IT之家
IT之家
博客园_首页
Hugging Face - Blog
Hugging Face - Blog
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
美团技术团队
小众软件
小众软件
博客园 - 叶小钗
WordPress大学
WordPress大学
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
博客园 - 三生石上(FineUI控件)
罗磊的独立博客
博客园 - Franky
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
Last Week in AI
Last Week in AI
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
有赞技术团队
有赞技术团队
T
Tailwind CSS Blog
宝玉的分享
宝玉的分享
博客园 - 【当耐特】
月光博客
月光博客
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
酷 壳 – CoolShell
酷 壳 – CoolShell
人人都是产品经理
人人都是产品经理

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: reuse web provider candidate manifests · openclaw/op...
shakkernerd · 2026-04-27 · via Recent Commits to openclaw:main

@@ -1,5 +1,6 @@

11

import path from "node:path";

22

import type { PluginLoadOptions } from "./loader.js";

3+

import type { PluginManifestRecord } from "./manifest-registry.js";

34

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

45

import type { PluginWebFetchProviderEntry, PluginWebSearchProviderEntry } from "./types.js";

56

import { resolveBundledWebFetchResolutionConfig } from "./web-fetch-providers.shared.js";

@@ -9,7 +10,7 @@ import {

910

resolveBundledExplicitWebFetchProvidersFromPublicArtifacts,

1011

resolveBundledExplicitWebSearchProvidersFromPublicArtifacts,

1112

} from "./web-provider-public-artifacts.explicit.js";

12-

import { resolveManifestDeclaredWebProviderCandidatePluginIds } from "./web-provider-resolution-shared.js";

13+

import { resolveManifestDeclaredWebProviderCandidates } from "./web-provider-resolution-shared.js";

1314

import { resolveBundledWebSearchResolutionConfig } from "./web-search-providers.shared.js";

14151516

type BundledWebProviderPublicArtifactParams = {

@@ -20,6 +21,11 @@ type BundledWebProviderPublicArtifactParams = {

2021

onlyPluginIds?: readonly string[];

2122

};

222324+

type BundledCandidateResolution = {

25+

pluginIds: string[];

26+

manifestRecords?: readonly PluginManifestRecord[];

27+

};

28+2329

function resolveBundledCandidatePluginIds(params: {

2430

contract: "webSearchProviders" | "webFetchProviders";

2531

configKey: "webSearch" | "webFetch";

@@ -28,42 +34,52 @@ function resolveBundledCandidatePluginIds(params: {

2834

env?: PluginLoadOptions["env"];

2935

bundledAllowlistCompat?: boolean;

3036

onlyPluginIds?: readonly string[];

31-

}): string[] {

37+

}): BundledCandidateResolution {

3238

if (params.onlyPluginIds && params.onlyPluginIds.length > 0) {

33-

return [...new Set(params.onlyPluginIds)].toSorted((left, right) => left.localeCompare(right));

39+

return {

40+

pluginIds: [...new Set(params.onlyPluginIds)].toSorted((left, right) =>

41+

left.localeCompare(right),

42+

),

43+

};

3444

}

3545

const resolvedConfig =

3646

params.contract === "webSearchProviders"

3747

? resolveBundledWebSearchResolutionConfig(params).config

3848

: resolveBundledWebFetchResolutionConfig(params).config;

39-

return (

40-

resolveManifestDeclaredWebProviderCandidatePluginIds({

41-

contract: params.contract,

42-

configKey: params.configKey,

43-

config: resolvedConfig,

44-

workspaceDir: params.workspaceDir,

45-

env: params.env,

46-

onlyPluginIds: params.onlyPluginIds,

47-

origin: "bundled",

48-

}) ?? []

49-

);

49+

const candidates = resolveManifestDeclaredWebProviderCandidates({

50+

contract: params.contract,

51+

configKey: params.configKey,

52+

config: resolvedConfig,

53+

workspaceDir: params.workspaceDir,

54+

env: params.env,

55+

onlyPluginIds: params.onlyPluginIds,

56+

origin: "bundled",

57+

});

58+

return {

59+

pluginIds: candidates.pluginIds ?? [],

60+

...(candidates.manifestRecords ? { manifestRecords: candidates.manifestRecords } : {}),

61+

};

5062

}

51635264

function resolveBundledManifestRecordsByPluginId(params: {

5365

config?: PluginLoadOptions["config"];

5466

workspaceDir?: string;

5567

env?: PluginLoadOptions["env"];

5668

onlyPluginIds: readonly string[];

69+

manifestRecords?: readonly PluginManifestRecord[];

5770

}) {

5871

const allowedPluginIds = new Set(params.onlyPluginIds);

59-

return new Map(

72+

const manifestRecords =

73+

params.manifestRecords ??

6074

loadPluginManifestRegistryForPluginRegistry({

6175

config: params.config,

6276

workspaceDir: params.workspaceDir,

6377

env: params.env,

6478

includeDisabled: true,

65-

})

66-

.plugins.filter((record) => record.origin === "bundled" && allowedPluginIds.has(record.id))

79+

}).plugins;

80+

return new Map(

81+

manifestRecords

82+

.filter((record) => record.origin === "bundled" && allowedPluginIds.has(record.id))

6783

.map((record) => [record.id, record] as const),

6884

);

6985

}

@@ -80,11 +96,11 @@ export function resolveBundledWebSearchProvidersFromPublicArtifacts(

8096

bundledAllowlistCompat: params.bundledAllowlistCompat,

8197

onlyPluginIds: params.onlyPluginIds,

8298

});

83-

if (pluginIds.length === 0) {

99+

if (pluginIds.pluginIds.length === 0) {

84100

return [];

85101

}

86102

const directProviders = resolveBundledExplicitWebSearchProvidersFromPublicArtifacts({

87-

onlyPluginIds: pluginIds,

103+

onlyPluginIds: pluginIds.pluginIds,

88104

});

89105

if (directProviders) {

90106

return directProviders;

@@ -93,10 +109,11 @@ export function resolveBundledWebSearchProvidersFromPublicArtifacts(

93109

config: params.config,

94110

workspaceDir: params.workspaceDir,

95111

env: params.env,

96-

onlyPluginIds: pluginIds,

112+

onlyPluginIds: pluginIds.pluginIds,

113+

manifestRecords: pluginIds.manifestRecords,

97114

});

98115

const providers: PluginWebSearchProviderEntry[] = [];

99-

for (const pluginId of pluginIds) {

116+

for (const pluginId of pluginIds.pluginIds) {

100117

const record = recordsByPluginId.get(pluginId);

101118

if (!record) {

102119

return null;

@@ -125,11 +142,11 @@ export function resolveBundledWebFetchProvidersFromPublicArtifacts(

125142

bundledAllowlistCompat: params.bundledAllowlistCompat,

126143

onlyPluginIds: params.onlyPluginIds,

127144

});

128-

if (pluginIds.length === 0) {

145+

if (pluginIds.pluginIds.length === 0) {

129146

return [];

130147

}

131148

const directProviders = resolveBundledExplicitWebFetchProvidersFromPublicArtifacts({

132-

onlyPluginIds: pluginIds,

149+

onlyPluginIds: pluginIds.pluginIds,

133150

});

134151

if (directProviders) {

135152

return directProviders;

@@ -138,10 +155,11 @@ export function resolveBundledWebFetchProvidersFromPublicArtifacts(

138155

config: params.config,

139156

workspaceDir: params.workspaceDir,

140157

env: params.env,

141-

onlyPluginIds: pluginIds,

158+

onlyPluginIds: pluginIds.pluginIds,

159+

manifestRecords: pluginIds.manifestRecords,

142160

});

143161

const providers: PluginWebFetchProviderEntry[] = [];

144-

for (const pluginId of pluginIds) {

162+

for (const pluginId of pluginIds.pluginIds) {

145163

const record = recordsByPluginId.get(pluginId);

146164

if (!record) {

147165

return null;