import { CatalogIndex } from "./build.js"; import { DecomposedCatalog } from "./decomposed-catalog.js"; import { type PolicyContextJs, type PolicyOptions } from "./native.js"; import { PolicyContext } from "./policies.js"; import { type JsonRecord } from "./types.js"; export type { PolicyOptions, PolicyContextJs }; export type { JsonRecord }; export { DecomposedCatalog }; export declare function loadCatalog(dirPath: string): { md: JsonRecord[]; json: JsonRecord[]; tools: JsonRecord[]; }; /** Catalog dict shape produced by {@link loadCatalog} and rerank survivors output. */ export interface DecomposedCatalogDict { json: JsonRecord[]; md: JsonRecord[]; } export interface RemovedChunksOptions { /** When true, json entries in `surviving` with score <= decomposed threshold count as removed. */ applyDecomposedScoreFilter?: boolean; } /** Normalized identity for a catalog chunk (`json` or `md` array item). */ export declare function chunkSurvivorKey(item: JsonRecord, section: "json" | "md"): string | null; /** * Decomposed chunks in `fullCatalog` that are not in `surviving` (same shape as survivors.json). */ export declare function removedChunks(fullCatalog: DecomposedCatalogDict, surviving: DecomposedCatalogDict, options?: RemovedChunksOptions): DecomposedCatalogDict; /** Resolve build catalog JSON from catalog index or decomposed catalog + survivor data. */ export declare function resolveBuildCatalog(catalog: JsonRecord, survivorData: JsonRecord): JsonRecord; /** Count tools in a catalog dict (alias for catalog tool count on survivor data). */ export declare function retrieveCatalogToolCount(data: JsonRecord): number; export interface RetrieveCoreOptions { applyDecomposedScoreFilter?: boolean; policyOptions?: PolicyOptions | null; } /** Low-level retrieve over survivor json files (same core as Go/C ``cyt_retrieve_core``). */ export declare function retrieveCore(data: JsonRecord, storeJsonFiles: Record, survivorJsonFiles: Record, options?: RetrieveCoreOptions): JsonRecord[]; export interface RetrieveToolsOptions { catalog: DecomposedCatalog | CatalogIndex; applyDecomposedScoreFilter?: boolean; preserveValues?: Iterable | null; ctx?: InstanceType | PolicyContextJs | null; /** @deprecated Use ctx; kept for low-level retrieve_core passthrough */ policyOptions?: PolicyOptions | null; } export declare function retrieveTools(data: unknown, options: RetrieveToolsOptions): JsonRecord[]; //# sourceMappingURL=retrieve.d.ts.map