import { z } from 'zod'; /** Source-grounded role supported by an exact span from the source text. */ export interface HydeFrameRole { role: string; evidence: string; } export declare const HYDE_HARD_CONSTRAINT_TYPES: readonly ["location", "time", "numeric", "credential", "organization", "exclusivity", "other"]; export type HydeHardConstraintType = (typeof HYDE_HARD_CONSTRAINT_TYPES)[number]; /** Explicit hard constraint supported by an exact span from the source text. */ export interface HydeFrameHardConstraint { type: HydeHardConstraintType; value: string; evidence: string; } export declare const HYDE_NAMED_ENTITY_TYPES: readonly ["person", "organization", "product", "location", "event", "other"]; export type HydeNamedEntityType = (typeof HYDE_NAMED_ENTITY_TYPES)[number]; /** Named entity supported by an exact span from the source text. */ export interface HydeFrameNamedEntity { type: HydeNamedEntityType; name: string; evidence: string; } /** Domain term supported by an exact span from the source text. */ export interface HydeFrameVocabulary { term: string; evidence: string; } /** * Source-grounded controls for frame-constrained HyDE generation. * Counterpart roles may be reciprocal/complementary inferences, but their * evidence must still be an exact span from the source text. */ export interface HydeSourceFrame { sourceRoles: HydeFrameRole[]; counterpartRoles: HydeFrameRole[]; hardConstraints: HydeFrameHardConstraint[]; namedEntities: HydeFrameNamedEntity[]; domainVocabulary: HydeFrameVocabulary[]; } /** Structured-output schema for source-grounded frames. */ export declare const HydeSourceFrameSchema: z.ZodObject<{ sourceRoles: z.ZodArray, "many">; counterpartRoles: z.ZodArray, "many">; hardConstraints: z.ZodArray; value: z.ZodString; evidence: z.ZodString; }, "strip", z.ZodTypeAny, { value: string; type: "location" | "time" | "numeric" | "credential" | "organization" | "exclusivity" | "other"; evidence: string; }, { value: string; type: "location" | "time" | "numeric" | "credential" | "organization" | "exclusivity" | "other"; evidence: string; }>, "many">; namedEntities: z.ZodArray; name: z.ZodString; evidence: z.ZodString; }, "strip", z.ZodTypeAny, { name: string; type: "location" | "organization" | "other" | "person" | "product" | "event"; evidence: string; }, { name: string; type: "location" | "organization" | "other" | "person" | "product" | "event"; evidence: string; }>, "many">; domainVocabulary: z.ZodArray, "many">; }, "strip", z.ZodTypeAny, { sourceRoles: { role: string; evidence: string; }[]; counterpartRoles: { role: string; evidence: string; }[]; hardConstraints: { value: string; type: "location" | "time" | "numeric" | "credential" | "organization" | "exclusivity" | "other"; evidence: string; }[]; namedEntities: { name: string; type: "location" | "organization" | "other" | "person" | "product" | "event"; evidence: string; }[]; domainVocabulary: { evidence: string; term: string; }[]; }, { sourceRoles: { role: string; evidence: string; }[]; counterpartRoles: { role: string; evidence: string; }[]; hardConstraints: { value: string; type: "location" | "time" | "numeric" | "credential" | "organization" | "exclusivity" | "other"; evidence: string; }[]; namedEntities: { name: string; type: "location" | "organization" | "other" | "person" | "product" | "event"; evidence: string; }[]; domainVocabulary: { evidence: string; term: string; }[]; }>; /** * Remove frame elements that cross the source-evidence boundary. Structured * payloads must occur inside their evidence span. Source roles require grounded * substantive tokens; counterpart roles may add generic inferred role language. */ export declare function sanitizeHydeSourceFrame(sourceText: string, frame: HydeSourceFrame): HydeSourceFrame;