chore(extension): start relay before creating MCP server (#548)

* HTTPS server launched and the relay server is created before MCP
server. This way we can pass CDP endpoint to its constructor.
* MCP HTTP transport is added to precreated HTTP server.
* A bunch of renames to fix style issues.
This commit is contained in:
Yury Semikhatsky
2025-06-13 16:13:40 -07:00
committed by GitHub
parent 6c3f3b6576
commit 96e234012d
5 changed files with 55 additions and 36 deletions

View File

@@ -28,10 +28,10 @@ export class Server {
private _browserConfig: FullConfig['browser'];
private _contextFactory: BrowserContextFactory;
constructor(config: FullConfig, { forceCdp }: { forceCdp: boolean }) {
constructor(config: FullConfig) {
this.config = config;
this._browserConfig = config.browser;
this._contextFactory = contextFactory(this._browserConfig, { forceCdp });
this._contextFactory = contextFactory(this._browserConfig);
}
async createConnection(transport: Transport): Promise<Connection> {