import type { Logger } from "../types/output.js"; import type { LifecycleAction } from "../types/scenario.js"; export interface LifecycleResult { action: LifecycleAction; exitCode: number; stdout: string; stderr: string; durationMs: number; } export interface LifecycleExecOptions { /** Base directory for resolving `copy` action source globs. Defaults to `cwd`. */ sourceRoot?: string; /** When true, copy actions log resolved source/destination paths via `logger`. */ debug?: boolean; /** Logger used to emit debug output. Debug messages are dropped when omitted. */ logger?: Logger; } export declare function executeLifecycleActions(actions: LifecycleAction[], cwd: string, env?: Record, options?: LifecycleExecOptions): Promise; export interface LifecyclePhaseOutcome { results: LifecycleResult[]; /** Markdown content the scripts wrote to $AXIS_OUTPUT. Undefined when nothing was written. */ output?: string; /** Error thrown by `executeLifecycleActions`, if any. Output is still captured. */ error?: Error; } /** * Job-level context exposed to lifecycle scripts as `AXIS_*` env vars. * Scripts use these to branch on the agent, scenario, or variant under test * without needing to encode that information in their command strings. */ export interface LifecyclePhaseContext { /** Agent name (e.g. "claude-code"). Becomes `AXIS_AGENT`. */ agent: string; /** Model identifier, if the agent was configured with one. Becomes `AXIS_MODEL`. */ model?: string; /** Full scenario key including variant suffix (e.g. "my-scenario@fast"). Becomes `AXIS_SCENARIO`. */ scenario: string; /** Variant name, when the scenario key contains an `@variant` suffix. Becomes `AXIS_VARIANT`. */ variant?: string; } /** * Run one lifecycle phase (setup or teardown), exposing an `$AXIS_OUTPUT` * file scripts can write markdown notes to. The file is shared across all * actions in the phase so multiple scripts can append. Output is captured * even when an action fails — partial notes still surface in the report. */ export type LifecyclePhase = "setup" | "teardown" | "beforeAll" | "afterAll"; export declare function runLifecyclePhase(actions: LifecycleAction[], cwd: string, baseEnv: Record | undefined, phase: LifecyclePhase, context?: LifecyclePhaseContext, options?: LifecycleExecOptions): Promise; //# sourceMappingURL=lifecycle.d.ts.map