import { V as Verifier } from './agentic-generator-1g7GDba7.js';

/**
 * `mcpServeVerifier` — the intrinsic verifier for a built MCP server: the
 * boot-and-probe checker named in docs/artifact-lifecycle-frontier.md. A
 * generated MCP server is only a candidate if it actually *serves* — so this
 * boots it over stdio (the default local MCP transport) and runs the real
 * handshake: `initialize` → `notifications/initialized` → `tools/list`, and
 * asserts the server answers with at least `minTools` tools.
 *
 * Outcomes follow the `Verifier` contract: a server that fails to start, exits
 * early, errors the handshake, times out, or exposes no tools is a FAILED
 * candidate (`{ok:false}`, fed back into the next generation shot); a missing
 * start binary or spawn fault THROWS (a setup bug, never a silent fallback).
 *
 * Protocol matches the runtime's own stdio MCP server (src/mcp/server.ts):
 * newline-delimited JSON-RPC 2.0, protocol version 2024-11-05.
 */

interface McpServeSpec {
    /** Command that starts the built MCP server in the worktree (stdio transport). */
    command: string;
    args?: string[];
    /** Extra env for the server process (merged over `process.env`). */
    env?: Record<string, string>;
    /** Handshake timeout (ms). Default 30s. */
    timeoutMs?: number;
    /** Minimum tools the server must expose to pass. Default 1. */
    minTools?: number;
}
/** Build a `Verifier` that boots a generated MCP server over stdio and checks it exposes tools. */
declare function mcpServeVerifier(spec: McpServeSpec): Verifier;

export { type McpServeSpec as M, mcpServeVerifier as m };
