• Statements are system-mediated: a plain upsert neither adds nor removes them. Copies the stored $stmt sidecars of previous onto next, at the same paths, so re-saving a document keeps the provenance of its facts. Nested objects are followed where both documents have one; arrays are not.

    Type Parameters

    • T extends Record<string, unknown>

    Parameters

    • next: T
    • previous: Record<string, unknown>

    Returns T