Module: Legion::Extensions::Agentic::Memory::Nostalgia::Runners::Analysis

Includes:
Helpers::Lex
Included in:
Client
Defined in:
lib/legion/extensions/agentic/memory/nostalgia/runners/analysis.rb

Instance Method Summary collapse

Instance Method Details

#bittersweet_memories(engine: nil) ⇒ Object



43
44
45
46
47
48
# File 'lib/legion/extensions/agentic/memory/nostalgia/runners/analysis.rb', line 43

def bittersweet_memories(engine: nil, **)
  eng = engine || nostalgia_engine
  memories = eng.bittersweet_memories
  log.debug("[cognitive_nostalgia] bittersweet_memories: count=#{memories.size}")
  { success: true, memories: memories, count: memories.size }
end

#most_nostalgic_domains(engine: nil) ⇒ Object



36
37
38
39
40
41
# File 'lib/legion/extensions/agentic/memory/nostalgia/runners/analysis.rb', line 36

def most_nostalgic_domains(engine: nil, **)
  eng = engine || nostalgia_engine
  domains = eng.most_nostalgic_domains
  log.debug("[cognitive_nostalgia] most_nostalgic_domains: top=#{domains.first&.fetch(:domain, :none)}")
  { success: true, domains: domains }
end

#nostalgia_proneness(engine: nil) ⇒ Object



28
29
30
31
32
33
34
# File 'lib/legion/extensions/agentic/memory/nostalgia/runners/analysis.rb', line 28

def nostalgia_proneness(engine: nil, **)
  eng = engine || nostalgia_engine
  proneness = eng.nostalgia_proneness
  label = Helpers::Constants.label_for(Helpers::Constants::NOSTALGIA_LABELS, proneness)
  log.debug("[cognitive_nostalgia] nostalgia_proneness=#{proneness.round(2)} label=#{label}")
  { success: true, proneness: proneness, label: label }
end

#rosy_retrospection_index(engine: nil) ⇒ Object



20
21
22
23
24
25
26
# File 'lib/legion/extensions/agentic/memory/nostalgia/runners/analysis.rb', line 20

def rosy_retrospection_index(engine: nil, **)
  eng = engine || nostalgia_engine
  index = eng.rosy_retrospection_index
  label = Helpers::Constants.label_for(Helpers::Constants::RETROSPECTION_LABELS, index)
  log.debug("[cognitive_nostalgia] rosy_retrospection_index=#{index.round(2)} label=#{label}")
  { success: true, index: index, label: label }
end

#warmth_by_domain(engine: nil) ⇒ Object



13
14
15
16
17
18
# File 'lib/legion/extensions/agentic/memory/nostalgia/runners/analysis.rb', line 13

def warmth_by_domain(engine: nil, **)
  eng = engine || nostalgia_engine
  by_domain = eng.warmth_by_domain
  log.debug("[cognitive_nostalgia] warmth_by_domain: #{by_domain.size} domains")
  { success: true, warmth_by_domain: by_domain }
end