Files
DECNET/decnet/profiler/behave_shell/_features/__init__.py

47 lines
1.2 KiB
Python

"""Registered feature functions.
Each entry takes a ``SessionContext`` and yields zero or more
``Observation`` instances. Adding a primitive = adding a function in a
sibling module and appending it to ``FEATURES``.
"""
from __future__ import annotations
from typing import Callable, Iterable
from decnet_behave_core.spec.envelope import Observation
from decnet.profiler.behave_shell._ctx import SessionContext
from decnet.profiler.behave_shell._features.cognitive import (
command_branch_diversity,
feedback_loop_engagement,
inter_command_consistency,
inter_command_latency_class,
)
from decnet.profiler.behave_shell._features.motor import (
command_chunking,
error_correction,
input_modality,
keystroke_cadence,
motor_stability,
paste_burst_rate,
shortcut_usage,
tab_completion,
)
FeatureFn = Callable[[SessionContext], Iterable[Observation]]
FEATURES: tuple[FeatureFn, ...] = (
input_modality,
paste_burst_rate,
keystroke_cadence,
motor_stability,
error_correction,
command_chunking,
tab_completion,
shortcut_usage,
inter_command_latency_class,
command_branch_diversity,
feedback_loop_engagement,
inter_command_consistency,
)