import type { ScanResult, ScannerId } from "../types.js"; /** Payload emitted immediately before one scanner execution attempt starts. */ export interface ScannerRunStart { address: string; scannerId: ScannerId; timestamp: number; } /** Optional lifecycle callbacks emitted by the engine around each run attempt. */ export interface ScannerEngineLifecycle { /** * Fires once per execution attempt before any early-exit or scanner work begins. * This callback should be treated as observational and must not throw. */ onRunStart?: (event: ScannerRunStart) => void; /** * Fires exactly once per execution attempt with the terminal run result. * This callback receives successful, skipped, disabled, halted, and error results. * * `startedAt` is the run's OWN start (the timestamp its `onRunStart` carried), threaded through * the engine with the run rather than looked up by (address, scannerId). Absent when no run * started: a pre-run guard exit (disabled/overlap), or a result recorded out of band. That * distinction is what keeps a duration derived from it honest — a guard exit that shared a * per-scanner lookup would report the elapsed time of the run still in flight as its own. */ onRunResult?: (result: ScanResult, startedAt?: number) => void; } //# sourceMappingURL=lifecycle.d.ts.map