import type { JSONRPCMessage } from "@modelcontextprotocol/sdk/types.js"; import type { MemWalCredentials } from "./auth.js"; /** Which relayer transport the bridge dials. */ export type TransportKind = "sse" | "http"; /** * Resolve the transport from `MEMWAL_MCP_TRANSPORT`. * * Defaults to `sse`, the transport every released bridge has used. Streamable * HTTP is opt-in until it has production mileage: this runs on users' machines * against their real memories, so the new path proves itself before it becomes * the one that runs by default. * * An unrecognised value falls back rather than throwing — a typo in a user's * MCP config must not stop their memory from working. */ export declare function resolveTransport(raw: string | undefined): TransportKind; /** * The Streamable HTTP endpoint for a relayer base URL. * * `/api/mcp` — the same base the SSE transport hangs `/api/mcp/sse` and * `/api/mcp/messages` off, minus the split. */ export declare function streamableUrl(relayerUrl: string): string; /** * A live relayer session. Deliberately the same shape the SSE handshake * returns, so `runBridge` can hold either without branching on transport * everywhere it forwards a message. */ export interface RelaySession { /** Endpoint this session talks to. Logging only. */ postUrl: string; /** * Forward one JSON-RPC message. Resolves with an HTTP-ish status the * caller can act on: 200 for accepted, 404 when the relayer says the * session does not exist (the message provably did not run, so the * caller may retry it without risking a duplicate write). */ send(msg: JSONRPCMessage, /** Unused here — headers are bound when the session opens. Present so * this matches the SSE handshake's `send`, which signs per POST. */ creds?: MemWalCredentials, extra?: Record): Promise; /** Incoming messages from the relayer. */ iter: AsyncIterator; /** Tear the session down. */ abort: () => void; } export declare function openStreamableSession(relayerUrl: string, creds: MemWalCredentials, extraHeaders?: Record): Promise; //# sourceMappingURL=streamable.d.ts.map