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

推荐订阅源

Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
V
V2EX
大猫的无限游戏
大猫的无限游戏
腾讯CDC
博客园 - Franky
WordPress大学
WordPress大学
Jina AI
Jina AI
GbyAI
GbyAI
云风的 BLOG
云风的 BLOG
B
Blog RSS Feed
Last Week in AI
Last Week in AI
The Cloudflare Blog
V
Visual Studio Blog
P
Proofpoint News Feed
博客园 - 叶小钗
L
LangChain Blog
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
Recorded Future
Recorded Future
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
T
The Blog of Author Tim Ferriss
人人都是产品经理
人人都是产品经理
Y
Y Combinator Blog
罗磊的独立博客
雷峰网
雷峰网
博客园 - 【当耐特】
Microsoft Security Blog
Microsoft Security Blog
L
LINUX DO - 热门话题
Cisco Talos Blog
Cisco Talos Blog
L
Lohrmann on Cybersecurity
Martin Fowler
Martin Fowler
Spread Privacy
Spread Privacy
MongoDB | Blog
MongoDB | Blog
Engineering at Meta
Engineering at Meta
C
Cybersecurity and Infrastructure Security Agency CISA
小众软件
小众软件
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
Recent Announcements
Recent Announcements
T
Threat Research - Cisco Blogs
Security Archives - TechRepublic
Security Archives - TechRepublic
量子位
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
宝玉的分享
宝玉的分享
D
DataBreaches.Net
T
The Exploit Database - CXSecurity.com
Vercel News
Vercel News
IT之家
IT之家
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
T
Troy Hunt's Blog
aimingoo的专栏
aimingoo的专栏

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 test: trim doctor command hotspots · openclaw/openclaw@c66f16a test: isolate agent auth and spawn hotspots · openclaw/openclaw@9285935 test: stabilize MCP startup disposal race · openclaw/openclaw@dd9d2eb test: merge browser contract server suites · openclaw/openclaw@5817a76 test: narrow ollama provider discovery setup · openclaw/openclaw@a0d9598 build: declare qa-lab aimock runtime dependency · openclaw/openclaw@24431e5 test: speed up safe-bins exec harness · openclaw/openclaw@ee856ab test: preserve tool helpers in embedded runner mocks · openclaw/openclaw@acd86a0 refactor: move memory embeddings into provider plugins · openclaw/openclaw@77e6e4c test: reuse system-run temp fixtures · openclaw/openclaw@7e9ff0f test: trim hotspot wait overhead · openclaw/openclaw@12a59b0 Check: avoid duplicate boundary prep · openclaw/openclaw@baf11b8 test: reduce hotspot fixture overhead · openclaw/openclaw@3a59edd feat(ui): overhaul settings and slash command UX (#67819) thanks @Bun… · openclaw/openclaw@2cfb660 QA Matrix: exit cleanly on failure · openclaw/openclaw@42805d2 QA Matrix: isolate scenario coverage · openclaw/openclaw@7e659e1 Matrix: refresh crypto bootstrap state · openclaw/openclaw@94081d8 QA Lab: add provider registry · openclaw/openclaw@bb7e982 Matrix: add plugin changelog · openclaw/openclaw@4acab55 test: trim more hotspot overhead · openclaw/openclaw@f485311 test: trim remaining hotspot tests · openclaw/openclaw@6ba8626 test: narrow hotspot mocks · openclaw/openclaw@dbc8179 test: isolate gemini embedding request helpers · openclaw/openclaw@cd330f5 test: trim memory and mcp hotspots · openclaw/openclaw@fd48dfa test: slim provider registry mocks · openclaw/openclaw@2e08c77 test: harden Parallels update smoke · openclaw/openclaw@1a98090 feat: default Anthropic to Opus 4.7 · openclaw/openclaw@628b454 fix: harden node-host shell payload mutability checks · openclaw/openclaw@75c551e fix: land node-host approval binding for native binaries (#66731) (th… · openclaw/openclaw@29919bb CI: add daily schedule to CodeQL workflow (#67645) · openclaw/openclaw@69d25f5 fix(gateway): capture config hash after plugin auto-enable to prevent… · openclaw/openclaw@8c11210 fix: repair sanitized replay tool results before send (#67620) (thank… · openclaw/openclaw@c3c7a99 fix: restrict HTML timeout short-circuit to transient statuses · openclaw/openclaw@de129a6 fix: keep TUI watchdog bound to active run (#67401) (thanks @xantorres) · openclaw/openclaw@3525273 Gateway/skills: dedupe skills prefix-match + drop dead fallback on log · openclaw/openclaw@d7f489f Extensions/lmstudio: back off inference preload after consecutive fai… · openclaw/openclaw@b555214 TUI/streaming: add watchdog that resets the activity indicator after … · openclaw/openclaw@f44ab20 Agents/tool-loop: enable unknown-tool stream guard by default · openclaw/openclaw@36ed367 Gateway/skills: invalidate session skills snapshot on config write · openclaw/openclaw@b23d59a fix: classify HTML provider error pages correctly (#67642) (thanks @s… · openclaw/openclaw@e588e90 fix(skills): remove unused model-usage import (#67641) · openclaw/openclaw@55f05df docs(changelog): credit codex fix superseded PRs · openclaw/openclaw@e485f24 fix(openai-codex): normalize stale transport metadata in resolution a… · openclaw/openclaw@90801ba CI: pin Docker-related GitHub Actions (#67632) · openclaw/openclaw@f697b01 Android: modernize WebView and discovery API usage (#67627) · openclaw/openclaw@44a6e50 fix(deps): bump hono to 4.12.14 and @hono/node-server to 1.19.14 (GHS… · openclaw/openclaw@fbccc18 fix(deps): bump dompurify to 3.4.0 (#67614) · openclaw/openclaw@2c2dc00 CI: add explicit permissions to all workflow jobs (fixes code-scannin… · openclaw/openclaw@01b7516 fix: register bundled TTS providers and route overrides correctly (#6… · openclaw/openclaw@6ea3cdd fix: align host tilde paths with OS home (#62804) (thanks @stainlu) · openclaw/openclaw@ecfaf64 fix: flush creds queue before reconnect socket open (#67464) (thanks … · openclaw/openclaw@405c63f fix: strip standalone <function> tool call tags from visible text (#6… · openclaw/openclaw@78df859 fix(agents): preserve cli session metadata before transcript persist … · openclaw/openclaw@898fd04 docs(changelog): move cli transcript entry · openclaw/openclaw@c1817c6 fix(agents): normalize cli transcript api field · openclaw/openclaw@3a3fae0 docs(changelog): note cli transcript persistence · openclaw/openclaw@6c343f1 fix(agents): persist cli transcript turns · openclaw/openclaw@b8ef507 fix(msteams): harden security-sensitive flows (#65841) · openclaw/openclaw@c56b56e [Dashboard] Fix exec approval modal overflow for long command content… · openclaw/openclaw@053c5b0 Docs: remove QA changelog entry · openclaw/openclaw@7fd5771 QA: fix private runtime source loading (#67428) · openclaw/openclaw@d5933af docs(gateway): correct protocol.md schema path, hello-ok example, aut… · openclaw/openclaw@489404d CI: pin Node 22 runners to 22.18.0 · openclaw/openclaw@4ffa621 models.authStatus: normalize provider ids + tighten env-backed escape… · openclaw/openclaw@f2fdb9d Update CHANGELOG.md · openclaw/openclaw@7694a92 test(parallels): clean up npm update guard jobs · openclaw/openclaw@045ea7b Plugins: prefer scanDir override paths · openclaw/openclaw@b2974da fix(dreaming): default storage.mode to "separate" so phase blocks sto… · openclaw/openclaw@8c392f0 fix(memory-core): skip dreaming transcript ingestion via session stor… · openclaw/openclaw@a1b01f0 fix: dedupe replayed exec.finished node events (#67281) · openclaw/openclaw@5dcf526
fix(web-search): preserve runtime-only provider config · openclaw/openclaw@5d437de
steipete · 2026-05-28 · via Recent Commits to openclaw:main
Original file line numberDiff line numberDiff line change

@@ -0,0 +1,51 @@

1+

import { describe, expect, it, vi } from "vitest";

2+

import { createBraveWebSearchProvider } from "./brave-web-search-provider.js";

3+
4+

const runtimeMock = vi.hoisted(() => {

5+

const searchConfigs: Array<Record<string, unknown> | undefined> = [];

6+

return {

7+

searchConfigs,

8+

executeBraveSearch: vi.fn(async (_args: unknown, searchConfig?: Record<string, unknown>) => {

9+

searchConfigs.push(searchConfig);

10+

return { results: [] };

11+

}),

12+

};

13+

});

14+
15+

vi.mock("./brave-web-search-provider.runtime.js", () => ({

16+

executeBraveSearch: runtimeMock.executeBraveSearch,

17+

}));

18+
19+

describe("brave web search config merge", () => {

20+

it("keeps plugin webSearch runtime-only after merging it for the tool", async () => {

21+

const provider = createBraveWebSearchProvider();

22+

const tool = provider.createTool({

23+

config: {

24+

plugins: {

25+

entries: {

26+

brave: {

27+

config: {

28+

webSearch: {

29+

apiKey: "brave-test-key",

30+

mode: "llm-context",

31+

},

32+

},

33+

},

34+

},

35+

},

36+

},

37+

searchConfig: { provider: "brave" },

38+

});

39+
40+

await tool?.execute({ query: "OpenClaw docs" });

41+
42+

const [searchConfig] = runtimeMock.searchConfigs;

43+

expect(searchConfig?.brave).toEqual({

44+

apiKey: "brave-test-key",

45+

mode: "llm-context",

46+

});

47+

expect(searchConfig?.apiKey).toBe("brave-test-key");

48+

expect(Object.keys(searchConfig ?? {})).toEqual(["provider", "apiKey"]);

49+

expect(Object.getOwnPropertyDescriptor(searchConfig ?? {}, "brave")?.enumerable).toBe(false);

50+

});

51+

});

Original file line numberDiff line numberDiff line change

@@ -1,10 +1,15 @@

1+

import type { OpenClawConfig } from "openclaw/plugin-sdk/config-contracts";

12

import { isDiagnosticFlagEnabled } from "openclaw/plugin-sdk/diagnostic-runtime";

23

import type {

34

SearchConfigRecord,

45

WebSearchProviderPlugin,

56

WebSearchProviderToolDefinition,

67

} from "openclaw/plugin-sdk/provider-web-search";

7-

import { createWebSearchProviderContractFields } from "openclaw/plugin-sdk/provider-web-search-config-contract";

8+

import {

9+

createWebSearchProviderContractFields,

10+

mergeScopedSearchConfig,

11+

resolveProviderWebSearchPluginConfig,

12+

} from "openclaw/plugin-sdk/provider-web-search-config-contract";

813

import { isRecord } from "openclaw/plugin-sdk/string-coerce-runtime";

914
1015

const BRAVE_CREDENTIAL_PATH = "plugins.entries.brave.config.webSearch.apiKey";

@@ -62,22 +67,8 @@ const BraveSearchSchema = {

6267

},

6368

} satisfies Record<string, unknown>;

