/**
 * retroHarvestValidator — the schema validator for Apprenticeship Step 0
 * retro-harvest artifacts (`apprenticeship-retro-harvest/v1`).
 *
 * This is the SOURCE OF TRUTH for the validator (Apprenticeship Step 1 §3.2
 * relocation). The pure logic lives here in TypeScript so it is type-checked
 * and importable in-process by `ApprenticeshipProgram`; the thin CLI
 * `scripts/validate-retro-harvest.mjs` re-exports from
 * `dist/core/retroHarvestValidator.js` (the BackfillCore precedent).
 *
 * Per APPRENTICESHIP-STEP0-RETRO-HARVEST-SPEC.md §9, this is the structural
 * SIGNAL — not the authority. It checks the artifact's SHAPE deterministically;
 * the LLM fidelity review (recorded in frontmatter) is the AUTHORITY for whether
 * the harvest is faithful. (Signal vs Authority / The Body and the Mind.)
 *
 * Two layers:
 *   - validateRetroHarvest(text, opts)  — PURE, offline, unit-tested. Structure,
 *     reconciliation, redaction backstop, path safety, completeness, scope rules.
 *   - checkLiveLedger(frontmatter, fetchImpl) — OPTIONAL live cross-check that
 *     seeded ids resolve in the running ledger. Network; run by the integration
 *     test / `--check-live`, never by the pure unit path.
 */
export declare const SCHEMA_ID = "apprenticeship-retro-harvest/v1";
export declare const INSTANCE_TYPES: readonly ["mentorship", "apprenticeship"];
export declare const SCOPE_MODES: readonly ["full", "incremental"];
export declare const COMPLETENESS: readonly ["complete", "partial-accepted"];
export declare const FIDELITY_VERDICTS: readonly ["faithful", "partial", "rejected"];
export declare const HARVEST_DIR = "docs/apprenticeship/retro-harvests";
/** Scrubbers Step 0 trusts. A missing/unknown/failed scrub refuses the artifact (§7). */
export declare const APPROVED_SCRUBBERS: readonly ["correction-scrub", "instar-pii-scrub"];
/** Evidence-pointer URI schemes (§6). */
export declare const POINTER_PATTERNS: Record<string, RegExp>;
/** Parsed frontmatter — the harvest carries arbitrary keys, so this is open. */
export type HarvestFrontmatter = Record<string, unknown>;
export interface ParsedArtifact {
    frontmatter: HarvestFrontmatter;
    body: string;
}
export interface ValidateResult {
    valid: boolean;
    errors: string[];
}
export interface ValidateOptions {
    priorHarvestExists?: boolean;
}
/** Resolution shape for an injected live-ledger fetch (one seeded id). */
export interface LedgerResolution {
    found: boolean;
    playbookStatus?: string;
}
export type LedgerFetchImpl = (id: string) => Promise<LedgerResolution> | LedgerResolution;
export interface LiveLedgerResult {
    ok: boolean;
    errors: string[];
}
/**
 * Split a markdown doc into { frontmatter (parsed), body (string) }.
 * Throws if there is no `---`-delimited YAML frontmatter.
 */
export declare function parseArtifact(text: string): ParsedArtifact;
/** Count top-level `- ` bullet items directly under a `## <heading>` section. */
export declare function countSectionItems(body: string, heading: string): number;
/** True when the body contains a secret-shaped string (returns the matched pattern name or null). */
export declare function findSecret(body: string): string | null;
/**
 * Resolve + confine an artifact path to HARVEST_DIR. Returns the safe relative
 * path or throws on traversal / bad component (§6 security).
 */
export declare function safeArtifactPath(from: string, to: string, instanceType: string): string;
/**
 * PURE structural validation of a retro-harvest artifact.
 */
export declare function validateRetroHarvest(text: string, opts?: ValidateOptions): ValidateResult;
/**
 * OPTIONAL live cross-check: every seededToPlaybook id resolves at candidate+ in
 * the running ledger. Network — never part of the pure unit path. Inject fetch.
 */
export declare function checkLiveLedger(frontmatter: HarvestFrontmatter, fetchImpl: LedgerFetchImpl): Promise<LiveLedgerResult>;
//# sourceMappingURL=retroHarvestValidator.d.ts.map