Skip to content

Commit 7f931dc

Browse files
chore: account for types moved around
1 parent 7cd61aa commit 7f931dc

File tree

7 files changed

+8
-9
lines changed

7 files changed

+8
-9
lines changed

tests/accuracy/collection-storage-size.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { describeAccuracyTests, describeSuite } from "./sdk/describe-accuracy-tests.js";
22
import { getAvailableModels } from "./sdk/models.js";
33
import { AccuracyTestConfig } from "./sdk/describe-accuracy-tests.js";
4-
import { ExpectedToolCall } from "./sdk/accuracy-scorers.js";
4+
import { ExpectedToolCall } from "./sdk/accuracy-snapshot-storage/snapshot-storage.js";
55

66
function callsCollectionStorageSize(prompt: string, expectedToolCalls: ExpectedToolCall[]): AccuracyTestConfig {
77
return {

tests/accuracy/create-collection.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { describeAccuracyTests, describeSuite } from "./sdk/describe-accuracy-tests.js";
22
import { getAvailableModels } from "./sdk/models.js";
33
import { AccuracyTestConfig } from "./sdk/describe-accuracy-tests.js";
4-
import { ExpectedToolCall } from "./sdk/accuracy-scorers.js";
4+
import { ExpectedToolCall } from "./sdk/accuracy-snapshot-storage/snapshot-storage.js";
55

66
function callsCreateCollection(prompt: string, database: string, collection: string): AccuracyTestConfig {
77
return {

tests/accuracy/drop-collection.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { describeAccuracyTests, describeSuite } from "./sdk/describe-accuracy-tests.js";
22
import { getAvailableModels } from "./sdk/models.js";
33
import { AccuracyTestConfig } from "./sdk/describe-accuracy-tests.js";
4-
import { ExpectedToolCall } from "./sdk/accuracy-scorers.js";
4+
import { ExpectedToolCall } from "./sdk/accuracy-snapshot-storage/snapshot-storage.js";
55

66
function onlyCallsDropCollection(prompt: string): AccuracyTestConfig {
77
return {

tests/accuracy/drop-database.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { describeAccuracyTests, describeSuite } from "./sdk/describe-accuracy-tests.js";
22
import { getAvailableModels } from "./sdk/models.js";
33
import { AccuracyTestConfig } from "./sdk/describe-accuracy-tests.js";
4-
import { ExpectedToolCall } from "./sdk/accuracy-scorers.js";
4+
import { ExpectedToolCall } from "./sdk/accuracy-snapshot-storage/snapshot-storage.js";
55

66
function onlyCallsDropDatabase(prompt: string): AccuracyTestConfig {
77
return {

tests/accuracy/logs.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { describeAccuracyTests, describeSuite } from "./sdk/describe-accuracy-tests.js";
22
import { getAvailableModels } from "./sdk/models.js";
33
import { AccuracyTestConfig } from "./sdk/describe-accuracy-tests.js";
4-
import { ExpectedToolCall } from "./sdk/accuracy-scorers.js";
4+
import { ExpectedToolCall } from "./sdk/accuracy-snapshot-storage/snapshot-storage.js";
55

66
function callsLogsTool(prompt: string, toolCall: ExpectedToolCall): AccuracyTestConfig {
77
return {

tests/accuracy/sdk/accuracy-snapshot-storage/snapshot-storage.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
import z from "zod";
22

33
const ExpectedToolCallSchema = z.object({
4-
toolCallId: z.string(),
54
toolName: z.string(),
65
parameters: z.record(z.string(), z.unknown()),
76
});
87

9-
const ActualToolCallSchema = ExpectedToolCallSchema.omit({ toolCallId: undefined });
8+
const ActualToolCallSchema = ExpectedToolCallSchema.extend({ toolCallId: z.string() });
109

1110
export type ExpectedToolCall = z.infer<typeof ExpectedToolCallSchema>;
1211
export type ActualToolCall = z.infer<typeof ActualToolCallSchema>;

tests/accuracy/sdk/accuracy-testing-client.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { experimental_createMCPClient as createMCPClient, tool as createVercelTo
55
import { CallToolResult } from "@modelcontextprotocol/sdk/types.js";
66
import { StdioClientTransport } from "@modelcontextprotocol/sdk/client/stdio.js";
77

8-
import { ExpectedToolCall } from "./accuracy-snapshot-storage/snapshot-storage.js";
8+
import { ActualToolCall } from "./accuracy-snapshot-storage/snapshot-storage.js";
99

1010
const __dirname = fileURLToPath(import.meta.url);
1111
const distPath = path.join(__dirname, "..", "..", "..", "..", "dist");
@@ -16,7 +16,7 @@ export type MockedTools = Record<string, ToolResultGeneratorFn>;
1616

1717
export class AccuracyTestingClient {
1818
private mockedTools: MockedTools = {};
19-
private recordedToolCalls: ExpectedToolCall[] = [];
19+
private recordedToolCalls: ActualToolCall[] = [];
2020
private constructor(private readonly vercelMCPClient: Awaited<ReturnType<typeof createMCPClient>>) {}
2121

2222
async close() {

0 commit comments

Comments
 (0)