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

推荐订阅源

有赞技术团队
有赞技术团队
H
Hackread – Cybersecurity News, Data Breaches, AI and More
I
InfoQ
J
Java Code Geeks
Microsoft Security Blog
Microsoft Security Blog
G
Google Developers Blog
D
DataBreaches.Net
Recent Announcements
Recent Announcements
Microsoft Azure Blog
Microsoft Azure Blog
B
Blog RSS Feed
Y
Y Combinator Blog
博客园 - 【当耐特】
博客园 - 聂微东
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
大猫的无限游戏
大猫的无限游戏
P
Proofpoint News Feed
量子位
C
Check Point Blog
F
Fortinet All Blogs
罗磊的独立博客
Last Week in AI
Last Week in AI
GbyAI
GbyAI
L
LangChain 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: report oauth web search in onboarding summary · open...
fuller-stack · 2026-05-22 · via Recent Commits to openclaw:main

@@ -56,6 +56,16 @@ const hasKeyInEnv = vi.hoisted(() =>

5656

const listConfiguredWebSearchProviders = vi.hoisted(() =>

5757

vi.fn<(params?: { config?: OpenClawConfig }) => PluginWebSearchProviderEntry[]>(() => []),

5858

);

59+

const hasAuthProfileForProvider = vi.hoisted(() =>

60+

vi.fn<

61+

(params: {

62+

provider: string;

63+

agentDir?: string;

64+

includeExternalCli?: boolean;

65+

type?: string;

66+

}) => boolean

67+

>(() => false),

68+

);

59696070

vi.mock("../commands/onboard-helpers.js", () => ({

6171

detectBrowserOpenSupport: vi.fn(async () => ({ ok: false })),

@@ -99,6 +109,10 @@ vi.mock("../commands/onboard-search.js", () => ({

99109

resolveExistingKey,

100110

}));

101111112+

vi.mock("../agents/tools/model-config.helpers.js", () => ({

113+

hasAuthProfileForProvider,

114+

}));

115+102116

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

103117

listConfiguredWebSearchProviders,

104118

}));

@@ -165,7 +179,14 @@ function createRuntime(): RuntimeEnv {

165179

function createWebSearchProviderEntry(

166180

provider: Pick<

167181

PluginWebSearchProviderEntry,

168-

"id" | "label" | "hint" | "envVars" | "placeholder" | "signupUrl" | "credentialPath"

182+

| "id"

183+

| "label"

184+

| "hint"

185+

| "envVars"

186+

| "authProviderId"

187+

| "placeholder"

188+

| "signupUrl"

189+

| "credentialPath"

169190

>,

170191

): PluginWebSearchProviderEntry {

171192

return {

@@ -297,6 +318,8 @@ describe("finalizeSetupWizard", () => {

297318

hasKeyInEnv.mockReturnValue(false);

298319

listConfiguredWebSearchProviders.mockReset();

299320

listConfiguredWebSearchProviders.mockReturnValue([]);

321+

hasAuthProfileForProvider.mockReset();

322+

hasAuthProfileForProvider.mockReturnValue(false);

300323

});

301324302325

it("resolves gateway password SecretRef for probe but omits auth from TUI hatch", async () => {

@@ -717,6 +740,67 @@ describe("finalizeSetupWizard", () => {

717740

);

718741

});

719742743+

it("reports OAuth-backed web search as enabled without an API key", async () => {

744+

listConfiguredWebSearchProviders.mockReturnValue([

745+

createWebSearchProviderEntry({

746+

id: "grok",

747+

label: "Grok (xAI)",

748+

hint: "Uses xAI OAuth or API key",

749+

envVars: ["XAI_API_KEY"],

750+

authProviderId: "xai",

751+

placeholder: "xai-...",

752+

signupUrl: "https://console.x.ai/",

753+

credentialPath: "plugins.entries.xai.config.webSearch.apiKey",

754+

}),

755+

]);

756+

hasAuthProfileForProvider.mockImplementation(

757+

({ provider, type }) => provider === "xai" && (!type || type === "oauth"),

758+

);

759+760+

const prompter = createLaterPrompter();

761+762+

await finalizeSetupWizard(

763+

createAdvancedFinalizeArgs({

764+

nextConfig: {

765+

tools: {

766+

web: {

767+

search: {

768+

provider: "grok",

769+

enabled: true,

770+

},

771+

},

772+

},

773+

},

774+

prompter,

775+

}),

776+

);

777+778+

expectNoteContains(

779+

prompter,

780+

"Web search is enabled, so your agent can look things up online when needed.",

781+

"Web search",

782+

);

783+

expectNoteContains(prompter, "Credential: existing xAI OAuth sign-in.", "Web search");

784+

expect(

785+

vi

786+

.mocked(prompter.note)

787+

.mock.calls.some(

788+

([message, title]) => title === "Web search" && message.includes("no API key"),

789+

),

790+

).toBe(false);

791+

expect(hasAuthProfileForProvider).toHaveBeenCalledWith(

792+

expect.objectContaining({

793+

provider: "xai",

794+

}),

795+

);

796+

expect(hasAuthProfileForProvider).toHaveBeenCalledWith(

797+

expect.objectContaining({

798+

provider: "xai",

799+

type: "oauth",

800+

}),

801+

);

802+

});

803+720804

it("uses the setup token for health checks to avoid local env token drift", async () => {

721805

vi.stubEnv("OPENCLAW_GATEWAY_TOKEN", "env-token");

722806

const prompter = createLaterPrompter();