/** * ollama_extract — schema-constrained JSON extraction. Tier: Workhorse. * Uses Ollama's format: "json" mode. Returns {error: "unparseable"} when * the model's output doesn't round-trip through the caller's schema. * * Three input modes (exactly one): * - `text` : single extraction from raw text * - `source_path` : single file read + extracted server-side (context * preservation — caller never pre-reads the file) * - `items` : batch of {id, text}, one shared envelope with per-item * {id, ok, result|error} * * Exactly one of {text, source_path, items} must be provided. */ import { z } from "zod"; import type { Envelope } from "../envelope.js"; import { type BatchResult } from "./batch.js"; import type { RunContext } from "../runContext.js"; export declare const extractSchema: z.ZodObject<{ text: z.ZodOptional; source_path: z.ZodOptional; items: z.ZodOptional>>; schema: z.ZodRecord; hint: z.ZodOptional; frame: z.ZodOptional; per_file_max_chars: z.ZodOptional; model: z.ZodOptional; tier_budget_ms_override: z.ZodOptional; }, z.core.$strip>; export type ExtractInput = z.infer; export interface FrameAlignment { on_topic: boolean; reason: string; unaddressed_aspects?: string[]; } export type ExtractResult = { ok: true; data: Record; frame_alignment?: FrameAlignment; } | { ok: false; error: "unparseable"; raw: string; }; export declare function handleExtract(input: ExtractInput, ctx: RunContext): Promise | Envelope>>; //# sourceMappingURL=extract.d.ts.map