import type { KnowledgeActorRecord, KnowledgeAuthoredLink, KnowledgeConcept, KnowledgeDocumentKind, KnowledgeTrustTier } from "./okf.js"; export type KnowledgeSearchableField = "bundle" | "conceptId" | "title" | "description" | "tag" | "type" | "body" | "resource" | "status" | "staleAfter" | "generated" | "verified" | "trust"; export interface KnowledgeBodyPassage { readonly text: string; readonly section: ReadonlyArray; /** One-based line within the frontmatter-stripped body. */ readonly startLine: number; /** One-based inclusive line within the frontmatter-stripped body. */ readonly endLine: number; } export interface KnowledgeSearchableUnit { readonly field: KnowledgeSearchableField; readonly text: string; readonly passageIndex?: number; } export interface KnowledgeOutgoingLink extends KnowledgeAuthoredLink { readonly origin: "authored"; readonly sourceConceptId: string; readonly sourceRelativePath: string; } export interface KnowledgeBacklink { readonly origin: "derived-backlink"; readonly sourceConceptId: string; readonly sourceRelativePath: string; readonly targetConceptId: string; readonly line: number; } export interface KnowledgeProjectedConcept { readonly bundle: string; readonly conceptId: string; readonly kind: KnowledgeDocumentKind; readonly title?: string; readonly description?: string; readonly tags?: ReadonlyArray; readonly type?: string; readonly resource?: string; readonly status?: string; readonly staleAfter?: string; readonly generated?: KnowledgeActorRecord; readonly verified?: ReadonlyArray; readonly trust?: KnowledgeTrustTier; /** Complete parsed frontmatter, including producer-defined extension properties. */ readonly frontmatter?: Readonly>; readonly relativePath: string; readonly bodyPassages: ReadonlyArray; readonly searchableUnits: ReadonlyArray; readonly outgoingLinks: ReadonlyArray; readonly backlinks: ReadonlyArray; } export type KnowledgeFrontmatterPointerResult = { readonly found: true; readonly value: unknown; } | { readonly found: false; readonly reason: "invalid-pointer" | "not-found"; }; /** Resolve one RFC 6901 JSON Pointer against the preserved frontmatter mapping. */ export declare const resolveKnowledgeFrontmatterPointer: (frontmatter: Readonly> | undefined, pointer: string) => KnowledgeFrontmatterPointerResult; /** Build one bundle's immutable, graph-aware discovery projection. */ export declare const projectKnowledgeConcepts: (bundle: string, concepts: ReadonlyArray) => ReadonlyArray; //# sourceMappingURL=knowledge-projection.d.ts.map