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

推荐订阅源

云风的 BLOG
云风的 BLOG
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
IT之家
IT之家
Recent Announcements
Recent Announcements
B
Blog
D
Docker
V
V2EX
GbyAI
GbyAI
L
LangChain Blog
博客园 - Franky
U
Unit 42
T
The Blog of Author Tim Ferriss
A
About on SuperTechFans
博客园 - 【当耐特】
Google DeepMind News
Google DeepMind News
H
Hackread – Cybersecurity News, Data Breaches, AI and More
Vercel News
Vercel News
博客园_首页
D
DataBreaches.Net
人人都是产品经理
人人都是产品经理
Y
Y Combinator Blog
量子位
Blog — PlanetScale
Blog — PlanetScale
罗磊的独立博客

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(qa-lab): stabilize web search parity fixture · opencl...
vincentkoc · 2026-06-18 · via Recent Commits to openclaw:main
1+

// Qa Lab provider module implements deterministic QA-only web_search behavior.

2+

import {

3+

MAX_SEARCH_COUNT,

4+

readPositiveIntegerParam,

5+

readStringParam,

6+

resolveSiteName,

7+

wrapWebContent,

8+

type WebSearchProviderPlugin,

9+

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

10+11+

export const QA_LAB_WEB_SEARCH_PROVIDER_ID = "qa-lab-search";

12+13+

const QaLabWebSearchSchema = {

14+

type: "object",

15+

required: ["query"],

16+

properties: {

17+

query: {

18+

type: "string",

19+

description: "Search query string.",

20+

},

21+

count: {

22+

type: "integer",

23+

description: "Number of deterministic QA results to return.",

24+

minimum: 1,

25+

maximum: MAX_SEARCH_COUNT,

26+

},

27+

},

28+

additionalProperties: false,

29+

} satisfies Record<string, unknown>;

30+31+

function buildQaLabSearchResult(query: string, index: number) {

32+

const url = `https://docs.openclaw.ai/qa-lab/search-fixture/${index + 1}`;

33+

return {

34+

title: wrapWebContent(`QA Lab search fixture result ${index + 1}`, "web_search"),

35+

url,

36+

description: wrapWebContent(

37+

`Deterministic QA Lab web_search result for query: ${query}`,

38+

"web_search",

39+

),

40+

siteName: resolveSiteName(url) || "docs.openclaw.ai",

41+

};

42+

}

43+44+

export function createQaLabWebSearchProvider(): WebSearchProviderPlugin {

45+

return {

46+

id: QA_LAB_WEB_SEARCH_PROVIDER_ID,

47+

label: "QA Lab Search",

48+

hint: "Deterministic QA-only web search fixture",

49+

requiresCredential: false,

50+

envVars: [],

51+

placeholder: "(no key needed)",

52+

signupUrl: "https://docs.openclaw.ai/concepts/qa-e2e-automation",

53+

docsUrl: "https://docs.openclaw.ai/concepts/qa-e2e-automation",

54+

credentialPath: "",

55+

inactiveSecretPaths: [],

56+

getCredentialValue: () => undefined,

57+

setCredentialValue: (searchConfigTarget, value) => {

58+

void searchConfigTarget;

59+

void value;

60+

},

61+

createTool: () => ({

62+

description:

63+

"Search a deterministic QA Lab fixture corpus. This provider is for QA runtime parity only and never calls the public web.",

64+

parameters: QaLabWebSearchSchema,

65+

execute: async (args) => {

66+

const query = readStringParam(args, "query", { required: true });

67+

const count =

68+

readPositiveIntegerParam(args, "count", {

69+

max: MAX_SEARCH_COUNT,

70+

message: `count must be an integer from 1 to ${MAX_SEARCH_COUNT}.`,

71+

}) ?? 1;

72+

return {

73+

query,

74+

results: Array.from({ length: count }, (_entry, index) =>

75+

buildQaLabSearchResult(query, index),

76+

),

77+

};

78+

},

79+

}),

80+

};

81+

}