Skip to content

v1 - whoop w / foreground app. WIP bg app (next week, needs more testing...)#31

Open
Andrew-Pynch wants to merge 1 commit into
deepshard:mainfrom
Andrew-Pynch:ap/whoop
Open

v1 - whoop w / foreground app. WIP bg app (next week, needs more testing...)#31
Andrew-Pynch wants to merge 1 commit into
deepshard:mainfrom
Andrew-Pynch:ap/whoop

Conversation

@Andrew-Pynch
Copy link
Copy Markdown

@Andrew-Pynch Andrew-Pynch commented Apr 26, 2026

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

  • Foreground tools are ready for review and are the only runtime enabled in truffile.yaml.
  • OAuth is currently bootstrapped manually with a local helper script and Truffle text install fields.
  • Background code is included as draft follow-up work, but it is not copied into the deployed app and there is no metadata.background section 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:

python app-store/whoop/scripts/bootstrap_whoop_oauth.py

The script prints the values expected by truffile deploy:

  • WHOOP_CLIENT_ID
  • WHOOP_CLIENT_SECRET
  • WHOOP_REDIRECT_URI
  • WHOOP_ACCESS_TOKEN
  • WHOOP_REFRESH_TOKEN
  • WHOOP_ACCESS_TOKEN_EXPIRES_AT
  • WHOOP_TOKEN_SCOPE
  • WHOOP_TOKEN_TYPE

The OAuth request includes the offline scope 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 data

Foreground tools

  • whoop_status
  • get_profile_basic
  • get_body_measurements
  • list_cycles
  • get_cycle_by_id
  • list_recovery
  • get_recovery_for_cycle
  • list_sleep
  • get_sleep_by_id
  • get_sleep_for_cycle
  • list_workouts
  • get_workout_by_id
  • get_recent_whoop_summary

All tools are read-only. Tool responses return structured WHOOP API payloads via the Truffle SDK ok / err helpers. Auth failures propagate as AppAuthError so 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

python app-store/whoop/scripts/run_whoop_prompts.py

Background follow-up

whoop_background.py and whoop_bg_worker.py are draft ambient-context code. Want to do more work on these before I enable

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant