latent.context.events¶
Classes¶
ContextCheckEvent¶
ContextCheckEvent(event_type: Literal['check_result', 'compaction', 'warning', 'critical'] = 'check_result', check_name: str = '', tier: Literal['static', 'semantic'] = 'static', outcome: Literal['active', 'passive'] = 'passive', timestamp_utc: str = (lambda: datetime.now(UTC).isoformat())(), score: float | None = None, passed: bool | None = None, tokens_before: int | None = None, tokens_after: int | None = None, latency_ms: float | None = None, metadata: dict[str, Any] = dict())
Emitted to sinks for logging/tracing context checks.
ContextCheckViolation¶
ContextCheckViolation(check_name: str = '', timing: Literal['pre', 'post'] = 'pre', outcome: Literal['active', 'passive'] = 'passive', tier: Literal['static', 'semantic'] = 'static', score: float = 0.0, message: str = '', tokens_before: int | None = None, tokens_after: int | None = None, findings: list[dict[str, Any]] = list())
Yielded in agent event stream for context engineering checks.