import { M as MatrixResult, a as MatrixAxis, A as AxisSummary, b as MatrixCell, C as CellResult, R as RunAgentMatrixOptions } from '../types-BUxNaJ8c.js';
export { D as DefaultVerdict } from '../verdict-C9MlYujm.js';

/**
 * Per-axis aggregation of cell runs into `AxisSummary` rows.
 *
 * Pure: consumes the final `cells: [{cell, runs}]` array and returns the
 * `byAxis` table. Error runs contribute 0 to passRate and meanScore. Cost
 * and duration always count — the budget was spent regardless.
 */

interface Row<Output> {
    cell: MatrixCell;
    result: CellResult<Output>;
}
declare function summariseRows<Output>(rows: Row<Output>[], axisName: string, axisValue: string): AxisSummary;
declare function buildByAxis<Output>(cells: MatrixResult<Output>['cells'], axes: MatrixAxis<unknown>[], aggregateBy: string[]): Record<string, Record<string, AxisSummary>>;

/**
 * N-axis cartesian runner.
 *
 * Expansion order: cartesian over `axes` in declared order, then `reps` as the
 * inner-most dim → `ordinal = (cartIdx * reps) + rep`. The returned
 * `cells[]` is sorted by `ordinal` so concurrent execution does not reorder
 * the output.
 *
 * Scheduling is a sliding window of in-flight promises capped at
 * `maxConcurrency`. The window stops admitting new cells when the cost
 * ceiling trips or the abort signal fires; in-flight cells finish.
 */

declare function runAgentMatrix<Output>(opts: RunAgentMatrixOptions<Output>): Promise<MatrixResult<Output>>;

export { AxisSummary, CellResult, MatrixAxis, MatrixCell, MatrixResult, RunAgentMatrixOptions, buildByAxis, runAgentMatrix, summariseRows };
