mirror of
https://github.com/hanzoai/cli.git
synced 2026-10-30 15:00:27 +00:00
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.