/** * Agent structured-output resolution. * * Turns the public `outputSchema` (a materialized `Schema` or a raw JSON * Schema document) into the provider-neutral `RuntimeResponseFormat` the model * runtimes map to their native fields, plus the parser that turns the model's * text back into the typed `object` on the response. * * `responseFormat` stays internal vocabulary: callers only ever say * `outputSchema`. * * @module agent/output-schema */ import type { RuntimeResponseFormat } from "../provider/types.js"; /** A requested output schema paired with the parser that enforces it. */ export interface ResolvedAgentOutputSchema { readonly responseFormat: RuntimeResponseFormat; /** Parse and validate model text, or throw naming the failure. */ parseOutput(text: string): Promise; } export declare function attachOutputSchemaParser(response: TResponse, outputSchema: ResolvedAgentOutputSchema | undefined): TResponse; export declare function getOutputSchemaParser(response: unknown): ((text: string) => Promise) | undefined; /** * Resolve a configured or per-call `outputSchema`. * * Returns `undefined` only when no schema was requested. An unusable schema * throws instead: a requested schema is never dropped. */ export declare function resolveAgentOutputSchema(outputSchema: unknown, agentId: string): ResolvedAgentOutputSchema | undefined; //# sourceMappingURL=output-schema.d.ts.map