import { z } from "zod"; import { createStructuredModel } from "../../shared/agent/model.config.js"; import type { MinedDiscriminator, DiscriminatorMiningInput } from "./discriminator.types.js"; declare const AxisMiningResponseSchema: z.ZodObject<{ axes: z.ZodArray; assignments: z.ZodArray; evidence: z.ZodNullable; }, "strip", z.ZodTypeAny, { id: string; evidence: string | null; side: string | null; }, { id: string; evidence: string | null; side: string | null; }>, "many">; }, "strip", z.ZodTypeAny, { questionSeed: string; sides: string[]; assignments: { id: string; evidence: string | null; side: string | null; }[]; axis: string; }, { questionSeed: string; sides: string[]; assignments: { id: string; evidence: string | null; side: string | null; }[]; axis: string; }>, "many">; }, "strip", z.ZodTypeAny, { axes: { questionSeed: string; sides: string[]; assignments: { id: string; evidence: string | null; side: string | null; }[]; axis: string; }[]; }, { axes: { questionSeed: string; sides: string[]; assignments: { id: string; evidence: string | null; side: string | null; }[]; axis: string; }[]; }>; type AxisMiningResponse = z.infer; /** Config for PoolDiscriminatorMiner construction. */ export interface PoolDiscriminatorMinerConfig { /** Optional model config override (API key / base URL / model). */ modelConfig?: Parameters[3]; } /** * Collapse whitespace, lowercase, and fold typographic punctuation to ASCII * (curly quotes/apostrophes, en/em dashes, ellipsis), so evidence matching * tolerates formatting drift without weakening the verbatim requirement. */ export declare function normalizePoolEvidenceForMatch(s: string): string; /** * Strips wrapping quotes and edge punctuation from an evidence span before * matching. LLMs habitually sentence-ize copied spans (append a trailing * period, wrap in quotes); the meaningful content must still match verbatim. */ export declare function stripPoolEvidenceEdgePunctuation(s: string): string; /** Evidence verifier shared by mining and newborn assignment. */ export declare function poolEvidenceMatches(publicContext: string, evidence: string | null): boolean; /** * Stateless axis-mining agent. One `mine()` call = one structured LLM pass + * deterministic evidence verification. */ export declare class PoolDiscriminatorMiner { private model; constructor(config?: PoolDiscriminatorMinerConfig); /** * Mine discriminating axes for one pool. * * @returns Verified axes (may be empty). Throws on LLM failure — callers * run this fire-and-forget and must catch. */ mine(input: DiscriminatorMiningInput, options?: { signal?: AbortSignal; }): Promise; } /** Builds the human message: intent text + one numbered block per candidate. */ export declare function buildMiningPrompt(input: DiscriminatorMiningInput): string; /** * Deterministic post-pass over one LLM axis: * - drops assignments for ids not in the pool, * - demotes to unknown: sides not in the axis's side list, missing evidence, * and evidence that does not substring-match the candidate's publicContext, * - collapses duplicate proposals to the same trim-normalized side, * - demotes a candidate proposed for different sides to unknown (zero support), * - guarantees exactly one assignment per pool candidate (missing → unknown), * - computes evidenceRate = verified / distinct candidate-side proposals. */ export declare function verifyAxis(axis: AxisMiningResponse["axes"][number], candidates: DiscriminatorMiningInput["candidates"]): MinedDiscriminator; export {};