export declare const OPENAI_V1_EVALS_ENDPOINT: "/v1/evals";
export type OpenAIV1EvalsMethod = "GET" | "POST" | "PATCH" | "DELETE";
export type OpenAIV1EvalsGate = {
    accepted: boolean;
    reason?: string;
};
export type OpenAIV1EvalsRuntimeContext = {
    runtimeId?: string;
    correlationId?: string;
    callerId?: string;
};
export type OpenAIV1EvalsAuthEnvelope = {
    kind: "api-key" | "bearer" | "none";
    present: boolean;
    redactedToken?: string;
};
export type OpenAIV1EvalsRequestEnvelope = {
    provider: "openai";
    apiVersion: "v1";
    endpoint: typeof OPENAI_V1_EVALS_ENDPOINT;
    operation: string;
    method: OpenAIV1EvalsMethod;
    urlPath: string;
    query: Readonly<Record<string, string>>;
    headers: Readonly<Record<string, string>>;
    body?: unknown;
    runtime: Required<OpenAIV1EvalsRuntimeContext>;
    requestedScopes: readonly string[];
    grantedScopes: readonly string[];
    dryRun: boolean;
    unsafeSideEffects: false;
    providerFieldsOpaque: true;
};
export type OpenAIV1EvalsProviderCaller = (envelope: OpenAIV1EvalsRequestEnvelope) => unknown | Promise<unknown>;
export type OpenAIV1EvalsInvocationRequest = {
    operation?: string;
    method?: OpenAIV1EvalsMethod;
    pathSuffix?: string;
    query?: Readonly<Record<string, string | number | boolean | undefined>>;
    headers?: Readonly<Record<string, string | undefined>>;
    body?: unknown;
    auth?: OpenAIV1EvalsAuthEnvelope;
    runtime?: OpenAIV1EvalsRuntimeContext;
    requiredScopes?: readonly string[];
    allowedScopes?: readonly string[];
    contract?: OpenAIV1EvalsGate;
    governance?: OpenAIV1EvalsGate;
    dryRun?: boolean;
    mockResponse?: unknown;
    expectResponseObject?: boolean;
    caller?: OpenAIV1EvalsProviderCaller;
};
export type OpenAIV1EvalsErrorCode = "MISSING_OPERATION" | "MISSING_RUNTIME_ID" | "CONTRACT_REJECTED" | "GOVERNANCE_REJECTED" | "SCOPE_DENIED" | "AUTH_REJECTED" | "CALLER_REQUIRED" | "PROVIDER_AUTH_FAILED" | "PROVIDER_RATE_LIMITED" | "PROVIDER_TIMEOUT" | "PROVIDER_UNAVAILABLE" | "RESPONSE_FORMAT_DRIFT" | "CALLER_FAILED";
export type OpenAIV1EvalsError = {
    code: OpenAIV1EvalsErrorCode;
    message: string;
    boundary: "input" | "contract" | "governance" | "auth" | "scope" | "provider";
    retryable: boolean;
};
export type OpenAIV1EvalsProviderResponseEnvelope = {
    provider: "openai";
    endpoint: typeof OPENAI_V1_EVALS_ENDPOINT;
    mode: "dry-run" | "mock" | "caller";
    raw: unknown;
    providerFieldsOpaque: true;
};
export type OpenAIV1EvalsInvocationResult = {
    ok: true;
    request: OpenAIV1EvalsRequestEnvelope;
    response: OpenAIV1EvalsProviderResponseEnvelope;
    events: readonly string[];
} | {
    ok: false;
    error: OpenAIV1EvalsError;
    request?: OpenAIV1EvalsRequestEnvelope;
    events: readonly string[];
};
export declare function classifyOpenAIV1EvalsProviderError(error: unknown): OpenAIV1EvalsErrorCode;
export declare function invokeOpenAIV1Evals(input?: OpenAIV1EvalsInvocationRequest): Promise<OpenAIV1EvalsInvocationResult>;
