export declare const OPENAI_V1_CONVERSATIONS_ENDPOINT: "/v1/conversations";
export declare const DEFAULT_OPENAI_V1_CONVERSATIONS_BASE_URL: "https://api.openai.com";
export type OpenAIV1ConversationsMethod = "GET" | "POST" | "PATCH" | "DELETE";
export type OpenAIV1ConversationsBoundary = "input" | "contract" | "governance" | "auth" | "scope" | "provider" | "response";
export type OpenAIV1ConversationsErrorCode = "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 OpenAIV1ConversationsGate = {
    accepted: boolean;
    reason?: string;
};
export type OpenAIV1ConversationsRuntimeContext = {
    runtimeId?: string;
    invocationId?: string;
    traceId?: string;
    callerId?: string;
};
export type OpenAIV1ConversationsAuthEnvelope = {
    kind: "bearer" | "api-key" | "none";
    present: boolean;
    redactedToken?: string;
};
export type OpenAIV1ConversationsRequestEnvelope = {
    provider: "openai";
    apiVersion: "v1";
    endpoint: typeof OPENAI_V1_CONVERSATIONS_ENDPOINT;
    operation: string;
    method: OpenAIV1ConversationsMethod;
    url: string;
    pathSuffix: string;
    query: Readonly<Record<string, string>>;
    headers: Readonly<Record<string, string>>;
    body?: unknown;
    runtime: Required<OpenAIV1ConversationsRuntimeContext>;
    requestedScopes: readonly string[];
    grantedScopes: readonly string[];
    dryRun: boolean;
    providerCallPlanned: boolean;
    unsafeSideEffects: false;
    providerFieldsOpaque: true;
};
export type OpenAIV1ConversationsProviderCaller = (envelope: OpenAIV1ConversationsRequestEnvelope) => unknown | Promise<unknown>;
export type OpenAIV1ConversationsInvocationRequest = {
    operation?: string;
    method?: OpenAIV1ConversationsMethod;
    pathSuffix?: string;
    query?: Readonly<Record<string, string | number | boolean | undefined>>;
    headers?: Readonly<Record<string, string | undefined>>;
    body?: unknown;
    baseUrl?: string;
    auth?: OpenAIV1ConversationsAuthEnvelope;
    runtime?: OpenAIV1ConversationsRuntimeContext;
    requiredScopes?: readonly string[];
    allowedScopes?: readonly string[];
    contract?: OpenAIV1ConversationsGate;
    governance?: OpenAIV1ConversationsGate;
    dryRun?: boolean;
    mockResponse?: unknown;
    expectResponseObject?: boolean;
    caller?: OpenAIV1ConversationsProviderCaller;
};
export type OpenAIV1ConversationsResponseEnvelope = {
    provider: "openai";
    endpoint: typeof OPENAI_V1_CONVERSATIONS_ENDPOINT;
    mode: "dry-run" | "mock" | "caller";
    raw: unknown;
    providerFieldsOpaque: true;
};
export type OpenAIV1ConversationsCapabilitySignal = {
    provider: "openai";
    endpoint: typeof OPENAI_V1_CONVERSATIONS_ENDPOINT;
    operation: string;
    rawShape: "conversation-object" | "conversation-list" | "mock" | "dry-run";
};
export type OpenAIV1ConversationsError = {
    code: OpenAIV1ConversationsErrorCode;
    message: string;
    boundary: OpenAIV1ConversationsBoundary;
    retryable: boolean;
};
export type OpenAIV1ConversationsResult = {
    ok: true;
    request: OpenAIV1ConversationsRequestEnvelope;
    response: OpenAIV1ConversationsResponseEnvelope;
    capability: OpenAIV1ConversationsCapabilitySignal;
    events: readonly string[];
} | {
    ok: false;
    error: OpenAIV1ConversationsError;
    request?: OpenAIV1ConversationsRequestEnvelope;
    events: readonly string[];
};
export declare function classifyOpenAIV1ConversationsProviderError(error: unknown): OpenAIV1ConversationsErrorCode;
export declare function invokeOpenAIV1Conversations(input?: OpenAIV1ConversationsInvocationRequest): Promise<OpenAIV1ConversationsResult>;
