import type { PersistencePolicy } from "../scanner-definition.js"; import type { ScanResult, ScannerScanOutput, ScanStatus, ScannerId, Signal } from "../types.js"; import type { ScanContext } from "../protocol/context.js"; import type { StrategyScannerRegistration } from "./strategy-registry.js"; /** * Builds a normalized ScanResult from raw scanner output. * Handles signal normalization, score enforcement, and actionability checks. */ export declare function buildRunResult(entry: StrategyScannerRegistration, context: ScanContext, output: ScannerScanOutput, now: () => number, logger?: { warn?: (message: string, meta?: Record) => void; }): ScanResult; /** * Builds a normalized `ScanResult` for a validated external ingest. * * External scanners bypass `scanner.scan()` because the caller already * provides the signal payload. This helper keeps score clamping, signal * normalization, and terminal result shape aligned with scheduled runs without * inventing a parallel persistence format. */ export declare function buildExternalIngestResult(entry: StrategyScannerRegistration, params: { timestamp: number; signals: Signal[]; scannedCount: number; summary: Record; }, now: () => number, logger?: { warn?: (message: string, meta?: Record) => void; }): ScanResult; /** Determines whether a scan result should be persisted based on the scanner's persistence policy. */ export declare function shouldPersist(policy: PersistencePolicy, result: ScanResult): boolean; /** Constructs a ScanResult with default values for optional fields. */ export declare function buildResult(params: { address: string; scannerId: ScannerId; timestamp: number; status: ScanStatus; signals?: Signal[]; actionableCount?: number; scannedCount?: number; reason?: string; summary: Record; }): ScanResult; export declare function coerceTimestamp(value: number, fallback: number): number; export declare function coerceCount(value: number, fallback: number): number; export declare function formatError(error: unknown): string; export declare function isRecord(value: unknown): value is Record; //# sourceMappingURL=result-builder.d.ts.map