/** * Sync Throttle * * Shared throttle utility that prevents multiple sync trigger paths * (status-change-sync-trigger, sync-progress, auto-create-external-issue) * from firing redundantly for the same increment within a configurable window. * * Backed by file state at `.specweave/state/sync-throttle.json`. * * Usage: * ```typescript * const throttle = new SyncThrottle(projectRoot); * * if (throttle.shouldSkip(incrementId)) { * return; // another trigger already fired recently * } * * // ... perform sync ... * throttle.record(incrementId); * ``` * * @see AC-US3-02, AC-US3-03, AC-US3-04 */ export declare class SyncThrottle { private readonly stateFile; private readonly windowMs; /** * @param projectRoot - Project root directory * @param windowMs - Throttle window in milliseconds (default 5000ms) */ constructor(projectRoot: string, windowMs?: number); /** * Check whether a sync for the given key should be skipped. * * @param key - Deduplication key (typically increment ID) * @param forceBypass - When true, always returns false (never skip) * @returns true if the caller should skip the sync (throttled) */ shouldSkip(key: string, forceBypass?: boolean): boolean; /** * Record that a sync was just performed for the given key. * * @param key - Deduplication key (typically increment ID) */ record(key: string): void; private loadState; private saveState; } //# sourceMappingURL=sync-throttle.d.ts.map