/** * E3.1 deterministic entity extraction (first slice) * (docs/plans/2026-06-01-e3-deterministic-extraction.md). * * Populates the E3 graph from the already-structured consolidated E2-object tables - * NO NLP, no precision gate for entities + supersedes. The graph is a pure derived * function of the current E2 state, so `extractGraph` is an idempotent REBUILD: clear * the tenant's graph, then re-derive entities + `supersedes` relations from decisions / * policies / customer_notes / project_briefs (the four E2 types whose kind maps to the * `entity_type` enum). All writes go through the src/graph.ts consolidated-source guard * (insertEntity / insertRelation / clearGraph); this module issues no raw SQL. * * Pass 3 (E3 cross-object, docs/plans/2026-06-02-e3-cross-object-references.md) adds the * first CROSS-OBJECT relations: a deterministic NAME-MATCH heuristic that emits a * `references` edge when one consolidated object's text contains another entity's name. * It is conservative (word-boundary, length-bounded, ambiguity-guarded, per-source * capped); its precision is measured + reported, not assumed. * * Deferred (follow-ups): NLP prose-extraction (semantic depends-on / blocked-by / owns); * skill/incident/process entities (not in the entity_type enum - needs a migration); the * `hippo sleep` enqueue-hook. */ /** Per-type load cap (the loaders default to 100). A type whose active or superseded * set exceeds this is truncated; `ExtractResult.truncated` records it so the * incompleteness is observable rather than silent. */ export declare const MAX_EXTRACT_PER_TYPE = 10000; /** A target entity name must be in [MIN, MAX] chars to be matched: MIN skips short / * generic words; MAX skips prose (a decision's prose name is never a target, only a * source). */ export declare const MIN_REF_NAME_LEN = 4; export declare const MAX_REF_NAME_LEN = 80; /** Per-source cap so one object cannot explode the graph with references edges. */ export declare const MAX_REFERENCES_PER_OBJECT = 25; /** Regex-size bound: at most this many distinct target names enter the combined * alternation, keeping the scan regex sane on a huge store. */ export declare const MAX_TARGET_NAMES = 5000; export interface ExtractResult { entities: number; relations: number; /** Of `relations`, how many are cross-object `references` edges (the rest are * `supersedes`). Surfaced so the heuristic's output volume is observable. */ references: number; /** Entity count per extracted type. */ byType: Record; /** Entity types whose active or superseded load hit MAX_EXTRACT_PER_TYPE (the graph * is under-extracted for those). */ truncated: string[]; } /** * Idempotent rebuild of the tenant's deterministic graph from its consolidated E2 * objects. Returns the entity/relation counts (+ which types were truncated at the * per-type cap). Safe to re-run: output is a pure function of the current E2 state. */ export declare function extractGraph(hippoRoot: string, tenantId: string): ExtractResult; //# sourceMappingURL=graph-extract.d.ts.map