import type { ExperienceLevel, SddPhase, ToolResult } from './common.js';
export interface ExecutionPlan {
    phases: ExecutionPhase[];
    totalSteps: number;
    criticalPath: string[];
    parallelizable: string[][];
}
export interface ExecutionPhase {
    name: string;
    steps: ExecutionStep[];
}
export interface PlanCycle {
    red: string;
    green: string;
    verify: string;
}
export interface ExecutionStep {
    order: number;
    title: string;
    description: string;
    files: string[];
    dependsOn: number[];
    verification: string;
    estimatedMinutes: number;
    canRollback: boolean;
    parallelizable?: boolean;
    cycle?: PlanCycle;
}
export interface PhaseTracker {
    currentPhase: SddPhase;
    specId: string | null;
    stepDescription: string;
    progress: number;
    globalProgress: number;
    stepsCompleted: string[];
    nextStep: string;
    blockers: string[];
    elapsedSeconds: number;
    estimatedRemainingSeconds: number;
    experienceLevel: ExperienceLevel;
}
export interface PhaseEvent {
    phase: SddPhase;
    action: string;
    status: 'started' | 'in-progress' | 'completed' | 'blocked' | 'error';
    message: string;
    detail?: string;
    progress: number;
    globalProgress: number;
    timestamp: string;
}
export interface GenerateExecutionPlanInput {
    specId: string;
    projectId: string;
}
/** Result of a complete tool chain execution. */
export interface ChainResult {
    chainId: string;
    intent: string;
    steps: ChainStepResult[];
    summary: string;
    globalProgress: number;
    totalElapsed: number;
    status: 'completed' | 'partial' | 'failed';
    stoppedAt?: string;
}
/** Result of a single step within a chain. */
export interface ChainStepResult {
    tool: string;
    status: 'success' | 'skipped' | 'failed';
    result?: unknown;
    error?: string;
    phaseEvent: PhaseEvent;
    elapsed: number;
}
/** Predefined tool chain definition. */
export interface ToolChainDefinition {
    id: string;
    name: string;
    triggers: string[];
    steps: ToolChainStep[];
}
/** A single step within a tool chain definition. */
export interface ToolChainStep {
    tool: string;
    condition?: string;
    paramMapping: Record<string, string>;
    optional: boolean;
}
/** Callback that executes a tool by name with given params. Injected by chain-executor caller. */
export type ToolRunner = (tool: string, params: Record<string, unknown>) => Promise<ToolResult>;
//# sourceMappingURL=execution.d.ts.map