browser-use 0.6.1 → 0.7.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/README.md +24 -18
- package/dist/actor/element.js +24 -3
- package/dist/actor/mouse.js +21 -3
- package/dist/actor/page.js +33 -11
- package/dist/agent/gif.js +28 -3
- package/dist/agent/message-manager/service.js +2 -22
- package/dist/agent/message-manager/utils.js +15 -2
- package/dist/agent/message-manager/views.d.ts +7 -7
- package/dist/agent/message-manager/views.js +1 -0
- package/dist/agent/prompts.d.ts +3 -0
- package/dist/agent/prompts.js +22 -12
- package/dist/agent/service.d.ts +9 -1
- package/dist/agent/service.js +204 -79
- package/dist/agent/system_prompt.md +12 -11
- package/dist/agent/system_prompt_anthropic_flash.md +6 -5
- package/dist/agent/system_prompt_no_thinking.md +12 -11
- package/dist/agent/views.d.ts +2 -0
- package/dist/agent/views.js +48 -36
- package/dist/browser/extensions.js +20 -10
- package/dist/browser/profile.d.ts +4 -0
- package/dist/browser/profile.js +107 -4
- package/dist/browser/session.d.ts +28 -1
- package/dist/browser/session.js +1436 -528
- package/dist/browser/watchdogs/default-action-watchdog.js +32 -3
- package/dist/browser/watchdogs/downloads-watchdog.d.ts +4 -0
- package/dist/browser/watchdogs/downloads-watchdog.js +105 -9
- package/dist/browser/watchdogs/har-recording-watchdog.d.ts +1 -0
- package/dist/browser/watchdogs/har-recording-watchdog.js +54 -2
- package/dist/browser/watchdogs/permissions-watchdog.d.ts +5 -0
- package/dist/browser/watchdogs/permissions-watchdog.js +106 -3
- package/dist/browser/watchdogs/recording-watchdog.d.ts +2 -0
- package/dist/browser/watchdogs/recording-watchdog.js +54 -2
- package/dist/browser/watchdogs/security-watchdog.d.ts +1 -0
- package/dist/browser/watchdogs/security-watchdog.js +47 -7
- package/dist/browser/watchdogs/storage-state-watchdog.d.ts +6 -0
- package/dist/browser/watchdogs/storage-state-watchdog.js +206 -14
- package/dist/cli.d.ts +13 -2
- package/dist/cli.js +190 -9
- package/dist/code-use/namespace.js +52 -7
- package/dist/code-use/notebook-export.js +18 -2
- package/dist/code-use/service.js +1 -0
- package/dist/config.js +26 -4
- package/dist/controller/action-timeout.d.ts +9 -0
- package/dist/controller/action-timeout.js +95 -0
- package/dist/controller/registry/service.d.ts +1 -0
- package/dist/controller/registry/service.js +28 -1
- package/dist/controller/service.d.ts +2 -1
- package/dist/controller/service.js +494 -329
- package/dist/entrypoint.d.ts +1 -0
- package/dist/entrypoint.js +27 -0
- package/dist/filesystem/file-system.js +38 -8
- package/dist/integrations/gmail/service.js +30 -6
- package/dist/llm/browser-use/chat.js +2 -2
- package/dist/llm/codex/auth.d.ts +118 -0
- package/dist/llm/codex/auth.js +599 -0
- package/dist/llm/codex/chat.d.ts +70 -0
- package/dist/llm/codex/chat.js +392 -0
- package/dist/llm/codex/index.d.ts +2 -0
- package/dist/llm/codex/index.js +2 -0
- package/dist/llm/google/chat.js +18 -1
- package/dist/logging-config.js +22 -11
- package/dist/mcp/client.d.ts +1 -0
- package/dist/mcp/client.js +12 -10
- package/dist/mcp/redaction.d.ts +3 -0
- package/dist/mcp/redaction.js +132 -0
- package/dist/mcp/server.d.ts +2 -0
- package/dist/mcp/server.js +64 -22
- package/dist/screenshots/service.js +25 -2
- package/dist/skill-cli/direct.d.ts +4 -1
- package/dist/skill-cli/direct.js +263 -66
- package/dist/skill-cli/server.d.ts +1 -0
- package/dist/skill-cli/server.js +115 -25
- package/dist/skill-cli/tunnel.d.ts +1 -0
- package/dist/skill-cli/tunnel.js +16 -4
- package/dist/sync/auth.js +22 -9
- package/dist/telemetry/service.js +21 -2
- package/dist/telemetry/views.js +31 -8
- package/dist/tokens/custom-pricing.js +2 -2
- package/dist/tokens/openrouter-pricing.d.ts +11 -0
- package/dist/tokens/openrouter-pricing.js +102 -0
- package/dist/tokens/service.js +20 -16
- package/dist/utils.d.ts +3 -1
- package/dist/utils.js +3 -1
- package/package.json +68 -27
package/dist/utils.d.ts
CHANGED
|
@@ -124,10 +124,12 @@ export declare function is_new_tab_page(url: string): boolean;
|
|
|
124
124
|
*
|
|
125
125
|
* Supports optional glob patterns and schemes:
|
|
126
126
|
* - *.example.com will match sub.example.com and example.com
|
|
127
|
-
* - *google.com will match google.com, agoogle.com, and www.google.com
|
|
128
127
|
* - http*://example.com will match http://example.com, https://example.com
|
|
129
128
|
* - chrome-extension://* will match chrome-extension://aaaaaaaaaaaa and chrome-extension://bbbbbbbbbbbbb
|
|
130
129
|
*
|
|
130
|
+
* Host wildcards are intentionally limited to the *.domain form; embedded host
|
|
131
|
+
* wildcards such as *google.com are rejected.
|
|
132
|
+
*
|
|
131
133
|
* When no scheme is specified, https is used by default for security.
|
|
132
134
|
* For example, 'example.com' will match 'https://example.com' but not 'http://example.com'.
|
|
133
135
|
*
|
package/dist/utils.js
CHANGED
|
@@ -503,10 +503,12 @@ export function is_new_tab_page(url) {
|
|
|
503
503
|
*
|
|
504
504
|
* Supports optional glob patterns and schemes:
|
|
505
505
|
* - *.example.com will match sub.example.com and example.com
|
|
506
|
-
* - *google.com will match google.com, agoogle.com, and www.google.com
|
|
507
506
|
* - http*://example.com will match http://example.com, https://example.com
|
|
508
507
|
* - chrome-extension://* will match chrome-extension://aaaaaaaaaaaa and chrome-extension://bbbbbbbbbbbbb
|
|
509
508
|
*
|
|
509
|
+
* Host wildcards are intentionally limited to the *.domain form; embedded host
|
|
510
|
+
* wildcards such as *google.com are rejected.
|
|
511
|
+
*
|
|
510
512
|
* When no scheme is specified, https is used by default for security.
|
|
511
513
|
* For example, 'example.com' will match 'https://example.com' but not 'http://example.com'.
|
|
512
514
|
*
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "browser-use",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.1",
|
|
4
4
|
"description": "A TypeScript-first library for programmatic browser control, designed for building AI-powered web agents.",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.js",
|
|
@@ -81,6 +81,11 @@
|
|
|
81
81
|
"import": "./dist/llm/browser-use/index.js",
|
|
82
82
|
"default": "./dist/llm/browser-use/index.js"
|
|
83
83
|
},
|
|
84
|
+
"./llm/codex": {
|
|
85
|
+
"types": "./dist/llm/codex/index.d.ts",
|
|
86
|
+
"import": "./dist/llm/codex/index.js",
|
|
87
|
+
"default": "./dist/llm/codex/index.js"
|
|
88
|
+
},
|
|
84
89
|
"./llm/base": {
|
|
85
90
|
"types": "./dist/llm/base.d.ts",
|
|
86
91
|
"import": "./dist/llm/base.js",
|
|
@@ -261,9 +266,37 @@
|
|
|
261
266
|
"access": "public",
|
|
262
267
|
"provenance": true
|
|
263
268
|
},
|
|
269
|
+
"packageManager": "pnpm@10.28.1",
|
|
264
270
|
"engines": {
|
|
265
271
|
"node": ">=18.0.0"
|
|
266
272
|
},
|
|
273
|
+
"scripts": {
|
|
274
|
+
"build": "node scripts/clean-dist.mjs && tsc && node scripts/copy-dom-tree.mjs",
|
|
275
|
+
"build:watch": "tsc --watch --preserveWatchOutput",
|
|
276
|
+
"start": "node dist/index.js",
|
|
277
|
+
"dev": "tsx src/index.ts",
|
|
278
|
+
"lint": "eslint \"src/**/*.ts\" \"test/**/*.ts\"",
|
|
279
|
+
"lint:fix": "eslint \"src/**/*.ts\" \"test/**/*.ts\" --fix",
|
|
280
|
+
"test": "vitest run",
|
|
281
|
+
"test:unit": "vitest run test --exclude test/integration*.test.ts --exclude test/cli-interactive.e2e.test.ts --exclude test/codex-oauth-smoke.e2e.test.ts",
|
|
282
|
+
"test:integration": "vitest run test/integration.test.ts test/integration-advanced.test.ts",
|
|
283
|
+
"test:e2e": "vitest run test/cli-interactive.e2e.test.ts",
|
|
284
|
+
"test:e2e:codex": "BROWSER_USE_CODEX_E2E=1 vitest run test/codex-oauth-smoke.e2e.test.ts",
|
|
285
|
+
"test:e2e:codex:agent": "BROWSER_USE_CODEX_E2E=1 BROWSER_USE_CODEX_E2E_AGENT=1 vitest run test/codex-oauth-smoke.e2e.test.ts",
|
|
286
|
+
"test:coverage": "vitest run --coverage",
|
|
287
|
+
"test:watch": "vitest --watch",
|
|
288
|
+
"test:pack": "node scripts/smoke-pack.mjs",
|
|
289
|
+
"check": "pnpm lint && pnpm typecheck && pnpm typecheck:test && pnpm test:unit && pnpm test:integration && pnpm test:e2e && pnpm test:pack",
|
|
290
|
+
"commit": "cz",
|
|
291
|
+
"typecheck": "tsc --noEmit",
|
|
292
|
+
"typecheck:test": "tsc -p tsconfig.test.json --noEmit",
|
|
293
|
+
"format": "prettier --write \"src/**/*.ts\" \"test/**/*.ts\"",
|
|
294
|
+
"format:check": "prettier --check \"src/**/*.ts\" \"test/**/*.ts\"",
|
|
295
|
+
"prettier": "prettier --write \"src/**/*.ts\" \"test/**/*.ts\"",
|
|
296
|
+
"prepack": "pnpm build",
|
|
297
|
+
"postinstall": "playwright install chromium",
|
|
298
|
+
"postinstall:ci": "playwright install --with-deps chromium"
|
|
299
|
+
},
|
|
267
300
|
"config": {
|
|
268
301
|
"commitizen": {
|
|
269
302
|
"path": "cz-conventional-changelog"
|
|
@@ -300,8 +333,8 @@
|
|
|
300
333
|
"gpt-tokenizer": "^3.4.0",
|
|
301
334
|
"groq-sdk": "^0.37.0",
|
|
302
335
|
"minimatch": "^10.2.3",
|
|
303
|
-
"oci-common": "^2.
|
|
304
|
-
"oci-generativeaiinference": "^2.
|
|
336
|
+
"oci-common": "^2.132.0",
|
|
337
|
+
"oci-generativeaiinference": "^2.132.0",
|
|
305
338
|
"ollama": "^0.6.3",
|
|
306
339
|
"openai": "^6.18.0",
|
|
307
340
|
"pdf-parse": "^2.4.5",
|
|
@@ -335,28 +368,36 @@
|
|
|
335
368
|
"vite": "^7.3.2",
|
|
336
369
|
"vitest": "^4.0.18"
|
|
337
370
|
},
|
|
338
|
-
"
|
|
339
|
-
"
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
"
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
371
|
+
"pnpm": {
|
|
372
|
+
"onlyBuiltDependencies": [
|
|
373
|
+
"canvas",
|
|
374
|
+
"esbuild",
|
|
375
|
+
"protobufjs"
|
|
376
|
+
],
|
|
377
|
+
"overrides": {
|
|
378
|
+
"@hono/node-server": "1.19.13",
|
|
379
|
+
"ajv@<7": "6.14.0",
|
|
380
|
+
"ajv@>=7": "8.20.0",
|
|
381
|
+
"brace-expansion": "5.0.6",
|
|
382
|
+
"express-rate-limit": "8.2.2",
|
|
383
|
+
"fast-uri": "3.1.2",
|
|
384
|
+
"fast-xml-builder": "1.2.0",
|
|
385
|
+
"fast-xml-parser": "5.7.3",
|
|
386
|
+
"flatted": "3.4.2",
|
|
387
|
+
"hono": "4.12.18",
|
|
388
|
+
"ip-address": "10.2.0",
|
|
389
|
+
"lodash": "4.18.1",
|
|
390
|
+
"minimatch": "10.2.4",
|
|
391
|
+
"path-to-regexp": "8.4.2",
|
|
392
|
+
"picomatch@<2.3.2": "2.3.2",
|
|
393
|
+
"picomatch@>=4.0.0 <4.0.4": "4.0.4",
|
|
394
|
+
"postcss": "8.5.14",
|
|
395
|
+
"protobufjs": "7.6.1",
|
|
396
|
+
"qs": "6.15.2",
|
|
397
|
+
"rollup": "4.59.0",
|
|
398
|
+
"tmp": "0.2.6",
|
|
399
|
+
"uuid": "11.1.1",
|
|
400
|
+
"ws": "8.21.0"
|
|
401
|
+
}
|
|
361
402
|
}
|
|
362
|
-
}
|
|
403
|
+
}
|