import { type OperationContext, type TRPCLink } from '@trpc/client';
import type { EventSource } from 'eventsource';
import type { AppRouter } from '../../server/router.js';
export type CreateControlPlaneTrpcLinksOptions = {
    url: string;
    batch?: boolean;
    eventSource?: typeof EventSource;
    requestTimeoutMs?: number;
};
export declare const CONTROL_PLANE_REQUEST_TIMEOUT_CONTEXT_KEY = "requestTimeoutMs";
/**
 * Shared tRPC link service for frontend API consumers.
 *
 * Owns the transport split between subscriptions and request/response calls so
 * web-v2, TUI, and CLI callers do not each rebuild link policy.
 */
export declare class ClientSharedApiLinkService {
    static create({ url, batch, eventSource, requestTimeoutMs, }: CreateControlPlaneTrpcLinksOptions): TRPCLink<AppRouter>[];
}
export declare function createControlPlaneRequestContext({ timeoutMs, }: {
    timeoutMs: number;
}): OperationContext;
export declare function createControlPlaneRequestTimeoutLink({ defaultTimeoutMs, }?: {
    defaultTimeoutMs?: number;
}): TRPCLink<AppRouter>;
export declare function createControlPlaneRequestFetch({ fetchImpl, timeoutMs, }?: {
    fetchImpl?: typeof fetch;
    timeoutMs?: number;
}): typeof fetch;
//# sourceMappingURL=links.d.ts.map