import { type KryptoniteCategory, type TranslitSeed } from "#recipes/deepseek/prompts"; /** * The license note each generated row includes until a writer stamps the register's license id. */ export declare const DEEPSEEK_LICENSE_LABEL = "Synthetic (DeepSeek-v4-flash, AGPL-compatible)"; /** * `-`. */ export declare function deterministicID(prefix: string, payload: string): string; /** * The JSON object lines of a completion. * * A fence line and a line that doesn't begin with `{` are not records and are skipped. * A line that begins with `{` and doesn't parse, such as one holding `NaN`, * which Python's `json.loads` accepted and `JSON.parse` refuses, is a failed record: * `onUnparsed` receives it so the caller can count it. */ export declare function parseJSONLResponse(content: string | null | undefined, onUnparsed?: (line: string) => void): unknown[]; /** * Whether every component value is a non-empty substring of `raw`, with the reason when one isn't. */ export declare function validateComponents(raw: string, components: unknown): readonly [boolean, string | null]; /** * One transliteration request: a chunk of seeds and the script it renders them into. */ export interface TranslitBatch { batchID: string; scriptLabel: string; scriptSlug: string; surfaceLanguage: string; surfaceScript: string; seeds: TranslitSeed[]; } /** * Every (script, seed chunk) pair in script order, each with the id the checkpoint stores. */ export declare function planTranslitBatches(seeds: readonly TranslitSeed[], batchSize: number, scripts: readonly string[] | null): TranslitBatch[]; /** * The least row budget a category receives, however small its weight. */ export declare const MINIMUM_PER_CATEGORY = 50; /** * One adversarial-case request. */ export interface KryptoniteBatch { batchID: string; category: KryptoniteCategory; n: number; index: number; } /** * Splits `targetCount` across the categories by weight, each at least {@linkcode MINIMUM_PER_CATEGORY} * with Python's half-to-even rounding, then divides each share into batches of `batchSize`. */ export declare function planKryptoniteBatches(targetCount: number, batchSize: number): KryptoniteBatch[]; /** * The country and locale of every kryptonite row. * * `KRYPTONITE_USER_TEMPLATE` asks for US addresses in every category, `french-saint` included, * so each row is a US address: `1 Rue Saint-Denis, New York, NY 10001`. */ export declare const KRYPTONITE_COUNTRY: { readonly country: "US"; readonly locale: "en-US"; }; /** * One generated canonical row, in the key order the Python generator wrote. */ export type DeepSeekRow = Record; /** * One transliterated row, carrying the seed's country and locale and naming the script it is written in. */ export declare function canonicalTranslitRow(batch: TranslitBatch, seed: TranslitSeed, raw: string, components: Readonly>): DeepSeekRow; /** * One adversarial row, a US address in every category ({@linkcode KRYPTONITE_COUNTRY}). */ export declare function canonicalKryptoniteRow(category: KryptoniteCategory, index: number, raw: string, components: Readonly>, kind: string): DeepSeekRow; /** * Every seed row of `paths`, the first `limit` when it is set, each checked for * the country and locale its transliterations take. * * @throws When a file is missing, naming it, or a seed has no country or locale. */ export declare function loadTranslitSeeds(paths: readonly string[], limit: number): Promise; /** * The corpus sources a run writes: `deepseek-kryptonite`, or one `deepseek-translit-` per script. */ export declare function emittedDeepSeekSources(mode: "kryptonite" | "transliteration", scripts: readonly string[] | null): string[]; //# sourceMappingURL=batches.d.ts.map