import type { Guardrail, ToolResult } from "./contracts.js"; export interface ClaimGroundingEvidence { readonly value: number; /** Refer to this governed figure as `[evidence:]` immediately after a claim. */ readonly ref?: string; } export interface ClaimGroundingEvidenceExtractorContext { readonly sessionId: string; readonly runId: string; readonly metadata: Readonly>; readonly toolResults: readonly ToolResult[]; } /** Supplies host-governed figures without coupling this primitive to a host store or package. */ export type ClaimGroundingEvidenceExtractor = (context: ClaimGroundingEvidenceExtractorContext) => readonly ClaimGroundingEvidence[]; export interface ClaimGroundingGuardrailOptions { /** False makes the returned guardrail a no-op. */ readonly requireEvidenceForNumbers: boolean; /** Defaults to same-run tool results. A host extractor may return its own governed figures. */ readonly evidenceSources?: "tool_results" | ClaimGroundingEvidenceExtractor; /** Defaults to block. Flag emits an allow record with `metadata.violation: true`. */ readonly onViolation?: "block" | "flag"; /** Exact numeric equality by default; rounded accepts half the final printed unit. */ readonly tolerance?: "exact" | "rounded"; } /** * Deterministic output guardrail for figures that must be grounded in same-run tool results * or host-governed evidence. It never calls a provider, store, or extractor asynchronously. */ export declare function createClaimGroundingGuardrail(options: ClaimGroundingGuardrailOptions): Guardrail<"output">;