/**
 * @sanity/ailf-core — External provider response schemas
 *
 * Zod schemas for HTTP responses from third-party AI providers and search
 * APIs that the agent-observer providers parse. Replaces inline `as`
 * casts on `await response.json()` with parse-don't-validate boundaries.
 *
 * Schemas are intentionally permissive on optional fields (real APIs add
 * fields over time) but strict on shape — a malformed payload surfaces
 * as a clear ZodError at the call site instead of a cryptic
 * `Cannot read properties of undefined` later.
 *
 * @see docs/design-docs/parse-dont-validate.md
 * @see docs/work-items/W0004.json
 */
import { z } from "zod";
export declare const OpenAIChatResponseSchema: z.ZodObject<{
    choices: z.ZodOptional<z.ZodArray<z.ZodObject<{
        finish_reason: z.ZodOptional<z.ZodString>;
        message: z.ZodOptional<z.ZodObject<{
            content: z.ZodUnion<readonly [z.ZodString, z.ZodNull]>;
            role: z.ZodEnum<{
                user: "user";
                assistant: "assistant";
                system: "system";
                tool: "tool";
            }>;
            tool_call_id: z.ZodOptional<z.ZodString>;
            tool_calls: z.ZodOptional<z.ZodArray<z.ZodObject<{
                function: z.ZodObject<{
                    arguments: z.ZodString;
                    name: z.ZodString;
                }, z.core.$strip>;
                id: z.ZodString;
                type: z.ZodLiteral<"function">;
            }, z.core.$strip>>>;
        }, z.core.$strip>>;
    }, z.core.$strip>>>;
    error: z.ZodOptional<z.ZodObject<{
        message: z.ZodOptional<z.ZodString>;
    }, z.core.$strip>>;
    usage: z.ZodOptional<z.ZodObject<{
        completion_tokens: z.ZodOptional<z.ZodNumber>;
        prompt_tokens: z.ZodOptional<z.ZodNumber>;
        total_tokens: z.ZodOptional<z.ZodNumber>;
    }, z.core.$strip>>;
}, z.core.$strip>;
export type OpenAIChatResponse = z.infer<typeof OpenAIChatResponseSchema>;
export declare const OpenAIResponsesResponseSchema: z.ZodObject<{
    error: z.ZodOptional<z.ZodObject<{
        message: z.ZodOptional<z.ZodString>;
    }, z.core.$strip>>;
    output: z.ZodOptional<z.ZodArray<z.ZodObject<{
        content: z.ZodOptional<z.ZodArray<z.ZodObject<{
            text: z.ZodOptional<z.ZodString>;
            type: z.ZodOptional<z.ZodString>;
        }, z.core.$strip>>>;
        role: z.ZodOptional<z.ZodString>;
        type: z.ZodOptional<z.ZodString>;
    }, z.core.$strip>>>;
    usage: z.ZodOptional<z.ZodObject<{
        input_tokens: z.ZodOptional<z.ZodNumber>;
        output_tokens: z.ZodOptional<z.ZodNumber>;
        total_tokens: z.ZodOptional<z.ZodNumber>;
    }, z.core.$strip>>;
}, z.core.$strip>;
export type OpenAIResponsesResponse = z.infer<typeof OpenAIResponsesResponseSchema>;
declare const AnthropicTextBlockSchema: z.ZodObject<{
    text: z.ZodString;
    type: z.ZodLiteral<"text">;
}, z.core.$strip>;
declare const AnthropicToolUseBlockSchema: z.ZodObject<{
    id: z.ZodString;
    input: z.ZodRecord<z.ZodString, z.ZodUnknown>;
    name: z.ZodString;
    type: z.ZodLiteral<"tool_use">;
}, z.core.$strip>;
declare const AnthropicContentBlockSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
    text: z.ZodString;
    type: z.ZodLiteral<"text">;
}, z.core.$strip>, z.ZodObject<{
    id: z.ZodString;
    input: z.ZodRecord<z.ZodString, z.ZodUnknown>;
    name: z.ZodString;
    type: z.ZodLiteral<"tool_use">;
}, z.core.$strip>], "type">;
export declare const AnthropicResponseSchema: z.ZodObject<{
    content: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
        text: z.ZodString;
        type: z.ZodLiteral<"text">;
    }, z.core.$strip>, z.ZodObject<{
        id: z.ZodString;
        input: z.ZodRecord<z.ZodString, z.ZodUnknown>;
        name: z.ZodString;
        type: z.ZodLiteral<"tool_use">;
    }, z.core.$strip>], "type">>>;
    error: z.ZodOptional<z.ZodObject<{
        message: z.ZodOptional<z.ZodString>;
        type: z.ZodOptional<z.ZodString>;
    }, z.core.$strip>>;
    model: z.ZodOptional<z.ZodString>;
    stop_reason: z.ZodOptional<z.ZodEnum<{
        tool_use: "tool_use";
        end_turn: "end_turn";
        max_tokens: "max_tokens";
    }>>;
    usage: z.ZodOptional<z.ZodObject<{
        input_tokens: z.ZodOptional<z.ZodNumber>;
        output_tokens: z.ZodOptional<z.ZodNumber>;
    }, z.core.$strip>>;
}, z.core.$strip>;
export type AnthropicResponse = z.infer<typeof AnthropicResponseSchema>;
export type AnthropicTextBlock = z.infer<typeof AnthropicTextBlockSchema>;
export type AnthropicToolUseBlock = z.infer<typeof AnthropicToolUseBlockSchema>;
export type AnthropicContentBlock = z.infer<typeof AnthropicContentBlockSchema>;
export declare const GoogleSearchResponseSchema: z.ZodObject<{
    items: z.ZodOptional<z.ZodArray<z.ZodObject<{
        link: z.ZodString;
        snippet: z.ZodString;
        title: z.ZodString;
    }, z.core.$strip>>>;
}, z.core.$strip>;
export type GoogleSearchResponse = z.infer<typeof GoogleSearchResponseSchema>;
export declare const FetchPageToolArgsSchema: z.ZodObject<{
    url: z.ZodString;
}, z.core.$strip>;
export declare const ListDocsToolArgsSchema: z.ZodObject<{
    site: z.ZodString;
}, z.core.$strip>;
export declare const WebSearchToolArgsSchema: z.ZodObject<{
    query: z.ZodString;
}, z.core.$strip>;
export type FetchPageToolArgs = z.infer<typeof FetchPageToolArgsSchema>;
export type ListDocsToolArgs = z.infer<typeof ListDocsToolArgsSchema>;
export type WebSearchToolArgs = z.infer<typeof WebSearchToolArgsSchema>;
export {};
