export declare const OPENAI_V1_REALTIME_CALLS_ENDPOINT: "/v1/realtime/calls";
export declare const DEFAULT_OPENAI_V1_REALTIME_CALLS_BASE_URL: "https://api.openai.com";
export type OpenAIV1RealtimeCallsMethod = "POST";
export type OpenAIV1RealtimeCallsBoundary = "input" | "contract" | "governance" | "auth" | "scope" | "provider" | "response";
export type OpenAIV1RealtimeCallsErrorCode = "MISSING_REQUEST_BODY" | "INVALID_REQUEST_BODY" | "MISSING_RUNTIME_ID" | "INVALID_TIMEOUT" | "CONTRACT_REJECTED" | "GOVERNANCE_REJECTED" | "AUTH_REJECTED" | "SCOPE_DENIED" | "CALLER_REQUIRED" | "PROVIDER_AUTH_FAILED" | "PROVIDER_RATE_LIMITED" | "PROVIDER_TIMEOUT" | "PROVIDER_UNAVAILABLE" | "RESPONSE_FORMAT_DRIFT" | "CALLER_FAILED";
export type OpenAIV1RealtimeCallsGate = {
    accepted: boolean;
    reason?: string;
};
export type OpenAIV1RealtimeCallsRuntimeContext = {
    runtimeId?: string;
    invocationId?: string;
    traceId?: string;
    callerId?: string;
};
export type OpenAIV1RealtimeCallsAuthEnvelope = {
    kind: "bearer" | "api-key" | "none";
    present: boolean;
    redactedToken?: string;
};
export type OpenAIV1RealtimeCallsRequestEnvelope = {
    provider: "openai";
    apiVersion: "v1";
    endpoint: typeof OPENAI_V1_REALTIME_CALLS_ENDPOINT;
    method: OpenAIV1RealtimeCallsMethod;
    url: string;
    requestBody: Record<string, unknown>;
    headers: Readonly<Record<string, string>>;
    timeoutMs: number;
    runtime: Required<OpenAIV1RealtimeCallsRuntimeContext>;
    requestedScopes: readonly string[];
    grantedScopes: readonly string[];
    dryRun: boolean;
    providerCallPlanned: boolean;
    unsafeSideEffects: false;
    providerFieldsOpaque: true;
};
export type OpenAIV1RealtimeCallsProviderCaller = (envelope: OpenAIV1RealtimeCallsRequestEnvelope) => unknown | Promise<unknown>;
export type OpenAIV1RealtimeCallsInvocationRequest = {
    requestBody?: unknown;
    baseUrl?: string;
    headers?: Readonly<Record<string, string | undefined>>;
    auth?: OpenAIV1RealtimeCallsAuthEnvelope;
    runtime?: OpenAIV1RealtimeCallsRuntimeContext;
    requiredScopes?: readonly string[];
    allowedScopes?: readonly string[];
    timeoutMs?: number;
    contract?: OpenAIV1RealtimeCallsGate;
    governance?: OpenAIV1RealtimeCallsGate;
    dryRun?: boolean;
    mockResponse?: unknown;
    expectResponseObject?: boolean;
    caller?: OpenAIV1RealtimeCallsProviderCaller;
};
export type OpenAIV1RealtimeCallsResponseEnvelope = {
    provider: "openai";
    endpoint: typeof OPENAI_V1_REALTIME_CALLS_ENDPOINT;
    mode: "dry-run" | "mock" | "caller";
    raw: unknown;
    providerFieldsOpaque: true;
};
export type OpenAIV1RealtimeCallsCapabilitySignal = {
    provider: "openai";
    endpoint: typeof OPENAI_V1_REALTIME_CALLS_ENDPOINT;
    rawShape: "realtime-call" | "mock" | "dry-run";
};
export type OpenAIV1RealtimeCallsError = {
    code: OpenAIV1RealtimeCallsErrorCode;
    message: string;
    boundary: OpenAIV1RealtimeCallsBoundary;
    retryable: boolean;
};
export type OpenAIV1RealtimeCallsResult = {
    ok: true;
    request: OpenAIV1RealtimeCallsRequestEnvelope;
    response: OpenAIV1RealtimeCallsResponseEnvelope;
    capability: OpenAIV1RealtimeCallsCapabilitySignal;
    events: readonly string[];
} | {
    ok: false;
    error: OpenAIV1RealtimeCallsError;
    request?: OpenAIV1RealtimeCallsRequestEnvelope;
    events: readonly string[];
};
export declare function classifyOpenAIV1RealtimeCallsProviderError(error: unknown): OpenAIV1RealtimeCallsErrorCode;
export declare function invokeOpenAIV1RealtimeCalls(input?: OpenAIV1RealtimeCallsInvocationRequest): Promise<OpenAIV1RealtimeCallsResult>;
