/**
 * Helpers shared by both model clients to support
 * structured-output turns. The agent's structured-output design uses a
 * "synthetic tool" — when a caller supplies an `outputSchema`, we
 * append one extra `ToolSchema` to the tools list for the request.
 * The model decides to "call" that tool the same way it'd call any
 * other; we intercept the call in the response, validate the
 * arguments, and surface them as `ModelResponse.output` instead of
 * dispatching anything.
 *
 * This is kept provider-agnostic so the Anthropic and
 * OpenAI-compatible clients can share the wiring.
 */
import type { OutputSchema, ToolCall, ToolSchema } from "./types.js";
/**
 * Build the synthetic `ToolSchema` for a structured-output turn.
 * The schema is passed through verbatim — both providers accept
 * draft-2020-12 JSON Schema for tool input.
 */
export declare function synthesizeRespondTool(outputSchema: OutputSchema): ToolSchema;
/**
 * Reject obvious problems early so we surface actionable errors
 * instead of letting the provider fail mid-request.
 */
export declare function validateOutputSchema(outputSchema: OutputSchema, realTools: ReadonlyArray<ToolSchema>): void;
/**
 * Validate raw arguments against the output schema. Throws
 * `OutputValidationError` on mismatch; returns the parsed value on
 * success.
 */
export declare function validateOutput(outputSchema: OutputSchema, raw: unknown): unknown;
/**
 * Pull the synthetic respond tool's call (if any) out of the model's
 * response. Returns the validated parsed value plus a filtered
 * `toolCalls` list with the synthetic call removed so the agent loop
 * does not try to dispatch it.
 */
export declare function extractStructuredOutput(outputSchema: OutputSchema, toolCalls: ReadonlyArray<ToolCall>): {
    output: unknown;
    remainingToolCalls: ToolCall[];
} | null;
//# sourceMappingURL=structured-output.d.ts.map