Skip to content

Commit 79f9f46

Browse files
fix: avoid circular dependency in test-helpers InMemoryEventStore
1 parent 81a8288 commit 79f9f46

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

test/helpers/src/helpers/inMemoryEventStore.ts

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,17 @@
1-
import type { EventStore, JSONRPCMessage } from '@modelcontextprotocol/server';
1+
import type { JSONRPCMessage } from '@modelcontextprotocol/core';
2+
3+
/**
4+
* Interface for storing and replaying events for resumability.
5+
* This is a copy of the EventStore interface from @modelcontextprotocol/server
6+
* to avoid circular dependencies in test-helpers.
7+
*/
8+
interface EventStore {
9+
storeEvent(streamId: string, message: JSONRPCMessage): Promise<string>;
10+
replayEventsAfter(
11+
lastEventId: string,
12+
{ send }: { send: (eventId: string, message: JSONRPCMessage) => Promise<void> }
13+
): Promise<string>;
14+
}
215

316
/**
417
* Simple in-memory implementation of the EventStore interface for resumability.

0 commit comments

Comments
 (0)