import { type DomainRecord } from "./domain-db.js"; export declare const DEFAULT_MAX_KEYS = 5000; export type TierSlotName = "tier1" | "tier2" | "tier3" | "tier4" | "github"; export interface EnumerateOptions { maxKeys?: number; } export interface EnumerateResult { records: DomainRecord[]; truncated: boolean; } export interface TierAggregate { attempts: number; ok: number; fail: number; success_rate: number | null; } export interface FailingDomain { domain: string; attempts: number; ok: number; success_rate: number; } export interface DomainAggregate { domains_tracked: number; seen_never_fetched: number; tiers: Record; failing_count: number; top_failing: FailingDomain[]; truncated: boolean; } /** * Enumerate current-schema domain records via a bounded, cursor-based SCAN. * Stops once `maxKeys` keys have been collected and flags `truncated`. Stale or * malformed records are silently dropped (parseDomainRecord gate). */ export declare function enumerateDomains(opts?: EnumerateOptions): Promise; /** * Aggregate a set of domain records into per-tier totals, tracked/seen counts, * and a top-failing list. Pure and synchronous — the caller owns enumeration, * so this is trivially testable and reused by both the tool and the job. */ export declare function aggregateDomainStats(records: DomainRecord[], truncated?: boolean, now?: number): DomainAggregate; export interface SingleDomainSummary { domain: string; first_seen: string; last_fetch: string; preferred_strategy: string | null; tiers: Record; capabilities: { llms_full_txt: boolean; robots_allows_us: boolean | null; metadata_fetch_rate: number | null; seen_in_search: number; }; } /** * Reduce a full DomainRecord to the compact, agent-consumable shape returned as * `structuredContent` — per-tier success rates plus the capability flags an * agent would threshold on, without the internal window bookkeeping. */ export declare function summarizeDomainRecord(record: DomainRecord, now?: number): SingleDomainSummary; /** * Human-readable tier-stats + capabilities block for one domain. Shared by the * dump-domain CLI and the domain_stats tool's text `content`. */ export declare function formatDomainRecord(record: DomainRecord, now?: number): string; /** * Human-readable rendering of an aggregate across the whole domain-db. Shared by * the domain_stats tool's text `content` and available to the maintenance job. */ export declare function formatDomainAggregate(agg: DomainAggregate): string;