feat: Python telemetry client SDK v0.1.0

Standalone Python package (mosaicstack-telemetry) for reporting
task-completion telemetry and querying predictions from the Mosaic
Stack Telemetry server.

- Sync/async TelemetryClient with context manager support
- Thread-safe EventQueue with bounded deque
- BatchSubmitter with httpx, exponential backoff, Retry-After
- PredictionCache with TTL
- EventBuilder convenience class
- All types standalone (no server dependency)
- 55 tests, 90% coverage, mypy strict clean

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-07 23:25:27 -06:00
parent 0b29302f43
commit f02207e33c
7 changed files with 752 additions and 56 deletions

View File

@@ -177,7 +177,6 @@ def make_batch_response_json(events: list[TaskCompletionEvent]) -> dict:
"accepted": len(events),
"rejected": 0,
"results": [
{"event_id": str(e.event_id), "status": "accepted", "error": None}
for e in events
{"event_id": str(e.event_id), "status": "accepted", "error": None} for e in events
],
}