Skip to content

SentryModule

Sentry — cognitive load model. Maintains a real-time estimate of the user’s cognitive state based on behavioral signals (typing speed, message frequency, time gaps). Outputs a state vector: focus, fatigue, stress, flow.

  • Version: 0.1.0
  • Class: SentryModule
  • Module name: sentry

Tier 8 module.

FieldTypeDefault
focusfloat0.5
fatiguefloat0.0
stressfloat0.0
flowboolFalse

async on_load(self, context: dict[str, Any] | None = None) -> None

Section titled “async on_load(self, context: dict[str, Any] | None = None) -> None”

Subscribe to cortex.response so Sentry auto-derives signals from console activity.

async on_unload(self, context: dict[str, Any] | None = None) -> None

Section titled “async on_unload(self, context: dict[str, Any] | None = None) -> None”

observe_message(self, message: str) -> None

Section titled “observe_message(self, message: str) -> None”

Derive behavioral signals from a single user message.

Updates time_gap, message_frequency, and typing_speed automatically. Idempotent and safe to call from any thread/coroutine.

update_signal(self, signal_name: str, value: float) -> None

Section titled “update_signal(self, signal_name: str, value: float) -> None”

Update a behavioral signal (0.0–1.0) and recalculate state.

async handle(self, message: str, context: dict[str, Any]) -> str

Section titled “async handle(self, message: str, context: dict[str, Any]) -> str”