import Graph from "graphology";
export interface DocumentSectionField {
    key: string;
    label: string;
    required?: boolean;
    placeholder?: string;
    inputGuide?: string;
    standardFormat?: string;
    examples?: string[];
    checkPoints?: string[];
}
export interface DocumentSection {
    title: string;
    legalSource?: string;
    fields: DocumentSectionField[];
    notes?: string[];
}
export interface DocumentNode {
    "@id": string;
    "@type": "Document";
    docId: string;
    title: string;
    alternativeNames?: string[];
    description?: string;
    cycle: string;
    trigger?: string;
    applicableWhen?: Record<string, unknown>;
    exemptedWhen?: Record<string, unknown>;
    requiredFields: Array<{
        key: string;
        label: string;
        source: string;
    }>;
    reviewRules: Array<{
        rule: string;
        severity: "blocker" | "warning" | "info" | "manual_review";
        checkFields?: string[];
        legalBasis?: string;
    }>;
    sections?: DocumentSection[];
    penaltyOnMissing?: string | string[];
    retention?: string;
    standardForm?: Record<string, unknown>;
    guidedBy?: string[];
    legalBasis?: string[];
    verificationStatus?: string;
    _meta?: Record<string, unknown>;
}
export interface ArticleNode {
    "@id": string;
    "@type": "Article";
    articleNumber: string;
    title: string;
    partOf: string;
    verificationStatus?: string;
    description?: string;
    hasAnnex?: string[];
    regulates?: string[];
    appliesTo?: string[];
    penalizedBy?: string | string[];
    legalBasisOf?: string[];
    _meta?: Record<string, unknown>;
}
export interface AnnexNode {
    "@id": string;
    "@type": "Annex";
    annexNumber: string;
    title: string;
    partOf: string;
    description?: string;
    specifies?: string[];
    verificationStatus?: string;
    _meta?: Record<string, unknown> & {
        preSurveyItems?: string[];
        workPlanItems?: string[];
    };
}
export interface PenaltyNode {
    "@id": string;
    "@type": "Penalty";
    title?: string;
    partOf: string;
    penaltyType: string;
    amount?: number;
    amountUnit?: string;
    condition?: string;
    _meta?: Record<string, unknown>;
}
export type AnyNode = DocumentNode | ArticleNode | AnnexNode | PenaltyNode;
export type NodeWithFacets = AnyNode & {
    koshaArchiveFacets?: string[];
    mitigatedBy?: string[];
};
export declare function hasType(node: {
    "@type"?: unknown;
}, typeName: string): boolean;
export declare function collectJsonldPaths(dir: string): Promise<string[]>;
export declare function buildGraph(): Promise<Graph>;
export declare function bfsByEdge(startId: string, edgeLabel: string, maxDepth?: number): Promise<Array<{
    id: string;
    depth: number;
    data: AnyNode;
}>>;
export declare function neighborsByEdge(startId: string, edgeLabel: string, direction?: "out" | "in"): Promise<string[]>;
export declare function invalidateGraphCache(): void;
export declare function findArticlesAndAnnexesForDocument(docId: string): Promise<Array<ArticleNode | AnnexNode>>;
export declare function getNode(id: string): Promise<AnyNode | undefined>;
/**
 * graph 가 build 됐는지 보장. 미build 시 buildIndex() + buildGraph() 호출.
 * 도구 handler 시작에서 await 1회 호출 후, sync getNodeSync · neighborsByEdge · bfsByEdge 안전 사용.
 *
 * 이전 버전은 buildIndex() 만 호출했지만 함수명 의미와 불일치 (graphology 그래프 미build).
 * neighborsByEdge / bfsByEdge 는 내부에서 buildGraph 를 lazy 호출하지만, 이름 부합을 위해
 * 본 함수가 한 번에 양쪽을 build 한다.
 */
export declare function ensureGraphBuilt(): Promise<void>;
/**
 * sync 노드 조회. ensureGraphBuilt() 후 호출.
 * 미build 시 undefined 반환 (예외 던지지 않음 — 도구 fallback).
 */
export declare function getNodeSync(id: string): AnyNode | undefined;
export declare function getDocument(docId: string): Promise<DocumentNode | undefined>;
/**
 * sync Document 조회 — ensureGraphBuilt() 후 호출.
 * GraphRepository 단일화 (P0-3) — assemble-doc-context 등의 readdirSync 패턴 대체.
 */
export declare function getDocumentSync(docId: string): DocumentNode | undefined;
export declare function listDocuments(): Promise<DocumentNode[]>;
//# sourceMappingURL=graph-nodes-loader.d.ts.map