/**
 * Grounding-bundle assembly (mmnto-ai/totem#2101, strategy#474 slice 2).
 *
 * The bundle is the per-item provenance record for everything the
 * deterministic layer DELIVERED into a run's prompt: each item names what it
 * is (`sourceType` + `filePath` + optional `sourceRepo`), what it contained
 * (`contentHash` — identity, never bytes), and HOW it was obtained
 * (`provenance` class). The first cut wraps similarity retrieval honestly as
 * `similarity-only`; structural resolvers (mmnto-ai/totem#344/#375) graduate items to
 * `structurally-verified` by supplying them explicitly — this builder can
 * never upgrade a class on its own (honest-absent: nothing upgrades
 * provenance silently).
 *
 * Assembly is caller-side (the deterministic layer) — providers stay dumb
 * pipes. The bundle is what `grounding.hash` attests, so it must be a pure
 * function of the logical item set: items are canonically sorted here because
 * retrieval order is score-dependent and `calculateDeterministicHash` is
 * order-significant for arrays.
 */
import { type GroundingBundle } from './schema.js';
/**
 * One retrieved evidence item as the caller holds it — the `result` shape is
 * the identity-relevant subset of `SearchResult`, kept structural so callers
 * and tests don't need a full store hit to build one.
 */
export interface GroundingSourceItem {
    /** Retrieval partition the item entered the prompt under (`spec` | `session_log` | `code` | `lesson`). */
    sourceType: string;
    result: {
        content: string;
        filePath: string;
        /** Linked-index name for cross-repo hits; absent = the run's own repo (strategy review F1 on mmnto-ai/totem#2101). */
        sourceRepo?: string | undefined;
    };
}
/**
 * Map retrieved items into a canonical grounding bundle. Every input item is
 * included — duplicates are delivery records, not noise (the bundle records
 * what entered the prompt, and a snippet delivered twice was delivered
 * twice). All items are classed `similarity-only`: this is the first-cut
 * wrapper around the existing retrieval, and the ONLY class this builder can
 * emit by construction.
 */
export declare function buildGroundingBundle(items: GroundingSourceItem[]): GroundingBundle;
/**
 * Derive the artifact's `provenanceSummary` from the bundle — never asserted
 * wholesale (derive-or-couple: a stored summary is a mirror that can drift
 * from `items`). Sorted class-count string (`similarity-only:14`,
 * `compiled-rule:1,similarity-only:2`) so the eval harness can threshold on
 * it deterministically; zero items → `'ungrounded'` (abstention named, not
 * silent — Tenet 14 honest-absent).
 */
export declare function summarizeProvenance(bundle: GroundingBundle): string;
//# sourceMappingURL=grounding.d.ts.map