/**
 * Port: RunArtifactReader — reads a run's manifest and artifact payloads from
 * external object storage (D0091).
 *
 * The GCS adapter (W-bigquery-fact-store-adapter slice) implements this over
 * `gs://ailf-artifacts`; the `InMemoryRunArtifactReader` below is the test
 * double. The fact-loader engine talks only to this port, so it stays pure of
 * I/O specifics.
 *
 * Semantics:
 *   - `readManifest` throws when the manifest is missing or unparseable. The
 *     engine isolates per run, so a throw skips-and-reports that one run and
 *     the batch continues.
 *   - `readArtifact` returns the parsed (JSON-deserialized) entries for one
 *     artifact type. A type the run never wrote yields an empty list, not a
 *     throw — absence is normal (a partial run). A throw means the object was
 *     present but could not be read/parsed, which skips the run.
 *
 * @see docs/decisions/D0091-bigquery-analytics-fact-loader.md
 * @see packages/core/src/ports/artifact-writer.ts — the write-side counterpart
 */
import type { ArtifactType } from "../artifact-registry.js";
import type { ParsedArtifactEntry } from "../fact-loader/descriptor.js";
import type { RunId } from "../types/branded-ids.js";
import type { RunManifest } from "../types/index.js";
export interface RunArtifactReader {
    /**
     * Read the run manifest at `runs/{runId}/manifest.json`.
     *
     * @throws when the manifest is absent or cannot be parsed.
     */
    readManifest(runId: RunId): Promise<RunManifest>;
    /**
     * Read and JSON-deserialize the entries for one artifact type in a run.
     * Returns an empty list when the run carries no artifact of that type.
     *
     * @throws when a declared object exists but cannot be read or parsed.
     */
    readArtifact(runId: RunId, type: ArtifactType): Promise<readonly ParsedArtifactEntry[]>;
}
/**
 * Seed shape for one run in {@link InMemoryRunArtifactReader}.
 *
 * `failManifest` / `failArtifacts` simulate the corrupt-run path so tests can
 * assert per-run failure isolation without a real storage backend.
 */
export interface InMemoryRun {
    /** The manifest returned by `readManifest`, unless `failManifest` is set. */
    readonly manifest: RunManifest;
    /** Parsed entries per artifact type. Omitted types read as empty. */
    readonly artifacts?: Partial<Record<ArtifactType, readonly ParsedArtifactEntry[]>>;
    /** When set, `readManifest` throws this message (corrupt/missing manifest). */
    readonly failManifest?: string;
    /** Artifact types whose `readArtifact` throws (unreadable object). */
    readonly failArtifacts?: readonly ArtifactType[];
}
/**
 * In-memory {@link RunArtifactReader} for tests and local dry-runs. Seed runs
 * with {@link InMemoryRunArtifactReader.seed}; an unseeded run id throws from
 * `readManifest`, mirroring a missing manifest in GCS.
 */
export declare class InMemoryRunArtifactReader implements RunArtifactReader {
    private readonly runs;
    constructor(runs?: Iterable<readonly [RunId, InMemoryRun]>);
    /** Add or replace a run's seed data. Chainable. */
    seed(runId: RunId, run: InMemoryRun): this;
    readManifest(runId: RunId): Promise<RunManifest>;
    readArtifact(runId: RunId, type: ArtifactType): Promise<readonly ParsedArtifactEntry[]>;
}
