import type * as HydraDB from "../index.js"; /** * AppSearchFusion is the diagnostic block of the query_apps fusion * (PRO-1882): per-chunk lane attribution and counts. Present only when * query_apps was on, the request was not ACL-scoped, and attributed chunks * survived final filtering. Identifier maps cover only returned chunks. */ export interface SearchAppSearchFusionDiagnostics { /** * AppRecipes maps the chunk_uuid of each final chunk the app lane returned to * the recipe that produced it (exact_id, recall, dated, bm25, broad, ...), * including chunks the normal lane also had, so a consensus can be * attributed to a recipe. */ appRecipes?: Record; /** * ChunkOrigins maps every returned chunk_uuid to where the fusion placed it * from: "normal" (normal lane only), "both" (both lanes, normal position * kept), "exact_id" (promoted from the app lane's exact-identifier * recipe), "app_tail" (appended from the app lane). */ chunkOrigins?: Record; /** Counts for the first or only fusion pass before postprocessing, not final response counts or totals across alias alternatives. The entire diagnostic block is omitted for ACL-scoped requests. */ stats?: HydraDB.SearchAppSearchFusionStats; /** * StatsByPass preserves each independent fusion's accounting when results * combine multiple passes, in merge order (original before alternate when * both have diagnostics). Counts overlap; they are not unique totals. */ statsByPass?: HydraDB.SearchAppSearchFusionStats[]; }