@frontmcp/testing 0.12.2 → 1.0.0-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assertions/mcp-assertions.d.ts +1 -1
- package/assertions/mcp-assertions.d.ts.map +1 -1
- package/client/mcp-test-client.builder.d.ts +1 -1
- package/client/mcp-test-client.d.ts.map +1 -1
- package/client/mcp-test-client.types.d.ts +3 -3
- package/client/mcp-test-client.types.d.ts.map +1 -1
- package/errors/index.d.ts.map +1 -1
- package/esm/fixtures/index.mjs +239 -36
- package/esm/index.mjs +267 -112
- package/esm/matchers/index.mjs +8 -32
- package/esm/package.json +5 -5
- package/esm/perf/index.mjs +239 -36
- package/esm/setup.mjs +8 -32
- package/example-tools/index.d.ts +1 -1
- package/example-tools/index.d.ts.map +1 -1
- package/example-tools/tool-configs.d.ts +4 -10
- package/example-tools/tool-configs.d.ts.map +1 -1
- package/fixtures/index.js +232 -36
- package/index.d.ts +2 -1
- package/index.d.ts.map +1 -1
- package/index.js +264 -114
- package/matchers/index.js +8 -32
- package/package.json +5 -5
- package/perf/index.js +232 -36
- package/platform/platform-client-info.d.ts +2 -1
- package/platform/platform-client-info.d.ts.map +1 -1
- package/platform/platform-types.d.ts +11 -16
- package/platform/platform-types.d.ts.map +1 -1
- package/playwright/index.d.ts +1 -1
- package/raw-client/index.d.ts +7 -0
- package/raw-client/index.d.ts.map +1 -0
- package/server/index.d.ts +1 -1
- package/server/index.d.ts.map +1 -1
- package/server/port-registry.d.ts +24 -6
- package/server/port-registry.d.ts.map +1 -1
- package/server/test-server.d.ts +1 -1
- package/server/test-server.d.ts.map +1 -1
- package/setup.js +8 -32
- package/ui/ui-assertions.d.ts +3 -4
- package/ui/ui-assertions.d.ts.map +1 -1
- package/ui/ui-matchers.d.ts +1 -2
- package/ui/ui-matchers.d.ts.map +1 -1
package/fixtures/index.js
CHANGED
|
@@ -94,7 +94,7 @@ function getPlatformCapabilities(platform) {
|
|
|
94
94
|
...baseCapabilities,
|
|
95
95
|
experimental: {
|
|
96
96
|
[MCP_APPS_EXTENSION_KEY]: {
|
|
97
|
-
mimeTypes: ["text/html
|
|
97
|
+
mimeTypes: ["text/html;profile=mcp-app"]
|
|
98
98
|
}
|
|
99
99
|
}
|
|
100
100
|
};
|
|
@@ -215,7 +215,7 @@ var McpTestClientBuilder = class {
|
|
|
215
215
|
* .withCapabilities({
|
|
216
216
|
* sampling: {},
|
|
217
217
|
* experimental: {
|
|
218
|
-
* 'io.modelcontextprotocol/ui': { mimeTypes: ['text/html
|
|
218
|
+
* 'io.modelcontextprotocol/ui': { mimeTypes: ['text/html;profile=mcp-app'] }
|
|
219
219
|
* }
|
|
220
220
|
* })
|
|
221
221
|
* .buildAndConnect();
|
|
@@ -1197,11 +1197,24 @@ var McpTestClient = class {
|
|
|
1197
1197
|
this.log("debug", `Connecting to ${this.config.baseUrl}...`);
|
|
1198
1198
|
this.transport = this.createTransport();
|
|
1199
1199
|
await this.transport.connect();
|
|
1200
|
-
const
|
|
1201
|
-
|
|
1202
|
-
|
|
1200
|
+
const maxRetries = 3;
|
|
1201
|
+
const retryDelayMs = 500;
|
|
1202
|
+
let lastError;
|
|
1203
|
+
for (let attempt = 1; attempt <= maxRetries; attempt++) {
|
|
1204
|
+
const initResponse = await this.initialize();
|
|
1205
|
+
if (initResponse.success && initResponse.data) {
|
|
1206
|
+
this.initResult = initResponse.data;
|
|
1207
|
+
break;
|
|
1208
|
+
}
|
|
1209
|
+
lastError = initResponse.error?.message ?? "Unknown error";
|
|
1210
|
+
if (attempt < maxRetries) {
|
|
1211
|
+
this.log("debug", `MCP init attempt ${attempt} failed (${lastError}), retrying in ${retryDelayMs}ms...`);
|
|
1212
|
+
await new Promise((resolve) => setTimeout(resolve, retryDelayMs));
|
|
1213
|
+
}
|
|
1214
|
+
}
|
|
1215
|
+
if (!this.initResult) {
|
|
1216
|
+
throw new Error(`Failed to initialize MCP connection after ${maxRetries} attempts: ${lastError}`);
|
|
1203
1217
|
}
|
|
1204
|
-
this.initResult = initResponse.data;
|
|
1205
1218
|
this._sessionId = this.transport.getSessionId();
|
|
1206
1219
|
this._sessionInfo = {
|
|
1207
1220
|
id: this._sessionId ?? `session-${Date.now()}`,
|
|
@@ -1892,7 +1905,7 @@ var McpTestClient = class {
|
|
|
1892
1905
|
const raw = response.data ?? { content: [] };
|
|
1893
1906
|
const isError = !response.success || raw.isError === true;
|
|
1894
1907
|
const meta = raw._meta;
|
|
1895
|
-
const hasUI = meta?.["ui/html"] !== void 0 || meta?.["ui/component"] !== void 0
|
|
1908
|
+
const hasUI = meta?.["ui/html"] !== void 0 || meta?.["ui/component"] !== void 0;
|
|
1896
1909
|
const structuredContent = raw["structuredContent"];
|
|
1897
1910
|
return {
|
|
1898
1911
|
raw,
|
|
@@ -2244,6 +2257,7 @@ var TestTokenFactory = class {
|
|
|
2244
2257
|
|
|
2245
2258
|
// libs/testing/src/server/test-server.ts
|
|
2246
2259
|
var import_child_process = require("child_process");
|
|
2260
|
+
var import_utils = require("@frontmcp/utils");
|
|
2247
2261
|
|
|
2248
2262
|
// libs/testing/src/errors/index.ts
|
|
2249
2263
|
var TestClientError = class extends Error {
|
|
@@ -2291,9 +2305,16 @@ var E2E_PORT_RANGES = {
|
|
|
2291
2305
|
"demo-e2e-agents": { start: 50270, size: 10 },
|
|
2292
2306
|
"demo-e2e-transport-recreation": { start: 50280, size: 10 },
|
|
2293
2307
|
"demo-e2e-jobs": { start: 50290, size: 10 },
|
|
2294
|
-
// Infrastructure E2E tests (50300-
|
|
2308
|
+
// Infrastructure E2E tests (50300-50409)
|
|
2295
2309
|
"demo-e2e-redis": { start: 50300, size: 10 },
|
|
2296
2310
|
"demo-e2e-serverless": { start: 50310, size: 10 },
|
|
2311
|
+
"demo-e2e-uipack": { start: 50320, size: 10 },
|
|
2312
|
+
"demo-e2e-agent-adapters": { start: 50330, size: 10 },
|
|
2313
|
+
"demo-e2e-guard": { start: 50340, size: 10 },
|
|
2314
|
+
// ESM E2E tests (50400-50449)
|
|
2315
|
+
"esm-package-server": { start: 50400, size: 10 },
|
|
2316
|
+
"esm-package-server-hot-reload": { start: 50410, size: 10 },
|
|
2317
|
+
"esm-package-server-cli": { start: 50420, size: 10 },
|
|
2297
2318
|
// Mock servers and utilities (50900-50999)
|
|
2298
2319
|
"mock-oauth": { start: 50900, size: 10 },
|
|
2299
2320
|
"mock-api": { start: 50910, size: 10 },
|
|
@@ -2365,7 +2386,7 @@ async function tryReservePort(port, project) {
|
|
|
2365
2386
|
server.once("error", () => {
|
|
2366
2387
|
resolve(false);
|
|
2367
2388
|
});
|
|
2368
|
-
server.listen(port,
|
|
2389
|
+
server.listen(port, () => {
|
|
2369
2390
|
reservedPorts.set(port, {
|
|
2370
2391
|
port,
|
|
2371
2392
|
project,
|
|
@@ -2406,7 +2427,7 @@ async function isPortAvailable(port) {
|
|
|
2406
2427
|
server.once("error", () => {
|
|
2407
2428
|
resolve(false);
|
|
2408
2429
|
});
|
|
2409
|
-
server.listen(port,
|
|
2430
|
+
server.listen(port, () => {
|
|
2410
2431
|
server.close(() => {
|
|
2411
2432
|
resolve(true);
|
|
2412
2433
|
});
|
|
@@ -2444,15 +2465,37 @@ var TestServer = class _TestServer {
|
|
|
2444
2465
|
*/
|
|
2445
2466
|
static async start(options) {
|
|
2446
2467
|
const project = options.project ?? "default";
|
|
2447
|
-
const
|
|
2448
|
-
|
|
2449
|
-
|
|
2450
|
-
|
|
2451
|
-
|
|
2452
|
-
|
|
2453
|
-
|
|
2468
|
+
const maxAttempts = 3;
|
|
2469
|
+
for (let attempt = 1; attempt <= maxAttempts; attempt++) {
|
|
2470
|
+
const { port, release } = await reservePort(project, options.port);
|
|
2471
|
+
const server = new _TestServer(options, port, release);
|
|
2472
|
+
try {
|
|
2473
|
+
await server.startProcess();
|
|
2474
|
+
return server;
|
|
2475
|
+
} catch (error) {
|
|
2476
|
+
try {
|
|
2477
|
+
await server.stop();
|
|
2478
|
+
} catch (cleanupError) {
|
|
2479
|
+
if (options.debug || DEBUG_SERVER) {
|
|
2480
|
+
const msg = cleanupError instanceof Error ? cleanupError.message : String(cleanupError);
|
|
2481
|
+
console.warn(`[TestServer] Cleanup failed after startup error: ${msg}`);
|
|
2482
|
+
}
|
|
2483
|
+
}
|
|
2484
|
+
const isEADDRINUSE = error instanceof Error && (error.message.includes("EADDRINUSE") || server.getLogs().some((l) => l.includes("EADDRINUSE")));
|
|
2485
|
+
if (isEADDRINUSE && attempt < maxAttempts) {
|
|
2486
|
+
const delayMs = attempt * 500;
|
|
2487
|
+
if (options.debug || DEBUG_SERVER) {
|
|
2488
|
+
console.warn(
|
|
2489
|
+
`[TestServer] EADDRINUSE on port ${port}, retrying in ${delayMs}ms (attempt ${attempt}/${maxAttempts})`
|
|
2490
|
+
);
|
|
2491
|
+
}
|
|
2492
|
+
await sleep2(delayMs);
|
|
2493
|
+
continue;
|
|
2494
|
+
}
|
|
2495
|
+
throw error;
|
|
2496
|
+
}
|
|
2454
2497
|
}
|
|
2455
|
-
|
|
2498
|
+
throw new Error(`[TestServer] Failed to start after ${maxAttempts} attempts`);
|
|
2456
2499
|
}
|
|
2457
2500
|
/**
|
|
2458
2501
|
* Start an Nx project as test server
|
|
@@ -2463,22 +2506,44 @@ var TestServer = class _TestServer {
|
|
|
2463
2506
|
`Invalid project name: ${project}. Must contain only alphanumeric, underscore, and hyphen characters.`
|
|
2464
2507
|
);
|
|
2465
2508
|
}
|
|
2466
|
-
const
|
|
2467
|
-
|
|
2468
|
-
|
|
2469
|
-
|
|
2470
|
-
|
|
2471
|
-
|
|
2472
|
-
|
|
2473
|
-
|
|
2474
|
-
|
|
2475
|
-
|
|
2476
|
-
|
|
2477
|
-
|
|
2478
|
-
|
|
2479
|
-
|
|
2509
|
+
const maxAttempts = 3;
|
|
2510
|
+
for (let attempt = 1; attempt <= maxAttempts; attempt++) {
|
|
2511
|
+
const { port, release } = await reservePort(project, options.port);
|
|
2512
|
+
const serverOptions = {
|
|
2513
|
+
...options,
|
|
2514
|
+
port,
|
|
2515
|
+
project,
|
|
2516
|
+
command: `npx nx serve ${project} --port ${port}`,
|
|
2517
|
+
cwd: options.cwd ?? process.cwd()
|
|
2518
|
+
};
|
|
2519
|
+
const server = new _TestServer(serverOptions, port, release);
|
|
2520
|
+
try {
|
|
2521
|
+
await server.startProcess();
|
|
2522
|
+
return server;
|
|
2523
|
+
} catch (error) {
|
|
2524
|
+
try {
|
|
2525
|
+
await server.stop();
|
|
2526
|
+
} catch (cleanupError) {
|
|
2527
|
+
if (options.debug || DEBUG_SERVER) {
|
|
2528
|
+
const msg = cleanupError instanceof Error ? cleanupError.message : String(cleanupError);
|
|
2529
|
+
console.warn(`[TestServer] Cleanup failed after startup error: ${msg}`);
|
|
2530
|
+
}
|
|
2531
|
+
}
|
|
2532
|
+
const isEADDRINUSE = error instanceof Error && (error.message.includes("EADDRINUSE") || server.getLogs().some((l) => l.includes("EADDRINUSE")));
|
|
2533
|
+
if (isEADDRINUSE && attempt < maxAttempts) {
|
|
2534
|
+
const delayMs = attempt * 500;
|
|
2535
|
+
if (options.debug || DEBUG_SERVER) {
|
|
2536
|
+
console.warn(
|
|
2537
|
+
`[TestServer] EADDRINUSE on port ${port}, retrying in ${delayMs}ms (attempt ${attempt}/${maxAttempts})`
|
|
2538
|
+
);
|
|
2539
|
+
}
|
|
2540
|
+
await sleep2(delayMs);
|
|
2541
|
+
continue;
|
|
2542
|
+
}
|
|
2543
|
+
throw error;
|
|
2544
|
+
}
|
|
2480
2545
|
}
|
|
2481
|
-
|
|
2546
|
+
throw new Error(`[TestServer] Failed to start after ${maxAttempts} attempts`);
|
|
2482
2547
|
}
|
|
2483
2548
|
/**
|
|
2484
2549
|
* Create a test server connected to an already running server
|
|
@@ -2515,7 +2580,21 @@ var TestServer = class _TestServer {
|
|
|
2515
2580
|
}
|
|
2516
2581
|
if (this.process) {
|
|
2517
2582
|
this.log("Stopping server...");
|
|
2518
|
-
this.process.
|
|
2583
|
+
if (this.process.exitCode !== null || this.process.signalCode !== null) {
|
|
2584
|
+
this.log(`Server already exited (code: ${this.process.exitCode}, signal: ${this.process.signalCode})`);
|
|
2585
|
+
this.process = null;
|
|
2586
|
+
return;
|
|
2587
|
+
}
|
|
2588
|
+
const pid = this.process.pid;
|
|
2589
|
+
try {
|
|
2590
|
+
if (pid !== void 0) {
|
|
2591
|
+
process.kill(-pid, "SIGTERM");
|
|
2592
|
+
} else {
|
|
2593
|
+
this.process.kill("SIGTERM");
|
|
2594
|
+
}
|
|
2595
|
+
} catch {
|
|
2596
|
+
this.process.kill("SIGTERM");
|
|
2597
|
+
}
|
|
2519
2598
|
const exitPromise = new Promise((resolve) => {
|
|
2520
2599
|
if (this.process) {
|
|
2521
2600
|
this.process.once("exit", () => resolve());
|
|
@@ -2526,7 +2605,16 @@ var TestServer = class _TestServer {
|
|
|
2526
2605
|
const killTimeout = setTimeout(() => {
|
|
2527
2606
|
if (this.process) {
|
|
2528
2607
|
this.log("Force killing server after timeout...");
|
|
2529
|
-
this.process.
|
|
2608
|
+
const killPid = this.process.pid;
|
|
2609
|
+
try {
|
|
2610
|
+
if (killPid !== void 0) {
|
|
2611
|
+
process.kill(-killPid, "SIGKILL");
|
|
2612
|
+
} else {
|
|
2613
|
+
this.process.kill("SIGKILL");
|
|
2614
|
+
}
|
|
2615
|
+
} catch {
|
|
2616
|
+
this.process.kill("SIGKILL");
|
|
2617
|
+
}
|
|
2530
2618
|
}
|
|
2531
2619
|
}, 5e3);
|
|
2532
2620
|
await exitPromise;
|
|
@@ -2591,14 +2679,17 @@ var TestServer = class _TestServer {
|
|
|
2591
2679
|
...this.options.env,
|
|
2592
2680
|
PORT: String(this.options.port)
|
|
2593
2681
|
};
|
|
2682
|
+
const runtimeEnv = withWorkspaceProtocolFallback(env, this.options.cwd);
|
|
2594
2683
|
if (this.portRelease) {
|
|
2595
2684
|
await this.portRelease();
|
|
2596
2685
|
this.portRelease = null;
|
|
2686
|
+
await sleep2(300);
|
|
2597
2687
|
}
|
|
2598
2688
|
this.process = (0, import_child_process.spawn)(this.options.command, [], {
|
|
2599
2689
|
cwd: this.options.cwd,
|
|
2600
|
-
env,
|
|
2690
|
+
env: runtimeEnv,
|
|
2601
2691
|
shell: true,
|
|
2692
|
+
detached: true,
|
|
2602
2693
|
stdio: ["pipe", "pipe", "pipe"]
|
|
2603
2694
|
});
|
|
2604
2695
|
if (this.process.pid !== void 0) {
|
|
@@ -2750,6 +2841,111 @@ TIP: Set DEBUG_SERVER=1 or DEBUG=1 environment variable for verbose output`
|
|
|
2750
2841
|
function sleep2(ms) {
|
|
2751
2842
|
return new Promise((resolve) => setTimeout(resolve, ms));
|
|
2752
2843
|
}
|
|
2844
|
+
function withWorkspaceProtocolFallback(env, cwd) {
|
|
2845
|
+
if (findInstalledProtocolPackageDir(cwd)) {
|
|
2846
|
+
return env;
|
|
2847
|
+
}
|
|
2848
|
+
try {
|
|
2849
|
+
const workspacePackageDir = findWorkspaceProtocolDir(cwd);
|
|
2850
|
+
if (!workspacePackageDir) {
|
|
2851
|
+
return env;
|
|
2852
|
+
}
|
|
2853
|
+
ensureWorkspaceProtocolLink(cwd, workspacePackageDir);
|
|
2854
|
+
if (findInstalledProtocolPackageDir(cwd)) {
|
|
2855
|
+
return env;
|
|
2856
|
+
}
|
|
2857
|
+
return withProtocolNodePathAlias(env, cwd, workspacePackageDir);
|
|
2858
|
+
} catch (err) {
|
|
2859
|
+
if (DEBUG_SERVER) {
|
|
2860
|
+
console.error(
|
|
2861
|
+
`[TestServer] Workspace protocol fallback failed: ${err instanceof Error ? err.message : String(err)}`
|
|
2862
|
+
);
|
|
2863
|
+
}
|
|
2864
|
+
return env;
|
|
2865
|
+
}
|
|
2866
|
+
}
|
|
2867
|
+
function ensureWorkspaceProtocolLink(cwd, workspacePackageDir) {
|
|
2868
|
+
const fs = require("node:fs");
|
|
2869
|
+
const path = require("node:path");
|
|
2870
|
+
const nodeModulesDir = findWorkspaceNodeModulesDir(cwd);
|
|
2871
|
+
if (!nodeModulesDir) {
|
|
2872
|
+
return;
|
|
2873
|
+
}
|
|
2874
|
+
const scopeDir = path.join(nodeModulesDir, "@frontmcp");
|
|
2875
|
+
const aliasPackageDir = path.join(scopeDir, "protocol");
|
|
2876
|
+
if (fs.existsSync(aliasPackageDir)) {
|
|
2877
|
+
return;
|
|
2878
|
+
}
|
|
2879
|
+
fs.mkdirSync(scopeDir, { recursive: true });
|
|
2880
|
+
try {
|
|
2881
|
+
fs.symlinkSync(workspacePackageDir, aliasPackageDir, process.platform === "win32" ? "junction" : "dir");
|
|
2882
|
+
} catch (error) {
|
|
2883
|
+
const err = error;
|
|
2884
|
+
if (err.code !== "EEXIST") {
|
|
2885
|
+
throw error;
|
|
2886
|
+
}
|
|
2887
|
+
}
|
|
2888
|
+
}
|
|
2889
|
+
function withProtocolNodePathAlias(env, cwd, workspacePackageDir) {
|
|
2890
|
+
const fs = require("node:fs");
|
|
2891
|
+
const os = require("node:os");
|
|
2892
|
+
const path = require("node:path");
|
|
2893
|
+
const aliasRoot = path.join(os.tmpdir(), "frontmcp-test-node-path", (0, import_utils.sha256Hex)(cwd).slice(0, 12));
|
|
2894
|
+
const scopeDir = path.join(aliasRoot, "@frontmcp");
|
|
2895
|
+
const aliasPackageDir = path.join(scopeDir, "protocol");
|
|
2896
|
+
fs.mkdirSync(scopeDir, { recursive: true });
|
|
2897
|
+
try {
|
|
2898
|
+
if (!fs.existsSync(aliasPackageDir)) {
|
|
2899
|
+
fs.symlinkSync(workspacePackageDir, aliasPackageDir, process.platform === "win32" ? "junction" : "dir");
|
|
2900
|
+
}
|
|
2901
|
+
} catch (error) {
|
|
2902
|
+
const err = error;
|
|
2903
|
+
if (err.code !== "EEXIST") throw error;
|
|
2904
|
+
}
|
|
2905
|
+
const existingNodePath = env["NODE_PATH"];
|
|
2906
|
+
const nodePathEntries = [aliasRoot, ...existingNodePath ? existingNodePath.split(path.delimiter) : []].filter(
|
|
2907
|
+
Boolean
|
|
2908
|
+
);
|
|
2909
|
+
return {
|
|
2910
|
+
...env,
|
|
2911
|
+
NODE_PATH: [...new Set(nodePathEntries)].join(path.delimiter)
|
|
2912
|
+
};
|
|
2913
|
+
}
|
|
2914
|
+
function findUp(startDir, testFn) {
|
|
2915
|
+
const path = require("node:path");
|
|
2916
|
+
let currentDir = startDir;
|
|
2917
|
+
while (true) {
|
|
2918
|
+
const result = testFn(currentDir);
|
|
2919
|
+
if (result !== void 0) return result;
|
|
2920
|
+
const parentDir = path.dirname(currentDir);
|
|
2921
|
+
if (parentDir === currentDir) return void 0;
|
|
2922
|
+
currentDir = parentDir;
|
|
2923
|
+
}
|
|
2924
|
+
}
|
|
2925
|
+
function findWorkspaceProtocolDir(startDir) {
|
|
2926
|
+
const fs = require("node:fs");
|
|
2927
|
+
const path = require("node:path");
|
|
2928
|
+
return findUp(startDir, (dir) => {
|
|
2929
|
+
const candidate = path.join(dir, "libs", "protocol");
|
|
2930
|
+
return fs.existsSync(path.join(candidate, "dist", "index.js")) ? candidate : void 0;
|
|
2931
|
+
});
|
|
2932
|
+
}
|
|
2933
|
+
function findInstalledProtocolPackageDir(startDir) {
|
|
2934
|
+
const fs = require("node:fs");
|
|
2935
|
+
const path = require("node:path");
|
|
2936
|
+
return findUp(startDir, (dir) => {
|
|
2937
|
+
const candidate = path.join(dir, "node_modules", "@frontmcp", "protocol");
|
|
2938
|
+
return fs.existsSync(path.join(candidate, "package.json")) ? candidate : void 0;
|
|
2939
|
+
});
|
|
2940
|
+
}
|
|
2941
|
+
function findWorkspaceNodeModulesDir(startDir) {
|
|
2942
|
+
const fs = require("node:fs");
|
|
2943
|
+
const path = require("node:path");
|
|
2944
|
+
return findUp(startDir, (dir) => {
|
|
2945
|
+
const candidate = path.join(dir, "node_modules");
|
|
2946
|
+
return fs.existsSync(candidate) ? candidate : void 0;
|
|
2947
|
+
});
|
|
2948
|
+
}
|
|
2753
2949
|
|
|
2754
2950
|
// libs/testing/src/fixtures/test-fixture.ts
|
|
2755
2951
|
var currentConfig = {};
|
package/index.d.ts
CHANGED
|
@@ -71,7 +71,8 @@ export type { HttpMethod, HttpRequestMatcher, HttpMockResponse, HttpMockDefiniti
|
|
|
71
71
|
export { uiMatchers, UIAssertions } from './ui';
|
|
72
72
|
export type { TestPlatformType, PlatformMetaNamespace, TestClientInfo } from './platform';
|
|
73
73
|
export { getPlatformMetaNamespace, getPlatformMimeType, isOpenAIPlatform, isExtAppsPlatform, isUiPlatform, getToolsListMetaPrefixes, getToolCallMetaPrefixes, getForbiddenMetaPrefixes, getPlatformClientInfo, buildUserAgent, getPlatformUserAgent, PLATFORM_DETECTION_PATTERNS, } from './platform';
|
|
74
|
-
export { BASIC_UI_TOOL_CONFIG, FULL_UI_TOOL_CONFIG, basicUIToolInputSchema, basicUIToolOutputSchema, fullUIToolInputSchema, fullUIToolOutputSchema, generateBasicUIToolOutput, generateFullUIToolOutput, EXPECTED_OPENAI_TOOLS_LIST_META_KEYS, EXPECTED_OPENAI_TOOL_CALL_META_KEYS, EXPECTED_EXTAPPS_TOOLS_LIST_META_KEYS, EXPECTED_EXTAPPS_TOOL_CALL_META_KEYS,
|
|
74
|
+
export { BASIC_UI_TOOL_CONFIG, FULL_UI_TOOL_CONFIG, basicUIToolInputSchema, basicUIToolOutputSchema, fullUIToolInputSchema, fullUIToolOutputSchema, generateBasicUIToolOutput, generateFullUIToolOutput, EXPECTED_OPENAI_TOOLS_LIST_META_KEYS, EXPECTED_OPENAI_TOOL_CALL_META_KEYS, EXPECTED_EXTAPPS_TOOLS_LIST_META_KEYS, EXPECTED_EXTAPPS_TOOL_CALL_META_KEYS, EXPECTED_GENERIC_TOOLS_LIST_META_KEYS, EXPECTED_GENERIC_TOOL_CALL_META_KEYS, } from './example-tools';
|
|
75
75
|
export { perfTest, MetricsCollector, isGcAvailable, forceGc, forceFullGc, formatBytes, formatMicroseconds, formatDuration, LeakDetector, assertNoLeak, createLeakDetector, createPerfFixtures, PerfFixturesImpl, getGlobalMeasurements, clearGlobalMeasurements, BaselineStore, parseBaselineFromComment, formatBaselineAsComment, getBaselineStore, RegressionDetector, summarizeRegressions, getRegressionDetector, ReportGenerator, saveReports, createReportGenerator, } from './perf';
|
|
76
|
+
export { McpClient, McpStdioClientTransport } from './raw-client';
|
|
76
77
|
export type { MemoryMetrics, CpuMetrics, PerfSnapshot, PerfMeasurement, PerfIssue, PerfThresholds, LeakDetectionOptions, LeakDetectionResult, MetricBaseline, TestBaseline, PerfBaseline, RegressionConfig, MetricRegression, RegressionResult, PerfTestSummary, ProjectSummary, PerfReport, PerfFixtures, PerfTestFixtures, PerfTestConfig, PerfTestFn, PerfTestWithFixtures, } from './perf';
|
|
77
78
|
//# sourceMappingURL=index.d.ts.map
|
package/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AAMH,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AACzD,OAAO,EAAE,oBAAoB,EAAE,MAAM,kCAAkC,CAAC;AACxE,YAAY,EACV,mBAAmB,EACnB,WAAW,EACX,YAAY,EACZ,iBAAiB,EACjB,cAAc,EACd,iBAAiB,EACjB,sBAAsB,EACtB,mBAAmB,EACnB,QAAQ,EACR,QAAQ,EACR,YAAY,EACZ,iBAAiB,EACjB,cAAc,EACd,WAAW,EACX,SAAS,GACV,MAAM,gCAAgC,CAAC;AAMxC,YAAY,EAAE,YAAY,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AACrG,OAAO,EAAE,uBAAuB,EAAE,MAAM,uCAAuC,CAAC;AAMhF,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACxD,YAAY,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AACpF,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAClD,OAAO,EAA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