chore: prep folders for copying upstream (#987)

This commit is contained in:
Pavel Feldman
2025-09-03 16:02:07 -07:00
committed by GitHub
parent 2461f32d05
commit d142f13d80
73 changed files with 128 additions and 953 deletions

View File

@@ -16,8 +16,9 @@
import fs from 'node:fs';
import { Config } from '../config.js';
import { Config } from '../config';
import { test, expect } from './fixtures';
import { configFromCLIOptions } from '../lib/browser/config';
test('config user data dir', async ({ startClient, server, mcpMode }, testInfo) => {
server.setContent('/', `
@@ -68,17 +69,12 @@ test.describe(() => {
test.describe('sandbox configuration', () => {
test('should enable sandbox by default (no --no-sandbox flag)', async () => {
const { configFromCLIOptions } = await import('../lib/config.js');
const config = configFromCLIOptions({ sandbox: undefined });
// When --no-sandbox is not passed, chromiumSandbox should not be set to false
// This allows the default (true) to be used
expect(config.browser?.launchOptions?.chromiumSandbox).toBeUndefined();
});
test('should disable sandbox when --no-sandbox flag is passed', async () => {
const { configFromCLIOptions } = await import('../lib/config.js');
const config = configFromCLIOptions({ sandbox: false });
// When --no-sandbox is passed, chromiumSandbox should be explicitly set to false
expect(config.browser?.launchOptions?.chromiumSandbox).toBe(false);
});
});

View File

@@ -19,12 +19,12 @@ import zodToJsonSchema from 'zod-to-json-schema';
import { Client } from '@modelcontextprotocol/sdk/client/index.js';
import { StreamableHTTPClientTransport } from '@modelcontextprotocol/sdk/client/streamableHttp.js';
import { runMainBackend, runOnPauseBackendLoop } from '../src/mcp/mdb.js';
import { runMainBackend, runOnPauseBackendLoop } from '../src/sdk/mdb';
import { test, expect } from './fixtures';
import type * as mcpServer from '../src/mcp/server.js';
import type { ServerBackendOnPause } from '../src/mcp/mdb.js';
import type * as mcpServer from '../src/sdk/server';
import type { ServerBackendOnPause } from '../src/sdk/mdb';
test('call top level tool', async () => {
const { mdbUrl } = await startMDBAndCLI();

View File

@@ -14,12 +14,12 @@
* limitations under the License.
*/
import crypto from 'crypto';
import fs from 'fs';
import path from 'path';
import { pathToFileURL } from 'url';
import { test, expect } from './fixtures';
import { createHash } from '../src/utils/guid.js';
const p = process.platform === 'win32' ? 'c:\\non\\existent\\folder' : '/non/existent/folder';
@@ -77,3 +77,7 @@ test('should list all tools when listRoots is slow', async ({ startClient }) =>
const tools = await client.listTools();
expect(tools.tools.length).toBeGreaterThan(10);
});
function createHash(data: string): string {
return crypto.createHash('sha256').update(data).digest('hex').slice(0, 7);
}