import type { ModelMessage } from 'ai';
import { z } from 'zod';
import type { RunResult } from '../agent';
/**
 * Input for the generic structured output tool.
 * The `data` field holds the structured response as a free-form object.
 */
export declare const structuredOutputInput: z.ZodObject<{
    data: z.ZodRecord<z.ZodString, z.ZodUnknown>;
}, z.core.$strip>;
export type StructuredOutputInput = z.infer<typeof structuredOutputInput>;
/**
 * A pre-built StructuredOutput tool that accepts any JSON object.
 *
 * For schema-validated structured output, use `structuredOutput(schema)`
 * or `createStructuredOutputTool(schema)` instead.
 */
export declare const StructuredOutputTool: import("..").Tool<{
    data: Record<string, unknown>;
}, string>;
/**
 * Create a typed StructuredOutput tool validated against a Zod schema.
 *
 * @param schema - A Zod schema describing the expected output shape.
 */
export declare function createStructuredOutputTool<T extends z.ZodType>(schema: T): import("..").Tool<{
    data: z.infer<T>;
}, string>;
/**
 * Extract the raw `data` value from a `structured_output` tool call in a
 * list of messages. Scans backwards to find the most recent call.
 *
 * Returns `undefined` if no `structured_output` tool call is found.
 */
export declare function extractStructuredOutput(messages: readonly ModelMessage[]): unknown | undefined;
/**
 * All-in-one structured output helper.
 *
 * Returns:
 * - `tool` - a `structured_output` tool wired to the given Zod schema
 * - `parse(result)` - extracts and validates the structured data from a `RunResult`
 *
 * `parse` returns the typed data on success, or `undefined` if no
 * `structured_output` tool call was found in the result messages.
 * Throws a `ZodError` if the data is present but fails schema validation.
 */
export declare function structuredOutput<T extends z.ZodType>(schema: T): {
    tool: import("..").Tool<{
        data: z.core.output<T>;
    }, string>;
    parse: (result: RunResult) => z.infer<T> | undefined;
};
//# sourceMappingURL=structured-output.d.ts.map