Skip to content

Commit 7bb701e

Browse files
committed
chore: sync with v0.0.30
1 parent 6c0f99f commit 7bb701e

File tree

5 files changed

+168
-71
lines changed

5 files changed

+168
-71
lines changed

cloudflare/package-lock.json

Lines changed: 130 additions & 54 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

cloudflare/package.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,14 @@
2525
}
2626
},
2727
"dependencies": {
28-
"@cloudflare/playwright": "^0.0.10",
29-
"@modelcontextprotocol/sdk": "^1.13.3",
30-
"agents": "^0.0.101",
31-
"yaml": "^2.7.1",
32-
"zod-to-json-schema": "^3.24.5"
28+
"@cloudflare/playwright": "^0.0.11",
29+
"@modelcontextprotocol/sdk": "^1.17.0",
30+
"agents": "^0.0.109",
31+
"yaml": "^2.8.0",
32+
"zod-to-json-schema": "^3.24.6"
3333
},
3434
"devDependencies": {
35-
"@cloudflare/workers-types": "^4.20250420.0",
36-
"vite": "^6.3.4"
35+
"@cloudflare/workers-types": "^4.20250725.0",
36+
"vite": "^7.0.6"
3737
}
3838
}

cloudflare/src/index.ts

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,10 @@ import { env } from 'cloudflare:workers';
44
import type { BrowserEndpoint } from '@cloudflare/playwright';
55

66
import { endpointURLString } from '@cloudflare/playwright';
7-
import { createServer } from '../../src';
8-
import { ToolCapability } from '../../src/tools/tool';
7+
import { createConnection } from '../../src/index.js';
8+
import { ToolCapability } from '../../config.js';
9+
10+
import type { Server } from '@modelcontextprotocol/sdk/server/index.js';
911

1012
type Options = {
1113
vision?: boolean;
@@ -19,17 +21,16 @@ export function createMcpAgent(endpoint: BrowserEndpoint, options?: Options): ty
1921
? endpoint.toString()
2022
: endpointURLString(endpoint);
2123

22-
const serverPromise = createServer({
23-
browser: 'chromium',
24-
userDataDir: '/playwright/user-data',
25-
headless: true,
26-
cdpEndpoint,
27-
capabilities: ['core', 'tabs', 'pdf', 'history', 'wait', 'files'],
24+
const connection = createConnection({
25+
capabilities: ['core', 'tabs', 'pdf', 'history', 'wait', 'files', 'testing'],
26+
browser: {
27+
cdpEndpoint,
28+
},
2829
...options,
2930
});
3031

3132
return class PlaywrightMcpAgent extends McpAgent<typeof env, {}, {}> {
32-
server = serverPromise;
33+
server = connection.then(server => server.server as unknown as Server);
3334

3435
async init() {
3536
// do nothing

0 commit comments

Comments
 (0)