/** * Matrix (cross-product) expansion for experiment configs. * * A `matrix:` block declares one or more named axes, each of which overrides * a single whole-field config path with a list of values. Expansion produces * the full cartesian product as the standard `variants` map, plus a derived * `baseline` (string) and `vary` (array), so the resolver and every layer * downstream never has to know matrix existed. * * Surface: * * ```yaml * matrix: * model: * path: /defaults/model * values: [gpt-5, claude-sonnet-4.6] * skills: * path: /environment/skills * values: * - none: [] * - matched: ["plugins/${eval.parent}/skills/*"] * baseline: { model: gpt-5, skills: none } * ``` */ import type { VariantOverride } from "./types.js"; /** Result of expanding a `matrix:` block. */ export interface ExpandedMatrix { variants: Record; baseline: string; vary: string[]; } /** * The subset of a parsed experiment spec that {@link expandMatrix} reads. Both * fields hold the raw `parseYaml` output and are validated at runtime — the * types document which keys are consulted, not a guarantee of their shape. */ export interface MatrixSpec { /** The raw `matrix:` block: a map of axis name → `{ path, values }`. */ matrix?: unknown; /** The raw `baseline:` block: a map of axis name → value label. */ baseline?: unknown; } /** * Expand the `matrix` block of a parsed experiment spec into variants, * baseline, and vary. Reads `spec.matrix` and `spec.baseline`. * * This performs matrix-specific validation only; the generated `variants` / * `baseline` / `vary` are re-validated by {@link loadExperimentConfig}, which * is the supported entry point. Throws {@link ExperimentValidationError} on * any invalid input. */ export declare function expandMatrix(spec: MatrixSpec): ExpandedMatrix; //# sourceMappingURL=matrix.d.ts.map