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

推荐订阅源

MyScale Blog
MyScale Blog
F
Fortinet All Blogs
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
D
Docker
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
爱范儿
爱范儿
V
Visual Studio Blog
Last Week in AI
Last Week in AI
WordPress大学
WordPress大学
aimingoo的专栏
aimingoo的专栏
小众软件
小众软件
L
LangChain Blog
Vercel News
Vercel News
阮一峰的网络日志
阮一峰的网络日志
IT之家
IT之家
P
Proofpoint News Feed
博客园_首页
D
DataBreaches.Net
T
The Blog of Author Tim Ferriss
The GitHub Blog
The GitHub Blog
酷 壳 – CoolShell
酷 壳 – CoolShell
C
Check Point Blog
Engineering at Meta
Engineering at Meta
Microsoft Azure Blog
Microsoft Azure 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
refactor(web): trim runtime helper exports · openclaw/ope...
vincentkoc · 2026-06-17 · via Recent Commits to openclaw:main
Original file line numberDiff line numberDiff line change

@@ -29,7 +29,7 @@ type WebFetchConfig = NonNullable<OpenClawConfig["tools"]>["web"] extends infer

2929

: undefined

3030

: undefined;

3131
32-

export type ResolveWebFetchDefinitionParams = {

32+

type ResolveWebFetchDefinitionParams = {

3333

config?: OpenClawConfig;

3434

sandboxed?: boolean;

3535

runtimeWebFetch?: RuntimeWebFetchMetadata;

@@ -38,7 +38,7 @@ export type ResolveWebFetchDefinitionParams = {

3838

};

3939
4040

/** Resolves whether web_fetch is enabled for the current config/sandbox. */

41-

export function resolveWebFetchEnabled(params: {

41+

function resolveWebFetchEnabled(params: {

4242

fetch?: WebFetchConfig;

4343

sandboxed?: boolean;

4444

}): boolean {

@@ -102,17 +102,8 @@ export function listWebFetchProviders(params?: {

102102

});

103103

}

104104
105-

/** Lists plugin-configured web_fetch providers. */

106-

export function listConfiguredWebFetchProviders(params?: {

107-

config?: OpenClawConfig;

108-

}): PluginWebFetchProviderEntry[] {

109-

return resolvePluginWebFetchProviders({

110-

config: params?.config,

111-

});

112-

}

113-
114105

/** Resolves the configured or auto-detected web_fetch provider id. */

115-

export function resolveWebFetchProviderId(params: {

106+

function resolveWebFetchProviderId(params: {

116107

fetch?: WebFetchConfig;

117108

config?: OpenClawConfig;

118109

providers?: PluginWebFetchProviderEntry[];

Original file line numberDiff line numberDiff line change

@@ -165,14 +165,13 @@ function createDuckDuckGoSearchProvider(

165165
166166

describe("web search runtime", () => {

167167

let runWebSearch: typeof import("./runtime.js").runWebSearch;

168-

let resolveWebSearchDefinition: typeof import("./runtime.js").resolveWebSearchDefinition;

169168

let activateSecretsRuntimeSnapshot: typeof import("../secrets/runtime.js").activateSecretsRuntimeSnapshot;

170169

let clearSecretsRuntimeSnapshot: typeof import("../secrets/runtime.js").clearSecretsRuntimeSnapshot;

171170

let setRuntimeConfigSnapshot: typeof import("../config/config.js").setRuntimeConfigSnapshot;

172171

const tempDirs: string[] = [];

173172
174173

beforeAll(async () => {

175-

({ resolveWebSearchDefinition, runWebSearch } = await import("./runtime.js"));

174+

({ runWebSearch } = await import("./runtime.js"));

176175

({ activateSecretsRuntimeSnapshot, clearSecretsRuntimeSnapshot } =

177176

await import("../secrets/runtime.js"));

178177

({ setRuntimeConfigSnapshot } = await import("../config/config.js"));

@@ -591,16 +590,6 @@ describe("web search runtime", () => {

591590

).rejects.toThrow("web_search is disabled or no provider is available.");

592591

});

593592
594-

it("does not resolve a keyless provider definition when no provider is configured", () => {

595-

resolvePluginWebSearchProvidersMock.mockReturnValue([createDuckDuckGoSearchProvider()]);

596-
597-

const resolved = resolveWebSearchDefinition({

598-

config: {},

599-

});

600-
601-

expect(resolved).toBeNull();

602-

});

603-
604593

it("uses a keyless provider when the user explicitly selects it", async () => {

605594

resolveRuntimeWebSearchProvidersMock.mockReturnValue([createDuckDuckGoSearchProvider()]);

606595

@@ -774,29 +763,6 @@ describe("web search runtime", () => {

774763

expect(createTool).not.toHaveBeenCalled();

775764

});

776765
777-

it("ignores auto-detected keyless runtime metadata when resolving a provider definition", () => {

778-

resolvePluginWebSearchProvidersMock.mockReturnValue([

779-

createWebSearchTestProvider({

780-

pluginId: "parallel",

781-

id: "parallel-free",

782-

credentialPath: "",

783-

autoDetectOrder: 76,

784-

requiresCredential: false,

785-

}),

786-

]);

787-
788-

const resolved = resolveWebSearchDefinition({

789-

config: {},

790-

runtimeWebSearch: {

791-

providerSource: "auto-detect",

792-

selectedProvider: "parallel-free",

793-

diagnostics: [],

794-

},

795-

});

796-
797-

expect(resolved).toBeNull();

798-

});

799-
800766

it("falls back to another provider when auto-selected search execution fails", async () => {

801767

resolveRuntimeWebSearchProvidersMock.mockReturnValue([

802768

createGoogleSearchProvider({

Original file line numberDiff line numberDiff line change

@@ -39,18 +39,6 @@ import type {

3939

RuntimeWebSearchConfig as WebSearchConfig,

4040

} from "./runtime-types.js";

4141
42-

// Runtime provider selection and execution for web_search. This keeps plugin,

43-

// runtime, and explicit provider selections aligned before a tool executes.

44-

export type {

45-

ListWebSearchProvidersParams,

46-

ResolveWebSearchDefinitionParams,

47-

RunWebSearchParams,

48-

RunWebSearchResult,

49-

RuntimeWebSearchConfig,

50-

RuntimeWebSearchProviderEntry,

51-

RuntimeWebSearchToolDefinition,

52-

} from "./runtime-types.js";

53-
5442

function resolveSearchConfig(cfg?: OpenClawConfig): WebSearchConfig {

5543

return resolveWebProviderConfig(cfg, "search") as NonNullable<WebSearchConfig> | undefined;

5644

}

@@ -70,7 +58,7 @@ function resolveWebSearchRuntimeConfig(params?: {

7058

}

7159
7260

/** Resolves whether web_search is enabled for the current config/sandbox. */

73-

export function resolveWebSearchEnabled(params: {

61+

function resolveWebSearchEnabled(params: {

7462

search?: WebSearchConfig;

7563

sandboxed?: boolean;

7664

}): boolean {

@@ -383,7 +371,7 @@ function loadSortedWebSearchProviders(

383371

}

384372
385373

/** Resolves the executable web_search provider tool definition. */

386-

export function resolveWebSearchDefinition(

374+

function resolveWebSearchDefinition(

387375

options?: ResolveWebSearchDefinitionParams,

388376

): { provider: PluginWebSearchProviderEntry; definition: WebSearchProviderToolDefinition } | null {

389377

const { config, search, runtimeWebSearch } = resolveWebSearchRequestContext(options);

@@ -603,14 +591,3 @@ export async function runWebSearch(params: RunWebSearchParams): Promise<RunWebSe

603591

}

604592

throw lastError instanceof Error ? lastError : new Error(String(lastError));

605593

}

606-
607-

export const testing = {

608-

resolveSearchConfig,

609-

resolveSearchProvider: resolveWebSearchProviderId,

610-

resolveWebSearchProviderId,

611-

resolveWebSearchCandidates,

612-

resolveExplicitWebSearchProviderId,

613-

resolveExplicitWebSearchProviderPluginIds,

614-

hasExplicitWebSearchSelection,

615-

};

616-

export { testing as __testing };