import { e as GraphDef } from '../types-BynPp5kU.cjs'; export { C as ContributionDiagnostic, a as ContributionDiagnosticState, b as ContributionRepairEntry, c as ContributionRepairResult } from '../types-BynPp5kU.cjs'; import { c as HistoryStore } from '../store-3nfPQK5j.cjs'; export { B as BatchReadBuilder, C as CompiledOneStatementRead } from '../store-3nfPQK5j.cjs'; import 'zod'; import '../searchable-C7Xt6g45.cjs'; import '../resolve-CoYqHqno.cjs'; type NodeKind = Extract; type EdgeKind = Extract; type ProvenanceNodeRef = NodeKind> = Readonly<{ kind: K; id: string; }>; type ProvenanceJustificationRef = NodeKind> = ProvenanceNodeRef; type ProvenanceFactRef = NodeKind> = ProvenanceNodeRef; type ProvenanceSourceConfig = Readonly<{ kind: NodeKind; retractedField?: string; }> | Readonly<{ kinds: readonly NodeKind[]; retractedField?: string; }>; type ProvenanceRetractionConfig = Readonly<{ source: ProvenanceSourceConfig; justification: Readonly<{ kind: NodeKind; }>; fact: Readonly<{ kinds: readonly NodeKind[]; }>; premiseOf: Readonly<{ kind: EdgeKind; }>; derives: Readonly<{ kind: EdgeKind; }>; }>; /** * Extracts the node kind(s) referenced by a provenance role config, whether * declared as a single `{ kind }` or a `{ kinds }` array. Falls back to the * full `NodeKind` union when neither shape is present (e.g. a role config * that also carries unrelated fields, matched structurally). */ type KindsFromRef = Ref extends Readonly<{ kind: infer K; }> ? Extract> : Ref extends Readonly<{ kinds: readonly (infer K)[]; }> ? Extract> : NodeKind; type SourceKindsFromConfig> = KindsFromRef; type FactKindsFromConfig> = KindsFromRef; type JustificationKindFromConfig> = KindsFromRef; type SurvivedVia = NodeKind, JustificationKind extends NodeKind = NodeKind> = Readonly<{ fact: ProvenanceFactRef; via: readonly ProvenanceJustificationRef[]; }>; type RetractionReport = NodeKind, JustificationKind extends NodeKind = NodeKind> = Readonly<{ died: readonly ProvenanceFactRef[]; survivedVia: readonly SurvivedVia[]; unaffected: readonly ProvenanceFactRef[]; }>; type RetractionCapability = NodeKind, FactKind extends NodeKind = NodeKind, JustificationKind extends NodeKind = NodeKind> = Readonly<{ retract: (source: ProvenanceNodeRef) => Promise>; retractMany: (sources: readonly ProvenanceNodeRef[]) => Promise>; unRetract: (source: ProvenanceNodeRef) => Promise>; unRetractMany: (sources: readonly ProvenanceNodeRef[]) => Promise>; holding: () => Promise[]>; }>; declare function createRetractionCapability>(store: HistoryStore, config: C): RetractionCapability, FactKindsFromConfig, JustificationKindFromConfig>; export { type ProvenanceFactRef, type ProvenanceJustificationRef, type ProvenanceNodeRef, type ProvenanceRetractionConfig, type RetractionCapability, type RetractionReport, type SurvivedVia, createRetractionCapability };