import { type LanguageModel } from "ai"; import type { ParsedPage } from "../../types.js"; export interface TemplateSample { signature: string; samplePages: Pick[]; } export interface JudgeOpts { modelId: string; cacheDir: string; /** Scores ONE page's contentText 0-100. Production wiring passes a generateObject-backed fn; tests pass a fake. */ generate: (contentText: string) => Promise; perTemplateCap?: number; siteCap?: number; signal?: AbortSignal; } export interface ContentEffortResult { perTemplate: Map; siteEffort: number | null; } export declare function judgeContentEffort(templates: TemplateSample[], opts: JudgeOpts): Promise; /** Per-call token usage (AI SDK v5 field names; tolerant of v4 promptTokens/completionTokens). */ export interface JudgeUsage { inputTokens: number; outputTokens: number; } /** * Production generate: structured-output judge. `generateObject` enforces the schema via a * single FORCED tool, so a prompt injection in the page text can at most return an in-range * number — it cannot add or redirect tools (the body sits inside the data fence; the system * frames it as untrusted). `onUsage`, when provided, reports each call's token usage so a * caller can enforce a hard cost ceiling — it may throw to abort the run mid-flight. */ export declare function makeLlmGenerate(model: LanguageModel, signal?: AbortSignal, onUsage?: (u: JudgeUsage) => void): (text: string) => Promise; //# sourceMappingURL=judge.d.ts.map