Files
zeekay 53ce26ddc3 feat(telemetry): canonical /v1/event emitter, wired at the command seam
Add crates/event (hanzo-event): a small, shared, best-effort emitter that POSTs
the canonical Event wire (event, distinctId, time, properties) to
{api}/v1/event as a batched [Event] array. Fail-soft, opt-out
(HANZO_TELEMETRY=0, DO_NOT_TRACK), no PII (visitor is a random per-install
device id; a command reports only its verb, duration, and outcome), and bounded
so it never blocks a command. Auth is one bearer header: the active identity's
token when signed in, else a publishable key (HANZO_EVENT_KEY); with neither,
the fail-closed door would reject the event, so it is not sent.

Wire it into the CLI at the dispatch seam: build once per run, record the
top-level command on completion, flush at exit. dev consumes the same crate via
a pinned git dependency.
2026-07-22 18:21:53 -07:00
..