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

推荐订阅源

Google DeepMind News
Google DeepMind News
aimingoo的专栏
aimingoo的专栏
爱范儿
爱范儿
D
Docker
I
InfoQ
Microsoft Security Blog
Microsoft Security Blog
G
Google Developers Blog
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
Vercel News
Vercel News
H
Hackread – Cybersecurity News, Data Breaches, AI and More
T
Tailwind CSS Blog
D
DataBreaches.Net
月光博客
月光博客
N
Netflix TechBlog - Medium
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
V
Visual Studio Blog
MyScale Blog
MyScale Blog
B
Blog
阮一峰的网络日志
阮一峰的网络日志
L
LangChain Blog
Recent Announcements
Recent Announcements
Microsoft Azure Blog
Microsoft Azure Blog
WordPress大学
WordPress大学

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(config): validate web search providers · openclaw/ope...
steipete · 2026-05-02 · via Recent Commits to openclaw:main

@@ -185,32 +185,42 @@ vi.mock("../plugins/manifest-registry.js", () => {

185185

schemaCacheKey: "test:brave",

186186

configSchema: buildSchema(),

187187

},

188-

...[

189-

"firecrawl",

190-

"google",

191-

"minimax",

192-

"moonshot",

193-

"perplexity",

194-

"searxng",

195-

"tavily",

196-

"xai",

197-

].map((id) => ({

198-

id,

199-

origin: "bundled",

188+

...mockWebSearchProviders

189+

.filter((provider) => provider.pluginId !== "brave")

190+

.map((provider) => ({

191+

id: provider.pluginId,

192+

origin: "bundled",

193+

channels: [],

194+

providers: [],

195+

contracts: {

196+

webSearchProviders: [provider.id],

197+

},

198+

cliBackends: [],

199+

skills: [],

200+

hooks: [],

201+

rootDir: `/tmp/plugins/${provider.pluginId}`,

202+

source: "test",

203+

manifestPath: `/tmp/plugins/${provider.pluginId}/openclaw.plugin.json`,

204+

schemaCacheKey: `test:${provider.pluginId}`,

205+

configSchema: buildSchema(),

206+

})),

207+

{

208+

id: "acme-search",

209+

origin: "installed",

200210

channels: [],

201211

providers: [],

202212

contracts: {

203-

webSearchProviders: [id],

213+

webSearchProviders: ["acme-search"],

204214

},

205215

cliBackends: [],

206216

skills: [],

207217

hooks: [],

208-

rootDir: `/tmp/plugins/${id}`,

218+

rootDir: "/tmp/plugins/acme-search",

209219

source: "test",

210-

manifestPath: `/tmp/plugins/${id}/openclaw.plugin.json`,

211-

schemaCacheKey: `test:${id}`,

220+

manifestPath: "/tmp/plugins/acme-search/openclaw.plugin.json",

221+

schemaCacheKey: "test:acme-search",

212222

configSchema: buildSchema(),

213-

})),

223+

},

214224

],

215225

diagnostics: [],

216226

}),

@@ -413,6 +423,74 @@ describe("web search provider config", () => {

413423414424

expect(res.ok).toBe(true);

415425

});

426+427+

it("accepts provider ids registered by installed plugin manifests", () => {

428+

const res = validateConfigObjectWithPlugins(

429+

buildWebSearchProviderConfig({

430+

provider: "acme-search",

431+

}),

432+

);

433+434+

expect(res.ok).toBe(true);

435+

});

436+437+

it("rejects unknown provider ids without plugin evidence", () => {

438+

const res = validateConfigObjectWithPlugins({

439+

tools: {

440+

web: {

441+

search: {

442+

provider: "brvae",

443+

},

444+

},

445+

},

446+

});

447+448+

expect(res.ok).toBe(false);

449+

if (res.ok) {

450+

return;

451+

}

452+

expect(res.issues).toContainEqual(

453+

expect.objectContaining({

454+

path: "tools.web.search.provider",

455+

message: "unknown web_search provider: brvae",

456+

allowedValues: expect.arrayContaining(["acme-search", "brave", "gemini"]),

457+

}),

458+

);

459+

});

460+461+

it("warns for unknown provider ids when stale plugin config is present", () => {

462+

const res = validateConfigObjectWithPlugins({

463+

tools: {

464+

web: {

465+

search: {

466+

provider: "missing-third-party",

467+

},

468+

},

469+

},

470+

plugins: {

471+

entries: {

472+

"missing-third-party": {

473+

config: {

474+

webSearch: {},

475+

},

476+

},

477+

},

478+

},

479+

});

480+481+

expect(res.ok).toBe(true);

482+

if (!res.ok) {

483+

return;

484+

}

485+

expect(res.warnings).toEqual(

486+

expect.arrayContaining([

487+

expect.objectContaining({

488+

path: "tools.web.search.provider",

489+

message: expect.stringContaining("unknown web_search provider: missing-third-party"),

490+

}),

491+

]),

492+

);

493+

});

416494

});

417495418496

describe("web search provider auto-detection", () => {