UNPKG

@code-yeongyu/senpi

Version:

Coding agent CLI with read, bash, edit, write tools and session management

14 lines • 1.19 kB
import type { Transport } from "@modelcontextprotocol/sdk/shared/transport.js"; import type { McpLogger } from "../log.ts"; import { type ProbeOptions } from "./era.ts"; /** How long a stdio child gets to answer discovery (at most a quarter of the connect timeout) before it is treated as legacy. */ export declare const STDIO_PROBE_MS = 2000; /** * Probe the SDK's own child before initialize. A modern child keeps its process: `initialize` is answered * locally from discovery and every later request carries the per-request `_meta` at the negotiated version. * A clean non-modern error reply, or no reply in time (a slow start, or a server that ignores unknown requests), * keeps the same process for the legacy handshake; a discovery reply that arrives late still upgrades it to modern. * Only a child that exited or wrote non-JSON to stdout is replaced by a fresh process for the legacy handshake. */ export declare function probeStdioTransport(transport: Transport, options: ProbeOptions, logger: McpLogger, timeoutMs: number, serverName: string, onModern?: (version: string) => void, probeMs?: number, onLegacy?: () => void): void; //# sourceMappingURL=stdio-probe.d.ts.map