/**
 * JIRA Reconciler (NEW in v0.33.0)
 *
 * Reconciles JIRA issue states with increment metadata.json statuses.
 * Fixes drift between local SpecWeave state and JIRA:
 * - Closes issues for completed increments that are still open
 * - Reopens issues for in-progress increments that are closed
 *
 * Mirrors the GitHub reconciler pattern for consistency.
 *
 * Triggered by:
 * - sw:jira-reconcile command (manual)
 * - SessionStart hook (automatic, if configured)
 * - post-increment-status-change.sh (on resume/abandon)
 */
import { Logger } from '../utils/logger.js';
export interface JiraReconcileOptions {
    projectRoot: string;
    dryRun?: boolean;
    logger?: Logger;
}
export interface IncrementJiraState {
    incrementId: string;
    incrementPath: string;
    metadataStatus: string;
    featureId?: string;
    issue?: {
        key: string;
        url?: string;
    };
    userStoryIssues: Array<{
        userStoryId: string;
        issueKey: string;
    }>;
}
export interface JiraReconcileResult {
    scanned: number;
    mismatches: number;
    closed: number;
    reopened: number;
    errors: string[];
    details: Array<{
        incrementId: string;
        action: 'close' | 'reopen' | 'skip' | 'error';
        issueKey: string;
        reason: string;
    }>;
}
export declare class JiraReconciler {
    private projectRoot;
    private dryRun;
    private logger;
    private configManager;
    private domain;
    private auth;
    constructor(options: JiraReconcileOptions);
    /**
     * Main reconciliation entry point
     */
    reconcile(): Promise<JiraReconcileResult>;
    /**
     * Reconcile a single increment
     */
    private reconcileIncrement;
    /**
     * Reconcile a single issue
     */
    private reconcileIssue;
    /**
     * Scan increments directory for non-archived increments
     */
    private scanIncrements;
    /**
     * Load config.json
     */
    private loadConfig;
    /**
     * Initialize JIRA credentials
     * Reads secrets (token, email) from process.env
     * Reads config (domain) from ConfigManager (config.json)
     */
    private initCredentials;
    /**
     * Get issue from JIRA API
     */
    private getIssue;
    /**
     * Get available transitions for an issue
     */
    private getTransitions;
    /**
     * Transition issue to new status and add comment
     */
    private transitionIssue;
    /**
     * Execute transition
     */
    private doTransition;
    /**
     * Add comment to issue
     */
    private addComment;
}
/**
 * Convenience function for quick reconciliation
 */
export declare function reconcileJira(projectRoot?: string, dryRun?: boolean): Promise<JiraReconcileResult>;
export default JiraReconciler;
//# sourceMappingURL=jira-reconciler.d.ts.map