/**
 * US Sync Throttle Manager
 *
 * Prevents excessive US sync operations by implementing a 60-second throttle window.
 * Tracks last sync time per increment to avoid spamming external tools (GitHub/JIRA/ADO).
 *
 * Architecture (v0.26.1):
 * - Safe now that fs.writeFile() confirmed to NOT trigger Claude Code hooks
 * - Allows restoration of automatic US sync while preventing spam
 * - Part of long-term fix to restore seamless UX (ADR-0129)
 *
 * Usage:
 * ```typescript
 * const throttle = USSyncThrottle.getInstance();
 *
 * if (throttle.shouldSkipSync(incrementId)) {
 *   logger.log('⏭️  US sync throttled (last sync < 60s ago)');
 *   return;
 * }
 *
 * // Perform sync...
 * throttle.recordSync(incrementId);
 * ```
 *
 * See:
 * - Test results: FS-WRITEFILE-HOOK-TEST-RESULTS-2025-11-24.md
 * - ADR-0129: US Sync Guard Rails (long-term fix strategy)
 */
export interface ThrottleState {
    incrementId: string;
    lastSyncTime: number;
    syncCount: number;
}
export interface ThrottleConfig {
    /** Minimum time between syncs in milliseconds (default: 60000ms = 60s) */
    throttleWindowMs?: number;
    /** Project root directory */
    projectRoot: string;
}
/**
 * Singleton throttle manager for US sync operations
 */
export declare class USSyncThrottle {
    private static instance;
    private throttleWindowMs;
    private projectRoot;
    private stateFile;
    private constructor();
    /**
     * Get singleton instance
     *
     * @param config - Configuration (required for first call)
     * @returns Throttle manager instance
     */
    static getInstance(config?: ThrottleConfig): USSyncThrottle;
    /**
     * Reset singleton instance (for testing)
     */
    static resetInstance(): void;
    /**
     * Check if sync should be skipped due to throttling
     *
     * @param incrementId - Increment ID (e.g., "0053-safe-feature-deletion")
     * @returns true if sync should be skipped (throttled), false if sync allowed
     */
    shouldSkipSync(incrementId: string): boolean;
    /**
     * Record a sync operation
     *
     * @param incrementId - Increment ID
     */
    recordSync(incrementId: string): void;
    /**
     * Get last sync time for an increment
     *
     * @param incrementId - Increment ID
     * @returns Last sync timestamp (ms since epoch) or null if never synced
     */
    getLastSyncTime(incrementId: string): number | null;
    /**
     * Get time since last sync
     *
     * @param incrementId - Increment ID
     * @returns Milliseconds since last sync, or Infinity if never synced
     */
    getTimeSinceLastSync(incrementId: string): number;
    /**
     * Get sync count for an increment
     *
     * @param incrementId - Increment ID
     * @returns Number of times synced
     */
    getSyncCount(incrementId: string): number;
    /**
     * Clear throttle state for an increment
     *
     * @param incrementId - Increment ID
     */
    clearThrottle(incrementId: string): void;
    /**
     * Clear all throttle state
     */
    clearAllThrottles(): void;
    /**
     * Load throttle state from disk
     */
    private loadState;
    /**
     * Save throttle state to disk
     */
    private saveState;
}
//# sourceMappingURL=us-sync-throttle.d.ts.map