Skip to content

Session Analytics: on-box aggregation container (data plane) #83

Description

@kordless

Part of #77. Spec: docs/specs/session-analytics.md §4a.

The data is scattered — host ~/.claude/projects, each provider's session dir under the data home (.codex/sessions, .gemini/antigravity-cli/conversations, .grok/sessions, opencode.db, …), and the monitor events.jsonl — across processes and, in a fleet, across machines. We need one place to shove it all so analytics query a single always-current store instead of re-parsing ~1.1 GB on every CLI open.

Build: a service-class container services/aggregator.toml running a daemon nemesis8-aggregator (mirrors nemesis8-monitor).

  • Sources (read-only mounts): host ~/.claude/projects; per-provider session dirs; monitor events.jsonl.
  • Ingest: the transcript parser/classifier (Session Analytics: transcript parser + tool-call classifier #78) over each source → normalized ToolCall/SessionMeta; telemetry folded in.
  • Store: a lume-backed unified index on a persistent volume (/var/lib/n8-aggregator), built once, updated incrementally.
  • Live: FS-notify on the sources → incremental re-ingest as agents run; no full re-parse.
  • Serve: a localhost query surface (unix socket / fixed-port HTTP) the host CLI + LOGPANE + optional web view read. Read-only, on-box, no external network — by construction.
  • Fleet: one aggregator per machine; multi-host federates via the gateway over LAN, never a third-party cloud.

Why a container (not just host-side parsing): persistence + incremental indexing (don't re-parse 1.1 GB per open), isolation (heavy ingest off the host CLI), and one sink that scales to the whole agent fleet.

Accept: container ingests all local sources into the lume volume; host CLI queries it over the local socket and gets the same dashboard/facet results as a host-side parse; survives restart (persistent volume); zero external network.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions