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>
66 lines
1.6 KiB
Python
66 lines
1.6 KiB
Python
"""Mosaic Stack Telemetry — Python client SDK.
|
|
|
|
A lightweight client for reporting AI coding task-completion telemetry
|
|
and querying crowd-sourced predictions from a Mosaic Stack Telemetry server.
|
|
"""
|
|
|
|
from mosaicstack_telemetry.client import TelemetryClient
|
|
from mosaicstack_telemetry.config import TelemetryConfig
|
|
from mosaicstack_telemetry.event_builder import EventBuilder
|
|
from mosaicstack_telemetry.prediction_cache import PredictionCache
|
|
from mosaicstack_telemetry.queue import EventQueue
|
|
from mosaicstack_telemetry.types.common import (
|
|
BatchEventRequest,
|
|
BatchEventResponse,
|
|
BatchEventResult,
|
|
TelemetryError,
|
|
)
|
|
from mosaicstack_telemetry.types.events import (
|
|
Complexity,
|
|
Harness,
|
|
Outcome,
|
|
Provider,
|
|
QualityGate,
|
|
RepoSizeCategory,
|
|
TaskCompletionEvent,
|
|
TaskType,
|
|
)
|
|
from mosaicstack_telemetry.types.predictions import (
|
|
CorrectionFactors,
|
|
PredictionData,
|
|
PredictionMetadata,
|
|
PredictionQuery,
|
|
PredictionResponse,
|
|
QualityPrediction,
|
|
TokenDistribution,
|
|
)
|
|
|
|
__version__ = "0.1.0"
|
|
|
|
__all__ = [
|
|
"BatchEventRequest",
|
|
"BatchEventResponse",
|
|
"BatchEventResult",
|
|
"Complexity",
|
|
"CorrectionFactors",
|
|
"EventBuilder",
|
|
"EventQueue",
|
|
"Harness",
|
|
"Outcome",
|
|
"PredictionCache",
|
|
"PredictionData",
|
|
"PredictionMetadata",
|
|
"PredictionQuery",
|
|
"PredictionResponse",
|
|
"Provider",
|
|
"QualityGate",
|
|
"QualityPrediction",
|
|
"RepoSizeCategory",
|
|
"TaskCompletionEvent",
|
|
"TaskType",
|
|
"TelemetryClient",
|
|
"TelemetryConfig",
|
|
"TelemetryError",
|
|
"TokenDistribution",
|
|
]
|