v1 - whoop w / foreground app. WIP bg app (next week, needs more testing...)#31
Open
Andrew-Pynch wants to merge 1 commit into
Open
v1 - whoop w / foreground app. WIP bg app (next week, needs more testing...)#31Andrew-Pynch wants to merge 1 commit into
Andrew-Pynch wants to merge 1 commit into
Conversation
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.
WHOOP Truffle App
This PR adds a foreground WHOOP app for Truffle. The shipped app exposes read-only tools for profile, body measurements, cycles, recovery, sleep, workouts, and a compact recent summary.
PR status
truffile.yaml.textinstall fields.metadata.backgroundsection in the manifest.OAuth handoff for Truffle
The current branch used my WHOOP developer app for local testing.
Until Truffle-owned OAuth is wired up, reviewers can test by running:
The script prints the values expected by
truffile deploy:WHOOP_CLIENT_IDWHOOP_CLIENT_SECRETWHOOP_REDIRECT_URIWHOOP_ACCESS_TOKENWHOOP_REFRESH_TOKENWHOOP_ACCESS_TOKEN_EXPIRES_ATWHOOP_TOKEN_SCOPEWHOOP_TOKEN_TYPEThe OAuth request includes the
offlinescope so the app can refresh access tokens after install. (tested this by deploying with bootstrap values, waiting till after token expirey, then confirming get whoop_status still worked / was able to pull recovery & strain dataForeground tools
whoop_statusget_profile_basicget_body_measurementslist_cyclesget_cycle_by_idlist_recoveryget_recovery_for_cyclelist_sleepget_sleep_by_idget_sleep_for_cyclelist_workoutsget_workout_by_idget_recent_whoop_summaryAll tools are read-only. Tool responses return structured WHOOP API payloads via the Truffle SDK
ok/errhelpers. Auth failures propagate asAppAuthErrorso the runtime can flag the app for user intervention.After deploying with real WHOOP credentials, you can run to quickly verify the tools / oauth is working
Background follow-up
whoop_background.pyandwhoop_bg_worker.pyare draft ambient-context code. Want to do more work on these before I enable