import type { EventBusEvent, SpecStatusChangePayload, StatusChangeResult, DashboardRegenFn } from '../../../types/file-hooks.js';
import type { EventBus } from '../event-bus.js';
/**
 * Check if dashboard regen for the project is within rate limit.
 * Returns true if rate-limited (should skip), false if should proceed.
 */
export declare function isDashboardRateLimited(projectId: string, nowMs?: number): boolean;
/**
 * Record regen timestamp for a project.
 */
export declare function recordRegenTimestamp(projectId: string, nowMs?: number): void;
/**
 * Clear all regen timestamps (for testing).
 */
export declare function clearRegenTimestamps(): void;
/**
 * Extract and validate SpecStatusChangePayload from an EventBusEvent.
 * Returns null if payload is invalid or missing required fields.
 */
export declare function extractStatusChangePayload(event: EventBusEvent): SpecStatusChangePayload | null;
/**
 * Handle a spec:status-change event.
 * Regenerates the spec dashboard, rate-limited per project.
 */
export declare function handleStatusChange(event: EventBusEvent, regenFn: DashboardRegenFn): Promise<StatusChangeResult | null>;
/**
 * Emit a spec:status-change event on the event bus.
 */
export declare function emitSpecStatusChange(bus: EventBus, payload: SpecStatusChangePayload): EventBusEvent;
/**
 * Subscribe to spec:status-change events on the event bus.
 * Returns an unsubscribe function.
 */
export declare function subscribeStatusChangeHandler(bus: EventBus, regenFn: DashboardRegenFn): () => void;
//# sourceMappingURL=on-status-change.d.ts.map