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

推荐订阅源

WordPress大学
WordPress大学
大猫的无限游戏
大猫的无限游戏
B
Blog
阮一峰的网络日志
阮一峰的网络日志
IT之家
IT之家
Hugging Face - Blog
Hugging Face - Blog
博客园 - 【当耐特】
Jina AI
Jina AI
博客园 - 聂微东
T
The Blog of Author Tim Ferriss
宝玉的分享
宝玉的分享
L
LangChain Blog
M
MIT News - Artificial intelligence
Blog — PlanetScale
Blog — PlanetScale
腾讯CDC
酷 壳 – CoolShell
酷 壳 – CoolShell
Y
Y Combinator Blog
F
Fortinet All Blogs
H
Help Net Security
B
Blog RSS Feed
J
Java Code Geeks
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Apple Machine Learning Research
Apple Machine Learning Research
S
SegmentFault 最新的问题

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: drop unused browser client wrappers · openclaw/...
steipete · 2026-05-01 · via Recent Commits to openclaw:main

@@ -1,7 +1,7 @@

1-

import type { BrowserActionPathResult, BrowserActionTargetOk } from "./client-actions-types.js";

1+

import type { BrowserActionPathResult } from "./client-actions-types.js";

22

import { buildProfileQuery, withBaseUrl } from "./client-actions-url.js";

33

import { fetchBrowserJson } from "./client-fetch.js";

4-

import type { BrowserConsoleMessage, BrowserNetworkRequest } from "./pw-session.js";

4+

import type { BrowserConsoleMessage } from "./pw-session.js";

5566

function buildQuerySuffix(params: Array<[string, string | boolean | undefined]>): string {

77

const query = new URLSearchParams();

@@ -47,120 +47,3 @@ export async function browserPdfSave(

4747

timeoutMs: 20000,

4848

});

4949

}

50-51-

export async function browserRequests(

52-

baseUrl: string | undefined,

53-

opts: {

54-

targetId?: string;

55-

filter?: string;

56-

clear?: boolean;

57-

profile?: string;

58-

} = {},

59-

): Promise<{ ok: true; targetId: string; url?: string; requests: BrowserNetworkRequest[] }> {

60-

const suffix = buildQuerySuffix([

61-

["targetId", opts.targetId],

62-

["filter", opts.filter],

63-

["clear", typeof opts.clear === "boolean" ? opts.clear : undefined],

64-

["profile", opts.profile],

65-

]);

66-

return await fetchBrowserJson<{

67-

ok: true;

68-

targetId: string;

69-

url?: string;

70-

requests: BrowserNetworkRequest[];

71-

}>(withBaseUrl(baseUrl, `/requests${suffix}`), { timeoutMs: 20000 });

72-

}

73-74-

export async function browserTraceStart(

75-

baseUrl: string | undefined,

76-

opts: {

77-

targetId?: string;

78-

screenshots?: boolean;

79-

snapshots?: boolean;

80-

sources?: boolean;

81-

profile?: string;

82-

} = {},

83-

): Promise<BrowserActionTargetOk> {

84-

const q = buildProfileQuery(opts.profile);

85-

return await fetchBrowserJson<BrowserActionTargetOk>(withBaseUrl(baseUrl, `/trace/start${q}`), {

86-

method: "POST",

87-

headers: { "Content-Type": "application/json" },

88-

body: JSON.stringify({

89-

targetId: opts.targetId,

90-

screenshots: opts.screenshots,

91-

snapshots: opts.snapshots,

92-

sources: opts.sources,

93-

}),

94-

timeoutMs: 20000,

95-

});

96-

}

97-98-

export async function browserTraceStop(

99-

baseUrl: string | undefined,

100-

opts: { targetId?: string; path?: string; profile?: string } = {},

101-

): Promise<BrowserActionPathResult> {

102-

const q = buildProfileQuery(opts.profile);

103-

return await fetchBrowserJson<BrowserActionPathResult>(withBaseUrl(baseUrl, `/trace/stop${q}`), {

104-

method: "POST",

105-

headers: { "Content-Type": "application/json" },

106-

body: JSON.stringify({ targetId: opts.targetId, path: opts.path }),

107-

timeoutMs: 20000,

108-

});

109-

}

110-111-

export async function browserHighlight(

112-

baseUrl: string | undefined,

113-

opts: { ref: string; targetId?: string; profile?: string },

114-

): Promise<BrowserActionTargetOk> {

115-

const q = buildProfileQuery(opts.profile);

116-

return await fetchBrowserJson<BrowserActionTargetOk>(withBaseUrl(baseUrl, `/highlight${q}`), {

117-

method: "POST",

118-

headers: { "Content-Type": "application/json" },

119-

body: JSON.stringify({ targetId: opts.targetId, ref: opts.ref }),

120-

timeoutMs: 20000,

121-

});

122-

}

123-124-

export async function browserResponseBody(

125-

baseUrl: string | undefined,

126-

opts: {

127-

url: string;

128-

targetId?: string;

129-

timeoutMs?: number;

130-

maxChars?: number;

131-

profile?: string;

132-

},

133-

): Promise<{

134-

ok: true;

135-

targetId: string;

136-

response: {

137-

url: string;

138-

status?: number;

139-

headers?: Record<string, string>;

140-

body: string;

141-

truncated?: boolean;

142-

};

143-

}> {

144-

const q = buildProfileQuery(opts.profile);

145-

return await fetchBrowserJson<{

146-

ok: true;

147-

targetId: string;

148-

response: {

149-

url: string;

150-

status?: number;

151-

headers?: Record<string, string>;

152-

body: string;

153-

truncated?: boolean;

154-

};

155-

}>(withBaseUrl(baseUrl, `/response/body${q}`), {

156-

method: "POST",

157-

headers: { "Content-Type": "application/json" },

158-

body: JSON.stringify({

159-

targetId: opts.targetId,

160-

url: opts.url,

161-

timeoutMs: opts.timeoutMs,

162-

maxChars: opts.maxChars,

163-

}),

164-

timeoutMs: 20000,

165-

});

166-

}