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

推荐订阅源

Google DeepMind News
Google DeepMind News
G
Google Developers Blog
博客园 - 三生石上(FineUI控件)
B
Blog
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
Hugging Face - Blog
Hugging Face - Blog
C
Check Point Blog
V
V2EX
Vercel News
Vercel News
U
Unit 42
Recent Announcements
Recent Announcements
Last Week in AI
Last Week in AI
J
Java Code Geeks
WordPress大学
WordPress大学
罗磊的独立博客
I
InfoQ
阮一峰的网络日志
阮一峰的网络日志
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
小众软件
小众软件
M
MIT News - Artificial intelligence
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
Apple Machine Learning Research
Apple Machine Learning Research
Martin Fowler
Martin Fowler
云风的 BLOG
云风的 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
fix(doctor): preserve unknown web search records (#83315)...
giodl73-repo · 2026-05-20 · via Recent Commits to openclaw:main

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

77

normalizeLowercaseStringOrEmpty,

88

normalizeOptionalString,

99

} from "../shared/string-coerce.js";

10+

import { isBlockedObjectKey } from "./prototype-keys.js";

1011

import { AgentModelSchema, AgentToolModelSchema } from "./zod-schema.agent-model.js";

1112

import {

1213

GroupChatSchema,

@@ -340,26 +341,95 @@ const CodexUserLocationSchema = z

340341

})

341342

.optional();

342343344+

const LEGACY_WEB_SEARCH_PROVIDER_CONFIG_KEYS = new Set([

345+

"brave",

346+

"duckduckgo",

347+

"exa",

348+

"firecrawl",

349+

"gemini",

350+

"grok",

351+

"kimi",

352+

"minimax",

353+

"ollama",

354+

"perplexity",

355+

"searxng",

356+

"tavily",

357+

]);

358+359+

function isPlainRecord(value: unknown): value is Record<string, unknown> {

360+

return value !== null && typeof value === "object" && !Array.isArray(value);

361+

}

362+363+

const BLOCKED_WEB_SEARCH_KEYS_ISSUE_FIELD = "__openclawBlockedWebSearchKeys";

364+343365

const ToolsWebSearchSchema = z

344-

.object({

345-

enabled: z.boolean().optional(),

346-

provider: z.string().optional(),

347-

maxResults: z.number().int().positive().optional(),

348-

timeoutSeconds: z.number().int().positive().optional(),

349-

cacheTtlMinutes: z.number().nonnegative().optional(),

350-

apiKey: SecretInputSchema.optional().register(sensitive),

351-

openaiCodex: z

366+

.preprocess(

367+

(value) => {

368+

if (!isPlainRecord(value)) {

369+

return value;

370+

}

371+

const blockedKeys = Object.getOwnPropertyNames(value).filter((key) =>

372+

isBlockedObjectKey(key),

373+

);

374+

if (blockedKeys.length === 0) {

375+

return value;

376+

}

377+

return {

378+

...value,

379+

[BLOCKED_WEB_SEARCH_KEYS_ISSUE_FIELD]: blockedKeys,

380+

};

381+

},

382+

z

352383

.object({

353384

enabled: z.boolean().optional(),

354-

mode: z.union([z.literal("cached"), z.literal("live")]).optional(),

355-

allowedDomains: CodexAllowedDomainsSchema,

356-

contextSize: z.union([z.literal("low"), z.literal("medium"), z.literal("high")]).optional(),

357-

userLocation: CodexUserLocationSchema,

385+

provider: z.string().optional(),

386+

maxResults: z.number().int().positive().optional(),

387+

timeoutSeconds: z.number().int().positive().optional(),

388+

cacheTtlMinutes: z.number().nonnegative().optional(),

389+

apiKey: SecretInputSchema.optional().register(sensitive),

390+

openaiCodex: z

391+

.object({

392+

enabled: z.boolean().optional(),

393+

mode: z.union([z.literal("cached"), z.literal("live")]).optional(),

394+

allowedDomains: CodexAllowedDomainsSchema,

395+

contextSize: z

396+

.union([z.literal("low"), z.literal("medium"), z.literal("high")])

397+

.optional(),

398+

userLocation: CodexUserLocationSchema,

399+

})

400+

.strict()

401+

.optional(),

358402

})

359-

.strict()

360-

.optional(),

361-

})

362-

.strict()

403+

.catchall(z.unknown())

404+

.superRefine((value, ctx) => {

405+

const blockedKeys = value[BLOCKED_WEB_SEARCH_KEYS_ISSUE_FIELD];

406+

if (Array.isArray(blockedKeys)) {

407+

for (const key of blockedKeys) {

408+

if (typeof key !== "string") {

409+

continue;

410+

}

411+

ctx.addIssue({

412+

code: z.ZodIssueCode.custom,

413+

path: [key],

414+

message: "tools.web.search must not contain blocked object keys",

415+

});

416+

}

417+

}

418+

for (const [key, entry] of Object.entries(value)) {

419+

if (key === BLOCKED_WEB_SEARCH_KEYS_ISSUE_FIELD || isBlockedObjectKey(key)) {

420+

continue;

421+

}

422+

if (LEGACY_WEB_SEARCH_PROVIDER_CONFIG_KEYS.has(key) && isPlainRecord(entry)) {

423+

ctx.addIssue({

424+

code: z.ZodIssueCode.custom,

425+

path: [key],

426+

message:

427+

"legacy web_search provider config must use plugins.entries.<plugin>.config.webSearch",

428+

});

429+

}

430+

}

431+

}),

432+

)

363433

.optional();

364434365435

const ToolsWebFetchSchema = z