@diegosouzacdv/jev-browser-mcp 0.1.2 → 0.2.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.
- package/README.md +10 -0
- package/config/ui-testing.json +40 -8
- package/docs/jev-browser-mcp.md +138 -39
- package/mcp_servers/jev-browser-npm/bin/jev-browser-mcp.cjs +4 -3
- package/mcp_servers/jev-browser-npm/src/config.mjs +141 -38
- package/mcp_servers/jev-browser-npm/src/flow.mjs +768 -226
- package/mcp_servers/jev-browser-npm/src/server.mjs +12 -10
- package/package.json +1 -1
|
@@ -46,7 +46,7 @@ class BrowserPool {
|
|
|
46
46
|
this.#contextPromise = this.#open();
|
|
47
47
|
}
|
|
48
48
|
await this.#contextPromise;
|
|
49
|
-
return { page: this.#page, sessionMs: isOpening ? performance.now() - this.#startedAt : 0 };
|
|
49
|
+
return { page: this.#page, context: this.#context, sessionMs: isOpening ? performance.now() - this.#startedAt : 0 };
|
|
50
50
|
}
|
|
51
51
|
|
|
52
52
|
async #open() {
|
|
@@ -136,21 +136,23 @@ export function createJevBrowserServer({ env = process.env, configPath, fetchImp
|
|
|
136
136
|
server.registerTool(
|
|
137
137
|
"run_browser_flow",
|
|
138
138
|
{
|
|
139
|
-
description: "Run a bounded screen flow in one warm Playwright
|
|
139
|
+
description: "Run a bounded screen flow in one warm Playwright session. Supports accessible actions, iframe targets, assertions, file uploads, 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.",
|
|
140
140
|
inputSchema: {
|
|
141
141
|
flow: z.string(),
|
|
142
|
-
initial_url: z.string(),
|
|
143
|
-
expected_outcome: z.string(),
|
|
144
|
-
candidate_plans: z.record(z.string(), z.unknown()),
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
142
|
+
initial_url: z.string(),
|
|
143
|
+
expected_outcome: z.string(),
|
|
144
|
+
candidate_plans: z.record(z.string(), z.unknown()),
|
|
145
|
+
options: z.record(z.string(), z.unknown()).optional(),
|
|
146
|
+
},
|
|
147
|
+
},
|
|
148
|
+
async ({ flow, initial_url: initialUrl, expected_outcome: expectedOutcome, candidate_plans: candidatePlans, options }) => {
|
|
148
149
|
try {
|
|
149
150
|
return toolText(await browserPool.runFlow(() => executeBrowserFlow({
|
|
150
151
|
flow,
|
|
151
152
|
initialUrl,
|
|
152
|
-
expectedOutcome,
|
|
153
|
-
candidatePlans,
|
|
153
|
+
expectedOutcome,
|
|
154
|
+
candidatePlans,
|
|
155
|
+
options,
|
|
154
156
|
settings,
|
|
155
157
|
browserPool,
|
|
156
158
|
fetchImpl,
|