Skip to main content

Module thin_edge

Module thin_edge 

Source
Expand description

Desktop thin edge over localhost — Phase 1 scaffold (ADR-068 / WEFT-628).

The edge is a dumb streaming transducer: capture + playback + a minimal reflex set + a control/media lane pair. Cognition (STT/TTS/VAD/endpoint/ floor/classify) lives daemon-side. This module defines the localhost wire vocabulary and an in-process loopback session that proves:

  1. The edge streams EdgeState (incl. ERL confidence) up the control lane.
  2. The daemon DuplexChannel folds ERL into TurnClaims.
  3. compute_urgency / floor_verdict_from_erl weight low-ERL claims down so self-echo cannot win the floor.

No cpal, no network, no TalkForest: pure protocol + state-machine wiring so later daemon RPC / UDS transport (plan Phase 1) plugs in without reshaping types. When the daemon is up the edge holds no standalone in-memory forest — that invariant is structural here (this session only owns DuplexChannel + edge reflex shadow flags).

Structs§

EdgeState
Control-lane state the edge reports up every tick / on change (ADR-068 D3).
LocalhostDuplexSession
In-process localhost thin-edge session (ADR-068 Phase 1 scaffold).
ObserveOutcome
Outcome of one observation step on the daemon half.
ThinEdge
Edge half of the localhost duplex session (WEFT-628).

Enums§

ControlMessage
Control-lane message (either direction).
EdgeReflexShadow
Minimal edge-side shadow of the three ADR-068 D5 reflexes, mirrored here so the kernel crate can unit-test the loopback without depending on clawft-channels. The channels EdgeReflex is the production type; this is a byte-compatible state shadow for the scaffold.
MediaFrame
Media-lane frame the edge streams up (mic / keystrokes) or the daemon streams down (TTS / rendered text). Typed by negotiated capability, not by a baked profile (ADR-068 D2).