chore: reuse browser in server mode (#495)

This commit is contained in:
Pavel Feldman
2025-05-30 15:15:37 -07:00
committed by GitHub
parent 54ed7c3200
commit eec177d3ac
11 changed files with 490 additions and 163 deletions

3
index.d.ts vendored
View File

@@ -18,6 +18,7 @@
import type { Server } from '@modelcontextprotocol/sdk/server/index.js';
import type { Config } from './config';
import type { Transport } from '@modelcontextprotocol/sdk/shared/transport.js';
import type { BrowserContext } from 'playwright';
export type Connection = {
server: Server;
@@ -25,5 +26,5 @@ export type Connection = {
close(): Promise<void>;
};
export declare function createConnection(config?: Config): Promise<Connection>;
export declare function createConnection(config?: Config, contextGetter?: () => Promise<BrowserContext>): Promise<Connection>;
export {};