Module: Engram::MemoryKind
- Defined in:
- lib/engram/memory_kind.rb
Overview
Canonical memory categories used by extraction, recall, and policy.
Constant Summary collapse
- VALID =
%i[fact preference instruction episodic].freeze
- LEGACY_ALIASES =
{semantic: :fact}.freeze
Class Method Summary collapse
Class Method Details
.normalize(kind) ⇒ Object
11 12 13 14 15 16 17 |
# File 'lib/engram/memory_kind.rb', line 11 def normalize(kind) normalized = kind.to_s.strip.downcase.to_sym normalized = LEGACY_ALIASES.fetch(normalized, normalized) return normalized if VALID.include?(normalized) raise ArgumentError, "unknown memory kind #{kind.inspect}; expected one of #{VALID.join(", ")}" end |