Metadata-Version: 2.4
Name: axor-telemetry
Version: 0.4.0
Summary: Anonymous telemetry pipeline for axor-core: MinHash embedder, local/HTTP sinks, opt-in consent CLI
Project-URL: Repository, https://github.com/Bucha11/axor-telemetry
Project-URL: Bug Tracker, https://github.com/Bucha11/axor-telemetry/issues
Project-URL: Changelog, https://github.com/Bucha11/axor-telemetry/releases
License: MIT
License-File: LICENSE
Keywords: agents,axor,minhash,telemetry
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Software Development :: Libraries
Requires-Python: >=3.11
Provides-Extra: core
Requires-Dist: axor-core<0.7,>=0.6.0; extra == 'core'
Provides-Extra: dev
Requires-Dist: axor-core<0.7,>=0.6.0; extra == 'dev'
Requires-Dist: pytest-asyncio>=0.23; extra == 'dev'
Requires-Dist: pytest>=8.0; extra == 'dev'
Description-Content-Type: text/markdown

# axor-telemetry

Anonymous telemetry pipeline for [axor-core](https://github.com/Bucha11/axor-core).

**Opt-in only.** Nothing is sent without explicit user consent.

## What gets sent (when consent is given)

- `signal_chosen` (e.g. `focused_generative`)
- `classifier_used`, `confidence`
- MinHash fingerprint of the raw input (128 ints, non-reversible)
- `tokens_spent`, `policy_adjusted`
- `axor_version`

**Not sent:** raw task text, file contents, user or session identifiers,
tool arguments, secrets.

## Install

```bash
pip install axor-telemetry[core]
```

## CLI

```bash
python -m axor_telemetry consent   # interactive opt-in
python -m axor_telemetry status    # show current config
python -m axor_telemetry preview   # show the last queued record
python -m axor_telemetry on        # non-interactive: set local mode
python -m axor_telemetry off       # disable
```

Config lives at `~/.axor/config.toml` under `[telemetry]`.

## Modes

| mode     | behavior |
|----------|----------|
| `off`    | Default. Pipeline does nothing. |
| `local`  | Writes to `~/.axor/telemetry_queue.jsonl`. Never sent anywhere. |
| `remote` | Writes local queue + ships batches to `telemetry.useaxor.net/v1/records`. Retry-on-next-start if offline. |

## Programmatic usage

```python
from axor_telemetry import TelemetryPipeline, MinHashEmbedder, FileTelemetrySink

pipeline = TelemetryPipeline(
    embedder=MinHashEmbedder(),
    sink=FileTelemetrySink(queue_path="~/.axor/telemetry_queue.jsonl"),
)
```

Inject `pipeline` into `GovernedSession` (see [`axor-cli`](https://github.com/Bucha11/axor-cli) integration).

---

## Ecosystem

| Package | Role |
|---------|------|
| [`axor-core`](https://github.com/Bucha11/axor-core) | Governance kernel |
| [`axor-cli`](https://github.com/Bucha11/axor-cli) | Governed terminal runtime — surfaces `/telemetry` command |
| [`axor-langchain`](https://github.com/Bucha11/axor-langchain) | LangChain middleware — optional `telemetry=` param |
| [`axor-telemetry-server`](https://github.com/Bucha11/axor-telemetry-server) | Ingest endpoint for remote mode |
| [`axor-claude`](https://github.com/Bucha11/axor-claude) | Claude / Claude Code adapter |
| [`axor-memory-sqlite`](https://github.com/Bucha11/axor-memory-sqlite) | Cross-session memory (SQLite) |
| [`axor-benchmarks`](https://github.com/Bucha11/axor-benchmarks) | Governance proof layer |
