/** * HackAPrompt corpus provenance and in-sample ablation helpers. * * The HackAPrompt corpus is gated upstream and gitignored here, so the * committed record of WHICH samples were measured is the manifest that * scripts/hackaprompt-to-corpus.py writes beside it: the HuggingFace dataset * id, the pinned dataset revision, the seed, the selected row indices and the * SHA-256 of the corpus file. The runner refuses to measure a corpus whose * digest does not match the manifest, so a measurement file can only ever * describe the sample set its provenance block names. * * Several rules were written from this same corpus (their YAML names * HackAPrompt as the source). Scoring them on it is in-sample, so the runner * also measures the corpus with those rules removed. * * @module agent-threat-rules/eval/hackaprompt-provenance */ export interface HackaPromptManifest { readonly dataset_id: string; readonly dataset_revision: string; readonly split: string; readonly parquet_sha256: string; readonly rows_total: number; readonly selection: string; readonly seed: number | null; readonly requested: number; readonly dropped_short_or_empty: number; readonly filter: string; readonly samples: number; readonly corpus_sha256: string; readonly sample_ids_sha256: string; readonly row_indices: readonly number[]; } /** Rules ATR-2026-00452..00456, added by e9efefdd on 2026-05-12, mined from this corpus. */ export declare const HACKAPROMPT_BATCH_0512_RULE_IDS: readonly string[]; export declare function sha256File(path: string): string; export declare function loadManifest(path: string): HackaPromptManifest; /** Throws unless the corpus file is byte-identical to the one the manifest describes. */ export declare function verifyCorpusAgainstManifest(corpusPath: string, manifest: HackaPromptManifest): string; /** Rule ids whose YAML text names HackAPrompt anywhere (description, provenance, test cases). */ export declare function rulesNamingHackaPrompt(rulesDir: string): readonly string[]; /** * A temporary copy of `rulesDir` without the given rule ids. Returns the copy's * path and the ids actually removed (an id with no file is not silently claimed). */ export declare function rulesDirWithout(rulesDir: string, excludeIds: readonly string[]): { readonly dir: string; readonly removed: readonly string[]; }; /** Repo-relative path, for records that must not carry a machine-local path. */ export declare function repoRelative(base: string, path: string): string; //# sourceMappingURL=hackaprompt-provenance.d.ts.map