/**
 * Azure DevOps Reconciler (NEW in v0.33.0)
 *
 * Reconciles ADO work item states with increment metadata.json statuses.
 * Fixes drift between local SpecWeave state and ADO:
 * - Closes work items for completed increments that are still active
 * - Reactivates work items for in-progress increments that are closed
 *
 * Mirrors the GitHub reconciler pattern for consistency.
 *
 * Triggered by:
 * - sw:ado-reconcile command (manual)
 * - SessionStart hook (automatic, if configured)
 * - post-increment-status-change.sh (on resume/abandon)
 */
import { Logger } from '../utils/logger.js';
export interface AdoReconcileOptions {
    projectRoot: string;
    dryRun?: boolean;
    logger?: Logger;
}
export interface IncrementAdoState {
    incrementId: string;
    incrementPath: string;
    metadataStatus: string;
    featureId?: string;
    workItem?: {
        id: number;
        url?: string;
    };
    userStoryWorkItems: Array<{
        userStoryId: string;
        workItemId: number;
    }>;
}
export interface AdoReconcileResult {
    scanned: number;
    mismatches: number;
    closed: number;
    reopened: number;
    errors: string[];
    details: Array<{
        incrementId: string;
        action: 'close' | 'reopen' | 'skip' | 'error';
        workItemId: number;
        reason: string;
    }>;
}
export declare class AdoReconciler {
    private projectRoot;
    private dryRun;
    private logger;
    private configManager;
    constructor(options: AdoReconcileOptions);
    /**
     * Main reconciliation entry point
     */
    reconcile(): Promise<AdoReconcileResult>;
    /**
     * Reconcile a single increment
     */
    private reconcileIncrement;
    /**
     * Reconcile a single work item
     */
    private reconcileWorkItem;
    /**
     * Scan increments directory for non-archived increments
     */
    private scanIncrements;
    /**
     * Load config.json
     */
    private loadConfig;
    /**
     * Check if ADO credentials are configured
     */
    private hasAdoCredentials;
    /**
     * Get work item from ADO API
     * Reads secrets (PAT) from process.env
     * Reads config (organization) from ConfigManager (config.json)
     */
    private getWorkItem;
    /**
     * Update work item state in ADO
     * Reads secrets (PAT) from process.env
     * Reads config (organization) from ConfigManager (config.json)
     */
    private updateWorkItemState;
}
/**
 * Convenience function for quick reconciliation
 */
export declare function reconcileAdo(projectRoot?: string, dryRun?: boolean): Promise<AdoReconcileResult>;
export default AdoReconciler;
//# sourceMappingURL=ado-reconciler.d.ts.map