Squashed 'packages/mcp-typescript/' content from commit 2cc7dd1

git-subtree-dir: packages/mcp-typescript
git-subtree-split: 2cc7dd104307d48bab8d27760f16c63c119d8a88
This commit is contained in:
Ashwin Bhat
2024-10-07 13:38:38 -07:00
commit 3b583e1f45
84 changed files with 15692 additions and 0 deletions

27
dist/server/stdio.d.ts generated vendored Normal file
View File

@@ -0,0 +1,27 @@
import { Readable, Writable } from "node:stream";
import { JSONRPCMessage } from "../types.js";
import { Transport } from "../shared/transport.js";
/**
* Server transport for stdio: this communicates with a MCP client by reading from the current process' stdin and writing to stdout.
*
* This transport is only available in Node.js environments.
*/
export declare class StdioServerTransport implements Transport {
private _stdin;
private _stdout;
private _readBuffer;
constructor(_stdin?: Readable, _stdout?: Writable);
onclose?: () => void;
onerror?: (error: Error) => void;
onmessage?: (message: JSONRPCMessage) => void;
_ondata: (chunk: Buffer) => void;
_onerror: (error: Error) => void;
/**
* Starts listening for messages on stdin.
*/
start(): Promise<void>;
private processReadBuffer;
close(): Promise<void>;
send(message: JSONRPCMessage): Promise<void>;
}
//# sourceMappingURL=stdio.d.ts.map