Graphorin API reference v0.7.0
Graphorin API reference / @graphorin/core / / GraphEntity
Interface: GraphEntity
Defined in: packages/core/src/types/memory.ts:353
Canonical entity in the lightweight in-SQLite relation graph (P2-1). The entity resolver (@graphorin/memory) deduplicates the raw subject/object strings on facts into canonical entities - merging aliases ("Anna", "Anna S.", "my sister") via lexical + embedding similarity (with optional LLM adjudication) - so multi-hop recall can traverse relationships instead of fragmenting them.
Merges are append-only and reversible: a merged entity is never deleted - its GraphEntity.mergedInto points at the surviving canonical entity, every merge / unmerge is recorded in an audit ledger, and mergedInto is single-level (it always points directly at a root), so mergedInto ?? id is the canonical id.
Core defines only the record shape; the storage surface for the graph (upsert / link / merge / one-hop expansion) is NOT part of the baseline MemoryStore contract - it lives in the optional GraphMemoryStoreExt exported from @graphorin/memory (W-048). Adapters without it simply have no relation graph.
Stable
Properties
| Property | Modifier | Type | Description | Defined in |
|---|---|---|---|---|
createdAt | readonly | string | - | packages/core/src/types/memory.ts:367 |
id | readonly | string | - | packages/core/src/types/memory.ts:354 |
mergedInto? | readonly | string | Canonical pointer. undefined ⇒ this entity is itself a root. Otherwise it is the id of the surviving entity this one was merged into; single-level by construction, so mergedInto ?? id resolves the canonical id without a recursive walk. | packages/core/src/types/memory.ts:366 |
name | readonly | string | Display name as first observed (the surface form that minted it). | packages/core/src/types/memory.ts:357 |
normalizedName | readonly | string | Case/space-folded key used for lexical dedup + the canonical unique index. | packages/core/src/types/memory.ts:359 |
updatedAt? | readonly | string | - | packages/core/src/types/memory.ts:368 |
userId | readonly | string | - | packages/core/src/types/memory.ts:355 |