/** * Localization probe for DISPATCHED_BLIND queries. * * In remote dispatch the coordinator's _DONE counters are structurally blind * (it fans work out to subqueries and scans nothing itself). But a SMALL ENOUGH * time window forces the coordinator to scan LOCALLY — and then its scanned / * matched / skippedSearch / skippedTemplate counters are precise. So to debug a * blind zero-result query, the MCP re-submits a narrowed window of the SAME * query and reads the local counts, which pinpoint the failing stage * (resolve vs bloom vs filter). * * `narrowWindow` derives that small window at the END of the original range, in * the same `now(...)` / epoch syntax the engine accepts, so the probe samples * the same index + the same predicate as the original query. */ /** Parse a `now()` / `now("-Nx")` bound to seconds-before-now. Returns null for * anything not in that relative form (e.g. an absolute epoch). */ export declare function nowOffsetSec(v: string): number | null; export interface TimeWindow { from: string; to: string; } /** * Derive a `windowSec`-wide window anchored at the END of [from, to], expressed * in the engine's accepted syntax. Returns null when neither bound is a * recognizable `now(...)` offset or epoch — callers should fall back to a fixed * recent window. * * narrowWindow('now("-2h")', 'now()', 60) -> { from: 'now("-60s")', to: 'now()' } * narrowWindow('now("-15m")', 'now("-10m")', 60) -> { from: 'now("-660s")', to: 'now("-600s")' } * narrowWindow('1781700000000','1781700300000',60)-> { from:'1781700240000', to:'1781700300000' } */ export declare function narrowWindow(from: string, to: string, windowSec?: number, skewSec?: number): TimeWindow | null; /** A safe recent window when the original bounds can't be parsed: a `windowSec` * slice ending `skewSec` ago (skew avoids the freshest, not-yet-indexed edge). */ export declare function recentFallbackWindow(windowSec?: number, skewSec?: number): TimeWindow;