import { PipelineStep } from "@warpgogol/pipeline-core"; import type { PipelineStepContext } from "@warpgogol/pipeline-core"; /** Default minimum stratum size for public disclosure (governance §DSGVO). */ export declare const DEFAULT_K_MIN = 5; export interface Stratum { /** Stratum dimension, e.g. 'gewerk', 'bundesland', 'gewerk×bundesland'. */ dimension: string; /** Stratum key within the dimension, e.g. 'sanitaer', 'Bayern'. */ key: string; /** Number of underlying units (sites) in this stratum. */ count: number; } export interface StratumResult extends Stratum { suppressed: boolean; reason: string | null; } export interface KAnonymityReport { k_min: number; mode: "warn" | "enforce"; total_strata: number; suppressed_strata: number; passed: boolean; strata: StratumResult[]; } export interface KAnonymityOutcome { report: KAnonymityReport; /** Strata that did not meet the threshold. Subclass decides how to mutate data. */ suppressed: StratumResult[]; /** True when every stratum met the threshold. */ passed: boolean; /** Absolute path of the report artifact. */ reportPath: string; } export declare abstract class KAnonymityGateStep extends PipelineStep { /** Threshold — override if governance demands something other than 5. */ protected getKMin(): number; /** 'warn' suppresses small strata; 'enforce' throws. Default: 'warn'. */ protected getMode(_ctx: TContext): "warn" | "enforce"; /** Subclass returns every stratum that will be gated. */ protected abstract collectStrata(ctx: TContext): Stratum[] | Promise; /** * Subclass returns the directory to write `report.json` into. * Default: `ctx.getStepArtifactPath(this.id, '')` — which most pipelines * resolve to `//`. */ protected getOutputDir(ctx: TContext): string; /** * Runs the k-anonymity check, writes `report.json`, returns the outcome. * Throws if mode is 'enforce' and at least one stratum is below K_MIN. */ protected enforceKAnonymity(ctx: TContext): Promise; } //# sourceMappingURL=k-anonymity-gate-step.d.ts.map