/** Identity sections — anchor to `:UserProfile` via natural edge per kind. */
export declare const IDENTITY_SECTION_KINDS: readonly ["Position", "Education", "Credential", "Skill", "Biography"];
/** Structural sections — anchored only via HAS_SECTION + NEXT, no anchor edge. */
export declare const STRUCTURAL_SECTION_KINDS: readonly ["Preface", "Abstract", "Introduction", "TableOfContents", "Chapter", "Conclusion", "Appendix", "Bibliography", "Glossary", "Acknowledgments"];
/** Contract-clause sections — anchored via HAS_SECTION + NEXT; Parties + Definitions get extra wiring. */
export declare const CONTRACT_SECTION_KINDS: readonly ["Parties", "Recitals", "Definitions", "Scope", "Term", "Payment", "Confidentiality", "IntellectualProperty", "Warranties", "Indemnification", "Liability", "Termination", "GoverningLaw", "ForceMajeure", "Notices", "EntireAgreement", "Amendment", "Assignment", "Severability", "Signatures"];
/** Standalone nodes — written as their own top-level node, not a `:Section`. */
export declare const STANDALONE_NODE_KINDS: readonly ["Project"];
/** Label-fallback kind — closure miss. The specialist supplies `classifierReason`. */
export declare const SECTION_KIND_OTHER: "Other";
/** Direction of the anchor edge relative to the typed node. */
export type AnchorEdgeDirection = "from-anchor" | "to-anchor";
/** Direction of a related-node edge relative to the typed node. */
export type RelatedEdgeDirection = "outgoing" | "incoming";
/**
 * Which document-side node the related edge connects to:
 * - `"section"` (default): the section node this entry lives under.
 * - `"anchor"`: the document anchor (e.g. the `:Organization` the website
 *   is about). Use this for typed-entity edges like `:FOUNDED` /
 *   `:WORKS_AT` / `:INVESTED_IN` / `:ADVISES` whose typed-edge allowlist
 *   forbids a `:Section` endpoint — Task 482.
 */
export type RelatedEdgeTarget = "section" | "anchor";
/** A related entity the typed node connects to (e.g. Position → Organization). */
export interface ClassifiedRelated {
    /** Ontology label — verified against the loaded label set. */
    kind: string;
    /** Properties on the related node. */
    properties: Record<string, unknown>;
    /** Edge from the typed node to the related node. */
    edge: {
        type: string;
        direction: RelatedEdgeDirection;
        /**
         * Optional target-node selector — defaults to `"section"` for
         * backward compatibility. Set `"anchor"` to land the edge on the
         * document anchor instead of the section node (Task 482).
         */
        targetMode?: RelatedEdgeTarget;
        properties?: Record<string, unknown>;
    };
    /**
     * When true, MERGE the related node on its identifying property
     * (e.g. Organization on `name`); when false, CREATE.
     * Defaults to true — entity reuse is the safer default.
     */
    merge?: boolean;
}
/** A single classified section of the document (every section is one `:Section` node). */
export interface ClassifiedSection {
    /** Section kind from the closed enumeration; becomes a secondary label on `:Section`. */
    kind: string;
    /** Short human-readable title for the section. */
    title: string;
    /**
     * Section body text — omit on BOTH paths. The writer derives body
     * server-side via `cachedText.slice(sourceStart, sourceEnd)`. Any value
     * supplied here is logged and ignored; it must never be written to Neo4j.
     *
     * - Document path: source text is `extractCache.get(attachmentId).text`,
     *   populated by `memory-ingest-extract` from the file on disk.
     * - Conversation-archive path: source text is the per-session tempfile
     *   written by `conversation-archive-ingest.mjs` at
     *   `turnTextCachePath(conversationIdentity, archiveSha256, sessionIndex)`.
     *
     * Tasks 465 (document path) and 468 (chat path) closed the LLM-supplied
     * body vector on both sides — the classifier emits offsets only.
     */
    body?: string;
    /** 1-3 sentence summary, ≤500 chars; stored as `:Section.summary`. */
    summary: string;
    /** Whole-document character offsets — inclusive start, exclusive end. */
    sourceStart: number;
    sourceEnd: number;
    /** Properties on the section node (excluding accountId/embedding/provenance). */
    properties: Record<string, unknown>;
    /**
     * Edge from the document subject (anchor) to / from the section node.
     * Null for structural and contract-clause kinds — anchored only via
     * the implicit `(:KnowledgeDocument)-[:HAS_SECTION]->(:Section)` + `:NEXT`.
     */
    anchorEdge: {
        type: string;
        direction: AnchorEdgeDirection;
        properties?: Record<string, unknown>;
    } | null;
    /** Other entities this section references (e.g. Position → Organization via AT). */
    related?: ClassifiedRelated[];
    /** For `kind === "Other"`: one-line description of what the section was about. */
    classifierReason?: string;
}
/**
 * A node the specialist emitted but could not edge naturally.
 * Surfaced to the operator so they decide whether the orphan is intentional
 * (rare, valid) or a missing edge (ontology gap).
 */
export interface OrphanCandidate {
    /** Ontology label of the would-be node. */
    kind: string;
    /** Short human-readable label naming the entity (e.g. organisation name). */
    label: string;
    /** Why no natural edge was found for this node. */
    reason: string;
}
/**
 * Document-level edge proposed by the specialist (e.g. PARTY edges from
 * a contract `:KnowledgeDocument` to its Party persons / organisations).
 */
export interface ClassifiedDocumentEdge {
    type: string;
    direction: "outgoing" | "incoming";
    targetKind: string;
    targetProperties: Record<string, unknown>;
    /** Default true — MERGE Person/Organization on identifying property. */
    merge?: boolean;
}
/** The classifier's full output — what the specialist passes to memory-ingest. */
export interface ClassifierOutput {
    documentSummary: string;
    documentKeywords: string[];
    sections: ClassifiedSection[];
    orphanCandidates: OrphanCandidate[];
    documentEdges?: ClassifiedDocumentEdge[];
    /** Diagnostic count of related-node `kind` values dropped as ontology misses. */
    hallucinatedRelated: number;
}
//# sourceMappingURL=section-types.d.ts.map