Skip to content

Type Alias: MemoryReconciliation

@kortexya/reasoninglayer


@kortexya/reasoninglayer / MemoryReconciliation

MemoryReconciliation = { action: "added"; } | { action: "updated"; } | { action: "skipped"; } | { action: "contradicts_existing"; confidence: number; existingId: string; reason: string; } | { action: "unresolved_contradiction"; reason: string; } | { action: "corroborated"; } | { action: "superseded"; superseded: string[]; } | { action: "historical"; successor: string; } | { action: "conflict"; conflictId: string; conflictingWith: string[]; } | { action: "rejected"; reason: string; }

Defined in: src/types/memory.ts:101

How a remember was reconciled with what the memory held. Discriminated on action.

{ action: "added"; }


{ action: "updated"; }


{ action: "skipped"; }


{ action: "contradicts_existing"; confidence: number; existingId: string; reason: string; }

action: "contradicts_existing"

confidence: number

The contradiction’s confidence.

existingId: string

The memory it contradicts.

reason: string

Why.


{ action: "unresolved_contradiction"; reason: string; }

action: "unresolved_contradiction"

reason: string

Why.


{ action: "corroborated"; }


{ action: "superseded"; superseded: string[]; }

action: "superseded"

superseded: string[]

The superseded fact memories.


{ action: "historical"; successor: string; }

action: "historical"

successor: string

The later fact.


{ action: "conflict"; conflictId: string; conflictingWith: string[]; }

action: "conflict"

conflictId: string

The conflict record.

conflictingWith: string[]

The clashing facts.


{ action: "rejected"; reason: string; }

action: "rejected"

reason: string

Why.

  • added, updated, skipped, corroborated — no further data.
  • contradicts_existing — stored, and flagged against existingId.
  • unresolved_contradiction — contradiction detection did not finish; the absence of a contradiction is not established.
  • superseded — the new fact replaced the fact memories in superseded.
  • historical — the fact is older than successor, which still holds.
  • conflict — the fact clashes with conflictingWith, recorded as conflictId.
  • rejected — nothing was stored (reason).