import { SANITIZE_RULE_NAMES, type SanitizationReport, type SanitizeRuleName } from './fixture-sanitize-service.js'; export type EnvelopeKind = 'audit-security' | 'audit-perf' | 'karpathy-review' | 'mut-report' | 'qa-report' | 'prd-handoff'; export declare const ENVELOPE_KINDS: ReadonlyArray; /** * Map envelope kind → on-disk path segment under `.peaks/_runtime//`. * `qa-report` is intentionally absent — the PRD lists 5 envelope types; * `qa-report` is a 6th bonus to widen coverage. All 6 are accepted as * inputs; the replay test enforces ≥5 distinct kinds. */ export declare const ENVELOPE_ON_DISK_PATH: Record; export declare const ENVELOPE_FILE_EXTENSION: Record; export interface HistoricalCaptureInput { readonly mode: 'historical'; readonly sessionId: string; readonly envelopeKind: EnvelopeKind; readonly fixtureId: string; readonly outDir: string; /** * Optional absolute or relative base dir used to resolve the source * path `.peaks/_runtime//...`. When omitted, defaults to * `process.cwd()`. The CLI passes `process.cwd()` explicitly; * tests that pre-populate a tmp tree pass the tmp root here. */ readonly projectRoot?: string; /** * When true (default), the CLI refuses to write if the source file * does not exist. Set false only in tests where you want to assert * the error path. */ readonly requireSource?: boolean; } export interface DerivedVariantInput { readonly mode: 'derived-variant'; /** Path (absolute or relative to cwd) to a previously captured fixture body. */ readonly parentFixturePath: string; readonly variant: EdgeCaseVariant; readonly fixtureId: string; readonly outDir: string; } export type EdgeCaseVariant = 'chinese-colon' | 'yaml-frontmatter-variation' | 'double-format' | 'empty-body' | 'multi-findings' | 'historical-canonical'; export declare const EDGE_CASE_VARIANTS: ReadonlyArray; export type CaptureInput = HistoricalCaptureInput | DerivedVariantInput; export interface CapturedFixture { readonly fixtureId: string; readonly envelopeKind: EnvelopeKind; readonly bodyPath: string; readonly metaPath: string; readonly meta: FixtureMeta; } export interface FixtureMeta { readonly schemaVersion: 1; readonly fixtureId: string; readonly envelopeKind: EnvelopeKind; readonly producer: 'peaks-fixture-capture-cli'; readonly producerVersion: '2.14.0'; readonly sourceOrigin: { readonly kind: 'historical-artifact' | 'derived-variant'; readonly path: string; readonly sessionId: string | null; readonly parentFixtureId: string | null; readonly variantCommand: string | null; }; readonly capturedAt: string; readonly sanitization: SanitizationReport; readonly checksum: { readonly algorithm: 'sha256'; readonly value: string; }; readonly edgeCases: ReadonlyArray; } /** * Resolve a historical capture: read the source file from disk, sanitize * it, compute the checksum, write the body + `fixture.meta.json` pair. * * Pure orchestration — no command-line parsing here. The CLI in * `scripts/fixture-capture.mjs` validates args and calls this function. * * @throws if the source file does not exist and `requireSource !== false`. */ export declare function captureHistoricalFixture(input: HistoricalCaptureInput): CapturedFixture; /** * Derive a variant fixture from a parent fixture body. The parent must * already be a captured fixture (i.e. it has been sanitized). Variants * are deterministic — same parent + same variant → identical output. */ export declare function captureDerivedVariant(input: DerivedVariantInput): CapturedFixture; export { SANITIZE_RULE_NAMES, type SanitizeRuleName };