export type FieldType = "unknown" | "string" | "number" | "boolean" | "string[]" /** * Accept either a non-empty string or a non-empty array of * non-empty strings. Empty scalars, empty arrays, sparse arrays, * and empty-string entries are all rejected at validation time * so users can't silently drop a check (an empty * substring/regex would make `*_contains` vacuously pass and * `*_not_matches` always fail). */ | "string|string[]" | "array" | "duration" /** * A `duration` that must resolve to a strictly positive value. Zero (e.g. * `"0s"`) is rejected because for a timeout it would disable the cap. */ | "positive-duration" | "record"; export interface ConfigFieldSchema { type: FieldType; required?: boolean; /** For string fields: restrict to these values. */ enum?: string[]; /** For number fields: inclusive min/max range. */ range?: { min?: number; max?: number; }; /** For number fields: require an integer value. */ integer?: boolean; /** * For string fields: require at least this many characters after trimming. * Use `minLength: 1` to reject empty/whitespace-only values on a required * string that the runtime would otherwise trim and drop (e.g. * `panel.models[i].model`). */ minLength?: number; /** * For array-shaped fields (`array` and `string[]`): require at least this * many entries. Useful when `required: true` isn't enough because an empty * list would otherwise pass schema validation but fail at runtime (e.g. * `panel.models`). */ minItems?: number; /** * For string-array fields: require each entry to have at least this many * characters. Use `itemMinLength: 1` to reject empty-string entries like * `models: [""]` that would otherwise pass `string[]` type validation but * be silently dropped at runtime. */ itemMinLength?: number; /** * For string-array fields: restrict every entry to these values. */ itemEnum?: readonly string[]; /** * For string-array fields: reject repeated entries. */ uniqueItems?: boolean; /** * For `array` fields whose entries are objects: validate each element against * this schema. Gives nested objects (e.g. `panel.criteria[i]`) the same * required/type/enum/range/typo checks as top-level fields. */ items?: ConfigSchema; /** * For `array` fields: also accept bare non-empty strings as entries (in * addition to objects validated against `items`). Used by `panel.models`, * where an entry is either a model name or a `{ model, reasoning_effort }` * object. Combine with `itemMinLength` to reject empty-string entries. */ allowStringItems?: boolean; } export interface ConfigSchema { /** Known fields and their types. */ fields: Record; /** * At least one of these fields must be present. * e.g. tool-calls needs `required` or `disallowed` (or both). */ atLeastOne?: string[]; /** * Exactly one of these fields must be present (mutually exclusive). * e.g. diff-contains needs `pattern` or `value` but not both. */ exactlyOne?: string[]; /** Pairs of string-array fields that must not contain the same entry. */ disjoint?: ReadonlyArray; } /** Built-in grader types that operate on the workspace diff. */ export declare const DIFF_GRADER_TYPES: ReadonlySet; /** Built-in grader types whose config schema carries the shared `tools` field. */ export declare const TOOLS_FIELD_GRADER_TYPES: ReadonlySet; /** * Map of grader name → config schema for all built-in graders. */ export declare const BUILTIN_CONFIG_SCHEMAS: ReadonlyMap; /** * Environment variable names that the program grader always sets. * Shared between the validator (pre-flight rejection) and the grader * (runtime override) so the two lists can never drift. */ export declare const PROGRAM_GRADER_RESERVED_ENV_KEYS: readonly ["EVALUATE_WORKSPACE", "EVALUATE_GRADER_INPUT", "EVALUATE_ASSETS", "EVALUATE_ARTIFACT_DIR", "EVALUATE_ARTIFACT_DIR_STRICT"]; /** * Built-in grader types that require an LLM client. * * Used by the validator to detect LLM judges even when they aren't in the * registry (e.g. no LlmClient was provided). External/plugin graders are * detected via `metadata.behavior.requiresLlmClient` on the registered grader * instance. */ export declare const BUILTIN_LLM_GRADER_TYPES: ReadonlySet; /** * Built-in grader types that score against the stimulus rubric, substituting a * generic default when none is defined. Deliberately separate from * {@link BUILTIN_LLM_GRADER_TYPES}: needing an LLM does not imply consuming a * rubric, and a future judge could do one without the other. */ export declare const RUBRIC_GRADER_TYPES: ReadonlySet; /** * Built-in grader types that require filesystem access to the workspace. * * Used by the validator to detect workspace requirements even when graders * aren't in the registry. External/plugin graders are detected via * `metadata.behavior.requiresWorkspace` on the registered grader instance. */ export declare const BUILTIN_WORKSPACE_GRADER_TYPES: ReadonlySet; /** Raw `custom-metrics` assertion as authored in eval.yaml (before validation). */ export interface RawAssertion { metric?: unknown; min?: unknown; max?: unknown; gt?: unknown; lt?: unknown; equals?: unknown; tolerance?: unknown; matches?: unknown; contains?: unknown; present?: unknown; absent?: unknown; } /** * Validate the shape of a single `custom-metrics` assertion. Returns an error * message (without a grader-name prefix) describing the first problem found, or * `null` if valid. * * Shared between the grader (runtime, where the caller prefixes "custom-metrics " * and throws) and the eval validator (lint time, where the caller emits a * diagnostic), so the two can never drift. Lives here rather than in the grader * module so the validator doesn't pull the grader's filesystem/workspace-guard * dependencies into its module graph. */ export declare function validateAssertionShape(raw: unknown, index: number): string | null; //# sourceMappingURL=validator-schemas.d.ts.map