@thoughtflow/browser 0.2.0 → 0.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +4 -3
- package/src/tools/workspace/browser-session-pool.ts +376 -0
- package/src/tools/workspace/browser.tool.ts +362 -97
- package/src/tools/workspace/vision-browser.tool.ts +158 -4
- package/tsconfig.json +4 -1
- package/dist/index.d.ts +0 -3
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js +0 -8
- package/dist/index.js.map +0 -1
- package/dist/tools/workspace/browser.tool.d.ts +0 -23
- package/dist/tools/workspace/browser.tool.d.ts.map +0 -1
- package/dist/tools/workspace/browser.tool.js +0 -170
- package/dist/tools/workspace/browser.tool.js.map +0 -1
- package/dist/tools/workspace/vision-browser.tool.d.ts +0 -30
- package/dist/tools/workspace/vision-browser.tool.d.ts.map +0 -1
- package/dist/tools/workspace/vision-browser.tool.js +0 -269
- package/dist/tools/workspace/vision-browser.tool.js.map +0 -1
|
@@ -1,269 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.VisionBrowserTool = void 0;
|
|
4
|
-
const zod_1 = require("zod");
|
|
5
|
-
const core_1 = require("@thoughtflow/core");
|
|
6
|
-
/**
|
|
7
|
-
* VisionBrowserTool — navigates to a URL, optionally interacts with the page,
|
|
8
|
-
* takes a screenshot, and analyzes it using a vision-capable LLM.
|
|
9
|
-
*
|
|
10
|
-
* Playwright is loaded lazily on the first run() call so that registering
|
|
11
|
-
* this tool does NOT require Playwright to be installed. If Playwright is
|
|
12
|
-
* missing, run() returns `success: false` with a helpful install message.
|
|
13
|
-
*
|
|
14
|
-
* The tool is self-contained: it calls the vision LLM directly rather than
|
|
15
|
-
* routing images through the conversation pipeline.
|
|
16
|
-
*/
|
|
17
|
-
class VisionBrowserTool extends core_1.ToolBase {
|
|
18
|
-
visionAdapter;
|
|
19
|
-
defaultModel;
|
|
20
|
-
rootDir;
|
|
21
|
-
name = "visionBrowser";
|
|
22
|
-
description = "Visual web page analysis using headless browser screenshots and a vision LLM. " +
|
|
23
|
-
"Provide exactly one of: url (navigate), html (inline HTML string), or htmlFile (path to .html file). " +
|
|
24
|
-
"Optionally performs interactions (click, type, scroll, wait) before capturing the screenshot. " +
|
|
25
|
-
"Supports custom HTTP headers for auth/access, cookies for session state, " +
|
|
26
|
-
"waitForSelector for slow-loading pages, and waitForResponse for API-dependent pages. " +
|
|
27
|
-
"Analyzes it according to the provided prompt using a vision-capable model. " +
|
|
28
|
-
"Use this tool when you need to visually inspect a rendered web page — checking layout, " +
|
|
29
|
-
"colors, visibility of elements, UI correctness, or any visual property that cannot " +
|
|
30
|
-
"be determined from DOM text alone. Playwright is loaded on first use.";
|
|
31
|
-
namespace = "web";
|
|
32
|
-
tags = ["read", "analyze"];
|
|
33
|
-
readonly = true;
|
|
34
|
-
constructor(visionAdapter, defaultModel = "gemma3:12b", rootDir) {
|
|
35
|
-
super(zod_1.z.object({
|
|
36
|
-
url: zod_1.z.string().optional().describe("URL of the page to analyze"),
|
|
37
|
-
html: zod_1.z.string().optional().describe("Raw HTML string to render"),
|
|
38
|
-
htmlFile: zod_1.z.string().optional().describe("Path to a .html file to render"),
|
|
39
|
-
prompt: zod_1.z.string().describe("What to check/analyze on the rendered page"),
|
|
40
|
-
model: zod_1.z.string().optional().describe("Vision model name override"),
|
|
41
|
-
width: zod_1.z.number().optional().default(1280),
|
|
42
|
-
height: zod_1.z.number().optional().default(800),
|
|
43
|
-
fullPage: zod_1.z.boolean().optional().default(false),
|
|
44
|
-
waitFor: zod_1.z.number().optional().default(3000).describe("ms to wait after load"),
|
|
45
|
-
// ── New: auth & slow-page resilience ──
|
|
46
|
-
headers: zod_1.z.record(zod_1.z.string(), zod_1.z.string()).optional()
|
|
47
|
-
.describe("Custom HTTP headers (e.g. Authorization, Cookie, X-Auth-Token) for access-protected pages. Only applies with url navigation."),
|
|
48
|
-
cookies: zod_1.z.array(zod_1.z.object({
|
|
49
|
-
name: zod_1.z.string(),
|
|
50
|
-
value: zod_1.z.string(),
|
|
51
|
-
domain: zod_1.z.string().optional(),
|
|
52
|
-
path: zod_1.z.string().optional().default("/"),
|
|
53
|
-
httpOnly: zod_1.z.boolean().optional(),
|
|
54
|
-
secure: zod_1.z.boolean().optional(),
|
|
55
|
-
sameSite: zod_1.z.enum(["Strict", "Lax", "None"]).optional(),
|
|
56
|
-
})).optional().describe("Cookies to set before navigation (for session/auth state). Only applies with url navigation."),
|
|
57
|
-
waitForSelector: zod_1.z.string().optional()
|
|
58
|
-
.describe("CSS selector to wait for before taking screenshot (for slow-loading pages). " +
|
|
59
|
-
"If the element does not appear within maxWaitMs, proceeds anyway."),
|
|
60
|
-
waitForResponse: zod_1.z.string().optional()
|
|
61
|
-
.describe("URL pattern (glob substring or regex) to wait for a matching network response. " +
|
|
62
|
-
"Useful for pages that depend on API calls completing. Only applies with url navigation."),
|
|
63
|
-
maxWaitMs: zod_1.z.number().optional().default(30000)
|
|
64
|
-
.describe("Maximum ms to wait for waitForSelector or waitForResponse (default 30s)"),
|
|
65
|
-
selector: zod_1.z.string().optional().describe("CSS selector - screenshot only this element"),
|
|
66
|
-
actions: zod_1.z.array(zod_1.z.object({
|
|
67
|
-
action: zod_1.z.enum(["click", "type", "scroll", "wait"]),
|
|
68
|
-
selector: zod_1.z.string().optional(),
|
|
69
|
-
value: zod_1.z.string().optional(),
|
|
70
|
-
})).optional().describe("Interactions to perform before screenshot"),
|
|
71
|
-
}));
|
|
72
|
-
this.visionAdapter = visionAdapter;
|
|
73
|
-
this.defaultModel = defaultModel;
|
|
74
|
-
this.rootDir = rootDir;
|
|
75
|
-
}
|
|
76
|
-
browser = null;
|
|
77
|
-
page = null;
|
|
78
|
-
async getPage() {
|
|
79
|
-
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
|
80
|
-
const { chromium } = require("playwright");
|
|
81
|
-
if (!this.browser || !this.browser.isConnected()) {
|
|
82
|
-
this.browser = await chromium.launch({ headless: true });
|
|
83
|
-
}
|
|
84
|
-
if (!this.page || this.page.isClosed()) {
|
|
85
|
-
this.page = await this.browser.newPage();
|
|
86
|
-
}
|
|
87
|
-
return this.page;
|
|
88
|
-
}
|
|
89
|
-
async closePage() {
|
|
90
|
-
await this.page?.close();
|
|
91
|
-
this.page = null;
|
|
92
|
-
}
|
|
93
|
-
async closeBrowser() {
|
|
94
|
-
await this.closePage();
|
|
95
|
-
await this.browser?.close();
|
|
96
|
-
this.browser = null;
|
|
97
|
-
}
|
|
98
|
-
async run(input, _ctx) {
|
|
99
|
-
// Lazy-load Playwright on first use (optional peer dependency)
|
|
100
|
-
try {
|
|
101
|
-
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
|
102
|
-
require("playwright");
|
|
103
|
-
}
|
|
104
|
-
catch {
|
|
105
|
-
return {
|
|
106
|
-
success: false,
|
|
107
|
-
error: "Playwright is not installed. Run: npm install playwright && npx playwright install chromium",
|
|
108
|
-
};
|
|
109
|
-
}
|
|
110
|
-
const url = input["url"];
|
|
111
|
-
const html = input["html"];
|
|
112
|
-
const htmlFile = input["htmlFile"];
|
|
113
|
-
const prompt = input["prompt"];
|
|
114
|
-
const model = input["model"];
|
|
115
|
-
const width = input["width"] ?? 1280;
|
|
116
|
-
const height = input["height"] ?? 800;
|
|
117
|
-
const fullPage = input["fullPage"] ?? false;
|
|
118
|
-
const waitFor = input["waitFor"] ?? 3000;
|
|
119
|
-
const selector = input["selector"];
|
|
120
|
-
const headers = input["headers"];
|
|
121
|
-
const cookies = input["cookies"];
|
|
122
|
-
const waitForSelector = input["waitForSelector"];
|
|
123
|
-
const waitForResponse = input["waitForResponse"];
|
|
124
|
-
const maxWaitMs = input["maxWaitMs"] ?? 30000;
|
|
125
|
-
const actions = input["actions"];
|
|
126
|
-
const sources = [url, html, htmlFile].filter(Boolean);
|
|
127
|
-
if (sources.length === 0)
|
|
128
|
-
return { success: false, error: "One of url, html, or htmlFile is required" };
|
|
129
|
-
if (sources.length > 1)
|
|
130
|
-
return { success: false, error: "Provide exactly one of: url, html, or htmlFile" };
|
|
131
|
-
if (!prompt)
|
|
132
|
-
return { success: false, error: "prompt is required" };
|
|
133
|
-
try {
|
|
134
|
-
const page = await this.getPage();
|
|
135
|
-
await page.setViewportSize({ width, height });
|
|
136
|
-
// Set custom headers if provided (for auth, etc.)
|
|
137
|
-
if (headers && url) {
|
|
138
|
-
await page.setExtraHTTPHeaders(headers);
|
|
139
|
-
}
|
|
140
|
-
// Set cookies if provided
|
|
141
|
-
if (cookies && cookies.length > 0) {
|
|
142
|
-
const cookieParams = cookies.map((c) => ({
|
|
143
|
-
name: c.name,
|
|
144
|
-
value: c.value,
|
|
145
|
-
domain: c.domain,
|
|
146
|
-
path: c.path ?? "/",
|
|
147
|
-
httpOnly: c.httpOnly ?? false,
|
|
148
|
-
secure: c.secure ?? false,
|
|
149
|
-
sameSite: c.sameSite,
|
|
150
|
-
}));
|
|
151
|
-
// If url-based navigation, set cookies before navigating
|
|
152
|
-
if (url) {
|
|
153
|
-
try {
|
|
154
|
-
await page.context().addCookies(cookieParams);
|
|
155
|
-
}
|
|
156
|
-
catch {
|
|
157
|
-
// Some cookie params may be rejected by browser — non-fatal
|
|
158
|
-
}
|
|
159
|
-
}
|
|
160
|
-
}
|
|
161
|
-
// Set up response waiting before navigation (if requested)
|
|
162
|
-
let responsePromise;
|
|
163
|
-
if (waitForResponse && url) {
|
|
164
|
-
let responsePattern;
|
|
165
|
-
try {
|
|
166
|
-
responsePattern = new RegExp(waitForResponse);
|
|
167
|
-
}
|
|
168
|
-
catch {
|
|
169
|
-
return { success: false, error: `Invalid waitForResponse pattern: ${waitForResponse}. Must be a valid regex or simple string.` };
|
|
170
|
-
}
|
|
171
|
-
responsePromise = page.waitForResponse((resp) => responsePattern.test(resp.url()), { timeout: maxWaitMs }).then(() => { }).catch(() => {
|
|
172
|
-
// Timeout on response wait is non-fatal
|
|
173
|
-
});
|
|
174
|
-
}
|
|
175
|
-
if (html) {
|
|
176
|
-
await page.setContent(html, { waitUntil: "networkidle" });
|
|
177
|
-
}
|
|
178
|
-
else if (htmlFile) {
|
|
179
|
-
const { resolve, isAbsolute } = require("path");
|
|
180
|
-
const fs = require("fs");
|
|
181
|
-
const resolvedPath = isAbsolute(htmlFile) || !this.rootDir
|
|
182
|
-
? htmlFile
|
|
183
|
-
: resolve(this.rootDir, htmlFile);
|
|
184
|
-
if (!fs.existsSync(resolvedPath))
|
|
185
|
-
return { success: false, error: `File not found: ${resolvedPath}` };
|
|
186
|
-
const fileContent = fs.readFileSync(resolvedPath, "utf-8");
|
|
187
|
-
await page.setContent(fileContent, { waitUntil: "networkidle" });
|
|
188
|
-
}
|
|
189
|
-
else if (url) {
|
|
190
|
-
await page.goto(url, { waitUntil: "networkidle" });
|
|
191
|
-
}
|
|
192
|
-
// Wait for specific selector if provided (slow-page resilience)
|
|
193
|
-
if (waitForSelector) {
|
|
194
|
-
try {
|
|
195
|
-
await page.waitForSelector(waitForSelector, { timeout: maxWaitMs, state: "visible" });
|
|
196
|
-
}
|
|
197
|
-
catch {
|
|
198
|
-
// Selector didn't appear — non-fatal, proceed with screenshot anyway
|
|
199
|
-
}
|
|
200
|
-
}
|
|
201
|
-
// Wait for response if we set it up
|
|
202
|
-
if (responsePromise) {
|
|
203
|
-
await responsePromise;
|
|
204
|
-
}
|
|
205
|
-
// Standard wait
|
|
206
|
-
await page.waitForTimeout(waitFor);
|
|
207
|
-
// Perform interactions
|
|
208
|
-
if (actions) {
|
|
209
|
-
for (const act of actions) {
|
|
210
|
-
switch (act.action) {
|
|
211
|
-
case "click": {
|
|
212
|
-
if (!act.selector)
|
|
213
|
-
break;
|
|
214
|
-
try {
|
|
215
|
-
await page.click(act.selector, { timeout: 5000 });
|
|
216
|
-
}
|
|
217
|
-
catch {
|
|
218
|
-
// Click failure is non-fatal
|
|
219
|
-
}
|
|
220
|
-
break;
|
|
221
|
-
}
|
|
222
|
-
case "type": {
|
|
223
|
-
if (!act.selector || act.value === undefined)
|
|
224
|
-
break;
|
|
225
|
-
try {
|
|
226
|
-
await page.type(act.selector, act.value);
|
|
227
|
-
}
|
|
228
|
-
catch {
|
|
229
|
-
// Type failure is non-fatal
|
|
230
|
-
}
|
|
231
|
-
break;
|
|
232
|
-
}
|
|
233
|
-
case "scroll": {
|
|
234
|
-
const amount = parseInt(act.value ?? "") || 500;
|
|
235
|
-
await page.evaluate((px) => window.scrollBy(0, px), amount);
|
|
236
|
-
break;
|
|
237
|
-
}
|
|
238
|
-
case "wait": {
|
|
239
|
-
const ms = parseInt(act.value ?? "") || 1000;
|
|
240
|
-
await page.waitForTimeout(ms);
|
|
241
|
-
break;
|
|
242
|
-
}
|
|
243
|
-
}
|
|
244
|
-
}
|
|
245
|
-
}
|
|
246
|
-
let buf;
|
|
247
|
-
if (selector) {
|
|
248
|
-
const el = page.locator(selector).first();
|
|
249
|
-
buf = await el.screenshot({ type: "png" });
|
|
250
|
-
}
|
|
251
|
-
else {
|
|
252
|
-
buf = await page.screenshot({ type: "png", fullPage });
|
|
253
|
-
}
|
|
254
|
-
const base64Data = buf.toString("base64");
|
|
255
|
-
const visionMessage = (0, core_1.buildUserVisionMessage)(prompt, base64Data);
|
|
256
|
-
const response = await this.visionAdapter.chat({
|
|
257
|
-
model: model || this.defaultModel,
|
|
258
|
-
messages: [visionMessage],
|
|
259
|
-
tools: [],
|
|
260
|
-
});
|
|
261
|
-
return { success: true, output: response.message.content };
|
|
262
|
-
}
|
|
263
|
-
catch (err) {
|
|
264
|
-
return { success: false, error: String(err instanceof Error ? err.message : err) };
|
|
265
|
-
}
|
|
266
|
-
}
|
|
267
|
-
}
|
|
268
|
-
exports.VisionBrowserTool = VisionBrowserTool;
|
|
269
|
-
//# sourceMappingURL=vision-browser.tool.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"vision-browser.tool.js","sourceRoot":"","sources":["../../../src/tools/workspace/vision-browser.tool.ts"],"names":[],"mappings":";;;AA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