Files
DECNET/decnet/profiler/behave_shell/_parse.py
anti f8eae04e5d feat(profiler/behave_shell): scaffold extract_session entry point
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.
2026-05-03 07:42:09 -04:00

15 lines
508 B
Python

"""Asciinema event types.
The on-disk shard format is a list of 3-tuples ``(t, kind, data)`` where
``t`` is seconds since session start (float), ``kind`` is ``'i'`` (input)
or ``'o'`` (output), and ``data`` is the captured bytes decoded as a
Python ``str``. Step 0 ships only the type aliases — Step 1 fills the
parsing helpers and paste-burst detector.
"""
from __future__ import annotations
from typing import Literal, Tuple
EventKind = Literal["i", "o"]
AsciinemaEvent = Tuple[float, EventKind, str]