/** * ReplayTransport — Standalone Transport that replays from a cassette file. * * Inspired by VCR (Ruby) / Polly.js (Netflix) replay pattern. * No live server needed — responses come from the cassette. */ import type { JSONRPCMessage } from "@modelcontextprotocol/sdk/types.js"; import type { Transport } from "@modelcontextprotocol/sdk/shared/transport.js"; import type { CassetteEntry } from "../cassette.js"; export declare class ReplayTransport implements Transport { private readonly responses; /** Index tracking: for each method, how many responses we've consumed. */ private readonly methodCursors; constructor(entries: CassetteEntry[]); start(): Promise; send(message: JSONRPCMessage): Promise; close(): Promise; onclose?: () => void; onerror?: (error: Error) => void; onmessage?: (message: T, extra?: unknown) => void; sessionId?: string; /** * Find the next unmatched response for the given method. * Uses a cursor per method to handle repeated calls (e.g., multiple tools/list). */ private findResponse; }