/**
 * KnowledgeGroundingEngine — the provider-neutral orchestrator.
 *
 * Loads the source set once at construction, reuses the process-level
 * in-memory index cache when possible, and runs one retrieval + context
 * assembly per eligible turn. The engine's snapshot is never reset after
 * construction — sources are supplied only via the constructor config.
 *
 * The engine never throws from `ground()` — any failure fails open to "no
 * grounding" with a `failureReason`, so an informational turn is never broken.
 * It performs no logging and no telemetry itself; the client wiring reads
 * `getStatus()`/the outcome metadata and emits spans.
 */
import type { KnowledgeEngineStatus, KnowledgeGroundingConfig, KnowledgeGroundingInput, KnowledgeGroundingOutcome } from "../types/index.js";
export declare class KnowledgeGroundingEngine {
    private readonly config;
    private readonly resolved;
    private snapshot;
    private buildPromise;
    private lastError;
    private validationIssues;
    private readonly now;
    constructor(config: KnowledgeGroundingConfig, now?: () => number);
    isEnabled(): boolean;
    /** Resolve once the one-time build settles. Safe to call before every turn. */
    ready(): Promise<void>;
    getStatus(): KnowledgeEngineStatus;
    private build;
    private buildRequest;
    /**
     * Retrieve + assemble for one turn. Returns the ephemeral context to inject
     * (or null), aggregate metadata, and the full retrieval. Never throws.
     */
    ground(input: KnowledgeGroundingInput): Promise<KnowledgeGroundingOutcome>;
}
