import type { Intent } from '../../common/types.js';
/**
 * Get the execution planner tracer
 */
export declare function getTracer(): import("@opentelemetry/api").Tracer;
/**
 * Span attribute names for execution planner operations
 */
export declare const PlannerAttributes: {
    readonly PLAN_ID: "plan.id";
    readonly INTENT_ID: "intent.id";
    readonly STEP_COUNT: "plan.step_count";
    readonly ESTIMATED_DURATION: "plan.estimated_duration_ms";
    readonly HAS_ROLLBACK: "plan.has_rollback";
    readonly TEMPLATE_NAME: "plan.template";
};
/**
 * Failure handling strategy for a step
 */
export type OnFailureStrategy = 'abort' | 'rollback' | 'continue' | 'retry' | 'skip';
/**
 * Execution step definition
 */
export interface ExecutionStep {
    /** Unique step identifier */
    id: string;
    /** Human-readable name */
    name: string;
    /** Action type to execute */
    action: string;
    /** Action parameters */
    params: Record<string, unknown>;
    /** Timeout in milliseconds */
    timeout: number;
    /** Number of retries on failure */
    retries: number;
    /** Strategy on failure */
    onFailure: OnFailureStrategy;
    /** Optional description */
    description?: string;
    /** Estimated duration in milliseconds */
    estimatedDuration?: number;
    /** Whether this step is critical (affects rollback behavior) */
    critical?: boolean;
}
/**
 * Execution plan
 */
export interface ExecutionPlan {
    /** Unique plan identifier */
    id: string;
    /** Intent this plan is for */
    intentId: string;
    /** Ordered execution steps */
    steps: ExecutionStep[];
    /** Step dependencies (step ID -> dependent step IDs) */
    dependencies: Record<string, string[]>;
    /** Total estimated duration in milliseconds */
    estimatedDuration: number;
    /** Rollback steps (in reverse order) */
    rollbackSteps: ExecutionStep[];
    /** Creation timestamp */
    createdAt: string;
    /** Plan metadata */
    metadata?: Record<string, unknown>;
}
/**
 * Options for plan creation
 */
export interface CreatePlanOptions {
    /** Use a specific template */
    template?: string;
    /** Custom timeout multiplier */
    timeoutMultiplier?: number;
    /** Skip rollback planning */
    skipRollback?: boolean;
    /** Additional metadata to include */
    metadata?: Record<string, unknown>;
}
/**
 * ExecutionPlanner - Creates execution plans for intents
 */
export declare class ExecutionPlanner {
    private dependencyResolver;
    private rollbackPlanner;
    constructor();
    /**
     * Create an execution plan for an intent
     */
    createPlan(intent: Intent, options?: CreatePlanOptions): Promise<ExecutionPlan>;
    /**
     * Internal plan creation logic
     */
    private createPlanInternal;
    /**
     * Create steps from a template
     */
    private createFromTemplate;
    /**
     * Convert a template step to an execution step
     */
    private templateStepToExecutionStep;
    /**
     * Infer execution steps from intent
     */
    private inferStepsFromIntent;
    /**
     * Resolve parameter placeholders from intent context
     */
    private resolveParams;
    /**
     * Resolve a dotted path from intent
     */
    private resolvePath;
    /**
     * Calculate estimated duration considering parallel execution
     */
    private calculateEstimatedDuration;
    /**
     * Validate a plan structure
     */
    validatePlan(plan: ExecutionPlan): ValidationResult;
    /**
     * Create an empty plan (edge case handling)
     */
    createEmptyPlan(intentId: string): ExecutionPlan;
}
/**
 * Validation result
 */
export interface ValidationResult {
    valid: boolean;
    errors: string[];
    warnings: string[];
}
/**
 * Planner error
 */
export declare class PlannerError extends Error {
    code: string;
    details?: Record<string, unknown>;
    constructor(message: string, code: string, details?: Record<string, unknown>);
}
/**
 * Create a new execution planner instance
 */
export declare function createExecutionPlanner(): ExecutionPlanner;
export { DependencyResolver, CircularDependencyError } from './dependency.js';
export { RollbackPlanner } from './rollback.js';
export { getTemplate, registerTemplate, listTemplates, composeTemplates, type ExecutionTemplate, type TemplateStep, } from './templates.js';
//# sourceMappingURL=index.d.ts.map