Expand description
Synheart Flux - On-device compute engine for HSI-compliant human state signals
Flux transforms raw wearable vendor data into HSI-compliant signals through a deterministic pipeline: vendor adaptation → normalization → feature derivation → baseline computation → HSI encoding.
§Module Structure
- core/: Shared infrastructure (error types, schema definitions)
error.rs:ComputeErrorenum for pipeline errorsschema/: Raw event schema and adapters (wear.raw_event.v1)
- biosignal/: Wearable physiology processing pipeline
adapters/: Vendor-specific adapters (WHOOP, Garmin)normalizer.rs: Unit normalizationfeatures.rs: Feature derivationbaseline.rs: Rolling baseline computationencoder.rs: HSI output encodingtypes.rs: Core biosignal data structures
- behavior/: Smartphone behavioral data processing
parser.rs: Session parsingnormalizer.rs: Behavioral normalizationfeatures.rs: Feature derivationbaseline.rs: Rolling baselinesencoder.rs: HSI output encodingpipeline.rs: BehaviorProcessor orchestration
- pipeline/: Top-level orchestration
context.rs: Staleness-aware bio context (BioDailyContext, DecayedBioContext)biosignal_flow.rs: Stateless biosignal processingbehavior_flow.rs: Reserved for behavior flow extraction- FluxProcessor: Stateful processor with baseline persistence
- ffi/: C-compatible bindings for FFI
biosignal.rs: WHOOP/Garmin FFI functionsbehavior.rs: Behavioral FFI functions
Re-exports§
pub use core::error::ComputeError;pub use core::hsi::HsiAxes;pub use core::hsi::HsiAxesDomain;pub use core::hsi::HsiAxisReading;pub use core::hsi::HsiConsent;pub use core::hsi::HsiDirection;pub use core::hsi::HsiPayload;pub use core::hsi::HsiPrivacy;pub use core::hsi::HsiProducer;pub use core::hsi::HsiSource;pub use core::hsi::HsiSourceType;pub use core::hsi::HsiWindow;pub use core::hsi::HSI_VERSION;pub use core::schema::RawEvent;pub use core::schema::RawEventAdapter;pub use core::schema::ValidationError;pub use core::schema::SCHEMA_VERSION;pub use snapshot_adapter::AdaptSnapshot;pub use snapshot_adapter::DataSource;pub use snapshot_adapter::HsiScores;pub use snapshot_adapter::MappingConfig;pub use snapshot_adapter::ScoreConfidence;pub use snapshot_adapter::SnapshotAdapter;pub use biosignal::BaselineStore;pub use biosignal::FeatureDeriver;pub use biosignal::GarminAdapter;pub use biosignal::HsiEncoder;pub use biosignal::Normalizer;pub use biosignal::VendorPayloadAdapter;pub use biosignal::WhoopAdapter;pub use biosignal::DEFAULT_BASELINE_WINDOW;pub use pipeline::context::BioDailyContext;pub use pipeline::context::DecayedBioContext;pub use pipeline::context::DEFAULT_DECAY_HALF_LIFE_HOURS;pub use pipeline::garmin_to_hsi_daily;pub use pipeline::whoop_to_hsi_daily;pub use pipeline::FluxProcessor;pub use stats::ExtendedStats;pub use behavior::behavior_to_hsi;pub use behavior::BehaviorProcessor;pub use biosignal::types::*;
Modules§
- behavior
- Behavioral metrics computation module
- biosignal
- Biosignal domain - Wearable physiology processing
- core
- Core shared infrastructure for Synheart Flux
- ffi
- FFI bindings for Synheart Flux
- pipeline
- Pipeline orchestration
- snapshot_
adapter - Snapshot adapter for synheart-adapt-engine integration
- stats
- Extended Statistical Features
Constants§
- FLUX_
VERSION - Flux version embedded in all HSI payloads
- PRODUCER_
NAME - Producer name for HSI payloads