feat(sdk): Synheart.fetchCloudHsiWindows — pull HSI from the cloud archive#57
Merged
Conversation
…loud
Binds the runtime's synheart_core_fetch_cloud_hsi FFI (reuses the hsi_history
list C signature) → bridge.fetchCloudHsiWindows(fromMs,toMs) → typed facade
Synheart.fetchCloudHsiWindows({from,to}). Returns version-independent HSIState
records so hosts never branch on hsi_version. Empty when cloud unconfigured/
unconsented or the vendored runtime lacks the symbol. Blocks during the round-
trip like flush (Future-wrapped); async-FFI is a follow-up.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Binds the runtime's
synheart_core_fetch_cloud_hsiFFI (synheart-core-runtime#74) so hosts can pull historical / cross-device HSI windows from the cloud archive and process them on-device.Changes
hsi_historylist C signature:(handle, i64, i64) -> char*).bridge.fetchCloudHsiWindows(fromMs, toMs)→ parses the JSON array; guarded so a vendored lib lacking the symbol returns empty instead of throwing.Synheart.fetchCloudHsiWindows({from, to}).Returns full archived window payloads (any HSI version); the host parses them with the same path it uses for local windows. Empty when cloud unconfigured/unconsented or the vendored runtime predates the symbol.
flutter analyzeclean.Note: the underlying FFI does the network round-trip synchronously (native block_on) like the upload flush; exposed as a Future. A fully async FFI is a follow-up.