type UnknownRecord = Record; export type DomainDiscoveryEvidenceKind = 'explicit_meta' | 'dbt_group' | 'metricflow_semantic_domain' | 'exposure_owner_scope' | 'dbt_tag' | 'configured_selector' | 'model_path'; export interface DomainDiscoveryEvidence { kind: DomainDiscoveryEvidenceKind; domain: string; value: string; rank: number; confidence: number; sourceUniqueId: string; sourcePath?: string; owner?: string; selector?: string; } export interface DomainMembershipProposal { dbtUniqueId: string; modelName: string; sourcePath?: string; proposedDomain: string | null; confidence: 'high' | 'medium' | 'low'; confidenceScore: number; owner?: string; evidence: DomainDiscoveryEvidence[]; conflicts: string[]; requiresReview: boolean; } export interface DomainProposal { id: string; name: string; owner?: string; proposedParent?: string; matchedDbtUniqueIds: string[]; confidence: 'high' | 'medium' | 'low'; confidenceScore: number; evidence: DomainDiscoveryEvidence[]; requiresReview: boolean; } export interface UnassignedDbtModel { dbtUniqueId: string; modelName: string; sourcePath?: string; reason: 'no_evidence' | 'ambiguous_membership'; candidateDomains: string[]; evidence: DomainDiscoveryEvidence[]; } export interface RelationshipDraftCandidate { id: string; lifecycle: 'draft'; requiresReview: true; automaticJoinAllowed: false; fromDbtUniqueId: string; toDbtUniqueId: string; fromDomain: string; toDomain: string; keys: Array<{ from: string; to: string; }>; evidence: Array<{ dbtUniqueId: string; sourcePath?: string; kind: 'dbt_relationship_test'; }>; } export interface SkillDraftCandidate { id: string; domain: string; lifecycle: 'draft'; requiresReview: true; certificationAllowed: false; suggestedScope: string; evidenceDbtUniqueIds: string[]; } export interface DomainDiscoveryReport { version: 1; sourceFingerprint: string; generator: 'deterministic'; proposals: DomainProposal[]; memberships: DomainMembershipProposal[]; unassignedModels: UnassignedDbtModel[]; relationshipDraftCandidates: RelationshipDraftCandidate[]; skillDraftCandidates: SkillDraftCandidate[]; } export interface DiscoverDbtDomainsOptions { projectRoot: string; dbtManifestPath: string; semanticManifestPath?: string; } /** * AGT-002 / API-001 — evidence-bounded, deterministic dbt domain discovery. * * Resolve dbt model membership without writes or AI inference. * * Evidence is evaluated in the locked order below. If the strongest available * evidence names more than one domain, the model remains unassigned. Lower * ranked disagreement is retained as a review conflict but cannot silently * override stronger evidence. */ export declare function discoverDbtDomains(options: DiscoverDbtDomainsOptions): DomainDiscoveryReport; /** One `relationships` test in a dbt manifest, resolved to an exact key pair. */ export interface DbtRelationshipTestEdge { /** The dbt test node this edge was read from. */ testUniqueId: string; fromDbtUniqueId: string; toDbtUniqueId: string; /** `'unknown'` when dbt did not record the column on either side. */ fromColumn: string; toColumn: string; sourcePath?: string; } /** * Read every `relationships` test out of a dbt manifest. dbt already declares * the exact from/to key pair and enforces it with `dbt test`, so these are the * highest-quality relationship candidates a project has. * * REL-001 still applies: a dbt test is evidence, never join authorization. * Callers must keep the resulting relationship a reviewable draft. * * `include` restricts both endpoints to a known set of dbt unique ids; pass * `undefined` to accept any endpoint the manifest resolves. */ export declare function collectDbtRelationshipTests(manifest: UnknownRecord, include?: ReadonlySet): DbtRelationshipTestEdge[]; export {}; //# sourceMappingURL=domain-discovery.d.ts.map