Skip to main content

KnowledgeEntity

@retinue/monorepo


@retinue/monorepo / backend/src / KnowledgeEntity

Type Alias: KnowledgeEntity

KnowledgeEntity = object

Defined in: backend/src/persistence/index.ts:1586

An entity's type as the extractor named it — free text, lowercased. Not a union: a corpus decides its own.

Properties​

description?​

readonly optional description?: string

Defined in: backend/src/persistence/index.ts:1592


id​

readonly id: string

Defined in: backend/src/persistence/index.ts:1588

Deterministic and readable: type:normalised-name. See entityId in knowledge/graph.ts.


name​

readonly name: string

Defined in: backend/src/persistence/index.ts:1590

The canonical surface form — the one chosen deterministically from everything merged into it.


provenance​

readonly provenance: readonly string[]

Defined in: backend/src/persistence/index.ts:1602

Chunk ids this entity was extracted from, sorted. Never empty.


surfaceForms​

readonly surfaceForms: readonly string[]

Defined in: backend/src/persistence/index.ts:1600

Every distinct spelling merged into this entity, sorted — AC-6.

Resolution merges things that are not the same, and the mistake is invisible unless the merges are recorded. Storing the surface forms turns "why is this entity called that" from an archaeology problem into a lookup.


type​

readonly type: string

Defined in: backend/src/persistence/index.ts:1591