6469
65-

function resolveProviderWebSearchPluginConfig(

66-

config: unknown,

67-

pluginId: string,

68-

): Record<string, unknown> | undefined {

69-

if (!isRecord(config)) {

70-

return undefined;

71-

}

72-

const plugins = isRecord(config.plugins) ? config.plugins : undefined;

73-

const entries = isRecord(plugins?.entries) ? plugins.entries : undefined;

74-

const entry = isRecord(entries?.[pluginId]) ? entries[pluginId] : undefined;

75-

const pluginConfig = isRecord(entry?.config) ? entry.config : undefined;

76-

return isRecord(pluginConfig?.webSearch) ? pluginConfig.webSearch : undefined;

77-

}

78-
7970

function resolveLegacyTopLevelBraveCredential(

80-

config: unknown,

71+

config: OpenClawConfig | undefined,

8172

): { path: string; value: unknown } | undefined {

8273

if (!isRecord(config)) {

8374

return undefined;

@@ -91,39 +82,13 @@ function resolveLegacyTopLevelBraveCredential(

9182

return { path: "tools.web.search.apiKey", value: search.apiKey };

9283

}

9384
94-

function resolveConfiguredBraveCredential(config: unknown): unknown {

85+

function resolveConfiguredBraveCredential(config: OpenClawConfig | undefined): unknown {

9586

return (

9687

resolveProviderWebSearchPluginConfig(config, "brave")?.apiKey ??

9788

resolveLegacyTopLevelBraveCredential(config)?.value

9889

);

9990

}

10091
101-

function mergeScopedSearchConfig(

102-

searchConfig: Record<string, unknown> | undefined,

103-

key: string,

104-

pluginConfig: Record<string, unknown> | undefined,

105-

options?: { mirrorApiKeyToTopLevel?: boolean },

106-

): Record<string, unknown> | undefined {

107-

if (!pluginConfig) {

108-

return searchConfig;

109-

}

110-
111-

const currentScoped = isRecord(searchConfig?.[key]) ? searchConfig?.[key] : {};

112-

const next: Record<string, unknown> = {

113-

...searchConfig,

114-

[key]: {

115-

...currentScoped,

116-

...pluginConfig,

117-

},

118-

};

119-
120-

if (options?.mirrorApiKeyToTopLevel && pluginConfig.apiKey !== undefined) {

121-

next.apiKey = pluginConfig.apiKey;

122-

}

123-
124-

return next;

125-

}

126-
12792

function resolveBraveMode(searchConfig?: Record<string, unknown>): "web" | "llm-context" {

12893

const brave = isRecord(searchConfig?.brave) ? searchConfig.brave : undefined;

12994

return brave?.mode === "llm-context" ? "llm-context" : "web";

Original file line numberDiff line numberDiff line change

@@ -92,17 +92,25 @@ function withGoogleModelProviderFallbacks(

9292

return searchConfig;

9393

}

9494

const gemini = isRecord(searchConfig?.gemini) ? { ...searchConfig.gemini } : {};

95-

const mergedSearchConfig = searchConfig ? { ...searchConfig } : {};

95+

const mergedSearchConfig: Record<string, unknown> = searchConfig

96+

? Object.defineProperties({}, Object.getOwnPropertyDescriptors(searchConfig))

97+

: {};

98+

const geminiDescriptor = searchConfig

99+

? Object.getOwnPropertyDescriptor(searchConfig, "gemini")

100+

: undefined;

96101

if (provider.apiKey !== undefined) {

97102

gemini.providerApiKey = provider.apiKey;

98103

}

99104

if (provider.baseUrl !== undefined) {

100105

gemini.providerBaseUrl = provider.baseUrl;

101106

}

102-

return {

103-

...mergedSearchConfig,

104-

gemini,

105-

};

107+

Object.defineProperty(mergedSearchConfig, "gemini", {

108+

value: gemini,

109+

enumerable: geminiDescriptor?.enumerable ?? false,

110+

configurable: true,

111+

writable: true,

112+

});

113+

return mergedSearchConfig;

106114

}

107115
108116

export function createGeminiWebSearchProvider(): WebSearchProviderPlugin {

@@ -144,5 +152,6 @@ export const testing = {

144152

resolveGeminiApiKey,

145153

resolveGeminiBaseUrl,

146154

resolveGeminiModel,

155+

withGoogleModelProviderFallbacks,

147156

} as const;

148157

export { testing as __testing };

Original file line numberDiff line numberDiff line change

@@ -133,6 +133,34 @@ describe("google web search provider", () => {

133133

expect(provider.getConfiguredCredentialValue?.(config)).toBe("AIza-plugin-test");

134134

});

135135
136+

it("keeps model-provider fallback config runtime-only when Gemini config was injected", () => {

137+

const searchConfig = Object.defineProperty({ provider: "gemini" }, "gemini", {

138+

value: { apiKey: "AIza-plugin-test" },

139+

enumerable: false,

140+

configurable: true,

141+

writable: true,

142+

});

143+
144+

const merged = testing.withGoogleModelProviderFallbacks(searchConfig, {

145+

models: {

146+

providers: {

147+

google: createGoogleModelProviderConfig({

148+

apiKey: "AIza-provider-test",

149+

baseUrl: "https://generativelanguage.googleapis.com/proxy/v1beta/",

150+

}),

151+

},

152+

},

153+

});

154+
155+

expect(merged?.gemini).toEqual({

156+

apiKey: "AIza-plugin-test",

157+

providerApiKey: "AIza-provider-test",

158+

providerBaseUrl: "https://generativelanguage.googleapis.com/proxy/v1beta/",

159+

});

160+

expect(Object.keys(merged ?? {})).toEqual(["provider"]);

161+

expect(Object.getOwnPropertyDescriptor(merged, "gemini")?.enumerable).toBe(false);

162+

});

163+
136164

it("defaults the Gemini web search model and trims explicit overrides", () => {

137165

expect(testing.resolveGeminiModel()).toBe("gemini-2.5-flash");

138166

expect(testing.resolveGeminiModel({ model: " gemini-2.5-pro " })).toBe("gemini-2.5-pro");

Original file line numberDiff line numberDiff line change

@@ -145,6 +145,20 @@ describe("web_search scoped config merge", () => {

145145

});

146146

});

147147
148+

it("keeps mirrored Brave plugin config runtime-only when newly injected", () => {

149+

const merged = mergeScopedSearchConfig(

150+

{ provider: "brave" },

151+

"brave",

152+

{ apiKey: "brave-test-key" },

153+

{ mirrorApiKeyToTopLevel: true },

154+

);

155+
156+

expect(merged?.brave).toEqual({ apiKey: "brave-test-key" });

157+

expect(merged?.apiKey).toBe("brave-test-key");

158+

expect(Object.keys(merged ?? {})).toEqual(["provider", "apiKey"]);

159+

expect(Object.getOwnPropertyDescriptor(merged, "brave")?.enumerable).toBe(false);

160+

});

161+
148162

it("keeps newly injected legacy provider config runtime-only for validation", () => {

149163

const merged = mergeScopedSearchConfig({ enabled: true, provider: "gemini" }, "perplexity", {

150164

apiKey: "perplexity-test-key",