@diegosouzacdv/jev-browser-mcp 0.3.0 → 0.4.0

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.
@@ -58,10 +58,10 @@ class BrowserPool {
58
58
  headless: false,
59
59
  });
60
60
  this.#page = this.#context.pages()[0] || await this.#context.newPage();
61
- } else {
62
- this.#browser = await chromium.launch({ channel, headless: true });
63
- this.#page = await this.#browser.newPage();
64
- this.#context = this.#page.context();
61
+ } else {
62
+ this.#browser = await chromium.launch({ channel, headless: true });
63
+ this.#context = await this.#browser.newContext();
64
+ this.#page = await this.#context.newPage();
65
65
  }
66
66
  } catch (error) {
67
67
  this.#contextPromise = undefined;
@@ -71,13 +71,9 @@ class BrowserPool {
71
71
  }
72
72
  }
73
73
 
74
- async close() {
75
- try {
76
- if (this.#context) await this.#context.close();
77
- else if (this.#browser) await this.#browser.close();
78
- } catch {
79
- // The host may already have closed the process during shutdown.
80
- }
74
+ async close() {
75
+ if (this.#context) await this.#context.close().catch(() => {});
76
+ if (this.#browser) await this.#browser.close().catch(() => {});
81
77
  this.#context = undefined;
82
78
  this.#browser = undefined;
83
79
  this.#page = undefined;
@@ -136,7 +132,7 @@ export function createJevBrowserServer({ env = process.env, configPath, fetchImp
136
132
  server.registerTool(
137
133
  "run_browser_flow",
138
134
  {
139
- description: "Run a bounded screen flow in one warm Playwright session. Supports accessible actions, within/index target scoping, iframe targets, assertions, uploads, bounded downloads, axe accessibility audits, failure screenshots/traces, scoped snapshots, and optional fast-path/tracker settings. Jev chooses among supplied plans; one plan skips the decision call when fast_path is enabled.",
135
+ description: "Run a bounded screen flow in one warm Playwright session. Supports accessible actions with SPA readiness and auto-waiting, per-step timeouts, same-origin page reuse, key-based typing, hidden-state waits, assertions, uploads, bounded downloads, axe audits, failure details, scoped snapshots, and optional same-origin JSON error messages. Jev chooses among supplied plans; one plan skips the decision call when fast_path is enabled.",
140
136
  inputSchema: {
141
137
  flow: z.string(),
142
138
  initial_url: z.string(),
package/package.json CHANGED
@@ -1,35 +1,32 @@
1
- {
2
- "name": "@diegosouzacdv/jev-browser-mcp",
3
- "version": "0.3.0",
4
- "description": "Portable MCP server for bounded Playwright screen flows selected by Jev",
5
- "license": "MIT",
6
- "repository": {
7
- "type": "git",
8
- "url": "git+https://github.com/diegosouzacdv/orquestrador.git"
9
- },
10
- "homepage": "https://github.com/diegosouzacdv/orquestrador/tree/main/docs/jev-browser-mcp.md",
11
- "engines": {
12
- "node": ">=22"
13
- },
14
- "bin": {
15
- "jev-browser-mcp": "mcp_servers/jev-browser-npm/bin/jev-browser-mcp.cjs"
16
- },
17
- "exports": {
18
- "./server": "./mcp_servers/jev-browser-npm/src/server.mjs"
19
- },
20
- "files": [
21
- "config/ui-testing.json",
22
- "docs/jev-browser-mcp.md",
23
- "mcp_servers/jev-browser-npm/bin/**",
24
- "mcp_servers/jev-browser-npm/src/**"
25
- ],
26
- "scripts": {
27
- "test:jev-browser-mcp": "node --test mcp_servers/jev-browser-npm/tests/*.test.mjs"
28
- },
29
- "dependencies": {
30
- "@axe-core/playwright": "4.13.0",
31
- "@modelcontextprotocol/server": "2.1.0",
32
- "playwright": "1.63.0",
33
- "zod": "4.6.5"
34
- }
35
- }
1
+ {
2
+ "name": "@diegosouzacdv/jev-browser-mcp",
3
+ "version": "0.4.0",
4
+ "description": "Portable MCP server for bounded Playwright screen flows selected by Jev",
5
+ "license": "MIT",
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "git+https://github.com/diegosouzacdv/orquestrador.git"
9
+ },
10
+ "homepage": "https://github.com/diegosouzacdv/orquestrador/tree/main/docs/jev-browser-mcp.md",
11
+ "engines": {
12
+ "node": ">=22"
13
+ },
14
+ "bin": {
15
+ "jev-browser-mcp": "mcp_servers/jev-browser-npm/bin/jev-browser-mcp.cjs"
16
+ },
17
+ "exports": {
18
+ "./server": "./mcp_servers/jev-browser-npm/src/server.mjs"
19
+ },
20
+ "files": [
21
+ "config/ui-testing.json",
22
+ "docs/jev-browser-mcp.md",
23
+ "mcp_servers/jev-browser-npm/bin/**",
24
+ "mcp_servers/jev-browser-npm/src/**"
25
+ ],
26
+ "dependencies": {
27
+ "@axe-core/playwright": "4.13.0",
28
+ "@modelcontextprotocol/server": "2.1.0",
29
+ "playwright": "1.63.0",
30
+ "zod": "4.6.5"
31
+ }
32
+ }