/**
 * Gate Handler for MSSCI-12085
 *
 * Unifies gate detection from three sources:
 * 1. Workflow YAML: gates.after_steps array
 * 2. Step-meta: gate: true field
 * 3. Content marker: <!-- GATE --> in step content
 *
 * Also handles gate prompt extraction and decision recording.
 */
/**
 * Information about a detected gate
 */
export interface GateInfo {
    /** Whether this step has a gate */
    isGate: boolean;
    /** Source that triggered the gate (null if no gate) */
    source: 'workflow' | 'step-meta' | 'marker' | null;
    /** Gate prompt text to display to user */
    prompt?: string;
    /** Step number for tracking */
    stepNumber: number;
}
/**
 * Parameters for gate detection
 */
export interface DetectGateParams {
    /** Current step number */
    stepNumber: number;
    /** Steps with gates from workflow.gates.after_steps */
    afterSteps?: number[];
    /** Step metadata from <step-meta> block */
    stepMeta?: Record<string, unknown>;
    /** Step content (markdown) */
    stepContent: string;
}
/**
 * A recorded gate decision
 */
export interface GateDecision {
    /** Step number where decision was made */
    step: number;
    /** User's choice */
    choice: 'continue' | 'revise';
    /** ISO timestamp of decision */
    timestamp: string;
    /** Optional notes from user */
    notes?: string;
}
/**
 * Detect if a step has a gate from any of the three sources
 *
 * Priority (for source reporting): workflow > step-meta > marker
 * Logic: OR - any source triggers a gate
 *
 * @param params - Detection parameters
 * @returns GateInfo with detection result
 */
export declare function detectGate(params: DetectGateParams): GateInfo;
/**
 * Extract gate prompt from step content or metadata
 *
 * Priority: ## Gate Prompt section > step-meta gate_prompt > default
 *
 * @param content - Step markdown content
 * @param meta - Optional step metadata
 * @returns Gate prompt text
 */
export declare function extractGatePrompt(content: string, meta?: Record<string, unknown>): string;
/**
 * Record a gate decision to session file content
 *
 * Adds or updates the ## Gate Decisions section with a markdown table
 *
 * @param sessionContent - Current session file content
 * @param decision - Gate decision to record
 * @returns Updated session content
 */
export declare function recordGateDecision(sessionContent: string, decision: GateDecision): string;
/**
 * Parse existing gate decisions from session file
 *
 * @param sessionContent - Session file content
 * @returns Array of gate decisions
 */
export declare function parseGateDecisions(sessionContent: string): GateDecision[];
/**
 * Format gate decisions as markdown table
 *
 * @param decisions - Array of gate decisions
 * @returns Markdown table string
 */
export declare function formatGateDecisions(decisions: GateDecision[]): string;
//# sourceMappingURL=gate-handler.d.ts.map