/** * Pain Diagnostic Gate — PRI-446 thin adapter * * @deprecated PRI-454 — Gate A (PainDiagnosticGate) is superseded by Gate B * (TriggerController + EvidenceTriage). Do not add new callers. New admission * logic must use `evaluateTriggerController` from runtime-v2/evidence-triage. * * Reality note (PRI-763, 2026-09-12): the `painEvidenceAdmission` / * `painEvidenceAdmissionDefault` flags were RETIRED and REMOVED from the * registry (PRI-763) — they never re-activated this module and had zero * executable consumers (PRI-651-B1 / PRI-752 / PRI-762). Gate B * (TriggerController) is the only admission authority. This adapter keeps * ZERO production importers; only tests import it. The module itself is left * archived (Phase 5 discipline: core export surface and plugin shim are not * removed in the flag-contract PR — retirement of this module is a separate * Owner decision). * * The pure decision logic (threshold tree, cooldown comparison, episode-key * construction) now lives in principles-core * (runtime-v2/pain-gate/pain-diagnostic-gate-policy.ts). This file is the * stateful adapter that owns: * - the cooldown Map (lastDiagnosedAtByEpisode) * - Date.now() injection * - SystemLogger for unknown-source telemetry * * It preserves the original export names (evaluatePainDiagnosticGate, * isCooldownActiveForEpisode, resetPainDiagnosticGateForTest) for the * remaining test consumers (auto-entry-gate, characterization, mocks). * * ERR checklist: * - ERR-011: this is a stateful adapter delegating to core pure logic. */ import { type PainDiagnosticSource, type PainDiagnosticGateReason, type PainDiagnosticGateInput, type PainDiagnosticGateDecision } from '@principles/core/runtime-v2'; export type { PainDiagnosticSource, PainDiagnosticGateReason, PainDiagnosticGateInput, PainDiagnosticGateDecision, }; export declare function resetPainDiagnosticGateForTest(): void; /** * Check whether cooldown is currently active for a given episode. * Used by the trigger controller (PEAT-B2) to align its cooldown decision * with the PainDiagnosticGate's cooldown state. */ export declare function isCooldownActiveForEpisode(source: string, sessionId: string | undefined, errorHash: string | undefined, cooldownMs?: number): boolean; /** * Evaluate the pain diagnostic gate. Delegates the pure decision to core and, * when the decision is to diagnose, records the current time against the * episode so subsequent calls within the cooldown window are suppressed. */ export declare function evaluatePainDiagnosticGate(input: PainDiagnosticGateInput): PainDiagnosticGateDecision;