import type { TemperatureReading } from "./types.js"; /** Options for configuring stall detection sensitivity. */ export interface StallOptions { /** Maximum temperature variance (in degrees) to consider a stall. Default: 2. */ thresholdDegrees?: number; /** Minimum duration (in minutes) of low variance to qualify as a stall. Default: 30. */ durationMinutes?: number; } /** Result of stall detection analysis. */ export interface StallResult { /** Whether the readings indicate an active stall. */ isStalling: boolean; /** ISO timestamp of when the stall began, or null if not stalling. */ stallStart: string | null; /** Duration of the stall in minutes (0 if not stalling). */ stallDuration: number; /** Average temperature during the stall window, or null if not stalling. */ avgTemp: number | null; } /** * Analyze a series of temperature readings to detect a stall (plateau). * * A stall is identified when the temperature varies by less than * `thresholdDegrees` over a trailing window of at least `durationMinutes`. * Readings must be sorted chronologically (oldest first). */ export declare function detectStall(readings: TemperatureReading[], options?: StallOptions): StallResult; /** Options for configuring rapid change detection sensitivity. */ export interface RapidChangeOptions { /** Rate threshold in degrees per 5 minutes. Default: 5. */ rateThreshold?: number; } /** Result of rapid change detection analysis. */ export interface RapidChangeResult { /** Whether the recent rate of change exceeds the threshold. */ isRapid: boolean; /** Direction of the rapid change, or null if not rapid. */ direction: "rising" | "falling" | null; /** Current rate of change in degrees per 5 minutes. */ rate: number; } /** * Analyze recent temperature readings to detect rapid changes. * * Computes the rate of change between the two most recent readings, * normalized to degrees per 5 minutes. If only one or zero readings * are provided, returns a zero-rate result. */ export declare function detectRapidChange(readings: TemperatureReading[], options?: RapidChangeOptions): RapidChangeResult; //# sourceMappingURL=stall-detection.d.ts.map