BEHAVE-EXTRACTOR.md Phase A Step 0. Lays the package skeleton (__init__/extract/_parse/_ctx/_thresholds/_features) with empty FEATURES = (), so the worker plumbing in BEHAVE-INTEGRATION Phase 4 has a stable import path before any primitive lands. extract_session() builds a SessionContext once and fans the registered feature functions across it; at Step 0 that fan-out is empty and the function yields nothing. Step 1 (asciinema parser + paste-burst detector) and Step 2 (motor.input_modality) land next. Smoke suite asserts the empty contract: empty stream → no observations, single event → t_start == t_end, multi-event → events routed into input_events / output_events by kind, evidence_ref defaults to "session:<sid>" or honours an explicit override.
21 lines
607 B
Python
21 lines
607 B
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``.
|
|
|
|
Step 0 ships an empty tuple — extract_session() is wired but emits
|
|
nothing until Step 2.
|
|
"""
|
|
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
|
|
|
|
FeatureFn = Callable[[SessionContext], Iterable[Observation]]
|
|
|
|
FEATURES: tuple[FeatureFn, ...] = ()
|