Constructors

Methods

  • Insert facts. Facts with predicates outside the closed schema are silently dropped (matches the FactExtractor contract). Subjects are canonicalized; the stored form carries the canonical subject. Per-(subject, predicate) entries stay time-sorted ascending so getLatest is O(1) and getAllTimeOrdered is O(n).

    Parameters

    • scope: string
    • scopeId: string
    • facts: readonly Fact[]

    Returns void

  • Return the latest fact for (subject, predicate) or null. Supports un-canonicalized subject input (canonicalized internally). Returns null for predicates outside the closed schema.

    Parameters

    • scope: string
    • scopeId: string
    • subject: string
    • predicate: string

    Returns null | Fact