import type { DocumentId, DocumentRecord, KnowledgeCapsuleId, KnowledgeSourceId, ParserDiagnostic } from "@oscharko-dev/keiko-contracts";
export interface DiscoveredFile {
    readonly relativePath: string;
    readonly sizeBytes: number;
}
export interface DiscoveryOptions {
    readonly maxDepth: number;
    readonly maxFiles: number;
    readonly signal?: AbortSignal;
}
export declare const DEFAULT_DISCOVERY_OPTIONS: DiscoveryOptions;
export type DiscoveryErrorCode = "PATH_ESCAPE" | "READ_FAILED" | "OVERSIZED_FILE" | "UNSUPPORTED_FORMAT" | "CANCELLED" | "STAT_FAILED" | "INVALID_SCOPE";
export interface DiscoveryError {
    readonly code: DiscoveryErrorCode;
    readonly message: string;
    readonly relativePath?: string;
}
export type ExtractionOutcome = {
    readonly kind: "persisted";
    readonly document: DocumentRecord;
} | {
    readonly kind: "skipped";
    readonly document: DocumentRecord;
    readonly reason: "unchanged";
} | {
    readonly kind: "failed";
    readonly document: DocumentRecord;
    readonly error: DiscoveryError;
};
export interface ExtractionResult {
    readonly capsuleId: KnowledgeCapsuleId;
    readonly sourceId: KnowledgeSourceId;
    readonly relativePath: string;
    readonly outcome: ExtractionOutcome;
    readonly diagnostics: readonly ParserDiagnostic[];
}
export type ExtractionEvent = {
    readonly kind: "file-discovered";
    readonly relativePath: string;
    readonly sizeBytes: number;
} | {
    readonly kind: "file-extracted";
    readonly result: ExtractionResult;
} | {
    readonly kind: "scope-error";
    readonly error: DiscoveryError;
} | {
    readonly kind: "cancelled";
    readonly reason: string;
} | {
    readonly kind: "completed";
    readonly totalDiscovered: number;
    readonly totalExtracted: number;
    readonly totalSkipped: number;
    readonly totalFailed: number;
};
export interface DocumentIdSource {
    readonly capsuleId: KnowledgeCapsuleId;
    readonly sourceId: KnowledgeSourceId;
    readonly relativePath: string;
}
export declare function documentIdFor(input: DocumentIdSource): DocumentId;
//# sourceMappingURL=types.d.ts.map