/**
 * CliConfigAdapter — resolves pipeline config from Commander CLI flags.
 *
 * This is the default adapter — it wraps the existing option resolution
 * pipeline: PipelineCliOptions → resolveOptions → mapToResolvedConfig.
 *
 * @see packages/eval/src/commands/pipeline-action.ts — underlying implementation
 */
import { resolveOptions } from "../../commands/pipeline-action.js";
import { mapToResolvedConfig } from "../../orchestration/build-app-context.js";
export class CliConfigAdapter {
    cliOpts;
    rootDir;
    label = "CLI flags";
    constructor(cliOpts, rootDir) {
        this.cliOpts = cliOpts;
        this.rootDir = rootDir;
    }
    async resolve() {
        // resolveOptions loads the repo config (`.ailf/ailf.config.ts` etc.)
        // before mapping CLI flags, so file-sourced source/owner/execution
        // values reach the resolved config.
        const resolved = await resolveOptions(this.cliOpts);
        return mapToResolvedConfig(resolved, this.rootDir);
    }
}
