import { type QualityIntelligence as QI } from "@oscharko-dev/keiko-contracts";
import type { QualityIntelligenceIngestedAtom } from "@oscharko-dev/keiko-workflows";
import type { QualityIntelligenceInlineSource, QualityIntelligenceStartRunRequest } from "@oscharko-dev/keiko-contracts";
import type { CapsuleResolver } from "./capsuleAdapter.js";
import type { FigmaSnapshotLoader, FigmaVisionHintProvider } from "./figmaSnapshotAdapter.js";
export declare class QiIngestionError extends Error {
    readonly code: string;
    constructor(code: string, message: string);
}
export interface QiSourceSummary {
    readonly label: string;
    readonly kind: QualityIntelligenceInlineSource["kind"];
    readonly atomCount: number;
}
/**
 * A connected source that could not be ingested (empty, denied, binary, unavailable capsule, …) and
 * was SKIPPED so the remaining sources still produce a run (Epic #729 N+1 resilience / Chat parity).
 * Carries only a sanitised label + the safe coded reason — never source content. The run still fails
 * (re-raising the first coded error) when EVERY source is skipped.
 */
export interface QiSkippedSource {
    readonly label: string;
    readonly kind: QualityIntelligenceInlineSource["kind"];
    readonly code: string;
    readonly message: string;
}
export interface QiIngestionResult {
    readonly envelopes: readonly QI.QualityIntelligenceSourceEnvelope[];
    readonly ingestedAtoms: readonly QualityIntelligenceIngestedAtom[];
    readonly provenanceRefs: {
        readonly envelopeIds: readonly string[];
        readonly auditSummaryId: QI.QualityIntelligenceAuditSummaryId;
    };
    readonly sourceSummaries: readonly QiSourceSummary[];
    /** Number of sources dropped because the request exceeded MAX_QI_SOURCES (Epic #729). */
    readonly droppedSourceCount: number;
    /**
     * Sources that ingested to nothing usable and were skipped (a subset of the connected sources),
     * so the healthy sources still produced the run (Epic #729 N+1 resilience). Empty on the happy path.
     */
    readonly skippedSources: readonly QiSkippedSource[];
}
export interface IngestInlineSourcesInput {
    readonly request: QualityIntelligenceStartRunRequest;
    readonly runId: string;
    readonly registeredAt: string;
    /** Optional capsule resolver (Epic #710, Issue #717). Absent → capsule sources throw QI_CAPSULE_UNAVAILABLE. */
    readonly capsuleResolver?: CapsuleResolver | undefined;
    /**
     * Optional Figma-snapshot loader (Epic #750, Issue #754). Absent → figma-snapshot sources throw
     * QI_FIGMA_SNAPSHOT_UNAVAILABLE. Reads ONLY the stored snapshot; never contacts Figma.
     */
    readonly figmaSnapshotLoader?: FigmaSnapshotLoader | undefined;
    /**
     * Optional capability-routed vision hint provider (Issue #754/#810). Absent → IR-only baseline.
     * Hints are additive and never override the deterministic structural baseline.
     */
    readonly figmaVision?: FigmaVisionHintProvider | undefined;
}
export declare function ingestInlineSources(input: IngestInlineSourcesInput): QiIngestionResult;
//# sourceMappingURL=runIngestion.d.ts.map