@tangle-network/tcloud
Version:
TypeScript SDK and CLI for Tangle Router, Sandbox, model routing, and agent service calls
20 lines • 946 B
text/typescript
import { TCloud } from "./index.cjs";
import { Readable, Writable } from "node:stream";
//#region src/mcp.d.ts
/** Transport streams the server reads/writes. Defaults bind to the process
* stdio; tests inject in-memory streams. */
export interface McpServerOptions {
input?: Readable;
output?: Writable;
}
/**
* Run the MCP stdio server against an authenticated TCloud client. Resolves when input closes.
* Handles `initialize`, `tools/list`, `tools/call` (+ ignores notifications, which carry no id).
*
* Requests are dispatched without blocking the read loop, so a slow `deep_research`
* call cannot stall concurrent `web_search` requests — each response carries its
* own id. Pass `{ input, output }` to drive the transport over arbitrary streams
* (tests inject in-memory streams); both default to the process stdio.
*/
export declare function runMcpServer(client: TCloud, opts?: McpServerOptions): Promise<void>;
//#endregion