Class: ClaudeMemory::Dashboard::Observations
- Inherits:
-
Object
- Object
- ClaudeMemory::Dashboard::Observations
- Defined in:
- lib/claude_memory/dashboard/observations.rb
Overview
Observability for the episodic observation layer. Surfaces counts by status/kind/priority, corroboration + promotion readiness, a Mastra-style compression ratio (source content tokens รท observation tokens), and a recent timeline. Aggregated across the project and global stores.
Pulled out of Dashboard::API so the queries live next to the data.
Constant Summary collapse
- RECENT_LIMIT =
20
Instance Method Summary collapse
-
#initialize(manager) ⇒ Observations
constructor
A new instance of Observations.
- #report ⇒ Object
Constructor Details
#initialize(manager) ⇒ Observations
Returns a new instance of Observations.
14 15 16 |
# File 'lib/claude_memory/dashboard/observations.rb', line 14 def initialize(manager) @manager = manager end |
Instance Method Details
#report ⇒ Object
18 19 20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/claude_memory/dashboard/observations.rb', line 18 def report stores = observation_stores return empty_report if stores.empty? { totals: totals(stores), by_kind: by_field(stores, :kind), by_priority: by_field(stores, :priority), corroboration: corroboration(stores), compression: compression(stores), recent: recent(stores) } end |