import type { IntentRequest, ExecutionPlan, AttemptRecord, HealingDecision } from "../types";
export type LifecycleEventType = "intent-received" | "intent-routed" | "preconditions-checked" | "simulation-started" | "simulation-passed" | "execution-started" | "task-attempt" | "healing-applied" | "execution-complete" | "intent-success" | "intent-failed" | "intent-blocked";
export interface LifecycleEvent {
    type: LifecycleEventType;
    timestamp: string;
    intentId: string;
    phase: "init" | "plan" | "execute" | "heal" | "complete";
    data: Record<string, unknown>;
}
/**
 * Manages lifecycle event emission and tracking for intent execution
 */
export declare class LifecycleManager {
    private events;
    private listeners;
    /**
     * Register a listener for a specific event type
     */
    on(eventType: LifecycleEventType, handler: (event: LifecycleEvent) => void): void;
    /**
     * Emit a lifecycle event
     */
    emit(type: LifecycleEventType, intentId: string, phase: LifecycleEvent["phase"], data: Record<string, unknown>): void;
    /**
     * Get all recorded events
     */
    getEvents(): LifecycleEvent[];
    /**
     * Clear all events and listeners
     */
    reset(): void;
    /**
     * Get events for a specific intent
     */
    getIntentEvents(intentId: string): LifecycleEvent[];
}
/**
 * Helper to emit common lifecycle events
 */
export declare const createLifecycleHelpers: (manager: LifecycleManager) => {
    emitIntentReceived: (intentId: string, request: IntentRequest) => void;
    emitIntentRouted: (intentId: string, plan: ExecutionPlan) => void;
    emitPreconditionsChecked: (intentId: string, passed: boolean, failures?: string[]) => void;
    emitSimulationStarted: (intentId: string, plan: ExecutionPlan) => void;
    emitSimulationPassed: (intentId: string) => void;
    emitExecutionStarted: (intentId: string, plan: ExecutionPlan) => void;
    emitTaskAttempt: (intentId: string, record: AttemptRecord) => void;
    emitHealingApplied: (intentId: string, decision: HealingDecision, error: string) => void;
    emitExecutionComplete: (intentId: string, success: boolean) => void;
    emitIntentSuccess: (intentId: string, result: unknown) => void;
    emitIntentFailed: (intentId: string, error: unknown) => void;
    emitIntentBlocked: (intentId: string, reason: string) => void;
};
//# sourceMappingURL=lifecycle.d.ts.map