export declare const OPENAI_V1_CHATKIT_THREADS_ENDPOINT: "/v1/chatkit/threads";
export type OpenAiV1ChatkitThreadsMethod = "POST";
export type OpenAiV1ChatkitThreadsGate = {
    accepted: boolean;
    reason?: string;
};
export type OpenAiV1ChatkitThreadsTrace = {
    correlationId?: string;
    callerId?: string;
};
export type OpenAiV1ChatkitThreadsMockCallerRequest = {
    provider: "openai";
    endpoint: typeof OPENAI_V1_CHATKIT_THREADS_ENDPOINT;
    url: string;
    method: OpenAiV1ChatkitThreadsMethod;
    requestBody: Record<string, unknown>;
    headers: {
        authorization?: string;
        organization?: string;
        project?: string;
    };
    timeoutMs: number;
    trace: OpenAiV1ChatkitThreadsTrace;
};
export type OpenAiV1ChatkitThreadsMockCallerResponse = {
    status: number;
    body?: unknown;
    headers?: Record<string, string>;
};
export type OpenAiV1ChatkitThreadsMockCaller = (request: OpenAiV1ChatkitThreadsMockCallerRequest) => Promise<OpenAiV1ChatkitThreadsMockCallerResponse> | OpenAiV1ChatkitThreadsMockCallerResponse;
export type OpenAiV1ChatkitThreadsInvocationRequest = {
    requestBody?: unknown;
    baseUrl?: string;
    apiKey?: string;
    organizationId?: string;
    projectId?: string;
    timeoutMs?: number;
    trace?: OpenAiV1ChatkitThreadsTrace;
    contract?: OpenAiV1ChatkitThreadsGate;
    governance?: OpenAiV1ChatkitThreadsGate;
    dryRun?: boolean;
    mockCaller?: OpenAiV1ChatkitThreadsMockCaller;
};
export type OpenAiV1ChatkitThreadsErrorCode = "MISSING_REQUEST" | "MISSING_REQUEST_BODY" | "INVALID_REQUEST_BODY" | "INVALID_TIMEOUT" | "CONTRACT_REJECTED" | "GOVERNANCE_REJECTED" | "MISSING_MOCK_CALLER" | "UPSTREAM_AUTH_FAILED" | "UPSTREAM_RATE_LIMITED" | "UPSTREAM_TIMEOUT" | "UPSTREAM_UNAVAILABLE" | "UPSTREAM_RESPONSE_DRIFT" | "UPSTREAM_ERROR";
export type OpenAiV1ChatkitThreadsErrorBoundary = "input" | "contract" | "governance" | "provider";
export type OpenAiV1ChatkitThreadsInvocationError = {
    code: OpenAiV1ChatkitThreadsErrorCode;
    message: string;
    boundary: OpenAiV1ChatkitThreadsErrorBoundary;
    providerSafe: true;
};
export type OpenAiV1ChatkitThreadsProviderEnvelope = {
    provider: "openai";
    endpoint: typeof OPENAI_V1_CHATKIT_THREADS_ENDPOINT;
    url: string;
    method: OpenAiV1ChatkitThreadsMethod;
    requestBody: Record<string, unknown>;
    status?: number;
    rawResponse?: unknown;
    responseHeaders?: Record<string, string>;
    authState: "missing" | "provided";
    capabilitySignals: {
        actualInvocationLayer: true;
        providerShapePreserved: true;
        endpoint: typeof OPENAI_V1_CHATKIT_THREADS_ENDPOINT;
        mockable: true;
    };
    trace: OpenAiV1ChatkitThreadsTrace;
    dryRun: boolean;
    unsafeSideEffects: false;
};
export type OpenAiV1ChatkitThreadsInvocationResult = {
    ok: true;
    envelope: OpenAiV1ChatkitThreadsProviderEnvelope;
    events: readonly string[];
} | {
    ok: false;
    error: OpenAiV1ChatkitThreadsInvocationError;
    events: readonly string[];
};
export declare function invokeOpenAiV1ChatkitThreads(request?: OpenAiV1ChatkitThreadsInvocationRequest): Promise<OpenAiV1ChatkitThreadsInvocationResult>;
