import { LicensePolicy } from "@mailwoman/license/policy"; import { BuildProfile, PriorOutput, type BuildCorpusOptions } from "#build/types"; import { type FileDerivation } from "#parquet/record"; import type { AdapterOptions, CorpusAdapter } from "#types"; import type { CountryHoldout } from "#utils/split"; /** * A build's options with every default applied. */ export interface ResolvedBuildSettings { synthesize: boolean; rowsPerFile: number; shuffleWindow: number; shuffleSeed: number; profile: BuildProfile; licensePolicy: LicensePolicy; excludeLicenses: readonly RegExp[]; priorOutput: PriorOutput; resume: boolean; } export declare function resolveCorpusSettings(opts: BuildCorpusOptions): ResolvedBuildSettings; /** * The build config every source's files are derived under. */ export declare function derivationConfig(settings: ResolvedBuildSettings, holdouts: Record): Record; /** * The extract hash of one adapter's rows: its options with its input replaced by the input's fingerprint. * * A base row's `source` is its adapter's id (the runner refuses any other), a synthesized * row keeps its ancestor's `source`, and the runner deduplicates within one adapter's run. * A source's files therefore read only that adapter's input. * * A street index enters as its file's fingerprint, because a rebuilt index at the * same path changes how the unit splitter reads a street. * * `outputDir` is left out: it locates an adapter's side state and doesn't change a row. * A partition's `rowRange` and `duckdb` limits are left out because a partitioned * run writes the bytes of one unpartitioned run. * * `trainShare` is left out because align applies it after the adapter, * so the adapter run stays reusable when it changes. * It enters the source's parquet derivation instead. */ export declare function adapterExtractHash(options: AdapterOptions): Promise; /** * The fingerprint of each data file that changes an aligned row, keyed by its role. * * The code hash follows module imports and so misses a file read at run time. * An edited source register or corpus-source input table changes a row's license, * so each one enters every source's derivation. */ export declare function alignDataFingerprints(): Promise>; /** * The keys {@linkcode regionCheckFingerprints} returns. * * A source record written before the region data left the derivation holds * them in its derivation's `alignData`. */ export declare const REGION_CHECK_INPUTS: readonly ["regionDatabase", "geonames", "secondLevelRegions"]; /** * The fingerprint of each file the component check's `region:unknown` rule reads, keyed by its role. * * The region data changes no row's bytes. * `region:unknown` is reported and never quarantines a row. * * The data changes only that rule's count, so it stays out of the derivation. * A source's record states the fingerprints beside the count. * * A build that reuses the source under other region data recounts the rule (`#build/region/recount`). * * An absent database records `absent`, because align then reads no region data. */ export declare function regionCheckFingerprints(): Promise>; /** * The derivation of each configured adapter's files, from one cruise of the module graph. * * A source's code hash covers the build pipeline (`lib/build.ts` and what it reaches) and the * adapter's own module graph, so an edit to one adapter changes only that adapter's files. */ export declare function adapterDerivations(adapters: readonly CorpusAdapter[], adapterInputs: Record, config: Record): Promise<((source: string) => Promise) & { modules: ReadonlyMap; }>; //# sourceMappingURL=settings.d.ts.map