export declare const PROGRAM_SCHEMA_VERSION = 1; export type MetricDirection = "maximize" | "minimize"; export type SignalAutoMode = "false" | "prompt" | "true"; export interface MetricSpec { name: string; formula: string; source: string; threshold: number; direction: MetricDirection; } export interface PipelineStep { agent: string; task: string; } export interface ApiBudget { per_cycle_usd: number; total_usd: number; cap_warning_at: number; } export interface GuardrailsInput { modifiable_paths: string[]; immutable_paths: string[]; api_budget: ApiBudget; domain_whitelist: string[]; } export interface GuardrailsRuntime { cycle_minutes: number; stage_timeout_seconds: number; consecutive_discard_limit: number; } export interface GuardrailsOutput { validate_results_tsv: boolean; forbidden_side_effects: string[]; } export interface TimeBudget { hours?: number; cycles?: number; } export interface SignalTrigger { auto: SignalAutoMode; match_keywords: string[]; } export interface ProgramSpec { schema_version: number; prog_id: string; org: string; target_repo: string | null; cycle_unit: "pipeline_pass"; program_name: string; goal: string; metrics: MetricSpec[]; pipeline: PipelineStep[]; guards: { input: GuardrailsInput; runtime: GuardrailsRuntime; output: GuardrailsOutput; }; time_budget: TimeBudget; termination_conditions: string[]; signal_trigger: SignalTrigger; source_path: string; } export declare class ProgramParseError extends Error { readonly path?: string | undefined; constructor(message: string, path?: string | undefined); } /** * Immutable paths injected on every program regardless of what the file declares. * Karpathy autoresearch isolation: only humans edit the engine, evaluator, and program.md. * `source_path` is also appended at parse time (see assembleImmutablePaths). */ export declare const IMMUTABLE_PATH_DEFAULTS: readonly string[]; export declare function parseProgramFile(absPath: string): ProgramSpec; export declare function parseProgram(raw: string, sourcePath: string): ProgramSpec;