/**
 * Mounting the protocol bridge — grafting external MCP tools into the kernel.
 *
 * This module is the join between the two halves of the bridge. On one side sits
 * a {@link ServerFleet} of live {@link ServerEndpoint}s, each speaking to an
 * external MCP server. On the other sits the kernel's {@link ToolRegistry}, which
 * the agent runs against. {@link mountProtocolBridge} starts the fleet, lists
 * each *ready* endpoint's tools, and wraps every remote tool as a kernel
 * {@link import("../../capabilities").DefinedTool} whose `run` routes the call
 * back across the endpoint that owns it.
 *
 * Three translation concerns live here and nowhere else:
 *
 *   - **Naming.** Remote tool names are unique only within their own server, so
 *     each is grafted under its collision-free qualified name
 *     (`"<server>__<tool>"`, see {@link qualifyToolName}). The endpoint has
 *     already stamped that qualified name onto each {@link RemoteTool.descriptor},
 *     so the wrapper advertises it and routes back to the *unqualified*
 *     {@link RemoteToolRef.name} the server actually knows.
 *   - **Schema.** Each remote `inputSchema` is run through {@link normalizeSchema}
 *     before it is shown to the model, so an untrusted, draft-divergent remote
 *     schema becomes the clean subset every provider accepts.
 *   - **Result.** A {@link RemoteCallResult}'s MCP content blocks are projected
 *     onto the kernel's {@link ToolResult} content blocks, and its `isError`
 *     flag is carried straight through.
 *
 * Failure isolation is inherited from the fleet: an endpoint that faulted on
 * connect is simply not `ready`, contributes no tools, and is skipped here
 * without sinking the mount.
 */
import type { ToolBox } from "../../runtime/contract";
import type { BridgeConfig, ServerFleet } from "./contract";
/** The successful result of mounting the bridge: the box plus the live fleet. */
export interface MountedProtocolBridge {
    /** The tool box exposing every grafted remote tool to the agent. */
    readonly box: ToolBox;
    /** The running fleet of endpoints backing those tools. */
    readonly fleet: ServerFleet;
}
/**
 * Start the fleet, graft every reachable remote tool into a fresh registry, and
 * return the runnable {@link ToolBox} alongside the live {@link ServerFleet}.
 *
 * Only endpoints that came up `ready` are queried; a faulted endpoint is skipped.
 * Each ready endpoint's tools are listed, wrapped, and registered under their
 * qualified `"<server>__<tool>"` names — collision-free across servers — and the
 * union of every wrapped tool is boxed into a single {@link ToolBox} the agent
 * runs against.
 *
 * @param config the set of servers to connect and expose
 */
export declare function mountProtocolBridge(config: BridgeConfig): Promise<MountedProtocolBridge>;
