feat(trace): allow saving trajectory as trace (#426)
This commit is contained in:
parent
fea50e6840
commit
aa6ac51f92
13 changed files with 140 additions and 40 deletions
|
|
@ -65,11 +65,17 @@ test('streamable http transport', async ({ serverEndpoint }) => {
|
|||
expect(transport.sessionId, 'has session support').toBeDefined();
|
||||
});
|
||||
|
||||
test('sse transport via public API', async ({ server }) => {
|
||||
test('sse transport via public API', async ({ server, localOutputPath }) => {
|
||||
const userDataDir = localOutputPath('user-data-dir');
|
||||
const sessions = new Map<string, SSEServerTransport>();
|
||||
const mcpServer = http.createServer(async (req, res) => {
|
||||
if (req.method === 'GET') {
|
||||
const connection = await createConnection({ browser: { launchOptions: { headless: true } } });
|
||||
const connection = await createConnection({
|
||||
browser: {
|
||||
userDataDir,
|
||||
launchOptions: { headless: true }
|
||||
},
|
||||
});
|
||||
const transport = new SSEServerTransport('/sse', res);
|
||||
sessions.set(transport.sessionId, transport);
|
||||
await connection.connect(transport);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue