/** * Eval discovery for project-local eval definitions. */ import type { VeryfrontConfig } from "../config/index.js"; import type { RuntimeAdapter } from "../platform/index.js"; import type { EvalDefinition } from "./types.js"; /** Eval definition discovered from project source. */ export interface DiscoveredEval { id: string; name: string; filePath: string; exportName: string; definition: EvalDefinition; } /** Loader used to import an eval source module during discovery. */ export type EvalModuleLoader = (filePath: string, options: { adapter: RuntimeAdapter; projectDir: string; allowHostProjectCodeExecution?: boolean; }) => Promise>; /** Options for project-local eval discovery. */ export interface EvalDiscoveryOptions { projectDir: string; adapter: RuntimeAdapter; config?: VeryfrontConfig; evalsDir?: string; /** Explicit host-owned capability for a trusted local or dedicated runtime. */ allowHostProjectCodeExecution?: boolean; /** @internal Override source loading for tests and custom runtimes. */ moduleLoader?: EvalModuleLoader; } /** Result returned by eval discovery. */ export interface EvalDiscoveryResult { evals: DiscoveredEval[]; errors: Array<{ filePath: string; error: string; }>; } /** Derive the stable `eval:` ID for an eval file. */ export declare function deriveEvalId(filePath: string, evalsDir: string): string; /** Discover eval definitions from a project eval directory. */ export declare function discoverEvals(options: EvalDiscoveryOptions): Promise; /** Discover and return one eval definition by ID. */ export declare function findEvalById(evalId: string, options: EvalDiscoveryOptions): Promise; //# sourceMappingURL=discovery.d.ts.map