/**
 * Team-Health-Watchdog (THW) — Pure Detection Rules (Layer 4)
 *
 * Pure functions: given a `TeamHealthSnapshot`, return per-team
 * `TeamHealthDetection` records. NO I/O. Mirrors the
 * `reconcile-rules.ts` ↔ `reconciler.service.ts` split.
 *
 * Rules:
 *   §B.2 — team_idle, team_pending, team_silent gates + verdict ladder
 *   §B.3 — false-positive guards (boot-grace, off-hours, thinking, stale)
 *   §B.4 — stale-trigger short-circuit (delegates to stale-trigger-detector)
 *   §B.5 — orphan-Request detection
 *   §B.6 (post-SEALED amendment) — lost-dispatch detection
 *
 * Layer-4 invariant (§A.1): READS the snapshot, EMITS detections.
 * NEVER mutates lower-layer state.
 *
 * @module services/team-health/team-health-detector
 */
import type { WorkItem, Request } from '../../types/v2/index.js';
import type { TeamHealthConfig, TeamHealthDetection, TeamHealthSnapshot } from './team-health-types.js';
/**
 * Compute one TeamHealthDetection per team in the snapshot.
 *
 * Order:
 *   1. Boot-grace (FP-1) — early return all-healthy.
 *   2. Stale-fire WorkItem set (§B.4).
 *   3. Lost-dispatch WorkItem set (§B.6 amendment).
 *   4. Orphan-Request set (§B.5).
 *   5. Per team: gates → tentative verdict.
 *   6. Cascade resolution (≥ 2 sibling teams stuck-eligible).
 *
 * @param snapshot - All inputs (now, teams, agents, work items, etc.)
 * @param config - Threshold + behavior config; defaults if omitted
 * @returns One detection per team in `snapshot.teams`, in input order
 */
export declare function detectTeamHealth(snapshot: TeamHealthSnapshot, config?: TeamHealthConfig): TeamHealthDetection[];
/**
 * Identify Requests with status open/in_progress, age > T1, zero matching
 * WorkItems (§B.5).
 */
export declare function detectOrphanRequests(requests: Request[], workItems: WorkItem[], now: Date, orphanT1Ms: number): {
    perTeamOrphans: Map<string, string[]>;
    systemTotal: number;
};
//# sourceMappingURL=team-health-detector.d.ts.map