synheart_core 0.0.2
synheart_core: ^0.0.2 copied to clipboard
Synheart Core SDK - The unified SDK for HSI-compatible data collection, on-device state representation, optional interpretation modules (Focus, Emotion), and Syni integration. Includes HSI Runtime, We [...]
Changelog #
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
0.0.2 - 2025-12-29 #
Added #
-
HSI 1.0 Export Capability: synheart-core-dart can now export HSI 1.0 canonical payloads
- New
HSI10Payloadclass matching canonical HSI 1.0 schema toHSI10()extension method onHumanStateVector- Converts internal HSV representation to external HSI 1.0 contract format
- Full JSON Schema compliance with
/hsi/schema/hsi-1.0.schema.json - Producer metadata (name, version, instance_id)
- Window-based time scoping (micro/short/medium/long)
- Privacy-compliant assertions (no PII, derived metrics only)
- Comprehensive test suite (16 tests) validating HSI 1.0 compliance
- New
-
HSV State Axes: Implemented core HSV (Human State Vector) state representation axes
- Added
AffectAxis(arousalIndex, valenceStability) - Added
EngagementAxis(engagementStability, interactionCadence) - Added
ActivityAxis(motionIndex, postureStability) - Added
ContextAxis(screenActiveRatio, sessionFragmentation) - Added
StateEmbeddingclass for 64D dense vector representation - Added
HSIAxescontainer class grouping all state axes
- Added
-
HSV Computation in FusionEngine: Enhanced fusion engine to compute HSV state axes
- Computes arousal index from HR and HRV (60% HR, 40% HRV inverse)
- Computes valence stability from HRV SDNN
- Computes engagement stability and interaction cadence from behavioral patterns
- Computes motion index from wear and phone sensors
- Computes screen active ratio and session fragmentation from context
- All indices normalized to [0.0, 1.0] range with null for missing signals
-
Interpretation Modules: Both EmotionHead and FocusHead properly integrated
- EmotionHead uses EmotionEngine from synheart-emotion package
- FocusHead uses FocusEngine from synheart-focus package
- Both consume HSI state representation and produce semantic interpretations
-
Comprehensive test suite for EmotionHead module
- Tests for EmotionEngine initialization
- Tests for push/consumeReady API pattern
- Tests for EmotionResult to EmotionState mapping
- Tests for graceful handling of invalid/missing data
- Tests for lifecycle management (start, stop, dispose)
Changed #
-
EmotionHead: Refactored to use
EmotionEnginefrom synheart-emotion package instead of direct ONNX model access- Now uses
EmotionEngine.fromPretrained()for initialization - Changed from async
predictAsync()to synchronouspush/consumeReadypattern - Implements proper time-series emotion detection with ring buffer (10s window, 1s step)
- Synthesizes RR intervals from derived HRV features (temporary workaround until Phase 2 adds raw RR data to HSV)
- Improved cleanup logic to call
engine.clear()on dispose
- Now uses
-
MetaState: Updated to include HSI state axes and proper embedding structure
- Replaced
hsiEmbeddingList - Added
HSIAxes axesfield containing all state representation axes - Maintains backward compatibility through factory constructors
- Replaced
-
HumanStateVector (HSV): Enhanced to support full HSV state representation
- Includes state axes (affect, engagement, activity, context)
- Includes 64D state embedding
- Supports window types (micro, short, medium, long)
- Provides structured, interpretation-agnostic state representation
- Can export to HSI 1.0 canonical format via
toHSI10()method
Architecture #
-
Hybrid Approach: HSV (language-agnostic model) + HSI 1.0 (cross-platform format)
- HSV (Human State Vector): Language-agnostic state model implemented in Dart classes
- Same conceptual model across all platforms (Dart, Kotlin, Swift)
- Fast, type-safe on-device processing
- HSI 1.0 (Human State Interface): Cross-platform JSON wire format
- Platform-agnostic canonical format for interoperability
- Best of both worlds: native performance, cross-platform compliance
- HSV (Human State Vector): Language-agnostic state model implemented in Dart classes
-
Public API: removed legacy
HSIentrypoints;Synheartis now the single SDK entrypoint exported frompackage:synheart_core/synheart_core.dart. -
Logging: replaced
print()usage with internal logger to satisfyflutter_lints(avoid_print). -
Examples: cleaned up naming and flow to match
Synheart(including renaming the full pipeline demo).
Planned #
- Implement actual ML embedding model (currently placeholder)
- Improve documentation and examples
- Performance optimizations
- Additional wearable device support
- Phase 2: Add raw RR intervals to HSV metadata for full EmotionEngine integration
0.0.1 - 2025-12-26 #
Dependencies #
- All dependencies now using pub.dev hosted versions:
synheart_emotion: ^0.2.2synheart_focus: ^0.0.1synheart_wear: ^0.1.2
Added #
- Initial release of Synheart Core SDK
- HSI Runtime module for signal fusion and state computation
- Wear module for biosignal collection from wearables (HR, HRV, motion)
- Phone module for device motion and context signals
- Behavior module for digital interaction pattern tracking
- Consent module for user permission management
- Cloud Connector for secure HSI snapshot uploads
- Capabilities module for feature gating (core/extended/research)
- Optional interpretation modules: Focus Head and Emotion Head
- Comprehensive HSV (Human State Vector) data model
- Modular architecture with pluggable modules
- On-device processing with privacy-first design
Changed #
- Renamed FusionEngineV2 to FusionEngine (removed misleading version suffix)
Technical Details #
- Minimum SDK: Dart 3.7.0, Flutter 3.32.0
- Dependencies: synheart_wear ^0.1.2, rxdart ^0.28.0
- Architecture: Stream-based reactive module system
- Platform support: iOS, Android