import type { Hash, Store, Tag } from "./types.js"; import type { Variable } from "./variable.js"; /** * Result of a closure computation: the set of CAS hashes reachable from a * set of roots, along with the variables and tags that point into the * closure. */ export type ClosureResult = { /** All CAS node hashes reachable from the roots. */ nodes: Set; /** Variables whose value is in the closure (excluding orphaned vars). */ vars: Variable[]; /** Tags grouped by their target hash (only targets in the closure). */ tags: Map; }; /** * Compute the transitive closure starting from a set of root CAS hashes. * * The closure is a self-contained subset of a Store: every node it points * at via `ocas_ref` fields, every schema it depends on (the meta-schema * chain), and every template variable referencing a schema in the closure * is included. * * Variables that point at hashes in the closure (after node and template * walks) are returned. Tags whose target is in the closure are returned. * * Roots that do not exist in the store are silently skipped — callers * (e.g. `exportBundle`) should validate roots beforehand if strictness is * required. */ export declare function computeClosure(store: Store, roots: Hash[]): ClosureResult; //# sourceMappingURL=closure.d.ts.map