/**
 * Azure DevOps Status Sync
 *
 * Synchronizes SpecWeave increment statuses with ADO work item states.
 *
 * ADO Work Item State Updates:
 * - Uses JSON Patch format for updates
 * - System.State field controls work item state
 * - Available states: New, Active, On Hold, Resolved, Closed, Removed
 *
 * @module ado-status-sync
 */
import { SyncCircuitBreaker } from '../../../../../src/core/increment/sync-circuit-breaker.js';
/**
 * External status representation (ADO-specific)
 */
export interface ExternalStatus {
    state: string;
    tags?: string[];
}
/**
 * Azure DevOps Status Sync
 *
 * Handles status synchronization with ADO work items.
 * Integrates circuit breaker (opens after 3 consecutive failures)
 * and retry with exponential backoff for transient errors.
 */
export declare class AdoStatusSync {
    private client;
    private organization;
    private project;
    private breaker;
    constructor(organization: string, project: string, personalAccessToken: string, breaker?: SyncCircuitBreaker);
    /**
     * Get current status from ADO work item
     *
     * @param workItemId - ADO work item ID (e.g., 123)
     * @returns Current work item state
     */
    getStatus(workItemId: number): Promise<ExternalStatus>;
    /**
     * Update ADO work item state and tags
     *
     * Uses JSON Patch format to update System.State and System.Tags fields.
     * Tags are appended to existing tags, not replaced.
     *
     * @param workItemId - ADO work item ID (e.g., 123)
     * @param status - Desired status with state and optional tags
     */
    updateStatus(workItemId: number, status: ExternalStatus): Promise<void>;
    /**
     * Check whether the circuit is closed (sync allowed).
     */
    canSync(): boolean;
    /**
     * Get current tags from ADO work item
     *
     * @param workItemId - ADO work item ID
     * @returns Array of current tags
     */
    private getCurrentTags;
    /**
     * Post comment about status change to ADO work item
     *
     * @param workItemId - ADO work item ID (e.g., 123)
     * @param oldStatus - Previous SpecWeave status
     * @param newStatus - New SpecWeave status
     */
    postStatusComment(workItemId: number, oldStatus: string, newStatus: string): Promise<void>;
    /**
     * Assert the circuit is closed. Throws CircuitOpenError if open.
     */
    private assertCircuitClosed;
    /**
     * Wrap an async operation with retry + circuit breaker recording.
     */
    private withResilienceWrapper;
}
//# sourceMappingURL=ado-status-sync.d.ts.map