# `MimirAnalytics.Capture`
[🔗](https://github.com/cash-mckeeman/mimir/blob/mimir_analytics-v0.8.1/mimir_analytics/lib/mimir_analytics/capture.ex#L1)

Session-finish capture: writes `{"meta": ..., "result": ...}` as a one-line
JSONL file into a sessions spool directory. Explicit call from the
step-runner / eval harness rather than a telemetry attachment. Takes plain maps; structs must be Jason-encoded to maps by the
caller.

Each call writes its own file and publishes it by rename: the line is
written to a dot-prefixed temporary sibling, which is then renamed to
`session-<UTC date>-<random>.jsonl`. A visible file is therefore complete
and never changes afterwards, which is the spool's write protocol (see
`mix mimir_analytics.ingest`).

# `write`

```elixir
@spec write(map(), map(), Path.t()) :: {:ok, Path.t()}
```

---

*Consult [api-reference.md](api-reference.md) for complete listing*
