chore: reuse browser in server mode (#495)
This commit is contained in:
parent
54ed7c3200
commit
eec177d3ac
11 changed files with 490 additions and 163 deletions
3
index.d.ts
vendored
3
index.d.ts
vendored
|
|
@ -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 {};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue