import type { DraftClassifier, DraftExtractor, ReviewThreadSource, SplitArtifact, SplitLedger, WindtunnelLock } from '@mmnto/totem';
import { type ReplayArtifact, type ReplayProvenance } from './spine-llm-replay.js';
/**
 * Minimal draft shape `certDraftRef` keys on — a structural subset of core's
 * (intentionally non-exported, transient) `DraftCandidate`. Assignable to the
 * `(draft: DraftCandidate) => string` resolver the Recording/Replay classifiers
 * expect, via parameter contravariance.
 */
type DraftRefInput = {
    provenance: {
        mergedPr: number;
    };
    dslSource: string;
};
/**
 * The shared per-draft ref resolver. MUST be byte-identical in RECORD and REPLAY
 * so `classifierInputKey(draft, draftRef(draft))` produces the same key in both —
 * a divergence here would make every replay a `ReplayMissError`. Keyed on the
 * provenance PR + the DSL body (a draft is uniquely identified by its source
 * within a PR); ordinal-free so it survives re-ordering.
 */
export declare function certDraftRef(d: DraftRefInput): string;
export interface RecordReplayFixtureDeps {
    split: SplitArtifact;
    splitLedger: SplitLedger;
    /** Review-thread source (live gh adapter in the record command). */
    source: ReviewThreadSource;
    /** Live draft extractor to record (wrapped in RecordingDraftExtractor). */
    liveExtractor: DraftExtractor;
    /** Live draft classifier to record (wrapped in RecordingDraftClassifier). */
    liveClassifier: DraftClassifier;
    /** Seed-blindness attestation (passed through to extract). */
    seedClassesProvided: boolean;
    /** Prompt/provider provenance bound into the frozen artifact's whole-artifact hash. */
    provenance: ReplayProvenance;
}
/**
 * Drive the extract + classify stages through the RECORDING decorators to freeze
 * a `llm-replay.v1` fixture (A2 record path). Runs extract (records every
 * extractor output) then classify (records every classifier output) over the
 * train slice, then `sink.freeze(provenance)` → the artifact + its
 * `computeArtifactHash` (the EXTERNAL expected-hash the lock's L2 `llmReplaySha`
 * carries). Compile is NOT run here — recording captures only the non-deterministic
 * LLM edge (extract/classify); the deterministic compile/firing replays from it.
 */
export declare function recordReplayFixture(deps: RecordReplayFixtureDeps): Promise<{
    artifact: ReplayArtifact;
    hash: string;
}>;
/**
 * Construct the REPLAY-mode extractor + classifier from a frozen artifact + its
 * external expected-hash (the lock's L2 `llmReplaySha`). Both constructors
 * re-validate the whole-artifact integrity (assertFixtureIntegrity) before any
 * lookup, so a tampered/stale fixture fails loud. Uses the shared `certDraftRef`
 * so keys match what `recordReplayFixture` froze. Pure: zero LLM, zero network.
 */
export declare function buildReplayAdapters(artifact: ReplayArtifact, expectedHash: string): {
    extractor: DraftExtractor;
    classifier: DraftClassifier;
};
/** The injectable record deps — live in the CLI, fakes in tests. */
export interface RecordDeps {
    source: ReviewThreadSource;
    liveExtractor: DraftExtractor;
    liveClassifier: DraftClassifier;
    provenance: ReplayProvenance;
}
export interface RecordCommandOptions {
    /** Path to the wind-tunnel lock (default `.totem/spine/gate-1/windtunnel.lock.json`). */
    lockPath?: string;
    /** Gate-1 output dir (default: the lock's dir). */
    outputDir?: string;
    /**
     * Operator attestation that seed classes were supplied to the live extract —
     * flows into the fold-I FM-f `seedClassesProvided` ledger field. Default false
     * (seed-blind), so an unset flag preserves the seed-blind-by-construction claim.
     */
    seedClassesProvided?: boolean;
    /**
     * Record deps. Injected in tests; in the live CLI path the caller builds them
     * from the orchestrator config (createOrchestrator + the Live adapters + the
     * gh ReviewThreadSource). REQUIRED — there is no safe default LLM/provider, so
     * the command fails loud rather than guess.
     */
    deps: RecordDeps;
}
/**
 * A2 record path — freeze the `llm-replay.v1` fixture + the review content the
 * certifying RUN replays. Loads the lock + split, drives extract→classify
 * through the RECORDING decorators over the train slice (capturing both the LLM
 * outputs AND the fetched review content), writes `llm-replay.v1.json` +
 * `review-content.json` to the gate-1 dir, and returns the artifact's
 * `computeArtifactHash` — the EXTERNAL hash the operator wires into the lock's L2
 * `controls.integrity.llmReplaySha`. Separate from `run` (fail-safe: `run` stays
 * replay-only and never triggers a live record in CI).
 */
export declare function recordCommand(opts: RecordCommandOptions): Promise<{
    artifactPath: string;
    contentPath: string;
    hash: string;
}>;
export interface LiveRecordConfig {
    provider: string;
    model: string;
    cwd: string;
    totemVersion: string;
    env?: NodeJS.ProcessEnv;
}
/**
 * Construct the LIVE record deps from the orchestrator config: the gh
 * ReviewThreadSource, an `InvokeOrchestrator` (createOrchestrator), the Live
 * extract/classify adapters (frozen prompts), and the run-level provenance.
 * Operational — exercised by hand when freezing a real corpus, never in CI
 * (the adapters' construction-time guards reject a CI env / missing credential).
 */
export declare function buildLiveRecordDeps(lock: WindtunnelLock, config: LiveRecordConfig): Promise<RecordDeps>;
export {};
//# sourceMappingURL=spine-cert-record.d.ts.map