/**
 * ChatClient — the single LLM abstraction analysts call.
 *
 * agent-eval already ships an `LlmClient` (OpenAI-compatible, retry,
 * graceful JSON-schema degrade) and judges that talk to `TCloud`. Two
 * mixed patterns force every analyst author to pick a transport, which
 * couples analyst code to runtime concerns (cli-bridge vs router vs
 * sandbox-sdk) it shouldn't know about.
 *
 * `ChatClient` is one interface every analyst takes via `AnalystContext.chat`.
 * The operator decides at the registry boundary which transport binds
 * to it. Analyst code stays transport-agnostic; swapping production
 * (sandbox-sdk) for local dev (cli-bridge) or tests (mock) is a one-
 * line factory call.
 *
 * Designed to coexist: existing `LlmClient` callers and existing
 * `TCloud`-based judges keep working untouched. New analyst code uses
 * `ChatClient`. When old call sites migrate, they pick up budgeting,
 * cancellation, and unified telemetry for free.
 */
import { type LlmCallRequest, type LlmCallResult } from '../llm-client';
/**
 * Unified chat interface. Mirrors LlmCallRequest/Result so the OpenAI-
 * compatible mental model stays. Two methods: a one-shot `chat()` and
 * an `streamChat()` for future agentic loops (not yet exposed).
 */
export interface ChatClient {
    /** Display name of the bound transport — included in telemetry. */
    readonly transport: ChatTransport;
    /** Default model when caller omits — operators bind this per environment. */
    readonly defaultModel?: string;
    chat(req: ChatRequest, opts?: ChatCallOpts): Promise<ChatResponse>;
}
export type ChatTransport = 'router' | 'sandbox-sdk' | 'cli-bridge' | 'direct-provider' | 'mock';
export interface ChatRequest extends Omit<LlmCallRequest, 'model'> {
    /** Optional — falls back to ChatClient.defaultModel. */
    model?: string;
}
export type ChatResponse = LlmCallResult;
export interface ChatCallOpts {
    /** Cancel the in-flight request. */
    signal?: AbortSignal;
    /** Hard USD ceiling for this single call (informational; the underlying transport may not enforce). */
    maxCostUsd?: number;
    /** Correlation tag carried into request headers when the transport allows. */
    correlationId?: string;
}
export type CreateChatClientOpts = RouterTransportOpts | CliBridgeTransportOpts | DirectProviderTransportOpts | SandboxSdkTransportOpts | MockTransportOpts;
interface BaseTransportOpts {
    defaultModel?: string;
}
export interface RouterTransportOpts extends BaseTransportOpts {
    transport: 'router';
    baseUrl?: string;
    apiKey: string;
}
export interface CliBridgeTransportOpts extends BaseTransportOpts {
    transport: 'cli-bridge';
    baseUrl?: string;
    bearer?: string;
}
export interface DirectProviderTransportOpts extends BaseTransportOpts {
    transport: 'direct-provider';
    baseUrl: string;
    apiKey: string;
}
/**
 * Sandbox-SDK transport. Provided as a thin pass-through: the caller
 * supplies a callable that mimics LlmClient.chat() against an already-
 * configured Sandbox handle. We don't import the SDK here to keep
 * agent-eval dep-free of @tangle-network/sandbox.
 */
export interface SandboxSdkTransportOpts extends BaseTransportOpts {
    transport: 'sandbox-sdk';
    chat: (req: ChatRequest, opts?: ChatCallOpts) => Promise<ChatResponse>;
}
/**
 * Mock transport for tests. The handler receives the request and returns
 * whatever the test wants. No retries, no JSON-schema degrade.
 */
export interface MockTransportOpts extends BaseTransportOpts {
    transport: 'mock';
    handler: (req: ChatRequest, opts?: ChatCallOpts) => Promise<ChatResponse>;
}
/**
 * Build a ChatClient bound to a specific transport. The returned client
 * is safe to share across analysts in a single registry run.
 */
export declare function createChatClient(opts: CreateChatClientOpts): ChatClient;
export {};
//# sourceMappingURL=chat-client.d.ts.map