/** * Trigger Cooldown Tracker — PRI-363 * * Manages cooldown state for trigger controller decisions. * * This is a plugin-layer concern because: * - Core (trigger-controller) is stateless and pure * - Cooldown state needs to persist across tool calls * - The map is scoped to the plugin's lifecycle * * EP-05: Loop State Freshness — each check reads fresh state from the map. * ERR-001: No `as` casts on map access. * ERR-002: Every rejected decision includes reason + nextAction. */ /** * Check whether cooldown is currently active for a given episode. */ export declare function isCooldownActive(source: string, sessionId: string | undefined, errorHash: string | undefined, cooldownMap: ReadonlyMap): boolean; /** * Mark an episode as diagnosed (set cooldown timestamp). */ export declare function markEpisodeAsDiagnosed(source: string, sessionId: string | undefined, errorHash: string | undefined, cooldownMap: Map): void; /** * Clear all cooldown state (for tests). */ export declare function clearCooldownState(cooldownMap: Map): void; /** * Get the cooldown timestamp for a given episode (for tests). */ export declare function getCooldownTimestamp(source: string, sessionId: string | undefined, errorHash: string | undefined, cooldownMap: ReadonlyMap): number | undefined; /** * Check whether cooldown is currently active using the shared Map. */ export declare function isSharedCooldownActive(source: string, sessionId: string | undefined, errorHash: string | undefined): boolean; /** * Mark an episode as diagnosed using the shared Map. */ export declare function markSharedEpisodeAsDiagnosed(source: string, sessionId: string | undefined, errorHash: string | undefined): void; /** * Clear all shared cooldown state (for tests). */ export declare function resetSharedCooldownForTest(): void;